From e563a91ee63ec82fb5c8ce3c5eb0329e3a57b9b3 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 3 Dec 2019 15:42:00 -0700 Subject: [PATCH 001/404] Update CODEOWNERS for gsd/develop --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 0d5230f89..986cf7664 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,7 +3,7 @@ # These owners will be the default owners for everything in the repo. #* @defunkt -* @climbfuji @llpcarson @grantfirl @JulieSchramm +* @climbfuji @tanyasmirnova # Order is important. The last matching pattern has the most precedence. # So if a pull request only touches javascript files, only these owners From 73717d29583373b8b73d9eac3bb71ebfa9d60561 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 5 Dec 2019 21:05:30 -0700 Subject: [PATCH 002/404] physics/GFS_time_vary_pre.fv3.*: allow for radiation being called on physics timestep for first nhfrad timesteps --- physics/GFS_time_vary_pre.fv3.F90 | 14 ++++++++++---- physics/GFS_time_vary_pre.fv3.meta | 8 ++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/physics/GFS_time_vary_pre.fv3.F90 b/physics/GFS_time_vary_pre.fv3.F90 index 46284a1bb..98a0f6697 100644 --- a/physics/GFS_time_vary_pre.fv3.F90 +++ b/physics/GFS_time_vary_pre.fv3.F90 @@ -65,9 +65,9 @@ end subroutine GFS_time_vary_pre_finalize !> \section arg_table_GFS_time_vary_pre_run Argument Table !! \htmlinclude GFS_time_vary_pre_run.html !! - subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & - nslwr, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, kdt, & - julian, yearlen, ipt, lprnt, lssav, lsswr, lslwr, solhr, errmsg, errflg) + subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & + nslwr, nhfrad, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, & + kdt, julian, yearlen, ipt, lprnt, lssav, lsswr, lslwr, solhr, errmsg, errflg) use machine, only: kind_phys @@ -77,7 +77,7 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & integer, intent(in) :: jdat(1:8), idat(1:8) integer, intent(in) :: lsm, lsm_noahmp, & nsswr, nslwr, me, & - master, nscyc + master, nscyc, nhfrad logical, intent(in) :: debug real(kind=kind_phys), intent(in) :: dtp @@ -169,6 +169,12 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & !--- allow for radiation to be called on every physics time step, if needed if (nsswr == 1) lsswr = .true. if (nslwr == 1) lslwr = .true. + !--- allow for radiation to be called on every physics time step + ! for the first nhfrad timesteps (for spinup, coldstarts only) + if (kdt<=nhfrad) then + lsswr = .true. + lslwr = .true. + end if !--- set the solar hour based on a combination of phour and time initial hour solhr = mod(phour+idate(1),con_24) diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index 3dc91952e..14081f8e4 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -102,6 +102,14 @@ type = integer intent = in optional = F +[nhfrad] + standard_name = number_of_timesteps_for_radiation_calls_on_physics_timestep + long_name = number of timesteps for radiation calls on physics timestep (coldstarts only) + units = count + dimensions = () + type = integer + intent = in + optional = F [idate] standard_name = date_and_time_at_model_initialization_reordered long_name = initial date with different size and ordering From e81ee3683d61d557404543f59c4a70949cdf2f45 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 12 Dec 2019 10:24:04 -0700 Subject: [PATCH 003/404] Update CODEOWNERS for move to NOAA-GSD --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 986cf7664..b6c597371 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,7 +3,7 @@ # These owners will be the default owners for everything in the repo. #* @defunkt -* @climbfuji @tanyasmirnova +* @DomHeinzeller # Order is important. The last matching pattern has the most precedence. # So if a pull request only touches javascript files, only these owners From 5ca808ea8242d3fbfdf28828b89647cf781a679e Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Fri, 13 Dec 2019 16:48:14 -0700 Subject: [PATCH 004/404] initialize HWRF sasas scheme using preprocessor directives controlled --- physics/samfdeepcnv.f | 254 +++++++++++++++++++++++++++++++++--------- 1 file changed, 199 insertions(+), 55 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index bb5d5deb1..abd1700c9 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -137,7 +137,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & dh, dhh, dp, & dq, dqsdp, dqsdt, dt, & dt2, dtmax, dtmin, - & dxcrtas, dxcrtuf, + & dxcrtas, dxcrtuf, dxcrtuf_hwrf, & dv1h, dv2h, dv3h, & dv1q, dv2q, dv3q, & dz, dz1, e1, edtmax, @@ -196,13 +196,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! & bb1, bb2, wucb ! c physical parameters -! parameter(grav=grav,asolfac=0.958) + parameter(grav=grav,asolfac=0.89) !HWRF ! parameter(grav=grav) ! parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) ! parameter(c0s=.002,c1=.002,d0=.01) ! parameter(d0=.01) parameter(d0=.001) -! parameter(c0l=c0s*asolfac) + parameter(c0l=c0s*asolfac) ! ! asolfac: aerosol-aware parameter based on Lim (2011) ! asolfac= cx / c0s(=.002) @@ -221,7 +221,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! parameter(cinacrmx=-120.,cinacrmn=-120.) parameter(cinacrmx=-120.,cinacrmn=-80.) parameter(bet1=1.875,cd1=.506,f1=2.0,gam1=.5) - parameter(betaw=.03,dxcrtas=8.e3,dxcrtuf=15.e3) + parameter(betaw=.03,dxcrtas=8.e3,dxcrtuf=15.e3,dxcrtuf_hwrf=25.e3) ! ! local variables and arrays real(kind=kind_phys) pfld(im,km), to(im,km), qo(im,km), @@ -267,10 +267,53 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & real(kind=kind_phys) tf, tcr, tcrf parameter (tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf)) +#if HWRF==1 + real*8 :: gasdev,ran1 !zhang + real :: rr !zhang + logical,save :: pert_sas_local !zhang + integer,save :: ens_random_seed_local,env_pp_local !zhang + integer :: ensda_physics_pert !zhang + real,save :: ens_sasamp_local !zhang + data ens_random_seed_local/0/ + data env_pp_local/0/ + CHARACTER(len=3) :: env_memb,env_pp +#endif + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 +#if HWRF==1 + if ( ens_random_seed_local .eq. 0 ) then + CALL nl_get_ensda_physics_pert(1,ensda_physics_pert) + ens_random_seed_local=ens_random_seed + env_pp_local=ensda_physics_pert + pert_sas_local=.false. + ens_sasamp_local=0.0 +! env_pp=1: do physics perturbations for ensda members, ens_random_seed must be 99 + if ( env_pp_local .eq. 1 ) then + if ( ens_random_seed .ne. 99 ) then + pert_sas_local=.true. + ens_sasamp_local=ens_sasamp + else +! ens_random_seed=99 do physics perturbation for ensemble forecasts, env_pp must be zero + ens_random_seed_local=ens_random_seed + pert_sas_local=pert_sas + ens_sasamp_local=ens_sasamp + endif + else + ens_random_seed_local=ens_random_seed + pert_sas_local=pert_sas + ens_sasamp_local=ens_sasamp + endif + print*, "DESAS ==", ens_random_seed_local,pert_sas_local,ens_sasamp_local,ensda_physics_pert + endif +#endif + + +#endif + +#ifndef HWRF_SCALESAS elocp = hvap/cp el2orc = hvap*hvap/(rv*cp) @@ -281,6 +324,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & !> ## Determine whether to perform aerosol transport do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) if (do_aerosols) do_aerosols = (ntr >= itc + ntc - 3) +#endif ! c----------------------------------------------------------------------- !> ## Compute preliminary quantities needed for static, dynamic, and feedback control portions of the algorithm. @@ -328,12 +372,22 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & xpwev(i)= 0. vshear(i) = 0. gdx(i) = sqrt(garea(i)) + +#ifdef HWRF_SCALESAS + scaldfunc(i)=-1.0 ! initialized wang + sigmagfm(i)=-1.0 + sigmuout(i)=-1.0 +#endif enddo ! !> - determine aerosol-aware rain conversion parameter over land do i=1,im if(islimsk(i) == 1) then +#ifdef HWRF_SCALESAS + c0(i) = c0l +#else c0(i) = c0s*asolfac +#endif else c0(i) = c0s endif @@ -366,6 +420,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & dt_mf(i,k) = 0. enddo enddo + if(mp_phys == mp_phys_mg) then do k = 1, km do i = 1, im @@ -398,8 +453,15 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! model tunable parameters are all here edtmaxl = .3 edtmaxs = .3 +#ifdef HWRF_SCALESAS + clam = .1 + aafac = .1 + betal = .05 + betas = .05 + evfact = 0.3 + evfactl = 0.3 +#else ! clam = .1 -! aafac = .1 aafac = .05 ! betal = .15 ! betas = .15 @@ -408,12 +470,17 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! evef = 0.07 ! evfact = 0.3 ! evfactl = 0.3 +#endif ! +#ifdef HWRF_SCALESAS + crtlamu = 1.0e-4 + cxlamu = 1.0e-3 +#else crtlame = 1.0e-4 - crtlamd = 1.0e-4 -! -! cxlame = 1.0e-3 cxlame = 1.0e-4 +#endif + + crtlamd = 1.0e-4 cxlamd = 1.0e-4 xlamde = 1.0e-4 xlamdd = 1.0e-4 @@ -467,6 +534,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) +#ifdef HWRF_SCALESAS + xlamue(i,k) = clam / zi(i,k) +#endif enddo enddo c @@ -514,6 +584,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! initialize tracer variables ! +#ifndef HWRF_SCALESAS do n = 3, ntr+2 kk = n-2 do k = 1, km @@ -527,6 +598,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif ! !> - Calculate saturation specific humidity and enforce minimum moisture values. do k = 1, km @@ -623,6 +695,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo + +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 1, km1 do i=1,im @@ -632,6 +706,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c c look for the level of free convection as cloud base c @@ -701,6 +776,18 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ptem1= .5*(cinpcrmx-cinpcrmn) cinpcr = cinpcrmx - ptem * ptem1 tem1 = pfld(i,kb(i)) - pfld(i,kbcon(i)) +#if HWRF==1 +! randomly perturb the convection trigger +!zzz if( pert_sas_local .and. ens_random_seed_local .gt. 0 ) then + if( pert_sas_local ) then +!zz print*,"ens_random_seed==",ens_random_seed,ens_random_seed_local + ens_random_seed_local=ran1(-ens_random_seed_local)*1000 + rr=2.0*ens_sasamp_local*ran1(-ens_random_seed_local)-ens_sasamp_local +!zz print*, "zhang inde sas=a", cinpcr,ens_sasamp_local,ens_random_seed_local,cinpcr + cinpcr=cinpcr+rr +!zz print*, "zhang inde sas=b", cinpcr,ens_sasamp_local,ens_random_seed_local,cinpcr + endif +#endif if(tem1 > cinpcr) then cnvflg(i) = .false. endif @@ -712,6 +799,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & totflg = totflg .and. (.not. cnvflg(i)) enddo if(totflg) return + +#ifndef HWRF_SCALESAS !! ! ! turbulent entrainment rate assumed to be proportional @@ -774,6 +863,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo + +#endif c c assume that updraft entrainment rate above cloud base is c same as that at cloud base @@ -783,19 +874,21 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & !! \epsilon = \epsilon_0F_0 + d_1\left(1-RH\right)F_1 !! \f] !! where \f$\epsilon_0\f$ is the cloud base entrainment rate, \f$d_1\f$ is a tunable constant, and \f$F_0=\left(\frac{q_s}{q_{s,b}}\right)^2\f$ and \f$F_1=\left(\frac{q_s}{q_{s,b}}\right)^3\f$ where \f$q_s\f$ and \f$q_{s,b}\f$ are the saturation specific humidities at a given level and cloud base, respectively. The detrainment rate in the cloud is assumed to be equal to the entrainment rate at cloud base. -! do i=1,im -! if(cnvflg(i)) then -! xlamx(i) = xlamue(i,kbcon(i)) -! endif -! enddo -! do k = 2, km1 -! do i=1,im -! if(cnvflg(i).and. -! & (k > kbcon(i) .and. k < kmax(i))) then -! xlamue(i,k) = xlamx(i) -! endif -! enddo -! enddo +#ifdef HWRF_SCALESAS + do i=1,im + if(cnvflg(i)) then + xlamx(i) = xlamue(i,kbcon(i)) + endif + enddo + do k = 2, km1 + do i=1,im + if(cnvflg(i).and. & + & (k > kbcon(i) .and. k < kmax(i))) then + xlamue(i,k) = xlamx(i) + endif + enddo + enddo +#endif c c specify detrainment rate for the updrafts c @@ -805,9 +898,11 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im if(cnvflg(i) .and. k < kmax(i)) then -! xlamud(i,k) = xlamx(i) -! xlamud(i,k) = crtlamd +#ifdef HWRF_SCALESAS + xlamud(i,k) = xlamx(i) +#else xlamud(i,k) = 0.001 * clamt(i) +#endif endif enddo enddo @@ -837,8 +932,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & (k > kbcon(i) .and. k < kmax(i))) then tem = cxlame * frh(i,k) * fent2(i,k) xlamue(i,k) = xlamue(i,k)*fent1(i,k) + tem +#ifndef HWRF_SCALESAS tem1 = cxlamd * frh(i,k) xlamud(i,k) = xlamud(i,k) + tem1 +#endif endif enddo enddo @@ -900,6 +997,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & pwavo(i) = 0. endif enddo +#ifndef HWRF_SCALESAS ! for tracers do n = 1, ntr do i = 1, im @@ -909,6 +1007,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#endif c c cloud property is modified by the entrainment process c @@ -939,6 +1038,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 2, km1 do i = 1, im @@ -954,6 +1054,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c c taking account into convection inhibition due to existence of c dry layers below cloud base @@ -1023,6 +1124,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & do i = 1, im if(cnvflg(i)) then ! +#ifndef HWRF_SCALESAS if(islimsk(i) == 1) then w1 = w1l w2 = w2l @@ -1051,6 +1153,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & cinacr = cinacrmx - tem * tem1 ! ! cinacr = cinacrmx +#else + cinacr = cinacrmx +#endif if(cina(i) < cinacr) cnvflg(i) = .false. endif enddo @@ -1137,14 +1242,11 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! k = kbcon(i) dp = 1000. * del(i,k) +#ifndef HWRF_SCALEASA xmbmax(i) = dp / (2. * grav * dt2) -! -! xmbmax(i) = dp / (grav * dt2) -! -! mbdt(i) = 0.1 * dp / grav -! -! tem = dp / (grav * dt2) -! xmbmax(i) = min(tem, xmbmax(i)) +#else + xmbmax(i) = dp / (grav * dt2) +#endif endif enddo c @@ -1184,8 +1286,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c if(k >= kbcon(i) .and. dq > 0.) then etah = .5 * (eta(i,k) + eta(i,k-1)) +#ifndef HWRF_SCALESAS dp = 1000. * del(i,k) +#endif if(ncloud > 0 .and. k > jmin(i)) then +#ifdef HWRF_SCALESAS + dp = 1000. * del(i,k) +#endif ptem = c0t(i,k) + c1 qlk = dq / (eta(i,k) + etah * ptem * dz) dellal(i,k) = etah * c1 * dz * qlk * grav / dp @@ -1357,8 +1464,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c if(dq > 0.) then etah = .5 * (eta(i,k) + eta(i,k-1)) +#ifndef HWRF_SCALESAS dp = 1000. * del(i,k) +#endif if(ncloud > 0) then +#ifdef HWRF_SCALESAS + dp = 1000. * del(i,k) +#endif ptem = c0t(i,k) + c1 qlk = dq / (eta(i,k) + etah * ptem * dz) dellal(i,k) = etah * c1 * dz * qlk * grav / dp @@ -1379,30 +1491,23 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! compute updraft velocity square(wu2) !> - Calculate updraft velocity square(wu2) according to Han et al.'s (2017) \cite han_et_al_2017 equation 7. ! -! bb1 = 2. * (1.+bet1*cd1) -! bb2 = 2. / (f1*(1.+gam1)) -! -! bb1 = 3.9 -! bb2 = 0.67 -! -! bb1 = 2.0 -! bb2 = 4.0 -! - bb1 = 4.0 - bb2 = 0.8 + bb1 = 4.0 + bb2 = 0.8 +#ifdef HWRF_SCALESAS + do i = 1, im + if (cnvflg(i)) then + k = kbcon1(i) + tem = po(i,k) / (rd * to(i,k)) + wucb = -0.01 * dot(i,k) / (tem * g) + if(wucb.gt.0.) then + wu2(i,k) = wucb * wucb + else + wu2(i,k) = 0. + endif + endif + enddo +#endif ! -! do i = 1, im -! if (cnvflg(i)) then -! k = kbcon1(i) -! tem = po(i,k) / (rd * to(i,k)) -! wucb = -0.01 * dot(i,k) / (tem * grav) -! if(wucb > 0.) then -! wu2(i,k) = wucb * wucb -! else -! wu2(i,k) = 0. -! endif -! endif -! enddo do k = 2, km1 do i = 1, im if (cnvflg(i)) then @@ -1554,6 +1659,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo do i = 1, im +#ifdef HWRF_SCALESAS + beta = betas + if(islimsk(i) == 1) beta = betal +#else betamn = betas if(islimsk(i) == 1) betamn = betal if(ntk > 0) then @@ -1569,6 +1678,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & else beta = betamn endif +#endif if(cnvflg(i)) then dz = (sumx(i)+zi(i,1))/float(kbcon(i)) tem = 1./float(kbcon(i)) @@ -1610,6 +1720,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo ! for tracers +#ifndef HWRF_SCALESAS do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -1618,6 +1729,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#endif cj !> - Calculate the cloud properties as a parcel descends, modified by entrainment and detrainment. Discretization follows Appendix B of Grell (1993) \cite grell_1993 . do k = km1, 1, -1 @@ -1647,6 +1759,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = km1, 1, -1 do i = 1, im @@ -1660,6 +1773,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c !> - Compute the amount of moisture that is necessary to keep the downdraft saturated. do k = km1, 1, -1 @@ -1762,6 +1876,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 1, km do i = 1, im @@ -1771,6 +1886,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif do i = 1, im if(cnvflg(i)) then dp = 1000. * del(i,1) @@ -1784,6 +1900,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & - vo(i,1)) * grav / dp endif enddo + +#ifndef HWRF_SCALESAS do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -1793,6 +1911,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#endif c c--- changed due to subsidence and entrainment c @@ -1857,6 +1976,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 2, km1 do i = 1, im @@ -1878,6 +1998,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c c------- cloud top c @@ -1902,6 +2023,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & qlko_ktcon(i) * grav / dp endif enddo + +#ifndef HWRF_SCALESAS do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -1912,6 +2035,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#endif c c------- final changed variable per unit mass flux c @@ -1942,6 +2066,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo + c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! c c--- the above changed environment is now used to calulate the @@ -2282,8 +2407,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & if(cnvflg(i)) then tem = zi(i,ktcon1(i)) - zi(i,kbcon1(i)) dtconv(i) = tem / wc(i) +#ifndef HWRF_SCALESAS tfac = 1. + gdx(i) / 75000. dtconv(i) = tfac * dtconv(i) +#endif dtconv(i) = max(dtconv(i),dtmin) dtconv(i) = min(dtconv(i),dtmax) endif @@ -2326,6 +2453,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & xmb(i) = tfac*betaw*rho*wc(i) endif enddo + !> - For the cases where the quasi-equilibrium assumption of Arakawa-Schubert is valid, first calculate the large scale destabilization as in equation 5 of Pan and Wu (1995) \cite pan_and_wu_1995 : !! \f[ !! \frac{\partial A}{\partial t}_{LS}=\frac{A^+-cA^0}{\Delta t_{LS}} @@ -2366,7 +2494,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & tfac = tauadv(i) / dtconv(i) tfac = min(tfac, 1.) xmb(i) = -tfac * fld(i) / xk(i) -! xmb(i) = min(xmb(i),xmbmax(i)) endif enddo !! @@ -2377,7 +2504,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo if(totflg) return !! -! + !> - For scale-aware parameterization, the updraft fraction (sigmagfm) is first computed as a function of the lateral entrainment rate at cloud base (see Han et al.'s (2017) \cite han_et_al_2017 equation 4 and 5), following the study by Grell and Freitas (2014) \cite grell_and_freitas_2014. do i = 1, im if(cnvflg(i)) then @@ -2396,6 +2523,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & if (gdx(i) < dxcrtuf) then scaldfunc(i) = (1.-sigmagfm(i)) * (1.-sigmagfm(i)) scaldfunc(i) = max(min(scaldfunc(i), 1.0), 0.) +#ifdef HWRF_SCALESAS + sigmuout(i)=sigmagfm(i) +#endif else scaldfunc(i) = 1.0 endif @@ -2404,6 +2534,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo +#ifndef HWRF_SCALESAS !> - If stochastic physics using cellular automata is .true. then perturb the mass-flux here: if(do_ca)then @@ -2420,6 +2551,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp, & qtr, qaero) +#endif c c restore to,qo,uo,vo to t1,q1,u1,v1 in case convection stops c @@ -2437,6 +2569,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 1, km do i = 1, im @@ -2446,6 +2579,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! c c--- feedback: simply the changes from the cloud with unit mass flux @@ -2464,11 +2598,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & delvbar(i) = 0. qcond(i) = 0. enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do i = 1, im delebar(i,n) = 0. enddo enddo +#endif do k = 1, km do i = 1, im if (cnvflg(i) .and. k <= kmax(i)) then @@ -2491,6 +2627,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr kk = n+2 do k = 1, km @@ -2505,6 +2642,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif !> - Recalculate saturation specific humidity using the updated temperature. do k = 1, km do i = 1, im @@ -2689,6 +2827,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo + +#ifndef HWRF_SCALESAS do n = 1, ntr kk = n+2 do k = 1, km @@ -2716,6 +2856,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo endif +#endif ! ! hchuang code change ! @@ -2751,6 +2892,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! include TKE contribution from deep convection ! +#ifndef HWRF_SCALESAS if (ntk > 0) then ! do k = 2, km1 @@ -2798,6 +2940,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo endif + +#endif return end subroutine samfdeepcnv_run From bff254722b7706b7fb50b13f69e31fb125f5f4cc Mon Sep 17 00:00:00 2001 From: Man Zhang Date: Fri, 13 Dec 2019 21:17:18 -0700 Subject: [PATCH 005/404] add preprocessor directives for HWRF in samfshalcnv --- physics/samfshalcnv.f | 159 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 142 insertions(+), 17 deletions(-) diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index ed80a2f54..ae212c98e 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -167,8 +167,11 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & parameter(dtke=tkemx-tkemn) parameter(dthk=25.) parameter(cinpcrmx=180.,cinpcrmn=120.) -! parameter(cinacrmx=-120.,cinacrmn=-120.) +#ifdef HWRF_SCALESAS + parameter(cinacrmx=-120.,cinacrmn=-120.) +#else parameter(cinacrmx=-120.,cinacrmn=-80.) +#endif parameter(crtlamd=3.e-4) parameter(dtmax=10800.,dtmin=600.) parameter(bet1=1.875,cd1=.506,f1=2.0,gam1=.5) @@ -202,7 +205,44 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! real(kind=kind_phys) tf, tcr, tcrf parameter (tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf)) -! + +#if HWRF==1 + real*8 :: gasdev,ran1 !zhang + real :: rr !zhang + logical,save :: pert_sas_local !zhang + integer,save :: ens_random_seed_local,env_pp_local !zhang + integer :: ensda_physics_pert !zhang + real,save :: ens_sasamp_local !zhang + data ens_random_seed_local/0/ + data env_pp_local/0/ + CHARACTER(len=3) :: env_memb,env_pp + if ( ens_random_seed_local .eq. 0 ) then + CALL nl_get_ensda_physics_pert(1,ensda_physics_pert) + ens_random_seed_local=ens_random_seed + env_pp_local=ensda_physics_pert + pert_sas_local=.false. + ens_sasamp_local=0.0 +! env_pp=1: do physics perturbations for ensda members, ens_random_seed must be 99 + if ( env_pp_local .eq. 1 ) then + if ( ens_random_seed .ne. 99 ) then + pert_sas_local=.true. + ens_sasamp_local=ens_sasamp + else +! ens_random_seed=99 do physics perturbation for ensemble forecasts, env_pp must be zero + ens_random_seed_local=ens_random_seed + pert_sas_local=pert_sas + ens_sasamp_local=ens_sasamp + endif + else + ens_random_seed_local=ens_random_seed + pert_sas_local=pert_sas + ens_sasamp_local=ens_sasamp + endif + + print*, "SHSAS ==", ens_random_seed_local,pert_sas_local,ens_sasamp_local,ensda_physics_pert + endif +#endif + c----------------------------------------------------------------------- ! ! Initialize CCPP error handling variables @@ -216,9 +256,11 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & fact2 = hvap/rv-fact1*t0c c----------------------------------------------------------------------- +#ifndef HWRF_SCALESAS !> ## Determine whether to perform aerosol transport do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) if (do_aerosols) do_aerosols = (ntr >= itc + ntc - 3) +#endif ! !************************************************************************ ! convert input Pa terms to Cb terms -- Moorthi @@ -253,6 +295,11 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & cina(i) = 0. vshear(i) = 0. gdx(i) = sqrt(garea(i)) + +#ifdef HWRF_SCALESAS + scaldfunc(i)=-1.0 ! wang initialized + sigmagfm(i)=-1.0 +#endif enddo !! !> - Return to the calling routine if deep convection is present or the surface buoyancy flux is negative. @@ -265,7 +312,11 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & !> - determine aerosol-aware rain conversion parameter over land do i=1,im if(islimsk(i) == 1) then +#ifdef HWRF_SCALESAS + c0(i) = c0l +#else c0(i) = c0s*asolfac +#endif else c0(i) = c0s endif @@ -303,9 +354,13 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & dt2 = delt ! c model tunable parameters are all here -! clam = .3 -! aafac = .1 +#ifdef HWRF_SCALESAS + clam = .3 + aafac = .1 + pgcon = 0.55 +#else aafac = .05 +#endif c evef = 0.07 evfact = 0.3 evfactl = 0.3 @@ -354,8 +409,16 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) +#ifdef HWRF_SCALESAS + xlamue(i,k) = clam / zi(i,k) +#endif enddo enddo +#ifdef HWRF_SCALESAS + do i=1,im + xlamue(i,km) = xlamue(i,km1) + enddo +#endif c c pbl height c @@ -410,6 +473,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! initialize tracer variables ! +#ifndef HWRF_SCALESAS do n = 3, ntr+2 kk = n-2 do k = 1, km @@ -422,6 +486,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif !> - Calculate saturation specific humidity and enforce minimum moisture values. do k = 1, km do i=1,im @@ -517,6 +582,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 1, km1 do i=1,im @@ -526,6 +592,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c c look for the level of free convection as cloud base c @@ -597,6 +664,18 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ptem1= .5*(cinpcrmx-cinpcrmn) cinpcr = cinpcrmx - ptem * ptem1 tem1 = pfld(i,kb(i)) - pfld(i,kbcon(i)) +#if HWRF==1 +! randomly perturb the convection trigger +!zzz if( pert_sas_local .and. ens_random_seed_local .gt. 0 ) then + if( pert_sas_local ) then +!zz print*, "zhang inde ens_random_seed=", ens_random_seed,ens_random_seed_local + ens_random_seed_local=ran1(-ens_random_seed_local)*1000 + rr=2.0*ens_sasamp_local*ran1(-ens_random_seed_local)-ens_sasamp_local +!zz print*, "zhang inde shsas=a", cinpcr,ens_sasamp_local,ens_random_seed_local,cinpcr + cinpcr=cinpcr+rr +!zz print*, "zhang inde shsas=b", cinpcr,ens_sasamp_local,ens_random_seed_local,cinpcr + endif +#endif if(tem1 > cinpcr) then cnvflg(i) = .false. endif @@ -612,14 +691,27 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! turbulent entrainment rate assumed to be proportional ! to subcloud mean TKE ! - if(ntk > 0) then ! + +#ifdef HWRF_SCALESAS +!c +!c specify the detrainment rate for the updrafts +!c + do i = 1, im + if(cnvflg(i)) then + xlamud(i) = xlamue(i,kbcon(i)) +! xlamud(i) = crtlamd + endif + enddo +#else + if(ntk > 0) then do i= 1, im if(cnvflg(i)) then sumx(i) = 0. tkemean(i) = 0. endif enddo + do k = 1, km1 do i = 1, im if(cnvflg(i)) then @@ -687,6 +779,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & xlamud(i) = 0.001 * clamt(i) endif enddo +#endif c c determine updraft mass flux for the subcloud layers c @@ -742,6 +835,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo ! for tracers +#ifndef HWRF_SCALESAS do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -750,6 +844,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#endif c ! cm is an enhancement factor in entrainment rates for momentum ! @@ -778,6 +873,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 2, km1 do i = 1, im @@ -793,6 +889,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c c taking account into convection inhibition due to existence of c dry layers below cloud base @@ -862,6 +959,9 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & do i = 1, im if(cnvflg(i)) then ! +#ifdef HWRF_SCALESAS + cinacr = cinacrmx +#else if(islimsk(i) == 1) then w1 = w1l w2 = w2l @@ -890,6 +990,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & cinacr = cinacrmx - tem * tem1 ! ! cinacr = cinacrmx +#endif if(cina(i) < cinacr) cnvflg(i) = .false. endif enddo @@ -929,7 +1030,11 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! k = kbcon(i) dp = 1000. * del(i,k) +#ifdef HWRF_SCALESAS + xmbmax(i) = dp / (g * dt2) +#else xmbmax(i) = dp / (2. * grav * dt2) +#endif ! ! xmbmax(i) = dp / (grav * dt2) ! @@ -1169,18 +1274,20 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & bb1 = 4.0 bb2 = 0.8 ! -! do i = 1, im -! if (cnvflg(i)) then -! k = kbcon1(i) -! tem = po(i,k) / (rd * to(i,k)) -! wucb = -0.01 * dot(i,k) / (tem * grav) -! if(wucb > 0.) then -! wu2(i,k) = wucb * wucb -! else -! wu2(i,k) = 0. -! endif -! endif -! enddo +#ifdef HWRF_SCALESAS + do i = 1, im + if (cnvflg(i)) then + k = kbcon1(i) + tem = po(i,k) / (rd * to(i,k)) + wucb = -0.01 * dot(i,k) / (tem * grav) + if(wucb > 0.) then + wu2(i,k) = wucb * wucb + else + wu2(i,k) = 0. + endif + endif + enddo +#endif do k = 2, km1 do i = 1, im if (cnvflg(i)) then @@ -1314,6 +1421,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 1, km do i = 1, im @@ -1323,6 +1431,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c c--- changed due to subsidence and entrainment c @@ -1367,6 +1476,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do k = 2, km1 do i = 1, im @@ -1383,6 +1493,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif c c------- cloud top c @@ -1407,6 +1518,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & & qlko_ktcon(i) * grav / dp endif enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -1417,6 +1529,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#endif ! ! compute convective turn-over time ! @@ -1425,8 +1538,10 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & if(cnvflg(i)) then tem = zi(i,ktcon1(i)) - zi(i,kbcon1(i)) dtconv(i) = tem / wc(i) +#ifndef HWRF_SCALESAS tfac = 1. + gdx(i) / 75000. dtconv(i) = tfac * dtconv(i) +#endif dtconv(i) = max(dtconv(i),dtmin) dtconv(i) = max(dtconv(i),dt2) dtconv(i) = min(dtconv(i),dtmax) @@ -1501,6 +1616,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo ! +#ifndef HWRF_SCALESAS !> - Transport aerosols if present ! if (do_aerosols) @@ -1510,6 +1626,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! & edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp, & xmb, c0t, eta, zi, xlamue, xlamud, delp, & qtr, qaero) +#endif ! !> ## For the "feedback control", calculate updated values of the state variables by multiplying the cloud base mass flux and the tendencies calculated per unit cloud base mass flux from the static control. !! - Recalculate saturation specific humidity. @@ -1539,11 +1656,13 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & delvbar(i) = 0. qcond(i) = 0. enddo +#ifndef HWRF_SCALESAS do n = 1, ntr do i = 1, im delebar(i,n) = 0. enddo enddo +#endif do k = 1, km do i = 1, im if (cnvflg(i)) then @@ -1566,6 +1685,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo +#ifndef HWRF_SCALESAS do n = 1, ntr kk = n+2 do k = 1, km @@ -1580,6 +1700,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo +#endif ! !> - Recalculate saturation specific humidity using the updated temperature. do k = 1, km @@ -1750,6 +1871,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! endif !> - Store aerosol concentrations if present +#ifndef HWRF_SCALESAS if (do_aerosols) then do n = 1, ntc kk = n + itc - 1 @@ -1762,6 +1884,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo endif +#endif ! ! hchuang code change ! @@ -1787,6 +1910,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! include TKE contribution from shallow convection ! +#ifndef HWRF_SCALESAS if (ntk > 0) then ! do k = 2, km1 @@ -1804,6 +1928,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo ! endif +#endif !! return end subroutine samfshalcnv_run From a4ac85250abdb82297a8fe3a0034d6c17cc84fbe Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Tue, 17 Dec 2019 17:15:39 -0700 Subject: [PATCH 006/404] fix bugs to pass compilation --- physics/samfdeepcnv.f | 282 +++++++++++++++++---------------------- physics/samfdeepcnv.meta | 8 ++ physics/samfshalcnv.f | 213 ++++++++++++++--------------- physics/samfshalcnv.meta | 8 ++ 4 files changed, 239 insertions(+), 272 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index abd1700c9..49dce2ae9 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -71,7 +71,7 @@ end subroutine samfdeepcnv_finalize subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & eps,epsm1,fv,grav,hvap,rd,rv, & & t0c,delt,ntk,ntr,delp, & - & prslp,psp,phil,qtr,q1,t1,u1,v1,fscav, & + & prslp,psp,phil,qtr,q1,t1,u1,v1,fscav,hwrf_samfdeep, & & do_ca,ca_deep,cldwrk,rn,kbot,ktop,kcnv,islimsk,garea, & & dot,ncloud,ud_mf,dd_mf,dt_mf,cnvw,cnvc, & & QLCN, QICN, w_upi, cf_upi, CNV_MFD, & @@ -93,7 +93,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & prslp(ix,km), garea(im), dot(ix,km), phil(ix,km) real(kind=kind_phys), dimension(:), intent(in) :: fscav real(kind=kind_phys), intent(in) :: ca_deep(ix) - logical, intent(in) :: do_ca + logical, intent(in) :: do_ca, hwrf_samfdeep integer, intent(inout) :: kcnv(im) ! DH* TODO - check dimensions of qtr, ntr+2 correct? *DH @@ -115,7 +115,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! *GJF integer :: mp_phys, mp_phys_mg - real(kind=kind_phys), intent(in) :: clam, c0s, c1, & + real(kind=kind_phys), intent(in) :: clam, c0s, c1, & & betal, betas, asolfac, & & evfact, evfactl, pgcon character(len=*), intent(out) :: errmsg @@ -128,8 +128,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & real(kind=kind_phys) clamd, tkemx, tkemn, dtke, & beta, dbeta, betamx, betamn, & cxlame, cxlamd, + & cxlamu, & xlamde, xlamdd, - & crtlame, crtlamd + & crtlamu, crtlamd, + & crtlame, c0l ! ! real(kind=kind_phys) detad real(kind=kind_phys) adw, aup, aafac, d0, @@ -180,8 +182,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & rntot(im), vshear(im), xaa0(im), & xlamd(im), xk(im), cina(im), & xmb(im), xmbmax(im), xpwav(im), -! & xpwev(im), xlamx(im), delebar(im,ntr), - & xpwev(im), delebar(im,ntr), + & xpwev(im), xlamx(im), delebar(im,ntr), +! & xpwev(im), delebar(im,ntr), & delubar(im), delvbar(im) ! real(kind=kind_phys) c0(im) @@ -192,17 +194,17 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! parameters for updraft velocity calculation real(kind=kind_phys) bet1, cd1, f1, gam1, - & bb1, bb2 -! & bb1, bb2, wucb +! & bb1, bb2 + & bb1, bb2, wucb ! c physical parameters - parameter(grav=grav,asolfac=0.89) !HWRF +! parameter(asolfac=0.89) !HWRF ! parameter(grav=grav) ! parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) ! parameter(c0s=.002,c1=.002,d0=.01) ! parameter(d0=.01) parameter(d0=.001) - parameter(c0l=c0s*asolfac) +!mz parameter(c0l=c0s*asolfac) ! ! asolfac: aerosol-aware parameter based on Lim (2011) ! asolfac= cx / c0s(=.002) @@ -232,6 +234,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! for updraft velocity calculation real(kind=kind_phys) wu2(im,km), buo(im,km), drag(im,km) real(kind=kind_phys) wc(im), scaldfunc(im), sigmagfm(im) + real(kind=kind_phys) sigmuout(im) ! c cloud water ! real(kind=kind_phys) tvo(im,km) @@ -310,21 +313,18 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif #endif + if(.not. hwrf_samfdeep) then + elocp = hvap/cp + el2orc = hvap*hvap/(rv*cp) -#endif - -#ifndef HWRF_SCALESAS - elocp = hvap/cp - el2orc = hvap*hvap/(rv*cp) - - fact1 = (cvap-cliq)/rv - fact2 = hvap/rv-fact1*t0c + fact1 = (cvap-cliq)/rv + fact2 = hvap/rv-fact1*t0c ! c----------------------------------------------------------------------- !> ## Determine whether to perform aerosol transport - do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) - if (do_aerosols) do_aerosols = (ntr >= itc + ntc - 3) -#endif + do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) + if (do_aerosols) do_aerosols = (ntr >= itc + ntc - 3) + endif ! c----------------------------------------------------------------------- !> ## Compute preliminary quantities needed for static, dynamic, and feedback control portions of the algorithm. @@ -373,21 +373,22 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & vshear(i) = 0. gdx(i) = sqrt(garea(i)) -#ifdef HWRF_SCALESAS + if( hwrf_samfdeep ) then scaldfunc(i)=-1.0 ! initialized wang sigmagfm(i)=-1.0 sigmuout(i)=-1.0 -#endif + endif enddo ! + c0l=c0s*asolfac !> - determine aerosol-aware rain conversion parameter over land do i=1,im if(islimsk(i) == 1) then -#ifdef HWRF_SCALESAS + if (hwrf_samfdeep) then c0(i) = c0l -#else + else c0(i) = c0s*asolfac -#endif + endif else c0(i) = c0s endif @@ -453,32 +454,15 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! model tunable parameters are all here edtmaxl = .3 edtmaxs = .3 -#ifdef HWRF_SCALESAS - clam = .1 - aafac = .1 - betal = .05 - betas = .05 - evfact = 0.3 - evfactl = 0.3 -#else -! clam = .1 - aafac = .05 -! betal = .15 -! betas = .15 -! betal = .05 -! betas = .05 -! evef = 0.07 -! evfact = 0.3 -! evfactl = 0.3 -#endif -! -#ifdef HWRF_SCALESAS - crtlamu = 1.0e-4 - cxlamu = 1.0e-3 -#else - crtlame = 1.0e-4 - cxlame = 1.0e-4 -#endif + if (hwrf_samfdeep) then + aafac = .1 + crtlamu = 1.0e-4 + cxlamu = 1.0e-3 + else + aafac = .05 + crtlame = 1.0e-4 + cxlame = 1.0e-4 + endif crtlamd = 1.0e-4 cxlamd = 1.0e-4 @@ -534,9 +518,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) -#ifdef HWRF_SCALESAS - xlamue(i,k) = clam / zi(i,k) -#endif + if (hwrf_samfdeep) then + xlamue(i,k) = clam / zi(i,k) + endif enddo enddo c @@ -584,7 +568,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! initialize tracer variables ! -#ifndef HWRF_SCALESAS + if(.not.hwrf_samfdeep) then do n = 3, ntr+2 kk = n-2 do k = 1, km @@ -598,7 +582,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo -#endif + endif ! !> - Calculate saturation specific humidity and enforce minimum moisture values. do k = 1, km @@ -696,7 +680,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then do n = 1, ntr do k = 1, km1 do i=1,im @@ -706,7 +690,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo -#endif + endif c c look for the level of free convection as cloud base c @@ -800,9 +784,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo if(totflg) return -#ifndef HWRF_SCALESAS -!! -! + if (.not. hwrf_samfdeep) then ! turbulent entrainment rate assumed to be proportional ! to subcloud mean TKE ! @@ -864,7 +846,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo -#endif + endif !(.not.hwrf_samfdeep) c c assume that updraft entrainment rate above cloud base is c same as that at cloud base @@ -874,7 +856,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & !! \epsilon = \epsilon_0F_0 + d_1\left(1-RH\right)F_1 !! \f] !! where \f$\epsilon_0\f$ is the cloud base entrainment rate, \f$d_1\f$ is a tunable constant, and \f$F_0=\left(\frac{q_s}{q_{s,b}}\right)^2\f$ and \f$F_1=\left(\frac{q_s}{q_{s,b}}\right)^3\f$ where \f$q_s\f$ and \f$q_{s,b}\f$ are the saturation specific humidities at a given level and cloud base, respectively. The detrainment rate in the cloud is assumed to be equal to the entrainment rate at cloud base. -#ifdef HWRF_SCALESAS + if (hwrf_samfdeep) then do i=1,im if(cnvflg(i)) then xlamx(i) = xlamue(i,kbcon(i)) @@ -887,8 +869,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & xlamue(i,k) = xlamx(i) endif enddo - enddo -#endif + enddo + endif c c specify detrainment rate for the updrafts c @@ -898,11 +880,11 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im if(cnvflg(i) .and. k < kmax(i)) then -#ifdef HWRF_SCALESAS - xlamud(i,k) = xlamx(i) -#else - xlamud(i,k) = 0.001 * clamt(i) -#endif + if (hwrf_samfdeep) then + xlamud(i,k) = xlamx(i) + else + xlamud(i,k) = 0.001 * clamt(i) + endif endif enddo enddo @@ -932,10 +914,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & (k > kbcon(i) .and. k < kmax(i))) then tem = cxlame * frh(i,k) * fent2(i,k) xlamue(i,k) = xlamue(i,k)*fent1(i,k) + tem -#ifndef HWRF_SCALESAS - tem1 = cxlamd * frh(i,k) - xlamud(i,k) = xlamud(i,k) + tem1 -#endif + if (.not.hwrf_samfdeep) then + tem1 = cxlamd * frh(i,k) + xlamud(i,k) = xlamud(i,k) + tem1 + endif endif enddo enddo @@ -997,17 +979,17 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & pwavo(i) = 0. endif enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then ! for tracers - do n = 1, ntr + do n = 1, ntr do i = 1, im if(cnvflg(i)) then indx = kb(i) ecko(i,indx,n) = ctro(i,indx,n) endif enddo - enddo -#endif + enddo + endif c c cloud property is modified by the entrainment process c @@ -1038,9 +1020,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr - do k = 2, km1 + if (.not.hwrf_samfdeep) then + do n = 1, ntr + do k = 2, km1 do i = 1, im if (cnvflg(i)) then if(k > kb(i) .and. k < kmax(i)) then @@ -1052,9 +1034,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif endif enddo - enddo - enddo -#endif + enddo + enddo + endif c c taking account into convection inhibition due to existence of c dry layers below cloud base @@ -1124,7 +1106,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & do i = 1, im if(cnvflg(i)) then ! -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then if(islimsk(i) == 1) then w1 = w1l w2 = w2l @@ -1151,11 +1133,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & tem = 1. - tem tem1= .5*(cinacrmx-cinacrmn) cinacr = cinacrmx - tem * tem1 -! -! cinacr = cinacrmx -#else + else cinacr = cinacrmx -#endif + endif if(cina(i) < cinacr) cnvflg(i) = .false. endif enddo @@ -1238,15 +1218,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & !> - Calculate the maximum value of the cloud base mass flux using the CFL-criterion-based formula of Han and Pan (2011) \cite han_and_pan_2011, equation 7. do i = 1, im if(cnvflg(i)) then -! xmbmax(i) = .1 -! k = kbcon(i) dp = 1000. * del(i,k) -#ifndef HWRF_SCALEASA - xmbmax(i) = dp / (2. * grav * dt2) -#else - xmbmax(i) = dp / (grav * dt2) -#endif + if (.not.hwrf_samfdeep) then + xmbmax(i) = dp / (2. * grav * dt2) + else + xmbmax(i) = dp / (grav * dt2) + endif endif enddo c @@ -1286,13 +1264,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c if(k >= kbcon(i) .and. dq > 0.) then etah = .5 * (eta(i,k) + eta(i,k-1)) -#ifndef HWRF_SCALESAS dp = 1000. * del(i,k) -#endif if(ncloud > 0 .and. k > jmin(i)) then -#ifdef HWRF_SCALESAS - dp = 1000. * del(i,k) -#endif ptem = c0t(i,k) + c1 qlk = dq / (eta(i,k) + etah * ptem * dz) dellal(i,k) = etah * c1 * dz * qlk * grav / dp @@ -1464,13 +1437,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c if(dq > 0.) then etah = .5 * (eta(i,k) + eta(i,k-1)) -#ifndef HWRF_SCALESAS dp = 1000. * del(i,k) -#endif if(ncloud > 0) then -#ifdef HWRF_SCALESAS - dp = 1000. * del(i,k) -#endif ptem = c0t(i,k) + c1 qlk = dq / (eta(i,k) + etah * ptem * dz) dellal(i,k) = etah * c1 * dz * qlk * grav / dp @@ -1493,12 +1461,12 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! bb1 = 4.0 bb2 = 0.8 -#ifdef HWRF_SCALESAS + if (hwrf_samfdeep) then do i = 1, im if (cnvflg(i)) then k = kbcon1(i) tem = po(i,k) / (rd * to(i,k)) - wucb = -0.01 * dot(i,k) / (tem * g) + wucb = -0.01 * dot(i,k) / (tem * grav) if(wucb.gt.0.) then wu2(i,k) = wucb * wucb else @@ -1506,7 +1474,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif endif enddo -#endif + endif ! do k = 2, km1 do i = 1, im @@ -1659,10 +1627,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo do i = 1, im -#ifdef HWRF_SCALESAS + if (hwrf_samfdeep) then beta = betas if(islimsk(i) == 1) beta = betal -#else + else betamn = betas if(islimsk(i) == 1) betamn = betal if(ntk > 0) then @@ -1678,7 +1646,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & else beta = betamn endif -#endif + endif if(cnvflg(i)) then dz = (sumx(i)+zi(i,1))/float(kbcon(i)) tem = 1./float(kbcon(i)) @@ -1720,7 +1688,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo ! for tracers -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -1729,7 +1697,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#endif + endif cj !> - Calculate the cloud properties as a parcel descends, modified by entrainment and detrainment. Discretization follows Appendix B of Grell (1993) \cite grell_1993 . do k = km1, 1, -1 @@ -1759,7 +1727,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS + if(.not.hwrf_samfdeep) then do n = 1, ntr do k = km1, 1, -1 do i = 1, im @@ -1773,7 +1741,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo -#endif + endif c !> - Compute the amount of moisture that is necessary to keep the downdraft saturated. do k = km1, 1, -1 @@ -1876,7 +1844,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then do n = 1, ntr do k = 1, km do i = 1, im @@ -1886,7 +1854,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo -#endif + endif do i = 1, im if(cnvflg(i)) then dp = 1000. * del(i,1) @@ -1901,7 +1869,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -1911,7 +1879,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#endif + endif c c--- changed due to subsidence and entrainment c @@ -1976,7 +1944,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then do n = 1, ntr do k = 2, km1 do i = 1, im @@ -1998,7 +1966,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo -#endif + endif c c------- cloud top c @@ -2024,7 +1992,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -2035,7 +2003,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#endif + endif c c------- final changed variable per unit mass flux c @@ -2407,10 +2375,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & if(cnvflg(i)) then tem = zi(i,ktcon1(i)) - zi(i,kbcon1(i)) dtconv(i) = tem / wc(i) -#ifndef HWRF_SCALESAS - tfac = 1. + gdx(i) / 75000. - dtconv(i) = tfac * dtconv(i) -#endif + if (.not.hwrf_samfdeep) then + tfac = 1. + gdx(i) / 75000. + dtconv(i) = tfac * dtconv(i) + endif dtconv(i) = max(dtconv(i),dtmin) dtconv(i) = min(dtconv(i),dtmax) endif @@ -2523,9 +2491,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & if (gdx(i) < dxcrtuf) then scaldfunc(i) = (1.-sigmagfm(i)) * (1.-sigmagfm(i)) scaldfunc(i) = max(min(scaldfunc(i), 1.0), 0.) -#ifdef HWRF_SCALESAS - sigmuout(i)=sigmagfm(i) -#endif + if (hwrf_samfdeep) then + sigmuout(i)=sigmagfm(i) + endif else scaldfunc(i) = 1.0 endif @@ -2534,7 +2502,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then !> - If stochastic physics using cellular automata is .true. then perturb the mass-flux here: if(do_ca)then @@ -2551,7 +2519,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp, & qtr, qaero) -#endif + endif c c restore to,qo,uo,vo to t1,q1,u1,v1 in case convection stops c @@ -2569,17 +2537,17 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr - do k = 1, km + if (.not.hwrf_samfdeep) then + do n = 1, ntr + do k = 1, km do i = 1, im if (cnvflg(i) .and. k <= kmax(i)) then ctro(i,k,n) = ctr(i,k,n) endif enddo - enddo - enddo -#endif + enddo + enddo + endif c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! c c--- feedback: simply the changes from the cloud with unit mass flux @@ -2598,13 +2566,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & delvbar(i) = 0. qcond(i) = 0. enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr - do i = 1, im - delebar(i,n) = 0. - enddo - enddo -#endif + if (.not.hwrf_samfdeep) then + do n = 1, ntr + do i = 1, im + delebar(i,n) = 0. + enddo + enddo + endif do k = 1, km do i = 1, im if (cnvflg(i) .and. k <= kmax(i)) then @@ -2627,10 +2595,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr + if (.not.hwrf_samfdeep) then + do n = 1, ntr kk = n+2 - do k = 1, km + do k = 1, km do i = 1, im if (cnvflg(i) .and. k <= kmax(i)) then if(k <= ktcon(i)) then @@ -2640,9 +2608,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif endif enddo - enddo - enddo -#endif + enddo + enddo + endif !> - Recalculate saturation specific humidity using the updated temperature. do k = 1, km do i = 1, im @@ -2828,7 +2796,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then do n = 1, ntr kk = n+2 do k = 1, km @@ -2856,7 +2824,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo endif -#endif + endif ! ! hchuang code change ! @@ -2892,7 +2860,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! include TKE contribution from deep convection ! -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfdeep) then if (ntk > 0) then ! do k = 2, km1 @@ -2941,7 +2909,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo endif -#endif + endif return end subroutine samfdeepcnv_run diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 3b54998fc..1fec047a2 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -265,6 +265,14 @@ kind = kind_phys intent = in optional = F +[hwrf_samfdeep] + standard_name = flag_for_hwrf_samfdeepcnv_scheme + long_name = flag for hwrf samfdeepcnv scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F [do_ca] standard_name = flag_for_cellular_automata long_name = cellular automata main switch diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index ae212c98e..65f19919f 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -55,7 +55,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & & prslp,psp,phil,qtr,q1,t1,u1,v1,fscav, & & rn,kbot,ktop,kcnv,islimsk,garea, & & dot,ncloud,hpbl,ud_mf,dt_mf,cnvw,cnvc, & - & clam,c0s,c1,pgcon,asolfac,errmsg,errflg) + & clam,c0s,c1,pgcon,asolfac,hwrf_samfshal,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -82,6 +82,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! real(kind=kind_phys), intent(in) :: clam, c0s, c1, & & asolfac, pgcon + logical, intent(in) :: hwrf_samfshal character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! @@ -140,8 +141,8 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! parameters for updraft velocity calculation real(kind=kind_phys) bet1, cd1, f1, gam1, - & bb1, bb2 -! & bb1, bb2, wucb +! & bb1, bb2 + & bb1, bb2, wucb cc c physical parameters @@ -167,11 +168,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & parameter(dtke=tkemx-tkemn) parameter(dthk=25.) parameter(cinpcrmx=180.,cinpcrmn=120.) -#ifdef HWRF_SCALESAS - parameter(cinacrmx=-120.,cinacrmn=-120.) -#else - parameter(cinacrmx=-120.,cinacrmn=-80.) -#endif + parameter(cinacrmx=-120.) parameter(crtlamd=3.e-4) parameter(dtmax=10800.,dtmin=600.) parameter(bet1=1.875,cd1=.506,f1=2.0,gam1=.5) @@ -255,12 +252,18 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & fact1 = (cvap-cliq)/rv fact2 = hvap/rv-fact1*t0c + if (hwrf_samfshal) then + cinacrmn=-120. + else + cinacrmn=-80. + endif + c----------------------------------------------------------------------- -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfshal) then !> ## Determine whether to perform aerosol transport - do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) - if (do_aerosols) do_aerosols = (ntr >= itc + ntc - 3) -#endif + do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) + if (do_aerosols) do_aerosols = (ntr >= itc + ntc - 3) + endif ! !************************************************************************ ! convert input Pa terms to Cb terms -- Moorthi @@ -296,10 +299,10 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & vshear(i) = 0. gdx(i) = sqrt(garea(i)) -#ifdef HWRF_SCALESAS + if (hwrf_samfshal) then scaldfunc(i)=-1.0 ! wang initialized sigmagfm(i)=-1.0 -#endif + endif enddo !! !> - Return to the calling routine if deep convection is present or the surface buoyancy flux is negative. @@ -312,11 +315,11 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & !> - determine aerosol-aware rain conversion parameter over land do i=1,im if(islimsk(i) == 1) then -#ifdef HWRF_SCALESAS + if (hwrf_samfshal) then c0(i) = c0l -#else + else c0(i) = c0s*asolfac -#endif + endif else c0(i) = c0s endif @@ -354,19 +357,15 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & dt2 = delt ! c model tunable parameters are all here -#ifdef HWRF_SCALESAS - clam = .3 - aafac = .1 - pgcon = 0.55 -#else - aafac = .05 -#endif + if (hwrf_samfshal) then + aafac = .1 + else + aafac = .05 + endif c evef = 0.07 evfact = 0.3 evfactl = 0.3 ! -! pgcon = 0.7 ! Gregory et al. (1997, QJRMS) -! pgcon = 0.55 ! Zhang & Wu (2003,JAS) w1l = -8.e-3 w2l = -4.e-2 w3l = -5.e-3 @@ -409,16 +408,16 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & do k = 1, km1 do i=1,im zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) -#ifdef HWRF_SCALESAS - xlamue(i,k) = clam / zi(i,k) -#endif + if (hwrf_samfshal) then + xlamue(i,k) = clam / zi(i,k) + endif enddo enddo -#ifdef HWRF_SCALESAS - do i=1,im + if (hwrf_samfshal) then + do i=1,im xlamue(i,km) = xlamue(i,km1) - enddo -#endif + enddo + endif c c pbl height c @@ -473,9 +472,9 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! initialize tracer variables ! -#ifndef HWRF_SCALESAS - do n = 3, ntr+2 - kk = n-2 + if (.not.hwrf_samfshal) then + do n = 3, ntr+2 + kk = n-2 do k = 1, km do i = 1, im if (cnvflg(i) .and. k <= kmax(i)) then @@ -485,8 +484,8 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo - enddo -#endif + enddo + endif !> - Calculate saturation specific humidity and enforce minimum moisture values. do k = 1, km do i=1,im @@ -582,17 +581,17 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr - do k = 1, km1 + if (.not.hwrf_samfshal) then + do n = 1, ntr + do k = 1, km1 do i=1,im if (cnvflg(i) .and. k <= kmax(i)-1) then ctro(i,k,n) = .5 * (ctro(i,k,n) + ctro(i,k+1,n)) endif enddo - enddo - enddo -#endif + enddo + enddo + endif c c look for the level of free convection as cloud base c @@ -693,17 +692,17 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! -#ifdef HWRF_SCALESAS !c !c specify the detrainment rate for the updrafts !c + if (hwrf_samfshal) then do i = 1, im if(cnvflg(i)) then xlamud(i) = xlamue(i,kbcon(i)) ! xlamud(i) = crtlamd endif enddo -#else + else if(ntk > 0) then do i= 1, im if(cnvflg(i)) then @@ -779,7 +778,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & xlamud(i) = 0.001 * clamt(i) endif enddo -#endif + endif ! hwrf_samfshal c c determine updraft mass flux for the subcloud layers c @@ -835,7 +834,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo ! for tracers -#ifndef HWRF_SCALESAS + if (.not. hwrf_samfshal) then do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -844,7 +843,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#endif + endif c ! cm is an enhancement factor in entrainment rates for momentum ! @@ -873,9 +872,9 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr - do k = 2, km1 + if (.not.hwrf_samfshal) then + do n = 1, ntr + do k = 2, km1 do i = 1, im if (cnvflg(i)) then if(k > kb(i) .and. k < kmax(i)) then @@ -887,9 +886,9 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif endif enddo - enddo - enddo -#endif + enddo + enddo + endif c c taking account into convection inhibition due to existence of c dry layers below cloud base @@ -959,9 +958,9 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & do i = 1, im if(cnvflg(i)) then ! -#ifdef HWRF_SCALESAS + if (hwrf_samfshal) then cinacr = cinacrmx -#else + else if(islimsk(i) == 1) then w1 = w1l w2 = w2l @@ -988,9 +987,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & tem = 1. - tem tem1= .5*(cinacrmx-cinacrmn) cinacr = cinacrmx - tem * tem1 -! -! cinacr = cinacrmx -#endif + endif if(cina(i) < cinacr) cnvflg(i) = .false. endif enddo @@ -1030,16 +1027,11 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! k = kbcon(i) dp = 1000. * del(i,k) -#ifdef HWRF_SCALESAS - xmbmax(i) = dp / (g * dt2) -#else - xmbmax(i) = dp / (2. * grav * dt2) -#endif -! -! xmbmax(i) = dp / (grav * dt2) -! -! tem = dp / (grav * dt2) -! xmbmax(i) = min(tem, xmbmax(i)) + if (hwrf_samfshal) then + xmbmax(i) = dp / (grav * dt2) + else + xmbmax(i) = dp / (2. * grav * dt2) + endif endif enddo c @@ -1261,20 +1253,11 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! compute updraft velocity square(wu2) !> - Calculate updraft velocity square(wu2) according to Han et al.'s (2017) \cite han_et_al_2017 equation 7. -! -! bb1 = 2. * (1.+bet1*cd1) -! bb2 = 2. / (f1*(1.+gam1)) -! -! bb1 = 3.9 -! bb2 = 0.67 -! -! bb1 = 2.0 -! bb2 = 4.0 ! bb1 = 4.0 bb2 = 0.8 ! -#ifdef HWRF_SCALESAS + if (hwrf_samfshal) then do i = 1, im if (cnvflg(i)) then k = kbcon1(i) @@ -1287,7 +1270,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif endif enddo -#endif + endif do k = 2, km1 do i = 1, im if (cnvflg(i)) then @@ -1421,17 +1404,17 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr - do k = 1, km + if (.not.hwrf_samfshal) then + do n = 1, ntr + do k = 1, km do i = 1, im if(cnvflg(i) .and. k <= kmax(i)) then dellae(i,k,n) = 0. endif enddo - enddo - enddo -#endif + enddo + enddo + endif c c--- changed due to subsidence and entrainment c @@ -1476,9 +1459,9 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr - do k = 2, km1 + if(.not.hwrf_samfshal) then + do n = 1, ntr + do k = 2, km1 do i = 1, im if (cnvflg(i)) then if(k > kb(i) .and. k < ktcon(i)) then @@ -1491,9 +1474,9 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif endif enddo - enddo - enddo -#endif + enddo + enddo + endif c c------- cloud top c @@ -1518,7 +1501,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & & qlko_ktcon(i) * grav / dp endif enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfshal) then do n = 1, ntr do i = 1, im if(cnvflg(i)) then @@ -1529,7 +1512,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#endif + endif ! ! compute convective turn-over time ! @@ -1538,10 +1521,10 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & if(cnvflg(i)) then tem = zi(i,ktcon1(i)) - zi(i,kbcon1(i)) dtconv(i) = tem / wc(i) -#ifndef HWRF_SCALESAS - tfac = 1. + gdx(i) / 75000. - dtconv(i) = tfac * dtconv(i) -#endif + if (.not.hwrf_samfshal) then + tfac = 1. + gdx(i) / 75000. + dtconv(i) = tfac * dtconv(i) + endif dtconv(i) = max(dtconv(i),dtmin) dtconv(i) = max(dtconv(i),dt2) dtconv(i) = min(dtconv(i),dtmax) @@ -1616,17 +1599,17 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo ! -#ifndef HWRF_SCALESAS !> - Transport aerosols if present ! - if (do_aerosols) + if (.not.hwrf_samfshal) then + if (do_aerosols) & call samfshalcnv_aerosols(im, ix, km, itc, ntc, ntr, delt, ! & xlamde, xlamdd, cnvflg, jmin, kb, kmax, kbcon, ktcon, fscav, & cnvflg, kb, kmax, kbcon, ktcon, fscav, ! & edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp, & xmb, c0t, eta, zi, xlamue, xlamud, delp, & qtr, qaero) -#endif + endif ! !> ## For the "feedback control", calculate updated values of the state variables by multiplying the cloud base mass flux and the tendencies calculated per unit cloud base mass flux from the static control. !! - Recalculate saturation specific humidity. @@ -1656,13 +1639,13 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & delvbar(i) = 0. qcond(i) = 0. enddo -#ifndef HWRF_SCALESAS - do n = 1, ntr - do i = 1, im + if (.not. hwrf_samfshal) then + do n = 1, ntr + do i = 1, im delebar(i,n) = 0. - enddo - enddo -#endif + enddo + enddo + endif do k = 1, km do i = 1, im if (cnvflg(i)) then @@ -1685,7 +1668,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfshal) then do n = 1, ntr kk = n+2 do k = 1, km @@ -1700,7 +1683,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo enddo -#endif + endif ! !> - Recalculate saturation specific humidity using the updated temperature. do k = 1, km @@ -1871,8 +1854,8 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! endif !> - Store aerosol concentrations if present -#ifndef HWRF_SCALESAS - if (do_aerosols) then + if (.not. hwrf_samfshal) then + if (do_aerosols) then do n = 1, ntc kk = n + itc - 1 do k = 1, km @@ -1884,7 +1867,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo endif -#endif + endif ! ! hchuang code change ! @@ -1910,7 +1893,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! include TKE contribution from shallow convection ! -#ifndef HWRF_SCALESAS + if (.not.hwrf_samfshal) then if (ntk > 0) then ! do k = 2, km1 @@ -1928,7 +1911,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo ! endif -#endif + endif !! return end subroutine samfshalcnv_run diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index 5189afd95..4e7fd3898 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -422,6 +422,14 @@ kind = kind_phys intent = in optional = F +[hwrf_samfshal] + standard_name = flag_for_hwrf_samfshalcnv_scheme + long_name = flag for hwrf samfshalcnv scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From beb3a33f128ee12ed567dbc5fe09645f755456e8 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Wed, 18 Dec 2019 13:17:10 -0700 Subject: [PATCH 007/404] delete HWRF ensemble capability --- physics/samfdeepcnv.f | 52 ++----------------------------------------- physics/samfshalcnv.f | 49 +--------------------------------------- 2 files changed, 3 insertions(+), 98 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 49dce2ae9..9a38ef453 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -270,48 +270,11 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & real(kind=kind_phys) tf, tcr, tcrf parameter (tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf)) -#if HWRF==1 - real*8 :: gasdev,ran1 !zhang - real :: rr !zhang - logical,save :: pert_sas_local !zhang - integer,save :: ens_random_seed_local,env_pp_local !zhang - integer :: ensda_physics_pert !zhang - real,save :: ens_sasamp_local !zhang - data ens_random_seed_local/0/ - data env_pp_local/0/ - CHARACTER(len=3) :: env_memb,env_pp -#endif ! Initialize CCPP error handling variables errmsg = '' errflg = 0 -#if HWRF==1 - if ( ens_random_seed_local .eq. 0 ) then - CALL nl_get_ensda_physics_pert(1,ensda_physics_pert) - ens_random_seed_local=ens_random_seed - env_pp_local=ensda_physics_pert - pert_sas_local=.false. - ens_sasamp_local=0.0 -! env_pp=1: do physics perturbations for ensda members, ens_random_seed must be 99 - if ( env_pp_local .eq. 1 ) then - if ( ens_random_seed .ne. 99 ) then - pert_sas_local=.true. - ens_sasamp_local=ens_sasamp - else -! ens_random_seed=99 do physics perturbation for ensemble forecasts, env_pp must be zero - ens_random_seed_local=ens_random_seed - pert_sas_local=pert_sas - ens_sasamp_local=ens_sasamp - endif - else - ens_random_seed_local=ens_random_seed - pert_sas_local=pert_sas - ens_sasamp_local=ens_sasamp - endif - print*, "DESAS ==", ens_random_seed_local,pert_sas_local,ens_sasamp_local,ensda_physics_pert - endif -#endif if(.not. hwrf_samfdeep) then elocp = hvap/cp @@ -374,7 +337,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & gdx(i) = sqrt(garea(i)) if( hwrf_samfdeep ) then - scaldfunc(i)=-1.0 ! initialized wang + scaldfunc(i)=-1.0 sigmagfm(i)=-1.0 sigmuout(i)=-1.0 endif @@ -760,18 +723,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ptem1= .5*(cinpcrmx-cinpcrmn) cinpcr = cinpcrmx - ptem * ptem1 tem1 = pfld(i,kb(i)) - pfld(i,kbcon(i)) -#if HWRF==1 -! randomly perturb the convection trigger -!zzz if( pert_sas_local .and. ens_random_seed_local .gt. 0 ) then - if( pert_sas_local ) then -!zz print*,"ens_random_seed==",ens_random_seed,ens_random_seed_local - ens_random_seed_local=ran1(-ens_random_seed_local)*1000 - rr=2.0*ens_sasamp_local*ran1(-ens_random_seed_local)-ens_sasamp_local -!zz print*, "zhang inde sas=a", cinpcr,ens_sasamp_local,ens_random_seed_local,cinpcr - cinpcr=cinpcr+rr -!zz print*, "zhang inde sas=b", cinpcr,ens_sasamp_local,ens_random_seed_local,cinpcr - endif -#endif + if(tem1 > cinpcr) then cnvflg(i) = .false. endif diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index 65f19919f..7fa49a856 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -203,42 +203,6 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & real(kind=kind_phys) tf, tcr, tcrf parameter (tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf)) -#if HWRF==1 - real*8 :: gasdev,ran1 !zhang - real :: rr !zhang - logical,save :: pert_sas_local !zhang - integer,save :: ens_random_seed_local,env_pp_local !zhang - integer :: ensda_physics_pert !zhang - real,save :: ens_sasamp_local !zhang - data ens_random_seed_local/0/ - data env_pp_local/0/ - CHARACTER(len=3) :: env_memb,env_pp - if ( ens_random_seed_local .eq. 0 ) then - CALL nl_get_ensda_physics_pert(1,ensda_physics_pert) - ens_random_seed_local=ens_random_seed - env_pp_local=ensda_physics_pert - pert_sas_local=.false. - ens_sasamp_local=0.0 -! env_pp=1: do physics perturbations for ensda members, ens_random_seed must be 99 - if ( env_pp_local .eq. 1 ) then - if ( ens_random_seed .ne. 99 ) then - pert_sas_local=.true. - ens_sasamp_local=ens_sasamp - else -! ens_random_seed=99 do physics perturbation for ensemble forecasts, env_pp must be zero - ens_random_seed_local=ens_random_seed - pert_sas_local=pert_sas - ens_sasamp_local=ens_sasamp - endif - else - ens_random_seed_local=ens_random_seed - pert_sas_local=pert_sas - ens_sasamp_local=ens_sasamp - endif - - print*, "SHSAS ==", ens_random_seed_local,pert_sas_local,ens_sasamp_local,ensda_physics_pert - endif -#endif c----------------------------------------------------------------------- ! @@ -663,18 +627,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ptem1= .5*(cinpcrmx-cinpcrmn) cinpcr = cinpcrmx - ptem * ptem1 tem1 = pfld(i,kb(i)) - pfld(i,kbcon(i)) -#if HWRF==1 -! randomly perturb the convection trigger -!zzz if( pert_sas_local .and. ens_random_seed_local .gt. 0 ) then - if( pert_sas_local ) then -!zz print*, "zhang inde ens_random_seed=", ens_random_seed,ens_random_seed_local - ens_random_seed_local=ran1(-ens_random_seed_local)*1000 - rr=2.0*ens_sasamp_local*ran1(-ens_random_seed_local)-ens_sasamp_local -!zz print*, "zhang inde shsas=a", cinpcr,ens_sasamp_local,ens_random_seed_local,cinpcr - cinpcr=cinpcr+rr -!zz print*, "zhang inde shsas=b", cinpcr,ens_sasamp_local,ens_random_seed_local,cinpcr - endif -#endif + if(tem1 > cinpcr) then cnvflg(i) = .false. endif From bdf4f8e4e9b88f1e846753e47abafa2df7eae24c Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 19 Dec 2019 20:13:30 +0000 Subject: [PATCH 008/404] add qdiag3d support --- physics/GFS_MP_generic.F90 | 31 ++++++++++++++++++++----------- physics/GFS_MP_generic.meta | 16 ++++++++++++++++ 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index a7afa2ee0..ea2ef6c16 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -16,13 +16,13 @@ end subroutine GFS_MP_generic_pre_init !> \section arg_table_GFS_MP_generic_pre_run Argument Table !! \htmlinclude GFS_MP_generic_pre_run.html !! - subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_q, errmsg, errflg) + subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_q, errmsg, errflg) ! use machine, only: kind_phys implicit none integer, intent(in) :: im, levs, ntcw, nncl, ntrac - logical, intent(in) :: ldiag3d, do_aw + logical, intent(in) :: ldiag3d, qdiag3d, do_aw real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0 real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0 @@ -42,12 +42,14 @@ subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, do_aw, ntcw, nncl, ntrac, g do k=1,levs do i=1,im save_t(i,k) = gt0(i,k) - save_q(1:im,:,1) = gq0(1:im,:,1) enddo enddo - do n=ntcw,ntcw+nncl-1 - save_q(1:im,:,n) = gq0(1:im,:,n) - enddo + if(do_aw .or. (qdiag3d .and. ldiag3d)) then + save_q(1:im,:,1) = gq0(1:im,:,1) + do n=ntcw,ntcw+nncl-1 + save_q(1:im,:,n) = gq0(1:im,:,n) + enddo + endif endif end subroutine GFS_MP_generic_pre_run @@ -81,7 +83,7 @@ end subroutine GFS_MP_generic_post_init !> \section gfs_mp_gen GFS MP Generic Post General Algorithm !> @{ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, & - imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires, cal_pre, lssav, ldiag3d, cplflx, cplchm, con_g, dtf, frain, rainc, rain1, & + imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires, cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, con_g, dtf, frain, rainc, rain1, & rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_qv, rain0, ice0, snow0, & graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, & totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, dt3dt, dq3dt, rain_cpl, rainc_cpl, snow_cpl, pwat, & @@ -94,7 +96,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt integer, intent(in) :: im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires - logical, intent(in) :: cal_pre, lssav, ldiag3d, cplflx, cplchm + logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm real(kind=kind_phys), intent(in) :: dtf, frain, con_g real(kind=kind_phys), dimension(im), intent(in) :: rainc, rain1, xlat, xlon, tsfc @@ -110,8 +112,9 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt srflag, cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, & totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, & snow_cpl, pwat - ! These arrays are only allocated if ldiag3d is .true. - real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, dq3dt + + real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt ! only if ldiag3d + real(kind=kind_phys), dimension(:,:), intent(inout) :: dq3dt ! only if ldiag3d and qdiag3d ! Stochastic physics / surface perturbations logical, intent(in) :: do_sppt @@ -256,9 +259,15 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt do k=1,levs do i=1,im dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain -! dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain enddo enddo + if (qdiag3d) then + do k=1,levs + do i=1,im + dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain + enddo + enddo + endif endif endif diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 3a11a9983..1ac030bc7 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -30,6 +30,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = logical flag for 3D tracer diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F [do_aw] standard_name = flag_for_Arakawa_Wu_adjustment long_name = flag for Arakawa Wu scale-aware adjustment @@ -266,6 +274,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = logical flag for 3D tracer diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F [cplflx] standard_name = flag_for_flux_coupling long_name = flag controlling cplflx collection (default off) From c825f5faeb3c658ffcf32b84b0e7527815862812 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Fri, 20 Dec 2019 14:56:59 -0700 Subject: [PATCH 009/404] remove if outside of loop per Doms suggestion --- physics/samfdeepcnv.f | 193 +++++++++++++++++++++++++++++++----------- physics/samfshalcnv.f | 100 ++++++++++++++-------- 2 files changed, 207 insertions(+), 86 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 9a38ef453..fcc63c5d1 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -305,7 +305,41 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c c initialize arrays c - do i=1,im + if (.not.hwrf_samfdeep) then + do i=1,im + cnvflg(i) = .true. + rn(i)=0. + mbdt(i)=10. + kbot(i)=km+1 + ktop(i)=0 + kbcon(i)=km + ktcon(i)=1 + ktconn(i)=1 + dtconv(i) = 3600. + cldwrk(i) = 0. + pdot(i) = 0. + lmin(i) = 1 + jmin(i) = 1 + qlko_ktcon(i) = 0. + edt(i) = 0. + edto(i) = 0. + edtx(i) = 0. +! acrt(i) = 0. +! acrtfct(i) = 1. + aa1(i) = 0. + aa2(i) = 0. + xaa0(i) = 0. + cina(i) = 0. + pwavo(i)= 0. + pwevo(i)= 0. + xpwav(i)= 0. + xpwev(i)= 0. + vshear(i) = 0. + gdx(i) = sqrt(garea(i)) + enddo + + else + do i=1,im cnvflg(i) = .true. rn(i)=0. mbdt(i)=10. @@ -336,26 +370,22 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & vshear(i) = 0. gdx(i) = sqrt(garea(i)) - if( hwrf_samfdeep ) then - scaldfunc(i)=-1.0 + !mz*HWRF SAS + scaldfunc(i)=-1.0 sigmagfm(i)=-1.0 sigmuout(i)=-1.0 - endif - enddo + enddo + endif ! - c0l=c0s*asolfac !> - determine aerosol-aware rain conversion parameter over land do i=1,im if(islimsk(i) == 1) then - if (hwrf_samfdeep) then - c0(i) = c0l - else c0(i) = c0s*asolfac - endif else c0(i) = c0s endif enddo + !> - determine rain conversion parameter above the freezing level which exponentially decreases with decreasing temperature from Han et al.'s (2017) \cite han_et_al_2017 equation 8. do k = 1, km do i = 1, im @@ -478,14 +508,21 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo !> - Calculate interface height - do k = 1, km1 + if (hwrf_samfdeep) then + do k = 1, km1 do i=1,im zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) - if (hwrf_samfdeep) then - xlamue(i,k) = clam / zi(i,k) - endif + xlamue(i,k) = clam / zi(i,k) enddo - enddo + enddo + else + do k = 1, km1 + do i=1,im + zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) + enddo + enddo + endif + c c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! c convert surface pressure to mb from cb @@ -860,19 +897,29 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c organized one depending on the environmental relative humidity c (Bechtold et al., 2008; Derbyshire et al., 2011) c - do k = 2, km1 + if (hwrf_samfdeep) then + do k = 2, km1 + do i=1,im + if(cnvflg(i) .and. + & (k > kbcon(i) .and. k < kmax(i))) then + tem = cxlamu * frh(i,k) * fent2(i,k) + xlamue(i,k) = xlamue(i,k)*fent1(i,k) + tem + endif + enddo + enddo + else + do k = 2, km1 do i=1,im if(cnvflg(i) .and. & (k > kbcon(i) .and. k < kmax(i))) then tem = cxlame * frh(i,k) * fent2(i,k) xlamue(i,k) = xlamue(i,k)*fent1(i,k) + tem - if (.not.hwrf_samfdeep) then - tem1 = cxlamd * frh(i,k) - xlamud(i,k) = xlamud(i,k) + tem1 - endif + tem1 = cxlamd * frh(i,k) + xlamud(i,k) = xlamud(i,k) + tem1 endif enddo - enddo + enddo + endif ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! c @@ -1055,10 +1102,17 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo !> - Turn off convection if the CIN is less than a critical value (cinacr) which is inversely proportional to the large-scale vertical velocity. - do i = 1, im + + if(hwrf_samfdeep) then + do i = 1, im + if(cnvflg(i)) then + cinacr = cinacrmx + if(cina(i) < cinacr) cnvflg(i) = .false. + endif + enddo + else !gfs_samfdeep + do i = 1, im if(cnvflg(i)) then -! - if (.not.hwrf_samfdeep) then if(islimsk(i) == 1) then w1 = w1l w2 = w2l @@ -1085,12 +1139,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & tem = 1. - tem tem1= .5*(cinacrmx-cinacrmn) cinacr = cinacrmx - tem * tem1 - else - cinacr = cinacrmx - endif if(cina(i) < cinacr) cnvflg(i) = .false. endif - enddo + enddo + endif !hwrf_samfdeep !! totflg = .true. do i=1,im @@ -1168,17 +1220,23 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c specify upper limit of mass flux at cloud base c !> - Calculate the maximum value of the cloud base mass flux using the CFL-criterion-based formula of Han and Pan (2011) \cite han_and_pan_2011, equation 7. - do i = 1, im + if(hwrf_samfdeep) then + do i = 1, im if(cnvflg(i)) then k = kbcon(i) dp = 1000. * del(i,k) - if (.not.hwrf_samfdeep) then - xmbmax(i) = dp / (2. * grav * dt2) - else - xmbmax(i) = dp / (grav * dt2) - endif + xmbmax(i) = dp / (grav * dt2) endif - enddo + enddo + else + do i = 1, im + if(cnvflg(i)) then + k = kbcon(i) + dp = 1000. * del(i,k) + xmbmax(i) = dp / (2. * grav * dt2) + endif + enddo + endif c c compute cloud moisture property and precipitation c @@ -1578,11 +1636,19 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo - do i = 1, im - if (hwrf_samfdeep) then + + if (hwrf_samfdeep) then + do i = 1, im beta = betas if(islimsk(i) == 1) beta = betal - else + if(cnvflg(i)) then + dz = (sumx(i)+zi(i,1))/float(kbcon(i)) + tem = 1./float(kbcon(i)) + xlamd(i) = (1.-beta**tem)/dz + endif + enddo + else + do i = 1, im betamn = betas if(islimsk(i) == 1) betamn = betal if(ntk > 0) then @@ -1598,13 +1664,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & else beta = betamn endif - endif if(cnvflg(i)) then dz = (sumx(i)+zi(i,1))/float(kbcon(i)) tem = 1./float(kbcon(i)) xlamd(i) = (1.-beta**tem)/dz endif - enddo + enddo + endif c c determine downdraft mass flux c @@ -2323,18 +2389,29 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! compute convective turn-over time ! !> - Following Bechtold et al. (2008) \cite bechtold_et_al_2008, the convective adjustment time (dtconv) is set to be proportional to the convective turnover time, which is computed using the mean updraft velocity (wc) and the cloud depth. It is also proportional to the grid size (gdx). - do i= 1, im + + if(hwrf_samfdeep) then + do i= 1, im if(cnvflg(i)) then tem = zi(i,ktcon1(i)) - zi(i,kbcon1(i)) dtconv(i) = tem / wc(i) - if (.not.hwrf_samfdeep) then - tfac = 1. + gdx(i) / 75000. - dtconv(i) = tfac * dtconv(i) - endif dtconv(i) = max(dtconv(i),dtmin) dtconv(i) = min(dtconv(i),dtmax) endif - enddo + enddo + else + do i= 1, im + if(cnvflg(i)) then + tem = zi(i,ktcon1(i)) - zi(i,kbcon1(i)) + dtconv(i) = tem / wc(i) + tfac = 1. + gdx(i) / 75000. + dtconv(i) = tfac * dtconv(i) + dtconv(i) = max(dtconv(i),dtmin) + dtconv(i) = min(dtconv(i),dtmax) + endif + enddo + endif + ! !> - Calculate advective time scale (tauadv) using a mean cloud layer wind speed. do i= 1, im @@ -2438,21 +2515,35 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo ! !> - Then, calculate the reduction factor (scaldfunc) of the vertical convective eddy transport of mass flux as a function of updraft fraction from the studies by Arakawa and Wu (2013) \cite arakawa_and_wu_2013 (also see Han et al.'s (2017) \cite han_et_al_2017 equation 1 and 2). The final cloud base mass flux with scale-aware parameterization is obtained from the mass flux when sigmagfm << 1, multiplied by the reduction factor (Han et al.'s (2017) \cite han_et_al_2017 equation 2). - do i = 1, im + if(hwrf_samfdeep) then + do i = 1, im if(cnvflg(i)) then if (gdx(i) < dxcrtuf) then scaldfunc(i) = (1.-sigmagfm(i)) * (1.-sigmagfm(i)) scaldfunc(i) = max(min(scaldfunc(i), 1.0), 0.) - if (hwrf_samfdeep) then - sigmuout(i)=sigmagfm(i) - endif + sigmuout(i)=sigmagfm(i) else scaldfunc(i) = 1.0 endif xmb(i) = xmb(i) * scaldfunc(i) xmb(i) = min(xmb(i),xmbmax(i)) endif - enddo + enddo + + else + do i = 1, im + if(cnvflg(i)) then + if (gdx(i) < dxcrtuf) then + scaldfunc(i) = (1.-sigmagfm(i)) * (1.-sigmagfm(i)) + scaldfunc(i) = max(min(scaldfunc(i), 1.0), 0.) + else + scaldfunc(i) = 1.0 + endif + xmb(i) = xmb(i) * scaldfunc(i) + xmb(i) = min(xmb(i),xmbmax(i)) + endif + enddo + endif if (.not.hwrf_samfdeep) then !> - If stochastic physics using cellular automata is .true. then perturb the mass-flux here: diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index 7fa49a856..e21110bd6 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -216,9 +216,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & fact1 = (cvap-cliq)/rv fact2 = hvap/rv-fact1*t0c - if (hwrf_samfshal) then - cinacrmn=-120. - else + if (.not.hwrf_samfshal) then cinacrmn=-80. endif @@ -243,7 +241,8 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & c initialize arrays c !> - Initialize column-integrated and other single-value-per-column variable arrays. - do i=1,im + if(hwrf_samfshal) then + do i=1,im cnvflg(i) = .true. if(kcnv(i) == 1) cnvflg(i) = .false. if(cnvflg(i)) then @@ -262,12 +261,32 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & cina(i) = 0. vshear(i) = 0. gdx(i) = sqrt(garea(i)) - - if (hwrf_samfshal) then scaldfunc(i)=-1.0 ! wang initialized sigmagfm(i)=-1.0 + enddo + + else !gfs_samfshal + do i=1,im + cnvflg(i) = .true. + if(kcnv(i) == 1) cnvflg(i) = .false. + if(cnvflg(i)) then + kbot(i)=km+1 + ktop(i)=0 endif - enddo + rn(i)=0. + kbcon(i)=km + ktcon(i)=1 + ktconn(i)=1 + kb(i)=km + pdot(i) = 0. + qlko_ktcon(i) = 0. + edt(i) = 0. + aa1(i) = 0. + cina(i) = 0. + vshear(i) = 0. + gdx(i) = sqrt(garea(i)) + enddo + endif !! !> - Return to the calling routine if deep convection is present or the surface buoyancy flux is negative. totflg = .true. @@ -279,11 +298,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & !> - determine aerosol-aware rain conversion parameter over land do i=1,im if(islimsk(i) == 1) then - if (hwrf_samfshal) then - c0(i) = c0l - else c0(i) = c0s*asolfac - endif else c0(i) = c0s endif @@ -369,18 +384,22 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo !> - Calculate interface height - do k = 1, km1 + if(hwrf_samfshal) then + do k = 1, km1 do i=1,im zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) - if (hwrf_samfshal) then - xlamue(i,k) = clam / zi(i,k) - endif + xlamue(i,k) = clam / zi(i,k) enddo - enddo - if (hwrf_samfshal) then + enddo do i=1,im xlamue(i,km) = xlamue(i,km1) enddo + else + do k = 1, km1 + do i=1,im + zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) + enddo + enddo endif c c pbl height @@ -545,6 +564,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo + if (.not.hwrf_samfshal) then do n = 1, ntr do k = 1, km1 @@ -649,12 +669,12 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & !c specify the detrainment rate for the updrafts !c if (hwrf_samfshal) then - do i = 1, im + do i = 1, im if(cnvflg(i)) then xlamud(i) = xlamue(i,kbcon(i)) ! xlamud(i) = crtlamd endif - enddo + enddo else if(ntk > 0) then do i= 1, im @@ -825,6 +845,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo + if (.not.hwrf_samfshal) then do n = 1, ntr do k = 2, km1 @@ -908,12 +929,17 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo !> - Turn off convection if the CIN is less than a critical value (cinacr) which is inversely proportional to the large-scale vertical velocity. - do i = 1, im + + if (hwrf_samfshal) then + do i = 1, im + if(cnvflg(i)) then + cinacr = cinacrmx + if(cina(i) < cinacr) cnvflg(i) = .false. + endif + enddo + else + do i = 1, im if(cnvflg(i)) then -! - if (hwrf_samfshal) then - cinacr = cinacrmx - else if(islimsk(i) == 1) then w1 = w1l w2 = w2l @@ -942,8 +968,8 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & cinacr = cinacrmx - tem * tem1 endif if(cina(i) < cinacr) cnvflg(i) = .false. - endif - enddo + enddo + endif !! totflg = .true. do i=1,im @@ -974,19 +1000,23 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & c specify upper limit of mass flux at cloud base c !> - Calculate the maximum value of the cloud base mass flux using the CFL-criterion-based formula of Han and Pan (2011) \cite han_and_pan_2011, equation 7. - do i = 1, im + if(hwrf_samfshal) then + do i = 1, im if(cnvflg(i)) then -! xmbmax(i) = .1 -! k = kbcon(i) dp = 1000. * del(i,k) - if (hwrf_samfshal) then - xmbmax(i) = dp / (grav * dt2) - else - xmbmax(i) = dp / (2. * grav * dt2) - endif + xmbmax(i) = dp / (grav * dt2) endif - enddo + enddo + else + do i = 1, im + if(cnvflg(i)) then + k = kbcon(i) + dp = 1000. * del(i,k) + xmbmax(i) = dp / (2. * grav * dt2) + endif + enddo + endif c c compute cloud moisture property and precipitation c From 029f4489d4f06d48e31601912f2cbfe92435c47e Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 26 Dec 2019 16:15:13 -0700 Subject: [PATCH 010/404] bug fix --- physics/samfdeepcnv.f | 63 ++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index fcc63c5d1..07b30db51 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -130,8 +130,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & cxlame, cxlamd, & cxlamu, & xlamde, xlamdd, - & crtlamu, crtlamd, - & crtlame, c0l + & crtlamd, + & crtlame ! ! real(kind=kind_phys) detad real(kind=kind_phys) adw, aup, aafac, d0, @@ -139,7 +139,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & dh, dhh, dp, & dq, dqsdp, dqsdt, dt, & dt2, dtmax, dtmin, - & dxcrtas, dxcrtuf, dxcrtuf_hwrf, + & dxcrtas, dxcrtuf, & dv1h, dv2h, dv3h, & dv1q, dv2q, dv3q, & dz, dz1, e1, edtmax, @@ -204,7 +204,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! parameter(c0s=.002,c1=.002,d0=.01) ! parameter(d0=.01) parameter(d0=.001) -!mz parameter(c0l=c0s*asolfac) +! parameter(c0l=c0s*asolfac) ! ! asolfac: aerosol-aware parameter based on Lim (2011) ! asolfac= cx / c0s(=.002) @@ -223,7 +223,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! parameter(cinacrmx=-120.,cinacrmn=-120.) parameter(cinacrmx=-120.,cinacrmn=-80.) parameter(bet1=1.875,cd1=.506,f1=2.0,gam1=.5) - parameter(betaw=.03,dxcrtas=8.e3,dxcrtuf=15.e3,dxcrtuf_hwrf=25.e3) + parameter(betaw=.03,dxcrtas=8.e3,dxcrtuf=15.e3) ! ! local variables and arrays real(kind=kind_phys) pfld(im,km), to(im,km), qo(im,km), @@ -234,7 +234,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! for updraft velocity calculation real(kind=kind_phys) wu2(im,km), buo(im,km), drag(im,km) real(kind=kind_phys) wc(im), scaldfunc(im), sigmagfm(im) - real(kind=kind_phys) sigmuout(im) ! c cloud water ! real(kind=kind_phys) tvo(im,km) @@ -370,10 +369,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & vshear(i) = 0. gdx(i) = sqrt(garea(i)) - !mz*HWRF SAS + !HWRF SAS scaldfunc(i)=-1.0 sigmagfm(i)=-1.0 - sigmuout(i)=-1.0 +! sigmuout(i)=-1.0 enddo endif ! @@ -449,7 +448,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & edtmaxs = .3 if (hwrf_samfdeep) then aafac = .1 - crtlamu = 1.0e-4 cxlamu = 1.0e-3 else aafac = .05 @@ -840,7 +838,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c assume that updraft entrainment rate above cloud base is c same as that at cloud base c -!> - Calculate the entrainment rate according to Han and Pan (2011) \cite han_and_pan_2011 , equation 8, after Bechtold et al. (2008) \cite bechtold_et_al_2008, equation 2 given by: +!> - In HWRF samfdeep, calculate the entrainment rate according to Han and Pan (2011) \cite han_and_pan_2011 , equation 8, after Bechtold et al. (2008) \cite bechtold_et_al_2008, equation 2 given by: !! \f[ !! \epsilon = \epsilon_0F_0 + d_1\left(1-RH\right)F_1 !! \f] @@ -866,17 +864,23 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & !! (The updraft detrainment rate is set constant and equal to the entrainment rate at cloud base.) !! !> - The updraft detrainment rate is vertically constant and proportional to clamt - do k = 1, km1 + if (hwrf_samfdeep) then + do k = 1, km1 do i=1,im if(cnvflg(i) .and. k < kmax(i)) then - if (hwrf_samfdeep) then xlamud(i,k) = xlamx(i) - else + endif + enddo + enddo + else + do k = 1, km1 + do i=1,im + if(cnvflg(i) .and. k < kmax(i)) then xlamud(i,k) = 0.001 * clamt(i) - endif endif enddo - enddo + enddo + endif c c entrainment functions decreasing with height (fent), c mimicking a cloud ensemble @@ -2503,6 +2507,18 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & !! !> - For scale-aware parameterization, the updraft fraction (sigmagfm) is first computed as a function of the lateral entrainment rate at cloud base (see Han et al.'s (2017) \cite han_et_al_2017 equation 4 and 5), following the study by Grell and Freitas (2014) \cite grell_and_freitas_2014. + if(hwrf_samfdeep) then + do i = 1, im + if(cnvflg(i)) then + tem = min(max(xlamx(i), 7.e-5), 3.e-4) + tem = 0.2 / tem + tem1 = 3.14 * tem * tem + sigmagfm(i) = tem1 / garea(i) + sigmagfm(i) = max(sigmagfm(i), 0.001) + sigmagfm(i) = min(sigmagfm(i), 0.999) + endif + enddo + else do i = 1, im if(cnvflg(i)) then tem = min(max(xlamue(i,kbcon(i)), 7.e-5), 3.e-4) @@ -2513,24 +2529,10 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & sigmagfm(i) = min(sigmagfm(i), 0.999) endif enddo + endif ! !> - Then, calculate the reduction factor (scaldfunc) of the vertical convective eddy transport of mass flux as a function of updraft fraction from the studies by Arakawa and Wu (2013) \cite arakawa_and_wu_2013 (also see Han et al.'s (2017) \cite han_et_al_2017 equation 1 and 2). The final cloud base mass flux with scale-aware parameterization is obtained from the mass flux when sigmagfm << 1, multiplied by the reduction factor (Han et al.'s (2017) \cite han_et_al_2017 equation 2). - if(hwrf_samfdeep) then - do i = 1, im - if(cnvflg(i)) then - if (gdx(i) < dxcrtuf) then - scaldfunc(i) = (1.-sigmagfm(i)) * (1.-sigmagfm(i)) - scaldfunc(i) = max(min(scaldfunc(i), 1.0), 0.) - sigmuout(i)=sigmagfm(i) - else - scaldfunc(i) = 1.0 - endif - xmb(i) = xmb(i) * scaldfunc(i) - xmb(i) = min(xmb(i),xmbmax(i)) - endif - enddo - else do i = 1, im if(cnvflg(i)) then if (gdx(i) < dxcrtuf) then @@ -2543,7 +2545,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & xmb(i) = min(xmb(i),xmbmax(i)) endif enddo - endif if (.not.hwrf_samfdeep) then !> - If stochastic physics using cellular automata is .true. then perturb the mass-flux here: From a48681459256779bdf2a95b6fb46916afd6df158 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 27 Dec 2019 19:03:29 +0000 Subject: [PATCH 011/404] several missing changes for qdiag3d support --- physics/GFS_PBL_generic.F90 | 19 +++++++++++++++++-- physics/GFS_PBL_generic.meta | 8 ++++++++ physics/GFS_SCNV_generic.F90 | 32 +++++++++++++++++++------------- physics/GFS_SCNV_generic.meta | 16 ++++++++++++++++ physics/rayleigh_damp.f | 25 +++++++++++++++++++------ physics/rayleigh_damp.meta | 35 +++++++++++++++++++++++++++++++++++ 6 files changed, 114 insertions(+), 21 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 4bebae589..d31dbafec 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -281,7 +281,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, trans_aero, ntchs, ntchm, & imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_mg, & imp_physics_fer_hires, & - ltaerosol, cplflx, cplchm, lssav, ldiag3d, lsidea, hybedmf, do_shoc, satmedmf, shinhong, do_ysu, & + ltaerosol, cplflx, cplchm, lssav, ldiag3d, qdiag3d, lsidea, hybedmf, do_shoc, satmedmf, shinhong, do_ysu, & dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, & dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, & dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, & @@ -299,7 +299,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, logical, intent(in) :: trans_aero integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires - logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, lsidea + logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, qdiag3d, lsidea logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu real(kind=kind_phys), intent(in) :: dtf @@ -571,6 +571,21 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dv3dt_OGWD(i,k) = dv3dt_OGWD(i,k) - dvdt(i,k) * dtf enddo enddo + if (qdiag3d) then + do k=1,levs + do i=1,im + tem = dqdt(i,k,ntqv) * dtf + dq3dt(i,k) = dq3dt(i,k) + tem + enddo + enddo + if (ntoz > 0) then + do k=1,levs + do i=1,im + dq3dt_ozone(i,k) = dq3dt_ozone(i,k) + dqdt(i,k,ntoz) * dtf + enddo + enddo + endif + endif endif endif ! end if_lssav diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 51764e04d..ae86b0dce 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -617,6 +617,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F [lsidea] standard_name = flag_idealized_physics long_name = flag for idealized physics diff --git a/physics/GFS_SCNV_generic.F90 b/physics/GFS_SCNV_generic.F90 index 0cb1ac06f..1cbff590e 100644 --- a/physics/GFS_SCNV_generic.F90 +++ b/physics/GFS_SCNV_generic.F90 @@ -14,7 +14,7 @@ end subroutine GFS_SCNV_generic_pre_finalize !> \section arg_table_GFS_SCNV_generic_pre_run Argument Table !! \htmlinclude GFS_SCNV_generic_pre_run.html !! - subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, gt0, gq0_water_vapor, & + subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gt0, gq0_water_vapor, & save_t, save_qv, errmsg, errflg) use machine, only: kind_phys @@ -22,7 +22,7 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, gt0, gq0_water_vapor, & implicit none integer, intent(in) :: im, levs - logical, intent(in) :: ldiag3d + logical, intent(in) :: ldiag3d, qdiag3d real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, gq0_water_vapor real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_t, save_qv @@ -41,14 +41,14 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, gt0, gq0_water_vapor, & save_t(i,k) = gt0(i,k) enddo enddo - endif -! if (ldiag3d) then -! do k=1,levs -! do i=1,im -! save_qv(i,k) = gq0_water_vapor(i,k) -! enddo -! enddo -! endif + if (qdiag3d) then + do k=1,levs + do i=1,im + save_qv(i,k) = gq0_water_vapor(i,k) + enddo + enddo + endif + endif end subroutine GFS_SCNV_generic_pre_run @@ -67,7 +67,7 @@ end subroutine GFS_SCNV_generic_post_finalize !> \section arg_table_GFS_SCNV_generic_post_run Argument Table !! \htmlinclude GFS_SCNV_generic_post_run.html !! - subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, cplchm, & + subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cplchm, & frain, gt0, gq0_water_vapor, save_t, save_qv, dqdti, dt3dt, dq3dt, clw, & shcnvcw, rain1, npdf3d, num_p3d, ncnvcld3d, cnvc, cnvw, & rainc, cnvprcp, cnvprcpb, cnvw_phy_f3d, cnvc_phy_f3d, & @@ -78,7 +78,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, cplchm, & implicit none integer, intent(in) :: im, levs, nn - logical, intent(in) :: lssav, ldiag3d, cplchm + logical, intent(in) :: lssav, ldiag3d, qdiag3d, cplchm real(kind=kind_phys), intent(in) :: frain real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, gq0_water_vapor real(kind=kind_phys), dimension(im,levs), intent(in) :: save_t, save_qv @@ -137,9 +137,15 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, cplchm, & do k=1,levs do i=1,im dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k) - save_t(i,k)) * frain -! dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k) - save_qv(i,k)) * frain enddo enddo + if (qdiag3d) then + do k=1,levs + do i=1,im + dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k) - save_qv(i,k)) * frain + enddo + enddo + endif endif endif ! end if_lssav ! diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index 79f4eab11..24dd7236d 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -25,6 +25,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F [gt0] standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics @@ -115,6 +123,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields diff --git a/physics/rayleigh_damp.f b/physics/rayleigh_damp.f index 3231a16d8..814704385 100644 --- a/physics/rayleigh_damp.f +++ b/physics/rayleigh_damp.f @@ -25,7 +25,9 @@ end subroutine rayleigh_damp_init !> @{ subroutine rayleigh_damp_run ( & & lsidea,IM,IX,KM,A,B,C,U1,V1,DT,CP, & - & LEVR,pgr,PRSL,PRSLRD0,ral_ts,errmsg,errflg) + & LEVR,pgr,PRSL,PRSLRD0,ral_ts, & + & ldiag3d,du3dt,dv3dt,dt3dt, & + & errmsg,errflg) ! ! ******************************************************************** ! -----> I M P L E M E N T A T I O N V E R S I O N <---------- @@ -66,12 +68,15 @@ subroutine rayleigh_damp_run ( & USE MACHINE , ONLY : kind_phys implicit none ! - logical,intent(in) :: lsidea + logical,intent(in) :: lsidea,ldiag3d integer,intent(in) :: im, ix, km,levr real(kind=kind_phys),intent(in) :: DT, CP, PRSLRD0, ral_ts real(kind=kind_phys),intent(in) :: pgr(im), PRSL(IX,KM) real(kind=kind_phys),intent(in) :: U1(IX,KM), V1(IX,KM) real(kind=kind_phys),intent(inout) :: A(IX,KM), B(IX,KM), C(IX,KM) + real(kind=kind_phys),intent(inout) :: du3dt(IX,KM) + real(kind=kind_phys),intent(inout) :: dv3dt(IX,KM) + real(kind=kind_phys),intent(inout) :: dt3dt(IX,KM) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -79,7 +84,7 @@ subroutine rayleigh_damp_run ( & real(kind=kind_phys), parameter :: cons1=1.0, cons2=2.0, half=0.5 real(kind=kind_phys) DTAUX, DTAUY, wrk1, rtrd1, rfactrd, wrk2 &, ENG0, ENG1, tem1, tem2, dti, hfbcpdt, rtrd - real(kind=kind_phys) tx1(im) + real(kind=kind_phys) tx1(im), deltaA, deltaB, deltaC integer i, k ! ! Initialize CCPP error handling variables @@ -112,9 +117,17 @@ subroutine rayleigh_damp_run ( & tem1 = U1(I,K) + DTAUX tem2 = V1(I,K) + DTAUY ENG1 = tem1*tem1 + tem2*tem2 - A(I,K) = A(I,K) + DTAUY * dti - B(I,K) = B(I,K) + DTAUX * dti - C(I,K) = C(I,K) + max((ENG0-ENG1),0.0) * hfbcpdt + deltaA = DTAUY * dti + deltaB = DTAUX * dti + deltaC = max((ENG0-ENG1),0.0) * hfbcpdt + A(I,K) = A(I,K) + deltaA + B(I,K) = B(I,K) + deltaB + C(I,K) = C(I,K) + deltaC + IF(ldiag3d) THEN + dv3dt(I,K) = dv3dt(I,K) + deltaA + du3dt(I,K) = du3dt(I,K) + deltaB + dt3dt(I,K) = dt3dt(I,K) + deltaC + ENDIF ENDDO ENDDO diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index ec08802e8..2f9d81ed5 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -145,6 +145,41 @@ kind = kind_phys intent = in optional = F +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for calculating 3-D diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[du3dt] + standard_name = cumulative_change_in_x_wind_due_to_rayleigh_damping + long_name = cumulative change in zonal wind due to Rayleigh damping + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dv3dt] + standard_name = cumulative_change_in_y_wind_due_to_rayleigh_damping + long_name = cumulative change in meridional wind due to Rayleigh damping + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dt3dt] + standard_name = cumulative_change_in_temperature_due_to_rayleigh_damping + long_name = cumulative change in temperature due to Rayleigh damping + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From a0286b1575f41f7ee54293b6b294a998d7958fef Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Mon, 30 Dec 2019 21:34:58 +0000 Subject: [PATCH 012/404] Updating MYNN surface layer scheme --- physics/module_MYNNSFC_wrapper.F90 | 348 +-- physics/module_MYNNSFC_wrapper.meta | 502 +++-- physics/module_sf_mynn.F90 | 3064 +++++++++++++++------------ 3 files changed, 2304 insertions(+), 1610 deletions(-) diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index 5471c4825..dee855ff7 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -3,9 +3,15 @@ MODULE mynnsfc_wrapper + USE module_sf_mynn + contains subroutine mynnsfc_wrapper_init () + + ! initialize tables for psih and psim (stable and unstable) + CALL PSI_INIT + end subroutine mynnsfc_wrapper_init subroutine mynnsfc_wrapper_finalize () @@ -19,46 +25,55 @@ end subroutine mynnsfc_wrapper_finalize !! #endif !###=================================================================== -SUBROUTINE mynnsfc_wrapper_run( & - & ix,im,levs, & - & iter,flag_init,flag_restart, & - & delt,dx, & - & u, v, t3d, qvsh, qc, prsl, phii,& - & exner, tsq, qsq, cov, sh3d, & - & el_pbl, qc_bl, cldfra_bl, & - & ps, PBLH, slmsk, TSK, & - & QSFC, snowd, & - & zorl,UST,USTM, ZOL,MOL,RMOL, & - & fm, fh, fm10, fh2, WSPD, br, ch,& - & HFLX, QFX, LH, FLHC, FLQC, & - & U10, V10, TH2, T2, Q2, & - & wstar, CHS2, CQS2, & - & cda, cka, stress, & +SUBROUTINE mynnsfc_wrapper_run( & + & ix,im,levs, & + & iter,flag_init,flag_restart, & + & delt,dx, & + & u, v, t3d, qvsh, qc, prsl, phii, & + & exner, ps, PBLH, slmsk, & + & wet, dry, icy, & !intent(in) + & tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) + & tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) + & qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) + & snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) + & znt_ocn, znt_lnd, znt_ice, & !intent(inout) + & ust_ocn, ust_lnd, ust_ice, & !intent(inout) + & cm_ocn, cm_lnd, cm_ice, & !intent(inout) + & ch_ocn, ch_lnd, ch_ice, & !intent(inout) + & rb_ocn, rb_lnd, rb_ice, & !intent(inout) + & stress_ocn,stress_lnd,stress_ice, & !intent(inout) + & fm_ocn, fm_lnd, fm_ice, & !intent(inout) + & fh_ocn, fh_lnd, fh_ice, & !intent(inout) + & fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) + & fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) + & QSFC, USTM, ZOL, MOL, RMOL, & + & WSPD, ch, HFLX, evap, QFX, LH, & + & FLHC, FLQC, & + & U10, V10, TH2, T2, Q2, & + & wstar, CHS2, CQS2, & ! & CP, G, ROVCP, R, XLV, & ! & SVP1, SVP2, SVP3, SVPT0, & ! & EP1,EP2,KARMAN, & - & icloud_bl, bl_mynn_cloudpdf, & & lprnt, errmsg, errflg ) ! should be moved to inside the mynn: use machine , only : kind_phys -! use funcphys, only : fpvs - - use physcons, only : cp => con_cp, & - & g => con_g, & - & r_d => con_rd, & - & r_v => con_rv, & - & cpv => con_cvap, & - & cliq => con_cliq, & - & Cice => con_csol, & - & rcp => con_rocp, & - & XLV => con_hvap, & - & XLF => con_hfus, & - & EP_1 => con_fvirt, & - & EP_2 => con_eps - - USE module_sf_mynn, only : SFCLAY_mynn + +! use physcons, only : cp => con_cp, & +! & g => con_g, & +! & r_d => con_rd, & +! & r_v => con_rv, & +! & cpv => con_cvap, & +! & cliq => con_cliq, & +! & Cice => con_csol, & +! & rcp => con_rocp, & +! & XLV => con_hvap, & +! & XLF => con_hfus, & +! & EP_1 => con_fvirt, & +! & EP_2 => con_eps + +! USE module_sf_mynn, only : SFCLAY_mynn !------------------------------------------------------------------- implicit none @@ -73,50 +88,13 @@ SUBROUTINE mynnsfc_wrapper_run( & real(kind=kind_phys), parameter :: SVP3 = 29.65 real(kind=kind_phys), parameter :: SVPT0 = 273.15 -!------------------------------------------------------------------- -!For WRF: -!------------------------------------------------------------------- -! USE module_model_constants, only: & -! &karman, g, p1000mb, & -! &cp, r_d, r_v, rcp, xlv, xlf, xls, & -! &svp1, svp2, svp3, svpt0, ep_1, ep_2, rvovrd, & -! &cpv, cliq, cice - -!------------------------------------------------------------------- -!For reference -! REAL , PARAMETER :: karman = 0.4 -! REAL , PARAMETER :: g = 9.81 -! REAL , PARAMETER :: r_d = 287. -! REAL , PARAMETER :: cp = 7.*r_d/2. -! REAL , PARAMETER :: r_v = 461.6 -! REAL , PARAMETER :: cpv = 4.*r_v -! REAL , PARAMETER :: cliq = 4190. -! REAL , PARAMETER :: Cice = 2106. -! REAL , PARAMETER :: rcp = r_d/cp -! REAL , PARAMETER :: XLS = 2.85E6 -! REAL , PARAMETER :: XLV = 2.5E6 -! REAL , PARAMETER :: XLF = 3.50E5 -! REAL , PARAMETER :: p1000mb = 100000. -! REAL , PARAMETER :: rvovrd = r_v/r_d -! REAL , PARAMETER :: SVP1 = 0.6112 -! REAL , PARAMETER :: SVP2 = 17.67 -! REAL , PARAMETER :: SVP3 = 29.65 -! REAL , PARAMETER :: SVPT0 = 273.15 -! REAL , PARAMETER :: EP_1 = R_v/R_d-1. -! REAL , PARAMETER :: EP_2 = R_d/R_v - REAL, PARAMETER :: xlvcp=xlv/cp, xlscp=(xlv+xlf)/cp, ev=xlv, rd=r_d, & - &rk=cp/rd, svp11=svp1*1.e3, p608=ep_1, ep_3=1.-ep_2, g_inv=1/g + &rk=cp/rd, svp11=svp1*1.e3, p608=ep_1, ep_3=1.-ep_2, g_inv=1./g character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg -! NAMELIST OPTIONS (INPUT): - INTEGER, INTENT(IN) :: & - & bl_mynn_cloudpdf, & - & icloud_bl - !MISC CONFIGURATION OPTIONS INTEGER, PARAMETER :: & & spp_pbl = 0, & @@ -133,43 +111,59 @@ SUBROUTINE mynnsfc_wrapper_run( & & IMS,IME,JMS,JME,KMS,KME, & & ITS,ITE,JTS,JTE,KTS,KTE -!MYNN-3D real(kind=kind_phys), dimension(im,levs+1) :: phii real(kind=kind_phys), dimension(im,levs) :: & & exner, PRSL, & - & u, v, t3d, qvsh, qc, & - & Sh3D, EL_PBL, EXCH_H, & - & qc_bl, cldfra_bl, & - & Tsq, Qsq, Cov - !LOCAL + & u, v, t3d, qvsh, qc + real(kind=kind_phys), dimension(im,levs) :: & - & dz, rho, th, qv, & + & dz, th, qv, & & pattern_spp_pbl + logical, dimension(im), intent(in) :: wet, dry, icy + + real(kind=kind_phys), dimension(im), intent(in) :: & + & tskin_ocn, tskin_lnd, tskin_ice, & + & tsurf_ocn, tsurf_lnd, tsurf_ice, & + & snowh_ocn, snowh_lnd, snowh_ice + + real(kind=kind_phys), dimension(im), intent(inout) :: & + & znt_ocn, znt_lnd, znt_ice, & + & ust_ocn, ust_lnd, ust_ice, & + & cm_ocn, cm_lnd, cm_ice, & + & ch_ocn, ch_lnd, ch_ice, & + & rb_ocn, rb_lnd, rb_ice, & + & stress_ocn,stress_lnd,stress_ice, & + & fm_ocn, fm_lnd, fm_ice, & + & fh_ocn, fh_lnd, fh_ice, & + & fm10_ocn, fm10_lnd, fm10_ice, & + & fh2_ocn, fh2_lnd, fh2_ice, & + & qsfc_ocn, qsfc_lnd, qsfc_ice + !MYNN-2D real(kind=kind_phys), dimension(im) :: & - & dx, pblh, slmsk, tsk, qsfc, ps, & - & zorl, ust, ustm, hflx, qfx, br, wspd, snowd, & + & dx, pblh, slmsk, evap, qsfc, ps, & + & ustm, hflx, qfx, wspd, & & FLHC, FLQC, U10, V10, TH2, T2, Q2, & & CHS2, CQS2, rmol, zol, mol, ch, & - & fm, fh, fm10, fh2, & - & lh, cda, cka, stress, wstar + & lh, wstar !LOCAL real, dimension(im) :: & - & qcg, hfx, znt, ts, snowh, psim, psih, & - & chs, ck, cd, mavail, regime, xland, GZ1OZ0 + & hfx, znt, ts, psim, psih, & + & chs, ck, cd, mavail, xland, GZ1OZ0, & + & cpm, qgh ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (lprnt) then - write(0,*)"==============================================" - write(0,*)"in mynn surface layer wrapper..." - write(0,*)"flag_init=",flag_init - write(0,*)"flag_restart=",flag_restart - write(0,*)"iter=",iter - endif +! if (lprnt) then +! write(0,*)"==============================================" +! write(0,*)"in mynn surface layer wrapper..." +! write(0,*)"flag_init=",flag_init +! write(0,*)"flag_restart=",flag_restart +! write(0,*)"iter=",iter +! endif ! If initialization is needed and mynnsfc_wrapper is called ! in a subcycling loop, then test for (flag_init==.T. .and. iter==1); @@ -189,7 +183,6 @@ SUBROUTINE mynnsfc_wrapper_run( & th(i,k)=t3d(i,k)/exner(i,k) !qc(i,k)=MAX(qgrs(i,k,ntcw),0.0) qv(i,k)=qvsh(i,k)/(1.0 - qvsh(i,k)) - rho(i,k)=prsl(i,k)/(r_d*t3d(i,k)) !gt0(i,k)) pattern_spp_pbl(i,k)=0.0 enddo enddo @@ -199,95 +192,122 @@ SUBROUTINE mynnsfc_wrapper_run( & else xland(i)=2.0 endif -! ust(i) = sqrt(stress(i)) - !ch(i)=0.0 - HFX(i)=hflx(i)*rho(i,1)*cp - !QFX(i)=evap(i) - !wstar(i)=0.0 - qcg(i)=0.0 - snowh(i)=snowd(i)*800. !mm -> m - znt(i)=zorl(i)*0.01 !cm -> m? - ts(i)=tsk(i)/exner(i,1) !theta -! qsfc(i)=qss(i) -! ps(i)=pgr(i) -! wspd(i)=wind(i) + qgh(i)=0.0 + !snowh(i)=snowd(i)*800. !mm -> m + znt_lnd(i)=znt_lnd(i)*0.01 !cm -> m + znt_ocn(i)=znt_ocn(i)*0.01 !cm -> m + znt_ice(i)=znt_ice(i)*0.01 !cm -> m + ts(i)=tskin_ocn(i)/exner(i,1) !theta mavail(i)=1.0 !???? + cpm(i)=cp enddo if (lprnt) then write(0,*)"CALLING SFCLAY_mynn; input:" - print*,"T:",t3d(1,1),t3d(1,2),t3d(1,3) - print*,"TH:",th(1,1),th(1,2),th(1,3) - print*,"rho:",rho(1,1),rho(1,2),rho(1,3) - print*,"u:",u(1,1:3) - !print*,"qv:",qv(1,1:3,1) - print*,"p:",prsl(1,1)," snowh=",snowh(1) - print*,"dz:",dz(1,1)," qsfc=",qsfc(1) - print*,"rmol:",rmol(1)," ust:",ust(1) - print*,"Tsk:",tsk(1)," Thetasurf:",ts(1) - print*,"HFX:",hfx(1)," qfx",qfx(1) - print*,"qsfc:",qsfc(1)," ps:",ps(1) - print*,"wspd:",wspd(1),"br=",br(1) - print*,"znt:",znt(1)," delt=",delt - print*,"im=",im," levs=",levs - print*,"flag_init=",flag_init !," ntcw=",ntcw!," ntk=",ntk - print*,"flag_restart=",flag_restart !," ntcw=",ntcw!," ntk=",ntk - print*,"iter=",iter - !print*,"ncld=",ncld," ntrac(gq0)=",ntrac - print*,"zlvl(1)=",dz(1,1)*0.5 - print*,"PBLH=",pblh(1)," xland=",xland(1) + write(0,*)"T:",t3d(1,1),t3d(1,2),t3d(1,3) + write(0,*)"TH:",th(1,1),th(1,2),th(1,3) + write(0,*)"u:",u(1,1:3) + write(0,*)"v:",v(1,1:3) + !write(0,*)"qv:",qv(1,1:3,1) + write(0,*)"p:",prsl(1,1) + write(0,*)"dz:",dz(1,1)," qsfc=",qsfc(1)," rmol:",rmol(1) + write(0,*)" land water ice" + write(0,*)dry(1),wet(1),icy(1) + write(0,*)"ust:",ust_lnd(1),ust_ocn(1),ust_ice(1) + write(0,*)"Tsk:",tskin_lnd(1),tskin_ocn(1),tskin_ice(1) + write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_ocn(1),tsurf_ice(1) + write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_ocn(1),qsfc_ice(1) + write(0,*)"sno:",snowh_lnd(1),snowh_ocn(1),snowh_ice(1) + write(0,*)"znt:",znt_lnd(1),znt_ocn(1),znt_ice(1) + !write(0,*)"HFX:",hfx(1)," qfx",qfx(1) + write(0,*)"qsfc:",qsfc(1)," ps:",ps(1) + write(0,*)"wspd:",wspd(1),"rb=",rb_ocn(1) + write(0,*)"delt=",delt," im=",im," levs=",levs + write(0,*)"flag_init=",flag_init + write(0,*)"flag_restart=",flag_restart + write(0,*)"iter=",iter + write(0,*)"zlvl(1)=",dz(1,1)*0.5 + write(0,*)"PBLH=",pblh(1)," xland=",xland(1) endif - CALL SFCLAY_mynn( & - u3d=u,v3d=v,t3d=t3d,qv3d=qv,p3d=prsl,dz8w=dz, & - CP=cp,G=g,ROVCP=rcp,R=r_d,XLV=xlv, & - PSFCPA=ps,CHS=chs,CHS2=chs2,CQS2=cqs2, & - ZNT=znt,UST=ust,PBLH=pblh,MAVAIL=mavail, & - ZOL=zol,MOL=mol,REGIME=regime,psim=psim,psih=psih, & - psix=fm,psit=fh,psix10=fm10,psit2=fh2, & -! fm=psix,fh=psit,fm10=psix10,fh2=psit2, & - XLAND=xland,HFX=hfx,QFX=qfx,LH=lh,TSK=tsk, & - FLHC=flhc,FLQC=flqc,QSFC=qsfc,RMOL=rmol, & - U10=u10,V10=v10,TH2=th2,T2=t2,Q2=q2,SNOWH=snowh, & - GZ1OZ0=GZ1OZ0,WSPD=wspd,BR=br,ISFFLX=isfflx,DX=dx, & - SVP1=svp1,SVP2=svp2,SVP3=svp3,SVPT0=svpt0, & - EP1=ep_1,EP2=ep_2,KARMAN=karman, & - itimestep=itimestep,ch=ch, & - th3d=th,pi3d=exner,qc3d=qc,rho3d=rho, & - tsq=tsq,qsq=qsq,cov=cov,sh3d=sh3d,el_pbl=el_pbl, & - qcg=qcg,wstar=wstar, & - icloud_bl=icloud_bl,qc_bl=qc_bl,cldfra_bl=cldfra_bl, & - spp_pbl=spp_pbl,pattern_spp_pbl=pattern_spp_pbl, & - ids=1,ide=im, jds=1,jde=1, kds=1,kde=levs, & - ims=1,ime=im, jms=1,jme=1, kms=1,kme=levs, & - its=1,ite=im, jts=1,jte=1, kts=1,kte=levs, & - ustm=ustm, ck=ck, cka=cka, cd=cd, cda=cda, & - isftcflx=isftcflx, iz0tlnd=iz0tlnd, & - bl_mynn_cloudpdf=bl_mynn_cloudpdf ) + CALL SFCLAY_mynn( & + u3d=u,v3d=v,t3d=t3d,qv3d=qv,p3d=prsl,dz8w=dz, & + th3d=th,pi3d=exner,qc3d=qc, & + PSFCPA=ps,PBLH=pblh,MAVAIL=mavail,XLAND=xland,DX=dx, & + CP=cp,G=g,ROVCP=rcp,R=r_d,XLV=xlv, & + SVP1=svp1,SVP2=svp2,SVP3=svp3,SVPT0=svpt0, & + EP1=ep_1,EP2=ep_2,KARMAN=karman, & + ISFFLX=isfflx,isftcflx=isftcflx, & + iz0tlnd=iz0tlnd,itimestep=itimestep, & + wet=wet, dry=dry, icy=icy, & !intent(in) + tskin_ocn=tskin_ocn, tskin_lnd=tskin_lnd, tskin_ice=tskin_ice, & !intent(in) + tsurf_ocn=tsurf_ocn, tsurf_lnd=tsurf_lnd, tsurf_ice=tsurf_ice, & !intent(in) + qsfc_ocn=qsfc_ocn, qsfc_lnd=qsfc_lnd, qsfc_ice=qsfc_ice, & !intent(in) + snowh_ocn=snowh_ocn, snowh_lnd=snowh_lnd, snowh_ice=snowh_ice, & !intent(in) + znt_ocn=znt_ocn, znt_lnd=znt_lnd, znt_ice=znt_ice, & !intent(inout) + ust_ocn=ust_ocn, ust_lnd=ust_lnd, ust_ice=ust_ice, & !intent(inout) + cm_ocn=cm_ocn, cm_lnd=cm_lnd, cm_ice=cm_ice, & !intent(inout) + ch_ocn=ch_ocn, ch_lnd=ch_lnd, ch_ice=ch_ice, & !intent(inout) + rb_ocn=rb_ocn, rb_lnd=rb_lnd, rb_ice=rb_ice, & !intent(inout) + stress_ocn=stress_ocn,stress_lnd=stress_lnd,stress_ice=stress_ice, & !intent(inout) + fm_ocn=fm_ocn, fm_lnd=fm_lnd, fm_ice=fm_ice, & !intent(inout) + fh_ocn=fh_ocn, fh_lnd=fh_lnd, fh_ice=fh_ice, & !intent(inout) + fm10_ocn=fm10_ocn, fm10_lnd=fm10_lnd, fm10_ice=fm10_ice, & !intent(inout) + fh2_ocn=fh2_ocn, fh2_lnd=fh2_lnd, fh2_ice=fh2_ice, & !intent(inout) + ch=ch,CHS=chs,CHS2=chs2,CQS2=cqs2,CPM=cpm, & + ZNT=znt,USTM=ustm,ZOL=zol,MOL=mol,RMOL=rmol, & + psim=psim,psih=psih, & + HFLX=hflx,HFX=hfx,QFX=qfx,LH=lh,FLHC=flhc,FLQC=flqc, & + QGH=qgh,QSFC=qsfc, & + U10=u10,V10=v10,TH2=th2,T2=t2,Q2=q2, & + GZ1OZ0=GZ1OZ0,WSPD=wspd,wstar=wstar, & + spp_pbl=spp_pbl,pattern_spp_pbl=pattern_spp_pbl, & + ids=1,ide=im, jds=1,jde=1, kds=1,kde=levs, & + ims=1,ime=im, jms=1,jme=1, kms=1,kme=levs, & + its=1,ite=im, jts=1,jte=1, kts=1,kte=levs ) ! POST MYNN SURFACE LAYER (INTERSTITIAL) WORK: do i = 1, im - hflx(i)=hfx(i)/(rho(i,1)*cp) - !QFX(i)=evap(i) - zorl(i)=znt(i)*100. !m -> cm - stress(i) = ust(i)**2 + !* Taken from sfc_nst.f + !* ch = surface exchange coeff heat & moisture(m/s) im + !* rch(i) = rho_a(i) * cp * ch(i) * wind(i) + !* hflx(i) = rch(i) * (tsurf(i) - theta1(i)) !K m s-1 + !* hflx(i)=hfx(i)/(rho(i,1)*cp) - now calculated inside module_sf_mynn.F90 + !* Taken from sfc_nst.f + !* evap(i) = elocp * rch(i) * (qss(i) - q0(i)) !kg kg-1 m s-1 + evap(i)=QFX(i) + znt_lnd(i)=znt_lnd(i)*100. !m -> cm + znt_ocn(i)=znt_ocn(i)*100. + znt_ice(i)=znt_ice(i)*100. enddo if (lprnt) then - print* - print*,"finished with mynn_surface layer; output:" - print*,"xland=",xland(1)," cda=",cda(1) - print*,"rmol:",rmol(1)," ust:",ust(1) - print*,"Tsk:",tsk(1)," Thetasurf:",ts(1) - print*,"HFX:",hfx(1)," qfx",qfx(1) - print*,"qsfc:",qsfc(1)," ps:",ps(1) - print*,"wspd:",wspd(1)," br=",br(1) - print*,"znt:",znt(1),"pblh:",pblh(1) - print*,"FLHC=",FLHC(1)," CHS=",CHS(1) - print* + write(0,*) + write(0,*)"finished with mynn_surface layer; output:" + write(0,*)" land water ice" + write(0,*)dry(1),wet(1),icy(1) + write(0,*)"ust:",ust_lnd(1),ust_ocn(1),ust_ice(1) + write(0,*)"Tsk:",tskin_lnd(1),tskin_ocn(1),tskin_ice(1) + write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_ocn(1),tsurf_ice(1) + write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_ocn(1),qsfc_ice(1) + write(0,*)"sno:",snowh_lnd(1),snowh_ocn(1),snowh_ice(1) + write(0,*)"znt (cm):",znt_lnd(1),znt_ocn(1),znt_ice(1) + write(0,*)"cm:",cm_lnd(1),cm_ocn(1),cm_ice(1) + write(0,*)"ch:",ch_lnd(1),ch_ocn(1),ch_ice(1) + write(0,*)"fm:",fm_lnd(1),fm_ocn(1),fm_ice(1) + write(0,*)"fh:",fh_lnd(1),fh_ocn(1),fh_ice(1) + write(0,*)"rb:",rb_lnd(1),rb_ocn(1),rb_ice(1) + write(0,*)"xland=",xland(1)," wstar:",wstar(1) + write(0,*)"HFX:",hfx(1)," qfx:",qfx(1) + write(0,*)"HFLX:",hflx(1)," evap:",evap(1) + write(0,*)"qsfc:",qsfc(1)," ps:",ps(1)," wspd:",wspd(1) + write(0,*)"ZOL:",ZOL(1)," rmol=",rmol(1) + write(0,*)"psim:",psim(1)," psih=",psih(1)," pblh:",pblh(1) + write(0,*)"FLHC=",FLHC(1)," CHS=",CHS(1) + write(0,*) endif diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 2f877075c..cf481ddbf 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -139,116 +139,149 @@ kind = kind_phys intent = in optional = F -[tsq] - standard_name = t_prime_squared - long_name = temperature fluctuation squared - units = K2 - dimensions = (horizontal_dimension,vertical_dimension) +[ps] + standard_name = surface_air_pressure + long_name = surface pressure + units = Pa + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[qsq] - standard_name = q_prime_squared - long_name = water vapor fluctuation squared - units = kg2 kg-2 - dimensions = (horizontal_dimension,vertical_dimension) +[PBLH] + standard_name = atmosphere_boundary_layer_thickness + long_name = PBL thickness + units = m + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[cov] - standard_name = t_prime_q_prime - long_name = covariance of temperature and moisture - units = K kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[el_pbl] - standard_name = mixing_length - long_name = mixing length in meters - units = m - dimensions = (horizontal_dimension,vertical_dimension) +[wet] + standard_name = flag_nonzero_wet_surface_fraction + long_name = flag indicating presence of some ocean or lake surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[dry] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[tskin_ocn] + standard_name = surface_skin_temperature_over_ocean_interstitial + long_name = surface skin temperature over ocean (temporary use as interstitial) + units = K + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[Sh3D] - standard_name = stability_function_for_heat - long_name = stability function for heat - units = none - dimensions = (horizontal_dimension,vertical_dimension) +[tskin_lnd] + standard_name = surface_skin_temperature_over_land_interstitial + long_name = surface skin temperature over land (temporary use as interstitial) + units = K + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[QC_BL] - standard_name = subgrid_cloud_mixing_ratio_pbl - long_name = subgrid cloud cloud mixing ratio from PBL scheme - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) +[tskin_ice] + standard_name = surface_skin_temperature_over_ice_interstitial + long_name = surface skin temperature over ice (temporary use as interstitial) + units = K + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[CLDFRA_BL] - standard_name = subgrid_cloud_fraction_pbl - long_name = subgrid cloud fraction from PBL scheme - units = frac - dimensions = (horizontal_dimension,vertical_dimension) +[tsurf_ocn] + standard_name = surface_skin_temperature_after_iteration_over_ocean + long_name = surface skin temperature after iteration over ocean + units = K + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[ps] - standard_name = surface_air_pressure - long_name = surface pressure - units = Pa +[tsurf_lnd] + standard_name = surface_skin_temperature_after_iteration_over_land + long_name = surface skin temperature after iteration over land + units = K dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[PBLH] - standard_name = atmosphere_boundary_layer_thickness - long_name = PBL thickness - units = m +[tsurf_ice] + standard_name = surface_skin_temperature_after_iteration_over_ice + long_name = surface skin temperature after iteration over ice + units = K dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag +[qsfc_ocn] + standard_name = surface_specific_humidity_over_ocean + long_name = surface air saturation specific humidity over ocean + units = kg kg-1 dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[tsk] - standard_name = surface_skin_temperature - long_name = surface temperature - units = K +[qsfc_lnd] + standard_name = surface_specific_humidity_over_land + long_name = surface air saturation specific humidity over land + units = kg kg-1 dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[qsfc] - standard_name = surface_specific_humidity - long_name = surface air saturation specific humidity +[qsfc_ice] + standard_name = surface_specific_humidity_over_ice + long_name = surface air saturation specific humidity over ice units = kg kg-1 dimensions = (horizontal_dimension) type = real kind = kind_phys + intent = inout + optional = F +[snowh_ocn] + standard_name = surface_snow_thickness_water_equivalent_over_ocean + long_name = water equivalent snow depth over ocean + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys intent = in optional = F -[snowd] - standard_name = surface_snow_thickness_water_equivalent +[snowh_lnd] + standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm dimensions = (horizontal_dimension) @@ -256,114 +289,339 @@ kind = kind_phys intent = in optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length in cm +[snowh_ice] + standard_name = surface_snow_thickness_water_equivalent_over_ice + long_name = water equivalent snow depth over ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[znt_ocn] + standard_name = surface_roughness_length_over_ocean_interstitial + long_name = surface roughness length over ocean (temporary use as interstitial) + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[znt_lnd] + standard_name = surface_roughness_length_over_land_interstitial + long_name = surface roughness length over land (temporary use as interstitial) + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[znt_ice] + standard_name = surface_roughness_length_over_ice_interstitial + long_name = surface roughness length over ice (temporary use as interstitial) units = cm dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[ust] - standard_name = surface_friction_velocity - long_name = boundary layer parameter +[ust_ocn] + standard_name = surface_friction_velocity_over_ocean + long_name = surface friction velocity over ocean units = m s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[ustm] - standard_name = surface_friction_velocity_drag - long_name = friction velocity isolated for momentum only +[ust_lnd] + standard_name = surface_friction_velocity_over_land + long_name = surface friction velocity over land units = m s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[zol] - standard_name = surface_stability_parameter - long_name = monin obukhov surface stability parameter +[ust_ice] + standard_name = surface_friction_velocity_over_ice + long_name = surface friction velocity over ice + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[cm_ocn] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean + long_name = surface exchange coeff for momentum over ocean units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[mol] - standard_name = theta_star - long_name = temperature flux divided by ustar (temperature scale) - units = K +[cm_lnd] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_land + long_name = surface exchange coeff for momentum over land + units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[rmol] - standard_name = reciprocal_of_obukhov_length - long_name = one over obukhov length - units = m-1 +[cm_ice] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice + long_name = surface exchange coeff for momentum over ice + units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[fm] - standard_name = Monin_Obukhov_similarity_function_for_momentum - long_name = Monin-Obukhov similarity parameter for momentum +[ch_ocn] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean + long_name = surface exchange coeff heat & moisture over ocean units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[fh] - standard_name = Monin_Obukhov_similarity_function_for_heat - long_name = Monin-Obukhov similarity parameter for heat +[ch_lnd] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land + long_name = surface exchange coeff heat & moisture over land units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[fm10] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m - long_name = Monin-Obukhov similarity parameter for momentum +[ch_ice] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice + long_name = surface exchange coeff heat & moisture over ice units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[fh2] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m - long_name = Monin-Obukhov similarity parameter for heat +[rb_ocn] + standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean + long_name = bulk Richardson number at the surface over ocean units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[wspd] - standard_name = wind_speed_at_lowest_model_layer - long_name = wind speed at lowest model level +[rb_lnd] + standard_name = bulk_richardson_number_at_lowest_model_level_over_land + long_name = bulk Richardson number at the surface over land + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rb_ice] + standard_name = bulk_richardson_number_at_lowest_model_level_over_ice + long_name = bulk Richardson number at the surface over ice + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stress_ocn] + standard_name = surface_wind_stress_over_ocean + long_name = surface wind stress over ocean + units = m2 s-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stress_lnd] + standard_name = surface_wind_stress_over_land + long_name = surface wind stress over land + units = m2 s-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stress_ice] + standard_name = surface_wind_stress_over_ice + long_name = surface wind stress over ice + units = m2 s-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fm_ocn] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean + long_name = Monin-Obukhov similarity function for momentum over ocean + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fm_lnd] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_land + long_name = Monin-Obukhov similarity function for momentum over land + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fm_ice] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ice + long_name = Monin-Obukhov similarity function for momentum over ice + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fh_ocn] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean + long_name = Monin-Obukhov similarity function for heat over ocean + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fh_lnd] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_land + long_name = Monin-Obukhov similarity function for heat over land + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fh_ice] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_ice + long_name = Monin-Obukhov similarity function for heat over ice + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fm10_ocn] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean + long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fm10_lnd] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_land + long_name = Monin-Obukhov similarity parameter for momentum at 10m over land + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fm10_ice] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ice + long_name = Monin-Obukhov similarity parameter for momentum at 10m over ice + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fh2_ocn] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean + long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fh2_lnd] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_land + long_name = Monin-Obukhov similarity parameter for heat at 2m over land + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[fh2_ice] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ice + long_name = Monin-Obukhov similarity parameter for heat at 2m over ice + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qsfc] + standard_name = surface_specific_humidity + long_name = surface air saturation specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ustm] + standard_name = surface_friction_velocity_drag + long_name = friction velocity isolated for momentum only units = m s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[br] - standard_name = bulk_richardson_number_at_lowest_model_level - long_name = bulk Richardson number at the surface +[zol] + standard_name = surface_stability_parameter + long_name = monin obukhov surface stability parameter units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F +[mol] + standard_name = theta_star + long_name = temperature flux divided by ustar (temperature scale) + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rmol] + standard_name = reciprocal_of_obukhov_length + long_name = one over obukhov length + units = m-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[wspd] + standard_name = wind_speed_at_lowest_model_layer + long_name = wind speed at lowest model level + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [ch] standard_name = surface_drag_wind_speed_for_momentum_in_air long_name = momentum exchange coefficient @@ -382,6 +640,15 @@ kind = kind_phys intent = inout optional = F +[evap] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean + long_name = kinematic surface upward latent heat flux over ocean + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [QFX] standard_name = kinematic_surface_upward_latent_heat_flux long_name = kinematic surface upward latent heat flux @@ -490,49 +757,6 @@ kind = kind_phys intent = inout optional = F -[cda] - standard_name = surface_drag_coefficient_for_momentum_in_air - long_name = surface exchange coeff for momentum - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[cka] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air - long_name = surface exchange coeff heat & moisture - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[stress] - standard_name = surface_wind_stress - long_name = surface wind stress - units = m2 s-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[bl_mynn_cloudpdf] - standard_name = cloudpdf - long_name = flag to determine which cloud PDF to use - units = flag - dimensions = () - type = integer - intent = in - optional = F -[icloud_bl] - standard_name = couple_sgs_clouds_to_radiation_flag - long_name = flag for coupling sgs clouds to radiation - units = flag - dimensions = () - type = integer - intent = in - optional = F [lprnt] standard_name = flag_print long_name = control flag for diagnostic print out diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index 70b98363d..e2cd7f70c 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -8,59 +8,63 @@ MODULE module_sf_mynn !------------------------------------------------------------------- !Modifications implemented by Joseph Olson NOAA/GSD/AMB - CU/CIRES -!for WRFv3.4, v3.4.1, v3.5.1, v3.6, v3.7.1, and v3.9: +!The following overviews the current state of this scheme:: ! ! BOTH LAND AND WATER: !1) Calculation of stability parameter (z/L) taken from Li et al. (2010 BLM) -! for first iteration of first time step; afterwards, exact calculation. -!2) Fixed isfflx=0 option to turn off scalar fluxes, but keep momentum +! for first iteration of first time step; afterwards, exact calculation +! using basically the same iterative technique in the module_sf_sfclayrev.F, +! which leverages Pedro Jimenez's code, and is adapted for MYNN. +!2) Fixed isflux=0 option to turn off scalar fluxes, but keep momentum ! fluxes for idealized studies (credit: Anna Fitch). -!3) Kinematic viscosity now varies with temperature -!4) Uses Monin-Obukhov flux-profile relationships more consistent with -! those used in the MYNN PBL code. -!5) Allows negative QFX, similar to MYJ scheme +!3) Kinematic viscosity varies with temperature according to Andreas (1989). +!4) Uses the blended Monin-Obukhov flux-profile relationships COARE (Fairall +! et al 2003) for the unstable regime (a blended mix of Dyer-Hicks 1974 and +! Grachev et al (2000). Uses Cheng and Brutsaert (2005) for stable conditions. +!5) The following overviews the namelist variables that control the +! aerodynamic roughness lengths (over water) and the thermal and moisture +! roughness lengths (defaults are recommended): ! ! LAND only: -!1) iz0tlnd option is now available with the following options: -! (default) =0: Zilitinkevich (1995) +! "iz0tlnd" namelist option is used to select the following options: +! (default) =0: Zilitinkevich (1995); Czil now set to 0.085 ! =1: Czil_new (modified according to Chen & Zhang 2008) ! =2: Modified Yang et al (2002, 2008) - generalized for all landuse ! =3: constant zt = z0/7.4 (original form; Garratt 1992) -! =4: Pan et al. (1994) with RUC mods for z_q, zili for z_t -!2) Relaxed u* minimum from 0.1 to 0.01 ! ! WATER only: -!1) isftcflx option is now available with the following options: +! "isftcflx" namelist option is used to select the following options: ! (default) =0: z0, zt, and zq from the COARE algorithm. Set COARE_OPT (below) to ! 3.0 (Fairall et al. 2003, default) ! 3.5 (Edson et al 2013) ! =1: z0 from Davis et al (2008), zt & zq from COARE 3.0/3.5 ! =2: z0 from Davis et al (2008), zt & zq from Garratt (1992) ! =3: z0 from Taylor and Yelland (2004), zt and zq from COARE 3.0/3.5 -! =4: z0 from Zilitinkevich (2001), zt & zq from COARE 3.0/3.5 ! ! SNOW/ICE only: -!1) Added Andreas (2002) snow/ice parameterization for thermal and -! moisture roughness to help reduce the cool/moist bias in the arctic -! region. Also added a z0 mod for snow (Andreas et al. 2005, BLM), which +! Andreas (2002) snow/ice parameterization for thermal and +! moisture roughness is used over all gridpoints with snow deeper than +! 0.1 m. This algorithm calculates a z0 for snow (Andreas et al. 2005, BLM), +! which is only used as part of the thermal and moisture roughness +! length calculation, not to directly impact the surface winds. ! ! Misc: -! 2) added a more elaborate diagnostic for u10 & V10 for high vertical resolution -! model configurations. +!1) Added a more elaborate diagnostic for u10 & V10 for high vertical resolution +! model configurations but for most model configurations with depth of +! the lowest half-model level near 10 m, a neutral-log diagnostic is used. ! -! New for v3.9: -! - option for stochastic parameter perturbations (SPP) +!2) Option to activate stochastic parameter perturbations (SPP), which +! perturb z0, zt, and zq, along with many other parameters in the MYNN- +! EDMF scheme. ! !NOTE: This code was primarily tested in combination with the RUC LSM. ! Performance with the Noah (or other) LSM is relatively unknown. !------------------------------------------------------------------- !For WRF ! USE module_model_constants, only: & -! &g, p1000mb, cp, xlv, ep_2, r_d, r_v, rcp, cpv +! & p1000mb, ep_2 ! - USE module_bl_mynn, only: tv0, b1, b2, p608, ev, rd, & !, mym_condensation - &esat_blend, xl_blend, qsat_blend - +!For non-WRF use physcons, only : cp => con_cp, & & g => con_g, & & r_d => con_rd, & @@ -89,52 +93,77 @@ MODULE module_sf_mynn REAL , PARAMETER :: p1000mb = 100000. ! REAL , PARAMETER :: EP_2 = r_d/r_v - - REAL, PARAMETER :: xlvcp=xlv/cp, ep_3=1.-ep_2 REAL, PARAMETER :: wmin=0.1 ! Minimum wind speed REAL, PARAMETER :: VCONVC=1.25 + REAL, PARAMETER :: onethird = 1./3. + REAL, PARAMETER :: sqrt3 = 1.7320508075688773 + REAL, PARAMETER :: atan1 = 0.785398163397 !in radians REAL, PARAMETER :: SNOWZ0=0.011 REAL, PARAMETER :: COARE_OPT=3.0 ! 3.0 or 3.5 !For debugging purposes: - LOGICAL, PARAMETER :: debug_code = .false. + INTEGER, PARAMETER :: debug_code = 0 !0: no extra ouput + !1: some step-by-step output + !2: everything - heavy I/O + LOGICAL, PARAMETER :: compute_diag = .false. + + REAL, DIMENSION(0:1000 ),SAVE :: psim_stab,psim_unstab, & + psih_stab,psih_unstab CONTAINS !------------------------------------------------------------------- !>\ingroup module_sf_mynn_mod -!> Fill the PSIM and PSIH tables. The subroutine "sfclayinit". -!! can be found in module_sf_sfclay.F. This subroutine returns -!! the forms from Dyer and Hicks (1974). +!> Fill the PSIM and PSIH tables. The subroutine "psi_init" was leveraged from +!! module_sf_sfclayrev.F, leveraging the work from Pedro Jimenez. +!! This subroutine returns a blended form from Dyer and Hicks (1974) +!! and Grachev et al (2000) for unstable conditions and the form +!! from Cheng and Brutsaert (2005) for stable conditions. + SUBROUTINE mynn_sf_init_driver(allowed_to_read) LOGICAL, INTENT(in) :: allowed_to_read -! CALL sfclayinit(allowed_to_read) + CALL psi_init END SUBROUTINE mynn_sf_init_driver !------------------------------------------------------------------- !>\ingroup module_sf_mynn_mod !! This subroutine - SUBROUTINE SFCLAY_mynn( & - U3D,V3D,T3D,QV3D,P3D,dz8w, & - CP,G,ROVCP,R,XLV,PSFCPA,CHS,CHS2,CQS2, & - ZNT,UST,PBLH,MAVAIL,ZOL,MOL,REGIME, & - PSIM,PSIH,PSIX,PSIX10,PSIT,PSIT2, & - XLAND,HFX,QFX,LH,TSK,FLHC,FLQC,QSFC,RMOL, & - U10,V10,TH2,T2,Q2,SNOWH, & - GZ1OZ0,WSPD,BR,ISFFLX,DX, & - SVP1,SVP2,SVP3,SVPT0,EP1,EP2, & - KARMAN,itimestep,ch,th3d,pi3d,qc3d,rho3d, & - tsq,qsq,cov,sh3d,el_pbl,qcg,wstar, & - icloud_bl,qc_bl,cldfra_bl, & - spp_pbl,pattern_spp_pbl, & - ids,ide, jds,jde, kds,kde, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte, & - ustm,ck,cka,cd,cda,isftcflx,iz0tlnd, & - bl_mynn_cloudpdf) + SUBROUTINE SFCLAY_mynn( & + U3D,V3D,T3D,QV3D,P3D,dz8w, & !in + th3d,pi3d,qc3d, & !in + PSFCPA,PBLH,MAVAIL,XLAND,DX, & !in + CP,G,ROVCP,R,XLV, & !in + SVP1,SVP2,SVP3,SVPT0,EP1,EP2,KARMAN, & !in + ISFFLX,isftcflx,iz0tlnd,itimestep, & !in + wet, dry, icy, & !intent(in) + tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) + tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) + qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) + snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) + ZNT_ocn, ZNT_lnd, ZNT_ice, & !intent(inout) + UST_ocn, UST_lnd, UST_ice, & !intent(inout) + cm_ocn, cm_lnd, cm_ice, & !intent(inout) + ch_ocn, ch_lnd, ch_ice, & !intent(inout) + rb_ocn, rb_lnd, rb_ice, & !intent(inout) + stress_ocn,stress_lnd,stress_ice, & !intent(inout) + fm_ocn, fm_lnd, fm_ice, & !intent(inout) + fh_ocn, fh_lnd, fh_ice, & !intent(inout) + fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) + fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) + CH,CHS,CHS2,CQS2,CPM, & + ZNT,USTM,ZOL,MOL,RMOL, & + PSIM,PSIH, & + HFLX,HFX,QFX,LH,FLHC,FLQC, & + QGH,QSFC, & + U10,V10,TH2,T2,Q2, & + GZ1OZ0,WSPD,WSTAR, & + spp_pbl,pattern_spp_pbl, & + ids,ide, jds,jde, kds,kde, & + ims,ime, jms,jme, kms,kme, & + its,ite, jts,jte, kts,kte ) !------------------------------------------------------------------- IMPLICIT NONE !------------------------------------------------------------------- @@ -143,7 +172,6 @@ SUBROUTINE SFCLAY_mynn( & !-- T3D 3D temperature (K) !-- QV3D 3D water vapor mixing ratio (Kg/Kg) !-- P3D 3D pressure (Pa) -!-- RHO3D 3D density (kg/m3) !-- dz8w 3D dz between full levels (m) !-- CP heat capacity at constant pressure for dry air (J/kg/K) !-- G acceleration due to gravity (m/s^2) @@ -166,6 +194,7 @@ SUBROUTINE SFCLAY_mynn( & !-- PSIH similarity stability function for heat !-- XLAND land mask (1 for land, 2 for water) !-- HFX upward heat flux at the surface (W/m^2) +!-- HFLX upward temperature flux at the surface (K m s^-1) !-- QFX upward moisture flux at the surface (kg/m^2/s) !-- LH net upward latent heat flux at surface (W/m^2) !-- TSK surface temperature (K) @@ -202,22 +231,10 @@ SUBROUTINE SFCLAY_mynn( & ! (water =1: z0 from Davis et al (2008), zt & zq from COARE3.0/3.5 ! only) =2: z0 from Davis et al (2008), zt & zq from Garratt (1992) ! =3: z0 from Taylor and Yelland (2004), zt and zq from COARE 3.0/3.5 -! =4: z0 from Zilitinkevich (2001), zt & zq from COARE 3.0/3.5 -!-- iz0tlnd =0: Zilitinkevich (1995) with Czil=0.10, +!-- iz0tlnd =0: Zilitinkevich (1995) with Czil=0.085, ! (land =1: Czil_new (modified according to Chen & Zhang 2008) ! only) =2: Modified Yang et al (2002, 2008) - generalized for all landuse ! =3: constant zt = z0/7.4 (Garratt 1992) -! =4: Pan et al (1994) for zq; ZIlitintevich for zt -!-- bl_mynn_cloudpdf =0: Mellor & Yamada -! =1: Kuwano et al. -!-- el_pbl = mixing length from PBL scheme (meters) -!-- Sh3d = Stability finction for heat (unitless) -!-- cov = T'q' from PBL scheme -!-- tsq = T'T' from PBL scheme -!-- qsq = q'q' from PBL scheme -!-- icloud_bl = namelist option for subgrid scale cloud/radiation feedback -!-- qc_bl = subgrid scale (bloundary layer) clouds -!-- cldfra_bl = subgridscale cloud fraction ! !-- ids start index for i in domain !-- ide end index for i in domain @@ -249,10 +266,8 @@ SUBROUTINE SFCLAY_mynn( & REAL, INTENT(IN) :: CP,G,ROVCP,R,XLV !,DX !NAMELIST OPTIONS: INTEGER, INTENT(IN) :: ISFFLX - INTEGER, OPTIONAL, INTENT(IN) :: ISFTCFLX, IZ0TLND,& - bl_mynn_cloudpdf,& - icloud_bl - INTEGER, INTENT(IN),OPTIONAL :: spp_pbl + INTEGER, OPTIONAL, INTENT(IN) :: ISFTCFLX, IZ0TLND + INTEGER, OPTIONAL, INTENT(IN) :: spp_pbl !=================================== ! 3D VARIABLES @@ -264,11 +279,10 @@ SUBROUTINE SFCLAY_mynn( & T3D, & QC3D, & U3D,V3D, & - RHO3D,th3d,pi3d,tsq,qsq,cov,sh3d,el_pbl + th3d,pi3d - REAL, DIMENSION( ims:ime, kms:kme, jms:jme ) :: qc_bl, & - cldfra_bl - REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN),OPTIONAL ::pattern_spp_pbl + REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), OPTIONAL, & + INTENT(IN) :: pattern_spp_pbl !=================================== ! 2D VARIABLES !=================================== @@ -276,85 +290,82 @@ SUBROUTINE SFCLAY_mynn( & INTENT(IN ) :: MAVAIL, & PBLH, & XLAND, & - TSK, & - QCG, & PSFCPA, & - SNOWH, & DX REAL, DIMENSION( ims:ime, jms:jme ) , & INTENT(OUT ) :: U10,V10, & TH2,T2,Q2 - REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ) , & - INTENT(OUT) :: ck,cka,cd,cda,ustm -! + REAL, DIMENSION( ims:ime, jms:jme ) , & - INTENT(INOUT) :: REGIME, & - HFX, & + INTENT(INOUT) :: HFLX,HFX, & QFX, & LH, & MOL,RMOL, & - QSFC, & + QSFC, QGH, & ZNT, & ZOL, & - UST, & + USTM, & + CPM, & CHS2, & CQS2, & CHS, & CH, & FLHC,FLQC, & - GZ1OZ0,WSPD,BR, & + GZ1OZ0,WSPD, & PSIM,PSIH, & - WSTAR, & - PSIX,PSIX10,PSIT,PSIT2 + WSTAR + + LOGICAL, DIMENSION( ims:ime ), INTENT(IN) :: & + & wet, dry, icy + + REAL, DIMENSION( ims:ime ), INTENT(IN) :: & + & tskin_ocn, tskin_lnd, tskin_ice, & + & tsurf_ocn, tsurf_lnd, tsurf_ice, & + & snowh_ocn, snowh_lnd, snowh_ice + + REAL, DIMENSION( ims:ime), INTENT(INOUT) :: & + & ZNT_ocn, ZNT_lnd, ZNT_ice, & + & UST_ocn, UST_lnd, UST_ice, & + & cm_ocn, cm_lnd, cm_ice, & + & ch_ocn, ch_lnd, ch_ice, & + & rb_ocn, rb_lnd, rb_ice, & + & stress_ocn,stress_lnd,stress_ice, & + & fm_ocn, fm_lnd, fm_ice, & + & fh_ocn, fh_lnd, fh_ice, & + & fm10_ocn, fm10_lnd, fm10_ice, & + & fh2_ocn, fh2_lnd, fh2_ice, & + & qsfc_ocn, qsfc_lnd, qsfc_ice !ADDITIONAL OUTPUT !JOE-begin - REAL, DIMENSION( ims:ime, jms:jme ) :: z0zt_ratio, & - BulkRi,qstar,resist,logres -!JOE-end + REAL, DIMENSION( ims:ime, jms:jme ) :: qstar +!JOE-end !=================================== ! 1D LOCAL ARRAYS !=================================== - REAL, DIMENSION( its:ite ) :: U1D, & - V1D, & + REAL, DIMENSION( its:ite ) :: U1D,V1D, & !level1 winds U1D2,V1D2, & !level2 winds QV1D, & P1D, & T1D,QC1D, & - RHO1D, & dz8w1d, & !level 1 height dz2w1d !level 2 height REAL, DIMENSION( its:ite ) :: rstoch1D - ! VARIABLE FOR PASSING TO MYM_CONDENSATION - REAL, DIMENSION(kts:kts+1 ) :: dummy1,dummy2,dummy3,dummy4, & - dummy5,dummy6,dummy7,dummy8, & - dummy9,dummy10,dummy11, & - dummy12,dummy13,dummy14 - - REAL, DIMENSION( its:ite ) :: vt1,vq1 - REAL, DIMENSION(kts:kts+1) :: thl, qw, vt, vq - REAL :: ql - INTEGER :: I,J,K,itf,jtf,ktf !----------------------------------------------------------- -!joe -test printing of constants: -! print*,"cp=", cp -! print*,"g=", g -! print*,"Rd=", r_d -! print*,"Rv=", r_v -! print*,"cpc=", cpv -! print*,"cliq=", cliq -! print*,"cice=", Cice -! print*,"rcp=", rcp -! print*,"xlv=", XLV -! print*,"xlf=", XLF -! print*,"ep1=", EP_1 -! print*,"ep2=", EP_2 + IF (debug_code >= 1) THEN + write(*,*)"======= printing of constants:" + write(*,*)"cp=", cp," g=", g + write(*,*)"Rd=", r_d," Rv=", r_v, " cpc=", cpv + write(*,*)"cliq=", cliq," cice=", Cice," rcp=", rcp + write(*,*)"xlv=", XLV," xlf=", XLF + write(*,*)"ep1=", EP_1, " ep2=", EP_2 + ENDIF itf=ite !MIN0(ite,ide-1) jtf=jte !MIN0(jte,jde-1) @@ -373,7 +384,6 @@ SUBROUTINE SFCLAY_mynn( & QC1D(i)=QC3D(i,kts,j) P1D(i) =P3D(i,kts,j) T1D(i) =T3D(i,kts,j) - RHO1D(i)=RHO3D(i,kts,j) if (spp_pbl==1) then rstoch1D(i)=pattern_spp_pbl(i,kts,j) else @@ -383,102 +393,56 @@ SUBROUTINE SFCLAY_mynn( & IF (itimestep==1) THEN DO i=its,ite - vt1(i)=0. - vq1(i)=0. - UST(i,j)=MAX(0.025*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + !Everything here is used before calculated + UST_OCN(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + UST_LND(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + UST_ICE(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) MOL(i,j)=0. ! Tstar QSFC(i,j)=QV3D(i,kts,j)/(1.+QV3D(i,kts,j)) qstar(i,j)=0.0 - ENDDO - ELSE - DO i=its,ite - DO k = kts,kts+1 - ql = qc3d(i,k,j)/(1.+qc3d(i,k,j)) - qw(k) = qv3d(i,k,j)/(1.+qv3d(i,k,j)) + ql - thl(k) = th3d(i,k,j)-xlvcp*ql/pi3d(i,k,j) - dummy1(k)=dz8w(i,k,j) - dummy2(k)=thl(k) - dummy3(k)=qw(k) - dummy4(k)=p3d(i,k,j) - dummy5(k)=pi3d(i,k,j) - dummy6(k)=tsq(i,k,j) - dummy7(k)=qsq(i,k,j) - dummy8(k)=cov(i,k,j) - dummy9(k)=Sh3d(i,k,j) - dummy10(k)=el_pbl(i,k,j) - dummy14(k)=th3d(i,k,j) - if(icloud_bl > 0) then - dummy11(k)=qc_bl(i,k,j) - dummy12(k)=cldfra_bl(i,k,j) - else - dummy11(k)=0.0 - dummy12(k)=0.0 - endif - dummy13(k)=0.0 !sgm - ENDDO - - ! NOTE: The last grid number is kts+1 instead of kte. - CALL mym_condensation (kts,kts+1, dx(i,j),& - & dummy1,dummy2,dummy3, & - & dummy4,dummy5,dummy6, & - & dummy7,dummy8,dummy9, & - & dummy10,bl_mynn_cloudpdf,& - & dummy11,dummy12, & - & PBLH(i,j),HFX(i,j), & - & vt(kts:kts+1), vq(kts:kts+1), & - & dummy14,dummy13) - -! ! NOTE: The last grid number is kts+1 instead of kte. -! CALL mym_condensation (kts,kts+1, dx, & -! & dz8w(i,kts:kts+1,j), & -! & thl(kts:kts+1), & -! & qw(kts:kts+1), & -! & p3d(i,kts:kts+1,j), & -! & pi3d(i,kts:kts+1,j), & -! & tsq(i,kts:kts+1,j), & -! & qsq(i,kts:kts+1,j), & -! & cov(i,kts:kts+1,j), & -! & Sh3d(i,kts:kts+1,j), & !JOE - cloud PDF testing -! & el_pbl(i,kts:kts+1,j), & !JOE - cloud PDF testing -! & bl_mynn_cloudpdf, & !JOE - cloud PDF testing -! & qc_bl2D(i,kts:kts+1), & !JOE-subgrid BL clouds -! & cldfra_bl2D(i,kts:kts+1),& !JOE-subgrid BL clouds -! & PBLH(i,j),HFX(i,j), & !JOE-subgrid BL clouds -! & vt(kts:kts+1), vq(kts:kts+1), & - ! & th,sgm) - vt1(i) = vt(kts) - vq1(i) = vq(kts) + QFX(i,j)=0. + HFX(i,j)=0. ENDDO ENDIF - CALL SFCLAY1D_mynn( & - J,U1D,V1D,T1D,QV1D,P1D,dz8w1d,rho1d, & - U1D2,V1D2,dz2w1d, & - CP,G,ROVCP,R,XLV,PSFCPA(ims,j),CHS(ims,j),CHS2(ims,j),& - CQS2(ims,j), PBLH(ims,j), RMOL(ims,j), & - ZNT(ims,j),UST(ims,j),MAVAIL(ims,j),ZOL(ims,j), & - MOL(ims,j),REGIME(ims,j),PSIM(ims,j),PSIH(ims,j), & - PSIX(ims,j),PSIX10(ims,j),PSIT(ims,j),PSIT2(ims,j),& - XLAND(ims,j),HFX(ims,j),QFX(ims,j),TSK(ims,j), & - U10(ims,j),V10(ims,j),TH2(ims,j),T2(ims,j), & - Q2(ims,j),FLHC(ims,j),FLQC(ims,j),SNOWH(ims,j), & - QSFC(ims,j),LH(ims,j), & - GZ1OZ0(ims,j),WSPD(ims,j),BR(ims,j),ISFFLX,DX(ims,j),& - SVP1,SVP2,SVP3,SVPT0,EP1,EP2,KARMAN, & - ch(ims,j),vt1,vq1,qc1d,qcg(ims,j), & - itimestep, & -!JOE-begin additional output - z0zt_ratio(ims,j),wstar(ims,j), & - qstar(ims,j),resist(ims,j),logres(ims,j), & -!JOE-end - spp_pbl,rstoch1D, & - ids,ide, jds,jde, kds,kde, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte & - ,isftcflx,iz0tlnd, & - USTM(ims,j),CK(ims,j),CKA(ims,j), & - CD(ims,j),CDA(ims,j) & - ) + CALL SFCLAY1D_mynn( & + J,U1D,V1D,T1D,QV1D,P1D,dz8w1d, & + U1D2,V1D2,dz2w1d, & + PSFCPA(ims,j),PBLH(ims,j),MAVAIL(ims,j), & + XLAND(ims,j),DX(ims,j), & + CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & + EP1,EP2,KARMAN, & + ISFFLX,isftcflx,iz0tlnd,itimestep, & + wet, dry, icy, & !intent(in) + tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) + tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) + qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) + snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) + ZNT_ocn, ZNT_lnd, ZNT_ice, & !intent(inout) + UST_ocn, UST_lnd, UST_ice, & !intent(inout) + cm_ocn, cm_lnd, cm_ice, & !intent(inout) + ch_ocn, ch_lnd, ch_ice, & !intent(inout) + rb_ocn, rb_lnd, rb_ice, & !intent(inout) + stress_ocn, stress_lnd, stress_ice, & !intent(inout) + fm_ocn, fm_lnd, fm_ice, & !intent(inout) + fh_ocn, fh_lnd, fh_ice, & !intent(inout) + fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) + fh2_ocn, fh2_lnd, fh2_ice, & + ch(ims,j),CHS(ims,j),CHS2(ims,j),CQS2(ims,j), & + CPM(ims,j), & + ZNT(ims,j),USTM(ims,j),ZOL(ims,j), & + MOL(ims,j),RMOL(ims,j), & + PSIM(ims,j),PSIH(ims,j), & + HFLX(ims,j),HFX(ims,j),QFX(ims,j),LH(ims,j), & + FLHC(ims,j),FLQC(ims,j), & + QGH(ims,j),QSFC(ims,j), & + U10(ims,j),V10(ims,j),TH2(ims,j),T2(ims,j),Q2(ims,j),& + GZ1OZ0(ims,j),WSPD(ims,j),wstar(ims,j), & + spp_pbl,rstoch1D, & + ids,ide, jds,jde, kds,kde, & + ims,ime, jms,jme, kms,kme, & + its,ite, jts,jte, kts,kte & + ) ENDDO @@ -487,28 +451,39 @@ END SUBROUTINE SFCLAY_MYNN !------------------------------------------------------------------- !>\ingroup module_sf_mynn_mod !! This subroutine calculates - SUBROUTINE SFCLAY1D_mynn( & - J,U1D,V1D,T1D,QV1D,P1D,dz8w1d,rho1d, & - U1D2,V1D2,dz2w1d, & - CP,G,ROVCP,R,XLV,PSFCPA,CHS,CHS2,CQS2, & - PBLH,RMOL,ZNT,UST,MAVAIL,ZOL,MOL,REGIME, & - PSIM,PSIH,PSIX,PSIX10,PSIT,PSIT2, & - XLAND,HFX,QFX,TSK, & - U10,V10,TH2,T2,Q2,FLHC,FLQC,SNOWH, & - QSFC,LH,GZ1OZ0,WSPD,BR,ISFFLX,DX, & - SVP1,SVP2,SVP3,SVPT0,EP1,EP2, & - KARMAN,ch,vt1,vq1,qc1d,qcg, & - itimestep, & -!JOE-additional output - zratio,wstar,qstar,resist,logres, & -!JOE-end - spp_pbl,rstoch1D, & - ids,ide, jds,jde, kds,kde, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte & - ,isftcflx, iz0tlnd, & - ustm,ck,cka,cd,cda & - ) + SUBROUTINE SFCLAY1D_mynn( & + J,U1D,V1D,T1D,QV1D,P1D,dz8w1d,U1D2,V1D2,dz2w1d, & + PSFCPA,PBLH,MAVAIL,XLAND,DX, & + CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & + EP1,EP2,KARMAN, & + ISFFLX,isftcflx,iz0tlnd,itimestep, & + wet, dry, icy, & !intent(in) + tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) + tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) + qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) + snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) + ZNT_ocn, ZNT_lnd, ZNT_ice, & !intent(inout) + UST_ocn, UST_lnd, UST_ice, & !intent(inout) + cm_ocn, cm_lnd, cm_ice, & !intent(inout) + ch_ocn, ch_lnd, ch_ice, & !intent(inout) + rb_ocn, rb_lnd, rb_ice, & !intent(inout) + stress_ocn, stress_lnd, stress_ice, & !intent(inout) + psix_ocn, psix_lnd, psix_ice, & !=fm, intent(inout) + psit_ocn, psit_lnd, psit_ice, & !=fh, intent(inout) + psix10_ocn, psix10_lnd, psix10_ice, & !=fm10, intent(inout) + psit2_ocn, psit2_lnd, psit2_ice, & !=fh2, intent(inout) + ch,CHS,CHS2,CQS2,CPM, & + ZNT,USTM,ZOL,MOL,RMOL, & + PSIM,PSIH, & + HFLX,HFX,QFX,LH,FLHC,FLQC, & + QGH,QSFC, & + U10,V10,TH2,T2,Q2, & + GZ1OZ0,WSPD,wstar, & + spp_pbl,rstoch1D, & + ids,ide, jds,jde, kds,kde, & + ims,ime, jms,jme, kms,kme, & + its,ite, jts,jte, kts,kte & + ) !------------------------------------------------------------------- IMPLICIT NONE @@ -538,34 +513,52 @@ SUBROUTINE SFCLAY1D_mynn( & REAL, DIMENSION( ims:ime ), INTENT(IN) :: MAVAIL, & PBLH, & XLAND, & - TSK, & PSFCPA, & - QCG, & - SNOWH, DX + DX REAL, DIMENSION( its:ite ), INTENT(IN) :: U1D,V1D, & U1D2,V1D2, & QV1D,P1D, & - T1D,QC1d, & - dz8w1d,dz2w1d, & - RHO1D, & - vt1,vq1 + T1D, & + dz8w1d, & + dz2w1d - REAL, DIMENSION( ims:ime ), INTENT(INOUT) :: REGIME, & - HFX,QFX,LH, & + REAL, DIMENSION( ims:ime ), INTENT(INOUT) :: HFLX,HFX, & + QFX,LH, & MOL,RMOL, & - QSFC, & + QGH,QSFC, & ZNT, & ZOL, & - UST, & + CPM, & CHS2,CQS2, & CHS,CH, & FLHC,FLQC, & GZ1OZ0, & WSPD, & - BR, & - PSIM,PSIH, & - PSIX,PSIX10,PSIT,PSIT2 + PSIM, & + PSIH, & + USTM + + LOGICAL, DIMENSION( ims:ime ), INTENT(IN) :: & + & wet, dry, icy + + REAL, DIMENSION( ims:ime ), INTENT(in) :: & + & tskin_ocn, tskin_lnd, tskin_ice, & + & tsurf_ocn, tsurf_lnd, tsurf_ice, & + & snowh_ocn, snowh_lnd, snowh_ice + + REAL, DIMENSION( ims:ime ), INTENT(inout) :: & + & ZNT_ocn, ZNT_lnd, ZNT_ice, & + & UST_ocn, UST_lnd, UST_ice, & + & cm_ocn, cm_lnd, cm_ice, & + & ch_ocn, ch_lnd, ch_ice, & + & rb_ocn, rb_lnd, rb_ice, & + & stress_ocn,stress_lnd,stress_ice, & + & psix_ocn, psix_lnd, psix_ice, & + & psit_ocn, psit_lnd, psit_ice, & + & psix10_ocn,psix10_lnd,psix10_ice, & + & psit2_ocn, psit2_lnd, psit2_ice, & + & qsfc_ocn, qsfc_lnd, qsfc_ice REAL, DIMENSION( its:ite ), INTENT(IN) :: rstoch1D @@ -573,18 +566,13 @@ SUBROUTINE SFCLAY1D_mynn( & REAL, DIMENSION( ims:ime ), INTENT(OUT) :: U10,V10, & TH2,T2,Q2 - REAL, OPTIONAL, DIMENSION( ims:ime ) , & - INTENT(OUT) :: ck,cka,cd,cda,ustm !-------------------------------------------- !JOE-additinal output - REAL, DIMENSION( ims:ime ) :: zratio,wstar,qstar, & - resist,logres + REAL, DIMENSION( ims:ime ) :: wstar,qstar !JOE-end !---------------------------------------------------------------- ! LOCAL VARS !---------------------------------------------------------------- - REAL :: thl1,sqv1,sqc1,exner1,sqvg,sqcg,vv,ww - REAL, DIMENSION(its:ite) :: & ZA, & !Height of lowest 1/2 sigma level(m) ZA2, & !Height of 2nd lowest 1/2 sigma level(m) @@ -592,76 +580,170 @@ SUBROUTINE SFCLAY1D_mynn( & TH1D, & !Theta at lowest 1/2 sigma (K) TC1D, & !T at lowest 1/2 sigma (Celsius) TV1D, & !Tv at lowest 1/2 sigma (K) + RHO1D, & !density at lowest 1/2 sigma level QVSH, & !qv at lowest 1/2 sigma (spec humidity) - PSIH2,PSIM2, & !M-O stability functions at z=2 m - PSIH10,PSIM10, & !M-O stability functions at z=10 m - WSPDI, & - CPM, & - z_t,z_q, & !thermal & moisture roughness lengths - ZNTstoch, & + PSIH2, & !M-O stability functions at z=2 m + PSIM10, & !M-O stability functions at z=10 m + PSIH10, & !M-O stability functions at z=10 m + WSPDI, & GOVRTH, & !g/theta - THGB, & !theta at ground - THVGB, & !theta-v at ground PSFC, & !press at surface (Pa/1000) QSFCMR, & !qv at surface (mixing ratio, kg/kg) - GZ2OZ0, & !LOG((2.0+ZNT(I))/ZNT(I)) - GZ10OZ0, & !LOG((10.+ZNT(I))/ZNT(I)) - GZ2OZt, & !LOG((2.0+z_t(i))/z_t(i)) - GZ10OZt, & !LOG((10.+z_t(i))/z_t(i)) - GZ1OZt !LOG((ZA(I)+z_t(i))/z_t(i)) - - INTEGER :: N,I,K,L,NZOL,NK,NZOL2,NZOL10, ITER, yesno - INTEGER, PARAMETER :: ITMAX=1 - - REAL :: PL,THCON,TVCON,E1 - REAL :: DTHVDZ,DTHVM,VCONV,RZOL,RZOL2,RZOL10,ZOL2,ZOL10 - REAL :: DTG,DTTHX,DTHDZ,PSIT10,PSIQ,PSIQ2,PSIQ10 + THCON, & !conversion from temp to theta + zratio_lnd, zratio_ice, zratio_ocn, & !z0/zt + TSK_lnd, TSK_ice, TSK_ocn, & !absolute temperature + THSK_lnd, THSK_ice, THSK_ocn, & !theta + THVSK_lnd, THVSK_ice, THVSK_ocn, & !theta-v + GZ1OZ0_lnd, GZ1OZ0_ice, GZ1OZ0_ocn, & !LOG((ZA(I)+ZNT(i))/ZNT(i)) + GZ1OZt_lnd, GZ1OZt_ice, GZ1OZt_ocn, & !LOG((ZA(I)+ZT(i))/ZT(i)) + GZ2OZ0_lnd, GZ2OZ0_ice, GZ2OZ0_ocn, & !LOG((2.0+ZNT(I))/ZNT(I)) + GZ2OZt_lnd, GZ2OZt_ice, GZ2OZt_ocn, & !LOG((2.0+ZT(I))/ZT(I)) + GZ10OZ0_lnd, GZ10OZ0_ice, GZ10OZ0_ocn, & !LOG((10.+ZNT(I))/ZNT(I)) + GZ10OZt_lnd, GZ10OZt_ice, GZ10OZt_ocn, & !LOG((10.+ZT(I))/ZT(I)) + ZNTstoch_lnd, ZNTstoch_ice, ZNTstoch_ocn, & + ZT_lnd, ZT_ice, ZT_ocn, & + ZQ_lnd, ZQ_ice, ZQ_ocn, & + PSIQ_lnd, PSIQ_ice, PSIQ_ocn, & + PSIQ2_lnd, PSIQ2_ice, PSIQ2_ocn, & + QSFCMR_lnd, QSFCMR_ice, QSFCMR_ocn + + INTEGER :: N,I,K,L,yesno + + REAL :: PL,E1,TABS + REAL :: WSPD_lnd, WSPD_ice, WSPD_ocn + REAL :: DTHVDZ,DTHVM,VCONV,ZOL2,ZOL10,ZOLZA,ZOLZ0 + REAL :: DTG,DTTHX,PSIQ,PSIQ2,PSIQ10,PSIT10 REAL :: FLUXC,VSGD REAL :: restar,VISC,DQG,OLDUST,OLDTST - REAL, PARAMETER :: psilim = -10. ! ONLY AFFECTS z/L > 2.0 + !------------------------------------------------------------------- + IF (debug_code >= 1) THEN + write(*,*)"ITIMESTEP=",ITIMESTEP + DO I=its,ite + write(*,*)"=== input to mynnsfclayer, i:", i + write(*,*)" land, ice, water" + write(*,*)"dry=",dry(i)," icy=",icy(i)," wet=",wet(i) + write(*,*)"tsk=", tskin_lnd(i),tskin_ice(i),tskin_ocn(i) + write(*,*)"tsurf=", tsurf_lnd(i),tsurf_ice(i),tsurf_ocn(i) + write(*,*)"qsfc=", qsfc_lnd(i),qsfc_ice(i),qsfc_ocn(i) + write(*,*)"znt=", znt_lnd(i),znt_ice(i),znt_ocn(i) + write(*,*)"ust=", ust_lnd(i),ust_ice(i),ust_ocn(i) + write(*,*)"snowh=", snowh_lnd(i),snowh_ice(i),snowh_ocn(i) + write(*,*)" psfcpa=",PSFCPA(i)," dz=",dz8w1d(i) + ENDDO + ENDIF DO I=its,ite - ! CONVERT GROUND & LOWEST LAYER TEMPERATURE TO POTENTIAL TEMPERATURE: - ! PSFC cmb + ! PSFC ( in cmb) is used later in saturation checks PSFC(I)=PSFCPA(I)/1000. - THGB(I)=TSK(I)*(100./PSFC(I))**ROVCP !(K) - ! PL cmb - PL=P1D(I)/1000. - THCON=(100./PL)**ROVCP - TH1D(I)=T1D(I)*THCON !(Theta, K) + ! DEFINE SKIN TEMPERATURES FOR LAND/WATER/ICE + TSK_lnd(I) = 0.5 * (tsurf_lnd(i)+tskin_lnd(i)) + TSK_ice(I) = 0.5 * (tsurf_ice(i)+tskin_ice(i)) + TSK_ocn(I) = 0.5 * (tsurf_ocn(i)+tskin_ocn(i)) + QVSH(I)=QV1D(I)/(1.+QV1D(I)) !CONVERT TO SPEC HUM (kg/kg) + THCON(I)=(100000./PSFCPA(I))**ROVCP + ENDDO + + DO I=its,ite + ! CONVERT SKIN TEMPERATURES TO POTENTIAL TEMPERATURE: + THSK_lnd(I) = TSK_lnd(I)*THCON(I) !(K) + THSK_ice(I) = TSK_ice(I)*THCON(I) !(K) + THSK_ocn(I) = TSK_ocn(I)*THCON(I) !(K) + ENDDO + + DO I=its,ite + ! CONVERT SKIN POTENTIAL TEMPERATURES TO VIRTUAL POTENTIAL TEMPERATURE: + THVSK_lnd(I) = THSK_lnd(I)*(1.+EP1*QVSH(I)) !(K) + THVSK_ice(I) = THSK_ice(I)*(1.+EP1*QVSH(I)) !(K) + THVSK_ocn(I) = THSK_ocn(I)*(1.+EP1*QVSH(I)) !(K) + ENDDO + + DO I=its,ite + ! CONVERT LOWEST LAYER TEMPERATURE TO POTENTIAL TEMPERATURE: + TH1D(I)=T1D(I)*THCON(I) !(Theta, K) TC1D(I)=T1D(I)-273.15 !(T, Celsius) + ENDDO + DO I=its,ite ! CONVERT TO VIRTUAL TEMPERATURE - QVSH(I)=QV1D(I)/(1.+QV1D(I)) !CONVERT TO SPEC HUM (kg/kg) - TVCON=(1.+EP1*QVSH(I)) - THV1D(I)=TH1D(I)*TVCON !(K) - TV1D(I)=T1D(I)*TVCON !(K) + THV1D(I)=TH1D(I)*(1.+EP1*QVSH(I)) !(K) + TV1D(I)=T1D(I)*(1.+EP1*QVSH(I)) !(K) + ENDDO - !RHO1D(I)=PSFCPA(I)/(R*TV1D(I)) !now using value calculated in sfc driver + DO I=its,ite + RHO1D(I)=PSFCPA(I)/(R*TV1D(I)) !now using value calculated in sfc driver ZA(I)=0.5*dz8w1d(I) !height of first half-sigma level ZA2(I)=dz8w1d(I) + 0.5*dz2w1d(I) !height of 2nd half-sigma level GOVRTH(I)=G/TH1D(I) ENDDO + IF (debug_code ==2) THEN + write(*,*)"ITIMESTEP=",ITIMESTEP + DO I=its,ite + write(*,*)"=== derived quantities in mynn sfc layer, i:", i + write(*,*)" land, ice, water" + write(*,*)"dry=",dry(i)," icy=",icy(i)," wet=",wet(i) + write(*,*)"tsk=", tsk_lnd(i),tsk_ice(i),tsk_ocn(i) + write(*,*)"thvsk=", thvsk_lnd(i),thvsk_ice(i),thvsk_ocn(i) + write(*,*)"THV1D=", THV1D(i)," TV1D=",TV1D(i) + write(*,*)"RHO1D=", RHO1D(i)," GOVRTH=",GOVRTH(i) + ENDDO + ENDIF + DO I=its,ite - IF (TSK(I) .LT. 273.15) THEN - !SATURATION VAPOR PRESSURE WRT ICE (SVP1=.6112; 10*mb) - E1=SVP1*EXP(4648*(1./273.15 - 1./TSK(I)) - & - & 11.64*LOG(273.15/TSK(I)) + 0.02265*(273.15 - TSK(I))) + + IF (ITIMESTEP == 1) THEN + IF (wet(i)) THEN + IF (TSK_ocn(I) .LT. 273.15) THEN + !SATURATION VAPOR PRESSURE WRT ICE (SVP1=.6112; 10*mb) + E1=SVP1*EXP(4648*(1./273.15 - 1./TSK_ocn(I)) - & + & 11.64*LOG(273.15/TSK_ocn(I)) + 0.02265*(273.15 - TSK_ocn(I))) + ELSE + !SATURATION VAPOR PRESSURE WRT WATER (Bolton 1980) + E1=SVP1*EXP(SVP2*(TSK_ocn(I)-SVPT0)/(TSK_ocn(i)-SVP3)) + ENDIF + QSFC_ocn(I)=EP2*E1/(PSFC(I)-ep_3*E1) !specific humidity + QSFCMR_ocn(I)=EP2*E1/(PSFC(I)-E1) !mixing ratio + ENDIF + IF (dry(i)) THEN + TABS = 0.5*(TSK_lnd(I) + T1D(I)) + IF (TABS .LT. 273.15) THEN + !SATURATION VAPOR PRESSURE WRT ICE (SVP1=.6112; 10*mb) + E1=SVP1*EXP(4648*(1./273.15 - 1./TABS) - & + & 11.64*LOG(273.15/TABS) + 0.02265*(273.15 - TABS)) + ELSE + !SATURATION VAPOR PRESSURE WRT WATER (Bolton 1980) + E1=SVP1*EXP(SVP2*(TABS-SVPT0)/(TABS-SVP3)) + ENDIF + QSFC_lnd(I)=EP2*E1/(PSFC(I)-ep_3*E1) !specific humidity + QSFC_lnd(I)=0.5*(QSFC_lnd(I) + QSFC(I)) + QSFCMR_lnd(I)=QSFC_lnd(I)/(1.-QSFC_lnd(I)) !mixing ratio + ENDIF + IF (icy(i)) THEN + IF (TSK_ice(I) .LT. 273.15) THEN + !SATURATION VAPOR PRESSURE WRT ICE (SVP1=.6112; 10*mb) + E1=SVP1*EXP(4648*(1./273.15 - 1./TSK_ice(I)) - & + & 11.64*LOG(273.15/TSK_ice(I)) + 0.02265*(273.15 - TSK_ice(I))) + ELSE + !SATURATION VAPOR PRESSURE WRT WATER (Bolton 1980) + E1=SVP1*EXP(SVP2*(TSK_ice(I)-SVPT0)/(TSK_ice(i)-SVP3)) + ENDIF + QSFC_ice(I)=EP2*E1/(PSFC(I)-ep_3*E1) !specific humidity + QSFCMR_ice(I)=EP2*E1/(PSFC(I)-E1) !mixing ratio + ENDIF + ELSE - !SATURATION VAPOR PRESSURE WRT WATER (Bolton 1980) - E1=SVP1*EXP(SVP2*(TSK(I)-SVPT0)/(TSK(I)-SVP3)) - ENDIF - !FOR LAND POINTS, QSFC can come from LSM, ONLY RECOMPUTE OVER WATER - IF (xland(i).gt.1.5 .or. QSFC(i).le.0.0) THEN !WATER - QSFC(I)=EP2*E1/(PSFC(I)-ep_3*E1) !specific humidity - QSFCMR(I)=EP2*E1/(PSFC(I)-E1) !mixing ratio - ELSE !LAND - QSFCMR(I)=QSFC(I)/(1.-QSFC(I)) + + ! Use what comes out of the LSM, NST, and CICE + IF (wet(i)) QSFCMR_ocn(I)=QSFC_ocn(I)/(1.-QSFC_ocn(I)) + IF (dry(i)) QSFCMR_lnd(I)=QSFC_lnd(I)/(1.-QSFC_lnd(I)) + IF (icy(i)) QSFCMR_ice(I)=QSFC_ice(I)/(1.-QSFC_ice(I)) + ENDIF - IF (TSK(I) .LT. 273.15) THEN + ! QGH CHANGED TO USE LOWEST-LEVEL AIR TEMP + ! Q2SAT = QGH IN LSM + IF (T1D(I) .LT. 273.15) THEN !SATURATION VAPOR PRESSURE WRT ICE E1=SVP1*EXP(4648*(1./273.15 - 1./T1D(I)) - & & 11.64*LOG(273.15/T1D(I)) + 0.02265*(273.15 - T1D(I))) @@ -670,68 +752,159 @@ SUBROUTINE SFCLAY1D_mynn( & E1=SVP1*EXP(SVP2*(T1D(I)-SVPT0)/(T1D(I)-SVP3)) ENDIF PL=P1D(I)/1000. + !QGH(I)=EP2*E1/(PL-ep_3*E1) !specific humidity + QGH(I)=EP2*E1/(PL-E1) !mixing ratio CPM(I)=CP*(1.+0.84*QV1D(I)) ENDDO + IF (debug_code == 2) THEN + write(*,*)"ITIMESTEP=",ITIMESTEP + DO I=its,ite + if (wet(i)) then + write(*,*)"==== q-bombs, i:",i," wet" + write(*,*)"QSFC_ocn=", QSFC_ocn(I)," QSFCMR_ocn=", QSFCMR_ocn(I)," QGH=",QGH(I) + endif + if(dry(i)) then + write(*,*)"==== q-bombs, i:",i," dry" + write(*,*)"QSFC_lnd=", QSFC_lnd(I)," QSFCMR_lnd=", QSFCMR_lnd(I)," QGH=",QGH(I) + endif + if(icy(i)) then + write(*,*)"==== q-bombs, i:",i," ice" + write(*,*)"QSFC_ice=", QSFC_ice(I)," QSFCMR_ice=", QSFCMR_ice(I)," QGH=",QGH(I) + endif + ENDDO + ENDIF + DO I=its,ite WSPD(I)=SQRT(U1D(I)*U1D(I)+V1D(I)*V1D(I)) + WSPD_ocn = -99. + WSPD_ice = -99. + WSPD_lnd = -99. + + IF (wet(i)) THEN + DTHVDZ=(THV1D(I)-THVSK_ocn(I)) + !-------------------------------------------------------- + ! Calculate the convective velocity scale (WSTAR) and + ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) + ! and Mahrt and Sun (1995, MWR), respectively + !------------------------------------------------------- + fluxc = max(hfx(i)/RHO1D(i)/cp & + & + ep1*THVSK_ocn(I)*qfx(i)/RHO1D(i),0.) + !WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**onethird + WSTAR(I) = vconvc*(g/TSK_ocn(i)*pblh(i)*fluxc)**onethird + !-------------------------------------------------------- + ! Mahrt and Sun low-res correction - modified for water points (halved) + ! (for 13 km ~ 0.18 m/s; for 3 km == 0 m/s) + !-------------------------------------------------------- + VSGD = MIN( 0.16 * (max(dx(i)/5000.-1.,0.))**onethird , 0.25) + WSPD_ocn=SQRT(WSPD(I)*WSPD(I)+WSTAR(I)*WSTAR(I)+vsgd*vsgd) + WSPD_ocn=MAX(WSPD_ocn,wmin) + !-------------------------------------------------------- + ! CALCULATE THE BULK RICHARDSON NUMBER OF SURFACE LAYER, + ! ACCORDING TO AKB(1976), EQ(12). + !-------------------------------------------------------- + rb_ocn(I)=GOVRTH(I)*ZA(I)*DTHVDZ/(WSPD_ocn*WSPD_ocn) + IF (ITIMESTEP == 1) THEN + rb_ocn(I)=MAX(rb_ocn(I),-2.0) + rb_ocn(I)=MIN(rb_ocn(I), 2.0) + ELSE + rb_ocn(I)=MAX(rb_ocn(I),-50.0) + rb_ocn(I)=MIN(rb_ocn(I), 50.0) + ENDIF + ENDIF ! end water point + + IF (dry(i)) THEN + DTHVDZ=(THV1D(I)-THVSK_lnd(I)) + !-------------------------------------------------------- + ! Calculate the convective velocity scale (WSTAR) and + ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) + ! and Mahrt and Sun (1995, MWR), respectively + !------------------------------------------------------- + fluxc = max(hfx(i)/RHO1D(i)/cp & + & + ep1*THVSK_lnd(I)*qfx(i)/RHO1D(i),0.) + !WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**onethird + !increase height scale, assuming that the non-local transoport + !from the mass-flux (plume) mixing exceedsd the PBLH. + WSTAR(I) = vconvc*(g/TSK_lnd(i)*MIN(1.5*pblh(i),4000.)*fluxc)**onethird + !-------------------------------------------------------- + ! Mahrt and Sun low-res correction + ! (for 13 km ~ 0.37 m/s; for 3 km == 0 m/s) + !-------------------------------------------------------- + VSGD = MIN( 0.32 * (max(dx(i)/5000.-1.,0.))**onethird , 0.5) + WSPD_lnd=SQRT(WSPD(I)*WSPD(I)+WSTAR(I)*WSTAR(I)+vsgd*vsgd) + WSPD_lnd=MAX(WSPD_lnd,wmin) + !-------------------------------------------------------- + ! CALCULATE THE BULK RICHARDSON NUMBER OF SURFACE LAYER, + ! ACCORDING TO AKB(1976), EQ(12). + !-------------------------------------------------------- + rb_lnd(I)=GOVRTH(I)*ZA(I)*DTHVDZ/(WSPD_lnd*WSPD_lnd) + !From Tilden Meyers: + !IF (rb_lnd(I) .GE 0.0) THEN + ! ust_lnd(i)=WSPD_lnd*0.1/(1.0 + 10.0*rb_lnd(I)) + !ELSE + ! ust_lnd(i)=WSPD_lnd*0.1*(1.0 - 10.0*rb_lnd(I))**onethird + !ENDIF + IF (ITIMESTEP == 1) THEN + rb_lnd(I)=MAX(rb_lnd(I),-2.0) + rb_lnd(I)=MIN(rb_lnd(I), 2.0) + ELSE + rb_lnd(I)=MAX(rb_lnd(I),-50.0) + rb_lnd(I)=MIN(rb_lnd(I), 50.0) + ENDIF + ENDIF ! end land point + + IF (icy(i)) THEN + DTHVDZ=(THV1D(I)-THVSK_ice(I)) + !-------------------------------------------------------- + ! Calculate the convective velocity scale (WSTAR) and + ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) + ! and Mahrt and Sun (1995, MWR), respectively + !------------------------------------------------------- + fluxc = max(hfx(i)/RHO1D(i)/cp & + & + ep1*THVSK_ice(I)*qfx(i)/RHO1D(i),0.) + !WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**onethird + !increase height scale, assuming that the non-local transport + !from the mass-flux (plume) mixing exceedsd the PBLH. + WSTAR(I) = vconvc*(g/TSK_ice(i)*MIN(1.5*pblh(i),4000.)*fluxc)**onethird + !-------------------------------------------------------- + ! Mahrt and Sun low-res correction + ! (for 13 km ~ 0.37 m/s; for 3 km == 0 m/s) + !-------------------------------------------------------- + VSGD = MIN( 0.32 * (max(dx(i)/5000.-1.,0.))**onethird , 0.5) + WSPD_ice=SQRT(WSPD(I)*WSPD(I)+WSTAR(I)*WSTAR(I)+vsgd*vsgd) + WSPD_ice=MAX(WSPD_ice,wmin) + !-------------------------------------------------------- + ! CALCULATE THE BULK RICHARDSON NUMBER OF SURFACE LAYER, + ! ACCORDING TO AKB(1976), EQ(12). + !-------------------------------------------------------- + rb_ice(I)=GOVRTH(I)*ZA(I)*DTHVDZ/(WSPD_ice*WSPD_ice) + IF (ITIMESTEP == 1) THEN + rb_ice(I)=MAX(rb_ice(I),-2.0) + rb_ice(I)=MIN(rb_ice(I), 2.0) + ELSE + rb_ice(I)=MAX(rb_ice(I),-50.0) + rb_ice(I)=MIN(rb_ice(I), 50.0) + ENDIF + ENDIF ! end ice point + + !NOW CONDENSE THE POSSIBLE WSPD VALUES BY TAKING THE MAXIMUM + WSPD(I) = MAX(WSPD_ice,WSPD_ocn) + WSPD(I) = MAX(WSPD_lnd,WSPD(I)) + + IF (debug_code >= 1) THEN + write(*,*)"===== After rb calc in mynn sfc layer:" + write(*,*)"ITIMESTEP=",ITIMESTEP + write(*,*)"WSPD=", WSPD(I)," WSTAR=", WSTAR(I)," vsgd=",vsgd + IF (icy(i))write(*,*)"rb_ice=", rb_ice(I)," DTHVDZ=",DTHVDZ + IF (wet(i))write(*,*)"rb_ocn=", rb_ocn(I)," DTHVDZ=",DTHVDZ + IF (dry(i))write(*,*)"rb_lnd=", rb_lnd(I)," DTHVDZ=",DTHVDZ + ENDIF - !account for partial condensation - exner1=(p1d(I)/p1000mb)**ROVCP - sqc1=qc1d(I)/(1.+qc1d(I)) !lowest mod level cloud water spec hum - sqv1=QVSH(I) !lowest mod level water vapor spec hum - thl1=TH1D(I)-xlvcp/exner1*sqc1 - sqvg=qsfc(I) !sfc water vapor spec hum - sqcg=qcg(I)/(1.+qcg(I)) !sfc cloud water spec hum - - vv = thl1-THGB(I) - !TGS:ww = mavail(I)*(sqv1-sqvg) + (sqc1-sqcg) - ww = (sqv1-sqvg) + (sqc1-sqcg) - - !TGS:THVGB(I)=THGB(I)*(1.+EP1*QSFC(I)*MAVAIL(I)) - THVGB(I)=THGB(I)*(1.+EP1*QSFC(I)) - - DTHDZ=(TH1D(I)-THGB(I)) - DTHVDZ=(THV1D(I)-THVGB(I)) - !DTHVDZ= (vt1(i) + 1.0)*vv + (vq1(i) + tv0)*ww - - !-------------------------------------------------------- - ! Calculate the convective velocity scale (WSTAR) and - ! subgrid-scale velocity (VSGD) following Beljaars (1995, QJRMS) - ! and Mahrt and Sun (1995, MWR), respectively - !------------------------------------------------------- - ! Use Beljaars over land and water - fluxc = max(hfx(i)/RHO1D(i)/cp & - & + ep1*THVGB(I)*qfx(i)/RHO1D(i),0.) - WSTAR(I) = vconvc*(g/TSK(i)*pblh(i)*fluxc)**.33 - - !-------------------------------------------------------- - ! Mahrt and Sun low-res correction - ! (for 13 km ~ 0.37 m/s; for 3 km == 0 m/s) - !-------------------------------------------------------- - VSGD = 0.32 * (max(dx(i)/5000.-1.,0.))**.33 - WSPD(I)=SQRT(WSPD(I)*WSPD(I)+WSTAR(I)*WSTAR(I)+vsgd*vsgd) - WSPD(I)=MAX(WSPD(I),wmin) - - !-------------------------------------------------------- - ! CALCULATE THE BULK RICHARDSON NUMBER OF SURFACE LAYER, - ! ACCORDING TO AKB(1976), EQ(12). - !-------------------------------------------------------- - BR(I)=GOVRTH(I)*ZA(I)*DTHVDZ/(WSPD(I)*WSPD(I)) - !SET LIMITS ACCORDING TO Li et al. (2010) Boundary-Layer Meteorol (p.158) - BR(I)=MAX(BR(I),-20.0) - BR(I)=MIN(BR(I),2.0) - ! IF PREVIOUSLY UNSTABLE, DO NOT LET INTO REGIMES 1 AND 2 (STABLE) !if (itimestep .GT. 1) THEN ! IF(MOL(I).LT.0.)BR(I)=MIN(BR(I),0.0) !ENDIF - !IF(I .eq. 2)THEN - ! write(*,1006)"BR:",BR(I)," fluxc:",fluxc," vt1:",vt1(i)," vq1:",vq1(i) - ! write(*,1007)"XLAND:",XLAND(I)," WSPD:",WSPD(I)," DTHVDZ:",DTHVDZ," WSTAR:",WSTAR(I) - !ENDIF - ENDDO 1006 format(A,F7.3,A,f9.4,A,f9.5,A,f9.4) @@ -739,626 +912,1073 @@ SUBROUTINE SFCLAY1D_mynn( & !-------------------------------------------------------------------- !-------------------------------------------------------------------- -!--- BEGIN ITERATION LOOP (ITMAX=5); USUALLY CONVERGES IN TWO PASSES +!--- BEGIN I-LOOP !-------------------------------------------------------------------- !-------------------------------------------------------------------- DO I=its,ite - ITER = 1 - DO WHILE (ITER .LE. ITMAX) - - !COMPUTE KINEMATIC VISCOSITY (m2/s) Andreas (1989) CRREL Rep. 89-11 - !valid between -173 and 277 degrees C. - VISC=1.326e-5*(1. + 6.542e-3*TC1D(I) + 8.301e-6*TC1D(I)*TC1D(I) & - - 4.84e-9*TC1D(I)*TC1D(I)*TC1D(I)) - - IF((XLAND(I)-1.5).GE.0)THEN - !-------------------------------------- - ! WATER - !-------------------------------------- - ! CALCULATE z0 (znt) - !-------------------------------------- - IF ( PRESENT(ISFTCFLX) ) THEN - IF ( ISFTCFLX .EQ. 0 ) THEN - IF (COARE_OPT .EQ. 3.0) THEN - !COARE 3.0 (MISLEADING SUBROUTINE NAME) - CALL charnock_1955(ZNT(i),UST(i),WSPD(i),visc,ZA(I)) - ELSE - !COARE 3.5 - CALL edson_etal_2013(ZNT(i),UST(i),WSPD(i),visc,ZA(I)) - ENDIF - ELSEIF ( ISFTCFLX .EQ. 1 .OR. ISFTCFLX .EQ. 2 ) THEN - CALL davis_etal_2008(ZNT(i),UST(i)) - ELSEIF ( ISFTCFLX .EQ. 3 ) THEN - CALL Taylor_Yelland_2001(ZNT(i),UST(i),WSPD(i)) - ELSEIF ( ISFTCFLX .EQ. 4 ) THEN - IF (COARE_OPT .EQ. 3.0) THEN - !COARE 3.0 (MISLEADING SUBROUTINE NAME) - CALL charnock_1955(ZNT(i),UST(i),WSPD(i),visc,ZA(I)) - ELSE - !COARE 3.5 - CALL edson_etal_2013(ZNT(i),UST(i),WSPD(i),visc,ZA(I)) - ENDIF + !COMPUTE KINEMATIC VISCOSITY (m2/s) Andreas (1989) CRREL Rep. 89-11 + !valid between -173 and 277 degrees C. + VISC=1.326e-5*(1. + 6.542e-3*TC1D(I) + 8.301e-6*TC1D(I)*TC1D(I) & + - 4.84e-9*TC1D(I)*TC1D(I)*TC1D(I)) + + IF (wet(i)) THEN + !-------------------------------------- + ! WATER + !-------------------------------------- + ! CALCULATE z0 (znt) + !-------------------------------------- + IF (debug_code >= 1) THEN + write(*,*)"=============Input to ZNT over water:" + write(*,*)"u*:",UST_ocn(i)," wspd=",WSPD(i)," visc=",visc," za=",ZA(I) + ENDIF + IF ( PRESENT(ISFTCFLX) ) THEN + IF ( ISFTCFLX .EQ. 0 ) THEN + IF (COARE_OPT .EQ. 3.0) THEN + !COARE 3.0 (MISLEADING SUBROUTINE NAME) + CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + ELSE + !COARE 3.5 + CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) ENDIF - ELSE - !DEFAULT TO COARE 3.0/3.5 + ELSEIF ( ISFTCFLX .EQ. 1 .OR. ISFTCFLX .EQ. 2 ) THEN + CALL davis_etal_2008(ZNT_ocn(i),UST_ocn(i)) + ELSEIF ( ISFTCFLX .EQ. 3 ) THEN + CALL Taylor_Yelland_2001(ZNT_ocn(i),UST_ocn(i),WSPD(i)) + ELSEIF ( ISFTCFLX .EQ. 4 ) THEN IF (COARE_OPT .EQ. 3.0) THEN - !COARE 3.0 - CALL charnock_1955(ZNT(i),UST(i),WSPD(i),visc,ZA(I)) + !COARE 3.0 (MISLEADING SUBROUTINE NAME) + CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) ELSE !COARE 3.5 - CALL edson_etal_2013(ZNT(i),UST(i),WSPD(i),visc,ZA(I)) + CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) ENDIF ENDIF + ELSE + !DEFAULT TO COARE 3.0/3.5 + IF (COARE_OPT .EQ. 3.0) THEN + !COARE 3.0 + CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + ELSE + !COARE 3.5 + CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + ENDIF + ENDIF - ! add stochastic perturbaction of ZNT - if (spp_pbl==1) then - ZNTstoch(I) = MAX(ZNT(I) + 1.5 * ZNT(I) * rstoch1D(i), 1e-6) - else - ZNTstoch(I) = ZNT(I) - endif + ! add stochastic perturbation of ZNT + if (spp_pbl==1) then + ZNTstoch_ocn(I) = MAX(ZNT_ocn(I) + ZNT_ocn(I)*1.0*rstoch1D(i), 1e-6) + else + ZNTstoch_ocn(I) = ZNT_ocn(I) + endif + + IF (debug_code >= 1) THEN + write(*,*)"==========Output ZNT over water:" + write(*,*)"ZNT:",ZNTstoch_ocn(i) + ENDIF + + !COMPUTE ROUGHNESS REYNOLDS NUMBER (restar) USING NEW ZNT + ! AHW: Garrattt formula: Calculate roughness Reynolds number + ! Kinematic viscosity of air (linear approx to + ! temp dependence at sea level) + restar=MAX(ust_ocn(i)*ZNTstoch_ocn(i)/visc, 0.1) + + !-------------------------------------- + !CALCULATE z_t and z_q + !-------------------------------------- + IF (debug_code >= 1) THEN + write(*,*)"=============Input to ZT over water:" + write(*,*)"u*:",UST_ocn(i)," restar=",restar," visc=",visc + ENDIF - !COMPUTE ROUGHNESS REYNOLDS NUMBER (restar) USING NEW ZNT - ! AHW: Garrattt formula: Calculate roughness Reynolds number - ! Kinematic viscosity of air (linear approx to - ! temp dependence at sea level) - restar=MAX(ust(i)*ZNTstoch(i)/visc, 0.1) - - !-------------------------------------- - !CALCULATE z_t and z_q - !-------------------------------------- - IF ( PRESENT(ISFTCFLX) ) THEN - IF ( ISFTCFLX .EQ. 0 ) THEN - IF (COARE_OPT .EQ. 3.0) THEN - CALL fairall_etal_2003(z_t(i),z_q(i),restar,UST(i),visc) - ELSE - !presumably, this will be published soon, but hasn't yet - CALL fairall_etal_2014(z_t(i),z_q(i),restar,UST(i),visc,rstoch1D(i),spp_pbl) - ENDIF - ELSEIF ( ISFTCFLX .EQ. 1 ) THEN - IF (COARE_OPT .EQ. 3.0) THEN - CALL fairall_etal_2003(z_t(i),z_q(i),restar,UST(i),visc) - ELSE - CALL fairall_etal_2014(z_t(i),z_q(i),restar,UST(i),visc,rstoch1D(i),spp_pbl) - ENDIF - ELSEIF ( ISFTCFLX .EQ. 2 ) THEN - CALL garratt_1992(z_t(i),z_q(i),ZNTstoch(i),restar,XLAND(I)) - ELSEIF ( ISFTCFLX .EQ. 3 ) THEN - IF (COARE_OPT .EQ. 3.0) THEN - CALL fairall_etal_2003(z_t(i),z_q(i),restar,UST(i),visc) - ELSE - CALL fairall_etal_2014(z_t(i),z_q(i),restar,UST(i),visc,rstoch1D(i),spp_pbl) - ENDIF - ELSEIF ( ISFTCFLX .EQ. 4 ) THEN - CALL zilitinkevich_1995(ZNTstoch(i),z_t(i),z_q(i),restar,& - UST(I),KARMAN,XLAND(I),IZ0TLND,spp_pbl,rstoch1D(i)) + IF ( PRESENT(ISFTCFLX) ) THEN + IF ( ISFTCFLX .EQ. 0 ) THEN + IF (COARE_OPT .EQ. 3.0) THEN + CALL fairall_etal_2003(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + rstoch1D(i),spp_pbl) + ELSE + !presumably, this will be published soon, but hasn't yet + CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + rstoch1D(i),spp_pbl) ENDIF - ELSE - !DEFAULT TO COARE 3.0/3.5 + ELSEIF ( ISFTCFLX .EQ. 1 ) THEN + IF (COARE_OPT .EQ. 3.0) THEN + CALL fairall_etal_2003(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + rstoch1D(i),spp_pbl) + ELSE + CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + rstoch1D(i),spp_pbl) + ENDIF + ELSEIF ( ISFTCFLX .EQ. 2 ) THEN + CALL garratt_1992(ZT_ocn(i),ZQ_ocn(i),ZNTstoch_ocn(i),restar,2.0) + ELSEIF ( ISFTCFLX .EQ. 3 ) THEN IF (COARE_OPT .EQ. 3.0) THEN - CALL fairall_etal_2003(z_t(i),z_q(i),restar,UST(i),visc) + CALL fairall_etal_2003(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + rstoch1D(i),spp_pbl) ELSE - CALL fairall_etal_2014(z_t(i),z_q(i),restar,UST(i),visc,rstoch1D(i),spp_pbl) + CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + rstoch1D(i),spp_pbl) ENDIF ENDIF - ELSE + !DEFAULT TO COARE 3.0/3.5 + IF (COARE_OPT .EQ. 3.0) THEN + CALL fairall_etal_2003(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + rstoch1D(i),spp_pbl) + ELSE + CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& + rstoch1D(i),spp_pbl) + ENDIF + ENDIF + IF (debug_code >= 1) THEN + write(*,*)"=============Output ZT & ZQ over water:" + write(*,*)"ZT:",ZT_ocn(i)," ZQ:",ZQ_ocn(i) + ENDIF - ! add stochastic perturbaction of ZNT - if (spp_pbl==1) then - ZNTstoch(I) = MAX(ZNT(I) + 1.5 * ZNT(I) * rstoch1D(i), 1e-6) - else - ZNTstoch(I) = ZNT(I) - endif + GZ1OZ0_ocn(I)= LOG((ZA(I)+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) + GZ1OZt_ocn(I)= LOG((ZA(I)+ZT_ocn(i))/ZT_ocn(i)) + GZ2OZ0_ocn(I)= LOG((2.0+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) + GZ2OZt_ocn(I)= LOG((2.0+ZT_ocn(i))/ZT_ocn(i)) + GZ10OZ0_ocn(I)=LOG((10.+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) + GZ10OZt_ocn(I)=LOG((10.+ZT_ocn(i))/ZT_ocn(i)) + zratio_ocn(i)=ZNTstoch_ocn(I)/ZT_ocn(I) !need estimate for Li et al. + + ENDIF !end water point + + IF (dry(I)) THEN + + ! add stochastic perturbaction of ZNT + if (spp_pbl==1) then + ZNTstoch_lnd(I) = MAX(ZNT_lnd(I) + ZNT_lnd(I)*1.0*rstoch1D(i), 1e-6) + else + ZNTstoch_lnd(I) = ZNT_lnd(I) + endif + + !-------------------------------------- + ! LAND + !-------------------------------------- + !COMPUTE ROUGHNESS REYNOLDS NUMBER (restar) USING DEFAULT ZNT + restar=MAX(ust_lnd(i)*ZNTstoch_lnd(i)/visc, 0.1) + + !-------------------------------------- + !GET z_t and z_q + !-------------------------------------- + IF (snowh_lnd(i) > 50.) THEN ! (mm) Treat as snow cover - use Andreas + CALL Andreas_2002(ZNTstoch_lnd(i),visc,ust_lnd(i),ZT_lnd(i),ZQ_lnd(i)) + ELSE + IF ( PRESENT(IZ0TLND) ) THEN + IF ( IZ0TLND .LE. 1 ) THEN + CALL zilitinkevich_1995(ZNTstoch_lnd(i),ZT_lnd(i),ZQ_lnd(i),restar,& + UST_lnd(I),KARMAN,1.0,IZ0TLND,spp_pbl,rstoch1D(i)) + ELSEIF ( IZ0TLND .EQ. 2 ) THEN + CALL Yang_2008(ZNTSTOCH_lnd(i),ZT_lnd(i),ZQ_lnd(i),UST_lnd(i),MOL(I),& + qstar(I),restar,visc) + ELSEIF ( IZ0TLND .EQ. 3 ) THEN + !Original MYNN in WRF-ARW used this form: + CALL garratt_1992(ZT_lnd(i),ZQ_lnd(i),ZNTSTOCH_lnd(i),restar,1.0) + ENDIF + ELSE + !DEFAULT TO ZILITINKEVICH + CALL zilitinkevich_1995(ZNTSTOCH_lnd(i),ZT_lnd(i),ZQ_lnd(i),restar,& + UST_lnd(I),KARMAN,1.0,0,spp_pbl,rstoch1D(i)) + ENDIF + ENDIF - !-------------------------------------- - ! LAND - !-------------------------------------- - !COMPUTE ROUGHNESS REYNOLDS NUMBER (restar) USING DEFAULT ZNT - restar=MAX(ust(i)*ZNTstoch(i)/visc, 0.1) - - !-------------------------------------- - !GET z_t and z_q - !-------------------------------------- - !CHECK FOR SNOW/ICE POINTS OVER LAND - !IF ( ZNTSTOCH(i) .LE. SNOWZ0 .AND. TSK(I) .LE. 273.15 ) THEN - IF ( SNOWH(i) .GE. 0.1) THEN - CALL Andreas_2002(ZNTSTOCH(i),visc,ust(i),z_t(i),z_q(i)) + GZ1OZ0_lnd(I)= LOG((ZA(I)+ZNTstoch_lnd(I))/ZNTstoch_lnd(I)) + GZ1OZt_lnd(I)= LOG((ZA(I)+ZT_lnd(i))/ZT_lnd(i)) + GZ2OZ0_lnd(I)= LOG((2.0+ZNTstoch_lnd(I))/ZNTstoch_lnd(I)) + GZ2OZt_lnd(I)= LOG((2.0+ZT_lnd(i))/ZT_lnd(i)) + GZ10OZ0_lnd(I)=LOG((10.+ZNTstoch_lnd(I))/ZNTstoch_lnd(I)) + GZ10OZt_lnd(I)=LOG((10.+ZT_lnd(i))/ZT_lnd(i)) + zratio_lnd(i)=ZNTstoch_lnd(I)/ZT_lnd(I) !need estimate for Li et al. + + ENDIF !end land point + + IF (icy(I)) THEN + + ! add stochastic perturbaction of ZNT + if (spp_pbl==1) then + ZNTstoch_ice(I) = MAX(ZNT_ice(I) + ZNT_ice(I)*1.0*rstoch1D(i), 1e-6) + else + ZNTstoch_ice(I) = ZNT_ice(I) + endif + + !-------------------------------------- + ! ICE + !-------------------------------------- + !COMPUTE ROUGHNESS REYNOLDS NUMBER (restar) USING DEFAULT ZNT + restar=MAX(ust_ice(i)*ZNTstoch_ice(i)/visc, 0.1) + !-------------------------------------- + !GET z_t and z_q + !-------------------------------------- + CALL Andreas_2002(ZNTstoch_ice(i),visc,ust_ice(i),ZT_ice(i),ZQ_ice(i)) + + GZ1OZ0_ice(I)= LOG((ZA(I)+ZNTstoch_ice(I))/ZNTstoch_ice(I)) + GZ1OZt_ice(I)= LOG((ZA(I)+ZT_ice(i))/ZT_ice(i)) + GZ2OZ0_ice(I)= LOG((2.0+ZNTstoch_ice(I))/ZNTstoch_ice(I)) + GZ2OZt_ice(I)= LOG((2.0+ZT_ice(i))/ZT_ice(i)) + GZ10OZ0_ice(I)=LOG((10.+ZNTstoch_ice(I))/ZNTstoch_ice(I)) + GZ10OZt_ice(I)=LOG((10.+ZT_ice(i))/ZT_ice(i)) + zratio_ice(i)=ZNTstoch_ice(I)/ZT_ice(I) !need estimate for Li et al. + + ENDIF !end ice point + + !Capture a representative ZNT + IF (dry(i)) THEN + ZNT(i)=ZNTstoch_lnd(I) + ELSEIF (wet(i)) THEN + ZNT(i)=ZNTstoch_ocn(I) + ELSEIF (icy(i)) THEN + ZNT(i)=ZNTstoch_ice(I) + ENDIF + + !-------------------------------------------------------------------- + !--- DIAGNOSE STABILITY FUNCTIONS FOR THE APPROPRIATE STABILITY CLASS: + ! THE STABILITY CLASSES ARE DETERMINED BY THE BULK RICHARDSON NUMBER. + !-------------------------------------------------------------------- + + IF (wet(i)) THEN + IF (rb_ocn(I) .GT. 0.0) THEN + + !COMPUTE z/L first guess: + IF (itimestep .LE. 1) THEN + CALL Li_etal_2010(ZOL(I),rb_ocn(I),ZA(I)/ZNTstoch_ocn(I),zratio_ocn(I)) ELSE - IF ( PRESENT(IZ0TLND) ) THEN - IF ( IZ0TLND .LE. 1 .OR. IZ0TLND .EQ. 4) THEN - !IF IZ0TLND==4, THEN PSIQ WILL BE RECALCULATED USING - !PAN ET AL (1994), but PSIT FROM ZILI WILL BE USED. - CALL zilitinkevich_1995(ZNTSTOCH(i),z_t(i),z_q(i),restar,& - UST(I),KARMAN,XLAND(I),IZ0TLND,spp_pbl,rstoch1D(i)) - ELSEIF ( IZ0TLND .EQ. 2 ) THEN - CALL Yang_2008(ZNTSTOCH(i),z_t(i),z_q(i),UST(i),MOL(I),& - qstar(I),restar,visc,XLAND(I)) - ELSEIF ( IZ0TLND .EQ. 3 ) THEN - !Original MYNN in WRF-ARW used this form: - CALL garratt_1992(z_t(i),z_q(i),ZNTSTOCH(i),restar,XLAND(I)) - ENDIF - ELSE - !DEFAULT TO ZILITINKEVICH - CALL zilitinkevich_1995(ZNTSTOCH(i),z_t(i),z_q(i),restar,& - UST(I),KARMAN,XLAND(I),0,spp_pbl,rstoch1D(i)) - ENDIF + ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ocn(I)*UST_ocn(I),0.0001)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),50.) ENDIF + IF (debug_code >= 1) THEN + write(0,*)"===(wet) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_ocn(I)," ZNT=", ZNTstoch_ocn(i)," ZT=",Zt_ocn(i) + ENDIF + !Use Pedros iterative function to find z/L + zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),50.) + + zolz0 = zol(I)*ZNTstoch_ocn(I)/ZA(I) ! z0/L + zolza = zol(I)*(za(I)+ZNTstoch_ocn(I))/za(I) ! (z+z0/L + zol10 = zol(I)*(10.+ZNTstoch_ocn(I))/za(I) ! (10+z0)/L + zol2 = zol(I)*(2.+ZNTstoch_ocn(I))/za(I) ! (2+z0)/L + + !COMPUTE PSIM and PSIH + !CALL PSI_Suselj_Sood_2010(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_Beljaars_Holtslag_1991(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ocn(I),ZNTstoch_ocn(I),ZA(I)) + !CALL PSI_CB2005(PSIM(I),PSIH(I),zolza,zolz0) + ! or use tables + psim(I)=psim_stable(zolza)-psim_stable(zolz0) + psih(I)=psih_stable(zolza)-psih_stable(zolz0) + psim10(I)=psim_stable(zol10)-psim_stable(zolz0) + psih10(I)=psih_stable(zol10)-psih_stable(zolz0) + psih2(I)=psih_stable(zol2)-psih_stable(zolz0) + + ! 1.0 over Monin-Obukhov length + RMOL(I)= ZOL(I)/ZA(I) + + ELSEIF(rb_ocn(I) .EQ. 0.) THEN + !========================================================= + !-----CLASS 3; FORCED CONVECTION/NEUTRAL: + !========================================================= + + PSIM(I)=0.0 + PSIH(I)=PSIM(I) + PSIM10(I)=0. + PSIH10(I)=0. + PSIH2(I)=0. + + ZOL(I) =0. + RMOL(I) =0. + + ELSEIF(rb_ocn(I) .LT. 0.)THEN + !========================================================== + !-----CLASS 4; FREE CONVECTION: + !========================================================== + + !COMPUTE z/L first guess: + IF (itimestep .LE. 1) THEN + CALL Li_etal_2010(ZOL(I),rb_ocn(I),ZA(I)/ZNTstoch_ocn(I),zratio_ocn(I)) + ELSE + ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ocn(I)*UST_ocn(I),0.001)) + ZOL(I)=MAX(ZOL(I),-50.0) + ZOL(I)=MIN(ZOL(I),0.0) + ENDIF + + IF (debug_code >= 1) THEN + write(0,*)"===(wet) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_ocn(I)," ZNT=", ZNTstoch_ocn(i)," ZT=",Zt_ocn(i) + ENDIF + !Use Pedros iterative function to find z/L + zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I)) + ZOL(I)=MAX(ZOL(I),-50.0) + ZOL(I)=MIN(ZOL(I),0.0) + + zolz0 = zol(I)*ZNTstoch_ocn(I)/ZA(I) ! z0/L + zolza = zol(I)*(za(I)+ZNTstoch_ocn(I))/za(I) ! (z+z0/L + zol10 = zol(I)*(10.+ZNTstoch_ocn(I))/za(I) ! (10+z0)/L + zol2 = zol(I)*(2.+ZNTstoch_ocn(I))/za(I) ! (2+z0)/L + + !COMPUTE PSIM and PSIH + !CALL PSI_Suselj_Sood_2010(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_Hogstrom_1996(PSIM(I),PSIH(I),ZOL(I), ZT_ocn(I), ZNTstoch_ocn(I), ZA(I)) + !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ocn(I),ZNTstoch_ocn(I),ZA(I)) + ! use tables + psim(I)=psim_unstable(zolza)-psim_unstable(zolz0) + psih(I)=psih_unstable(zolza)-psih_unstable(zolz0) + psim10(I)=psim_unstable(zol10)-psim_unstable(zolz0) + psih10(I)=psih_unstable(zol10)-psih_unstable(zolz0) + psih2(I)=psih_unstable(zol2)-psih_unstable(zolz0) + + !---LIMIT PSIH AND PSIM IN THE CASE OF THIN LAYERS AND + !---HIGH ROUGHNESS. THIS PREVENTS DENOMINATOR IN FLUXES + !---FROM GETTING TOO SMALL + PSIH(I)=MIN(PSIH(I),0.9*GZ1OZt_ocn(I)) + PSIM(I)=MIN(PSIM(I),0.9*GZ1OZ0_ocn(I)) + PSIH2(I)=MIN(PSIH2(I),0.9*GZ2OZt_ocn(I)) + PSIM10(I)=MIN(PSIM10(I),0.9*GZ10OZ0_ocn(I)) + PSIH10(I)=MIN(PSIH10(I),0.9*GZ10OZt_ocn(I)) + + RMOL(I) = ZOL(I)/ZA(I) + ENDIF - zratio(i)=zntstoch(i)/z_t(i) - - !ADD RESISTANCE (SOMEWHAT FOLLOWING JIMENEZ ET AL. (2012)) TO PROTECT AGAINST - !EXCESSIVE FLUXES WHEN USING A LOW FIRST MODEL LEVEL (ZA < 10 m). - !Formerly: GZ1OZ0(I)= LOG(ZA(I)/ZNTstoch(I)) - GZ1OZ0(I)= LOG((ZA(I)+ZNTstoch(I))/ZNTstoch(I)) - GZ1OZt(I)= LOG((ZA(I)+z_t(i))/z_t(i)) - GZ2OZ0(I)= LOG((2.0+ZNTstoch(I))/ZNTstoch(I)) - GZ2OZt(I)= LOG((2.0+z_t(i))/z_t(i)) - GZ10OZ0(I)=LOG((10.+ZNTstoch(I))/ZNTstoch(I)) - GZ10OZt(I)=LOG((10.+z_t(i))/z_t(i)) - - !-------------------------------------------------------------------- - !--- DIAGNOSE BASIC PARAMETERS FOR THE APPROPRIATE STABILITY CLASS: - ! - ! THE STABILITY CLASSES ARE DETERMINED BY BR (BULK RICHARDSON NO.). - ! - ! CRITERIA FOR THE CLASSES ARE AS FOLLOWS: - ! - ! 1. BR .GE. 0.2; - ! REPRESENTS NIGHTTIME STABLE CONDITIONS (REGIME=1), - ! - ! 2. BR .LT. 0.2 .AND. BR .GT. 0.0; - ! REPRESENTS DAMPED MECHANICAL TURBULENT CONDITIONS - ! (REGIME=2), - ! - ! 3. BR .EQ. 0.0 - ! REPRESENTS FORCED CONVECTION CONDITIONS (REGIME=3), - ! - ! 4. BR .LT. 0.0 - ! REPRESENTS FREE CONVECTION CONDITIONS (REGIME=4). - ! - !-------------------------------------------------------------------- - IF (BR(I) .GT. 0.0) THEN - IF (BR(I) .GT. 0.2) THEN - !---CLASS 1; STABLE (NIGHTTIME) CONDITIONS: - REGIME(I)=1. - ELSE - !---CLASS 2; DAMPED MECHANICAL TURBULENCE: - REGIME(I)=2. - ENDIF - !COMPUTE z/L - !CALL Li_etal_2010(ZOL(I),BR(I),ZA(I)/ZNTstoch(I),zratio(I)) -! IF (ITER .EQ. 1 .AND. itimestep .LE. 1) THEN - CALL Li_etal_2010(ZOL(I),BR(I),ZA(I)/ZNTstoch(I),zratio(I)) -! ELSE -! ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST(I)*UST(I),0.0001)) -! ZOL(I)=MAX(ZOL(I),0.0) -! ZOL(I)=MIN(ZOL(I),2.) -! ENDIF - - !COMPUTE PSIM and PSIH - IF((XLAND(I)-1.5).GE.0)THEN - ! WATER - !CALL PSI_Suselj_Sood_2010(PSIM(I),PSIH(I),ZOL(I)) - !CALL PSI_Beljaars_Holtslag_1991(PSIM(I),PSIH(I),ZOL(I)) - !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) - CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),z_t(I),ZNTstoch(I),ZA(I)) - ELSE - ! LAND - !CALL PSI_Beljaars_Holtslag_1991(PSIM(I),PSIH(I),ZOL(I)) - !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) - !CALL PSI_Zilitinkevich_Esau_2007(PSIM(I),PSIH(I),ZOL(I)) - CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),z_t(I),ZNTstoch(I),ZA(I)) - ENDIF - - ! LOWER LIMIT ON PSI IN STABLE CONDITIONS - PSIM(I)=MAX(PSIM(I),psilim) - PSIH(I)=MAX(PSIH(I),psilim) - PSIM10(I)=MAX(10./ZA(I)*PSIM(I), psilim) - PSIH10(I)=MAX(10./ZA(I)*PSIH(I), psilim) - PSIM2(I)=MAX(2./ZA(I)*PSIM(I), psilim) - PSIH2(I)=MAX(2./ZA(I)*PSIH(I), psilim) - ! 1.0 over Monin-Obukhov length - RMOL(I)= ZOL(I)/ZA(I) - - ELSEIF(BR(I) .EQ. 0.) THEN - !========================================================= - !-----CLASS 3; FORCED CONVECTION/NEUTRAL: - !========================================================= - REGIME(I)=3. - - PSIM(I)=0.0 - PSIH(I)=PSIM(I) - PSIM10(I)=0. - PSIH10(I)=PSIM10(I) - PSIM2(I)=0. - PSIH2(I)=PSIM2(I) - - !ZOL(I)=0. - IF(UST(I) .LT. 0.01)THEN - ZOL(I)=BR(I)*GZ1OZ0(I) - ELSE - ZOL(I)=KARMAN*GOVRTH(I)*ZA(I)*MOL(I)/(MAX(UST(I)*UST(I),0.001)) - ENDIF - RMOL(I) = ZOL(I)/ZA(I) - - ELSEIF(BR(I) .LT. 0.)THEN - !========================================================== - !-----CLASS 4; FREE CONVECTION: - !========================================================== - REGIME(I)=4. - - !COMPUTE z/L - !CALL Li_etal_2010(ZOL(I),BR(I),ZA(I)/ZNTstoch(I),zratio(I)) - !IF (ITER .EQ. 1 .AND. itimestep .LE. 1) THEN - CALL Li_etal_2010(ZOL(I),BR(I),ZA(I)/ZNTstoch(I),zratio(I)) - !ELSE - ! ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST(I)*UST(I),0.001)) - ! ZOL(I)=MAX(ZOL(I),-19.999) - ! ZOL(I)=MIN(ZOL(I),0.0) - !ENDIF - - ZOL10=10./ZA(I)*ZOL(I) - ZOL2=2./ZA(I)*ZOL(I) - ZOL(I)=MIN(ZOL(I),0.) - ZOL(I)=MAX(ZOL(I),-19.9999) - ZOL10=MIN(ZOL10,0.) - ZOL10=MAX(ZOL10,-19.9999) - ZOL2=MIN(ZOL2,0.) - ZOL2=MAX(ZOL2,-19.9999) - NZOL=INT(-ZOL(I)*100.) - RZOL=-ZOL(I)*100.-NZOL - NZOL10=INT(-ZOL10*100.) - RZOL10=-ZOL10*100.-NZOL10 - NZOL2=INT(-ZOL2*100.) - RZOL2=-ZOL2*100.-NZOL2 - - !COMPUTE PSIM and PSIH - IF((XLAND(I)-1.5).GE.0)THEN - ! WATER - !CALL PSI_Suselj_Sood_2010(PSIM(I),PSIH(I),ZOL(I)) - !CALL PSI_Hogstrom_1996(PSIM(I),PSIH(I),ZOL(I), z_t(I), ZNTstoch(I), ZA(I)) - !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) - CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),z_t(I),ZNTstoch(I),ZA(I)) - ELSE - ! LAND - !CALL PSI_Hogstrom_1996(PSIM(I),PSIH(I),ZOL(I), z_t(I), ZNTstoch(I), ZA(I)) - !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) - CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),z_t(I),ZNTstoch(I),ZA(I)) - ENDIF - - PSIM10(I)=10./ZA(I)*PSIM(I) - PSIH10(I)=10./ZA(I)*PSIH(I) - PSIM2(I)=2./ZA(I)*PSIM(I) - PSIH2(I)=2./ZA(I)*PSIH(I) - - !---LIMIT PSIH AND PSIM IN THE CASE OF THIN LAYERS AND - !---HIGH ROUGHNESS. THIS PREVENTS DENOMINATOR IN FLUXES - !---FROM GETTING TOO SMALL - !PSIH(I)=MIN(PSIH(I),0.9*GZ1OZt(I)) !JOE: less restricitive over forest/urban. - PSIH(I)=MIN(PSIH(I),0.9*GZ1OZ0(I)) - PSIM(I)=MIN(PSIM(I),0.9*GZ1OZ0(I)) - !PSIH2(I)=MIN(PSIH2(I),0.9*GZ2OZt(I)) !JOE: less restricitive over forest/urban. - PSIH2(I)=MIN(PSIH2(I),0.9*GZ2OZ0(I)) - PSIM2(I)=MIN(PSIM2(I),0.9*GZ2OZ0(I)) - PSIM10(I)=MIN(PSIM10(I),0.9*GZ10OZ0(I)) - PSIH10(I)=MIN(PSIH10(I),0.9*GZ10OZ0(I)) - - RMOL(I) = ZOL(I)/ZA(I) - - ENDIF - - !------------------------------------------------------------ - !-----COMPUTE THE FRICTIONAL VELOCITY: - !------------------------------------------------------------ - ! ZA(1982) EQS(2.60),(2.61). - PSIX(I)=GZ1OZ0(I)-PSIM(I) - PSIX10(I)=GZ10OZ0(I)-PSIM10(I) - ! TO PREVENT OSCILLATIONS AVERAGE WITH OLD VALUE - OLDUST = UST(I) - UST(I)=0.5*UST(I)+0.5*KARMAN*WSPD(I)/PSIX(I) - !NON-AVERAGED: UST(I)=KARMAN*WSPD(I)/PSIX(I) - - ! Compute u* without vconv for use in HFX calc when isftcflx > 0 - WSPDI(I)=MAX(SQRT(U1D(I)*U1D(I)+V1D(I)*V1D(I)), wmin) - IF ( PRESENT(USTM) ) THEN - USTM(I)=0.5*USTM(I)+0.5*KARMAN*WSPDI(I)/PSIX(I) - ENDIF + ! CALCULATE THE RESISTANCE: + PSIX_ocn(I) =MAX(GZ1OZ0_ocn(I)-PSIM(I) , 1.0) ! = fm + PSIX10_ocn(I)=MAX(GZ10OZ0_ocn(I)-PSIM10(I), 1.0) ! = fm10 + PSIT_ocn(I) =MAX(GZ1OZt_ocn(I)-PSIH(I) , 1.0) ! = fh + PSIT2_ocn(I) =MAX(GZ2OZt_ocn(I)-PSIH2(I) , 1.0) ! = fh2 + PSIQ_ocn(I) =MAX(LOG((ZA(I)+ZQ_ocn(i))/ZQ_ocn(I))-PSIH(I) ,1.0) + PSIQ2_ocn(I) =MAX(LOG((2.0+ZQ_ocn(i))/ZQ_ocn(I))-PSIH2(I) ,1.0) - IF ((XLAND(I)-1.5).LT.0.) THEN !LAND - UST(I)=MAX(UST(I),0.005) !Further relaxing this limit - no need to go lower - !Keep ustm = ust over land. - IF ( PRESENT(USTM) ) USTM(I)=UST(I) - ENDIF + ENDIF ! end water points - !------------------------------------------------------------ - !-----COMPUTE THE THERMAL AND MOISTURE RESISTANCE (PSIQ AND PSIT): - !------------------------------------------------------------ - ! LOWER LIMIT ADDED TO PREVENT LARGE FLHC IN SOIL MODEL - ! ACTIVATES IN UNSTABLE CONDITIONS WITH THIN LAYERS OR HIGH Z0 - GZ1OZt(I)= LOG((ZA(I)+z_t(i))/z_t(i)) - GZ2OZt(I)= LOG((2.0+z_t(i))/z_t(i)) - - PSIT(I) =MAX(GZ1OZt(I)-PSIH(I) ,1.) - PSIT2(I)=MAX(GZ2OZt(I)-PSIH2(I),1.) - resist(I)=PSIT(I) - logres(I)=GZ1OZt(I) - - PSIQ=MAX(LOG((ZA(I)+z_q(i))/z_q(I))-PSIH(I) ,1.0) - PSIQ2=MAX(LOG((2.0+z_q(i))/z_q(I))-PSIH2(I) ,1.0) - - IF((XLAND(I)-1.5).LT.0)THEN !Land only - IF ( IZ0TLND .EQ. 4 ) THEN - CALL Pan_etal_1994(PSIQ,PSIQ2,UST(I),PSIH(I),PSIH2(I),& - & KARMAN,ZA(I)) - ENDIF - ENDIF + IF (dry(i)) THEN + IF (rb_lnd(I) .GT. 0.0) THEN - !---------------------------------------------------- - !COMPUTE THE TEMPERATURE SCALE (or FRICTION TEMPERATURE, T*) - !---------------------------------------------------- - !DTG=TH1D(I)-THGB(I) !SWITCH TO THETA-V - DTG=THV1D(I)-THVGB(I) - OLDTST=MOL(I) - MOL(I)=KARMAN*DTG/PSIT(I)/PRT - !t_star(I) = -HFX(I)/(UST(I)*CPM(I)*RHO1D(I)) - !t_star(I) = MOL(I) - !---------------------------------------------------- - !COMPUTE THE MOISTURE SCALE (or q*) - DQG=(QVSH(i)-qsfc(i))*1000. !(kg/kg -> g/kg) - qstar(I)=KARMAN*DQG/PSIQ/PRT - - !CHECK FOR CONVERGENCE - IF (ITER .GE. 2) THEN - !IF (ABS(OLDUST-UST(I)) .lt. 0.01) THEN - IF (ABS(OLDTST-MOL(I)) .lt. 0.01) THEN - ITER = ITER+ITMAX - ENDIF + !COMPUTE z/L first guess: + IF (itimestep .LE. 1) THEN + CALL Li_etal_2010(ZOL(I),rb_lnd(I),ZA(I)/ZNTstoch_lnd(I),zratio_lnd(I)) + ELSE + ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_lnd(I)*UST_lnd(I),0.0001)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),50.) + ENDIF - !IF () THEN - ! print*,"ITER:",ITER - ! write(*,1001)"REGIME:",REGIME(I)," z/L:",ZOL(I)," U*:",UST(I)," Tstar:",MOL(I) - ! write(*,1002)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I)," DTHV:",THV1D(I)-THVGB(I) - ! write(*,1003)"CPM:",CPM(I)," RHO1D:",RHO1D(I)," L:",ZOL(I)/ZA(I)," DTH:",TH1D(I)-THGB(I) - ! write(*,1004)"Z0/Zt:",zratio(I)," Z0:",ZNTstoch(I)," Zt:",z_t(I)," za:",za(I) - ! write(*,1005)"Re:",restar," MAVAIL:",MAVAIL(I)," QSFC(I):",QSFC(I)," QVSH(I):",QVSH(I) - ! print*,"VISC=",VISC," Z0:",ZNTstoch(I)," T1D(i):",T1D(i) - ! write(*,*)"=============================================" - !ENDIF - ENDIF + IF (debug_code >= 1) THEN + write(0,*)"===(dry) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_lnd(I)," ZNT=", ZNTstoch_lnd(i)," ZT=",Zt_lnd(i) + ENDIF + !Use Pedros iterative function to find z/L + zol(I)=zolri(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),ZT_lnd(I),ZOL(I)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),50.) + + zolz0 = zol(I)*ZNTstoch_lnd(I)/ZA(I) ! z0/L + zolza = zol(I)*(za(I)+ZNTstoch_lnd(I))/za(I) ! (z+z0/L + zol10 = zol(I)*(10.+ZNTstoch_lnd(I))/za(I) ! (10+z0)/L + zol2 = zol(I)*(2.+ZNTstoch_lnd(I))/za(I) ! (2+z0)/L + + !COMPUTE PSIM and PSIH + !CALL PSI_Beljaars_Holtslag_1991(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_Zilitinkevich_Esau_2007(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_lnd(I),ZNTstoch_lnd(I),ZA(I)) + !CALL PSI_CB2005(PSIM(I),PSIH(I),zolza,zolz0) + psim(I)=psim_stable(zolza)-psim_stable(zolz0) + psih(I)=psih_stable(zolza)-psih_stable(zolz0) + psim10(I)=psim_stable(zol10)-psim_stable(zolz0) + psih10(I)=psih_stable(zol10)-psih_stable(zolz0) + psih2(I)=psih_stable(zol2)-psih_stable(zolz0) + + ! 1.0 over Monin-Obukhov length + RMOL(I)= ZOL(I)/ZA(I) + + ELSEIF(rb_lnd(I) .EQ. 0.) THEN + !========================================================= + !-----CLASS 3; FORCED CONVECTION/NEUTRAL: + !========================================================= + + PSIM(I)=0.0 + PSIH(I)=PSIM(I) + PSIM10(I)=0. + PSIH10(I)=0. + PSIH2(I)=0. + + ZOL(I) =0. + RMOL(I) =0. + + ELSEIF(rb_lnd(I) .LT. 0.)THEN + !========================================================== + !-----CLASS 4; FREE CONVECTION: + !========================================================== + + !COMPUTE z/L first guess: + IF (itimestep .LE. 1) THEN + CALL Li_etal_2010(ZOL(I),rb_lnd(I),ZA(I)/ZNTstoch_lnd(I),zratio_lnd(I)) + ELSE + ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_lnd(I)*UST_lnd(I),0.001)) + ZOL(I)=MAX(ZOL(I),-50.0) + ZOL(I)=MIN(ZOL(I),0.0) + ENDIF - ITER = ITER + 1 + IF (debug_code >= 1) THEN + write(0,*)"===(dry) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_lnd(I)," ZNT=", ZNTstoch_lnd(i)," ZT=",Zt_lnd(i) + ENDIF + !Use Pedros iterative function to find z/L + zol(I)=zolri(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),ZT_lnd(I),ZOL(I)) + ZOL(I)=MAX(ZOL(I),-50.0) + ZOL(I)=MIN(ZOL(I),0.0) + + zolz0 = zol(I)*ZNTstoch_lnd(I)/ZA(I) ! z0/L + zolza = zol(I)*(za(I)+ZNTstoch_lnd(I))/za(I) ! (z+z0/L + zol10 = zol(I)*(10.+ZNTstoch_lnd(I))/za(I) ! (10+z0)/L + zol2 = zol(I)*(2.+ZNTstoch_lnd(I))/za(I) ! (2+z0)/L + + !COMPUTE PSIM and PSIH + !CALL PSI_Hogstrom_1996(PSIM(I),PSIH(I),ZOL(I), ZT_lnd(I), ZNTstoch_lnd(I), ZA(I)) + !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_lnd(I),ZNTstoch_lnd(I),ZA(I)) + ! use tables + psim(I)=psim_unstable(zolza)-psim_unstable(zolz0) + psih(I)=psih_unstable(zolza)-psih_unstable(zolz0) + psim10(I)=psim_unstable(zol10)-psim_unstable(zolz0) + psih10(I)=psih_unstable(zol10)-psih_unstable(zolz0) + psih2(I)=psih_unstable(zol2)-psih_unstable(zolz0) + + !---LIMIT PSIH AND PSIM IN THE CASE OF THIN LAYERS AND + !---HIGH ROUGHNESS. THIS PREVENTS DENOMINATOR IN FLUXES + !---FROM GETTING TOO SMALL + PSIH(I)=MIN(PSIH(I),0.9*GZ1OZt_lnd(I)) + PSIM(I)=MIN(PSIM(I),0.9*GZ1OZ0_lnd(I)) + PSIH2(I)=MIN(PSIH2(I),0.9*GZ2OZt_lnd(I)) + PSIM10(I)=MIN(PSIM10(I),0.9*GZ10OZ0_lnd(I)) + PSIH10(I)=MIN(PSIH10(I),0.9*GZ10OZt_lnd(I)) + + RMOL(I) = ZOL(I)/ZA(I) - ENDDO ! end ITERATION-loop + ENDIF - ENDDO ! end i-loop + ! CALCULATE THE RESISTANCE: + PSIX_lnd(I) =MAX(GZ1OZ0_lnd(I)-PSIM(I), 1.0) + PSIX10_lnd(I)=MAX(GZ10OZ0_lnd(I)-PSIM10(I), 1.0) + PSIT_lnd(I) =MAX(GZ1OZt_lnd(I)-PSIH(I) , 1.0) + PSIT2_lnd(I) =MAX(GZ2OZt_lnd(I)-PSIH2(I), 1.0) + PSIQ_lnd(I) =MAX(LOG((ZA(I)+ZQ_lnd(i))/ZQ_lnd(I))-PSIH(I) ,1.0) + PSIQ2_lnd(I) =MAX(LOG((2.0+ZQ_lnd(i))/ZQ_lnd(I))-PSIH2(I) ,1.0) - 1000 format(A,F6.1, A,f6.1, A,f5.1, A,f7.1) - 1001 format(A,F2.0, A,f10.4,A,f5.3, A,f11.5) - 1002 format(A,f7.2, A,f7.2, A,f7.2, A,f10.3) - 1003 format(A,f7.2, A,f7.2, A,f10.3,A,f10.3) - 1004 format(A,f11.3,A,f9.7, A,f9.7, A,f6.2, A,f10.3) - 1005 format(A,f9.2,A,f6.4,A,f7.4,A,f7.4) + ENDIF ! end land points - !---------------------------------------------------------- - ! COMPUTE SURFACE HEAT AND MOISTURE FLUXES - !---------------------------------------------------------- - DO I=its,ite + IF (icy(i)) THEN + IF (rb_ice(I) .GT. 0.0) THEN - !For computing the diagnostics and fluxes (below), whether the fluxes - !are turned off or on, we need the following: - PSIX(I)=GZ1OZ0(I)-PSIM(I) - PSIX10(I)=GZ10OZ0(I)-PSIM10(I) + !COMPUTE z/L first guess: + IF (itimestep .LE. 1) THEN + CALL Li_etal_2010(ZOL(I),rb_ice(I),ZA(I)/ZNTstoch_ice(I),zratio_ice(I)) + ELSE + ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ice(I)*UST_ice(I),0.0001)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),50.) + ENDIF - PSIT(I) =MAX(GZ1OZt(I)-PSIH(I), 1.0) - PSIT2(I)=MAX(GZ2OZt(I)-PSIH2(I),1.0) - PSIT10=MAX(GZ10OZ0(I)-PSIH10(I), 1.0) - - PSIQ=MAX(LOG((ZA(I)+z_q(i))/z_q(I))-PSIH(I) ,1.0) - PSIQ2=MAX(LOG((2.0+z_q(i))/z_q(I))-PSIH2(I) ,1.0) - PSIQ10=MAX(GZ10OZ0(I)-PSIH10(I),1.0) + IF (debug_code >= 1) THEN + write(0,*)"===(ice) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_ice(I)," ZNT=", ZNTstoch_ice(i)," ZT=",Zt_ice(i) + ENDIF + !Use Pedros iterative function to find z/L + zol(I)=zolri(rb_ice(I),ZA(I),ZNTstoch_ice(I),ZT_ice(I),ZOL(I)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),50.) + + zolz0 = zol(I)*ZNTstoch_ice(I)/ZA(I) ! z0/L + zolza = zol(I)*(za(I)+ZNTstoch_ice(I))/za(I) ! (z+z0/L + zol10 = zol(I)*(10.+ZNTstoch_ice(I))/za(I) ! (10+z0)/L + zol2 = zol(I)*(2.+ZNTstoch_ice(I))/za(I) ! (2+z0)/L + + !COMPUTE PSIM and PSIH + !CALL PSI_Beljaars_Holtslag_1991(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_Zilitinkevich_Esau_2007(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ice(I),ZNTstoch_ice(I),ZA(I)) + !CALL PSI_CB2005(PSIM(I),PSIH(I),zolza,zolz0) + psim(I)=psim_stable(zolza)-psim_stable(zolz0) + psih(I)=psih_stable(zolza)-psih_stable(zolz0) + psim10(I)=psim_stable(zol10)-psim_stable(zolz0) + psih10(I)=psih_stable(zol10)-psih_stable(zolz0) + psih2(I)=psih_stable(zol2)-psih_stable(zolz0) + + ! 1.0 over Monin-Obukhov length + RMOL(I)= ZOL(I)/ZA(I) + + ELSEIF(rb_ice(I) .EQ. 0.) THEN + !========================================================= + !-----CLASS 3; FORCED CONVECTION/NEUTRAL: + !========================================================= + + PSIM(I)=0.0 + PSIH(I)=PSIM(I) + PSIM10(I)=0. + PSIH10(I)=0. + PSIH2(I)=0. + + ZOL(I) =0. + RMOL(I) =0. + + ELSEIF(rb_ice(I) .LT. 0.)THEN + !========================================================== + !-----CLASS 4; FREE CONVECTION: + !========================================================== + + !COMPUTE z/L first guess: + IF (itimestep .LE. 1) THEN + CALL Li_etal_2010(ZOL(I),rb_ice(I),ZA(I)/ZNTstoch_ice(I),zratio_ice(I)) + ELSE + ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ice(I)*UST_ice(I),0.001)) + ZOL(I)=MAX(ZOL(I),-50.0) + ZOL(I)=MIN(ZOL(I),0.0) + ENDIF + + IF (debug_code >= 1) THEN + write(0,*)"===(ice) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_ice(I)," ZNT=", ZNTstoch_ice(i)," ZT=",Zt_ice(i) + ENDIF + !Use Pedros iterative function to find z/L + zol(I)=zolri(rb_ice(I),ZA(I),ZNTstoch_ice(I),ZT_ice(I),ZOL(I)) + ZOL(I)=MAX(ZOL(I),-50.0) + ZOL(I)=MIN(ZOL(I),0.0) + + zolz0 = zol(I)*ZNTstoch_ice(I)/ZA(I) ! z0/L + zolza = zol(I)*(za(I)+ZNTstoch_ice(I))/za(I) ! (z+z0/L + zol10 = zol(I)*(10.+ZNTstoch_ice(I))/za(I) ! (10+z0)/L + zol2 = zol(I)*(2.+ZNTstoch_ice(I))/za(I) ! (2+z0)/L + + !COMPUTE PSIM and PSIH + !CALL PSI_Hogstrom_1996(PSIM(I),PSIH(I),ZOL(I), ZT_ice(I), ZNTstoch_ice(I), ZA(I)) + !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) + !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ice(I),ZNTstoch_ice(I),ZA(I)) + ! use tables + psim(I)=psim_unstable(zolza)-psim_unstable(zolz0) + psih(I)=psih_unstable(zolza)-psih_unstable(zolz0) + psim10(I)=psim_unstable(zol10)-psim_unstable(zolz0) + psih10(I)=psih_unstable(zol10)-psih_unstable(zolz0) + psih2(I)=psih_unstable(zol2)-psih_unstable(zolz0) + + !---LIMIT PSIH AND PSIM IN THE CASE OF THIN LAYERS AND + !---HIGH ROUGHNESS. THIS PREVENTS DENOMINATOR IN FLUXES + !---FROM GETTING TOO SMALL + PSIH(I)=MIN(PSIH(I),0.9*GZ1OZt_ice(I)) + PSIM(I)=MIN(PSIM(I),0.9*GZ1OZ0_ice(I)) + PSIH2(I)=MIN(PSIH2(I),0.9*GZ2OZt_ice(I)) + PSIM10(I)=MIN(PSIM10(I),0.9*GZ10OZ0_ice(I)) + PSIH10(I)=MIN(PSIH10(I),0.9*GZ10OZt_ice(I)) + + RMOL(I) = ZOL(I)/ZA(I) + + ENDIF + + ! CALCULATE THE RESISTANCE: + PSIX_ice(I) =MAX(GZ1OZ0_ice(I)-PSIM(I) , 1.0) + PSIX10_ice(I)=MAX(GZ10OZ0_ice(I)-PSIM10(I), 1.0) + PSIT_ice(I) =MAX(GZ1OZt_ice(I)-PSIH(I) , 1.0) + PSIT2_ice(I) =MAX(GZ2OZt_ice(I)-PSIH2(I) , 1.0) + PSIQ_ice(I) =MAX(LOG((ZA(I)+ZQ_ice(i))/ZQ_ice(I))-PSIH(I) ,1.0) + PSIQ2_ice(I) =MAX(LOG((2.0+ZQ_ice(i))/ZQ_ice(I))-PSIH2(I) ,1.0) + + ENDIF ! end ice points + + !------------------------------------------------------------ + !-----COMPUTE THE FRICTIONAL VELOCITY: + !------------------------------------------------------------ + + IF (wet(I)) THEN + ! TO PREVENT OSCILLATIONS AVERAGE WITH OLD VALUE + OLDUST = UST_ocn(I) + UST_ocn(I)=0.5*UST_ocn(I)+0.5*KARMAN*WSPD(I)/PSIX_ocn(I) + !NON-AVERAGED: + !UST_ocn(I)=KARMAN*WSPD(I)/PSIX_ocn(I) + stress_ocn(i)=ust_ocn(i)**2 + + ! Compute u* without vconv for use in HFX calc when isftcflx > 0 + WSPDI(I)=MAX(SQRT(U1D(I)*U1D(I)+V1D(I)*V1D(I)), wmin) + USTM(I)=0.5*USTM(I)+0.5*KARMAN*WSPDI(I)/PSIX_ocn(I) + + ENDIF ! end water points + + IF (dry(I)) THEN + ! TO PREVENT OSCILLATIONS AVERAGE WITH OLD VALUE + OLDUST = UST_lnd(I) + UST_lnd(I)=0.5*UST_lnd(I)+0.5*KARMAN*WSPD(I)/PSIX_lnd(I) + !NON-AVERAGED: + !UST_lnd(I)=KARMAN*WSPD(I)/PSIX_lnd(I) + !From Tilden Meyers: + !IF (rb_lnd(I) .GE 0.0) THEN + ! ust_lnd(i)=WSPD_lnd*0.1/(1.0 + 10.0*rb_lnd(I)) + !ELSE + ! ust_lnd(i)=WSPD_lnd*0.1*(1.0 - 10.0*rb_lnd(I))**onethird + !ENDIF + UST_lnd(I)=MAX(UST_lnd(I),0.005) + stress_lnd(i)=ust_lnd(i)**2 + + !set ustm = ust over land. + USTM(I)=UST_lnd(I) + ENDIF ! end water points + + IF (icy(I)) THEN + ! TO PREVENT OSCILLATIONS AVERAGE WITH OLD VALUE + OLDUST = UST_ice(I) + UST_ice(I)=0.5*UST_ice(I)+0.5*KARMAN*WSPD(I)/PSIX_ice(I) + !NON-AVERAGED: + !UST_ice(I)=KARMAN*WSPD(I)/PSIX_ice(I) + UST_ice(I)=MAX(UST_ice(I),0.005) + stress_ice(i)=ust_ice(i)**2 + + !Set ustm = ust over ice. + USTM(I)=UST_ice(I) + ENDIF ! end ice points + + !---------------------------------------------------- + !----COMPUTE THE TEMPERATURE SCALE (a.k.a. FRICTION TEMPERATURE, T*, or MOL) + !----AND COMPUTE THE MOISTURE SCALE (or q*) + !---------------------------------------------------- + + IF (wet(I)) THEN + DTG=THV1D(I)-THVSK_ocn(I) + OLDTST=MOL(I) + MOL(I)=KARMAN*DTG/PSIT_ocn(I)/PRT + !t_star(I) = -HFX(I)/(UST(I)*CPM(I)*RHO1D(I)) + !t_star(I) = MOL(I) + !---------------------------------------------------- + DQG=(QVSH(i)-qsfc_ocn(i))*1000. !(kg/kg -> g/kg) + qstar(I)=KARMAN*DQG/PSIQ_ocn(I)/PRT + ENDIF + + IF (dry(I)) THEN + DTG=THV1D(I)-THVSK_lnd(I) + OLDTST=MOL(I) + MOL(I)=KARMAN*DTG/PSIT_lnd(I)/PRT + !t_star(I) = -HFX(I)/(UST(I)*CPM(I)*RHO1D(I)) + !t_star(I) = MOL(I) + !---------------------------------------------------- + DQG=(QVSH(i)-qsfc_lnd(i))*1000. !(kg/kg -> g/kg) + qstar(I)=KARMAN*DQG/PSIQ_lnd(I)/PRT + ENDIF + + IF (icy(I)) THEN + DTG=THV1D(I)-THVSK_ice(I) + OLDTST=MOL(I) + MOL(I)=KARMAN*DTG/PSIT_ice(I)/PRT + !t_star(I) = -HFX(I)/(UST(I)*CPM(I)*RHO1D(I)) + !t_star(I) = MOL(I) + !---------------------------------------------------- + DQG=(QVSH(i)-qsfc_ice(i))*1000. !(kg/kg -> g/kg) + qstar(I)=KARMAN*DQG/PSIQ_ice(I)/PRT + ENDIF + + ENDDO ! end i-loop + + IF (debug_code == 2) THEN + DO I=its,ite + IF(wet(i))write(*,*)"==== AT END OF ITER LOOP, i=",i, "(wet)" + IF(dry(i))write(*,*)"==== AT END OF ITER LOOP, i=",i, "(land)" + IF(icy(i))write(*,*)"==== AT END OF ITER LOOP, i=",i, "(ice)" + write(*,*)"z/L:",ZOL(I)," wspd:",wspd(I)," Tstar:",MOL(I) + IF(wet(i))write(*,*)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& + " DTHV:",THV1D(I)-THVSK_ocn(I) + IF(dry(i))write(*,*)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& + " DTHV:",THV1D(I)-THVSK_lnd(I) + IF(icy(i))write(*,*)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& + " DTHV:",THV1D(I)-THVSK_ice(i) + write(*,*)"CPM:",CPM(I)," RHO1D:",RHO1D(I)," q*:",qstar(I)," T*:",MOL(I) + IF(wet(i))write(*,*)"U*:",UST_ocn(I)," Z0:",ZNTstoch_ocn(I)," Zt:",zt_ocn(I) + IF(dry(i))write(*,*)"U*:",UST_lnd(I)," Z0:",ZNTstoch_lnd(I)," Zt:",zt_lnd(I) + IF(icy(i))write(*,*)"U*:",UST_ice(I)," Z0:",ZNTstoch_ice(I)," Zt:",zt_ice(I) + write(*,*)"hfx:",HFX(I)," MAVAIL:",MAVAIL(I)," QVSH(I):",QVSH(I) + write(*,*)"=============================================" + ENDDO ! end i-loop + ENDIF + + !---------------------------------------------------------- + ! COMPUTE SURFACE HEAT AND MOISTURE FLUXES + !---------------------------------------------------------- + DO I=its,ite - IF (ISFFLX .LT. 1) THEN + IF (ISFFLX .LT. 1) THEN QFX(i) = 0. - HFX(i) = 0. + HFX(i) = 0. + HFLX(i) = 0. FLHC(I) = 0. FLQC(I) = 0. LH(I) = 0. CHS(I) = 0. CH(I) = 0. CHS2(i) = 0. - CQS2(i) = 0. - IF(PRESENT(ck) .and. PRESENT(cd) .and. & - &PRESENT(cka) .and. PRESENT(cda)) THEN - Ck(I) = 0. - Cd(I) = 0. - Cka(I)= 0. - Cda(I)= 0. - ENDIF - ELSE + CQS2(i) = 0. + ch_ocn(I)= 0. + cm_ocn(I)= 0. + ch_lnd(I)= 0. + cm_lnd(I)= 0. + ch_ice(I)= 0. + cm_ice(I)= 0. - IF((XLAND(I)-1.5).LT.0)THEN !LAND Only - IF ( IZ0TLND .EQ. 4 ) THEN - CALL Pan_etal_1994(PSIQ,PSIQ2,UST(I),PSIH(I),PSIH2(I),& - & KARMAN,ZA(I)) - ENDIF - ENDIF + ELSE - !------------------------------------------ - ! CALCULATE THE EXCHANGE COEFFICIENTS FOR HEAT (FLHC) - ! AND MOISTURE (FLQC) - !------------------------------------------ - FLQC(I)=RHO1D(I)*MAVAIL(I)*UST(I)*KARMAN/PSIQ - FLHC(I)=RHO1D(I)*CPM(I)*UST(I)*KARMAN/PSIT(I) - !OLD WAY: - !DTTHX=ABS(TH1D(I)-THGB(I)) - !IF(DTTHX.GT.1.E-5)THEN - ! FLHC(I)=CPM(I)*RHO1D(I)*UST(I)*MOL(I)/(TH1D(I)-THGB(I)) - !ELSE - ! FLHC(I)=0. - !ENDIF - - !---------------------------------- - ! COMPUTE SURFACE MOISTURE FLUX: - !---------------------------------- - QFX(I)=FLQC(I)*(QSFCMR(I)-QV1D(I)) - !JOE: QFX(I)=MAX(QFX(I),0.) !originally did not allow neg QFX - QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX, like MYJ - LH(I)=XLV*QFX(I) - - !---------------------------------- - ! COMPUTE SURFACE HEAT FLUX: - !---------------------------------- - IF(XLAND(I)-1.5.GT.0.)THEN !WATER - HFX(I)=FLHC(I)*(THGB(I)-TH1D(I)) + IF (dry(i)) THEN + + !------------------------------------------ + ! CALCULATE THE EXCHANGE COEFFICIENTS FOR HEAT (FLHC) + ! AND MOISTURE (FLQC) + !------------------------------------------ + FLQC(I)=RHO1D(I)*MAVAIL(I)*UST_lnd(I)*KARMAN/PSIQ_lnd(i) + FLHC(I)=RHO1D(I)*CPM(I)*UST_lnd(I)*KARMAN/PSIT_lnd(I) + + !---------------------------------- + ! COMPUTE SURFACE MOISTURE FLUX: + !---------------------------------- + QFX(I)=FLQC(I)*(QSFCMR_lnd(I)-QV1D(I)) + QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX + LH(I)=XLV*QFX(I) + + !---------------------------------- + ! COMPUTE SURFACE HEAT FLUX: + !---------------------------------- + HFX(I)=FLHC(I)*(THSK_lnd(I)-TH1D(I)) + HFX(I)=MAX(HFX(I),-250.) + HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + + !TRANSFER COEFF FOR SOME LSMs: + !CHS(I)=UST(I)*KARMAN/(ALOG(KARMAN*UST(I)*ZA(I) & + ! /XKA+ZA(I)/ZL)-PSIH(I)) + CHS(I)=UST_lnd(I)*KARMAN/PSIT_lnd(I) + + !THESE ARE USED FOR 2-M DIAGNOSTICS ONLY + CQS2(I)=UST_lnd(I)*KARMAN/PSIQ2_lnd(i) + CHS2(I)=UST_lnd(I)*KARMAN/PSIT2_lnd(I) + + ELSEIF (wet(i)) THEN + + !------------------------------------------ + ! CALCULATE THE EXCHANGE COEFFICIENTS FOR HEAT (FLHC) + ! AND MOISTURE (FLQC) + !------------------------------------------ + FLQC(I)=RHO1D(I)*MAVAIL(I)*UST_ocn(I)*KARMAN/PSIQ_ocn(i) + FLHC(I)=RHO1D(I)*CPM(I)*UST_ocn(I)*KARMAN/PSIT_ocn(I) + + !---------------------------------- + ! COMPUTE SURFACE MOISTURE FLUX: + !---------------------------------- + QFX(I)=FLQC(I)*(QSFCMR_ocn(I)-QV1D(I)) + QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX + LH(I)=XLV*QFX(I) + + !---------------------------------- + ! COMPUTE SURFACE HEAT FLUX: + !---------------------------------- + HFX(I)=FLHC(I)*(THSK_ocn(I)-TH1D(I)) IF ( PRESENT(ISFTCFLX) ) THEN IF ( ISFTCFLX.NE.0 ) THEN ! AHW: add dissipative heating term HFX(I)=HFX(I)+RHO1D(I)*USTM(I)*USTM(I)*WSPDI(I) ENDIF ENDIF - ELSEIF(XLAND(I)-1.5.LT.0.)THEN !LAND - HFX(I)=FLHC(I)*(THGB(I)-TH1D(I)) - HFX(I)=MAX(HFX(I),-250.) - ENDIF + HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + + !TRANSFER COEFF FOR SOME LSMs: + !CHS(I)=UST(I)*KARMAN/(ALOG(KARMAN*UST(I)*ZA(I) & + ! /XKA+ZA(I)/ZL)-PSIH(I)) + CHS(I)=UST_ocn(I)*KARMAN/PSIT_ocn(I) + + !THESE ARE USED FOR 2-M DIAGNOSTICS ONLY + CQS2(I)=UST_ocn(I)*KARMAN/PSIQ2_ocn(i) + CHS2(I)=UST_ocn(I)*KARMAN/PSIT2_ocn(I) + + ELSEIF (icy(i)) THEN + + !------------------------------------------ + ! CALCULATE THE EXCHANGE COEFFICIENTS FOR HEAT (FLHC) + ! AND MOISTURE (FLQC) + !------------------------------------------ + FLQC(I)=RHO1D(I)*MAVAIL(I)*UST_ice(I)*KARMAN/PSIQ_ice(i) + FLHC(I)=RHO1D(I)*CPM(I)*UST_ice(I)*KARMAN/PSIT_ice(I) + + !---------------------------------- + ! COMPUTE SURFACE MOISTURE FLUX: + !---------------------------------- + QFX(I)=FLQC(I)*(QSFCMR_ice(I)-QV1D(I)) + QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX + LH(I)=XLV*QFX(I) + + !---------------------------------- + ! COMPUTE SURFACE HEAT FLUX: + !---------------------------------- + HFX(I)=FLHC(I)*(THSK_ice(I)-TH1D(I)) + HFX(I)=MAX(HFX(I),-250.) + HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + + !TRANSFER COEFF FOR SOME LSMs: + !CHS(I)=UST(I)*KARMAN/(ALOG(KARMAN*UST(I)*ZA(I) & + ! /XKA+ZA(I)/ZL)-PSIH(I)) + CHS(I)=UST_ice(I)*KARMAN/PSIT_ice(I) + + !THESE ARE USED FOR 2-M DIAGNOSTICS ONLY + CQS2(I)=UST_ice(I)*KARMAN/PSIQ2_ice(i) + CHS2(I)=UST_ice(I)*KARMAN/PSIT2_ice(I) - !CHS(I)=UST(I)*KARMAN/(ALOG(KARMAN*UST(I)*ZA(I) & - ! /XKA+ZA(I)/ZL)-PSIH(I)) + ENDIF - CHS(I)=UST(I)*KARMAN/PSIT(I) + IF (debug_code >= 1) THEN + write(*,*)"QFX=",QFX(I),"FLQC=",FLQC(I) + if(icy(i))write(*,*)"ice, MAVAIL:",MAVAIL(I)," u*=",UST_ice(I)," psiq=",PSIQ_ice(i) + if(dry(i))write(*,*)"lnd, MAVAIL:",MAVAIL(I)," u*=",UST_lnd(I)," psiq=",PSIQ_lnd(i) + if(wet(i))write(*,*)"ocn, MAVAIL:",MAVAIL(I)," u*=",UST_ocn(I)," psiq=",PSIQ_ocn(i) + ENDIF ! The exchange coefficient for cloud water is assumed to be the ! same as that for heat. CH is multiplied by WSPD. - - !ch(i)=chs(i) ch(i)=flhc(i)/( cpm(i)*RHO1D(i) ) - !THESE ARE USED FOR 2-M DIAGNOSTICS ONLY - CQS2(I)=UST(I)*KARMAN/PSIQ2 - CHS2(I)=UST(I)*KARMAN/PSIT2(I) - - IF(PRESENT(ck) .and. PRESENT(cd) .and. & - &PRESENT(cka) .and. PRESENT(cda)) THEN - Ck(I)=(karman/psix10(I))*(karman/psiq10) - Cd(I)=(karman/psix10(I))*(karman/psix10(I)) - Cka(I)=(karman/psix(I))*(karman/psiq) - Cda(I)=(karman/psix(I))*(karman/psix(I)) + !----------------------------------------- + !--- COMPUTE EXCHANGE COEFFICIENTS FOR FV3 + !----------------------------------------- + IF (wet(i)) THEN + ch_ocn(I)=(karman/psix_ocn(I))*(karman/psit_ocn(i)) + cm_ocn(I)=(karman/psix_ocn(I))*(karman/psix_ocn(I)) + ENDIF + IF (dry(i)) THEN + ch_lnd(I)=(karman/psix_lnd(I))*(karman/psit_lnd(i)) + cm_lnd(I)=(karman/psix_lnd(I))*(karman/psix_lnd(I)) + ENDIF + IF (icy(i)) THEN + ch_ice(I)=(karman/psix_ice(I))*(karman/psit_ice(i)) + cm_ice(I)=(karman/psix_ice(I))*(karman/psix_ice(I)) ENDIF ENDIF !end ISFFLX option - - !----------------------------------------------------- - !COMPUTE DIAGNOSTICS - !----------------------------------------------------- - !COMPUTE 10 M WNDS - !----------------------------------------------------- - ! If the lowest model level is close to 10-m, use it - ! instead of the flux-based diagnostic formula. - if (ZA(i) .le. 7.0) then - ! high vertical resolution - if(ZA2(i) .gt. 7.0 .and. ZA2(i) .lt. 13.0) then - !use 2nd model level - U10(I)=U1D2(I) - V10(I)=V1D2(I) +ENDDO ! end i-loop + +IF (compute_diag) then + DO I=its,ite + !----------------------------------------------------- + !COMPUTE DIAGNOSTICS + !----------------------------------------------------- + !COMPUTE 10 M WNDS + !----------------------------------------------------- + ! If the lowest model level is close to 10-m, use it + ! instead of the flux-based diagnostic formula. + if (ZA(i) .le. 7.0) then + ! high vertical resolution + if(ZA2(i) .gt. 7.0 .and. ZA2(i) .lt. 13.0) then + !use 2nd model level + U10(I)=U1D2(I) + V10(I)=V1D2(I) + else + IF (dry(i)) THEN + !U10(I)=U1D(I)*PSIX10_lnd(I)/PSIX_lnd(I) + !V10(I)=V1D(I)*PSIX10_lnd(I)/PSIX_lnd(I) + !use neutral-log: + U10(I)=U1D(I)*log(10./ZNTstoch_lnd(I))/log(ZA(I)/ZNTstoch_lnd(I)) + V10(I)=V1D(I)*log(10./ZNTstoch_lnd(I))/log(ZA(I)/ZNTstoch_lnd(I)) + ELSEIF (wet(i)) THEN + U10(I)=U1D(I)*log(10./ZNTstoch_ocn(I))/log(ZA(I)/ZNTstoch_ocn(I)) + V10(I)=V1D(I)*log(10./ZNTstoch_ocn(I))/log(ZA(I)/ZNTstoch_ocn(I)) + ELSEIF (icy(i)) THEN + U10(I)=U1D(I)*log(10./ZNTstoch_ice(I))/log(ZA(I)/ZNTstoch_ice(I)) + V10(I)=V1D(I)*log(10./ZNTstoch_ice(I))/log(ZA(I)/ZNTstoch_ice(I)) + ENDIF + endif + elseif (ZA(i) .gt. 7.0 .and. ZA(i) .lt. 13.0) then + !moderate vertical resolution + IF (dry(i)) THEN + !U10(I)=U1D(I)*PSIX10_lnd(I)/PSIX_lnd(I) + !V10(I)=V1D(I)*PSIX10_lnd(I)/PSIX_lnd(I) + !use neutral-log: + U10(I)=U1D(I)*log(10./ZNTstoch_lnd(I))/log(ZA(I)/ZNTstoch_lnd(I)) + V10(I)=V1D(I)*log(10./ZNTstoch_lnd(I))/log(ZA(I)/ZNTstoch_lnd(I)) + ELSEIF (wet(i)) THEN + U10(I)=U1D(I)*log(10./ZNTstoch_ocn(I))/log(ZA(I)/ZNTstoch_ocn(I)) + V10(I)=V1D(I)*log(10./ZNTstoch_ocn(I))/log(ZA(I)/ZNTstoch_ocn(I)) + ELSEIF (icy(i)) THEN + U10(I)=U1D(I)*log(10./ZNTstoch_ice(I))/log(ZA(I)/ZNTstoch_ice(I)) + V10(I)=V1D(I)*log(10./ZNTstoch_ice(I))/log(ZA(I)/ZNTstoch_ice(I)) + ENDIF else - U10(I)=U1D(I)*log(10./ZNTstoch(I))/log(ZA(I)/ZNTstoch(I)) - V10(I)=V1D(I)*log(10./ZNTstoch(I))/log(ZA(I)/ZNTstoch(I)) + ! very coarse vertical resolution + IF (dry(i)) THEN + U10(I)=U1D(I)*PSIX10_lnd(I)/PSIX_lnd(I) + V10(I)=V1D(I)*PSIX10_lnd(I)/PSIX_lnd(I) + ELSEIF (wet(i)) THEN + U10(I)=U1D(I)*PSIX10_ocn(I)/PSIX_ocn(I) + V10(I)=V1D(I)*PSIX10_ocn(I)/PSIX_ocn(I) + ELSEIF (icy(i)) THEN + U10(I)=U1D(I)*PSIX10_ice(I)/PSIX_ice(I) + V10(I)=V1D(I)*PSIX10_ice(I)/PSIX_ice(I) + ENDIF endif - elseif(ZA(i) .gt. 7.0 .and. ZA(i) .lt. 13.0) then - !moderate vertical resolution - !U10(I)=U1D(I)*PSIX10(I)/PSIX(I) - !V10(I)=V1D(I)*PSIX10(I)/PSIX(I) - !use neutral-log: - U10(I)=U1D(I)*log(10./ZNTstoch(I))/log(ZA(I)/ZNTstoch(I)) - V10(I)=V1D(I)*log(10./ZNTstoch(I))/log(ZA(I)/ZNTstoch(I)) - else - ! very coarse vertical resolution - U10(I)=U1D(I)*PSIX10(I)/PSIX(I) - V10(I)=V1D(I)*PSIX10(I)/PSIX(I) - endif - - !----------------------------------------------------- - !COMPUTE 2m T, TH, AND Q - !THESE WILL BE OVERWRITTEN FOR LAND POINTS IN THE LSM - !----------------------------------------------------- - DTG=TH1D(I)-THGB(I) - TH2(I)=THGB(I)+DTG*PSIT2(I)/PSIT(I) - !*** BE CERTAIN THAT THE 2-M THETA IS BRACKETED BY - !*** THE VALUES AT THE SURFACE AND LOWEST MODEL LEVEL. - IF ((TH1D(I)>THGB(I) .AND. (TH2(I)TH1D(I))) .OR. & - (TH1D(I)THGB(I) .OR. TH2(I)QSFCMR(I) .AND. (Q2(I)QV1D(I))) .OR. & - (QV1D(I)QSFCMR(I) .OR. Q2(I)THSK_lnd(I) .AND. (TH2(I)TH1D(I))) .OR. & + (TH1D(I)THSK_lnd(I) .OR. TH2(I)THSK_ocn(I) .AND. (TH2(I)TH1D(I))) .OR. & + (TH1D(I)THSK_ocn(I) .OR. TH2(I)THSK_ice(I) .AND. (TH2(I)TH1D(I))) .OR. & + (TH1D(I)THSK_ice(I) .OR. TH2(I) 1200. .OR. HFX(I) < -700.)THEN print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& - ITER-ITMAX," ITERATIONS",I,J, "HFX: ",HFX(I) + I,J, "HFX: ",HFX(I) yesno = 1 ENDIF IF (LH(I) > 1200. .OR. LH(I) < -700.)THEN print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& - ITER-ITMAX," ITERATIONS",I,J, "LH: ",LH(I) + I,J, "LH: ",LH(I) + yesno = 1 + ENDIF + IF (wet(i)) THEN + IF (UST_ocn(I) < 0.0 .OR. UST_ocn(I) > 4.0 )THEN + print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& + I,J, "UST_ocn: ",UST_ocn(I) + yesno = 1 + ENDIF + ENDIF + IF (dry(i)) THEN + IF (UST_lnd(I) < 0.0 .OR. UST_lnd(I) > 4.0 )THEN + print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& + I,J, "UST_lnd: ",UST_lnd(I) yesno = 1 + ENDIF ENDIF - IF (UST(I) < 0.0 .OR. UST(I) > 4.0 )THEN - print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& - ITER-ITMAX," ITERATIONS",I,J, "UST: ",UST(I) + IF (icy(i)) THEN + IF (UST_ice(I) < 0.0 .OR. UST_ice(I) > 4.0 )THEN + print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& + I,J, "UST_ice: ",UST_ice(I) yesno = 1 + ENDIF ENDIF IF (WSTAR(I)<0.0 .OR. WSTAR(I) > 6.0)THEN print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& - ITER-ITMAX," ITERATIONS",I,J, "WSTAR: ",WSTAR(I) + I,J, "WSTAR: ",WSTAR(I) yesno = 1 ENDIF IF (RHO1D(I)<0.0 .OR. RHO1D(I) > 1.6 )THEN print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& - ITER-ITMAX," ITERATIONS",I,J, "rho: ",RHO1D(I) + I,J, "rho: ",RHO1D(I) yesno = 1 ENDIF - IF (QSFC(I)*1000. <0.0 .OR. QSFC(I)*1000. >40.)THEN + IF (dry(i)) THEN + IF (QSFC_lnd(I)*1000. <0.0 .OR. QSFC_lnd(I)*1000. >40.)THEN print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& - ITER-ITMAX," ITERATIONS",I,J, "QSFC: ",QSFC(I) + I,J, "QSFC_lnd: ",QSFC_lnd(I) yesno = 1 + ENDIF ENDIF IF (PBLH(I)<0. .OR. PBLH(I)>6000.)THEN - print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& - ITER-ITMAX," ITERATIONS",I,J, "PBLH: ",PBLH(I) + print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& + I,J, "PBLH: ",PBLH(I) yesno = 1 ENDIF IF (yesno == 1) THEN - print*," OTHER INFO:" - write(*,1001)"REGIME:",REGIME(I)," z/L:",ZOL(I)," U*:",UST(I),& + IF (wet(i)) THEN + print*," OTHER INFO over water:" + print*,"z/L:",ZOL(I)," U*:",UST_ocn(I)," Tstar:",MOL(I) + print*,"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& + " DTHV:",THV1D(I)-THVSK_ocn(I) + print*,"CPM:",CPM(I)," RHO1D:",RHO1D(I)," L:",& + ZOL(I)/ZA(I)," DTH:",TH1D(I)-THSK_ocn(I) + print*," Z0:",ZNTstoch_ocn(I)," Zt:",ZT_ocn(I)," za:",za(I) + print*,"MAVAIL:",MAVAIL(I)," QSFC_ocn(I):",& + QSFC_ocn(I)," QVSH(I):",QVSH(I) + print*,"PSIX=",PSIX_ocn(I)," T1D(i):",T1D(i) + write(*,*)"=============================================" + ENDIF + IF (dry(i)) THEN + print*," OTHER INFO over land:" + print*,"z/L:",ZOL(I)," U*:",UST_lnd(I),& " Tstar:",MOL(I) - write(*,1002)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& - " DTHV:",THV1D(I)-THVGB(I) - write(*,1003)"CPM:",CPM(I)," RHO1D:",RHO1D(I)," L:",& - ZOL(I)/ZA(I)," DTH:",TH1D(I)-THGB(I) - write(*,1004)"Z0/Zt:",zratio(I)," Z0:",ZNTstoch(I)," Zt:",z_t(I),& - " za:",za(I) - write(*,1005)"Re:",restar," MAVAIL:",MAVAIL(I)," QSFC(I):",& - QSFC(I)," QVSH(I):",QVSH(I) - print*,"PSIX=",PSIX(I)," Z0:",ZNTstoch(I)," T1D(i):",T1D(i) - write(*,*)"=============================================" + print*,"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& + " DTHV:",THV1D(I)-THVSK_lnd(I) + print*,"CPM:",CPM(I)," RHO1D:",RHO1D(I)," L:",& + ZOL(I)/ZA(I)," DTH:",TH1D(I)-THSK_lnd(I) + print*," Z0:",ZNTstoch_lnd(I)," Zt:",ZT_lnd(I)," za:",za(I) + print*," MAVAIL:",MAVAIL(I)," QSFC_lnd(I):",& + QSFC_lnd(I)," QVSH(I):",QVSH(I) + print*,"PSIX=",PSIX_lnd(I)," T1D(i):",T1D(i) + write(*,*)"=============================================" + ENDIF + IF (icy(i)) THEN + print*," OTHER INFO:" + print*,"z/L:",ZOL(I)," U*:",UST_ice(I),& + " Tstar:",MOL(I) + print*,"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& + " DTHV:",THV1D(I)-THVSK_ice(I) + print*,"CPM:",CPM(I)," RHO1D:",RHO1D(I)," L:",& + ZOL(I)/ZA(I)," DTH:",TH1D(I)-THSK_ice(I) + print*," Z0:",ZNTstoch_ice(I)," Zt:",ZT_ice(I)," za:",za(I) + print*," MAVAIL:",MAVAIL(I)," QSFC_ice(I):",& + QSFC_ice(I)," QVSH(I):",QVSH(I) + print*,"PSIX=",PSIX_ice(I)," T1D(i):",T1D(i) + write(*,*)"=============================================" + ENDIF ENDIF - ENDIF - - ENDDO !end i-loop + ENDDO ! end i-loop + ENDIF ! end debug option END SUBROUTINE SFCLAY1D_mynn !------------------------------------------------------------------- @@ -1411,23 +2031,20 @@ SUBROUTINE zilitinkevich_1995(Z_0,Zt,Zq,restar,ustar,KARMAN,& IF ( IZ0TLND2 .EQ. 1 ) THEN CZIL = 10.0 ** ( -0.40 * ( Z_0 / 0.07 ) ) ELSE - CZIL = 0.075 !0.10 + CZIL = 0.085 !0.075 !0.10 END IF Zt = Z_0*EXP(-KARMAN*CZIL*SQRT(restar)) - Zt = MIN( Zt, Z_0/2.) + Zt = MIN( Zt, 0.75*Z_0) Zq = Z_0*EXP(-KARMAN*CZIL*SQRT(restar)) - Zq = MIN( Zq, Z_0/2.) + Zq = MIN( Zq, 0.75*Z_0) -! perturb thermal and moisture roughness lenth by +/-50% -! uses same perturbation pattern for perturbing cloud fraction -! and turbulent mixing length (module_sf_mynn.F), but -! twice the amplitude; -! multiplication with -1.0 anticorrelates patterns +! stochastically perturb thermal and moisture roughness length. +! currently set to half the amplitude: if (spp_pbl==1) then - Zt = Zt + Zt * 2.0 * rstoch - Zt = MAX(Zt, 0.001) + Zt = Zt + Zt * 0.5 * rstoch + Zt = MAX(Zt, 0.0001) Zq = Zt endif @@ -1437,60 +2054,26 @@ SUBROUTINE zilitinkevich_1995(Z_0,Zt,Zq,restar,ustar,KARMAN,& END SUBROUTINE zilitinkevich_1995 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod -!! This subroutine returns the resistance (PSIQ) for moisture -!! exchange. This is a modified form originating from Pan et al.. -!! (1994) but modified according to tests in both the RUC model. -!! and WRF-ARW. Note that it is very similar to Carlson and -!! Boland (1978) model (include below in comments) but has an -!! extra molecular layer (a third layer) instead of two layers. - SUBROUTINE Pan_etal_1994(PSIQ,PSIQ2,ustar,psih,psih2,KARMAN,Z1) - - IMPLICIT NONE - REAL, INTENT(IN) :: Z1,ustar,KARMAN,psih,psih2 - REAL, INTENT(OUT) :: psiq,psiq2 - REAL, PARAMETER :: Cpan=1.0 !was 20.8 in Pan et al 1994 - REAL, PARAMETER :: ZL=0.01 - REAL, PARAMETER :: ZMUs=0.2E-3 - REAL, PARAMETER :: XKA = 2.4E-5 - - !PAN et al. (1994): 3-layer model, as in paper: - !ZMU = Cpan*XKA/(KARMAN*UST(I)) - !PSIQ =MAX(KARMAN*ustar*ZMU/XKA + LOG((KARMAN*ustar*ZL + XKA)/XKA + & - ! & Z1/ZL) - PSIH,2.0) - !PSIQ2=MAX(KARMAN*ustar*ZMU/XKA + LOG((KARMAN*ustar*ZL + XKA)/XKA + & - ! & 2./ZL) - PSIH2,2.0) - !MODIFIED FORM: - PSIQ =MAX(KARMAN*ustar*ZMUs/XKA + LOG((KARMAN*ustar*Z1)/XKA + & - & Z1/ZL) - PSIH,2.0) - PSIQ2=MAX(KARMAN*ustar*ZMUs/XKA + LOG((KARMAN*ustar*2.0)/XKA + & - & 2./ZL) - PSIH2,2.0) - - !CARLSON AND BOLAND (1978): 2-layer model - !PSIQ =MAX(LOG(KARMAN*ustar*Z1/XKA + Z1/ZL)-PSIH ,2.0) - !PSIQ2=MAX(LOG(KARMAN*ustar*2./XKA + 2./ZL)-PSIH2 ,2.0) - - END SUBROUTINE Pan_etal_1994 -!-------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod -!! This formulation for roughness length was designed to match. -!! the labratory experiments of Donelan et al. (2004). -!! This is an update version from Davis et al. 2008, which -!! corrects a small-bias in Z_0 (AHW real-time 2012). SUBROUTINE davis_etal_2008(Z_0,ustar) + !a.k.a. : Donelan et al. (2004) + !This formulation for roughness length was designed to match + !the labratory experiments of Donelan et al. (2004). + !This is an update version from Davis et al. 2008, which + !corrects a small-bias in Z_0 (AHW real-time 2012). + IMPLICIT NONE REAL, INTENT(IN) :: ustar REAL, INTENT(OUT) :: Z_0 REAL :: ZW, ZN1, ZN2 REAL, PARAMETER :: G=9.81, OZO=1.59E-5 - !OLD FORM: Z_0 = 10.*EXP(-10./(ustar**(1./3.))) + !OLD FORM: Z_0 = 10.*EXP(-10./(ustar**onethird)) !NEW FORM: ZW = MIN((ustar/1.06)**(0.3),1.0) ZN1 = 0.011*ustar*ustar/G + OZO - ZN2 = 10.*exp(-9.5*ustar**(-.3333)) + & + ZN2 = 10.*exp(-9.5*ustar**(-onethird)) + & 0.11*1.5E-5/AMAX1(ustar,0.01) Z_0 = (1.0-ZW) * ZN1 + ZW * ZN2 @@ -1623,11 +2206,12 @@ END SUBROUTINE garratt_1992 !!(1992, p. 102), is available for flows with Ren < 2. !! !!This is for use over water only. - SUBROUTINE fairall_etal_2003(Zt,Zq,Ren,ustar,visc) + SUBROUTINE fairall_etal_2003(Zt,Zq,Ren,ustar,visc,rstoch,spp_pbl) IMPLICIT NONE - REAL, INTENT(IN) :: Ren,ustar,visc - REAL, INTENT(OUT) :: Zt,Zq + REAL, INTENT(IN) :: Ren,ustar,visc,rstoch + INTEGER, INTENT(IN):: spp_pbl + REAL, INTENT(OUT) :: Zt,Zq IF (Ren .le. 2.) then @@ -1645,6 +2229,11 @@ SUBROUTINE fairall_etal_2003(Zt,Zq,Ren,ustar,visc) ENDIF + if (spp_pbl==1) then + Zt = Zt + Zt * 0.5 * rstoch + Zq = Zt + endif + Zt = MIN(Zt,1.0e-4) Zt = MAX(Zt,2.0e-9) @@ -1673,8 +2262,8 @@ SUBROUTINE fairall_etal_2014(Zt,Zq,Ren,ustar,visc,rstoch,spp_pbl) Zq = Zt IF (spp_pbl ==1) THEN - Zt = MAX(Zt + Zt*2.0*rstoch,2.0e-9) - Zq = MAX(Zt + Zt*2.0*rstoch,2.0e-9) + Zt = MAX(Zt + Zt*0.5*rstoch,2.0e-9) + Zq = MAX(Zt + Zt*0.5*rstoch,2.0e-9) ELSE Zt = MAX(Zt,2.0e-9) Zq = MAX(Zt,2.0e-9) @@ -1708,10 +2297,10 @@ END SUBROUTINE fairall_etal_2014 !!Zt was reduced too much for low-moderate positive heat fluxes. !! !!This should only be used over land! - SUBROUTINE Yang_2008(Z_0,Zt,Zq,ustar,tstar,qst,Ren,visc,landsea) + SUBROUTINE Yang_2008(Z_0,Zt,Zq,ustar,tstar,qst,Ren,visc) IMPLICIT NONE - REAL, INTENT(IN) :: Z_0, Ren, ustar, tstar, qst, visc, landsea + REAL, INTENT(IN) :: Z_0, Ren, ustar, tstar, qst, visc REAL :: ht, &! roughness height at critical Reynolds number tstar2, &! bounded T*, forced to be non-positive qstar2, &! bounded q*, forced to be non-positive @@ -1994,12 +2583,31 @@ SUBROUTINE PSI_Suselj_Sood_2010(psi_m, psi_h, zL) END SUBROUTINE PSI_Suselj_Sood_2010 !-------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod -!>This subroutine returns a more robust z/L that best matches -!! the z/L from Hogstrom (1996) for unstable conditions and Beljaars -!! and Holtslag (1991) for stable conditions. + SUBROUTINE PSI_CB2005(psim1,psih1,zL,z0L) + + ! This subroutine returns the stability functions based off + ! of Cheng and Brutseart (2005, BLM), for use in stable conditions only. + ! The returned values are the combination of psi((za+zo)/L) - psi(z0/L) + + IMPLICIT NONE + REAL, INTENT(IN) :: zL,z0L + REAL, INTENT(OUT) :: psim1,psih1 + + psim1 = -6.1*LOG(zL + (1.+ zL**2.5)**0.4) - & + -6.1*LOG(z0L + (1.+ z0L**2.5)**0.4) + psih1 = -5.5*log(zL + (1.+ zL**1.1)**0.90909090909) - & + -5.5*log(z0L + (1.+ z0L**1.1)**0.90909090909) + + return + + END SUBROUTINE PSI_CB2005 +!-------------------------------------------------------------------- SUBROUTINE Li_etal_2010(zL, Rib, zaz0, z0zt) + !This subroutine returns a more robust z/L that best matches + !the z/L from Hogstrom (1996) for unstable conditions and Beljaars + !and Holtslag (1991) for stable conditions. + IMPLICIT NONE REAL, INTENT(OUT) :: zL REAL, INTENT(IN) :: Rib, zaz0, z0zt @@ -2054,393 +2662,235 @@ SUBROUTINE Li_etal_2010(zL, Rib, zaz0, z0zt) return END SUBROUTINE Li_etal_2010 - !------------------------------------------------------------------- -!>\ingroup module_sf_mynn_mod -!! This subroutine adds pbl modules so they can be optimized in pbl code - SUBROUTINE mym_condensation (kts,kte, & - & dx, dz, & - & thl, qw, & - & p,exner, & - & tsq, qsq, cov, & - & Sh, el, bl_mynn_cloudpdf,& - & qc_bl1D, cldfra_bl1D, & - & PBLH1,HFX1, & - & Vt, Vq, th, sgm) + REAL function zolri(ri,za,z0,zt,zol1) + + ! This iterative algorithm was taken from the revised surface layer + ! scheme in WRF-ARW, written by Pedro Jimenez and Jimy Dudhia and + ! summarized in Jimenez et al. (2012, MWR). This function was adapted + ! to input the thermal roughness length, zt, (as well as z0) because + ! zt is necessary input for the Dyer-Hicks functions used in MYNN. + + IMPLICIT NONE + REAL, INTENT(IN) :: ri,za,z0,zt,zol1 + REAL :: x1,x2,fx1,fx2 + INTEGER :: n + if (ri.lt.0.)then + x1=zol1 - 0.02 !-5. + x2=0. + else + x1=0. + x2=zol1 + 0.02 !5. + endif + + n=0 + fx1=zolri2(x1,ri,za,z0,zt) + fx2=zolri2(x2,ri,za,z0,zt) + Do While (abs(x1 - x2) > 0.01 .and. n < 5) + if(abs(fx2).lt.abs(fx1))then + x1=x1-fx1/(fx2-fx1)*(x2-x1) + fx1=zolri2(x1,ri,za,z0,zt) + zolri=x1 + else + x2=x2-fx2/(fx2-fx1)*(x2-x1) + fx2=zolri2(x2,ri,za,z0,zt) + zolri=x2 + endif + n=n+1 + !print*," n=",n," x1=",x1," x2=",x2 + enddo + + if (n==5 .and. abs(x1 - x2) >= 0.01) then + !print*,"iter FAIL, n=",n," Ri=",ri," z/L=",zolri + !Tests results: fails convergence ~ 0.07 % of the time + !set approximate values: + if (ri.lt.0.)then + zolri=ri*5. + else + zolri=ri*8. + endif + !else + ! print*,"iter OK, n=",n," Ri=",ri," z/L=",zolri + endif + + return + end function !------------------------------------------------------------------- + REAL function zolri2(zol2,ri2,za,z0,zt) - INTEGER, INTENT(IN) :: kts,kte, bl_mynn_cloudpdf - REAL, INTENT(IN) :: dx,PBLH1,HFX1 - REAL, DIMENSION(kts:kte), INTENT(IN) :: dz - REAL, DIMENSION(kts:kte), INTENT(IN) :: p,exner, thl, qw, & - &tsq, qsq, cov, th - - REAL, DIMENSION(kts:kte), INTENT(INOUT) :: vt,vq,sgm - - REAL, DIMENSION(kts:kte) :: qmq,alp,a,bet,b,ql,q1,cld,RH - REAL, DIMENSION(kts:kte), INTENT(OUT) :: qc_bl1D,cldfra_bl1D - DOUBLE PRECISION :: t3sq, r3sq, c3sq - - REAL :: qsl,esat,qsat,tlk,qsat_tl,dqsl,cld0,q1k,eq1,qll,& - &q2p,pt,rac,qt,t,xl,rsl,cpm,cdhdz,Fng,qww,alpha,beta,bb,ls_min,ls,wt - INTEGER :: i,j,k - - REAL :: erf - - !JOE: NEW VARIABLES FOR ALTERNATE SIGMA - REAL::dth,dtl,dqw,dzk - REAL, DIMENSION(kts:kte), INTENT(IN) :: Sh,el - - !JOE: variables for BL clouds - REAL::zagl,cld9,damp,edown,RHcrit,RHmean,RHsum,RHnum,Hshcu,PBLH2,ql_limit - REAL, PARAMETER :: Hfac = 3.0 !cloud depth factor for HFX (m^3/W) - REAL, PARAMETER :: HFXmin = 50.0 !min W/m^2 for BL clouds - REAL :: RH_00L, RH_00O, phi_dz, lfac - REAL, PARAMETER :: cdz = 2.0 - REAL, PARAMETER :: mdz = 1.5 - - !JAYMES: variables for tropopause-height estimation - REAL :: theta1, theta2, ht1, ht2 - INTEGER :: k_tropo - - REAL, PARAMETER :: rr2=0.7071068, rrp=0.3989423 - - k_tropo=5 - - zagl = 0. - - SELECT CASE(bl_mynn_cloudpdf) - - CASE (0) ! ORIGINAL MYNN PARTIAL-CONDENSATION SCHEME - - DO k = kts,kte-1 - t = th(k)*exner(k) - - !SATURATED VAPOR PRESSURE - esat = esat_blend(t) - !SATURATED SPECIFIC HUMIDITY - qsl=ep_2*esat/(p(k)-ep_3*esat) - !dqw/dT: Clausius-Clapeyron - dqsl = qsl*ep_2*ev/( rd*t**2 ) - !RH (0 to 1.0) - RH(k)=MAX(MIN(1.0,qw(k)/MAX(1.E-8,qsl)),0.001) - - alp(k) = 1.0/( 1.0+dqsl*xlvcp ) - bet(k) = dqsl*exner(k) - - !NOTE: negative bl_mynn_cloudpdf will zero-out the stratus subgrid clouds - ! at the end of this subroutine. - !Sommeria and Deardorff (1977) scheme, as implemented - !in Nakanishi and Niino (2009), Appendix B - t3sq = MAX( tsq(k), 0.0 ) - r3sq = MAX( qsq(k), 0.0 ) - c3sq = cov(k) - c3sq = SIGN( MIN( ABS(c3sq), SQRT(t3sq*r3sq) ), c3sq ) - r3sq = r3sq +bet(k)**2*t3sq -2.0*bet(k)*c3sq - !DEFICIT/EXCESS WATER CONTENT - qmq(k) = qw(k) -qsl - !ORIGINAL STANDARD DEVIATION: limit e-6 produces ~10% more BL clouds - !than e-10 - sgm(k) = SQRT( MAX( r3sq, 1.0d-10 )) - !NORMALIZED DEPARTURE FROM SATURATION - q1(k) = qmq(k) / sgm(k) - !CLOUD FRACTION. rr2 = 1/SQRT(2) = 0.707 - cld(k) = 0.5*( 1.0+erf( q1(k)*rr2 ) ) - - END DO - - CASE (1, -1) !ALTERNATIVE FORM (Nakanishi & Niino 2004 BLM, eq. B6, and - !Kuwano-Yoshida et al. 2010 QJRMS, eq. 7): - DO k = kts,kte-1 - t = th(k)*exner(k) - !SATURATED VAPOR PRESSURE - esat = esat_blend(t) - !SATURATED SPECIFIC HUMIDITY - qsl=ep_2*esat/(p(k)-ep_3*esat) - !dqw/dT: Clausius-Clapeyron - dqsl = qsl*ep_2*ev/( rd*t**2 ) - !RH (0 to 1.0) - RH(k)=MAX(MIN(1.0,qw(k)/MAX(1.E-8,qsl)),0.001) - - alp(k) = 1.0/( 1.0+dqsl*xlvcp ) - bet(k) = dqsl*exner(k) - - if (k .eq. kts) then - dzk = 0.5*dz(k) - else - dzk = 0.5*( dz(k) + dz(k-1) ) - end if - dth = 0.5*(thl(k+1)+thl(k)) - 0.5*(thl(k)+thl(MAX(k-1,kts))) - dqw = 0.5*(qw(k+1) + qw(k)) - 0.5*(qw(k) + qw(MAX(k-1,kts))) - sgm(k) = SQRT( MAX( (alp(k)**2 * MAX(el(k)**2,0.1) * & - b2 * MAX(Sh(k),0.03))/4. * & - (dqw/dzk - bet(k)*(dth/dzk ))**2 , 1.0e-10) ) - qmq(k) = qw(k) -qsl - q1(k) = qmq(k) / sgm(k) - cld(k) = 0.5*( 1.0+erf( q1(k)*rr2 ) ) - END DO - - CASE (2, -2) - !Diagnostic statistical scheme of Chaboureau and Bechtold (2002), JAS - !JAYMES- this added 27 Apr 2015 - DO k = kts,kte-1 - t = th(k)*exner(k) - !SATURATED VAPOR PRESSURE - esat = esat_blend(t) - !SATURATED SPECIFIC HUMIDITY - qsl=ep_2*esat/(p(k)-ep_3*esat) - !dqw/dT: Clausius-Clapeyron - dqsl = qsl*ep_2*ev/( rd*t**2 ) - !RH (0 to 1.0) - RH(k)=MAX(MIN(1.0,qw(k)/MAX(1.E-8,qsl)),0.001) - - alp(k) = 1.0/( 1.0+dqsl*xlvcp ) - bet(k) = dqsl*exner(k) - - xl = xl_blend(t) ! obtain latent heat - - tlk = thl(k)*(p(k)/p1000mb)**rcp ! recover liquid temp (tl) from thl - qsat_tl = qsat_blend(tlk,p(k)) ! get saturation water vapor mixing ratio - ! at tl and p - - rsl = xl*qsat_tl / (r_v*tlk**2) ! slope of C-C curve at t = tl - ! CB02, Eqn. 4 - - cpm = cp + qw(k)*cpv ! CB02, sec. 2, para. 1 - - a(k) = 1./(1. + xl*rsl/cpm) ! CB02 variable "a" - - qmq(k) = a(k) * (qw(k) - qsat_tl) ! saturation deficit/excess; - ! the numerator of Q1 - - b(k) = a(k)*rsl ! CB02 variable "b" - - dtl = 0.5*(thl(k+1)*(p(k+1)/p1000mb)**rcp + tlk) & - & - 0.5*(tlk + thl(MAX(k-1,kts))*(p(MAX(k-1,kts))/p1000mb)**rcp) - - dqw = 0.5*(qw(k+1) + qw(k)) - 0.5*(qw(k) + qw(MAX(k-1,kts))) - - if (k .eq. kts) then - dzk = 0.5*dz(k) - else - dzk = 0.5*( dz(k) + dz(k-1) ) - end if - - cdhdz = dtl/dzk + (g/cpm)*(1.+qw(k)) ! expression below Eq. 9 - ! in CB02 - zagl = zagl + dz(k) - ls_min = MIN(MAX(zagl,25.),300.) ! Let this be the minimum possible length scale: - ! 25 m < ls_min(=zagl) < 300 m - lfac=MIN(4.25+dx/4000.,6.) ! A dx-dependent multiplier for the master length scale: - ! lfac(750 m) = 4.4 - ! lfac(3 km) = 5.0 - ! lfac(13 km) = 6.0 - - ls = MAX(MIN(lfac*el(k),900.),ls_min) ! Bounded: ls_min < ls < 900 m - ! Note: CB02 use 900 m as a constant free-atmosphere length scale. - ! Above 300 m AGL, ls_min remains 300 m. For dx = 3 km, the - ! MYNN master length scale (el) must exceed 60 m before ls - ! becomes responsive to el, otherwise ls = ls_min = 300 m. - - sgm(k) = MAX(1.e-10, 0.225*ls*SQRT(MAX(0., & ! Eq. 9 in CB02: - & (a(k)*dqw/dzk)**2 & ! < 1st term in brackets, - & -2*a(k)*b(k)*cdhdz*dqw/dzk & ! < 2nd term, - & +b(k)**2 * cdhdz**2))) ! < 3rd term - ! CB02 use a multiplier of 0.2, but 0.225 is chosen - ! based on tests - - q1(k) = qmq(k) / sgm(k) ! Q1, the normalized saturation - - cld(k) = MAX(0., MIN(1., 0.5+0.36*ATAN(1.55*q1(k)))) ! Eq. 7 in CB02 - - END DO - END SELECT - - zagl = 0. - RHsum=0. - RHnum=0. - RHmean=0.1 !initialize with small value for small PBLH cases - damp =0 - PBLH2=MAX(10.,PBLH1) - - SELECT CASE(bl_mynn_cloudpdf) - - CASE (-1 : 1) ! ORIGINAL MYNN PARTIAL-CONDENSATION SCHEME - ! OR KUWANO ET AL. - DO k = kts,kte-1 - t = th(k)*exner(k) - q1k = q1(k) - zagl = zagl + dz(k) - !q1=0. - !cld(k)=0. - - !COMPUTE MEAN RH IN PBL (NOT PRESSURE WEIGHTED). - IF (zagl < PBLH2 .AND. PBLH2 > 400.) THEN - RHsum=RHsum+RH(k) - RHnum=RHnum+1.0 - RHmean=RHsum/RHnum - ENDIF - RHcrit = 1. - 0.35*(1.0 - (MAX(250.- MAX(HFX1,HFXmin),0.0)/200.)**2) - if (HFX1 > HFXmin) then - cld9=MIN(MAX(0., (rh(k)-RHcrit)/(1.1-RHcrit)), 1.)**2 - else - cld9=0.0 - endif + ! INPUT: ================================= + ! zol2 - estimated z/L + ! ri2 - calculated bulk Richardson number + ! za - 1/2 depth of first model layer + ! z0 - aerodynamic roughness length + ! zt - thermal roughness length + ! OUTPUT: ================================ + ! zolri2 - updated estimate of z/L - edown=PBLH2*.1 - !Vary BL cloud depth (Hshcu) by mean RH in PBL and HFX - !(somewhat following results from Zhang and Klein (2013, JAS)) - Hshcu=200. + (RHmean+0.5)**1.5*MAX(HFX1,0.)*Hfac - if (zagl < PBLH2-edown) then - damp=MIN(1.0,exp(-ABS(((PBLH2-edown)-zagl)/edown))) - elseif(zagl >= PBLH2-edown .AND. zagl < PBLH2+Hshcu)then - damp=1. - elseif (zagl >= PBLH2+Hshcu)then - damp=MIN(1.0,exp(-ABS((zagl-(PBLH2+Hshcu))/500.))) - endif - cldfra_bl1D(k)=cld9*damp - !cldfra_bl1D(k)=cld(k) ! JAYMES: use this form to retain the Sommeria-Deardorff value - - !use alternate cloud fraction to estimate qc for use in BL clouds-radiation - eq1 = rrp*EXP( -0.5*q1k*q1k ) - qll = MAX( cldfra_bl1D(k)*q1k + eq1, 0.0 ) - !ESTIMATED LIQUID WATER CONTENT (UNNORMALIZED) - ql (k) = alp(k)*sgm(k)*qll - if(cldfra_bl1D(k)>0.01 .and. ql(k)<1.E-6)ql(k)=1.E-6 - qc_bl1D(k)=ql(k)*damp - !now recompute estimated lwc for PBL scheme's use - !qll IS THE NORMALIZED LIQUID WATER CONTENT (Sommeria and - !Deardorff (1977, eq 29a). rrp = 1/(sqrt(2*pi)) = 0.3989 - eq1 = rrp*EXP( -0.5*q1k*q1k ) - qll = MAX( cld(k)*q1k + eq1, 0.0 ) - !ESTIMATED LIQUID WATER CONTENT (UNNORMALIZED) - ql (k) = alp(k)*sgm(k)*qll - - q2p = xlvcp/exner(k) - pt = thl(k) +q2p*ql(k) ! potential temp - - !qt is a THETA-V CONVERSION FOR TOTAL WATER (i.e., THETA-V = qt*THETA) - qt = 1.0 +p608*qw(k) -(1.+p608)*ql(k) - rac = alp(k)*( cld(k)-qll*eq1 )*( q2p*qt-(1.+p608)*pt ) - - !BUOYANCY FACTORS: wherever vt and vq are used, there is a - !"+1" and "+tv0", respectively, so these are subtracted out here. - !vt is unitless and vq has units of K. - vt(k) = qt-1.0 -rac*bet(k) - vq(k) = p608*pt-tv0 +rac - - !To avoid FPE in radiation driver, when these two quantities are multiplied by eachother, - ! add limit to qc_bl and cldfra_bl: - IF (QC_BL1D(k) < 1E-6 .AND. ABS(CLDFRA_BL1D(k)) > 0.01) QC_BL1D(k)= 1E-6 - IF (CLDFRA_BL1D(k) < 1E-2)THEN - CLDFRA_BL1D(k)=0. - QC_BL1D(k)=0. - ENDIF - - END DO - CASE ( 2, -2) - ! JAYMES- this option added 8 May 2015 - ! The cloud water formulations are taken from CB02, Eq. 8. - ! "fng" represents the non-Gaussian contribution to the liquid - ! water flux; these formulations are from Cuijpers and Bechtold - ! (1995), Eq. 7. CB95 also draws from Bechtold et al. 1995, - ! hereafter BCMT95 - DO k = kts,kte-1 - t = th(k)*exner(k) - q1k = q1(k) - zagl = zagl + dz(k) - IF (q1k < 0.) THEN - ql (k) = sgm(k)*EXP(1.2*q1k-1) - ELSE IF (q1k > 2.) THEN - ql (k) = sgm(k)*q1k - ELSE - ql (k) = sgm(k)*(EXP(-1.) + 0.66*q1k + 0.086*q1k**2) - ENDIF - - !Next, adjust our initial estimates of cldfra and ql based - !on tropopause-height and PBLH considerations - !JAYMES: added 4 Nov 2016 - if ((cld(k) .gt. 0.) .or. (ql(k) .gt. 0.)) then - if (k .le. k_tropo) then - !At and below tropopause: impose an upper limit on ql; assume that - !a maximum of 0.5 percent supersaturation in water vapor can be - !available for cloud production - ql_limit = 0.005 * qsat_blend( th(k)*exner(k), p(k) ) - ql(k) = MIN( ql(k), ql_limit ) - else - !Above tropopause: eliminate subgrid clouds from CB scheme - cld(k) = 0. - ql(k) = 0. - endif - endif + IMPLICIT NONE + REAL, INTENT(IN) :: ri2,za,z0,zt + REAL, INTENT(INOUT) :: zol2 + REAL :: zol20,zol3,psim1,psih1,psix2,psit2 - !Buoyancy-flux-related calculations follow... - ! "Fng" represents the non-Gaussian transport factor - ! (non-dimensional) from from Bechtold et al. 1995 - ! (hereafter BCMT95), section 3(c). Their suggested - ! forms for Fng (from their Eq. 20) are: - ! For purposes of the buoyancy flux in stratus, we will use Fng = 1 - Fng = 1. - - xl = xl_blend(t) - bb = b(k)*t/th(k) ! bb is "b" in BCMT95. Their "b" differs from - ! "b" in CB02 (i.e., b(k) above) by a factor - ! of T/theta. Strictly, b(k) above is formulated in - ! terms of sat. mixing ratio, but bb in BCMT95 is - ! cast in terms of sat. specific humidity. The - ! conversion is neglected here. - qww = 1.+0.61*qw(k) - alpha = 0.61*th(k) - beta = (th(k)/t)*(xl/cp) - 1.61*th(k) - - vt(k) = qww - cld(k)*beta*bb*Fng - 1. - vq(k) = alpha + cld(k)*beta*a(k)*Fng - tv0 - ! vt and vq correspond to beta-theta and beta-q, respectively, - ! in NN09, Eq. B8. They also correspond to the bracketed - ! expressions in BCMT95, Eq. 15, since (s*ql/sigma^2) = cldfra*Fng - ! The "-1" and "-tv0" terms are included for consistency with - ! the legacy vt and vq formulations (above). - - ! increase the cloud fraction estimate below PBLH+1km - if (zagl .lt. PBLH2+1000.) cld(k) = MIN( 1., 1.8*cld(k) ) - ! return a cloud condensate and cloud fraction for icloud_bl option: - cldfra_bl1D(k) = cld(k) - qc_bl1D(k) = ql(k) - - !To avoid FPE in radiation driver, when these two quantities are multiplied by eachother, - ! add limit to qc_bl and cldfra_bl: - IF (QC_BL1D(k) < 1E-6 .AND. ABS(CLDFRA_BL1D(k)) > 0.01) QC_BL1D(k)= 1E-6 - IF (CLDFRA_BL1D(k) < 1E-2)THEN - CLDFRA_BL1D(k)=0. - QC_BL1D(k)=0. - ENDIF - - END DO - - END SELECT !end cloudPDF option - - !FOR TESTING PURPOSES ONLY, ISOLATE ON THE MASS-CLOUDS. - IF (bl_mynn_cloudpdf .LT. 0) THEN - DO k = kts,kte-1 - cldfra_bl1D(k) = 0.0 - qc_bl1D(k) = 0.0 - END DO - ENDIF + if(zol2*ri2 .lt. 0.)zol2=0. ! limit zol2 - must be same sign as ri2 + + zol20=zol2*z0/za ! z0/L + zol3=zol2+zol20 ! (z+z0)/L - cld(kte) = cld(kte-1) - ql(kte) = ql(kte-1) - vt(kte) = vt(kte-1) - vq(kte) = vq(kte-1) - qc_bl1D(kte)=0. - cldfra_bl1D(kte)=0. + if (ri2.lt.0) then + !CALL PSI_DyerHicks(psim1,psih1,zol3,zt,z0,za) + psix2=log((za+z0)/z0)-(psim_unstable(zol3)-psim_unstable(zol20)) + psit2=log((za+zt)/zt)-(psih_unstable(zol3)-psih_unstable(zol20)) + !psix2=log((za+z0)/z0)-psim1 + !psit2=log((za+zt)/zt)-psih1 + else + !CALL PSI_DyerHicks(psim1,psih1,zol2,zt,z0,za) + !CALL PSI_CB2005(psim1,psih1,zol3,zol20) + psix2=log((za+z0)/z0)-(psim_stable(zol3)-psim_stable(zol20)) + psit2=log((za+zt)/zt)-(psih_stable(zol3)-psih_stable(zol20)) + !psix2=log((za+z0)/z0)-psim1 + !psit2=log((za+zt)/zt)-psih1 + endif + + zolri2=zol2*psit2/psix2**2 - ri2 + + return + end function +!==================================================================== + SUBROUTINE psi_init - RETURN + INTEGER :: N + REAL :: zolf - END SUBROUTINE mym_condensation + DO N=0,1000 + ! stable function tables + zolf = float(n)*0.01 + psim_stab(n)=psim_stable_full(zolf) + psih_stab(n)=psih_stable_full(zolf) + ! unstable function tables + zolf = -float(n)*0.01 + psim_unstab(n)=psim_unstable_full(zolf) + psih_unstab(n)=psih_unstable_full(zolf) + ENDDO + + END SUBROUTINE psi_init ! ================================================================== +! ... integrated similarity functions ... +! + REAL function psim_stable_full(zolf) + REAL :: zolf + + !psim_stable_full=-6.1*log(zolf+(1+zolf**2.5)**(1./2.5)) + psim_stable_full=-6.1*log(zolf+(1+zolf**2.5)**0.4) + + return + end function + REAL function psih_stable_full(zolf) + REAL :: zolf + + !psih_stable_full=-5.3*log(zolf+(1+zolf**1.1)**(1./1.1)) + psih_stable_full=-5.3*log(zolf+(1+zolf**1.1)**0.9090909090909090909) + + return + end function + + REAL function psim_unstable_full(zolf) + REAL :: zolf,x,ym,psimc,psimk + + x=(1.-16.*zolf)**.25 + !psimk=2*ALOG(0.5*(1+X))+ALOG(0.5*(1+X*X))-2.*ATAN(X)+2.*ATAN(1.) + psimk=2.*ALOG(0.5*(1+X))+ALOG(0.5*(1+X*X))-2.*ATAN(X)+2.*atan1 + + ym=(1.-10.*zolf)**onethird + !psimc=(3./2.)*log((ym**2.+ym+1.)/3.)-sqrt(3.)*ATAN((2.*ym+1)/sqrt(3.))+4.*ATAN(1.)/sqrt(3.) + psimc=1.5*log((ym**2 + ym+1.)*onethird)-sqrt3*ATAN((2.*ym+1)/sqrt3)+4.*atan1/sqrt3 + + psim_unstable_full=(psimk+zolf**2*(psimc))/(1+zolf**2.) + + return + end function + + REAL function psih_unstable_full(zolf) + REAL :: zolf,y,yh,psihc,psihk + + y=(1.-16.*zolf)**.5 + !psihk=2.*log((1+y)/2.) + psihk=2.*log((1+y)*0.5) + + yh=(1.-34.*zolf)**onethird + !psihc=(3./2.)*log((yh**2.+yh+1.)/3.)-sqrt(3.)*ATAN((2.*yh+1)/sqrt(3.))+4.*ATAN(1.)/sqrt(3.) + psihc=1.5*log((yh**2.+yh+1.)*onethird)-sqrt3*ATAN((2.*yh+1)/sqrt3)+4.*atan1/sqrt3 + + psih_unstable_full=(psihk+zolf**2*(psihc))/(1+zolf**2) + + return + end function +!================================================================= +! look-up table functions +!================================================================= + REAL function psim_stable(zolf) + integer :: nzol + real :: rzol,zolf + + nzol = int(zolf*100.) + rzol = zolf*100. - nzol + if(nzol+1 .le. 1000)then + psim_stable = psim_stab(nzol) + rzol*(psim_stab(nzol+1)-psim_stab(nzol)) + else + psim_stable = psim_stable_full(zolf) + endif + + return + end function + + REAL function psih_stable(zolf) + integer :: nzol + real :: rzol,zolf + + nzol = int(zolf*100.) + rzol = zolf*100. - nzol + if(nzol+1 .le. 1000)then + psih_stable = psih_stab(nzol) + rzol*(psih_stab(nzol+1)-psih_stab(nzol)) + else + psih_stable = psih_stable_full(zolf) + endif + + return + end function + + REAL function psim_unstable(zolf) + integer :: nzol + real :: rzol,zolf + + nzol = int(-zolf*100.) + rzol = -zolf*100. - nzol + if(nzol+1 .le. 1000)then + psim_unstable = psim_unstab(nzol) + rzol*(psim_unstab(nzol+1)-psim_unstab(nzol)) + else + psim_unstable = psim_unstable_full(zolf) + endif + + return + end function + + REAL function psih_unstable(zolf) + integer :: nzol + real :: rzol,zolf + + nzol = int(-zolf*100.) + rzol = -zolf*100. - nzol + if(nzol+1 .le. 1000)then + psih_unstable = psih_unstab(nzol) + rzol*(psih_unstab(nzol+1)-psih_unstab(nzol)) + else + psih_unstable = psih_unstable_full(zolf) + endif + + return + end function +!======================================================================== END MODULE module_sf_mynn From 017ae429d0e5f254df94df3baf0da09bf011cada Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 31 Dec 2019 09:10:16 -0700 Subject: [PATCH 013/404] Move Thompson MP initialization logic to mp_thompson_init, fix number concentrations, calculate effective radii before first call of radiation --- physics/module_mp_thompson.F90 | 2 +- physics/mp_thompson.F90 | 368 +++++++++++++++++++++++++++++---- physics/mp_thompson.meta | 200 ++++++++++++++++-- physics/mp_thompson_post.F90 | 6 - physics/mp_thompson_pre.F90 | 225 +------------------- physics/mp_thompson_pre.meta | 202 ------------------ 6 files changed, 512 insertions(+), 491 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index b1ca6ba07..5e118c070 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -80,7 +80,7 @@ MODULE module_mp_thompson !.. scheme. In 2-moment cloud water, Nt_c represents a maximum of !.. droplet concentration and nu_c is also variable depending on local !.. droplet number concentration. - REAL, PARAMETER, PRIVATE:: Nt_c = 100.E6 + REAL, PARAMETER :: Nt_c = 100.E6 REAL, PARAMETER, PRIVATE:: Nt_c_max = 1999.E6 !..Declaration of constants for assumed CCN/IN aerosols when none in diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index 812229f98..7fd709b13 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -8,7 +8,10 @@ module mp_thompson use machine, only : kind_phys - use module_mp_thompson, only : thompson_init, mp_gt_driver, thompson_finalize + use module_mp_thompson, only : thompson_init, mp_gt_driver, thompson_finalize, calc_effectRad + use module_mp_thompson, only : naIN0, naIN1, naCCN0, naCCN1, eps, Nt_c + + use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber, make_RainNumber implicit none @@ -20,36 +23,60 @@ module mp_thompson contains -!> This subroutine is a wrapper around the actual mp_gt_driver(). -#if 0 +!> This subroutine is a wrapper around the actual thompson_init(). !! \section arg_table_mp_thompson_init Argument Table !! \htmlinclude mp_thompson_init.html !! -#endif - subroutine mp_thompson_init(ncol, nlev, is_aerosol_aware, & - nwfa2d, nifa2d, nwfa, nifa, & - mpicomm, mpirank, mpiroot, & - imp_physics, & - imp_physics_thompson, & - threads, errmsg, errflg) + subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, & + imp_physics, imp_physics_thompson, & + spechum, qc, qr, qi, qs, qg, ni, nr, & + is_aerosol_aware, nc, nwfa2d, nifa2d, & + nwfa, nifa, tgrs, prsl, phil, area, & + re_cloud, re_ice, re_snow, & + mpicomm, mpirank, mpiroot, & + threads, blkno, errmsg, errflg) implicit none ! Interface variables integer, intent(in) :: ncol integer, intent(in) :: nlev - - logical, intent(in) :: is_aerosol_aware - real(kind_phys), optional, intent(inout) :: nwfa2d(1:ncol) - real(kind_phys), optional, intent(inout) :: nifa2d(1:ncol) - real(kind_phys), optional, intent(inout) :: nwfa(1:ncol,1:nlev) - real(kind_phys), optional, intent(inout) :: nifa(1:ncol,1:nlev) + real(kind_phys), intent(in) :: con_g, con_rd + integer, intent(in) :: imp_physics + integer, intent(in) :: imp_physics_thompson + ! Hydrometeors + real(kind_phys), intent(inout) :: spechum(:,:) + real(kind_phys), intent(inout) :: qc(:,:) + real(kind_phys), intent(inout) :: qr(:,:) + real(kind_phys), intent(inout) :: qi(:,:) + real(kind_phys), intent(inout) :: qs(:,:) + real(kind_phys), intent(inout) :: qg(:,:) + real(kind_phys), intent(inout) :: ni(:,:) + real(kind_phys), intent(inout) :: nr(:,:) + ! Aerosols + logical, intent(in ) :: is_aerosol_aware + real(kind_phys), optional, intent(inout) :: nc(:,:) + real(kind_phys), optional, intent(inout) :: nwfa(:,:) + real(kind_phys), optional, intent(inout) :: nifa(:,:) + real(kind_phys), optional, intent(inout) :: nwfa2d(:) + real(kind_phys), optional, intent(inout) :: nifa2d(:) + ! State variables + real(kind_phys), intent(in ) :: tgrs(:,:) + real(kind_phys), intent(in ) :: prsl(:,:) + real(kind_phys), intent(in ) :: phil(:,:) + real(kind_phys), intent(in ) :: area(:) + ! Cloud effective radii + real(kind_phys), optional, intent( out) :: re_cloud(:,:) + real(kind_phys), optional, intent( out) :: re_ice(:,:) + real(kind_phys), optional, intent( out) :: re_snow(:,:) + ! MPI information integer, intent(in) :: mpicomm integer, intent(in) :: mpirank integer, intent(in) :: mpiroot + ! Threading/blocking information integer, intent(in) :: threads - integer, intent(in) :: imp_physics - integer, intent(in) :: imp_physics_thompson + integer, intent(in) :: blkno + ! CCPP error handling character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg @@ -57,6 +84,23 @@ subroutine mp_thompson_init(ncol, nlev, is_aerosol_aware, & integer :: ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & its,ite, jts,jte, kts,kte + ! Hydrometeors + real(kind_phys) :: qv_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) + real(kind_phys) :: qc_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) + real(kind_phys) :: qr_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) + real(kind_phys) :: qi_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) + real(kind_phys) :: qs_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) + real(kind_phys) :: qg_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) + real(kind_phys) :: ni_mp(1:ncol,1:nlev) !< kg-1 + real(kind_phys) :: nr_mp(1:ncol,1:nlev) !< kg-1 + real(kind_phys) :: nc_mp(1:ncol,1:nlev) !< kg-1 + ! + real(kind_phys) :: hgt(1:ncol,1:nlev) ! m + real(kind_phys) :: rho(1:ncol,1:nlev) ! kg m-3 + real(kind_phys) :: orho(1:ncol,1:nlev) ! m3 kg-1 + ! + real (kind=kind_phys) :: h_01, airmass, niIN3, niCCN3 + integer :: i, k ! Initialize the CCPP error handling variables errmsg = '' @@ -72,12 +116,26 @@ subroutine mp_thompson_init(ncol, nlev, is_aerosol_aware, & end if ! *DH temporary + ! Consistency checks if (imp_physics/=imp_physics_thompson) then write(errmsg,'(*(a))') "Logic error: namelist choice of microphysics is different from Thompson MP" errflg = 1 return end if + if (is_aerosol_aware .and. & + (.not.present(nc) .or. & + .not.present(nwfa2d) .or. & + .not.present(nifa2d) .or. & + .not.present(nwfa) .or. & + .not.present(nifa) )) then + write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_init:', & + ' aerosol-aware microphysics require all of the following', & + ' optional arguments: nc, nwfa2d, nifa2d, nwfa, nifa' + errflg = 1 + return + end if + ! Set internal dimensions ids = 1 ims = 1 @@ -98,11 +156,8 @@ subroutine mp_thompson_init(ncol, nlev, is_aerosol_aware, & kme = nlev kte = nlev - if (is_aerosol_aware .and. present(nwfa2d) & - .and. present(nifa2d) & - .and. present(nwfa) & - .and. present(nifa) ) then - ! Call init + ! Call Thompson init + if (is_aerosol_aware) then call thompson_init(nwfa2d=nwfa2d, nifa2d=nifa2d, nwfa=nwfa, nifa=nifa, & ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & @@ -110,12 +165,6 @@ subroutine mp_thompson_init(ncol, nlev, is_aerosol_aware, & mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & threads=threads, errmsg=errmsg, errflg=errflg) if (errflg /= 0) return - else if (is_aerosol_aware) then - write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_init:', & - ' aerosol-aware microphysics require all of the following', & - ' optional arguments: nifa2d, nwfa2d, nwfa, nifa' - errflg = 1 - return else call thompson_init(ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & @@ -125,16 +174,233 @@ subroutine mp_thompson_init(ncol, nlev, is_aerosol_aware, & if (errflg /= 0) return end if + ! Fix initial values of hydrometeors + where(spechum<0) spechum = 0.0 + where(qc<0) qc = 0.0 + where(qr<0) qr = 0.0 + where(qi<0) qi = 0.0 + where(qs<0) qs = 0.0 + where(qg<0) qg = 0.0 + where(ni<0) ni = 0.0 + where(nr<0) nr = 0.0 + + if (is_aerosol_aware) then + ! Fix initial values of aerosols + where(nc<0) nc = 0.0 + where(nwfa<0) nwfa = 0.0 + where(nifa<0) nifa = 0.0 + where(nwfa2d<0) nwfa2d = 0.0 + where(nifa2d<0) nifa2d = 0.0 + end if + + ! Geopotential height in m2 s-2 to height in m + hgt = phil/con_g + + ! Density of air in kg m-3 and inverse density of air + rho = prsl/(con_rd*tgrs) + orho = 1.0/rho + + ! Prior to calling the functions: make_DropletNumber, make_IceNumber, make_RainNumber, + ! the incoming mixing ratios should be converted to units of mass/num per cubic meter + ! rather than per kg of air. So, to pass back to the model state variables, + ! they also need to be switched back to mass/number per kg of air, because + ! what is returned by the functions is in units of number per cubic meter. + ! They also need to be converted to dry mixing ratios. + + !> - Convert specific humidity/moist mixing ratios to dry mixing ratios + qv_mp = spechum/(1.0_kind_phys-spechum) + qc_mp = qc/(1.0_kind_phys-spechum) + qr_mp = qr/(1.0_kind_phys-spechum) + qi_mp = qi/(1.0_kind_phys-spechum) + qs_mp = qs/(1.0_kind_phys-spechum) + qg_mp = qg/(1.0_kind_phys-spechum) + + !> - Convert number concentrations from moist to dry + ni_mp = ni/(1.0_kind_phys-spechum) + nr_mp = ni/(1.0_kind_phys-spechum) + if (is_aerosol_aware) then + nc_mp = nc/(1.0_kind_phys-spechum) + end if + + ! If qi is in boundary conditions but ni is not, calculate ni from qi, rho and tgrs + if (maxval(qi_mp)>0.0 .and. maxval(ni_mp)==0.0) then + ni_mp = make_IceNumber(qi_mp*rho, tgrs) * orho + end if + + ! If ni is in boundary conditions but qi is not, reset ni to zero + if (maxval(ni_mp)>0.0 .and. maxval(qi_mp)==0.0) ni_mp = 0.0 + + ! If qr is in boundary conditions but nr is not, calculate nr from qr, rho and tgrs + if (maxval(qr_mp)>0.0 .and. maxval(nr_mp)==0.0) then + nr_mp = make_RainNumber(qr_mp*rho, tgrs) * orho + end if + + ! If nr is in boundary conditions but qr is not, reset nr to zero + if (maxval(nr_mp)>0.0 .and. maxval(qr_mp)==0.0) nr_mp = 0.0 + + !..Check for existing aerosol data, both CCN and IN aerosols. If missing + !.. fill in just a basic vertical profile, somewhat boundary-layer following. + if (is_aerosol_aware) then + + ! CCN + if (MAXVAL(nwfa) .lt. eps) then + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosols.' + do i = 1, ncol + if (hgt(i,1).le.1000.0) then + h_01 = 0.8 + elseif (hgt(i,1).ge.2500.0) then + h_01 = 0.01 + else + h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) + endif + niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 + nwfa(i,1) = naCCN1+naCCN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niCCN3) + airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg + nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) + do k = 2, nlev + nwfa(i,k) = naCCN1+naCCN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niCCN3) + enddo + enddo + else + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosols are present.' + if (MAXVAL(nwfa2d) .lt. eps) then +! Hard-coded switch between new (from WRFv4.0, top) and old (until WRFv3.9.1.1, bottom) surface emission rate calculations +#if 0 + !+---+-----------------------------------------------------------------+ + !..Scale the lowest level aerosol data into an emissions rate. This is + !.. very far from ideal, but need higher emissions where larger amount + !.. of (climo) existing and lesser emissions where there exists fewer to + !.. begin as a first-order simplistic approach. Later, proper connection to + !.. emission inventory would be better, but, for now, scale like this: + !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per second per grid box unit + !.. that was tested as ~(20kmx20kmx50m = 2.E10 m**-3) + !+---+-----------------------------------------------------------------+ + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Use new (WRFv4+) formula to calculate CCN surface emission rates.' + do i = 1, ncol + airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg + nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) + enddo +#else + !+---+-----------------------------------------------------------------+ + !..Scale the lowest level aerosol data into an emissions rate. This is + !.. very far from ideal, but need higher emissions where larger amount + !.. of existing and lesser emissions where not already lots of aerosols + !.. for first-order simplistic approach. Later, proper connection to + !.. emission inventory would be better, but, for now, scale like this: + !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per kg per second + !.. Nwfa=500 per cc, emit 0.875E5 aerosols per kg per second + !.. Nwfa=5000 per cc, emit 0.875E6 aerosols per kg per second + !.. for a grid with 20km spacing and scale accordingly for other spacings. + !+---+-----------------------------------------------------------------+ + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Use old (pre WRFv4) formula to calculate CCN surface emission rates.' + do i = 1, ncol + if (SQRT(area(i))/20000.0 .ge. 1.0) then + h_01 = 0.875 + else + h_01 = (0.875 + 0.125*((20000.-SQRT(area(i)))/16000.)) * SQRT(area(i))/20000. + endif + nwfa2d(i) = 10.0**(LOG10(nwfa(i,1)*1.E-6)-3.69897) + nwfa2d(i) = nwfa2d(i)*h_01 * 1.E6 + enddo +#endif + else + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosol surface emission rates are present.' + endif + endif + + ! IN + if (MAXVAL(nifa) .lt. eps) then + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosols.' + do i = 1, ncol + if (hgt(i,1).le.1000.0) then + h_01 = 0.8 + elseif (hgt(i,1).ge.2500.0) then + h_01 = 0.01 + else + h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) + endif + niIN3 = -1.0*ALOG(naIN1/naIN0)/h_01 + nifa(i,1) = naIN1+naIN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niIN3) + nifa2d(i) = 0. + do k = 2, nlev + nifa(i,k) = naIN1+naIN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niIN3) + enddo + enddo + else + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosols are present.' + if (MAXVAL(nifa2d) .lt. eps) then + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosol surface emission rates, set to zero.' + ! calculate IN surface flux here, right now just set to zero + nifa2d = 0. + else + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosol surface emission rates are present.' + endif + endif + + ! If qc is in boundary conditions but nc is not, calculate nc from qc, rho and nwfa + if (maxval(qc_mp)>0.0 .and. maxval(nc_mp)==0.0) then + nc_mp = make_DropletNumber(qc_mp*rho, nwfa) * orho + end if + + ! If nc is in boundary conditions but qc is not, reset nc to zero + if (maxval(nc_mp)>0.0 .and. maxval(qc_mp)==0.0) nc_mp = 0.0 + + else + + ! Constant droplet concentration for single moment cloud water as in + ! module_mp_thompson.F90, only needed for effective radii calculation + nc_mp = Nt_c/rho + + end if + + ! Calculate initial cloud effective radii if requested + if (present(re_cloud) .and. present(re_ice) .and. present(re_snow)) then + do i = 1, ncol + do k = 1, nlev + re_cloud(i,k) = 2.49E-6 + re_ice(i,k) = 4.99E-6 + re_snow(i,k) = 9.99E-6 + end do + end do + do i = 1, ncol + call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & + nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & + re_cloud(i,:), re_ice(i,:), re_snow(i,:), kts, kte) + end do + do i = 1, ncol + do k = 1, nlev + re_cloud(i,k) = MAX(2.49E-6, MIN(re_cloud(i,k), 50.E-6)) + re_ice(i,k) = MAX(4.99E-6, MIN(re_ice(i,k), 125.E-6)) + re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) + end do + end do + else if (.not.present(re_cloud) .and. .not.present(re_ice) .and. .not.present(re_snow)) then + ! Do nothing + else + write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_run:', & + ' all or none of the following optional', & + ' arguments are required: re_cloud, re_ice, re_snow' + errflg = 1 + return + end if + + !> - Convert number concentrations from dry to moist + ni = ni_mp/(1.0_kind_phys+qv_mp) + nr = nr_mp/(1.0_kind_phys+qv_mp) + if (is_aerosol_aware) then + nc = nc_mp/(1.0_kind_phys+qv_mp) + end if + is_initialized = .true. end subroutine mp_thompson_init -#if 0 !> \section arg_table_mp_thompson_run Argument Table !! \htmlinclude mp_thompson_run.html !! -#endif !>\ingroup aathompson !>\section gen_thompson_hrrr Thompson MP General Algorithm !>@{ @@ -213,6 +479,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & real(kind_phys) :: qi_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) real(kind_phys) :: qs_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) real(kind_phys) :: qg_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) + real(kind_phys) :: ni_mp(1:ncol,1:nlev) !< kg-1 + real(kind_phys) :: nr_mp(1:ncol,1:nlev) !< kg-1 + real(kind_phys) :: nc_mp(1:ncol,1:nlev) !< kg-1 + ! Vertical velocity and level width real(kind_phys) :: w(1:ncol,1:nlev) !< m s-1 real(kind_phys) :: dz(1:ncol,1:nlev) !< m @@ -249,14 +519,6 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & return end if - !> - Convert specific humidity/moist mixing ratios to dry mixing ratios - qv_mp = spechum/(1.0_kind_phys-spechum) - qc_mp = qc/(1.0_kind_phys-spechum) - qr_mp = qr/(1.0_kind_phys-spechum) - qi_mp = qi/(1.0_kind_phys-spechum) - qs_mp = qs/(1.0_kind_phys-spechum) - qg_mp = qg/(1.0_kind_phys-spechum) - if (is_aerosol_aware .and. .not. (present(nc) .and. & present(nwfa) .and. & present(nifa) .and. & @@ -270,6 +532,21 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & return end if + !> - Convert specific humidity/moist mixing ratios to dry mixing ratios + qv_mp = spechum/(1.0_kind_phys-spechum) + qc_mp = qc/(1.0_kind_phys-spechum) + qr_mp = qr/(1.0_kind_phys-spechum) + qi_mp = qi/(1.0_kind_phys-spechum) + qs_mp = qs/(1.0_kind_phys-spechum) + qg_mp = qg/(1.0_kind_phys-spechum) + + !> - Convert number concentrations from moist to dry + ni_mp = ni/(1.0_kind_phys-spechum) + nr_mp = nr/(1.0_kind_phys-spechum) + if (is_aerosol_aware) then + nc_mp = nc/(1.0_kind_phys-spechum) + end if + !> - Density of air in kg m-3 rho = prsl/(con_rd*tgrs) @@ -341,11 +618,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & kme = nlev kte = nlev - !> - Call mp_gt_driver() with or without aerosols if (is_aerosol_aware) then call mp_gt_driver(qv=qv_mp, qc=qc_mp, qr=qr_mp, qi=qi_mp, qs=qs_mp, qg=qg_mp, & - ni=ni, nr=nr, nc=nc, & + ni=ni_mp, nr=nr_mp, nc=nc_mp, & nwfa=nwfa, nifa=nifa, nwfa2d=nwfa2d, nifa2d=nifa2d, & tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & rainnc=rain_mp, rainncv=delta_rain_mp, & @@ -363,7 +639,7 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & else call mp_gt_driver(qv=qv_mp, qc=qc_mp, qr=qr_mp, qi=qi_mp, qs=qs_mp, qg=qg_mp, & - ni=ni, nr=nr, nc=nc, & + ni=ni_mp, nr=nr_mp, & tt=tgrs, p=prsl, w=w, dz=dz, dt_in=dtp, & rainnc=rain_mp, rainncv=delta_rain_mp, & snownc=snow_mp, snowncv=delta_snow_mp, & @@ -388,6 +664,12 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & qs = qs_mp/(1.0_kind_phys+qv_mp) qg = qg_mp/(1.0_kind_phys+qv_mp) + !> - Convert number concentrations from dry to moist + ni = ni_mp/(1.0_kind_phys+qv_mp) + nr = nr_mp/(1.0_kind_phys+qv_mp) + if (is_aerosol_aware) then + nc = nc_mp/(1.0_kind_phys+qv_mp) + end if !> - Convert rainfall deltas from mm to m (on physics timestep); add to inout variables ! "rain" in Thompson MP refers to precipitation (total of liquid rainfall+snow+graupel+ice) @@ -400,11 +682,9 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & end subroutine mp_thompson_run !>@} -#if 0 !! \section arg_table_mp_thompson_finalize Argument Table !! \htmlinclude mp_thompson_finalize.html !! -#endif subroutine mp_thompson_finalize(errmsg, errflg) implicit none diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 619053882..80e368228 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -17,6 +17,112 @@ type = integer intent = in optional = F +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_thompson] + standard_name = flag_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[spechum] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio + long_name = cloud water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qr] + standard_name = rain_water_mixing_ratio + long_name = rain water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qi] + standard_name = ice_water_mixing_ratio + long_name = ice water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qs] + standard_name = snow_water_mixing_ratio + long_name = snow water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qg] + standard_name = graupel_mixing_ratio + long_name = graupel mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ni] + standard_name = ice_number_concentration + long_name = ice number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nr] + standard_name = rain_number_concentration + long_name = rain number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [is_aerosol_aware] standard_name = flag_for_aerosol_physics long_name = flag for aerosol-aware physics @@ -25,6 +131,15 @@ type = logical intent = in optional = F +[nc] + standard_name = cloud_droplet_number_concentration + long_name = cloud droplet number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T [nwfa2d] standard_name = tendency_of_water_friendly_aerosols_at_surface long_name = instantaneous fake water-friendly surface aerosol source @@ -61,6 +176,69 @@ kind = kind_phys intent = inout optional = T +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phil] + standard_name = geopotential + long_name = geopotential at model layer centers + units = m2 s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[area] + standard_name = cell_area + long_name = area of the grid cell + units = m2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[re_cloud] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer (meter here) + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[re_ice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer (meter here) + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[re_snow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometer (meter here) + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T [mpicomm] standard_name = mpi_comm long_name = MPI communicator @@ -93,18 +271,10 @@ type = integer intent = in optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme - long_name = choice of Thompson microphysics scheme - units = flag +[blkno] + standard_name = ccpp_block_number + long_name = for explicit data blocking: block number of this block + units = index dimensions = () type = integer intent = in @@ -414,7 +584,7 @@ type = real kind = kind_phys intent = out - optional = F + optional = T [re_ice] standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer (meter here) @@ -423,7 +593,7 @@ type = real kind = kind_phys intent = out - optional = F + optional = T [re_snow] standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometer (meter here) @@ -432,7 +602,7 @@ type = real kind = kind_phys intent = out - optional = F + optional = T [mpicomm] standard_name = mpi_comm long_name = MPI communicator diff --git a/physics/mp_thompson_post.F90 b/physics/mp_thompson_post.F90 index feb031a3e..2452fa337 100644 --- a/physics/mp_thompson_post.F90 +++ b/physics/mp_thompson_post.F90 @@ -16,11 +16,9 @@ module mp_thompson_post contains -#if 0 !! \section arg_table_mp_thompson_post_init Argument Table !! \htmlinclude mp_thompson_post_init.html !! -#endif subroutine mp_thompson_post_init(ncol, ttendlim, errmsg, errflg) implicit none @@ -61,11 +59,9 @@ subroutine mp_thompson_post_init(ncol, ttendlim, errmsg, errflg) end subroutine mp_thompson_post_init -#if 0 !! \section arg_table_mp_thompson_post_run Argument Table !! \htmlinclude mp_thompson_post_run.html !! -#endif subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, & kdt, mpicomm, mpirank, mpiroot, errmsg, errflg) @@ -132,11 +128,9 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, & end subroutine mp_thompson_post_run -#if 0 !! \section arg_table_mp_thompson_post_finalize Argument Table !! \htmlinclude mp_thompson_post_finalize.html !! -#endif subroutine mp_thompson_post_finalize(errmsg, errflg) implicit none diff --git a/physics/mp_thompson_pre.F90 b/physics/mp_thompson_pre.F90 index 14ede1ec9..4087ac815 100644 --- a/physics/mp_thompson_pre.F90 +++ b/physics/mp_thompson_pre.F90 @@ -7,10 +7,6 @@ module mp_thompson_pre use machine, only : kind_phys - use module_mp_thompson, only : naIN0, naIN1, naCCN0, naCCN1, eps - - use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber, make_RainNumber - implicit none public :: mp_thompson_pre_init, mp_thompson_pre_run, mp_thompson_pre_finalize @@ -22,64 +18,23 @@ module mp_thompson_pre subroutine mp_thompson_pre_init() end subroutine mp_thompson_pre_init -#if 0 !! \section arg_table_mp_thompson_pre_run Argument Table !! \htmlinclude mp_thompson_pre_run.html !! -#endif - subroutine mp_thompson_pre_run(ncol, nlev, kdt, con_g, con_rd, & - spechum, qc, qr, qi, qs, qg, ni, nr, & - is_aerosol_aware, nc, nwfa, nifa, nwfa2d, & - nifa2d, tgrs, tgrs_save, prsl, phil, area, & - mpirank, mpiroot, blkno, errmsg, errflg) + subroutine mp_thompson_pre_run(ncol, nlev, tgrs, tgrs_save, errmsg, errflg) implicit none ! Interface variables - ! Dimensions and constants integer, intent(in ) :: ncol integer, intent(in ) :: nlev - integer, intent(in ) :: kdt - real(kind_phys), intent(in ) :: con_g - real(kind_phys), intent(in ) :: con_rd - ! Hydrometeors - real(kind_phys), intent(inout) :: spechum(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qc(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qr(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qi(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qs(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: qg(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: ni(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: nr(1:ncol,1:nlev) - ! Aerosols - logical, intent(in ) :: is_aerosol_aware - real(kind_phys), optional, intent(inout) :: nc(1:ncol,1:nlev) - real(kind_phys), optional, intent(inout) :: nwfa(1:ncol,1:nlev) - real(kind_phys), optional, intent(inout) :: nifa(1:ncol,1:nlev) - real(kind_phys), optional, intent(inout) :: nwfa2d(1:ncol) - real(kind_phys), optional, intent(inout) :: nifa2d(1:ncol) - ! State variables and timestep information real(kind_phys), intent(in ) :: tgrs(1:ncol,1:nlev) real(kind_phys), intent( out) :: tgrs_save(1:ncol,1:nlev) - real(kind_phys), intent(in ) :: prsl(1:ncol,1:nlev) - real(kind_phys), intent(in ) :: phil(1:ncol,1:nlev) - real(kind_phys), intent(in ) :: area(1:ncol) - ! MPI information - integer, intent(in ) :: mpirank - integer, intent(in ) :: mpiroot - ! Blocking information - integer, intent(in ) :: blkno + ! CCPP error handling character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg - ! Local variables - real (kind=kind_phys) :: hgt(1:ncol,1:nlev) ! m - real (kind=kind_phys) :: rho(1:ncol,1:nlev) ! kg m-3 - real (kind=kind_phys) :: orho(1:ncol,1:nlev) ! m3 kg-1 - real (kind=kind_phys) :: h_01, airmass, niIN3, niCCN3 - integer :: i, k - ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 @@ -87,182 +42,6 @@ subroutine mp_thompson_pre_run(ncol, nlev, kdt, con_g, con_rd, & ! Save current air temperature for tendency limiters in mp_thompson_post tgrs_save = tgrs - ! Return if not first timestep - if (kdt > 1) return - - ! Consistency check - if (is_aerosol_aware .and. & - (.not.present(nc) .or. & - .not.present(nwfa2d) .or. & - .not.present(nifa2d) .or. & - .not.present(nwfa) .or. & - .not.present(nifa) )) then - write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_pre_run:', & - ' aerosol-aware microphysics require all of the following', & - ' optional arguments: nc, nwfa2d, nifa2d, nwfa, nifa' - errflg = 1 - return - end if - - ! Fix initial values of hydrometeors - where(spechum<0) spechum = 0.0 - where(qc<0) qc = 0.0 - where(qr<0) qr = 0.0 - where(qi<0) qi = 0.0 - where(qs<0) qs = 0.0 - where(qg<0) qg = 0.0 - where(ni<0) ni = 0.0 - where(nr<0) nr = 0.0 - - if (is_aerosol_aware) then - ! Fix initial values of aerosols - where(nc<0) nc = 0.0 - where(nwfa<0) nwfa = 0.0 - where(nifa<0) nifa = 0.0 - where(nwfa2d<0) nwfa2d = 0.0 - where(nifa2d<0) nifa2d = 0.0 - end if - - ! Geopotential height in m2 s-2 to height in m - hgt = phil/con_g - - ! Density of air in kg m-3 and inverse density of air - rho = prsl/(con_rd*tgrs) - orho = 1.0/rho - - ! Prior to calling the functions: make_DropletNumber, make_IceNumber, make_RainNumber, - ! the incoming mixing ratios should be converted to units of mass/num per cubic meter - ! rather than per kg of air. So, to pass back to the model state variables, - ! they also need to be switched back to mass/number per kg of air, because - ! what is returned by the functions is in units of number per cubic meter. - - ! If qi is in boundary conditions but ni is not, calculate ni from qi, rho and tgrs - if (maxval(qi)>0.0 .and. maxval(ni)==0.0) then - ni = make_IceNumber(qi*rho, tgrs) * orho - end if - - ! If ni is in boundary conditions but qi is not, reset ni to zero - if (maxval(ni)>0.0 .and. maxval(qi)==0.0) ni = 0.0 - - ! If qr is in boundary conditions but nr is not, calculate nr from qr, rho and tgrs - if (maxval(qr)>0.0 .and. maxval(nr)==0.0) then - nr = make_RainNumber(qr*rho, tgrs) * orho - end if - - ! If nr is in boundary conditions but qr is not, reset nr to zero - if (maxval(nr)>0.0 .and. maxval(qr)==0.0) nr = 0.0 - - ! Return if aerosol-aware option is not used - if (.not. is_aerosol_aware) return - -!..Check for existing aerosol data, both CCN and IN aerosols. If missing -!.. fill in just a basic vertical profile, somewhat boundary-layer following. - -!.. CCN - if (MAXVAL(nwfa) .lt. eps) then - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosols.' - do i = 1, ncol - if (hgt(i,1).le.1000.0) then - h_01 = 0.8 - elseif (hgt(i,1).ge.2500.0) then - h_01 = 0.01 - else - h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) - endif - niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 - nwfa(i,1) = naCCN1+naCCN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niCCN3) - airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg - nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) - do k = 2, nlev - nwfa(i,k) = naCCN1+naCCN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niCCN3) - enddo - enddo - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosols are present.' - if (MAXVAL(nwfa2d) .lt. eps) then -! Hard-coded switch between new (from WRFv4.0, top) and old (until WRFv3.9.1.1, bottom) surface emission rate calculations -#if 0 - !+---+-----------------------------------------------------------------+ - !..Scale the lowest level aerosol data into an emissions rate. This is - !.. very far from ideal, but need higher emissions where larger amount - !.. of (climo) existing and lesser emissions where there exists fewer to - !.. begin as a first-order simplistic approach. Later, proper connection to - !.. emission inventory would be better, but, for now, scale like this: - !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per second per grid box unit - !.. that was tested as ~(20kmx20kmx50m = 2.E10 m**-3) - !+---+-----------------------------------------------------------------+ - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Use new (WRFv4+) formula to calculate CCN surface emission rates.' - do i = 1, ncol - airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg - nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) - enddo -#else - !+---+-----------------------------------------------------------------+ - !..Scale the lowest level aerosol data into an emissions rate. This is - !.. very far from ideal, but need higher emissions where larger amount - !.. of existing and lesser emissions where not already lots of aerosols - !.. for first-order simplistic approach. Later, proper connection to - !.. emission inventory would be better, but, for now, scale like this: - !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per kg per second - !.. Nwfa=500 per cc, emit 0.875E5 aerosols per kg per second - !.. Nwfa=5000 per cc, emit 0.875E6 aerosols per kg per second - !.. for a grid with 20km spacing and scale accordingly for other spacings. - !+---+-----------------------------------------------------------------+ - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Use old (pre WRFv4) formula to calculate CCN surface emission rates.' - do i = 1, ncol - if (SQRT(area(i))/20000.0 .ge. 1.0) then - h_01 = 0.875 - else - h_01 = (0.875 + 0.125*((20000.-SQRT(area(i)))/16000.)) * SQRT(area(i))/20000. - endif - nwfa2d(i) = 10.0**(LOG10(nwfa(i,1)*1.E-6)-3.69897) - nwfa2d(i) = nwfa2d(i)*h_01 * 1.E6 - enddo -#endif - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosol surface emission rates are present.' - endif - endif - -!.. IN - if (MAXVAL(nifa) .lt. eps) then - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosols.' - do i = 1, ncol - if (hgt(i,1).le.1000.0) then - h_01 = 0.8 - elseif (hgt(i,1).ge.2500.0) then - h_01 = 0.01 - else - h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) - endif - niIN3 = -1.0*ALOG(naIN1/naIN0)/h_01 - nifa(i,1) = naIN1+naIN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niIN3) - nifa2d(i) = 0. - do k = 2, nlev - nifa(i,k) = naIN1+naIN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niIN3) - enddo - enddo - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosols are present.' - if (MAXVAL(nifa2d) .lt. eps) then - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosol surface emission rates, set to zero.' - ! calculate IN surface flux here, right now just set to zero - nifa2d = 0. - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosol surface emission rates are present.' - endif - endif - - ! If qc is in boundary conditions but nc is not, calculate nc from qc, rho and nwfa - if (maxval(qc)>0.0 .and. maxval(nc)==0.0) then - nc = make_DropletNumber(qc*rho, nwfa) * orho - end if - - ! If nc is in boundary conditions but qc is not, reset nc to zero - if (maxval(nc)>0.0 .and. maxval(qc)==0.0) nc = 0.0 - end subroutine mp_thompson_pre_run subroutine mp_thompson_pre_finalize() diff --git a/physics/mp_thompson_pre.meta b/physics/mp_thompson_pre.meta index 0fc225fa1..5782c10f6 100644 --- a/physics/mp_thompson_pre.meta +++ b/physics/mp_thompson_pre.meta @@ -17,157 +17,6 @@ type = integer intent = in optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in - optional = F -[con_g] - standard_name = gravitational_acceleration - long_name = gravitational acceleration - units = m s-2 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[con_rd] - standard_name = gas_constant_dry_air - long_name = ideal gas constant for dry air - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[spechum] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qc] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics - long_name = cloud water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qr] - standard_name = rain_water_mixing_ratio_updated_by_physics - long_name = rain water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qi] - standard_name = ice_water_mixing_ratio_updated_by_physics - long_name = ice water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qs] - standard_name = snow_water_mixing_ratio_updated_by_physics - long_name = snow water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qg] - standard_name = graupel_mixing_ratio_updated_by_physics - long_name = graupel mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ni] - standard_name = ice_number_concentration_updated_by_physics - long_name = ice number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[nr] - standard_name = rain_number_concentration_updated_by_physics - long_name = rain number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[is_aerosol_aware] - standard_name = flag_for_aerosol_physics - long_name = flag for aerosol-aware physics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[nc] - standard_name = cloud_droplet_number_concentration_updated_by_physics - long_name = cloud droplet number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nwfa] - standard_name = water_friendly_aerosol_number_concentration_updated_by_physics - long_name = number concentration of water-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nifa] - standard_name = ice_friendly_aerosol_number_concentration_updated_by_physics - long_name = number concentration of ice-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nwfa2d] - standard_name = tendency_of_water_friendly_aerosols_at_surface - long_name = instantaneous fake water-friendly surface aerosol source - units = kg-1 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nifa2d] - standard_name = tendency_of_ice_friendly_aerosols_at_surface - long_name = instantaneous fake ice-friendly surface aerosol source - units = kg-1 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = T [tgrs] standard_name = air_temperature_updated_by_physics long_name = model layer mean temperature @@ -186,57 +35,6 @@ kind = kind_phys intent = out optional = F -[prsl] - standard_name = air_pressure - long_name = mean layer pressure - units = Pa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[phil] - standard_name = geopotential - long_name = geopotential at model layer centers - units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[area] - standard_name = cell_area - long_name = area of the grid cell - units = m2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[mpirank] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[blkno] - standard_name = ccpp_block_number - long_name = for explicit data blocking: block number of this block - units = index - dimensions = () - type = integer - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 92f9b6378a801974b8f1bff0c457c052e596104d Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 31 Dec 2019 10:44:25 -0700 Subject: [PATCH 014/404] physics/GFS_rrtmg_pre.F90: turn off cloud effective radii initialization to default values for Thompson MP --- physics/GFS_rrtmg_pre.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index aa1ea039e..b179a74db 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -750,7 +750,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6 .or. & Model%imp_physics == 15) then - if (Model%kdt == 1) then + if (Model%kdt == 1 .and. .not.Model%imp_physics == 8) then Tbd%phy_f3d(:,:,Model%nleffr) = 10. Tbd%phy_f3d(:,:,Model%nieffr) = 50. Tbd%phy_f3d(:,:,Model%nseffr) = 250. From a77488d3801117720d947242196e824a2f6e409c Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 3 Jan 2020 15:53:12 +0000 Subject: [PATCH 015/404] Further bug fixes to tendency accumulation --- physics/GFS_DCNV_generic.F90 | 18 ++++++++---- physics/GFS_DCNV_generic.meta | 16 +++++++++++ physics/GFS_GWD_generic.F90 | 21 ++++++++------ physics/GFS_GWD_generic.meta | 40 ++++++++++++++++++++++++++ physics/cires_ugwp.F90 | 36 +++++++++++++++++++++-- physics/cires_ugwp.meta | 54 +++++++++++++++++++++++++++++++++++ physics/gwdc.f | 11 +++---- physics/ozphys.f | 32 ++++++++++----------- physics/ozphys.meta | 8 ++++++ 9 files changed, 198 insertions(+), 38 deletions(-) diff --git a/physics/GFS_DCNV_generic.F90 b/physics/GFS_DCNV_generic.F90 index 0acfbd19e..eb6e277d5 100644 --- a/physics/GFS_DCNV_generic.F90 +++ b/physics/GFS_DCNV_generic.F90 @@ -17,7 +17,7 @@ end subroutine GFS_DCNV_generic_pre_finalize !! \htmlinclude GFS_DCNV_generic_pre_run.html !! #endif - subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, & + subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, do_ca, & isppt_deep, gu0, gv0, gt0, gq0_water_vapor, & save_u, save_v, save_t, save_qv, ca_deep, & errmsg, errflg) @@ -27,7 +27,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, implicit none integer, intent(in) :: im, levs - logical, intent(in) :: ldiag3d, do_cnvgwd, do_ca, isppt_deep + logical, intent(in) :: ldiag3d, do_cnvgwd, do_ca, isppt_deep, qdiag3d real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0 real(kind=kind_phys), dimension(im,levs), intent(in) :: gv0 real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0 @@ -70,7 +70,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, enddo endif - if (ldiag3d .or. isppt_deep) then + if (( ldiag3d .and. qdiag3d) .or. isppt_deep) then do k=1,levs do i=1,im save_qv(i,k) = gq0_water_vapor(i,k) @@ -95,7 +95,7 @@ end subroutine GFS_DCNV_generic_post_finalize !> \section arg_table_GFS_DCNV_generic_post_run Argument Table !! \htmlinclude GFS_DCNV_generic_post_run.html !! - subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_ca, & + subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, cscnv, do_ca, & isppt_deep, frain, rain1, dtf, cld1d, save_u, save_v, save_t, save_qv, gu0, gv0, gt0, & gq0_water_vapor, ud_mf, dd_mf, dt_mf, con_g, clw_ice, clw_liquid, npdf3d, num_p3d, ncnvcld3d, & rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, & @@ -107,7 +107,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_c implicit none integer, intent(in) :: im, levs - logical, intent(in) :: lssav, ldiag3d, ras, cscnv, do_ca, isppt_deep + logical, intent(in) :: lssav, ldiag3d, ras, cscnv, do_ca, isppt_deep, qdiag3d real(kind=kind_phys), intent(in) :: frain, dtf real(kind=kind_phys), dimension(im), intent(in) :: rain1, cld1d @@ -179,7 +179,6 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_c do k=1,levs do i=1,im dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain -! dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k)-save_qv(i,k)) * frain du3dt(i,k) = du3dt(i,k) + (gu0(i,k)-save_u(i,k)) * frain dv3dt(i,k) = dv3dt(i,k) + (gv0(i,k)-save_v(i,k)) * frain @@ -188,6 +187,13 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_c ! det_mf(i,k) = det_mf(i,k) + dt_mf(i,k) * (con_g*frain) enddo enddo + if(qdiag3d) then + do k=1,levs + do i=1,im + dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k)-save_qv(i,k)) * frain + enddo + enddo + endif endif ! if (ldiag3d) endif ! if (lssav) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index eae53a910..c5c006e88 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -25,6 +25,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F [do_cnvgwd] standard_name = flag_for_convective_gravity_wave_drag long_name = flag for convective gravity wave drag (gwd) @@ -184,6 +192,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F [ras] standard_name = flag_for_ras_deep_convection long_name = flag for ras convection scheme diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index 0915dd170..a90ccecb3 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -19,7 +19,8 @@ subroutine GFS_GWD_generic_pre_run( & & im, levs, nmtvr, mntvar, & & oc, oa4, clx, theta, & & sigma, gamma, elvmax, lssav, ldiag3d, & - & dtdt, dt3dt, dtf, errmsg, errflg) + & dudt, dvdt, dtdt, du3dt, dv3dt, dt3dt, dtf, & + & gwd_generic_tend, errmsg, errflg) use machine, only : kind_phys implicit none @@ -31,10 +32,10 @@ subroutine GFS_GWD_generic_pre_run( & & oc(im), oa4(im,4), clx(im,4), & & theta(im), sigma(im), gamma(im), elvmax(im) - logical, intent(in) :: lssav, ldiag3d - real(kind=kind_phys), intent(in) :: dtdt(im,levs) + logical, intent(in) :: lssav, ldiag3d, gwd_generic_tend + real(kind=kind_phys), intent(in) :: dtdt(im,levs), dudt(im,levs), dvdt(im,levs) ! dt3dt only allocated only if ldiag3d is .true. - real(kind=kind_phys), intent(inout) :: dt3dt(:,:) + real(kind=kind_phys), intent(inout) :: dt3dt(:,:), du3dt(:,:), dv3dt(:,:) real(kind=kind_phys), intent(in) :: dtf character(len=*), intent(out) :: errmsg @@ -91,10 +92,13 @@ subroutine GFS_GWD_generic_pre_run( & endif ! end if_nmtvr if (lssav) then - if (ldiag3d) then + if (ldiag3d .and. gwd_generic_tend) then + write(0,*) 'gwd_generic_tend' do k=1,levs do i=1,im dt3dt(i,k) = dt3dt(i,k) - dtdt(i,k)*dtf + du3dt(i,k) = du3dt(i,k) - dudt(i,k)*dtf + dv3dt(i,k) = dv3dt(i,k) - dvdt(i,k)*dtf enddo enddo endif @@ -125,12 +129,12 @@ end subroutine GFS_GWD_generic_post_init !! \section detailed Detailed Algorithm !! @{ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, dvdt, dtdt, & - & dugwd, dvgwd, du3dt, dv3dt, dt3dt, errmsg, errflg) + & dugwd, dvgwd, du3dt, dv3dt, dt3dt, gwd_generic_tend, errmsg, errflg) use machine, only : kind_phys implicit none - logical, intent(in) :: lssav, ldiag3d + logical, intent(in) :: lssav, ldiag3d, gwd_generic_tend real(kind=kind_phys), intent(in) :: dusfcg(:), dvsfcg(:) real(kind=kind_phys), intent(in) :: dudt(:,:), dvdt(:,:), dtdt(:,:) @@ -150,7 +154,8 @@ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, d dugwd(:) = dugwd(:) + dusfcg(:)*dtf dvgwd(:) = dvgwd(:) + dvsfcg(:)*dtf - if (ldiag3d) then + if (ldiag3d .and. gwd_generic_tend) then + write(0,*) 'gwd_generic_tend' du3dt(:,:) = du3dt(:,:) + dudt(:,:) * dtf dv3dt(:,:) = dv3dt(:,:) + dvdt(:,:) * dtf dt3dt(:,:) = dt3dt(:,:) + dtdt(:,:) * dtf diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 94a4abab1..b87f398ab 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -118,6 +118,20 @@ type = logical intent = in optional = F +[dudt] + standard_name = tendency_of_x_wind_due_to_model_physics + long_name = zonal wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dvdt] + standard_name = tendency_of_y_wind_due_to_model_physics + long_name = meridional wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [dtdt] standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature @@ -127,6 +141,20 @@ kind = kind_phys intent = in optional = F +[du3dt] + standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = cumulative change in x wind due to orographic gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dv3dt] + standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag + long_name = cumulative change in y wind due to orographic gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [dt3dt] standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag @@ -145,6 +173,12 @@ kind = kind_phys intent = in optional = F +[gwd_generic_tend] + standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies + long_name = true if GFS_GWD_generic should calculate tendencies + units = flag + dimensions = () + type = logical [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -287,6 +321,12 @@ kind = kind_phys intent = inout optional = F +[gwd_generic_tend] + standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies + long_name = true if GFS_GWD_generic should calculate tendencies + units = flag + dimensions = () + type = logical [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index c15697e68..1daa10af5 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -149,7 +149,9 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr tau_tofd, tau_mtb, tau_ogw, tau_ngw, zmtb, zlwb, zogw, & dudt_mtb,dudt_ogw, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & dudt, dvdt, dtdt, rdxzb, con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, & - rain, ntke, q_tke, dqdt_tke, lprnt, ipr, errmsg, errflg) + rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & + ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & + ldiag3d, lssav, errmsg, errflg) implicit none @@ -172,6 +174,12 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr real(kind=kind_phys), intent(out), dimension(im) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw real(kind=kind_phys), intent(out), dimension(im, levs):: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis real(kind=kind_phys), intent(out), dimension(im, levs):: dudt_mtb, dudt_ogw, dudt_tms + + ! These arrays are only allocated if ldiag=.true. + real(kind=kind_phys), intent(inout), dimension(im, levs) :: ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw + real(kind=kind_phys), intent(inout), dimension(im, levs) :: ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw + logical, intent(in) :: ldiag3d, lssav + ! These arrays only allocated if ldiag_ugwp = .true. real(kind=kind_phys), intent(out), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms @@ -263,6 +271,18 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr endif ! do_ugwp + + if(ldiag3d .and. lssav) then + do k=1,levs + do i=1,im + ldu3dt_ogw(i,k) = ldu3dt_ogw(i,k) + Pdudt(i,k)*dtp + ldv3dt_ogw(i,k) = ldv3dt_ogw(i,k) + Pdvdt(i,k)*dtp + ldt3dt_ogw(i,k) = ldt3dt_ogw(i,k) + Pdtdt(i,k)*dtp + enddo + enddo + endif + + if (cdmbgwd(3) > 0.0) then ! 2) non-stationary GW-scheme with GMAO/MERRA GW-forcing @@ -338,8 +358,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr dudt_mtb = 0. ; dudt_ogw = 0. ; dudt_tms = 0. endif - return - +#if 0 !============================================================================= ! make "ugwp eddy-diffusion" update for gw_dtdt/gw_dudt/gw_dvdt by solving ! vert diffusion equations & update "Statein%tgrs, Statein%ugrs, Statein%vgrs" @@ -358,6 +377,17 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr gw_dtdt = gw_dtdt*(1.-pked) + ed_dtdt*pked gw_dvdt = gw_dvdt*(1.-pked) + ed_dvdt*pked gw_dudt = gw_dudt*(1.-pked) + ed_dudt*pked +#endif + + if(ldiag3d .and. lssav) then + do k=1,levs + do i=1,im + ldu3dt_cgw(i,k) = ldu3dt_cgw(i,k) + (gw_dudt(i,k) - Pdudt(i,k))*dtp + ldv3dt_cgw(i,k) = ldv3dt_cgw(i,k) + (gw_dvdt(i,k) - Pdvdt(i,k))*dtp + ldt3dt_cgw(i,k) = ldt3dt_cgw(i,k) + (gw_dtdt(i,k) - Pdtdt(i,k))*dtp + enddo + enddo + endif end subroutine cires_ugwp_run diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 7f1118016..005327005 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -850,6 +850,60 @@ type = integer intent = in optional = F +[ldu3dt_ogw] + standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = cumulative change in x wind due to orographic gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[ldv3dt_ogw] + standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag + long_name = cumulative change in y wind due to orographic gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[ldt3dt_ogw] + standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag + long_name = cumulative change in temperature due to orographic gravity wave drag + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[ldu3dt_cgw] + standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag + long_name = cumulative change in x wind due to convective gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[ldv3dt_cgw] + standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag + long_name = cumulative change in y wind due to convective gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[ldt3dt_cgw] + standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag + long_name = cumulative change in temperature due to convective gravity wave drag + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/gwdc.f b/physics/gwdc.f index 9909a3100..ad3aa3bf7 100644 --- a/physics/gwdc.f +++ b/physics/gwdc.f @@ -1498,13 +1498,14 @@ subroutine gwdc_post_run( & if (lssav) then dugwd(:) = dugwd(:) + tauctx(:)*dtf dvgwd(:) = dvgwd(:) + taucty(:)*dtf - - if (ldiag3d) then - du3dt(:,:) = du3dt(:,:) + gwdcu(:,:) * dtf - dv3dt(:,:) = dv3dt(:,:) + gwdcv(:,:) * dtf - endif endif ! end if_lssav + if (ldiag3d) then + write(0,*) 'update gwdc tend' + du3dt(:,:) = du3dt(:,:) + gwdcu(:,:) * dtf + dv3dt(:,:) = dv3dt(:,:) + gwdcv(:,:) * dtf + endif + ! --- ... update the wind components with gwdc tendencies do k = 1, levs diff --git a/physics/ozphys.f b/physics/ozphys.f index 02296ee79..8ca13b99f 100644 --- a/physics/ozphys.f +++ b/physics/ozphys.f @@ -51,7 +51,7 @@ end subroutine ozphys_finalize !> @{ subroutine ozphys_run ( & & ix, im, levs, ko3, dt, oz, tin, po3, & - & prsl, prdout, oz_coeff, delp, ldiag3d, & + & prsl, prdout, oz_coeff, delp, ldiag3d, qdiag3d, & & ozp1, ozp2, ozp3, ozp4, con_g, me, errmsg, errflg) ! ! this code assumes that both prsl and po3 are from bottom to top @@ -72,7 +72,7 @@ subroutine ozphys_run ( & & prsl(ix,levs), tin(ix,levs), delp(ix,levs), & & con_g real :: gravi - logical, intent(in) :: ldiag3d + logical, intent(in) :: ldiag3d, qdiag3d character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -157,12 +157,12 @@ subroutine ozphys_run ( & oz(i,l) = (ozib(i) + prod(i,1)*dt) / (1.0 + prod(i,2)*dt) enddo ! - !if (ldiag3d) then ! ozone change diagnostics - ! do i=1,im - ! ozp1(i,l) = ozp1(i,l) + prod(i,1)*dt - ! ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) - ! enddo - !endif + if (ldiag3d .and. qdiag3d) then ! ozone change diagnostics + do i=1,im + ozp1(i,l) = ozp1(i,l) + prod(i,1)*dt + ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) + enddo + endif endif !> - Calculate the 4 terms of prognostic ozone change during time \a dt: !! - ozp1(:,:) - Ozone production from production/loss ratio @@ -178,14 +178,14 @@ subroutine ozphys_run ( & ! &,' ozib=',ozib(i),' l=',l,' tin=',tin(i,l),'colo3=',colo3(i,l+1) oz(i,l) = (ozib(i) + tem*dt) / (1.0 + prod(i,2)*dt) enddo - !if (ldiag3d) then ! ozone change diagnostics - ! do i=1,im - ! ozp1(i,l) = ozp1(i,l) + prod(i,1)*dt - ! ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) - ! ozp3(i,l) = ozp3(i,l) + prod(i,3)*tin(i,l)*dt - ! ozp4(i,l) = ozp4(i,l) + prod(i,4)*colo3(i,l+1)*dt - ! enddo - !endif + if(ldiag3d .and. qdiag3d) then + do i=1,im + ozp1(i,l) = ozp1(i,l) + prod(i,1)*dt + ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) + ozp3(i,l) = ozp3(i,l) + prod(i,3)*tin(i,l)*dt + ozp4(i,l) = ozp4(i,l) + prod(i,4)*colo3(i,l+1)*dt + enddo + endif endif enddo ! vertical loop diff --git a/physics/ozphys.meta b/physics/ozphys.meta index 9f7a3870d..8cce5c266 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -147,6 +147,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F [ozp1] standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate long_name = cumulative change in ozone concentration due to production and loss rate From 6dcc757eaad3fe85a6b90e0041d305cc533d8b8e Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sun, 5 Jan 2020 20:26:24 -0700 Subject: [PATCH 016/404] physics/mp_thompson.F90: bugfix, initialize nr_mp from nr and not from ni --- physics/mp_thompson.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index 7fd709b13..c01cab210 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -217,7 +217,7 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, & !> - Convert number concentrations from moist to dry ni_mp = ni/(1.0_kind_phys-spechum) - nr_mp = ni/(1.0_kind_phys-spechum) + nr_mp = nr/(1.0_kind_phys-spechum) if (is_aerosol_aware) then nc_mp = nc/(1.0_kind_phys-spechum) end if From 1c6cad52ef65d4b7d01bbe9ce9fe93e71129180a Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Mon, 6 Jan 2020 10:52:21 -0700 Subject: [PATCH 017/404] Number Concentrated code moved to interstitial code --- physics/GFS_DCNV_generic.F90 | 20 ++++++--- physics/GFS_DCNV_generic.meta | 25 +++++++++++ physics/GFS_suite_interstitial.F90 | 64 ++++++++++++++++++----------- physics/GFS_suite_interstitial.meta | 45 ++++++++++++++++++++ physics/cu_gf_driver.F90 | 26 ------------ physics/cu_gf_driver.meta | 59 -------------------------- 6 files changed, 125 insertions(+), 114 deletions(-) diff --git a/physics/GFS_DCNV_generic.F90 b/physics/GFS_DCNV_generic.F90 index 0acfbd19e..02230904c 100644 --- a/physics/GFS_DCNV_generic.F90 +++ b/physics/GFS_DCNV_generic.F90 @@ -17,16 +17,17 @@ end subroutine GFS_DCNV_generic_pre_finalize !! \htmlinclude GFS_DCNV_generic_pre_run.html !! #endif - subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, & - isppt_deep, gu0, gv0, gt0, gq0_water_vapor, & - save_u, save_v, save_t, save_qv, ca_deep, & - errmsg, errflg) + subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, & + isppt_deep, imp_physics, imp_physics_thompson, & + gu0, gv0, gt0, gq0_water_vapor, & + save_u, save_v, save_t, save_tcp, save_qv, & + ca_deep, errmsg, errflg) use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs + integer, intent(in) :: im, levs, imp_physics, imp_physics_thompson logical, intent(in) :: ldiag3d, do_cnvgwd, do_ca, isppt_deep real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0 real(kind=kind_phys), dimension(im,levs), intent(in) :: gv0 @@ -35,6 +36,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_u real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_v real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_t + real(kind=kind_phys), dimension(im,levs), intent(out), optional :: save_tcp real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_qv real(kind=kind_phys), dimension(im), intent(in) :: ca_deep character(len=*), intent(out) :: errmsg @@ -70,6 +72,14 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, enddo endif + if (imp_physics == imp_physics_thompson) then + do k=1,levs + do i=1,im + save_tcp(i,k) = gt0(i,k) + enddo + enddo + endif + if (ldiag3d .or. isppt_deep) then do k=1,levs do i=1,im diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index eae53a910..65c44e53b 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -49,6 +49,22 @@ type = logical intent = in optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_thompson] + standard_name = flag_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [gu0] standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics @@ -112,6 +128,15 @@ kind = kind_phys intent = inout optional = F +[save_tcp] + standard_name = air_temperature_save_from_cumulus_paramterization + long_name = air temperature after cumulus parameterization + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T [save_qv] standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 1e8545e98..79b14c18e 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -662,9 +662,10 @@ end subroutine GFS_suite_interstitial_4_finalize subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_total, ntrac, ntcw, ntiw, ntclamt, & ntrw, ntsw, ntrnc, ntsnc, ntgl, ntgnc, ntlnc, ntinc, nn, imp_physics, imp_physics_gfdl, imp_physics_thompson, & imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, dtf, save_qc, save_qi, con_pi, & - gq0, clw, dqdti, imfdeepcnv, imfdeepcnv_gf, errmsg, errflg) + gq0, clw, prsl, save_tcp, con_rd, nwfa, spechum, dqdti, imfdeepcnv, imfdeepcnv_gf, errmsg, errflg) use machine, only: kind_phys + use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber implicit none @@ -683,6 +684,11 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to real(kind=kind_phys), dimension(im,levs,ntrac), intent(inout) :: gq0 real(kind=kind_phys), dimension(im,levs,nn), intent(inout) :: clw + real(kind=kind_phys), dimension(im,levs), intent(in) :: prsl + real(kind=kind_phys), intent(in) :: con_rd + real(kind=kind_phys), dimension(im,levs), intent(in), optional :: nwfa, save_tcp + real(kind=kind_phys), dimension(im,levs), intent(in) :: spechum + ! dqdti may not be allocated real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti @@ -693,10 +699,12 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to ! local variables integer :: i,k,n,tracers - real(kind=kind_phys) :: liqm, icem - - liqm = 4./3.*con_pi*1.e-12 - icem = 4./3.*con_pi*3.2768*1.e-14*890. + real(kind=kind_phys), dimension(im,levs) :: rho_dryar + real(kind=kind_phys), dimension(im,levs) :: qv_mp !< kg kg-1 (dry mixing ratio) + real(kind=kind_phys), dimension(im,levs) :: qc_mp !< kg kg-1 (dry mixing ratio) + real(kind=kind_phys), dimension(im,levs) :: qi_mp !< kg kg-1 (dry mixing ratio) + real(kind=kind_phys), dimension(im,levs) :: nc_mp !< kg-1 (dry mixing ratio) + real(kind=kind_phys), dimension(im,levs) :: ni_mp !< kg-1 (dry mixing ratio) ! Initialize CCPP error handling variables errmsg = '' @@ -729,6 +737,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to imp_physics == imp_physics_zhao_carr_pdf .or. & imp_physics == imp_physics_gfdl) then gq0(1:im,:,ntcw) = clw(1:im,:,1) + clw(1:im,:,2) + elseif (ntiw > 0) then do k=1,levs do i=1,im @@ -736,25 +745,31 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to gq0(i,k,ntcw) = clw(i,k,2) ! water enddo enddo -! if (imp_physics == imp_physics_thompson) then - if (imp_physics == imp_physics_thompson .and. imfdeepcnv /= imfdeepcnv_gf) then - if (ltaerosol) then - do k=1,levs - do i=1,im - gq0(i,k,ntlnc) = gq0(i,k,ntlnc) & - + max(0.0, (clw(i,k,2)-save_qc(i,k))) / liqm - gq0(i,k,ntinc) = gq0(i,k,ntinc) & - + max(0.0, (clw(i,k,1)-save_qi(i,k))) / icem - enddo - enddo - else - do k=1,levs - do i=1,im - gq0(i,k,ntinc) = gq0(i,k,ntinc) & - + max(0.0, (clw(i,k,1)-save_qi(i,k))) / icem - enddo - enddo - endif + + if (imp_physics == imp_physics_thompson) then + do k=1,levs + do i=1,im + !> - Density of air in kg m-3 + rho_dryar(i,k) = prsl(i,k)/(con_rd*save_tcp(i,k)) + + !> - Convert specific humidity/moist mixing ratios to dry mixing ratios + qv_mp(i,k) = spechum(i,k)/(1.0_kind_phys-spechum(i,k)) + qc_mp(i,k) = save_qc(i,k)/(1.0_kind_phys-spechum(i,k)) + qi_mp(i,k) = save_qi(i,k)/(1.0_kind_phys-spechum(i,k)) + + !> - Convert number concentrations from moist to dry + nc_mp(i,k) = gq0(i,k,ntlnc)/(1.0_kind_phys-spechum(i,k)) + ni_mp(i,k) = gq0(i,k,ntinc)/(1.0_kind_phys-spechum(i,k)) + + + nc_mp(i,k) = nc_mp(i,k) + max(0.0, make_DropletNumber(qc_mp(i,k) * rho_dryar(i,k), nwfa(i,k)) * (1.0/rho_dryar(i,k))) + ni_mp(i,k) = ni_mp(i,k) + max(0.0, make_IceNumber(qi_mp(i,k) * rho_dryar(i,k), save_tcp(i,k)) * (1.0/rho_dryar(i,k))) + + !> - Convert number concentrations from dry to moist + gq0(i,k,ntlnc) = nc_mp(i,k)/(1.0_kind_phys+qv_mp(i,k)) + gq0(i,k,ntinc) = ni_mp(i,k)/(1.0_kind_phys+qv_mp(i,k)) + enddo + enddo endif else @@ -764,6 +779,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to enddo enddo endif ! end if_ntiw + else do k=1,levs do i=1,im diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index e6e349a2a..7316bb048 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1692,6 +1692,51 @@ kind = kind_phys intent = inout optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[save_tcp] + standard_name = air_temperature_save_from_cumulus_paramterization + long_name = air temperature after cumulus parameterization + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = T +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[nwfa] + standard_name = water_friendly_aerosol_number_concentration + long_name = number concentration of water-friendly aerosols + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = T +[spechum] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [dqdti] standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection long_name = instantaneous moisture tendency due to convection diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 53e26fb46..70d1ce799 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -9,7 +9,6 @@ module cu_gf_driver use machine , only: kind_phys use cu_gf_deep, only: cu_gf_deep_run,neg_check,autoconv,aeroevap,fct1d3 use cu_gf_sh , only: cu_gf_sh_run - use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber implicit none @@ -74,7 +73,6 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & us,vs,t2di,w,qv2di_spechum,p2di,psuri, & hbot,htop,kcnv,xland,hfx2,qfx2,cliw,clcw, & pbl,ud_mf,dd_mf,dt_mf,cnvw_moist,cnvc,imfshalcnv, & - nwfa,con_rd,gq0,ntinc,ntlnc,imp_physics,imp_physics_thompson, & errmsg,errflg) !------------------------------------------------------------- implicit none @@ -126,12 +124,6 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & real(kind=kind_phys), dimension( im ),intent(in) :: garea real(kind=kind_phys), intent(in ) :: dt -! additional variables for number concentrations - real(kind=kind_phys), intent(in) :: nwfa(1:im,1:km) - real(kind=kind_phys), intent(in) :: con_rd - real(kind=kind_phys), dimension(im,km,ntracer), intent(inout) :: gq0 - integer, intent(in) :: imp_physics,imp_physics_thompson,ntlnc,ntinc - integer, intent(in ) :: imfshalcnv character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -826,26 +818,8 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & cliw(i,k) = max(0.,cliw(i,k) + tem) endif -! -!> calculate cloud water and cloud ice number concentrations -! - rho_dryar(i,k) = p2di(i,k)/(con_rd*t(i,k)) ! Density of dry air in kg m-3 - if (imp_physics == imp_physics_thompson) then - if ((tem*tem1)>1.e-5) then - gq0(i,k,ntinc) = max(0., gq0(i,k,ntinc) + & - make_IceNumber(tem*tem1*rho_dryar(i,k), t(i,k)) * & - (1/rho_dryar(i,k))) - end if - if ((tem*(1-tem1))>1.e-5) then - gq0(i,k,ntlnc) = max(0., gq0(i,k,ntlnc) + & - make_DropletNumber(tem*(1-tem1)*rho_dryar(i,k), nwfa(i,k)) & - * (1/rho_dryar(i,k))) - end if - end if - enddo - gdc(i,1,10)=forcing(i,1) gdc(i,2,10)=forcing(i,2) gdc(i,3,10)=forcing(i,3) diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index d3687a352..0733b603d 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -358,65 +358,6 @@ type = integer intent = in optional = F -[nwfa] - standard_name = water_friendly_aerosol_number_concentration - long_name = number concentration of water-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[con_rd] - standard_name = gas_constant_dry_air - long_name = ideal gas constant for dry air - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[gq0] - standard_name = tracer_concentration_updated_by_physics - long_name = tracer concentration updated by physics - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = inout - optional = F -[ntinc] - standard_name = index_for_ice_cloud_number_concentration - long_name = tracer index for ice number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntlnc] - standard_name = index_for_liquid_cloud_number_concentration - long_name = tracer index for liquid number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme - long_name = choice of Thompson microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From a227ad0d7e4c67e7ad6e74b770e4786f189af008 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Mon, 6 Jan 2020 19:54:18 +0000 Subject: [PATCH 018/404] fix several bugs mentioned in code review --- physics/GFS_GWD_generic.F90 | 2 -- physics/GFS_GWD_generic.meta | 5 +++++ physics/GFS_MP_generic.F90 | 16 +++++++++++++--- physics/GFS_MP_generic.meta | 9 +++++++++ physics/cires_ugwp.meta | 7 +++++++ physics/gwdc.f | 1 - 6 files changed, 34 insertions(+), 6 deletions(-) diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index a90ccecb3..f05fa508f 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -93,7 +93,6 @@ subroutine GFS_GWD_generic_pre_run( & if (lssav) then if (ldiag3d .and. gwd_generic_tend) then - write(0,*) 'gwd_generic_tend' do k=1,levs do i=1,im dt3dt(i,k) = dt3dt(i,k) - dtdt(i,k)*dtf @@ -155,7 +154,6 @@ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, d dvgwd(:) = dvgwd(:) + dvsfcg(:)*dtf if (ldiag3d .and. gwd_generic_tend) then - write(0,*) 'gwd_generic_tend' du3dt(:,:) = du3dt(:,:) + dudt(:,:) * dtf dv3dt(:,:) = dv3dt(:,:) + dvdt(:,:) * dtf dt3dt(:,:) = dt3dt(:,:) + dtdt(:,:) * dtf diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index b87f398ab..782adfa59 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -125,6 +125,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [dvdt] standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics @@ -132,6 +133,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [dtdt] standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature @@ -148,6 +150,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [dv3dt] standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag @@ -155,6 +158,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [dt3dt] standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag @@ -179,6 +183,7 @@ units = flag dimensions = () type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index ea2ef6c16..521a8b6ac 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -16,7 +16,7 @@ end subroutine GFS_MP_generic_pre_init !> \section arg_table_GFS_MP_generic_pre_run Argument Table !! \htmlinclude GFS_MP_generic_pre_run.html !! - subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_q, errmsg, errflg) + subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_qv, save_q, errmsg, errflg) ! use machine, only: kind_phys @@ -26,7 +26,7 @@ subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0 real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0 - real(kind=kind_phys), dimension(im, levs), intent(inout) :: save_t + real(kind=kind_phys), dimension(im, levs), intent(inout) :: save_t, save_qv real(kind=kind_phys), dimension(im, levs, ntrac), intent(inout) :: save_q character(len=*), intent(out) :: errmsg @@ -44,7 +44,17 @@ subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, save_t(i,k) = gt0(i,k) enddo enddo - if(do_aw .or. (qdiag3d .and. ldiag3d)) then + if(qdiag3d) then + do k=1,levs + do i=1,im + ! Here, gq0(...,1) is used instead of gq0_water_vapor + ! to be consistent with the GFS_MP_generic_post_run + ! code. + save_qv(i,k) = gq0(i,k,1) + enddo + enddo + endif + if(do_aw) then save_q(1:im,:,1) = gq0(1:im,:,1) do n=ntcw,ntcw+nncl-1 save_q(1:im,:,n) = gq0(1:im,:,n) diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 1ac030bc7..3c8574f95 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -97,6 +97,15 @@ kind = kind_phys intent = inout optional = F +[save_qv] + standard_name = water_vapor_specific_humidity_save + long_name = water vapor specific humidity before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F [save_q] standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 005327005..32c64145f 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -857,6 +857,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [ldv3dt_ogw] standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag @@ -864,6 +865,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [ldt3dt_ogw] standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag @@ -871,6 +873,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [ldu3dt_cgw] standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in x wind due to convective gravity wave drag @@ -878,6 +881,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [ldv3dt_cgw] standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in y wind due to convective gravity wave drag @@ -885,6 +889,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [ldt3dt_cgw] standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag long_name = cumulative change in temperature due to convective gravity wave drag @@ -892,6 +897,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -904,6 +910,7 @@ units = flag dimensions = () type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/gwdc.f b/physics/gwdc.f index ad3aa3bf7..314aa4d44 100644 --- a/physics/gwdc.f +++ b/physics/gwdc.f @@ -1501,7 +1501,6 @@ subroutine gwdc_post_run( & endif ! end if_lssav if (ldiag3d) then - write(0,*) 'update gwdc tend' du3dt(:,:) = du3dt(:,:) + gwdcu(:,:) * dtf dv3dt(:,:) = dv3dt(:,:) + gwdcv(:,:) * dtf endif From ff02358faa89878ac2d9c8d934bfd0cba96fba93 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 10 Jan 2020 13:03:38 -0700 Subject: [PATCH 019/404] Bugfix for bit-for-bit identical restart runs --- physics/mp_thompson.F90 | 43 ++++++++++++++++++++++++++-------------- physics/mp_thompson.meta | 26 +++++++++++++++--------- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index c01cab210..4ecbc47df 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -27,7 +27,7 @@ module mp_thompson !! \section arg_table_mp_thompson_init Argument Table !! \htmlinclude mp_thompson_init.html !! - subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, & + subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & imp_physics, imp_physics_thompson, & spechum, qc, qr, qi, qs, qg, ni, nr, & is_aerosol_aware, nc, nwfa2d, nifa2d, & @@ -39,11 +39,12 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, & implicit none ! Interface variables - integer, intent(in) :: ncol - integer, intent(in) :: nlev - real(kind_phys), intent(in) :: con_g, con_rd - integer, intent(in) :: imp_physics - integer, intent(in) :: imp_physics_thompson + integer, intent(in ) :: ncol + integer, intent(in ) :: nlev + real(kind_phys), intent(in ) :: con_g, con_rd + logical, intent(in ) :: restart + integer, intent(in ) :: imp_physics + integer, intent(in ) :: imp_physics_thompson ! Hydrometeors real(kind_phys), intent(inout) :: spechum(:,:) real(kind_phys), intent(inout) :: qc(:,:) @@ -66,16 +67,16 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, & real(kind_phys), intent(in ) :: phil(:,:) real(kind_phys), intent(in ) :: area(:) ! Cloud effective radii - real(kind_phys), optional, intent( out) :: re_cloud(:,:) - real(kind_phys), optional, intent( out) :: re_ice(:,:) - real(kind_phys), optional, intent( out) :: re_snow(:,:) + real(kind_phys), optional, intent(inout) :: re_cloud(:,:) + real(kind_phys), optional, intent(inout) :: re_ice(:,:) + real(kind_phys), optional, intent(inout) :: re_snow(:,:) ! MPI information - integer, intent(in) :: mpicomm - integer, intent(in) :: mpirank - integer, intent(in) :: mpiroot + integer, intent(in ) :: mpicomm + integer, intent(in ) :: mpirank + integer, intent(in ) :: mpiroot ! Threading/blocking information - integer, intent(in) :: threads - integer, intent(in) :: blkno + integer, intent(in ) :: threads + integer, intent(in ) :: blkno ! CCPP error handling character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg @@ -174,6 +175,12 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, & if (errflg /= 0) return end if + ! For restart runs, the init is done here + if (restart) then + is_initialized = .true. + return + end if + ! Fix initial values of hydrometeors where(spechum<0) spechum = 0.0 where(qc<0) qc = 0.0 @@ -361,7 +368,7 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, & do k = 1, nlev re_cloud(i,k) = 2.49E-6 re_ice(i,k) = 4.99E-6 - re_snow(i,k) = 9.99E-6 + re_snow(i,k) = 9.99E-6 end do end do do i = 1, ncol @@ -376,6 +383,12 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, & re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) end do end do + ! Convert to micron: required for bit-for-bit identical restarts; + ! otherwise entering mp_thompson_init and converting mu to m and + ! back (without updating re_*) introduces b4b differences. + re_cloud = 1.0E6*re_cloud + re_ice = 1.0E6*re_ice + re_snow = 1.0E6*re_snow else if (.not.present(re_cloud) .and. .not.present(re_ice) .and. .not.present(re_snow)) then ! Do nothing else diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 80e368228..0419a6c15 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -35,6 +35,14 @@ kind = kind_phys intent = in optional = F +[restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F [imp_physics] standard_name = flag_for_microphysics_scheme long_name = choice of microphysics scheme @@ -214,30 +222,30 @@ optional = F [re_cloud] standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - long_name = eff. radius of cloud liquid water particle in micrometer (meter here) - units = m + long_name = eff. radius of cloud liquid water particle in micrometer + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = T [re_ice] standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um - long_name = eff. radius of cloud ice water particle in micrometer (meter here) - units = m + long_name = eff. radius of cloud ice water particle in micrometer + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = T [re_snow] standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um - long_name = effective radius of cloud snow particle in micrometer (meter here) - units = m + long_name = effective radius of cloud snow particle in micrometer + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = T [mpicomm] standard_name = mpi_comm From 4367882dcf5da5e9086c19f11be35d38005cc017 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Tue, 14 Jan 2020 01:21:35 +0000 Subject: [PATCH 020/404] Move PBL tendencies into the PBL run subroutine. --- physics/GFS_PBL_generic.F90 | 5 +-- physics/GFS_PBL_generic.meta | 7 ++++ physics/moninedmf.f | 36 ++++++++++++++++--- physics/moninedmf.meta | 67 ++++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 6 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index d31dbafec..cd4a30849 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -281,7 +281,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, trans_aero, ntchs, ntchm, & imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_mg, & imp_physics_fer_hires, & - ltaerosol, cplflx, cplchm, lssav, ldiag3d, qdiag3d, lsidea, hybedmf, do_shoc, satmedmf, shinhong, do_ysu, & + ltaerosol, cplflx, cplchm, lssav, pbl_generic_tend, ldiag3d, qdiag3d, lsidea, hybedmf, do_shoc, satmedmf, shinhong, do_ysu, & dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, & dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, & dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, & @@ -301,6 +301,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, qdiag3d, lsidea logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu + logical, intent(in) :: pbl_generic_tend real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), intent(in) :: rd, cp, fvirt, hvap @@ -552,7 +553,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! & dtf,' kdt=',kdt,' lat=',lat ! endif - if (ldiag3d) then + if (ldiag3d .and. pbl_generic_tend) then if (lsidea) then dt3dt(1:im,:) = dt3dt(1:im,:) + dtdt(1:im,:)*dtf else diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index ae86b0dce..4256049dd 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -601,6 +601,13 @@ type = logical intent = in optional = F +[pbl_generic_tend] + standard_name = true_if_GFS_PBL_generic_should_calculate_tendencies + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in [lssav] standard_name = flag_diagnostics long_name = logical flag for storing diagnostics diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 1084aa426..2bd19580a 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -64,7 +64,9 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & prsi,del,prsl,prslk,phii,phil,delt,dspheat, & & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & - & xkzminv,moninq_fac,errmsg,errflg) + & xkzminv,moninq_fac,lssav,ldiag3d,qdiag3d,lsidea,ntoz, & + & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL, & + & errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -74,16 +76,18 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! ! arguments ! - logical, intent(in) :: lprnt + logical, intent(in) :: lprnt,lssav,ldiag3d,qdiag3d,lsidea integer, intent(in) :: ipr - integer, intent(in) :: ix, im, km, ntrac, ntcw, kinver(im) + integer, intent(in) :: ix, im, km, ntrac, ntcw, kinver(im), ntoz integer, intent(out) :: kpbl(im) ! real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tau(im,km), rtg(im,km,ntrac) + & tau(im,km), rtg(im,km,ntrac)\ + real(kind=kind_phys), intent(inout), dimension(ix,km) :: & + & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL real(kind=kind_phys), intent(in) :: & & u1(ix,km), v1(ix,km), & & t1(ix,km), q1(ix,km,ntrac), & @@ -1037,6 +1041,17 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & rtg(i,k,1) = rtg(i,k,1)+qtend dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend + if(lssav .and. ldiag3d) then + if(lsidea) then + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*rdt + else + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + & + & ((ttend-hlw(i,k)-hsw(i,k)*xmu(i))*rdt) + endif + if(qdiag3d) then + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*rdt + endif + endif enddo enddo if(ntrac >= 2) then @@ -1049,6 +1064,15 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo enddo enddo + if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d) then + is = (ntoz-1) * km + do k = 1, km + do i = 1, im + qtend = (a2(i,k+is)-q1(i,k,kk))*rdt + do3dt(i,k,kk) = do3dt(i,k,kk)+qtend + enddo + enddo + endif endif ! ! compute tke dissipation rate @@ -1150,6 +1174,10 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & dv(i,k) = dv(i,k) + vtend dusfc(i) = dusfc(i) + conw*del(i,k)*utend dvsfc(i) = dvsfc(i) + conw*del(i,k)*vtend + if(lssav .and. ldiag3d) then + du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*delt + dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*delt + endif ! ! for dissipative heating for ecmwf model ! diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 47875640f..2027008fc 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -499,6 +499,73 @@ kind = kind_phys intent = in optional = F +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[lsidea] + standard_name = flag_idealized_physics + long_name = flag for idealized physics + units = flag + dimensions = () + type = logical +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[du3dt_PBL] + standard_name = cumulative_change_in_x_wind_due_to_PBL + long_name = cumulative change in x wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_PBL] + standard_name = cumulative_change_in_y_wind_due_to_PBL + long_name = cumulative change in y wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dt3dt_PBL] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_PBL] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 2850217b2efafbda2cafa8a9b01af82348ee2cda Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Tue, 14 Jan 2020 01:26:13 +0000 Subject: [PATCH 021/404] add a missing intent(in) to physics/moninedmf.meta --- physics/moninedmf.meta | 1 + 1 file changed, 1 insertion(+) diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 2027008fc..07b389219 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -526,6 +526,7 @@ units = flag dimensions = () type = logical + intent = in [ntoz] standard_name = index_for_ozone long_name = tracer index for ozone mixing ratio From d5a527841cfb07f0fe94f6fd2816264c39060655 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 16 Jan 2020 00:33:10 +0000 Subject: [PATCH 022/404] add ldiag3d and qdiag3d support to physics/module_MYNNPBL_wrapper.F90 and physics/moninedmf.f --- physics/module_MYNNPBL_wrapper.F90 | 126 ++++++++++++++++++---------- physics/module_MYNNPBL_wrapper.meta | 38 +++++++-- physics/moninedmf.f | 10 +-- physics/moninedmf.meta | 8 ++ 4 files changed, 123 insertions(+), 59 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 36c9e55de..471c99f50 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -25,7 +25,7 @@ end subroutine mynnedmf_wrapper_finalize SUBROUTINE mynnedmf_wrapper_run( & & ix,im,levs, & & flag_init,flag_restart, & - & lssav, ldiag3d, lsidea, & + & lssav, ldiag3d, qdiag3d, lsidea,& & delt,dtf,dx,zorl, & & phii,u,v,omega,t3d, & & qgrs_water_vapor, & @@ -56,7 +56,8 @@ SUBROUTINE mynnedmf_wrapper_run( & & dqdt_ice_cloud, dqdt_ozone, & & dqdt_cloud_droplet_num_conc, dqdt_ice_num_conc, & & dqdt_water_aer_num_conc, dqdt_ice_aer_num_conc, & - & dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, & + & du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, & + & do3dt_PBL, dq3dt_PBL, dt3dt_PBL, & & htrsw, htrlw, xmu, & & grav_settling, bl_mynn_tkebudget, bl_mynn_tkeadvect, & & bl_mynn_cloudpdf, bl_mynn_mixlength, & @@ -154,7 +155,7 @@ SUBROUTINE mynnedmf_wrapper_run( & character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - LOGICAL, INTENT(IN) :: lssav, ldiag3d, lsidea + LOGICAL, INTENT(IN) :: lssav, ldiag3d, lsidea, qdiag3d ! NAMELIST OPTIONS (INPUT): LOGICAL, INTENT(IN) :: bl_mynn_tkeadvect, ltaerosol, & lprnt, do_mynnsfclay @@ -224,8 +225,9 @@ SUBROUTINE mynnedmf_wrapper_run( & & RTHRATEN real(kind=kind_phys), dimension(im,levs), intent(out) :: & & Tsq, Qsq, Cov, exch_h, exch_m - real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, & - & du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD + real(kind=kind_phys), dimension(:,:), intent(inout) :: & + & du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, & + & do3dt_PBL, dq3dt_PBL, dt3dt_PBL real(kind=kind_phys), dimension(im), intent(in) :: xmu real(kind=kind_phys), dimension(im, levs), intent(in) :: htrsw, htrlw !LOCAL @@ -285,7 +287,7 @@ SUBROUTINE mynnedmf_wrapper_run( & endif ! Assign variables for each microphysics scheme - if (imp_physics == imp_physics_wsm6) then + init_if_imp_physics: if (imp_physics == imp_physics_wsm6) then ! WSM6 FLAG_QI = .true. FLAG_QNI= .false. @@ -314,7 +316,7 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo elseif (imp_physics == imp_physics_thompson) then ! Thompson - if(ltaerosol) then + tmp_init_if_aer: if(ltaerosol) then FLAG_QI = .true. FLAG_QNI= .true. FLAG_QC = .true. @@ -366,7 +368,7 @@ SUBROUTINE mynnedmf_wrapper_run( & qnifa(i,k) = 0. enddo enddo - endif + endif tmp_init_if_aer elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP FLAG_QI = .true. @@ -420,7 +422,7 @@ SUBROUTINE mynnedmf_wrapper_run( & qnifa(i,k) = 0. enddo enddo - endif + endif init_if_imp_physics if (lprnt)write(0,*)"prepping MYNN-EDMF variables..." @@ -436,7 +438,7 @@ SUBROUTINE mynnedmf_wrapper_run( & pattern_spp_pbl(i,k)=0.0 enddo enddo - do i=1,im + big_init_i_loop: do i=1,im if (slmsk(i)==1. .or. slmsk(i)==2.) then !sea/land/ice mask (=0/1/2) in FV3 xland(i)=1.0 !but land/water = (1/2) in SFCLAY_mynn else @@ -479,9 +481,9 @@ SUBROUTINE mynnedmf_wrapper_run( & ! qsfc(i)=qss(i) ! ps(i)=pgr(i) ! wspd(i)=wind(i) - enddo + enddo big_init_i_loop - if (lprnt) then + lprnt_before: if (lprnt) then print* write(0,*)"===CALLING mynn_bl_driver; input:" print*,"bl_mynn_tkebudget=",bl_mynn_tkebudget," bl_mynn_tkeadvect=",bl_mynn_tkeadvect @@ -518,7 +520,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !print*,"exch_h:",exch_h(1,1),exch_h(1,2),exch_h(1,levs) ! - intent(out) !print*,"exch_m:",exch_m(1,1),exch_m(1,2),exch_m(1,levs) ! - intent(out) print*,"max cf_bl:",maxval(cldfra_bl(1,:)) - endif + endif lprnt_before CALL mynn_bl_driver( & @@ -591,6 +593,26 @@ SUBROUTINE mynnedmf_wrapper_run( & dvdt(i,k) = dvdt(i,k) + RVBLTEN(i,k) enddo enddo + accum_duvt3dt: if(lssav) then + if(ldiag3d) then + do k = 1, levs + do i = 1, im + du3dt_PBL(i,k) = du3dt_PBL(i,k) + RUBLTEN(i,k)*dtf + dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + RVBLTEN(i,k)*dtf + enddo + enddo + endif + if_lsidea: if (lsidea) then + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + RTHBLTEN(i,k)*exner(i,k)*dtf + elseif(ldiag3d) then + do k=1,levs + do i=1,im + tem = RTHBLTEN(i,k)*exner(i,k) - (htrlw(i,k)+htrsw(i,k)*xmu(i)) + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + tem*dtf + enddo + enddo + endif if_lsidea + endif accum_duvt3dt !Update T, U and V: !do k = 1, levs ! do i = 1, im @@ -601,7 +623,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !enddo !DO moist/scalar/tracer tendencies: - if (imp_physics == imp_physics_wsm6) then + if_imp_physics: if (imp_physics == imp_physics_wsm6) then ! WSM6 do k=1,levs do i=1,im @@ -611,6 +633,13 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo + if(lssav .and. ldiag3d .and. qdiag3d) then + do k=1,levs + do i=1,im + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf + enddo + enddo + endif !Update moist species: !do k=1,levs ! do i=1,im @@ -622,8 +651,8 @@ SUBROUTINE mynnedmf_wrapper_run( & !enddo elseif (imp_physics == imp_physics_thompson) then ! Thompson-Aerosol - if(ltaerosol) then - do k=1,levs + thmp_if_ltaerosol: if(ltaerosol) then + thmp_aer_tend: do k=1,levs do i=1,im dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) @@ -634,7 +663,14 @@ SUBROUTINE mynnedmf_wrapper_run( & dqdt_water_aer_num_conc(i,k) = RQNWFABLTEN(i,k) dqdt_ice_aer_num_conc(i,k) = RQNIFABLTEN(i,k) enddo - enddo + enddo thmp_aer_tend + if(lssav .and. ldiag3d .and. qdiag3d) then + do k=1,levs + do i=1,im + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf + enddo + enddo + endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -649,7 +685,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !enddo else !Thompson (2008) - do k=1,levs + thmp_noaer_tend: do k=1,levs do i=1,im dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) @@ -657,7 +693,14 @@ SUBROUTINE mynnedmf_wrapper_run( & dqdt_ice_num_conc(i,k) = RQNIBLTEN(i,k) !dqdt_ozone(i,k) = 0.0 enddo - enddo + enddo thmp_noaer_tend + if(lssav .and. ldiag3d .and. qdiag3d) then + do k=1,levs + do i=1,im + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf + enddo + enddo + endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -667,10 +710,10 @@ SUBROUTINE mynnedmf_wrapper_run( & ! !dqdt_ozone(i,k) = 0.0 ! enddo !enddo - endif !end thompson choice + endif thmp_if_ltaerosol !end thompson choice elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP - do k=1,levs + gfdl_mp_tend: do k=1,levs do i=1,im dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) @@ -680,7 +723,14 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_graupel(i,k) = 0.0 !dqdt_ozone(i,k) = 0.0 enddo - enddo + enddo gfdl_mp_tend + if(lssav .and. ldiag3d .and. qdiag3d) then + do k=1,levs + do i=1,im + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf + enddo + enddo + endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -702,30 +752,16 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo - endif - - if (lssav .and. ldiag3d) then - if (lsidea) then - dt3dt(1:im,:) = dt3dt(1:im,:) + dtdt(1:im,:)*dtf - else - do k=1,levs - do i=1,im - tem = dtdt(i,k) - (htrlw(i,k)+htrsw(i,k)*xmu(i)) - dt3dt(i,k) = dt3dt(i,k) + tem*dtf + if(lssav .and. ldiag3d .and. qdiag3d) then + do k=1,levs + do i=1,im + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf + enddo enddo - enddo - endif - do k=1,levs - do i=1,im - du3dt_PBL(i,k) = du3dt_PBL(i,k) + dudt(i,k) * dtf - du3dt_OGWD(i,k) = du3dt_OGWD(i,k) - dudt(i,k) * dtf - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + dvdt(i,k) * dtf - dv3dt_OGWD(i,k) = dv3dt_OGWD(i,k) - dvdt(i,k) * dtf - enddo - enddo - endif + endif + endif if_imp_physics - if (lprnt) then + lprnt_after: if (lprnt) then print* print*,"===Finished with mynn_bl_driver; output:" print*,"T:",t3d(1,1),t3d(1,2),t3d(1,levs) @@ -764,7 +800,7 @@ SUBROUTINE mynnedmf_wrapper_run( & print*,"ktop_shallow:",ktop_shallow(1)," maxmf:",maxmf(1) print*,"nup:",nupdraft(1) print* - endif + endif lprnt_after END SUBROUTINE mynnedmf_wrapper_run diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 61a9ccb70..68de977c5 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -57,6 +57,12 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical [lsidea] standard_name = flag_idealized_physics long_name = flag for idealized physics @@ -692,15 +698,6 @@ kind = kind_phys intent = inout optional = F -[dt3dt] - standard_name = cumulative_change_in_temperature_due_to_PBL - long_name = cumulative change in temperature due to PBL - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [du3dt_PBL] standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL @@ -737,6 +734,29 @@ kind = kind_phys intent = inout optional = F +[do3dt_PBL] + standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL + long_name = cumulative change in ozone mixing ratio due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_PBL] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dt3dt_PBL] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [htrsw] standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep long_name = total sky sw heating rate diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 2bd19580a..f6558a861 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -65,7 +65,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & & xkzminv,moninq_fac,lssav,ldiag3d,qdiag3d,lsidea,ntoz, & - & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL, & + & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL, & & errmsg,errflg) ! use machine , only : kind_phys @@ -85,9 +85,9 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tau(im,km), rtg(im,km,ntrac)\ + & tau(im,km), rtg(im,km,ntrac) real(kind=kind_phys), intent(inout), dimension(ix,km) :: & - & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL + & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL real(kind=kind_phys), intent(in) :: & & u1(ix,km), v1(ix,km), & & t1(ix,km), q1(ix,km,ntrac), & @@ -1046,7 +1046,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*rdt else dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + & - & ((ttend-hlw(i,k)-hsw(i,k)*xmu(i))*rdt) + & ((ttend-hlw(i,k)-swh(i,k)*xmu(i))*rdt) endif if(qdiag3d) then dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*rdt @@ -1069,7 +1069,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & do k = 1, km do i = 1, im qtend = (a2(i,k+is)-q1(i,k,kk))*rdt - do3dt(i,k,kk) = do3dt(i,k,kk)+qtend + do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend enddo enddo endif diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 07b389219..b5a6947c3 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -567,6 +567,14 @@ type = real kind = kind_phys intent = inout +[do3dt_PBL] + standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL + long_name = cumulative change in ozone mixing ratio due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From dc8feed452a7b62cab7f9dbb6e0961639ea0cec2 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 17 Jan 2020 14:21:47 -0700 Subject: [PATCH 023/404] remove dependency on GFS_typedefs for rrtmg_sw_pre --- physics/dcyc2.f | 1 - physics/rrtmg_sw_pre.F90 | 57 +++++---- physics/rrtmg_sw_pre.meta | 241 +++++++++++++++++++++++++++++--------- 3 files changed, 212 insertions(+), 87 deletions(-) diff --git a/physics/dcyc2.f b/physics/dcyc2.f index 92369d712..9bb3a1d58 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -404,7 +404,6 @@ subroutine dcyc2t3_post_run( & & im, adjsfcdsw, adjsfcnsw, adjsfcusw, & & errmsg, errflg) - use GFS_typedefs, only: GFS_diag_type use machine, only: kind_phys implicit none diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index 8eeb16430..a76aed443 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -14,35 +14,36 @@ end subroutine rrtmg_sw_pre_init !> \section arg_table_rrtmg_sw_pre_run Argument Table !! \htmlinclude rrtmg_sw_pre_run.html !! - subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & - nday, idxday, tsfg, tsfa, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & - alb1d, errmsg, errflg) + subroutine rrtmg_sw_pre_run (im, lsswr, pertalb, tsfg, tsfa, coszen, & + alb1d, slmsk, snowd, sncovr, snoalb, zorl, hprime, alvsf, alnsf, alvwf,& + alnwf, facsf, facwf, fice, tisfc, sfalb, nday, idxday, sfcalb1, & + sfcalb2, sfcalb3, sfcalb4, errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type use module_radiation_surface, only: NF_ALBD, setalb implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - integer, intent(out) :: nday - integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + integer, intent(in) :: im + logical, intent(in) :: lsswr + real(kind=kind_phys), dimension(5), intent(in) :: pertalb + real(kind=kind_phys), dimension(im), intent(in) :: tsfa, tsfg, coszen + real(kind=kind_phys), dimension(im), intent(in) :: alb1d + real(kind=kind_phys), dimension(im), intent(in) :: slmsk, snowd, & + sncovr, snoalb, zorl, & + hprime, alvsf, alnsf, & + alvwf, alnwf, facsf, & + facwf, fice, tisfc + real(kind=kind_phys), dimension(im), intent(inout) :: sfalb + integer, intent(out) :: nday + integer, dimension(im), intent(out) :: idxday + real(kind=kind_phys), dimension(im), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Local variables integer :: i - real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb + real(kind=kind_phys), dimension(im,NF_ALBD) :: sfcalb ! Initialize CCPP error handling variables errmsg = '' @@ -51,13 +52,13 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & ! --- ... start radiation calculations ! remember to set heating rate unit to k/sec! !> -# Start SW radiation calculations - if (Model%lsswr) then + if (lsswr) then !> - Check for daytime points for SW radiation. nday = 0 idxday = 0 do i = 1, IM - if (Radtend%coszen(i) >= 0.0001) then + if (coszen(i) >= 0.0001) then nday = nday + 1 idxday(nday) = i endif @@ -66,17 +67,13 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & !> - Call module_radiation_surface::setalb() to setup surface albedo. !! for SW radiation. - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & ! --- inputs: - Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen, & - tsfg, tsfa, Sfcprop%hprime(:,1), Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & - Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & - Sfcprop%tisfc, IM, & - alb1d, Model%pertalb, & ! mg, sfc-perts + call setalb (slmsk, snowd, sncovr, snoalb, zorl, coszen, tsfg, tsfa, & ! --- inputs + hprime, alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, & + tisfc, IM, alb1d, pertalb, & ! mg, sfc-perts sfcalb) ! --- outputs !> -# Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) else nday = 0 idxday = 0 diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index 6a68a8cd6..76c3e6f97 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -6,61 +6,30 @@ [ccpp-arg-table] name = rrtmg_sw_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT - dimensions = () - type = GFS_grid_type - intent = in - optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT - dimensions = () - type = GFS_sfcprop_type - intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS radiation tendencies - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F [im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent + standard_name = horizontal_dimension + long_name = horizontal dimension units = count dimensions = () type = integer intent = in optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = integer - intent = out + type = logical + intent = in optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_dimension) - type = integer - intent = out +[pertalb] + standard_name = magnitude_of_surface_albedo_perturbation + long_name = magnitude of surface albedo perturbation + units = frac + dimensions = (5) + type = real + kind = kind_phys + intent = in optional = F [tsfg] standard_name = surface_ground_temperature_for_radiation @@ -80,6 +49,175 @@ kind = kind_phys intent = in optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alb1d] + standard_name = surface_albedo_perturbation + long_name = surface albedo perturbation + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = surface_snow_thickness_water_equivalent + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snoalb] + standard_name = upper_bound_on_max_albedo_over_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvsf] + standard_name = mean_vis_albedo_with_strong_cosz_dependency + long_name = mean vis albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnsf] + standard_name = mean_nir_albedo_with_strong_cosz_dependency + long_name = mean nir albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvwf] + standard_name = mean_vis_albedo_with_weak_cosz_dependency + long_name = mean vis albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnwf] + standard_name = mean_nir_albedo_with_weak_cosz_dependency + long_name = mean nir albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facsf] + standard_name = fractional_coverage_with_strong_cosz_dependency + long_name = fractional coverage with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facwf] + standard_name = fractional_coverage_with_weak_cosz_dependency + long_name = fractional coverage with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tisfc] + standard_name = sea_ice_temperature + long_name = sea ice surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfalb] + standard_name = surface_diffused_shortwave_albedo + long_name = mean surface diffused sw albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = out + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = out + optional = F [sfcalb1] standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam @@ -116,15 +254,6 @@ kind = kind_phys intent = out optional = F -[alb1d] - standard_name = surface_albedo_perturbation - long_name = surface albedo perturbation - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 6f3105d0f9e05618e730865547eda9d6e68dd636 Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Fri, 17 Jan 2020 17:38:52 -0800 Subject: [PATCH 024/404] Add missing intent and optional keys for rdlai --- physics/sfc_drv_ruc.meta | 2 ++ 1 file changed, 2 insertions(+) diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 3ae9a57a3..3f00fcb14 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -204,6 +204,8 @@ units = flag dimensions = () type = logical + intent = in + optional = F [zs] standard_name = depth_of_soil_levels_for_land_surface_model long_name = depth of soil levels for land surface model From c72aea7d6b1e5fe740ea52ea0c0aa270b09c4b1e Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Fri, 17 Jan 2020 21:21:26 -0800 Subject: [PATCH 025/404] correct name of zhaocarr_gscond init and finalize routines --- physics/gscond.meta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/gscond.meta b/physics/gscond.meta index a317b8529..6a6e9be1e 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -1,10 +1,10 @@ [ccpp-arg-table] - name = gscond_init + name = zhaocarr_gscond_init type = scheme ######################################################################## [ccpp-arg-table] - name = gscond_finalize + name = zhaocarr_gscond_finalize type = scheme ######################################################################## From fda501ec210d8accff5854dc5f18f9d952451e76 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 21 Jan 2020 12:39:39 -0700 Subject: [PATCH 026/404] remove dependency on GFS_typedefs.F90 for rrtmg_sw_post scheme --- physics/rrtmg_sw_post.F90 | 106 ++++++++++----------- physics/rrtmg_sw_post.meta | 190 +++++++++++++++++++++++++++++-------- 2 files changed, 206 insertions(+), 90 deletions(-) diff --git a/physics/rrtmg_sw_post.F90 b/physics/rrtmg_sw_post.F90 index e11491d48..e433271e2 100644 --- a/physics/rrtmg_sw_post.F90 +++ b/physics/rrtmg_sw_post.F90 @@ -15,29 +15,29 @@ end subroutine rrtmg_sw_post_init !! \htmlinclude rrtmg_sw_post_run.html !! #endif - subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & - im, ltp, nday, lm, kd, htswc, htsw0, & - sfcalb1, sfcalb2, sfcalb3, sfcalb4, scmpsw, errmsg, errflg) + subroutine rrtmg_sw_post_run (im, levr, levs, ltp, nday, lm, kd, lsswr, & + swhtr, htswc, htsw0, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & + scmpsw, sfcfsw, topfsw, nirbmdi, nirdfdi, visbmdi, visdfdi, & + nirbmui, nirdfui, visbmui, visdfui, sfcdsw, sfcnsw, htrsw, & + swhc, errmsg, errflg) use machine, only: kind_phys use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & cmpfsw_type - use GFS_typedefs, only: GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_grid_type), intent(in) :: Grid - type(GFS_diag_type), intent(inout) :: Diag - integer, intent(in) :: im, lm, kd, nday, ltp - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: scmpsw - real(kind=kind_phys), dimension(Size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htswc, htsw0 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + + integer, intent(in) :: im, lm, kd, nday, levr, levs, ltp + logical, intent(in) :: lsswr, swhtr + real(kind=kind_phys), dimension(im, levr+LTP), intent(in) :: htswc, htsw0 + real(kind=kind_phys), dimension(im), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + type(cmpfsw_type), dimension(im), intent(inout) :: scmpsw + type(sfcfsw_type), dimension(im), intent(inout) :: sfcfsw + type(topfsw_type), dimension(im), intent(inout) :: topfsw + real(kind=kind_phys), dimension(im), intent(inout) :: nirbmdi, nirdfdi, visbmdi, & + visdfdi, nirbmui, nirdfui, & + visbmui, visdfui, sfcdsw, sfcnsw + real(kind=kind_phys), dimension(im,levs), intent(inout) :: htrsw, swhc character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables @@ -47,29 +47,29 @@ subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & errmsg = '' errflg = 0 - if (Model%lsswr) then + if (lsswr) then if (nday > 0) then do k = 1, LM k1 = k + kd - Radtend%htrsw(1:im,k) = htswc(1:im,k1) + htrsw(1:im,k) = htswc(1:im,k1) enddo ! We are assuming that radiative tendencies are from bottom to top ! --- repopulate the points above levr i.e. LM - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrsw (1:im,k) = Radtend%htrsw (1:im,LM) + if (lm < levs) then + do k = lm, levs + htrsw (1:im,k) = htrsw (1:im,LM) enddo endif - if (Model%swhtr) then + if (swhtr) then do k = 1, lm k1 = k + kd - Radtend%swhc(1:im,k) = htsw0(1:im,k1) + swhc(1:im,k) = htsw0(1:im,k1) enddo ! --- repopulate the points above levr i.e. LM - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%swhc(1:im,k) = Radtend%swhc(1:im,LM) + if (lm < levs) then + do k = lm, levs + swhc(1:im,k) = swhc(1:im,LM) enddo endif endif @@ -79,47 +79,47 @@ subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & !! output. do i=1,im - Coupling%nirbmdi(i) = scmpsw(i)%nirbm - Coupling%nirdfdi(i) = scmpsw(i)%nirdf - Coupling%visbmdi(i) = scmpsw(i)%visbm - Coupling%visdfdi(i) = scmpsw(i)%visdf - - Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfcalb1(i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfcalb2(i) - Coupling%visbmui(i) = scmpsw(i)%visbm * sfcalb3(i) - Coupling%visdfui(i) = scmpsw(i)%visdf * sfcalb4(i) + nirbmdi(i) = scmpsw(i)%nirbm + nirdfdi(i) = scmpsw(i)%nirdf + visbmdi(i) = scmpsw(i)%visbm + visdfdi(i) = scmpsw(i)%visdf + + nirbmui(i) = scmpsw(i)%nirbm * sfcalb1(i) + nirdfui(i) = scmpsw(i)%nirdf * sfcalb2(i) + visbmui(i) = scmpsw(i)%visbm * sfcalb3(i) + visdfui(i) = scmpsw(i)%visdf * sfcalb4(i) enddo else ! if_nday_block - Radtend%htrsw(:,:) = 0.0 + htrsw(:,:) = 0.0 - Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) - Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) - scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) + sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) + topfsw = topfsw_type( 0.0, 0.0, 0.0 ) + scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) do i=1,im - Coupling%nirbmdi(i) = 0.0 - Coupling%nirdfdi(i) = 0.0 - Coupling%visbmdi(i) = 0.0 - Coupling%visdfdi(i) = 0.0 - - Coupling%nirbmui(i) = 0.0 - Coupling%nirdfui(i) = 0.0 - Coupling%visbmui(i) = 0.0 - Coupling%visdfui(i) = 0.0 + nirbmdi(i) = 0.0 + nirdfdi(i) = 0.0 + visbmdi(i) = 0.0 + visdfdi(i) = 0.0 + + nirbmui(i) = 0.0 + nirdfui(i) = 0.0 + visbmui(i) = 0.0 + visdfui(i) = 0.0 enddo - if (Model%swhtr) then - Radtend%swhc(:,:) = 0 + if (swhtr) then + swhc(:,:) = 0 endif endif ! end_if_nday ! --- radiation fluxes for other physics processes do i=1,im - Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc - Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc + sfcnsw(i) = sfcfsw(i)%dnfxc - sfcfsw(i)%upfxc + sfcdsw(i) = sfcfsw(i)%dnfxc enddo endif ! end_if_lsswr diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 28b54b5bf..b1e0e63db 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -6,49 +6,25 @@ [ccpp-arg-table] name = rrtmg_sw_post_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[levr] + standard_name = adjusted_vertical_layer_dimension_for_radiation + long_name = adjusted number of vertical layers for radiation + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = Fortran DDT containing FV3-GFS diagnotics data - units = DDT - dimensions = () - type = GFS_diag_type - intent = inout - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS fields targetted for diagnostic output - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components - units = DDT - dimensions = () - type = GFS_coupling_type - intent = inout - optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels units = count dimensions = () type = integer @@ -86,6 +62,22 @@ type = integer intent = in optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[swhtr] + standard_name = flag_for_output_of_shortwave_heating_rate + long_name = flag to output sw heating rate (Radtend%swhc) + units = flag + dimensions = () + type = logical + intent = in + optional = F [htswc] standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky heating rate due to shortwave radiation @@ -148,6 +140,130 @@ type = cmpfsw_type intent = inout optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcfsw_type + intent = inout + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_dimension) + type = topfsw_type + intent = inout + optional = F +[nirbmdi] + standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir beam sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nirdfdi] + standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir diff sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[visbmdi] + standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis beam sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[visdfdi] + standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis diff sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nirbmui] + standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir beam sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nirdfui] + standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir diff sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[visbmui] + standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis beam sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[visdfui] + standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis diff sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcdsw] + standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step + long_name = total sky sfc downward sw flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcnsw] + standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step + long_name = total sky sfc netsw flx into ground + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[htrsw] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + long_name = total sky sw heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[swhc] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_timestep + long_name = clear sky sw heating rates + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 2d353c0a547b68efe50c9d063cd6cab0f9a48eee Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 21 Jan 2020 12:40:15 -0700 Subject: [PATCH 027/404] remove dependency on GFS_typedefs.F90 for rrtmg_lw_pre scheme --- physics/rrtmg_lw_pre.F90 | 33 +++++------- physics/rrtmg_lw_pre.meta | 106 +++++++++++++++++++++++++++----------- 2 files changed, 91 insertions(+), 48 deletions(-) diff --git a/physics/rrtmg_lw_pre.F90 b/physics/rrtmg_lw_pre.F90 index 5f128a79a..c14053a10 100644 --- a/physics/rrtmg_lw_pre.F90 +++ b/physics/rrtmg_lw_pre.F90 @@ -14,37 +14,32 @@ end subroutine rrtmg_lw_pre_init !> \section arg_table_rrtmg_lw_pre_run Argument Table !! \htmlinclude rrtmg_lw_pre_run.html !! - subroutine rrtmg_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errmsg, errflg) + subroutine rrtmg_lw_pre_run (im, lslwr, xlat, xlon, slmsk, snowd, sncovr,& + zorl, hprime, tsfg, tsfa, semis, errmsg, errflg) use machine, only: kind_phys - - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type use module_radiation_surface, only: setemis implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + + integer, intent(in) :: im + logical, intent(in) :: lslwr + real(kind=kind_phys), dimension(im), intent(in) :: xlat, xlon, slmsk, & + snowd, sncovr, zorl, hprime, tsfa, tsfg + real(kind=kind_phys), dimension(im), intent(out) :: semis + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (Model%lslwr) then + if (lslwr) then !> - Call module_radiation_surface::setemis(),to setup surface !! emissivity for LW radiation. - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs - Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & - tsfg, tsfa, Sfcprop%hprime(:,1), IM, & - Radtend%semis) ! --- outputs + call setemis (xlon, xlat, slmsk, snowd, sncovr, zorl, tsfg, tsfa, & + hprime, im, & ! --- inputs + semis) ! --- outputs endif end subroutine rrtmg_lw_pre_run diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index 6b4488b26..481850494 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -6,44 +6,83 @@ [ccpp-arg-table] name = rrtmg_lw_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_grid_type + type = logical intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT - dimensions = () - type = GFS_sfcprop_type +[xlat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS radiation tendencies - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout +[xlon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = surface_snow_thickness_water_equivalent + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys intent = in optional = F [tsfg] @@ -64,6 +103,15 @@ kind = kind_phys intent = in optional = F +[semis] + standard_name = surface_longwave_emissivity + long_name = surface lw emissivity in fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From eeaa98bc84f2709be9f6cc82a4eaafae14e89fec Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 21 Jan 2020 15:52:13 -0700 Subject: [PATCH 028/404] remove dependency on GFS_typedefs.F90 for rrtmg_lw_post scheme --- physics/rrtmg_lw_post.F90 | 57 ++++++++++----------- physics/rrtmg_lw_post.meta | 100 +++++++++++++++++++++++++------------ 2 files changed, 97 insertions(+), 60 deletions(-) diff --git a/physics/rrtmg_lw_post.F90 b/physics/rrtmg_lw_post.F90 index 971b278dd..310b660e3 100644 --- a/physics/rrtmg_lw_post.F90 +++ b/physics/rrtmg_lw_post.F90 @@ -16,25 +16,26 @@ end subroutine rrtmg_lw_post_init !! \htmlinclude rrtmg_lw_post_run.html !! #endif - subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & - im, ltp, lm, kd, tsfa, htlwc, htlw0, errmsg, errflg) + subroutine rrtmg_lw_post_run (im, levs, ltp, lm, kd, lslwr, lwhtr, & + tsfa, htlwc, htlw0, sfcflw, tsflw, htrlw, lwhc, sfcdlw, & + errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type + use module_radlw_parameters, only: sfcflw_type + implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_grid_type), intent(in) :: Grid - type(GFS_radtend_type), intent(inout) :: Radtend - integer, intent(in) :: im, ltp, LM, kd - real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlwc - real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlw0 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + + integer, intent(in) :: im, ltp, LM, kd, levs + logical, intent(in) :: lslwr, lwhtr + real(kind=kind_phys), dimension(im, LM+LTP), intent(in) :: htlwc + real(kind=kind_phys), dimension(im, LM+LTP), intent(in) :: htlw0 + real(kind=kind_phys), dimension(im), intent(in) :: tsfa + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + real(kind=kind_phys), dimension(im), intent(inout) :: tsflw, sfcdlw + real(kind=kind_phys), dimension(im, levs), intent(inout) :: htrlw, lwhc + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! local variables integer :: k1, k @@ -42,38 +43,38 @@ subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & errmsg = '' errflg = 0 - if (Model%lslwr) then + if (lslwr) then !> -# Save calculation results !> - Save surface air temp for diurnal adjustment at model t-steps - Radtend%tsflw (:) = tsfa(:) + tsflw (:) = tsfa(:) do k = 1, LM k1 = k + kd - Radtend%htrlw(1:im,k) = htlwc(1:im,k1) + htrlw(1:im,k) = htlwc(1:im,k1) enddo ! --- repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) + if (lm < levs) then + do k = lm, levs + htrlw (1:im,k) = htrlw (1:im,LM) enddo endif - if (Model%lwhtr) then + if (lwhtr) then do k = 1, lm k1 = k + kd - Radtend%lwhc(1:im,k) = htlw0(1:im,k1) + lwhc(1:im,k) = htlw0(1:im,k1) enddo ! --- repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) + if (lm < levs) then + do k = lm, levs + lwhc(1:im,k) = lwhc(1:im,LM) enddo endif endif ! --- radiation fluxes for other physics processes - Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc + sfcdlw(:) = sfcflw(:)%dnfxc endif ! end_if_lslwr diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 92b4003d7..b5176392d 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -6,41 +6,17 @@ [ccpp-arg-table] name = rrtmg_lw_post_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS fields targetted for diagnostic output - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components - units = DDT - dimensions = () - type = GFS_coupling_type - intent = inout - optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels units = count dimensions = () type = integer @@ -70,6 +46,22 @@ type = integer intent = in optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lwhtr] + standard_name = flag_for_output_of_longwave_heating_rate + long_name = flag to output lw heating rate (Radtend%lwhc) + units = flag + dimensions = () + type = logical + intent = in + optional = F [tsfa] standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation @@ -97,6 +89,50 @@ kind = kind_phys intent = in optional = F +[sfcflw] + standard_name = lw_fluxes_sfc + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcflw_type + intent = in + optional = F +[tsflw] + standard_name = surface_midlayer_air_temperature_in_longwave_radiation + long_name = surface air temp during lw calculation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[htrlw] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + long_name = total sky lw heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lwhc] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep + long_name = clear sky lw heating rates + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcdlw] + standard_name = surface_downwelling_longwave_flux_on_radiation_time_step + long_name = total sky sfc downward lw flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From a6658b6ce07e10558b5318394d4b663c1499501d Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Wed, 22 Jan 2020 11:10:51 -0800 Subject: [PATCH 029/404] fix horizontal dimension name in sfc_ocean.meta --- physics/sfc_ocean.meta | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index d60c1ce2c..a5287e095 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -77,7 +77,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -86,7 +86,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = surface layer mean temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -95,7 +95,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = surface layer mean specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -104,7 +104,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -113,7 +113,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -122,7 +122,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -131,7 +131,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = surface layer mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -140,7 +140,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -149,7 +149,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -157,7 +157,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -166,7 +166,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -174,7 +174,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -183,7 +183,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -192,7 +192,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -201,7 +201,7 @@ standard_name = upward_heat_flux_in_soil_over_ocean long_name = soil heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -210,7 +210,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -219,7 +219,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -228,7 +228,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ocean long_name = surface upward potential latent heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout From c7dbbcee73f1bd9456a4fa4bf4b9681ecb1a5ace Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 23 Jan 2020 09:55:12 -0700 Subject: [PATCH 030/404] remove dependency on GFS_typedefs for GFS_phys_time_vary_init for the SCM --- physics/GFS_phys_time_vary.scm.F90 | 117 ++++---- physics/GFS_phys_time_vary.scm.meta | 361 +++++++++++++++++++++-- physics/GFS_suite_init_finalize_test.F90 | 2 - 3 files changed, 405 insertions(+), 75 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index 3b4bbaf77..ec4f13a28 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -33,18 +33,33 @@ module GFS_phys_time_vary !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (Grid, Model, Interstitial, Tbd, errmsg, errflg) + subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, aero_in, & + iccn, iflip, idate, nblks, blksz, nx, ny, xlat_d, xlon_d, levh2o_int, & + levozp_int, ozpl, h2opl, aer_nm, jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, & + jindx2_h, ddy_h, jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, & + ddx_aer, jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, & + oz_pres_int, h2o_pres_int, imap, jmap, errmsg, errflg) - use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & - GFS_Tbd_type, GFS_interstitial_type + use machine, only: kind_phys implicit none ! Interface variables - type(GFS_grid_type), intent(inout) :: Grid - type(GFS_control_type), intent(in) :: Model - type(GFS_interstitial_type), intent(inout) :: Interstitial - type(GFS_tbd_type), intent(in) :: Tbd + integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int + integer, dimension(4), intent(in) :: idate + integer, dimension(nblks), intent(in) :: blksz + logical, intent(in) :: h2o_phys, aero_in, iccn + real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d + real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl + real(kind=kind_phys), dimension(:,:,:), intent(in) :: h2opl + real(kind=kind_phys), dimension(:,:,:), intent(in) :: aer_nm + + integer, dimension(im), intent(inout) :: imap, jmap + integer, dimension(:), intent(inout) :: jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, jindx1_aer, jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, iindx1_ci, iindx2_ci + real(kind=kind_phys), dimension(:), intent(inout) :: ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, ddx_ci + real(kind=kind_phys), dimension(levozp_int), intent(inout) :: oz_pres_int + real(kind=kind_phys), dimension(levh2o_int), intent(inout) :: h2o_pres_int + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -60,120 +75,120 @@ subroutine GFS_phys_time_vary_init (Grid, Model, Interstitial, Tbd, errmsg, errf nb = 1 nt = 1 - call read_o3data (Model%ntoz, Model%me, Model%master) + call read_o3data (ntoz, me, master) ! Consistency check that the hardcoded values for levozp and ! oz_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%ozpl (IM,levozp,oz_coeff)) - if (size(Tbd%ozpl, dim=2).ne.levozp) then + if (size(ozpl, dim=2).ne.levozp) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levozp from read_o3data does not match value in GFS_typedefs.F90: ", & - levozp, " /= ", size(Tbd%ozpl, dim=2) + levozp, " /= ", size(ozpl, dim=2) errflg = 1 end if - if (size(Tbd%ozpl, dim=3).ne.oz_coeff) then + if (size(ozpl, dim=3).ne.oz_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "oz_coeff from read_o3data does not match value in GFS_typedefs.F90: ", & - oz_coeff, " /= ", size(Tbd%ozpl, dim=3) + oz_coeff, " /= ", size(ozpl, dim=3) errflg = 1 end if - call read_h2odata (Model%h2o_phys, Model%me, Model%master) + call read_h2odata (h2o_phys, me, master) ! Consistency check that the hardcoded values for levh2o and ! h2o_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%h2opl (IM,levh2o,h2o_coeff)) - if (size(Tbd%h2opl, dim=2).ne.levh2o) then + if (size(h2opl, dim=2).ne.levh2o) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levh2o from read_h2odata does not match value in GFS_typedefs.F90: ", & - levh2o, " /= ", size(Tbd%h2opl, dim=2) + levh2o, " /= ", size(h2opl, dim=2) errflg = 1 end if - if (size(Tbd%h2opl, dim=3).ne.h2o_coeff) then + if (size(h2opl, dim=3).ne.h2o_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "h2o_coeff from read_h2odata does not match value in GFS_typedefs.F90: ", & - h2o_coeff, " /= ", size(Tbd%h2opl, dim=3) + h2o_coeff, " /= ", size(h2opl, dim=3) errflg = 1 end if - if (Model%aero_in) then + if (aero_in) then ! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90 ! and used to allocate Tbd%aer_nm matches the value defined in aerclm_def - if (size(Tbd%aer_nm, dim=3).ne.ntrcaerm) then + if (size(aer_nm, dim=3).ne.ntrcaerm) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: ", & - ntrcaerm, " /= ", size(Tbd%aer_nm, dim=3) + ntrcaerm, " /= ", size(aer_nm, dim=3) errflg = 1 else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If Model%aero_in is .true., then ntrcaer == ntrcaerm - ntrcaer = size(Tbd%aer_nm, dim=3) + ! If aero_in is .true., then ntrcaer == ntrcaerm + ntrcaer = size(aer_nm, dim=3) ! Read aerosol climatology - call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate) + call read_aerdata (me, master, iflip, idate) endif else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If Model%aero_in is .false., then ntrcaer == 1 - ntrcaer = size(Tbd%aer_nm, dim=3) + ! If aero_in is .false., then ntrcaer == 1 + ntrcaer = size(aer_nm, dim=3) endif - if (Model%iccn) then - call read_cidata ( Model%me, Model%master) + if (iccn) then + call read_cidata (me, master) ! No consistency check needed for in/ccn data, all values are ! hardcoded in module iccn_def.F and GFS_typedefs.F90 endif ! Update values of oz_pres in Interstitial data type for all threads - if (Model%ntoz > 0) then - Interstitial%oz_pres = oz_pres + if (ntoz > 0) then + oz_pres_int = oz_pres end if ! Update values of h2o_pres in Interstitial data type for all threads - if (Model%h2o_phys) then - Interstitial%h2o_pres = h2o_pres + if (h2o_phys) then + h2o_pres_int = h2o_pres end if !--- read in and initialize ozone - if (Model%ntoz > 0) then - call setindxoz (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_o3, & - Grid%jindx2_o3, Grid%ddy_o3) + if (ntoz > 0) then + call setindxoz (blksz(nb), xlat_d, jindx1_o3, & + jindx2_o3, ddy_o3) endif !--- read in and initialize stratospheric water - if (Model%h2o_phys) then - call setindxh2o (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_h, & - Grid%jindx2_h, Grid%ddy_h) + if (h2o_phys) then + call setindxh2o (blksz(nb), xlat_d, jindx1_h, & + jindx2_h, ddy_h) endif !--- read in and initialize aerosols - if (Model%aero_in) then - call setindxaer (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_aer, & - Grid%jindx2_aer, Grid%ddy_aer, Grid%xlon_d, & - Grid%iindx1_aer, Grid%iindx2_aer, Grid%ddx_aer, & - Model%me, Model%master) + if (aero_in) then + call setindxaer (blksz(nb), xlat_d, jindx1_aer, & + jindx2_aer, ddy_aer, xlon_d, & + iindx1_aer, iindx2_aer, ddx_aer, & + me, master) endif !--- read in and initialize IN and CCN - if (Model%iccn) then - call setindxci (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_ci, & - Grid%jindx2_ci, Grid%ddy_ci, Grid%xlon_d, & - Grid%iindx1_ci, Grid%iindx2_ci, Grid%ddx_ci) + if (iccn) then + call setindxci (blksz(nb), xlat_d, jindx1_ci, & + jindx2_ci, ddy_ci, xlon_d, & + iindx1_ci, iindx2_ci, ddx_ci) endif !--- initial calculation of maps local ix -> global i and j, store in Tbd ix = 0 nb = 1 - do j = 1,Model%ny - do i = 1,Model%nx + do j = 1, ny + do i = 1, nx ix = ix + 1 - if (ix .gt. Model%blksz(nb)) then + if (ix .gt. blksz(nb)) then ix = 1 nb = nb + 1 endif - Tbd%jmap(ix) = j - Tbd%imap(ix) = i + jmap(ix) = j + imap(ix) = i enddo enddo diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 57a82ecb0..30b8bce46 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,38 +1,355 @@ [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index dimensions = () - type = GFS_grid_type - intent = inout + type = integer + intent = in optional = F -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = Fortran DDT containing FV3-GFS interstitial data - units = DDT +[master] + standard_name = mpi_root + long_name = master MPI-rank + units = index dimensions = () - type = GFS_interstitial_type - intent = inout + type = integer + intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS miscellaneous data - units = DDT +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag dimensions = () - type = GFS_tbd_type + type = logical + intent = in + optional = F +[aero_in] + standard_name = flag_for_aerosol_input_MG + long_name = flag for using aerosols in Morrison-Gettelman MP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iccn] + standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics + long_name = flag for IN and CCN forcing for morrison gettelman microphysics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iflip] + standard_name = flag_for_vertical_index_direction_control + long_name = iflip - is not the same as flipv + units = flag + dimensions = () + type = integer + intent = in + optional = F +[idate] + standard_name = date_and_time_at_model_initialization_reordered + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer intent = in optional = F +[nblks] + standard_name = number_of_blocks + long_name = for explicit data blocking: number of blocks + units = count + dimensions = () + type = integer + intent = in + optional = F +[blksz] + standard_name = horizontal_block_size + long_name = for explicit data blocking: block sizes of all blocks + units = count + dimensions = (number_of_blocks) + type = integer + intent = in + optional = F +[nx] + standard_name = number_of_points_in_x_direction_for_this_MPI_rank + long_name = number of points in x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[ny] + standard_name = number_of_points_in_y_direction_for_this_MPI_rank + long_name = number of points in y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[xlat_d] + standard_name = latitude_degree + long_name = latitude in degrees + units = degree + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[xlon_d] + standard_name = longitude_degree + long_name = longitude in degrees + units = degree + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[levh2o_int] + standard_name = vertical_dimension_of_h2o_forcing_data + long_name = number of vertical layers in h2o forcing data + units = count + dimensions = () + type = integer + intent = in + optional = F +[levozp_int] + standard_name = vertical_dimension_of_ozone_forcing_data + long_name = number of vertical layers in ozone forcing data + units = count + dimensions = () + type = integer + intent = in + optional = F +[ozpl] + standard_name = ozone_forcing + long_name = ozone forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + type = real + kind = kind_phys + intent = in + optional = F +[h2opl] + standard_name = h2o_forcing + long_name = water forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + type = real + kind = kind_phys + intent = in + optional = F +[aer_nm] + standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + long_name = GOCART aerosol climatology number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = in + optional = F +[jindx1_o3] + standard_name = lower_ozone_interpolation_index + long_name = interpolation low index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_o3] + standard_name = upper_ozone_interpolation_index + long_name = interpolation high index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_o3] + standard_name = ozone_interpolation_weight + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_h] + standard_name = lower_water_vapor_interpolation_index + long_name = interpolation low index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_h] + standard_name = upper_water_vapor_interpolation_index + long_name = interpolation high index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_h] + standard_name = water_vapor_interpolation_weight + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_aer] + standard_name = lower_aerosol_y_interpolation_index + long_name = interpolation low index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_aer] + standard_name = upper_aerosol_y_interpolation_index + long_name = interpolation high index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_aer] + standard_name = aerosol_y_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[iindx1_aer] + standard_name = lower_aerosol_x_interpolation_index + long_name = interpolation low index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[iindx2_aer] + standard_name = upper_aerosol_x_interpolation_index + long_name = interpolation high index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddx_aer] + standard_name = aerosol_x_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_ci] + standard_name = lower_cloud_nuclei_y_interpolation_index + long_name = interpolation low index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_ci] + standard_name = upper_cloud_nuclei_y_interpolation_index + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_ci] + standard_name = cloud_nuclei_y_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[iindx1_ci] + standard_name = lower_cloud_nuclei_x_interpolation_index + long_name = interpolation low index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[iindx2_ci] + standard_name = upper_cloud_nuclei_x_interpolation_index + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddx_ci] + standard_name = cloud_nuclei_x_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[oz_pres_int] + standard_name = natural_log_of_ozone_forcing_data_pressure_levels + long_name = natural log of ozone forcing data pressure levels + units = log(Pa) + dimensions = (vertical_dimension_of_ozone_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[h2o_pres_int] + standard_name = natural_log_of_h2o_forcing_data_pressure_levels + long_name = natural log of h2o forcing data pressure levels + units = log(Pa) + dimensions = (vertical_dimension_of_h2o_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_suite_init_finalize_test.F90 b/physics/GFS_suite_init_finalize_test.F90 index 0a958d2fc..bdd1d2939 100644 --- a/physics/GFS_suite_init_finalize_test.F90 +++ b/physics/GFS_suite_init_finalize_test.F90 @@ -43,8 +43,6 @@ end subroutine GFS_suite_ini_fini_test_finalize !! subroutine GFS_suite_ini_fini_test_run (errmsg, errflg) - use GFS_typedefs, only: GFS_interstitial_type - implicit none ! interface variables From 8d5fe8c3765eddfba4a33e023c3b70dcc47d5966 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 23 Jan 2020 11:50:13 -0700 Subject: [PATCH 031/404] physics/module_mp_thompson.F90: bugfix, remove threaded computation/read of lookup tables --- physics/module_mp_thompson.F90 | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 5e118c070..67e0e3d9d 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -924,11 +924,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & call cpu_time(stime) -!$OMP parallel num_threads(threads) - -!$OMP sections - -!$OMP section !> - Call qr_acr_qg() to create rain collecting graupel & graupel collecting rain table if (mpirank==mpiroot) write(0,*) ' creating rain collecting graupel table' call cpu_time(stime) @@ -936,7 +931,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & call cpu_time(etime) if (mpirank==mpiroot) print '("Computing rain collecting graupel table took ",f10.3," seconds.")', etime-stime -!$OMP section !> - Call qr_acr_qs() to create rain collecting snow & snow collecting rain table if (mpirank==mpiroot) write (*,*) ' creating rain collecting snow table' call cpu_time(stime) @@ -944,10 +938,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & call cpu_time(etime) if (mpirank==mpiroot) print '("Computing rain collecting snow table took ",f10.3," seconds.")', etime-stime -!$OMP end sections - -!$OMP end parallel - !> - Call freezeh2o() to create cloud water and rain freezing (Bigg, 1953) table if (mpirank==mpiroot) write(0,*) ' creating freezing of water drops table' call cpu_time(stime) From 3449dd57f0f678324c4d73e5ed883a088fbb1d34 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 27 Jan 2020 10:08:39 -0700 Subject: [PATCH 032/404] Add missing updates from IPD physics commit 7ffe6471c20404091fbbf8f321fbb9ee84a4f36d --- physics/module_gfdl_cloud_microphys.F90 | 2 +- physics/module_sf_noahmp_glacier.f90 | 0 physics/module_sf_noahmplsm.f90 | 0 physics/noahmp_tables.f90 | 0 physics/sfc_noahmp_drv.f | 0 5 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 physics/module_sf_noahmp_glacier.f90 mode change 100755 => 100644 physics/module_sf_noahmplsm.f90 mode change 100755 => 100644 physics/noahmp_tables.f90 mode change 100755 => 100644 physics/sfc_noahmp_drv.f diff --git a/physics/module_gfdl_cloud_microphys.F90 b/physics/module_gfdl_cloud_microphys.F90 index 01ab4655c..5750d27fd 100644 --- a/physics/module_gfdl_cloud_microphys.F90 +++ b/physics/module_gfdl_cloud_microphys.F90 @@ -3320,7 +3320,7 @@ subroutine fall_speed (ktop, kbot, den, qs, qi, qg, ql, tk, vts, vti, vtg) else tc (k) = tk (k) - tice vti (k) = (3. + log10 (qi (k) * den (k))) * (tc (k) * (aa * tc (k) + bb) + cc) + dd * tc (k) + ee - vti (k) = vi0 * exp (log_10 * vti (k)) * 0.8 + vti (k) = vi0 * exp (log_10 * vti (k)) * 0.9 vti (k) = min (vi_max, max (vf_min, vti (k))) endif enddo diff --git a/physics/module_sf_noahmp_glacier.f90 b/physics/module_sf_noahmp_glacier.f90 old mode 100755 new mode 100644 diff --git a/physics/module_sf_noahmplsm.f90 b/physics/module_sf_noahmplsm.f90 old mode 100755 new mode 100644 diff --git a/physics/noahmp_tables.f90 b/physics/noahmp_tables.f90 old mode 100755 new mode 100644 diff --git a/physics/sfc_noahmp_drv.f b/physics/sfc_noahmp_drv.f old mode 100755 new mode 100644 From c23b8d19c31b68869b15c0d0bc1367fa4e991234 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Tue, 28 Jan 2020 23:06:20 +0000 Subject: [PATCH 033/404] Add ozone tendencies to ozphys_2015 --- physics/ozphys_2015.f | 23 ++++++++++++----------- physics/ozphys_2015.meta | 8 ++++++++ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/physics/ozphys_2015.f b/physics/ozphys_2015.f index 3126313dc..766cfdd62 100644 --- a/physics/ozphys_2015.f +++ b/physics/ozphys_2015.f @@ -55,7 +55,8 @@ end subroutine ozphys_2015_finalize !!\author June 2015 - Shrinivas Moorthi subroutine ozphys_2015_run ( & & ix, im, levs, ko3, dt, oz, tin, po3, & - & prsl, prdout, pl_coeff, delp, ldiag3d, & + & prsl, prdout, pl_coeff, delp, & + & ldiag3d, qdiag3d, & & ozp1,ozp2,ozp3,ozp4,con_g, & & me, errmsg, errflg) ! @@ -80,7 +81,7 @@ subroutine ozphys_2015_run ( & integer, intent(out) :: errflg integer k,kmax,kmin,l,i,j - logical ldiag3d, flg(im) + logical ldiag3d, flg(im), qdiag3d real(kind=kind_phys) pmax, pmin, tem, temp real(kind=kind_phys) wk1(im), wk2(im), wk3(im),prod(im,pl_coeff), & & ozib(im), colo3(im,levs+1), coloz(im,levs+1),& @@ -163,16 +164,16 @@ subroutine ozphys_2015_run ( & !ccpp ozo(i,l) = (ozib(i) + tem*dt) / (1.0 - prod(i,2)*dt) oz(i,l) = (ozib(i) + tem*dt) / (1.0 - prod(i,2)*dt) enddo -! if (ldiag3d) then ! ozone change diagnostics -! do i=1,im -! ozp1(i,l) = ozp1(i,l) + (prod(i,1)-prod(i,2)*prod(i,6))*dt + if (ldiag3d .and. qdiag3d) then ! ozone change diagnostics + do i=1,im + ozp1(i,l) = ozp1(i,l) + (prod(i,1)-prod(i,2)*prod(i,6))*dt !!ccpp ozp(i,l,2) = ozp(i,l,2) + (ozo(i,l) - ozib(i)) -! ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) -! ozp3(i,l) = ozp3(i,l) + prod(i,3)*(tin(i,l)-prod(i,5))*dt -! ozp4(i,l) = ozp4(i,l) + prod(i,4) -! & * (colo3(i,l)-coloz(i,l))*dt -! enddo -! endif + ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) + ozp3(i,l) = ozp3(i,l) + prod(i,3)*(tin(i,l)-prod(i,5))*dt + ozp4(i,l) = ozp4(i,l) + prod(i,4) + & * (colo3(i,l)-coloz(i,l))*dt + enddo + endif enddo ! vertical loop ! return diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index 51f8e76f4..eedfe3ca2 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -147,6 +147,14 @@ type = logical intent = in optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F [ozp1] standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate long_name = cumulative change in ozone concentration due to production and loss rate From 19225942c4180c235ee36926e915099b9d4d9840 Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Wed, 29 Jan 2020 14:54:09 -0800 Subject: [PATCH 034/404] fix horizontal dimension naming for rrtm variable and intent in sfc_drv_ruc --- physics/GFS_rrtmg_pre.meta | 2 +- physics/sfc_drv_ruc.meta | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 7b40e2c1d..42490b038 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -101,7 +101,7 @@ standard_name = minimum_large_ice_fraction long_name = minimum large ice fraction in F-A mp scheme units = frac - dimensions = (2) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 3f00fcb14..6c3cd3cb3 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -544,6 +544,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys + intent = in optional = F [sfalb] standard_name = surface_diffused_shortwave_albedo From 0af8bba2eb28424b5473121d496ba18ea4bb5d34 Mon Sep 17 00:00:00 2001 From: Xiaqiong Zhou Date: Fri, 31 Jan 2020 17:13:16 +0000 Subject: [PATCH 035/404] Change delz dimension corresponding to the change in atmos_cubed_sphere --- physics/gfdl_fv_sat_adj.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/physics/gfdl_fv_sat_adj.F90 b/physics/gfdl_fv_sat_adj.F90 index f5c84cd99..ee07b3037 100644 --- a/physics/gfdl_fv_sat_adj.F90 +++ b/physics/gfdl_fv_sat_adj.F90 @@ -263,7 +263,7 @@ subroutine fv_sat_adj_run(mdt, zvir, is, ie, isd, ied, kmp, km, kmdelz, js, je, real(kind=kind_dyn), intent(in) :: hs(isd:ied, jsd:jed) real(kind=kind_dyn), intent(in) :: peln(is:ie, 1:km+1, js:je) ! For hydrostatic build, kmdelz=1, otherwise kmdelz=km (see fv_arrays.F90) - real(kind=kind_dyn), intent(in) :: delz(isd:ied, jsd:jed, 1:kmdelz) + real(kind=kind_dyn), intent(in) :: delz(is:ie, js:je, 1:kmdelz) real(kind=kind_dyn), intent(in) :: delp(isd:ied, jsd:jed, 1:km) real(kind=kind_dyn), intent(inout) :: pt(isd:ied, jsd:jed, 1:km) real(kind=kind_dyn), intent(inout) :: pkz(is:ie, js:je, 1:km) @@ -336,7 +336,7 @@ subroutine fv_sat_adj_run(mdt, zvir, is, ie, isd, ied, kmp, km, kmdelz, js, je, #endif ql(isd,jsd,k), qi(isd,jsd,k), & qr(isd,jsd,k), qs(isd,jsd,k), qg(isd,jsd,k), & - hs, dpln, delz(isd:,jsd:,kdelz), pt(isd,jsd,k), delp(isd,jsd,k),& + hs, dpln, delz(is:,js:,kdelz), pt(isd,jsd,k), delp(isd,jsd,k),& q_con(isd:,jsd:,k), cappa(isd:,jsd:,k), area, dtdt(is,js,k), & out_dt, last_step, do_qa, qa(isd,jsd,k)) if ( .not. hydrostatic ) then @@ -396,8 +396,8 @@ subroutine fv_sat_adj_work(mdt, zvir, is, ie, js, je, ng, hydrostatic, consv_te, integer, intent (in) :: is, ie, js, je, ng logical, intent (in) :: hydrostatic, consv_te, out_dt, last_step, do_qa real(kind=kind_dyn), intent (in) :: zvir, mdt ! remapping time step - real(kind=kind_dyn), intent (in), dimension (is - ng:ie + ng, js - ng:je + ng) :: dp, delz, hs - real(kind=kind_dyn), intent (in), dimension (is:ie, js:je) :: dpln + real(kind=kind_dyn), intent (in), dimension (is - ng:ie + ng, js - ng:je + ng) :: dp, hs + real(kind=kind_dyn), intent (in), dimension (is:ie, js:je) :: dpln, delz real(kind=kind_dyn), intent (inout), dimension (is - ng:ie + ng, js - ng:je + ng) :: pt #ifdef MULTI_GASES real(kind=kind_dyn), intent (inout), dimension (is - ng:ie + ng, js - ng:je + ng, 1:1, 1:num_gas) :: qvi From 2ee8e48f45cc10c05a78ffabaae0bfdf034cc515 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Fri, 31 Jan 2020 20:35:33 +0000 Subject: [PATCH 036/404] Changes in cloud/radiation interaction in GSD physics suite that uses Thompson MP, MYNN pbl and GF convection: 1. Switch the order of calls, first MYNNrad_pre (or SGSCloud_RadPre), then rrtmg_pre. This will add sub-grid clouds from MYNN PBL (or MYNN PBL and GF) to QC and QI, and these updated hydrometeors will be used to compute cloud paths and effective radii. 2. In rrtmg_pre with the use of THompson MP: - use Thompson's subroutines make_IceNumber and make_DropletNumber to compute number concentrations for subgrid clouds. - use calc_effectRad to compute effective radii for QC and QI with sub-grid clouds. - added option (clduni) to use the same subroutine to compute water paths as with the GFDL MP. For this input.nl should set effr_in=.true. - the progcld5 is used mostly to compute Xu-Randall cloud fraction. 3. Added *SGSCloud_* modules to replace *MYNNrad* to add all subgrid clouds to QC and QI (from MYNN PBL and GF conv). 4. Added convective clouds qci_conv to GF scheme and SGSCloud_RadPre. 5. Computation of total cloud fraction in progcld5 is change not to depend on shallow/deep convection. Not needed in the current version of GSD suite. --- physics/GFS_rrtmg_pre.F90 | 306 ++++++++++++++++++++++++-- physics/GFS_rrtmg_pre.meta | 61 ++++++ physics/cu_gf_driver.F90 | 8 +- physics/cu_gf_driver.meta | 9 + physics/module_MYNNrad_pre.F90 | 7 + physics/module_SGSCloud_RadPost.F90 | 75 +++++++ physics/module_SGSCloud_RadPost.meta | 96 +++++++++ physics/module_SGSCloud_RadPre.F90 | 211 ++++++++++++++++++ physics/module_SGSCloud_RadPre.meta | 308 +++++++++++++++++++++++++++ physics/radiation_clouds.f | 63 +++--- 10 files changed, 1095 insertions(+), 49 deletions(-) create mode 100644 physics/module_SGSCloud_RadPost.F90 create mode 100644 physics/module_SGSCloud_RadPost.meta create mode 100644 physics/module_SGSCloud_RadPre.F90 create mode 100644 physics/module_SGSCloud_RadPre.meta diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index b179a74db..6b5382e65 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -20,7 +20,8 @@ end subroutine GFS_rrtmg_pre_init ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd, Cldprop, Coupling, & - Radtend, & ! input/output + Radtend, qc, qi, nc, ni, nwfa, & ! input/output + imfdeepcnv, imfdeepcnv_gf, & f_ice, f_rain, f_rimef, flgmin, cwm, & ! F-A mp scheme only lm, im, lmk, lmp, & ! input kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output @@ -50,7 +51,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input & epsm1 => con_epsm1, & & fvirt => con_fvirt & &, rog => con_rog & - &, rocp => con_rocp + &, rocp => con_rocp & + &, con_rd use radcons, only: itsfc,ltp, lextop, qmin, & qme5, qme6, epsq, prsmin use funcphys, only: fpvs @@ -70,6 +72,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input & proflw_type, NBDLW use surface_perturbation, only: cdfnor + !tgs for Thompson MP + use module_mp_thompson, only : calc_effectRad + use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber, make_RainNumber + implicit none type(GFS_control_type), intent(in) :: Model @@ -81,7 +87,15 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: qc + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: qi + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: nc + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: ni + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: nwfa + + integer, intent(in) :: im, lm, lmk, lmp + integer, intent(in) :: imfdeepcnv, imfdeepcnv_gf integer, intent(out) :: kd, kt, kb ! F-A mp scheme only @@ -123,11 +137,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw3 real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds3 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds5 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(inout) :: clouds1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(inout) :: clouds2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(inout) :: clouds3 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(inout) :: clouds4 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(inout) :: clouds5 real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds6 real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds7 real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds8 @@ -142,7 +156,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer, intent(out) :: errflg ! Local variables - integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl, ncndl + integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl, ncndl, ntlnc, ntinc integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb @@ -154,7 +168,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & cldcov, deltaq, cnvc, cnvw, & - effrl, effri, effrr, effrs + effrl, effri, effrr, effrs, rho, orho + ! for Thompson MP + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & + re_cloud, re_ice, re_snow, qv_mp, qc_mp, & + qi_mp, qs_mp, nc_mp, ni_mp real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db ! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz @@ -165,6 +183,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw + + logical :: clduni + real(kind=kind_phys) :: qvs ! !===> ... begin here ! @@ -180,6 +201,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) ntcw = Model%ntcw ntiw = Model%ntiw + ntlnc = Model%ntlnc + ntinc = Model%ntinc ncld = Model%ncld ntrw = Model%ntrw ntsw = Model%ntsw @@ -257,6 +280,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input tlyr(i,k1) = Statein%tgrs(i,k2) prslk1(i,k1) = Statein%prslk(i,k2) + rho(i,k1) = plyr(i,k1)/(con_rd*tlyr(i,k1)) + orho(i,k1) = 1.0/rho(i,k1) + !> - Compute relative humidity. es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) @@ -273,6 +299,15 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) enddo enddo + if ((Model%do_mynnedmf.or. (imfdeepcnv == imfdeepcnv_gf)) .and. Model%kdt > 1) then + ! for MYNN PBL and GF convective include subgrid clouds into tracer1 + do k = 1, LM + k1 = k + kd + k2 = k + lsk + tracer1(:,k1,ntcw) = max(0.0, qc(:,k2)) + tracer1(:,k1,ntiw) = max(0.0, qi(:,k2)) + enddo + endif ! if (ivflip == 0) then ! input data from toa to sfc do i = 1, IM @@ -552,6 +587,17 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water ccnd(i,k,4) = tracer1(i,k,ntsw) + tracer1(i,k,ntgl) ! snow + grapuel + + ! for Thompson MP - prepare variables for calc_effr + if (Model%imp_physics == Model%imp_physics_thompson) then + qvs = Statein%qgrs(i,k2,1) + qv_mp (i,k) = qvs/(1.-qvs) + qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) + qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) + qs_mp (i,k) = tracer1(i,k,ntsw)/(1.-qvs) + nc_mp (i,k) = tracer1(i,k,ntlnc)/(1.-qvs) + ni_mp (i,k) = tracer1(i,k,ntinc)/(1.-qvs) + endif enddo enddo endif @@ -562,7 +608,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo enddo - if (Model%imp_physics == 11 ) then + if (Model%imp_physics == Model%imp_physics_gfdl ) then if (.not. Model%lgfdlmprad) then @@ -583,7 +629,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! do j=1,Model%ncld ! ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntcw+j-1) ! cloud condensate amount ! enddo - endif + endif ! imp_physics == 11 do k=1,LMK do i=1,IM if (ccnd(i,k,1) < EPSQ ) ccnd(i,k,1) = 0.0 @@ -612,7 +658,29 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo endif elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + IF (Model%do_mynnedmf) THEN + if(Model%kdt == 1) then + ! GFDL cloud fraction + cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + else ! kdt > 1 + do k=1,lm + k1 = k + kd + do i=1,im + IF (tracer1(i,k1,ntrw)>1.0e-7 .OR. tracer1(i,k1,ntsw)>1.0e-7) then + ! GFDL cloud fraction + cldcov(i,k1) = tracer1(I,k1,Model%ntclamt) + ELSE + ! MYNN sub-grid cloud fraction + cldcov(i,k1) = clouds1(i,k1) + ENDIF + enddo + enddo + endif + ELSE + ! GFDL cloud fraction + cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + ENDIF + if(Model%effr_in) then do k=1,lm k1 = k + kd @@ -634,6 +702,103 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo endif + elseif (Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP + if(Model%kdt == 1 ) then + do k=1,lm + k1 = k + kd + do i=1,im + effrl(i,k1) = Tbd%phy_f3d(i,k,Model%nleffr) + effri(i,k1) = Tbd%phy_f3d(i,k,Model%nieffr) + effrr(i,k1) = 1000. ! rrain_def=1000. + effrs(i,k1) = Tbd%phy_f3d(i,k,Model%nseffr) + enddo + enddo + else ! kdt>1 + if(Model%do_mynnedmf .or. & + Model%imfdeepcnv == Model%imfdeepcnv_gf ) then + !tgs - take into account sub-grid clouds from GF or MYNN PBL + + ! Compute effective radii for QC and QI with sub-grid clouds + do k=1,lm + do i=1,im + re_cloud(i,k) = 2.49E-6 + re_ice(i,k) = 4.99E-6 + re_snow(i,k) = 999.E-6 + ! make NC consistent with sub-grid clouds + if (qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then + nc_mp(i,k) = make_DropletNumber(qc_mp(i,k)*rho(i,k), nwfa(i,k)) * orho(i,k) + endif + if (qi_mp(i,k)>1.e-12 .and. ni_mp(i,k)<100.) then + ni_mp(i,k) = make_IceNumber(qi_mp(i,k)*rho(i,k), tlyr(i,k)) * orho(i,k) + endif + end do + end do + do i = 1, im + call calc_effectRad (tlyr(i,:), plyr(i,:), qv_mp(i,:), qc_mp(i,:), & + nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & + re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, lm ) + end do + do k=1,lm + do i=1,im + re_cloud(i,k) = MAX(2.49, MIN(re_cloud(i,k)*1.e6, 50.)) + re_ice(i,k) = MAX(4.99, MIN(re_ice(i,k)*1.e6, 125.)) + !tgs: clduni has different limits for ice radii: 10.0-150.0 + ! it will raise the low limit from 5 to 10, but the + ! high limit will remain 125. + re_snow(i,k) = MAX(9.99, MIN(re_snow(i,k)*1.e6, 999.)) + end do + end do + if(1==2) then + write(0,'(a,3e16.7)') " before progclduni: re_cloud min/mean/max =", & + minval(re_cloud), & + sum(re_cloud)/real(size(re_cloud)), & + maxval(re_cloud) + write(0,'(a,3e16.7)') " before progclduni: re_ice min/mean/max =", & + minval(re_ice), & + sum(re_ice)/real(size(re_ice)), & + maxval(re_ice) + write(0,'(a,3e16.7)') " before progclduni: clouds3 min/mean/max =", & + minval(clouds3), & + sum(clouds3)/real(size(clouds3)), & + maxval(clouds3) + write(0,'(a,3e16.7)') " before progclduni: clouds5 min/mean/max =", & + minval(clouds5), & + sum(clouds5)/real(size(clouds5)), & + maxval(clouds5) + write(0,'(a,3e16.7)') " before progcld5: phy_f3d cl min/mean/max =", & + minval(Tbd%phy_f3d(:,:,Model%nleffr)), & + sum(Tbd%phy_f3d(:,:,Model%nleffr))/real(size(Tbd%phy_f3d(:,:,Model%nleffr))), & + maxval(Tbd%phy_f3d(:,:,Model%nleffr)) + write(0,'(a,3e16.7)')" before progcld5: phy_f3d ice min/mean/max =", & + minval(Tbd%phy_f3d(:,:,Model%nieffr)), & + sum(Tbd%phy_f3d(:,:,Model%nieffr))/real(size(Tbd%phy_f3d(:,:,Model%nieffr))), & + maxval(Tbd%phy_f3d(:,:,Model%nieffr)) + endif + + do k=1,lm + k1 = k + kd + do i=1,im + !effrl(i,k1) = clouds3 (i,k) ! Tbd%phy_f3d(i,k,Model%nleffr) + !effri(i,k1) = clouds5 (i,k) ! Tbd%phy_f3d(i,k,Model%nieffr) + effrl(i,k1) = re_cloud (i,k) ! Tbd%phy_f3d(i,k,Model%nleffr) + effri(i,k1) = re_ice (i,k) ! Tbd%phy_f3d(i,k,Model%nieffr) + effrr(i,k1) = 1000. ! rrain_def=1000. + effrs(i,k1) = Tbd%phy_f3d(i,k,Model%nseffr) + enddo + enddo + else ! not MYNN or not GF + do k=1,lm + k1 = k + kd + do i=1,im + effrl(i,k1) = Tbd%phy_f3d(i,k,Model%nleffr) + effri(i,k1) = Tbd%phy_f3d(i,k,Model%nieffr) + effrr(i,k1) = 1000. ! rrain_def=1000. + effrs(i,k1) = Tbd%phy_f3d(i,k,Model%nseffr) + enddo + enddo + endif ! MYNN PBL or GF conv + endif ! kdt + else ! neither of the other two cases cldcov = 0.0 endif @@ -748,9 +913,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6 .or. & - Model%imp_physics == 15) then - if (Model%kdt == 1 .and. .not.Model%imp_physics == 8) then + elseif(Model%imp_physics == 6 .or. Model%imp_physics == 15) then + if (Model%kdt == 1 ) then Tbd%phy_f3d(:,:,Model%nleffr) = 10. Tbd%phy_f3d(:,:,Model%nieffr) = 50. Tbd%phy_f3d(:,:,Model%nseffr) = 250. @@ -766,6 +930,118 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + + elseif(Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP + + clduni = .true. + + if(Model%do_mynnedmf .or. & + Model%imfdeepcnv == Model%imfdeepcnv_gf ) then ! MYNN PBL or GF conv + ! MYNN PBL or convective GF + + if (Model%kdt == 1 ) then + ! --- call progcld5 to get Xu-Randall total cloud cover (clouds(:,1:LMK,1)) at + ! --- initial time step, it takes into account subgrid PBL + ! --- clouds + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,Model%nleffr), & + Tbd%phy_f3d(:,:,Model%nieffr), & + Tbd%phy_f3d(:,:,Model%nseffr), & + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + if ( clduni) then + ! use progclduni for interaction with radiation, + ! overwrites 'clouds' from progcld5 + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & + IM, LMK, LMP, clouds(:,1:LMK,1), & + effrl, effri, effrr, effrs, Model%effr_in , & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + endif + + else ! kdt > 1 + + do k=1,lm + k1 = k + kd + do i=1,im + Tbd%phy_f3d(i,k,Model%nleffr) = effrl(i,k1) + Tbd%phy_f3d(i,k,Model%nieffr) = effri(i,k1) + Tbd%phy_f3d(i,k,Model%nseffr) = effrs(i,k1) + enddo + enddo + + ! --- call progcld5 to get Xu-Randall total cloud cover (clouds(:,1:LMK,1)) + ! tgs: a short subroutine could be made of progcld5 only to + ! compute total cloud fraction. + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,Model%nleffr), & + Tbd%phy_f3d(:,:,Model%nieffr), & + Tbd%phy_f3d(:,:,Model%nseffr), & + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + + do k=1,lmk + do i=1,im + !IF (tracer1(i,k,ntrw) > 1.0e-7 .OR. tracer1(i,k,ntsw) > 1.0e-7) then + ! ! Xu-Randall cloud fraction computed in progcld5 + ! cldcov(i,k) = clouds(i,k,1) + ! clouds(i,k,1) = clouds(i,k,1) + !ELSE + ! MYNN sub-grid cloud fraction + !tgs - let's use only PBL cloud fraction + cldcov(i,k) = clouds1(i,k) + clouds(i,k,1) = clouds1(i,k) + !ENDIF + enddo + enddo + if( .not. clduni) then + ! --- call progcld5 for interaction with the radiation with setting + ! --- uni_cld=.true. to keep precomputed cloud + ! --- fraction + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, .true., & ! Model%uni_cld, + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,Model%nleffr), & + Tbd%phy_f3d(:,:,Model%nieffr), & + Tbd%phy_f3d(:,:,Model%nseffr), & + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + + else ! clduni + ! --- use clduni as with the GFDL microphysics. + ! --- make sure that effr_in=.true. in the input.nml! + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & + IM, LMK, LMP, clouds(:,1:LMK,1), & + effrl, effri, effrr, effrs, Model%effr_in , & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + endif ! clduni + + endif ! kdt + + else + ! MYNN PBL or GF convective are not used + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + endif ! MYNN PBL or GF + endif ! end if_imp_physics ! endif ! end_if_ntcw diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 7b40e2c1d..423a50ff0 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -270,6 +270,67 @@ kind = kind_phys intent = out optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qi] + standard_name = ice_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of ice water + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nc] + standard_name = cloud_droplet_number_concentration + long_name = cloud droplet number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[ni] + standard_name = ice_number_concentration + long_name = ice number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nwfa] + standard_name = water_friendly_aerosol_number_concentration + long_name = number concentration of water-friendly aerosols + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[imfdeepcnv] + standard_name = flag_for_mass_flux_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv_gf] + standard_name = flag_for_gf_deep_convection_scheme + long_name = flag for Grell-Freitas deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [gasvmr_co2] standard_name = volume_mixing_ratio_co2 long_name = CO2 volume mixing ratio diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 53e26fb46..1d21a7f4e 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -75,7 +75,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & hbot,htop,kcnv,xland,hfx2,qfx2,cliw,clcw, & pbl,ud_mf,dd_mf,dt_mf,cnvw_moist,cnvc,imfshalcnv, & nwfa,con_rd,gq0,ntinc,ntlnc,imp_physics,imp_physics_thompson, & - errmsg,errflg) + qci_conv,errmsg,errflg) !------------------------------------------------------------- implicit none integer, parameter :: maxiens=1 @@ -98,8 +98,9 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & integer :: its,ite, jts,jte, kts,kte integer, intent(in ) :: im,ix,km,ntracer - real(kind=kind_phys), dimension( ix , km ), intent(in ) :: forcet,forceqv_spechum,w,phil - real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: t,us,vs + real(kind=kind_phys), dimension( ix , km ), intent(in ) :: forcet,forceqv_spechum,w,phil + real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: t,us,vs + real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: qci_conv real(kind=kind_phys), dimension( ix ) :: rand_mom,rand_vmas real(kind=kind_phys), dimension( ix,4 ) :: rand_clos real(kind=kind_phys), dimension( ix , km, 11 ) :: gdc,gdc2 @@ -751,6 +752,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & gdc(i,k,1)= max(0.,tun_rad_shall(i)*cupclws(i,k)*cutens(i)) ! my mod gdc2(i,k,1)=max(0.,tun_rad_deep(i)*(cupclwm(i,k)*cutenm(i)+cupclw(i,k)*cuten(i))) + qci_conv(i,k)=gdc2(i,k,1) gdc(i,k,2)=(outt(i,k))*86400. gdc(i,k,3)=(outtm(i,k))*86400. gdc(i,k,4)=(outts(i,k))*86400. diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index d3687a352..3966c1eba 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -417,6 +417,15 @@ type = integer intent = in optional = F +[qci_conv] + standard_name = convective_cloud_condesate_after_rainout + long_name = convective cloud condesate after rainout + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/module_MYNNrad_pre.F90 b/physics/module_MYNNrad_pre.F90 index 95dc95445..54c47f681 100644 --- a/physics/module_MYNNrad_pre.F90 +++ b/physics/module_MYNNrad_pre.F90 @@ -85,6 +85,13 @@ SUBROUTINE mynnrad_pre_run( & qi_save(i,k) = qi(i,k) clouds1(i,k) = CLDFRA_BL(i,k) + !IF (qr(i,k) > 1.0e-7 .OR. qs(i,k) > 1.0e-7) then ! .OR. & + !(Model%imfdeepcnv == Model%imfdeepcnv_gf .AND. qci_conv(i,k)>1.0e-7)) THEN + !Keep Xu-RandalL clouds fraction + !ELSE + ! clouds1(i,k) = CLDFRA_BL(i,k) + !ENDIF + IF (qc(i,k) < 1.E-6 .AND. qi(i,k) < 1.E-8 .AND. CLDFRA_BL(i,k)>0.001) THEN !Partition the BL clouds into water & ice according to a linear !approximation of Hobbs et al. (1974). This allows us to only use diff --git a/physics/module_SGSCloud_RadPost.F90 b/physics/module_SGSCloud_RadPost.F90 new file mode 100644 index 000000000..810c3bcd3 --- /dev/null +++ b/physics/module_SGSCloud_RadPost.F90 @@ -0,0 +1,75 @@ +!> \file module_SGSCloud_RadPost.F90 +!! Contains the post (interstitial) work after the call to the radiation schemes: +!! 1) Restores the original qc & qi + + MODULE sgscloud_radpost + + contains + + subroutine sgscloud_radpost_init () + end subroutine sgscloud_radpost_init + + subroutine sgscloud_radpost_finalize () + end subroutine sgscloud_radpost_finalize + +!>\defgroup sgscloud_radpost GSD sgscloud_radpost_run Module +!>\ingroup gsd_mynn_edmf +!! This interstitial code restores the original resolved-scale clouds (qc and qi). +#if 0 +!! \section arg_table_sgscloud_radpost_run Argument Table +!! \htmlinclude sgscloud_radpost_run.html +!! +#endif +SUBROUTINE sgscloud_radpost_run( & + & ix,im,levs, & + & flag_init,flag_restart, & + & qc,qi, & + & qc_save, qi_save, & + & errmsg, errflg ) + +! should be moved to inside the mynn: + use machine , only : kind_phys + +!------------------------------------------------------------------- + implicit none +!------------------------------------------------------------------- + + integer, intent(in) :: ix, im, levs + logical, intent(in) :: flag_init, flag_restart + real(kind=kind_phys), dimension(im,levs), intent(out) :: qc, qi + real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_save, qi_save + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! Local variable + integer :: i, k + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + !write(0,*)"==============================================" + !write(0,*)"in mynn rad post" + + if (flag_init .and. (.not. flag_restart)) then + !write (0,*) 'Skip MYNNrad_post flag_init = ', flag_init + return + endif + + ! Add subgrid cloud information: + do k = 1, levs + do i = 1, im + + qc(i,k) = qc_save(i,k) + qi(i,k) = qi_save(i,k) + + enddo + enddo + + ! print*,"===Finished restoring the resolved-scale clouds" + ! print*,"qc_save:",qc_save(1,1)," qc:",qc(1,1) + + END SUBROUTINE sgscloud_radpost_run + +!###================================================================= + +END MODULE sgscloud_radpost diff --git a/physics/module_SGSCloud_RadPost.meta b/physics/module_SGSCloud_RadPost.meta new file mode 100644 index 000000000..0318aa231 --- /dev/null +++ b/physics/module_SGSCloud_RadPost.meta @@ -0,0 +1,96 @@ +[ccpp-arg-table] + name = sgscloud_radpost_run + type = scheme +[ix] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_dimension + long_name = vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[flag_init] + standard_name = flag_for_first_time_step + long_name = flag signaling first time step for time integration loop + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qi] + standard_name = ice_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of ice water + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qc_save] + standard_name = cloud_condensed_water_mixing_ratio_save + long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qi_save] + standard_name = ice_water_mixing_ratio_save + long_name = moist (dry+vapor, no condensates) mixing ratio of ice water before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 new file mode 100644 index 000000000..91617b06b --- /dev/null +++ b/physics/module_SGSCloud_RadPre.F90 @@ -0,0 +1,211 @@ +!>\file module_SGSCloud_RadPre.F90 +!! Contains the preliminary (interstitial) work to the call to the radiation schemes: +!! 1) Backs up the original qc & qi +!! 2) Adds the partioning of convective condensate into liqice/ice for effective radii +!! 3) Adds the subgrid clouds mixing ratio and cloud fraction to the original qc, qi and cloud fraction coming from the microphysics scheme. +!! 4) Recompute the diagnostic high, mid, low, total and bl clouds to be consistent with radiation + + MODULE sgscloud_radpre + + contains + + subroutine sgscloud_radpre_init () + end subroutine sgscloud_radpre_init + + subroutine sgscloud_radpre_finalize () + end subroutine sgscloud_radpre_finalize + +!> \defgroup sgsrad_group GSD sgscloud_radpre_run Module +!> \ingroup sgscloud_radpre +!! This interstitial code adds the subgrid clouds to the resolved-scale clouds if there is no resolved-scale clouds in that particular grid box. +!> \section arg_table_sgscloud_radpre_run Argument Table +!! \htmlinclude sgscloud_radpre_run.html +!! +!! +!! cloud array description: ! +!! clouds(:,:,1) - layer total cloud fraction ! +!! clouds(:,:,2) - layer cloud liq water path ! +!! clouds(:,:,3) - mean effective radius for liquid cloud ! +!! clouds(:,:,4) - layer cloud ice water path ! +!! clouds(:,:,5) - mean effective radius for ice cloud ! +!! +!>\section sgscloud_radpre GSD SGS Scheme General Algorithm +!> @{ +SUBROUTINE sgscloud_radpre_run( & + & ix,im,levs, & + & flag_init,flag_restart, & + & do_mynnedmf, & + & qc, qi, T3D, & + & qr, qs, & + & qci_conv, & + & imfdeepcnv, & + & qc_save, qi_save, & + & qc_bl,cldfra_bl, & + & delp,clouds1,clouds2,clouds3, & + & clouds4,clouds5,slmsk, & + & nlay, plyr, xlat, dz,de_lgth, & + & cldsa,mtopa,mbota, & + & errmsg, errflg ) + +! should be moved to inside the mynn: + use machine , only : kind_phys + ! DH* TODO - input argument, not constant + use physcons, only : con_g, con_pi + use module_radiation_clouds, only : gethml + +!------------------------------------------------------------------- + implicit none +!------------------------------------------------------------------- + ! Interface variables + real (kind=kind_phys), parameter :: gfac=1.0e5/con_g + integer, intent(in) :: ix, im, levs, imfdeepcnv, nlay + logical, intent(in) :: flag_init, flag_restart, do_mynnedmf + real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi + real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs + real(kind=kind_phys), dimension(im,levs), intent(inout) :: qci_conv + real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp + real(kind=kind_phys), dimension(im,levs), intent(inout) :: & + & clouds1,clouds2,clouds3,clouds4,clouds5 + real(kind=kind_phys), dimension(im,levs), intent(out) :: qc_save, qi_save + real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_bl, cldfra_bl + ! DH* TODO add intent() information for delp,clouds1,clouds2,clouds3,clouds4,clouds5 + real(kind=kind_phys), dimension(im), intent(in) :: slmsk, xlat, de_lgth + real(kind=kind_phys), dimension(im,nlay), intent(in) :: plyr, dz + real(kind=kind_phys), dimension(im,5), intent(out) :: cldsa + integer, dimension(im,3), intent(out) :: mbota, mtopa + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! Local variables + ! pressure limits of cloud domain interfaces (low,mid,high) in mb (0.1kPa) + real (kind=kind_phys) :: ptop1(im,3+1) !< pressure limits of cloud domain interfaces + real (kind=kind_phys) :: ptopc(3+1,2 ) !< pressure limits of cloud domain interfaces + !! (low, mid, high) in mb (0.1kPa) + data ptopc / 1050., 650., 400., 0.0, 1050., 750., 500., 0.0 / + real(kind=kind_phys), dimension(im,nlay) :: cldcnv + real(kind=kind_phys), dimension(im) :: rxlat + real (kind=kind_phys):: Tc, iwc, tem1 + integer :: i, k, id + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + !write(0,*)"==============================================" + !write(0,*)"in mynn rad pre" + + if (flag_init .and. (.not. flag_restart)) then + !write (0,*) 'Skip MYNNrad_pre flag_init = ', flag_init + return + endif + ! Back-up microphysics cloud information: + do k = 1, levs + do i = 1, im + qc_save(i,k) = qc(i,k) + qi_save(i,k) = qi(i,k) + end do + end do + + ! add boundary layer clouds + IF (do_mynnedmf == .true.) THEN + do k = 1, levs + do i = 1, im + + clouds1(i,k) = CLDFRA_BL(i,k) + + !IF( qr(i,k) > 1.0e-7 .OR. qs(i,k) > 1.0e-7.or.qci_conv(i,k)>1.0e-7)THEN + !Keep Xu-RandalL clouds fraction - do not overwrite + !ELSE + ! clouds1(i,k) = CLDFRA_BL(i,k) + !ENDIF + + IF (qc(i,k) < 1.E-6 .AND. qi(i,k) < 1.E-8 .AND. CLDFRA_BL(i,k)>0.001) THEN + !Partition the BL clouds into water & ice according to a linear + !approximation of Hobbs et al. (1974). This allows us to only use + !one 3D array for both cloud water & ice. +! Wice = 1. - MIN(1., MAX(0., (t(i,k)-254.)/15.)) +! Wh2o = 1. - Wice + !clouds1(i,k)=MAX(clouds1(i,k),CLDFRA_BL(i,k)) + !clouds1(i,k)=MAX(0.0,MIN(1.0,clouds1(i,k))) + qc(i,k) = QC_BL(i,k)*(MIN(1., MAX(0., (T3D(i,k)-244.)/25.)))*CLDFRA_BL(i,k) + qi(i,k) = QC_BL(i,k)*(1. - MIN(1., MAX(0., (T3D(i,k)-244.)/25.)))*CLDFRA_BL(i,k) + + Tc = T3D(i,k) - 273.15 + !iwc = qi(i,k)*1.0e6*rho(i,k) + + IF (nint(slmsk(i)) == 1) then !land + IF(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos) + IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) + ELSE + !eff radius cloud water (microns), from Miles et al. + IF(qc(i,k)>1.E-8)clouds3(i,k)=9.6 + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) + IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 8b) + !IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(139.7 + 1.76*Tc + 13.49*LOG(iwc), 20.) + ENDIF + !calculate water and ice paths for additional BL clouds + clouds2(i,k) = max(0.0, qc(i,k) * gfac * delp(i,k)) + clouds4(i,k) = max(0.0, qi(i,k) * gfac * delp(i,k)) + ENDIF + enddo + enddo + ENDIF ! do_mynnedmf + + ! add convective clouds + IF (imfdeepcnv == 3) THEN + do k = 1, levs + do i = 1, im + IF ( qci_conv(i,k) > 0.) THEN + !IF (qc(i,k) < 1.E-6 .AND. qi(i,k) < 1.E-8 .AND. qci_conv(i,k) > 0.) THEN + !Partition the convective clouds into water & ice according to a linear + qc(i,k) = qc(i,k)+qci_conv(i,k)*(MIN(1., MAX(0., (T3D(i,k)-244.)/25.))) + qi(i,k) = qi(i,k)+qci_conv(i,k)*(1. - MIN(1., MAX(0., (T3D(i,k)-244.)/25.))) + + Tc = T3D(i,k) - 273.15 + + IF (nint(slmsk(i)) == 1) then !land + IF(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos) + IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) + ELSE + !eff radius cloud water (microns), from Miles et al. + IF(qc(i,k)>1.E-8)clouds3(i,k)=9.6 + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) + IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(173.45 + 2.14*Tc, 20.) + ENDIF + ENDIF + enddo + enddo + ENDIF +!> - Compute SFC/low/middle/high cloud top pressure for each cloud domain for given latitude. + + do i =1, im + rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range +! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range + enddo + + do id = 1, 4 + tem1 = ptopc(id,2) - ptopc(id,1) + do i =1, im + ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) + enddo + enddo + + cldcnv = 0. + +!> - Recompute the diagnostic high, mid, low, total and bl cloud fraction + call gethml & +! --- inputs: + & ( plyr, ptop1, clouds1, cldcnv, dz, de_lgth, im, nlay, & +! --- outputs: + & cldsa, mtopa, mbota) + + !print*,"===Finished adding subgrid clouds to the resolved-scale clouds" + !print*,"qc_save:",qc_save(1,1)," qi_save:",qi_save(1,1) + + END SUBROUTINE sgscloud_radpre_run + +!###================================================================= + +END MODULE sgscloud_radpre diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta new file mode 100644 index 000000000..349d37885 --- /dev/null +++ b/physics/module_SGSCloud_RadPre.meta @@ -0,0 +1,308 @@ +[ccpp-arg-table] + name = sgscloud_radpre_init + type = scheme + +######################################################################## +[ccpp-arg-table] + name = sgscloud_radpre_finalize + type = scheme + +######################################################################## +[ccpp-arg-table] + name = sgscloud_radpre_run + type = scheme +[ix] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_dimension + long_name = vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[flag_init] + standard_name = flag_for_first_time_step + long_name = flag signaling first time step for time integration loop + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qi] + standard_name = ice_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of ice water + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[T3D] + standard_name = air_temperature + long_name = layer mean air temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qr] + standard_name = rain_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of rain water + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qs] + standard_name = snow_water_mixing_ratio + long_name = moist (dry+vapor, no condensates) mixing ratio of snow water + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qci_conv] + standard_name = convective_cloud_condesate_after_rainout + long_name = convective cloud condesate after rainout + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[imfdeepcnv] + standard_name = flag_for_mass_flux_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[qc_save] + standard_name = cloud_condensed_water_mixing_ratio_save + long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[qi_save] + standard_name = ice_water_mixing_ratio_save + long_name = moist (dry+vapor, no condensates) mixing ratio of ice water before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[QC_BL] + standard_name = subgrid_cloud_mixing_ratio_pbl + long_name = subgrid cloud cloud mixing ratio from PBL scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[CLDFRA_BL] + standard_name = subgrid_cloud_fraction_pbl + long_name = subgrid cloud fraction from PBL scheme + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[delp] + standard_name = layer_pressure_thickness_for_radiation + long_name = layer pressure thickness on radiation levels + units = hPa + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[clouds1] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds2] + standard_name = cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds3] + standard_name = mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds4] + standard_name = cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds5] + standard_name = mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[nlay] + standard_name = adjusted_vertical_layer_dimension_for_radiation + long_name = number of vertical layers for radiation + units = count + dimensions = () + type = integer + intent = in + optional = F +[plyr] + standard_name = air_pressure_at_layer_for_radiation_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = grid latitude in radians + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dz] + standard_name = layer_thickness_for_radiation + long_name = layer thickness on radiation levels + units = km + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle,high, total and BL + units = frac + dimensions = (horizontal_dimension,5) + type = real + kind = kind_phys + intent = out + optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[do_mynnedmf] + standard_name = do_mynnedmf + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 49b394fe1..8e5c099aa 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -243,7 +243,7 @@ module module_radiation_clouds integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld4o + & cld_init, progcld5, progcld4o, gethml ! ================= @@ -2468,13 +2468,13 @@ subroutine progcld5 & ! !===> ... begin here ! - do nf=1,nf_clds - do k=1,nlay - do i=1,ix - clouds(i,k,nf) = 0.0 - enddo - enddo - enddo + !do nf=1,nf_clds + ! do k=1,nlay + ! do i=1,ix + ! clouds(i,k,nf) = 0.0 + ! enddo + ! enddo + !enddo ! clouds(:,:,:) = 0.0 do k = 1, NLAY @@ -2514,7 +2514,8 @@ subroutine progcld5 & do k = 1, NLAY do i = 1, IX - clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) + clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) & + & + clw(i,k,ntrw) + clw(i,k,ntgl) enddo enddo !> - Find top pressure for each cloud domain for given latitude. @@ -2558,30 +2559,30 @@ subroutine progcld5 & !> - Calculate layer cloud fraction. clwmin = 0.0 - if (.not. lmfshal) then - do k = 1, NLAY - do i = 1, IX - clwt = 1.0e-6 * (plyr(i,k)*0.001) + !if (.not. lmfshal) then + !do k = 1, NLAY + !do i = 1, IX + ! clwt = 1.0e-6 * (plyr(i,k)*0.001) ! clwt = 2.0e-6 * (plyr(i,k)*0.001) - if (clwf(i,k) > clwt) then + !if (clwf(i,k) > clwt) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) + ! onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + ! clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 + ! tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + ! tem1 = 2000.0 / tem1 ! tem1 = 1000.0 / tem1 - value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) + ! value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) + ! tem2 = sqrt( sqrt(rhly(i,k)) ) - cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - else + ! cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + !endif + !enddo + !enddo + !else do k = 1, NLAY do i = 1, IX clwt = 1.0e-6 * (plyr(i,k)*0.001) @@ -2592,11 +2593,11 @@ subroutine progcld5 & clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) ! tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan - if (lmfdeep2) then - tem1 = xrc3 / tem1 - else + !if (lmfdeep2) then + ! tem1 = xrc3 / tem1 + !else tem1 = 100.0 / tem1 - endif + !endif ! value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhly(i,k)) ) @@ -2605,14 +2606,14 @@ subroutine progcld5 & endif enddo enddo - endif + !endif endif ! if (uni_cld) then do k = 1, NLAY do i = 1, IX if (cldtot(i,k) < climit) then - cldtot(i,k) = 0.0 + !cldtot(i,k) = 0.0 cwp(i,k) = 0.0 cip(i,k) = 0.0 crp(i,k) = 0.0 From d39aaeb3b90813449c0dc5739ba64637164e67c0 Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Fri, 31 Jan 2020 21:10:25 -0800 Subject: [PATCH 037/404] fix various meta file errors --- physics/GFS_rrtmg_pre.meta | 2 +- physics/GFS_surface_generic.meta | 2 +- physics/cires_ugwp.meta | 36 +- physics/cs_conv_aw_adj.meta | 2 +- physics/m_micro_interstitial.meta | 2 +- physics/module_MYJPBL_wrapper.meta | 2 +- physics/module_MYJSFC_wrapper.meta | 6 +- physics/sfc_drv_ruc.meta | 948 ++++++++++++++--------------- 8 files changed, 500 insertions(+), 500 deletions(-) diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 42490b038..47e2da055 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -1,4 +1,4 @@ -[ccpp-arg-table] +e[ccpp-arg-table] name = GFS_rrtmg_pre_init type = scheme diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index bccfa4e38..c4b9cf923 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -372,7 +372,7 @@ units = flag dimensions = (horizontal_dimension) type = integer - intent = in + intent = out optional = F [slimskin_cpl] standard_name = sea_land_ice_mask_in diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 7f1118016..192629d3b 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -316,24 +316,6 @@ kind = kind_phys intent = in optional = F -[oa4] - standard_name = asymmetry_of_subgrid_orography - long_name = asymmetry of subgrid orography - units = none - dimensions = (horizontal_dimension,4) - type = real - kind = kind_phys - intent = in - optional = F -[clx] - standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height - units = frac - dimensions = (horizontal_dimension,4) - type = real - kind = kind_phys - intent = in - optional = F [theta] standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with_respect to east of maximum subgrid orographic variations @@ -368,6 +350,24 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys + intent = inout + optional = F +[clx] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height + long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height + units = frac + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[oa4] + standard_name = asymmetry_of_subgrid_orography + long_name = asymmetry of subgrid orography + units = none + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys intent = in optional = F [do_tofd] diff --git a/physics/cs_conv_aw_adj.meta b/physics/cs_conv_aw_adj.meta index 1e744bdd3..fbbe3770c 100644 --- a/physics/cs_conv_aw_adj.meta +++ b/physics/cs_conv_aw_adj.meta @@ -97,7 +97,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F [gt0] standard_name = air_temperature_updated_by_physics diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index 17358de83..538adcc4f 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -422,7 +422,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F [gq0_rain] standard_name = rain_water_mixing_ratio_updated_by_physics diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index a70203def..0ffca31bb 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -148,7 +148,7 @@ dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys - intent = in + intent = inout optional = F [prsl] standard_name = air_pressure diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index 8100d0b05..de3e97bca 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -354,7 +354,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F [ustar] standard_name = surface_friction_velocity @@ -399,7 +399,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = out optional = F [ffm] standard_name = Monin_Obukhov_similarity_function_for_momentum @@ -471,7 +471,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F [z0rl_ocn] standard_name = surface_roughness_length_over_ocean_interstitial diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 6c3cd3cb3..e21e10fa7 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -77,13 +77,12 @@ [ccpp-arg-table] name = lsm_ruc_run type = scheme -[delt] - standard_name = time_step_for_dynamics - long_name = physics time step - units = s +[iter] + standard_name = ccpp_loop_counter + long_name = loop counter for subcycling loops in CCPP + units = index dimensions = () - type = real - kind = kind_phys + type = integer intent = in optional = F [me] @@ -110,14 +109,6 @@ type = integer intent = in optional = F -[iter] - standard_name = ccpp_loop_counter - long_name = loop counter for subcycling loops in CCPP - units = index - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -134,54 +125,6 @@ type = integer intent = in optional = F -[lsm_ruc] - standard_name = flag_for_ruc_land_surface_scheme - long_name = flag for RUC land surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F -[lsm] - standard_name = flag_for_land_surface_scheme - long_name = flag for land surface model - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_gfdl] - standard_name = flag_for_gfdl_microphysics_scheme - long_name = choice of GFDL microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme - long_name = choice of Thompson microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[do_mynnsfclay] - standard_name = do_mynnsfclay - long_name = flag to activate MYNN surface layer - units = flag - dimensions = () - type = logical - intent = in - optional = F [lsoil_ruc] standard_name = soil_vertical_dimension_for_land_surface_model long_name = number of soil layers internal to land surface model @@ -198,14 +141,6 @@ type = integer intent = in optional = F -[rdlai] - standard_name = flag_for_reading_leaf_area_index_from_input - long_name = flag for reading leaf area index from initial conditions for RUC LSM - units = flag - dimensions = () - type = logical - intent = in - optional = F [zs] standard_name = depth_of_soil_levels_for_land_surface_model long_name = depth of soil levels for land surface model @@ -215,518 +150,527 @@ kind = kind_phys intent = inout optional = F -[con_cp] - standard_name = specific_heat_of_dry_air_at_constant_pressure - long_name = specific heat !of dry air at constant pressure - units = J kg-1 K-1 - dimensions = () +[t1] + standard_name = air_temperature_at_lowest_model_layer + long_name = mean temperature at lowest model layer + units = K + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[con_g] - standard_name = gravitational_acceleration - long_name = gravitational acceleration - units = m s-2 - dimensions = () +[q1] + standard_name = water_vapor_specific_humidity_at_lowest_model_layer + long_name = water vapor specific humidity at lowest model layer + units = kg kg-1 + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[con_pi] - standard_name = pi - long_name = ratio of a circle's circumference to its diameter - units = radians - dimensions = () +[qc] + standard_name = cloud_condensed_water_mixing_ratio_at_lowest_model_layer + long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water at lowest model layer + units = kg kg-1 + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[con_rd] - standard_name = gas_constant_dry_air - long_name = ideal gas constant for dry air - units = J kg-1 K-1 - dimensions = () +[soiltyp] + standard_name = soil_type_classification + long_name = soil type at each grid cell + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[vegtype] + standard_name = vegetation_type_classification + long_name = vegetation type at each grid cell + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[sigmaf] + standard_name = vegetation_area_fraction + long_name = areal fractional cover of green vegetation + units = frac + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[con_rv] - standard_name = gas_constant_water_vapor - long_name = ideal gas constant for water vapor - units = J kg-1 K-1 - dimensions = () +[laixy] + standard_name = leaf_area_index + long_name = leaf area index + units = none + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[con_hvap] - standard_name = latent_heat_of_vaporization_of_water_at_0C - long_name = latent heat of vaporization/sublimation (hvap) - units = J kg-1 - dimensions = () +[sfcemis] + standard_name = surface_longwave_emissivity_over_land_interstitial + long_name = surface lw emissivity in fraction over land (temporary use as interstitial) + units = frac + dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[con_fvirt] - standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one - long_name = rv/rd - 1 (rv = ideal gas constant for water vapor) - units = none - dimensions = () +[dlwflx] + standard_name = surface_downwelling_longwave_flux + long_name = surface downwelling longwave flux at current time + units = W m-2 + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[land] - standard_name = flag_nonzero_land_surface_fraction - long_name = flag indicating presence of some land surface area fraction - units = flag +[dswsfc] + standard_name = surface_downwelling_shortwave_flux + long_name = surface downwelling shortwave flux at current time + units = W m-2 dimensions = (horizontal_dimension) - type = logical + type = real + kind = kind_phys intent = in optional = F -[islimsk] - standard_name = sea_land_ice_mask - long_name = sea/land/ice mask (=0/1/2) - units = flag +[snet] + standard_name = surface_net_downwelling_shortwave_flux + long_name = surface net downwelling shortwave flux at current time + units = W m-2 dimensions = (horizontal_dimension) - type = integer + type = real + kind = kind_phys intent = in optional = F -[rainnc] - standard_name = lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep - long_name = explicit rainfall from previous timestep - units = m +[delt] + standard_name = time_step_for_dynamics + long_name = physics time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[tg3] + standard_name = deep_soil_temperature + long_name = deep soil temperature + units = K dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[rainc] - standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep - long_name = convective_precipitation_amount from previous timestep - units = m +[cm] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_land + long_name = surface exchange coeff for momentum over land + units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[ice] - standard_name = lwe_thickness_of_ice_amount_from_previous_timestep - long_name = ice amount from previous timestep - units = m +[ch] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land + long_name = surface exchange coeff heat & moisture over land + units = none dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[snow] - standard_name = lwe_thickness_of_snow_amount_from_previous_timestep - long_name = snow amount from previous timestep - units = m +[prsl1] + standard_name = air_pressure_at_lowest_model_layer + long_name = mean pressure at lowest model layer + units = Pa dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[graupel] - standard_name = lwe_thickness_of_graupel_amount_from_previous_timestep - long_name = graupel amount from previous timestep +[zf] + standard_name = height_above_ground_at_lowest_model_layer + long_name = layer 1 height above ground (not MSL) units = m dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[srflag] - standard_name = flag_for_precipitation_type - long_name = snow/rain flag for precipitation - units = flag +[wind] + standard_name = wind_speed_at_lowest_model_layer + long_name = wind speed at lowest model level + units = m s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[sncovr1] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction +[shdmin] + standard_name = minimum_vegetation_area_fraction + long_name = min fractional coverage of green vegetation units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F -[weasd] - standard_name = water_equivalent_accumulated_snow_depth_over_land - long_name = water equiv of acc snow depth over land - units = mm +[shdmax] + standard_name = maximum_vegetation_area_fraction + long_name = max fractional coverage of green vegetation + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F -[snwdph] - standard_name = surface_snow_thickness_water_equivalent_over_land - long_name = water equivalent snow depth over land - units = mm +[alvwf] + standard_name = mean_vis_albedo_with_weak_cosz_dependency + long_name = mean vis albedo with weak cosz dependency + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F -[rhosnf] - standard_name = density_of_frozen_precipitation - long_name = density of frozen precipitation - units = kg m-3 +[alnwf] + standard_name = mean_nir_albedo_with_weak_cosz_dependency + long_name = mean nir albedo with weak cosz dependency + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = in optional = F -[zf] - standard_name = height_above_ground_at_lowest_model_layer - long_name = layer 1 height above ground (not MSL) - units = m +[snoalb] + standard_name = upper_bound_on_max_albedo_over_deep_snow + long_name = maximum snow albedo + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[prsl1] - standard_name = air_pressure_at_lowest_model_layer - long_name = mean pressure at lowest model layer - units = Pa +[sfalb] + standard_name = surface_diffused_shortwave_albedo + long_name = mean surface diffused sw albedo + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[wind] - standard_name = wind_speed_at_lowest_model_layer - long_name = wind speed at lowest model level - units = m s-1 +[flag_iter] + standard_name = flag_for_iteration + long_name = flag for iteration + units = flag dimensions = (horizontal_dimension) - type = real - kind = kind_phys + type = logical intent = in optional = F -[t1] - standard_name = air_temperature_at_lowest_model_layer - long_name = mean temperature at lowest model layer - units = K +[flag_guess] + standard_name = flag_for_guess_run + long_name = flag for guess run + units = flag dimensions = (horizontal_dimension) - type = real - kind = kind_phys + type = logical intent = in optional = F -[q1] - standard_name = water_vapor_specific_humidity_at_lowest_model_layer - long_name = water vapor specific humidity at lowest model layer - units = kg kg-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys +[isot] + standard_name = soil_type_dataset_choice + long_name = soil type dataset choice + units = index + dimensions = () + type = integer intent = in optional = F -[qc] - standard_name = cloud_condensed_water_mixing_ratio_at_lowest_model_layer - long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water at lowest model layer - units = kg kg-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys +[ivegsrc] + standard_name = vegetation_type_dataset_choice + long_name = land use dataset choice + units = index + dimensions = () + type = integer intent = in optional = F -[dlwflx] - standard_name = surface_downwelling_longwave_flux - long_name = surface downwelling longwave flux at current time - units = W m-2 +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[dswsfc] - standard_name = surface_downwelling_shortwave_flux - long_name = surface downwelling shortwave flux at current time - units = W m-2 - dimensions = (horizontal_dimension) +[smc] + standard_name = volume_fraction_of_soil_moisture + long_name = total soil moisture + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[snet] - standard_name = surface_net_downwelling_shortwave_flux - long_name = surface net downwelling shortwave flux at current time - units = W m-2 - dimensions = (horizontal_dimension) +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_dimension,soil_vertical_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[sfcemis] - standard_name = surface_longwave_emissivity_over_land_interstitial - long_name = surface lw emissivity in fraction over land (temporary use as interstitial) +[slc] + standard_name = volume_fraction_of_unfrozen_soil_moisture + long_name = liquid soil moisture units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_dimension,soil_vertical_dimension) type = real kind = kind_phys intent = inout optional = F -[cm] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_land - long_name = surface exchange coeff for momentum over land - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys +[lsm_ruc] + standard_name = flag_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer intent = in optional = F -[ch] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land - long_name = surface exchange coeff heat & moisture over land - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys +[lsm] + standard_name = flag_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer intent = in optional = F -[chh] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land - long_name = thermal exchange coefficient over land - units = kg m-2 s-1 +[land] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout + type = logical + intent = in optional = F -[cmm] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land - long_name = momentum exchange coefficient over land - units = m s-1 +[islimsk] + standard_name = sea_land_ice_mask + long_name = sea/land/ice mask (=0/1/2) + units = flag dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout + type = integer + intent = in optional = F -[wetness] - standard_name = normalized_soil_wetness_for_land_surface_model - long_name = normalized soil wetness +[rdlai] + standard_name = flag_for_reading_leaf_area_index_from_input + long_name = flag for reading leaf area index from initial conditions for RUC LSM + units = flag + dimensions = () + type = logical + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_gfdl] + standard_name = flag_for_gfdl_microphysics_scheme + long_name = choice of GFDL microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_thompson] + standard_name = flag_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[smcwlt2] + standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point + long_name = soil water fraction at wilting point units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[canopy] - standard_name = canopy_water_amount - long_name = canopy water amount - units = kg m-2 +[smcref2] + standard_name = threshold_volume_fraction_of_condensed_water_in_soil + long_name = soil moisture threshold + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[sigmaf] - standard_name = vegetation_area_fraction - long_name = areal fractional cover of green vegetation - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys +[do_mynnsfclay] + standard_name = do_mynnsfclay + long_name = flag to activate MYNN surface layer + units = flag + dimensions = () + type = logical intent = in optional = F -[laixy] - standard_name = leaf_area_index - long_name = leaf area index - units = none - dimensions = (horizontal_dimension) +[con_cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat !of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () type = real kind = kind_phys intent = in optional = F -[sfalb] - standard_name = surface_diffused_shortwave_albedo - long_name = mean surface diffused sw albedo - units = frac - dimensions = (horizontal_dimension) +[con_rv] + standard_name = gas_constant_water_vapor + long_name = ideal gas constant for water vapor + units = J kg-1 K-1 + dimensions = () type = real kind = kind_phys - intent = inout + intent = in optional = F -[alvwf] - standard_name = mean_vis_albedo_with_weak_cosz_dependency - long_name = mean vis albedo with weak cosz dependency - units = frac - dimensions = (horizontal_dimension) +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () type = real kind = kind_phys intent = in optional = F -[alnwf] - standard_name = mean_nir_albedo_with_weak_cosz_dependency - long_name = mean nir albedo with weak cosz dependency - units = frac - dimensions = (horizontal_dimension) +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () type = real kind = kind_phys intent = in optional = F -[snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow - long_name = maximum snow albedo - units = frac - dimensions = (horizontal_dimension) +[con_pi] + standard_name = pi + long_name = ratio of a circle's circumference to its diameter + units = radians + dimensions = () type = real kind = kind_phys intent = in optional = F -[zorl] - standard_name = surface_roughness_length_over_land_interstitial - long_name = surface roughness length over land (temporary use as interstitial) - units = cm - dimensions = (horizontal_dimension) +[con_hvap] + standard_name = latent_heat_of_vaporization_of_water_at_0C + long_name = latent heat of vaporization/sublimation (hvap) + units = J kg-1 + dimensions = () type = real kind = kind_phys - intent = inout + intent = in optional = F -[qsurf] - standard_name = surface_specific_humidity_over_land - long_name = surface air saturation specific humidity over land - units = kg kg-1 - dimensions = (horizontal_dimension) +[con_fvirt] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = rv/rd - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () type = real kind = kind_phys - intent = inout + intent = in optional = F -[sfcqc] - standard_name = cloud_condensed_water_mixing_ratio_at_surface - long_name = moist cloud water mixing ratio at surface - units = kg kg-1 +[weasd] + standard_name = water_equivalent_accumulated_snow_depth_over_land + long_name = water equiv of acc snow depth over land + units = mm dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[sfcqv] - standard_name = water_vapor_mixing_ratio_at_surface - long_name = water vapor mixing ratio at surface - units = kg kg-1 +[snwdph] + standard_name = surface_snow_thickness_water_equivalent_over_land + long_name = water equivalent snow depth over land + units = mm dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[sfcdew] - standard_name = surface_condensation_mass - long_name = surface condensation mass - units = kg m-2 +[tskin] + standard_name = surface_skin_temperature_over_land_interstitial + long_name = surface skin temperature over land use as interstitial + units = K dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[tg3] - standard_name = deep_soil_temperature - long_name = deep soil temperature +[tskin_ocn] + standard_name = surface_skin_temperature_over_ocean_interstitial + long_name = surface skin temperature over ocean (temporary use as interstitial) units = K dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in - optional = F -[smc] - standard_name = volume_fraction_of_soil_moisture - long_name = total soil moisture - units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[slc] - standard_name = volume_fraction_of_unfrozen_soil_moisture - long_name = liquid soil moisture - units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) - type = real - kind = kind_phys intent = inout optional = F -[stc] - standard_name = soil_temperature - long_name = soil temperature - units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) +[rainnc] + standard_name = lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep + long_name = explicit rainfall from previous timestep + units = m + dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F -[smcwlt2] - standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point - long_name = soil water fraction at wilting point - units = frac +[rainc] + standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep + long_name = convective_precipitation_amount from previous timestep + units = m dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = F -[smcref2] - standard_name = threshold_volume_fraction_of_condensed_water_in_soil - long_name = soil moisture threshold - units = frac +[ice] + standard_name = lwe_thickness_of_ice_amount_from_previous_timestep + long_name = ice amount from previous timestep + units = m dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout - optional = F -[vegtype] - standard_name = vegetation_type_classification - long_name = vegetation type at each grid cell - units = index - dimensions = (horizontal_dimension) - type = integer intent = in optional = F -[soiltyp] - standard_name = soil_type_classification - long_name = soil type at each grid cell - units = index +[snow] + standard_name = lwe_thickness_of_snow_amount_from_previous_timestep + long_name = snow amount from previous timestep + units = m dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[isot] - standard_name = soil_type_dataset_choice - long_name = soil type dataset choice - units = index - dimensions = () - type = integer - intent = in - optional = F -[ivegsrc] - standard_name = vegetation_type_dataset_choice - long_name = land use dataset choice - units = index - dimensions = () - type = integer - intent = in - optional = F -[fice] - standard_name = sea_ice_concentration - long_name = ice fraction over open water - units = frac + type = real + kind = kind_phys + intent = in + optional = F +[graupel] + standard_name = lwe_thickness_of_graupel_amount_from_previous_timestep + long_name = graupel amount from previous timestep + units = m dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[keepfr] - standard_name = flag_for_frozen_soil_physics - long_name = flag for frozen soil physics (RUC) +[srflag] + standard_name = flag_for_precipitation_type + long_name = snow/rain flag for precipitation units = flag - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -740,6 +684,15 @@ kind = kind_phys intent = inout optional = F +[tslb] + standard_name = soil_temperature_for_land_surface_model + long_name = soil temperature for land surface model + units = K + dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + type = real + kind = kind_phys + intent = inout + optional = F [sh2o] standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model long_name = volume fraction of unfrozen soil moisture for lsm @@ -749,6 +702,15 @@ kind = kind_phys intent = inout optional = F +[keepfr] + standard_name = flag_for_frozen_soil_physics + long_name = flag for frozen soil physics (RUC) + units = flag + dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + type = real + kind = kind_phys + intent = inout + optional = F [smfrkeep] standard_name = volume_fraction_of_frozen_soil_moisture_for_land_surface_model long_name = volume fraction of frozen soil moisture for lsm @@ -758,153 +720,153 @@ kind = kind_phys intent = inout optional = F -[tslb] - standard_name = soil_temperature_for_land_surface_model - long_name = soil temperature for land surface model - units = K - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) +[canopy] + standard_name = canopy_water_amount + long_name = canopy water amount + units = kg m-2 + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[stm] - standard_name = soil_moisture_content - long_name = soil moisture content - units = kg m-2 +[trans] + standard_name = transpiration_flux + long_name = total plant transpiration rate + units = W m-2 dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = F -[tskin] - standard_name = surface_skin_temperature_over_land_interstitial - long_name = surface skin temperature over land use as interstitial +[tsurf] + standard_name = surface_skin_temperature_after_iteration_over_land + long_name = surface skin temperature after iteration over land units = K dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[tskin_ocn] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) +[tsnow] + standard_name = snow_temperature_bottom_first_layer + long_name = snow temperature at the bottom of first snow layer units = K dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[tsurf] - standard_name = surface_skin_temperature_after_iteration_over_land - long_name = surface skin temperature after iteration over land - units = K +[zorl] + standard_name = surface_roughness_length_over_land_interstitial + long_name = surface roughness length over land (temporary use as interstitial) + units = cm dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[tice] - standard_name = sea_ice_temperature_interstitial - long_name = sea ice surface skin temperature use as interstitial - units = K +[sfcqc] + standard_name = cloud_condensed_water_mixing_ratio_at_surface + long_name = moist cloud water mixing ratio at surface + units = kg kg-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[tsnow] - standard_name = snow_temperature_bottom_first_layer - long_name = snow temperature at the bottom of first snow layer - units = K +[sfcdew] + standard_name = surface_condensation_mass + long_name = surface condensation mass + units = kg m-2 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[snowfallac] - standard_name = total_accumulated_snowfall - long_name = run-total snow accumulation on the ground - units = kg m-2 +[tice] + standard_name = sea_ice_temperature_interstitial + long_name = sea ice surface skin temperature use as interstitial + units = K dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[acsnow] - standard_name = accumulated_water_equivalent_of_frozen_precip - long_name = snow water equivalent of run-total frozen precip - units = kg m-2 +[sfcqv] + standard_name = water_vapor_mixing_ratio_at_surface + long_name = water vapor mixing ratio at surface + units = kg kg-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[evap] - standard_name = kinematic_surface_upward_latent_heat_flux_over_land - long_name = kinematic surface upward evaporation flux over land - units = kg kg-1 m s-1 +[sncovr1] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F -[hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_land - long_name = kinematic surface upward sensible heat flux over land - units = K m s-1 +[qsurf] + standard_name = surface_specific_humidity_over_land + long_name = surface air saturation specific humidity over land + units = kg kg-1 dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F -[evbs] - standard_name = soil_upward_latent_heat_flux - long_name = soil upward latent heat flux +[gflux] + standard_name = upward_heat_flux_in_soil_over_land + long_name = soil heat flux over land units = W m-2 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = out optional = F -[evcw] - standard_name = canopy_upward_latent_heat_flux - long_name = canopy upward latent heat flux - units = W m-2 +[drain] + standard_name = subsurface_runoff_flux + long_name = subsurface runoff flux + units = kg m-2 s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = out optional = F -[sbsno] - standard_name = snow_deposition_sublimation_upward_latent_heat_flux - long_name = latent heat flux from snow depo/subl - units = W m-2 +[evap] + standard_name = kinematic_surface_upward_latent_heat_flux_over_land + long_name = kinematic surface upward evaporation flux over land + units = kg kg-1 m s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = out optional = F -[trans] - standard_name = transpiration_flux - long_name = total plant transpiration rate - units = W m-2 +[hflx] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_land + long_name = kinematic surface upward sensible heat flux over land + units = K m s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = out optional = F -[runof] - standard_name = surface_runoff_flux - long_name = surface runoff flux - units = kg m-2 s-1 +[rhosnf] + standard_name = density_of_frozen_precipitation + long_name = density of frozen precipitation + units = kg m-3 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = out optional = F -[drain] - standard_name = subsurface_runoff_flux - long_name = subsurface runoff flux +[runof] + standard_name = surface_runoff_flux + long_name = surface runoff flux units = kg m-2 s-1 dimensions = (horizontal_dimension) type = real @@ -929,48 +891,86 @@ kind = kind_phys intent = inout optional = F -[gflux] - standard_name = upward_heat_flux_in_soil_over_land - long_name = soil heat flux over land +[chh] + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land + long_name = thermal exchange coefficient over land + units = kg m-2 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[cmm] + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land + long_name = momentum exchange coefficient over land + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[evbs] + standard_name = soil_upward_latent_heat_flux + long_name = soil upward latent heat flux units = W m-2 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = out optional = F -[shdmin] - standard_name = minimum_vegetation_area_fraction - long_name = min fractional coverage of green vegetation - units = frac +[evcw] + standard_name = canopy_upward_latent_heat_flux + long_name = canopy upward latent heat flux + units = W m-2 dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = out optional = F -[shdmax] - standard_name = maximum_vegetation_area_fraction - long_name = max fractional coverage of green vegetation +[sbsno] + standard_name = snow_deposition_sublimation_upward_latent_heat_flux + long_name = latent heat flux from snow depo/subl + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[stm] + standard_name = soil_moisture_content + long_name = soil moisture content + units = kg m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[wetness] + standard_name = normalized_soil_wetness_for_land_surface_model + long_name = normalized soil wetness units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F -[flag_iter] - standard_name = flag_for_iteration - long_name = flag for iteration - units = flag +[acsnow] + standard_name = accumulated_water_equivalent_of_frozen_precip + long_name = snow water equivalent of run-total frozen precip + units = kg m-2 dimensions = (horizontal_dimension) - type = logical - intent = in + type = real + kind = kind_phys + intent = inout optional = F -[flag_guess] - standard_name = flag_for_guess_run - long_name = flag for guess run - units = flag +[snowfallac] + standard_name = total_accumulated_snowfall + long_name = run-total snow accumulation on the ground + units = kg m-2 dimensions = (horizontal_dimension) - type = logical - intent = in + type = real + kind = kind_phys + intent = inout optional = F [flag_init] standard_name = flag_for_first_time_step From 63303d37527213f1a786ec1832494074c2f74468 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Tue, 4 Feb 2020 18:33:43 +0000 Subject: [PATCH 038/404] Several changes in the comments. --- physics/GFS_rrtmg_pre.F90 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 6b5382e65..950ea3d5d 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -733,6 +733,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif end do end do + ! Call Thompson's subroutine to compoute effective radii do i = 1, im call calc_effectRad (tlyr(i,:), plyr(i,:), qv_mp(i,:), qc_mp(i,:), & nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & @@ -975,8 +976,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo ! --- call progcld5 to get Xu-Randall total cloud cover (clouds(:,1:LMK,1)) - ! tgs: a short subroutine could be made of progcld5 only to - ! compute total cloud fraction. + ! tgs: a short subroutine could be made of progcld5 to + ! compute only total cloud fraction. call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & @@ -988,6 +989,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd%phy_f3d(:,:,Model%nseffr), & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + !tgs - let's use the PBL cloud fraction do k=1,lmk do i=1,im !IF (tracer1(i,k,ntrw) > 1.0e-7 .OR. tracer1(i,k,ntsw) > 1.0e-7) then @@ -996,7 +998,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! clouds(i,k,1) = clouds(i,k,1) !ELSE ! MYNN sub-grid cloud fraction - !tgs - let's use only PBL cloud fraction cldcov(i,k) = clouds1(i,k) clouds(i,k,1) = clouds1(i,k) !ENDIF From 4ae3591c2ab5c3f8ad912028e0385ffda0655433 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Wed, 5 Feb 2020 22:06:40 +0000 Subject: [PATCH 039/404] 1.The unnecessary arays NI and NC are removed. 2. Bug fix for the case when GF scheme is used without MYNN. In this case always use Xu-Randall cloud fraction. --- physics/GFS_rrtmg_pre.F90 | 41 ++++++++++++++++++++++---------------- physics/GFS_rrtmg_pre.meta | 18 ----------------- 2 files changed, 24 insertions(+), 35 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 950ea3d5d..351862cf5 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -20,7 +20,7 @@ end subroutine GFS_rrtmg_pre_init ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd, Cldprop, Coupling, & - Radtend, qc, qi, nc, ni, nwfa, & ! input/output + Radtend, qc, qi, nwfa, & ! input/output imfdeepcnv, imfdeepcnv_gf, & f_ice, f_rain, f_rimef, flgmin, cwm, & ! F-A mp scheme only lm, im, lmk, lmp, & ! input @@ -89,8 +89,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: qc real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: qi - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: nc - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: ni real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: nwfa @@ -989,20 +987,29 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd%phy_f3d(:,:,Model%nseffr), & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs - !tgs - let's use the PBL cloud fraction - do k=1,lmk - do i=1,im - !IF (tracer1(i,k,ntrw) > 1.0e-7 .OR. tracer1(i,k,ntsw) > 1.0e-7) then - ! ! Xu-Randall cloud fraction computed in progcld5 - ! cldcov(i,k) = clouds(i,k,1) - ! clouds(i,k,1) = clouds(i,k,1) - !ELSE - ! MYNN sub-grid cloud fraction - cldcov(i,k) = clouds1(i,k) - clouds(i,k,1) = clouds1(i,k) - !ENDIF - enddo - enddo + if(Model%do_mynnedmf) then + !tgs - let's use the PBL cloud fraction for now + do k=1,lmk + do i=1,im + !IF (tracer1(i,k,ntrw) > 1.0e-7 .OR. tracer1(i,k,ntsw) > 1.0e-7) then + ! ! Xu-Randall cloud fraction computed in progcld5 + ! cldcov(i,k) = clouds(i,k,1) + !ELSE + ! MYNN sub-grid cloud fraction + cldcov(i,k) = clouds1(i,k) + clouds(i,k,1) = clouds1(i,k) + !ENDIF + enddo + enddo + elseif (Model%imfdeepcnv == Model%imfdeepcnv_gf ) then ! GF conv + do k=1,lmk + do i=1,im + ! Xu-Randall cloud fraction computed in progcld5 + cldcov(i,k) = clouds(i,k,1) + enddo + enddo + endif + if( .not. clduni) then ! --- call progcld5 for interaction with the radiation with setting ! --- uni_cld=.true. to keep precomputed cloud diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 423a50ff0..9a46ae3d9 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -288,24 +288,6 @@ kind = kind_phys intent = inout optional = F -[nc] - standard_name = cloud_droplet_number_concentration - long_name = cloud droplet number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[ni] - standard_name = ice_number_concentration - long_name = ice number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [nwfa] standard_name = water_friendly_aerosol_number_concentration long_name = number concentration of water-friendly aerosols From 15f36e7b1b8d72c18cc82660ca6657b5b0e3c63f Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 6 Feb 2020 15:44:53 +0000 Subject: [PATCH 040/404] Correct tendency flag names, implement some more diagnostic tendencies, implement model/ccpp/total tendencies. --- physics/GFS_DCNV_generic.F90 | 5 +- physics/GFS_DCNV_generic.meta | 7 ++ physics/GFS_GWD_generic.F90 | 12 +- physics/GFS_GWD_generic.meta | 4 +- physics/GFS_PBL_generic.F90 | 6 +- physics/GFS_PBL_generic.meta | 2 +- physics/GFS_SCNV_generic.F90 | 5 +- physics/GFS_SCNV_generic.meta | 7 ++ physics/cires_ugwp.F90 | 11 +- physics/cires_ugwp.meta | 7 ++ physics/cu_gf_driver.F90 | 39 +++++- physics/cu_gf_driver.meta | 92 +++++++++++++++ physics/model_tend_post.F90 | 105 +++++++++++++++++ physics/model_tend_post.meta | 216 ++++++++++++++++++++++++++++++++++ physics/model_tend_pre.F90 | 75 ++++++++++++ physics/model_tend_pre.meta | 215 +++++++++++++++++++++++++++++++++ physics/moninedmf.f | 12 +- physics/moninedmf.meta | 7 ++ physics/rayleigh_damp.f | 6 +- physics/satmedmfvdif.F | 19 ++- physics/satmedmfvdif.meta | 47 ++++++++ physics/total_tend.F90 | 75 ++++++++++++ physics/total_tend.meta | 191 ++++++++++++++++++++++++++++++ 23 files changed, 1135 insertions(+), 30 deletions(-) create mode 100644 physics/model_tend_post.F90 create mode 100644 physics/model_tend_post.meta create mode 100644 physics/model_tend_pre.F90 create mode 100644 physics/model_tend_pre.meta create mode 100644 physics/total_tend.F90 create mode 100644 physics/total_tend.meta diff --git a/physics/GFS_DCNV_generic.F90 b/physics/GFS_DCNV_generic.F90 index eb6e277d5..42d9987c3 100644 --- a/physics/GFS_DCNV_generic.F90 +++ b/physics/GFS_DCNV_generic.F90 @@ -99,7 +99,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, cs isppt_deep, frain, rain1, dtf, cld1d, save_u, save_v, save_t, save_qv, gu0, gv0, gt0, & gq0_water_vapor, ud_mf, dd_mf, dt_mf, con_g, clw_ice, clw_liquid, npdf3d, num_p3d, ncnvcld3d, & rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, & - cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, & + cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, flag_for_dcnv_generic_tend, & cape, tconvtend, qconvtend, uconvtend, vconvtend, errmsg, errflg) use machine, only: kind_phys @@ -108,6 +108,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, cs integer, intent(in) :: im, levs logical, intent(in) :: lssav, ldiag3d, ras, cscnv, do_ca, isppt_deep, qdiag3d + logical, intent(in) :: flag_for_dcnv_generic_tend real(kind=kind_phys), intent(in) :: frain, dtf real(kind=kind_phys), dimension(im), intent(in) :: rain1, cld1d @@ -175,7 +176,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, cs cldwrk (i) = cldwrk (i) + cld1d(i) * dtf enddo - if (ldiag3d) then + if (ldiag3d .and. flag_for_dcnv_generic_tend) then do k=1,levs do i=1,im dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index c5c006e88..5d940c8a4 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -544,6 +544,13 @@ kind = kind_phys intent = inout optional = F +[flag_for_dcnv_generic_tend] + standard_name = true_if_GFS_DCNV_generic_should_calculate_tendencies + long_name = true if GFS_DCNV_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in [tconvtend] standard_name = tendency_of_air_temperature_due_to_deep_convection_for_coupling_on_physics_timestep long_name = tendency of air temperature due to deep convection diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index f05fa508f..963269329 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -20,7 +20,7 @@ subroutine GFS_GWD_generic_pre_run( & & oc, oa4, clx, theta, & & sigma, gamma, elvmax, lssav, ldiag3d, & & dudt, dvdt, dtdt, du3dt, dv3dt, dt3dt, dtf, & - & gwd_generic_tend, errmsg, errflg) + & flag_for_gwd_generic_tend, errmsg, errflg) use machine, only : kind_phys implicit none @@ -32,7 +32,7 @@ subroutine GFS_GWD_generic_pre_run( & & oc(im), oa4(im,4), clx(im,4), & & theta(im), sigma(im), gamma(im), elvmax(im) - logical, intent(in) :: lssav, ldiag3d, gwd_generic_tend + logical, intent(in) :: lssav, ldiag3d, flag_for_gwd_generic_tend real(kind=kind_phys), intent(in) :: dtdt(im,levs), dudt(im,levs), dvdt(im,levs) ! dt3dt only allocated only if ldiag3d is .true. real(kind=kind_phys), intent(inout) :: dt3dt(:,:), du3dt(:,:), dv3dt(:,:) @@ -92,7 +92,7 @@ subroutine GFS_GWD_generic_pre_run( & endif ! end if_nmtvr if (lssav) then - if (ldiag3d .and. gwd_generic_tend) then + if (ldiag3d .and. flag_for_gwd_generic_tend) then do k=1,levs do i=1,im dt3dt(i,k) = dt3dt(i,k) - dtdt(i,k)*dtf @@ -128,12 +128,12 @@ end subroutine GFS_GWD_generic_post_init !! \section detailed Detailed Algorithm !! @{ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, dvdt, dtdt, & - & dugwd, dvgwd, du3dt, dv3dt, dt3dt, gwd_generic_tend, errmsg, errflg) + & dugwd, dvgwd, du3dt, dv3dt, dt3dt, flag_for_gwd_generic_tend, errmsg, errflg) use machine, only : kind_phys implicit none - logical, intent(in) :: lssav, ldiag3d, gwd_generic_tend + logical, intent(in) :: lssav, ldiag3d, flag_for_gwd_generic_tend real(kind=kind_phys), intent(in) :: dusfcg(:), dvsfcg(:) real(kind=kind_phys), intent(in) :: dudt(:,:), dvdt(:,:), dtdt(:,:) @@ -153,7 +153,7 @@ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, d dugwd(:) = dugwd(:) + dusfcg(:)*dtf dvgwd(:) = dvgwd(:) + dvsfcg(:)*dtf - if (ldiag3d .and. gwd_generic_tend) then + if (ldiag3d .and. flag_for_gwd_generic_tend) then du3dt(:,:) = du3dt(:,:) + dudt(:,:) * dtf dv3dt(:,:) = dv3dt(:,:) + dvdt(:,:) * dtf dt3dt(:,:) = dt3dt(:,:) + dtdt(:,:) * dtf diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 782adfa59..13a0d7b49 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -177,7 +177,7 @@ kind = kind_phys intent = in optional = F -[gwd_generic_tend] +[flag_for_gwd_generic_tend] standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies long_name = true if GFS_GWD_generic should calculate tendencies units = flag @@ -326,7 +326,7 @@ kind = kind_phys intent = inout optional = F -[gwd_generic_tend] +[flag_for_gwd_generic_tend] standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies long_name = true if GFS_GWD_generic should calculate tendencies units = flag diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index cd4a30849..f0ab372a4 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -281,7 +281,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, trans_aero, ntchs, ntchm, & imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_mg, & imp_physics_fer_hires, & - ltaerosol, cplflx, cplchm, lssav, pbl_generic_tend, ldiag3d, qdiag3d, lsidea, hybedmf, do_shoc, satmedmf, shinhong, do_ysu, & + ltaerosol, cplflx, cplchm, lssav, flag_for_pbl_generic_tend, ldiag3d, qdiag3d, lsidea, hybedmf, do_shoc, satmedmf, shinhong, do_ysu, & dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, & dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, & dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, & @@ -301,7 +301,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, qdiag3d, lsidea logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu - logical, intent(in) :: pbl_generic_tend + logical, intent(in) :: flag_for_pbl_generic_tend real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), intent(in) :: rd, cp, fvirt, hvap @@ -553,7 +553,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! & dtf,' kdt=',kdt,' lat=',lat ! endif - if (ldiag3d .and. pbl_generic_tend) then + if (ldiag3d .and. flag_for_pbl_generic_tend) then if (lsidea) then dt3dt(1:im,:) = dt3dt(1:im,:) + dtdt(1:im,:)*dtf else diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 4256049dd..ab4eca5da 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -601,7 +601,7 @@ type = logical intent = in optional = F -[pbl_generic_tend] +[flag_for_pbl_generic_tend] standard_name = true_if_GFS_PBL_generic_should_calculate_tendencies long_name = true if GFS_PBL_generic should calculate tendencies units = flag diff --git a/physics/GFS_SCNV_generic.F90 b/physics/GFS_SCNV_generic.F90 index 1cbff590e..3aecee8f3 100644 --- a/physics/GFS_SCNV_generic.F90 +++ b/physics/GFS_SCNV_generic.F90 @@ -71,6 +71,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl frain, gt0, gq0_water_vapor, save_t, save_qv, dqdti, dt3dt, dq3dt, clw, & shcnvcw, rain1, npdf3d, num_p3d, ncnvcld3d, cnvc, cnvw, & rainc, cnvprcp, cnvprcpb, cnvw_phy_f3d, cnvc_phy_f3d, & + flag_for_scnv_generic_tend, & imfshalcnv, imfshalcnv_sas, imfshalcnv_samf, errmsg, errflg) use machine, only: kind_phys @@ -78,7 +79,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl implicit none integer, intent(in) :: im, levs, nn - logical, intent(in) :: lssav, ldiag3d, qdiag3d, cplchm + logical, intent(in) :: lssav, ldiag3d, qdiag3d, cplchm, flag_for_scnv_generic_tend real(kind=kind_phys), intent(in) :: frain real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, gq0_water_vapor real(kind=kind_phys), dimension(im,levs), intent(in) :: save_t, save_qv @@ -132,7 +133,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl endif endif - if (lssav) then + if (lssav .and. flag_for_scnv_generic_tend) then if (ldiag3d) then do k=1,levs do i=1,im diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index 24dd7236d..52538d3e8 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -332,6 +332,13 @@ kind = kind_phys intent = inout optional = F +[flag_for_scnv_generic_tend] + standard_name = true_if_GFS_SCNV_generic_should_calculate_tendencies + long_name = true if GFS_SCNV_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in [imfshalcnv] standard_name = flag_for_mass_flux_shallow_convection_scheme long_name = flag for mass-flux shallow convection scheme diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index 1daa10af5..91b9b35f3 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -151,7 +151,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr dudt, dvdt, dtdt, rdxzb, con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, & rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & - ldiag3d, lssav, errmsg, errflg) + ldiag3d, lssav, flag_for_gwd_generic_tend, errmsg, errflg) implicit none @@ -159,6 +159,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr integer, intent(in) :: me, master, im, levs, ntrac, kdt, lonr, nmtvr integer, intent(in), dimension(im) :: kpbl real(kind=kind_phys), intent(in), dimension(im) :: oro, oro_uf, hprime, oc, theta, sigma, gamma + logical, intent(in) :: flag_for_gwd_generic_tend ! elvmax is intent(in) for CIRES UGWP, but intent(inout) for GFS GWDPS real(kind=kind_phys), intent(inout), dimension(im) :: elvmax real(kind=kind_phys), intent(in), dimension(im, 4) :: clx, oa4 @@ -176,8 +177,8 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr real(kind=kind_phys), intent(out), dimension(im, levs):: dudt_mtb, dudt_ogw, dudt_tms ! These arrays are only allocated if ldiag=.true. - real(kind=kind_phys), intent(inout), dimension(im, levs) :: ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw - real(kind=kind_phys), intent(inout), dimension(im, levs) :: ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw + real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw + real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw logical, intent(in) :: ldiag3d, lssav ! These arrays only allocated if ldiag_ugwp = .true. @@ -272,7 +273,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr endif ! do_ugwp - if(ldiag3d .and. lssav) then + if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then do k=1,levs do i=1,im ldu3dt_ogw(i,k) = ldu3dt_ogw(i,k) + Pdudt(i,k)*dtp @@ -379,7 +380,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr gw_dudt = gw_dudt*(1.-pked) + ed_dudt*pked #endif - if(ldiag3d .and. lssav) then + if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then do k=1,levs do i=1,im ldu3dt_cgw(i,k) = ldu3dt_cgw(i,k) + (gw_dudt(i,k) - Pdudt(i,k))*dtp diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 32c64145f..6720bd7c7 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -911,6 +911,13 @@ dimensions = () type = logical intent = in +[flag_for_gwd_generic_tend] + standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies + long_name = true if GFS_GWD_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 53e26fb46..3f5e6ef78 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -75,7 +75,10 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & hbot,htop,kcnv,xland,hfx2,qfx2,cliw,clcw, & pbl,ud_mf,dd_mf,dt_mf,cnvw_moist,cnvc,imfshalcnv, & nwfa,con_rd,gq0,ntinc,ntlnc,imp_physics,imp_physics_thompson, & - errmsg,errflg) + flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend, & + du3dt_SCNV,dv3dt_SCNV,dt3dt_SCNV,dq3dt_SCNV, & + du3dt_DCNV,dv3dt_DCNV,dt3dt_DCNV,dq3dt_DCNV, & + ldiag3d,qdiag3d,errmsg,errflg) !------------------------------------------------------------- implicit none integer, parameter :: maxiens=1 @@ -97,6 +100,8 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & !------------------------------------------------------------- integer :: its,ite, jts,jte, kts,kte integer, intent(in ) :: im,ix,km,ntracer + logical, intent(in ) :: flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend + logical, intent(in ) :: ldiag3d,qdiag3d real(kind=kind_phys), dimension( ix , km ), intent(in ) :: forcet,forceqv_spechum,w,phil real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: t,us,vs @@ -106,6 +111,10 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & real(kind=kind_phys), dimension( ix , km ), intent(out ) :: cnvw_moist,cnvc real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: cliw, clcw + real(kind=kind_phys), dimension( : , : ), intent(inout ) :: & + du3dt_SCNV,dv3dt_SCNV,dt3dt_SCNV,dq3dt_SCNV, & + du3dt_DCNV,dv3dt_DCNV,dt3dt_DCNV,dq3dt_DCNV + ! change from ix to im integer, dimension (im), intent(inout) :: hbot,htop,kcnv integer, dimension (im), intent(in) :: xland @@ -879,6 +888,34 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & qv_spechum = qv/(1.0_kind_phys+qv) cnvw_moist = cnvw/(1.0_kind_phys+qv) ! +! Diagnostic tendency updates +! + if(ldiag3d) then + if(.not.flag_for_scnv_generic_tend) then + do k=kts,ktf + do i=its,itf + du3dt_SCNV(i,k) = du3dt_SCNV(i,k) + outus(i,k) * dt + dv3dt_SCNV(i,k) = dv3dt_SCNV(i,k) + outvs(i,k) * dt + dt3dt_SCNV(i,k) = dt3dt_SCNV(i,k) + outts(i,k) * dt + if(qdiag3d) then + dq3dt_SCNV(i,k) = dq3dt_SCNV(i,k) + outqs(i,k) * dt + endif + enddo + enddo + endif + if(.not.flag_for_dcnv_generic_tend) then + do k=kts,ktf + do i=its,itf + du3dt_DCNV(i,k) = du3dt_DCNV(i,k) + (outu(i,k)+outum(i,k)) * dt + dv3dt_DCNV(i,k) = dv3dt_DCNV(i,k) + (outv(i,k)+outvm(i,k)) * dt + dt3dt_DCNV(i,k) = dt3dt_DCNV(i,k) + (outt(i,k)+outtm(i,k)) * dt + if(qdiag3d) then + dq3dt_DCNV(i,k) = dq3dt_DCNV(i,k) + (outq(i,k)+outqm(i,k)) * dt + endif + enddo + enddo + endif + endif end subroutine cu_gf_driver_run !> @} end module cu_gf_driver diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index d3687a352..c75d944ee 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -417,6 +417,98 @@ type = integer intent = in optional = F +[flag_for_scnv_generic_tend] + standard_name = true_if_GFS_SCNV_generic_should_calculate_tendencies + long_name = true if GFS_SCNV_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in +[flag_for_dcnv_generic_tend] + standard_name = true_if_GFS_DCNV_generic_should_calculate_tendencies + long_name = true if GFS_DCNV_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in +[du3dt_SCNV] + standard_name = cumulative_change_in_x_wind_due_to_shal_convection + long_name = cumulative change in x wind due to shallow convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_SCNV] + standard_name = cumulative_change_in_y_wind_due_to_shal_convection + long_name = cumulative change in y wind due to shallow convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dt3dt_SCNV] + standard_name = cumulative_change_in_temperature_due_to_shal_convection + long_name = cumulative change in temperature due to shallow convection + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_SCNV] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shal_convection + long_name = cumulative change in water vapor specific humidity due to shallow convection + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[du3dt_DCNV] + standard_name = cumulative_change_in_x_wind_due_to_deep_convection + long_name = cumulative change in x wind due to deep convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_DCNV] + standard_name = cumulative_change_in_y_wind_due_to_deep_convection + long_name = cumulative change in y wind due to deep convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dt3dt_DCNV] + standard_name = cumulative_change_in_temperature_due_to_deep_convection + long_name = cumulative change in temperature due to deep convection + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_DCNV] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection + long_name = cumulative change in water vapor specific humidity due to deep convection + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/model_tend_post.F90 b/physics/model_tend_post.F90 new file mode 100644 index 000000000..8ae7b6844 --- /dev/null +++ b/physics/model_tend_post.F90 @@ -0,0 +1,105 @@ +!>\file model_tend_post.F90 +!! Calculates tendencies from all processes outside of CPPP + +module model_tend_post + +contains + + subroutine model_tend_post_init() + end subroutine model_tend_post_init + + subroutine model_tend_post_finalize() + end subroutine model_tend_post_finalize + + !> \section arg_table_model_tend_post_run Argument Table + !! \htmlinclude model_tend_post_run.html + !! + subroutine model_tend_post_run(kdt, & + gt0,gu0,gv0, gq0_water_vapor, & + t_start,u_start,v_start,q_start, & + t_end, u_end, v_end, q_end, & + dt3dt_ccpp, du3dt_ccpp, dv3dt_ccpp, dq3dt_ccpp, & +! dt3dt_total, du3dt_total, dv3dt_total, dq3dt_total, & + im, levs, ntrac, index_for_water_vapor, & + lssav, ldiag3d, qdiag3d, errmsg,errflg) + use machine, only: kind_phys + implicit none + + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, gu0, gv0, gq0_water_vapor + real(kind=kind_phys), dimension(:,:), intent(in) :: t_start, u_start, v_start + real(kind=kind_phys), dimension(:,:), intent(in) :: q_start + real(kind=kind_phys), dimension(:,:), intent(inout) :: t_end, u_end, v_end + real(kind=kind_phys), dimension(:,:), intent(inout) :: q_end + real(kind=kind_phys), dimension(:,:), intent(inout) :: du3dt_ccpp, dv3dt_ccpp + real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt_ccpp, dq3dt_ccpp + ! real(kind=kind_phys), dimension(:,:), intent(inout) :: du3dt_total, dv3dt_total + ! real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt_total, dq3dt_total + + integer, intent(in) :: im, levs, ntrac, kdt + integer, intent(in) :: index_for_water_vapor + + logical, intent(in) :: lssav, qdiag3d, ldiag3d + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + real(kind=kind_phys) :: dt + integer :: i,k + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + diag_enabled: if(lssav .and. ldiag3d) then + if(any(gt0(1:im,1:levs)<1e-3)) then + print *,'error: temperatures less than 1e-3' + endif + if(all(abs(gu0(1:im,1:levs))<1e-3)) then + print *,'error: all u wind is near zero' + endif + if(all(abs(gv0(1:im,1:levs))<1e-3)) then + print *,'error: all v wind is near zero' + endif + + if(any(t_start(1:im,1:levs)<1e-3)) then + print *,'error: start temperatures less than 1e-3' + endif + if(all(abs(u_start(1:im,1:levs))<1e-3)) then + print *,'error: all start u wind is near zero' + endif + if(all(abs(v_start(1:im,1:levs))<1e-3)) then + print *,'error: all start v wind is near zero' + endif + + do k=1,levs + do i=1,im + ! if(t_end(i,k)>1e-3 .and. gt0(i,k)>1e-3) then + ! dt3dt_total(i,k) = dt3dt_total(i,k) + gt0(i,k)-t_end(i,k) + ! du3dt_total(i,k) = du3dt_total(i,k) + gu0(i,k)-u_end(i,k) + ! dv3dt_total(i,k) = dv3dt_total(i,k) + gv0(i,k)-v_end(i,k) + ! if(qdiag3d) then + ! dq3dt_total(i,k) = dq3dt_total(i,k) + gq0_water_vapor(i,k)-q_end(i,k) + ! endif + ! endif + t_end(i,k) = gt0(i,k) + u_end(i,k) = gu0(i,k) + v_end(i,k) = gv0(i,k) + if(qdiag3d) then + q_end(i,k) = gq0_water_vapor(i,k) + endif + if(t_end(i,k)>1e-3 .and. t_start(i,k)>1e-3) then + dt3dt_ccpp(i,k) = dt3dt_ccpp(i,k) + t_end(i,k)-t_start(i,k) + du3dt_ccpp(i,k) = du3dt_ccpp(i,k) + u_end(i,k)-u_start(i,k) + dv3dt_ccpp(i,k) = dv3dt_ccpp(i,k) + v_end(i,k)-v_start(i,k) + if(qdiag3d) then + dq3dt_ccpp(i,k) = dq3dt_ccpp(i,k) + q_end(i,k)-q_start(i,k) + endif + endif + enddo + enddo + + endif diag_enabled + + end subroutine model_tend_post_run + +end module model_tend_post diff --git a/physics/model_tend_post.meta b/physics/model_tend_post.meta new file mode 100644 index 000000000..a97fa4dad --- /dev/null +++ b/physics/model_tend_post.meta @@ -0,0 +1,216 @@ +[ccpp-arg-table] + name = model_tend_post_init + type = scheme +[ccpp-arg-table] + name = model_tend_post_finalize + type = scheme +[ccpp-arg-table] + name = model_tend_post_run + type = scheme +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[gt0] + standard_name = air_temperature_updated_by_physics + long_name = temperature updated by physics + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gu0] + standard_name = x_wind_updated_by_physics + long_name = zonal wind updated by physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gv0] + standard_name = y_wind_updated_by_physics + long_name = meridional wind updated by physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gq0_water_vapor] + standard_name = water_vapor_specific_humidity_updated_by_physics + long_name = water vapor specific humidity updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[t_start] + standard_name = temperature_at_start_of_ccpp + long_name = temperature at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[u_start] + standard_name = x_wind_at_start_of_ccpp + long_name = x wind at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[v_start] + standard_name = y_wind_at_start_of_ccpp + long_name = y wind at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[q_start] + standard_name = water_vapor_specific_humidity_at_start_of_ccpp + long_name = water vapor specific humidity at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[t_end] + standard_name = temperature_at_end_of_ccpp + long_name = temperature at end of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[u_end] + standard_name = x_wind_at_end_of_ccpp + long_name = x wind at end of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[v_end] + standard_name = y_wind_at_end_of_ccpp + long_name = y wind at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[q_end] + standard_name = water_vapor_specific_humidity_at_end_of_ccpp + long_name = water vapor specific humidity at end of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dt3dt_ccpp] + standard_name = cumulative_change_in_temperature_from_ccpp + long_name = cumulative change in temperature from CCPP + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[du3dt_ccpp] + standard_name = cumulative_change_in_x_wind_from_ccpp + long_name = cumulative change in x wind from CCPP + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_ccpp] + standard_name = cumulative_change_in_y_wind_from_ccpp + long_name = cumulative change in y wind from CCPP + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_ccpp] + standard_name = cumulative_change_in_water_vapor_specific_humidity_from_CCPP + long_name = cumulative change in water vapor specific humidity from CCPP + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in +[levs] + standard_name = vertical_dimension + long_name = vertical layer dimension + units = count + dimensions = () + type = integer + intent = in +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in +[index_for_water_vapor] + standard_name = index_for_water_vapor + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + + + + + + + diff --git a/physics/model_tend_pre.F90 b/physics/model_tend_pre.F90 new file mode 100644 index 000000000..94ad2ee1a --- /dev/null +++ b/physics/model_tend_pre.F90 @@ -0,0 +1,75 @@ +!>\file model_tend_pre.F90 +!! Calculates tendencies from all processes outside of CPPP + +module model_tend_pre + +contains + +!> \section arg_table_model_tend_pre_init Argument Table +!! +subroutine model_tend_pre_init() +end subroutine model_tend_pre_init + +!> \section arg_table_model_tend_pre_finalize Argument Table +!! +subroutine model_tend_pre_finalize() +end subroutine model_tend_pre_finalize + +!> \section arg_table_model_tend_pre_run Argument Table +!! \htmlinclude model_tend_pre_run.html +!! +subroutine model_tend_pre_run(dtp, kdt, & + tgrs,ugrs,vgrs,qvgrs, t_start,u_start,v_start,q_start, & + dt3dt_model,du3dt_model,dv3dt_model,dq3dt_model, & + t_end,u_end,v_end,q_end, & + im, levs, ntrac, & + lssav, ldiag3d, qdiag3d, errmsg,errflg) + use machine, only: kind_phys + implicit none + + real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, ugrs, vgrs, qvgrs + real(kind=kind_phys), dimension(:,:), intent(out) :: t_start, u_start, v_start + real(kind=kind_phys), dimension(:,:), intent(out) :: q_start + real(kind=kind_phys), dimension(:,:), intent(out) :: t_end, u_end, v_end + real(kind=kind_phys), dimension(:,:), intent(out) :: q_end + real(kind=kind_phys), dimension(:,:), intent(inout) :: & + dt3dt_model,du3dt_model,dv3dt_model,dq3dt_model + + integer, intent(in) :: im, levs, ntrac, kdt + + logical, intent(in) :: lssav, qdiag3d, ldiag3d + + real(kind=kind_phys) :: dtp + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + integer :: i, k + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if(Lssav .and. ldiag3d) then + do k=1,levs + do i=1,im + t_start(i,k) = tgrs(i,k) + u_start(i,k) = ugrs(i,k) + v_start(i,k) = vgrs(i,k) + if(qdiag3d) then + q_start(i,k) = qvgrs(i,k) + endif + if(t_start(i,k)>1e-3 .and. t_end(i,k)>1e-3) then + dt3dt_model(i,k) = dt3dt_model(i,k) + (t_start(i,k)-t_end(i,k)) + du3dt_model(i,k) = du3dt_model(i,k) + (u_start(i,k)-u_end(i,k)) + dv3dt_model(i,k) = dv3dt_model(i,k) + (v_start(i,k)-v_end(i,k)) + if(qdiag3d) then + dq3dt_model(i,k) = dq3dt_model(i,k) + (q_start(i,k)-q_end(i,k)) + endif + endif + enddo + enddo + endif +end subroutine model_tend_pre_run + +end module model_tend_pre diff --git a/physics/model_tend_pre.meta b/physics/model_tend_pre.meta new file mode 100644 index 000000000..0cbb9b4e9 --- /dev/null +++ b/physics/model_tend_pre.meta @@ -0,0 +1,215 @@ +[ccpp-arg-table] + name = model_tend_pre_init + type = scheme + +######################################################################## +[ccpp-arg-table] + name = model_tend_pre_finalize + type = scheme + +######################################################################## +[ccpp-arg-table] + name = model_tend_pre_run + type = scheme +[dtp] + standard_name = time_step_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[ugrs] + standard_name = x_wind + long_name = zonal wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[vgrs] + standard_name = y_wind + long_name = meridional wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[qvgrs] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[t_start] + standard_name = temperature_at_start_of_ccpp + long_name = temperature at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out +[u_start] + standard_name = x_wind_at_start_of_ccpp + long_name = x wind at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out +[v_start] + standard_name = y_wind_at_start_of_ccpp + long_name = y wind at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out +[q_start] + standard_name = water_vapor_specific_humidity_at_start_of_ccpp + long_name = water vapor specific humidity at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out +[dt3dt_model] + standard_name = cumulative_change_in_temperature_from_model + long_name = cumulative change in temperature from model + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[du3dt_model] + standard_name = cumulative_change_in_x_wind_from_model + long_name = cumulative change in x wind from model + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_model] + standard_name = cumulative_change_in_y_wind_from_model + long_name = cumulative change in y wind from model + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_model] + standard_name = cumulative_change_in_water_vapor_specific_humidity_from_model + long_name = cumulative change in water vapor specific humidity from model + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[t_end] + standard_name = temperature_at_end_of_ccpp + long_name = temperature at end of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[u_end] + standard_name = x_wind_at_end_of_ccpp + long_name = x wind at end of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[v_end] + standard_name = y_wind_at_end_of_ccpp + long_name = y wind at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[q_end] + standard_name = water_vapor_specific_humidity_at_end_of_ccpp + long_name = water vapor specific humidity at end of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in +[levs] + standard_name = vertical_dimension + long_name = vertical layer dimension + units = count + dimensions = () + type = integer + intent = in +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out diff --git a/physics/moninedmf.f b/physics/moninedmf.f index f6558a861..d3fd9e45e 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -66,7 +66,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & & xkzminv,moninq_fac,lssav,ldiag3d,qdiag3d,lsidea,ntoz, & & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL, & - & errmsg,errflg) + & flag_for_pbl_generic_tend, errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -77,6 +77,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! arguments ! logical, intent(in) :: lprnt,lssav,ldiag3d,qdiag3d,lsidea + logical, intent(in) :: flag_for_pbl_generic_tend integer, intent(in) :: ipr integer, intent(in) :: ix, im, km, ntrac, ntcw, kinver(im), ntoz integer, intent(out) :: kpbl(im) @@ -1041,7 +1042,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & rtg(i,k,1) = rtg(i,k,1)+qtend dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend - if(lssav .and. ldiag3d) then + if(lssav .and. ldiag3d .and. .not. & + & flag_for_pbl_generic_tend) then if(lsidea) then dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*rdt else @@ -1064,7 +1066,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo enddo enddo - if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d) then + if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. & + & flag_for_pbl_generic_tend) then is = (ntoz-1) * km do k = 1, km do i = 1, im @@ -1174,7 +1177,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & dv(i,k) = dv(i,k) + vtend dusfc(i) = dusfc(i) + conw*del(i,k)*utend dvsfc(i) = dvsfc(i) + conw*del(i,k)*vtend - if(lssav .and. ldiag3d) then + if(lssav .and. ldiag3d .and. .not. & + & flag_for_pbl_generic_tend) then du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*delt dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*delt endif diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index b5a6947c3..6a923d36b 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -575,6 +575,13 @@ type = real kind = kind_phys intent = inout +[flag_for_pbl_generic_tend] + standard_name = true_if_GFS_PBL_generic_should_calculate_tendencies + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rayleigh_damp.f b/physics/rayleigh_damp.f index 814704385..8ef5aa947 100644 --- a/physics/rayleigh_damp.f +++ b/physics/rayleigh_damp.f @@ -74,9 +74,9 @@ subroutine rayleigh_damp_run ( & real(kind=kind_phys),intent(in) :: pgr(im), PRSL(IX,KM) real(kind=kind_phys),intent(in) :: U1(IX,KM), V1(IX,KM) real(kind=kind_phys),intent(inout) :: A(IX,KM), B(IX,KM), C(IX,KM) - real(kind=kind_phys),intent(inout) :: du3dt(IX,KM) - real(kind=kind_phys),intent(inout) :: dv3dt(IX,KM) - real(kind=kind_phys),intent(inout) :: dt3dt(IX,KM) + real(kind=kind_phys),intent(inout) :: du3dt(:,:) + real(kind=kind_phys),intent(inout) :: dv3dt(:,:) + real(kind=kind_phys),intent(inout) :: dt3dt(:,:) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/satmedmfvdif.F b/physics/satmedmfvdif.F index 5900349e9..64d2c4517 100644 --- a/physics/satmedmfvdif.F +++ b/physics/satmedmfvdif.F @@ -60,7 +60,9 @@ subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & & tsea,heat,evap,stress,spd1,kpbl, & & prsi,del,prsl,prslk,phii,phil,delt, & & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & - & kinver,xkzm_m,xkzm_h,xkzm_s,errmsg,errflg) + & kinver,xkzm_m,xkzm_h,xkzm_s, & + & dt3dt_PBL,du3dt_PBL,dv3dt_PBL,dq3dt_PBL,do3dt_PBL, & + & ldiag3d,qdiag3d,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -71,6 +73,10 @@ subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & integer, intent(in) :: ix, im, km, ntrac, ntcw, ntiw, ntke integer, intent(in) :: kinver(im) integer, intent(out) :: kpbl(im) +! + logical, intent(in) :: ldiag3d, qdiag3d + real(kind=kind_phys), intent(inout), dimension(:,:) :: & + & dt3dt_PBL,du3dt_PBL,dv3dt_PBL,dq3dt_PBL,do3dt_PBL ! real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, & & eps,epsm1 @@ -1391,6 +1397,12 @@ subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & rtg(i,k,1) = rtg(i,k,1)+qtend dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend + if(ldiag3d) then + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*delt + if(qdiag3d) then + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*delt + endif + endif enddo enddo ! @@ -1491,8 +1503,13 @@ subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & dv(i,k) = dv(i,k)+vtend dusfc(i) = dusfc(i)+conw*del(i,k)*utend dvsfc(i) = dvsfc(i)+conw*del(i,k)*vtend + if(ldiag3d) then + du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*delt + dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*delt + endif enddo enddo + ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> -# Save PBL height for diagnostic purpose diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index 63480e01b..28cb942c0 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -551,6 +551,53 @@ kind = kind_phys intent = in optional = F +[dt3dt_PBL] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[du3dt_PBL] + standard_name = cumulative_change_in_x_wind_due_to_PBL + long_name = cumulative change in x wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dv3dt_PBL] + standard_name = cumulative_change_in_y_wind_due_to_PBL + long_name = cumulative change in y wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dq3dt_PBL] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[do3dt_PBL] + standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL + long_name = cumulative change in ozone mixing ratio due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/total_tend.F90 b/physics/total_tend.F90 new file mode 100644 index 000000000..c7c5dfe28 --- /dev/null +++ b/physics/total_tend.F90 @@ -0,0 +1,75 @@ +!>\file total_tend.F90 +!! Calculates tendencies from all processes outside of CPPP + +module total_tend + +contains + +!> \section arg_table_total_tend_init Argument Table +!! +subroutine total_tend_init() +end subroutine total_tend_init + +!> \section arg_table_total_tend_finalize Argument Table +!! +subroutine total_tend_finalize() +end subroutine total_tend_finalize + +!> \section arg_table_total_tend_run Argument Table +!! \htmlinclude total_tend_run.html +!! +subroutine total_tend_run(dtp, kdt, & + tgrs,ugrs,vgrs,qvgrs, t_start,u_start,v_start,q_start, & + dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total, & + im, levs, ntrac, & + lssav, ldiag3d, qdiag3d, errmsg,errflg) + use machine, only: kind_phys + implicit none + + real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, ugrs, vgrs, qvgrs + real(kind=kind_phys), dimension(:,:), intent(out) :: t_start, u_start, v_start + real(kind=kind_phys), dimension(:,:), intent(out) :: q_start + real(kind=kind_phys), dimension(:,:), intent(inout) :: & + dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total + + integer, intent(in) :: im, levs, ntrac, kdt + + logical, intent(in) :: lssav, qdiag3d, ldiag3d + + real(kind=kind_phys) :: dtp + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + integer :: i, k, good + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + good=0 + + if(Lssav .and. ldiag3d) then + print *,'total_tend_run' + do k=1,levs + do i=1,im + if(t_start(i,k)>1e-3 .and. tgrs(i,k)>1e-3) then + good=good+1 + dt3dt_total(i,k) = dt3dt_total(i,k) + tgrs(i,k)-t_start(i,k) + du3dt_total(i,k) = du3dt_total(i,k) + ugrs(i,k)-u_start(i,k) + dv3dt_total(i,k) = dv3dt_total(i,k) + vgrs(i,k)-v_start(i,k) + if(qdiag3d) then + dq3dt_total(i,k) = dq3dt_total(i,k) + qvgrs(i,k)-q_start(i,k) + endif + endif + t_start(i,k)=tgrs(i,k) + u_start(i,k)=ugrs(i,k) + v_start(i,k)=vgrs(i,k) + q_start(i,k)=qvgrs(i,k) + enddo + enddo + print *,'total tend valid points: ',good + endif +end subroutine total_tend_run + +end module total_tend diff --git a/physics/total_tend.meta b/physics/total_tend.meta new file mode 100644 index 000000000..a64fd872b --- /dev/null +++ b/physics/total_tend.meta @@ -0,0 +1,191 @@ +[ccpp-arg-table] + name = total_tend_pre_init + type = scheme + +######################################################################## +[ccpp-arg-table] + name = total_tend_pre_finalize + type = scheme + +######################################################################## +[ccpp-arg-table] + name = total_tend_pre_run + type = scheme +[dtp] + standard_name = time_step_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[ugrs] + standard_name = x_wind + long_name = zonal wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[vgrs] + standard_name = y_wind + long_name = meridional wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[qvgrs] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[t_start] + standard_name = temperature_at_start_of_ccpp + long_name = temperature at start of ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out +[t_start] + standard_name = temperature_at_total_check_point + long_name = temperature when model total is calculated in ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[u_start] + standard_name = x_wind_at_total_check_point + long_name = x when model total is calculated in ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[v_start] + standard_name = y_wind_at_total_check_point + long_name = y when model total is calculated in ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[q_start] + standard_name = water_vapor_specific_humidity_at_total_check_point + long_name = water vapor specific humidity when model total is calculated in ccpp + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dt3dt_total] + standard_name = cumulative_change_in_temperature + long_name = cumulative change in temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[du3dt_total] + standard_name = cumulative_change_in_x_wind + long_name = cumulative change in x wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_total] + standard_name = cumulative_change_in_y_wind + long_name = cumulative change in y wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_total] + standard_name = cumulative_change_in_water_vapor_specific_humidity + long_name = cumulative change in water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in +[levs] + standard_name = vertical_dimension + long_name = vertical layer dimension + units = count + dimensions = () + type = integer + intent = in +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out From a76c0662d07033bda017f07216f828df2d76ab04 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 12 Feb 2020 13:07:07 -0700 Subject: [PATCH 041/404] Workaround/bugfix for correct initialization of Thompson aerosol surface emissions and 2nd moments (number concentrations) --- physics/module_mp_thompson.F90 | 23 +- physics/mp_thompson.F90 | 484 ++++++++----- physics/mp_thompson.meta | 308 +++----- .../mp_thompson.meta.backup.before.workaround | 676 ++++++++++++++++++ physics/mp_thompson_post.F90 | 27 +- physics/mp_thompson_post.meta | 9 + 6 files changed, 1108 insertions(+), 419 deletions(-) create mode 100644 physics/mp_thompson.meta.backup.before.workaround diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 5e118c070..e228bf8ed 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -410,23 +410,22 @@ MODULE module_mp_thompson !! lookup tables in Thomspson scheme. !>\section gen_thompson_init thompson_init General Algorithm !> @{ - SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & - ids, ide, jds, jde, kds, kde, & - ims, ime, jms, jme, kms, kme, & - its, ite, jts, jte, kts, kte, & - mpicomm, mpirank, mpiroot, & - threads, errmsg, errflg) + SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & + mpicomm, mpirank, mpiroot, & + threads, errmsg, errflg) IMPLICIT NONE - INTEGER, INTENT(IN):: ids,ide, jds,jde, kds,kde, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte - !..OPTIONAL variables that control application of aerosol-aware scheme - REAL, DIMENSION(ims:ime,kms:kme,jms:jme), OPTIONAL, INTENT(IN) :: nwfa, nifa - REAL, DIMENSION(ims:ime,jms:jme), OPTIONAL, INTENT(IN) :: nwfa2d, nifa2d +#if 0 + REAL, DIMENSION(:,:,:), OPTIONAL, INTENT(IN) :: nwfa, nifa + REAL, DIMENSION(:,:), OPTIONAL, INTENT(IN) :: nwfa2d, nifa2d +#else +! DH* 20200208 - change dimensions for nasty init hack + REAL, DIMENSION(:,:), OPTIONAL, INTENT(IN) :: nwfa, nifa + REAL, DIMENSION(:), OPTIONAL, INTENT(IN) :: nwfa2d, nifa2d +#endif INTEGER, INTENT(IN) :: mpicomm, mpirank, mpiroot INTEGER, INTENT(IN) :: threads CHARACTER(len=*), INTENT(INOUT) :: errmsg diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index 4ecbc47df..8c341d05b 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -23,10 +23,17 @@ module mp_thompson contains +! DH* Note. The following is a nasty modification of the mp_thompson_init +! routine to account for the fact that the initialization of the physics +! must run over all blocks concurrently. In order to pass in the arguments +! as individual Fortran arrays as before, we need to remove the dynamic +! build first and add logic to detect that an array ... + !> This subroutine is a wrapper around the actual thompson_init(). !! \section arg_table_mp_thompson_init Argument Table !! \htmlinclude mp_thompson_init.html !! +#if 0 subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & imp_physics, imp_physics_thompson, & spechum, qc, qr, qi, qs, qg, ni, nr, & @@ -81,10 +88,6 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg - ! Local variables: dimensions used in thompson_init - integer :: ids,ide, jds,jde, kds,kde, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte ! Hydrometeors real(kind_phys) :: qv_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) real(kind_phys) :: qc_mp(1:ncol,1:nlev) !< kg kg-1 (dry mixing ratio) @@ -102,6 +105,91 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & ! real (kind=kind_phys) :: h_01, airmass, niIN3, niCCN3 integer :: i, k +#else + subroutine mp_thompson_init(Data, ntqv, ntcw, ntrw, ntiw, ntsw, ntgl, & + ntinc, ntrnc, ntlnc, ntwa, ntia, nleffr, & + nieffr, nseffr, con_g, con_rd, & + restart, imp_physics, imp_physics_thompson, & + is_aerosol_aware, mpicomm, mpirank, mpiroot,& + threads, errmsg, errflg) + + use GFS_typedefs, only : GFS_data_type + + implicit none + + ! Interface variables + type(GFS_data_type), intent(inout) :: Data(:) + integer, intent(in ) :: ntqv + integer, intent(in ) :: ntcw + integer, intent(in ) :: ntrw + integer, intent(in ) :: ntiw + integer, intent(in ) :: ntsw + integer, intent(in ) :: ntgl + integer, intent(in ) :: ntinc + integer, intent(in ) :: ntrnc + integer, intent(in ) :: ntlnc + integer, intent(in ) :: ntwa + integer, intent(in ) :: ntia + integer, intent(in ) :: nleffr + integer, intent(in ) :: nieffr + integer, intent(in ) :: nseffr + real(kind_phys), intent(in ) :: con_g, con_rd + logical, intent(in ) :: restart + integer, intent(in ) :: imp_physics + integer, intent(in ) :: imp_physics_thompson + ! Aerosols + logical, intent(in ) :: is_aerosol_aware + ! MPI information + integer, intent(in ) :: mpicomm + integer, intent(in ) :: mpirank + integer, intent(in ) :: mpiroot + ! Threading/blocking information + integer, intent(in ) :: threads + ! CCPP error handling + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Local variables/pointers + + ! Hydrometeors + real(kind_phys), dimension(:,:), allocatable :: qv_mp !< kg kg-1 (dry mixing ratio) + real(kind_phys), dimension(:,:), allocatable :: qc_mp !< kg kg-1 (dry mixing ratio) + real(kind_phys), dimension(:,:), allocatable :: qr_mp !< kg kg-1 (dry mixing ratio) + real(kind_phys), dimension(:,:), allocatable :: qi_mp !< kg kg-1 (dry mixing ratio) + real(kind_phys), dimension(:,:), allocatable :: qs_mp !< kg kg-1 (dry mixing ratio) + real(kind_phys), dimension(:,:), allocatable :: qg_mp !< kg kg-1 (dry mixing ratio) + real(kind_phys), dimension(:,:), allocatable :: ni_mp !< kg-1 + real(kind_phys), dimension(:,:), allocatable :: nr_mp !< kg-1 + real(kind_phys), dimension(:,:), allocatable :: nc_mp !< kg-1 + ! + real(kind_phys), dimension(:,:), allocatable :: hgt ! m + real(kind_phys), dimension(:,:), allocatable :: rho ! kg m-3 + real(kind_phys), dimension(:,:), allocatable :: orho ! m3 kg-1 + real(kind_phys), pointer :: spechum (:,:) + real(kind_phys), pointer :: qc (:,:) + real(kind_phys), pointer :: qr (:,:) + real(kind_phys), pointer :: qi (:,:) + real(kind_phys), pointer :: qs (:,:) + real(kind_phys), pointer :: qg (:,:) + real(kind_phys), pointer :: ni (:,:) + real(kind_phys), pointer :: nr (:,:) + real(kind_phys), pointer :: nc (:,:) + real(kind_phys), pointer :: nwfa (:,:) + real(kind_phys), pointer :: nifa (:,:) + real(kind_phys), pointer :: nwfa2d (:) + real(kind_phys), pointer :: nifa2d (:) + real(kind_phys), pointer :: tgrs (:,:) + real(kind_phys), pointer :: prsl (:,:) + real(kind_phys), pointer :: phil (:,:) + real(kind_phys), pointer :: area (:) + real(kind_phys), pointer :: re_cloud (:,:) + real(kind_phys), pointer :: re_ice (:,:) + real(kind_phys), pointer :: re_snow (:,:) + + ! + real (kind=kind_phys) :: h_01, airmass, niIN3, niCCN3 + integer :: i, k, blkno, nblocks, ncol, nlev +#endif ! Initialize the CCPP error handling variables errmsg = '' @@ -124,153 +212,158 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & return end if - if (is_aerosol_aware .and. & - (.not.present(nc) .or. & - .not.present(nwfa2d) .or. & - .not.present(nifa2d) .or. & - .not.present(nwfa) .or. & - .not.present(nifa) )) then - write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_init:', & - ' aerosol-aware microphysics require all of the following', & - ' optional arguments: nc, nwfa2d, nifa2d, nwfa, nifa' - errflg = 1 - return - end if - - ! Set internal dimensions - ids = 1 - ims = 1 - its = 1 - ide = ncol - ime = ncol - ite = ncol - jds = 1 - jms = 1 - jts = 1 - jde = 1 - jme = 1 - jte = 1 - kds = 1 - kms = 1 - kts = 1 - kde = nlev - kme = nlev - kte = nlev - - ! Call Thompson init - if (is_aerosol_aware) then - call thompson_init(nwfa2d=nwfa2d, nifa2d=nifa2d, nwfa=nwfa, nifa=nifa, & - ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & - ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & - its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & - mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & - threads=threads, errmsg=errmsg, errflg=errflg) - if (errflg /= 0) return - else - call thompson_init(ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & - ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & - its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & - mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & - threads=threads, errmsg=errmsg, errflg=errflg) - if (errflg /= 0) return - end if - - ! For restart runs, the init is done here - if (restart) then - is_initialized = .true. - return - end if - - ! Fix initial values of hydrometeors - where(spechum<0) spechum = 0.0 - where(qc<0) qc = 0.0 - where(qr<0) qr = 0.0 - where(qi<0) qi = 0.0 - where(qs<0) qs = 0.0 - where(qg<0) qg = 0.0 - where(ni<0) ni = 0.0 - where(nr<0) nr = 0.0 - - if (is_aerosol_aware) then - ! Fix initial values of aerosols - where(nc<0) nc = 0.0 - where(nwfa<0) nwfa = 0.0 - where(nifa<0) nifa = 0.0 - where(nwfa2d<0) nwfa2d = 0.0 - where(nifa2d<0) nifa2d = 0.0 - end if - - ! Geopotential height in m2 s-2 to height in m - hgt = phil/con_g - - ! Density of air in kg m-3 and inverse density of air - rho = prsl/(con_rd*tgrs) - orho = 1.0/rho - - ! Prior to calling the functions: make_DropletNumber, make_IceNumber, make_RainNumber, - ! the incoming mixing ratios should be converted to units of mass/num per cubic meter - ! rather than per kg of air. So, to pass back to the model state variables, - ! they also need to be switched back to mass/number per kg of air, because - ! what is returned by the functions is in units of number per cubic meter. - ! They also need to be converted to dry mixing ratios. + nblocks = size(Data) + block_loop: do blkno=1,nblocks + + ! associate_arrays: associate( & + spechum => Data(blkno)%Statein%qgrs(:,:,ntqv) !,& + qc => Data(blkno)%Statein%qgrs(:,:,ntcw) !,& + qr => Data(blkno)%Statein%qgrs(:,:,ntrw) !,& + qi => Data(blkno)%Statein%qgrs(:,:,ntiw) !,& + qs => Data(blkno)%Statein%qgrs(:,:,ntsw) !,& + qg => Data(blkno)%Statein%qgrs(:,:,ntgl) !,& + ni => Data(blkno)%Statein%qgrs(:,:,ntinc)!,& + nr => Data(blkno)%Statein%qgrs(:,:,ntrnc)!,& + nc => Data(blkno)%Statein%qgrs(:,:,ntlnc)!,& + nwfa => Data(blkno)%Statein%qgrs(:,:,ntwa) !,& + nifa => Data(blkno)%Statein%qgrs(:,:,ntia) !,& + nwfa2d => Data(blkno)%Coupling%nwfa2d !,& + nifa2d => Data(blkno)%Coupling%nifa2d !,& + tgrs => Data(blkno)%Statein%tgrs !,& + prsl => Data(blkno)%Statein%prsl !,& + phil => Data(blkno)%Statein%phil !,& + area => Data(blkno)%Grid%area !,& + re_cloud => Data(blkno)%Tbd%phy_f3d(:,:,nleffr)!,& + re_ice => Data(blkno)%Tbd%phy_f3d(:,:,nieffr)!,& + re_snow => Data(blkno)%Tbd%phy_f3d(:,:,nseffr)! ) + + ncol = size(spechum(:,1)) + nlev = size(spechum(1,:)) + allocate(qv_mp(ncol,nlev)) + allocate(qc_mp(ncol,nlev)) + allocate(qr_mp(ncol,nlev)) + allocate(qi_mp(ncol,nlev)) + allocate(qs_mp(ncol,nlev)) + allocate(qg_mp(ncol,nlev)) + allocate(ni_mp(ncol,nlev)) + allocate(nr_mp(ncol,nlev)) + allocate(nc_mp(ncol,nlev)) + allocate(hgt (ncol,nlev)) + allocate(rho (ncol,nlev)) + allocate(orho (ncol,nlev)) + + only_for_first_block: if (blkno==1) then + + ! Call Thompson init + if (is_aerosol_aware) then + call thompson_init(nwfa2d=nwfa2d, nifa2d=nifa2d, nwfa=nwfa, nifa=nifa, & + mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & + threads=threads, errmsg=errmsg, errflg=errflg) + if (errflg /= 0) return + else + call thompson_init(mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & + threads=threads, errmsg=errmsg, errflg=errflg) + if (errflg /= 0) return + end if + + ! For restart runs, the init is done here + if (restart) then + is_initialized = .true. + return + end if + + end if only_for_first_block + + ! Fix initial values of hydrometeors + where(spechum<0) spechum = 0.0 + where(qc<0) qc = 0.0 + where(qr<0) qr = 0.0 + where(qi<0) qi = 0.0 + where(qs<0) qs = 0.0 + where(qg<0) qg = 0.0 + where(ni<0) ni = 0.0 + where(nr<0) nr = 0.0 + + if (is_aerosol_aware) then + ! Fix initial values of aerosols + where(nc<0) nc = 0.0 + where(nwfa<0) nwfa = 0.0 + where(nifa<0) nifa = 0.0 + where(nwfa2d<0) nwfa2d = 0.0 + where(nifa2d<0) nifa2d = 0.0 + end if - !> - Convert specific humidity/moist mixing ratios to dry mixing ratios - qv_mp = spechum/(1.0_kind_phys-spechum) - qc_mp = qc/(1.0_kind_phys-spechum) - qr_mp = qr/(1.0_kind_phys-spechum) - qi_mp = qi/(1.0_kind_phys-spechum) - qs_mp = qs/(1.0_kind_phys-spechum) - qg_mp = qg/(1.0_kind_phys-spechum) + ! Geopotential height in m2 s-2 to height in m + hgt = phil/con_g + + ! Density of air in kg m-3 and inverse density of air + rho = prsl/(con_rd*tgrs) + orho = 1.0/rho + + ! Prior to calling the functions: make_DropletNumber, make_IceNumber, make_RainNumber, + ! the incoming mixing ratios should be converted to units of mass/num per cubic meter + ! rather than per kg of air. So, to pass back to the model state variables, + ! they also need to be switched back to mass/number per kg of air, because + ! what is returned by the functions is in units of number per cubic meter. + ! They also need to be converted to dry mixing ratios. + + !> - Convert specific humidity/moist mixing ratios to dry mixing ratios + qv_mp = spechum/(1.0_kind_phys-spechum) + qc_mp = qc/(1.0_kind_phys-spechum) + qr_mp = qr/(1.0_kind_phys-spechum) + qi_mp = qi/(1.0_kind_phys-spechum) + qs_mp = qs/(1.0_kind_phys-spechum) + qg_mp = qg/(1.0_kind_phys-spechum) + + !> - Convert number concentrations from moist to dry + ni_mp = ni/(1.0_kind_phys-spechum) + nr_mp = nr/(1.0_kind_phys-spechum) + if (is_aerosol_aware) then + nc_mp = nc/(1.0_kind_phys-spechum) + end if - !> - Convert number concentrations from moist to dry - ni_mp = ni/(1.0_kind_phys-spechum) - nr_mp = nr/(1.0_kind_phys-spechum) - if (is_aerosol_aware) then - nc_mp = nc/(1.0_kind_phys-spechum) - end if + ! If qi is in boundary conditions but ni is not, calculate ni from qi, rho and tgrs + if (maxval(qi_mp)>0.0 .and. maxval(ni_mp)==0.0) then + ni_mp = make_IceNumber(qi_mp*rho, tgrs) * orho + end if - ! If qi is in boundary conditions but ni is not, calculate ni from qi, rho and tgrs - if (maxval(qi_mp)>0.0 .and. maxval(ni_mp)==0.0) then - ni_mp = make_IceNumber(qi_mp*rho, tgrs) * orho - end if + ! If ni is in boundary conditions but qi is not, reset ni to zero + if (maxval(ni_mp)>0.0 .and. maxval(qi_mp)==0.0) ni_mp = 0.0 - ! If ni is in boundary conditions but qi is not, reset ni to zero - if (maxval(ni_mp)>0.0 .and. maxval(qi_mp)==0.0) ni_mp = 0.0 + ! If qr is in boundary conditions but nr is not, calculate nr from qr, rho and tgrs + if (maxval(qr_mp)>0.0 .and. maxval(nr_mp)==0.0) then + nr_mp = make_RainNumber(qr_mp*rho, tgrs) * orho + end if - ! If qr is in boundary conditions but nr is not, calculate nr from qr, rho and tgrs - if (maxval(qr_mp)>0.0 .and. maxval(nr_mp)==0.0) then - nr_mp = make_RainNumber(qr_mp*rho, tgrs) * orho - end if + ! If nr is in boundary conditions but qr is not, reset nr to zero + if (maxval(nr_mp)>0.0 .and. maxval(qr_mp)==0.0) nr_mp = 0.0 - ! If nr is in boundary conditions but qr is not, reset nr to zero - if (maxval(nr_mp)>0.0 .and. maxval(qr_mp)==0.0) nr_mp = 0.0 + !..Check for existing aerosol data, both CCN and IN aerosols. If missing + !.. fill in just a basic vertical profile, somewhat boundary-layer following. + if (is_aerosol_aware) then - !..Check for existing aerosol data, both CCN and IN aerosols. If missing - !.. fill in just a basic vertical profile, somewhat boundary-layer following. - if (is_aerosol_aware) then - - ! CCN - if (MAXVAL(nwfa) .lt. eps) then - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosols.' - do i = 1, ncol + ! CCN + if (MAXVAL(nwfa) .lt. eps) then + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosols.' + do i = 1, ncol if (hgt(i,1).le.1000.0) then - h_01 = 0.8 + h_01 = 0.8 elseif (hgt(i,1).ge.2500.0) then - h_01 = 0.01 + h_01 = 0.01 else - h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) + h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) endif niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 nwfa(i,1) = naCCN1+naCCN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niCCN3) airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) do k = 2, nlev - nwfa(i,k) = naCCN1+naCCN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niCCN3) + nwfa(i,k) = naCCN1+naCCN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niCCN3) enddo - enddo - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosols are present.' - if (MAXVAL(nwfa2d) .lt. eps) then + enddo + else + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosols are present.' + if (MAXVAL(nwfa2d) .lt. eps) then ! Hard-coded switch between new (from WRFv4.0, top) and old (until WRFv3.9.1.1, bottom) surface emission rate calculations #if 0 !+---+-----------------------------------------------------------------+ @@ -312,15 +405,15 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & nwfa2d(i) = nwfa2d(i)*h_01 * 1.E6 enddo #endif - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosol surface emission rates are present.' - endif - endif - - ! IN - if (MAXVAL(nifa) .lt. eps) then - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosols.' - do i = 1, ncol + else + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosol surface emission rates are present.' + endif + endif + + ! IN + if (MAXVAL(nifa) .lt. eps) then + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosols.' + do i = 1, ncol if (hgt(i,1).le.1000.0) then h_01 = 0.8 elseif (hgt(i,1).ge.2500.0) then @@ -334,54 +427,53 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & do k = 2, nlev nifa(i,k) = naIN1+naIN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niIN3) enddo - enddo - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosols are present.' - if (MAXVAL(nifa2d) .lt. eps) then + enddo + else + if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosols are present.' + if (MAXVAL(nifa2d) .lt. eps) then if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosol surface emission rates, set to zero.' ! calculate IN surface flux here, right now just set to zero nifa2d = 0. - else + else if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosol surface emission rates are present.' - endif - endif + endif + endif - ! If qc is in boundary conditions but nc is not, calculate nc from qc, rho and nwfa - if (maxval(qc_mp)>0.0 .and. maxval(nc_mp)==0.0) then - nc_mp = make_DropletNumber(qc_mp*rho, nwfa) * orho - end if + ! If qc is in boundary conditions but nc is not, calculate nc from qc, rho and nwfa + if (maxval(qc_mp)>0.0 .and. maxval(nc_mp)==0.0) then + nc_mp = make_DropletNumber(qc_mp*rho, nwfa) * orho + end if - ! If nc is in boundary conditions but qc is not, reset nc to zero - if (maxval(nc_mp)>0.0 .and. maxval(qc_mp)==0.0) nc_mp = 0.0 + ! If nc is in boundary conditions but qc is not, reset nc to zero + if (maxval(nc_mp)>0.0 .and. maxval(qc_mp)==0.0) nc_mp = 0.0 - else + else - ! Constant droplet concentration for single moment cloud water as in - ! module_mp_thompson.F90, only needed for effective radii calculation - nc_mp = Nt_c/rho + ! Constant droplet concentration for single moment cloud water as in + ! module_mp_thompson.F90, only needed for effective radii calculation + nc_mp = Nt_c/rho - end if + end if - ! Calculate initial cloud effective radii if requested - if (present(re_cloud) .and. present(re_ice) .and. present(re_snow)) then + ! Calculate initial cloud effective radii if requested do i = 1, ncol - do k = 1, nlev - re_cloud(i,k) = 2.49E-6 - re_ice(i,k) = 4.99E-6 - re_snow(i,k) = 9.99E-6 - end do + do k = 1, nlev + re_cloud(i,k) = 2.49E-6 + re_ice(i,k) = 4.99E-6 + re_snow(i,k) = 9.99E-6 + end do end do do i = 1, ncol - call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & - nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & - re_cloud(i,:), re_ice(i,:), re_snow(i,:), kts, kte) + call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & + nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & + re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, nlev) end do do i = 1, ncol - do k = 1, nlev - re_cloud(i,k) = MAX(2.49E-6, MIN(re_cloud(i,k), 50.E-6)) - re_ice(i,k) = MAX(4.99E-6, MIN(re_ice(i,k), 125.E-6)) - re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) - end do + do k = 1, nlev + re_cloud(i,k) = MAX(2.49E-6, MIN(re_cloud(i,k), 50.E-6)) + re_ice(i,k) = MAX(4.99E-6, MIN(re_ice(i,k), 125.E-6)) + re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) + end do end do ! Convert to micron: required for bit-for-bit identical restarts; ! otherwise entering mp_thompson_init and converting mu to m and @@ -389,22 +481,30 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & re_cloud = 1.0E6*re_cloud re_ice = 1.0E6*re_ice re_snow = 1.0E6*re_snow - else if (.not.present(re_cloud) .and. .not.present(re_ice) .and. .not.present(re_snow)) then - ! Do nothing - else - write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_run:', & - ' all or none of the following optional', & - ' arguments are required: re_cloud, re_ice, re_snow' - errflg = 1 - return - end if - !> - Convert number concentrations from dry to moist - ni = ni_mp/(1.0_kind_phys+qv_mp) - nr = nr_mp/(1.0_kind_phys+qv_mp) - if (is_aerosol_aware) then - nc = nc_mp/(1.0_kind_phys+qv_mp) - end if + !> - Convert number concentrations from dry to moist + ni = ni_mp/(1.0_kind_phys+qv_mp) + nr = nr_mp/(1.0_kind_phys+qv_mp) + if (is_aerosol_aware) then + nc = nc_mp/(1.0_kind_phys+qv_mp) + end if + + deallocate(qv_mp) + deallocate(qc_mp) + deallocate(qr_mp) + deallocate(qi_mp) + deallocate(qs_mp) + deallocate(qg_mp) + deallocate(ni_mp) + deallocate(nr_mp) + deallocate(nc_mp) + deallocate(hgt ) + deallocate(rho ) + deallocate(orho ) + + !end associate associate_arrays + + end do block_loop is_initialized = .true. @@ -552,7 +652,7 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & qi_mp = qi/(1.0_kind_phys-spechum) qs_mp = qs/(1.0_kind_phys-spechum) qg_mp = qg/(1.0_kind_phys-spechum) - + !> - Convert number concentrations from moist to dry ni_mp = ni/(1.0_kind_phys-spechum) nr_mp = nr/(1.0_kind_phys-spechum) diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 0419a6c15..7113cf670 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -1,18 +1,122 @@ [ccpp-arg-table] name = mp_thompson_init type = scheme -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count +[Data] + standard_name = GFS_data_type_instance_all_blocks + long_name = instance of derived type GFS_data_type + units = DDT + dimensions = (ccpp_block_number) + type = GFS_data_type + intent = inout + optional = F +[ntqv] + standard_name = index_for_water_vapor + long_name = tracer index for water vapor (specific humidity) + units = index dimensions = () type = integer intent = in optional = F -[nlev] - standard_name = vertical_dimension - long_name = number of vertical levels - units = count +[ntcw] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_for_rain_water + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_for_ice_cloud_condensate + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_for_snow_water + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgl] + standard_name = index_for_graupel + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntinc] + standard_name = index_for_ice_cloud_number_concentration + long_name = tracer index for ice number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrnc] + standard_name = index_for_rain_number_concentration + long_name = tracer index for rain number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntlnc] + standard_name = index_for_liquid_cloud_number_concentration + long_name = tracer index for liquid number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntwa] + standard_name = index_for_water_friendly_aerosols + long_name = tracer index for water friendly aerosol + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntia] + standard_name = index_for_ice_friendly_aerosols + long_name = tracer index for ice friendly aerosol + units = index + dimensions = () + type = integer + intent = in + optional = F +[nleffr] + standard_name = index_for_cloud_liquid_water_effective_radius + long_name = the index of cloud liquid water effective radius in phy_f3d + units = + dimensions = () + type = integer + intent = in + optional = F +[nieffr] + standard_name = index_for_ice_effective_radius + long_name = the index of ice effective radius in phy_f3d + units = + dimensions = () + type = integer + intent = in + optional = F +[nseffr] + standard_name = index_for_snow_effective_radius + long_name = the index of snow effective radius in phy_f3d + units = dimensions = () type = integer intent = in @@ -59,78 +163,6 @@ type = integer intent = in optional = F -[spechum] - standard_name = water_vapor_specific_humidity - long_name = water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qc] - standard_name = cloud_condensed_water_mixing_ratio - long_name = cloud water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qr] - standard_name = rain_water_mixing_ratio - long_name = rain water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qi] - standard_name = ice_water_mixing_ratio - long_name = ice water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qs] - standard_name = snow_water_mixing_ratio - long_name = snow water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qg] - standard_name = graupel_mixing_ratio - long_name = graupel mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ni] - standard_name = ice_number_concentration - long_name = ice number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[nr] - standard_name = rain_number_concentration - long_name = rain number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [is_aerosol_aware] standard_name = flag_for_aerosol_physics long_name = flag for aerosol-aware physics @@ -139,114 +171,6 @@ type = logical intent = in optional = F -[nc] - standard_name = cloud_droplet_number_concentration - long_name = cloud droplet number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nwfa2d] - standard_name = tendency_of_water_friendly_aerosols_at_surface - long_name = instantaneous fake water-friendly surface aerosol source - units = kg-1 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nifa2d] - standard_name = tendency_of_ice_friendly_aerosols_at_surface - long_name = instantaneous fake ice-friendly surface aerosol source - units = kg-1 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nwfa] - standard_name = water_friendly_aerosol_number_concentration - long_name = number concentration of water-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nifa] - standard_name = ice_friendly_aerosol_number_concentration - long_name = number concentration of ice-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[prsl] - standard_name = air_pressure - long_name = mean layer pressure - units = Pa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[phil] - standard_name = geopotential - long_name = geopotential at model layer centers - units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[area] - standard_name = cell_area - long_name = area of the grid cell - units = m2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[re_cloud] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - long_name = eff. radius of cloud liquid water particle in micrometer - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[re_ice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um - long_name = eff. radius of cloud ice water particle in micrometer - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[re_snow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um - long_name = effective radius of cloud snow particle in micrometer - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T [mpicomm] standard_name = mpi_comm long_name = MPI communicator @@ -279,14 +203,6 @@ type = integer intent = in optional = F -[blkno] - standard_name = ccpp_block_number - long_name = for explicit data blocking: block number of this block - units = index - dimensions = () - type = integer - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/mp_thompson.meta.backup.before.workaround b/physics/mp_thompson.meta.backup.before.workaround new file mode 100644 index 000000000..0419a6c15 --- /dev/null +++ b/physics/mp_thompson.meta.backup.before.workaround @@ -0,0 +1,676 @@ +[ccpp-arg-table] + name = mp_thompson_init + type = scheme +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[nlev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_thompson] + standard_name = flag_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[spechum] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio + long_name = cloud water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qr] + standard_name = rain_water_mixing_ratio + long_name = rain water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qi] + standard_name = ice_water_mixing_ratio + long_name = ice water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qs] + standard_name = snow_water_mixing_ratio + long_name = snow water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qg] + standard_name = graupel_mixing_ratio + long_name = graupel mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ni] + standard_name = ice_number_concentration + long_name = ice number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nr] + standard_name = rain_number_concentration + long_name = rain number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[is_aerosol_aware] + standard_name = flag_for_aerosol_physics + long_name = flag for aerosol-aware physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[nc] + standard_name = cloud_droplet_number_concentration + long_name = cloud droplet number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nwfa2d] + standard_name = tendency_of_water_friendly_aerosols_at_surface + long_name = instantaneous fake water-friendly surface aerosol source + units = kg-1 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nifa2d] + standard_name = tendency_of_ice_friendly_aerosols_at_surface + long_name = instantaneous fake ice-friendly surface aerosol source + units = kg-1 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nwfa] + standard_name = water_friendly_aerosol_number_concentration + long_name = number concentration of water-friendly aerosols + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nifa] + standard_name = ice_friendly_aerosol_number_concentration + long_name = number concentration of ice-friendly aerosols + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phil] + standard_name = geopotential + long_name = geopotential at model layer centers + units = m2 s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[area] + standard_name = cell_area + long_name = area of the grid cell + units = m2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[re_cloud] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[re_ice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[re_snow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[threads] + standard_name = omp_threads + long_name = number of OpenMP threads available to scheme + units = count + dimensions = () + type = integer + intent = in + optional = F +[blkno] + standard_name = ccpp_block_number + long_name = for explicit data blocking: block number of this block + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = mp_thompson_run + type = scheme +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[nlev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[spechum] + standard_name = water_vapor_specific_humidity_updated_by_physics + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics + long_name = cloud water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qr] + standard_name = rain_water_mixing_ratio_updated_by_physics + long_name = rain water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qi] + standard_name = ice_water_mixing_ratio_updated_by_physics + long_name = ice water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qs] + standard_name = snow_water_mixing_ratio_updated_by_physics + long_name = snow water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qg] + standard_name = graupel_mixing_ratio_updated_by_physics + long_name = graupel mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ni] + standard_name = ice_number_concentration_updated_by_physics + long_name = ice number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nr] + standard_name = rain_number_concentration_updated_by_physics + long_name = rain number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[is_aerosol_aware] + standard_name = flag_for_aerosol_physics + long_name = flag for aerosol-aware physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[nc] + standard_name = cloud_droplet_number_concentration_updated_by_physics + long_name = cloud droplet number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nwfa] + standard_name = water_friendly_aerosol_number_concentration_updated_by_physics + long_name = number concentration of water-friendly aerosols + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nifa] + standard_name = ice_friendly_aerosol_number_concentration_updated_by_physics + long_name = number concentration of ice-friendly aerosols + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nwfa2d] + standard_name = tendency_of_water_friendly_aerosols_at_surface + long_name = instantaneous fake water-friendly surface aerosol source + units = kg-1 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = T +[nifa2d] + standard_name = tendency_of_ice_friendly_aerosols_at_surface + long_name = instantaneous fake ice-friendly surface aerosol source + units = kg-1 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = T +[tgrs] + standard_name = air_temperature_updated_by_physics + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phii] + standard_name = geopotential_at_interface + long_name = geopotential at model layer interfaces + units = m2 s-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[omega] + standard_name = omega + long_name = layer mean vertical velocity + units = Pa s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dtp] + standard_name = time_step_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[prcp] + standard_name = lwe_thickness_of_explicit_precipitation_amount + long_name = explicit precipitation (rain, ice, snow, graupel) on physics timestep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rain] + standard_name = lwe_thickness_of_explicit_rain_amount + long_name = explicit rain fall on physics timestep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[graupel] + standard_name = lwe_thickness_of_graupel_amount + long_name = graupel fall on physics timestep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ice] + standard_name = lwe_thickness_of_ice_amount + long_name = ice fall on physics timestep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[snow] + standard_name = lwe_thickness_of_snow_amount + long_name = snow fall on physics timestep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sr] + standard_name = ratio_of_snowfall_to_rainfall + long_name = ratio of snowfall to large-scale rainfall + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[refl_10cm] + standard_name = radar_reflectivity_10cm + long_name = instantaneous refl_10cm + units = dBZ + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[do_radar_ref] + standard_name = flag_for_radar_reflectivity + long_name = flag for radar reflectivity + units = flag + dimensions = () + type = logical + intent = in + optional = F +[re_cloud] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer (meter here) + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[re_ice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer (meter here) + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[re_snow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometer (meter here) + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = mp_thompson_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/mp_thompson_post.F90 b/physics/mp_thompson_post.F90 index 2452fa337..dd4a2b3f5 100644 --- a/physics/mp_thompson_post.F90 +++ b/physics/mp_thompson_post.F90 @@ -12,8 +12,6 @@ module mp_thompson_post logical :: apply_limiter - real(kind_phys), dimension(:), allocatable :: mp_tend_lim - contains !! \section arg_table_mp_thompson_post_init Argument Table @@ -43,18 +41,10 @@ subroutine mp_thompson_post_init(ncol, ttendlim, errmsg, errflg) if (ttendlim < 0) then apply_limiter = .false. - is_initialized = .true. - return + else + apply_limiter = .true. end if - allocate(mp_tend_lim(1:ncol)) - - do i=1,ncol - mp_tend_lim(i) = ttendlim - end do - - apply_limiter = .true. - is_initialized = .true. end subroutine mp_thompson_post_init @@ -62,7 +52,7 @@ end subroutine mp_thompson_post_init !! \section arg_table_mp_thompson_post_run Argument Table !! \htmlinclude mp_thompson_post_run.html !! - subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, & + subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, ttendlim, & kdt, mpicomm, mpirank, mpiroot, errmsg, errflg) implicit none @@ -74,6 +64,7 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, & real(kind_phys), dimension(1:ncol,1:nlev), intent(inout) :: tgrs real(kind_phys), dimension(1:ncol,1:nlev), intent(in) :: prslk real(kind_phys), intent(in) :: dtp + real(kind_phys), intent(in) :: ttendlim integer, intent(in) :: kdt ! MPI information integer, intent(in ) :: mpicomm @@ -102,13 +93,13 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, & ! If limiter is deactivated, return immediately if (.not.apply_limiter) return - ! mp_tend and mp_tend_lim are expressed in potential temperature + ! mp_tend and ttendlim are expressed in potential temperature mp_tend = (tgrs - tgrs_save)/prslk events = 0 do k=1,nlev do i=1,ncol - mp_tend(i,k) = max( -mp_tend_lim(i)*dtp, min( mp_tend_lim(i)*dtp, mp_tend(i,k) ) ) + mp_tend(i,k) = max( -ttendlim*dtp, min( ttendlim*dtp, mp_tend(i,k) ) ) if (tgrs_save(i,k) + mp_tend(i,k)*prslk(i,k) .ne. tgrs(i,k)) then #ifdef DEBUG @@ -122,7 +113,7 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, & end do if (events > 0) then - write(0,'(a,i0,a,i0,a,i0)') "mp_thompson_post_run: mp_tend_lim applied ", events, "/", nlev*ncol, & + write(0,'(a,i0,a,i0,a,i0)') "mp_thompson_post_run: ttendlim applied ", events, "/", nlev*ncol, & & " times at timestep ", kdt end if @@ -142,12 +133,10 @@ subroutine mp_thompson_post_finalize(errmsg, errflg) ! initialize ccpp error handling variables errmsg = '' errflg = 0 - + ! Check initialization state if (.not. is_initialized) return - if (allocated(mp_tend_lim)) deallocate(mp_tend_lim) - is_initialized = .false. end subroutine mp_thompson_post_finalize diff --git a/physics/mp_thompson_post.meta b/physics/mp_thompson_post.meta index 0f3cc6189..7a26db6f5 100644 --- a/physics/mp_thompson_post.meta +++ b/physics/mp_thompson_post.meta @@ -92,6 +92,15 @@ kind = kind_phys intent = in optional = F +[ttendlim] + standard_name = limit_for_temperature_tendency_for_microphysics + long_name = temperature tendency limiter per physics time step + units = K s-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [kdt] standard_name = index_of_time_step long_name = current forecast iteration From d2f38dd0de89ab20686c3fda84cc98355403ae2a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 13 Feb 2020 11:18:49 -0700 Subject: [PATCH 042/404] Reorganize interstitial code around convection, bugfixes for Hannah's code --- physics/GFS_DCNV_generic.F90 | 14 ++------ physics/GFS_DCNV_generic.meta | 25 ------------- physics/GFS_suite_interstitial.F90 | 55 ++++++++++++++++------------- physics/GFS_suite_interstitial.meta | 22 ++++++++++-- 4 files changed, 53 insertions(+), 63 deletions(-) diff --git a/physics/GFS_DCNV_generic.F90 b/physics/GFS_DCNV_generic.F90 index 02230904c..0c7573c63 100644 --- a/physics/GFS_DCNV_generic.F90 +++ b/physics/GFS_DCNV_generic.F90 @@ -18,9 +18,8 @@ end subroutine GFS_DCNV_generic_pre_finalize !! #endif subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, & - isppt_deep, imp_physics, imp_physics_thompson, & - gu0, gv0, gt0, gq0_water_vapor, & - save_u, save_v, save_t, save_tcp, save_qv, & + isppt_deep, gu0, gv0, gt0, gq0_water_vapor, & + save_u, save_v, save_t, save_qv, & ca_deep, errmsg, errflg) use machine, only: kind_phys @@ -36,7 +35,6 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_u real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_v real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_t - real(kind=kind_phys), dimension(im,levs), intent(out), optional :: save_tcp real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_qv real(kind=kind_phys), dimension(im), intent(in) :: ca_deep character(len=*), intent(out) :: errmsg @@ -72,14 +70,6 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, enddo endif - if (imp_physics == imp_physics_thompson) then - do k=1,levs - do i=1,im - save_tcp(i,k) = gt0(i,k) - enddo - enddo - endif - if (ldiag3d .or. isppt_deep) then do k=1,levs do i=1,im diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index 65c44e53b..eae53a910 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -49,22 +49,6 @@ type = logical intent = in optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme - long_name = choice of Thompson microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [gu0] standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics @@ -128,15 +112,6 @@ kind = kind_phys intent = inout optional = F -[save_tcp] - standard_name = air_temperature_save_from_cumulus_paramterization - long_name = air temperature after cumulus parameterization - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = T [save_qv] standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 79b14c18e..1e3035cbf 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -463,13 +463,13 @@ end subroutine GFS_suite_interstitial_3_finalize subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & satmedmf, trans_trac, do_shoc, ltaerosol, ntrac, ntcw, & ntiw, ntclamt, ntrw, ntsw, ntrnc, ntsnc, ntgl, ntgnc, & - xlat, gq0, imp_physics, imp_physics_mg, & + xlat, gt0, gq0, imp_physics, imp_physics_mg, & imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, & imp_physics_gfdl, imp_physics_thompson, & imp_physics_wsm6, imp_physics_fer_hires, prsi, & prsl, prslk, rhcbot,rhcpbl, rhctop, rhcmax, islmsk, & work1, work2, kpbl, kinver,clw, rhc, save_qc, save_qi, & - errmsg, errflg) + save_tcp, errmsg, errflg) use machine, only: kind_phys @@ -487,11 +487,13 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & real(kind=kind_phys), dimension(im, levs), intent(in) :: prsl, prslk real(kind=kind_phys), dimension(im, levs+1), intent(in) :: prsi real(kind=kind_phys), dimension(im), intent(in) :: xlat + real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0 real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0 real(kind=kind_phys), dimension(im, levs), intent(inout) :: rhc, save_qc ! save_qi is not allocated for Zhao-Carr MP real(kind=kind_phys), dimension(:, :), intent(inout) :: save_qi + real(kind=kind_phys), dimension(:, :), intent(inout) :: save_tcp ! ONLY ALLOCATE FOR THOMPSON! TODO real(kind=kind_phys), dimension(im, levs, nn), intent(inout) :: clw character(len=*), intent(out) :: errmsg @@ -615,8 +617,9 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & elseif (imp_physics == imp_physics_thompson) then do k=1,levs do i=1,im - clw(i,k,1) = gq0(i,k,ntiw) ! ice - clw(i,k,2) = gq0(i,k,ntcw) ! water + clw(i,k,1) = gq0(i,k,ntiw) ! ice + clw(i,k,2) = gq0(i,k,ntcw) ! water + save_tcp(i,k) = gt0(i,k) enddo enddo if(ltaerosol) then @@ -625,6 +628,7 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & else save_qi(:,:) = clw(:,:,1) endif + elseif (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_mg .or. imp_physics == imp_physics_fer_hires) then do k=1,levs do i=1,im @@ -686,7 +690,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to real(kind=kind_phys), dimension(im,levs,nn), intent(inout) :: clw real(kind=kind_phys), dimension(im,levs), intent(in) :: prsl real(kind=kind_phys), intent(in) :: con_rd - real(kind=kind_phys), dimension(im,levs), intent(in), optional :: nwfa, save_tcp + real(kind=kind_phys), dimension(:,:), intent(in) :: nwfa, save_tcp real(kind=kind_phys), dimension(im,levs), intent(in) :: spechum ! dqdti may not be allocated @@ -699,7 +703,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to ! local variables integer :: i,k,n,tracers - real(kind=kind_phys), dimension(im,levs) :: rho_dryar + real(kind=kind_phys), dimension(im,levs) :: rho_dryair real(kind=kind_phys), dimension(im,levs) :: qv_mp !< kg kg-1 (dry mixing ratio) real(kind=kind_phys), dimension(im,levs) :: qc_mp !< kg kg-1 (dry mixing ratio) real(kind=kind_phys), dimension(im,levs) :: qi_mp !< kg kg-1 (dry mixing ratio) @@ -746,28 +750,31 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to enddo enddo - if (imp_physics == imp_physics_thompson) then + if (imp_physics == imp_physics_thompson .and. (ntlnc>0 .or. ntinc>0)) then do k=1,levs do i=1,im !> - Density of air in kg m-3 - rho_dryar(i,k) = prsl(i,k)/(con_rd*save_tcp(i,k)) - - !> - Convert specific humidity/moist mixing ratios to dry mixing ratios + rho_dryair(i,k) = prsl(i,k)/(con_rd*save_tcp(i,k)) + !> - Convert specific humidity to dry mixing ratio qv_mp(i,k) = spechum(i,k)/(1.0_kind_phys-spechum(i,k)) - qc_mp(i,k) = save_qc(i,k)/(1.0_kind_phys-spechum(i,k)) - qi_mp(i,k) = save_qi(i,k)/(1.0_kind_phys-spechum(i,k)) - - !> - Convert number concentrations from moist to dry - nc_mp(i,k) = gq0(i,k,ntlnc)/(1.0_kind_phys-spechum(i,k)) - ni_mp(i,k) = gq0(i,k,ntinc)/(1.0_kind_phys-spechum(i,k)) - - - nc_mp(i,k) = nc_mp(i,k) + max(0.0, make_DropletNumber(qc_mp(i,k) * rho_dryar(i,k), nwfa(i,k)) * (1.0/rho_dryar(i,k))) - ni_mp(i,k) = ni_mp(i,k) + max(0.0, make_IceNumber(qi_mp(i,k) * rho_dryar(i,k), save_tcp(i,k)) * (1.0/rho_dryar(i,k))) - - !> - Convert number concentrations from dry to moist - gq0(i,k,ntlnc) = nc_mp(i,k)/(1.0_kind_phys+qv_mp(i,k)) - gq0(i,k,ntinc) = ni_mp(i,k)/(1.0_kind_phys+qv_mp(i,k)) + if (ntlnc>0) then + !> - Convert moist mixing ratio to dry mixing ratio + qc_mp(i,k) = save_qc(i,k)/(1.0_kind_phys-spechum(i,k)) + !> - Convert number concentration from moist to dry + nc_mp(i,k) = gq0(i,k,ntlnc)/(1.0_kind_phys-spechum(i,k)) + nc_mp(i,k) = nc_mp(i,k) + max(0.0, make_DropletNumber(qc_mp(i,k) * rho_dryair(i,k), nwfa(i,k)) * (1.0/rho_dryair(i,k))) + !> - Convert number concentrations from dry to moist + gq0(i,k,ntlnc) = nc_mp(i,k)/(1.0_kind_phys+qv_mp(i,k)) + endif + if (ntinc>0) then + !> - Convert moist mixing ratio to dry mixing ratio + qi_mp(i,k) = save_qi(i,k)/(1.0_kind_phys-spechum(i,k)) + !> - Convert number concentration from moist to dry + ni_mp(i,k) = gq0(i,k,ntinc)/(1.0_kind_phys-spechum(i,k)) + ni_mp(i,k) = ni_mp(i,k) + max(0.0, make_IceNumber(qi_mp(i,k) * rho_dryair(i,k), save_tcp(i,k)) * (1.0/rho_dryair(i,k))) + !> - Convert number concentrations from dry to moist + gq0(i,k,ntinc) = ni_mp(i,k)/(1.0_kind_phys+qv_mp(i,k)) + endif enddo enddo endif diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 7316bb048..86e21f0a9 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1218,6 +1218,15 @@ kind = kind_phys intent = in optional = F +[gt0] + standard_name = air_temperature_updated_by_physics + long_name = temperature updated by physics + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [gq0] standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics @@ -1432,6 +1441,15 @@ kind = kind_phys intent = inout optional = F +[save_tcp] + standard_name = air_temperature_save_from_cumulus_paramterization + long_name = air temperature after cumulus parameterization + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -1709,7 +1727,7 @@ type = real kind = kind_phys intent = in - optional = T + optional = F [con_rd] standard_name = gas_constant_dry_air long_name = ideal gas constant for dry air @@ -1727,7 +1745,7 @@ type = real kind = kind_phys intent = in - optional = T + optional = F [spechum] standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity From 1a3c4d1d020bc9edca46a1911232156143cf3001 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 13 Feb 2020 18:28:44 +0000 Subject: [PATCH 043/404] All gfs v15p2 and v16beta 3d diagnostic tendencies look reasonable --- physics/GFS_SCNV_generic.F90 | 41 ++++++++++------ physics/GFS_SCNV_generic.meta | 91 +++++++++++++++++++++++++++++++++++ physics/model_tend_post.F90 | 13 +---- physics/model_tend_pre.F90 | 2 + physics/moninedmf.f | 3 +- physics/total_tend.F90 | 4 +- physics/total_tend.meta | 14 ++---- 7 files changed, 128 insertions(+), 40 deletions(-) diff --git a/physics/GFS_SCNV_generic.F90 b/physics/GFS_SCNV_generic.F90 index 3aecee8f3..5496d0f48 100644 --- a/physics/GFS_SCNV_generic.F90 +++ b/physics/GFS_SCNV_generic.F90 @@ -14,18 +14,18 @@ end subroutine GFS_SCNV_generic_pre_finalize !> \section arg_table_GFS_SCNV_generic_pre_run Argument Table !! \htmlinclude GFS_SCNV_generic_pre_run.html !! - subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gt0, gq0_water_vapor, & - save_t, save_qv, errmsg, errflg) + subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, gq0_water_vapor, & + save_u, save_v, save_t, save_qv, flag_for_scnv_generic_tend, errmsg, errflg) use machine, only: kind_phys implicit none integer, intent(in) :: im, levs - logical, intent(in) :: ldiag3d, qdiag3d - real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, gq0_water_vapor + logical, intent(in) :: ldiag3d, qdiag3d, flag_for_scnv_generic_tend + real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_t, save_qv + real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_u, save_v, save_t, save_qv character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -35,9 +35,12 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gt0, gq0_water_ errmsg = '' errflg = 0 - if (ldiag3d) then + save_fields: if (ldiag3d .and. flag_for_scnv_generic_tend) then + print *,'save fields in GFS_SCNV_generic_pre_run' do k=1,levs do i=1,im + save_u(i,k) = gu0(i,k) + save_v(i,k) = gv0(i,k) save_t(i,k) = gt0(i,k) enddo enddo @@ -48,7 +51,7 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gt0, gq0_water_ enddo enddo endif - endif + endif save_fields end subroutine GFS_SCNV_generic_pre_run @@ -68,7 +71,7 @@ end subroutine GFS_SCNV_generic_post_finalize !! \htmlinclude GFS_SCNV_generic_post_run.html !! subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cplchm, & - frain, gt0, gq0_water_vapor, save_t, save_qv, dqdti, dt3dt, dq3dt, clw, & + frain, gu0, gv0, gt0, gq0_water_vapor, save_u, save_v, save_t, save_qv, dqdti, du3dt, dv3dt, dt3dt, dq3dt, clw, & shcnvcw, rain1, npdf3d, num_p3d, ncnvcld3d, cnvc, cnvw, & rainc, cnvprcp, cnvprcpb, cnvw_phy_f3d, cnvc_phy_f3d, & flag_for_scnv_generic_tend, & @@ -81,12 +84,12 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl integer, intent(in) :: im, levs, nn logical, intent(in) :: lssav, ldiag3d, qdiag3d, cplchm, flag_for_scnv_generic_tend real(kind=kind_phys), intent(in) :: frain - real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, gq0_water_vapor - real(kind=kind_phys), dimension(im,levs), intent(in) :: save_t, save_qv + real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor + real(kind=kind_phys), dimension(im,levs), intent(in) :: save_u, save_v, save_t, save_qv ! dqdti, dt3dt, dq3dt, only allocated if ldiag3d == .true. real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti - real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, dq3dt + real(kind=kind_phys), dimension(:,:), intent(inout) :: du3dt, dv3dt, dt3dt, dq3dt real(kind=kind_phys), dimension(im,levs,nn), intent(inout) :: clw ! Post code for SAS/SAMF @@ -112,7 +115,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl errmsg = '' errflg = 0 - if (imfshalcnv==imfshalcnv_sas .or. imfshalcnv==imfshalcnv_samf) then + update_cnvw_cnvc: if (imfshalcnv==imfshalcnv_sas .or. imfshalcnv==imfshalcnv_samf) then do i=1,im rainc(i) = rainc(i) + frain * rain1(i) enddo @@ -131,13 +134,19 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl enddo enddo endif - endif + endif update_cnvw_cnvc - if (lssav .and. flag_for_scnv_generic_tend) then + diagtend: if (lssav .and. flag_for_scnv_generic_tend) then + print *,'diagtend in GFS_SCNV_generic.F90' + if(frain<1e-5) then + print *,'bad frain: ',frain + endif if (ldiag3d) then do k=1,levs do i=1,im - dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k) - save_t(i,k)) * frain + du3dt(i,k) = du3dt(i,k) + (gu0(i,k) - save_u(i,k)) * frain + dv3dt(i,k) = dv3dt(i,k) + (gv0(i,k) - save_v(i,k)) * frain + dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k) - save_t(i,k)) * frain enddo enddo if (qdiag3d) then @@ -148,7 +157,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl enddo endif endif - endif ! end if_lssav + endif diagtend ! if (cplchm) then do k=1,levs diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index 52538d3e8..f1312bfc6 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -33,6 +33,24 @@ type = logical intent = in optional = F +[gu0] + standard_name = x_wind_updated_by_physics + long_name = updated x-direction wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[gv0] + standard_name = y_wind_updated_by_physics + long_name = updated y-direction wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [gt0] standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics @@ -51,6 +69,22 @@ kind = kind_phys intent = in optional = F +[save_u] + standard_name = x_wind_save + long_name = x-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[save_v] + standard_name = y_wind_save + long_name = y-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in [save_t] standard_name = air_temperature_save long_name = air temperature before entering a physics scheme @@ -69,6 +103,13 @@ kind = kind_phys intent = inout optional = F +[flag_for_scnv_generic_tend] + standard_name = true_if_GFS_SCNV_generic_should_calculate_tendencies + long_name = true if GFS_SCNV_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -156,6 +197,24 @@ kind = kind_phys intent = in optional = F +[gu0] + standard_name = x_wind_updated_by_physics + long_name = updated x-direction wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[gv0] + standard_name = y_wind_updated_by_physics + long_name = updated y-direction wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [gt0] standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics @@ -174,6 +233,22 @@ kind = kind_phys intent = in optional = F +[save_u] + standard_name = x_wind_save + long_name = x-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[save_v] + standard_name = y_wind_save + long_name = y-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in [save_t] standard_name = air_temperature_save long_name = air temperature before entering a physics scheme @@ -201,6 +276,22 @@ kind = kind_phys intent = inout optional = F +[du3dt] + standard_name = cumulative_change_in_x_wind_due_to_shal_convection + long_name = cumulative change in x wind due to shallow convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt] + standard_name = cumulative_change_in_y_wind_due_to_shal_convection + long_name = cumulative change in y wind due to shallow convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout [dt3dt] standard_name = cumulative_change_in_temperature_due_to_shal_convection long_name = cumulative change in temperature due to shal conv. diff --git a/physics/model_tend_post.F90 b/physics/model_tend_post.F90 index 8ae7b6844..509c4a834 100644 --- a/physics/model_tend_post.F90 +++ b/physics/model_tend_post.F90 @@ -19,7 +19,6 @@ subroutine model_tend_post_run(kdt, & t_start,u_start,v_start,q_start, & t_end, u_end, v_end, q_end, & dt3dt_ccpp, du3dt_ccpp, dv3dt_ccpp, dq3dt_ccpp, & -! dt3dt_total, du3dt_total, dv3dt_total, dq3dt_total, & im, levs, ntrac, index_for_water_vapor, & lssav, ldiag3d, qdiag3d, errmsg,errflg) use machine, only: kind_phys @@ -32,8 +31,6 @@ subroutine model_tend_post_run(kdt, & real(kind=kind_phys), dimension(:,:), intent(inout) :: q_end real(kind=kind_phys), dimension(:,:), intent(inout) :: du3dt_ccpp, dv3dt_ccpp real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt_ccpp, dq3dt_ccpp - ! real(kind=kind_phys), dimension(:,:), intent(inout) :: du3dt_total, dv3dt_total - ! real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt_total, dq3dt_total integer, intent(in) :: im, levs, ntrac, kdt integer, intent(in) :: index_for_water_vapor @@ -50,6 +47,8 @@ subroutine model_tend_post_run(kdt, & errmsg = '' errflg = 0 + print *, 'in model_tend_post_run' + diag_enabled: if(lssav .and. ldiag3d) then if(any(gt0(1:im,1:levs)<1e-3)) then print *,'error: temperatures less than 1e-3' @@ -73,14 +72,6 @@ subroutine model_tend_post_run(kdt, & do k=1,levs do i=1,im - ! if(t_end(i,k)>1e-3 .and. gt0(i,k)>1e-3) then - ! dt3dt_total(i,k) = dt3dt_total(i,k) + gt0(i,k)-t_end(i,k) - ! du3dt_total(i,k) = du3dt_total(i,k) + gu0(i,k)-u_end(i,k) - ! dv3dt_total(i,k) = dv3dt_total(i,k) + gv0(i,k)-v_end(i,k) - ! if(qdiag3d) then - ! dq3dt_total(i,k) = dq3dt_total(i,k) + gq0_water_vapor(i,k)-q_end(i,k) - ! endif - ! endif t_end(i,k) = gt0(i,k) u_end(i,k) = gu0(i,k) v_end(i,k) = gv0(i,k) diff --git a/physics/model_tend_pre.F90 b/physics/model_tend_pre.F90 index 94ad2ee1a..e3a9db943 100644 --- a/physics/model_tend_pre.F90 +++ b/physics/model_tend_pre.F90 @@ -50,6 +50,8 @@ subroutine model_tend_pre_run(dtp, kdt, & errmsg = '' errflg = 0 + print *,'in model_tend_pre_run' + if(Lssav .and. ldiag3d) then do k=1,levs do i=1,im diff --git a/physics/moninedmf.f b/physics/moninedmf.f index d3fd9e45e..bfe8d512f 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -1068,7 +1068,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. & & flag_for_pbl_generic_tend) then - is = (ntoz-1) * km + kk = ntoz + is = (kk-1) * km do k = 1, km do i = 1, im qtend = (a2(i,k+is)-q1(i,k,kk))*rdt diff --git a/physics/total_tend.F90 b/physics/total_tend.F90 index c7c5dfe28..7950c6b90 100644 --- a/physics/total_tend.F90 +++ b/physics/total_tend.F90 @@ -49,8 +49,10 @@ subroutine total_tend_run(dtp, kdt, & good=0 + print *,'entered total_tend_run' + if(Lssav .and. ldiag3d) then - print *,'total_tend_run' + print *,'if = TRUE in total_tend_run' do k=1,levs do i=1,im if(t_start(i,k)>1e-3 .and. tgrs(i,k)>1e-3) then diff --git a/physics/total_tend.meta b/physics/total_tend.meta index a64fd872b..873bc1c61 100644 --- a/physics/total_tend.meta +++ b/physics/total_tend.meta @@ -1,15 +1,15 @@ [ccpp-arg-table] - name = total_tend_pre_init + name = total_tend_init type = scheme ######################################################################## [ccpp-arg-table] - name = total_tend_pre_finalize + name = total_tend_finalize type = scheme ######################################################################## [ccpp-arg-table] - name = total_tend_pre_run + name = total_tend_run type = scheme [dtp] standard_name = time_step_for_physics @@ -60,14 +60,6 @@ type = real kind = kind_phys intent = in -[t_start] - standard_name = temperature_at_start_of_ccpp - long_name = temperature at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out [t_start] standard_name = temperature_at_total_check_point long_name = temperature when model total is calculated in ccpp From 4261b1554689bd5faad1370ef3f2ebf670dfb916 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Fri, 14 Feb 2020 19:31:17 +0000 Subject: [PATCH 044/404] QC, Qi and NWFA are not needed in the parameters list as they come into this subroutine as the qgrs entries. Results before/after this change are identical. --- physics/GFS_rrtmg_pre.F90 | 75 ++++++++++++++++---------------------- physics/GFS_rrtmg_pre.meta | 27 -------------- 2 files changed, 31 insertions(+), 71 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 351862cf5..b5055757c 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -20,7 +20,7 @@ end subroutine GFS_rrtmg_pre_init ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd, Cldprop, Coupling, & - Radtend, qc, qi, nwfa, & ! input/output + Radtend, & ! input/output imfdeepcnv, imfdeepcnv_gf, & f_ice, f_rain, f_rimef, flgmin, cwm, & ! F-A mp scheme only lm, im, lmk, lmp, & ! input @@ -87,11 +87,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: qc - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: qi - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: nwfa - - integer, intent(in) :: im, lm, lmk, lmp integer, intent(in) :: imfdeepcnv, imfdeepcnv_gf integer, intent(out) :: kd, kt, kb @@ -154,7 +149,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer, intent(out) :: errflg ! Local variables - integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl, ncndl, ntlnc, ntinc + integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl, ncndl, ntlnc, ntinc, ntwa integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb @@ -170,7 +165,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! for Thompson MP real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & re_cloud, re_ice, re_snow, qv_mp, qc_mp, & - qi_mp, qs_mp, nc_mp, ni_mp + qi_mp, qs_mp, nc_mp, ni_mp, nwfa real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db ! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz @@ -205,6 +200,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ntrw = Model%ntrw ntsw = Model%ntsw ntgl = Model%ntgl + ntwa = Model%ntwa ncndl = min(Model%ncnd,4) LP1 = LM + 1 ! num of in/out levels @@ -297,15 +293,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) enddo enddo - if ((Model%do_mynnedmf.or. (imfdeepcnv == imfdeepcnv_gf)) .and. Model%kdt > 1) then - ! for MYNN PBL and GF convective include subgrid clouds into tracer1 - do k = 1, LM - k1 = k + kd - k2 = k + lsk - tracer1(:,k1,ntcw) = max(0.0, qc(:,k2)) - tracer1(:,k1,ntiw) = max(0.0, qi(:,k2)) - enddo - endif ! if (ivflip == 0) then ! input data from toa to sfc do i = 1, IM @@ -595,6 +582,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input qs_mp (i,k) = tracer1(i,k,ntsw)/(1.-qvs) nc_mp (i,k) = tracer1(i,k,ntlnc)/(1.-qvs) ni_mp (i,k) = tracer1(i,k,ntinc)/(1.-qvs) + nwfa (i,k) = tracer1(i,k,ntwa) endif enddo enddo @@ -731,7 +719,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif end do end do - ! Call Thompson's subroutine to compoute effective radii + ! Call Thompson's subroutine to compute effective radii do i = 1, im call calc_effectRad (tlyr(i,:), plyr(i,:), qv_mp(i,:), qc_mp(i,:), & nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & @@ -747,32 +735,31 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input re_snow(i,k) = MAX(9.99, MIN(re_snow(i,k)*1.e6, 999.)) end do end do - if(1==2) then - write(0,'(a,3e16.7)') " before progclduni: re_cloud min/mean/max =", & - minval(re_cloud), & - sum(re_cloud)/real(size(re_cloud)), & - maxval(re_cloud) - write(0,'(a,3e16.7)') " before progclduni: re_ice min/mean/max =", & - minval(re_ice), & - sum(re_ice)/real(size(re_ice)), & - maxval(re_ice) - write(0,'(a,3e16.7)') " before progclduni: clouds3 min/mean/max =", & - minval(clouds3), & - sum(clouds3)/real(size(clouds3)), & - maxval(clouds3) - write(0,'(a,3e16.7)') " before progclduni: clouds5 min/mean/max =", & - minval(clouds5), & - sum(clouds5)/real(size(clouds5)), & - maxval(clouds5) - write(0,'(a,3e16.7)') " before progcld5: phy_f3d cl min/mean/max =", & - minval(Tbd%phy_f3d(:,:,Model%nleffr)), & - sum(Tbd%phy_f3d(:,:,Model%nleffr))/real(size(Tbd%phy_f3d(:,:,Model%nleffr))), & - maxval(Tbd%phy_f3d(:,:,Model%nleffr)) - write(0,'(a,3e16.7)')" before progcld5: phy_f3d ice min/mean/max =", & - minval(Tbd%phy_f3d(:,:,Model%nieffr)), & - sum(Tbd%phy_f3d(:,:,Model%nieffr))/real(size(Tbd%phy_f3d(:,:,Model%nieffr))), & - maxval(Tbd%phy_f3d(:,:,Model%nieffr)) - endif + + !write(0,'(a,3e16.7)') " before progclduni: re_cloud min/mean/max =", & + ! minval(re_cloud), & + ! sum(re_cloud)/real(size(re_cloud)), & + ! maxval(re_cloud) + !write(0,'(a,3e16.7)') " before progclduni: re_ice min/mean/max =", & + ! minval(re_ice), & + ! sum(re_ice)/real(size(re_ice)), & + ! maxval(re_ice) + !write(0,'(a,3e16.7)') " before progclduni: clouds3 min/mean/max =", & + ! minval(clouds3), & + ! sum(clouds3)/real(size(clouds3)), & + ! maxval(clouds3) + !write(0,'(a,3e16.7)') " before progclduni: clouds5 min/mean/max =", & + ! minval(clouds5), & + ! sum(clouds5)/real(size(clouds5)), & + ! maxval(clouds5) + !write(0,'(a,3e16.7)') " before progcld5: phy_f3d cl min/mean/max =", & + ! minval(Tbd%phy_f3d(:,:,Model%nleffr)), & + ! sum(Tbd%phy_f3d(:,:,Model%nleffr))/real(size(Tbd%phy_f3d(:,:,Model%nleffr))), & + ! maxval(Tbd%phy_f3d(:,:,Model%nleffr)) + !write(0,'(a,3e16.7)')" before progcld5: phy_f3d ice min/mean/max =", & + ! minval(Tbd%phy_f3d(:,:,Model%nieffr)), & + ! sum(Tbd%phy_f3d(:,:,Model%nieffr))/real(size(Tbd%phy_f3d(:,:,Model%nieffr))), & + ! maxval(Tbd%phy_f3d(:,:,Model%nieffr)) do k=1,lm k1 = k + kd diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 9a46ae3d9..901015f04 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -270,33 +270,6 @@ kind = kind_phys intent = out optional = F -[qc] - standard_name = cloud_condensed_water_mixing_ratio - long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qi] - standard_name = ice_water_mixing_ratio - long_name = moist (dry+vapor, no condensates) mixing ratio of ice water - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[nwfa] - standard_name = water_friendly_aerosol_number_concentration - long_name = number concentration of water-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T [imfdeepcnv] standard_name = flag_for_mass_flux_deep_convection_scheme long_name = flag for mass-flux deep convection scheme From cebdfa40bdd3059e689fd579c9fba2c689d33f2f Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 17 Feb 2020 09:47:43 -0700 Subject: [PATCH 045/404] Minor cleanup of physics/GFS_suite_interstitial.F90 --- physics/GFS_suite_interstitial.F90 | 40 +++--------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 1e3035cbf..db3966cee 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -514,33 +514,6 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & errmsg = '' errflg = 0 - !GF* The following section (initializing convective variables) is already executed in GFS_typedefs%interstitial_phys_reset - ! do k=1,levs - ! do i=1,im - ! clw(i,k,1) = 0.0 - ! clw(i,k,2) = -999.9 - ! enddo - ! enddo - ! if (Model%imfdeepcnv >= 0 .or. Model%imfshalcnv > 0 .or. & - ! (Model%npdf3d == 3 .and. Model%num_p3d == 4) .or. & - ! (Model%npdf3d == 0 .and. Model%ncnvcld3d == 1) ) then - ! do k=1,levs - ! do i=1,im - ! cnvc(i,k) = 0.0 - ! cnvw(i,k) = 0.0 - ! enddo - ! enddo - ! endif - ! if(imp_physics == 8) then - ! if(Model%ltaerosol) then - ! ice00 (:,:) = 0.0 - ! liq0 (:,:) = 0.0 - ! else - ! ice00 (:,:) = 0.0 - ! endif - ! endif - !*GF - if (cscnv .or. satmedmf .or. trans_trac ) then tracers = 2 do n=2,ntrac @@ -598,6 +571,8 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & enddo enddo endif + else + rhc(:,:) = 1.0 endif if (imp_physics == imp_physics_zhao_carr .or. imp_physics == imp_physics_zhao_carr_pdf) then ! zhao-carr microphysics @@ -628,7 +603,6 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & else save_qi(:,:) = clw(:,:,1) endif - elseif (imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_mg .or. imp_physics == imp_physics_fer_hires) then do k=1,levs do i=1,im @@ -636,15 +610,7 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & clw(i,k,2) = gq0(i,k,ntcw) ! water enddo enddo - else ! if_ntcw - !GF* never executed unless imp_physics = imp_physics_zhao_carr or imp_physics_zhao_carr_pdf - ! do i=1,im - ! psautco_l(i) = Model%psautco(1)*work1(i) + Model%psautco(2)*work2(i) - ! prautco_l(i) = Model%prautco(1)*work1(i) + Model%prautco(2)*work2(i) - ! enddo - !*GF - rhc(:,:) = 1.0 - endif ! end if_ntcw + endif end subroutine GFS_suite_interstitial_3_run From 3a852e8a3cd016571a5b08ddffda28585b2347f9 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 21 Feb 2020 08:12:13 -0700 Subject: [PATCH 046/404] physics/GFS_PBL_generic.F90: add missing tracers to vertical diffusion array for Thompson MP --- physics/GFS_PBL_generic.F90 | 40 ++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 7e28d2cec..e157013ec 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -150,12 +150,13 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,3) = qgrs(i,k,ntiw) vdftra(i,k,4) = qgrs(i,k,ntrw) vdftra(i,k,5) = qgrs(i,k,ntsw) - vdftra(i,k,6) = qgrs(i,k,ntlnc) - vdftra(i,k,7) = qgrs(i,k,ntinc) - vdftra(i,k,8) = qgrs(i,k,ntrnc) - vdftra(i,k,9) = qgrs(i,k,ntoz) - vdftra(i,k,10) = qgrs(i,k,ntwa) - vdftra(i,k,11) = qgrs(i,k,ntia) + vdftra(i,k,6) = qgrs(i,k,ntgl) + vdftra(i,k,7) = qgrs(i,k,ntlnc) + vdftra(i,k,8) = qgrs(i,k,ntinc) + vdftra(i,k,9) = qgrs(i,k,ntrnc) + vdftra(i,k,10) = qgrs(i,k,ntoz) + vdftra(i,k,11) = qgrs(i,k,ntwa) + vdftra(i,k,12) = qgrs(i,k,ntia) enddo enddo else @@ -166,9 +167,10 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, vdftra(i,k,3) = qgrs(i,k,ntiw) vdftra(i,k,4) = qgrs(i,k,ntrw) vdftra(i,k,5) = qgrs(i,k,ntsw) - vdftra(i,k,6) = qgrs(i,k,ntinc) - vdftra(i,k,7) = qgrs(i,k,ntrnc) - vdftra(i,k,8) = qgrs(i,k,ntoz) + vdftra(i,k,6) = qgrs(i,k,ntgl) + vdftra(i,k,7) = qgrs(i,k,ntinc) + vdftra(i,k,8) = qgrs(i,k,ntrnc) + vdftra(i,k,9) = qgrs(i,k,ntoz) enddo enddo endif @@ -406,12 +408,13 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dqdt(i,k,ntiw) = dvdftra(i,k,3) dqdt(i,k,ntrw) = dvdftra(i,k,4) dqdt(i,k,ntsw) = dvdftra(i,k,5) - dqdt(i,k,ntlnc) = dvdftra(i,k,6) - dqdt(i,k,ntinc) = dvdftra(i,k,7) - dqdt(i,k,ntrnc) = dvdftra(i,k,8) - dqdt(i,k,ntoz) = dvdftra(i,k,9) - dqdt(i,k,ntwa) = dvdftra(i,k,10) - dqdt(i,k,ntia) = dvdftra(i,k,11) + dqdt(i,k,ntgl) = dvdftra(i,k,6) + dqdt(i,k,ntlnc) = dvdftra(i,k,7) + dqdt(i,k,ntinc) = dvdftra(i,k,8) + dqdt(i,k,ntrnc) = dvdftra(i,k,9) + dqdt(i,k,ntoz) = dvdftra(i,k,10) + dqdt(i,k,ntwa) = dvdftra(i,k,11) + dqdt(i,k,ntia) = dvdftra(i,k,12) enddo enddo else @@ -422,9 +425,10 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dqdt(i,k,ntiw) = dvdftra(i,k,3) dqdt(i,k,ntrw) = dvdftra(i,k,4) dqdt(i,k,ntsw) = dvdftra(i,k,5) - dqdt(i,k,ntinc) = dvdftra(i,k,6) - dqdt(i,k,ntrnc) = dvdftra(i,k,7) - dqdt(i,k,ntoz) = dvdftra(i,k,8) + dqdt(i,k,ntgl) = dvdftra(i,k,6) + dqdt(i,k,ntinc) = dvdftra(i,k,7) + dqdt(i,k,ntrnc) = dvdftra(i,k,8) + dqdt(i,k,ntoz) = dvdftra(i,k,9) enddo enddo endif From 762f7f4e162814232f6d747530149574b919b3c3 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 28 Feb 2020 16:34:11 +0000 Subject: [PATCH 047/404] Update to MYNN Surface Layer Scheme and related modules - part I --- physics/GFS_debug.F90 | 2 +- physics/module_MYNNSFC_wrapper.F90 | 152 +++++++++++++--------------- physics/module_MYNNSFC_wrapper.meta | 21 ++-- physics/module_sf_mynn.F90 | 67 +++++++----- 4 files changed, 125 insertions(+), 117 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index df56cc069..486ee604e 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -225,6 +225,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Tbd%acv' , Tbd%acv) call print_var(mpirank,omprank, blkno, 'Tbd%acvb' , Tbd%acvb) call print_var(mpirank,omprank, blkno, 'Tbd%acvt' , Tbd%acvt) + call print_var(mpirank,omprank, blkno, 'Tbd%hpbl' , Tbd%hpbl) if (Model%do_sppt) then call print_var(mpirank,omprank, blkno, 'Tbd%dtdtr' , Tbd%dtdtr) call print_var(mpirank,omprank, blkno, 'Tbd%dtotprcp' , Tbd%dtotprcp) @@ -294,7 +295,6 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Diag%dpt2m ', Diag%dpt2m) call print_var(mpirank,omprank, blkno, 'Diag%zlvl ', Diag%zlvl) call print_var(mpirank,omprank, blkno, 'Diag%psurf ', Diag%psurf) - call print_var(mpirank,omprank, blkno, 'Diag%hpbl ', Diag%hpbl) call print_var(mpirank,omprank, blkno, 'Diag%pwat ', Diag%pwat) call print_var(mpirank,omprank, blkno, 'Diag%t1 ', Diag%t1) call print_var(mpirank,omprank, blkno, 'Diag%q1 ', Diag%q1) diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index dee855ff7..951d7e7c8 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -27,7 +27,8 @@ end subroutine mynnsfc_wrapper_finalize !###=================================================================== SUBROUTINE mynnsfc_wrapper_run( & & ix,im,levs, & - & iter,flag_init,flag_restart, & + & itimestep,iter, & + & flag_init,flag_restart, & & delt,dx, & & u, v, t3d, qvsh, qc, prsl, phii, & & exner, ps, PBLH, slmsk, & @@ -47,7 +48,7 @@ SUBROUTINE mynnsfc_wrapper_run( & & fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) & fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) & QSFC, USTM, ZOL, MOL, RMOL, & - & WSPD, ch, HFLX, evap, QFX, LH, & + & WSPD, ch, HFLX, QFLX, LH, & & FLHC, FLQC, & & U10, V10, TH2, T2, Q2, & & wstar, CHS2, CQS2, & @@ -111,14 +112,14 @@ SUBROUTINE mynnsfc_wrapper_run( & & IMS,IME,JMS,JME,KMS,KME, & & ITS,ITE,JTS,JTE,KTS,KTE - real(kind=kind_phys), dimension(im,levs+1) :: phii - real(kind=kind_phys), dimension(im,levs) :: & - & exner, PRSL, & - & u, v, t3d, qvsh, qc + real(kind=kind_phys), dimension(im,levs+1), & + & intent(in) :: phii + real(kind=kind_phys), dimension(im,levs), & + & intent(in) :: exner, PRSL, & + & u, v, t3d, qvsh, qc real(kind=kind_phys), dimension(im,levs) :: & - & dz, th, qv, & - & pattern_spp_pbl + & pattern_spp_pbl, dz, th, qv logical, dimension(im), intent(in) :: wet, dry, icy @@ -141,9 +142,11 @@ SUBROUTINE mynnsfc_wrapper_run( & & qsfc_ocn, qsfc_lnd, qsfc_ice !MYNN-2D - real(kind=kind_phys), dimension(im) :: & - & dx, pblh, slmsk, evap, qsfc, ps, & - & ustm, hflx, qfx, wspd, & + real(kind=kind_phys), dimension(im), intent(in) :: & + & dx, pblh, slmsk, ps + + real(kind=kind_phys), dimension(im), intent(inout) :: & + & ustm, hflx, qflx, wspd, qsfc, & & FLHC, FLQC, U10, V10, TH2, T2, Q2, & & CHS2, CQS2, rmol, zol, mol, ch, & & lh, wstar @@ -151,7 +154,7 @@ SUBROUTINE mynnsfc_wrapper_run( & real, dimension(im) :: & & hfx, znt, ts, psim, psih, & & chs, ck, cd, mavail, xland, GZ1OZ0, & - & cpm, qgh + & cpm, qgh, qfx ! Initialize CCPP error handling variables errmsg = '' @@ -165,19 +168,8 @@ SUBROUTINE mynnsfc_wrapper_run( & ! write(0,*)"iter=",iter ! endif - ! If initialization is needed and mynnsfc_wrapper is called - ! in a subcycling loop, then test for (flag_init==.T. .and. iter==1); - ! initialization in sfclay_mynn is triggered by itimestep == 1 - ! DH* TODO: Use flag_restart to distinguish which fields need - ! to be initialized and which are read from restart files - if (flag_init.and.iter==1) then - itimestep = 1 - else - itimestep = 2 - endif - !prep MYNN-only variables - do k=1,levs + do k=1,2 !levs do i=1,im dz(i,k)=(phii(i,k+1) - phii(i,k))*g_inv th(i,k)=t3d(i,k)/exner(i,k) @@ -202,33 +194,33 @@ SUBROUTINE mynnsfc_wrapper_run( & cpm(i)=cp enddo - if (lprnt) then - write(0,*)"CALLING SFCLAY_mynn; input:" - write(0,*)"T:",t3d(1,1),t3d(1,2),t3d(1,3) - write(0,*)"TH:",th(1,1),th(1,2),th(1,3) - write(0,*)"u:",u(1,1:3) - write(0,*)"v:",v(1,1:3) - !write(0,*)"qv:",qv(1,1:3,1) - write(0,*)"p:",prsl(1,1) - write(0,*)"dz:",dz(1,1)," qsfc=",qsfc(1)," rmol:",rmol(1) - write(0,*)" land water ice" - write(0,*)dry(1),wet(1),icy(1) - write(0,*)"ust:",ust_lnd(1),ust_ocn(1),ust_ice(1) - write(0,*)"Tsk:",tskin_lnd(1),tskin_ocn(1),tskin_ice(1) - write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_ocn(1),tsurf_ice(1) - write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_ocn(1),qsfc_ice(1) - write(0,*)"sno:",snowh_lnd(1),snowh_ocn(1),snowh_ice(1) - write(0,*)"znt:",znt_lnd(1),znt_ocn(1),znt_ice(1) - !write(0,*)"HFX:",hfx(1)," qfx",qfx(1) - write(0,*)"qsfc:",qsfc(1)," ps:",ps(1) - write(0,*)"wspd:",wspd(1),"rb=",rb_ocn(1) - write(0,*)"delt=",delt," im=",im," levs=",levs - write(0,*)"flag_init=",flag_init - write(0,*)"flag_restart=",flag_restart - write(0,*)"iter=",iter - write(0,*)"zlvl(1)=",dz(1,1)*0.5 - write(0,*)"PBLH=",pblh(1)," xland=",xland(1) - endif +! if (lprnt) then +! write(0,*)"CALLING SFCLAY_mynn; input:" +! write(0,*)"T:",t3d(1,1),t3d(1,2),t3d(1,3) +! write(0,*)"TH:",th(1,1),th(1,2),th(1,3) +! write(0,*)"u:",u(1,1:3) +! write(0,*)"v:",v(1,1:3) +! !write(0,*)"qv:",qv(1,1:3,1) +! write(0,*)"p:",prsl(1,1) +! write(0,*)"dz:",dz(1,1)," qsfc=",qsfc(1)," rmol:",rmol(1) +! write(0,*)" land water ice" +! write(0,*)dry(1),wet(1),icy(1) +! write(0,*)"ust:",ust_lnd(1),ust_ocn(1),ust_ice(1) +! write(0,*)"Tsk:",tskin_lnd(1),tskin_ocn(1),tskin_ice(1) +! write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_ocn(1),tsurf_ice(1) +! write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_ocn(1),qsfc_ice(1) +! write(0,*)"sno:",snowh_lnd(1),snowh_ocn(1),snowh_ice(1) +! write(0,*)"znt:",znt_lnd(1),znt_ocn(1),znt_ice(1) +! !write(0,*)"HFX:",hfx(1)," qfx",qfx(1) +! write(0,*)"qsfc:",qsfc(1)," ps:",ps(1) +! write(0,*)"wspd:",wspd(1),"rb=",rb_ocn(1) +! write(0,*)"delt=",delt," im=",im," levs=",levs +! write(0,*)"flag_init=",flag_init +! write(0,*)"flag_restart=",flag_restart +! write(0,*)"iter=",iter +! write(0,*)"zlvl(1)=",dz(1,1)*0.5 +! write(0,*)"PBLH=",pblh(1)," xland=",xland(1) +! endif CALL SFCLAY_mynn( & @@ -239,7 +231,7 @@ SUBROUTINE mynnsfc_wrapper_run( & SVP1=svp1,SVP2=svp2,SVP3=svp3,SVPT0=svpt0, & EP1=ep_1,EP2=ep_2,KARMAN=karman, & ISFFLX=isfflx,isftcflx=isftcflx, & - iz0tlnd=iz0tlnd,itimestep=itimestep, & + iz0tlnd=iz0tlnd,itimestep=itimestep,iter=iter, & wet=wet, dry=dry, icy=icy, & !intent(in) tskin_ocn=tskin_ocn, tskin_lnd=tskin_lnd, tskin_ice=tskin_ice, & !intent(in) tsurf_ocn=tsurf_ocn, tsurf_lnd=tsurf_lnd, tsurf_ice=tsurf_ice, & !intent(in) @@ -258,7 +250,7 @@ SUBROUTINE mynnsfc_wrapper_run( & ch=ch,CHS=chs,CHS2=chs2,CQS2=cqs2,CPM=cpm, & ZNT=znt,USTM=ustm,ZOL=zol,MOL=mol,RMOL=rmol, & psim=psim,psih=psih, & - HFLX=hflx,HFX=hfx,QFX=qfx,LH=lh,FLHC=flhc,FLQC=flqc, & + HFLX=hflx,HFX=hfx,QFLX=qflx,QFX=qfx,LH=lh,FLHC=flhc,FLQC=flqc, & QGH=qgh,QSFC=qsfc, & U10=u10,V10=v10,TH2=th2,T2=t2,Q2=q2, & GZ1OZ0=GZ1OZ0,WSPD=wspd,wstar=wstar, & @@ -277,38 +269,40 @@ SUBROUTINE mynnsfc_wrapper_run( & !* hflx(i)=hfx(i)/(rho(i,1)*cp) - now calculated inside module_sf_mynn.F90 !* Taken from sfc_nst.f !* evap(i) = elocp * rch(i) * (qss(i) - q0(i)) !kg kg-1 m s-1 - evap(i)=QFX(i) + !NOTE: evap & qflx will be solved for later + !qflx(i)=QFX(i)/ + !evap(i)=QFX(i) !or /rho ?? znt_lnd(i)=znt_lnd(i)*100. !m -> cm znt_ocn(i)=znt_ocn(i)*100. znt_ice(i)=znt_ice(i)*100. enddo - if (lprnt) then - write(0,*) - write(0,*)"finished with mynn_surface layer; output:" - write(0,*)" land water ice" - write(0,*)dry(1),wet(1),icy(1) - write(0,*)"ust:",ust_lnd(1),ust_ocn(1),ust_ice(1) - write(0,*)"Tsk:",tskin_lnd(1),tskin_ocn(1),tskin_ice(1) - write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_ocn(1),tsurf_ice(1) - write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_ocn(1),qsfc_ice(1) - write(0,*)"sno:",snowh_lnd(1),snowh_ocn(1),snowh_ice(1) - write(0,*)"znt (cm):",znt_lnd(1),znt_ocn(1),znt_ice(1) - write(0,*)"cm:",cm_lnd(1),cm_ocn(1),cm_ice(1) - write(0,*)"ch:",ch_lnd(1),ch_ocn(1),ch_ice(1) - write(0,*)"fm:",fm_lnd(1),fm_ocn(1),fm_ice(1) - write(0,*)"fh:",fh_lnd(1),fh_ocn(1),fh_ice(1) - write(0,*)"rb:",rb_lnd(1),rb_ocn(1),rb_ice(1) - write(0,*)"xland=",xland(1)," wstar:",wstar(1) - write(0,*)"HFX:",hfx(1)," qfx:",qfx(1) - write(0,*)"HFLX:",hflx(1)," evap:",evap(1) - write(0,*)"qsfc:",qsfc(1)," ps:",ps(1)," wspd:",wspd(1) - write(0,*)"ZOL:",ZOL(1)," rmol=",rmol(1) - write(0,*)"psim:",psim(1)," psih=",psih(1)," pblh:",pblh(1) - write(0,*)"FLHC=",FLHC(1)," CHS=",CHS(1) - write(0,*) - endif +! if (lprnt) then +! write(0,*) +! write(0,*)"finished with mynn_surface layer; output:" +! write(0,*)" land water ice" +! write(0,*)dry(1),wet(1),icy(1) +! write(0,*)"ust:",ust_lnd(1),ust_ocn(1),ust_ice(1) +! write(0,*)"Tsk:",tskin_lnd(1),tskin_ocn(1),tskin_ice(1) +! write(0,*)"Tsurf:",tsurf_lnd(1),tsurf_ocn(1),tsurf_ice(1) +! write(0,*)"Qsfc:",qsfc_lnd(1),qsfc_ocn(1),qsfc_ice(1) +! write(0,*)"sno:",snowh_lnd(1),snowh_ocn(1),snowh_ice(1) +! write(0,*)"znt (cm):",znt_lnd(1),znt_ocn(1),znt_ice(1) +! write(0,*)"cm:",cm_lnd(1),cm_ocn(1),cm_ice(1) +! write(0,*)"ch:",ch_lnd(1),ch_ocn(1),ch_ice(1) +! write(0,*)"fm:",fm_lnd(1),fm_ocn(1),fm_ice(1) +! write(0,*)"fh:",fh_lnd(1),fh_ocn(1),fh_ice(1) +! write(0,*)"rb:",rb_lnd(1),rb_ocn(1),rb_ice(1) +! write(0,*)"xland=",xland(1)," wstar:",wstar(1) +! write(0,*)"HFX:",hfx(1)," qfx:",qfx(1) +! write(0,*)"HFLX:",hflx(1)," evap:",evap(1) +! write(0,*)"qsfc:",qsfc(1)," ps:",ps(1)," wspd:",wspd(1) +! write(0,*)"ZOL:",ZOL(1)," rmol=",rmol(1) +! write(0,*)"psim:",psim(1)," psih=",psih(1)," pblh:",pblh(1) +! write(0,*)"FLHC=",FLHC(1)," CHS=",CHS(1) +! write(0,*) +! endif END SUBROUTINE mynnsfc_wrapper_run diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index cf481ddbf..0a988f575 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -25,6 +25,14 @@ type = integer intent = in optional = F +[itimestep] + standard_name = index_of_time_step + long_name = current number of time steps + units = index + dimensions = () + type = integer + intent = in + optional = F [iter] standard_name = ccpp_loop_counter long_name = loop counter for subcycling loops in CCPP @@ -575,7 +583,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F [ustm] standard_name = surface_friction_velocity_drag @@ -640,16 +648,7 @@ kind = kind_phys intent = inout optional = F -[evap] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[QFX] +[qflx] standard_name = kinematic_surface_upward_latent_heat_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index e2cd7f70c..788ff0ace 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -137,7 +137,7 @@ SUBROUTINE SFCLAY_mynn( & PSFCPA,PBLH,MAVAIL,XLAND,DX, & !in CP,G,ROVCP,R,XLV, & !in SVP1,SVP2,SVP3,SVPT0,EP1,EP2,KARMAN, & !in - ISFFLX,isftcflx,iz0tlnd,itimestep, & !in + ISFFLX,isftcflx,iz0tlnd,itimestep,iter,& !in wet, dry, icy, & !intent(in) tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) @@ -156,7 +156,7 @@ SUBROUTINE SFCLAY_mynn( & CH,CHS,CHS2,CQS2,CPM, & ZNT,USTM,ZOL,MOL,RMOL, & PSIM,PSIH, & - HFLX,HFX,QFX,LH,FLHC,FLQC, & + HFLX,HFX,QFLX,QFX,LH,FLHC,FLQC, & QGH,QSFC, & U10,V10,TH2,T2,Q2, & GZ1OZ0,WSPD,WSTAR, & @@ -194,8 +194,11 @@ SUBROUTINE SFCLAY_mynn( & !-- PSIH similarity stability function for heat !-- XLAND land mask (1 for land, 2 for water) !-- HFX upward heat flux at the surface (W/m^2) +! HFX = HFLX * rho * cp !-- HFLX upward temperature flux at the surface (K m s^-1) !-- QFX upward moisture flux at the surface (kg/m^2/s) +! QFX = QFLX * rho +!-- QFLX upward moisture flux at the surface (kg kg-1 m s-1) !-- LH net upward latent heat flux at surface (W/m^2) !-- TSK surface temperature (K) !-- FLHC exchange coefficient for heat (W/m^2/K) @@ -260,7 +263,7 @@ SUBROUTINE SFCLAY_mynn( & INTEGER, INTENT(IN) :: ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & its,ite, jts,jte, kts,kte - INTEGER, INTENT(IN) :: itimestep + INTEGER, INTENT(IN) :: itimestep,iter REAL, INTENT(IN) :: SVP1,SVP2,SVP3,SVPT0 REAL, INTENT(IN) :: EP1,EP2,KARMAN REAL, INTENT(IN) :: CP,G,ROVCP,R,XLV !,DX @@ -300,7 +303,7 @@ SUBROUTINE SFCLAY_mynn( & REAL, DIMENSION( ims:ime, jms:jme ) , & INTENT(INOUT) :: HFLX,HFX, & - QFX, & + QFLX,QFX, & LH, & MOL,RMOL, & QSFC, QGH, & @@ -391,7 +394,7 @@ SUBROUTINE SFCLAY_mynn( & endif ENDDO - IF (itimestep==1) THEN + IF (itimestep==1 .AND. iter==1) THEN DO i=its,ite !Everything here is used before calculated UST_OCN(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) @@ -412,7 +415,7 @@ SUBROUTINE SFCLAY_mynn( & XLAND(ims,j),DX(ims,j), & CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & EP1,EP2,KARMAN, & - ISFFLX,isftcflx,iz0tlnd,itimestep, & + ISFFLX,isftcflx,iz0tlnd,itimestep,iter, & wet, dry, icy, & !intent(in) tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) @@ -433,8 +436,8 @@ SUBROUTINE SFCLAY_mynn( & ZNT(ims,j),USTM(ims,j),ZOL(ims,j), & MOL(ims,j),RMOL(ims,j), & PSIM(ims,j),PSIH(ims,j), & - HFLX(ims,j),HFX(ims,j),QFX(ims,j),LH(ims,j), & - FLHC(ims,j),FLQC(ims,j), & + HFLX(ims,j),HFX(ims,j),QFLX(ims,j),QFX(ims,j), & + LH(ims,j),FLHC(ims,j),FLQC(ims,j), & QGH(ims,j),QSFC(ims,j), & U10(ims,j),V10(ims,j),TH2(ims,j),T2(ims,j),Q2(ims,j),& GZ1OZ0(ims,j),WSPD(ims,j),wstar(ims,j), & @@ -456,7 +459,7 @@ SUBROUTINE SFCLAY1D_mynn( & PSFCPA,PBLH,MAVAIL,XLAND,DX, & CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & EP1,EP2,KARMAN, & - ISFFLX,isftcflx,iz0tlnd,itimestep, & + ISFFLX,isftcflx,iz0tlnd,itimestep,iter, & wet, dry, icy, & !intent(in) tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) @@ -475,7 +478,7 @@ SUBROUTINE SFCLAY1D_mynn( & ch,CHS,CHS2,CQS2,CPM, & ZNT,USTM,ZOL,MOL,RMOL, & PSIM,PSIH, & - HFLX,HFX,QFX,LH,FLHC,FLQC, & + HFLX,HFX,QFLX,QFX,LH,FLHC,FLQC, & QGH,QSFC, & U10,V10,TH2,T2,Q2, & GZ1OZ0,WSPD,wstar, & @@ -493,7 +496,7 @@ SUBROUTINE SFCLAY1D_mynn( & INTEGER, INTENT(IN) :: ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & its,ite, jts,jte, kts,kte, & - J, itimestep + J, itimestep, iter REAL, PARAMETER :: XKA=2.4E-5 !molecular diffusivity REAL, PARAMETER :: PRT=1. !prandlt number @@ -524,7 +527,7 @@ SUBROUTINE SFCLAY1D_mynn( & dz2w1d REAL, DIMENSION( ims:ime ), INTENT(INOUT) :: HFLX,HFX, & - QFX,LH, & + QFLX,QFX,LH, & MOL,RMOL, & QGH,QSFC, & ZNT, & @@ -618,10 +621,10 @@ SUBROUTINE SFCLAY1D_mynn( & !------------------------------------------------------------------- IF (debug_code >= 1) THEN - write(*,*)"ITIMESTEP=",ITIMESTEP + write(*,*)"ITIMESTEP=",ITIMESTEP," iter=",iter DO I=its,ite write(*,*)"=== input to mynnsfclayer, i:", i - write(*,*)" land, ice, water" + !write(*,*)" land, ice, water" write(*,*)"dry=",dry(i)," icy=",icy(i)," wet=",wet(i) write(*,*)"tsk=", tskin_lnd(i),tskin_ice(i),tskin_ocn(i) write(*,*)"tsurf=", tsurf_lnd(i),tsurf_ice(i),tsurf_ocn(i) @@ -629,7 +632,9 @@ SUBROUTINE SFCLAY1D_mynn( & write(*,*)"znt=", znt_lnd(i),znt_ice(i),znt_ocn(i) write(*,*)"ust=", ust_lnd(i),ust_ice(i),ust_ocn(i) write(*,*)"snowh=", snowh_lnd(i),snowh_ice(i),snowh_ocn(i) - write(*,*)" psfcpa=",PSFCPA(i)," dz=",dz8w1d(i) + write(*,*)"psfcpa=",PSFCPA(i)," dz=",dz8w1d(i) + write(*,'(A5,F0.8,A6,F0.6,A6,F5.0)') & + "qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDDO ENDIF @@ -671,14 +676,19 @@ SUBROUTINE SFCLAY1D_mynn( & ENDDO DO I=its,ite - RHO1D(I)=PSFCPA(I)/(R*TV1D(I)) !now using value calculated in sfc driver + RHO1D(I)=PSFCPA(I)/(R*TV1D(I)) !now using value calculated in sfc driver ZA(I)=0.5*dz8w1d(I) !height of first half-sigma level ZA2(I)=dz8w1d(I) + 0.5*dz2w1d(I) !height of 2nd half-sigma level GOVRTH(I)=G/TH1D(I) ENDDO + DO I=its,ite + QFX(i)=QFLX(i)*RHO1D(I) + HFX(i)=HFLX(i)*RHO1D(I)*cp + ENDDO + IF (debug_code ==2) THEN - write(*,*)"ITIMESTEP=",ITIMESTEP + !write(*,*)"ITIMESTEP=",ITIMESTEP DO I=its,ite write(*,*)"=== derived quantities in mynn sfc layer, i:", i write(*,*)" land, ice, water" @@ -745,7 +755,7 @@ SUBROUTINE SFCLAY1D_mynn( & ! Q2SAT = QGH IN LSM IF (T1D(I) .LT. 273.15) THEN !SATURATION VAPOR PRESSURE WRT ICE - E1=SVP1*EXP(4648*(1./273.15 - 1./T1D(I)) - & + E1=SVP1*EXP(4648.*(1./273.15 - 1./T1D(I)) - & & 11.64*LOG(273.15/T1D(I)) + 0.02265*(273.15 - T1D(I))) ELSE !SATURATION VAPOR PRESSURE WRT WATER (Bolton 1980) @@ -1642,7 +1652,8 @@ SUBROUTINE SFCLAY1D_mynn( & !---------------------------------- QFX(I)=FLQC(I)*(QSFCMR_lnd(I)-QV1D(I)) QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX - LH(I)=XLV*QFX(I) + LH(i)=XLV*QFX(i) + QFLX(i)=QFX(i)/RHO1D(i) !---------------------------------- ! COMPUTE SURFACE HEAT FLUX: @@ -1660,6 +1671,8 @@ SUBROUTINE SFCLAY1D_mynn( & CQS2(I)=UST_lnd(I)*KARMAN/PSIQ2_lnd(i) CHS2(I)=UST_lnd(I)*KARMAN/PSIT2_lnd(I) + QSFC(I)=QSFC_lnd(I) + ELSEIF (wet(i)) THEN !------------------------------------------ @@ -1675,6 +1688,7 @@ SUBROUTINE SFCLAY1D_mynn( & QFX(I)=FLQC(I)*(QSFCMR_ocn(I)-QV1D(I)) QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX LH(I)=XLV*QFX(I) + QFLX(i)=QFX(i)/RHO1D(i) !---------------------------------- ! COMPUTE SURFACE HEAT FLUX: @@ -1697,6 +1711,8 @@ SUBROUTINE SFCLAY1D_mynn( & CQS2(I)=UST_ocn(I)*KARMAN/PSIQ2_ocn(i) CHS2(I)=UST_ocn(I)*KARMAN/PSIT2_ocn(I) + QSFC(I)=QSFC_ocn(I) + ELSEIF (icy(i)) THEN !------------------------------------------ @@ -1711,7 +1727,8 @@ SUBROUTINE SFCLAY1D_mynn( & !---------------------------------- QFX(I)=FLQC(I)*(QSFCMR_ice(I)-QV1D(I)) QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX - LH(I)=XLV*QFX(I) + LH(I)=XLF*QFX(I) + QFLX(i)=QFX(i)/RHO1D(i) !---------------------------------- ! COMPUTE SURFACE HEAT FLUX: @@ -1729,6 +1746,8 @@ SUBROUTINE SFCLAY1D_mynn( & CQS2(I)=UST_ice(I)*KARMAN/PSIQ2_ice(i) CHS2(I)=UST_ice(I)*KARMAN/PSIT2_ice(I) + QSFC(I)=QSFC_ice(I) + ENDIF IF (debug_code >= 1) THEN @@ -1738,12 +1757,12 @@ SUBROUTINE SFCLAY1D_mynn( & if(wet(i))write(*,*)"ocn, MAVAIL:",MAVAIL(I)," u*=",UST_ocn(I)," psiq=",PSIQ_ocn(i) ENDIF - ! The exchange coefficient for cloud water is assumed to be the + ! The exchange coefficient for cloud water is assumed to be the ! same as that for heat. CH is multiplied by WSPD. ch(i)=flhc(i)/( cpm(i)*RHO1D(i) ) !----------------------------------------- - !--- COMPUTE EXCHANGE COEFFICIENTS FOR FV3 + !--- COMPUTE EXCHANGE COEFFICIENTS FOR FV3 !----------------------------------------- IF (wet(i)) THEN ch_ocn(I)=(karman/psix_ocn(I))*(karman/psit_ocn(i)) @@ -1838,8 +1857,6 @@ SUBROUTINE SFCLAY1D_mynn( & Q2(I)=QSFCMR_lnd(I)+(QV1D(I)-QSFCMR_lnd(I))*PSIQ2_lnd(i)/PSIQ_lnd(i) Q2(I)= MAX(Q2(I), MIN(QSFCMR_lnd(I), QV1D(I))) Q2(I)= MIN(Q2(I), 1.05*QV1D(I)) - - QSFC(I)=QSFC_lnd(I) ELSEIF (wet(i)) THEN DTG=TH1D(I)-THSK_ocn(I) TH2(I)=THSK_ocn(I)+DTG*PSIT2_ocn(I)/PSIT_ocn(I) @@ -1854,7 +1871,6 @@ SUBROUTINE SFCLAY1D_mynn( & Q2(I)=QSFCMR_ocn(I)+(QV1D(I)-QSFCMR_ocn(I))*PSIQ2_ocn(i)/PSIQ_ocn(i) Q2(I)= MAX(Q2(I), MIN(QSFCMR_ocn(I), QV1D(I))) Q2(I)= MIN(Q2(I), 1.05*QV1D(I)) - QSFC(I)=QSFC_ocn(I) ELSEIF (icy(i)) THEN DTG=TH1D(I)-THSK_ice(I) TH2(I)=THSK_ice(I)+DTG*PSIT2_ice(I)/PSIT_ice(I) @@ -1869,7 +1885,6 @@ SUBROUTINE SFCLAY1D_mynn( & Q2(I)=QSFCMR_ice(I)+(QV1D(I)-QSFCMR_ice(I))*PSIQ2_ice(i)/PSIQ_ice(i) Q2(I)= MAX(Q2(I), MIN(QSFCMR_ice(I), QV1D(I))) Q2(I)= MIN(Q2(I), 1.05*QV1D(I)) - QSFC(I)=QSFC_ice(I) ENDIF ENDDO ENDIF ! end compute_diag From 99ac1a07c34926adf6e5ac03d59138e7a073a6fe Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 4 Mar 2020 00:48:54 +0000 Subject: [PATCH 048/404] updating cycle to distingush lakes from ocean --- physics/gcycle.F90 | 8 + physics/sfcsub.F | 947 ++++++++++++++++++++++++--------------------- 2 files changed, 518 insertions(+), 437 deletions(-) diff --git a/physics/gcycle.F90 b/physics/gcycle.F90 index bb1730fc2..b6c085a29 100644 --- a/physics/gcycle.F90 +++ b/physics/gcycle.F90 @@ -62,6 +62,8 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) STCFC1 (Model%nx*Model%ny*Model%lsoil), & SLCFC1 (Model%nx*Model%ny*Model%lsoil) + logical :: lake(Model%nx*Model%ny) + character(len=6) :: tile_num_ch real(kind=kind_phys), parameter :: pifac=180.0/pi real(kind=kind_phys) :: sig1t, dt_warm @@ -151,6 +153,11 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) ELSE AISFCS(len) = 0. ENDIF + if (Sfcprop(nb)%lakefrac(ix) > 0.0) then + lake(len) = .true. + else + lake(len) = .false. + endif ! if (Model%me .eq. 0) ! & print *,' len=',len,' rla=',rla(len),' rlo=',rlo(len) @@ -185,6 +192,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) CVBFCS, CVTFCS, Model%me, Model%nlunit, & size(Model%input_nml_file), & Model%input_nml_file, & + lake, Model%min_lakeice, Model%min_seaice, & Model%ialb, Model%isot, Model%ivegsrc, & trim(tile_num_ch), i_index, j_index) #ifndef INTERNAL_FILE_NML diff --git a/physics/sfcsub.F b/physics/sfcsub.F index 6296e7856..c0bb760f1 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -69,14 +69,18 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & &, vegfcs,vetfcs,sotfcs,alffcs & &, cvfcs,cvbfcs,cvtfcs,me,nlunit & &, sz_nml,input_nml_file & + &, lake, min_lakeice, min_seaice & &, ialb,isot,ivegsrc,tile_num_ch,i_index,j_index) ! use machine , only : kind_io8,kind_io4 use sfccyc_module implicit none - character(len=*), intent(in) :: tile_num_ch - integer,intent(in) :: i_index(len), j_index(len) - logical use_ufo, nst_anl + character(len=*), intent(in) :: tile_num_ch + integer, intent(in) :: i_index(len), j_index(len) + logical, intent(in) :: use_ufo, nst_anl + logical, intent(in) :: lake(len) + real (kind=kind_io8), intent(in) :: min_lakeice, min_seaice + real (kind=kind_io8) sllnd,slsea,aicice,aicsea,tgice,rlapse, & & orolmx,orolmn,oroomx,oroomn,orosmx, & & orosmn,oroimx,oroimn,orojmx,orojmn, & @@ -87,7 +91,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & snolmx,snolmn,snoomx,snoomn,snosmx, & & snosmn,snoimx,snoimn,snojmx,snojmn, & & zorlmx,zorlmn,zoromx,zoromn,zorsmx, & - & zorsmn,zorimx,zorimn,zorjmx, zorjmn, & + & zorsmn,zorimx,zorimn,zorjmx,zorjmn, & & plrlmx,plrlmn,plromx,plromn,plrsmx, & & plrsmn,plrimx,plrimn,plrjmx,plrjmn, & & tsflmx,tsflmn,tsfomx,tsfomn,tsfsmx, & @@ -284,8 +288,9 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! & sihsmx=8.0,sihsmn=0.0,sihimx=8.0,sihimn=0.10, ! & sihjmx=8.0,sihjmn=0.10,glacir_hice=3.0) parameter(siclmx=0.0,siclmn=0.0,sicomx=1.0,sicomn=0.0, - & sicsmx=1.0,sicsmn=0.0,sicimx=1.0,sicimn=0.15, - & sicjmx=1.0,sicjmn=0.15) + & sicsmx=1.0,sicsmn=0.0,sicimx=1.0,sicjmx=1.0) +! & sicsmx=1.0,sicsmn=0.0,sicimx=1.0,sicimn=0.15, +! & sicjmx=1.0,sicjmn=0.15) parameter(wetlmx=0.15,wetlmn=0.00,wetomx=0.15,wetomn=0.15, & wetsmx=0.15,wetsmn=0.15,wetimx=0.15,wetimn=0.15, @@ -447,34 +452,34 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! climatology surface fields (last character 'c' or 'clm' indicate climatology) ! - character*500 fntsfc,fnwetc,fnsnoc,fnzorc,fnalbc,fnaisc, & - & fnplrc,fntg3c,fnscvc,fnsmcc,fnstcc,fnacnc, & - & fnvegc,fnvetc,fnsotc & + character*500 fntsfc,fnwetc,fnsnoc,fnzorc,fnalbc,fnaisc & + &, fnplrc,fntg3c,fnscvc,fnsmcc,fnstcc,fnacnc & + &, fnvegc,fnvetc,fnsotc & &, fnvmnc,fnvmxc,fnslpc,fnabsc, fnalbc2 - real (kind=kind_io8) tsfclm(len), wetclm(len), snoclm(len), & - & zorclm(len), albclm(len,4), aisclm(len), & - & tg3clm(len), acnclm(len), cnpclm(len), & - & cvclm (len), cvbclm(len), cvtclm(len), & - & scvclm(len), tsfcl2(len), vegclm(len), & - & vetclm(len), sotclm(len), alfclm(len,2), sliclm(len), & - & smcclm(len,lsoil), stcclm(len,lsoil) & + real (kind=kind_io8) tsfclm(len), wetclm(len), snoclm(len) & + &, zorclm(len), albclm(len,4), aisclm(len) & + &, tg3clm(len), acnclm(len), cnpclm(len) & + &, cvclm (len), cvbclm(len), cvtclm(len) & + &, scvclm(len), tsfcl2(len), vegclm(len) & + &, vetclm(len), sotclm(len), alfclm(len,2), sliclm(len) & + &, smcclm(len,lsoil), stcclm(len,lsoil) & &, sihclm(len), sicclm(len) & &, vmnclm(len), vmxclm(len), slpclm(len), absclm(len) ! ! analyzed surface fields (last character 'a' or 'anl' indicate analysis) ! - character*500 fntsfa,fnweta,fnsnoa,fnzora,fnalba,fnaisa, & - & fnplra,fntg3a,fnscva,fnsmca,fnstca,fnacna, & - & fnvega,fnveta,fnsota & - &, fnvmna,fnvmxa,fnslpa,fnabsa -! - real (kind=kind_io8) tsfanl(len), wetanl(len), snoanl(len), & - & zoranl(len), albanl(len,4), aisanl(len), & - & tg3anl(len), acnanl(len), cnpanl(len), & - & cvanl (len), cvbanl(len), cvtanl(len), & - & scvanl(len), tsfan2(len), veganl(len), & - & vetanl(len), sotanl(len), alfanl(len,2), slianl(len), & - & smcanl(len,lsoil), stcanl(len,lsoil) & + character*500 fntsfa,fnweta,fnsnoa,fnzora,fnalba,fnaisa & + &, fnplra,fntg3a,fnscva,fnsmca,fnstca,fnacna & + &, fnvega,fnveta,fnsota & + &, fnvmna,fnvmxa,fnslpa,fnabsa +! + real (kind=kind_io8) tsfanl(len), wetanl(len), snoanl(len) & + &, zoranl(len), albanl(len,4), aisanl(len) & + &, tg3anl(len), acnanl(len), cnpanl(len) & + &, cvanl (len), cvbanl(len), cvtanl(len) & + &, scvanl(len), tsfan2(len), veganl(len) & + &, vetanl(len), sotanl(len), alfanl(len,2), slianl(len) & + &, smcanl(len,lsoil), stcanl(len,lsoil) & &, sihanl(len), sicanl(len) & &, vmnanl(len), vmxanl(len), slpanl(len), absanl(len) ! @@ -482,13 +487,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! predicted surface fields (last characters 'fcs' indicates forecast) ! - real (kind=kind_io8) tsffcs(len), wetfcs(len), snofcs(len), & - & zorfcs(len), albfcs(len,4), aisfcs(len), & - & tg3fcs(len), acnfcs(len), cnpfcs(len), & - & cvfcs (len), cvbfcs(len), cvtfcs(len), & - & slifcs(len), vegfcs(len), & - & vetfcs(len), sotfcs(len), alffcs(len,2), & - & smcfcs(len,lsoil), stcfcs(len,lsoil) & + real (kind=kind_io8) tsffcs(len), wetfcs(len), snofcs(len) & + &, zorfcs(len), albfcs(len,4), aisfcs(len) & + &, tg3fcs(len), acnfcs(len), cnpfcs(len) & + &, cvfcs (len), cvbfcs(len), cvtfcs(len) & + &, slifcs(len), vegfcs(len) & + &, vetfcs(len), sotfcs(len), alffcs(len,2) & + &, smcfcs(len,lsoil), stcfcs(len,lsoil) & &, sihfcs(len), sicfcs(len), sitfcs(len) & &, vmnfcs(len), vmxfcs(len), slpfcs(len), absfcs(len) & &, swdfcs(len), slcfcs(len,lsoil) @@ -572,8 +577,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! lqcbgs=.true. quality controls input bges file before merging (should have been ! qced in the forecast program) ! - logical ldebug,lqcbgs - logical lprnt + logical :: ldebug, lqcbgs, lprnt + real :: tem ! ! debug only ! @@ -794,7 +799,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & abslmn = .01 abssmn = .01 endif - if(ifp.eq.0) then + if (ifp == 0) then ifp = 1 do k=1,lsoil fsmcl(k) = 99999. @@ -811,15 +816,15 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & #endif ! write(6,namsfc) ! - if (me .eq. 0) then - print *,'ftsfl,falbl,faisl,fsnol,fzorl=', - & ftsfl,falbl,faisl,fsnol,fzorl - print *,'fsmcl=',fsmcl(1:lsoil) - print *,'fstcl=',fstcl(1:lsoil) - print *,'ftsfs,falbs,faiss,fsnos,fzors=', - & ftsfs,falbs,faiss,fsnos,fzors - print *,'fsmcs=',fsmcs(1:lsoil) - print *,'fstcs=',fstcs(1:lsoil) + if (me == 0) then + print *,' ftsfl,falbl,faisl,fsnol,fzorl=', & + & ftsfl,falbl,faisl,fsnol,fzorl + print *,' fsmcl=',fsmcl(1:lsoil) + print *,' fstcl=',fstcl(1:lsoil) + print *,' ftsfs,falbs,faiss,fsnos,fzors=', & + & ftsfs,falbs,faiss,fsnos,fzors + print *,' fsmcs=',fsmcs(1:lsoil) + print *,' fstcs=',fstcs(1:lsoil) print *,' aislim=',aislim,' sihnew=',sihnew print *,' isot=', isot,' ivegsrc=',ivegsrc endif @@ -838,175 +843,175 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & deltf = deltsfc / 24.0 ! ctsfl=0. !... tsfc over land - if(ftsfl.ge.99999.) ctsfl=1. - if((ftsfl.gt.0.).and.(ftsfl.lt.99999)) ctsfl=exp(-deltf/ftsfl) + if (ftsfl >= 99999.) ctsfl = 1. + if (ftsfl > 0. .and. ftsfl < 99999) ctsfl = exp(-deltf/ftsfl) ! ctsfs=0. !... tsfc over sea - if(ftsfs.ge.99999.) ctsfs=1. - if((ftsfs.gt.0.).and.(ftsfs.lt.99999)) ctsfs=exp(-deltf/ftsfs) + if (ftsfs >= 99999.) ctsfs=1. + if (ftsfs > 0. .and. ftsfs < 99999) ctsfs = exp(-deltf/ftsfs) ! do k=1,lsoil - csmcl(k)=0. !... soilm over land - if(fsmcl(k).ge.99999.) csmcl(k)=1. - if((fsmcl(k).gt.0.).and.(fsmcl(k).lt.99999)) - & csmcl(k)=exp(-deltf/fsmcl(k)) + csmcl(k) = 0. !... soilm over land + if (fsmcl(k) >= 99999.) csmcl(k) = 1. + if (fsmcl(k) > 0. .and. fsmcl(k) < 99999) + & csmcl(k) = exp(-deltf/fsmcl(k)) csmcs(k)=0. !... soilm over sea - if(fsmcs(k).ge.99999.) csmcs(k)=1. - if((fsmcs(k).gt.0.).and.(fsmcs(k).lt.99999)) - & csmcs(k)=exp(-deltf/fsmcs(k)) + if (fsmcs(k) >= 99999.) csmcs(k) = 1. + if (fsmcs(k) > 0. .and. fsmcs(k) < 99999) + & csmcs(k) = exp(-deltf/fsmcs(k)) enddo ! - calbl=0. !... albedo over land - if(falbl.ge.99999.) calbl=1. - if((falbl.gt.0.).and.(falbl.lt.99999)) calbl=exp(-deltf/falbl) + calbl = 0. !... albedo over land + if (falbl >= 99999.) calbl = 1. + if (falbl > 0. .and. falbl < 99999) calbl = exp(-deltf/falbl) ! calfl=0. !... fraction field for albedo over land - if(falfl.ge.99999.) calfl=1. - if((falfl.gt.0.).and.(falfl.lt.99999)) calfl=exp(-deltf/falfl) + if (falfl >= 99999.) calfl = 1. + if (falfl > 0. .and. falfl < 99999) calfl = exp(-deltf/falfl) ! calbs=0. !... albedo over sea - if(falbs.ge.99999.) calbs=1. - if((falbs.gt.0.).and.(falbs.lt.99999)) calbs=exp(-deltf/falbs) + if (falbs >= 99999.) calbs = 1. + if (falbs > 0. .and. falbs < 99999) calbs = exp(-deltf/falbs) ! - calfs=0. !... fraction field for albedo over sea - if(falfs.ge.99999.) calfs=1. - if((falfs.gt.0.).and.(falfs.lt.99999)) calfs=exp(-deltf/falfs) + calfs = 0. !... fraction field for albedo over sea + if (falfs >= 99999.) calfs = 1. + if (falfs > 0. .and. falfs < 99999) calfs = exp(-deltf/falfs) ! - caisl=0. !... sea ice over land - if(faisl.ge.99999.) caisl=1. - if((faisl.gt.0.).and.(faisl.lt.99999)) caisl=1. + caisl = 0. !... sea ice over land + if (faisl >= 99999.) caisl = 1. + if (faisl > 0. .and. faisl < 99999) caisl = 1. ! - caiss=0. !... sea ice over sea - if(faiss.ge.99999.) caiss=1. - if((faiss.gt.0.).and.(faiss.lt.99999)) caiss=1. + caiss = 0. !... sea ice over sea + if (faiss >= 99999.) caiss = 1. + if (faiss > 0. .and. faiss < 99999) caiss = 1. ! - csnol=0. !... snow over land - if(fsnol.ge.99999.) csnol=1. - if((fsnol.gt.0.).and.(fsnol.lt.99999)) csnol=exp(-deltf/fsnol) + csnol = 0. !... snow over land + if (fsnol >= 99999.) csnol = 1. + if (fsnol > 0. .and. fsnol < 99999) csnol = exp(-deltf/fsnol) ! using the same way to bending snow as narr when fsnol is the negative value ! the magnitude of fsnol is the thread to determine the lower and upper bound ! of final swe - if(fsnol.lt.0.)csnol=fsnol + if (fsnol < 0.) csnol = fsnol ! - csnos=0. !... snow over sea - if(fsnos.ge.99999.) csnos=1. - if((fsnos.gt.0.).and.(fsnos.lt.99999)) csnos=exp(-deltf/fsnos) + csnos = 0. !... snow over sea + if (fsnos >= 99999.) csnos = 1. + if (fsnos > 0 .and. fsnos < 99999) csnos = exp(-deltf/fsnos) ! - czorl=0. !... roughness length over land - if(fzorl.ge.99999.) czorl=1. - if((fzorl.gt.0.).and.(fzorl.lt.99999)) czorl=exp(-deltf/fzorl) + czorl = 0. !... roughness length over land + if (fzorl >= 99999.) czorl = 1. + if (fzorl > 0. .and. fzorl < 99999) czorl = exp(-deltf/fzorl) ! - czors=0. !... roughness length over sea - if(fzors.ge.99999.) czors=1. - if((fzors.gt.0.).and.(fzors.lt.99999)) czors=exp(-deltf/fzors) + czors = 0. !... roughness length over sea + if (fzors >= 99999.) czors = 1. + if (fzors > 0. .and. fzors < 99999) czors = exp(-deltf/fzors) ! -! cplrl=0. !... plant resistance over land -! if(fplrl.ge.99999.) cplrl=1. -! if((fplrl.gt.0.).and.(fplrl.lt.99999)) cplrl=exp(-deltf/fplrl) +! cplrl = 0. !... plant resistance over land +! if (fplrl >= 99999.) cplrl = 1. +! if (fplrl > 0. .and. fplrl < 99999) cplrl=exp(-deltf/fplrl) ! -! cplrs=0. !... plant resistance over sea -! if(fplrs.ge.99999.) cplrs=1. -! if((fplrs.gt.0.).and.(fplrs.lt.99999)) cplrs=exp(-deltf/fplrs) +! cplrs = 0. !... plant resistance over sea +! if (fplrs >= 99999.) cplrs = 1. +! if (fplrs > 0. .and. fplrs < 99999) cplrs=exp(-deltf/fplrs) ! do k=1,lsoil - cstcl(k)=0. !... soilt over land - if(fstcl(k).ge.99999.) cstcl(k)=1. - if((fstcl(k).gt.0.).and.(fstcl(k).lt.99999)) - & cstcl(k)=exp(-deltf/fstcl(k)) - cstcs(k)=0. !... soilt over sea - if(fstcs(k).ge.99999.) cstcs(k)=1. - if((fstcs(k).gt.0.).and.(fstcs(k).lt.99999)) - & cstcs(k)=exp(-deltf/fstcs(k)) + cstcl(k) = 0. !... soilt over land + if (fstcl(k) >= 99999.) cstcl(k) = 1. + if (fstcl(k) > 0. .and. fstcl(k) < 99999) & + & cstcl(k) = exp(-deltf/fstcl(k)) + cstcs(k) = 0. !... soilt over sea + if (fstcs(k) >= 99999.) cstcs(k) = 1. + if (fstcs(k) > 0. .and. fstcs(k) < 99999) & + & cstcs(k) = exp(-deltf/fstcs(k)) enddo ! - cvegl=0. !... vegetation fraction over land - if(fvegl.ge.99999.) cvegl=1. - if((fvegl.gt.0.).and.(fvegl.lt.99999)) cvegl=exp(-deltf/fvegl) + cvegl = 0. !... vegetation fraction over land + if (fvegl >= 99999.) cvegl = 1. + if (fvegl > 0. .and. fvegl < 99999) cvegl = exp(-deltf/fvegl) ! - cvegs=0. !... vegetation fraction over sea - if(fvegs.ge.99999.) cvegs=1. - if((fvegs.gt.0.).and.(fvegs.lt.99999)) cvegs=exp(-deltf/fvegs) + cvegs = 0. !... vegetation fraction over sea + if (fvegs >= 99999.) cvegs = 1. + if (fvegs > 0. .and. fvegs < 99999) cvegs = exp(-deltf/fvegs) ! - cvetl=0. !... vegetation type over land - if(fvetl.ge.99999.) cvetl=1. - if((fvetl.gt.0.).and.(fvetl.lt.99999)) cvetl=exp(-deltf/fvetl) + cvetl = 0. !... vegetation type over land + if (fvetl >= 99999.) cvetl = 1. + if (fvetl > 0. .and. fvetl < 99999) cvetl = exp(-deltf/fvetl) ! - cvets=0. !... vegetation type over sea - if(fvets.ge.99999.) cvets=1. - if((fvets.gt.0.).and.(fvets.lt.99999)) cvets=exp(-deltf/fvets) + cvets = 0. !... vegetation type over sea + if (fvets >= 99999.) cvets = 1. + if (fvets > 0. .and. fvets < 99999) cvets = exp(-deltf/fvets) ! - csotl=0. !... soil type over land - if(fsotl.ge.99999.) csotl=1. - if((fsotl.gt.0.).and.(fsotl.lt.99999)) csotl=exp(-deltf/fsotl) + csotl = 0. !... soil type over land + if (fsotl >= 99999.) csotl = 1. + if (fsotl > 0. .and. fsotl < 99999) csotl = exp(-deltf/fsotl) ! - csots=0. !... soil type over sea - if(fsots.ge.99999.) csots=1. - if((fsots.gt.0.).and.(fsots.lt.99999)) csots=exp(-deltf/fsots) + csots = 0. !... soil type over sea + if (fsots >= 99999.) csots = 1. + if (fsots > 0. .and. fsots < 99999) csots = exp(-deltf/fsots) !cwu [+16l]--------------------------------------------------------------- ! - csihl=0. !... sea ice thickness over land - if(fsihl.ge.99999.) csihl=1. - if((fsihl.gt.0.).and.(fsihl.lt.99999)) csihl=exp(-deltf/fsihl) + csihl = 0. !... sea ice thickness over land + if (fsihl >= 99999.) csihl = 1. + if (fsihl > 0. .and. fsihl < 99999) csihl = exp(-deltf/fsihl) ! - csihs=0. !... sea ice thickness over sea - if(fsihs.ge.99999.) csihs=1. - if((fsihs.gt.0.).and.(fsihs.lt.99999)) csihs=exp(-deltf/fsihs) + csihs = 0. !... sea ice thickness over sea + if (fsihs >= 99999.) csihs = 1. + if (fsihs > 0. .and. fsihs < 99999) csihs = exp(-deltf/fsihs) ! - csicl=0. !... sea ice concentration over land - if(fsicl.ge.99999.) csicl=1. - if((fsicl.gt.0.).and.(fsicl.lt.99999)) csicl=exp(-deltf/fsicl) + csicl = 0. !... sea ice concentration over land + if (fsicl >= 99999.) csicl = 1. + if (fsicl > 0. .and. fsicl < 99999) csicl = exp(-deltf/fsicl) ! - csics=0. !... sea ice concentration over sea - if(fsics.ge.99999.) csics=1. - if((fsics.gt.0.).and.(fsics.lt.99999)) csics=exp(-deltf/fsics) + csics = 0. !... sea ice concentration over sea + if (fsics >= 99999.) csics = 1. + if (fsics > 0. .and. fsics < 99999) csics = exp(-deltf/fsics) !clu [+32l]--------------------------------------------------------------- ! - cvmnl=0. !... min veg cover over land - if(fvmnl.ge.99999.) cvmnl=1. - if((fvmnl.gt.0.).and.(fvmnl.lt.99999)) cvmnl=exp(-deltf/fvmnl) + cvmnl = 0. !... min veg cover over land + if (fvmnl >= 99999.) cvmnl = 1. + if (fvmnl > 0. .and. fvmnl < 99999) cvmnl = exp(-deltf/fvmnl) ! - cvmns=0. !... min veg cover over sea - if(fvmns.ge.99999.) cvmns=1. - if((fvmns.gt.0.).and.(fvmns.lt.99999)) cvmns=exp(-deltf/fvmns) + cvmns = 0. !... min veg cover over sea + if (fvmns >= 99999.) cvmns = 1. + if (fvmns > 0. .and. fvmns < 99999) cvmns = exp(-deltf/fvmns) ! - cvmxl=0. !... max veg cover over land - if(fvmxl.ge.99999.) cvmxl=1. - if((fvmxl.gt.0.).and.(fvmxl.lt.99999)) cvmxl=exp(-deltf/fvmxl) + cvmxl = 0. !... max veg cover over land + if (fvmxl >= 99999.) cvmxl = 1. + if (fvmxl > 0. .and. fvmxl < 99999) cvmxl = exp(-deltf/fvmxl) ! - cvmxs=0. !... max veg cover over sea - if(fvmxs.ge.99999.) cvmxs=1. - if((fvmxs.gt.0.).and.(fvmxs.lt.99999)) cvmxs=exp(-deltf/fvmxs) + cvmxs = 0. !... max veg cover over sea + if (fvmxs >= 99999.) cvmxs = 1. + if (fvmxs > 0. .and. fvmxs < 99999) cvmxs = exp(-deltf/fvmxs) ! - cslpl=0. !... slope type over land - if(fslpl.ge.99999.) cslpl=1. - if((fslpl.gt.0.).and.(fslpl.lt.99999)) cslpl=exp(-deltf/fslpl) + cslpl = 0. !... slope type over land + if (fslpl >= 99999.) cslpl = 1. + if (fslpl > 0. .and. fslpl < 99999) cslpl = exp(-deltf/fslpl) ! - cslps=0. !... slope type over sea - if(fslps.ge.99999.) cslps=1. - if((fslps.gt.0.).and.(fslps.lt.99999)) cslps=exp(-deltf/fslps) + cslps = 0. !... slope type over sea + if (fslps >= 99999.) cslps = 1. + if (fslps > 0. .and. fslps < 99999) cslps = exp(-deltf/fslps) ! - cabsl=0. !... snow albedo over land - if(fabsl.ge.99999.) cabsl=1. - if((fabsl.gt.0.).and.(fabsl.lt.99999)) cabsl=exp(-deltf/fabsl) + cabsl = 0. !... snow albedo over land + if (fabsl >= 99999.) cabsl = 1. + if (fabsl > 0. .and. fabsl < 99999) cabsl = exp(-deltf/fabsl) ! - cabss=0. !... snow albedo over sea - if(fabss.ge.99999.) cabss=1. - if((fabss.gt.0.).and.(fabss.lt.99999)) cabss=exp(-deltf/fabss) + cabss = 0. !... snow albedo over sea + if (fabss >= 99999.) cabss = 1. + if (fabss > 0. .and. fabss < 99999) cabss = exp(-deltf/fabss) !clu ---------------------------------------------------------------------- ! !> - Call hmskrd() to read a high resolution mask field for use in grib interpolation ! - call hmskrd(lugb,imsk,jmsk,fnmskh, + call hmskrd(lugb,imsk,jmsk,fnmskh, & & kpdmsk,slmskh,gausm,blnmsk,bltmsk,me) ! if (qcmsk) call qcmask(slmskh,sllnd,slsea,imsk,jmsk,rla,rlo) ! - if (me .eq. 0) then + if (me == 0) then write(6,*) ' ' write(6,*) ' lugb=',lugb,' len=',len, ' lsoil=',lsoil - write(6,*) 'iy=',iy,' im=',im,' id=',id,' ih=',ih,' fh=',fh - &, ' sig1t(1)=',sig1t(1) + write(6,*) 'iy=',iy,' im=',im,' id=',id,' ih=',ih,' fh=',fh & + &, ' sig1t(1)=',sig1t(1) & &, ' gausm=',gausm,' blnmsk=',blnmsk,' bltmsk=',bltmsk write(6,*) ' ' endif @@ -1114,32 +1119,35 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & !* ice concentration or ice mask (only ice mask used in the model now) ! ice concentration and ice mask (both are used in the model now) ! - if(fnaisc(1:8).ne.' ') then + if(fnaisc(1:8) /= ' ') then !cwu [+5l/-1l] update sihclm, sicclm do i=1,len sihclm(i) = 3.0*aisclm(i) sicclm(i) = aisclm(i) - if(slmask(i).eq.0..and.glacir(i).eq.1..and. - & sicclm(i).ne.1.) then + if(nint(slmask(i)) == 0 .and. nint(glacir(i)) == 1 & + & .and. sicclm(i) /= 1.0) then sicclm(i) = sicimx sihfcs(i) = glacir_hice endif enddo crit=aislim !* crit=0.5 - call rof01(aisclm,len,'ge',crit) - elseif(fnacnc(1:8).ne.' ') then +! call rof01(aisclm,len,'ge',crit) + call rof01_len(aisclm, len, 'ge', lake, min_lakeice, min_seaice) + + elseif(fnacnc(1:8) /= ' ') then !cwu [+4l] update sihclm, sicclm do i=1,len sihclm(i) = 3.0*acnclm(i) sicclm(i) = acnclm(i) - if(slmask(i).eq.0..and.glacir(i).eq.1..and. - & sicclm(i).ne.1.) then + if(nint(slmask(i)) == 0 .and. nint(glacir(i)) == 1 & + & .and. sicclm(i).ne.1.) then sicclm(i) = sicimx sihfcs(i) = glacir_hice endif enddo - call rof01(acnclm,len,'ge',aislim) +! call rof01(acnclm,len,'ge',aislim) + call rof01_len(acnclm, len, 'ge', lake, min_lakeice, min_seaice) do i=1,len aisclm(i) = acnclm(i) enddo @@ -1153,6 +1161,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! set ocean/land/sea-ice mask ! call setlsi(slmask,aisclm,len,aicice,sliclm) + ! if(lprnt) print *,' aisclm=',aisclm(iprnt),' sliclm=' ! *,sliclm(iprnt),' slmask=',slmask(iprnt) ! @@ -1170,7 +1179,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! quality control of snow depth (note that snow should be corrected first ! because it influences tsf ! - kqcm=1 + kqcm = 1 call qcmxmn('snow ',snoclm,sliclm,snoclm,icefl1, & snolmx,snolmn,snoomx,snoomn,snoimx,snoimn, & snojmx,snojmn,snosmx,snosmn,epssno, @@ -1194,7 +1203,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! quality control ! do i=1,len - icefl2(i) = sicclm(i) .gt. 0.99999 + icefl2(i) = sicclm(i) > 0.99999 enddo kqcm=1 call qcmxmn('tsfc ',tsfclm,sliclm,snoclm,icefl2, @@ -1246,7 +1255,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add smcclm(3:4) - if(lsoil.gt.2) then + if(lsoil > 2) then call qcmxmn('smc3c ',smcclm(1,3),sliclm,snoclm,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, @@ -1256,7 +1265,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) endif - if(fnstcc(1:8).eq.' ') then + if(fnstcc(1:8) == ' ') then call getstc(tsfclm,tg3clm,sliclm,len,lsoil,stcclm,tsfimx) endif call qcmxmn('stc1c ',stcclm(1,1),sliclm,snoclm,icefl1, @@ -1268,7 +1277,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add stcclm(3:4) - if(lsoil.gt.2) then + if(lsoil > 2) then call qcmxmn('stc3c ',stcclm(1,3),sliclm,snoclm,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, @@ -1295,10 +1304,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & sihlmx,sihlmn,sihomx,sihomn,sihimx,sihimn, & sihjmx,sihjmn,sihsmx,sihsmn,epssih, & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('sicc ',sicclm,sliclm,snoclm,icefl1, - & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, - & sicjmx,sicjmn,sicsmx,sicsmn,epssic, - & rla,rlo,len,kqcm,percrit,lgchek,me) +! call qcmxmn('sicc ',sicclm,sliclm,snoclm,icefl1, +! & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, +! & sicjmx,sicjmn,sicsmx,sicsmn,epssic, +! & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+16l] --------------------------------------------------------------- call qcmxmn('vmnc ',vmnclm,sliclm,snoclm,icefl1, & vmnlmx,vmnlmn,vmnomx,vmnomn,vmnimx,vmnimn, @@ -1321,7 +1330,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! monitoring prints ! if (monclm) then - if (me .eq. 0) then + if (me == 0) then print *,' ' print *,'monitor of time and space interpolated climatology' print *,' ' @@ -1371,7 +1380,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & endif ! ! - if (me .eq. 0) then + if (me == 0) then write(6,*) '==============' write(6,*) ' analysis' write(6,*) '==============' @@ -1395,9 +1404,9 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! reverse scaling to match with grib analysis input ! - zsca=0.01 + zsca = 0.01 call scale(zoranl,len, zsca) - zsca=100. + zsca = 100. call scale(albanl,len,zsca) call scale(albanl(1,2),len,zsca) call scale(albanl(1,3),len,zsca) @@ -1405,12 +1414,12 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call scale(alfanl,len,zsca) call scale(alfanl(1,2),len,zsca) !clu [+4l] reverse scale for vmn, vmx, abs - zsca=100. + zsca = 100. call scale(vmnanl,len,zsca) call scale(vmxanl,len,zsca) call scale(absanl,len,zsca) ! - percrit=critp2 + percrit = critp2 ! ! read analysis fields ! @@ -1438,9 +1447,9 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! scale zor and alb to match forecast model units ! - zsca=100. + zsca = 100. call scale(zoranl,len, zsca) - zsca=0.01 + zsca = 0.01 call scale(albanl,len,zsca) call scale(albanl(1,2),len,zsca) call scale(albanl(1,3),len,zsca) @@ -1448,7 +1457,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call scale(alfanl,len,zsca) call scale(alfanl(1,2),len,zsca) !clu [+4] scale vmn, vmx, abs from percent to fraction - zsca=0.01 + zsca = 0.01 call scale(vmnanl,len,zsca) call scale(vmxanl,len,zsca) call scale(absanl,len,zsca) @@ -1470,42 +1479,48 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! ice concentration or ice mask (only ice mask used in the model now) ! - if(fnaisa(1:8).ne.' ') then + if(fnaisa(1:8) /= ' ') then !cwu [+5l/-1l] update sihanl, sicanl do i=1,len sihanl(i) = 3.0*aisanl(i) sicanl(i) = aisanl(i) - if(slmask(i).eq.0..and.glacir(i).eq.1..and. - & sicanl(i).ne.1.) then + if(nint(slmask(i)) == 0 .and. nint(glacir(i)) == 1 & + & .and. sicanl(i) /= 1.) then sicanl(i) = sicimx sihfcs(i) = glacir_hice endif enddo - crit=aislim +! crit=aislim !* crit=0.5 - call rof01(aisanl,len,'ge',crit) - elseif(fnacna(1:8).ne.' ') then +! call rof01(aisanl,len,'ge',crit) + call rof01_len(aisanl, len, 'ge', lake, min_lakeice, min_seaice) + elseif(fnacna(1:8) /= ' ') then !cwu [+17l] update sihanl, sicanl do i=1,len sihanl(i) = 3.0*acnanl(i) sicanl(i) = acnanl(i) - if(slmask(i).eq.0..and.glacir(i).eq.1..and. - & sicanl(i).ne.1.) then + if(nint(slmask(i)) == 0 .and. nint(glacir(i)) == 1 & + & .and. sicanl(i) /= 1.) then sicanl(i) = sicimx sihfcs(i) = glacir_hice endif enddo - crit=aislim +! crit=aislim do i=1,len - if((slianl(i).eq.0.).and.(sicanl(i).ge.crit)) then - slianl(i)=2. + if (lake(i)) then + crit = min_lakeice + else + crit = min_seaice + endif + if (nint(slianl(i)) == 0 .and. sicanl(i) >= crit) then + slianl(i) = 2. ! print *,'cycle - new ice form: fice=',sicanl(i) - else if((slianl(i).ge.2.).and.(sicanl(i).lt.crit)) then - slianl(i)=0. + elseif (nint(slianl(i)) >= 2 .and. sicanl(i) < crit) then + slianl(i) = 0. ! print *,'cycle - ice free: fice=',sicanl(i) - else if((slianl(i).eq.1.).and.(sicanl(i).ge.sicimn)) then + elseif (nint(slianl(i)) == 1 .and. sicanl(i) > crit) then ! print *,'cycle - land covered by sea-ice: fice=',sicanl(i) - sicanl(i)=0. + sicanl(i) = 0. endif enddo ! znnt=10. @@ -1516,9 +1531,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! & .and. aisfcs(i) .ge. 0.75) acnanl(i) = aislim ! enddo ! if(lprnt) print *,' acnanl=',acnanl(iprnt) - call rof01(acnanl,len,'ge',aislim) +! call rof01(acnanl,len,'ge',aislim) + call rof01_len(acnanl, len, 'ge', lake, min_lakeice, min_seaice) do i=1,len - aisanl(i)=acnanl(i) + aisanl(i) = acnanl(i) enddo endif ! if(lprnt) print *,' aisanl1=',aisanl(iprnt),' glacir=' @@ -1551,10 +1567,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & sihlmx,sihlmn,sihomx,sihomn,sihimx,sihimn, & sihjmx,sihjmn,sihsmx,sihsmn,epssih, & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('sica ',sicanl,slianl,snoanl,icefl1, - & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, - & sicjmx,sicjmn,sicsmx,sicsmn,epssic, - & rla,rlo,len,kqcm,percrit,lgchek,me) +! call qcmxmn('sica ',sicanl,slianl,snoanl,icefl1, +! & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, +! & sicjmx,sicjmn,sicsmx,sicsmn,epssic, +! & rla,rlo,len,kqcm,percrit,lgchek,me) ! ! set albedo over ocean to albomx ! @@ -1563,13 +1579,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! quality control of snow and sea-ice ! process snow depth or snow cover ! - if(fnsnoa(1:8).ne.' ') then + if(fnsnoa(1:8) /= ' ') then call setzro(snoanl,epssno,len) call qcsnow(snoanl,slmask,aisanl,glacir,len,ten,landice,me) if (.not.landice) then call snodpth2(glacir,snosmx,snoanl, len, me) endif - kqcm=1 + kqcm = 1 call snosfc(snoanl,tsfanl,tsfsmx,len,me) call qcmxmn('snoa ',snoanl,slianl,snoanl,icefl1, & snolmx,snolmn,snoomx,snoomn,snoimx,snoimn, @@ -1581,7 +1597,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & scvjmx,scvjmn,scvsmx,scvsmn,epsscv, & rla,rlo,len,kqcm,percrit,lgchek,me) else - crit=0.5 + crit = 0.5 call rof01(scvanl,len,'ge',crit) call qcsnow(scvanl,slmask,aisanl,glacir,len,one,landice,me) call qcmxmn('sncva ',scvanl,slianl,scvanl,icefl1, @@ -1599,7 +1615,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & endif ! do i=1,len - icefl2(i) = sicanl(i) .gt. 0.99999 + icefl2(i) = sicanl(i) > 0.99999 enddo call qcmxmn('tsfa ',tsfanl,slianl,snoanl,icefl2, & tsflmx,tsflmn,tsfomx,tsfomn,tsfimx,tsfimn, @@ -1634,7 +1650,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! get soil temp and moisture ! - if(fnsmca(1:8).eq.' ' .and. fnsmcc(1:8).eq.' ') then + if(fnsmca(1:8) == ' ' .and. fnsmcc(1:8) == ' ') then call getsmc(wetanl,len,lsoil,smcanl,me) endif call qcmxmn('smc1a ',smcanl(1,1),slianl,snoanl,icefl1, @@ -1646,7 +1662,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add smcanl(3:4) - if(lsoil.gt.2) then + if(lsoil > 2) then call qcmxmn('smc3a ',smcanl(1,3),slianl,snoanl,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, @@ -1656,7 +1672,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) endif - if(fnstca(1:8).eq.' ') then + if(fnstca(1:8) == ' ') then call getstc(tsfanl,tg3anl,slianl,len,lsoil,stcanl,tsfimx) endif call qcmxmn('stc1a ',stcanl(1,1),slianl,snoanl,icefl1, @@ -1668,7 +1684,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add stcanl(3:4) - if(lsoil.gt.2) then + if(lsoil > 2) then call qcmxmn('stc3a ',stcanl(1,3),slianl,snoanl,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, @@ -1712,7 +1728,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! monitoring prints ! if (monanl) then - if (me .eq. 0) then + if (me == 0) then print *,' ' print *,'monitor of time and space interpolated analysis' print *,' ' @@ -1761,20 +1777,20 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! read in forecast fields if needed ! - if (me .eq. 0) then + if (me == 0) then write(6,*) '==============' write(6,*) ' fcst guess' write(6,*) '==============' endif ! - percrit=critp2 + percrit = critp2 ! if(deads) then ! ! fill in guess array with analysis if dead start. ! percrit=critp3 - if (me .eq. 0) write(6,*) 'this run is dead start run' + if (me == 0) write(6,*) 'this run is dead start run' call filfcs(tsffcs,wetfcs,snofcs,zorfcs,albfcs, & tg3fcs,cvfcs ,cvbfcs,cvtfcs, & cnpfcs,smcfcs,stcfcs,slifcs,aisfcs, @@ -1792,13 +1808,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & !clu [+1l] add ()anl for vmn, vmx, slp, abs & vmnanl,vmxanl,slpanl,absanl, & len,lsoil) - if(sig1t(1).ne.0.) then + if(sig1t(1) /= 0.) then call usesgt(sig1t,slianl,tg3anl,len,lsoil,tsffcs,stcfcs, & tsfimx) do i=1,len - icefl2(i) = sicfcs(i) .gt. 0.99999 + icefl2(i) = sicfcs(i) > 0.99999 enddo - kqcm=1 + kqcm = 1 call qcmxmn('tsff ',tsffcs,slifcs,snofcs,icefl2, & tsflmx,tsflmn,tsfomx,tsfomn,tsfimx,tsfimn, & tsfjmx,tsfjmn,tsfsmx,tsfsmn,epstsf, @@ -1813,7 +1829,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & rla,rlo,len,kqcm,percrit,lgchek,me) endif else - percrit=critp2 + percrit = critp2 ! ! make reverse angulation correction to tsf ! make reverse orography correction to tg3 @@ -1841,23 +1857,23 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! compute soil moisture liquid-to-total ratio over land ! do j=1, lsoil - do i=1, len - if(smcfcs(i,j) .ne. 0.) then - swratio(i,j) = slcfcs(i,j)/smcfcs(i,j) - else - swratio(i,j) = -999. - endif - enddo + do i=1, len + if(smcfcs(i,j) /= 0.) then + swratio(i,j) = slcfcs(i,j)/smcfcs(i,j) + else + swratio(i,j) = -999. + endif + enddo enddo !clu ----------------------------------------------------------------------- ! - if(lqcbgs .and. irtacn .eq. 0) then + if(lqcbgs .and. irtacn == 0) then call qcsli(slianl,slifcs,len,me) call albocn(albfcs,slmask,albomx,len) do i=1,len icefl2(i) = sicfcs(i) .gt. 0.99999 enddo - kqcm=1 + kqcm = 1 call qcmxmn('snof ',snofcs,slifcs,snofcs,icefl1, & snolmx,snolmn,snoomx,snoomn,snoimx,snoimn, & snojmx,snojmn,snosmx,snosmn,epssno, @@ -1872,7 +1888,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & albjmx,albjmn,albsmx,albsmn,epsalb, & rla,rlo,len,kqcm,percrit,lgchek,me) enddo - if(fnwetc(1:8).ne.' ' .or. fnweta(1:8).ne.' ' ) + if(fnwetc(1:8) /= ' ' .or. fnweta(1:8) /= ' ' ) & then call qcmxmn('wetf ',wetfcs,slifcs,snofcs,icefl1, & wetlmx,wetlmn,wetomx,wetomn,wetimx,wetimn, @@ -1898,10 +1914,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & sihlmx,sihlmn,sihomx,sihomn,sihimx,sihimn, & sihjmx,sihjmn,sihsmx,sihsmn,epssih, & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('sicf ',sicfcs,slifcs,snofcs,icefl1, - & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, - & sicjmx,sicjmn,sicsmx,sicsmn,epssic, - & rla,rlo,len,kqcm,percrit,lgchek,me) +! call qcmxmn('sicf ',sicfcs,slifcs,snofcs,icefl1, +! & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, +! & sicjmx,sicjmn,sicsmx,sicsmn,epssic, +! & rla,rlo,len,kqcm,percrit,lgchek,me) call qcmxmn('smc1f ',smcfcs(1,1),slifcs,snofcs,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, @@ -1975,7 +1991,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & endif ! if (monfcs) then - if (me .eq. 0) then + if (me == 0) then print *,' ' print *,'monitor of guess' print *,' ' @@ -2042,14 +2058,14 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! blend climatology and predicted fields ! - if(me .eq. 0) then + if(me == 0) then write(6,*) '==============' write(6,*) ' merging' write(6,*) '==============' endif ! if(lprnt) print *,' tsffcs=',tsffcs(iprnt) ! - percrit=critp3 + percrit = critp3 ! ! merge analysis and forecast. note tg3, ais are not merged ! @@ -2103,9 +2119,9 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call snosfc(snoanl,tsfanl,tsfsmx,len,me) ! do i=1,len - icefl2(i) = sicanl(i) .gt. 0.99999 + icefl2(i) = sicanl(i) > 0.99999 enddo - kqcm=0 + kqcm = 0 call qcmxmn('snowm ',snoanl,slianl,snoanl,icefl1, & snolmx,snolmn,snoomx,snoomn,snoimx,snoimn, & snojmx,snojmn,snosmx,snosmn,epssno, @@ -2120,8 +2136,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & albjmx,albjmn,albsmx,albsmn,epsalb, & rla,rlo,len,kqcm,percrit,lgchek,me) enddo - if(fnwetc(1:8).ne.' ' .or. fnweta(1:8).ne.' ' ) - & then + if(fnwetc(1:8) /= ' ' .or. fnweta(1:8) /= ' ') then call qcmxmn('wetm ',wetanl,slianl,snoanl,icefl1, & wetlmx,wetlmn,wetomx,wetomn,wetimx,wetimn, & wetjmx,wetjmn,wetsmx,wetsmn,epswet, @@ -2146,8 +2161,16 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('smc1m ',smcanl(1,1),slianl,snoanl,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('smc2m ',smcanl(1,2),slianl,snoanl,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add stcanl(3:4) - if(lsoil.gt.2) then + if(lsoil > 2) then call qcmxmn('stc3m ',stcanl(1,3),slianl,snoanl,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, @@ -2156,17 +2179,6 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif - call qcmxmn('smc1m ',smcanl(1,1),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc2m ',smcanl(1,2),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add smcanl(3:4) - if(lsoil.gt.2) then call qcmxmn('smc3m ',smcanl(1,3),slianl,snoanl,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, @@ -2194,10 +2206,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & sihlmx,sihlmn,sihomx,sihomn,sihimx,sihimn, & sihjmx,sihjmn,sihsmx,sihsmn,epssih, & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('sicm ',sicanl,slianl,snoanl,icefl1, - & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, - & sicjmx,sicjmn,sicsmx,sicsmn,epssic, - & rla,rlo,len,kqcm,percrit,lgchek,me) +! call qcmxmn('sicm ',sicanl,slianl,snoanl,icefl1, +! & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, +! & sicjmx,sicjmn,sicsmx,sicsmn,epssic, +! & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+16l] add vmn, vmx, slp, abs call qcmxmn('vmnm ',vmnanl,slianl,snoanl,icefl1, & vmnlmx,vmnlmn,vmnomx,vmnomn,vmnimx,vmnimn, @@ -2217,7 +2229,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & rla,rlo,len,kqcm,percrit,lgchek,me) ! - if(me .eq. 0) then + if(me == 0) then write(6,*) '==============' write(6,*) 'final results' write(6,*) '==============' @@ -2247,7 +2259,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! check the final merged product ! if (monmer) then - if(me .eq. 0) then + if(me == 0) then print *,' ' print *,'monitor of updated surface fields' print *,' (includes angulation correction)' @@ -2331,7 +2343,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! monitoring prints ! - if(me .eq. 0) then + if(me == 0) then print *,' ' print *,'monitor of difference' print *,' (includes angulation correction)' @@ -2424,15 +2436,21 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & enddo !cwu [+20l] update sihfcs, sicfcs. remove sea ice over non-ice points - crit=aislim +! crit=aislim do i=1,len sihfcs(i) = sihanl(i) sitfcs(i) = tsffcs(i) - if (slifcs(i).ge.2.) then - if (sicfcs(i).gt.crit) then + if (lake(i)) then + crit = min_lakeice + else + crit = min_seaice + endif + if (slifcs(i) >= 2.) then + if (sicfcs(i) > crit) then + tem = 1.0 / sicfcs(i) tsffcs(i) = (sicanl(i)*tsffcs(i) - & + (sicfcs(i)-sicanl(i))*tgice)/sicfcs(i) - sitfcs(i) = (tsffcs(i)-tgice*(1.0-sicfcs(i))) / sicfcs(i) + & + (sicfcs(i)-sicanl(i))*tgice) * tem + sitfcs(i) = (tsffcs(i)-tgice*(1.0-sicfcs(i))) * tem else tsffcs(i) = tsfanl(i) ! tsffcs(i) = tgice @@ -2442,13 +2460,20 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & sicfcs(i) = sicanl(i) enddo do i=1,len - if (slifcs(i).lt.1.5) then + if (slifcs(i) < 1.5) then sihfcs(i) = 0. sicfcs(i) = 0. sitfcs(i) = tsffcs(i) - else if ((slifcs(i).ge.1.5).and.(sicfcs(i).lt.crit)) then - print *,'warning: check, slifcs and sicfcs', - & slifcs(i),sicfcs(i) + else + if (lake(i)) then + crit = min_lakeice + else + crit = min_seaice + endif + if (sicfcs(i) < crit) then + print *,'warning: check, slifcs and sicfcs', & + & slifcs(i),sicfcs(i) + endif endif enddo @@ -2457,29 +2482,29 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! do k=1, lsoil fixratio(k) = .false. - if (fsmcl(k).lt.99999.) fixratio(k) = .true. + if (fsmcl(k) < 99999.) fixratio(k) = .true. enddo - if(me .eq. 0) then - print *,'dbgx --fixratio:',(fixratio(k),k=1,lsoil) + if(me == 0) then + print *,'dbgx --fixratio:',(fixratio(k),k=1,lsoil) endif do k=1, lsoil if(fixratio(k)) then do i = 1, len - if(swratio(i,k) .eq. -999.) then + if(swratio(i,k) == -999.) then slcfcs(i,k) = smcfcs(i,k) else slcfcs(i,k) = swratio(i,k) * smcfcs(i,k) endif - if (slifcs(i) .ne. 1.0) slcfcs(i,k) = 1.0 ! flag value for non-land points. + if (slifcs(i) /= 1.0) slcfcs(i,k) = 1.0 ! flag value for non-land points. enddo endif enddo ! set liquid soil moisture to a flag value of 1.0 if (landice) then do i = 1, len - if (slifcs(i) .eq. 1.0 .and. + if (slifcs(i) == 1.0 .and. & nint(vetfcs(i)) == veg_type_landice) then do k=1, lsoil slcfcs(i,k) = 1.0 @@ -2490,13 +2515,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! ensure the consistency between snwdph and sheleg ! - if(fsnol .lt. 99999.) then - if(me .eq. 0) then - print *,'dbgx -- scale snwdph from sheleg' - endif - do i = 1, len - if(slifcs(i).eq.1.) swdfcs(i) = 10.* snofcs(i) - enddo + if(fsnol < 99999.) then + if(me == 0) then + print *,'dbgx -- scale snwdph from sheleg' + endif + do i = 1, len + if(slifcs(i) == 1.) swdfcs(i) = 10.* snofcs(i) + enddo endif ! sea ice model only uses the liquid equivalent depth. @@ -2504,16 +2529,16 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! use the same 3:1 ratio used by ice model. do i = 1, len - if (slifcs(i).ne.1) swdfcs(i) = 3.*snofcs(i) + if (slifcs(i) /= 1) swdfcs(i) = 3.*snofcs(i) enddo do i = 1, len - if(slifcs(i).eq.1.) then - if(snofcs(i).ne.0. .and. swdfcs(i).eq.0.) then - print *,'dbgx --scale snwdph from sheleg', - + i, swdfcs(i), snofcs(i) - swdfcs(i) = 10.* snofcs(i) - endif + if(slifcs(i) == 1.) then + if(snofcs(i) /= 0. .and. swdfcs(i) == 0.) then + print *,'dbgx --scale snwdph from sheleg', + & i, swdfcs(i), snofcs(i) + swdfcs(i) = 10.* snofcs(i) + endif endif enddo ! landice mods - impose same minimum snow depth at @@ -2523,7 +2548,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! after adjustment to terrain. if (landice) then do i = 1, len - if (slifcs(i) .eq. 1.0 .and. + if (slifcs(i) == 1.0 .and. & & nint(vetfcs(i)) == veg_type_landice) then snofcs(i) = max(snofcs(i),100.0) ! in mm swdfcs(i) = max(swdfcs(i),1000.0) ! in mm @@ -4481,43 +4506,43 @@ subroutine bktges(smcfcs,slianl,stcfcs,len,lsoil) end !>\ingroup mod_sfcsub - subroutine rof01(aisfld,len,op,crit) + subroutine rof01(aisfld, len, op, crit) use machine , only : kind_io8,kind_io4 implicit none integer i,len real (kind=kind_io8) aisfld(len),crit character*2 op ! - if(op.eq.'ge') then + if(op == 'ge') then do i=1,len - if(aisfld(i).ge.crit) then - aisfld(i)=1. + if(aisfld(i) >= crit) then + aisfld(i) = 1. else - aisfld(i)=0. + aisfld(i) = 0. endif enddo - elseif(op.eq.'gt') then + elseif(op == 'gt') then do i=1,len - if(aisfld(i).gt.crit) then - aisfld(i)=1. + if(aisfld(i) > crit) then + aisfld(i) = 1. else - aisfld(i)=0. + aisfld(i) = 0. endif enddo - elseif(op.eq.'le') then + elseif(op == 'le') then do i=1,len - if(aisfld(i).le.crit) then - aisfld(i)=1. + if(aisfld(i) <= crit) then + aisfld(i) = 1. else - aisfld(i)=0. + aisfld(i) = 0. endif enddo - elseif(op.eq.'lt') then + elseif(op == 'lt') then do i=1,len - if(aisfld(i).lt.crit) then - aisfld(i)=1. + if(aisfld(i) < crit) then + aisfld(i) = 1. else - aisfld(i)=0. + aisfld(i) = 0. endif enddo else @@ -4528,6 +4553,61 @@ subroutine rof01(aisfld,len,op,crit) return end +!>\ingroup mod_sfcsub + subroutine rof01_len(aisfld, len, op, lake, critl, crits) + use machine , only : kind_io8,kind_io4 + implicit none + integer i,len + logical :: lake(len) + real (kind=kind_io8) aisfld(len), critl, crits, crit(len) + character*2 op +! + do i=1,len + if (lake(i)) then + crit(i) = critl + else + crit(i) = crits + endif + enddo + if(op == 'ge') then + do i=1,len + if(aisfld(i) >= crit(i)) then + aisfld(i) = 1. + else + aisfld(i) = 0. + endif + enddo + elseif(op == 'gt') then + do i=1,len + if(aisfld(i) > crit(i)) then + aisfld(i) = 1. + else + aisfld(i) = 0. + endif + enddo + elseif(op == 'le') then + do i=1,len + if(aisfld(i) <= crit(i)) then + aisfld(i) = 1. + else + aisfld(i) = 0. + endif + enddo + elseif(op == 'lt') then + do i=1,len + if(aisfld(i) < crit(i)) then + aisfld(i) = 1. + else + aisfld(i) = 0. + endif + enddo + else + write(6,*) ' illegal operator in rof01. op=',op + call abort + endif +! + return + end !>\ingroup mod_sfcsub subroutine tsfcor(tsfc,orog,slmask,umask,len,rlapse) ! @@ -5215,7 +5295,7 @@ subroutine qcsice(ais,glacir,amxice,aicice,aicsea,sllnd,slmask, & ! ! check sea-ice cover mask against land-sea mask ! - if (me .eq. 0) write(6,*) 'qc of sea ice' + if (me == 0) write(6,*) 'qc of sea ice' kount = 0 kount1 = 0 do i=1,len @@ -5315,9 +5395,8 @@ subroutine setlsi(slmask,aisfld,len,aicice,slifld) ! do i=1,len slifld(i) = slmask(i) -! if(aisfld(i).eq.aicice) slifld(i) = 2.0 - if(aisfld(i).eq.aicice .and. slmask(i) .eq. 0.0) - & slifld(i) = 2.0 + if(aisfld(i) == aicice .and. slmask(i) == 0.0) + & slifld(i) = 2.0 enddo return end @@ -5342,59 +5421,56 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! use machine , only : kind_io8,kind_io4 implicit none - real (kind=kind_io8) permax,per,fldimx,fldimn,fldjmx,fldomn, & - & fldlmx,fldlmn,fldomx,fldjmn,percrit, & - & fldsmx,fldsmn,epsfld - integer kmaxi,kmini,kmaxj,kmino,kmaxl,kminl,kmaxo,mmprt,kminj, & - & ij,nprt,kmaxs,kmins,i,me,len,mode - parameter(mmprt=2) + integer, intent(in) :: len, mode, me + real (kind=kind_io8), intent(in) :: fldimx,fldimn,fldjmx,fldomn, & + & fldlmx,fldlmn,fldomx,fldjmn, & + & fldsmx,fldsmn,epsfld,percrit & + integer, parameter :: mmprt=2 ! character*8 ttl logical iceflg(len) - real (kind=kind_io8) fld(len),slimsk(len),sno(len), & - & rla(len), rlo(len) - integer iwk(len) + real (kind=kind_io8), dimension(len) :: fld, slimsk, sno, rla, rlo logical lgchek ! logical first integer num_threads + real (kind=kind_io8) permax, per data first /.true./ save num_threads, first ! - integer len_thread_m, i1_t, i2_t, it - integer num_parthds + integer :: len_thread_m, i1_t, i2_t, it, num_parthds, & + & kmaxi,kmini,kmaxj,kmino,kmaxl,kminl,kmaxo,kminj, & + & ij,nprt,kmaxs,kmins,i + integer :: islimsk(len), iwk(len) ! if (first) then num_threads = num_parthds() first = .false. endif + do it=1,len + islimsk(it) = nint(slimsk(it)) + enddo ! ! check against land-sea mask and ice cover mask ! - if(me .eq. 0) then -! print *,' ' - print *,'performing qc of ',ttl,' mode=',mode, - & '(0=count only, 1=replace)' + if(me == 0) then + print *,'performing qc of ',ttl,' mode=',mode, + & '(0=count only, 1=replace)' endif ! len_thread_m = (len+num_threads-1) / num_threads - kmaxl = 0 - kminl = 0 - kmaxo = 0 - kmino = 0 - kmaxi = 0 - kmini = 0 - kmaxj = 0 - kminj = 0 - kmaxs = 0 - kmins = 0 + + kmaxl = 0 ; kminl = 0 ; kmaxo = 0 ; kmino = 0 + kmaxi = 0 ; kmini = 0 ; kmaxj = 0 ; kminj = 0 + kmaxs = 0 ; kmins = 0 + !$omp parallel do private(i1_t,i2_t,it,i) !$omp+private(nprt,ij,iwk) !$omp+reduction(+:kmaxs,kmins,kmaxl,kminl,kmaxo) !$omp+reduction(+:kmino,kmaxi,kmini,kmaxj,kminj) !$omp+shared(mode,epsfld) !$omp+shared(fldlmx,fldlmn,fldomx,fldjmn,fldsmx,fldsmn) -!$omp+shared(fld,slimsk,sno,rla,rlo) +!$omp+shared(fld,islimsk,sno,rla,rlo) do it=1,num_threads ! start of threaded loop i1_t = (it-1)*len_thread_m+1 i2_t = min(i1_t+len_thread_m-1,len) @@ -5403,24 +5479,24 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! lower bound check over bare land ! - if (fldlmn .ne. 999.0) then + if (fldlmn /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.1..and.sno(i).le.0..and. - & fld(i).lt.fldlmn-epsfld) then - kminl=kminl+1 + if(islimsk(i) == 1 .and. sno(i) <= 0.0 & + & .and. fld(i) < fldlmn-epsfld) then + kminl = kminl + 1 iwk(kminl) = i endif enddo - if(me == 0 . and. it == 1 .and. num_threads == 1) then + if(me == 0 .and. it == 1 .and. num_threads == 1) then nprt = min(mmprt,kminl) do i=1,nprt ij = iwk(i) print 8001,rla(ij),rlo(ij),fld(ij),fldlmn - 8001 format(' bare land min. check. lat=',f5.1, + 8001 format(' bare land min. check. lat=',f5.1, & & ' lon=',f6.1,' fld=',e13.6, ' to ',e13.6) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kminl fld(iwk(i)) = fldlmn enddo @@ -5429,11 +5505,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! upper bound check over bare land ! - if (fldlmx .ne. 999.0) then + if (fldlmx /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.1..and.sno(i).le.0..and. - & fld(i).gt.fldlmx+epsfld) then - kmaxl=kmaxl+1 + if(islimsk(i) == 1 .and. sno(i) <= 0.0 & + & .and. fld(i) > fldlmx+epsfld) then + kmaxl = kmaxl + 1 iwk(kmaxl) = i endif enddo @@ -5442,11 +5518,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8002,rla(ij),rlo(ij),fld(ij),fldlmx - 8002 format(' bare land max. check. lat=',f5.1, + 8002 format(' bare land max. check. lat=',f5.1, & & ' lon=',f6.1,' fld=',e13.6, ' to ',e13.6) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kmaxl fld(iwk(i)) = fldlmx enddo @@ -5455,11 +5531,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! lower bound check over snow covered land ! - if (fldsmn .ne. 999.0) then + if (fldsmn /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.1..and.sno(i).gt.0..and. - & fld(i).lt.fldsmn-epsfld) then - kmins=kmins+1 + if(islimsk(i) == 1 .and. sno(i) > 0.0 & + & .and. fld(i) < fldsmn-epsfld) then + kmins = kmins + 1 iwk(kmins) = i endif enddo @@ -5468,11 +5544,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8003,rla(ij),rlo(ij),fld(ij),fldsmn - 8003 format(' sno covrd land min. check. lat=',f5.1, + 8003 format(' sno covrd land min. check. lat=',f5.1, & & ' lon=',f6.1,' fld=',e11.4, ' to ',e11.4) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kmins fld(iwk(i)) = fldsmn enddo @@ -5481,11 +5557,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! upper bound check over snow covered land ! - if (fldsmx .ne. 999.0) then + if (fldsmx /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.1..and.sno(i).gt.0..and. - & fld(i).gt.fldsmx+epsfld) then - kmaxs=kmaxs+1 + if(islimsk(i) == 1 .and. sno(i) > 0.0 & + & .and. fld(i) > fldsmx+epsfld) then + kmaxs = kmaxs + 1 iwk(kmaxs) = i endif enddo @@ -5494,11 +5570,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8004,rla(ij),rlo(ij),fld(ij),fldsmx - 8004 format(' snow land max. check. lat=',f5.1, + 8004 format(' snow land max. check. lat=',f5.1,i & & ' lon=',f6.1,' fld=',e11.4, ' to ',e11.4) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kmaxs fld(iwk(i)) = fldsmx enddo @@ -5507,11 +5583,10 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! lower bound check over open ocean ! - if (fldomn .ne. 999.0) then + if (fldomn /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.0..and. - & fld(i).lt.fldomn-epsfld) then - kmino=kmino+1 + if(islimsk(i) == 0.0 .and. fld(i) < fldomn-epsfld) then + kmino = kmino + 1 iwk(kmino) = i endif enddo @@ -5520,11 +5595,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8005,rla(ij),rlo(ij),fld(ij),fldomn - 8005 format(' open ocean min. check. lat=',f5.1, + 8005 format(' open ocean min. check. lat=',f5.1, & & ' lon=',f6.1,' fld=',e11.4,' to ',e11.4) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kmino fld(iwk(i)) = fldomn enddo @@ -5533,24 +5608,23 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! upper bound check over open ocean ! - if (fldomx .ne. 999.0) then + if (fldomx /= 999.0) then do i=i1_t,i2_t - if(fldomx.ne.999..and.slimsk(i).eq.0..and. - & fld(i).gt.fldomx+epsfld) then - kmaxo=kmaxo+1 + if(islimsk(i) ==.0 .and. fld(i) > fldomx+epsfld) then + kmaxo = kmaxo+1 iwk(kmaxo) = i endif enddo - if(me == 0 . and. it == 1 .and. num_threads == 1) then + if(me == 0 .and. it == 1 .and. num_threads == 1) then nprt = min(mmprt,kmaxo) do i=1,nprt ij = iwk(i) print 8006,rla(ij),rlo(ij),fld(ij),fldomx - 8006 format(' open ocean max. check. lat=',f5.1, + 8006 format(' open ocean max. check. lat=',f5.1, & & ' lon=',f6.1,' fld=',e11.4, ' to ',e11.4) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kmaxo fld(iwk(i)) = fldomx enddo @@ -5559,11 +5633,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! lower bound check over sea ice without snow ! - if (fldimn .ne. 999.0) then + if (fldimn /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.2..and.sno(i).le.0..and. - & fld(i).lt.fldimn-epsfld) then - kmini=kmini+1 + if(islimsk(i) == 2 .and. sno(i) <= 0.0 & + & .and. fld(i) < fldimn-epsfld) then + kmini = kmini + 1 iwk(kmini) = i endif enddo @@ -5572,11 +5646,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8007,rla(ij),rlo(ij),fld(ij),fldimn - 8007 format(' seaice no snow min. check lat=',f5.1, + 8007 format(' seaice no snow min. check lat=',f5.1, & & ' lon=',f6.1,' fld=',e11.4, ' to ',e11.4) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kmini fld(iwk(i)) = fldimn enddo @@ -5585,12 +5659,12 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! upper bound check over sea ice without snow ! - if (fldimx .ne. 999.0) then + if (fldimx /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.2..and.sno(i).le.0..and. - & fld(i).gt.fldimx+epsfld .and. iceflg(i)) then + if(islimsk(i) == 2 .and. sno(i) <= 0.0 .and. & + & fld(i) > fldimx+epsfld .and. iceflg(i)) then ! & fld(i).gt.fldimx+epsfld) then - kmaxi=kmaxi+1 + kmaxi = kmaxi + 1 iwk(kmaxi) = i endif enddo @@ -5599,11 +5673,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8008,rla(ij),rlo(ij),fld(ij),fldimx - 8008 format(' seaice no snow max. check lat=',f5.1, + 8008 format(' seaice no snow max. check lat=',f5.1, & & ' lon=',f6.1,' fld=',e11.4, ' to ',e11.4) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kmaxi fld(iwk(i)) = fldimx enddo @@ -5612,11 +5686,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! lower bound check over sea ice with snow ! - if (fldjmn .ne. 999.0) then + if (fldjmn /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.2..and.sno(i).gt.0..and. - & fld(i).lt.fldjmn-epsfld) then - kminj=kminj+1 + if(islimsk(i) == 2 .and. sno(i) > 0.0 .and. & + & fld(i) < fldjmn-epsfld) then + kminj = kminj + 1 iwk(kminj) = i endif enddo @@ -5625,11 +5699,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8009,rla(ij),rlo(ij),fld(ij),fldjmn - 8009 format(' sea ice snow min. check lat=',f5.1, + 8009 format(' sea ice snow min. check lat=',f5.1, & & ' lon=',f6.1,' fld=',e11.4, ' to ',e11.4) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kminj fld(iwk(i)) = fldjmn enddo @@ -5638,12 +5712,12 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! upper bound check over sea ice with snow ! - if (fldjmx .ne. 999.0) then + if (fldjmx /= 999.0) then do i=i1_t,i2_t - if(slimsk(i).eq.2..and.sno(i).gt.0..and. - & fld(i).gt.fldjmx+epsfld .and. iceflg(i)) then + if(islimsk(i) == 2 .and.sno(i) > 0.0 .and. & + & fld(i)> fldjmx+epsfld .and. iceflg(i)) then ! & fld(i).gt.fldjmx+epsfld) then - kmaxj=kmaxj+1 + kmaxj = kmaxj+1 iwk(kmaxj) = i endif enddo @@ -5652,11 +5726,11 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8010,rla(ij),rlo(ij),fld(ij),fldjmx - 8010 format(' seaice snow max check lat=',f5.1, + 8010 format(' seaice snow max check lat=',f5.1, & & ' lon=',f6.1,' fld=',e11.4, ' to ',e11.4) enddo endif - if (mode .eq. 1) then + if (mode == 1) then do i=1,kmaxj fld(iwk(i)) = fldjmx enddo @@ -5667,78 +5741,77 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & ! ! print results ! - if(me .eq. 0) then -! write(6,*) 'summary of qc' - permax=0. - if(kminl.gt.0) then - per=float(kminl)/float(len)*100. + if(me == 0) then + permax = 0.0 + if(kminl > 0) then + per = float(kminl)/float(len)*100. print 9001,fldlmn,kminl,per - 9001 format(' bare land min check. modified to ',f8.1, + 9001 format(' bare land min check. modified to ',f8.1, & & ' at ',i5,' points ',f8.1,'percent') - if(per.gt.permax) permax=per + if(per > permax) permax = per endif - if(kmaxl.gt.0) then - per=float(kmaxl)/float(len)*100. + if(kmaxl > 0) then + per = float(kmaxl)/float(len)*100. print 9002,fldlmx,kmaxl,per - 9002 format(' bare land max check. modified to ',f8.1, + 9002 format(' bare land max check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') if(per.gt.permax) permax=per endif - if(kmino.gt.0) then - per=float(kmino)/float(len)*100. + if(kmino > 0) then + per = float(kmino)/float(len)*100. print 9003,fldomn,kmino,per - 9003 format(' open ocean min check. modified to ',f8.1, + 9003 format(' open ocean min check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') if(per.gt.permax) permax=per endif - if(kmaxo.gt.0) then - per=float(kmaxo)/float(len)*100. + if(kmaxo > 0) then + per = float(kmaxo)/float(len)*100. print 9004,fldomx,kmaxo,per - 9004 format(' open sea max check. modified to ',f8.1, + 9004 format(' open sea max check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') if(per.gt.permax) permax=per endif - if(kmins.gt.0) then - per=float(kmins)/float(len)*100. + if(kmins >.0) then + per = float(kmins)/float(len)*100. print 9009,fldsmn,kmins,per - 9009 format(' snow covered land min check. modified to ',f8.1, + 9009 format(' snow covered land min check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') if(per.gt.permax) permax=per endif - if(kmaxs.gt.0) then - per=float(kmaxs)/float(len)*100. + if(kmaxs > 0) then + per = float(kmaxs)/float(len)*100. print 9010,fldsmx,kmaxs,per - 9010 format(' snow covered land max check. modified to ',f8.1, + 9010 format(' snow covered land max check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') if(per.gt.permax) permax=per endif - if(kmini.gt.0) then - per=float(kmini)/float(len)*100. + if(kmini > 0) then + per = float(kmini)/float(len)*100. print 9005,fldimn,kmini,per - 9005 format(' bare ice min check. modified to ',f8.1, + 9005 format(' bare ice min check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') if(per.gt.permax) permax=per endif - if(kmaxi.gt.0) then - per=float(kmaxi)/float(len)*100. + if(kmaxi > 0) then + per = float(kmaxi)/float(len)*100. print 9006,fldimx,kmaxi,per - 9006 format(' bare ice max check. modified to ',f8.1, + 9006 format(' bare ice max check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') - if(per.gt.permax) permax=per + if(per > permax) permax=per endif - if(kminj.gt.0) then - per=float(kminj)/float(len)*100. + if(kminj > 0) then + per = float(kminj)/float(len)*100. print 9007,fldjmn,kminj,per - 9007 format(' snow covered ice min check. modified to ',f8.1, + 9007 format(' snow covered ice min check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') if(per.gt.permax) permax=per endif - if(kmaxj.gt.0) then - per=float(kmaxj)/float(len)*100. + if(kmaxj > 0) then + per = float(kmaxj)/float(len)*100. print 9008,fldjmx,kmaxj,per - 9008 format(' snow covered ice max check. modified to ',f8.1, + 9008 format(' snow covered ice max check. modified to ',f8.1, & & ' at ',i5,' points ',f4.1,'percent') - if(per.gt.permax) permax=per + if(per > permax) permax=per endif ! commented on 06/30/99 -- moorthi ! if(lgchek) then From b4918a451256eb4f811851c7973bfee7e26f0c8c Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Wed, 4 Mar 2020 20:06:02 +0000 Subject: [PATCH 049/404] Model tendencies add up to total change in 3 hours for the gfs v16 beta suite --- physics/GFS_PBL_generic.F90 | 70 +++++++++++------ physics/GFS_PBL_generic.meta | 142 +++++++++++++++++++++++++++++++++-- physics/model_tend_post.F90 | 27 +++++-- physics/model_tend_post.meta | 32 ++++++++ physics/model_tend_pre.F90 | 92 ++++++++++++++++++++--- physics/model_tend_pre.meta | 64 ++++++++++++++++ physics/total_tend.F90 | 37 ++++++--- physics/total_tend.meta | 32 ++++++++ 8 files changed, 439 insertions(+), 57 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index f0ab372a4..f023a103a 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -84,7 +84,8 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef, trans_aero, ntchs, ntchm, & imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires, cplchm, ltaerosol, hybedmf, do_shoc, & - satmedmf, qgrs, vdftra, errmsg, errflg) + satmedmf, qgrs, vdftra, save_u, save_v, save_t, save_q, ldiag3d, qdiag3d, lssav, & + ugrs, vgrs, tgrs, errmsg, errflg) use machine, only : kind_phys use GFS_PBL_generic_common, only : set_aerosol_tracer_index @@ -94,13 +95,16 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, integer, intent(in) :: im, levs, nvdiff, ntrac integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc integer, intent(in) :: ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef,ntchs, ntchm - logical, intent(in) :: trans_aero + logical, intent(in) :: trans_aero, ldiag3d, qdiag3d, lssav integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: cplchm, ltaerosol, hybedmf, do_shoc, satmedmf real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: qgrs + real(kind=kind_phys), dimension(im, levs), intent(in) :: ugrs, vgrs, tgrs real(kind=kind_phys), dimension(im, levs, nvdiff), intent(inout) :: vdftra + real(kind=kind_phys), dimension(im, levs), intent(out) :: save_u, save_v, save_t + real(kind=kind_phys), dimension(im, levs, ntrac), intent(out) :: save_q character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -258,6 +262,24 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, ! endif + if(ldiag3d .and. lssav) then + do k=1,levs + do i=1,im + save_t(i,k) = tgrs(i,k) + save_u(i,k) = ugrs(i,k) + save_v(i,k) = vgrs(i,k) + enddo + enddo + if(qdiag3d) then + do k=1,levs + do i=1,im + save_q(i,k,ntqv) = qgrs(i,k,ntqv) + save_q(i,k,ntoz) = qgrs(i,k,ntoz) + enddo + enddo + endif + endif + end subroutine GFS_PBL_generic_pre_run end module GFS_PBL_generic_pre @@ -285,9 +307,10 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, & dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, & dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, & - dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag, dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt, & + dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag, dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt,& dq3dt_ozone, rd, cp,fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, fice, dusfc_cice, dvsfc_cice, dtsfc_cice, & - dqsfc_cice, wet, dry, icy, wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1, dkt_cpl, dkt, errmsg, errflg) + dqsfc_cice, wet, dry, icy, wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1, dkt_cpl, dkt, & + ugrs, vgrs, tgrs, qgrs, save_u, save_v, save_t, save_q, errmsg, errflg) use machine, only : kind_phys use GFS_PBL_generic_common, only : set_aerosol_tracer_index @@ -302,6 +325,9 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, qdiag3d, lsidea logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu logical, intent(in) :: flag_for_pbl_generic_tend + + real(kind=kind_phys), dimension(im, levs), intent(in) :: save_u, save_v, save_t + real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: save_q real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), intent(in) :: rd, cp, fvirt, hvap @@ -309,6 +335,10 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), dimension(:,:), intent(in) :: prsl real(kind=kind_phys), dimension(:), intent(in) :: dusfc_cice, dvsfc_cice, dtsfc_cice, dqsfc_cice, & wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1 + + real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: qgrs + real(kind=kind_phys), dimension(im, levs), intent(in) :: ugrs, vgrs, tgrs + real(kind=kind_phys), dimension(im, levs, nvdiff), intent(in) :: dvdftra real(kind=kind_phys), dimension(im), intent(in) :: dusfc1, dvsfc1, dtsfc1, dqsfc1, xmu real(kind=kind_phys), dimension(im, levs), intent(in) :: dudt, dvdt, dtdt, htrsw, htrlw @@ -553,39 +583,29 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! & dtf,' kdt=',kdt,' lat=',lat ! endif - if (ldiag3d .and. flag_for_pbl_generic_tend) then + if (ldiag3d .and. flag_for_pbl_generic_tend .and. lssav) then if (lsidea) then dt3dt(1:im,:) = dt3dt(1:im,:) + dtdt(1:im,:)*dtf else do k=1,levs do i=1,im - tem = dtdt(i,k) - (htrlw(i,k)+htrsw(i,k)*xmu(i)) - dt3dt(i,k) = dt3dt(i,k) + tem*dtf + dt3dt(i,k) = dt3dt(i,k) + (tgrs(i,k) - save_t(i,k)) enddo enddo endif do k=1,levs do i=1,im - du3dt_PBL(i,k) = du3dt_PBL(i,k) + dudt(i,k) * dtf - du3dt_OGWD(i,k) = du3dt_OGWD(i,k) - dudt(i,k) * dtf - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + dvdt(i,k) * dtf - dv3dt_OGWD(i,k) = dv3dt_OGWD(i,k) - dvdt(i,k) * dtf + du3dt_PBL(i,k) = du3dt_PBL(i,k) + (ugrs(i,k) - save_u(i,k)) + dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + (vgrs(i,k) - save_v(i,k)) enddo enddo - if (qdiag3d) then - do k=1,levs - do i=1,im - tem = dqdt(i,k,ntqv) * dtf - dq3dt(i,k) = dq3dt(i,k) + tem - enddo - enddo - if (ntoz > 0) then - do k=1,levs - do i=1,im - dq3dt_ozone(i,k) = dq3dt_ozone(i,k) + dqdt(i,k,ntoz) * dtf - enddo - enddo - endif + if(qdiag3d) then + do k=1,levs + do i=1,im + dq3dt(i,k) = dq3dt(i,k) + (qgrs(i,k,ntqv)-save_q(i,k,ntqv)) + dq3dt_ozone(i,k) = dq3dt_ozone(i,k) + (qgrs(i,k,ntoz)-save_q(i,k,ntoz)) + enddo + enddo endif endif diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index ab4eca5da..54c661125 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -307,6 +307,78 @@ kind = kind_phys intent = inout optional = F +[save_u] + standard_name = x_wind_save + long_name = x-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[save_v] + standard_name = y_wind_save + long_name = y-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[save_t] + standard_name = air_temperature_save + long_name = air temperature before entering a physics scheme + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[save_q] + standard_name = tracer_concentration_save + long_name = tracer concentration before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[ugrs] + standard_name = x_wind + long_name = zonal wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[vgrs] + standard_name = y_wind + long_name = meridional wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -601,13 +673,6 @@ type = logical intent = in optional = F -[flag_for_pbl_generic_tend] - standard_name = true_if_GFS_PBL_generic_should_calculate_tendencies - long_name = true if GFS_PBL_generic should calculate tendencies - units = flag - dimensions = () - type = logical - intent = in [lssav] standard_name = flag_diagnostics long_name = logical flag for storing diagnostics @@ -616,6 +681,13 @@ type = logical intent = in optional = F +[flag_for_pbl_generic_tend] + standard_name = true_if_GFS_PBL_generic_should_calculate_tendencies + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -1235,6 +1307,62 @@ kind = kind_phys intent = in optional = F +[ugrs] + standard_name = x_wind + long_name = zonal wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[vgrs] + standard_name = y_wind + long_name = meridional wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[qgrs] + standard_name = tracer_concentration + long_name = model layer mean tracer concentration + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys +[save_u] + standard_name = x_wind_save + long_name = x-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[save_v] + standard_name = y_wind_save + long_name = y-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[save_t] + standard_name = air_temperature_save + long_name = air temperature before entering a physics scheme + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[save_q] + standard_name = tracer_concentration_save + long_name = tracer concentration before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/model_tend_post.F90 b/physics/model_tend_post.F90 index 509c4a834..a06997f5e 100644 --- a/physics/model_tend_post.F90 +++ b/physics/model_tend_post.F90 @@ -19,6 +19,7 @@ subroutine model_tend_post_run(kdt, & t_start,u_start,v_start,q_start, & t_end, u_end, v_end, q_end, & dt3dt_ccpp, du3dt_ccpp, dv3dt_ccpp, dq3dt_ccpp, & + dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total, & im, levs, ntrac, index_for_water_vapor, & lssav, ldiag3d, qdiag3d, errmsg,errflg) use machine, only: kind_phys @@ -29,8 +30,9 @@ subroutine model_tend_post_run(kdt, & real(kind=kind_phys), dimension(:,:), intent(in) :: q_start real(kind=kind_phys), dimension(:,:), intent(inout) :: t_end, u_end, v_end real(kind=kind_phys), dimension(:,:), intent(inout) :: q_end - real(kind=kind_phys), dimension(:,:), intent(inout) :: du3dt_ccpp, dv3dt_ccpp - real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt_ccpp, dq3dt_ccpp + real(kind=kind_phys), dimension(:,:), intent(inout) :: & + dt3dt_ccpp,du3dt_ccpp,dv3dt_ccpp,dq3dt_ccpp, & + dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total integer, intent(in) :: im, levs, ntrac, kdt integer, intent(in) :: index_for_water_vapor @@ -40,7 +42,7 @@ subroutine model_tend_post_run(kdt, & character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys) :: dt + real(kind=kind_phys) :: dt, change integer :: i,k ! Initialize CCPP error handling variables @@ -79,11 +81,22 @@ subroutine model_tend_post_run(kdt, & q_end(i,k) = gq0_water_vapor(i,k) endif if(t_end(i,k)>1e-3 .and. t_start(i,k)>1e-3) then - dt3dt_ccpp(i,k) = dt3dt_ccpp(i,k) + t_end(i,k)-t_start(i,k) - du3dt_ccpp(i,k) = du3dt_ccpp(i,k) + u_end(i,k)-u_start(i,k) - dv3dt_ccpp(i,k) = dv3dt_ccpp(i,k) + v_end(i,k)-v_start(i,k) + change=t_end(i,k)-t_start(i,k) + dt3dt_ccpp(i,k) = dt3dt_ccpp(i,k) + change + !dt3dt_total(i,k) = dt3dt_total(i,k) + change + + change=u_end(i,k)-u_start(i,k) + du3dt_ccpp(i,k) = du3dt_ccpp(i,k) + change + !du3dt_total(i,k) = du3dt_total(i,k) + change + + change=v_end(i,k)-v_start(i,k) + dv3dt_ccpp(i,k) = dv3dt_ccpp(i,k) + change + !dv3dt_total(i,k) = dv3dt_total(i,k) + change + if(qdiag3d) then - dq3dt_ccpp(i,k) = dq3dt_ccpp(i,k) + q_end(i,k)-q_start(i,k) + change=q_end(i,k)-q_start(i,k) + dq3dt_ccpp(i,k) = dq3dt_ccpp(i,k) + change + !dq3dt_total(i,k) = dq3dt_total(i,k) + change endif endif enddo diff --git a/physics/model_tend_post.meta b/physics/model_tend_post.meta index a97fa4dad..8a730059f 100644 --- a/physics/model_tend_post.meta +++ b/physics/model_tend_post.meta @@ -143,6 +143,38 @@ type = real kind = kind_phys intent = inout +[dt3dt_total] + standard_name = cumulative_change_in_temperature + long_name = cumulative change in temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[du3dt_total] + standard_name = cumulative_change_in_x_wind + long_name = cumulative change in x wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_total] + standard_name = cumulative_change_in_y_wind + long_name = cumulative change in y wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_total] + standard_name = cumulative_change_in_water_vapor_specific_humidity + long_name = cumulative change in water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/model_tend_pre.F90 b/physics/model_tend_pre.F90 index e3a9db943..198a0ac75 100644 --- a/physics/model_tend_pre.F90 +++ b/physics/model_tend_pre.F90 @@ -15,12 +15,62 @@ end subroutine model_tend_pre_init subroutine model_tend_pre_finalize() end subroutine model_tend_pre_finalize +! subroutine model_tend_pre_run(diag, statein, stateout, control, & +! errmsg, errflg) +! implicit none +! use GFS_typedefs, only: GFS_statein_type, GFS_stateout_type, GFS_diag_type, GFS_control_type + +! type(GFS_diag_type), intent(inout) :: diag +! type(GFS_statein_type), intent(in) :: statein +! type(GFS_stateout_type), intent(in) :: stateout +! type(GFS_control_type), intent(in) :: control + +! character(len=*), intent(out) :: errmsg +! integer, intent(out) :: errflg + +! integer :: i, k + +! ! Initialize CCPP error handling variables +! errmsg = '' +! errflg = 0 + +! print *,'in model_tend_pre_run' + +! if(control%Lssav .and. control%ldiag3d) then +! do k=1,control%levs +! do i=1,control%im +! diag%t_start(i,k) = statein%tgrs(i,k) +! diag%u_start(i,k) = statein%ugrs(i,k) +! v_start(i,k) = vgrs(i,k) +! if(qdiag3d) then +! q_start(i,k) = qvgrs(i,k) +! endif +! if(t_start(i,k)>1e-3 .and. t_end(i,k)>1e-3) then +! dt3dt_model(i,k) = dt3dt_model(i,k) + (t_start(i,k)-t_end(i,k)) +! du3dt_model(i,k) = du3dt_model(i,k) + (u_start(i,k)-u_end(i,k)) +! dv3dt_model(i,k) = dv3dt_model(i,k) + (v_start(i,k)-v_end(i,k)) +! if(qdiag3d) then +! dq3dt_model(i,k) = dq3dt_model(i,k) + (q_start(i,k)-q_end(i,k)) +! endif +! endif +! enddo +! enddo +! endif + +! end subroutine model_tend_pre_run + + + !> \section arg_table_model_tend_pre_run Argument Table !! \htmlinclude model_tend_pre_run.html !! + subroutine model_tend_pre_run(dtp, kdt, & - tgrs,ugrs,vgrs,qvgrs, t_start,u_start,v_start,q_start, & + tgrs,ugrs,vgrs,qvgrs, & + gt0,gu0,gv0, gq0_water_vapor, & + t_start,u_start,v_start,q_start, & dt3dt_model,du3dt_model,dv3dt_model,dq3dt_model, & + dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total, & t_end,u_end,v_end,q_end, & im, levs, ntrac, & lssav, ldiag3d, qdiag3d, errmsg,errflg) @@ -28,22 +78,24 @@ subroutine model_tend_pre_run(dtp, kdt, & implicit none real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, ugrs, vgrs, qvgrs + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, gu0, gv0, gq0_water_vapor real(kind=kind_phys), dimension(:,:), intent(out) :: t_start, u_start, v_start real(kind=kind_phys), dimension(:,:), intent(out) :: q_start real(kind=kind_phys), dimension(:,:), intent(out) :: t_end, u_end, v_end real(kind=kind_phys), dimension(:,:), intent(out) :: q_end real(kind=kind_phys), dimension(:,:), intent(inout) :: & - dt3dt_model,du3dt_model,dv3dt_model,dq3dt_model + dt3dt_model,du3dt_model,dv3dt_model,dq3dt_model, & + dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total integer, intent(in) :: im, levs, ntrac, kdt logical, intent(in) :: lssav, qdiag3d, ldiag3d - real(kind=kind_phys) :: dtp + real(kind=kind_phys) :: dtp, change character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - + logical :: logical integer :: i, k ! Initialize CCPP error handling variables @@ -52,9 +104,17 @@ subroutine model_tend_pre_run(dtp, kdt, & print *,'in model_tend_pre_run' + logical = .false. + if(Lssav .and. ldiag3d) then do k=1,levs do i=1,im + ! t_start(i,k) = gt0(i,k) + ! u_start(i,k) = gu0(i,k) + ! v_start(i,k) = gv0(i,k) + ! if(qdiag3d) then + ! q_start(i,k) = gq0_water_vapor(i,k) + ! endif t_start(i,k) = tgrs(i,k) u_start(i,k) = ugrs(i,k) v_start(i,k) = vgrs(i,k) @@ -62,11 +122,25 @@ subroutine model_tend_pre_run(dtp, kdt, & q_start(i,k) = qvgrs(i,k) endif if(t_start(i,k)>1e-3 .and. t_end(i,k)>1e-3) then - dt3dt_model(i,k) = dt3dt_model(i,k) + (t_start(i,k)-t_end(i,k)) - du3dt_model(i,k) = du3dt_model(i,k) + (u_start(i,k)-u_end(i,k)) - dv3dt_model(i,k) = dv3dt_model(i,k) + (v_start(i,k)-v_end(i,k)) - if(qdiag3d) then - dq3dt_model(i,k) = dq3dt_model(i,k) + (q_start(i,k)-q_end(i,k)) + if(t_end(i,k)/=t_start(i,k)) then + logical=.true. + change=t_start(i,k)-t_end(i,k) + dt3dt_model(i,k) = dt3dt_model(i,k) + change + !dt3dt_total(i,k) = dt3dt_total(i,k) + change + + change=u_start(i,k)-u_end(i,k) + du3dt_model(i,k) = du3dt_model(i,k) + change + !du3dt_total(i,k) = du3dt_total(i,k) + change + + change=v_start(i,k)-v_end(i,k) + dv3dt_model(i,k) = dv3dt_model(i,k) + change + !dv3dt_total(i,k) = dv3dt_total(i,k) + change + + if(qdiag3d) then + change=q_start(i,k)-q_end(i,k) + dq3dt_model(i,k) = dq3dt_model(i,k) + change + !dq3dt_total(i,k) = dq3dt_total(i,k) + change + endif endif endif enddo diff --git a/physics/model_tend_pre.meta b/physics/model_tend_pre.meta index 0cbb9b4e9..7ec047161 100644 --- a/physics/model_tend_pre.meta +++ b/physics/model_tend_pre.meta @@ -60,6 +60,38 @@ type = real kind = kind_phys intent = in +[gt0] + standard_name = air_temperature_updated_by_physics + long_name = temperature updated by physics + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gu0] + standard_name = x_wind_updated_by_physics + long_name = zonal wind updated by physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gv0] + standard_name = y_wind_updated_by_physics + long_name = meridional wind updated by physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gq0_water_vapor] + standard_name = water_vapor_specific_humidity_updated_by_physics + long_name = water vapor specific humidity updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in [t_start] standard_name = temperature_at_start_of_ccpp long_name = temperature at start of ccpp @@ -124,6 +156,38 @@ type = real kind = kind_phys intent = inout +[dt3dt_total] + standard_name = cumulative_change_in_temperature + long_name = cumulative change in temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[du3dt_total] + standard_name = cumulative_change_in_x_wind + long_name = cumulative change in x wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_total] + standard_name = cumulative_change_in_y_wind + long_name = cumulative change in y wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_total] + standard_name = cumulative_change_in_water_vapor_specific_humidity + long_name = cumulative change in water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout [t_end] standard_name = temperature_at_end_of_ccpp long_name = temperature at end of ccpp diff --git a/physics/total_tend.F90 b/physics/total_tend.F90 index 7950c6b90..8369c304b 100644 --- a/physics/total_tend.F90 +++ b/physics/total_tend.F90 @@ -21,11 +21,13 @@ end subroutine total_tend_finalize subroutine total_tend_run(dtp, kdt, & tgrs,ugrs,vgrs,qvgrs, t_start,u_start,v_start,q_start, & dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total, & + gt0,gu0,gv0, gq0_water_vapor, & im, levs, ntrac, & lssav, ldiag3d, qdiag3d, errmsg,errflg) use machine, only: kind_phys implicit none + real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, gu0, gv0, gq0_water_vapor real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, ugrs, vgrs, qvgrs real(kind=kind_phys), dimension(:,:), intent(out) :: t_start, u_start, v_start real(kind=kind_phys), dimension(:,:), intent(out) :: q_start @@ -55,19 +57,36 @@ subroutine total_tend_run(dtp, kdt, & print *,'if = TRUE in total_tend_run' do k=1,levs do i=1,im - if(t_start(i,k)>1e-3 .and. tgrs(i,k)>1e-3) then + if(t_start(i,k)>1e-3 .and. gt0(i,k)>1e-3) then good=good+1 - dt3dt_total(i,k) = dt3dt_total(i,k) + tgrs(i,k)-t_start(i,k) - du3dt_total(i,k) = du3dt_total(i,k) + ugrs(i,k)-u_start(i,k) - dv3dt_total(i,k) = dv3dt_total(i,k) + vgrs(i,k)-v_start(i,k) + dt3dt_total(i,k) = dt3dt_total(i,k) + (gt0(i,k)-t_start(i,k)) + du3dt_total(i,k) = du3dt_total(i,k) + (gu0(i,k)-u_start(i,k)) + dv3dt_total(i,k) = dv3dt_total(i,k) + (gv0(i,k)-v_start(i,k)) if(qdiag3d) then - dq3dt_total(i,k) = dq3dt_total(i,k) + qvgrs(i,k)-q_start(i,k) + dq3dt_total(i,k) = dq3dt_total(i,k) + (gq0_water_vapor(i,k)-q_start(i,k)) endif endif - t_start(i,k)=tgrs(i,k) - u_start(i,k)=ugrs(i,k) - v_start(i,k)=vgrs(i,k) - q_start(i,k)=qvgrs(i,k) + t_start(i,k)=gt0(i,k) + u_start(i,k)=gu0(i,k) + v_start(i,k)=gv0(i,k) + if(qdiag3d) then + q_start(i,k)=gq0_water_vapor(i,k) + endif + ! if(t_start(i,k)>1e-3 .and. tgrs(i,k)>1e-3) then + ! good=good+1 + ! dt3dt_total(i,k) = dt3dt_total(i,k) + (tgrs(i,k)-t_start(i,k)) + ! du3dt_total(i,k) = du3dt_total(i,k) + (ugrs(i,k)-u_start(i,k)) + ! dv3dt_total(i,k) = dv3dt_total(i,k) + (vgrs(i,k)-v_start(i,k)) + ! if(qdiag3d) then + ! dq3dt_total(i,k) = dq3dt_total(i,k) + (qvgrs(i,k)-q_start(i,k)) + ! endif + ! endif + ! t_start(i,k)=tgrs(i,k) + ! u_start(i,k)=ugrs(i,k) + ! v_start(i,k)=vgrs(i,k) + ! if(qdiag3d) then + ! q_start(i,k)=qvgrs(i,k) + ! endif enddo enddo print *,'total tend valid points: ',good diff --git a/physics/total_tend.meta b/physics/total_tend.meta index 873bc1c61..82e49a081 100644 --- a/physics/total_tend.meta +++ b/physics/total_tend.meta @@ -124,6 +124,38 @@ type = real kind = kind_phys intent = inout +[gt0] + standard_name = air_temperature_updated_by_physics + long_name = temperature updated by physics + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gu0] + standard_name = x_wind_updated_by_physics + long_name = zonal wind updated by physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gv0] + standard_name = y_wind_updated_by_physics + long_name = meridional wind updated by physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in +[gq0_water_vapor] + standard_name = water_vapor_specific_humidity_updated_by_physics + long_name = water vapor specific humidity updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent From 8ba1c3c74ef8e19e8652480a626cd05ba2b03515 Mon Sep 17 00:00:00 2001 From: "andrew.hazelton" Date: Wed, 4 Mar 2020 21:45:58 +0000 Subject: [PATCH 050/404] Changes to EDMF-HAFS and EDMF-TKE to OutputEddy Diffusivity --- physics/moninedmf_hafs.f | 11 +++++++++-- physics/moninedmf_hafs.meta | 9 +++++++++ physics/satmedmfvdifq.F | 11 +++++++++-- physics/satmedmfvdifq.meta | 9 +++++++++ 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/physics/moninedmf_hafs.f b/physics/moninedmf_hafs.f index 5c6ff85a8..2bc682909 100644 --- a/physics/moninedmf_hafs.f +++ b/physics/moninedmf_hafs.f @@ -64,7 +64,7 @@ subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & prsi,del,prsl,prslk,phii,phil,delt,dspheat, & & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & - & xkzminv,moninq_fac,islimsk,errmsg,errflg) + & xkzminv,moninq_fac,islimsk,dkudiagnostic,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -144,7 +144,7 @@ subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & ti(im,km-1), shr2(im,km-1), & & al(im,km-1), ad(im,km), & & au(im,km-1), a1(im,km), & - & a2(im,km*ntrac) + & a2(im,km*ntrac), dkudiagnostic(im,km-1) ! real(kind=kind_phys) tcko(im,km), qcko(im,km,ntrac), & & ucko(im,km), vcko(im,km), xmf(im,km) @@ -1395,6 +1395,13 @@ subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! enddo enddo + + do k = 1,km1 + do i=1,im + dkudiagnostic(i,k) = dku(i,k) + enddo + enddo + ! ! solve tridiagonal problem for momentum ! diff --git a/physics/moninedmf_hafs.meta b/physics/moninedmf_hafs.meta index bc1461ada..f22ccbb25 100644 --- a/physics/moninedmf_hafs.meta +++ b/physics/moninedmf_hafs.meta @@ -507,6 +507,15 @@ type = integer intent = in optional = F +[dkudiagnostic] + standard_name = atmosphere_momentum_diffusivity + long_name = diffusivity for momentum + units = m2 s-1 + dimensions = (horizontal_dimension,vertical_dimension_minus_one) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index 546cefca6..0fd44ac0b 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -65,7 +65,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & & prsi,del,prsl,prslk,phii,phil,delt, & & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & & kinver,xkzm_m,xkzm_h,xkzm_s,dspfac,bl_upfr,bl_dnfr, & - & errmsg,errflg) + & dkudiagnostic,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -123,7 +123,8 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & & slx(im,km), svx(im,km), qtx(im,km), & tvx(im,km), pix(im,km), radx(im,km-1), & dku(im,km-1),dkt(im,km-1), dkq(im,km-1), - & cku(im,km-1),ckt(im,km-1) + & cku(im,km-1),ckt(im,km-1), + & dkudiagnostic(im,km-1) ! real(kind=kind_phys) plyr(im,km), rhly(im,km), cfly(im,km), & qstl(im,km) @@ -1383,6 +1384,12 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & ! enddo enddo + + do k = 1,km1 + do i=1,im + dkudiagnostic(i,k) = dku(i,k) + enddo + enddo c c solve tridiagonal problem for momentum c diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index ec679faec..b63e3ae40 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -578,6 +578,15 @@ kind = kind_phys intent = in optional = F +[dkudiagnostic] + standard_name = atmosphere_momentum_diffusivity + long_name = diffusivity for momentum + units = m2 s-1 + dimensions = (horizontal_dimension,vertical_dimension_minus_one) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From abde3d01f61e20a64e6605f8ac2dfd7a9aff6fba Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Wed, 4 Mar 2020 22:28:16 +0000 Subject: [PATCH 051/404] Remove debug prints and commented-out code. One piece of commented-out code is retained, and this commit adds an explanatory comment --- physics/GFS_SCNV_generic.F90 | 5 ---- physics/model_tend_post.F90 | 22 ----------------- physics/model_tend_pre.F90 | 46 ------------------------------------ physics/total_tend.F90 | 5 +--- 4 files changed, 1 insertion(+), 77 deletions(-) diff --git a/physics/GFS_SCNV_generic.F90 b/physics/GFS_SCNV_generic.F90 index 5496d0f48..82b0818fd 100644 --- a/physics/GFS_SCNV_generic.F90 +++ b/physics/GFS_SCNV_generic.F90 @@ -36,7 +36,6 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, errflg = 0 save_fields: if (ldiag3d .and. flag_for_scnv_generic_tend) then - print *,'save fields in GFS_SCNV_generic_pre_run' do k=1,levs do i=1,im save_u(i,k) = gu0(i,k) @@ -137,10 +136,6 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl endif update_cnvw_cnvc diagtend: if (lssav .and. flag_for_scnv_generic_tend) then - print *,'diagtend in GFS_SCNV_generic.F90' - if(frain<1e-5) then - print *,'bad frain: ',frain - endif if (ldiag3d) then do k=1,levs do i=1,im diff --git a/physics/model_tend_post.F90 b/physics/model_tend_post.F90 index a06997f5e..0ff43f9eb 100644 --- a/physics/model_tend_post.F90 +++ b/physics/model_tend_post.F90 @@ -49,29 +49,7 @@ subroutine model_tend_post_run(kdt, & errmsg = '' errflg = 0 - print *, 'in model_tend_post_run' - diag_enabled: if(lssav .and. ldiag3d) then - if(any(gt0(1:im,1:levs)<1e-3)) then - print *,'error: temperatures less than 1e-3' - endif - if(all(abs(gu0(1:im,1:levs))<1e-3)) then - print *,'error: all u wind is near zero' - endif - if(all(abs(gv0(1:im,1:levs))<1e-3)) then - print *,'error: all v wind is near zero' - endif - - if(any(t_start(1:im,1:levs)<1e-3)) then - print *,'error: start temperatures less than 1e-3' - endif - if(all(abs(u_start(1:im,1:levs))<1e-3)) then - print *,'error: all start u wind is near zero' - endif - if(all(abs(v_start(1:im,1:levs))<1e-3)) then - print *,'error: all start v wind is near zero' - endif - do k=1,levs do i=1,im t_end(i,k) = gt0(i,k) diff --git a/physics/model_tend_pre.F90 b/physics/model_tend_pre.F90 index 198a0ac75..f88b4d789 100644 --- a/physics/model_tend_pre.F90 +++ b/physics/model_tend_pre.F90 @@ -15,52 +15,6 @@ end subroutine model_tend_pre_init subroutine model_tend_pre_finalize() end subroutine model_tend_pre_finalize -! subroutine model_tend_pre_run(diag, statein, stateout, control, & -! errmsg, errflg) -! implicit none -! use GFS_typedefs, only: GFS_statein_type, GFS_stateout_type, GFS_diag_type, GFS_control_type - -! type(GFS_diag_type), intent(inout) :: diag -! type(GFS_statein_type), intent(in) :: statein -! type(GFS_stateout_type), intent(in) :: stateout -! type(GFS_control_type), intent(in) :: control - -! character(len=*), intent(out) :: errmsg -! integer, intent(out) :: errflg - -! integer :: i, k - -! ! Initialize CCPP error handling variables -! errmsg = '' -! errflg = 0 - -! print *,'in model_tend_pre_run' - -! if(control%Lssav .and. control%ldiag3d) then -! do k=1,control%levs -! do i=1,control%im -! diag%t_start(i,k) = statein%tgrs(i,k) -! diag%u_start(i,k) = statein%ugrs(i,k) -! v_start(i,k) = vgrs(i,k) -! if(qdiag3d) then -! q_start(i,k) = qvgrs(i,k) -! endif -! if(t_start(i,k)>1e-3 .and. t_end(i,k)>1e-3) then -! dt3dt_model(i,k) = dt3dt_model(i,k) + (t_start(i,k)-t_end(i,k)) -! du3dt_model(i,k) = du3dt_model(i,k) + (u_start(i,k)-u_end(i,k)) -! dv3dt_model(i,k) = dv3dt_model(i,k) + (v_start(i,k)-v_end(i,k)) -! if(qdiag3d) then -! dq3dt_model(i,k) = dq3dt_model(i,k) + (q_start(i,k)-q_end(i,k)) -! endif -! endif -! enddo -! enddo -! endif - -! end subroutine model_tend_pre_run - - - !> \section arg_table_model_tend_pre_run Argument Table !! \htmlinclude model_tend_pre_run.html !! diff --git a/physics/total_tend.F90 b/physics/total_tend.F90 index 8369c304b..24d5c92ef 100644 --- a/physics/total_tend.F90 +++ b/physics/total_tend.F90 @@ -51,10 +51,7 @@ subroutine total_tend_run(dtp, kdt, & good=0 - print *,'entered total_tend_run' - if(Lssav .and. ldiag3d) then - print *,'if = TRUE in total_tend_run' do k=1,levs do i=1,im if(t_start(i,k)>1e-3 .and. gt0(i,k)>1e-3) then @@ -72,6 +69,7 @@ subroutine total_tend_run(dtp, kdt, & if(qdiag3d) then q_start(i,k)=gq0_water_vapor(i,k) endif + ! Alternative is to use the state in: ! if(t_start(i,k)>1e-3 .and. tgrs(i,k)>1e-3) then ! good=good+1 ! dt3dt_total(i,k) = dt3dt_total(i,k) + (tgrs(i,k)-t_start(i,k)) @@ -89,7 +87,6 @@ subroutine total_tend_run(dtp, kdt, & ! endif enddo enddo - print *,'total tend valid points: ',good endif end subroutine total_tend_run From f8eb82ca3da1e4dfd8665064998ff02279107002 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Thu, 5 Mar 2020 12:39:17 +0000 Subject: [PATCH 052/404] minot changes in sfcsub --- physics/sfcsub.F | 246 +++++++++++++++++++++++------------------------ 1 file changed, 121 insertions(+), 125 deletions(-) diff --git a/physics/sfcsub.F b/physics/sfcsub.F index c0bb760f1..f9c3af1f7 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -67,7 +67,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & &, tsffcs,snofcs,zorfcs,albfcs,tg3fcs & &, cnpfcs,smcfcs,stcfcs,slifcs,aisfcs & &, vegfcs,vetfcs,sotfcs,alffcs & - &, cvfcs,cvbfcs,cvtfcs,me,nlunit & + &, cvfcs,cvbfcs,cvtfcs,me,nlunit & &, sz_nml,input_nml_file & &, lake, min_lakeice, min_seaice & &, ialb,isot,ivegsrc,tile_num_ch,i_index,j_index) @@ -152,7 +152,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & &, sihnew integer imsk,jmsk,ifp,irtscv,irtacn,irtais,irtsno,irtzor, & - & irtalb,irtsot,irtalf,j,irtvet,irtsmc,irtstc,irtveg, & + & irtalb,irtsot,irtalf,j,irtvet,irtsmc,irtstc,irtveg, & & irtwet,k,iprnt,kk,irttsf,iret,i,igrdbg,iy,im,id, & & icalbl,icalbs,icalfl,ictsfs,lugb,len,lsoil,ih, & & ictsfl,iczors,icplrl,icplrs,iczorl,icalfs,icsnol, & @@ -578,7 +578,6 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! qced in the forecast program) ! logical :: ldebug, lqcbgs, lprnt - real :: tem ! ! debug only ! @@ -842,7 +841,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! deltf = deltsfc / 24.0 ! - ctsfl=0. !... tsfc over land + ctsfl = 0. !... tsfc over land if (ftsfl >= 99999.) ctsfl = 1. if (ftsfl > 0. .and. ftsfl < 99999) ctsfl = exp(-deltf/ftsfl) ! @@ -1256,16 +1255,16 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add smcclm(3:4) if(lsoil > 2) then - call qcmxmn('smc3c ',smcclm(1,3),sliclm,snoclm,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc4c ',smcclm(1,4),sliclm,snoclm,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('smc3c ',smcclm(1,3),sliclm,snoclm,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('smc4c ',smcclm(1,4),sliclm,snoclm,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) endif - if(fnstcc(1:8) == ' ') then + if (fnstcc(1:8) == ' ') then call getstc(tsfclm,tg3clm,sliclm,len,lsoil,stcclm,tsfimx) endif call qcmxmn('stc1c ',stcclm(1,1),sliclm,snoclm,icefl1, @@ -1277,15 +1276,15 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add stcclm(3:4) - if(lsoil > 2) then - call qcmxmn('stc3c ',stcclm(1,3),sliclm,snoclm,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc4c ',stcclm(1,4),sliclm,snoclm,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) + if (lsoil > 2) then + call qcmxmn('stc3c ',stcclm(1,3),sliclm,snoclm,icefl1, + & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, + & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('stc4c ',stcclm(1,4),sliclm,snoclm,icefl1, + & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, + & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, + & rla,rlo,len,kqcm,percrit,lgchek,me) endif call qcmxmn('vegc ',vegclm,sliclm,snoclm,icefl1, & veglmx,veglmn,vegomx,vegomn,vegimx,vegimn, @@ -1579,7 +1578,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! quality control of snow and sea-ice ! process snow depth or snow cover ! - if(fnsnoa(1:8) /= ' ') then + if (fnsnoa(1:8) /= ' ') then call setzro(snoanl,epssno,len) call qcsnow(snoanl,slmask,aisanl,glacir,len,ten,landice,me) if (.not.landice) then @@ -1627,7 +1626,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & albjmx,albjmn,albsmx,albsmn,epsalb, & rla,rlo,len,kqcm,percrit,lgchek,me) enddo - if(fnwetc(1:8).ne.' ' .or. fnweta(1:8).ne.' ' ) then + if(fnwetc(1:8) /= ' ' .or. fnweta(1:8) /= ' ' ) then call qcmxmn('weta ',wetanl,slianl,snoanl,icefl1, & wetlmx,wetlmn,wetomx,wetomn,wetimx,wetimn, & wetjmx,wetjmn,wetsmx,wetsmn,epswet, @@ -1662,15 +1661,15 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add smcanl(3:4) - if(lsoil > 2) then - call qcmxmn('smc3a ',smcanl(1,3),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc4a ',smcanl(1,4),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) + if (lsoil > 2) then + call qcmxmn('smc3a ',smcanl(1,3),slianl,snoanl,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('smc4a ',smcanl(1,4),slianl,snoanl,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) endif if(fnstca(1:8) == ' ') then call getstc(tsfanl,tg3anl,slianl,len,lsoil,stcanl,tsfimx) @@ -1684,15 +1683,15 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add stcanl(3:4) - if(lsoil > 2) then - call qcmxmn('stc3a ',stcanl(1,3),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc4a ',stcanl(1,4),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) + if (lsoil > 2) then + call qcmxmn('stc3a ',stcanl(1,3),slianl,snoanl,icefl1, + & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, + & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('stc4a ',stcanl(1,4),slianl,snoanl,icefl1, + & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, + & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, + & rla,rlo,len,kqcm,percrit,lgchek,me) endif call qcmxmn('vega ',veganl,slianl,snoanl,icefl1, & veglmx,veglmn,vegomx,vegomn,vegimx,vegimn, @@ -1808,7 +1807,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & !clu [+1l] add ()anl for vmn, vmx, slp, abs & vmnanl,vmxanl,slpanl,absanl, & len,lsoil) - if(sig1t(1) /= 0.) then + if (sig1t(1) /= 0.) then call usesgt(sig1t,slianl,tg3anl,len,lsoil,tsffcs,stcfcs, & tsfimx) do i=1,len @@ -1867,7 +1866,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & enddo !clu ----------------------------------------------------------------------- ! - if(lqcbgs .and. irtacn == 0) then + if (lqcbgs .and. irtacn == 0) then call qcsli(slianl,slifcs,len,me) call albocn(albfcs,slmask,albomx,len) do i=1,len @@ -1927,15 +1926,15 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add smcfcs(3:4) - if(lsoil.gt.2) then - call qcmxmn('smc3f ',smcfcs(1,3),slifcs,snofcs,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc4f ',smcfcs(1,4),slifcs,snofcs,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) + if (lsoil > 2) then + call qcmxmn('smc3f ',smcfcs(1,3),slifcs,snofcs,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('smc4f ',smcfcs(1,4),slifcs,snofcs,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) endif call qcmxmn('stc1f ',stcfcs(1,1),slifcs,snofcs,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, @@ -1946,15 +1945,15 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add stcfcs(3:4) - if(lsoil.gt.2) then - call qcmxmn('stc3f ',stcfcs(1,3),slifcs,snofcs,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc4f ',stcfcs(1,4),slifcs,snofcs,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) + if (lsoil > 2) then + call qcmxmn('stc3f ',stcfcs(1,3),slifcs,snofcs,icefl1, + & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, + & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('stc4f ',stcfcs(1,4),slifcs,snofcs,icefl1, + & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, + & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, + & rla,rlo,len,kqcm,percrit,lgchek,me) endif call qcmxmn('vegf ',vegfcs,slifcs,snofcs,icefl1, & veglmx,veglmn,vegomx,vegomn,vegimx,vegimn, @@ -2006,7 +2005,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('stcfcs1',stcfcs(1,1),slifcs,snofcs,len) call monitr('stcfcs2',stcfcs(1,2),slifcs,snofcs,len) !clu [+4l] add smcfcs(3:4) and stcfcs(3:4) - if(lsoil.gt.2) then + if (lsoil > 2) then call monitr('smcfcs3',smcfcs(1,3),slifcs,snofcs,len) call monitr('smcfcs4',smcfcs(1,4),slifcs,snofcs,len) call monitr('stcfcs3',stcfcs(1,3),slifcs,snofcs,len) @@ -2170,25 +2169,25 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) !clu [+8l] add stcanl(3:4) - if(lsoil > 2) then - call qcmxmn('stc3m ',stcanl(1,3),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc4m ',stcanl(1,4),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc3m ',smcanl(1,3),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc4m ',smcanl(1,4),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) + if (lsoil > 2) then + call qcmxmn('stc3m ',stcanl(1,3),slianl,snoanl,icefl1, + & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, + & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('stc4m ',stcanl(1,4),slianl,snoanl,icefl1, + & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, + & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('smc3m ',smcanl(1,3),slianl,snoanl,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) + call qcmxmn('smc4m ',smcanl(1,4),slianl,snoanl,icefl1, + & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, + & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, + & rla,rlo,len,kqcm,percrit,lgchek,me) endif - kqcm=1 + kqcm = 1 call qcmxmn('vegm ',veganl,slianl,snoanl,icefl1, & veglmx,veglmn,vegomx,vegomn,vegimx,vegimn, & vegjmx,vegjmn,vegsmx,vegsmn,epsveg, @@ -2275,13 +2274,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('stcanl1',stcanl(1,1),slianl,snoanl,len) call monitr('stcanl2',stcanl(1,2),slianl,snoanl,len) !clu [+4l] add smcanl(3:4) and stcanl(3:4) - if(lsoil.gt.2) then - call monitr('smcanl3',smcanl(1,3),slianl,snoanl,len) - call monitr('smcanl4',smcanl(1,4),slianl,snoanl,len) - call monitr('stcanl3',stcanl(1,3),slianl,snoanl,len) - call monitr('stcanl4',stcanl(1,4),slianl,snoanl,len) - call monitr('tg3anl',tg3anl,slianl,snoanl,len) - call monitr('zoranl',zoranl,slianl,snoanl,len) + if (lsoil > 2) then + call monitr('smcanl3',smcanl(1,3),slianl,snoanl,len) + call monitr('smcanl4',smcanl(1,4),slianl,snoanl,len) + call monitr('stcanl3',stcanl(1,3),slianl,snoanl,len) + call monitr('stcanl4',stcanl(1,4),slianl,snoanl,len) + call monitr('tg3anl',tg3anl,slianl,snoanl,len) + call monitr('zoranl',zoranl,slianl,snoanl,len) endif ! if (gaus) then call monitr('cvaanl',cvanl ,slianl,snoanl,len) @@ -2361,11 +2360,11 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('stcanl1',stcfcs(1,1),slianl,snoanl,len) call monitr('stcanl2',stcfcs(1,2),slianl,snoanl,len) !clu [+4l] add smcfcs(3:4) and stc(3:4) - if(lsoil.gt.2) then - call monitr('smcanl3',smcfcs(1,3),slianl,snoanl,len) - call monitr('smcanl4',smcfcs(1,4),slianl,snoanl,len) - call monitr('stcanl3',stcfcs(1,3),slianl,snoanl,len) - call monitr('stcanl4',stcfcs(1,4),slianl,snoanl,len) + if (lsoil > 2) then + call monitr('smcanl3',smcfcs(1,3),slianl,snoanl,len) + call monitr('smcanl4',smcfcs(1,4),slianl,snoanl,len) + call monitr('stcanl3',stcfcs(1,3),slianl,snoanl,len) + call monitr('stcanl4',stcfcs(1,4),slianl,snoanl,len) endif call monitr('tg3dif',tg3fcs,slianl,snoanl,len) call monitr('zordif',zorfcs,slianl,snoanl,len) @@ -2447,10 +2446,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & endif if (slifcs(i) >= 2.) then if (sicfcs(i) > crit) then - tem = 1.0 / sicfcs(i) + tem1 = 1.0 / sicfcs(i) tsffcs(i) = (sicanl(i)*tsffcs(i) - & + (sicfcs(i)-sicanl(i))*tgice) * tem - sitfcs(i) = (tsffcs(i)-tgice*(1.0-sicfcs(i))) * tem + & + (sicfcs(i)-sicanl(i))*tgice) * tem1 + sitfcs(i) = (tsffcs(i)-tgice*(1.0-sicfcs(i))) * tem1 else tsffcs(i) = tsfanl(i) ! tsffcs(i) = tgice @@ -2535,7 +2534,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & do i = 1, len if(slifcs(i) == 1.) then if(snofcs(i) /= 0. .and. swdfcs(i) == 0.) then - print *,'dbgx --scale snwdph from sheleg', + print *,'dbgx --scale snwdph from sheleg', & & i, swdfcs(i), snofcs(i) swdfcs(i) = 10.* snofcs(i) endif @@ -2857,8 +2856,7 @@ subroutine fixrdg(lugb,idim,jdim,fngrib, & !>\ingroup mod_sfcsub !! This subroutine get area of the grib record. - subroutine getarea(kgds,dlat,dlon,rslat,rnlat,wlon,elon,ijordr & - &, me) + subroutine getarea(kgds,dlat,dlon,rslat,rnlat,wlon,elon,ijordr,me) use machine , only : kind_io8,kind_io4 implicit none integer j,me,kgds11 @@ -3749,7 +3747,7 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & & kpdtg3,kpdscv,kpdacn,kpdsmc,kpdstc,kpdveg, & & kprvet,kpdsot,kpdalf, & & kpdvmn,kpdvmx,kpdslp,kpdabs, & !clu [+1l] add kpd() for vmn, vmx, slp, abs - & irttsf,irtwet,irtsno,irtzor,irtalb,irtais, & + & irttsf,irtwet,irtsno,irtzor,irtalb,irtais, & !cggg snow mods & irttg3,irtscv,irtacn,irtsmc,irtstc,irtveg, & & irtvet,irtsot,irtalf & &, irtvmn,irtvmx,irtslp,irtabs & !clu [+1l] add irt() for vmn, vmx, slp, abs @@ -3840,36 +3838,36 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & endif else do i=1,len - tsfan0(i)=-999.9 + tsfan0(i) = -999.9 enddo endif ! ! albedo ! - irtalb=0 + irtalb = 0 if(fnalba(1:8).ne.' ') then do kk = 1, 4 call fixrda(lugb,fnalba,kpdalb(kk),slmask, & iy,im,id,ih,fh,albanl(1,kk),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) - irtalb=iret - if(iret.eq.1) then + irtalb = iret + if(iret == 1) then write(6,*) 'albedo analysis read error' call abort - elseif(iret.eq.-1) then - if (me .eq. 0) then + elseif(iret == -1) then + if (me == 0) then print *,'old albedo analysis provided, indicating proper', & ' file name is given. no error suspected.' write(6,*) 'forecast guess will be used' endif else - if (me .eq. 0 .and. kk .eq. 4) + if (me == 0 .and. kk == 4) & print *,'albedo analysis provided.' endif enddo else - if (me .eq. 0) then + if (me == 0) then ! print *,'************************************************' print *,'no albedo analysis available. climatology used' endif @@ -3877,30 +3875,30 @@ subroutine analy(lugb,iy,im,id,ih,fh,len,lsoil, & ! ! vegetation fraction for albedo ! - irtalf=0 + irtalf = 0 if(fnalba(1:8).ne.' ') then do kk = 1, 2 call fixrda(lugb,fnalba,kpdalf(kk),slmask, & iy,im,id,ih,fh,alfanl(1,kk),len,iret &, imsk, jmsk, slmskh, gaus,blno, blto &, outlat, outlon, me) - irtalf=iret - if(iret.eq.1) then + irtalf = iret + if(iret == 1) then write(6,*) 'albedo analysis read error' call abort - elseif(iret.eq.-1) then - if (me .eq. 0) then + elseif(iret == -1) then + if (me == 0) then print *,'old albedo analysis provided, indicating proper', & ' file name is given. no error suspected.' write(6,*) 'forecast guess will be used' endif else - if (me .eq. 0 .and. kk .eq. 4) + if (me == 0 .and. kk == 4) & print *,'albedo analysis provided.' endif enddo else - if (me .eq. 0) then + if (me == 0) then ! print *,'************************************************' print *,'no vegfalbedo analysis available. climatology used' endif @@ -5395,7 +5393,7 @@ subroutine setlsi(slmask,aisfld,len,aicice,slifld) ! do i=1,len slifld(i) = slmask(i) - if(aisfld(i) == aicice .and. slmask(i) == 0.0) + if(aisfld(i) == aicice .and. slmask(i) == 0.0) & & slifld(i) = 2.0 enddo return @@ -6069,21 +6067,19 @@ subroutine qcsli(slianl,slifcs,len,me) !>\ingroup mod_sfcsub subroutine qcbyfc(tsffcs,snofcs,qctsfs,qcsnos,qctsfi, & & len,lsoil,snoanl,aisanl,slianl,tsfanl,albanl, & - & zoranl,smcanl, & - & smcclm,tsfsmx,albomx,zoromx, me) + & zoranl,smcanl,smcclm,tsfsmx,albomx,zoromx, me) ! use machine , only : kind_io8,kind_io4 implicit none integer kount,me,k,i,lsoil,len real (kind=kind_io8) zoromx,per,albomx,qctsfi,qcsnos,qctsfs,tsfsmx real (kind=kind_io8) tsffcs(len), snofcs(len) - real (kind=kind_io8) snoanl(len), aisanl(len), - & slianl(len), zoranl(len), - & tsfanl(len), albanl(len,4), - & smcanl(len,lsoil) - real (kind=kind_io8) smcclm(len,lsoil) + real (kind=kind_io8) snoanl(len), aisanl(len), & + & slianl(len), zoranl(len), & + & tsfanl(len), albanl(len,4), & + & smcanl(len,lsoil), smcclm(len,lsoil) ! - if (me .eq. 0) write(6,*) 'qc of snow and sea-ice analysis' + if (me == 0) write(6,*) 'qc of snow and sea-ice analysis' ! ! qc of snow analysis ! @@ -6091,7 +6087,7 @@ subroutine qcbyfc(tsffcs,snofcs,qctsfs,qcsnos,qctsfi, & ! kount = 0 do i=1,len - if(slianl(i).gt.0..and. + if(slianl(i).gt.0..and. & & tsffcs(i).gt.qctsfs.and.snoanl(i).gt.0.) then kount = kount + 1 snoanl(i) = 0. From ab6cb5ae9292efe62b1866f62783266d60a11c50 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Tue, 10 Mar 2020 19:26:24 +0000 Subject: [PATCH 053/404] correcting errors in ccpp when levr < levs; this fix is essential for Whole Atmosphere Model --- physics/GFS_rrtmg_post.F90 | 12 ++-- physics/GFS_rrtmg_pre.F90 | 138 +++++++++++++++--------------------- physics/GFS_rrtmg_setup.F90 | 4 +- physics/dcyc2.meta | 24 +++---- physics/moninedmf.meta | 12 ++-- physics/rrtmg_lw_post.F90 | 9 ++- physics/rrtmg_lw_pre.F90 | 4 +- physics/rrtmg_sw_post.F90 | 10 +-- physics/rrtmg_sw_pre.F90 | 6 +- physics/satmedmfvdif.meta | 12 ++-- physics/satmedmfvdifq.meta | 12 ++-- physics/ysuvdif.meta | 4 +- 12 files changed, 113 insertions(+), 134 deletions(-) diff --git a/physics/GFS_rrtmg_post.F90 b/physics/GFS_rrtmg_post.F90 index db3de4f44..498138d6c 100644 --- a/physics/GFS_rrtmg_post.F90 +++ b/physics/GFS_rrtmg_post.F90 @@ -44,12 +44,12 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & integer, intent(in) :: im, lm, ltp, kt, kb, kd, nday real(kind=kind_phys), intent(in) :: raddt - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: aerodp - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(in) :: mbota, mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: clouds1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: cldtausw - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: cldtaulw + real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: aerodp + real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: cldsa + integer, dimension(size(Grid%xlon,1),3), intent(in) :: mbota, mtopa + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: clouds1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: cldtausw + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: cldtaulw character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index aa1ea039e..679c1afa9 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -85,61 +85,40 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer, intent(out) :: kd, kt, kb ! F-A mp scheme only - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_ice - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_rain - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_rimef - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: cwm - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: flgmin + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: f_ice, & + f_rain, f_rimef + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: cwm + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: flgmin real(kind=kind_phys), intent(out) :: raddt + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: delp, & + dz, plyr, tlyr, qlyr, olyr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: delp - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: dz - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: plvl - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: plyr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: tlvl - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: tlyr - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfg - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfa - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: qlyr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: olyr - - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_n2o - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ch4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_o2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc11 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc12 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc22 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ccl4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc113 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw3 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw3 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds3 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds5 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds6 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds7 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds8 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds9 - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+1+LTP), intent(out) :: plvl, tlvl + + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfg, tsfa + + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: gasvmr_co2, & + gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & + gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113 + + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDSW), intent(out) :: faersw1, & + faersw2, faersw3 + + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDLW), intent(out) :: faerlw1, & + faerlw2, faerlw3 + + real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp + + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: clouds1, & + clouds2, clouds3, clouds4, clouds5, clouds6, clouds7, clouds8, clouds9 + + real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa + integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota, mtopa + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth, alb1d character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + integer, intent(out) :: errflg ! Local variables integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl, ncndl @@ -150,21 +129,21 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP) :: & htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & cldcov, deltaq, cnvc, cnvw, & effrl, effri, effrr, effrs - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db -! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP+1) :: tem2db +! real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP+1) :: hz - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,min(4,Model%ncnd)) :: ccnd - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,min(4,Model%ncnd)) :: ccnd + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,2:Model%ntrac) :: tracer1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NF_CLDS) :: clouds + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NF_VGAS) :: gasvmr + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDSW,NF_AESW) ::faersw + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDLW,NF_AELW) ::faerlw ! !===> ... begin here ! @@ -175,8 +154,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input if (.not. (Model%lsswr .or. Model%lslwr)) return !--- set commonly used integers - me = Model%me - NFXR = Model%nfxr + me = Model%me + NFXR = Model%nfxr NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) ntcw = Model%ntcw ntiw = Model%ntiw @@ -209,16 +188,16 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input llb = 1 ! local index at toa level lya = 2 ! local index for the 2nd layer from top lyb = 1 ! local index for the top layer - endif ! end if_ivflip_block + endif ! end if_ivflip_block else kd = 0 - if ( ivflip == 1 ) then ! vertical from sfc upward + if ( ivflip == 1 ) then ! vertical from sfc upward kt = 1 ! index diff between lyr and upper bound kb = 0 ! index diff between lyr and lower bound - else ! vertical from toa downward + else ! vertical from toa downward kt = 0 ! index diff between lyr and upper bound kb = 1 ! index diff between lyr and lower bound - endif ! end if_ivflip_block + endif ! end if_ivflip_block endif ! end if_lextop_block raddt = min(Model%fhswr, Model%fhlwr) @@ -247,7 +226,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input lsk = 0 if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm -! convert pressure unit from pa to mb +! convert pressure unit from pa to mb do k = 1, LM k1 = k + kd k2 = k + lsk @@ -275,38 +254,39 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo ! if (ivflip == 0) then ! input data from toa to sfc - do i = 1, IM - plvl(i,1+kd) = 0.01 * Statein%prsi(i,1) ! pa to mb (hpa) - enddo - if (lsk /= 0) then + if (lsk > 0) then + k1 = 1 + kd + k2 = k1 + kb do i = 1, IM - plvl(i,1+kd) = 0.5 * (plvl(i,2+kd) + plvl(i,1+kd)) + plvl(i,k2) = 0.01 * Statein%prsi(i,1+kb) ! pa to mb (hpa) + plyr(i,k1) = 0.5 * (plvl(i,k2+1) + plvl(i,k2)) + prslk1(i,k1) = (plyr(i,k1)*0.001) ** rocp enddo endif else ! input data from sfc to top - do i = 1, IM - plvl(i,LP1+kd) = 0.01 * Statein%prsi(i,LP1+lsk) ! pa to mb (hpa) - enddo - if (lsk /= 0) then + if (Model%levs > lm) then + k1 = lm + kd do i = 1, IM - plvl(i,LM+kd) = 0.5 * (plvl(i,LP1+kd) + plvl(i,LM+kd)) + plvl(i,k1+1) = 0.01 * Statein%prsi(i,Model%levs+1) ! pa to mb (hpa) + plyr(i,k1) = 0.5 * (plvl(i,k1+1) + plvl(i,k1)) + prslk1(i,k1) = (plyr(i,k1)*0.001) ** rocp enddo endif endif - +! if ( lextop ) then ! values for extra top layer do i = 1, IM plvl(i,llb) = prsmin if ( plvl(i,lla) <= prsmin ) plvl(i,lla) = 2.0*prsmin plyr(i,lyb) = 0.5 * plvl(i,lla) tlyr(i,lyb) = tlyr(i,lya) - prslk1(i,lyb) = (plyr(i,lyb)*0.00001) ** rocp ! plyr in Pa + prslk1(i,lyb) = (plyr(i,lyb)*0.001) ** rocp ! plyr in Pa rhly(i,lyb) = rhly(i,lya) qstl(i,lyb) = qstl(i,lya) enddo ! --- note: may need to take care the top layer amount - tracer1(:,lyb,:) = tracer1(:,lya,:) + tracer1(:,lyb,:) = tracer1(:,lya,:) endif diff --git a/physics/GFS_rrtmg_setup.F90 b/physics/GFS_rrtmg_setup.F90 index b6d86a34e..b3c91cacc 100644 --- a/physics/GFS_rrtmg_setup.F90 +++ b/physics/GFS_rrtmg_setup.F90 @@ -400,7 +400,7 @@ subroutine radinit( si, NLAY, imp_physics, me ) ! ! ! attributes: ! ! language: fortran 90 ! -! machine: wcoss ! +! machine: wcoss ! ! ! ! ==================== definition of variables ==================== ! ! ! @@ -683,7 +683,7 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr, me, & ! solcon : sun-earth distance adjusted solar constant (w/m2) ! ! ! ! external module variables: ! -! isolar : solar constant cntrl (in module physparam) ! +! isolar : solar constant cntrl (in module physparam) ! ! = 0: use the old fixed solar constant in "physcon" ! ! =10: use the new fixed solar constant in "physcon" ! ! = 1: use noaa ann-mean tsi tbl abs-scale with cycle apprx! diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index c4a8d9051..552264f52 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -183,37 +183,37 @@ intent = in optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - long_name = total sky shortwave heating rate on radiation time step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [swhc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step - long_name = clear sky shortwave heating rate on radiation time step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_timestep + long_name = clear sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - long_name = total sky longwave heating rate on radiation time step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [hlwc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - long_name = clear sky longwave heating rate on radiation time step + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep + long_name = clear sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 47875640f..5d75aea22 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -145,19 +145,19 @@ intent = in optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - long_name = total sky shortwave heating rate + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - long_name = total sky longwave heating rate + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_on_radiation_timestep + long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/rrtmg_lw_post.F90 b/physics/rrtmg_lw_post.F90 index 971b278dd..af83c5cc7 100644 --- a/physics/rrtmg_lw_post.F90 +++ b/physics/rrtmg_lw_post.F90 @@ -30,9 +30,8 @@ subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & type(GFS_grid_type), intent(in) :: Grid type(GFS_radtend_type), intent(inout) :: Radtend integer, intent(in) :: im, ltp, LM, kd - real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlwc - real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlw0 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa + real(kind=kind_phys), dimension(size(Grid%xlon,1), lm+LTP), intent(in) :: htlwc, htlw0 + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! local variables @@ -54,7 +53,7 @@ subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & enddo ! --- repopulate the points above levr if (lm < Model%levs) then - do k = lm,Model%levs + do k = lm+1,Model%levs Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) enddo endif @@ -66,7 +65,7 @@ subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & enddo ! --- repopulate the points above levr if (lm < Model%levs) then - do k = lm,Model%levs + do k = lm+1,Model%levs Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) enddo endif diff --git a/physics/rrtmg_lw_pre.F90 b/physics/rrtmg_lw_pre.F90 index 5f128a79a..7de02eed1 100644 --- a/physics/rrtmg_lw_pre.F90 +++ b/physics/rrtmg_lw_pre.F90 @@ -30,7 +30,7 @@ subroutine rrtmg_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errm type(GFS_sfcprop_type), intent(in) :: Sfcprop type(GFS_grid_type), intent(in) :: Grid integer, intent(in) :: im - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -44,7 +44,7 @@ subroutine rrtmg_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errm call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & tsfg, tsfa, Sfcprop%hprime(:,1), IM, & - Radtend%semis) ! --- outputs + Radtend%semis) ! --- outputs endif end subroutine rrtmg_lw_pre_run diff --git a/physics/rrtmg_sw_post.F90 b/physics/rrtmg_sw_post.F90 index e11491d48..b0ab31129 100644 --- a/physics/rrtmg_sw_post.F90 +++ b/physics/rrtmg_sw_post.F90 @@ -34,9 +34,9 @@ subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & type(GFS_radtend_type), intent(inout) :: Radtend type(GFS_grid_type), intent(in) :: Grid type(GFS_diag_type), intent(inout) :: Diag - integer, intent(in) :: im, lm, kd, nday, ltp - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: scmpsw - real(kind=kind_phys), dimension(Size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htswc, htsw0 + integer, intent(in) :: im, lm, kd, nday, ltp + type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: scmpsw + real(kind=kind_phys), dimension(Size(Grid%xlon,1), lm+LTP), intent(in) :: htswc, htsw0 real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -56,7 +56,7 @@ subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & ! We are assuming that radiative tendencies are from bottom to top ! --- repopulate the points above levr i.e. LM if (lm < Model%levs) then - do k = lm,Model%levs + do k = lm+1,Model%levs Radtend%htrsw (1:im,k) = Radtend%htrsw (1:im,LM) enddo endif @@ -68,7 +68,7 @@ subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & enddo ! --- repopulate the points above levr i.e. LM if (lm < Model%levs) then - do k = lm,Model%levs + do k = lm+1,Model%levs Radtend%swhc(1:im,k) = Radtend%swhc(1:im,LM) enddo endif diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index 8eeb16430..05e8d4c7b 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -35,7 +35,7 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & integer, intent(in) :: im integer, intent(out) :: nday integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d character(len=*), intent(out) :: errmsg @@ -73,12 +73,12 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & Sfcprop%tisfc, IM, & alb1d, Model%pertalb, & ! mg, sfc-perts - sfcalb) ! --- outputs + sfcalb) ! --- outputs !> -# Approximate mean surface albedo from vis- and nir- diffuse values. Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) else - nday = 0 + nday = 0 idxday = 0 sfcalb = 0.0 endif diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index 63480e01b..50668d204 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -249,19 +249,19 @@ intent = in optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - long_name = total sky shortwave heating rate + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - long_name = total sky longwave heating rate + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index ec679faec..6fa8b143b 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -249,19 +249,19 @@ intent = in optional = F [swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - long_name = total sky shortwave heating rate + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - long_name = total sky longwave heating rate + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index 458ff75ae..12819dee5 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -128,7 +128,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in @@ -137,7 +137,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in From 2edeeadb4416937dfb18eb32f3bf327449d47de2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 12 Mar 2020 15:14:23 -0600 Subject: [PATCH 054/404] Bugfixes: uninitialized data before entering effective radii calculation; array qci_conv may not be allocated, thus use assumed-size declaration --- physics/GFS_rrtmg_pre.F90 | 4 ++++ physics/module_SGSCloud_RadPre.F90 | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 170cb707a..d123c9e4b 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -729,6 +729,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input end do ! Call Thompson's subroutine to compute effective radii do i=1,im + ! Initialize to default in units m as in module_mp_thompson.F90 + re_cloud(i,:) = 2.49E-6 + re_ice(i,:) = 4.99E-6 + re_snow(i,:) = 9.99E-6 call calc_effectRad (tlyr(i,:), plyr(i,:), qv_mp(i,:), qc_mp(i,:), & nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, lm ) diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index 15ac383f5..544fe1004 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -61,13 +61,13 @@ subroutine sgscloud_radpre_run( & logical, intent(in) :: flag_init, flag_restart, do_mynnedmf real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qci_conv + ! qci_conv only allocated if GF is used + real(kind=kind_phys), dimension(:,:), intent(inout) :: qci_conv real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp real(kind=kind_phys), dimension(im,levs), intent(inout) :: & & clouds1,clouds2,clouds3,clouds4,clouds5 real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc_save, qi_save real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_bl, cldfra_bl - ! DH* TODO add intent() information for delp,clouds1,clouds2,clouds3,clouds4,clouds5 real(kind=kind_phys), dimension(im), intent(in) :: slmsk, xlat, de_lgth real(kind=kind_phys), dimension(im,nlay), intent(in) :: plyr, dz real(kind=kind_phys), dimension(im,5), intent(inout) :: cldsa From 5960e5e8a1e15ebb7040656ebe1ea2c62253ae87 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 17 Mar 2020 14:30:47 -0600 Subject: [PATCH 055/404] Cosmetic changes to physics/GFS_debug.F90 --- physics/GFS_debug.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 486ee604e..3bb50d9ef 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -310,6 +310,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Diag%tdomzr ', Diag%tdomzr) call print_var(mpirank,omprank, blkno, 'Diag%tdomip ', Diag%tdomip) call print_var(mpirank,omprank, blkno, 'Diag%tdoms ', Diag%tdoms) + ! CCPP/RUC only if (Model%lsm == Model%lsm_ruc) then call print_var(mpirank,omprank, blkno, 'Diag%wet1 ', Sfcprop%wetness) else @@ -345,6 +346,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, if(Model%lradar) then call print_var(mpirank,omprank, blkno, 'Diag%refl_10cm ', Diag%refl_10cm) end if + ! CCPP/MYNNPBL only if (Model%do_mynnedmf) then call print_var(mpirank,omprank, blkno, 'Diag%edmf_a ', Diag%edmf_a) call print_var(mpirank,omprank, blkno, 'Diag%edmf_w ', Diag%edmf_w) From 10e357f8f03d03ec2a704529685e2b047cec9af0 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 20 Mar 2020 09:34:37 -0600 Subject: [PATCH 056/404] physics/module_MYNNSFC_wrapper.F90: add comment about CCPP being able to do automatic unit conversions --- physics/module_MYNNSFC_wrapper.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index 951d7e7c8..9fd71c37d 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -186,9 +186,10 @@ SUBROUTINE mynnsfc_wrapper_run( & endif qgh(i)=0.0 !snowh(i)=snowd(i)*800. !mm -> m + ! DH* note - this could be automated (CCPP knows how to convert cm to m) znt_lnd(i)=znt_lnd(i)*0.01 !cm -> m znt_ocn(i)=znt_ocn(i)*0.01 !cm -> m - znt_ice(i)=znt_ice(i)*0.01 !cm -> m + znt_ice(i)=znt_ice(i)*0.01 !cm -> m ts(i)=tskin_ocn(i)/exner(i,1) !theta mavail(i)=1.0 !???? cpm(i)=cp @@ -272,6 +273,7 @@ SUBROUTINE mynnsfc_wrapper_run( & !NOTE: evap & qflx will be solved for later !qflx(i)=QFX(i)/ !evap(i)=QFX(i) !or /rho ?? + ! DH* note - this could be automated (CCPP knows how to convert m to cm) znt_lnd(i)=znt_lnd(i)*100. !m -> cm znt_ocn(i)=znt_ocn(i)*100. znt_ice(i)=znt_ice(i)*100. From 92b6ee80c7ee93b91b8072c1f6b4b7a619d4af44 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 23 Mar 2020 10:32:06 -0600 Subject: [PATCH 057/404] physics/module_MYNNSFC_wrapper.F90: perform unit conversion m <-> cm only for valid data --- physics/module_MYNNSFC_wrapper.F90 | 98 ++++++++++++++++-------------- 1 file changed, 54 insertions(+), 44 deletions(-) diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index 9fd71c37d..42d0108a1 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -168,32 +168,38 @@ SUBROUTINE mynnsfc_wrapper_run( & ! write(0,*)"iter=",iter ! endif - !prep MYNN-only variables - do k=1,2 !levs - do i=1,im - dz(i,k)=(phii(i,k+1) - phii(i,k))*g_inv - th(i,k)=t3d(i,k)/exner(i,k) - !qc(i,k)=MAX(qgrs(i,k,ntcw),0.0) - qv(i,k)=qvsh(i,k)/(1.0 - qvsh(i,k)) - pattern_spp_pbl(i,k)=0.0 - enddo - enddo - do i=1,im - if (slmsk(i)==1. .or. slmsk(i)==2.)then !sea/land/ice mask (=0/1/2) in FV3 - xland(i)=1.0 !but land/water = (1/2) in SFCLAY_mynn - else - xland(i)=2.0 - endif - qgh(i)=0.0 - !snowh(i)=snowd(i)*800. !mm -> m - ! DH* note - this could be automated (CCPP knows how to convert cm to m) - znt_lnd(i)=znt_lnd(i)*0.01 !cm -> m - znt_ocn(i)=znt_ocn(i)*0.01 !cm -> m - znt_ice(i)=znt_ice(i)*0.01 !cm -> m - ts(i)=tskin_ocn(i)/exner(i,1) !theta - mavail(i)=1.0 !???? - cpm(i)=cp - enddo + ! prep MYNN-only variables + do k=1,2 !levs + do i=1,im + dz(i,k)=(phii(i,k+1) - phii(i,k))*g_inv + th(i,k)=t3d(i,k)/exner(i,k) + !qc(i,k)=MAX(qgrs(i,k,ntcw),0.0) + qv(i,k)=qvsh(i,k)/(1.0 - qvsh(i,k)) + pattern_spp_pbl(i,k)=0.0 + enddo + enddo + do i=1,im + if (slmsk(i)==1. .or. slmsk(i)==2.)then !sea/land/ice mask (=0/1/2) in FV3 + xland(i)=1.0 !but land/water = (1/2) in SFCLAY_mynn + else + xland(i)=2.0 + endif + qgh(i)=0.0 + !snowh(i)=snowd(i)*800. !mm -> m + !znt_lnd(i)=znt_lnd(i)*0.01 !cm -> m + !znt_ocn(i)=znt_ocn(i)*0.01 !cm -> m + !znt_ice(i)=znt_ice(i)*0.01 !cm -> m + ! DH* do the following line only if wet(i)? + ts(i)=tskin_ocn(i)/exner(i,1) !theta + ! *DH + mavail(i)=1.0 !???? + cpm(i)=cp + enddo + + ! cm -> m + where (dry) znt_lnd=znt_lnd*0.01 + where (wet) znt_ocn=znt_ocn*0.01 + where (icy) znt_ice=znt_ice*0.01 ! if (lprnt) then ! write(0,*)"CALLING SFCLAY_mynn; input:" @@ -261,24 +267,28 @@ SUBROUTINE mynnsfc_wrapper_run( & its=1,ite=im, jts=1,jte=1, kts=1,kte=levs ) - ! POST MYNN SURFACE LAYER (INTERSTITIAL) WORK: - do i = 1, im - !* Taken from sfc_nst.f - !* ch = surface exchange coeff heat & moisture(m/s) im - !* rch(i) = rho_a(i) * cp * ch(i) * wind(i) - !* hflx(i) = rch(i) * (tsurf(i) - theta1(i)) !K m s-1 - !* hflx(i)=hfx(i)/(rho(i,1)*cp) - now calculated inside module_sf_mynn.F90 - !* Taken from sfc_nst.f - !* evap(i) = elocp * rch(i) * (qss(i) - q0(i)) !kg kg-1 m s-1 - !NOTE: evap & qflx will be solved for later - !qflx(i)=QFX(i)/ - !evap(i)=QFX(i) !or /rho ?? - ! DH* note - this could be automated (CCPP knows how to convert m to cm) - znt_lnd(i)=znt_lnd(i)*100. !m -> cm - znt_ocn(i)=znt_ocn(i)*100. - znt_ice(i)=znt_ice(i)*100. - enddo - + !! POST MYNN SURFACE LAYER (INTERSTITIAL) WORK: + !do i = 1, im + ! !* Taken from sfc_nst.f + ! !* ch = surface exchange coeff heat & moisture(m/s) im + ! !* rch(i) = rho_a(i) * cp * ch(i) * wind(i) + ! !* hflx(i) = rch(i) * (tsurf(i) - theta1(i)) !K m s-1 + ! !* hflx(i)=hfx(i)/(rho(i,1)*cp) - now calculated inside module_sf_mynn.F90 + ! !* Taken from sfc_nst.f + ! !* evap(i) = elocp * rch(i) * (qss(i) - q0(i)) !kg kg-1 m s-1 + ! !NOTE: evap & qflx will be solved for later + ! !qflx(i)=QFX(i)/ + ! !evap(i)=QFX(i) !or /rho ?? + ! ! DH* note - this could be automated (CCPP knows how to convert m to cm) + ! znt_lnd(i)=znt_lnd(i)*100. !m -> cm + ! znt_ocn(i)=znt_ocn(i)*100. + ! znt_ice(i)=znt_ice(i)*100. + !enddo + + ! m -> cm + where (dry) znt_lnd=znt_lnd*100. + where (wet) znt_ocn=znt_ocn*100. + where (icy) znt_ice=znt_ice*100. ! if (lprnt) then ! write(0,*) From 65da24ee5def2e86a19614bf2536af76b9074d99 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 23 Mar 2020 16:52:00 -0600 Subject: [PATCH 058/404] physics/GFS_surface_composites.*: initialize composites uustar_*, qss_*, hflx_* --- physics/GFS_surface_composites.F90 | 21 +++++--- physics/GFS_surface_composites.meta | 81 +++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 6 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 9636eb384..0060e1a7b 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -28,10 +28,11 @@ end subroutine GFS_surface_composites_pre_finalize subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, landfrac, lakefrac, oceanfrac, & frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorl_ocn, & zorl_lnd, zorl_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, & - tprcp_lnd, tprcp_ice, uustar, uustar_lnd, uustar_ice, weasd, weasd_ocn, & - weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, & - tsfc_ice, tisfc, tice, tsurf, tsurf_ocn, tsurf_lnd, tsurf_ice, gflx_ice, & - tgice, islmsk, semis_rad, semis_ocn, semis_lnd, semis_ice, & + tprcp_lnd, tprcp_ice, uustar, uustar_ocn, uustar_lnd, uustar_ice, & + weasd, weasd_ocn, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_ocn,& + tsfc_lnd, tsfc_ice, tisfc, tice, tsurf, tsurf_ocn, tsurf_lnd, tsurf_ice, & + gflx_ice, tgice, islmsk, semis_rad, semis_ocn, semis_lnd, semis_ice, & + qss, qss_ocn, qss_lnd, qss_ice, hflx, hflx_ocn, hflx_lnd, hflx_ice, & min_lakeice, min_seaice, errmsg, errflg) implicit none @@ -45,12 +46,13 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, lan real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, oceanfrac real(kind=kind_phys), dimension(im), intent(inout) :: cice real(kind=kind_phys), dimension(im), intent( out) :: frland - real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd + real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd, qss, hflx real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, tsfc, tsfco, tsfcl, tisfc, tsurf real(kind=kind_phys), dimension(im), intent(inout) :: snowd_ocn, snowd_lnd, snowd_ice, tprcp_ocn, & tprcp_lnd, tprcp_ice, zorl_ocn, zorl_lnd, zorl_ice, tsfc_ocn, tsfc_lnd, tsfc_ice, tsurf_ocn, & - tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_ocn, weasd_lnd, weasd_ice, ep1d_ice, gflx_ice + tsurf_lnd, tsurf_ice, uustar_ocn, uustar_lnd, uustar_ice, weasd_ocn, weasd_lnd, weasd_ice, & + qss_ocn, qss_lnd, qss_ice, hflx_ocn, hflx_lnd, hflx_ice, ep1d_ice, gflx_ice real(kind=kind_phys), dimension(im), intent( out) :: tice real(kind=kind_phys), intent(in ) :: tgice integer, dimension(im), intent(in ) :: islmsk @@ -145,6 +147,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, lan tprcp_lnd(i) = tprcp(i) tprcp_ice(i) = tprcp(i) if (wet(i)) then ! Water + uustar_ocn(i) = uustar(i) zorl_ocn(i) = zorlo(i) tsfc_ocn(i) = tsfco(i) tsurf_ocn(i) = tsfco(i) @@ -153,6 +156,8 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, lan weasd_ocn(i) = zero snowd_ocn(i) = zero semis_ocn(i) = 0.984d0 + qss_ocn(i) = qss(i) + hflx_ocn(i) = hflx(i) endif if (dry(i)) then ! Land uustar_lnd(i) = uustar(i) @@ -162,6 +167,8 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, lan tsurf_lnd(i) = tsfcl(i) snowd_lnd(i) = snowd(i) semis_lnd(i) = semis_rad(i) + qss_lnd(i) = qss(i) + hflx_lnd(i) = hflx(i) end if if (icy(i)) then ! Ice uustar_ice(i) = uustar(i) @@ -173,6 +180,8 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, lan ep1d_ice(i) = zero gflx_ice(i) = zero semis_ice(i) = 0.95d0 + qss_ice(i) = qss(i) + hflx_ice(i) = hflx(i) end if enddo diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 74c6b9575..bf613e160 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -262,6 +262,15 @@ kind = kind_phys intent = in optional = F +[uustar_ocn] + standard_name = surface_friction_velocity_over_ocean + long_name = surface friction velocity over ocean + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [uustar_lnd] standard_name = surface_friction_velocity_over_land long_name = surface friction velocity over land @@ -495,6 +504,78 @@ kind = kind_phys intent = inout optional = F +[qss] + standard_name = surface_specific_humidity + long_name = surface air saturation specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qss_ocn] + standard_name = surface_specific_humidity_over_ocean + long_name = surface air saturation specific humidity over ocean + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qss_lnd] + standard_name = surface_specific_humidity_over_land + long_name = surface air saturation specific humidity over land + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qss_ice] + standard_name = surface_specific_humidity_over_ice + long_name = surface air saturation specific humidity over ice + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx] + standard_name = kinematic_surface_upward_sensible_heat_flux + long_name = kinematic surface upward sensible heat flux + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hflx_ocn] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean + long_name = kinematic surface upward sensible heat flux over ocean + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx_lnd] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_land + long_name = kinematic surface upward sensible heat flux over land + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx_ice] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice + long_name = kinematic surface upward sensible heat flux over ice + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [min_lakeice] standard_name = lake_ice_minimum long_name = minimum lake ice value From a6f3dedf3311863e4a3fd66086d7c53472b11fdc Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 26 Mar 2020 13:06:25 -0600 Subject: [PATCH 059/404] Updates from @joeolson42 for physics/module_MYNNSFC_wrapper.F90, physics/module_MYNNSFC_wrapper.meta, physics/module_sf_mynn.F90 --- physics/module_MYNNSFC_wrapper.F90 | 14 +- physics/module_MYNNSFC_wrapper.meta | 17 ++ physics/module_sf_mynn.F90 | 256 ++++++++++++++++++---------- 3 files changed, 189 insertions(+), 98 deletions(-) diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index 42d0108a1..82cdbca76 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -28,7 +28,7 @@ end subroutine mynnsfc_wrapper_finalize SUBROUTINE mynnsfc_wrapper_run( & & ix,im,levs, & & itimestep,iter, & - & flag_init,flag_restart, & + & flag_init,flag_restart,lsm, & & delt,dx, & & u, v, t3d, qvsh, qc, prsl, phii, & & exner, ps, PBLH, slmsk, & @@ -47,8 +47,8 @@ SUBROUTINE mynnsfc_wrapper_run( & & fh_ocn, fh_lnd, fh_ice, & !intent(inout) & fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) & fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) - & QSFC, USTM, ZOL, MOL, RMOL, & - & WSPD, ch, HFLX, QFLX, LH, & + & QSFC, qsfc_ruc, USTM, ZOL, MOL, & + & RMOL, WSPD, ch, HFLX, QFLX, LH, & & FLHC, FLQC, & & U10, V10, TH2, T2, Q2, & & wstar, CHS2, CQS2, & @@ -106,7 +106,7 @@ SUBROUTINE mynnsfc_wrapper_run( & !MYNN-1D REAL :: delt INTEGER :: im, ix, levs - INTEGER :: iter, k, i, itimestep + INTEGER :: iter, k, i, itimestep, lsm LOGICAL :: flag_init,flag_restart,lprnt INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & & IMS,IME,JMS,JME,KMS,KME, & @@ -146,7 +146,7 @@ SUBROUTINE mynnsfc_wrapper_run( & & dx, pblh, slmsk, ps real(kind=kind_phys), dimension(im), intent(inout) :: & - & ustm, hflx, qflx, wspd, qsfc, & + & ustm, hflx, qflx, wspd, qsfc, qsfc_ruc, & & FLHC, FLQC, U10, V10, TH2, T2, Q2, & & CHS2, CQS2, rmol, zol, mol, ch, & & lh, wstar @@ -237,7 +237,7 @@ SUBROUTINE mynnsfc_wrapper_run( & CP=cp,G=g,ROVCP=rcp,R=r_d,XLV=xlv, & SVP1=svp1,SVP2=svp2,SVP3=svp3,SVPT0=svpt0, & EP1=ep_1,EP2=ep_2,KARMAN=karman, & - ISFFLX=isfflx,isftcflx=isftcflx, & + ISFFLX=isfflx,isftcflx=isftcflx,LSM=lsm, & iz0tlnd=iz0tlnd,itimestep=itimestep,iter=iter, & wet=wet, dry=dry, icy=icy, & !intent(in) tskin_ocn=tskin_ocn, tskin_lnd=tskin_lnd, tskin_ice=tskin_ice, & !intent(in) @@ -258,7 +258,7 @@ SUBROUTINE mynnsfc_wrapper_run( & ZNT=znt,USTM=ustm,ZOL=zol,MOL=mol,RMOL=rmol, & psim=psim,psih=psih, & HFLX=hflx,HFX=hfx,QFLX=qflx,QFX=qfx,LH=lh,FLHC=flhc,FLQC=flqc, & - QGH=qgh,QSFC=qsfc, & + QGH=qgh,QSFC=qsfc,QSFC_RUC=qsfc_ruc, & U10=u10,V10=v10,TH2=th2,T2=t2,Q2=q2, & GZ1OZ0=GZ1OZ0,WSPD=wspd,wstar=wstar, & spp_pbl=spp_pbl,pattern_spp_pbl=pattern_spp_pbl, & diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 0a988f575..b12837233 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -57,6 +57,14 @@ type = logical intent = in optional = F +[lsm] + standard_name = flag_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F [delt] standard_name = time_step_for_physics long_name = time step for physics @@ -585,6 +593,15 @@ kind = kind_phys intent = inout optional = F +[qsfc_ruc] + standard_name = water_vapor_mixing_ratio_at_surface + long_name = water vapor mixing ratio at surface + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [ustm] standard_name = surface_friction_velocity_drag long_name = friction velocity isolated for momentum only diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index 788ff0ace..2ac9d832c 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -106,6 +106,9 @@ MODULE module_sf_mynn !1: some step-by-step output !2: everything - heavy I/O LOGICAL, PARAMETER :: compute_diag = .false. + LOGICAL, PARAMETER :: compute_flux = .false. !shouldn't need compute + ! these in FV3. They will be written over anyway. + ! Computing the fluxes here is leftover from the WRF world. REAL, DIMENSION(0:1000 ),SAVE :: psim_stab,psim_unstab, & psih_stab,psih_unstab @@ -137,7 +140,8 @@ SUBROUTINE SFCLAY_mynn( & PSFCPA,PBLH,MAVAIL,XLAND,DX, & !in CP,G,ROVCP,R,XLV, & !in SVP1,SVP2,SVP3,SVPT0,EP1,EP2,KARMAN, & !in - ISFFLX,isftcflx,iz0tlnd,itimestep,iter,& !in + ISFFLX,isftcflx,lsm,iz0tlnd, & !in + itimestep,iter, & !in wet, dry, icy, & !intent(in) tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) @@ -157,7 +161,7 @@ SUBROUTINE SFCLAY_mynn( & ZNT,USTM,ZOL,MOL,RMOL, & PSIM,PSIH, & HFLX,HFX,QFLX,QFX,LH,FLHC,FLQC, & - QGH,QSFC, & + QGH,QSFC,QSFC_RUC, & U10,V10,TH2,T2,Q2, & GZ1OZ0,WSPD,WSTAR, & spp_pbl,pattern_spp_pbl, & @@ -268,8 +272,8 @@ SUBROUTINE SFCLAY_mynn( & REAL, INTENT(IN) :: EP1,EP2,KARMAN REAL, INTENT(IN) :: CP,G,ROVCP,R,XLV !,DX !NAMELIST OPTIONS: - INTEGER, INTENT(IN) :: ISFFLX - INTEGER, OPTIONAL, INTENT(IN) :: ISFTCFLX, IZ0TLND + INTEGER, INTENT(IN) :: ISFFLX, LSM + INTEGER, OPTIONAL, INTENT(IN) :: ISFTCFLX, IZ0TLND INTEGER, OPTIONAL, INTENT(IN) :: spp_pbl !=================================== @@ -306,7 +310,8 @@ SUBROUTINE SFCLAY_mynn( & QFLX,QFX, & LH, & MOL,RMOL, & - QSFC, QGH, & + QSFC, & + QGH, & ZNT, & ZOL, & USTM, & @@ -339,7 +344,8 @@ SUBROUTINE SFCLAY_mynn( & & fh_ocn, fh_lnd, fh_ice, & & fm10_ocn, fm10_lnd, fm10_ice, & & fh2_ocn, fh2_lnd, fh2_ice, & - & qsfc_ocn, qsfc_lnd, qsfc_ice + & qsfc_ocn, qsfc_lnd, qsfc_ice, & + & qsfc_ruc !ADDITIONAL OUTPUT !JOE-begin @@ -402,10 +408,21 @@ SUBROUTINE SFCLAY_mynn( & UST_ICE(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) MOL(i,j)=0. ! Tstar QSFC(i,j)=QV3D(i,kts,j)/(1.+QV3D(i,kts,j)) + QSFC_OCN(i)=QSFC(i,j) + QSFC_LND(i)=QSFC(i,j) + QSFC_ICE(i)=QSFC(i,j) qstar(i,j)=0.0 QFX(i,j)=0. HFX(i,j)=0. + QFLX(i,j)=0. + HFLX(i,j)=0. ENDDO + ELSE + IF (LSM == 3) THEN + DO i=its,ite + QSFC_LND(i)=QSFC_RUC(i) + ENDDO + ENDIF ENDIF CALL SFCLAY1D_mynn( & @@ -453,7 +470,10 @@ END SUBROUTINE SFCLAY_MYNN !------------------------------------------------------------------- !>\ingroup module_sf_mynn_mod -!! This subroutine calculates +!! This subroutine calculates u*, z/L, and the exchange coefficients +!! which are passed to subsequent scheme to calculate the fluxes. +!! This scheme has options to calculate the fluxes and near-surface +!! diagnostics, as was needed in WRF, but these are skipped for FV3. SUBROUTINE SFCLAY1D_mynn( & J,U1D,V1D,T1D,QV1D,P1D,dz8w1d,U1D2,V1D2,dz2w1d, & PSFCPA,PBLH,MAVAIL,XLAND,DX, & @@ -621,20 +641,27 @@ SUBROUTINE SFCLAY1D_mynn( & !------------------------------------------------------------------- IF (debug_code >= 1) THEN - write(*,*)"ITIMESTEP=",ITIMESTEP," iter=",iter + write(0,*)"ITIMESTEP=",ITIMESTEP," iter=",iter DO I=its,ite - write(*,*)"=== input to mynnsfclayer, i:", i - !write(*,*)" land, ice, water" - write(*,*)"dry=",dry(i)," icy=",icy(i)," wet=",wet(i) - write(*,*)"tsk=", tskin_lnd(i),tskin_ice(i),tskin_ocn(i) - write(*,*)"tsurf=", tsurf_lnd(i),tsurf_ice(i),tsurf_ocn(i) - write(*,*)"qsfc=", qsfc_lnd(i),qsfc_ice(i),qsfc_ocn(i) - write(*,*)"znt=", znt_lnd(i),znt_ice(i),znt_ocn(i) - write(*,*)"ust=", ust_lnd(i),ust_ice(i),ust_ocn(i) - write(*,*)"snowh=", snowh_lnd(i),snowh_ice(i),snowh_ocn(i) - write(*,*)"psfcpa=",PSFCPA(i)," dz=",dz8w1d(i) - write(*,'(A5,F0.8,A6,F0.6,A6,F5.0)') & - "qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + write(0,*)"=== imortant input to mynnsfclayer, i:", i + IF (dry(i)) THEN + write(0,*)"dry=",dry(i)," tsk=", tskin_lnd(i),& + " tsurf=", tsurf_lnd(i)," qsfc=", qsfc_lnd(i)," znt=", znt_lnd(i),& + " ust=", ust_lnd(i)," snowh=", snowh_lnd(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF + IF (icy(i)) THEN + write(0,*)"icy=",icy(i)," tsk=", tskin_ice(i),& + " tsurf=", tsurf_ice(i)," qsfc=", qsfc_ice(i)," znt=", znt_ice(i),& + " ust=", ust_ice(i)," snowh=", snowh_ice(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF + IF (wet(i)) THEN + write(0,*)"wet=",wet(i)," tsk=", tskin_ocn(i),& + " tsurf=", tsurf_ocn(i)," qsfc=", qsfc_ocn(i)," znt=", znt_ocn(i),& + " ust=", ust_ocn(i)," snowh=", snowh_ocn(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF ENDDO ENDIF @@ -1161,8 +1188,14 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF IF (debug_code >= 1) THEN - write(0,*)"===(wet) capture bad input in mynn sfc layer, i=:",i - write(0,*)"rb=", rb_ocn(I)," ZNT=", ZNTstoch_ocn(i)," ZT=",Zt_ocn(i) + IF (ZNTstoch_ocn(i) < 1E-8 .OR. Zt_ocn(i) < 1E-10) THEN + write(0,*)"===(wet) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_ocn(I)," ZNT=", ZNTstoch_ocn(i)," ZT=",Zt_ocn(i) + write(0,*)" tsk=", tskin_ocn(i)," prev z/L=",ZOL(I),& + " tsurf=", tsurf_ocn(i)," qsfc=", qsfc_ocn(i)," znt=", znt_ocn(i),& + " ust=", ust_ocn(i)," snowh=", snowh_ocn(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF ENDIF !Use Pedros iterative function to find z/L zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I)) @@ -1219,8 +1252,14 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF IF (debug_code >= 1) THEN - write(0,*)"===(wet) capture bad input in mynn sfc layer, i=:",i - write(0,*)"rb=", rb_ocn(I)," ZNT=", ZNTstoch_ocn(i)," ZT=",Zt_ocn(i) + IF (ZNTstoch_ocn(i) < 1E-8 .OR. Zt_ocn(i) < 1E-10) THEN + write(0,*)"===(wet) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_ocn(I)," ZNT=", ZNTstoch_ocn(i)," ZT=",Zt_ocn(i) + write(0,*)" tsk=", tskin_ocn(i)," wstar=",wstar(i)," prev z/L=",ZOL(I),& + " tsurf=", tsurf_ocn(i)," qsfc=", qsfc_ocn(i)," znt=", znt_ocn(i),& + " ust=", ust_ocn(i)," snowh=", snowh_ocn(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF ENDIF !Use Pedros iterative function to find z/L zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I)) @@ -1280,8 +1319,14 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF IF (debug_code >= 1) THEN - write(0,*)"===(dry) capture bad input in mynn sfc layer, i=:",i - write(0,*)"rb=", rb_lnd(I)," ZNT=", ZNTstoch_lnd(i)," ZT=",Zt_lnd(i) + IF (ZNTstoch_lnd(i) < 1E-8 .OR. Zt_lnd(i) < 1E-10) THEN + write(0,*)"===(land) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_lnd(I)," ZNT=", ZNTstoch_lnd(i)," ZT=",Zt_lnd(i) + write(0,*)" tsk=", tskin_lnd(i)," prev z/L=",ZOL(I),& + " tsurf=", tsurf_lnd(i)," qsfc=", qsfc_lnd(i)," znt=", znt_lnd(i),& + " ust=", ust_lnd(i)," snowh=", snowh_lnd(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF ENDIF !Use Pedros iterative function to find z/L zol(I)=zolri(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),ZT_lnd(I),ZOL(I)) @@ -1337,8 +1382,14 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF IF (debug_code >= 1) THEN - write(0,*)"===(dry) capture bad input in mynn sfc layer, i=:",i - write(0,*)"rb=", rb_lnd(I)," ZNT=", ZNTstoch_lnd(i)," ZT=",Zt_lnd(i) + IF (ZNTstoch_lnd(i) < 1E-8 .OR. Zt_lnd(i) < 1E-10) THEN + write(0,*)"===(land) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_lnd(I)," ZNT=", ZNTstoch_lnd(i)," ZT=",Zt_lnd(i) + write(0,*)" tsk=", tskin_lnd(i)," wstar=",wstar(i)," prev z/L=",ZOL(I),& + " tsurf=", tsurf_lnd(i)," qsfc=", qsfc_lnd(i)," znt=", znt_lnd(i),& + " ust=", ust_lnd(i)," snowh=", snowh_lnd(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF ENDIF !Use Pedros iterative function to find z/L zol(I)=zolri(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),ZT_lnd(I),ZOL(I)) @@ -1397,8 +1448,14 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF IF (debug_code >= 1) THEN - write(0,*)"===(ice) capture bad input in mynn sfc layer, i=:",i - write(0,*)"rb=", rb_ice(I)," ZNT=", ZNTstoch_ice(i)," ZT=",Zt_ice(i) + IF (ZNTstoch_ice(i) < 1E-8 .OR. Zt_ice(i) < 1E-10) THEN + write(0,*)"===(ice) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_ice(I)," ZNT=", ZNTstoch_ice(i)," ZT=",Zt_ice(i) + write(0,*)" tsk=", tskin_ice(i)," prev z/L=",ZOL(I),& + " tsurf=", tsurf_ice(i)," qsfc=", qsfc_ice(i)," znt=", znt_ice(i),& + " ust=", ust_ice(i)," snowh=", snowh_ice(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF ENDIF !Use Pedros iterative function to find z/L zol(I)=zolri(rb_ice(I),ZA(I),ZNTstoch_ice(I),ZT_ice(I),ZOL(I)) @@ -1454,8 +1511,14 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF IF (debug_code >= 1) THEN - write(0,*)"===(ice) capture bad input in mynn sfc layer, i=:",i - write(0,*)"rb=", rb_ice(I)," ZNT=", ZNTstoch_ice(i)," ZT=",Zt_ice(i) + IF (ZNTstoch_ice(i) < 1E-8 .OR. Zt_ice(i) < 1E-10) THEN + write(0,*)"===(ice) capture bad input in mynn sfc layer, i=:",i + write(0,*)"rb=", rb_ice(I)," ZNT=", ZNTstoch_ice(i)," ZT=",Zt_ice(i) + write(0,*)" tsk=", tskin_ice(i)," wstar=",wstar(i)," prev z/L=",ZOL(I),& + " tsurf=", tsurf_ice(i)," qsfc=", qsfc_ice(i)," znt=", znt_ice(i),& + " ust=", ust_ice(i)," snowh=", snowh_ice(i),"psfcpa=",PSFCPA(i), & + " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) + ENDIF ENDIF !Use Pedros iterative function to find z/L zol(I)=zolri(rb_ice(I),ZA(I),ZNTstoch_ice(I),ZT_ice(I),ZOL(I)) @@ -1593,9 +1656,9 @@ SUBROUTINE SFCLAY1D_mynn( & IF (debug_code == 2) THEN DO I=its,ite - IF(wet(i))write(*,*)"==== AT END OF ITER LOOP, i=",i, "(wet)" - IF(dry(i))write(*,*)"==== AT END OF ITER LOOP, i=",i, "(land)" - IF(icy(i))write(*,*)"==== AT END OF ITER LOOP, i=",i, "(ice)" + IF(wet(i))write(*,*)"==== AT END OF MAIN LOOP, i=",i, "(wet)" + IF(dry(i))write(*,*)"==== AT END OF MAIN LOOP, i=",i, "(land)" + IF(icy(i))write(*,*)"==== AT END OF MAIN LOOP, i=",i, "(ice)" write(*,*)"z/L:",ZOL(I)," wspd:",wspd(I)," Tstar:",MOL(I) IF(wet(i))write(*,*)"PSIM:",PSIM(I)," PSIH:",PSIH(I)," W*:",WSTAR(I),& " DTHV:",THV1D(I)-THVSK_ocn(I) @@ -1647,20 +1710,23 @@ SUBROUTINE SFCLAY1D_mynn( & FLQC(I)=RHO1D(I)*MAVAIL(I)*UST_lnd(I)*KARMAN/PSIQ_lnd(i) FLHC(I)=RHO1D(I)*CPM(I)*UST_lnd(I)*KARMAN/PSIT_lnd(I) - !---------------------------------- - ! COMPUTE SURFACE MOISTURE FLUX: - !---------------------------------- - QFX(I)=FLQC(I)*(QSFCMR_lnd(I)-QV1D(I)) - QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX - LH(i)=XLV*QFX(i) - QFLX(i)=QFX(i)/RHO1D(i) - - !---------------------------------- - ! COMPUTE SURFACE HEAT FLUX: - !---------------------------------- - HFX(I)=FLHC(I)*(THSK_lnd(I)-TH1D(I)) - HFX(I)=MAX(HFX(I),-250.) - HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + IF (compute_flux) THEN + !---------------------------------- + ! COMPUTE SURFACE MOISTURE FLUX: + !---------------------------------- + !QFX(I)=FLQC(I)*(QSFCMR_lnd(I)-QV1D(I)) + QFX(I)=FLQC(I)*(QSFC_lnd(I)-QV1D(I)) + QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX + LH(i)=XLV*QFX(i) + QFLX(i)=QFX(i)/RHO1D(i) + + !---------------------------------- + ! COMPUTE SURFACE HEAT FLUX: + !---------------------------------- + HFX(I)=FLHC(I)*(THSK_lnd(I)-TH1D(I)) + HFX(I)=MAX(HFX(I),-250.) + HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + ENDIF !TRANSFER COEFF FOR SOME LSMs: !CHS(I)=UST(I)*KARMAN/(ALOG(KARMAN*UST(I)*ZA(I) & @@ -1682,25 +1748,28 @@ SUBROUTINE SFCLAY1D_mynn( & FLQC(I)=RHO1D(I)*MAVAIL(I)*UST_ocn(I)*KARMAN/PSIQ_ocn(i) FLHC(I)=RHO1D(I)*CPM(I)*UST_ocn(I)*KARMAN/PSIT_ocn(I) - !---------------------------------- - ! COMPUTE SURFACE MOISTURE FLUX: - !---------------------------------- - QFX(I)=FLQC(I)*(QSFCMR_ocn(I)-QV1D(I)) - QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX - LH(I)=XLV*QFX(I) - QFLX(i)=QFX(i)/RHO1D(i) - - !---------------------------------- - ! COMPUTE SURFACE HEAT FLUX: - !---------------------------------- - HFX(I)=FLHC(I)*(THSK_ocn(I)-TH1D(I)) - IF ( PRESENT(ISFTCFLX) ) THEN - IF ( ISFTCFLX.NE.0 ) THEN - ! AHW: add dissipative heating term - HFX(I)=HFX(I)+RHO1D(I)*USTM(I)*USTM(I)*WSPDI(I) + IF (compute_flux) THEN + !---------------------------------- + ! COMPUTE SURFACE MOISTURE FLUX: + !---------------------------------- + !QFX(I)=FLQC(I)*(QSFCMR_ocn(I)-QV1D(I)) + QFX(I)=FLQC(I)*(QSFC_ocn(I)-QV1D(I)) + QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX + LH(I)=XLV*QFX(I) + QFLX(i)=QFX(i)/RHO1D(i) + + !---------------------------------- + ! COMPUTE SURFACE HEAT FLUX: + !---------------------------------- + HFX(I)=FLHC(I)*(THSK_ocn(I)-TH1D(I)) + IF ( PRESENT(ISFTCFLX) ) THEN + IF ( ISFTCFLX.NE.0 ) THEN + ! AHW: add dissipative heating term + HFX(I)=HFX(I)+RHO1D(I)*USTM(I)*USTM(I)*WSPDI(I) + ENDIF ENDIF + HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) ENDIF - HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) !TRANSFER COEFF FOR SOME LSMs: !CHS(I)=UST(I)*KARMAN/(ALOG(KARMAN*UST(I)*ZA(I) & @@ -1722,20 +1791,23 @@ SUBROUTINE SFCLAY1D_mynn( & FLQC(I)=RHO1D(I)*MAVAIL(I)*UST_ice(I)*KARMAN/PSIQ_ice(i) FLHC(I)=RHO1D(I)*CPM(I)*UST_ice(I)*KARMAN/PSIT_ice(I) - !---------------------------------- - ! COMPUTE SURFACE MOISTURE FLUX: - !---------------------------------- - QFX(I)=FLQC(I)*(QSFCMR_ice(I)-QV1D(I)) - QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX - LH(I)=XLF*QFX(I) - QFLX(i)=QFX(i)/RHO1D(i) - - !---------------------------------- - ! COMPUTE SURFACE HEAT FLUX: - !---------------------------------- - HFX(I)=FLHC(I)*(THSK_ice(I)-TH1D(I)) - HFX(I)=MAX(HFX(I),-250.) - HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + IF (compute_flux) THEN + !---------------------------------- + ! COMPUTE SURFACE MOISTURE FLUX: + !---------------------------------- + !QFX(I)=FLQC(I)*(QSFCMR_ice(I)-QV1D(I)) + QFX(I)=FLQC(I)*(QSFC_ice(I)-QV1D(I)) + QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX + LH(I)=XLF*QFX(I) + QFLX(i)=QFX(i)/RHO1D(i) + + !---------------------------------- + ! COMPUTE SURFACE HEAT FLUX: + !---------------------------------- + HFX(I)=FLHC(I)*(THSK_ice(I)-TH1D(I)) + HFX(I)=MAX(HFX(I),-250.) + HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + ENDIF !TRANSFER COEFF FOR SOME LSMs: !CHS(I)=UST(I)*KARMAN/(ALOG(KARMAN*UST(I)*ZA(I) & @@ -1854,8 +1926,8 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF T2(I)=TH2(I)*(PSFCPA(I)/100000.)**ROVCP - Q2(I)=QSFCMR_lnd(I)+(QV1D(I)-QSFCMR_lnd(I))*PSIQ2_lnd(i)/PSIQ_lnd(i) - Q2(I)= MAX(Q2(I), MIN(QSFCMR_lnd(I), QV1D(I))) + Q2(I)=QSFC_lnd(I)+(QV1D(I)-QSFC_lnd(I))*PSIQ2_lnd(i)/PSIQ_lnd(i) + Q2(I)= MAX(Q2(I), MIN(QSFC_lnd(I), QV1D(I))) Q2(I)= MIN(Q2(I), 1.05*QV1D(I)) ELSEIF (wet(i)) THEN DTG=TH1D(I)-THSK_ocn(I) @@ -1868,8 +1940,8 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF T2(I)=TH2(I)*(PSFCPA(I)/100000.)**ROVCP - Q2(I)=QSFCMR_ocn(I)+(QV1D(I)-QSFCMR_ocn(I))*PSIQ2_ocn(i)/PSIQ_ocn(i) - Q2(I)= MAX(Q2(I), MIN(QSFCMR_ocn(I), QV1D(I))) + Q2(I)=QSFC_ocn(I)+(QV1D(I)-QSFC_ocn(I))*PSIQ2_ocn(i)/PSIQ_ocn(i) + Q2(I)= MAX(Q2(I), MIN(QSFC_ocn(I), QV1D(I))) Q2(I)= MIN(Q2(I), 1.05*QV1D(I)) ELSEIF (icy(i)) THEN DTG=TH1D(I)-THSK_ice(I) @@ -1882,8 +1954,8 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF T2(I)=TH2(I)*(PSFCPA(I)/100000.)**ROVCP - Q2(I)=QSFCMR_ice(I)+(QV1D(I)-QSFCMR_ice(I))*PSIQ2_ice(i)/PSIQ_ice(i) - Q2(I)= MAX(Q2(I), MIN(QSFCMR_ice(I), QV1D(I))) + Q2(I)=QSFC_ice(I)+(QV1D(I)-QSFC_ice(I))*PSIQ2_ice(i)/PSIQ_ice(i) + Q2(I)= MAX(Q2(I), MIN(QSFC_ice(I), QV1D(I))) Q2(I)= MIN(Q2(I), 1.05*QV1D(I)) ENDIF ENDDO @@ -1895,15 +1967,17 @@ SUBROUTINE SFCLAY1D_mynn( & IF ( debug_code == 2) THEN DO I=its,ite yesno = 0 - IF (HFX(I) > 1200. .OR. HFX(I) < -700.)THEN + IF (compute_flux) THEN + IF (HFX(I) > 1200. .OR. HFX(I) < -700.)THEN print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& I,J, "HFX: ",HFX(I) yesno = 1 - ENDIF - IF (LH(I) > 1200. .OR. LH(I) < -700.)THEN + ENDIF + IF (LH(I) > 1200. .OR. LH(I) < -700.)THEN print*,"SUSPICIOUS VALUES IN MYNN SFCLAYER",& I,J, "LH: ",LH(I) yesno = 1 + ENDIF ENDIF IF (wet(i)) THEN IF (UST_ocn(I) < 0.0 .OR. UST_ocn(I) > 4.0 )THEN @@ -2608,9 +2682,9 @@ SUBROUTINE PSI_CB2005(psim1,psih1,zL,z0L) REAL, INTENT(IN) :: zL,z0L REAL, INTENT(OUT) :: psim1,psih1 - psim1 = -6.1*LOG(zL + (1.+ zL**2.5)**0.4) - & + psim1 = -6.1*LOG(zL + (1.+ zL**2.5)**0.4) & -6.1*LOG(z0L + (1.+ z0L**2.5)**0.4) - psih1 = -5.5*log(zL + (1.+ zL**1.1)**0.90909090909) - & + psih1 = -5.5*log(zL + (1.+ zL**1.1)**0.90909090909) & -5.5*log(z0L + (1.+ z0L**1.1)**0.90909090909) return From 3ba810b49098baa82e30e4e157b31f584022c79e Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 30 Mar 2020 15:42:39 -0400 Subject: [PATCH 060/404] a bug fix --- physics/GFS_rrtmg_pre.F90 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 679c1afa9..71f89f305 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -262,6 +262,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input plyr(i,k1) = 0.5 * (plvl(i,k2+1) + plvl(i,k2)) prslk1(i,k1) = (plyr(i,k1)*0.001) ** rocp enddo + else + k1 = 1 + kd + do i = 1, IM + plvl(i,k1) = Statein%prsi(i,1) * 0.01 ! pa to mb (hpa) + enddo endif else ! input data from sfc to top if (Model%levs > lm) then @@ -271,6 +276,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input plyr(i,k1) = 0.5 * (plvl(i,k1+1) + plvl(i,k1)) prslk1(i,k1) = (plyr(i,k1)*0.001) ** rocp enddo + else + k1 = lp1 + kd + do i = 1, IM + plvl(i,k1) = Statein%prsi(i,lp1) * 0.01 ! pa to mb (hpa) + enddo endif endif ! From bccf301e158c346b051b3d6a9bd392a71d07df25 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 1 Apr 2020 14:12:13 -0600 Subject: [PATCH 061/404] physics/samfdeepcnv.f: bugfix, ca_deep only allocated when do_ca is .true. --- physics/samfdeepcnv.f | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index b0813d98b..f64a0b332 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -92,8 +92,9 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & real(kind=kind_phys), intent(in) :: psp(im), delp(ix,km), & & prslp(ix,km), garea(im), dot(ix,km), phil(ix,km) real(kind=kind_phys), dimension(:), intent(in) :: fscav - real(kind=kind_phys), intent(in) :: ca_deep(ix) logical, intent(in) :: do_ca, hwrf_samfdeep + ! ca_deep only allocatedd when do_ca is true + real(kind=kind_phys), intent(in) :: ca_deep(:) integer, intent(inout) :: kcnv(im) ! DH* TODO - check dimensions of qtr, ntr+2 correct? *DH @@ -1640,6 +1641,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo + if (hwrf_samfdeep) then do i = 1, im beta = betas From afd6481120054a5531bdaa3a8ccbf24c884b7f88 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 1 Apr 2020 15:25:28 -0600 Subject: [PATCH 062/404] Compile physics/module_sf_mynn.F90 with -O1 instead of -O2 to avoid a bug with Intel 18 on hera; add a corresponding note in physics/module_sf_mynn.F90 --- CMakeLists.txt | 8 +++++--- physics/module_sf_mynn.F90 | 12 ++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8d3c3e18..8e6785c71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,15 +191,17 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") ${CMAKE_CURRENT_SOURCE_DIR}/physics/cu_gf_sh.F90 ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_bl_mynn.F90 ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNPBL_wrapper.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNSFC_wrapper.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNrad_pre.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNrad_post.F90 ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_mp_thompson_make_number_concentrations.F90 ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_SF_JSFC.F90 ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90 PROPERTIES COMPILE_FLAGS "-r8 -ftz") + # Reduce optimization for module_sf_mynn.F90 (to avoid an apparent compiler bug with Intel 18 on Hera) + SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 + PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_OPT} -O1") + list(APPEND SCHEMES_SFX_OPT ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90) + # Replace -xHost or -xCORE-AVX2 with -xCORE-AVX-I for certain files set(CMAKE_Fortran_FLAGS_LOPT1 ${CMAKE_Fortran_FLAGS_OPT}) string(REPLACE "-xHOST" "-xCORE-AVX-I" diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index 2ac9d832c..73ef5e1fb 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -645,19 +645,19 @@ SUBROUTINE SFCLAY1D_mynn( & DO I=its,ite write(0,*)"=== imortant input to mynnsfclayer, i:", i IF (dry(i)) THEN - write(0,*)"dry=",dry(i)," tsk=", tskin_lnd(i),& + write(0,*)"dry=",dry(i)," pblh=",pblh(i)," tsk=", tskin_lnd(i),& " tsurf=", tsurf_lnd(i)," qsfc=", qsfc_lnd(i)," znt=", znt_lnd(i),& " ust=", ust_lnd(i)," snowh=", snowh_lnd(i),"psfcpa=",PSFCPA(i), & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF IF (icy(i)) THEN - write(0,*)"icy=",icy(i)," tsk=", tskin_ice(i),& + write(0,*)"icy=",icy(i)," pblh=",pblh(i)," tsk=", tskin_ice(i),& " tsurf=", tsurf_ice(i)," qsfc=", qsfc_ice(i)," znt=", znt_ice(i),& " ust=", ust_ice(i)," snowh=", snowh_ice(i),"psfcpa=",PSFCPA(i), & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF IF (wet(i)) THEN - write(0,*)"wet=",wet(i)," tsk=", tskin_ocn(i),& + write(0,*)"wet=",wet(i)," pblh=",pblh(i)," tsk=", tskin_ocn(i),& " tsurf=", tsurf_ocn(i)," qsfc=", qsfc_ocn(i)," znt=", znt_ocn(i),& " ust=", ust_ocn(i)," snowh=", snowh_ocn(i),"psfcpa=",PSFCPA(i), & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) @@ -813,7 +813,11 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF DO I=its,ite - WSPD(I)=SQRT(U1D(I)*U1D(I)+V1D(I)*V1D(I)) + ! DH* 20200401 - note. A weird bug in Intel 18 on hera prevents using the + ! normal -O2 optimization in REPRO and PROD mode for this file. Not reproducible + ! by every user, the bug manifests itself in the resulting wind speed WSPD(I) + ! being -99.0 despite the assignments in lines 932 and 933. *DH + WSPD(I)=SQRT(U1D(I)*U1D(I)+V1D(I)*V1D(I)) WSPD_ocn = -99. WSPD_ice = -99. WSPD_lnd = -99. From 1df7376ed7293b29495f1b2b089cd6eb2862708b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 3 Apr 2020 09:44:51 -0600 Subject: [PATCH 063/404] Update CODEOWNERS for HWRF physics development --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 0d5230f89..a419f106a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,7 +3,7 @@ # These owners will be the default owners for everything in the repo. #* @defunkt -* @climbfuji @llpcarson @grantfirl @JulieSchramm +* @climbfuji @llpcarson @grantfirl @mzhangw # Order is important. The last matching pattern has the most precedence. # So if a pull request only touches javascript files, only these owners From 71eace19a5f42b60f64816575c425d34624c6018 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 3 Apr 2020 15:41:13 -0600 Subject: [PATCH 064/404] physics/samfshalcnv.f: bugfix, move assignment inside if block as in previous version --- physics/samfshalcnv.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index e21110bd6..7a6db70f0 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -966,8 +966,8 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & tem = 1. - tem tem1= .5*(cinacrmx-cinacrmn) cinacr = cinacrmx - tem * tem1 - endif if(cina(i) < cinacr) cnvflg(i) = .false. + endif enddo endif !! From 10867d1b84eea12e8a9effef712965249830b9f5 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 10 Dec 2019 11:58:48 -0700 Subject: [PATCH 065/404] add hurricane-specific code to moninedmf.f --- physics/moninedmf.f | 366 ++++++++++++++++++++++++++++++++++------- physics/moninedmf.meta | 43 +++++ 2 files changed, 348 insertions(+), 61 deletions(-) diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 1084aa426..a9532857c 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -64,7 +64,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & prsi,del,prsl,prslk,phii,phil,delt,dspheat, & & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & - & xkzminv,moninq_fac,errmsg,errflg) + & xkzminv,moninq_fac,hurr_pbl,islimsk,var_ric, & + & coef_ric_l,coef_ric_s,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -74,14 +75,15 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! ! arguments ! - logical, intent(in) :: lprnt - integer, intent(in) :: ipr + logical, intent(in) :: lprnt, hurr_pbl + integer, intent(in) :: ipr, islimsk(im) integer, intent(in) :: ix, im, km, ntrac, ntcw, kinver(im) integer, intent(out) :: kpbl(im) ! real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s - real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac + real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac, var_ric, & + & coef_ric_l, coef_ric_s real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & & tau(im,km), rtg(im,km,ntrac) real(kind=kind_phys), intent(in) :: & @@ -180,7 +182,15 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & ptem, ptem1, ptem2, tx1(im), tx2(im) ! real(kind=kind_phys) zstblmax,h1, h2, qlcr, actei, - & cldtime + & cldtime, ttend_fac + + !! for hurricane application + real(kind=kind_phys) wspm(im,km-1) + integer kLOC ! RGF + real :: xDKU ! RGF + + integer, parameter :: useshape=2!0-- no change, original ALPHA adjustment,1-- shape1, 2-- shape2(adjust above sfc) + real :: smax,ashape,sz2h, sksfc,skmax,ashape1,skminusk0, hmax cc parameter(gravi=1.0/grav) parameter(g=grav) @@ -211,6 +221,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & parameter (zstblmax = 2500., qlcr=3.5e-5) ! parameter (actei = 0.23) parameter (actei = 0.7) + + c c----------------------------------------------------------------------- c @@ -422,23 +434,48 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & !! The temperature of the thermal is of primary importance. For the initial estimate of the PBL height, the thermal is assumed to have one of two temperatures. If the boundary layer is stable, the thermal is assumed to have a temperature equal to the surface virtual temperature. Otherwise, the thermal is assumed to have the same virtual potential temperature as the lowest model level. For the stable case, the critical bulk Richardson number becomes a function of the wind speed and roughness length, otherwise it is set to a tunable constant. ! compute the pbl height ! - do i=1,im - flg(i) = .false. - rbup(i) = rbsoil(i) -! - if(pblflg(i)) then - thermal(i) = thvx(i,1) - crb(i) = crbcon - else - thermal(i) = tsea(i)*(1.+fv*max(q1(i,1,1),qmin)) - tem = sqrt(u10m(i)**2+v10m(i)**2) - tem = max(tem, 1.) - robn = tem / (f0 * z0(i)) - tem1 = 1.e-7 * robn - crb(i) = 0.16 * (tem1 ** (-0.18)) - crb(i) = max(min(crb(i), crbmax), crbmin) - endif - enddo + if (.not. hurr_pbl) then + do i=1,im + flg(i) = .false. + rbup(i) = rbsoil(i) + ! + if(pblflg(i)) then + thermal(i) = thvx(i,1) + crb(i) = crbcon + else + thermal(i) = tsea(i)*(1.+fv*max(q1(i,1,1),qmin)) + tem = sqrt(u10m(i)**2+v10m(i)**2) + tem = max(tem, 1.) + robn = tem / (f0 * z0(i)) + tem1 = 1.e-7 * robn + crb(i) = 0.16 * (tem1 ** (-0.18)) + crb(i) = max(min(crb(i), crbmax), crbmin) + endif + enddo + else + do i=1,im + flg(i) = .false. + rbup(i) = rbsoil(i) + + ! use variable Ri for all conditions + if(pblflg(i)) then + thermal(i) = thvx(i,1) + else + thermal(i) = tsea(i)*(1.+fv*max(q1(i,1,1),qmin)) + endif + tem = sqrt(u10m(i)**2+v10m(i)**2) + tem = max(tem, 1.) + robn = tem / (f0 * z0(i)) + tem1 = 1.e-7 * robn + crb(i) = crbcon + if (var_ric .eq. 1.) then + if (islimsk(i) .eq. 1) crb(I) = coef_ric_l*(tem1)**(-0.18) + if (islimsk(i) .eq. 0) crb(I) = coef_ric_s*(tem1)**(-0.18) + endif + crb(i) = max(min(crb(i), crbmax), crbmin) + enddo + endif + !> Given the thermal's properties and the critical Richardson number, a loop is executed to find the first level above the surface where the modified Richardson number is greater than the critical Richardson number, using equation 10a from Troen and Mahrt (1986) \cite troen_and_mahrt_1986 (also equation 8 from Hong and Pan (1996) \cite hong_and_pan_1996): !! \f[ !! h = Ri\frac{T_0\left|\vec{v}(h)\right|^2}{g\left(\theta_v(h) - \theta_s\right)} @@ -719,38 +756,223 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & kpbl(i) = 1 endif enddo -! + + +!!! 20150915 WeiguoWang added alpha (moninq_fac) and wind-dependent modification of K by RGF +! ------------------------------------------------------------------------------------- +! begin RGF modifications +! this is version MOD05 + +! RGF determine wspd at roughly 500 m above surface, or as close as possible, +! reuse SPDK2 +! zi(i,k) is AGL, right? May not matter if applied only to water grid points + if(hurr_pbl .and. moninq_fac .lt. 0.0) then + do i=1,im + spdk2 = 0. + wspm(i,1) = 0. + do k = 1, kmpbl ! kmpbl is like a max possible pbl height + if (zi(i,k) .le. 500. .and. zi(i,k+1) .gt. 500.) then ! find level bracketing 500 m + spdk2 = SQRT(u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)) ! wspd near 500 m + wspm(i,1) = spdkw/0.6 ! now the Km limit for 500 m. just store in K=1 + wspm(i,2) = float(k) ! height of level at gridpoint i. store in K=2 + endif + enddo !k + enddo ! i + endif ! hurr_pbl and moninq_fac < 0 + + ! compute diffusion coefficients below pbl !> ## Compute diffusion coefficients below the PBL top !! Below the PBL top, the diffusion coefficients (\f$K_m\f$ and \f$K_h\f$) are calculated according to equation 2 in Hong and Pan (1996) \cite hong_and_pan_1996 where a different value for \f$w_s\f$ (PBL vertical velocity scale) is used depending on the PBL stability. \f$K_h\f$ is calculated from \f$K_m\f$ using the Prandtl number. The calculated diffusion coefficients are checked so that they are bounded by maximum values and the local background diffusion coefficients. - do k = 1, kmpbl - do i=1,im - if(k < kpbl(i)) then -! zfac = max((1.-(zi(i,k+1)-zl(i,1))/ -! 1 (hpbl(i)-zl(i,1))), zfmin) - zfac = max((1.-zi(i,k+1)/hpbl(i)), zfmin) - tem = zi(i,k+1) * (zfac**pfac) * moninq_fac ! lmh suggested by kg - if(pblflg(i)) then - tem1 = vk * wscaleu(i) * tem -! dku(i,k) = xkzmo(i,k) + tem1 -! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) - dku(i,k) = tem1 - dkt(i,k) = tem1 * prinv(i) - else - tem1 = vk * wscale(i) * tem -! dku(i,k) = xkzmo(i,k) + tem1 -! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) - dku(i,k) = tem1 - dkt(i,k) = tem1 * prinv(i) + if (.not. hurr_pbl) then + do k = 1, kmpbl + do i=1,im + if(k < kpbl(i)) then +! zfac = max((1.-(zi(i,k+1)-zl(i,1))/ +! 1 (hpbl(i)-zl(i,1))), zfmin) + zfac = max((1.-zi(i,k+1)/hpbl(i)), zfmin) + tem = zi(i,k+1) * (zfac**pfac) * moninq_fac ! lmh suggested by kg + if(pblflg(i)) then + tem1 = vk * wscaleu(i) * tem +! dku(i,k) = xkzmo(i,k) + tem1 +! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) + dku(i,k) = tem1 + dkt(i,k) = tem1 * prinv(i) + else + tem1 = vk * wscale(i) * tem +! dku(i,k) = xkzmo(i,k) + tem1 +! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) + dku(i,k) = tem1 + dkt(i,k) = tem1 * prinv(i) + endif + dku(i,k) = min(dku(i,k),dkmax) + dku(i,k) = max(dku(i,k),xkzmo(i,k)) + dkt(i,k) = min(dkt(i,k),dkmax) + dkt(i,k) = max(dkt(i,k),xkzo(i,k)) + dktx(i,k)= dkt(i,k) endif - dku(i,k) = min(dku(i,k),dkmax) - dku(i,k) = max(dku(i,k),xkzmo(i,k)) - dkt(i,k) = min(dkt(i,k),dkmax) - dkt(i,k) = max(dkt(i,k),xkzo(i,k)) - dktx(i,k)= dkt(i,k) - endif - enddo - enddo + enddo !i + enddo !k + else + !hurricane PBL case (note that the i and k loop order has been switched) + do i=1, im + do k=1, kmpbl + if (k < kpbl(i)) then +! zfac = max((1.-(zi(i,k+1)-zl(i,1))/ +! 1 (hpbl(i)-zl(i,1))), zfmin) + zfac = max((1.-zi(i,k+1)/hpbl(i)), zfmin) + tem = zi(i,k+1) * (zfac**pfac) * ABS(moninq_fac) + +!!!! CHANGES FOR HEIGHT-DEPENDENT K ADJUSTMENT, WANG W + if (useshape .ge. 1) then + sz2h=(zi(i,k+1)-zl(i,1))/(hpbl(i)-zl(i,1)) + sz2h=max(sz2h,zfmin) + sz2h=min(sz2h,1.0) + zfac=(1.0-sz2h)**pfac +! smax=0.148 !! max value of this shape function + smax=0.148 !! max value of this shape function + hmax=0.333 !! roughly height if max K + skmax=hmax*(1.0-hmax)**pfac + sksfc=min(zi(i,2)/hpbl(i),0.05) ! surface layer top, 0.05H or ZI(2) (Zi(1)=0) + sksfc=sksfc*(1-sksfc)**pfac + + zfac=max(zfac,zfmin) + ashape=max(ABS(moninq_fac),0.2) ! should not be smaller than 0.2, otherwise too much adjustment(?) + if (useshape == 1) then + ashape=(1.0 - ((sz2h*zfac/smax)**0.25) *(1.0 - ashape)) + tem = zi(i,k+1) * (zfac) * ashape + elseif (useshape == 2) then !only adjus K that is > K_surface_top + ashape1=1.0 + if (skmax > sksfc) then + ashape1=(skmax*ashape-sksfc)/(skmax-sksfc) + endif + skminusk0 = zi(i,k+1)*zfac - hpbl(i)*sksfc + tem = zi(i,k+1) * (zfac) ! no adjustment + if (skminusk0 > 0) then ! only adjust K which is > surface top K + tem = skminusk0*ashape1 + hpbl(i)*sksfc + endif + endif ! useshape == 1 or 2 + endif ! endif useshape>1 +!!!! END OF CHANGES , WANG W + +!!If alpha >= 0, this is the only modification of K +! if alpha = -1, the above provides the first guess for DKU, based on assumption +! alpha = +1 +! (other values of alpha < 0 can also be applied) +! if alpha > 0, the above applies the alpha suppression factor and we are +! finished + + if(pblflg(i)) then + tem1 = vk * wscaleu(i) * tem +! dku(i,k) = xkzmo(i,k) + tem1 +! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) + dku(i,k) = tem1 + dkt(i,k) = tem1 * prinv(i) + else + tem1 = vk * wscale(i) * tem +! dku(i,k) = xkzmo(i,k) + tem1 +! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) + dku(i,k) = tem1 + dkt(i,k) = tem1 * prinv(i) + endif + dku(i,k) = min(dku(i,k),dkmax) + dku(i,k) = max(dku(i,k),xkzmo(i,k)) + dkt(i,k) = min(dkt(i,k),dkmax) + dkt(i,k) = max(dkt(i,k),xkzo(i,k)) + dktx(i,k)= dkt(i,k) + endif !k < kpbl(i) + enddo !K loop + +! possible modification of first guess DKU, under certain conditions +! (1) this applies only to columns over water + if (islimsk(i) .eq. 0) then ! sea only +! (2) alpha test +! if alpha < 0, find alpha for each column and do the loop again +! if alpha > 0, we are finished + if (moninq_fac .lt. 0.) then ! variable alpha test +! k-level of layer around 500 m + kLOC = INT(wspm(i,2)) +! print *,' kLOC ',kLOC,' KPBL ',KPBL(I) + +! (3) only do this IF KPBL(I) >= kLOC. Otherwise, we are finished, with DKU as +! if alpha = +1 + if(kpbl(i) .gt. kLOC) then + xDKU = DKU(i,kLOC) ! Km at k-level +! (4) DKU check. +! WSPM(i,1) is the KM cap for the 500-m level. +! if DKU at 500-m level < WSPM(i,1), do not limit Km ANYWHERE. Alpha = +! abs(alpha). No need to recalc. +! if DKU at 500-m level > WSPM(i,1), then alpha = WSPM(i,1)/xDKU for entire +! column + if(xDKU .ge. wspm(i,1)) then ! ONLY if DKU at 500-m exceeds cap, otherwise already done + wspm(i,3) = wspm(i,1)/xDKU ! ratio of cap to Km at k-level, store in WSPM(i,3) + !WSPM(i,4) = amin1(WSPM(I,3),1.0) ! this is new column alpha. cap at 1. ! should never be needed + wspm(i,4) = min(wspm(i,3),1.0) ! this is new column alpha. cap at 1. ! should never be needed + !! recalculate K capped by WSPM(i,1) + do k = 1, kmpbl + if(k < kpbl(i)) then +! zfac = max((1.-(zi(i,k+1)-zl(i,1))/ +! 1 (hpbl(i)-zl(i,1))), zfmin) + zfac = max((1.-zi(i,k+1)/hpbl(i)), zfmin) + tem = zi(i,k+1) * (zfac**pfac) * wspm(i,4) +!!! wang use different K shape, options!!!!!!!!!!!!!!!!!!!!!!!!! +!!!! HANGES FOR HEIGHT-DEPENDENT K ADJUSTMENT, WANG W + if(useshape .ge. 1) then + sz2h=(zi(i,k+1)-zl(i,1))/(hpbl(i)-zl(i,1)) + sz2h=max(sz2h,zfmin) + sz2h=min(sz2h,1.0) + zfac=(1.0-sz2h)**pfac + smax=0.148 !! max value of this shape function + hmax=0.333 !! roughly height if max K + skmax=hmax*(1.0-hmax)**pfac + sksfc=min(zi(i,2)/hpbl(i),0.05) ! surface layer top, 0.05H or ZI(2) (Zi(1)=0) + sksfc=sksfc*(1-sksfc)**pfac + + zfac=max(zfac,zfmin) + ashape=max(wspm(i,4),0.2) !! adjustment coef should not smaller than 0.2 + if(useshape ==1) then + ashape=(1.0 - ((sz2h*zfac/smax)**0.25)* + & (1.0 - ashape)) + tem = zi(i,k+1) * (zfac) * ashape + elseif (useshape == 2) then !only adjus K that is > K_surface_top + ashape1=1.0 + if (skmax > sksfc) then + ashape1=(skmax*ashape-sksfc)/(skmax-sksfc) + endif + skminusk0=zi(i,k+1)*zfac - hpbl(i)*sksfc + tem = zi(i,k+1) * (zfac) ! no adjustment + if (skminusk0 > 0) then ! only adjust K which is > surface top K + tem = skminusk0*ashape1 + HPBL(i)*sksfc + endif + endif ! endif useshape=1 or 2 + endif ! endif useshape>1 +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + if(pblflg(i)) then + tem1 = vk * wscaleu(i) * tem +! dku(i,k) = xkzmo(i,k) + tem1 +! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) + dku(i,k) = tem1 + dkt(i,k) = tem1 * prinv(i) + else + tem1 = vk * wscale(i) * tem +! dku(i,k) = xkzmo(i,k) + tem1 +! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) + dku(i,k) = tem1 + dkt(i,k) = tem1 * prinv(i) + endif !pblflg + dku(i,k) = min(dku(i,k),dkmax) + dku(i,k) = max(dku(i,k),xkzmo(i,k)) + dkt(i,k) = min(dkt(i,k),dkmax) + dkt(i,k) = max(dkt(i,k),xkzo(i,k)) + dktx(i,k)= dkt(i,k) + endif ! k < kpbl(i) + enddo ! K loop + endif ! xDKU .ge. wspm(i,1) + endif ! kpbl(i) .ge. kLOC + endif ! moninq_fac < 0 + endif ! islimsk == 0 + enddo ! I loop + endif ! not hurr_pbl ! ! compute diffusion coefficients based on local scheme above pbl !> ## Compute diffusion coefficients above the PBL top @@ -916,16 +1138,32 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !> After \f$K_h^{Sc}\f$ has been determined from the surface to the top of the stratocumulus layer, it is added to the value for the diffusion coefficient calculated previously using surface-based mixing [see equation 6 of Lock et al. (2000) \cite lock_et_al_2000 ]. - do k = 1, kmpbl - do i=1,im - if(scuflg(i)) then - dkt(i,k) = dkt(i,k)+ckt(i,k) - dku(i,k) = dku(i,k)+cku(i,k) - dkt(i,k) = min(dkt(i,k),dkmax) - dku(i,k) = min(dku(i,k),dkmax) - endif + if (.not. hurr_pbl) then + do k = 1, kmpbl + do i=1,im + if(scuflg(i)) then + dkt(i,k) = dkt(i,k)+ckt(i,k) + dku(i,k) = dku(i,k)+cku(i,k) + dkt(i,k) = min(dkt(i,k),dkmax) + dku(i,k) = min(dku(i,k),dkmax) + endif + enddo enddo - enddo + else + do k = 1, kmpbl + do i=1,im + if(scuflg(i)) then + !! if K needs to be adjusted by alpha, then no need to add this term + if (moninq_fac == 1.0) then + dkt(i,k) = dkt(i,k)+ckt(i,k) + dku(i,k) = dku(i,k)+cku(i,k) + end if + dkt(i,k) = min(dkt(i,k),dkmax) + dku(i,k) = min(dku(i,k),dkmax) + endif + enddo + enddo + endif ! ! compute tridiagonal matrix elements for heat and moisture ! @@ -1067,13 +1305,19 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! add dissipative heating at the first model layer ! !> Next, the temperature tendency is updated following equation 14. + if (hurr_pbl) then + ttend_fac = 0.7 + else + ttend_fac = 0.5 + endif + do i = 1,im tem = govrth(i)*sflux(i) tem1 = tem + stress(i)*spd1(i)/zl(i,1) tem2 = 0.5 * (tem1+diss(i,1)) tem2 = max(tem2, 0.) ttend = tem2 / cp - tau(i,1) = tau(i,1)+0.5*ttend + tau(i,1) = tau(i,1)+ttend_fac*ttend enddo ! ! add dissipative heating above the first model layer @@ -1083,7 +1327,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & tem = 0.5 * (diss(i,k-1)+diss(i,k)) tem = max(tem, 0.) ttend = tem / cp - tau(i,k) = tau(i,k) + 0.5*ttend + tau(i,k) = tau(i,k) + ttend_fac*ttend enddo enddo ! diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 6a6ccd183..43af9877d 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -499,6 +499,49 @@ kind = kind_phys intent = in optional = F +[hurr_pbl] + standard_name = flag_hurricane_PBL + long_name = flag for hurricane-specific options in PBL scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[islmsk] + standard_name = sea_land_ice_mask + long_name = sea/land/ice mask (=0/1/2) + units = flag + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[var_ric] + standard_name = flag_variable_bulk_richardson_number + long_name = flag for calculating variable bulk richardson number for hurricane PBL + units = flag + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[coef_ric_l] + standard_name = coefficient_for_variable_bulk_richardson_number_over_land + long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over land + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[coef_ric_s] + standard_name = coefficient_for_variable_bulk_richardson_number_over_ocean + long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over ocean + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From cce995ddd369ccb4f3d4f36e7c7ef6cb6a66ae4d Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 3 Feb 2020 15:47:12 -0700 Subject: [PATCH 066/404] clean up logic to better align with HAFS version from Bin Liu, Chunxi Zhang, Weiguo Wang, and Qingfu Liu --- physics/moninedmf.f | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/physics/moninedmf.f b/physics/moninedmf.f index a9532857c..72cb15f35 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -434,7 +434,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & !! The temperature of the thermal is of primary importance. For the initial estimate of the PBL height, the thermal is assumed to have one of two temperatures. If the boundary layer is stable, the thermal is assumed to have a temperature equal to the surface virtual temperature. Otherwise, the thermal is assumed to have the same virtual potential temperature as the lowest model level. For the stable case, the critical bulk Richardson number becomes a function of the wind speed and roughness length, otherwise it is set to a tunable constant. ! compute the pbl height ! - if (.not. hurr_pbl) then + if (.not. (hurr_pbl .and. moninq_fac < 0.0)) then do i=1,im flg(i) = .false. rbup(i) = rbsoil(i) @@ -766,7 +766,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! RGF determine wspd at roughly 500 m above surface, or as close as possible, ! reuse SPDK2 ! zi(i,k) is AGL, right? May not matter if applied only to water grid points - if(hurr_pbl .and. moninq_fac .lt. 0.0) then + if(hurr_pbl .and. moninq_fac < 0.0) then do i=1,im spdk2 = 0. wspm(i,1) = 0. @@ -784,7 +784,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! compute diffusion coefficients below pbl !> ## Compute diffusion coefficients below the PBL top !! Below the PBL top, the diffusion coefficients (\f$K_m\f$ and \f$K_h\f$) are calculated according to equation 2 in Hong and Pan (1996) \cite hong_and_pan_1996 where a different value for \f$w_s\f$ (PBL vertical velocity scale) is used depending on the PBL stability. \f$K_h\f$ is calculated from \f$K_m\f$ using the Prandtl number. The calculated diffusion coefficients are checked so that they are bounded by maximum values and the local background diffusion coefficients. - if (.not. hurr_pbl) then + if (.not. (hurr_pbl .and. moninq_fac < 0.0)) then do k = 1, kmpbl do i=1,im if(k < kpbl(i)) then @@ -814,7 +814,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo !i enddo !k else - !hurricane PBL case (note that the i and k loop order has been switched) + !hurricane PBL case and moninq_fac < 0 (note that the i and k loop order has been switched) do i=1, im do k=1, kmpbl if (k < kpbl(i)) then @@ -889,6 +889,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! (2) alpha test ! if alpha < 0, find alpha for each column and do the loop again ! if alpha > 0, we are finished + +!GJF: redundant check for moninq_fac < 0? if (moninq_fac .lt. 0.) then ! variable alpha test ! k-level of layer around 500 m kLOC = INT(wspm(i,2)) @@ -969,10 +971,10 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo ! K loop endif ! xDKU .ge. wspm(i,1) endif ! kpbl(i) .ge. kLOC - endif ! moninq_fac < 0 + endif ! moninq_fac < 0 (GJF: redundant?) endif ! islimsk == 0 enddo ! I loop - endif ! not hurr_pbl + endif ! not (hurr_pbl and moninq_fac < 0) ! ! compute diffusion coefficients based on local scheme above pbl !> ## Compute diffusion coefficients above the PBL top @@ -1154,7 +1156,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & do i=1,im if(scuflg(i)) then !! if K needs to be adjusted by alpha, then no need to add this term - if (moninq_fac == 1.0) then + if (.not. (hurr_pbl .and. moninq_fac < 0.0)) then dkt(i,k) = dkt(i,k)+ckt(i,k) dku(i,k) = dku(i,k)+cku(i,k) end if @@ -1305,7 +1307,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! add dissipative heating at the first model layer ! !> Next, the temperature tendency is updated following equation 14. - if (hurr_pbl) then + if (hurr_pbl .and. moninq_fac < 0.0) then ttend_fac = 0.7 else ttend_fac = 0.5 From e839247d49d50f6bb7211d80e6fe285e14ce438f Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 6 Feb 2020 11:31:27 -0700 Subject: [PATCH 067/404] send constants through the argument list --- physics/moninedmf.f | 35 +++++++++++++++++------------------ physics/moninedmf.meta | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 18 deletions(-) diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 72cb15f35..f6b405df1 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -65,12 +65,11 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & & xkzminv,moninq_fac,hurr_pbl,islimsk,var_ric, & - & coef_ric_l,coef_ric_s,errmsg,errflg) + & coef_ric_l,coef_ric_s,grav,cp,hvap,fv,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs - use physcons, grav => con_g, rd => con_rd, cp => con_cp - &, hvap => con_hvap, fv => con_fvirt + implicit none ! ! arguments @@ -82,6 +81,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s + real(kind=kind_phys), intent(in) :: grav, cp, hvap, fv real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac, var_ric, & & coef_ric_l, coef_ric_s real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & @@ -158,12 +158,12 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! ublflg: true for unstable but not convective(strongly unstable) pbl ! real(kind=kind_phys) aphi16, aphi5, bvf2, wfac, - & cfac, conq, cont, conw, + & cfac, conq, cont, & dk, dkmax, dkmin, & dq1, dsdz2, dsdzq, dsdzt, & dsdzu, dsdzv, & dsig, dt2, dthe1, dtodsd, - & dtodsu, dw2, dw2min, g, + & dtodsu, dw2, dw2min, & gamcrq, gamcrt, gocp, & gravi, f0, & prnum, prmax, prmin, pfac, crbcon, @@ -192,11 +192,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & integer, parameter :: useshape=2!0-- no change, original ALPHA adjustment,1-- shape1, 2-- shape2(adjust above sfc) real :: smax,ashape,sz2h, sksfc,skmax,ashape1,skminusk0, hmax cc - parameter(gravi=1.0/grav) - parameter(g=grav) - parameter(gocp=g/cp) - parameter(cont=cp/g,conq=hvap/g,conw=1.0/g) ! for del in pa -! parameter(cont=1000.*cp/g,conq=1000.*hvap/g,conw=1000./g) ! for del in kpa +! parameter(cont=1000.*cp/grav,conq=1000.*hvap/grav,conw=1000./grav) ! for del in kpa parameter(rlam=30.0,vk=0.4,vk2=vk*vk) parameter(prmin=0.25,prmax=4.,zolcr=0.2,zolcru=-0.5) parameter(dw2min=0.0001,dkmin=0.0,dkmax=1000.,rimin=-100.) @@ -247,7 +243,10 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & errflg = 0 !> ## Compute preliminary variables from input arguments - + gravi=1.0/grav + gocp=grav/cp + cont=cp/grav + conq=hvap/grav ! compute preliminary variables ! if (ix .lt. im) stop @@ -413,7 +412,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo !> - Calculate \f$\frac{g}{\theta}\f$ (govrth), \f$\beta = \frac{\Delta t}{\Delta z}\f$ (beta), \f$u_*\f$ (ustar), total surface flux (sflux), and set pblflag to false if the total surface energy flux is into the surface do i = 1,im - govrth(i) = g/theta(i,1) + govrth(i) = grav/theta(i,1) enddo ! do i=1,im @@ -490,7 +489,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & rbdn(i) = rbup(i) spdk2 = max((u1(i,k)**2+v1(i,k)**2),1.) rbup(i) = (thvx(i,k)-thermal(i))* - & (g*zl(i,k)/thvx(i,1))/spdk2 + & (grav*zl(i,k)/thvx(i,1))/spdk2 kpbl(i) = k flg(i) = rbup(i) > crb(i) endif @@ -600,7 +599,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & rbdn(i) = rbup(i) spdk2 = max((u1(i,k)**2+v1(i,k)**2),1.) rbup(i) = (thvx(i,k)-thermal(i))* - & (g*zl(i,k)/thvx(i,1))/spdk2 + & (grav*zl(i,k)/thvx(i,1))/spdk2 kpbl(i) = k flg(i) = rbup(i) > crb(i) endif @@ -1014,7 +1013,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & do k = 1, km1 do i=1,im if(k >= kpbl(i)) then - bvf2 = g*bf(i,k)*ti(i,k) + bvf2 = grav*bf(i,k)*ti(i,k) ri = max(bvf2/shr2(i,k),rimin) zk = vk*zi(i,k+1) if(ri < 0.) then ! unstable regime @@ -1299,7 +1298,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! do k = 1,km1 do i = 1,im - diss(i,k) = dku(i,k)*shr2(i,k)-g*ti(i,k)*dkt(i,k)*bf(i,k) + diss(i,k) = dku(i,k)*shr2(i,k)-grav*ti(i,k)*dkt(i,k)*bf(i,k) ! diss(i,k) = dku(i,k)*shr2(i,k) enddo enddo @@ -1394,8 +1393,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & vtend = (a2(i,k)-v1(i,k))*rdt du(i,k) = du(i,k) + utend dv(i,k) = dv(i,k) + vtend - dusfc(i) = dusfc(i) + conw*del(i,k)*utend - dvsfc(i) = dvsfc(i) + conw*del(i,k)*vtend + dusfc(i) = dusfc(i) + gravi*del(i,k)*utend + dvsfc(i) = dvsfc(i) + gravi*del(i,k)*vtend ! ! for dissipative heating for ecmwf model ! diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 43af9877d..5791262a4 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -542,6 +542,42 @@ kind = kind_phys intent = in optional = F +[grav] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[hvap] + standard_name = latent_heat_of_vaporization_of_water_at_0C + long_name = latent heat of evaporation/sublimation + units = J kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fv] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 78c03e0bb3c43f737cbd9f7e0171164a32c2def2 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 26 Mar 2020 11:53:59 -0600 Subject: [PATCH 068/404] send constants through physcons module; sending constants through the argument list (specifically grav and cp) causes regression test failures in PROD mode --- physics/moninedmf.f | 27 +++++++++++++++------------ physics/moninedmf.meta | 36 ------------------------------------ 2 files changed, 15 insertions(+), 48 deletions(-) diff --git a/physics/moninedmf.f b/physics/moninedmf.f index f6b405df1..66495d91f 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -65,10 +65,15 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & & xkzminv,moninq_fac,hurr_pbl,islimsk,var_ric, & - & coef_ric_l,coef_ric_s,grav,cp,hvap,fv,errmsg,errflg) + & coef_ric_l,coef_ric_s,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs + !GJF: Note that sending these constants through the argument list + !results in regression test failures with "PROD" mode compilation + !flags (specifically, grav and cp) + use physcons, grav => con_g, cp => con_cp, + & hvap => con_hvap, fv => con_fvirt implicit none ! @@ -81,7 +86,6 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s - real(kind=kind_phys), intent(in) :: grav, cp, hvap, fv real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac, var_ric, & & coef_ric_l, coef_ric_s real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & @@ -158,7 +162,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! ublflg: true for unstable but not convective(strongly unstable) pbl ! real(kind=kind_phys) aphi16, aphi5, bvf2, wfac, - & cfac, conq, cont, + & cfac, conq, cont, conw, & dk, dkmax, dkmin, & dq1, dsdz2, dsdzq, dsdzt, & dsdzu, dsdzv, @@ -182,8 +186,9 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & ptem, ptem1, ptem2, tx1(im), tx2(im) ! real(kind=kind_phys) zstblmax,h1, h2, qlcr, actei, - & cldtime, ttend_fac - + & cldtime + real :: ttend_fac + !! for hurricane application real(kind=kind_phys) wspm(im,km-1) integer kLOC ! RGF @@ -192,6 +197,9 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & integer, parameter :: useshape=2!0-- no change, original ALPHA adjustment,1-- shape1, 2-- shape2(adjust above sfc) real :: smax,ashape,sz2h, sksfc,skmax,ashape1,skminusk0, hmax cc + parameter(gravi=1.0/grav) + parameter(gocp=grav/cp) + parameter(cont=cp/grav,conq=hvap/grav,conw=1.0/grav) ! for del in pa ! parameter(cont=1000.*cp/grav,conq=1000.*hvap/grav,conw=1000./grav) ! for del in kpa parameter(rlam=30.0,vk=0.4,vk2=vk*vk) parameter(prmin=0.25,prmax=4.,zolcr=0.2,zolcru=-0.5) @@ -242,11 +250,6 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & errmsg = '' errflg = 0 -!> ## Compute preliminary variables from input arguments - gravi=1.0/grav - gocp=grav/cp - cont=cp/grav - conq=hvap/grav ! compute preliminary variables ! if (ix .lt. im) stop @@ -1393,8 +1396,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & vtend = (a2(i,k)-v1(i,k))*rdt du(i,k) = du(i,k) + utend dv(i,k) = dv(i,k) + vtend - dusfc(i) = dusfc(i) + gravi*del(i,k)*utend - dvsfc(i) = dvsfc(i) + gravi*del(i,k)*vtend + dusfc(i) = dusfc(i) + conw*del(i,k)*utend + dvsfc(i) = dvsfc(i) + conw*del(i,k)*vtend ! ! for dissipative heating for ecmwf model ! diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 5791262a4..43af9877d 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -542,42 +542,6 @@ kind = kind_phys intent = in optional = F -[grav] - standard_name = gravitational_acceleration - long_name = gravitational acceleration - units = m s-2 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[cp] - standard_name = specific_heat_of_dry_air_at_constant_pressure - long_name = specific heat of dry air at constant pressure - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[hvap] - standard_name = latent_heat_of_vaporization_of_water_at_0C - long_name = latent heat of evaporation/sublimation - units = J kg-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fv] - standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one - long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) - units = none - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From b492f726db97a45a68baf5311a74ed10d882001a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 6 Apr 2020 15:11:46 -0600 Subject: [PATCH 069/404] physics/moninedmf.{f,meta}: apply missing updates that were hidden in a update-from-dtc-develop commit --- physics/moninedmf.f | 2 +- physics/moninedmf.meta | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 66495d91f..2d93eb5a7 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -775,7 +775,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & do k = 1, kmpbl ! kmpbl is like a max possible pbl height if (zi(i,k) .le. 500. .and. zi(i,k+1) .gt. 500.) then ! find level bracketing 500 m spdk2 = SQRT(u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)) ! wspd near 500 m - wspm(i,1) = spdkw/0.6 ! now the Km limit for 500 m. just store in K=1 + wspm(i,1) = spdk2/0.6 ! now the Km limit for 500 m. just store in K=1 wspm(i,2) = float(k) ! height of level at gridpoint i. store in K=2 endif enddo !k diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 43af9877d..b5297b63f 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -507,7 +507,7 @@ type = logical intent = in optional = F -[islmsk] +[islimsk] standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag From b61ea19fb484acc6bba891b8a12ef430cba8cdb2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 6 Apr 2020 17:06:47 -0600 Subject: [PATCH 070/404] physics/GFS_debug.F90: add capability to debug 1-d logical arrays --- physics/GFS_debug.F90 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 6bf39d491..3670f4ddd 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -18,6 +18,7 @@ module GFS_diagtoscreen interface print_var module procedure print_logic_0d + module procedure print_logic_1d module procedure print_int_0d module procedure print_int_1d module procedure print_real_0d @@ -116,6 +117,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, do impi=0,mpisize-1 do iomp=0,ompsize-1 if (mpirank==impi .and. omprank==iomp) then + call print_var(mpirank,omprank, blkno, 'Model%kdt' , Model%kdt) ! Sfcprop call print_var(mpirank,omprank, blkno, 'Sfcprop%slmsk' , Sfcprop%slmsk) call print_var(mpirank,omprank, blkno, 'Sfcprop%oceanfrac', Sfcprop%oceanfrac) @@ -557,6 +559,30 @@ subroutine print_int_0d(mpirank,omprank,blkno,name,var) end subroutine print_int_0d + subroutine print_logic_1d(mpirank,omprank,blkno,name,var) + + use machine, only: kind_phys + + implicit none + + integer, intent(in) :: mpirank, omprank, blkno + character(len=*), intent(in) :: name + logical, intent(in) :: var(:) + + integer :: i + +#ifdef PRINT_SUM + write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) +#else + do i=ISTART,min(IEND,size(var(:))) + write(0,'(2a,3i6,i6,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, var(i) + end do +#endif + + end subroutine print_logic_1d + subroutine print_int_1d(mpirank,omprank,blkno,name,var) use machine, only: kind_phys From a8a2ab870489fc180a4daa8474a735521ab1203f Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Tue, 11 Feb 2020 10:31:58 -0700 Subject: [PATCH 071/404] enable icloud=3 capability --- physics/GFS_rrtmg_pre.F90 | 117 +++++++- physics/GFS_rrtmg_pre.meta | 26 ++ physics/radiation_clouds.f | 596 ++++++++++++++++++++++++++++++++++++- 3 files changed, 719 insertions(+), 20 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index aa1ea039e..165411a33 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -20,7 +20,7 @@ end subroutine GFS_rrtmg_pre_init ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd, Cldprop, Coupling, & - Radtend, & ! input/output + Radtend,dx, & ! input/output f_ice, f_rain, f_rimef, flgmin, cwm, & ! F-A mp scheme only lm, im, lmk, lmp, & ! input kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output @@ -32,7 +32,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input faerlw1, faerlw2, faerlw3, aerodp, & clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & clouds7, clouds8, clouds9, cldsa, & - mtopa, mbota, de_lgth, alb1d, errmsg, errflg) + mtopa, mbota, de_lgth, alb1d, errmsg, errflg, & + mpirank, mpiroot) use machine, only: kind_phys use GFS_typedefs, only: GFS_statein_type, & @@ -63,7 +64,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input & progcld1, progcld3, & & progcld2, & & progcld4, progcld5, & - & progclduni + & progclduni, & + & cal_cldfra3, find_cloudLayers,adjust_cloudIce,adjust_cloudH2O, & + & adjust_cloudFinal + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & & profsw_type, NBDSW use module_radlw_parameters, only: topflw_type, sfcflw_type, & @@ -91,8 +95,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: cwm real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: flgmin real(kind=kind_phys), intent(out) :: raddt - - + + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: dx + INTEGER, INTENT(IN) :: mpirank,mpiroot real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: delp real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: dz real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: plvl @@ -146,18 +151,19 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb - real(kind=kind_phys) :: es, qs, delt, tem0d + real(kind=kind_phys) :: es, qs, delt, tem0d, gridkm - real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn + real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn, xland real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & cldcov, deltaq, cnvc, cnvw, & - effrl, effri, effrr, effrs + effrl, effri, effrr, effrs,rho,plyrpa real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db -! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: qc_save, qi_save + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: qs_save real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,min(4,Model%ncnd)) :: ccnd real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 @@ -165,6 +171,12 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw +!mz *temporary + real(kind=kind_phys),parameter:: con_rd =2.8705e+2_kind_phys + INTEGER :: ids, ide, jds, jde, kds, kde, & + & ims, ime, jms, jme, kms, kme, & + & its, ite, jts, jte, kts, kte + ! !===> ... begin here ! @@ -529,7 +541,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice enddo enddo - elseif (Model%ncnd == 2) then ! MG or F-A + elseif (Model%ncnd == 2) then ! MG or do k=1,LMK do i=1,IM ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water @@ -545,7 +557,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(i,k,4) = tracer1(i,k,ntsw) ! snow water enddo enddo - elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 + elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3, FA do k=1,LMK do i=1,IM ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water @@ -638,6 +650,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cldcov = 0.0 endif + ! ! --- add suspended convective cloud water to grid-scale cloud water ! only for cloud fraction & radiation computation @@ -673,6 +686,84 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo endif +!mz HWRF physics: icloud=3 + ! Set internal dimensions + ids = 1 + ims = 1 + its = 1 + ide = size(Grid%xlon,1) + ime = size(Grid%xlon,1) + ite = size(Grid%xlon,1) + jds = 1 + jms = 1 + jts = 1 + jde = 1 + jme = 1 + jte = 1 + kds = 1 + kms = 1 + kts = 1 + kde = Model%levr+LTP + kme = Model%levr+LTP + kte = Model%levr+LTP + + do k = 1, LMK + do i = 1, IM + rho(i,k)=plyr(i,k)*100./(con_rd*tlyr(i,k)) + plyrpa(i,k)=plyr(i,k)*100. !hPa->Pa + end do + end do + + do i=1,im + if (Sfcprop%slmsk(i)==1. .or. Sfcprop%slmsk(i)==2.) then !sea/land/ice mask (=0/1/2) in FV3 + xland(i)=1.0 !but land/water = (1/2) in HWRF + else + xland(i)=2.0 + endif + enddo + + + gridkm = 1.414*SQRT(dx(1)*0.001*dx(1)*0.001 ) + ! if(mpirank == mpiroot) then + ! write(0,*)'cldfra3: max/min(plyrpa) = ', maxval(plyrpa), minval(plyrpa) + ! write(0,*)'cldfra3: max/min(rho) = ', maxval(rho), minval(rho) + ! endif + + + if(Model%icloud == 3) then + do i =1, im + do k =1, lmk + qc_save(i,k) = ccnd(i,k,1) + qi_save(i,k) = ccnd(i,k,2) + qs_save(i,k) = ccnd(i,k,4) + enddo + enddo + + + CALL cal_cldfra3(cldcov,qlyr,ccnd(:,:,1),ccnd(:,:,2), & + & ccnd(:,:,4),plyrpa,tlyr, RHO,XLAND,GRIDKM, & + & ids,ide, jds,jde, kds,kde, & + & ims,ime, jms,jme, kms,kme, & + & its,ite, jts,jte, kts,kte) +! if(mpirank == mpiroot) then +! write(0,*)'cal_cldfra3::max/min(cldcov) =', maxval(cldcov), & +! & minval(cldcov) +! endif + + !mz* back to micro-only qc qi,qs + do i =1, im + do k =1, lmk + ccnd(i,k,1) = qc_save(i,k) + ccnd(i,k,2) = qi_save(i,k) + ccnd(i,k,4) = qs_save(i,k) + enddo + enddo + + endif + + +!mz*end + if (lextop) then do i=1,im cldcov(i,lyb) = cldcov(i,lya) @@ -756,11 +847,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd%phy_f3d(:,:,Model%nseffr) = 250. endif - call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + call progcld5 (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,tracer1,& ! --- inputs Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & + im, lmk, lmp, Model%icloud,Model%uni_cld, & Model%lmfshal,Model%lmfdeep2, & cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 7b40e2c1d..198cd0a5a 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -70,6 +70,15 @@ type = GFS_radtend_type intent = inout optional = F +[dx] + standard_name = cell_size + long_name = relative dx for the grid cell + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [f_ice] standard_name = fraction_of_ice_water_cloud long_name = fraction of ice water cloud @@ -564,6 +573,23 @@ type = integer intent = out optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F + ######################################################################## [ccpp-arg-table] diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 49b394fe1..585ff01df 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -243,7 +243,9 @@ module module_radiation_clouds integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld4o + & cld_init, progcld5, progcld4o, & + & cal_cldfra3, find_cloudLayers,adjust_cloudIce,adjust_cloudH2O, & + & adjust_cloudFinal ! ================= @@ -2339,10 +2341,10 @@ end subroutine progcld4o !! This subroutine computes cloud related quantities using Thompson/WSM6 cloud !! microphysics scheme. subroutine progcld5 & - & ( plyr,plvl,tlyr,qlyr,qstl,rhly,clw, & ! --- inputs: + & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, & & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & - & IX, NLAY, NLP1, & + & IX, NLAY, NLP1,icloud, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: @@ -2428,13 +2430,13 @@ subroutine progcld5 & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1 + integer, intent(in) :: IX, NLAY, NLP1,ICLOUD integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, & + & tlyr, tvly, qlyr, qstl, rhly, cldcov, delp, dz, & & re_cloud, re_ice, re_snow real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw @@ -2546,7 +2548,9 @@ subroutine progcld5 & enddo enddo - if (uni_cld) then ! use unified sgs clouds generated outside +!mz* if (uni_cld) then ! use unified sgs clouds generated outside +!mz* use unified sgs or thompson clouds generated outside + if (uni_cld .or. icloud == 3) then do k = 1, NLAY do i = 1, IX cldtot(i,k) = cldcov(i,k) @@ -2634,8 +2638,76 @@ subroutine progcld5 & enddo enddo endif +!mz + if (icloud .ne.0) then +! assign/calculate efective radii for cloud water, ice, rain, snow -! +! if (effr_in) then +! do k = 1, NLAY +! do i = 1, IX +! rew(i,k) = effrl (i,k) +! rei(i,k) = max(10.0, min(150.0,effri (i,k))) +! rer(i,k) = effrr (i,k) +! res(i,k) = effrs (i,k) +! enddo +! enddo +! else + do k = 1, NLAY + do i = 1, IX + rew(i,k) = reliq_def ! default liq radius to 10 micron + rei(i,k) = reice_def ! default ice radius to 50 micron + rer(i,k) = rrain_def ! default rain radius to 1000 micron + res(i,k) = rsnow_def ! default snow radius to 250 micron + enddo + enddo +!> -# Compute effective liquid cloud droplet radius over land. + do i = 1, IX + if (nint(slmsk(i)) == 1) then + do k = 1, NLAY + tem1 = min(1.0, max(0.0, (con_ttp-tlyr(i,k))*0.05)) + rew(i,k) = 5.0 + 5.0 * tem1 + enddo + endif + enddo + +!> -# Compute effective ice cloud droplet radius following Heymsfield +!! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. + + do k = 1, NLAY + do i = 1, IX + tem2 = tlyr(i,k) - con_ttp + + if (cip(i,k) > 0.0) then + tem3 = gord * cip(i,k) * plyr(i,k) / (delp(i,k)*tvly(i,k)) + + if (tem2 < -50.0) then + rei(i,k) = (1250.0/9.917) * tem3 ** 0.109 + elseif (tem2 < -40.0) then + rei(i,k) = (1250.0/9.337) * tem3 ** 0.08 + elseif (tem2 < -30.0) then + rei(i,k) = (1250.0/9.208) * tem3 ** 0.055 + else + rei(i,k) = (1250.0/9.387) * tem3 ** 0.031 + endif + rei(i,k) = max(25.,rei(i,k)) !mz* HWRF +!mz GFDL +! rei(i,k) = max(10.0, min(rei(i,k), 150.0)) + endif + rei(i,k) = min(rei(i,k), 135.72) !- 1.0315*rei<= 140 microns + enddo + enddo + +!mz +!> -# Compute effective snow cloud droplet radius + do k = 1, NLAY + do i = 1, IX + res(i,k) = 10.0 + enddo + enddo +! endif +! + endif ! end icloud +!mz end do k = 1, NLAY do i = 1, IX clouds(i,k,1) = cldtot(i,k) @@ -3452,6 +3524,516 @@ end subroutine gethml !----------------------------------- !! @} +!+---+-----------------------------------------------------------------+ +!..Cloud fraction scheme by G. Thompson (NCAR-RAL), not intended for +!.. combining with any cumulus or shallow cumulus parameterization +!.. scheme cloud fractions. This is intended as a stand-alone for +!.. cloud fraction and is relatively good at getting widespread stratus +!.. and stratoCu without caring whether any deep/shallow Cu param schemes +!.. is making sub-grid-spacing clouds/precip. Under the hood, this +!.. scheme follows Mocko and Cotton (1995) in applicaiton of the +!.. Sundqvist et al (1989) scheme but using a grid-scale dependent +!.. RH threshold, one each for land v. ocean points based on +!.. experiences with HWRF testing. +!+---+-----------------------------------------------------------------+ +! +!+---+-----------------------------------------------------------------+ + + SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, & + & p,t,rho, XLAND, gridkm, & +! & rand_perturb_on, kme_stoch, rand_pert, & + & ids,ide, jds,jde, kds,kde, & + & ims,ime, jms,jme, kms,kme, & + & its,ite, jts,jte, kts,kte) +! + USE module_mp_thompson , ONLY : rsif, rslf + IMPLICIT NONE +! + INTEGER, INTENT(IN):: ids,ide, jds,jde, kds,kde, & + & ims,ime, jms,jme, kms,kme, & +! & kme_stoch, & + & its,ite, jts,jte, kts,kte + +! INTEGER, INTENT(IN):: rand_perturb_on + REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(IN):: qv,p,t,rho + REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT):: qc,qi,qs +! REAL, DIMENSION(ims:ime,kms:kme_stoch,jms:jme), INTENT(IN):: rand_pert + REAL, DIMENSION(ims:ime,jms:jme), INTENT(IN):: XLAND + + REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT):: cldfra + REAL, INTENT(IN):: gridkm + +!..Local vars. + REAL:: RH_00L, RH_00O, RH_00, RHI_max, entrmnt + REAL, DIMENSION(ims:ime,kms:kme,jms:jme):: qvsat + INTEGER:: i,j,k + REAL:: TK, TC, qvsi, qvsw, RHUM, xx, yy + REAL, DIMENSION(kts:kte):: qvs1d, cfr1d, T1d, & + & P1d, R1d, qc1d, qi1d, qs1d + + character*512 dbg_msg + LOGICAL:: debug_flag + +!+---+ + +!..First cut scale-aware. Higher resolution should require closer to +!.. saturated grid box for higher cloud fraction. Simple functions +!.. chosen based on Mocko and Cotton (1995) starting point and desire +!.. to get near 100% RH as grid spacing moves toward 1.0km, but higher +!.. RH over ocean required as compared to over land. + + RH_00L = 0.7 + SQRT(1./(25.0+gridkm*gridkm*gridkm)) + RH_00O = 0.81 + SQRT(1./(50.0+gridkm*gridkm*gridkm)) + + DO j = jts,jte + DO k = kts,kte + DO i = its,ite + RHI_max = 0.0 + CLDFRA(I,K,J) = 0.0 + + if (qc(i,k,j).gt.1.E-6 .or. qi(i,k,j).ge.1.E-7 .or.qs(i,k,j) & + & .gt.1.E-5) then + CLDFRA(I,K,J) = 1.0 + qvsat(i,k,j) = qv(i,k,j) + else + TK = t(i,k,j) + TC = TK - 273.16 + + qvsw = rslf(P(i,k,j), TK) + qvsi = rsif(P(i,k,j), TK) + + if (tc .ge. -12.0) then + qvsat(i,k,j) = qvsw + elseif (tc .lt. -20.0) then + qvsat(i,k,j) = qvsi + else + qvsat(i,k,j) = qvsw - (qvsw-qvsi)*(-12.0-tc)/(-12.0+20.) + endif + RHUM = MAX(0.01, MIN(qv(i,k,j)/qvsat(i,k,j), 0.9999)) + + IF ((XLAND(I,J)-1.5).GT.0.) THEN !--- Ocean + RH_00 = RH_00O + ELSE !--- Land + RH_00 = RH_00L + ENDIF + + if (tc .ge. -12.0) then + RHUM = MIN(0.999, RHUM) + CLDFRA(I,K,J) = MAX(0.0, 1.0-SQRT((1.0-RHUM)/(1.-RH_00))) + elseif (tc.lt.-12..and.tc.gt.-70. .and. RHUM.gt.RH_00L) then + RHUM = MAX(0.01, MIN(qv(i,k,j)/qvsat(i,k,j), 1.0 - 1.E-6)) + CLDFRA(I,K,J) = MAX(0., 1.0-SQRT((1.0-RHUM)/(1.0-RH_00L))) + endif + CLDFRA(I,K,J) = MIN(0.90, CLDFRA(I,K,J)) + + endif + ENDDO + ENDDO + ENDDO + + +!..Prepare for a 1-D column to find various cloud layers. + + DO j = jts,jte + DO i = its,ite +! if (i.gt.10.and.i.le.20 .and. j.gt.10.and.j.le.20) then +! debug_flag = .true. +! else +! debug_flag = .false. +! endif + +! if (rand_perturb_on .eq. 1) then +! entrmnt = MAX(0.01, MIN(0.99, 0.5 + rand_pert(i,1,j)*0.5)) +! else + entrmnt = 0.5 +! endif + + DO k = kts,kte + qvs1d(k) = qvsat(i,k,j) + cfr1d(k) = cldfra(i,k,j) + T1d(k) = t(i,k,j) + P1d(k) = p(i,k,j) + R1d(k) = rho(i,k,j) + qc1d(k) = qc(i,k,j) + qi1d(k) = qi(i,k,j) + qs1d(k) = qs(i,k,j) + ENDDO + +! if (debug_flag) then +! WRITE (dbg_msg,*) 'DEBUG-GT: finding cloud layers at point (', i, ', ', j, ')' +! CALL wrf_debug (150, dbg_msg) +! endif + call find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & + & debug_flag, qc1d, qi1d, qs1d, kts,kte) + + DO k = kts,kte + cldfra(i,k,j) = cfr1d(k) + qc(i,k,j) = qc1d(k) + qi(i,k,j) = qi1d(k) + ENDDO + ENDDO + ENDDO + + + END SUBROUTINE cal_cldfra3 + + +!+---+-----------------------------------------------------------------+ +!..From cloud fraction array, find clouds of multi-level depth and +!compute +!.. a reasonable value of LWP or IWP that might be contained in that +!depth, +!.. unless existing LWC/IWC is already there. + + SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & + & debugfl, qc1d, qi1d, qs1d, kts,kte) +! + IMPLICIT NONE +! + INTEGER, INTENT(IN):: kts, kte + LOGICAL, INTENT(IN):: debugfl + REAL, INTENT(IN):: entrmnt + REAL, DIMENSION(kts:kte), INTENT(IN):: qvs1d,T1d,P1d,R1d + REAL, DIMENSION(kts:kte), INTENT(INOUT):: cfr1d + REAL, DIMENSION(kts:kte), INTENT(INOUT):: qc1d, qi1d, qs1d + +!..Local vars. + REAL, DIMENSION(kts:kte):: theta, dz + REAL:: Z1, Z2, theta1, theta2, ht1, ht2 + INTEGER:: k, k2, k_tropo, k_m12C, k_m40C, k_cldb, k_cldt, kbot + LOGICAL:: in_cloud + character*512 dbg_msg + +!+---+ + + k_m12C = 0 + k_m40C = 0 + DO k = kte, kts, -1 + theta(k) = T1d(k)*((100000.0/P1d(k))**(287.05/1004.)) + if (T1d(k)-273.16 .gt. -40.0 .and. P1d(k).gt.7000.0) k_m40C = & + & MAX(k_m40C, k) + if (T1d(k)-273.16 .gt. -12.0 .and. P1d(k).gt.10000.0) k_m12C = & + & MAX(k_m12C, k) + ENDDO + if (k_m40C .le. kts) k_m40C = kts + if (k_m12C .le. kts) k_m12C = kts + + Z2 = 44307.692 * (1.0 - (P1d(kte)/101325.)**0.190) + DO k = kte-1, kts, -1 + Z1 = 44307.692 * (1.0 - (P1d(k)/101325.)**0.190) + dz(k+1) = Z2 - Z1 + Z2 = Z1 + ENDDO + dz(kts) = dz(kts+1) + +!..Find tropopause height, best surrogate, because we would not really +!.. wish to put fake clouds into the stratosphere. The 10/1500 ratio +!.. d(Theta)/d(Z) approximates a vertical line on typical SkewT chart +!.. near typical (mid-latitude) tropopause height. Since messy data +!.. could give us a false signal of such a transition, do the check over +!.. three K-level change, not just a level-to-level check. This method +!.. has potential failure in arctic-like conditions with extremely low +!.. tropopause height, as would any other diagnostic, so ensure resulting +!.. k_tropo level is above 4km. + + DO k = kte-3, kts, -1 + theta1 = theta(k) + theta2 = theta(k+2) + ht1 = 44307.692 * (1.0 - (P1d(k)/101325.)**0.190) + ht2 = 44307.692 * (1.0 - (P1d(k+2)/101325.)**0.190) + if ( (((theta2-theta1)/(ht2-ht1)) .lt. 10./1500. ) .AND. & + & (ht1.lt.19000.) .and. (ht1.gt.4000.) ) then + goto 86 + endif + ENDDO + 86 continue + k_tropo = MAX(kts+2, k+2) + +! if (debugfl) then +! print*, ' FOUND TROPOPAUSE ', k_tropo, ' near ', ht2, ' m' +! WRITE (dbg_msg,*) 'DEBUG-GT: FOUND TROPOPAUSE ', k_tropo, ' near ', ht2, ' m' +! CALL wrf_debug (150, dbg_msg) +! endif + +!..Eliminate possible fractional clouds above supposed tropopause. + DO k = k_tropo+1, kte + if (cfr1d(k).gt.0.0 .and. cfr1d(k).lt.0.999) then + cfr1d(k) = 0. + endif + ENDDO + +!..We would like to prevent fractional clouds below LCL in idealized +!.. situation with deep well-mixed convective PBL, that otherwise is +!.. likely to get clouds in more realistic capping inversion layer. + + kbot = kts+2 + DO k = kbot, k_m12C + if ( (theta(k)-theta(k-1)) .gt. 0.05E-3*dz(k)) EXIT + ENDDO + kbot = MAX(kts+1, k-2) + DO k = kts, kbot + if (cfr1d(k).gt.0.0 .and. cfr1d(k).lt.0.999) cfr1d(k) = 0. + ENDDO + + +!..Starting below tropo height, if cloud fraction greater than 1 +!percent, +!.. compute an approximate total layer depth of cloud, determine a total +!.. liquid water/ice path (LWP/IWP), then reduce that amount with tuning +!.. parameter to represent entrainment factor, then divide up LWP/IWP +!.. into delta-Z weighted amounts for individual levels per cloud layer. + + + k_cldb = k_tropo + in_cloud = .false. + k = k_tropo + DO WHILE (.not. in_cloud .AND. k.gt.k_m12C) + k_cldt = 0 + if (cfr1d(k).ge.0.01) then + in_cloud = .true. + k_cldt = MAX(k_cldt, k) + endif + if (in_cloud) then + DO k2 = k_cldt-1, k_m12C, -1 + if (cfr1d(k2).lt.0.01 .or. k2.eq.k_m12C) then + k_cldb = k2+1 + goto 87 + endif + ENDDO + 87 continue + in_cloud = .false. + endif + if ((k_cldt - k_cldb + 1) .ge. 2) then +! if (debugfl) then +! print*, 'An ice cloud layer is found between ', k_cldt, +! k_cldb, P1d(k_cldt)*0.01, P1d(k_cldb)*0.01 +! WRITE (dbg_msg,*) 'DEBUG-GT: An ice cloud layer is found between +! ', k_cldt, k_cldb, P1d(k_cldt)*0.01, P1d(k_cldb)*0.01 +! CALL wrf_debug (150, dbg_msg) +! endif + call adjust_cloudIce(cfr1d, qi1d, qs1d, qvs1d, T1d,R1d,dz, & + & entrmnt, k_cldb,k_cldt,kts,kte) + k = k_cldb + else + if (cfr1d(k_cldb).gt.0.and.qi1d(k_cldb).lt.1.E-6) & + & qi1d(k_cldb)=1.E-5*cfr1d(k_cldb) + endif + + + k = k - 1 + ENDDO + + + + k_cldb = k_tropo + in_cloud = .false. + k = k_m12C + 2 + DO WHILE (.not. in_cloud .AND. k.gt.kbot) + k_cldt = 0 + if (cfr1d(k).ge.0.01) then + in_cloud = .true. + k_cldt = MAX(k_cldt, k) + endif + if (in_cloud) then + DO k2 = k_cldt-1, kbot, -1 + if (cfr1d(k2).lt.0.01 .or. k2.eq.kbot) then + k_cldb = k2+1 + goto 88 + endif + ENDDO + 88 continue + in_cloud = .false. + endif + if ((k_cldt - k_cldb + 1) .ge. 2) then +! if (debugfl) then +! print*, 'A water cloud layer is found between ', k_cldt, +! k_cldb, P1d(k_cldt)*0.01, P1d(k_cldb)*0.01 +! WRITE (dbg_msg,*) 'DEBUG-GT: A water cloud layer is found +! between ', k_cldt, k_cldb, P1d(k_cldt)*0.01, P1d(k_cldb)*0.01 +! CALL wrf_debug (150, dbg_msg) +! endif + call adjust_cloudH2O(cfr1d, qc1d, qvs1d, T1d,R1d,dz, & + & entrmnt, k_cldb,k_cldt,kts,kte) + k = k_cldb + else + if (cfr1d(k_cldb).gt.0.and.qc1d(k_cldb).lt.1.E-6) & + & qc1d(k_cldb)=1.E-5*cfr1d(k_cldb) + endif + k = k - 1 + ENDDO + +!..Do a final total column adjustment since we may have added more than +!1mm +!.. LWP/IWP for multiple cloud decks. + + call adjust_cloudFinal(cfr1d, qc1d, qi1d, R1d,dz, kts,kte,k_tropo) + +! if (debugfl) then +! print*, ' Made-up fake profile of clouds' +! do k = kte, kts, -1 +! write(*,'(i3, 2x, f8.2, 2x, f9.2, 2x, f6.2, 2x, f15.7, 2x, +! f15.7)') & +! & K, T1d(k)-273.15, P1d(k)*0.01, cfr1d(k)*100., +! qc1d(k)*1000.,qi1d(k)*1000. +! enddo +! WRITE (dbg_msg,*) 'DEBUG-GT: Made-up fake profile of clouds' +! CALL wrf_debug (150, dbg_msg) +! do k = kte, kts, -1 +! write(dbg_msg,'(f8.2, 2x, f9.2, 2x, f6.2, 2x, f15.7, 2x, +! f15.7)') & +! & T1d(k)-273.15, P1d(k)*0.01, cfr1d(k)*100., +! qc1d(k)*1000.,qi1d(k)*1000. +! CALL wrf_debug (150, dbg_msg) +! enddo +! endif + + + END SUBROUTINE find_cloudLayers + +!+---+-----------------------------------------------------------------+ + + SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs, T,Rho,dz, entr, k1,k2, & + & kts,kte) +! + IMPLICIT NONE +! + INTEGER, INTENT(IN):: k1,k2, kts,kte + REAL, INTENT(IN):: entr + REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, qvs, T, Rho, dz + REAL, DIMENSION(kts:kte), INTENT(INOUT):: qi, qs + REAL:: iwc, max_iwc, tdz, this_iwc, this_dz, iwp_exists + INTEGER:: k, kmid + + tdz = 0. + do k = k1, k2 + tdz = tdz + dz(k) + enddo + kmid = NINT(0.5*(k1+k2)) + max_iwc = ABS(qvs(k2-1)-qvs(k1)) +! print*, ' max_iwc = ', max_iwc, ' over DZ=',tdz + + iwp_exists = 0. + do k = k1, k2 + iwp_exists = iwp_exists + (qi(k)+qs(k))*Rho(k)*dz(k) + enddo + if (iwp_exists .gt. 1.0) RETURN + + this_dz = 0.0 + do k = k1, k2 + if (k.eq.k1) then + this_dz = this_dz + 0.5*dz(k) + else + this_dz = this_dz + dz(k) + endif + this_iwc = max_iwc*this_dz/tdz + iwc = MAX(1.E-6, this_iwc*(1.-entr)) + if (cfr(k).gt.0.01.and.cfr(k).lt.0.99.and.T(k).ge.203.16) then + qi(k) = qi(k) + 0.1*cfr(k)*iwc + elseif (qi(k).lt.1.E-5.and.cfr(k).ge.0.99.and.T(k).ge.203.16) & + & then + qi(k) = qi(k) + 0.01*iwc + endif + enddo + + END SUBROUTINE adjust_cloudIce + +!+---+-----------------------------------------------------------------+ + + SUBROUTINE adjust_cloudH2O(cfr, qc, qvs, T,Rho,dz, entr, k1,k2, & + & kts,kte) +! + IMPLICIT NONE +! + INTEGER, INTENT(IN):: k1,k2, kts,kte + REAL, INTENT(IN):: entr + REAL, DIMENSION(kts:kte):: cfr, qc, qvs, T, Rho, dz + REAL:: lwc, max_lwc, tdz, this_lwc, this_dz, lwp_exists + INTEGER:: k, kmid + + tdz = 0. + do k = k1, k2 + tdz = tdz + dz(k) + enddo + kmid = NINT(0.5*(k1+k2)) + max_lwc = ABS(qvs(k2-1)-qvs(k1)) +! print*, ' max_lwc = ', max_lwc, ' over DZ=',tdz + + lwp_exists = 0. + do k = k1, k2 + lwp_exists = lwp_exists + qc(k)*Rho(k)*dz(k) + enddo + if (lwp_exists .gt. 1.0) RETURN + + this_dz = 0.0 + do k = k1, k2 + if (k.eq.k1) then + this_dz = this_dz + 0.5*dz(k) + else + this_dz = this_dz + dz(k) + endif + this_lwc = max_lwc*this_dz/tdz + lwc = MAX(1.E-6, this_lwc*(1.-entr)) + if (cfr(k).gt.0.01.and.cfr(k).lt.0.99.and.T(k).lt.298.16.and. & + & T(k).ge.253.16) then + qc(k) = qc(k) + cfr(k)*cfr(k)*lwc + elseif (cfr(k).ge.0.99.and.qc(k).lt.1.E-5.and.T(k).lt.298.16 & + & .and.T(k).ge.253.16) then + qc(k) = qc(k) + 0.1*lwc + endif + enddo + + END SUBROUTINE adjust_cloudH2O + + +!+---+-----------------------------------------------------------------+ + +!..Do not alter any grid-explicitly resolved hydrometeors, rather only +!.. the supposed amounts due to the cloud fraction scheme. + + SUBROUTINE adjust_cloudFinal(cfr, qc, qi, Rho,dz, kts,kte,k_tropo) +! + IMPLICIT NONE +! + INTEGER, INTENT(IN):: kts,kte,k_tropo + REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, Rho, dz + REAL, DIMENSION(kts:kte), INTENT(INOUT):: qc, qi + REAL:: lwp, iwp, xfac + INTEGER:: k + + lwp = 0. + do k = kts, k_tropo + if (cfr(k).gt.0.0) then + lwp = lwp + qc(k)*Rho(k)*dz(k) + endif + enddo + + iwp = 0. + do k = kts, k_tropo + if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then + iwp = iwp + qi(k)*Rho(k)*dz(k) + endif + enddo + + if (lwp .gt. 1.5) then + xfac = 1./lwp + do k = kts, k_tropo + if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then + qc(k) = qc(k)*xfac + endif + enddo + endif + + if (iwp .gt. 1.5) then + xfac = 1./iwp + do k = kts, k_tropo + if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then + qi(k) = qi(k)*xfac + endif + enddo + endif + + END SUBROUTINE adjust_cloudFinal + ! !........................................! end module module_radiation_clouds ! From 9309fc60a936d1463cdb1689bcd820ae70e2f50a Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 13 Feb 2020 13:14:43 -0700 Subject: [PATCH 072/404] add exponential cloud overlapping for LW component --- physics/HWRF_mcica_random_numbers.F90 | 109 ++++ physics/HWRF_mersenne_twister.F90 | 304 +++++++++++ physics/radiation_clouds.f | 52 +- physics/radlw_main.f | 746 +++++++++++++++++++++++++- 4 files changed, 1178 insertions(+), 33 deletions(-) create mode 100644 physics/HWRF_mcica_random_numbers.F90 create mode 100644 physics/HWRF_mersenne_twister.F90 diff --git a/physics/HWRF_mcica_random_numbers.F90 b/physics/HWRF_mcica_random_numbers.F90 new file mode 100644 index 000000000..b2f2d20dd --- /dev/null +++ b/physics/HWRF_mcica_random_numbers.F90 @@ -0,0 +1,109 @@ + module mcica_random_numbers + + ! Generic module to wrap random number generators. + ! The module defines a type that identifies the particular stream of random + ! numbers, and has procedures for initializing it and getting real numbers + ! in the range 0 to 1. + ! This version uses the Mersenne Twister to generate random numbers on [0, 1]. + ! + use MersenneTwister, only: randomNumberSequence, & ! The random number engine. + new_RandomNumberSequence, getRandomReal +!! mji +!! use time_manager_mod, only: time_type, get_date + +!mz use parkind, only : im => kind_im, rb => kind_rb + use machine, only: im => kind_io4, rb => kind_phys + + implicit none + private + + type randomNumberStream + type(randomNumberSequence) :: theNumbers + end type randomNumberStream + + interface getRandomNumbers + module procedure getRandomNumber_Scalar, getRandomNumber_1D, getRandomNumber_2D + end interface getRandomNumbers + + interface initializeRandomNumberStream + module procedure initializeRandomNumberStream_S, initializeRandomNumberStream_V + end interface initializeRandomNumberStream + + public :: randomNumberStream, & + initializeRandomNumberStream, getRandomNumbers +!! mji +!! initializeRandomNumberStream, getRandomNumbers, & +!! constructSeed +contains + ! --------------------------------------------------------- + ! Initialization + ! --------------------------------------------------------- + function initializeRandomNumberStream_S(seed) result(new) + integer(kind=im), intent( in) :: seed + type(randomNumberStream) :: new + + new%theNumbers = new_RandomNumberSequence(seed) + + end function initializeRandomNumberStream_S + ! --------------------------------------------------------- + function initializeRandomNumberStream_V(seed) result(new) + integer(kind=im), dimension(:), intent( in) :: seed + type(randomNumberStream) :: new + + new%theNumbers = new_RandomNumberSequence(seed) + + end function initializeRandomNumberStream_V + + ! --------------------------------------------------------- + ! Procedures for drawing random numbers + ! --------------------------------------------------------- + subroutine getRandomNumber_Scalar(stream, number) + type(randomNumberStream), intent(inout) :: stream + real(kind=rb), intent( out) :: number + + number = getRandomReal(stream%theNumbers) + end subroutine getRandomNumber_Scalar + ! --------------------------------------------------------- + subroutine getRandomNumber_1D(stream, numbers) + type(randomNumberStream), intent(inout) :: stream + real(kind=rb), dimension(:), intent( out) :: numbers + + ! Local variables + integer(kind=im) :: i + + do i = 1, size(numbers) + numbers(i) = getRandomReal(stream%theNumbers) + end do + end subroutine getRandomNumber_1D + ! --------------------------------------------------------- + subroutine getRandomNumber_2D(stream, numbers) + type(randomNumberStream), intent(inout) :: stream + real(kind=rb), dimension(:, :), intent( out) :: numbers + + ! Local variables + integer(kind=im) :: i + + do i = 1, size(numbers, 2) + call getRandomNumber_1D(stream, numbers(:, i)) + end do + end subroutine getRandomNumber_2D + +! mji +! ! --------------------------------------------------------- +! ! Constructing a unique seed from grid cell index and model date/time +! ! Once we have the GFDL stuff we'll add the year, month, day, hour, minute +! ! --------------------------------------------------------- +! function constructSeed(i, j, time) result(seed) +! integer(kind=im), intent( in) :: i, j +! type(time_type), intent( in) :: time +! integer(kind=im), dimension(8) :: seed +! +! ! Local variables +! integer(kind=im) :: year, month, day, hour, minute, second +! +! +! call get_date(time, year, month, day, hour, minute, second) +! seed = (/ i, j, year, month, day, hour, minute, second /) +! end function constructSeed + + end module mcica_random_numbers diff --git a/physics/HWRF_mersenne_twister.F90 b/physics/HWRF_mersenne_twister.F90 new file mode 100644 index 000000000..f9e3b0b0a --- /dev/null +++ b/physics/HWRF_mersenne_twister.F90 @@ -0,0 +1,304 @@ +! Fortran-95 implementation of the Mersenne Twister 19937, following +! the C implementation described below (code mt19937ar-cok.c, dated 2002/2/10), +! adapted cosmetically by making the names more general. +! Users must declare one or more variables of type randomNumberSequence in the calling +! procedure which are then initialized using a required seed. If the +! variable is not initialized the random numbers will all be 0. +! For example: +! program testRandoms +! use RandomNumbers +! type(randomNumberSequence) :: randomNumbers +! integer :: i +! +! randomNumbers = new_RandomNumberSequence(seed = 100) +! do i = 1, 10 +! print ('(f12.10, 2x)'), getRandomReal(randomNumbers) +! end do +! end program testRandoms +! +! Fortran-95 implementation by +! Robert Pincus +! NOAA-CIRES Climate Diagnostics Center +! Boulder, CO 80305 +! email: Robert.Pincus@colorado.edu +! +! This documentation in the original C program reads: +! ------------------------------------------------------------- +! A C-program for MT19937, with initialization improved 2002/2/10. +! Coded by Takuji Nishimura and Makoto Matsumoto. +! This is a faster version by taking Shawn Cokus's optimization, +! Matthe Bellew's simplification, Isaku Wada's real version. +! +! Before using, initialize the state by using init_genrand(seed) +! or init_by_array(init_key, key_length). +! +! Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, +! All rights reserved. +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! +! 3. The names of its contributors may not be used to endorse or promote +! products derived from this software without specific prior written +! permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +! PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +! +! +! Any feedback is very welcome. +! http://www.math.keio.ac.jp/matumoto/emt.html +! email: matumoto@math.keio.ac.jp +! ------------------------------------------------------------- + + module MersenneTwister +! ------------------------------------------------------------- + +!mz use parkind, only : im => kind_im, rb => kind_rb + use machine, only: im => kind_io4, rb => kind_phys + + implicit none + private + + ! Algorithm parameters + ! ------- + ! Period parameters + integer(kind=im), parameter :: blockSize = 624, & + M = 397, & + MATRIX_A = -1727483681, & ! constant vector a (0x9908b0dfUL) + UMASK = -2147483647-1, & ! most significant w-r bits (0x80000000UL) + LMASK = 2147483647 ! least significant r bits (0x7fffffffUL) + ! Tempering parameters + integer(kind=im), parameter :: TMASKB= -1658038656, & ! (0x9d2c5680UL) + TMASKC= -272236544 ! (0xefc60000UL) + ! ------- + + ! The type containing the state variable + type randomNumberSequence + integer(kind=im) :: currentElement ! = blockSize + integer(kind=im), dimension(0:blockSize -1) :: state ! = 0 + end type randomNumberSequence + + interface new_RandomNumberSequence + module procedure initialize_scalar, initialize_vector + end interface new_RandomNumberSequence + + + public :: randomNumberSequence + public :: new_RandomNumberSequence, finalize_RandomNumberSequence, & + getRandomInt, getRandomPositiveInt, getRandomReal +! ------------------------------------------------------------- +contains + ! ------------------------------------------------------------- + ! Private functions + ! --------------------------- + function mixbits(u, v) + integer(kind=im), intent( in) :: u, v + integer(kind=im) :: mixbits + + mixbits = ior(iand(u, UMASK), iand(v, LMASK)) + end function mixbits + ! --------------------------- + function twist(u, v) + integer(kind=im), intent( in) :: u, v + integer(kind=im) :: twist + + ! Local variable + integer(kind=im), parameter, dimension(0:1) :: t_matrix = (/ 0_im, MATRIX_A /) + + twist = ieor(ishft(mixbits(u, v), -1_im), t_matrix(iand(v, 1_im))) + twist = ieor(ishft(mixbits(u, v), -1_im), t_matrix(iand(v, 1_im))) + end function twist + ! --------------------------- + subroutine nextState(twister) + type(randomNumberSequence), intent(inout) :: twister + + ! Local variables + integer(kind=im) :: k + + do k = 0, blockSize - M - 1 + twister%state(k) = ieor(twister%state(k + M), & + twist(twister%state(k), twister%state(k + 1_im))) + end do + do k = blockSize - M, blockSize - 2 + twister%state(k) = ieor(twister%state(k + M - blockSize), & + twist(twister%state(k), twister%state(k + 1_im))) + end do + twister%state(blockSize - 1_im) = ieor(twister%state(M - 1_im), & + twist(twister%state(blockSize - 1_im), twister%state(0_im))) + twister%currentElement = 0_im + + end subroutine nextState + ! --------------------------- + elemental function temper(y) + integer(kind=im), intent(in) :: y + integer(kind=im) :: temper + + integer(kind=im) :: x + + ! Tempering + x = ieor(y, ishft(y, -11)) + x = ieor(x, iand(ishft(x, 7), TMASKB)) + x = ieor(x, iand(ishft(x, 15), TMASKC)) + temper = ieor(x, ishft(x, -18)) + end function temper + ! ------------------------------------------------------------- + ! Public (but hidden) functions + ! -------------------- + function initialize_scalar(seed) result(twister) + integer(kind=im), intent(in ) :: seed + type(randomNumberSequence) :: twister + + integer(kind=im) :: i + ! See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. In the previous versions, + ! MSBs of the seed affect only MSBs of the array state[]. + ! 2002/01/09 modified by Makoto Matsumoto + + twister%state(0) = iand(seed, -1_im) + do i = 1, blockSize - 1 ! ubound(twister%state) + twister%state(i) = 1812433253_im * ieor(twister%state(i-1), & + ishft(twister%state(i-1), -30_im)) + i + twister%state(i) = iand(twister%state(i), -1_im) ! for >32 bit machines + end do + twister%currentElement = blockSize + end function initialize_scalar + ! ------------------------------------------------------------- + function initialize_vector(seed) result(twister) + integer(kind=im), dimension(0:), intent(in) :: seed + type(randomNumberSequence) :: twister + + integer(kind=im) :: i, j, k, nFirstLoop, nWraps + + nWraps = 0 + twister = initialize_scalar(19650218_im) + + nFirstLoop = max(blockSize, size(seed)) + do k = 1, nFirstLoop + i = mod(k + nWraps, blockSize) + j = mod(k - 1, size(seed)) + if(i == 0) then + twister%state(i) = twister%state(blockSize - 1) + twister%state(1) = ieor(twister%state(1), & + ieor(twister%state(1-1), & + ishft(twister%state(1-1), -30_im)) * 1664525_im) + & + seed(j) + j ! Non-linear + twister%state(i) = iand(twister%state(i), -1_im) ! for >32 bit machines + nWraps = nWraps + 1 + else + twister%state(i) = ieor(twister%state(i), & + ieor(twister%state(i-1), & + ishft(twister%state(i-1), -30_im)) * 1664525_im) + & + seed(j) + j ! Non-linear + twister%state(i) = iand(twister%state(i), -1_im) ! for >32 bit machines + end if + end do + + ! + ! Walk through the state array, beginning where we left off in the block above + ! + do i = mod(nFirstLoop, blockSize) + nWraps + 1, blockSize - 1 + twister%state(i) = ieor(twister%state(i), & + ieor(twister%state(i-1), & + ishft(twister%state(i-1), -30_im)) * 1566083941_im) - i ! Non-linear + twister%state(i) = iand(twister%state(i), -1_im) ! for >32 bit machines + end do + + twister%state(0) = twister%state(blockSize - 1) + + do i = 1, mod(nFirstLoop, blockSize) + nWraps + twister%state(i) = ieor(twister%state(i), & + ieor(twister%state(i-1), & + ishft(twister%state(i-1), -30_im)) * 1566083941_im) - i ! Non-linear + twister%state(i) = iand(twister%state(i), -1_im) ! for >32 bit machines + end do + + twister%state(0) = UMASK + twister%currentElement = blockSize + + end function initialize_vector + ! ------------------------------------------------------------- + ! Public functions + ! -------------------- + function getRandomInt(twister) + type(randomNumberSequence), intent(inout) :: twister + integer(kind=im) :: getRandomInt + ! Generate a random integer on the interval [0,0xffffffff] + ! Equivalent to genrand_int32 in the C code. + ! Fortran doesn't have a type that's unsigned like C does, + ! so this is integers in the range -2**31 - 2**31 + ! All functions for getting random numbers call this one, + ! then manipulate the result + + if(twister%currentElement >= blockSize) call nextState(twister) + + getRandomInt = temper(twister%state(twister%currentElement)) + twister%currentElement = twister%currentElement + 1 + + end function getRandomInt + ! -------------------- + function getRandomPositiveInt(twister) + type(randomNumberSequence), intent(inout) :: twister + integer(kind=im) :: getRandomPositiveInt + ! Generate a random integer on the interval [0,0x7fffffff] + ! or [0,2**31] + ! Equivalent to genrand_int31 in the C code. + + ! Local integers + integer(kind=im) :: localInt + + localInt = getRandomInt(twister) + getRandomPositiveInt = ishft(localInt, -1) + + end function getRandomPositiveInt + ! -------------------- + ! -------------------- +!! mji - modified Jan 2007, double converted to rrtmg real kind type + function getRandomReal(twister) + type(randomNumberSequence), intent(inout) :: twister +! double precision :: getRandomReal + real(kind=rb) :: getRandomReal + ! Generate a random number on [0,1] + ! Equivalent to genrand_real1 in the C code + ! The result is stored as double precision but has 32 bit resolution + + integer(kind=im) :: localInt + + localInt = getRandomInt(twister) + if(localInt < 0) then +! getRandomReal = dble(localInt + 2.0d0**32)/(2.0d0**32 - 1.0d0) + getRandomReal = (localInt + 2.0**32_rb)/(2.0**32_rb - 1.0_rb) + else +! getRandomReal = dble(localInt )/(2.0d0**32 - 1.0d0) + getRandomReal = (localInt )/(2.0**32_rb - 1.0_rb) + end if + + end function getRandomReal + ! -------------------- + subroutine finalize_RandomNumberSequence(twister) + type(randomNumberSequence), intent(inout) :: twister + + twister%currentElement = blockSize + twister%state(:) = 0_im + end subroutine finalize_RandomNumberSequence + + ! -------------------- + + end module MersenneTwister + diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 585ff01df..74aaf6903 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -3584,33 +3584,33 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, & RH_00L = 0.7 + SQRT(1./(25.0+gridkm*gridkm*gridkm)) RH_00O = 0.81 + SQRT(1./(50.0+gridkm*gridkm*gridkm)) - - DO j = jts,jte - DO k = kts,kte - DO i = its,ite - RHI_max = 0.0 - CLDFRA(I,K,J) = 0.0 - + + DO j = jts,jte + DO k = kts,kte + DO i = its,ite + RHI_max = 0.0 + CLDFRA(I,K,J) = 0.0 + if (qc(i,k,j).gt.1.E-6 .or. qi(i,k,j).ge.1.E-7 .or.qs(i,k,j) & - & .gt.1.E-5) then - CLDFRA(I,K,J) = 1.0 - qvsat(i,k,j) = qv(i,k,j) - else - TK = t(i,k,j) - TC = TK - 273.16 - - qvsw = rslf(P(i,k,j), TK) - qvsi = rsif(P(i,k,j), TK) - - if (tc .ge. -12.0) then - qvsat(i,k,j) = qvsw - elseif (tc .lt. -20.0) then - qvsat(i,k,j) = qvsi - else - qvsat(i,k,j) = qvsw - (qvsw-qvsi)*(-12.0-tc)/(-12.0+20.) - endif - RHUM = MAX(0.01, MIN(qv(i,k,j)/qvsat(i,k,j), 0.9999)) - + & .gt.1.E-5) then + CLDFRA(I,K,J) = 1.0 + qvsat(i,k,j) = qv(i,k,j) + else + TK = t(i,k,j) + TC = TK - 273.16 + + qvsw = rslf(P(i,k,j), TK) + qvsi = rsif(P(i,k,j), TK) + + if (tc .ge. -12.0) then + qvsat(i,k,j) = qvsw + elseif (tc .lt. -20.0) then + qvsat(i,k,j) = qvsi + else + qvsat(i,k,j) = qvsw - (qvsw-qvsi)*(-12.0-tc)/(-12.0+20.) + endif + RHUM = MAX(0.01, MIN(qv(i,k,j)/qvsat(i,k,j), 0.9999)) + IF ((XLAND(I,J)-1.5).GT.0.) THEN !--- Ocean RH_00 = RH_00O ELSE !--- Land diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 7b029f8b0..55f864f9b 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -243,12 +243,15 @@ module rrtmg_lw ! use physparam, only : ilwrate, ilwrgas, ilwcliq, ilwcice, & - & isubclw, icldflg, iovrlw, ivflip, & - & kind_phys + & isubclw, icldflg, iovrlw, ivflip +!mz & kind_phys use physcons, only : con_g, con_cp, con_avgd, con_amd, & & con_amw, con_amo3 use mersenne_twister, only : random_setseed, random_number, & & random_stat +!mz + use machine, only : kind_phys, & + & im => kind_io4, rb => kind_phys use module_radlw_parameters ! @@ -593,6 +596,28 @@ subroutine rrtmg_lw_run & real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & & aeraod, aerssa +!mz* HWRF -- INPUT from mcica_subcol_lw + real(kind=kind_phys),dimension(ngptlw,npts,nlay) :: cldfmcl ! Cloud fraction + ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(in) :: ciwpmcl(:,:,:) ! In-cloud ice water path (g/m2) +! ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(in) :: clwpmcl(:,:,:) ! In-cloud liquid water path (g/m2) +! ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(in) :: cswpmcl(:,:,:) ! In-cloud snow water path (g/m2) +! ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(in) :: relqmcl(:,:) ! Cloud water drop effective radius (microns) +! ! Dimensions: (ncol,nlay) +! real(kind=rb), intent(in) :: reicmcl(:,:) ! Cloud ice effective size (microns) +! ! Dimensions: (ncol,nlay) +! real(kind=rb), intent(in) :: resnmcl(:,:) ! Snow effective size (microns) +! ! Dimensions: (ncol,nlay) +! real(kind=rb), intent(in) :: taucmcl(:,:,:) ! In-cloud optical depth +! ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(in) :: tauaer(:,:,:) ! Aerosol optical depth +! ! Dimensions: (ncol,nlay,nbndlw) + +!mz + ! --- outputs: real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hlwc real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & @@ -614,6 +639,11 @@ subroutine rrtmg_lw_run & logical, intent(in) :: lslwr ! --- locals: +! mz* - Add height of each layer for exponential-random cloud overlap +! This will be derived below from the dzlyr in each layer + real (kind=kind_phys), dimension( npts,nlay ) :: hgt + real (kind=kind_phys):: dzsum + real (kind=kind_phys), dimension(0:nlp1) :: cldfrc real (kind=kind_phys), dimension(0:nlay) :: totuflux, totdflux, & @@ -631,6 +661,7 @@ subroutine rrtmg_lw_run & real (kind=kind_phys), dimension(nlay,nbands) :: htrb real (kind=kind_phys), dimension(nbands,nlay) :: taucld, tauaer + real (kind=kind_phys), dimension(nbands,1,nlay) :: taucld3 real (kind=kind_phys), dimension(ngptlw,nlay) :: fracs, tautot, & & cldfmc @@ -654,6 +685,9 @@ subroutine rrtmg_lw_run & integer, dimension(npts) :: ipseed integer, dimension(nlay) :: jp, jt, jt1, indself, indfor, indminor integer :: laytrop, iplon, i, j, k, k1 + ! mz* added local arrays for RRTMG + integer :: irng, permuteseed,ig + integer :: inflglw, iceflglw, liqflglw logical :: lcf1 ! @@ -662,6 +696,14 @@ subroutine rrtmg_lw_run & ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + +!mz* +! For passing in cloud physical properties; cloud optics parameterized +! in RRTMG: + inflglw = 2 + iceflglw = 3 + liqflglw = 1 + ! if (.not. lslwr) return @@ -734,6 +776,52 @@ subroutine rrtmg_lw_run & stemp = sfgtmp(iplon) ! surface ground temp if (iovrlw == 3) delgth= de_lgth(iplon) ! clouds decorr-length +! mz*: HWRF practice + if (iovrlw == 4 ) then + + +!Add layer height needed for exponential (icld=4) and +! exponential-random (icld=5) overlap options + + !iplon = 1 + irng = 0 + permuteseed = 150 + +!mz* Derive height + dzsum =0.0 + do k = 1,nlay + hgt(iplon,k)= dzsum+0.5*dzlyr(iplon,k)*1000. !km->m + dzsum = dzsum+ dzlyr(iplon,k)*1000. + enddo + +! Zero out cloud optical properties here; not used when passing physical properties +! to radiation and taucld is calculated in radiation + do k = 1, nlay + do j = 1, nbands + taucld3(j,iplon,k) = 0.0 + enddo + enddo + + +! call mcica_subcol_lw(iplon, ncol, nlay, iovrlw, permuteseed, & +! & irng, play, hgt, & +! & cldfrac, ciwpth, clwpth, cswpth, rei, rel, res, & +! & taucld, & +! & cldfmcl, & !--output +! & ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, & +! & resnmcl, taucmcl) + +!mz* calculate cldfmcl for mcica first, *temporary + call mcica_subcol_lw(1, iplon, nlay, iovrlw, permuteseed, & + & irng, plyr, hgt, & + & cld_cf, cld_iwp, cld_lwp,cld_swp, & + & cld_ref_ice, cld_ref_liq, & + & cld_ref_snow, taucld3, & + & cldfmcl ) !--output + + endif +!mz* end + !> -# Prepare atmospheric profile for use in rrtm. ! the vertical index of internal array is from surface to top @@ -821,6 +909,8 @@ subroutine rrtmg_lw_run & !> -# Read cloud optical properties. if (ilwcliq > 0) then ! use prognostic cloud method +!mz: GFS operational + if (iovrlw .ne. 4 ) then do k = 1, nlay k1 = nlp1 - k cldfrc(k)= cld_cf(iplon,k1) @@ -828,11 +918,40 @@ subroutine rrtmg_lw_run & relw(k) = cld_ref_liq(iplon,k1) ciwp(k) = cld_iwp(iplon,k1) reiw(k) = cld_ref_ice(iplon,k1) + !mz*: Limit upper bound of reice for Fu ice + !parameterization and convert from effective radius + !to generalized effective size (*1.0315; Fu, 1996) + if (iovrlw .eq. 4 .and. iceflglw.eq.3) then + reiw(k) = cld_ref_ice(iplon,k1) *1.0315 + reiw(k) = min(140.0, reiw(k)) + endif cda1(k) = cld_rwp(iplon,k1) cda2(k) = cld_ref_rain(iplon,k1) cda3(k) = cld_swp(iplon,k1) cda4(k) = cld_ref_snow(iplon,k1) + !mz + if (iovrlw .eq. 4 .and. inflglw .ne.5) then + cda3(k) = 0. + cda4(k) = 10. + endif enddo + ! transfer + else if (iovrlw .eq. 4) then !mz HWRF + do k = 1, nlay + k1 = nlp1 - k + do ig = 1, ngptlw + cldfmc(ig,k) = cldfmcl(ig,iplon,k1) +!mz* not activate +! taucmc(ig,k) = taucmcl(ig,iplon,k1) +! ciwpmc(ig,k) = ciwpmcl(ig,iplon,k1) +! clwpmc(ig,k) = clwpmcl(ig,iplon,k1) +! cswpmc(ig,k) = cswpmcl(ig,iplon,k1) + enddo +! reicmc(k) = reicmcl(iplon,k1) +! relqmc(k) = relqmcl(iplon,k1) +! resnmc(k) = resnmcl(iplon,k1) + enddo + endif else ! use diagnostic cloud method do k = 1, nlay k1 = nlp1 - k @@ -928,17 +1047,45 @@ subroutine rrtmg_lw_run & enddo if (ilwcliq > 0) then ! use prognostic cloud method +!mz* + if (iovrlw .ne. 4) then do k = 1, nlay cldfrc(k)= cld_cf(iplon,k) clwp(k) = cld_lwp(iplon,k) relw(k) = cld_ref_liq(iplon,k) ciwp(k) = cld_iwp(iplon,k) reiw(k) = cld_ref_ice(iplon,k) + !mz*: Limit upper bound of reice for Fu ice + !parameterization and convert from effective radius + !to generalized effective size (*1.0315; Fu, 1996) + if (iovrlw .eq. 4 .and. iceflglw.eq.3) then + reiw(k) = cld_ref_ice(iplon,k1) *1.0315 + reiw(k) = min(140.0, reiw(k)) + endif cda1(k) = cld_rwp(iplon,k) cda2(k) = cld_ref_rain(iplon,k) cda3(k) = cld_swp(iplon,k) cda4(k) = cld_ref_snow(iplon,k) + !mz* + if (iovrlw .eq. 4 .and. inflglw .ne.5) then + cda3(k) = 0. + cda4(k) = 10. + endif + enddo + else if (iovrlw .eq. 4) then + do k = 1, nlay + do ig = 1, ngptlw + cldfmc(ig,k) = cldfmcl(ig,iplon,k) +! taucmc(ig,k) = taucmcl(ig,iplon,k) +! ciwpmc(ig,k) = ciwpmcl(ig,iplon,k) +! clwpmc(ig,k) = clwpmcl(ig,iplon,k) +! cswpmc(ig,k) = cswpmcl(ig,iplon,k) + enddo +! reicmc(k) = reicmcl(iplon,k) +! relqmc(k) = relqmcl(iplon,k) +! resnmc(k) = resnmcl(iplon,k) enddo + endif else ! use diagnostic cloud method do k = 1, nlay cldfrc(k)= cld_cf(iplon,k) @@ -1004,6 +1151,9 @@ subroutine rrtmg_lw_run & !> -# For cloudy atmosphere, call cldprop() to set cloud optical !! properties. +!mz* + if (iovrlw .ne. 4 ) then !mz:GFS oprational + lcf1 = .false. lab_do_k0 : do k = 1, nlay if ( cldfrc(k) > eps ) then @@ -1040,6 +1190,26 @@ subroutine rrtmg_lw_run & cldfmc = f_zero taucld = f_zero endif + endif !mz iovrlw.ne.4 + +! else if (iovrlw .eq. 4) then !mz*:HWRF for cldovrlp=4 + +!mz* call CLDPRMC to set cloud optical depth for McICA based on input cloud +! properties (inflglw) + +! For cloudy atmosphere, use cldprop to set cloud optical properties based on +! input cloud physical properties. Select method based on choices described +! in cldprop. Cloud fraction, water path, liquid droplet and ice particle +! effective radius must be passed into cldprop. Cloud fraction and cloud +! optical depth are transferred to rrtmg_lw arrays in cldprop. +! +! ncbands(im): number of cloud spectral bands +! taucmc(ngptlw,nlayers): cloud optical depth [mcica] + +! call cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, ciwpmc,& +! clwpmc, cswpmc, reicmc, relqmc, resnmc, & +! ncbands, taucmc) + ! if (lprnt) then ! print *,' after cldprop' @@ -1344,11 +1514,13 @@ subroutine rlwinit & ! !===> ... begin here ! - if ( iovrlw<0 .or. iovrlw>3 ) then + if ( iovrlw<0 .or. iovrlw>4 ) then print *,' *** Error in specification of cloud overlap flag', & & ' IOVRLW=',iovrlw,' in RLWINIT !!' stop - elseif ( iovrlw>=2 .and. isubclw==0 ) then +!mz +! elseif ( iovrlw>=2 .and. isubclw==0 ) then + elseif ( (iovrlw.eq.2 .or. iovrlw.eq.3).and. isubclw==0 ) then if (me == 0) then print *,' *** IOVRLW=',iovrlw,' is not available for', & & ' ISUBCLW=0 setting!!' @@ -6762,9 +6934,569 @@ end subroutine taumol !! @} !----------------------------------- +!mz* exponential cloud overlapping subroutines +!------------------------------------------------------------------ +! Public subroutines +!------------------------------------------------------------------ +! mz* - Add height needed for exponential and exponential-random cloud overlap methods (icld=4 and 5, respectively) +! mz* - cldfmcl only *temporary + subroutine mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, & + & irng, play, hgt, & + & cldfrac, ciwp, clwp, cswp, rei, rel, res, tauc, & + & cldfmcl) +!mz* the below output need to be compatible with cldprop() +!mz ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, resnmcl, taucmcl) + + use machine, only : im => kind_io4, rb => kind_phys +! ----- Input ----- +! Control + integer(kind=im), intent(in) :: iplon ! column/longitude index + integer(kind=im), intent(in) :: ncol ! number of columns + integer(kind=im), intent(in) :: nlay ! number of model layers + integer(kind=im), intent(in) :: icld ! clear/cloud, cloud overlap flag + integer(kind=im), intent(in) :: permuteseed ! if the cloud generator is called multiple times, + ! permute the seed between each call. + ! between calls for LW and SW, recommended + ! permuteseed differes by 'ngpt' + integer(kind=im), intent(inout) :: irng ! flag for random number generator + ! 0 = kissvec + ! 1 = Mersenne + ! Twister + +! Atmosphere + real(kind=rb), intent(in) :: play(:,:) ! layer pressures (mb) + ! Dimensions: (ncol,nlay) + +! mji - Add height + real(kind=rb), intent(in) :: hgt(:,:) ! layer height (m) + ! Dimensions: (ncol,nlay) + +! Atmosphere/clouds - cldprop + real(kind=rb), intent(in) :: cldfrac(:,:) ! layer cloud fraction + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: tauc(:,:,:) ! in-cloud optical depth + ! Dimensions: (nbndlw,ncol,nlay) +! real(kind=rb), intent(in) :: ssac(:,:,:) ! in-cloud single scattering albedo + ! Dimensions: (nbndlw,ncol,nlay) +! real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter + ! Dimensions: (nbndlw,ncol,nlay) + real(kind=rb), intent(in) :: ciwp(:,:) ! in-cloud ice water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: clwp(:,:) ! in-cloud liquid water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cswp(:,:) ! in-cloud snow path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: rei(:,:) ! cloud ice particle size + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: rel(:,:) ! cloud liquid particle size + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: res(:,:) ! snow particle size + ! Dimensions: (ncol,nlay) + +! ----- Output ----- +! Atmosphere/clouds - cldprmc [mcica] + real(kind=rb), intent(out) :: cldfmcl(:,:,:) ! cloud fraction [mcica] + ! Dimensions: (ngptlw,ncol,nlay) +!mz* not activate, temporary local vars + real(kind=rb),dimension(ngptlw,ncol,nlay) :: ciwpmcl ! in-cloud ice water path [mcica] + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb),dimension(ngptlw,ncol,nlay) :: clwpmcl ! in-cloud liquid water path [mcica] + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb),dimension(ngptlw,ncol,nlay) :: cswpmcl ! in-cloud snow path [mcica] + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb),dimension(ncol,nlay) :: relqmcl ! liquid particle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb),dimension(ncol,nlay) :: reicmcl ! ice partcle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb),dimension(ncol,nlay) :: resnmcl ! snow partcle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb),dimension(ngptlw,ncol,nlay) :: taucmcl ! in-cloud optical depth [mcica] +!mz* + ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(out) :: ssacmcl(:,:,:) ! in-cloud single scattering albedo [mcica] + ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(out) :: asmcmcl(:,:,:) ! in-cloud asymmetry parameter [mcica] + ! Dimensions: (ngptlw,ncol,nlay) +! ----- Local ----- + +! Stochastic cloud generator variables [mcica] + integer(kind=im), parameter :: nsubclw = ngptlw ! number of sub-columns (g-point intervals) + integer(kind=im) :: ilev ! loop index + + real(kind=rb) :: pmid(ncol, nlay) ! layer pressures (Pa) +! real(kind=rb) :: pdel(ncol, nlay) ! layer pressure thickness (Pa) +! real(kind=rb) :: qi(ncol, nlay) ! ice water (specific humidity) +! real(kind=rb) :: ql(ncol, nlay) ! liq water (specific humidity) + +! Return if clear sky + if (icld.eq.0) return + +! NOTE: For GCM mode, permuteseed must be offset between LW and SW by at least the number of subcolumns + + +! Pass particle sizes to new arrays, no subcolumns for these properties yet +! Convert pressures from mb to Pa + + reicmcl(:ncol,:nlay) = rei(:ncol,:nlay) + relqmcl(:ncol,:nlay) = rel(:ncol,:nlay) + resnmcl(:ncol,:nlay) = res(:ncol,:nlay) + pmid(:ncol,:nlay) = play(:ncol,:nlay)*1.e2_rb + +! Generate the stochastic subcolumns of cloud optical properties for +! the longwave + call generate_stochastic_clouds (ncol, nlay, nsubclw, icld, irng, & + & pmid, hgt, cldfrac, clwp, ciwp, cswp, tauc, & + & cldfmcl, clwpmcl, ciwpmcl, cswpmcl, & + & taucmcl, permuteseed) + + end subroutine mcica_subcol_lw +!------------------------------------------------------------------------------------------------- + subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, & + & irng, pmid, hgt, cld, clwp, ciwp, cswp, tauc, & + & cld_stoch, clwp_stoch, ciwp_stoch, & + & cswp_stoch, tauc_stoch, changeSeed) +!------------------------------------------------------------------------------------------------- +!------------------------------------------------------------------------------------------------- +! Contact: Cecile Hannay (hannay@ucar.edu) +! +! Original code: Based on Raisanen et al., QJRMS, 2004. +! +! Modifications: +! 1) Generalized for use with RRTMG and added Mersenne Twister as the default +! random number generator, which can be changed to the optional kissvec random number generator +! with flag 'irng'. Some extra functionality has been commented or removed. +! Michael J. Iacono, AER, Inc., February 2007 +! 2) Activated exponential and exponential/random cloud overlap method +! Michael J. Iacono, AER, November 2017 +! +! Given a profile of cloud fraction, cloud water and cloud ice, we produce a set of subcolumns. +! Each layer within each subcolumn is homogeneous, with cloud fraction equal to zero or one +! and uniform cloud liquid and cloud ice concentration. +! The ensemble as a whole reproduces the probability function of cloud liquid and ice within each layer +! and obeys an overlap assumption in the vertical. +! +! Overlap assumption: +! The cloud are consistent with 5 overlap assumptions: random, maximum, maximum-random, exponential and exponential random. +! The default option is maximum-random (option 2) +! The options are: 1=random overlap, 2=max/random, 3=maximum overlap, 4=exponential overlap, 5=exp/random +! This is set with the variable "overlap" +! The exponential overlap uses also a length scale, Zo. (real, parameter :: Zo = 2500. ) +! +! Seed: +! If the stochastic cloud generator is called several times during the same timestep, +! one should change the seed between the call to insure that the +! subcolumns are different. +! This is done by changing the argument 'changeSeed' +! For example, if one wants to create a set of columns for the +! shortwave and another set for the longwave , +! use 'changeSeed = 1' for the first call and'changeSeed = 2' for the second call + +! PDF assumption: +! We can use arbitrary complicated PDFS. +! In the present version, we produce homogeneuous clouds (the simplest case). +! Future developments include using the PDF scheme of Ben Johnson. +! +! History file: +! Option to add diagnostics variables in the history file. (using FINCL in the namelist) +! nsubcol = number of subcolumns +! overlap = overlap type (1-3) +! Zo = length scale +! CLOUD_S = mean of the subcolumn cloud fraction ('_S" means Stochastic) +! CLDLIQ_S = mean of the subcolumn cloud water +! CLDICE_S = mean of the subcolumn cloud ice +! +! Note: +! Here: we force that the cloud condensate to be consistent with the cloud fraction +! i.e we only have cloud condensate when the cell is cloudy. +! In CAM: The cloud condensate and the cloud fraction are obtained from 2 different equations +! and the 2 quantities can be inconsistent (i.e. CAM can produce cloud fraction +! without cloud condensate or the opposite). +!----------------------------------------------------------------- + + use mcica_random_numbers +! The Mersenne Twister random number engine + use MersenneTwister, only: randomNumberSequence, & + & new_RandomNumberSequence, getRandomReal + use machine ,only : im => kind_io4, rb => kind_phys + + type(randomNumberSequence) :: randomNumbers + +! -- Arguments + + integer(kind=im), intent(in) :: ncol ! number of columns + integer(kind=im), intent(in) :: nlay ! number of layers + integer(kind=im), intent(in) :: icld ! clear/cloud, cloud overlap flag + integer(kind=im), intent(inout) :: irng ! flag for random number generator + ! 0 = kissvec + ! 1 = Mersenne Twister + integer(kind=im), intent(in) :: nsubcol ! number of sub-columns (g-point intervals) + integer(kind=im), optional, intent(in) :: changeSeed ! allows permuting seed + +! Column state (cloud fraction, cloud water, cloud ice) + variables needed to read physics state + real(kind=rb), intent(in) :: pmid(:,:) ! layer pressure (Pa) + ! Dimensions: (ncol,nlay) + + real(kind=rb), intent(in) :: hgt(:,:) ! layer height (m) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cld(:,:) ! cloud fraction + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: clwp(:,:) ! in-cloud liquid water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: ciwp(:,:) ! in-cloud ice water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cswp(:,:) ! in-cloud snow path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: tauc(:,:,:) ! in-cloud optical depth + ! Dimensions:(nbndlw,ncol,nlay) +! real(kind=rb), intent(in) :: ssac(:,:,:) ! in-cloud single scattering albedo + ! Dimensions: (nbndlw,ncol,nlay) + ! inactive - for future expansion +! real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter + ! Dimensions: (nbndlw,ncol,nlay) + ! inactive - for future expansion + + real(kind=rb), intent(out) :: cld_stoch(:,:,:) ! subcolumn cloud fraction + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: clwp_stoch(:,:,:) ! subcolumn in-cloud liquid water path + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: ciwp_stoch(:,:,:) ! subcolumn in-cloud ice water path + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: cswp_stoch(:,:,:) ! subcolumn in-cloud snow path + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: tauc_stoch(:,:,:) ! subcolumn in-cloud optical depth + ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(out) :: ssac_stoch(:,:,:)! subcolumn in-cloud single scattering albedo + ! Dimensions: (ngptlw,ncol,nlay) + ! inactive - for future expansion +! real(kind=rb), intent(out) :: asmc_stoch(:,:,:)! subcolumn in-cloud asymmetry parameter + ! Dimensions: (ngptlw,ncol,nlay) + ! inactive - for future expansion + +! -- Local variables + real(kind=rb) :: cldf(ncol,nlay) ! cloud fraction + +! Mean over the subcolumns (cloud fraction, cloud water , cloud ice) - inactive +! real(kind=rb) :: mean_cld_stoch(ncol, nlay) ! cloud fraction +! real(kind=rb) :: mean_clwp_stoch(ncol, nlay) ! cloud water +! real(kind=rb) :: mean_ciwp_stoch(ncol, nlay) ! cloud ice +! real(kind=rb) :: mean_tauc_stoch(ncol, nlay) ! cloud optical depth +! real(kind=rb) :: mean_ssac_stoch(ncol, nlay) ! cloud single scattering albedo +! real(kind=rb) :: mean_asmc_stoch(ncol, nlay) ! cloud asymmetry parameter + +! Set overlap + integer(kind=im) :: overlap ! 1 = random overlap, 2 = maximum-random, + ! 3 = maximum overlap, 4 = exponential, + ! 5 = exponential-random + real(kind=rb), parameter :: Zo = 2500._rb ! length scale (m) + real(kind=rb), dimension(ncol,nlay) :: alpha ! overlap parameter + +! Constants (min value for cloud fraction and cloud water and ice) + real(kind=rb), parameter :: cldmin = 1.0e-20_rb ! min cloud fraction +! real(kind=rb), parameter :: qmin = 1.0e-10_rb ! min cloud water and cloud ice (not used) + +! Variables related to random number and seed + real(kind=rb), dimension(nsubcol, ncol, nlay) :: CDF, CDF2 !random numbers + integer(kind=im), dimension(ncol) :: seed1, seed2, seed3, seed4 !seed to create random number (kissvec) + real(kind=rb), dimension(ncol) :: rand_num ! random number (kissvec) + integer(kind=im) :: iseed ! seed to create random number (Mersenne Teister) + real(kind=rb) :: rand_num_mt ! random number (Mersenne Twister) + +! Flag to identify cloud fraction in subcolumns + logical, dimension(nsubcol, ncol, nlay) :: iscloudy ! flag that says whether a gridbox is cloudy + +! Indices + integer(kind=im) :: ilev, isubcol, i, n ! indices + +!------------------------------------------------------------------- + +! Check that irng is in bounds; if not, set to default + if (irng .ne. 0) irng = 1 + +! Pass input cloud overlap setting to local variable + overlap = icld + +! Ensure that cloud fractions are in bounds + do ilev = 1, nlay + do i = 1, ncol + cldf(i,ilev) = cld(i,ilev) + if (cldf(i,ilev) < cldmin) then + cldf(i,ilev) = 0._rb + endif + enddo + enddo + +! ----- Create seed -------- + +! Advance randum number generator by changeseed values + if (irng.eq.0) then +! For kissvec, create a seed that depends on the state of the columns. Maybe not the best way, but it works. +! Must use pmid from bottom four layers. + do i=1,ncol + if (pmid(i,1).lt.pmid(i,2)) then + stop 'MCICA_SUBCOL: KISSVEC SEED GENERATOR REQUIRES PMID & + & FROM BOTTOM FOUR LAYERS.' + endif + seed1(i) = (pmid(i,1) - int(pmid(i,1))) * 1000000000_im + seed2(i) = (pmid(i,2) - int(pmid(i,2))) * 1000000000_im + seed3(i) = (pmid(i,3) - int(pmid(i,3))) * 1000000000_im + seed4(i) = (pmid(i,4) - int(pmid(i,4))) * 1000000000_im + enddo + do i=1,changeSeed + call kissvec(seed1, seed2, seed3, seed4, rand_num) + enddo + elseif (irng.eq.1) then + randomNumbers = new_RandomNumberSequence(seed = changeSeed) + endif + +! ------ Apply overlap assumption -------- + +! generate the random numbers + + select case (overlap) + + case(1) +! Random overlap +! i) pick a random value at every level + + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) ! we get different random number for each level + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + case(2) +! Maximum-Random overlap +! i) pick a random number for top layer. +! ii) walk down the column: +! - if the layer above is cloudy, we use the same random number than in the layer above +! - if the layer above is clear, we use a new random number + + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + do ilev = 2,nlay + do i = 1, ncol + do isubcol = 1, nsubcol + if (CDF(isubcol, i, ilev-1) > 1._rb - cldf(i,ilev-1) )& + & then + CDF(isubcol,i,ilev) = CDF(isubcol,i,ilev-1) + else + CDF(isubcol,i,ilev) = CDF(isubcol,i,ilev) * (1._rb & + & - cldf(i,ilev-1)) + endif + enddo + enddo + enddo + + case(3) +! Maximum overlap +! i) pick the same random numebr at every level + + if (irng.eq.0) then + do isubcol = 1,nsubcol + call kissvec(seed1, seed2, seed3, seed4, rand_num) + do ilev = 1,nlay + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + rand_num_mt = getRandomReal(randomNumbers) + do ilev = 1, nlay + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + +! mji - Activate exponential cloud overlap option + case(4) + ! Exponential overlap: weighting between maximum and random overlap increases with the distance. + ! The random numbers for exponential overlap verify: + ! j=1 RAN(j)=RND1 + ! j>1 if RND1 < alpha(j,j-1) => RAN(j) = RAN(j-1) + ! RAN(j) = RND2 + ! alpha is obtained from the equation + ! alpha = exp(-(Z(j)-Z(j-1))/Zo) where Zo is a characteristic length scale + + ! compute alpha + do i = 1, ncol + alpha(i, 1) = 0._rb + do ilev = 2,nlay + alpha(i, ilev) = exp( -( hgt (i, ilev) - & + & hgt (i, ilev-1)) / Zo) + enddo + enddo + + ! generate 2 streams of random numbers + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol, :, ilev) = rand_num + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF2(isubcol, :, ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + rand_num_mt = getRandomReal(randomNumbers) + CDF2(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + ! generate random numbers + do ilev = 2,nlay + where (CDF2(:, :, ilev) < spread(alpha (:,ilev), & + & dim=1,nCopies=nsubcol) ) + CDF(:,:,ilev) = CDF(:,:,ilev-1) + end where + end do + +! Activate exponential-random cloud overlap option + case(5) + ! Exponential-random overlap: +!mz* call wrf_error_fatal("Cloud Overlap case 5: ER has not yet & +! been implemented. Stopping...") + + end select + +! -- generate subcolumns for homogeneous clouds ----- + do ilev = 1,nlay + iscloudy(:,:,ilev) = (CDF(:,:,ilev) >= 1._rb - & + & spread(cldf(:,ilev), dim=1, nCopies=nsubcol) ) + enddo + +! where the subcolumn is cloudy, the subcolumn cloud fraction is 1; +! where the subcolumn is not cloudy, the subcolumn cloud fraction is 0; +! where there is a cloud, define the subcolumn cloud properties, +! otherwise set these to zero + + do ilev = 1,nlay + do i = 1, ncol + do isubcol = 1, nsubcol + if (iscloudy(isubcol,i,ilev) ) then + cld_stoch(isubcol,i,ilev) = 1._rb + clwp_stoch(isubcol,i,ilev) = clwp(i,ilev) + ciwp_stoch(isubcol,i,ilev) = ciwp(i,ilev) + cswp_stoch(isubcol,i,ilev) = cswp(i,ilev) + n = ngb(isubcol) + tauc_stoch(isubcol,i,ilev) = tauc(n,i,ilev) +! ssac_stoch(isubcol,i,ilev) = ssac(n,i,ilev) +! asmc_stoch(isubcol,i,ilev) = asmc(n,i,ilev) + else + cld_stoch(isubcol,i,ilev) = 0._rb + clwp_stoch(isubcol,i,ilev) = 0._rb + ciwp_stoch(isubcol,i,ilev) = 0._rb + cswp_stoch(isubcol,i,ilev) = 0._rb + tauc_stoch(isubcol,i,ilev) = 0._rb +! ssac_stoch(isubcol,i,ilev) = 1._rb +! asmc_stoch(isubcol,i,ilev) = 1._rb + endif + enddo + enddo + enddo +! -- compute the means of the subcolumns --- +! mean_cld_stoch(:,:) = 0._rb +! mean_clwp_stoch(:,:) = 0._rb +! mean_ciwp_stoch(:,:) = 0._rb +! mean_tauc_stoch(:,:) = 0._rb +! mean_ssac_stoch(:,:) = 0._rb +! mean_asmc_stoch(:,:) = 0._rb +! do i = 1, nsubcol +! mean_cld_stoch(:,:) = cld_stoch(i,:,:) + mean_cld_stoch(:,:) +! mean_clwp_stoch(:,:) = clwp_stoch( i,:,:) + mean_clwp_stoch(:,:) +! mean_ciwp_stoch(:,:) = ciwp_stoch( i,:,:) + mean_ciwp_stoch(:,:) +! mean_tauc_stoch(:,:) = tauc_stoch( i,:,:) + mean_tauc_stoch(:,:) +! mean_ssac_stoch(:,:) = ssac_stoch( i,:,:) + mean_ssac_stoch(:,:) +! mean_asmc_stoch(:,:) = asmc_stoch( i,:,:) + mean_asmc_stoch(:,:) +! end do +! mean_cld_stoch(:,:) = mean_cld_stoch(:,:) / nsubcol +! mean_clwp_stoch(:,:) = mean_clwp_stoch(:,:) / nsubcol +! mean_ciwp_stoch(:,:) = mean_ciwp_stoch(:,:) / nsubcol +! mean_tauc_stoch(:,:) = mean_tauc_stoch(:,:) / nsubcol +! mean_ssac_stoch(:,:) = mean_ssac_stoch(:,:) / nsubcol +! mean_asmc_stoch(:,:) = mean_asmc_stoch(:,:) / nsubcol + + end subroutine generate_stochastic_clouds + +!------------------------------------------------------------------ +! Private subroutines +!------------------------------------------------------------------ + +!----------------------------------------------------------------- + subroutine kissvec(seed1,seed2,seed3,seed4,ran_arr) +!---------------------------------------------------------------- + +! public domain code +! made available from http://www.fortran.com/ +! downloaded by pjr on 03/16/04 for NCAR CAM +! converted to vector form, functions inlined by pjr,mvr on 05/10/2004 + +! The KISS (Keep It Simple Stupid) random number generator. Combines: +! (1) The congruential generator x(n)=69069*x(n-1)+1327217885, period 2^32. +! (2) A 3-shift shift-register generator, period 2^32-1, +! (3) Two 16-bit multiply-with-carry generators, period 597273182964842497>2^59 +! Overall period>2^123; + real(kind=rb), dimension(:), intent(inout) :: ran_arr + integer(kind=im), dimension(:), intent(inout) :: seed1,seed2,seed3& + & ,seed4 + integer(kind=im) :: i,sz,kiss + integer(kind=im) :: m, k, n + +! inline function + m(k, n) = ieor (k, ishft (k, n) ) + + sz = size(ran_arr) + do i = 1, sz + seed1(i) = 69069_im * seed1(i) + 1327217885_im + seed2(i) = m (m (m (seed2(i), 13_im), - 17_im), 5_im) + seed3(i) = 18000_im * iand (seed3(i), 65535_im) + & + & ishft (seed3(i), - 16_im) + seed4(i) = 30903_im * iand (seed4(i), 65535_im) + & + & ishft (seed4(i), - 16_im) + kiss = seed1(i) + seed2(i) + ishft (seed3(i), 16_im) + seed4(i) + ran_arr(i) = kiss*2.328306e-10_rb + 0.5_rb + end do + + end subroutine kissvec ! -!........................................! - end module rrtmg_lw ! -!========================================! +!........................................!$ + end module rrtmg_lw !$ +!========================================!$ From 5597b2c5b3add78dc569c29135caf1fffe5e5410 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Sun, 16 Feb 2020 11:26:53 -0700 Subject: [PATCH 073/404] finalize HWRF RRTMG LW capability --- physics/radiation_clouds.f | 183 +- physics/radlw_main.f | 7502 ------------------------------------ physics/radlw_main.meta | 16 + 3 files changed, 105 insertions(+), 7596 deletions(-) delete mode 100644 physics/radlw_main.f diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 74aaf6903..c259fc22e 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -3610,104 +3610,99 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, & qvsat(i,k,j) = qvsw - (qvsw-qvsi)*(-12.0-tc)/(-12.0+20.) endif RHUM = MAX(0.01, MIN(qv(i,k,j)/qvsat(i,k,j), 0.9999)) - - IF ((XLAND(I,J)-1.5).GT.0.) THEN !--- Ocean - RH_00 = RH_00O - ELSE !--- Land - RH_00 = RH_00L - ENDIF - - if (tc .ge. -12.0) then - RHUM = MIN(0.999, RHUM) - CLDFRA(I,K,J) = MAX(0.0, 1.0-SQRT((1.0-RHUM)/(1.-RH_00))) - elseif (tc.lt.-12..and.tc.gt.-70. .and. RHUM.gt.RH_00L) then - RHUM = MAX(0.01, MIN(qv(i,k,j)/qvsat(i,k,j), 1.0 - 1.E-6)) - CLDFRA(I,K,J) = MAX(0., 1.0-SQRT((1.0-RHUM)/(1.0-RH_00L))) - endif - CLDFRA(I,K,J) = MIN(0.90, CLDFRA(I,K,J)) - - endif - ENDDO - ENDDO - ENDDO - - -!..Prepare for a 1-D column to find various cloud layers. - - DO j = jts,jte - DO i = its,ite -! if (i.gt.10.and.i.le.20 .and. j.gt.10.and.j.le.20) then -! debug_flag = .true. -! else -! debug_flag = .false. -! endif - -! if (rand_perturb_on .eq. 1) then -! entrmnt = MAX(0.01, MIN(0.99, 0.5 + rand_pert(i,1,j)*0.5)) -! else - entrmnt = 0.5 -! endif - - DO k = kts,kte - qvs1d(k) = qvsat(i,k,j) - cfr1d(k) = cldfra(i,k,j) - T1d(k) = t(i,k,j) - P1d(k) = p(i,k,j) - R1d(k) = rho(i,k,j) - qc1d(k) = qc(i,k,j) - qi1d(k) = qi(i,k,j) - qs1d(k) = qs(i,k,j) - ENDDO - -! if (debug_flag) then -! WRITE (dbg_msg,*) 'DEBUG-GT: finding cloud layers at point (', i, ', ', j, ')' -! CALL wrf_debug (150, dbg_msg) -! endif + + IF ((XLAND(I,J)-1.5).GT.0.) THEN !--- Ocean + RH_00 = RH_00O + ELSE !--- Land + RH_00 = RH_00L + ENDIF + + if (tc .ge. -12.0) then + RHUM = MIN(0.999, RHUM) + CLDFRA(I,K,J) = MAX(0.0, 1.0-SQRT((1.0-RHUM)/(1.-RH_00))) + elseif (tc.lt.-12..and.tc.gt.-70. .and. RHUM.gt.RH_00L) then + RHUM = MAX(0.01, MIN(qv(i,k,j)/qvsat(i,k,j), 1.0 - 1.E-6)) + CLDFRA(I,K,J) = MAX(0., 1.0-SQRT((1.0-RHUM)/(1.0-RH_00L))) + endif + CLDFRA(I,K,J) = MIN(0.90, CLDFRA(I,K,J)) + + endif + ENDDO + ENDDO + ENDDO + + +!..Prepare for a 1-D column to find various cloud layers. + + DO j = jts,jte + DO i = its,ite +! if (i.gt.10.and.i.le.20 .and. j.gt.10.and.j.le.20) then +! debug_flag = .true. +! else +! debug_flag = .false. +! endif + +! if (rand_perturb_on .eq. 1) then +! entrmnt = MAX(0.01, MIN(0.99, 0.5 + rand_pert(i,1,j)*0.5)) +! else + entrmnt = 0.5 +! endif + + DO k = kts,kte + qvs1d(k) = qvsat(i,k,j) + cfr1d(k) = cldfra(i,k,j) + T1d(k) = t(i,k,j) + P1d(k) = p(i,k,j) + R1d(k) = rho(i,k,j) + qc1d(k) = qc(i,k,j) + qi1d(k) = qi(i,k,j) + qs1d(k) = qs(i,k,j) + ENDDO + +! if (debug_flag) then +! WRITE (dbg_msg,*) 'DEBUG-GT: finding cloud layers at point (', i, ', ', j, ')' +! CALL wrf_debug (150, dbg_msg) +! endif call find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & & debug_flag, qc1d, qi1d, qs1d, kts,kte) - - DO k = kts,kte - cldfra(i,k,j) = cfr1d(k) - qc(i,k,j) = qc1d(k) - qi(i,k,j) = qi1d(k) - ENDDO - ENDDO - ENDDO - - - END SUBROUTINE cal_cldfra3 - - -!+---+-----------------------------------------------------------------+ -!..From cloud fraction array, find clouds of multi-level depth and -!compute -!.. a reasonable value of LWP or IWP that might be contained in that -!depth, -!.. unless existing LWC/IWC is already there. - + + DO k = kts,kte + cldfra(i,k,j) = cfr1d(k) + qc(i,k,j) = qc1d(k) + qi(i,k,j) = qi1d(k) + ENDDO + ENDDO + ENDDO + + + END SUBROUTINE cal_cldfra3 +!+---+-----------------------------------------------------------------+ +!..From cloud fraction array, find clouds of multi-level depth and compute +!.. a reasonable value of LWP or IWP that might be contained in that depth, +!.. unless existing LWC/IWC is already there. + SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & & debugfl, qc1d, qi1d, qs1d, kts,kte) -! - IMPLICIT NONE -! - INTEGER, INTENT(IN):: kts, kte - LOGICAL, INTENT(IN):: debugfl - REAL, INTENT(IN):: entrmnt - REAL, DIMENSION(kts:kte), INTENT(IN):: qvs1d,T1d,P1d,R1d - REAL, DIMENSION(kts:kte), INTENT(INOUT):: cfr1d - REAL, DIMENSION(kts:kte), INTENT(INOUT):: qc1d, qi1d, qs1d - -!..Local vars. - REAL, DIMENSION(kts:kte):: theta, dz - REAL:: Z1, Z2, theta1, theta2, ht1, ht2 - INTEGER:: k, k2, k_tropo, k_m12C, k_m40C, k_cldb, k_cldt, kbot - LOGICAL:: in_cloud - character*512 dbg_msg - -!+---+ - - k_m12C = 0 - k_m40C = 0 +! + IMPLICIT NONE + + INTEGER, INTENT(IN):: kts, kte + LOGICAL, INTENT(IN):: debugfl + REAL, INTENT(IN):: entrmnt + REAL, DIMENSION(kts:kte), INTENT(IN):: qvs1d,T1d,P1d,R1d + REAL, DIMENSION(kts:kte), INTENT(INOUT):: cfr1d + REAL, DIMENSION(kts:kte), INTENT(INOUT):: qc1d, qi1d, qs1d + +!..Local vars. + REAL, DIMENSION(kts:kte):: theta, dz + REAL:: Z1, Z2, theta1, theta2, ht1, ht2 + INTEGER:: k, k2, k_tropo, k_m12C, k_m40C, k_cldb, k_cldt, kbot + LOGICAL:: in_cloud + character*512 dbg_msg + + + k_m12C = 0 + k_m40C = 0 DO k = kte, kts, -1 theta(k) = T1d(k)*((100000.0/P1d(k))**(287.05/1004.)) if (T1d(k)-273.16 .gt. -40.0 .and. P1d(k).gt.7000.0) k_m40C = & diff --git a/physics/radlw_main.f b/physics/radlw_main.f deleted file mode 100644 index 55f864f9b..000000000 --- a/physics/radlw_main.f +++ /dev/null @@ -1,7502 +0,0 @@ -!> \file radlw_main.f -!! This file contains NCEP's modifications of the rrtmg-lw radiation -!! code from AER. - -!!!!! ============================================================== !!!!! -!!!!! lw-rrtm3 radiation package description !!!!! -!!!!! ============================================================== !!!!! -! ! -! this package includes ncep's modifications of the rrtm-lw radiation ! -! code from aer inc. ! -! ! -! the lw-rrtm3 package includes these parts: ! -! ! -! 'radlw_rrtm3_param.f' ! -! 'radlw_rrtm3_datatb.f' ! -! 'radlw_rrtm3_main.f' ! -! ! -! the 'radlw_rrtm3_param.f' contains: ! -! ! -! 'module_radlw_parameters' -- band parameters set up ! -! ! -! the 'radlw_rrtm3_datatb.f' contains: ! -! ! -! 'module_radlw_avplank' -- plank flux data ! -! 'module_radlw_ref' -- reference temperature and pressure ! -! 'module_radlw_cldprlw' -- cloud property coefficients ! -! 'module_radlw_kgbnn' -- absorption coeffients for 16 ! -! bands, where nn = 01-16 ! -! ! -! the 'radlw_rrtm3_main.f' contains: ! -! ! -! 'rrtmg_lw' -- main lw radiation transfer ! -! ! -! in the main module 'rrtmg_lw' there are only two ! -! externally callable subroutines: ! -! ! -! ! -! 'lwrad' -- main lw radiation routine ! -! inputs: ! -! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, ! -! clouds,icseed,aerosols,sfemis,sfgtmp, ! -! dzlyr,delpin,de_lgth, ! -! npts, nlay, nlp1, lprnt, ! -! outputs: ! -! hlwc,topflx,sfcflx,cldtau, ! -!! optional outputs: ! -! HLW0,HLWB,FLXPRF) ! -! ! -! 'rlwinit' -- initialization routine ! -! inputs: ! -! ( me ) ! -! outputs: ! -! (none) ! -! ! -! all the lw radiation subprograms become contained subprograms ! -! in module 'rrtmg_lw' and many of them are not directly ! -! accessable from places outside the module. ! -! ! -! derived data type constructs used: ! -! ! -! 1. radiation flux at toa: (from module 'module_radlw_parameters') ! -! topflw_type - derived data type for toa rad fluxes ! -! upfxc total sky upward flux at toa ! -! upfx0 clear sky upward flux at toa ! -! ! -! 2. radiation flux at sfc: (from module 'module_radlw_parameters') ! -! sfcflw_type - derived data type for sfc rad fluxes ! -! upfxc total sky upward flux at sfc ! -! upfx0 clear sky upward flux at sfc ! -! dnfxc total sky downward flux at sfc ! -! dnfx0 clear sky downward flux at sfc ! -! ! -! 3. radiation flux profiles(from module 'module_radlw_parameters') ! -! proflw_type - derived data type for rad vertical prof ! -! upfxc level upward flux for total sky ! -! dnfxc level downward flux for total sky ! -! upfx0 level upward flux for clear sky ! -! dnfx0 level downward flux for clear sky ! -! ! -! external modules referenced: ! -! ! -! 'module physparam' ! -! 'module physcons' ! -! 'mersenne_twister' ! -! ! -! compilation sequence is: ! -! ! -! 'radlw_rrtm3_param.f' ! -! 'radlw_rrtm3_datatb.f' ! -! 'radlw_rrtm3_main.f' ! -! ! -! and all should be put in front of routines that use lw modules ! -! ! -!==========================================================================! -! ! -! the original aer's program declarations: ! -! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! | -! Copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). | -! This software may be used, copied, or redistributed as long as it is | -! not sold and this copyright notice is reproduced on each copy made. | -! This model is provided as is without any express or implied warranties. | -! (http://www.rtweb.aer.com/) | -! | -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! ! -! ************************************************************************ ! -! ! -! rrtmg_lw ! -! ! -! ! -! a rapid radiative transfer model ! -! for the longwave region ! -! for application to general circulation models ! -! ! -! ! -! atmospheric and environmental research, inc. ! -! 131 hartwell avenue ! -! lexington, ma 02421 ! -! ! -! eli j. mlawer ! -! jennifer s. delamere ! -! michael j. iacono ! -! shepard a. clough ! -! ! -! ! -! email: miacono@aer.com ! -! email: emlawer@aer.com ! -! email: jdelamer@aer.com ! -! ! -! the authors wish to acknowledge the contributions of the ! -! following people: steven j. taubman, karen cady-pereira, ! -! patrick d. brown, ronald e. farren, luke chen, robert bergstrom. ! -! ! -! ************************************************************************ ! -! ! -! references: ! -! (rrtm_lw/rrtmg_lw): ! -! clough, s.A., m.w. shephard, e.j. mlawer, j.s. delamere, ! -! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: ! -! atmospheric radiative transfer modeling: a summary of the aer ! -! codes, j. quant. spectrosc. radiat. transfer, 91, 233-244, 2005. ! -! ! -! mlawer, e.j., s.j. taubman, p.d. brown, m.j. iacono, and s.a. ! -! clough: radiative transfer for inhomogeneous atmospheres: rrtm, ! -! a validated correlated-k model for the longwave. j. geophys. res., ! -! 102, 16663-16682, 1997. ! -! ! -! (mcica): ! -! pincus, r., h. w. barker, and j.-j. morcrette: a fast, flexible, ! -! approximation technique for computing radiative transfer in ! -! inhomogeneous cloud fields, j. geophys. res., 108(d13), 4376, ! -! doi:10.1029/2002JD003322, 2003. ! -! ! -! ************************************************************************ ! -! ! -! aer's revision history: ! -! this version of rrtmg_lw has been modified from rrtm_lw to use a ! -! reduced set of g-points for application to gcms. ! -! ! -! -- original version (derived from rrtm_lw), reduction of g-points, ! -! other revisions for use with gcms. ! -! 1999: m. j. iacono, aer, inc. ! -! -- adapted for use with ncar/cam3. ! -! may 2004: m. j. iacono, aer, inc. ! -! -- revised to add mcica capability. ! -! nov 2005: m. j. iacono, aer, inc. ! -! -- conversion to f90 formatting for consistency with rrtmg_sw. ! -! feb 2007: m. j. iacono, aer, inc. ! -! -- modifications to formatting to use assumed-shape arrays. ! -! aug 2007: m. j. iacono, aer, inc. ! -! ! -! ************************************************************************ ! -! ! -! ncep modifications history log: ! -! ! -! nov 1999, ken campana -- received the original code from ! -! aer (1998 ncar ccm version), updated to link up with ! -! ncep mrf model ! -! jun 2000, ken campana -- added option to switch random and ! -! maximum/random cloud overlap ! -! 2001, shrinivas moorthi -- further updates for mrf model ! -! may 2001, yu-tai hou -- updated on trace gases and cloud ! -! property based on rrtm_v3.0 codes. ! -! dec 2001, yu-tai hou -- rewritten code into fortran 90 std ! -! set ncep radiation structure standard that contains ! -! three plug-in compatable fortran program files: ! -! 'radlw_param.f', 'radlw_datatb.f', 'radlw_main.f' ! -! fixed bugs in subprograms taugb14, taugb2, etc. added ! -! out-of-bounds protections. (a detailed note of ! -! up_to_date modifications/corrections by ncep was sent ! -! to aer in 2002) ! -! jun 2004, yu-tai hou -- added mike iacono's apr 2004 ! -! modification of variable diffusivity angles. ! -! apr 2005, yu-tai hou -- minor modifications on module ! -! structures include rain/snow effect (this version of ! -! code was given back to aer in jun 2006) ! -! mar 2007, yu-tai hou -- added aerosol effect for ncep ! -! models using the generallized aerosol optical property! -! scheme for gfs model. ! -! apr 2007, yu-tai hou -- added spectral band heating as an ! -! optional output to support the 500 km gfs model's ! -! upper stratospheric radiation calculations. and ! -! restructure optional outputs for easy access by ! -! different models. ! -! oct 2008, yu-tai hou -- modified to include new features ! -! from aer's newer release v4.4-v4.7, including the ! -! mcica sub-grid cloud option. add rain/snow optical ! -! properties support to cloudy sky calculations. ! -! correct errors in mcica cloud optical properties for ! -! ebert & curry scheme (ilwcice=1) that needs band ! -! index conversion. simplified and unified sw and lw ! -! sub-column cloud subroutines into one module by using ! -! optional parameters. ! -! mar 2009, yu-tai hou -- replaced the original random number! -! generator coming from the original code with ncep w3 ! -! library to simplify the program and moved sub-column ! -! cloud subroutines inside the main module. added ! -! option of user provided permutation seeds that could ! -! be randomly generated from forecast time stamp. ! -! oct 2009, yu-tai hou -- modified subrtines "cldprop" and ! -! "rlwinit" according updats from aer's rrtmg_lw v4.8. ! -! nov 2009, yu-tai hou -- modified subrtine "taumol" according -! updats from aer's rrtmg_lw version 4.82. notice the ! -! cloud ice/liquid are assumed as in-cloud quantities, ! -! not as grid averaged quantities. ! -! jun 2010, yu-tai hou -- optimized code to improve efficiency -! apr 2012, b. ferrier and y. hou -- added conversion factor to fu's! -! cloud-snow optical property scheme. ! -! nov 2012, yu-tai hou -- modified control parameters thru ! -! module 'physparam'. ! -! FEB 2017 A.Cheng - add odpth output, effective radius input ! -! jun 2018, h-m lin/y-t hou -- added new option of cloud overlap ! -! method 'de-correlation-length' for mcica application ! -! ! -!!!!! ============================================================== !!!!! -!!!!! end descriptions !!!!! -!!!!! ============================================================== !!!!! - -!> This module contains the CCPP-compliant NCEP's modifications of the -!! rrtm-lw radiation code from aer inc. - module rrtmg_lw -! - use physparam, only : ilwrate, ilwrgas, ilwcliq, ilwcice, & - & isubclw, icldflg, iovrlw, ivflip -!mz & kind_phys - use physcons, only : con_g, con_cp, con_avgd, con_amd, & - & con_amw, con_amo3 - use mersenne_twister, only : random_setseed, random_number, & - & random_stat -!mz - use machine, only : kind_phys, & - & im => kind_io4, rb => kind_phys - - use module_radlw_parameters -! - use module_radlw_avplank, only : totplnk - use module_radlw_ref, only : preflog, tref, chi_mls -! - implicit none -! - private -! -! ... version tag and last revision date - character(40), parameter :: & - & VTAGLW='NCEP LW v5.1 Nov 2012 -RRTMG-LW v4.82 ' -! & VTAGLW='NCEP LW v5.0 Aug 2012 -RRTMG-LW v4.82 ' -! & VTAGLW='RRTMG-LW v4.82 Nov 2009 ' -! & VTAGLW='RRTMG-LW v4.8 Oct 2009 ' -! & VTAGLW='RRTMG-LW v4.71 Mar 2009 ' -! & VTAGLW='RRTMG-LW v4.4 Oct 2008 ' -! & VTAGLW='RRTM-LW v2.3g Mar 2007 ' -! & VTAGLW='RRTM-LW v2.3g Apr 2004 ' - -! --- constant values - real (kind=kind_phys), parameter :: eps = 1.0e-6 - real (kind=kind_phys), parameter :: oneminus= 1.0-eps - real (kind=kind_phys), parameter :: cldmin = tiny(cldmin) - real (kind=kind_phys), parameter :: bpade = 1.0/0.278 ! pade approx constant - real (kind=kind_phys), parameter :: stpfac = 296.0/1013.0 - real (kind=kind_phys), parameter :: wtdiff = 0.5 ! weight for radiance to flux conversion - real (kind=kind_phys), parameter :: tblint = ntbl ! lookup table conversion factor - real (kind=kind_phys), parameter :: f_zero = 0.0 - real (kind=kind_phys), parameter :: f_one = 1.0 - -! ... atomic weights for conversion from mass to volume mixing ratios - real (kind=kind_phys), parameter :: amdw = con_amd/con_amw - real (kind=kind_phys), parameter :: amdo3 = con_amd/con_amo3 - -! ... band indices - integer, dimension(nbands) :: nspa, nspb - - data nspa / 1, 1, 9, 9, 9, 1, 9, 1, 9, 1, 1, 9, 9, 1, 9, 9 / - data nspb / 1, 1, 5, 5, 5, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0 / - -! ... band wavenumber intervals -! real (kind=kind_phys) :: wavenum1(nbands), wavenum2(nbands) -! data wavenum1/ & -! & 10., 350., 500., 630., 700., 820., 980., 1080., & -!err & 1180., 1390., 1480., 1800., 2080., 2250., 2390., 2600. / -! & 1180., 1390., 1480., 1800., 2080., 2250., 2380., 2600. / -! data wavenum2/ & -! & 350., 500., 630., 700., 820., 980., 1080., 1180., & -!err & 1390., 1480., 1800., 2080., 2250., 2390., 2600., 3250. / -! & 1390., 1480., 1800., 2080., 2250., 2380., 2600., 3250. / -! real (kind=kind_phys) :: delwave(nbands) -! data delwave / 340., 150., 130., 70., 120., 160., 100., 100., & -! & 210., 90., 320., 280., 170., 130., 220., 650. / - -! --- reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 -! and 1.80) as a function of total column water vapor. the function -! has been defined to minimize flux and cooling rate errors in these bands -! over a wide range of precipitable water values. - real (kind=kind_phys), dimension(nbands) :: a0, a1, a2 - - data a0 / 1.66, 1.55, 1.58, 1.66, 1.54, 1.454, 1.89, 1.33, & - & 1.668, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66 / - data a1 / 0.00, 0.25, 0.22, 0.00, 0.13, 0.446, -0.10, 0.40, & - & -0.006, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - data a2 / 0.00, -12.0, -11.7, 0.00, -0.72,-0.243, 0.19,-0.062, & - & 0.414, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - -!! --- logical flags for optional output fields - - logical :: lhlwb = .false. - logical :: lhlw0 = .false. - logical :: lflxprf= .false. - -! --- those data will be set up only once by "rlwinit" - -! ... fluxfac, heatfac are factors for fluxes (in w/m**2) and heating -! rates (in k/day, or k/sec set by subroutine 'rlwinit') -! semiss0 are default surface emissivity for each bands - - real (kind=kind_phys) :: fluxfac, heatfac, semiss0(nbands) - data semiss0(:) / nbands*1.0 / - - real (kind=kind_phys) :: tau_tbl(0:ntbl) !< clr-sky opt dep (for cldy transfer) - real (kind=kind_phys) :: exp_tbl(0:ntbl) !< transmittance lookup table - real (kind=kind_phys) :: tfn_tbl(0:ntbl) !< tau transition function; i.e. the - !< transition of planck func from mean lyr - !< temp to lyr boundary temp as a func of - !< opt dep. "linear in tau" method is used. - -! --- the following variables are used for sub-column cloud scheme - - integer, parameter :: ipsdlw0 = ngptlw ! initial permutation seed - -! --- public accessable subprograms - - public rrtmg_lw_init, rrtmg_lw_run, rrtmg_lw_finalize, rlwinit - - -! ================ - contains -! ================ - - subroutine rrtmg_lw_init () - end subroutine rrtmg_lw_init - -!> \defgroup module_radlw_main GFS RRTMG Longwave Module -!! \brief This module includes NCEP's modifications of the RRTMG-LW radiation -!! code from AER. -!! -!! The RRTM-LW package includes three files: -!! - radlw_param.f, which contains: -!! - module_radlw_parameters: band parameters set up -!! - radlw_datatb.f, which contains modules: -!! - module_radlw_avplank: plank flux data -!! - module_radlw_ref: reference temperature and pressure -!! - module_radlw_cldprlw: cloud property coefficients -!! - module_radlw_kgbnn: absorption coeffients for 16 bands, where nn = 01-16 -!! - radlw_main.f, which contains: -!! - rrtmg_lw_run(): the main LW radiation routine -!! - rlwinit(): the initialization routine -!! -!!\version NCEP LW v5.1 Nov 2012 -RRTMG-LW v4.82 -!! -!!\copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). -!! This software may be used, copied, or redistributed as long as it is -!! not sold and this copyright notice is reproduced on each copy made. -!! This model is provided as is without any express or implied warranties. -!! (http://www.rtweb.aer.com/) -!! \section arg_table_rrtmg_lw_run Argument Table -!! \htmlinclude rrtmg_lw_run.html -!! -!> \section gen_lwrad RRTMG Longwave Radiation Scheme General Algorithm -!> @{ - subroutine rrtmg_lw_run & - & ( plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr_co2, gasvmr_n2o, & ! --- inputs - & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & - & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, & - & icseed,aeraod,aerssa,sfemis,sfgtmp, & - & dzlyr,delpin,de_lgth, & - & npts, nlay, nlp1, lprnt, cld_cf, lslwr, & - & hlwc,topflx,sfcflx,cldtau, & ! --- outputs - & HLW0,HLWB,FLXPRF, & ! --- optional - & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & - & cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, & - & cld_od, errmsg, errflg & - & ) - -! ==================== defination of variables ==================== ! -! ! -! input variables: ! -! plyr (npts,nlay) : layer mean pressures (mb) ! -! plvl (npts,nlp1) : interface pressures (mb) ! -! tlyr (npts,nlay) : layer mean temperature (k) ! -! tlvl (npts,nlp1) : interface temperatures (k) ! -! qlyr (npts,nlay) : layer specific humidity (gm/gm) *see inside ! -! olyr (npts,nlay) : layer ozone concentration (gm/gm) *see inside ! -! gasvmr(npts,nlay,:): atmospheric gases amount: ! -! (check module_radiation_gases for definition) ! -! gasvmr(:,:,1) - co2 volume mixing ratio ! -! gasvmr(:,:,2) - n2o volume mixing ratio ! -! gasvmr(:,:,3) - ch4 volume mixing ratio ! -! gasvmr(:,:,4) - o2 volume mixing ratio ! -! gasvmr(:,:,5) - co volume mixing ratio ! -! gasvmr(:,:,6) - cfc11 volume mixing ratio ! -! gasvmr(:,:,7) - cfc12 volume mixing ratio ! -! gasvmr(:,:,8) - cfc22 volume mixing ratio ! -! gasvmr(:,:,9) - ccl4 volume mixing ratio ! -! clouds(npts,nlay,:): layer cloud profiles: ! -! (check module_radiation_clouds for definition) ! -! clouds(:,:,1) - layer total cloud fraction ! -! clouds(:,:,2) - layer in-cloud liq water path (g/m**2) ! -! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! -! clouds(:,:,4) - layer in-cloud ice water path (g/m**2) ! -! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! -! clouds(:,:,6) - layer rain drop water path (g/m**2) ! -! clouds(:,:,7) - mean eff radius for rain drop (micron) ! -! clouds(:,:,8) - layer snow flake water path (g/m**2) ! -! clouds(:,:,9) - mean eff radius for snow flake (micron) ! -! icseed(npts) : auxiliary special cloud related array ! -! when module variable isubclw=2, it provides ! -! permutation seed for each column profile that ! -! are used for generating random numbers. ! -! when isubclw /=2, it will not be used. ! -! aerosols(npts,nlay,nbands,:) : aerosol optical properties ! -! (check module_radiation_aerosols for definition)! -! (:,:,:,1) - optical depth ! -! (:,:,:,2) - single scattering albedo ! -! (:,:,:,3) - asymmetry parameter ! -! sfemis (npts) : surface emissivity ! -! sfgtmp (npts) : surface ground temperature (k) ! -! dzlyr(npts,nlay) : layer thickness (km) ! -! delpin(npts,nlay): layer pressure thickness (mb) ! -! de_lgth(npts) : cloud decorrelation length (km) ! -! npts : total number of horizontal points ! -! nlay, nlp1 : total number of vertical layers, levels ! -! lprnt : cntl flag for diagnostic print out ! -! ! -! output variables: ! -! hlwc (npts,nlay): total sky heating rate (k/day or k/sec) ! -! topflx(npts) : radiation fluxes at top, component: ! -! (check module_radlw_paramters for definition) ! -! upfxc - total sky upward flux at top (w/m2) ! -! upfx0 - clear sky upward flux at top (w/m2) ! -! sfcflx(npts) : radiation fluxes at sfc, component: ! -! (check module_radlw_paramters for definition) ! -! upfxc - total sky upward flux at sfc (w/m2) ! -! upfx0 - clear sky upward flux at sfc (w/m2) ! -! dnfxc - total sky downward flux at sfc (w/m2) ! -! dnfx0 - clear sky downward flux at sfc (w/m2) ! -! cldtau(npts,nlay): approx 10mu band layer cloud optical depth ! -! ! -!! optional output variables: ! -! hlwb(npts,nlay,nbands): spectral band total sky heating rates ! -! hlw0 (npts,nlay): clear sky heating rate (k/day or k/sec) ! -! flxprf(npts,nlp1): level radiative fluxes (w/m2), components: ! -! (check module_radlw_paramters for definition) ! -! upfxc - total sky upward flux ! -! dnfxc - total sky dnward flux ! -! upfx0 - clear sky upward flux ! -! dnfx0 - clear sky dnward flux ! -! ! -! external module variables: (in physparam) ! -! ilwrgas - control flag for rare gases (ch4,n2o,o2,cfcs, etc.) ! -! =0: do not include rare gases ! -! >0: include all rare gases ! -! ilwcliq - control flag for liq-cloud optical properties ! -! =1: input cld liqp & reliq, hu & stamnes (1993) ! -! =2: not used ! -! ilwcice - control flag for ice-cloud optical properties ! -! =1: input cld icep & reice, ebert & curry (1997) ! -! =2: input cld icep & reice, streamer (1996) ! -! =3: input cld icep & reice, fu (1998) ! -! isubclw - sub-column cloud approximation control flag ! -! =0: no sub-col cld treatment, use grid-mean cld quantities ! -! =1: mcica sub-col, prescribed seeds to get random numbers ! -! =2: mcica sub-col, providing array icseed for random numbers! -! iovrlw - cloud overlapping control flag ! -! =0: random overlapping clouds ! -! =1: maximum/random overlapping clouds ! -! =2: maximum overlap cloud (used for isubclw>0 only) ! -! =3: decorrelation-length overlap (for isubclw>0 only) ! -! ivflip - control flag for vertical index direction ! -! =0: vertical index from toa to surface ! -! =1: vertical index from surface to toa ! -! ! -! module parameters, control variables: ! -! nbands - number of longwave spectral bands ! -! maxgas - maximum number of absorbing gaseous ! -! maxxsec - maximum number of cross-sections ! -! ngptlw - total number of g-point subintervals ! -! ng## - number of g-points in band (##=1-16) ! -! ngb(ngptlw) - band indices for each g-point ! -! bpade - pade approximation constant (1/0.278) ! -! nspa,nspb(nbands)- number of lower/upper ref atm's per band ! -! delwave(nbands) - longwave band width (wavenumbers) ! -! ipsdlw0 - permutation seed for mcica sub-col clds ! -! ! -! major local variables: ! -! pavel (nlay) - layer pressures (mb) ! -! delp (nlay) - layer pressure thickness (mb) ! -! tavel (nlay) - layer temperatures (k) ! -! tz (0:nlay) - level (interface) temperatures (k) ! -! semiss (nbands) - surface emissivity for each band ! -! wx (nlay,maxxsec) - cross-section molecules concentration ! -! coldry (nlay) - dry air column amount ! -! (1.e-20*molecules/cm**2) ! -! cldfrc (0:nlp1) - layer cloud fraction ! -! taucld (nbands,nlay) - layer cloud optical depth for each band ! -! cldfmc (ngptlw,nlay) - layer cloud fraction for each g-point ! -! tauaer (nbands,nlay) - aerosol optical depths ! -! fracs (ngptlw,nlay) - planck fractions ! -! tautot (ngptlw,nlay) - total optical depths (gaseous+aerosols) ! -! colamt (nlay,maxgas) - column amounts of absorbing gases ! -! 1-maxgas are for watervapor, carbon ! -! dioxide, ozone, nitrous oxide, methane, ! -! oxigen, carbon monoxide, respectively ! -! (molecules/cm**2) ! -! pwvcm - column precipitable water vapor (cm) ! -! secdiff(nbands) - variable diffusivity angle defined as ! -! an exponential function of the column ! -! water amount in bands 2-3 and 5-9. ! -! this reduces the bias of several w/m2 in ! -! downward surface flux in high water ! -! profiles caused by using the constant ! -! diffusivity angle of 1.66. (mji) ! -! facij (nlay) - indicator of interpolation factors ! -! =0/1: indicate lower/higher temp & height ! -! selffac(nlay) - scale factor for self-continuum, equals ! -! (w.v. density)/(atm density at 296K,1013 mb) ! -! selffrac(nlay) - factor for temp interpolation of ref ! -! self-continuum data ! -! indself(nlay) - index of the lower two appropriate ref ! -! temp for the self-continuum interpolation ! -! forfac (nlay) - scale factor for w.v. foreign-continuum ! -! forfrac(nlay) - factor for temp interpolation of ref ! -! w.v. foreign-continuum data ! -! indfor (nlay) - index of the lower two appropriate ref ! -! temp for the foreign-continuum interp ! -! laytrop - tropopause layer index at which switch is ! -! made from one conbination kew species to ! -! another. ! -! jp(nlay),jt(nlay),jt1(nlay) ! -! - lookup table indexes ! -! totuflux(0:nlay) - total-sky upward longwave flux (w/m2) ! -! totdflux(0:nlay) - total-sky downward longwave flux (w/m2) ! -! htr(nlay) - total-sky heating rate (k/day or k/sec) ! -! totuclfl(0:nlay) - clear-sky upward longwave flux (w/m2) ! -! totdclfl(0:nlay) - clear-sky downward longwave flux (w/m2) ! -! htrcl(nlay) - clear-sky heating rate (k/day or k/sec) ! -! fnet (0:nlay) - net longwave flux (w/m2) ! -! fnetc (0:nlay) - clear-sky net longwave flux (w/m2) ! -! ! -! ! -! ====================== end of definitions =================== ! - -! --- inputs: - integer, intent(in) :: npts, nlay, nlp1 - integer, intent(in) :: icseed(npts) - - logical, intent(in) :: lprnt - - real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: plvl, & - & tlvl - real (kind=kind_phys), dimension(npts,nlay), intent(in) :: plyr, & - & tlyr, qlyr, olyr, dzlyr, delpin - - real (kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co2,& - & gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & - & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4 - - real (kind=kind_phys), dimension(npts,nlay),intent(in):: cld_cf - real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & - & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & - & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, & - & cld_od - - real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & - & sfgtmp, de_lgth - - real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & - & aeraod, aerssa - -!mz* HWRF -- INPUT from mcica_subcol_lw - real(kind=kind_phys),dimension(ngptlw,npts,nlay) :: cldfmcl ! Cloud fraction - ! Dimensions: (ngptlw,ncol,nlay) -! real(kind=rb), intent(in) :: ciwpmcl(:,:,:) ! In-cloud ice water path (g/m2) -! ! Dimensions: (ngptlw,ncol,nlay) -! real(kind=rb), intent(in) :: clwpmcl(:,:,:) ! In-cloud liquid water path (g/m2) -! ! Dimensions: (ngptlw,ncol,nlay) -! real(kind=rb), intent(in) :: cswpmcl(:,:,:) ! In-cloud snow water path (g/m2) -! ! Dimensions: (ngptlw,ncol,nlay) -! real(kind=rb), intent(in) :: relqmcl(:,:) ! Cloud water drop effective radius (microns) -! ! Dimensions: (ncol,nlay) -! real(kind=rb), intent(in) :: reicmcl(:,:) ! Cloud ice effective size (microns) -! ! Dimensions: (ncol,nlay) -! real(kind=rb), intent(in) :: resnmcl(:,:) ! Snow effective size (microns) -! ! Dimensions: (ncol,nlay) -! real(kind=rb), intent(in) :: taucmcl(:,:,:) ! In-cloud optical depth -! ! Dimensions: (ngptlw,ncol,nlay) -! real(kind=rb), intent(in) :: tauaer(:,:,:) ! Aerosol optical depth -! ! Dimensions: (ncol,nlay,nbndlw) - -!mz - -! --- outputs: - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hlwc - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & - & cldtau - - type (topflw_type), dimension(npts), intent(inout) :: topflx - type (sfcflw_type), dimension(npts), intent(inout) :: sfcflx - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - -!! --- optional outputs: - real (kind=kind_phys), dimension(npts,nlay,nbands),optional, & - & intent(inout) :: hlwb - real (kind=kind_phys), dimension(npts,nlay), optional, & - & intent(inout) :: hlw0 - type (proflw_type), dimension(npts,nlp1), optional, & - & intent(inout) :: flxprf - logical, intent(in) :: lslwr - -! --- locals: -! mz* - Add height of each layer for exponential-random cloud overlap -! This will be derived below from the dzlyr in each layer - real (kind=kind_phys), dimension( npts,nlay ) :: hgt - real (kind=kind_phys):: dzsum - - real (kind=kind_phys), dimension(0:nlp1) :: cldfrc - - real (kind=kind_phys), dimension(0:nlay) :: totuflux, totdflux, & - & totuclfl, totdclfl, tz - - real (kind=kind_phys), dimension(nlay) :: htr, htrcl - - real (kind=kind_phys), dimension(nlay) :: pavel, tavel, delp, & - & clwp, ciwp, relw, reiw, cda1, cda2, cda3, cda4, & - & coldry, colbrd, h2ovmr, o3vmr, fac00, fac01, fac10, fac11, & - & selffac, selffrac, forfac, forfrac, minorfrac, scaleminor, & - & scaleminorn2, temcol, dz - - real (kind=kind_phys), dimension(nbands,0:nlay) :: pklev, pklay - - real (kind=kind_phys), dimension(nlay,nbands) :: htrb - real (kind=kind_phys), dimension(nbands,nlay) :: taucld, tauaer - real (kind=kind_phys), dimension(nbands,1,nlay) :: taucld3 - real (kind=kind_phys), dimension(ngptlw,nlay) :: fracs, tautot, & - & cldfmc - - real (kind=kind_phys), dimension(nbands) :: semiss, secdiff - -! --- column amount of absorbing gases: -! (:,m) m = 1-h2o, 2-co2, 3-o3, 4-n2o, 5-ch4, 6-o2, 7-co - real (kind=kind_phys) :: colamt(nlay,maxgas) - -! --- column cfc cross-section amounts: -! (:,m) m = 1-ccl4, 2-cfc11, 3-cfc12, 4-cfc22 - real (kind=kind_phys) :: wx(nlay,maxxsec) - -! --- reference ratios of binary species parameter in lower atmosphere: -! (:,m,:) m = 1-h2o/co2, 2-h2o/o3, 3-h2o/n2o, 4-h2o/ch4, 5-n2o/co2, 6-o3/co2 - real (kind=kind_phys) :: rfrate(nlay,nrates,2) - - real (kind=kind_phys) :: tem0, tem1, tem2, pwvcm, summol, stemp, & - & delgth - - integer, dimension(npts) :: ipseed - integer, dimension(nlay) :: jp, jt, jt1, indself, indfor, indminor - integer :: laytrop, iplon, i, j, k, k1 - ! mz* added local arrays for RRTMG - integer :: irng, permuteseed,ig - integer :: inflglw, iceflglw, liqflglw - logical :: lcf1 - -! -!===> ... begin here -! - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - -!mz* -! For passing in cloud physical properties; cloud optics parameterized -! in RRTMG: - inflglw = 2 - iceflglw = 3 - liqflglw = 1 - -! - if (.not. lslwr) return - -! --- ... initialization - - lhlwb = present ( hlwb ) - lhlw0 = present ( hlw0 ) - lflxprf= present ( flxprf ) - - colamt(:,:) = f_zero - cldtau(:,:) = f_zero - -!! --- check for optional input arguments, depending on cloud method - if (ilwcliq > 0) then ! use prognostic cloud method - if ( .not.present(cld_lwp) .or. .not.present(cld_ref_liq) .or. & - & .not.present(cld_iwp) .or. .not.present(cld_ref_ice) .or. & - & .not.present(cld_rwp) .or. .not.present(cld_ref_rain) .or. & - & .not.present(cld_swp) .or. .not.present(cld_ref_snow)) then - write(errmsg,'(*(a))') & - & 'Logic error: ilwcliq>0 requires the following', & - & ' optional arguments to be present:', & - & ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', & - & ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow' - errflg = 1 - return - end if - else ! use diagnostic cloud method - if ( .not.present(cld_od) ) then - write(errmsg,'(*(a))') & - & 'Logic error: ilwcliq<=0 requires the following', & - & ' optional argument to be present: cld_od' - errflg = 1 - return - end if - endif ! end if_ilwcliq - -!> -# Change random number seed value for each radiation invocation -!! (isubclw =1 or 2). - - if ( isubclw == 1 ) then ! advance prescribed permutation seed - do i = 1, npts - ipseed(i) = ipsdlw0 + i - enddo - elseif ( isubclw == 2 ) then ! use input array of permutaion seeds - do i = 1, npts - ipseed(i) = icseed(i) - enddo - endif - -! if ( lprnt ) then -! print *,' In rrtmg_lw, isubclw, ipsdlw0,ipseed =', & -! & isubclw, ipsdlw0, ipseed -! endif - -! --- ... loop over horizontal npts profiles - - lab_do_iplon : do iplon = 1, npts - -!> -# Read surface emissivity. - if (sfemis(iplon) > eps .and. sfemis(iplon) <= 1.0) then ! input surface emissivity - do j = 1, nbands - semiss(j) = sfemis(iplon) - enddo - else ! use default values - do j = 1, nbands - semiss(j) = semiss0(j) - enddo - endif - - stemp = sfgtmp(iplon) ! surface ground temp - if (iovrlw == 3) delgth= de_lgth(iplon) ! clouds decorr-length - -! mz*: HWRF practice - if (iovrlw == 4 ) then - - -!Add layer height needed for exponential (icld=4) and -! exponential-random (icld=5) overlap options - - !iplon = 1 - irng = 0 - permuteseed = 150 - -!mz* Derive height - dzsum =0.0 - do k = 1,nlay - hgt(iplon,k)= dzsum+0.5*dzlyr(iplon,k)*1000. !km->m - dzsum = dzsum+ dzlyr(iplon,k)*1000. - enddo - -! Zero out cloud optical properties here; not used when passing physical properties -! to radiation and taucld is calculated in radiation - do k = 1, nlay - do j = 1, nbands - taucld3(j,iplon,k) = 0.0 - enddo - enddo - - -! call mcica_subcol_lw(iplon, ncol, nlay, iovrlw, permuteseed, & -! & irng, play, hgt, & -! & cldfrac, ciwpth, clwpth, cswpth, rei, rel, res, & -! & taucld, & -! & cldfmcl, & !--output -! & ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, & -! & resnmcl, taucmcl) - -!mz* calculate cldfmcl for mcica first, *temporary - call mcica_subcol_lw(1, iplon, nlay, iovrlw, permuteseed, & - & irng, plyr, hgt, & - & cld_cf, cld_iwp, cld_lwp,cld_swp, & - & cld_ref_ice, cld_ref_liq, & - & cld_ref_snow, taucld3, & - & cldfmcl ) !--output - - endif -!mz* end - -!> -# Prepare atmospheric profile for use in rrtm. -! the vertical index of internal array is from surface to top - -! --- ... molecular amounts are input or converted to volume mixing ratio -! and later then converted to molecular amount (molec/cm2) by the -! dry air column coldry (in molec/cm2) which is calculated from the -! layer pressure thickness (in mb), based on the hydrostatic equation -! --- ... and includes a correction to account for h2o in the layer. - - if (ivflip == 0) then ! input from toa to sfc - - tem1 = 100.0 * con_g - tem2 = 1.0e-20 * 1.0e3 * con_avgd - tz(0) = tlvl(iplon,nlp1) - - do k = 1, nlay - k1 = nlp1 - k - pavel(k)= plyr(iplon,k1) - delp(k) = delpin(iplon,k1) - tavel(k)= tlyr(iplon,k1) - tz(k) = tlvl(iplon,k1) - dz(k) = dzlyr(iplon,k1) - -!> -# Set absorber amount for h2o, co2, and o3. - -!test use -! h2ovmr(k)= max(f_zero,qlyr(iplon,k1)*amdw) ! input mass mixing ratio -! h2ovmr(k)= max(f_zero,qlyr(iplon,k1)) ! input vol mixing ratio -! o3vmr (k)= max(f_zero,olyr(iplon,k1)) ! input vol mixing ratio -!ncep model use - h2ovmr(k)= max(f_zero,qlyr(iplon,k1) & - & *amdw/(f_one-qlyr(iplon,k1))) ! input specific humidity - o3vmr (k)= max(f_zero,olyr(iplon,k1)*amdo3) ! input mass mixing ratio - -! --- ... tem0 is the molecular weight of moist air - tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw - coldry(k) = tem2*delp(k) / (tem1*tem0*(f_one+h2ovmr(k))) - temcol(k) = 1.0e-12 * coldry(k) - - colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o - colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(iplon,k1)) ! co2 - colamt(k,3) = max(temcol(k), coldry(k)*o3vmr(k)) ! o3 - enddo - -!> -# Set up column amount for rare gases n2o,ch4,o2,co,ccl4,cf11,cf12, -!! cf22, convert from volume mixing ratio to molec/cm2 based on -!! coldry (scaled to 1.0e-20). - - if (ilwrgas > 0) then - do k = 1, nlay - k1 = nlp1 - k - colamt(k,4)=max(temcol(k), coldry(k)*gasvmr_n2o(iplon,k1)) ! n2o - colamt(k,5)=max(temcol(k), coldry(k)*gasvmr_ch4(iplon,k1)) ! ch4 - colamt(k,6)=max(f_zero, coldry(k)*gasvmr_o2(iplon,k1)) ! o2 - colamt(k,7)=max(f_zero, coldry(k)*gasvmr_co(iplon,k1)) ! co - - wx(k,1) = max( f_zero, coldry(k)*gasvmr_ccl4(iplon,k1) ) ! ccl4 - wx(k,2) = max( f_zero, coldry(k)*gasvmr_cfc11(iplon,k1) ) ! cf11 - wx(k,3) = max( f_zero, coldry(k)*gasvmr_cfc12(iplon,k1) ) ! cf12 - wx(k,4) = max( f_zero, coldry(k)*gasvmr_cfc22(iplon,k1) ) ! cf22 - enddo - else - do k = 1, nlay - colamt(k,4) = f_zero ! n2o - colamt(k,5) = f_zero ! ch4 - colamt(k,6) = f_zero ! o2 - colamt(k,7) = f_zero ! co - - wx(k,1) = f_zero - wx(k,2) = f_zero - wx(k,3) = f_zero - wx(k,4) = f_zero - enddo - endif - -!> -# Set aerosol optical properties. - - do k = 1, nlay - k1 = nlp1 - k - do j = 1, nbands - tauaer(j,k) = aeraod(iplon,k1,j) & - & * (f_one - aerssa(iplon,k1,j)) - enddo - enddo - -!> -# Read cloud optical properties. - if (ilwcliq > 0) then ! use prognostic cloud method -!mz: GFS operational - if (iovrlw .ne. 4 ) then - do k = 1, nlay - k1 = nlp1 - k - cldfrc(k)= cld_cf(iplon,k1) - clwp(k) = cld_lwp(iplon,k1) - relw(k) = cld_ref_liq(iplon,k1) - ciwp(k) = cld_iwp(iplon,k1) - reiw(k) = cld_ref_ice(iplon,k1) - !mz*: Limit upper bound of reice for Fu ice - !parameterization and convert from effective radius - !to generalized effective size (*1.0315; Fu, 1996) - if (iovrlw .eq. 4 .and. iceflglw.eq.3) then - reiw(k) = cld_ref_ice(iplon,k1) *1.0315 - reiw(k) = min(140.0, reiw(k)) - endif - cda1(k) = cld_rwp(iplon,k1) - cda2(k) = cld_ref_rain(iplon,k1) - cda3(k) = cld_swp(iplon,k1) - cda4(k) = cld_ref_snow(iplon,k1) - !mz - if (iovrlw .eq. 4 .and. inflglw .ne.5) then - cda3(k) = 0. - cda4(k) = 10. - endif - enddo - ! transfer - else if (iovrlw .eq. 4) then !mz HWRF - do k = 1, nlay - k1 = nlp1 - k - do ig = 1, ngptlw - cldfmc(ig,k) = cldfmcl(ig,iplon,k1) -!mz* not activate -! taucmc(ig,k) = taucmcl(ig,iplon,k1) -! ciwpmc(ig,k) = ciwpmcl(ig,iplon,k1) -! clwpmc(ig,k) = clwpmcl(ig,iplon,k1) -! cswpmc(ig,k) = cswpmcl(ig,iplon,k1) - enddo -! reicmc(k) = reicmcl(iplon,k1) -! relqmc(k) = relqmcl(iplon,k1) -! resnmc(k) = resnmcl(iplon,k1) - enddo - endif - else ! use diagnostic cloud method - do k = 1, nlay - k1 = nlp1 - k - cldfrc(k)= cld_cf(iplon,k1) - cda1(k) = cld_od(iplon,k1) - enddo - endif ! end if_ilwcliq - - cldfrc(0) = f_one ! padding value only - cldfrc(nlp1) = f_zero ! padding value only - -!> -# Compute precipitable water vapor for diffusivity angle adjustments. - - tem1 = f_zero - tem2 = f_zero - do k = 1, nlay - tem1 = tem1 + coldry(k) + colamt(k,1) - tem2 = tem2 + colamt(k,1) - enddo - - tem0 = 10.0 * tem2 / (amdw * tem1 * con_g) - pwvcm = tem0 * plvl(iplon,nlp1) - - else ! input from sfc to toa - - tem1 = 100.0 * con_g - tem2 = 1.0e-20 * 1.0e3 * con_avgd - tz(0) = tlvl(iplon,1) - - do k = 1, nlay - pavel(k)= plyr(iplon,k) - delp(k) = delpin(iplon,k) - tavel(k)= tlyr(iplon,k) - tz(k) = tlvl(iplon,k+1) - dz(k) = dzlyr(iplon,k) - -! --- ... set absorber amount -!test use -! h2ovmr(k)= max(f_zero,qlyr(iplon,k)*amdw) ! input mass mixing ratio -! h2ovmr(k)= max(f_zero,qlyr(iplon,k)) ! input vol mixing ratio -! o3vmr (k)= max(f_zero,olyr(iplon,k)) ! input vol mixing ratio -!ncep model use - h2ovmr(k)= max(f_zero,qlyr(iplon,k) & - & *amdw/(f_one-qlyr(iplon,k))) ! input specific humidity - o3vmr (k)= max(f_zero,olyr(iplon,k)*amdo3) ! input mass mixing ratio - -! --- ... tem0 is the molecular weight of moist air - tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw - coldry(k) = tem2*delp(k) / (tem1*tem0*(f_one+h2ovmr(k))) - temcol(k) = 1.0e-12 * coldry(k) - - colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o - colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(iplon,k))! co2 - colamt(k,3) = max(temcol(k), coldry(k)*o3vmr(k)) ! o3 - enddo - -! --- ... set up col amount for rare gases, convert from volume mixing ratio -! to molec/cm2 based on coldry (scaled to 1.0e-20) - - if (ilwrgas > 0) then - do k = 1, nlay - colamt(k,4)=max(temcol(k), coldry(k)*gasvmr_n2o(iplon,k)) ! n2o - colamt(k,5)=max(temcol(k), coldry(k)*gasvmr_ch4(iplon,k)) ! ch4 - colamt(k,6)=max(f_zero, coldry(k)*gasvmr_o2(iplon,k)) ! o2 - colamt(k,7)=max(f_zero, coldry(k)*gasvmr_co(iplon,k)) ! co - - wx(k,1) = max( f_zero, coldry(k)*gasvmr_ccl4(iplon,k) ) ! ccl4 - wx(k,2) = max( f_zero, coldry(k)*gasvmr_cfc11(iplon,k) ) ! cf11 - wx(k,3) = max( f_zero, coldry(k)*gasvmr_cfc12(iplon,k) ) ! cf12 - wx(k,4) = max( f_zero, coldry(k)*gasvmr_cfc22(iplon,k) ) ! cf22 - enddo - else - do k = 1, nlay - colamt(k,4) = f_zero ! n2o - colamt(k,5) = f_zero ! ch4 - colamt(k,6) = f_zero ! o2 - colamt(k,7) = f_zero ! co - - wx(k,1) = f_zero - wx(k,2) = f_zero - wx(k,3) = f_zero - wx(k,4) = f_zero - enddo - endif - -! --- ... set aerosol optical properties - - do j = 1, nbands - do k = 1, nlay - tauaer(j,k) = aeraod(iplon,k,j) & - & * (f_one - aerssa(iplon,k,j)) - enddo - enddo - - if (ilwcliq > 0) then ! use prognostic cloud method -!mz* - if (iovrlw .ne. 4) then - do k = 1, nlay - cldfrc(k)= cld_cf(iplon,k) - clwp(k) = cld_lwp(iplon,k) - relw(k) = cld_ref_liq(iplon,k) - ciwp(k) = cld_iwp(iplon,k) - reiw(k) = cld_ref_ice(iplon,k) - !mz*: Limit upper bound of reice for Fu ice - !parameterization and convert from effective radius - !to generalized effective size (*1.0315; Fu, 1996) - if (iovrlw .eq. 4 .and. iceflglw.eq.3) then - reiw(k) = cld_ref_ice(iplon,k1) *1.0315 - reiw(k) = min(140.0, reiw(k)) - endif - cda1(k) = cld_rwp(iplon,k) - cda2(k) = cld_ref_rain(iplon,k) - cda3(k) = cld_swp(iplon,k) - cda4(k) = cld_ref_snow(iplon,k) - !mz* - if (iovrlw .eq. 4 .and. inflglw .ne.5) then - cda3(k) = 0. - cda4(k) = 10. - endif - enddo - else if (iovrlw .eq. 4) then - do k = 1, nlay - do ig = 1, ngptlw - cldfmc(ig,k) = cldfmcl(ig,iplon,k) -! taucmc(ig,k) = taucmcl(ig,iplon,k) -! ciwpmc(ig,k) = ciwpmcl(ig,iplon,k) -! clwpmc(ig,k) = clwpmcl(ig,iplon,k) -! cswpmc(ig,k) = cswpmcl(ig,iplon,k) - enddo -! reicmc(k) = reicmcl(iplon,k) -! relqmc(k) = relqmcl(iplon,k) -! resnmc(k) = resnmcl(iplon,k) - enddo - endif - else ! use diagnostic cloud method - do k = 1, nlay - cldfrc(k)= cld_cf(iplon,k) - cda1(k) = cld_od(iplon,k) - enddo - endif ! end if_ilwcliq - - cldfrc(0) = f_one ! padding value only - cldfrc(nlp1) = f_zero ! padding value only - -! --- ... compute precipitable water vapor for diffusivity angle adjustments - - tem1 = f_zero - tem2 = f_zero - do k = 1, nlay - tem1 = tem1 + coldry(k) + colamt(k,1) - tem2 = tem2 + colamt(k,1) - enddo - - tem0 = 10.0 * tem2 / (amdw * tem1 * con_g) - pwvcm = tem0 * plvl(iplon,1) - - endif ! if_ivflip - -!> -# Compute column amount for broadening gases. - - do k = 1, nlay - summol = f_zero - do i = 2, maxgas - summol = summol + colamt(k,i) - enddo - colbrd(k) = coldry(k) - summol - enddo - -!> -# Compute diffusivity angle adjustments. - - tem1 = 1.80 - tem2 = 1.50 - do j = 1, nbands - if (j==1 .or. j==4 .or. j==10) then - secdiff(j) = 1.66 - else - secdiff(j) = min( tem1, max( tem2, & - & a0(j)+a1(j)*exp(a2(j)*pwvcm) )) - endif - enddo - -! if (lprnt) then -! print *,' coldry',coldry -! print *,' wx(*,1) ',(wx(k,1),k=1,NLAY) -! print *,' wx(*,2) ',(wx(k,2),k=1,NLAY) -! print *,' wx(*,3) ',(wx(k,3),k=1,NLAY) -! print *,' wx(*,4) ',(wx(k,4),k=1,NLAY) -! print *,' iplon ',iplon -! print *,' pavel ',pavel -! print *,' delp ',delp -! print *,' tavel ',tavel -! print *,' tz ',tz -! print *,' h2ovmr ',h2ovmr -! print *,' o3vmr ',o3vmr -! endif - -!> -# For cloudy atmosphere, call cldprop() to set cloud optical -!! properties. - -!mz* - if (iovrlw .ne. 4 ) then !mz:GFS oprational - - lcf1 = .false. - lab_do_k0 : do k = 1, nlay - if ( cldfrc(k) > eps ) then - lcf1 = .true. - exit lab_do_k0 - endif - enddo lab_do_k0 - - if ( lcf1 ) then - - call cldprop & -! --- inputs: - & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & - & nlay, nlp1, ipseed(iplon), dz, delgth, & -! --- outputs: - & cldfmc, taucld & - & ) - -! --- ... save computed layer cloud optical depth for output -! rrtm band-7 is apprx 10mu channel (or use spectral mean of bands 6-8) - - if (ivflip == 0) then ! input from toa to sfc - do k = 1, nlay - k1 = nlp1 - k - cldtau(iplon,k1) = taucld( 7,k) - enddo - else ! input from sfc to toa - do k = 1, nlay - cldtau(iplon,k) = taucld( 7,k) - enddo - endif ! end if_ivflip_block - - else - cldfmc = f_zero - taucld = f_zero - endif - endif !mz iovrlw.ne.4 - -! else if (iovrlw .eq. 4) then !mz*:HWRF for cldovrlp=4 - -!mz* call CLDPRMC to set cloud optical depth for McICA based on input cloud -! properties (inflglw) - -! For cloudy atmosphere, use cldprop to set cloud optical properties based on -! input cloud physical properties. Select method based on choices described -! in cldprop. Cloud fraction, water path, liquid droplet and ice particle -! effective radius must be passed into cldprop. Cloud fraction and cloud -! optical depth are transferred to rrtmg_lw arrays in cldprop. -! -! ncbands(im): number of cloud spectral bands -! taucmc(ngptlw,nlayers): cloud optical depth [mcica] - -! call cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, ciwpmc,& -! clwpmc, cswpmc, reicmc, relqmc, resnmc, & -! ncbands, taucmc) - - -! if (lprnt) then -! print *,' after cldprop' -! print *,' clwp',clwp -! print *,' ciwp',ciwp -! print *,' relw',relw -! print *,' reiw',reiw -! print *,' taucl',cda1 -! print *,' cldfrac',cldfrc -! endif - -!> -# Calling setcoef() to compute various coefficients needed in -!! radiative transfer calculations. - call setcoef & -! --- inputs: - & ( pavel,tavel,tz,stemp,h2ovmr,colamt,coldry,colbrd, & - & nlay, nlp1, & -! --- outputs: - & laytrop,pklay,pklev,jp,jt,jt1, & - & rfrate,fac00,fac01,fac10,fac11, & - & selffac,selffrac,indself,forfac,forfrac,indfor, & - & minorfrac,scaleminor,scaleminorn2,indminor & - & ) - -! if (lprnt) then -! print *,'laytrop',laytrop -! print *,'colh2o',(colamt(k,1),k=1,NLAY) -! print *,'colco2',(colamt(k,2),k=1,NLAY) -! print *,'colo3', (colamt(k,3),k=1,NLAY) -! print *,'coln2o',(colamt(k,4),k=1,NLAY) -! print *,'colch4',(colamt(k,5),k=1,NLAY) -! print *,'fac00',fac00 -! print *,'fac01',fac01 -! print *,'fac10',fac10 -! print *,'fac11',fac11 -! print *,'jp',jp -! print *,'jt',jt -! print *,'jt1',jt1 -! print *,'selffac',selffac -! print *,'selffrac',selffrac -! print *,'indself',indself -! print *,'forfac',forfac -! print *,'forfrac',forfrac -! print *,'indfor',indfor -! endif - -!> -# Call taumol() to calculte the gaseous optical depths and Plank -!! fractions for each longwave spectral band. - - call taumol & -! --- inputs: - & ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, & - & rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, & - & selffac,selffrac,indself,forfac,forfrac,indfor, & - & minorfrac,scaleminor,scaleminorn2,indminor, & - & nlay, & -! --- outputs: - & fracs, tautot & - & ) - -! if (lprnt) then -! print *,' after taumol' -! do k = 1, nlay -! write(6,121) k -!121 format(' k =',i3,5x,'FRACS') -! write(6,122) (fracs(j,k),j=1,ngptlw) -!122 format(10e14.7) -! write(6,123) k -!123 format(' k =',i3,5x,'TAUTOT') -! write(6,122) (tautot(j,k),j=1,ngptlw) -! enddo -! endif - -!> -# Call the radiative transfer routine based on cloud scheme -!! selection. Compute the upward/downward radiative fluxes, and -!! heating rates for both clear or cloudy atmosphere. -!!\n - call rtrn(): clouds are assumed as randomly overlaping in a -!! vertical column -!!\n - call rtrnmr(): clouds are assumed as in maximum-randomly -!! overlaping in a vertical column; -!!\n - call rtrnmc(): clouds are treated with the mcica stochastic -!! approach. - - if (isubclw <= 0) then - - if (iovrlw <= 0) then - - call rtrn & -! --- inputs: - & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, & - & fracs,secdiff,nlay,nlp1, & -! --- outputs: - & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & - & ) - - else - - call rtrnmr & -! --- inputs: - & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, & - & fracs,secdiff,nlay,nlp1, & -! --- outputs: - & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & - & ) - - endif ! end if_iovrlw_block - - else - - call rtrnmc & -! --- inputs: - & ( semiss,delp,cldfmc,taucld,tautot,pklay,pklev, & - & fracs,secdiff,nlay,nlp1, & -! --- outputs: - & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & - & ) - - endif ! end if_isubclw_block - -!> -# Save outputs. - - topflx(iplon)%upfxc = totuflux(nlay) - topflx(iplon)%upfx0 = totuclfl(nlay) - - sfcflx(iplon)%upfxc = totuflux(0) - sfcflx(iplon)%upfx0 = totuclfl(0) - sfcflx(iplon)%dnfxc = totdflux(0) - sfcflx(iplon)%dnfx0 = totdclfl(0) - - if (ivflip == 0) then ! output from toa to sfc - -!! --- ... optional fluxes - if ( lflxprf ) then - do k = 0, nlay - k1 = nlp1 - k - flxprf(iplon,k1)%upfxc = totuflux(k) - flxprf(iplon,k1)%dnfxc = totdflux(k) - flxprf(iplon,k1)%upfx0 = totuclfl(k) - flxprf(iplon,k1)%dnfx0 = totdclfl(k) - enddo - endif - - do k = 1, nlay - k1 = nlp1 - k - hlwc(iplon,k1) = htr(k) - enddo - -!! --- ... optional clear sky heating rate - if ( lhlw0 ) then - do k = 1, nlay - k1 = nlp1 - k - hlw0(iplon,k1) = htrcl(k) - enddo - endif - -!! --- ... optional spectral band heating rate - if ( lhlwb ) then - do j = 1, nbands - do k = 1, nlay - k1 = nlp1 - k - hlwb(iplon,k1,j) = htrb(k,j) - enddo - enddo - endif - - else ! output from sfc to toa - -!! --- ... optional fluxes - if ( lflxprf ) then - do k = 0, nlay - flxprf(iplon,k+1)%upfxc = totuflux(k) - flxprf(iplon,k+1)%dnfxc = totdflux(k) - flxprf(iplon,k+1)%upfx0 = totuclfl(k) - flxprf(iplon,k+1)%dnfx0 = totdclfl(k) - enddo - endif - - do k = 1, nlay - hlwc(iplon,k) = htr(k) - enddo - -!! --- ... optional clear sky heating rate - if ( lhlw0 ) then - do k = 1, nlay - hlw0(iplon,k) = htrcl(k) - enddo - endif - -!! --- ... optional spectral band heating rate - if ( lhlwb ) then - do j = 1, nbands - do k = 1, nlay - hlwb(iplon,k,j) = htrb(k,j) - enddo - enddo - endif - - endif ! if_ivflip - - enddo lab_do_iplon - -!................................... - end subroutine rrtmg_lw_run -!----------------------------------- -!> @} - subroutine rrtmg_lw_finalize () - end subroutine rrtmg_lw_finalize - - - -!> \ingroup module_radlw_main -!> \brief This subroutine performs calculations necessary for the initialization -!! of the longwave model, which includes non-varying model variables, conversion -!! factors, and look-up tables -!! -!! Lookup tables are computed for use in the lw -!! radiative transfer, and input absorption coefficient data for each -!! spectral band are reduced from 256 g-point intervals to 140. -!!\param me print control for parallel process -!!\section rlwinit_gen rlwinit General Algorithm -!! @{ - subroutine rlwinit & - & ( me ) ! --- inputs -! --- outputs: (none) - -! =================== program usage description =================== ! -! ! -! purpose: initialize non-varying module variables, conversion factors,! -! and look-up tables. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: ! -! me - print control for parallel process ! -! ! -! outputs: (none) ! -! ! -! external module variables: (in physparam) ! -! ilwrate - heating rate unit selections ! -! =1: output in k/day ! -! =2: output in k/second ! -! ilwrgas - control flag for rare gases (ch4,n2o,o2,cfcs, etc.) ! -! =0: do not include rare gases ! -! >0: include all rare gases ! -! ilwcliq - liquid cloud optical properties contrl flag ! -! =0: input cloud opt depth from diagnostic scheme ! -! >0: input cwp,rew, and other cloud content parameters ! -! isubclw - sub-column cloud approximation control flag ! -! =0: no sub-col cld treatment, use grid-mean cld quantities ! -! =1: mcica sub-col, prescribed seeds to get random numbers ! -! =2: mcica sub-col, providing array icseed for random numbers! -! icldflg - cloud scheme control flag ! -! =0: diagnostic scheme gives cloud tau, omiga, and g. ! -! =1: prognostic scheme gives cloud liq/ice path, etc. ! -! iovrlw - clouds vertical overlapping control flag ! -! =0: random overlapping clouds ! -! =1: maximum/random overlapping clouds ! -! =2: maximum overlap cloud (isubcol>0 only) ! -! =3: decorrelation-length overlap (for isubclw>0 only) ! -! ! -! ******************************************************************* ! -! original code description ! -! ! -! original version: michael j. iacono; july, 1998 ! -! first revision for ncar ccm: september, 1998 ! -! second revision for rrtm_v3.0: september, 2002 ! -! ! -! this subroutine performs calculations necessary for the initialization -! of the longwave model. lookup tables are computed for use in the lw ! -! radiative transfer, and input absorption coefficient data for each ! -! spectral band are reduced from 256 g-point intervals to 140. ! -! ! -! ******************************************************************* ! -! ! -! definitions: ! -! arrays for 10000-point look-up tables: ! -! tau_tbl - clear-sky optical depth (used in cloudy radiative transfer! -! exp_tbl - exponential lookup table for tansmittance ! -! tfn_tbl - tau transition function; i.e. the transition of the Planck! -! function from that for the mean layer temperature to that ! -! for the layer boundary temperature as a function of optical -! depth. the "linear in tau" method is used to make the table -! ! -! ******************************************************************* ! -! ! -! ====================== end of description block ================= ! - -! --- inputs: - integer, intent(in) :: me - -! --- outputs: none - -! --- locals: - real (kind=kind_phys), parameter :: expeps = 1.e-20 - - real (kind=kind_phys) :: tfn, pival, explimit - - integer :: i - -! -!===> ... begin here -! - if ( iovrlw<0 .or. iovrlw>4 ) then - print *,' *** Error in specification of cloud overlap flag', & - & ' IOVRLW=',iovrlw,' in RLWINIT !!' - stop -!mz -! elseif ( iovrlw>=2 .and. isubclw==0 ) then - elseif ( (iovrlw.eq.2 .or. iovrlw.eq.3).and. isubclw==0 ) then - if (me == 0) then - print *,' *** IOVRLW=',iovrlw,' is not available for', & - & ' ISUBCLW=0 setting!!' - print *,' The program uses maximum/random overlap', & - & ' instead.' - endif - - iovrlw = 1 - endif - - if (me == 0) then - print *,' - Using AER Longwave Radiation, Version: ', VTAGLW - - if (ilwrgas > 0) then - print *,' --- Include rare gases N2O, CH4, O2, CFCs ', & - & 'absorptions in LW' - else - print *,' --- Rare gases effect is NOT included in LW' - endif - - if ( isubclw == 0 ) then - print *,' --- Using standard grid average clouds, no ', & - & 'sub-column clouds approximation applied' - elseif ( isubclw == 1 ) then - print *,' --- Using MCICA sub-colum clouds approximation ', & - & 'with a prescribed sequence of permutaion seeds' - elseif ( isubclw == 2 ) then - print *,' --- Using MCICA sub-colum clouds approximation ', & - & 'with provided input array of permutation seeds' - else - print *,' *** Error in specification of sub-column cloud ', & - & ' control flag isubclw =',isubclw,' !!' - stop - endif - endif - -!> -# Check cloud flags for consistency. - - if ((icldflg == 0 .and. ilwcliq /= 0) .or. & - & (icldflg == 1 .and. ilwcliq == 0)) then - print *,' *** Model cloud scheme inconsistent with LW', & - & ' radiation cloud radiative property setup !!' - stop - endif - -!> -# Setup default surface emissivity for each band. - - semiss0(:) = f_one - -!> -# Setup constant factors for flux and heating rate -!! the 1.0e-2 is to convert pressure from mb to \f$N/m^2\f$. - - pival = 2.0 * asin(f_one) - fluxfac = pival * 2.0d4 -! fluxfac = 62831.85307179586 ! = 2 * pi * 1.0e4 - - if (ilwrate == 1) then -! heatfac = 8.4391 -! heatfac = con_g * 86400. * 1.0e-2 / con_cp ! (in k/day) - heatfac = con_g * 864.0 / con_cp ! (in k/day) - else - heatfac = con_g * 1.0e-2 / con_cp ! (in k/second) - endif - -!> -# Compute lookup tables for transmittance, tau transition -!! function, and clear sky tau (for the cloudy sky radiative -!! transfer). tau is computed as a function of the tau -!! transition function, transmittance is calculated as a -!! function of tau, and the tau transition function is -!! calculated using the linear in tau formulation at values of -!! tau above 0.01. tf is approximated as tau/6 for tau < 0.01. -!! all tables are computed at intervals of 0.001. the inverse -!! of the constant used in the pade approximation to the tau -!! transition function is set to b. - - tau_tbl(0) = f_zero - exp_tbl(0) = f_one - tfn_tbl(0) = f_zero - - tau_tbl(ntbl) = 1.e10 - exp_tbl(ntbl) = expeps - tfn_tbl(ntbl) = f_one - - explimit = aint( -log(tiny(exp_tbl(0))) ) - - do i = 1, ntbl-1 -!org tfn = float(i) / float(ntbl) -!org tau_tbl(i) = bpade * tfn / (f_one - tfn) - tfn = real(i, kind_phys) / real(ntbl-i, kind_phys) - tau_tbl(i) = bpade * tfn - if (tau_tbl(i) >= explimit) then - exp_tbl(i) = expeps - else - exp_tbl(i) = exp( -tau_tbl(i) ) - endif - - if (tau_tbl(i) < 0.06) then - tfn_tbl(i) = tau_tbl(i) / 6.0 - else - tfn_tbl(i) = f_one - 2.0*( (f_one / tau_tbl(i)) & - & - ( exp_tbl(i) / (f_one - exp_tbl(i)) ) ) - endif - enddo - -!................................... - end subroutine rlwinit -!! @} -!----------------------------------- - - -!>\ingroup module_radlw_main -!> \brief This subroutine computes the cloud optical depth(s) for each cloudy -!! layer and g-point interval. -!!\param cfrac layer cloud fraction -!!\n --- for ilwcliq > 0 (prognostic cloud scheme) - - - -!!\param cliqp layer in-cloud liq water path (\f$g/m^2\f$) -!!\param reliq mean eff radius for liq cloud (micron) -!!\param cicep layer in-cloud ice water path (\f$g/m^2\f$) -!!\param reice mean eff radius for ice cloud (micron) -!!\param cdat1 layer rain drop water path (\f$g/m^2\f$) -!!\param cdat2 effective radius for rain drop (micron) -!!\param cdat3 layer snow flake water path(\f$g/m^2\f$) -!!\param cdat4 mean effective radius for snow flake(micron) -!!\n --- for ilwcliq = 0 (diagnostic cloud scheme) - - - -!!\param cliqp not used -!!\param cicep not used -!!\param reliq not used -!!\param reice not used -!!\param cdat1 layer cloud optical depth -!!\param cdat2 layer cloud single scattering albedo -!!\param cdat3 layer cloud asymmetry factor -!!\param cdat4 optional use -!!\param nlay number of layer number -!!\param nlp1 number of veritcal levels -!!\param ipseed permutation seed for generating random numbers (isubclw>0) -!!\param dz layer thickness (km) -!!\param de_lgth layer cloud decorrelation length (km) -!!\param cldfmc cloud fraction for each sub-column -!!\param taucld cloud optical depth for bands (non-mcica) -!!\section gen_cldprop cldprop General Algorithm -!> @{ - subroutine cldprop & - & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & nlay, nlp1, ipseed, dz, de_lgth, & - & cldfmc, taucld & ! --- outputs - & ) - -! =================== program usage description =================== ! -! ! -! purpose: compute the cloud optical depth(s) for each cloudy layer ! -! and g-point interval. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: -size- ! -! cfrac - real, layer cloud fraction 0:nlp1 ! -! ..... for ilwcliq > 0 (prognostic cloud sckeme) - - - ! -! cliqp - real, layer in-cloud liq water path (g/m**2) nlay ! -! reliq - real, mean eff radius for liq cloud (micron) nlay ! -! cicep - real, layer in-cloud ice water path (g/m**2) nlay ! -! reice - real, mean eff radius for ice cloud (micron) nlay ! -! cdat1 - real, layer rain drop water path (g/m**2) nlay ! -! cdat2 - real, effective radius for rain drop (microm) nlay ! -! cdat3 - real, layer snow flake water path (g/m**2) nlay ! -! cdat4 - real, effective radius for snow flakes (micron) nlay ! -! ..... for ilwcliq = 0 (diagnostic cloud sckeme) - - - ! -! cdat1 - real, input cloud optical depth nlay ! -! cdat2 - real, layer cloud single scattering albedo nlay ! -! cdat3 - real, layer cloud asymmetry factor nlay ! -! cdat4 - real, optional use nlay ! -! cliqp - not used nlay ! -! reliq - not used nlay ! -! cicep - not used nlay ! -! reice - not used nlay ! -! ! -! dz - real, layer thickness (km) nlay ! -! de_lgth- real, layer cloud decorrelation length (km) 1 ! -! nlay - integer, number of vertical layers 1 ! -! nlp1 - integer, number of vertical levels 1 ! -! ipseed- permutation seed for generating random numbers (isubclw>0) ! -! ! -! outputs: ! -! cldfmc - real, cloud fraction for each sub-column ngptlw*nlay! -! taucld - real, cld opt depth for bands (non-mcica) nbands*nlay! -! ! -! explanation of the method for each value of ilwcliq, and ilwcice. ! -! set up in module "module_radlw_cntr_para" ! -! ! -! ilwcliq=0 : input cloud optical property (tau, ssa, asy). ! -! (used for diagnostic cloud method) ! -! ilwcliq>0 : input cloud liq/ice path and effective radius, also ! -! require the user of 'ilwcice' to specify the method ! -! used to compute aborption due to water/ice parts. ! -! ................................................................... ! -! ! -! ilwcliq=1: the water droplet effective radius (microns) is input! -! and the opt depths due to water clouds are computed ! -! as in hu and stamnes, j., clim., 6, 728-742, (1993). ! -! the values for absorption coefficients appropriate for -! the spectral bands in rrtm have been obtained for a ! -! range of effective radii by an averaging procedure ! -! based on the work of j. pinto (private communication). -! linear interpolation is used to get the absorption ! -! coefficients for the input effective radius. ! -! ! -! ilwcice=1: the cloud ice path (g/m2) and ice effective radius ! -! (microns) are input and the optical depths due to ice! -! clouds are computed as in ebert and curry, jgr, 97, ! -! 3831-3836 (1992). the spectral regions in this work ! -! have been matched with the spectral bands in rrtm to ! -! as great an extent as possible: ! -! e&c 1 ib = 5 rrtm bands 9-16 ! -! e&c 2 ib = 4 rrtm bands 6-8 ! -! e&c 3 ib = 3 rrtm bands 3-5 ! -! e&c 4 ib = 2 rrtm band 2 ! -! e&c 5 ib = 1 rrtm band 1 ! -! ilwcice=2: the cloud ice path (g/m2) and ice effective radius ! -! (microns) are input and the optical depths due to ice! -! clouds are computed as in rt code, streamer v3.0 ! -! (ref: key j., streamer user's guide, cooperative ! -! institute for meteorological satellite studies, 2001,! -! 96 pp.) valid range of values for re are between 5.0 ! -! and 131.0 micron. ! -! ilwcice=3: the ice generalized effective size (dge) is input and! -! the optical properties, are calculated as in q. fu, ! -! j. climate, (1998). q. fu provided high resolution ! -! tales which were appropriately averaged for the bands! -! in rrtm_lw. linear interpolation is used to get the ! -! coeff from the stored tables. valid range of values ! -! for deg are between 5.0 and 140.0 micron. ! -! ! -! other cloud control module variables: ! -! isubclw =0: standard cloud scheme, no sub-col cloud approximation ! -! >0: mcica sub-col cloud scheme using ipseed as permutation! -! seed for generating rundom numbers ! -! ! -! ====================== end of description block ================= ! -! - use module_radlw_cldprlw - -! --- inputs: - integer, intent(in) :: nlay, nlp1, ipseed - - real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cfrac - real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & - & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, dz - real (kind=kind_phys), intent(in) :: de_lgth - -! --- outputs: - real (kind=kind_phys), dimension(ngptlw,nlay),intent(out):: cldfmc - real (kind=kind_phys), dimension(nbands,nlay),intent(out):: taucld - -! --- locals: - real (kind=kind_phys), dimension(nbands) :: tauliq, tauice - real (kind=kind_phys), dimension(nlay) :: cldf - - real (kind=kind_phys) :: dgeice, factor, fint, tauran, tausnw, & - & cldliq, refliq, cldice, refice - - logical :: lcloudy(ngptlw,nlay) - integer :: ia, ib, ig, k, index - -! -!===> ... begin here -! - do k = 1, nlay - do ib = 1, nbands - taucld(ib,k) = f_zero - enddo - enddo - - do k = 1, nlay - do ig = 1, ngptlw - cldfmc(ig,k) = f_zero - enddo - enddo - -!> -# Compute cloud radiative properties for a cloudy column: -!!\n - Compute cloud radiative properties for rain and snow (tauran,tausnw) -!!\n - Calculation of absorption coefficients due to water clouds(tauliq) -!!\n - Calculation of absorption coefficients due to ice clouds (tauice). -!!\n - For prognostic cloud scheme: sum up the cloud optical property: -!!\n \f$ taucld=tauice+tauliq+tauran+tausnw \f$ - -! --- ... compute cloud radiative properties for a cloudy column - - lab_if_ilwcliq : if (ilwcliq > 0) then - - lab_do_k : do k = 1, nlay - lab_if_cld : if (cfrac(k) > cldmin) then - - tauran = absrain * cdat1(k) ! ncar formula -!! tausnw = abssnow1 * cdat3(k) ! ncar formula -! --- if use fu's formula it needs to be normalized by snow density -! !not use snow density = 0.1 g/cm**3 = 0.1 g/(mu * m**2) -! use ice density = 0.9167 g/cm**3 = 0.9167 g/(mu * m**2) -! factor 1.5396=8/(3*sqrt(3)) converts reff to generalized ice particle size -! use newer factor value 1.0315 -! 1/(0.9167*1.0315) = 1.05756 - if (cdat3(k)>f_zero .and. cdat4(k)>10.0_kind_phys) then - tausnw = abssnow0*1.05756*cdat3(k)/cdat4(k) ! fu's formula - else - tausnw = f_zero - endif - - cldliq = cliqp(k) - cldice = cicep(k) -! refliq = max(2.5e0, min(60.0e0, reliq(k) )) -! refice = max(5.0e0, reice(k) ) - refliq = reliq(k) - refice = reice(k) - -! --- ... calculation of absorption coefficients due to water clouds. - - if ( cldliq <= f_zero ) then - do ib = 1, nbands - tauliq(ib) = f_zero - enddo - else - if ( ilwcliq == 1 ) then - - factor = refliq - 1.5 - index = max( 1, min( 57, int( factor ) )) - fint = factor - float(index) - - do ib = 1, nbands - tauliq(ib) = max(f_zero, cldliq*(absliq1(index,ib) & - & + fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) - enddo - endif ! end if_ilwcliq_block - endif ! end if_cldliq_block - -! --- ... calculation of absorption coefficients due to ice clouds. - - if ( cldice <= f_zero ) then - do ib = 1, nbands - tauice(ib) = f_zero - enddo - else - -! --- ... ebert and curry approach for all particle sizes though somewhat -! unjustified for large ice particles - - if ( ilwcice == 1 ) then - refice = min(130.0, max(13.0, real(refice) )) - - do ib = 1, nbands - ia = ipat(ib) ! eb_&_c band index for ice cloud coeff - tauice(ib) = max(f_zero, cldice*(absice1(1,ia) & - & + absice1(2,ia)/refice) ) - enddo - -! --- ... streamer approach for ice effective radius between 5.0 and 131.0 microns -! and ebert and curry approach for ice eff radius greater than 131.0 microns. -! no smoothing between the transition of the two methods. - - elseif ( ilwcice == 2 ) then - - factor = (refice - 2.0) / 3.0 - index = max( 1, min( 42, int( factor ) )) - fint = factor - float(index) - - do ib = 1, nbands - tauice(ib) = max(f_zero, cldice*(absice2(index,ib) & - & + fint*(absice2(index+1,ib) - absice2(index,ib)) )) - enddo - -! --- ... fu's approach for ice effective radius between 4.8 and 135 microns -! (generalized effective size from 5 to 140 microns) - - elseif ( ilwcice == 3 ) then - -! dgeice = max(5.0, 1.5396*refice) ! v4.4 value - dgeice = max(5.0, 1.0315*refice) ! v4.71 value - factor = (dgeice - 2.0) / 3.0 - index = max( 1, min( 45, int( factor ) )) - fint = factor - float(index) - - do ib = 1, nbands - tauice(ib) = max(f_zero, cldice*(absice3(index,ib) & - & + fint*(absice3(index+1,ib) - absice3(index,ib)) )) - enddo - - endif ! end if_ilwcice_block - endif ! end if_cldice_block - - do ib = 1, nbands - taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw - enddo - - endif lab_if_cld - enddo lab_do_k - - else lab_if_ilwcliq - - do k = 1, nlay - if (cfrac(k) > cldmin) then - do ib = 1, nbands - taucld(ib,k) = cdat1(k) - enddo - endif - enddo - - endif lab_if_ilwcliq - -!> -# if physparam::isubclw > 0, call mcica_subcol() to distribute -!! cloud properties to each g-point. - - if ( isubclw > 0 ) then ! mcica sub-col clouds approx - do k = 1, nlay - if ( cfrac(k) < cldmin ) then - cldf(k) = f_zero - else - cldf(k) = cfrac(k) - endif - enddo - -! --- ... call sub-column cloud generator - - call mcica_subcol & -! --- inputs: - & ( cldf, nlay, ipseed, dz, de_lgth, & -! --- output: - & lcloudy & - & ) - - do k = 1, nlay - do ig = 1, ngptlw - if ( lcloudy(ig,k) ) then - cldfmc(ig,k) = f_one - else - cldfmc(ig,k) = f_zero - endif - enddo - enddo - - endif ! end if_isubclw_block - - return -! .................................. - end subroutine cldprop -! ---------------------------------- -!> @} - -!>\ingroup module_radlw_main -!>\brief This suroutine computes sub-colum cloud profile flag array. -!!\param cldf layer cloud fraction -!!\param nlay number of model vertical layers -!!\param ipseed permute seed for random num generator -!!\param dz layer thickness -!!\param de_lgth layer cloud decorrelation length (km) -!!\param lcloudy sub-colum cloud profile flag array -!!\section mcica_subcol_gen mcica_subcol General Algorithm -!! @{ - subroutine mcica_subcol & - & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- inputs - & lcloudy & ! --- outputs - & ) - -! ==================== defination of variables ==================== ! -! ! -! input variables: size ! -! cldf - real, layer cloud fraction nlay ! -! nlay - integer, number of model vertical layers 1 ! -! ipseed - integer, permute seed for random num generator 1 ! -! ** note : if the cloud generator is called multiple times, need ! -! to permute the seed between each call; if between calls ! -! for lw and sw, use values differ by the number of g-pts. ! -! dz - real, layer thickness (km) nlay ! -! de_lgth - real, layer cloud decorrelation length (km) 1 ! -! ! -! output variables: ! -! lcloudy - logical, sub-colum cloud profile flag array ngptlw*nlay! -! ! -! other control flags from module variables: ! -! iovrlw : control flag for cloud overlapping method ! -! =0:random; =1:maximum/random: =2:maximum; =3:decorr ! -! ! -! ===================== end of definitions ==================== ! - - implicit none - -! --- inputs: - integer, intent(in) :: nlay, ipseed - - real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz - real (kind=kind_phys), intent(in) :: de_lgth - -! --- outputs: - logical, dimension(ngptlw,nlay), intent(out) :: lcloudy - -! --- locals: - real (kind=kind_phys) :: cdfunc(ngptlw,nlay), rand1d(ngptlw), & - & rand2d(nlay*ngptlw), tem1, fac_lcf(nlay), & - & cdfun2(ngptlw,nlay) - - type (random_stat) :: stat ! for thread safe random generator - - integer :: k, n, k1 -! -!===> ... begin here -! -!> -# Call random_setseed() to advance randum number generator by ipseed values. - - call random_setseed & -! --- inputs: - & ( ipseed, & -! --- outputs: - & stat & - & ) - -!> -# Sub-column set up according to overlapping assumption: -!! - For random overlap, pick a random value at every level -!! - For max-random overlap, pick a random value at every level -!! - For maximum overlap, pick same random numebr at every level - - select case ( iovrlw ) - - case( 0 ) ! random overlap, pick a random value at every level - - call random_number & -! --- inputs: ( none ) -! --- outputs: - & ( rand2d, stat ) - - k1 = 0 - do n = 1, ngptlw - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - - case( 1 ) ! max-ran overlap - - call random_number & -! --- inputs: ( none ) -! --- outputs: - & ( rand2d, stat ) - - k1 = 0 - do n = 1, ngptlw - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - -! --- first pick a random number for bottom (or top) layer. -! then walk up the column: (aer's code) -! if layer below is cloudy, use the same rand num in the layer below -! if layer below is clear, use a new random number - -! --- from bottom up - do k = 2, nlay - k1 = k - 1 - tem1 = f_one - cldf(k1) - - do n = 1, ngptlw - if ( cdfunc(n,k1) > tem1 ) then - cdfunc(n,k) = cdfunc(n,k1) - else - cdfunc(n,k) = cdfunc(n,k) * tem1 - endif - enddo - enddo - -! --- or walk down the column: (if use original author's method) -! if layer above is cloudy, use the same rand num in the layer above -! if layer above is clear, use a new random number - -! --- from top down -! do k = nlay-1, 1, -1 -! k1 = k + 1 -! tem1 = f_one - cldf(k1) - -! do n = 1, ngptlw -! if ( cdfunc(n,k1) > tem1 ) then -! cdfunc(n,k) = cdfunc(n,k1) -! else -! cdfunc(n,k) = cdfunc(n,k) * tem1 -! endif -! enddo -! enddo - - case( 2 ) !< - For maximum overlap, pick same random numebr at every level - - call random_number & -! --- inputs: ( none ) -! --- outputs: - & ( rand1d, stat ) - - do n = 1, ngptlw - tem1 = rand1d(n) - - do k = 1, nlay - cdfunc(n,k) = tem1 - enddo - enddo - - case( 3 ) ! decorrelation length overlap - -! --- compute overlapping factors based on layer midpoint distances -! and decorrelation depths - - do k = nlay, 2, -1 - fac_lcf(k) = exp( -0.5 * (dz(k)+dz(k-1)) / de_lgth ) - enddo - -! --- setup 2 sets of random numbers - - call random_number ( rand2d, stat ) - - k1 = 0 - do k = 1, nlay - do n = 1, ngptlw - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - - call random_number ( rand2d, stat ) - - k1 = 0 - do k = 1, nlay - do n = 1, ngptlw - k1 = k1 + 1 - cdfun2(n,k) = rand2d(k1) - enddo - enddo - -! --- then working from the top down: -! if a random number (from an independent set -cdfun2) is smaller then the -! scale factor: use the upper layer's number, otherwise use a new random -! number (keep the original assigned one). - - do k = nlay-1, 1, -1 - k1 = k + 1 - - do n = 1, ngptlw - if ( cdfun2(n,k) <= fac_lcf(k1) ) then - cdfunc(n,k) = cdfunc(n,k1) - endif - enddo - enddo - - end select - -!> -# Generate subcolumns for homogeneous clouds. - - do k = 1, nlay - tem1 = f_one - cldf(k) - - do n = 1, ngptlw - lcloudy(n,k) = cdfunc(n,k) >= tem1 - enddo - enddo - - return -! .................................. - end subroutine mcica_subcol -!! @} -! ---------------------------------- - -!>\ingroup module_radlw_main -!> This subroutine computes various coefficients needed in radiative -!! transfer calculations. -!!\param pavel layer pressure (mb) -!!\param tavel layer temperature (K) -!!\param tz level(interface) temperatures (K) -!!\param stemp surface ground temperature (K) -!!\param h2ovmr layer w.v. volumn mixing ratio (kg/kg) -!!\param colamt column amounts of absorbing gases. -!! 2nd indices range: 1-maxgas, for watervapor,carbon dioxide, ozone, -!! nitrous oxide, methane,oxigen, carbon monoxide,etc. \f$(mol/cm^2)\f$ -!!\param coldry dry air column amount -!!\param colbrd column amount of broadening gases -!!\param nlay total number of vertical layers -!!\param nlp1 total number of vertical levels -!!\param laytrop tropopause layer index (unitless) -!!\param pklay integrated planck func at lay temp -!!\param pklev integrated planck func at lev temp -!!\param jp indices of lower reference pressure -!!\param jt, jt1 indices of lower reference temperatures -!!\param rfrate ref ratios of binary species param -!!\n (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o, -!! 4-h2o/ch4,5-n2o/co2,6-o3/co2 -!!\n (:,:,n)n=1,2: the rates of ref press at -!! the 2 sides of the layer -!!\param fac00,fac01,fac10,fac11 factors multiply the reference ks, i,j=0/1 for -!! lower/higher of the 2 appropriate temperatures -!! and altitudes. -!!\param selffac scale factor for w. v. self-continuum equals -!! (w. v. density)/(atmospheric density at 296k and 1013 mb) -!!\param selffrac factor for temperature interpolation of -!! reference w. v. self-continuum data -!!\param indself index of lower ref temp for selffac -!!\param forfac scale factor for w. v. foreign-continuum -!!\param forfrac factor for temperature interpolation of -!! reference w.v. foreign-continuum data -!!\param indfor index of lower ref temp for forfac -!!\param minorfrac factor for minor gases -!!\param scaleminor,scaleminorn2 scale factors for minor gases -!!\param indminor index of lower ref temp for minor gases -!>\section setcoef_gen setcoef General Algorithm -!> @{ - subroutine setcoef & - & ( pavel,tavel,tz,stemp,h2ovmr,colamt,coldry,colbrd, & ! --- inputs: - & nlay, nlp1, & - & laytrop,pklay,pklev,jp,jt,jt1, & ! --- outputs: - & rfrate,fac00,fac01,fac10,fac11, & - & selffac,selffrac,indself,forfac,forfrac,indfor, & - & minorfrac,scaleminor,scaleminorn2,indminor & - & ) - -! =================== program usage description =================== ! -! ! -! purpose: compute various coefficients needed in radiative transfer ! -! calculations. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: -size- ! -! pavel - real, layer pressures (mb) nlay ! -! tavel - real, layer temperatures (k) nlay ! -! tz - real, level (interface) temperatures (k) 0:nlay ! -! stemp - real, surface ground temperature (k) 1 ! -! h2ovmr - real, layer w.v. volum mixing ratio (kg/kg) nlay ! -! colamt - real, column amounts of absorbing gases nlay*maxgas! -! 2nd indices range: 1-maxgas, for watervapor, ! -! carbon dioxide, ozone, nitrous oxide, methane, ! -! oxigen, carbon monoxide,etc. (molecules/cm**2) ! -! coldry - real, dry air column amount nlay ! -! colbrd - real, column amount of broadening gases nlay ! -! nlay/nlp1 - integer, total number of vertical layers, levels 1 ! -! ! -! outputs: ! -! laytrop - integer, tropopause layer index (unitless) 1 ! -! pklay - real, integrated planck func at lay temp nbands*0:nlay! -! pklev - real, integrated planck func at lev temp nbands*0:nlay! -! jp - real, indices of lower reference pressure nlay ! -! jt, jt1 - real, indices of lower reference temperatures nlay ! -! rfrate - real, ref ratios of binary species param nlay*nrates*2! -! (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4,5-n2o/co2,6-o3/co2! -! (:,:,n)n=1,2: the rates of ref press at the 2 sides of the layer ! -! facij - real, factors multiply the reference ks, nlay ! -! i,j=0/1 for lower/higher of the 2 appropriate ! -! temperatures and altitudes. ! -! selffac - real, scale factor for w. v. self-continuum nlay ! -! equals (w. v. density)/(atmospheric density ! -! at 296k and 1013 mb) ! -! selffrac - real, factor for temperature interpolation of nlay ! -! reference w. v. self-continuum data ! -! indself - integer, index of lower ref temp for selffac nlay ! -! forfac - real, scale factor for w. v. foreign-continuum nlay ! -! forfrac - real, factor for temperature interpolation of nlay ! -! reference w.v. foreign-continuum data ! -! indfor - integer, index of lower ref temp for forfac nlay ! -! minorfrac - real, factor for minor gases nlay ! -! scaleminor,scaleminorn2 ! -! - real, scale factors for minor gases nlay ! -! indminor - integer, index of lower ref temp for minor gases nlay ! -! ! -! ====================== end of definitions =================== ! - -! --- inputs: - integer, intent(in) :: nlay, nlp1 - - real (kind=kind_phys), dimension(nlay,maxgas),intent(in):: colamt - real (kind=kind_phys), dimension(0:nlay), intent(in):: tz - - real (kind=kind_phys), dimension(nlay), intent(in) :: pavel, & - & tavel, h2ovmr, coldry, colbrd - - real (kind=kind_phys), intent(in) :: stemp - -! --- outputs: - integer, dimension(nlay), intent(out) :: jp, jt, jt1, indself, & - & indfor, indminor - - integer, intent(out) :: laytrop - - real (kind=kind_phys), dimension(nlay,nrates,2), intent(out) :: & - & rfrate - real (kind=kind_phys), dimension(nbands,0:nlay), intent(out) :: & - & pklev, pklay - - real (kind=kind_phys), dimension(nlay), intent(out) :: & - & fac00, fac01, fac10, fac11, selffac, selffrac, forfac, & - & forfrac, minorfrac, scaleminor, scaleminorn2 - -! --- locals: - real (kind=kind_phys) :: tlvlfr, tlyrfr, plog, fp, ft, ft1, & - & tem1, tem2 - - integer :: i, k, jp1, indlev, indlay -! -!===> ... begin here -! -!> -# Calculate information needed by the radiative transfer routine -!! that is specific to this atmosphere, especially some of the -!! coefficients and indices needed to compute the optical depths -!! by interpolating data from stored reference atmospheres. - - indlay = min(180, max(1, int(stemp-159.0) )) - indlev = min(180, max(1, int(tz(0)-159.0) )) - tlyrfr = stemp - int(stemp) - tlvlfr = tz(0) - int(tz(0)) - do i = 1, nbands - tem1 = totplnk(indlay+1,i) - totplnk(indlay,i) - tem2 = totplnk(indlev+1,i) - totplnk(indlev,i) - pklay(i,0) = delwave(i) * (totplnk(indlay,i) + tlyrfr*tem1) - pklev(i,0) = delwave(i) * (totplnk(indlev,i) + tlvlfr*tem2) - enddo - -! --- ... begin layer loop -!> -# Calculate the integrated Planck functions for each band at the -!! surface, level, and layer temperatures. - - laytrop = 0 - - do k = 1, nlay - - indlay = min(180, max(1, int(tavel(k)-159.0) )) - tlyrfr = tavel(k) - int(tavel(k)) - - indlev = min(180, max(1, int(tz(k)-159.0) )) - tlvlfr = tz(k) - int(tz(k)) - -! --- ... begin spectral band loop - - do i = 1, nbands - pklay(i,k) = delwave(i) * (totplnk(indlay,i) + tlyrfr & - & * (totplnk(indlay+1,i) - totplnk(indlay,i)) ) - pklev(i,k) = delwave(i) * (totplnk(indlev,i) + tlvlfr & - & * (totplnk(indlev+1,i) - totplnk(indlev,i)) ) - enddo - -!> -# Find the two reference pressures on either side of the -!! layer pressure. store them in jp and jp1. store in fp the -!! fraction of the difference (in ln(pressure)) between these -!! two values that the layer pressure lies. - - plog = log(pavel(k)) - jp(k)= max(1, min(58, int(36.0 - 5.0*(plog+0.04)) )) - jp1 = jp(k) + 1 -! --- ... limit pressure extrapolation at the top - fp = max(f_zero, min(f_one, 5.0*(preflog(jp(k))-plog) )) -!org fp = 5.0 * (preflog(jp(k)) - plog) - -!> -# Determine, for each reference pressure (jp and jp1), which -!! reference temperature (these are different for each -!! reference pressure) is nearest the layer temperature but does -!! not exceed it. store these indices in jt and jt1, resp. -!! store in ft (resp. ft1) the fraction of the way between jt -!! (jt1) and the next highest reference temperature that the -!! layer temperature falls. - - tem1 = (tavel(k)-tref(jp(k))) / 15.0 - tem2 = (tavel(k)-tref(jp1 )) / 15.0 - jt (k) = max(1, min(4, int(3.0 + tem1) )) - jt1(k) = max(1, min(4, int(3.0 + tem2) )) -! --- ... restrict extrapolation ranges by limiting abs(det t) < 37.5 deg - ft = max(-0.5, min(1.5, tem1 - float(jt (k) - 3) )) - ft1 = max(-0.5, min(1.5, tem2 - float(jt1(k) - 3) )) -!org ft = tem1 - float(jt (k) - 3) -!org ft1 = tem2 - float(jt1(k) - 3) - -!> -# We have now isolated the layer ln pressure and temperature, -!! between two reference pressures and two reference temperatures -!!(for each reference pressure). we multiply the pressure -!! fraction fp with the appropriate temperature fractions to get -!! the factors that will be needed for the interpolation that yields -!! the optical depths (performed in routines taugbn for band n). - - tem1 = f_one - fp - fac10(k) = tem1 * ft - fac00(k) = tem1 * (f_one - ft) - fac11(k) = fp * ft1 - fac01(k) = fp * (f_one - ft1) - - forfac(k) = pavel(k)*stpfac / (tavel(k)*(1.0 + h2ovmr(k))) - selffac(k) = h2ovmr(k) * forfac(k) - -!> -# Set up factors needed to separately include the minor gases -!! in the calculation of absorption coefficient. - - scaleminor(k) = pavel(k) / tavel(k) - scaleminorn2(k) = (pavel(k) / tavel(k)) & - & * (colbrd(k)/(coldry(k) + colamt(k,1))) - tem1 = (tavel(k) - 180.8) / 7.2 - indminor(k) = min(18, max(1, int(tem1))) - minorfrac(k) = tem1 - float(indminor(k)) - -!> -# If the pressure is less than ~100mb, perform a different -!! set of species interpolations. - - if (plog > 4.56) then - - laytrop = laytrop + 1 - - tem1 = (332.0 - tavel(k)) / 36.0 - indfor(k) = min(2, max(1, int(tem1))) - forfrac(k) = tem1 - float(indfor(k)) - -!> -# Set up factors needed to separately include the water vapor -!! self-continuum in the calculation of absorption coefficient. - - tem1 = (tavel(k) - 188.0) / 7.2 - indself(k) = min(9, max(1, int(tem1)-7)) - selffrac(k) = tem1 - float(indself(k) + 7) - -!> -# Setup reference ratio to be used in calculation of binary -!! species parameter in lower atmosphere. - - rfrate(k,1,1) = chi_mls(1,jp(k)) / chi_mls(2,jp(k)) - rfrate(k,1,2) = chi_mls(1,jp(k)+1) / chi_mls(2,jp(k)+1) - - rfrate(k,2,1) = chi_mls(1,jp(k)) / chi_mls(3,jp(k)) - rfrate(k,2,2) = chi_mls(1,jp(k)+1) / chi_mls(3,jp(k)+1) - - rfrate(k,3,1) = chi_mls(1,jp(k)) / chi_mls(4,jp(k)) - rfrate(k,3,2) = chi_mls(1,jp(k)+1) / chi_mls(4,jp(k)+1) - - rfrate(k,4,1) = chi_mls(1,jp(k)) / chi_mls(6,jp(k)) - rfrate(k,4,2) = chi_mls(1,jp(k)+1) / chi_mls(6,jp(k)+1) - - rfrate(k,5,1) = chi_mls(4,jp(k)) / chi_mls(2,jp(k)) - rfrate(k,5,2) = chi_mls(4,jp(k)+1) / chi_mls(2,jp(k)+1) - - else - - tem1 = (tavel(k) - 188.0) / 36.0 - indfor(k) = 3 - forfrac(k) = tem1 - f_one - - indself(k) = 0 - selffrac(k) = f_zero - -!> -# Setup reference ratio to be used in calculation of binary -!! species parameter in upper atmosphere. - - rfrate(k,1,1) = chi_mls(1,jp(k)) / chi_mls(2,jp(k)) - rfrate(k,1,2) = chi_mls(1,jp(k)+1) / chi_mls(2,jp(k)+1) - - rfrate(k,6,1) = chi_mls(3,jp(k)) / chi_mls(2,jp(k)) - rfrate(k,6,2) = chi_mls(3,jp(k)+1) / chi_mls(2,jp(k)+1) - - endif - -!> -# Rescale \a selffac and \a forfac for use in taumol. - - selffac(k) = colamt(k,1) * selffac(k) - forfac(k) = colamt(k,1) * forfac(k) - - enddo ! end do_k layer loop - - return -! .................................. - end subroutine setcoef -!> @} -! ---------------------------------- - -!>\ingroup module_radlw_main -!> This subroutine computes the upward/downward radiative fluxes, and -!! heating rates for both clear or cloudy atmosphere. Clouds assumed as -!! randomly overlaping in a vertical column. -!!\brief Original Code Description: this program calculates the upward -!! fluxes, downward fluxes, and heating rates for an arbitrary clear or -!! cloudy atmosphere. The input to this program is the atmospheric -!! profile, all Planck function information, and the cloud fraction by -!! layer. A variable diffusivity angle (secdif) is used for the angle -!! integration. Bands 2-3 and 5-9 use a value for secdif that varies -!! from 1.50 to 1.80 as a function of the column water vapor, and other -!! bands use a value of 1.66. The gaussian weight appropriate to this -!! angle (wtdiff =0.5) is applied here. Note that use of the emissivity -!! angle for the flux integration can cause errors of 1 to 4 \f$W/m^2\f$ -!! within cloudy layers. Clouds are treated with a random cloud overlap -!! method. -!!\param semiss lw surface emissivity -!!\param delp layer pressure thickness (mb) -!!\param cldfrc layer cloud fraction -!!\param taucld layer cloud opt depth -!!\param tautot total optical depth (gas+aerosols) -!!\param pklay integrated planck function at lay temp -!!\param pklev integrated planck func at lev temp -!!\param fracs planck fractions -!!\param secdif secant of diffusivity angle -!!\param nlay number of vertical layers -!!\param nlp1 number of vertical levels (interfaces) -!!\param totuflux total sky upward flux \f$(w/m^2)\f$ -!!\param totdflux total sky downward flux \f$(w/m^2)\f$ -!!\param htr total sky heating rate (k/sec or k/day) -!!\param totuclfl clear sky upward flux \f$(w/m^2)\f$ -!!\param totdclfl clear sky downward flux \f$(w/m^2)\f$ -!!\param htrcl clear sky heating rate (k/sec or k/day) -!!\param htrb spectral band lw heating rate (k/day) -!>\section gen_rtrn rtrn General Algorithm -!! @{ -! ---------------------------------- - subroutine rtrn & - & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, & ! --- inputs - & fracs,secdif, nlay,nlp1, & - & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs - & ) - -! =================== program usage description =================== ! -! ! -! purpose: compute the upward/downward radiative fluxes, and heating ! -! rates for both clear or cloudy atmosphere. clouds are assumed as ! -! randomly overlaping in a vertical colum. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: -size- ! -! semiss - real, lw surface emissivity nbands! -! delp - real, layer pressure thickness (mb) nlay ! -! cldfrc - real, layer cloud fraction 0:nlp1 ! -! taucld - real, layer cloud opt depth nbands,nlay! -! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay! -! pklay - real, integrated planck func at lay temp nbands*0:nlay! -! pklev - real, integrated planck func at lev temp nbands*0:nlay! -! fracs - real, planck fractions ngptlw,nlay! -! secdif - real, secant of diffusivity angle nbands! -! nlay - integer, number of vertical layers 1 ! -! nlp1 - integer, number of vertical levels (interfaces) 1 ! -! ! -! outputs: ! -! totuflux- real, total sky upward flux (w/m2) 0:nlay ! -! totdflux- real, total sky downward flux (w/m2) 0:nlay ! -! htr - real, total sky heating rate (k/sec or k/day) nlay ! -! totuclfl- real, clear sky upward flux (w/m2) 0:nlay ! -! totdclfl- real, clear sky downward flux (w/m2) 0:nlay ! -! htrcl - real, clear sky heating rate (k/sec or k/day) nlay ! -! htrb - real, spectral band lw heating rate (k/day) nlay*nbands! -! ! -! module veriables: ! -! ngb - integer, band index for each g-value ngptlw! -! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 ! -! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 ! -! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 ! -! bpade - real, pade approx constant (1/0.278) 1 ! -! wtdiff - real, weight for radiance to flux conversion 1 ! -! ntbl - integer, dimension of look-up tables 1 ! -! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl ! -! exp_tbl - real, transmittance lookup table 0:ntbl ! -! tfn_tbl - real, tau transition function 0:ntbl ! -! ! -! local variables: ! -! itgas - integer, index for gases contribution look-up table 1 ! -! ittot - integer, index for gases plus clouds look-up table 1 ! -! reflct - real, surface reflectance 1 ! -! atrgas - real, gaseous absorptivity 1 ! -! atrtot - real, gaseous and cloud absorptivity 1 ! -! odcld - real, cloud optical depth 1 ! -! efclrfr- real, effective clear sky fraction (1-efcldfr) nlay ! -! odepth - real, optical depth of gaseous only 1 ! -! odtot - real, optical depth of gas and cloud 1 ! -! gasfac - real, gas-only pade factor, used for planck fn 1 ! -! totfac - real, gas+cld pade factor, used for planck fn 1 ! -! bbdgas - real, gas-only planck function for downward rt 1 ! -! bbugas - real, gas-only planck function for upward rt 1 ! -! bbdtot - real, gas and cloud planck function for downward rt 1 ! -! bbutot - real, gas and cloud planck function for upward rt 1 ! -! gassrcu- real, upwd source radiance due to gas only nlay! -! totsrcu- real, upwd source radiance due to gas+cld nlay! -! gassrcd- real, dnwd source radiance due to gas only 1 ! -! totsrcd- real, dnwd source radiance due to gas+cld 1 ! -! radtotu- real, spectrally summed total sky upwd radiance 1 ! -! radclru- real, spectrally summed clear sky upwd radiance 1 ! -! radtotd- real, spectrally summed total sky dnwd radiance 1 ! -! radclrd- real, spectrally summed clear sky dnwd radiance 1 ! -! toturad- real, total sky upward radiance by layer 0:nlay*nbands! -! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands! -! totdrad- real, total sky downward radiance by layer 0:nlay*nbands! -! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands! -! fnet - real, net longwave flux (w/m2) 0:nlay ! -! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay ! -! ! -! ! -! ******************************************************************* ! -! original code description ! -! ! -! original version: e. j. mlawer, et al. rrtm_v3.0 ! -! revision for gcms: michael j. iacono; october, 2002 ! -! revision for f90: michael j. iacono; june, 2006 ! -! ! -! this program calculates the upward fluxes, downward fluxes, and ! -! heating rates for an arbitrary clear or cloudy atmosphere. the input ! -! to this program is the atmospheric profile, all Planck function ! -! information, and the cloud fraction by layer. a variable diffusivity! -! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 ! -! use a value for secdif that varies from 1.50 to 1.80 as a function ! -! of the column water vapor, and other bands use a value of 1.66. the ! -! gaussian weight appropriate to this angle (wtdiff=0.5) is applied ! -! here. note that use of the emissivity angle for the flux integration! -! can cause errors of 1 to 4 W/m2 within cloudy layers. ! -! clouds are treated with a random cloud overlap method. ! -! ! -! ******************************************************************* ! -! ====================== end of description block ================= ! - -! --- inputs: - integer, intent(in) :: nlay, nlp1 - - real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cldfrc - real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, & - & secdif - real (kind=kind_phys), dimension(nlay), intent(in) :: delp - - real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld - real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, & - & tautot - - real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: & - & pklev, pklay - -! --- outputs: - real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl - - real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb - - real (kind=kind_phys), dimension(0:nlay), intent(out) :: & - & totuflux, totdflux, totuclfl, totdclfl - -! --- locals: - real (kind=kind_phys), parameter :: rec_6 = 0.166667 - - real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, & - & clrdrad, toturad, totdrad - - real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, & - & trngas, efclrfr, rfdelp - real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc - - real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, & - & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, & - & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, & - & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, & - & clfr, trng, gasu - - integer :: ittot, itgas, ib, ig, k -! -!===> ... begin here -! - do ib = 1, NBANDS - do k = 0, NLAY - toturad(k,ib) = f_zero - totdrad(k,ib) = f_zero - clrurad(k,ib) = f_zero - clrdrad(k,ib) = f_zero - enddo - enddo - - do k = 0, nlay - totuflux(k) = f_zero - totdflux(k) = f_zero - totuclfl(k) = f_zero - totdclfl(k) = f_zero - enddo - -! --- ... loop over all g-points - - do ig = 1, ngptlw - ib = ngb(ig) - - radtotd = f_zero - radclrd = f_zero - -!> -# Downward radiative transfer loop. - - do k = nlay, 1, -1 - -!!\n - clear sky, gases contribution - - odepth = max( f_zero, secdif(ib)*tautot(ig,k) ) - if (odepth <= 0.06) then - atrgas = odepth - 0.5*odepth*odepth - trng = f_one - atrgas - gasfac = rec_6 * odepth - else - tblind = odepth / (bpade + odepth) - itgas = tblint*tblind + 0.5 - trng = exp_tbl(itgas) - atrgas = f_one - trng - gasfac = tfn_tbl(itgas) - odepth = tau_tbl(itgas) - endif - - plfrac = fracs(ig,k) - blay = pklay(ib,k) - - dplnku = pklev(ib,k ) - blay - dplnkd = pklev(ib,k-1) - blay - bbdgas = plfrac * (blay + dplnkd*gasfac) - bbugas = plfrac * (blay + dplnku*gasfac) - gassrcd= bbdgas * atrgas - gassrcu(k)= bbugas * atrgas - trngas(k) = trng - -!!\n - total sky, gases+clouds contribution - - clfr = cldfrc(k) - if (clfr >= eps) then -!!\n - cloudy layer - - odcld = secdif(ib) * taucld(ib,k) - efclrfr(k) = f_one-(f_one - exp(-odcld))*clfr - odtot = odepth + odcld - if (odtot < 0.06) then - totfac = rec_6 * odtot - atrtot = odtot - 0.5*odtot*odtot - else - tblind = odtot / (bpade + odtot) - ittot = tblint*tblind + 0.5 - totfac = tfn_tbl(ittot) - atrtot = f_one - exp_tbl(ittot) - endif - - bbdtot = plfrac * (blay + dplnkd*totfac) - bbutot = plfrac * (blay + dplnku*totfac) - totsrcd= bbdtot * atrtot - totsrcu(k)= bbutot * atrtot - -! --- ... total sky radiance - radtotd = radtotd*trng*efclrfr(k) + gassrcd & - & + clfr*(totsrcd - gassrcd) - totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd - -! --- ... clear sky radiance - radclrd = radclrd*trng + gassrcd - clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd - - else -! --- ... clear layer - -! --- ... total sky radiance - radtotd = radtotd*trng + gassrcd - totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd - -! --- ... clear sky radiance - radclrd = radclrd*trng + gassrcd - clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd - - endif ! end if_clfr_block - - enddo ! end do_k_loop - -!> -# Compute spectral emissivity & reflectance, include the -!! contribution of spectrally varying longwave emissivity and -!! reflection from the surface to the upward radiative transfer. - -! note: spectral and Lambertian reflection are identical for the -! diffusivity angle flux integration used here. - - reflct = f_one - semiss(ib) - rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0) - -!> -# Compute total sky radiance. - radtotu = rad0 + reflct*radtotd - toturad(0,ib) = toturad(0,ib) + radtotu - -!> -# Compute clear sky radiance - radclru = rad0 + reflct*radclrd - clrurad(0,ib) = clrurad(0,ib) + radclru - -!> -# Upward radiative transfer loop. - - do k = 1, nlay - clfr = cldfrc(k) - trng = trngas(k) - gasu = gassrcu(k) - - if (clfr >= eps) then -! --- ... cloudy layer - -! --- ... total sky radiance - radtotu = radtotu*trng*efclrfr(k) + gasu & - & + clfr*(totsrcu(k) - gasu) - toturad(k,ib) = toturad(k,ib) + radtotu - -! --- ... clear sky radiance - radclru = radclru*trng + gasu - clrurad(k,ib) = clrurad(k,ib) + radclru - - else -! --- ... clear layer - -! --- ... total sky radiance - radtotu = radtotu*trng + gasu - toturad(k,ib) = toturad(k,ib) + radtotu - -! --- ... clear sky radiance - radclru = radclru*trng + gasu - clrurad(k,ib) = clrurad(k,ib) + radclru - - endif ! end if_clfr_block - - enddo ! end do_k_loop - - enddo ! end do_ig_loop - -!> -# Process longwave output from band for total and clear streams. -!! Calculate upward, downward, and net flux. - - flxfac = wtdiff * fluxfac - - do k = 0, nlay - do ib = 1, nbands - totuflux(k) = totuflux(k) + toturad(k,ib) - totdflux(k) = totdflux(k) + totdrad(k,ib) - totuclfl(k) = totuclfl(k) + clrurad(k,ib) - totdclfl(k) = totdclfl(k) + clrdrad(k,ib) - enddo - - totuflux(k) = totuflux(k) * flxfac - totdflux(k) = totdflux(k) * flxfac - totuclfl(k) = totuclfl(k) * flxfac - totdclfl(k) = totdclfl(k) * flxfac - enddo - -! --- ... calculate net fluxes and heating rates - fnet(0) = totuflux(0) - totdflux(0) - - do k = 1, nlay - rfdelp(k) = heatfac / delp(k) - fnet(k) = totuflux(k) - totdflux(k) - htr (k) = (fnet(k-1) - fnet(k)) * rfdelp(k) - enddo - -!! --- ... optional clear sky heating rates - if ( lhlw0 ) then - fnetc(0) = totuclfl(0) - totdclfl(0) - - do k = 1, nlay - fnetc(k) = totuclfl(k) - totdclfl(k) - htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k) - enddo - endif - -!! --- ... optional spectral band heating rates - if ( lhlwb ) then - do ib = 1, nbands - fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac - - do k = 1, nlay - fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac - htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k) - enddo - enddo - endif - -! .................................. - end subroutine rtrn -!! @} -! ---------------------------------- - - -!>\ingroup module_radlw_main -!> This subroutine computes the upward/downward radiative fluxes, and -!! heating rates for both clear or cloudy atmosphere. Clouds are -!! assumed as in maximum-randomly overlaping in a vertical column. -!!\param semiss lw surface emissivity -!!\param delp layer pressure thickness (mb) -!!\param cldfrc layer cloud fraction -!!\param taucld layer cloud opt depth -!!\param tautot total optical depth (gas+aerosols) -!!\param pklay integrated planck func at lay temp -!!\param pklev integrated planck func at lev temp -!!\param fracs planck fractions -!!\param secdif secant of diffusivity angle -!!\param nlay number of vertical layers -!!\param nlp1 number of vertical levels (interfaces) -!!\param totuflux total sky upward flux (\f$w/m^2\f$) -!!\param totdflux total sky downward flux (\f$w/m^2\f$) -!!\param htr total sky heating rate (k/sec or k/day) -!!\param totuclfl clear sky upward flux (\f$w/m^2\f$) -!!\param totdclfl clear sky downward flux (\f$w/m^2\f$) -!!\param htrcl clear sky heating rate (k/sec or k/day) -!!\param htrb spectral band lw heating rate (k/day) -!!\section gen_rtrnmr rtrnmr General Algorithm -!> @{ -! ---------------------------------- - subroutine rtrnmr & - & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, &! --- inputs - & fracs,secdif, nlay,nlp1, & - & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs: - & ) - -! =================== program usage description =================== ! -! ! -! purpose: compute the upward/downward radiative fluxes, and heating ! -! rates for both clear or cloudy atmosphere. clouds are assumed as in ! -! maximum-randomly overlaping in a vertical colum. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: -size- ! -! semiss - real, lw surface emissivity nbands! -! delp - real, layer pressure thickness (mb) nlay ! -! cldfrc - real, layer cloud fraction 0:nlp1 ! -! taucld - real, layer cloud opt depth nbands,nlay! -! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay! -! pklay - real, integrated planck func at lay temp nbands*0:nlay! -! pklev - real, integrated planck func at lev temp nbands*0:nlay! -! fracs - real, planck fractions ngptlw,nlay! -! secdif - real, secant of diffusivity angle nbands! -! nlay - integer, number of vertical layers 1 ! -! nlp1 - integer, number of vertical levels (interfaces) 1 ! -! ! -! outputs: ! -! totuflux- real, total sky upward flux (w/m2) 0:nlay ! -! totdflux- real, total sky downward flux (w/m2) 0:nlay ! -! htr - real, total sky heating rate (k/sec or k/day) nlay ! -! totuclfl- real, clear sky upward flux (w/m2) 0:nlay ! -! totdclfl- real, clear sky downward flux (w/m2) 0:nlay ! -! htrcl - real, clear sky heating rate (k/sec or k/day) nlay ! -! htrb - real, spectral band lw heating rate (k/day) nlay*nbands! -! ! -! module veriables: ! -! ngb - integer, band index for each g-value ngptlw! -! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 ! -! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 ! -! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 ! -! bpade - real, pade approx constant (1/0.278) 1 ! -! wtdiff - real, weight for radiance to flux conversion 1 ! -! ntbl - integer, dimension of look-up tables 1 ! -! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl ! -! exp_tbl - real, transmittance lookup table 0:ntbl ! -! tfn_tbl - real, tau transition function 0:ntbl ! -! ! -! local variables: ! -! itgas - integer, index for gases contribution look-up table 1 ! -! ittot - integer, index for gases plus clouds look-up table 1 ! -! reflct - real, surface reflectance 1 ! -! atrgas - real, gaseous absorptivity 1 ! -! atrtot - real, gaseous and cloud absorptivity 1 ! -! odcld - real, cloud optical depth 1 ! -! odepth - real, optical depth of gaseous only 1 ! -! odtot - real, optical depth of gas and cloud 1 ! -! gasfac - real, gas-only pade factor, used for planck fn 1 ! -! totfac - real, gas+cld pade factor, used for planck fn 1 ! -! bbdgas - real, gas-only planck function for downward rt 1 ! -! bbugas - real, gas-only planck function for upward rt 1 ! -! bbdtot - real, gas and cloud planck function for downward rt 1 ! -! bbutot - real, gas and cloud planck function for upward rt 1 ! -! gassrcu- real, upwd source radiance due to gas only nlay! -! totsrcu- real, upwd source radiance due to gas + cld nlay! -! gassrcd- real, dnwd source radiance due to gas only 1 ! -! totsrcd- real, dnwd source radiance due to gas + cld 1 ! -! radtotu- real, spectrally summed total sky upwd radiance 1 ! -! radclru- real, spectrally summed clear sky upwd radiance 1 ! -! radtotd- real, spectrally summed total sky dnwd radiance 1 ! -! radclrd- real, spectrally summed clear sky dnwd radiance 1 ! -! toturad- real, total sky upward radiance by layer 0:nlay*nbands! -! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands! -! totdrad- real, total sky downward radiance by layer 0:nlay*nbands! -! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands! -! fnet - real, net longwave flux (w/m2) 0:nlay ! -! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay ! -! ! -! ! -! ******************************************************************* ! -! original code description ! -! ! -! original version: e. j. mlawer, et al. rrtm_v3.0 ! -! revision for gcms: michael j. iacono; october, 2002 ! -! revision for f90: michael j. iacono; june, 2006 ! -! ! -! this program calculates the upward fluxes, downward fluxes, and ! -! heating rates for an arbitrary clear or cloudy atmosphere. the input ! -! to this program is the atmospheric profile, all Planck function ! -! information, and the cloud fraction by layer. a variable diffusivity! -! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 ! -! use a value for secdif that varies from 1.50 to 1.80 as a function ! -! of the column water vapor, and other bands use a value of 1.66. the ! -! gaussian weight appropriate to this angle (wtdiff=0.5) is applied ! -! here. note that use of the emissivity angle for the flux integration! -! can cause errors of 1 to 4 W/m2 within cloudy layers. ! -! clouds are treated with a maximum-random cloud overlap method. ! -! ! -! ******************************************************************* ! -! ====================== end of description block ================= ! - -! --- inputs: - integer, intent(in) :: nlay, nlp1 - - real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cldfrc - real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, & - & secdif - real (kind=kind_phys), dimension(nlay), intent(in) :: delp - - real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld - real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, & - & tautot - - real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: & - & pklev, pklay - -! --- outputs: - real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl - - real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb - - real (kind=kind_phys), dimension(0:nlay), intent(out) :: & - & totuflux, totdflux, totuclfl, totdclfl - -! --- locals: - real (kind=kind_phys), parameter :: rec_6 = 0.166667 - - real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, & - & clrdrad, toturad, totdrad - - real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, & - & trngas, trntot, rfdelp - real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc - - real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, & - & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, & - & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, & - & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, rad, & - & totradd, clrradd, totradu, clrradu, fmax, fmin, rat1, rat2,& - & radmod, clfr, trng, trnt, gasu, totu - - integer :: ittot, itgas, ib, ig, k - -! dimensions for cloud overlap adjustment - real (kind=kind_phys), dimension(nlp1) :: faccld1u, faccld2u, & - & facclr1u, facclr2u, faccmb1u, faccmb2u - real (kind=kind_phys), dimension(0:nlay) :: faccld1d, faccld2d, & - & facclr1d, facclr2d, faccmb1d, faccmb2d - - logical :: lstcldu(nlay), lstcldd(nlay) -! -!===> ... begin here -! - do k = 1, nlp1 - faccld1u(k) = f_zero - faccld2u(k) = f_zero - facclr1u(k) = f_zero - facclr2u(k) = f_zero - faccmb1u(k) = f_zero - faccmb2u(k) = f_zero - enddo - - lstcldu(1) = cldfrc(1) > eps - rat1 = f_zero - rat2 = f_zero - - do k = 1, nlay-1 - - lstcldu(k+1) = cldfrc(k+1)>eps .and. cldfrc(k)<=eps - - if (cldfrc(k) > eps) then - -!> -# Setup maximum/random cloud overlap. - - if (cldfrc(k+1) >= cldfrc(k)) then - if (lstcldu(k)) then - if (cldfrc(k) < f_one) then - facclr2u(k+1) = (cldfrc(k+1) - cldfrc(k)) & - & / (f_one - cldfrc(k)) - endif - facclr2u(k) = f_zero - faccld2u(k) = f_zero - else - fmax = max(cldfrc(k), cldfrc(k-1)) - if (cldfrc(k+1) > fmax) then - facclr1u(k+1) = rat2 - facclr2u(k+1) = (cldfrc(k+1) - fmax)/(f_one - fmax) - elseif (cldfrc(k+1) < fmax) then - facclr1u(k+1) = (cldfrc(k+1) - cldfrc(k)) & - & / (cldfrc(k-1) - cldfrc(k)) - else - facclr1u(k+1) = rat2 - endif - endif - - if (facclr1u(k+1)>f_zero .or. facclr2u(k+1)>f_zero) then - rat1 = f_one - rat2 = f_zero - else - rat1 = f_zero - rat2 = f_zero - endif - else - if (lstcldu(k)) then - faccld2u(k+1) = (cldfrc(k) - cldfrc(k+1)) / cldfrc(k) - facclr2u(k) = f_zero - faccld2u(k) = f_zero - else - fmin = min(cldfrc(k), cldfrc(k-1)) - if (cldfrc(k+1) <= fmin) then - faccld1u(k+1) = rat1 - faccld2u(k+1) = (fmin - cldfrc(k+1)) / fmin - else - faccld1u(k+1) = (cldfrc(k) - cldfrc(k+1)) & - & / (cldfrc(k) - fmin) - endif - endif - - if (faccld1u(k+1)>f_zero .or. faccld2u(k+1)>f_zero) then - rat1 = f_zero - rat2 = f_one - else - rat1 = f_zero - rat2 = f_zero - endif - endif - - faccmb1u(k+1) = facclr1u(k+1) * faccld2u(k) * cldfrc(k-1) - faccmb2u(k+1) = faccld1u(k+1) * facclr2u(k) & - & * (f_one - cldfrc(k-1)) - endif - - enddo - - do k = 0, nlay - faccld1d(k) = f_zero - faccld2d(k) = f_zero - facclr1d(k) = f_zero - facclr2d(k) = f_zero - faccmb1d(k) = f_zero - faccmb2d(k) = f_zero - enddo - - lstcldd(nlay) = cldfrc(nlay) > eps - rat1 = f_zero - rat2 = f_zero - - do k = nlay, 2, -1 - - lstcldd(k-1) = cldfrc(k-1) > eps .and. cldfrc(k)<=eps - - if (cldfrc(k) > eps) then - - if (cldfrc(k-1) >= cldfrc(k)) then - if (lstcldd(k)) then - if (cldfrc(k) < f_one) then - facclr2d(k-1) = (cldfrc(k-1) - cldfrc(k)) & - & / (f_one - cldfrc(k)) - endif - - facclr2d(k) = f_zero - faccld2d(k) = f_zero - else - fmax = max(cldfrc(k), cldfrc(k+1)) - - if (cldfrc(k-1) > fmax) then - facclr1d(k-1) = rat2 - facclr2d(k-1) = (cldfrc(k-1) - fmax) / (f_one - fmax) - elseif (cldfrc(k-1) < fmax) then - facclr1d(k-1) = (cldfrc(k-1) - cldfrc(k)) & - & / (cldfrc(k+1) - cldfrc(k)) - else - facclr1d(k-1) = rat2 - endif - endif - - if (facclr1d(k-1)>f_zero .or. facclr2d(k-1)>f_zero) then - rat1 = f_one - rat2 = f_zero - else - rat1 = f_zero - rat2 = f_zero - endif - else - if (lstcldd(k)) then - faccld2d(k-1) = (cldfrc(k) - cldfrc(k-1)) / cldfrc(k) - facclr2d(k) = f_zero - faccld2d(k) = f_zero - else - fmin = min(cldfrc(k), cldfrc(k+1)) - - if (cldfrc(k-1) <= fmin) then - faccld1d(k-1) = rat1 - faccld2d(k-1) = (fmin - cldfrc(k-1)) / fmin - else - faccld1d(k-1) = (cldfrc(k) - cldfrc(k-1)) & - & / (cldfrc(k) - fmin) - endif - endif - - if (faccld1d(k-1)>f_zero .or. faccld2d(k-1)>f_zero) then - rat1 = f_zero - rat2 = f_one - else - rat1 = f_zero - rat2 = f_zero - endif - endif - - faccmb1d(k-1) = facclr1d(k-1) * faccld2d(k) * cldfrc(k+1) - faccmb2d(k-1) = faccld1d(k-1) * facclr2d(k) & - & * (f_one - cldfrc(k+1)) - endif - - enddo - -!> -# Initialize for radiative transfer - - do ib = 1, NBANDS - do k = 0, NLAY - toturad(k,ib) = f_zero - totdrad(k,ib) = f_zero - clrurad(k,ib) = f_zero - clrdrad(k,ib) = f_zero - enddo - enddo - - do k = 0, nlay - totuflux(k) = f_zero - totdflux(k) = f_zero - totuclfl(k) = f_zero - totdclfl(k) = f_zero - enddo - -! --- ... loop over all g-points - - do ig = 1, ngptlw - ib = ngb(ig) - - radtotd = f_zero - radclrd = f_zero - -!> -# Downward radiative transfer loop: - - do k = nlay, 1, -1 - -! --- ... clear sky, gases contribution - - odepth = max( f_zero, secdif(ib)*tautot(ig,k) ) - if (odepth <= 0.06) then - atrgas = odepth - 0.5*odepth*odepth - trng = f_one - atrgas - gasfac = rec_6 * odepth - else - tblind = odepth / (bpade + odepth) - itgas = tblint*tblind + 0.5 - trng = exp_tbl(itgas) - atrgas = f_one - trng - gasfac = tfn_tbl(itgas) - odepth = tau_tbl(itgas) - endif - - plfrac = fracs(ig,k) - blay = pklay(ib,k) - - dplnku = pklev(ib,k ) - blay - dplnkd = pklev(ib,k-1) - blay - bbdgas = plfrac * (blay + dplnkd*gasfac) - bbugas = plfrac * (blay + dplnku*gasfac) - gassrcd = bbdgas * atrgas - gassrcu(k)= bbugas * atrgas - trngas(k) = trng - -! --- ... total sky, gases+clouds contribution - - clfr = cldfrc(k) - if (lstcldd(k)) then - totradd = clfr * radtotd - clrradd = radtotd - totradd - rad = f_zero - endif - - if (clfr >= eps) then -!> - cloudy layer - - odcld = secdif(ib) * taucld(ib,k) - odtot = odepth + odcld - if (odtot < 0.06) then - totfac = rec_6 * odtot - atrtot = odtot - 0.5*odtot*odtot - trnt = f_one - atrtot - else - tblind = odtot / (bpade + odtot) - ittot = tblint*tblind + 0.5 - totfac = tfn_tbl(ittot) - trnt = exp_tbl(ittot) - atrtot = f_one - trnt - endif - - bbdtot = plfrac * (blay + dplnkd*totfac) - bbutot = plfrac * (blay + dplnku*totfac) - totsrcd = bbdtot * atrtot - totsrcu(k)= bbutot * atrtot - trntot(k) = trnt - - totradd = totradd*trnt + clfr*totsrcd - clrradd = clrradd*trng + (f_one - clfr)*gassrcd - -!> - total sky radiance - radtotd = totradd + clrradd - totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd - -!> - clear sky radiance - radclrd = radclrd*trng + gassrcd - clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd - - radmod = rad*(facclr1d(k-1)*trng + faccld1d(k-1)*trnt) & - & - faccmb1d(k-1)*gassrcd + faccmb2d(k-1)*totsrcd - - rad = -radmod + facclr2d(k-1)*(clrradd + radmod) & - & - faccld2d(k-1)*(totradd - radmod) - totradd = totradd + rad - clrradd = clrradd - rad - - else -! --- ... clear layer - -! --- ... total sky radiance - radtotd = radtotd*trng + gassrcd - totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd - -! --- ... clear sky radiance - radclrd = radclrd*trng + gassrcd - clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd - - endif ! end if_clfr_block - - enddo ! end do_k_loop - -!> -# Compute spectral emissivity & reflectance, include the -!! contribution of spectrally varying longwave emissivity and -!! reflection from the surface to the upward radiative transfer. - -! note: spectral and Lambertian reflection are identical for the -! diffusivity angle flux integration used here. - - reflct = f_one - semiss(ib) - rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0) - -!> -# Compute total sky radiance. - radtotu = rad0 + reflct*radtotd - toturad(0,ib) = toturad(0,ib) + radtotu - -!> -# Compute clear sky radiance. - radclru = rad0 + reflct*radclrd - clrurad(0,ib) = clrurad(0,ib) + radclru - -!> -# Upward radiative transfer loop: - - do k = 1, nlay - - clfr = cldfrc(k) - trng = trngas(k) - gasu = gassrcu(k) - - if (lstcldu(k)) then - totradu = clfr * radtotu - clrradu = radtotu - totradu - rad = f_zero - endif - - if (clfr >= eps) then -!> - cloudy layer radiance - - trnt = trntot(k) - totu = totsrcu(k) - totradu = totradu*trnt + clfr*totu - clrradu = clrradu*trng + (f_one - clfr)*gasu - -!> - total sky radiance - radtotu = totradu + clrradu - toturad(k,ib) = toturad(k,ib) + radtotu - -!> - clear sky radiance - radclru = radclru*trng + gasu - clrurad(k,ib) = clrurad(k,ib) + radclru - - radmod = rad*(facclr1u(k+1)*trng + faccld1u(k+1)*trnt) & - & - faccmb1u(k+1)*gasu + faccmb2u(k+1)*totu - rad = -radmod + facclr2u(k+1)*(clrradu + radmod) & - & - faccld2u(k+1)*(totradu - radmod) - totradu = totradu + rad - clrradu = clrradu - rad - - else -! --- ... clear layer - -! --- ... total sky radiance - radtotu = radtotu*trng + gasu - toturad(k,ib) = toturad(k,ib) + radtotu - -! --- ... clear sky radiance - radclru = radclru*trng + gasu - clrurad(k,ib) = clrurad(k,ib) + radclru - - endif ! end if_clfr_block - - enddo ! end do_k_loop - - enddo ! end do_ig_loop - -!> -# Process longwave output from band for total and clear streams. -!! calculate upward, downward, and net flux. - - flxfac = wtdiff * fluxfac - - do k = 0, nlay - do ib = 1, nbands - totuflux(k) = totuflux(k) + toturad(k,ib) - totdflux(k) = totdflux(k) + totdrad(k,ib) - totuclfl(k) = totuclfl(k) + clrurad(k,ib) - totdclfl(k) = totdclfl(k) + clrdrad(k,ib) - enddo - - totuflux(k) = totuflux(k) * flxfac - totdflux(k) = totdflux(k) * flxfac - totuclfl(k) = totuclfl(k) * flxfac - totdclfl(k) = totdclfl(k) * flxfac - enddo - -! --- ... calculate net fluxes and heating rates - fnet(0) = totuflux(0) - totdflux(0) - - do k = 1, nlay - rfdelp(k) = heatfac / delp(k) - fnet(k) = totuflux(k) - totdflux(k) - htr (k) = (fnet(k-1) - fnet(k)) * rfdelp(k) - enddo - -!! --- ... optional clear sky heating rates - if ( lhlw0 ) then - fnetc(0) = totuclfl(0) - totdclfl(0) - - do k = 1, nlay - fnetc(k) = totuclfl(k) - totdclfl(k) - htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k) - enddo - endif - -!! --- ... optional spectral band heating rates - if ( lhlwb ) then - do ib = 1, nbands - fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac - - do k = 1, nlay - fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac - htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k) - enddo - enddo - endif - -! ................................. - end subroutine rtrnmr -! --------------------------------- -!> @} - -!>\ingroup module_radlw_main -!> \brief This subroutine computes the upward/downward radiative fluxes, and -!! heating rates for both clear or cloudy atmosphere.Clouds are treated -!! with the mcica stochastic approach. -!! -!!\param semiss lw surface emissivity -!!\param delp layer pressure thickness (mb) -!!\param cldfmc layer cloud fraction (sub-column) -!!\param taucld layer cloud opt depth -!!\param tautot total optical depth (gas+aerosols) -!!\param pklay integrated planck func at lay temp -!!\param pklev integrated planck func at lev temp -!!\param fracs planck fractions -!!\param secdif secant of diffusivity angle -!!\param nlay number of vertical layers -!!\param nlp1 number of vertical levels (interfaces) -!!\param totuflux total sky upward flux \f$(w/m^2)\f$ -!!\param totdflux total sky downward flux \f$(w/m^2)\f$ -!!\param htr total sky heating rate (k/sec or k/day) -!!\param totuclfl clear sky upward flux \f$(w/m^2)\f$ -!!\param totdclfl clear sky downward flux \f$(w/m^2)\f$ -!!\param htrcl clear sky heating rate (k/sec or k/day) -!!\param htrb spectral band lw heating rate (k/day) -!!\section gen_rtrnmc rtrnmc General Algorithm -!> @{ -! --------------------------------- - subroutine rtrnmc & - & ( semiss,delp,cldfmc,taucld,tautot,pklay,pklev, & ! --- inputs: - & fracs,secdif, nlay,nlp1, & - & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs: - & ) - -! =================== program usage description =================== ! -! ! -! purpose: compute the upward/downward radiative fluxes, and heating ! -! rates for both clear or cloudy atmosphere. clouds are treated with ! -! the mcica stochastic approach. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: -size- ! -! semiss - real, lw surface emissivity nbands! -! delp - real, layer pressure thickness (mb) nlay ! -! cldfmc - real, layer cloud fraction (sub-column) ngptlw*nlay! -! taucld - real, layer cloud opt depth nbands*nlay! -! tautot - real, total optical depth (gas+aerosols) ngptlw*nlay! -! pklay - real, integrated planck func at lay temp nbands*0:nlay! -! pklev - real, integrated planck func at lev temp nbands*0:nlay! -! fracs - real, planck fractions ngptlw*nlay! -! secdif - real, secant of diffusivity angle nbands! -! nlay - integer, number of vertical layers 1 ! -! nlp1 - integer, number of vertical levels (interfaces) 1 ! -! ! -! outputs: ! -! totuflux- real, total sky upward flux (w/m2) 0:nlay ! -! totdflux- real, total sky downward flux (w/m2) 0:nlay ! -! htr - real, total sky heating rate (k/sec or k/day) nlay ! -! totuclfl- real, clear sky upward flux (w/m2) 0:nlay ! -! totdclfl- real, clear sky downward flux (w/m2) 0:nlay ! -! htrcl - real, clear sky heating rate (k/sec or k/day) nlay ! -! htrb - real, spectral band lw heating rate (k/day) nlay*nbands! -! ! -! module veriables: ! -! ngb - integer, band index for each g-value ngptlw! -! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 ! -! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 ! -! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 ! -! bpade - real, pade approx constant (1/0.278) 1 ! -! wtdiff - real, weight for radiance to flux conversion 1 ! -! ntbl - integer, dimension of look-up tables 1 ! -! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl ! -! exp_tbl - real, transmittance lookup table 0:ntbl ! -! tfn_tbl - real, tau transition function 0:ntbl ! -! ! -! local variables: ! -! itgas - integer, index for gases contribution look-up table 1 ! -! ittot - integer, index for gases plus clouds look-up table 1 ! -! reflct - real, surface reflectance 1 ! -! atrgas - real, gaseous absorptivity 1 ! -! atrtot - real, gaseous and cloud absorptivity 1 ! -! odcld - real, cloud optical depth 1 ! -! efclrfr- real, effective clear sky fraction (1-efcldfr) nlay! -! odepth - real, optical depth of gaseous only 1 ! -! odtot - real, optical depth of gas and cloud 1 ! -! gasfac - real, gas-only pade factor, used for planck function 1 ! -! totfac - real, gas and cloud pade factor, used for planck fn 1 ! -! bbdgas - real, gas-only planck function for downward rt 1 ! -! bbugas - real, gas-only planck function for upward rt 1 ! -! bbdtot - real, gas and cloud planck function for downward rt 1 ! -! bbutot - real, gas and cloud planck function for upward rt 1 ! -! gassrcu- real, upwd source radiance due to gas nlay! -! totsrcu- real, upwd source radiance due to gas+cld nlay! -! gassrcd- real, dnwd source radiance due to gas 1 ! -! totsrcd- real, dnwd source radiance due to gas+cld 1 ! -! radtotu- real, spectrally summed total sky upwd radiance 1 ! -! radclru- real, spectrally summed clear sky upwd radiance 1 ! -! radtotd- real, spectrally summed total sky dnwd radiance 1 ! -! radclrd- real, spectrally summed clear sky dnwd radiance 1 ! -! toturad- real, total sky upward radiance by layer 0:nlay*nbands! -! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands! -! totdrad- real, total sky downward radiance by layer 0:nlay*nbands! -! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands! -! fnet - real, net longwave flux (w/m2) 0:nlay ! -! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay ! -! ! -! ! -! ******************************************************************* ! -! original code description ! -! ! -! original version: e. j. mlawer, et al. rrtm_v3.0 ! -! revision for gcms: michael j. iacono; october, 2002 ! -! revision for f90: michael j. iacono; june, 2006 ! -! ! -! this program calculates the upward fluxes, downward fluxes, and ! -! heating rates for an arbitrary clear or cloudy atmosphere. the input ! -! to this program is the atmospheric profile, all Planck function ! -! information, and the cloud fraction by layer. a variable diffusivity! -! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 ! -! use a value for secdif that varies from 1.50 to 1.80 as a function ! -! of the column water vapor, and other bands use a value of 1.66. the ! -! gaussian weight appropriate to this angle (wtdiff=0.5) is applied ! -! here. note that use of the emissivity angle for the flux integration! -! can cause errors of 1 to 4 W/m2 within cloudy layers. ! -! clouds are treated with the mcica stochastic approach and ! -! maximum-random cloud overlap. ! -! ! -! ******************************************************************* ! -! ====================== end of description block ================= ! - -! --- inputs: - integer, intent(in) :: nlay, nlp1 - - real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, & - & secdif - real (kind=kind_phys), dimension(nlay), intent(in) :: delp - - real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld - real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, & - & tautot, cldfmc - - real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: & - & pklev, pklay - -! --- outputs: - real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl - - real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb - - real (kind=kind_phys), dimension(0:nlay), intent(out) :: & - & totuflux, totdflux, totuclfl, totdclfl - -! --- locals: - real (kind=kind_phys), parameter :: rec_6 = 0.166667 - - real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, & - & clrdrad, toturad, totdrad - - real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, & - & trngas, efclrfr, rfdelp - real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc - - real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, & - & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, & - & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, & - & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, & - & clfm, trng, gasu - - integer :: ittot, itgas, ib, ig, k -! -!===> ... begin here -! - do ib = 1, NBANDS - do k = 0, NLAY - toturad(k,ib) = f_zero - totdrad(k,ib) = f_zero - clrurad(k,ib) = f_zero - clrdrad(k,ib) = f_zero - enddo - enddo - - do k = 0, nlay - totuflux(k) = f_zero - totdflux(k) = f_zero - totuclfl(k) = f_zero - totdclfl(k) = f_zero - enddo - -! --- ... loop over all g-points - - do ig = 1, ngptlw - ib = ngb(ig) - - radtotd = f_zero - radclrd = f_zero - -!> -# Downward radiative transfer loop. -!!\n - Clear sky, gases contribution -!!\n - Total sky, gases+clouds contribution -!!\n - Cloudy layer -!!\n - Total sky radiance -!!\n - Clear sky radiance - - do k = nlay, 1, -1 - -! --- ... clear sky, gases contribution - - odepth = max( f_zero, secdif(ib)*tautot(ig,k) ) - if (odepth <= 0.06) then - atrgas = odepth - 0.5*odepth*odepth - trng = f_one - atrgas - gasfac = rec_6 * odepth - else - tblind = odepth / (bpade + odepth) - itgas = tblint*tblind + 0.5 - trng = exp_tbl(itgas) - atrgas = f_one - trng - gasfac = tfn_tbl(itgas) - odepth = tau_tbl(itgas) - endif - - plfrac = fracs(ig,k) - blay = pklay(ib,k) - - dplnku = pklev(ib,k ) - blay - dplnkd = pklev(ib,k-1) - blay - bbdgas = plfrac * (blay + dplnkd*gasfac) - bbugas = plfrac * (blay + dplnku*gasfac) - gassrcd= bbdgas * atrgas - gassrcu(k)= bbugas * atrgas - trngas(k) = trng - -! --- ... total sky, gases+clouds contribution - - clfm = cldfmc(ig,k) - if (clfm >= eps) then -! --- ... cloudy layer - - odcld = secdif(ib) * taucld(ib,k) - efclrfr(k) = f_one - (f_one - exp(-odcld))*clfm - odtot = odepth + odcld - if (odtot < 0.06) then - totfac = rec_6 * odtot - atrtot = odtot - 0.5*odtot*odtot - else - tblind = odtot / (bpade + odtot) - ittot = tblint*tblind + 0.5 - totfac = tfn_tbl(ittot) - atrtot = f_one - exp_tbl(ittot) - endif - - bbdtot = plfrac * (blay + dplnkd*totfac) - bbutot = plfrac * (blay + dplnku*totfac) - totsrcd= bbdtot * atrtot - totsrcu(k)= bbutot * atrtot - -! --- ... total sky radiance - radtotd = radtotd*trng*efclrfr(k) + gassrcd & - & + clfm*(totsrcd - gassrcd) - totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd - -! --- ... clear sky radiance - radclrd = radclrd*trng + gassrcd - clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd - - else -! --- ... clear layer - -! --- ... total sky radiance - radtotd = radtotd*trng + gassrcd - totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd - -! --- ... clear sky radiance - radclrd = radclrd*trng + gassrcd - clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd - - endif ! end if_clfm_block - - enddo ! end do_k_loop - -!> -# Compute spectral emissivity & reflectance, include the -!! contribution of spectrally varying longwave emissivity and -!! reflection from the surface to the upward radiative transfer. - -! note: spectral and Lambertian reflection are identical for the -! diffusivity angle flux integration used here. - - reflct = f_one - semiss(ib) - rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0) - -!> -# Compute total sky radiance. - radtotu = rad0 + reflct*radtotd - toturad(0,ib) = toturad(0,ib) + radtotu - -!> -# Compute clear sky radiance. - radclru = rad0 + reflct*radclrd - clrurad(0,ib) = clrurad(0,ib) + radclru - -!> -# Upward radiative transfer loop. -!!\n - Compute total sky radiance -!!\n - Compute clear sky radiance - -! toturad holds summed radiance for total sky stream -! clrurad holds summed radiance for clear sky stream - - do k = 1, nlay - clfm = cldfmc(ig,k) - trng = trngas(k) - gasu = gassrcu(k) - - if (clfm > eps) then -! --- ... cloudy layer - -! --- ... total sky radiance - radtotu = radtotu*trng*efclrfr(k) + gasu & - & + clfm*(totsrcu(k) - gasu) - toturad(k,ib) = toturad(k,ib) + radtotu - -! --- ... clear sky radiance - radclru = radclru*trng + gasu - clrurad(k,ib) = clrurad(k,ib) + radclru - - else -! --- ... clear layer - -! --- ... total sky radiance - radtotu = radtotu*trng + gasu - toturad(k,ib) = toturad(k,ib) + radtotu - -! --- ... clear sky radiance - radclru = radclru*trng + gasu - clrurad(k,ib) = clrurad(k,ib) + radclru - - endif ! end if_clfm_block - - enddo ! end do_k_loop - - enddo ! end do_ig_loop - -!> -# Process longwave output from band for total and clear streams. -!! Calculate upward, downward, and net flux. - - flxfac = wtdiff * fluxfac - - do k = 0, nlay - do ib = 1, nbands - totuflux(k) = totuflux(k) + toturad(k,ib) - totdflux(k) = totdflux(k) + totdrad(k,ib) - totuclfl(k) = totuclfl(k) + clrurad(k,ib) - totdclfl(k) = totdclfl(k) + clrdrad(k,ib) - enddo - - totuflux(k) = totuflux(k) * flxfac - totdflux(k) = totdflux(k) * flxfac - totuclfl(k) = totuclfl(k) * flxfac - totdclfl(k) = totdclfl(k) * flxfac - enddo - -!> -# Calculate net fluxes and heating rates. - fnet(0) = totuflux(0) - totdflux(0) - - do k = 1, nlay - rfdelp(k) = heatfac / delp(k) - fnet(k) = totuflux(k) - totdflux(k) - htr (k) = (fnet(k-1) - fnet(k)) * rfdelp(k) - enddo - -!> -# Optional clear sky heating rates. - if ( lhlw0 ) then - fnetc(0) = totuclfl(0) - totdclfl(0) - - do k = 1, nlay - fnetc(k) = totuclfl(k) - totdclfl(k) - htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k) - enddo - endif - -!> -# Optional spectral band heating rates. - if ( lhlwb ) then - do ib = 1, nbands - fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac - - do k = 1, nlay - fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac - htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k) - enddo - enddo - endif - -! .................................. - end subroutine rtrnmc -! ---------------------------------- -!> @} - -!>\ingroup module_radlw_main -!>\brief This subroutine contains optical depths developed for the rapid -!! radiative transfer model. -!! -!! It contains the subroutines \a taugbn (where n goes from -!! 1 to 16). \a taugbn calculates the optical depths and planck fractions -!! per g-value and layer for band n. -!!\param laytrop tropopause layer index (unitless) layer at -!! which switch is made for key species -!!\param pavel layer pressures (mb) -!!\param coldry column amount for dry air \f$(mol/cm^2)\f$ -!!\param colamt column amounts of h2o, co2, o3, n2o, ch4,o2, -!! co \f$(mol/cm^2)\f$ -!!\param colbrd column amount of broadening gases -!!\param wx cross-section amounts \f$(mol/cm^2)\f$ -!!\param tauaer aerosol optical depth -!!\param rfrate reference ratios of binary species parameter -!!\n (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4, -!! 5-n2o/co2,6-o3/co2 -!!\n (:,:,n)n=1,2: the rates of ref press at the 2 -!! sides of the layer -!!\param fac00,fac01,fac10,fac11 factors multiply the reference ks, i,j of 0/1 -!! for lower/higher of the 2 appropriate -!! temperatures and altitudes -!!\param jp index of lower reference pressure -!!\param jt, jt1 indices of lower reference temperatures for -!! pressure levels jp and jp+1, respectively -!!\param selffac scale factor for water vapor self-continuum -!! equals (water vapor density)/(atmospheric -!! density at 296k and 1013 mb) -!!\param selffrac factor for temperature interpolation of -!! reference water vapor self-continuum data -!!\param indself index of lower reference temperature for the -!! self-continuum interpolation -!!\param forfac scale factor for w. v. foreign-continuum -!!\param forfrac factor for temperature interpolation of -!! reference w.v. foreign-continuum data -!!\param indfor index of lower reference temperature for the -!! foreign-continuum interpolation -!!\param minorfrac factor for minor gases -!!\param scaleminor,scaleminorn2 scale factors for minor gases -!!\param indminor index of lower reference temperature for -!! minor gases -!!\param nlay total number of layers -!!\param fracs planck fractions -!!\param tautot total optical depth (gas+aerosols) -!>\section taumol_gen taumol General Algorithm -!! @{ -!! subprograms called: taugb## (## = 01 -16) - subroutine taumol & - & ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, & ! --- inputs - & rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, & - & selffac,selffrac,indself,forfac,forfrac,indfor, & - & minorfrac,scaleminor,scaleminorn2,indminor, & - & nlay, & - & fracs, tautot & ! --- outputs - & ) - -! ************ original subprogram description *************** ! -! ! -! optical depths developed for the ! -! ! -! rapid radiative transfer model (rrtm) ! -! ! -! atmospheric and environmental research, inc. ! -! 131 hartwell avenue ! -! lexington, ma 02421 ! -! ! -! eli j. mlawer ! -! jennifer delamere ! -! steven j. taubman ! -! shepard a. clough ! -! ! -! email: mlawer@aer.com ! -! email: jdelamer@aer.com ! -! ! -! the authors wish to acknowledge the contributions of the ! -! following people: karen cady-pereira, patrick d. brown, ! -! michael j. iacono, ronald e. farren, luke chen, ! -! robert bergstrom. ! -! ! -! revision for g-point reduction: michael j. iacono; aer, inc. ! -! ! -! taumol ! -! ! -! this file contains the subroutines taugbn (where n goes from ! -! 1 to 16). taugbn calculates the optical depths and planck ! -! fractions per g-value and layer for band n. ! -! ! -! ******************************************************************* ! -! ================== program usage description ================== ! -! ! -! call taumol ! -! inputs: ! -! ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, ! -! rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, ! -! selffac,selffrac,indself,forfac,forfrac,indfor, ! -! minorfrac,scaleminor,scaleminorn2,indminor, ! -! nlay, ! -! outputs: ! -! fracs, tautot ) ! -! ! -! subprograms called: taugb## (## = 01 -16) ! -! ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: size ! -! laytrop - integer, tropopause layer index (unitless) 1 ! -! layer at which switch is made for key species ! -! pavel - real, layer pressures (mb) nlay ! -! coldry - real, column amount for dry air (mol/cm2) nlay ! -! colamt - real, column amounts of h2o, co2, o3, n2o, ch4, ! -! o2, co (mol/cm**2) nlay*maxgas! -! colbrd - real, column amount of broadening gases nlay ! -! wx - real, cross-section amounts(mol/cm2) nlay*maxxsec! -! tauaer - real, aerosol optical depth nbands*nlay ! -! rfrate - real, reference ratios of binary species parameter ! -! (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4,5-n2o/co2,6-o3/co2! -! (:,:,n)n=1,2: the rates of ref press at the 2 sides of the layer ! -! nlay*nrates*2! -! facij - real, factors multiply the reference ks, i,j of 0/1 ! -! for lower/higher of the 2 appropriate temperatures ! -! and altitudes nlay ! -! jp - real, index of lower reference pressure nlay ! -! jt, jt1 - real, indices of lower reference temperatures nlay ! -! for pressure levels jp and jp+1, respectively ! -! selffac - real, scale factor for water vapor self-continuum ! -! equals (water vapor density)/(atmospheric density ! -! at 296k and 1013 mb) nlay ! -! selffrac - real, factor for temperature interpolation of ! -! reference water vapor self-continuum data nlay ! -! indself - integer, index of lower reference temperature for ! -! the self-continuum interpolation nlay ! -! forfac - real, scale factor for w. v. foreign-continuum nlay ! -! forfrac - real, factor for temperature interpolation of ! -! reference w.v. foreign-continuum data nlay ! -! indfor - integer, index of lower reference temperature for ! -! the foreign-continuum interpolation nlay ! -! minorfrac - real, factor for minor gases nlay ! -! scaleminor,scaleminorn2 ! -! - real, scale factors for minor gases nlay ! -! indminor - integer, index of lower reference temperature for ! -! minor gases nlay ! -! nlay - integer, total number of layers 1 ! -! ! -! outputs: ! -! fracs - real, planck fractions ngptlw,nlay! -! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay! -! ! -! internal variables: ! -! ng## - integer, number of g-values in band ## (##=01-16) 1 ! -! nspa - integer, for lower atmosphere, the number of ref ! -! atmos, each has different relative amounts of the ! -! key species for the band nbands! -! nspb - integer, same but for upper atmosphere nbands! -! absa - real, k-values for lower ref atmospheres (no w.v. ! -! self-continuum) (cm**2/molecule) nspa(##)*5*13*ng##! -! absb - real, k-values for high ref atmospheres (all sources) ! -! (cm**2/molecule) nspb(##)*5*13:59*ng##! -! ka_m'mgas'- real, k-values for low ref atmospheres minor species ! -! (cm**2/molecule) mmn##*ng##! -! kb_m'mgas'- real, k-values for high ref atmospheres minor species ! -! (cm**2/molecule) mmn##*ng##! -! selfref - real, k-values for w.v. self-continuum for ref atmos ! -! used below laytrop (cm**2/mol) 10*ng##! -! forref - real, k-values for w.v. foreign-continuum for ref atmos -! used below/above laytrop (cm**2/mol) 4*ng##! -! ! -! ****************************************************************** ! - -! --- inputs: - integer, intent(in) :: nlay, laytrop - - integer, dimension(nlay), intent(in) :: jp, jt, jt1, indself, & - & indfor, indminor - - real (kind=kind_phys), dimension(nlay), intent(in) :: pavel, & - & coldry, colbrd, fac00, fac01, fac10, fac11, selffac, & - & selffrac, forfac, forfrac, minorfrac, scaleminor, & - & scaleminorn2 - - real (kind=kind_phys), dimension(nlay,maxgas), intent(in):: colamt - real (kind=kind_phys), dimension(nlay,maxxsec),intent(in):: wx - - real (kind=kind_phys), dimension(nbands,nlay), intent(in):: tauaer - - real (kind=kind_phys), dimension(nlay,nrates,2), intent(in) :: & - & rfrate - -! --- outputs: - real (kind=kind_phys), dimension(ngptlw,nlay), intent(out) :: & - & fracs, tautot - -! --- locals - real (kind=kind_phys), dimension(ngptlw,nlay) :: taug - - integer :: ib, ig, k -! -!===> ... begin here -! - call taugb01 - call taugb02 - call taugb03 - call taugb04 - call taugb05 - call taugb06 - call taugb07 - call taugb08 - call taugb09 - call taugb10 - call taugb11 - call taugb12 - call taugb13 - call taugb14 - call taugb15 - call taugb16 - -! --- combine gaseous and aerosol optical depths - - do ig = 1, ngptlw - ib = ngb(ig) - - do k = 1, nlay - tautot(ig,k) = taug(ig,k) + tauaer(ib,k) - enddo - enddo - -! ================= - contains -! ================= - -!>\ingroup module_radlw_main -!> band 1: 10-350 cm-1 (low key - h2o; low minor - n2); -!! (high key - h2o; high minor - n2) -! ---------------------------------- - subroutine taugb01 -! .................................. - -! ------------------------------------------------------------------ ! -! written by eli j. mlawer, atmospheric & environmental research. ! -! revised by michael j. iacono, atmospheric & environmental research. ! -! ! -! band 1: 10-350 cm-1 (low key - h2o; low minor - n2) ! -! (high key - h2o; high minor - n2) ! -! ! -! compute the optical depth by interpolating in ln(pressure) and ! -! temperature. below laytrop, the water vapor self-continuum and ! -! foreign continuum is interpolated (in temperature) separately. ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb01 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & indm, indmp, ig - - real (kind=kind_phys) :: pp, corradj, scalen2, tauself, taufor, & - & taun2 -! -!===> ... begin here -! -! --- minor gas mapping levels: -! lower - n2, p = 142.5490 mbar, t = 215.70 k -! upper - n2, p = 142.5490 mbar, t = 215.70 k - -! --- ... lower atmosphere loop - - do k = 1, laytrop - ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(1) + 1 - ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(1) + 1 - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - - pp = pavel(k) - scalen2 = colbrd(k) * scaleminorn2(k) - if (pp < 250.0) then - corradj = f_one - 0.15 * (250.0-pp) / 154.4 - else - corradj = f_one - endif - - do ig = 1, ng01 - tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - taun2 = scalen2 * (ka_mn2(ig,indm) + minorfrac(k) & - & * (ka_mn2(ig,indmp) - ka_mn2(ig,indm))) - - taug(ig,k) = corradj * (colamt(k,1) & - & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & - & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & - & + tauself + taufor + taun2) - - fracs(ig,k) = fracrefa(ig) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(1) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(1) + 1 - indf = indfor(k) - indm = indminor(k) - - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indfp = indf + 1 - indmp = indm + 1 - - scalen2 = colbrd(k) * scaleminorn2(k) - corradj = f_one - 0.15 * (pavel(k) / 95.6) - - do ig = 1, ng01 - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - taun2 = scalen2 * (kb_mn2(ig,indm) + minorfrac(k) & - & * (kb_mn2(ig,indmp) - kb_mn2(ig,indm))) - - taug(ig,k) = corradj * (colamt(k,1) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & - & + taufor + taun2) - - fracs(ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb01 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 2: 350-500 cm-1 (low key - h2o; high key - h2o) -! ---------------------------------- - subroutine taugb02 -! .................................. - -! ------------------------------------------------------------------ ! -! band 2: 350-500 cm-1 (low key - h2o; high key - h2o) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb02 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & ig - - real (kind=kind_phys) :: corradj, tauself, taufor -! -!===> ... begin here -! -! --- ... lower atmosphere loop - - do k = 1, laytrop - ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(2) + 1 - ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(2) + 1 - inds = indself(k) - indf = indfor(k) - - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indsp = inds + 1 - indfp = indf + 1 - - corradj = f_one - 0.05 * (pavel(k) - 100.0) / 900.0 - - do ig = 1, ng02 - tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - - taug(ns02+ig,k) = corradj * (colamt(k,1) & - & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & - & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & - & + tauself + taufor) - - fracs(ns02+ig,k) = fracrefa(ig) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(2) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(2) + 1 - indf = indfor(k) - - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indfp = indf + 1 - - do ig = 1, ng02 - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - - taug(ns02+ig,k) = colamt(k,1) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & - & + taufor - - fracs(ns02+ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb02 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 3: 500-630 cm-1 (low key - h2o,co2; low minor - n2o); -!! (high key - h2o,co2; high minor - n2o) -! ---------------------------------- - subroutine taugb03 -! .................................. - -! ------------------------------------------------------------------ ! -! band 3: 500-630 cm-1 (low key - h2o,co2; low minor - n2o) ! -! (high key - h2o,co2; high minor - n2o) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb03 - -! --- locals: - integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, & - & id000, id010, id100, id110, id200, id210, jmn2o, jmn2op, & - & id001, id011, id101, id111, id201, id211, jpl, jplp, & - & ig, js, js1 - - real (kind=kind_phys) :: absn2o, ratn2o, adjfac, adjcoln2o, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_mn2o, specparm_mn2o, specmult_mn2o, fmn2o, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & refrat_planck_a, refrat_planck_b, refrat_m_a, refrat_m_b, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & tau_major, tau_major1, tauself, taufor, n2om1, n2om2, & - & p, p4, fk0, fk1, fk2 -! -!===> ... begin here -! -! --- ... minor gas mapping levels: -! lower - n2o, p = 706.272 mbar, t = 278.94 k -! upper - n2o, p = 95.58 mbar, t = 215.7 k - - refrat_planck_a = chi_mls(1,9)/chi_mls(2,9) ! P = 212.725 mb - refrat_planck_b = chi_mls(1,13)/chi_mls(2,13) ! P = 95.58 mb - refrat_m_a = chi_mls(1,3)/chi_mls(2,3) ! P = 706.270 mb - refrat_m_b = chi_mls(1,13)/chi_mls(2,13) ! P = 95.58 mb - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) - specparm = colamt(k,1) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(3) + js - - speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(3) + js1 - - speccomb_mn2o = colamt(k,1) + refrat_m_a*colamt(k,2) - specparm_mn2o = colamt(k,1) / speccomb_mn2o - specmult_mn2o = 8.0 * min(specparm_mn2o, oneminus) - jmn2o = 1 + int(specmult_mn2o) - fmn2o = mod(specmult_mn2o, f_one) - - speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2) - specparm_planck = colamt(k,1) / speccomb_planck - specmult_planck = 8.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - jmn2op= jmn2o+ 1 - jplp = jpl + 1 - -! --- ... in atmospheres where the amount of n2O is too great to be considered -! a minor species, adjust the column amount of n2O by an empirical factor -! to obtain the proper contribution. - - p = coldry(k) * chi_mls(4,jp(k)+1) - ratn2o = colamt(k,4) / p - if (ratn2o > 1.5) then - adjfac = 0.5 + (ratn2o - 0.5)**0.65 - adjcoln2o = adjfac * p - else - adjcoln2o = colamt(k,4) - endif - - if (specparm < 0.125) then - p = fs - f_one - p4 = p**4 - fk0 = p4 - fk1 = f_one - p - 2.0*p4 - fk2 = p + p4 - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - else if (specparm > 0.875) then - p = -fs - p4 = p**4 - fk0 = p4 - fk1 = f_one - p - 2.0*p4 - fk2 = p + p4 - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk0 = f_one - fs - fk1 = fs - fk2 = f_zero - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk0*fac00(k) - fac100 = fk1*fac00(k) - fac200 = fk2*fac00(k) - fac010 = fk0*fac10(k) - fac110 = fk1*fac10(k) - fac210 = fk2*fac10(k) - - if (specparm1 < 0.125) then - p = fs1 - f_one - p4 = p**4 - fk0 = p4 - fk1 = f_one - p - 2.0*p4 - fk2 = p + p4 - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p = -fs1 - p4 = p**4 - fk0 = p4 - fk1 = f_one - p - 2.0*p4 - fk2 = p + p4 - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk0 = f_one - fs1 - fk1 = fs1 - fk2 = f_zero - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk0*fac01(k) - fac101 = fk1*fac01(k) - fac201 = fk2*fac01(k) - fac011 = fk0*fac11(k) - fac111 = fk1*fac11(k) - fac211 = fk2*fac11(k) - - do ig = 1, ng03 - tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - n2om1 = ka_mn2o(ig,jmn2o,indm) + fmn2o & - & * (ka_mn2o(ig,jmn2op,indm) - ka_mn2o(ig,jmn2o,indm)) - n2om2 = ka_mn2o(ig,jmn2o,indmp) + fmn2o & - & * (ka_mn2o(ig,jmn2op,indmp) - ka_mn2o(ig,jmn2o,indmp)) - absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1) - - tau_major = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) - - tau_major1 = speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) - - taug(ns03+ig,k) = tau_major + tau_major1 & - & + tauself + taufor + adjcoln2o*absn2o - - fracs(ns03+ig,k) = fracrefa(ig,jpl) + fpl & - & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo ! end do_k_loop - enddo ! end do_ig_loop - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) - specparm = colamt(k,1) / speccomb - specmult = 4.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(3) + js - - speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 4.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(3) + js1 - - speccomb_mn2o = colamt(k,1) + refrat_m_b*colamt(k,2) - specparm_mn2o = colamt(k,1) / speccomb_mn2o - specmult_mn2o = 4.0 * min(specparm_mn2o, oneminus) - jmn2o = 1 + int(specmult_mn2o) - fmn2o = mod(specmult_mn2o, f_one) - - speccomb_planck = colamt(k,1) + refrat_planck_b*colamt(k,2) - specparm_planck = colamt(k,1) / speccomb_planck - specmult_planck = 4.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - indf = indfor(k) - indm = indminor(k) - indfp = indf + 1 - indmp = indm + 1 - jmn2op= jmn2o+ 1 - jplp = jpl + 1 - - id000 = ind0 - id010 = ind0 + 5 - id100 = ind0 + 1 - id110 = ind0 + 6 - id001 = ind1 - id011 = ind1 + 5 - id101 = ind1 + 1 - id111 = ind1 + 6 - -! --- ... in atmospheres where the amount of n2o is too great to be considered -! a minor species, adjust the column amount of N2O by an empirical factor -! to obtain the proper contribution. - - p = coldry(k) * chi_mls(4,jp(k)+1) - ratn2o = colamt(k,4) / p - if (ratn2o > 1.5) then - adjfac = 0.5 + (ratn2o - 0.5)**0.65 - adjcoln2o = adjfac * p - else - adjcoln2o = colamt(k,4) - endif - - fk0 = f_one - fs - fk1 = fs - fac000 = fk0*fac00(k) - fac010 = fk0*fac10(k) - fac100 = fk1*fac00(k) - fac110 = fk1*fac10(k) - - fk0 = f_one - fs1 - fk1 = fs1 - fac001 = fk0*fac01(k) - fac011 = fk0*fac11(k) - fac101 = fk1*fac01(k) - fac111 = fk1*fac11(k) - - do ig = 1, ng03 - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - n2om1 = kb_mn2o(ig,jmn2o,indm) + fmn2o & - & * (kb_mn2o(ig,jmn2op,indm) - kb_mn2o(ig,jmn2o,indm)) - n2om2 = kb_mn2o(ig,jmn2o,indmp) + fmn2o & - & * (kb_mn2o(ig,jmn2op,indmp) - kb_mn2o(ig,jmn2o,indmp)) - absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1) - - tau_major = speccomb & - & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) & - & + fac100*absb(ig,id100) + fac110*absb(ig,id110)) - - tau_major1 = speccomb1 & - & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) & - & + fac101*absb(ig,id101) + fac111*absb(ig,id111)) - - taug(ns03+ig,k) = tau_major + tau_major1 & - & + taufor + adjcoln2o*absn2o - - fracs(ns03+ig,k) = fracrefb(ig,jpl) + fpl & - & * (fracrefb(ig,jplp) - fracrefb(ig,jpl)) - enddo - enddo - -! .................................. - end subroutine taugb03 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 4: 630-700 cm-1 (low key - h2o,co2; high key - o3,co2) -! ---------------------------------- - subroutine taugb04 -! .................................. - -! ------------------------------------------------------------------ ! -! band 4: 630-700 cm-1 (low key - h2o,co2; high key - o3,co2) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb04 - -! --- locals: - integer :: k, ind0, ind1, inds, indsp, indf, indfp, jpl, jplp, & - & id000, id010, id100, id110, id200, id210, ig, js, js1, & - & id001, id011, id101, id111, id201, id211 - - real (kind=kind_phys) :: tauself, taufor, p, p4, fk0, fk1, fk2, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & refrat_planck_a, refrat_planck_b, tau_major, tau_major1 -! -!===> ... begin here -! - refrat_planck_a = chi_mls(1,11)/chi_mls(2,11) ! P = 142.5940 mb - refrat_planck_b = chi_mls(3,13)/chi_mls(2,13) ! P = 95.58350 mb - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) - specparm = colamt(k,1) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(4) + js - - speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = ( jp(k)*5 + (jt1(k)-1)) * nspa(4) + js1 - - speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2) - specparm_planck = colamt(k,1) / speccomb_planck - specmult_planck = 8.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, 1.0) - - inds = indself(k) - indf = indfor(k) - indsp = inds + 1 - indfp = indf + 1 - jplp = jpl + 1 - - if (specparm < 0.125) then - p = fs - f_one - p4 = p**4 - fk0 = p4 - fk1 = f_one - p - 2.0*p4 - fk2 = p + p4 - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - elseif (specparm > 0.875) then - p = -fs - p4 = p**4 - fk0 = p4 - fk1 = f_one - p - 2.0*p4 - fk2 = p + p4 - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk0 = f_one - fs - fk1 = fs - fk2 = f_zero - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk0*fac00(k) - fac100 = fk1*fac00(k) - fac200 = fk2*fac00(k) - fac010 = fk0*fac10(k) - fac110 = fk1*fac10(k) - fac210 = fk2*fac10(k) - - if (specparm1 < 0.125) then - p = fs1 - f_one - p4 = p**4 - fk0 = p4 - fk1 = f_one - p - 2.0*p4 - fk2 = p + p4 - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p = -fs1 - p4 = p**4 - fk0 = p4 - fk1 = f_one - p - 2.0*p4 - fk2 = p + p4 - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk0 = f_one - fs1 - fk1 = fs1 - fk2 = f_zero - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk0*fac01(k) - fac101 = fk1*fac01(k) - fac201 = fk2*fac01(k) - fac011 = fk0*fac11(k) - fac111 = fk1*fac11(k) - fac211 = fk2*fac11(k) - - do ig = 1, ng04 - tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - - tau_major = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) - - tau_major1 = speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) - - taug(ns04+ig,k) = tau_major + tau_major1 + tauself + taufor - - fracs(ns04+ig,k) = fracrefa(ig,jpl) + fpl & - & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo ! end do_k_loop - enddo ! end do_ig_loop - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - speccomb = colamt(k,3) + rfrate(k,6,1)*colamt(k,2) - specparm = colamt(k,3) / speccomb - specmult = 4.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(4) + js - - speccomb1 = colamt(k,3) + rfrate(k,6,2)*colamt(k,2) - specparm1 = colamt(k,3) / speccomb1 - specmult1 = 4.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(4) + js1 - - speccomb_planck = colamt(k,3) + refrat_planck_b*colamt(k,2) - specparm_planck = colamt(k,3) / speccomb_planck - specmult_planck = 4.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - jplp = jpl + 1 - - id000 = ind0 - id010 = ind0 + 5 - id100 = ind0 + 1 - id110 = ind0 + 6 - id001 = ind1 - id011 = ind1 + 5 - id101 = ind1 + 1 - id111 = ind1 + 6 - - fk0 = f_one - fs - fk1 = fs - fac000 = fk0*fac00(k) - fac010 = fk0*fac10(k) - fac100 = fk1*fac00(k) - fac110 = fk1*fac10(k) - - fk0 = f_one - fs1 - fk1 = fs1 - fac001 = fk0*fac01(k) - fac011 = fk0*fac11(k) - fac101 = fk1*fac01(k) - fac111 = fk1*fac11(k) - - do ig = 1, ng04 - tau_major = speccomb & - & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) & - & + fac100*absb(ig,id100) + fac110*absb(ig,id110)) - tau_major1 = speccomb1 & - & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) & - & + fac101*absb(ig,id101) + fac111*absb(ig,id111)) - - taug(ns04+ig,k) = tau_major + tau_major1 - - fracs(ns04+ig,k) = fracrefb(ig,jpl) + fpl & - & * (fracrefb(ig,jplp) - fracrefb(ig,jpl)) - enddo - -! --- ... empirical modification to code to improve stratospheric cooling rates -! for co2. revised to apply weighting for g-point reduction in this band. - - taug(ns04+ 8,k) = taug(ns04+ 8,k) * 0.92 - taug(ns04+ 9,k) = taug(ns04+ 9,k) * 0.88 - taug(ns04+10,k) = taug(ns04+10,k) * 1.07 - taug(ns04+11,k) = taug(ns04+11,k) * 1.1 - taug(ns04+12,k) = taug(ns04+12,k) * 0.99 - taug(ns04+13,k) = taug(ns04+13,k) * 0.88 - taug(ns04+14,k) = taug(ns04+14,k) * 0.943 - enddo - -! .................................. - end subroutine taugb04 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 5: 700-820 cm-1 (low key - h2o,co2; low minor - o3, ccl4) -!! (high key - o3,co2) -! ---------------------------------- - subroutine taugb05 -! .................................. - -! ------------------------------------------------------------------ ! -! band 5: 700-820 cm-1 (low key - h2o,co2; low minor - o3, ccl4) ! -! (high key - o3,co2) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb05 - -! --- locals: - integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, & - & id000, id010, id100, id110, id200, id210, jmo3, jmo3p, & - & id001, id011, id101, id111, id201, id211, jpl, jplp, & - & ig, js, js1 - - real (kind=kind_phys) :: tauself, taufor, o3m1, o3m2, abso3, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_mo3, specparm_mo3, specmult_mo3, fmo3, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & refrat_planck_a, refrat_planck_b, refrat_m_a, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21 -! -!===> ... begin here -! -! --- ... minor gas mapping level : -! lower - o3, p = 317.34 mbar, t = 240.77 k -! lower - ccl4 - -! --- ... calculate reference ratio to be used in calculation of Planck -! fraction in lower/upper atmosphere. - - refrat_planck_a = chi_mls(1,5)/chi_mls(2,5) ! P = 473.420 mb - refrat_planck_b = chi_mls(3,43)/chi_mls(2,43) ! P = 0.2369 mb - refrat_m_a = chi_mls(1,7)/chi_mls(2,7) ! P = 317.348 mb - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) - specparm = colamt(k,1) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(5) + js - - speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(5) + js1 - - speccomb_mo3 = colamt(k,1) + refrat_m_a*colamt(k,2) - specparm_mo3 = colamt(k,1) / speccomb_mo3 - specmult_mo3 = 8.0 * min(specparm_mo3, oneminus) - jmo3 = 1 + int(specmult_mo3) - fmo3 = mod(specmult_mo3, f_one) - - speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2) - specparm_planck = colamt(k,1) / speccomb_planck - specmult_planck = 8.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - jplp = jpl + 1 - jmo3p = jmo3 + 1 - - if (specparm < 0.125) then - p0 = fs - f_one - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - elseif (specparm > 0.875) then - p0 = -fs - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk00 = f_one - fs - fk10 = fs - fk20 = f_zero - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk00 * fac00(k) - fac100 = fk10 * fac00(k) - fac200 = fk20 * fac00(k) - fac010 = fk00 * fac10(k) - fac110 = fk10 * fac10(k) - fac210 = fk20 * fac10(k) - - if (specparm1 < 0.125) then - p1 = fs1 - f_one - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p1 = -fs1 - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk01 = f_one - fs1 - fk11 = fs1 - fk21 = f_zero - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk01 * fac01(k) - fac101 = fk11 * fac01(k) - fac201 = fk21 * fac01(k) - fac011 = fk01 * fac11(k) - fac111 = fk11 * fac11(k) - fac211 = fk21 * fac11(k) - - do ig = 1, ng05 - tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - o3m1 = ka_mo3(ig,jmo3,indm) + fmo3 & - & * (ka_mo3(ig,jmo3p,indm) - ka_mo3(ig,jmo3,indm)) - o3m2 = ka_mo3(ig,jmo3,indmp) + fmo3 & - & * (ka_mo3(ig,jmo3p,indmp) - ka_mo3(ig,jmo3,indmp)) - abso3 = o3m1 + minorfrac(k)*(o3m2 - o3m1) - - taug(ns05+ig,k) = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & - & + speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & - & + tauself + taufor+abso3*colamt(k,3)+wx(k,1)*ccl4(ig) - - fracs(ns05+ig,k) = fracrefa(ig,jpl) + fpl & - & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - speccomb = colamt(k,3) + rfrate(k,6,1)*colamt(k,2) - specparm = colamt(k,3) / speccomb - specmult = 4.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(5) + js - - speccomb1 = colamt(k,3) + rfrate(k,6,2)*colamt(k,2) - specparm1 = colamt(k,3) / speccomb1 - specmult1 = 4.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(5) + js1 - - speccomb_planck = colamt(k,3) + refrat_planck_b*colamt(k,2) - specparm_planck = colamt(k,3) / speccomb_planck - specmult_planck = 4.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - jplp= jpl + 1 - - id000 = ind0 - id010 = ind0 + 5 - id100 = ind0 + 1 - id110 = ind0 + 6 - id001 = ind1 - id011 = ind1 + 5 - id101 = ind1 + 1 - id111 = ind1 + 6 - - fk00 = f_one - fs - fk10 = fs - - fk01 = f_one - fs1 - fk11 = fs1 - - fac000 = fk00 * fac00(k) - fac010 = fk00 * fac10(k) - fac100 = fk10 * fac00(k) - fac110 = fk10 * fac10(k) - - fac001 = fk01 * fac01(k) - fac011 = fk01 * fac11(k) - fac101 = fk11 * fac01(k) - fac111 = fk11 * fac11(k) - - do ig = 1, ng05 - taug(ns05+ig,k) = speccomb & - & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) & - & + fac100*absb(ig,id100) + fac110*absb(ig,id110)) & - & + speccomb1 & - & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) & - & + fac101*absb(ig,id101) + fac111*absb(ig,id111)) & - & + wx(k,1) * ccl4(ig) - - fracs(ns05+ig,k) = fracrefb(ig,jpl) + fpl & - & * (fracrefb(ig,jplp) - fracrefb(ig,jpl)) - enddo - enddo - -! .................................. - end subroutine taugb05 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 6: 820-980 cm-1 (low key - h2o; low minor - co2) -!! (high key - none; high minor - cfc11, cfc12) -! ---------------------------------- - subroutine taugb06 -! .................................. - -! ------------------------------------------------------------------ ! -! band 6: 820-980 cm-1 (low key - h2o; low minor - co2) ! -! (high key - none; high minor - cfc11, cfc12) -! ------------------------------------------------------------------ ! - - use module_radlw_kgb06 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & indm, indmp, ig - - real (kind=kind_phys) :: ratco2, adjfac, adjcolco2, tauself, & - & taufor, absco2, temp -! -!===> ... begin here -! -! --- ... minor gas mapping level: -! lower - co2, p = 706.2720 mb, t = 294.2 k -! upper - cfc11, cfc12 - -! --- ... lower atmosphere loop - - do k = 1, laytrop - ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(6) + 1 - ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(6) + 1 - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - ind0p = ind0 + 1 - ind1p = ind1 + 1 - -! --- ... in atmospheres where the amount of co2 is too great to be considered -! a minor species, adjust the column amount of co2 by an empirical factor -! to obtain the proper contribution. - - temp = coldry(k) * chi_mls(2,jp(k)+1) - ratco2 = colamt(k,2) / temp - if (ratco2 > 3.0) then - adjfac = 2.0 + (ratco2-2.0)**0.77 - adjcolco2 = adjfac * temp - else - adjcolco2 = colamt(k,2) - endif - - do ig = 1, ng06 - tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - absco2 = ka_mco2(ig,indm) + minorfrac(k) & - & * (ka_mco2(ig,indmp) - ka_mco2(ig,indm)) - - taug(ns06+ig,k) = colamt(k,1) & - & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & - & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & - & + tauself + taufor + adjcolco2*absco2 & - & + wx(k,2)*cfc11adj(ig) + wx(k,3)*cfc12(ig) - - fracs(ns06+ig,k) = fracrefa(ig) - enddo - enddo - -! --- ... upper atmosphere loop -! nothing important goes on above laytrop in this band. - - do k = laytrop+1, nlay - do ig = 1, ng06 - taug(ns06+ig,k) = wx(k,2)*cfc11adj(ig) + wx(k,3)*cfc12(ig) - - fracs(ns06+ig,k) = fracrefa(ig) - enddo - enddo - -! .................................. - end subroutine taugb06 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 7: 980-1080 cm-1 (low key - h2o,o3; low minor - co2) -!! (high key - o3; high minor - co2) -! ---------------------------------- - subroutine taugb07 -! .................................. - -! ------------------------------------------------------------------ ! -! band 7: 980-1080 cm-1 (low key - h2o,o3; low minor - co2) ! -! (high key - o3; high minor - co2) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb07 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & id000, id010, id100, id110, id200, id210, indm, indmp, & - & id001, id011, id101, id111, id201, id211, jmco2, jmco2p, & - & jpl, jplp, ig, js, js1 - - real (kind=kind_phys) :: tauself, taufor, co2m1, co2m2, absco2, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_mco2, specparm_mco2, specmult_mco2, fmco2, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & refrat_planck_a, refrat_m_a, ratco2, adjfac, adjcolco2, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp -! -!===> ... begin here -! -! --- ... minor gas mapping level : -! lower - co2, p = 706.2620 mbar, t= 278.94 k -! upper - co2, p = 12.9350 mbar, t = 234.01 k - -! --- ... calculate reference ratio to be used in calculation of Planck -! fraction in lower atmosphere. - - refrat_planck_a = chi_mls(1,3)/chi_mls(3,3) ! P = 706.2620 mb - refrat_m_a = chi_mls(1,3)/chi_mls(3,3) ! P = 706.2720 mb - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,1) + rfrate(k,2,1)*colamt(k,3) - specparm = colamt(k,1) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(7) + js - - speccomb1 = colamt(k,1) + rfrate(k,2,2)*colamt(k,3) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(7) + js1 - - speccomb_mco2 = colamt(k,1) + refrat_m_a*colamt(k,3) - specparm_mco2 = colamt(k,1) / speccomb_mco2 - specmult_mco2 = 8.0 * min(specparm_mco2, oneminus) - jmco2 = 1 + int(specmult_mco2) - fmco2 = mod(specmult_mco2, f_one) - - speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,3) - specparm_planck = colamt(k,1) / speccomb_planck - specmult_planck = 8.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - jplp = jpl + 1 - jmco2p= jmco2+ 1 - ind0p = ind0 + 1 - ind1p = ind1 + 1 - -! --- ... in atmospheres where the amount of CO2 is too great to be considered -! a minor species, adjust the column amount of CO2 by an empirical factor -! to obtain the proper contribution. - - temp = coldry(k) * chi_mls(2,jp(k)+1) - ratco2 = colamt(k,2) / temp - if (ratco2 > 3.0) then - adjfac = 3.0 + (ratco2-3.0)**0.79 - adjcolco2 = adjfac * temp - else - adjcolco2 = colamt(k,2) - endif - - if (specparm < 0.125) then - p0 = fs - f_one - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - elseif (specparm > 0.875) then - p0 = -fs - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk00 = f_one - fs - fk10 = fs - fk20 = f_zero - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk00 * fac00(k) - fac100 = fk10 * fac00(k) - fac200 = fk20 * fac00(k) - fac010 = fk00 * fac10(k) - fac110 = fk10 * fac10(k) - fac210 = fk20 * fac10(k) - - if (specparm1 < 0.125) then - p1 = fs1 - f_one - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p1 = -fs1 - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk01 = f_one - fs1 - fk11 = fs1 - fk21 = f_zero - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk01 * fac01(k) - fac101 = fk11 * fac01(k) - fac201 = fk21 * fac01(k) - fac011 = fk01 * fac11(k) - fac111 = fk11 * fac11(k) - fac211 = fk21 * fac11(k) - - do ig = 1, ng07 - tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - co2m1 = ka_mco2(ig,jmco2,indm) + fmco2 & - & * (ka_mco2(ig,jmco2p,indm) - ka_mco2(ig,jmco2,indm)) - co2m2 = ka_mco2(ig,jmco2,indmp) + fmco2 & - & * (ka_mco2(ig,jmco2p,indmp) - ka_mco2(ig,jmco2,indmp)) - absco2 = co2m1 + minorfrac(k) * (co2m2 - co2m1) - - taug(ns07+ig,k) = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & - & + speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & - & + tauself + taufor + adjcolco2*absco2 - - fracs(ns07+ig,k) = fracrefa(ig,jpl) + fpl & - & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo - enddo - -! --- ... upper atmosphere loop - -! --- ... in atmospheres where the amount of co2 is too great to be considered -! a minor species, adjust the column amount of co2 by an empirical factor -! to obtain the proper contribution. - - do k = laytrop+1, nlay - temp = coldry(k) * chi_mls(2,jp(k)+1) - ratco2 = colamt(k,2) / temp - if (ratco2 > 3.0) then - adjfac = 2.0 + (ratco2-2.0)**0.79 - adjcolco2 = adjfac * temp - else - adjcolco2 = colamt(k,2) - endif - - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(7) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(7) + 1 - - indm = indminor(k) - indmp = indm + 1 - ind0p = ind0 + 1 - ind1p = ind1 + 1 - - do ig = 1, ng07 - absco2 = kb_mco2(ig,indm) + minorfrac(k) & - & * (kb_mco2(ig,indmp) - kb_mco2(ig,indm)) - - taug(ns07+ig,k) = colamt(k,3) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & - & + adjcolco2 * absco2 - - fracs(ns07+ig,k) = fracrefb(ig) - enddo - -! --- ... empirical modification to code to improve stratospheric cooling rates -! for o3. revised to apply weighting for g-point reduction in this band. - - taug(ns07+ 6,k) = taug(ns07+ 6,k) * 0.92 - taug(ns07+ 7,k) = taug(ns07+ 7,k) * 0.88 - taug(ns07+ 8,k) = taug(ns07+ 8,k) * 1.07 - taug(ns07+ 9,k) = taug(ns07+ 9,k) * 1.1 - taug(ns07+10,k) = taug(ns07+10,k) * 0.99 - taug(ns07+11,k) = taug(ns07+11,k) * 0.855 - enddo - -! .................................. - end subroutine taugb07 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 8: 1080-1180 cm-1 (low key - h2o; low minor - co2,o3,n2o) -!! (high key - o3; high minor - co2, n2o) -! ---------------------------------- - subroutine taugb08 -! .................................. - -! ------------------------------------------------------------------ ! -! band 8: 1080-1180 cm-1 (low key - h2o; low minor - co2,o3,n2o) ! -! (high key - o3; high minor - co2, n2o) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb08 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & indm, indmp, ig - - real (kind=kind_phys) :: tauself, taufor, absco2, abso3, absn2o, & - & ratco2, adjfac, adjcolco2, temp -! -!===> ... begin here -! -! --- ... minor gas mapping level: -! lower - co2, p = 1053.63 mb, t = 294.2 k -! lower - o3, p = 317.348 mb, t = 240.77 k -! lower - n2o, p = 706.2720 mb, t= 278.94 k -! lower - cfc12,cfc11 -! upper - co2, p = 35.1632 mb, t = 223.28 k -! upper - n2o, p = 8.716e-2 mb, t = 226.03 k - -! --- ... lower atmosphere loop - - do k = 1, laytrop - ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(8) + 1 - ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(8) + 1 - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - -! --- ... in atmospheres where the amount of co2 is too great to be considered -! a minor species, adjust the column amount of co2 by an empirical factor -! to obtain the proper contribution. - - temp = coldry(k) * chi_mls(2,jp(k)+1) - ratco2 = colamt(k,2) / temp - if (ratco2 > 3.0) then - adjfac = 2.0 + (ratco2-2.0)**0.65 - adjcolco2 = adjfac * temp - else - adjcolco2 = colamt(k,2) - endif - - do ig = 1, ng08 - tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - absco2 = (ka_mco2(ig,indm) + minorfrac(k) & - & * (ka_mco2(ig,indmp) - ka_mco2(ig,indm))) - abso3 = (ka_mo3(ig,indm) + minorfrac(k) & - & * (ka_mo3(ig,indmp) - ka_mo3(ig,indm))) - absn2o = (ka_mn2o(ig,indm) + minorfrac(k) & - & * (ka_mn2o(ig,indmp) - ka_mn2o(ig,indm))) - - taug(ns08+ig,k) = colamt(k,1) & - & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & - & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & - & + tauself+taufor + adjcolco2*absco2 & - & + colamt(k,3)*abso3 + colamt(k,4)*absn2o & - & + wx(k,3)*cfc12(ig) + wx(k,4)*cfc22adj(ig) - - fracs(ns08+ig,k) = fracrefa(ig) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(8) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(8) + 1 - - indm = indminor(k) - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indmp = indm + 1 - -! --- ... in atmospheres where the amount of co2 is too great to be considered -! a minor species, adjust the column amount of co2 by an empirical factor -! to obtain the proper contribution. - - temp = coldry(k) * chi_mls(2,jp(k)+1) - ratco2 = colamt(k,2) / temp - if (ratco2 > 3.0) then - adjfac = 2.0 + (ratco2-2.0)**0.65 - adjcolco2 = adjfac * temp - else - adjcolco2 = colamt(k,2) - endif - - do ig = 1, ng08 - absco2 = (kb_mco2(ig,indm) + minorfrac(k) & - & * (kb_mco2(ig,indmp) - kb_mco2(ig,indm))) - absn2o = (kb_mn2o(ig,indm) + minorfrac(k) & - & * (kb_mn2o(ig,indmp) - kb_mn2o(ig,indm))) - - taug(ns08+ig,k) = colamt(k,3) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & - & + adjcolco2*absco2 + colamt(k,4)*absn2o & - & + wx(k,3)*cfc12(ig) + wx(k,4)*cfc22adj(ig) - - fracs(ns08+ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb08 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 9: 1180-1390 cm-1 (low key - h2o,ch4; low minor - n2o) -!! (high key - ch4; high minor - n2o) -! ---------------------------------- - subroutine taugb09 -! .................................. - -! ------------------------------------------------------------------ ! -! band 9: 1180-1390 cm-1 (low key - h2o,ch4; low minor - n2o) ! -! (high key - ch4; high minor - n2o) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb09 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & id000, id010, id100, id110, id200, id210, indm, indmp, & - & id001, id011, id101, id111, id201, id211, jmn2o, jmn2op, & - & jpl, jplp, ig, js, js1 - - real (kind=kind_phys) :: tauself, taufor, n2om1, n2om2, absn2o, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_mn2o, specparm_mn2o, specmult_mn2o, fmn2o, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & refrat_planck_a, refrat_m_a, ratn2o, adjfac, adjcoln2o, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp -! -!===> ... begin here -! -! --- ... minor gas mapping level : -! lower - n2o, p = 706.272 mbar, t = 278.94 k -! upper - n2o, p = 95.58 mbar, t = 215.7 k - -! --- ... calculate reference ratio to be used in calculation of Planck -! fraction in lower/upper atmosphere. - - refrat_planck_a = chi_mls(1,9)/chi_mls(6,9) ! P = 212 mb - refrat_m_a = chi_mls(1,3)/chi_mls(6,3) ! P = 706.272 mb - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,1) + rfrate(k,4,1)*colamt(k,5) - specparm = colamt(k,1) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(9) + js - - speccomb1 = colamt(k,1) + rfrate(k,4,2)*colamt(k,5) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(9) + js1 - - speccomb_mn2o = colamt(k,1) + refrat_m_a*colamt(k,5) - specparm_mn2o = colamt(k,1) / speccomb_mn2o - specmult_mn2o = 8.0 * min(specparm_mn2o, oneminus) - jmn2o = 1 + int(specmult_mn2o) - fmn2o = mod(specmult_mn2o, f_one) - - speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,5) - specparm_planck = colamt(k,1) / speccomb_planck - specmult_planck = 8.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - jplp = jpl + 1 - jmn2op= jmn2o+ 1 - -! --- ... in atmospheres where the amount of n2o is too great to be considered -! a minor species, adjust the column amount of n2o by an empirical factor -! to obtain the proper contribution. - - temp = coldry(k) * chi_mls(4,jp(k)+1) - ratn2o = colamt(k,4) / temp - if (ratn2o > 1.5) then - adjfac = 0.5 + (ratn2o-0.5)**0.65 - adjcoln2o = adjfac * temp - else - adjcoln2o = colamt(k,4) - endif - - if (specparm < 0.125) then - p0 = fs - f_one - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - elseif (specparm > 0.875) then - p0 = -fs - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk00 = f_one - fs - fk10 = fs - fk20 = f_zero - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk00 * fac00(k) - fac100 = fk10 * fac00(k) - fac200 = fk20 * fac00(k) - fac010 = fk00 * fac10(k) - fac110 = fk10 * fac10(k) - fac210 = fk20 * fac10(k) - - if (specparm1 < 0.125) then - p1 = fs1 - f_one - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p1 = -fs1 - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk01 = f_one - fs1 - fk11 = fs1 - fk21 = f_zero - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk01 * fac01(k) - fac101 = fk11 * fac01(k) - fac201 = fk21 * fac01(k) - fac011 = fk01 * fac11(k) - fac111 = fk11 * fac11(k) - fac211 = fk21 * fac11(k) - - do ig = 1, ng09 - tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - n2om1 = ka_mn2o(ig,jmn2o,indm) + fmn2o & - & * (ka_mn2o(ig,jmn2op,indm) - ka_mn2o(ig,jmn2o,indm)) - n2om2 = ka_mn2o(ig,jmn2o,indmp) + fmn2o & - & * (ka_mn2o(ig,jmn2op,indmp) - ka_mn2o(ig,jmn2o,indmp)) - absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1) - - taug(ns09+ig,k) = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & - & + speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & - & + tauself + taufor + adjcoln2o*absn2o - - fracs(ns09+ig,k) = fracrefa(ig,jpl) + fpl & - & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(9) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(9) + 1 - - indm = indminor(k) - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indmp = indm + 1 - -! --- ... in atmospheres where the amount of n2o is too great to be considered -! a minor species, adjust the column amount of n2o by an empirical factor -! to obtain the proper contribution. - - temp = coldry(k) * chi_mls(4,jp(k)+1) - ratn2o = colamt(k,4) / temp - if (ratn2o > 1.5) then - adjfac = 0.5 + (ratn2o - 0.5)**0.65 - adjcoln2o = adjfac * temp - else - adjcoln2o = colamt(k,4) - endif - - do ig = 1, ng09 - absn2o = kb_mn2o(ig,indm) + minorfrac(k) & - & * (kb_mn2o(ig,indmp) - kb_mn2o(ig,indm)) - - taug(ns09+ig,k) = colamt(k,5) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & - & + adjcoln2o*absn2o - - fracs(ns09+ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb09 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 10: 1390-1480 cm-1 (low key - h2o; high key - h2o) -! ---------------------------------- - subroutine taugb10 -! .................................. - -! ------------------------------------------------------------------ ! -! band 10: 1390-1480 cm-1 (low key - h2o; high key - h2o) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb10 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & ig - - real (kind=kind_phys) :: tauself, taufor -! -!===> ... begin here -! -! --- ... lower atmosphere loop - - do k = 1, laytrop - ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(10) + 1 - ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(10) + 1 - - inds = indself(k) - indf = indfor(k) - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indsp = inds + 1 - indfp = indf + 1 - - do ig = 1, ng10 - tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - - taug(ns10+ig,k) = colamt(k,1) & - & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & - & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & - & + tauself + taufor - - fracs(ns10+ig,k) = fracrefa(ig) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(10) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(10) + 1 - - indf = indfor(k) - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indfp = indf + 1 - - do ig = 1, ng10 - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - - taug(ns10+ig,k) = colamt(k,1) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & - & + taufor - - fracs(ns10+ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb10 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 11: 1480-1800 cm-1 (low - h2o; low minor - o2) -!! (high key - h2o; high minor - o2) -! ---------------------------------- - subroutine taugb11 -! .................................. - -! ------------------------------------------------------------------ ! -! band 11: 1480-1800 cm-1 (low - h2o; low minor - o2) ! -! (high key - h2o; high minor - o2) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb11 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & indm, indmp, ig - - real (kind=kind_phys) :: scaleo2, tauself, taufor, tauo2 -! -!===> ... begin here -! -! --- ... minor gas mapping level : -! lower - o2, p = 706.2720 mbar, t = 278.94 k -! upper - o2, p = 4.758820 mbarm t = 250.85 k - -! --- ... lower atmosphere loop - - do k = 1, laytrop - ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(11) + 1 - ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(11) + 1 - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - - scaleo2 = colamt(k,6) * scaleminor(k) - - do ig = 1, ng11 - tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - tauo2 = scaleo2 * (ka_mo2(ig,indm) + minorfrac(k) & - & * (ka_mo2(ig,indmp) - ka_mo2(ig,indm))) - - taug(ns11+ig,k) = colamt(k,1) & - & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & - & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & - & + tauself + taufor + tauo2 - - fracs(ns11+ig,k) = fracrefa(ig) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(11) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(11) + 1 - - indf = indfor(k) - indm = indminor(k) - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indfp = indf + 1 - indmp = indm + 1 - - scaleo2 = colamt(k,6) * scaleminor(k) - - do ig = 1, ng11 - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - tauo2 = scaleo2 * (kb_mo2(ig,indm) + minorfrac(k) & - & * (kb_mo2(ig,indmp) - kb_mo2(ig,indm))) - - taug(ns11+ig,k) = colamt(k,1) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & - & + taufor + tauo2 - - fracs(ns11+ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb11 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 12: 1800-2080 cm-1 (low - h2o,co2; high - nothing) -! ---------------------------------- - subroutine taugb12 -! .................................. - -! ------------------------------------------------------------------ ! -! band 12: 1800-2080 cm-1 (low - h2o,co2; high - nothing) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb12 - -! --- locals: - integer :: k, ind0, ind1, inds, indsp, indf, indfp, jpl, jplp, & - & id000, id010, id100, id110, id200, id210, ig, js, js1, & - & id001, id011, id101, id111, id201, id211 - - real (kind=kind_phys) :: tauself, taufor, refrat_planck_a, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21 -! -!===> ... begin here -! -! --- ... calculate reference ratio to be used in calculation of Planck -! fraction in lower/upper atmosphere. - - refrat_planck_a = chi_mls(1,10)/chi_mls(2,10) ! P = 174.164 mb - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) - specparm = colamt(k,1) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(12) + js - - speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(12) + js1 - - speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2) - specparm_planck = colamt(k,1) / speccomb_planck - if (specparm_planck >= oneminus) specparm_planck=oneminus - specmult_planck = 8.0 * specparm_planck - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - inds = indself(k) - indf = indfor(k) - indsp = inds + 1 - indfp = indf + 1 - jplp = jpl + 1 - - if (specparm < 0.125) then - p0 = fs - f_one - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - elseif (specparm > 0.875) then - p0 = -fs - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk00 = f_one - fs - fk10 = fs - fk20 = f_zero - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk00 * fac00(k) - fac100 = fk10 * fac00(k) - fac200 = fk20 * fac00(k) - fac010 = fk00 * fac10(k) - fac110 = fk10 * fac10(k) - fac210 = fk20 * fac10(k) - - if (specparm1 < 0.125) then - p1 = fs1 - f_one - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p1 = -fs1 - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk01 = f_one - fs1 - fk11 = fs1 - fk21 = f_zero - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk01 * fac01(k) - fac101 = fk11 * fac01(k) - fac201 = fk21 * fac01(k) - fac011 = fk01 * fac11(k) - fac111 = fk11 * fac11(k) - fac211 = fk21 * fac11(k) - - do ig = 1, ng12 - tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - - taug(ns12+ig,k) = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & - & + speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & - & + tauself + taufor - - fracs(ns12+ig,k) = fracrefa(ig,jpl) + fpl & - & *(fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - do ig = 1, ng12 - taug(ns12+ig,k) = f_zero - fracs(ns12+ig,k) = f_zero - enddo - enddo - -! .................................. - end subroutine taugb12 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 13: 2080-2250 cm-1 (low key-h2o,n2o; high minor-o3 minor) -! ---------------------------------- - subroutine taugb13 -! .................................. - -! ------------------------------------------------------------------ ! -! band 13: 2080-2250 cm-1 (low key-h2o,n2o; high minor-o3 minor) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb13 - -! --- locals: - integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, & - & id000, id010, id100, id110, id200, id210, jmco2, jpl, & - & id001, id011, id101, id111, id201, id211, jmco2p, jplp, & - & jmco, jmcop, ig, js, js1 - - real (kind=kind_phys) :: tauself, taufor, co2m1, co2m2, absco2, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_mco2, specparm_mco2, specmult_mco2, fmco2, & - & speccomb_mco, specparm_mco, specmult_mco, fmco, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & refrat_planck_a, refrat_m_a, refrat_m_a3, ratco2, & - & adjfac, adjcolco2, com1, com2, absco, abso3, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp -! -!===> ... begin here -! -! --- ... minor gas mapping levels : -! lower - co2, p = 1053.63 mb, t = 294.2 k -! lower - co, p = 706 mb, t = 278.94 k -! upper - o3, p = 95.5835 mb, t = 215.7 k - -! --- ... calculate reference ratio to be used in calculation of Planck -! fraction in lower/upper atmosphere. - - refrat_planck_a = chi_mls(1,5)/chi_mls(4,5) ! P = 473.420 mb (Level 5) - refrat_m_a = chi_mls(1,1)/chi_mls(4,1) ! P = 1053. (Level 1) - refrat_m_a3 = chi_mls(1,3)/chi_mls(4,3) ! P = 706. (Level 3) - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,1) + rfrate(k,3,1)*colamt(k,4) - specparm = colamt(k,1) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(13) + js - - speccomb1 = colamt(k,1) + rfrate(k,3,2)*colamt(k,4) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(13) + js1 - - speccomb_mco2 = colamt(k,1) + refrat_m_a*colamt(k,4) - specparm_mco2 = colamt(k,1) / speccomb_mco2 - specmult_mco2 = 8.0 * min(specparm_mco2, oneminus) - jmco2 = 1 + int(specmult_mco2) - fmco2 = mod(specmult_mco2, f_one) - -! --- ... in atmospheres where the amount of co2 is too great to be considered -! a minor species, adjust the column amount of co2 by an empirical factor -! to obtain the proper contribution. - - speccomb_mco = colamt(k,1) + refrat_m_a3*colamt(k,4) - specparm_mco = colamt(k,1) / speccomb_mco - specmult_mco = 8.0 * min(specparm_mco, oneminus) - jmco = 1 + int(specmult_mco) - fmco = mod(specmult_mco, f_one) - - speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,4) - specparm_planck = colamt(k,1) / speccomb_planck - specmult_planck = 8.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - jplp = jpl + 1 - jmco2p= jmco2+ 1 - jmcop = jmco + 1 - -! --- ... in atmospheres where the amount of co2 is too great to be considered -! a minor species, adjust the column amount of co2 by an empirical factor -! to obtain the proper contribution. - - temp = coldry(k) * 3.55e-4 - ratco2 = colamt(k,2) / temp - if (ratco2 > 3.0) then - adjfac = 2.0 + (ratco2-2.0)**0.68 - adjcolco2 = adjfac * temp - else - adjcolco2 = colamt(k,2) - endif - - if (specparm < 0.125) then - p0 = fs - f_one - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - elseif (specparm > 0.875) then - p0 = -fs - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk00 = f_one - fs - fk10 = fs - fk20 = f_zero - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk00 * fac00(k) - fac100 = fk10 * fac00(k) - fac200 = fk20 * fac00(k) - fac010 = fk00 * fac10(k) - fac110 = fk10 * fac10(k) - fac210 = fk20 * fac10(k) - - if (specparm1 < 0.125) then - p1 = fs1 - f_one - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p1 = -fs1 - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk01 = f_one - fs1 - fk11 = fs1 - fk21 = f_zero - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk01 * fac01(k) - fac101 = fk11 * fac01(k) - fac201 = fk21 * fac01(k) - fac011 = fk01 * fac11(k) - fac111 = fk11 * fac11(k) - fac211 = fk21 * fac11(k) - - do ig = 1, ng13 - tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - co2m1 = ka_mco2(ig,jmco2,indm) + fmco2 & - & * (ka_mco2(ig,jmco2p,indm) - ka_mco2(ig,jmco2,indm)) - co2m2 = ka_mco2(ig,jmco2,indmp) + fmco2 & - & * (ka_mco2(ig,jmco2p,indmp) - ka_mco2(ig,jmco2,indmp)) - absco2 = co2m1 + minorfrac(k) * (co2m2 - co2m1) - com1 = ka_mco(ig,jmco,indm) + fmco & - & * (ka_mco(ig,jmcop,indm) - ka_mco(ig,jmco,indm)) - com2 = ka_mco(ig,jmco,indmp) + fmco & - & * (ka_mco(ig,jmcop,indmp) - ka_mco(ig,jmco,indmp)) - absco = com1 + minorfrac(k) * (com2 - com1) - - taug(ns13+ig,k) = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & - & + speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & - & + tauself + taufor + adjcolco2*absco2 & - & + colamt(k,7)*absco - - fracs(ns13+ig,k) = fracrefa(ig,jpl) + fpl & - & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - indm = indminor(k) - indmp = indm + 1 - - do ig = 1, ng13 - abso3 = kb_mo3(ig,indm) + minorfrac(k) & - & * (kb_mo3(ig,indmp) - kb_mo3(ig,indm)) - - taug(ns13+ig,k) = colamt(k,3)*abso3 - - fracs(ns13+ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb13 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 14: 2250-2380 cm-1 (low - co2; high - co2) -! ---------------------------------- - subroutine taugb14 -! .................................. - -! ------------------------------------------------------------------ ! -! band 14: 2250-2380 cm-1 (low - co2; high - co2) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb14 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & ig - - real (kind=kind_phys) :: tauself, taufor -! -!===> ... begin here -! -! --- ... lower atmosphere loop - - do k = 1, laytrop - ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(14) + 1 - ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(14) + 1 - - inds = indself(k) - indf = indfor(k) - ind0p = ind0 + 1 - ind1p = ind1 + 1 - indsp = inds + 1 - indfp = indf + 1 - - do ig = 1, ng14 - tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - - taug(ns14+ig,k) = colamt(k,2) & - & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & - & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & - & + tauself + taufor - - fracs(ns14+ig,k) = fracrefa(ig) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(14) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(14) + 1 - - ind0p = ind0 + 1 - ind1p = ind1 + 1 - - do ig = 1, ng14 - taug(ns14+ig,k) = colamt(k,2) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) - - fracs(ns14+ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb14 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 15: 2380-2600 cm-1 (low - n2o,co2; low minor - n2) -!! (high - nothing) -! ---------------------------------- - subroutine taugb15 -! .................................. - -! ------------------------------------------------------------------ ! -! band 15: 2380-2600 cm-1 (low - n2o,co2; low minor - n2) ! -! (high - nothing) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb15 - -! --- locals: - integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, & - & id000, id010, id100, id110, id200, id210, jpl, jplp, & - & id001, id011, id101, id111, id201, id211, jmn2, jmn2p, & - & ig, js, js1 - - real (kind=kind_phys) :: scalen2, tauself, taufor, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_mn2, specparm_mn2, specmult_mn2, fmn2, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & refrat_planck_a, refrat_m_a, n2m1, n2m2, taun2, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21 -! -!===> ... begin here -! -! --- ... minor gas mapping level : -! lower - nitrogen continuum, P = 1053., T = 294. - -! --- ... calculate reference ratio to be used in calculation of Planck -! fraction in lower atmosphere. - - refrat_planck_a = chi_mls(4,1)/chi_mls(2,1) ! P = 1053. mb (Level 1) - refrat_m_a = chi_mls(4,1)/chi_mls(2,1) ! P = 1053. mb - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,4) + rfrate(k,5,1)*colamt(k,2) - specparm = colamt(k,4) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(15) + js - - speccomb1 = colamt(k,4) + rfrate(k,5,2)*colamt(k,2) - specparm1 = colamt(k,4) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(15) + js1 - - speccomb_mn2 = colamt(k,4) + refrat_m_a*colamt(k,2) - specparm_mn2 = colamt(k,4) / speccomb_mn2 - specmult_mn2 = 8.0 * min(specparm_mn2, oneminus) - jmn2 = 1 + int(specmult_mn2) - fmn2 = mod(specmult_mn2, f_one) - - speccomb_planck = colamt(k,4) + refrat_planck_a*colamt(k,2) - specparm_planck = colamt(k,4) / speccomb_planck - specmult_planck = 8.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - scalen2 = colbrd(k) * scaleminor(k) - - inds = indself(k) - indf = indfor(k) - indm = indminor(k) - indsp = inds + 1 - indfp = indf + 1 - indmp = indm + 1 - jplp = jpl + 1 - jmn2p = jmn2 + 1 - - if (specparm < 0.125) then - p0 = fs - f_one - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - elseif (specparm > 0.875) then - p0 = -fs - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk00 = f_one - fs - fk10 = fs - fk20 = f_zero - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk00 * fac00(k) - fac100 = fk10 * fac00(k) - fac200 = fk20 * fac00(k) - fac010 = fk00 * fac10(k) - fac110 = fk10 * fac10(k) - fac210 = fk20 * fac10(k) - - if (specparm1 < 0.125) then - p1 = fs1 - f_one - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p1 = -fs1 - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk01 = f_one - fs1 - fk11 = fs1 - fk21 = f_zero - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk01 * fac01(k) - fac101 = fk11 * fac01(k) - fac201 = fk21 * fac01(k) - fac011 = fk01 * fac11(k) - fac111 = fk11 * fac11(k) - fac211 = fk21 * fac11(k) - - do ig = 1, ng15 - tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - n2m1 = ka_mn2(ig,jmn2,indm) + fmn2 & - & * (ka_mn2(ig,jmn2p,indm) - ka_mn2(ig,jmn2,indm)) - n2m2 = ka_mn2(ig,jmn2,indmp) + fmn2 & - & * (ka_mn2(ig,jmn2p,indmp) - ka_mn2(ig,jmn2,indmp)) - taun2 = scalen2 * (n2m1 + minorfrac(k) * (n2m2 - n2m1)) - - taug(ns15+ig,k) = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & - & + speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & - & + tauself + taufor + taun2 - - fracs(ns15+ig,k) = fracrefa(ig,jpl) + fpl & - & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - do ig = 1, ng15 - taug(ns15+ig,k) = f_zero - - fracs(ns15+ig,k) = f_zero - enddo - enddo - -! .................................. - end subroutine taugb15 -! ---------------------------------- - -!>\ingroup module_radlw_main -!> Band 16: 2600-3250 cm-1 (low key- h2o,ch4; high key - ch4) -! ---------------------------------- - subroutine taugb16 -! .................................. - -! ------------------------------------------------------------------ ! -! band 16: 2600-3250 cm-1 (low key- h2o,ch4; high key - ch4) ! -! ------------------------------------------------------------------ ! - - use module_radlw_kgb16 - -! --- locals: - integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & - & id000, id010, id100, id110, id200, id210, jpl, jplp, & - & id001, id011, id101, id111, id201, id211, ig, js, js1 - - real (kind=kind_phys) :: tauself, taufor, refrat_planck_a, & - & speccomb, specparm, specmult, fs, & - & speccomb1, specparm1, specmult1, fs1, & - & speccomb_planck,specparm_planck,specmult_planck,fpl, & - & fac000, fac100, fac200, fac010, fac110, fac210, & - & fac001, fac101, fac201, fac011, fac111, fac211, & - & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21 -! -!===> ... begin here -! -! --- ... calculate reference ratio to be used in calculation of Planck -! fraction in lower atmosphere. - - refrat_planck_a = chi_mls(1,6)/chi_mls(6,6) ! P = 387. mb (Level 6) - -! --- ... lower atmosphere loop - - do k = 1, laytrop - speccomb = colamt(k,1) + rfrate(k,4,1)*colamt(k,5) - specparm = colamt(k,1) / speccomb - specmult = 8.0 * min(specparm, oneminus) - js = 1 + int(specmult) - fs = mod(specmult, f_one) - ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(16) + js - - speccomb1 = colamt(k,1) + rfrate(k,4,2)*colamt(k,5) - specparm1 = colamt(k,1) / speccomb1 - specmult1 = 8.0 * min(specparm1, oneminus) - js1 = 1 + int(specmult1) - fs1 = mod(specmult1, f_one) - ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(16) + js1 - - speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,5) - specparm_planck = colamt(k,1) / speccomb_planck - specmult_planck = 8.0 * min(specparm_planck, oneminus) - jpl = 1 + int(specmult_planck) - fpl = mod(specmult_planck, f_one) - - inds = indself(k) - indf = indfor(k) - indsp = inds + 1 - indfp = indf + 1 - jplp = jpl + 1 - - if (specparm < 0.125) then - p0 = fs - f_one - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 + 2 - id210 = ind0 +11 - elseif (specparm > 0.875) then - p0 = -fs - p40 = p0**4 - fk00 = p40 - fk10 = f_one - p0 - 2.0*p40 - fk20 = p0 + p40 - - id000 = ind0 + 1 - id010 = ind0 +10 - id100 = ind0 - id110 = ind0 + 9 - id200 = ind0 - 1 - id210 = ind0 + 8 - else - fk00 = f_one - fs - fk10 = fs - fk20 = f_zero - - id000 = ind0 - id010 = ind0 + 9 - id100 = ind0 + 1 - id110 = ind0 +10 - id200 = ind0 - id210 = ind0 - endif - - fac000 = fk00 * fac00(k) - fac100 = fk10 * fac00(k) - fac200 = fk20 * fac00(k) - fac010 = fk00 * fac10(k) - fac110 = fk10 * fac10(k) - fac210 = fk20 * fac10(k) - - if (specparm1 < 0.125) then - p1 = fs1 - f_one - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 + 2 - id211 = ind1 +11 - elseif (specparm1 > 0.875) then - p1 = -fs1 - p41 = p1**4 - fk01 = p41 - fk11 = f_one - p1 - 2.0*p41 - fk21 = p1 + p41 - - id001 = ind1 + 1 - id011 = ind1 +10 - id101 = ind1 - id111 = ind1 + 9 - id201 = ind1 - 1 - id211 = ind1 + 8 - else - fk01 = f_one - fs1 - fk11 = fs1 - fk21 = f_zero - - id001 = ind1 - id011 = ind1 + 9 - id101 = ind1 + 1 - id111 = ind1 +10 - id201 = ind1 - id211 = ind1 - endif - - fac001 = fk01 * fac01(k) - fac101 = fk11 * fac01(k) - fac201 = fk21 * fac01(k) - fac011 = fk01 * fac11(k) - fac111 = fk11 * fac11(k) - fac211 = fk21 * fac11(k) - - do ig = 1, ng16 - tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & - & * (selfref(ig,indsp) - selfref(ig,inds))) - taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & - & * (forref(ig,indfp) - forref(ig,indf))) - - taug(ns16+ig,k) = speccomb & - & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & - & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & - & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & - & + speccomb1 & - & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & - & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & - & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & - & + tauself + taufor - - fracs(ns16+ig,k) = fracrefa(ig,jpl) + fpl & - & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) - enddo - enddo - -! --- ... upper atmosphere loop - - do k = laytrop+1, nlay - ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(16) + 1 - ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(16) + 1 - - ind0p = ind0 + 1 - ind1p = ind1 + 1 - - do ig = 1, ng16 - taug(ns16+ig,k) = colamt(k,5) & - & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & - & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) - - fracs(ns16+ig,k) = fracrefb(ig) - enddo - enddo - -! .................................. - end subroutine taugb16 -! ---------------------------------- - -! .................................. - end subroutine taumol -!! @} -!----------------------------------- - -!mz* exponential cloud overlapping subroutines -!------------------------------------------------------------------ -! Public subroutines -!------------------------------------------------------------------ -! mz* - Add height needed for exponential and exponential-random cloud overlap methods (icld=4 and 5, respectively) -! mz* - cldfmcl only *temporary - subroutine mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, & - & irng, play, hgt, & - & cldfrac, ciwp, clwp, cswp, rei, rel, res, tauc, & - & cldfmcl) -!mz* the below output need to be compatible with cldprop() -!mz ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, resnmcl, taucmcl) - - use machine, only : im => kind_io4, rb => kind_phys -! ----- Input ----- -! Control - integer(kind=im), intent(in) :: iplon ! column/longitude index - integer(kind=im), intent(in) :: ncol ! number of columns - integer(kind=im), intent(in) :: nlay ! number of model layers - integer(kind=im), intent(in) :: icld ! clear/cloud, cloud overlap flag - integer(kind=im), intent(in) :: permuteseed ! if the cloud generator is called multiple times, - ! permute the seed between each call. - ! between calls for LW and SW, recommended - ! permuteseed differes by 'ngpt' - integer(kind=im), intent(inout) :: irng ! flag for random number generator - ! 0 = kissvec - ! 1 = Mersenne - ! Twister - -! Atmosphere - real(kind=rb), intent(in) :: play(:,:) ! layer pressures (mb) - ! Dimensions: (ncol,nlay) - -! mji - Add height - real(kind=rb), intent(in) :: hgt(:,:) ! layer height (m) - ! Dimensions: (ncol,nlay) - -! Atmosphere/clouds - cldprop - real(kind=rb), intent(in) :: cldfrac(:,:) ! layer cloud fraction - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: tauc(:,:,:) ! in-cloud optical depth - ! Dimensions: (nbndlw,ncol,nlay) -! real(kind=rb), intent(in) :: ssac(:,:,:) ! in-cloud single scattering albedo - ! Dimensions: (nbndlw,ncol,nlay) -! real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter - ! Dimensions: (nbndlw,ncol,nlay) - real(kind=rb), intent(in) :: ciwp(:,:) ! in-cloud ice water path - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: clwp(:,:) ! in-cloud liquid water path - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: cswp(:,:) ! in-cloud snow path - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: rei(:,:) ! cloud ice particle size - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: rel(:,:) ! cloud liquid particle size - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: res(:,:) ! snow particle size - ! Dimensions: (ncol,nlay) - -! ----- Output ----- -! Atmosphere/clouds - cldprmc [mcica] - real(kind=rb), intent(out) :: cldfmcl(:,:,:) ! cloud fraction [mcica] - ! Dimensions: (ngptlw,ncol,nlay) -!mz* not activate, temporary local vars - real(kind=rb),dimension(ngptlw,ncol,nlay) :: ciwpmcl ! in-cloud ice water path [mcica] - ! Dimensions: (ngptlw,ncol,nlay) - real(kind=rb),dimension(ngptlw,ncol,nlay) :: clwpmcl ! in-cloud liquid water path [mcica] - ! Dimensions: (ngptlw,ncol,nlay) - real(kind=rb),dimension(ngptlw,ncol,nlay) :: cswpmcl ! in-cloud snow path [mcica] - ! Dimensions: (ngptlw,ncol,nlay) - real(kind=rb),dimension(ncol,nlay) :: relqmcl ! liquid particle size (microns) - ! Dimensions: (ncol,nlay) - real(kind=rb),dimension(ncol,nlay) :: reicmcl ! ice partcle size (microns) - ! Dimensions: (ncol,nlay) - real(kind=rb),dimension(ncol,nlay) :: resnmcl ! snow partcle size (microns) - ! Dimensions: (ncol,nlay) - real(kind=rb),dimension(ngptlw,ncol,nlay) :: taucmcl ! in-cloud optical depth [mcica] -!mz* - ! Dimensions: (ngptlw,ncol,nlay) -! real(kind=rb), intent(out) :: ssacmcl(:,:,:) ! in-cloud single scattering albedo [mcica] - ! Dimensions: (ngptlw,ncol,nlay) -! real(kind=rb), intent(out) :: asmcmcl(:,:,:) ! in-cloud asymmetry parameter [mcica] - ! Dimensions: (ngptlw,ncol,nlay) -! ----- Local ----- - -! Stochastic cloud generator variables [mcica] - integer(kind=im), parameter :: nsubclw = ngptlw ! number of sub-columns (g-point intervals) - integer(kind=im) :: ilev ! loop index - - real(kind=rb) :: pmid(ncol, nlay) ! layer pressures (Pa) -! real(kind=rb) :: pdel(ncol, nlay) ! layer pressure thickness (Pa) -! real(kind=rb) :: qi(ncol, nlay) ! ice water (specific humidity) -! real(kind=rb) :: ql(ncol, nlay) ! liq water (specific humidity) - -! Return if clear sky - if (icld.eq.0) return - -! NOTE: For GCM mode, permuteseed must be offset between LW and SW by at least the number of subcolumns - - -! Pass particle sizes to new arrays, no subcolumns for these properties yet -! Convert pressures from mb to Pa - - reicmcl(:ncol,:nlay) = rei(:ncol,:nlay) - relqmcl(:ncol,:nlay) = rel(:ncol,:nlay) - resnmcl(:ncol,:nlay) = res(:ncol,:nlay) - pmid(:ncol,:nlay) = play(:ncol,:nlay)*1.e2_rb - -! Generate the stochastic subcolumns of cloud optical properties for -! the longwave - call generate_stochastic_clouds (ncol, nlay, nsubclw, icld, irng, & - & pmid, hgt, cldfrac, clwp, ciwp, cswp, tauc, & - & cldfmcl, clwpmcl, ciwpmcl, cswpmcl, & - & taucmcl, permuteseed) - - end subroutine mcica_subcol_lw -!------------------------------------------------------------------------------------------------- - subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, & - & irng, pmid, hgt, cld, clwp, ciwp, cswp, tauc, & - & cld_stoch, clwp_stoch, ciwp_stoch, & - & cswp_stoch, tauc_stoch, changeSeed) -!------------------------------------------------------------------------------------------------- -!------------------------------------------------------------------------------------------------- -! Contact: Cecile Hannay (hannay@ucar.edu) -! -! Original code: Based on Raisanen et al., QJRMS, 2004. -! -! Modifications: -! 1) Generalized for use with RRTMG and added Mersenne Twister as the default -! random number generator, which can be changed to the optional kissvec random number generator -! with flag 'irng'. Some extra functionality has been commented or removed. -! Michael J. Iacono, AER, Inc., February 2007 -! 2) Activated exponential and exponential/random cloud overlap method -! Michael J. Iacono, AER, November 2017 -! -! Given a profile of cloud fraction, cloud water and cloud ice, we produce a set of subcolumns. -! Each layer within each subcolumn is homogeneous, with cloud fraction equal to zero or one -! and uniform cloud liquid and cloud ice concentration. -! The ensemble as a whole reproduces the probability function of cloud liquid and ice within each layer -! and obeys an overlap assumption in the vertical. -! -! Overlap assumption: -! The cloud are consistent with 5 overlap assumptions: random, maximum, maximum-random, exponential and exponential random. -! The default option is maximum-random (option 2) -! The options are: 1=random overlap, 2=max/random, 3=maximum overlap, 4=exponential overlap, 5=exp/random -! This is set with the variable "overlap" -! The exponential overlap uses also a length scale, Zo. (real, parameter :: Zo = 2500. ) -! -! Seed: -! If the stochastic cloud generator is called several times during the same timestep, -! one should change the seed between the call to insure that the -! subcolumns are different. -! This is done by changing the argument 'changeSeed' -! For example, if one wants to create a set of columns for the -! shortwave and another set for the longwave , -! use 'changeSeed = 1' for the first call and'changeSeed = 2' for the second call - -! PDF assumption: -! We can use arbitrary complicated PDFS. -! In the present version, we produce homogeneuous clouds (the simplest case). -! Future developments include using the PDF scheme of Ben Johnson. -! -! History file: -! Option to add diagnostics variables in the history file. (using FINCL in the namelist) -! nsubcol = number of subcolumns -! overlap = overlap type (1-3) -! Zo = length scale -! CLOUD_S = mean of the subcolumn cloud fraction ('_S" means Stochastic) -! CLDLIQ_S = mean of the subcolumn cloud water -! CLDICE_S = mean of the subcolumn cloud ice -! -! Note: -! Here: we force that the cloud condensate to be consistent with the cloud fraction -! i.e we only have cloud condensate when the cell is cloudy. -! In CAM: The cloud condensate and the cloud fraction are obtained from 2 different equations -! and the 2 quantities can be inconsistent (i.e. CAM can produce cloud fraction -! without cloud condensate or the opposite). -!----------------------------------------------------------------- - - use mcica_random_numbers -! The Mersenne Twister random number engine - use MersenneTwister, only: randomNumberSequence, & - & new_RandomNumberSequence, getRandomReal - use machine ,only : im => kind_io4, rb => kind_phys - - type(randomNumberSequence) :: randomNumbers - -! -- Arguments - - integer(kind=im), intent(in) :: ncol ! number of columns - integer(kind=im), intent(in) :: nlay ! number of layers - integer(kind=im), intent(in) :: icld ! clear/cloud, cloud overlap flag - integer(kind=im), intent(inout) :: irng ! flag for random number generator - ! 0 = kissvec - ! 1 = Mersenne Twister - integer(kind=im), intent(in) :: nsubcol ! number of sub-columns (g-point intervals) - integer(kind=im), optional, intent(in) :: changeSeed ! allows permuting seed - -! Column state (cloud fraction, cloud water, cloud ice) + variables needed to read physics state - real(kind=rb), intent(in) :: pmid(:,:) ! layer pressure (Pa) - ! Dimensions: (ncol,nlay) - - real(kind=rb), intent(in) :: hgt(:,:) ! layer height (m) - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: cld(:,:) ! cloud fraction - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: clwp(:,:) ! in-cloud liquid water path - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: ciwp(:,:) ! in-cloud ice water path - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: cswp(:,:) ! in-cloud snow path - ! Dimensions: (ncol,nlay) - real(kind=rb), intent(in) :: tauc(:,:,:) ! in-cloud optical depth - ! Dimensions:(nbndlw,ncol,nlay) -! real(kind=rb), intent(in) :: ssac(:,:,:) ! in-cloud single scattering albedo - ! Dimensions: (nbndlw,ncol,nlay) - ! inactive - for future expansion -! real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter - ! Dimensions: (nbndlw,ncol,nlay) - ! inactive - for future expansion - - real(kind=rb), intent(out) :: cld_stoch(:,:,:) ! subcolumn cloud fraction - ! Dimensions: (ngptlw,ncol,nlay) - real(kind=rb), intent(out) :: clwp_stoch(:,:,:) ! subcolumn in-cloud liquid water path - ! Dimensions: (ngptlw,ncol,nlay) - real(kind=rb), intent(out) :: ciwp_stoch(:,:,:) ! subcolumn in-cloud ice water path - ! Dimensions: (ngptlw,ncol,nlay) - real(kind=rb), intent(out) :: cswp_stoch(:,:,:) ! subcolumn in-cloud snow path - ! Dimensions: (ngptlw,ncol,nlay) - real(kind=rb), intent(out) :: tauc_stoch(:,:,:) ! subcolumn in-cloud optical depth - ! Dimensions: (ngptlw,ncol,nlay) -! real(kind=rb), intent(out) :: ssac_stoch(:,:,:)! subcolumn in-cloud single scattering albedo - ! Dimensions: (ngptlw,ncol,nlay) - ! inactive - for future expansion -! real(kind=rb), intent(out) :: asmc_stoch(:,:,:)! subcolumn in-cloud asymmetry parameter - ! Dimensions: (ngptlw,ncol,nlay) - ! inactive - for future expansion - -! -- Local variables - real(kind=rb) :: cldf(ncol,nlay) ! cloud fraction - -! Mean over the subcolumns (cloud fraction, cloud water , cloud ice) - inactive -! real(kind=rb) :: mean_cld_stoch(ncol, nlay) ! cloud fraction -! real(kind=rb) :: mean_clwp_stoch(ncol, nlay) ! cloud water -! real(kind=rb) :: mean_ciwp_stoch(ncol, nlay) ! cloud ice -! real(kind=rb) :: mean_tauc_stoch(ncol, nlay) ! cloud optical depth -! real(kind=rb) :: mean_ssac_stoch(ncol, nlay) ! cloud single scattering albedo -! real(kind=rb) :: mean_asmc_stoch(ncol, nlay) ! cloud asymmetry parameter - -! Set overlap - integer(kind=im) :: overlap ! 1 = random overlap, 2 = maximum-random, - ! 3 = maximum overlap, 4 = exponential, - ! 5 = exponential-random - real(kind=rb), parameter :: Zo = 2500._rb ! length scale (m) - real(kind=rb), dimension(ncol,nlay) :: alpha ! overlap parameter - -! Constants (min value for cloud fraction and cloud water and ice) - real(kind=rb), parameter :: cldmin = 1.0e-20_rb ! min cloud fraction -! real(kind=rb), parameter :: qmin = 1.0e-10_rb ! min cloud water and cloud ice (not used) - -! Variables related to random number and seed - real(kind=rb), dimension(nsubcol, ncol, nlay) :: CDF, CDF2 !random numbers - integer(kind=im), dimension(ncol) :: seed1, seed2, seed3, seed4 !seed to create random number (kissvec) - real(kind=rb), dimension(ncol) :: rand_num ! random number (kissvec) - integer(kind=im) :: iseed ! seed to create random number (Mersenne Teister) - real(kind=rb) :: rand_num_mt ! random number (Mersenne Twister) - -! Flag to identify cloud fraction in subcolumns - logical, dimension(nsubcol, ncol, nlay) :: iscloudy ! flag that says whether a gridbox is cloudy - -! Indices - integer(kind=im) :: ilev, isubcol, i, n ! indices - -!------------------------------------------------------------------- - -! Check that irng is in bounds; if not, set to default - if (irng .ne. 0) irng = 1 - -! Pass input cloud overlap setting to local variable - overlap = icld - -! Ensure that cloud fractions are in bounds - do ilev = 1, nlay - do i = 1, ncol - cldf(i,ilev) = cld(i,ilev) - if (cldf(i,ilev) < cldmin) then - cldf(i,ilev) = 0._rb - endif - enddo - enddo - -! ----- Create seed -------- - -! Advance randum number generator by changeseed values - if (irng.eq.0) then -! For kissvec, create a seed that depends on the state of the columns. Maybe not the best way, but it works. -! Must use pmid from bottom four layers. - do i=1,ncol - if (pmid(i,1).lt.pmid(i,2)) then - stop 'MCICA_SUBCOL: KISSVEC SEED GENERATOR REQUIRES PMID & - & FROM BOTTOM FOUR LAYERS.' - endif - seed1(i) = (pmid(i,1) - int(pmid(i,1))) * 1000000000_im - seed2(i) = (pmid(i,2) - int(pmid(i,2))) * 1000000000_im - seed3(i) = (pmid(i,3) - int(pmid(i,3))) * 1000000000_im - seed4(i) = (pmid(i,4) - int(pmid(i,4))) * 1000000000_im - enddo - do i=1,changeSeed - call kissvec(seed1, seed2, seed3, seed4, rand_num) - enddo - elseif (irng.eq.1) then - randomNumbers = new_RandomNumberSequence(seed = changeSeed) - endif - -! ------ Apply overlap assumption -------- - -! generate the random numbers - - select case (overlap) - - case(1) -! Random overlap -! i) pick a random value at every level - - if (irng.eq.0) then - do isubcol = 1,nsubcol - do ilev = 1,nlay - call kissvec(seed1, seed2, seed3, seed4, rand_num) ! we get different random number for each level - CDF(isubcol,:,ilev) = rand_num - enddo - enddo - elseif (irng.eq.1) then - do isubcol = 1, nsubcol - do i = 1, ncol - do ilev = 1, nlay - rand_num_mt = getRandomReal(randomNumbers) - CDF(isubcol,i,ilev) = rand_num_mt - enddo - enddo - enddo - endif - - case(2) -! Maximum-Random overlap -! i) pick a random number for top layer. -! ii) walk down the column: -! - if the layer above is cloudy, we use the same random number than in the layer above -! - if the layer above is clear, we use a new random number - - if (irng.eq.0) then - do isubcol = 1,nsubcol - do ilev = 1,nlay - call kissvec(seed1, seed2, seed3, seed4, rand_num) - CDF(isubcol,:,ilev) = rand_num - enddo - enddo - elseif (irng.eq.1) then - do isubcol = 1, nsubcol - do i = 1, ncol - do ilev = 1, nlay - rand_num_mt = getRandomReal(randomNumbers) - CDF(isubcol,i,ilev) = rand_num_mt - enddo - enddo - enddo - endif - - do ilev = 2,nlay - do i = 1, ncol - do isubcol = 1, nsubcol - if (CDF(isubcol, i, ilev-1) > 1._rb - cldf(i,ilev-1) )& - & then - CDF(isubcol,i,ilev) = CDF(isubcol,i,ilev-1) - else - CDF(isubcol,i,ilev) = CDF(isubcol,i,ilev) * (1._rb & - & - cldf(i,ilev-1)) - endif - enddo - enddo - enddo - - case(3) -! Maximum overlap -! i) pick the same random numebr at every level - - if (irng.eq.0) then - do isubcol = 1,nsubcol - call kissvec(seed1, seed2, seed3, seed4, rand_num) - do ilev = 1,nlay - CDF(isubcol,:,ilev) = rand_num - enddo - enddo - elseif (irng.eq.1) then - do isubcol = 1, nsubcol - do i = 1, ncol - rand_num_mt = getRandomReal(randomNumbers) - do ilev = 1, nlay - CDF(isubcol,i,ilev) = rand_num_mt - enddo - enddo - enddo - endif - -! mji - Activate exponential cloud overlap option - case(4) - ! Exponential overlap: weighting between maximum and random overlap increases with the distance. - ! The random numbers for exponential overlap verify: - ! j=1 RAN(j)=RND1 - ! j>1 if RND1 < alpha(j,j-1) => RAN(j) = RAN(j-1) - ! RAN(j) = RND2 - ! alpha is obtained from the equation - ! alpha = exp(-(Z(j)-Z(j-1))/Zo) where Zo is a characteristic length scale - - ! compute alpha - do i = 1, ncol - alpha(i, 1) = 0._rb - do ilev = 2,nlay - alpha(i, ilev) = exp( -( hgt (i, ilev) - & - & hgt (i, ilev-1)) / Zo) - enddo - enddo - - ! generate 2 streams of random numbers - if (irng.eq.0) then - do isubcol = 1,nsubcol - do ilev = 1,nlay - call kissvec(seed1, seed2, seed3, seed4, rand_num) - CDF(isubcol, :, ilev) = rand_num - call kissvec(seed1, seed2, seed3, seed4, rand_num) - CDF2(isubcol, :, ilev) = rand_num - enddo - enddo - elseif (irng.eq.1) then - do isubcol = 1, nsubcol - do i = 1, ncol - do ilev = 1, nlay - rand_num_mt = getRandomReal(randomNumbers) - CDF(isubcol,i,ilev) = rand_num_mt - rand_num_mt = getRandomReal(randomNumbers) - CDF2(isubcol,i,ilev) = rand_num_mt - enddo - enddo - enddo - endif - - ! generate random numbers - do ilev = 2,nlay - where (CDF2(:, :, ilev) < spread(alpha (:,ilev), & - & dim=1,nCopies=nsubcol) ) - CDF(:,:,ilev) = CDF(:,:,ilev-1) - end where - end do - -! Activate exponential-random cloud overlap option - case(5) - ! Exponential-random overlap: -!mz* call wrf_error_fatal("Cloud Overlap case 5: ER has not yet & -! been implemented. Stopping...") - - end select - -! -- generate subcolumns for homogeneous clouds ----- - do ilev = 1,nlay - iscloudy(:,:,ilev) = (CDF(:,:,ilev) >= 1._rb - & - & spread(cldf(:,ilev), dim=1, nCopies=nsubcol) ) - enddo - -! where the subcolumn is cloudy, the subcolumn cloud fraction is 1; -! where the subcolumn is not cloudy, the subcolumn cloud fraction is 0; -! where there is a cloud, define the subcolumn cloud properties, -! otherwise set these to zero - - do ilev = 1,nlay - do i = 1, ncol - do isubcol = 1, nsubcol - if (iscloudy(isubcol,i,ilev) ) then - cld_stoch(isubcol,i,ilev) = 1._rb - clwp_stoch(isubcol,i,ilev) = clwp(i,ilev) - ciwp_stoch(isubcol,i,ilev) = ciwp(i,ilev) - cswp_stoch(isubcol,i,ilev) = cswp(i,ilev) - n = ngb(isubcol) - tauc_stoch(isubcol,i,ilev) = tauc(n,i,ilev) -! ssac_stoch(isubcol,i,ilev) = ssac(n,i,ilev) -! asmc_stoch(isubcol,i,ilev) = asmc(n,i,ilev) - else - cld_stoch(isubcol,i,ilev) = 0._rb - clwp_stoch(isubcol,i,ilev) = 0._rb - ciwp_stoch(isubcol,i,ilev) = 0._rb - cswp_stoch(isubcol,i,ilev) = 0._rb - tauc_stoch(isubcol,i,ilev) = 0._rb -! ssac_stoch(isubcol,i,ilev) = 1._rb -! asmc_stoch(isubcol,i,ilev) = 1._rb - endif - enddo - enddo - enddo - -! -- compute the means of the subcolumns --- -! mean_cld_stoch(:,:) = 0._rb -! mean_clwp_stoch(:,:) = 0._rb -! mean_ciwp_stoch(:,:) = 0._rb -! mean_tauc_stoch(:,:) = 0._rb -! mean_ssac_stoch(:,:) = 0._rb -! mean_asmc_stoch(:,:) = 0._rb -! do i = 1, nsubcol -! mean_cld_stoch(:,:) = cld_stoch(i,:,:) + mean_cld_stoch(:,:) -! mean_clwp_stoch(:,:) = clwp_stoch( i,:,:) + mean_clwp_stoch(:,:) -! mean_ciwp_stoch(:,:) = ciwp_stoch( i,:,:) + mean_ciwp_stoch(:,:) -! mean_tauc_stoch(:,:) = tauc_stoch( i,:,:) + mean_tauc_stoch(:,:) -! mean_ssac_stoch(:,:) = ssac_stoch( i,:,:) + mean_ssac_stoch(:,:) -! mean_asmc_stoch(:,:) = asmc_stoch( i,:,:) + mean_asmc_stoch(:,:) -! end do -! mean_cld_stoch(:,:) = mean_cld_stoch(:,:) / nsubcol -! mean_clwp_stoch(:,:) = mean_clwp_stoch(:,:) / nsubcol -! mean_ciwp_stoch(:,:) = mean_ciwp_stoch(:,:) / nsubcol -! mean_tauc_stoch(:,:) = mean_tauc_stoch(:,:) / nsubcol -! mean_ssac_stoch(:,:) = mean_ssac_stoch(:,:) / nsubcol -! mean_asmc_stoch(:,:) = mean_asmc_stoch(:,:) / nsubcol - - end subroutine generate_stochastic_clouds - -!------------------------------------------------------------------ -! Private subroutines -!------------------------------------------------------------------ - -!----------------------------------------------------------------- - subroutine kissvec(seed1,seed2,seed3,seed4,ran_arr) -!---------------------------------------------------------------- - -! public domain code -! made available from http://www.fortran.com/ -! downloaded by pjr on 03/16/04 for NCAR CAM -! converted to vector form, functions inlined by pjr,mvr on 05/10/2004 - -! The KISS (Keep It Simple Stupid) random number generator. Combines: -! (1) The congruential generator x(n)=69069*x(n-1)+1327217885, period 2^32. -! (2) A 3-shift shift-register generator, period 2^32-1, -! (3) Two 16-bit multiply-with-carry generators, period 597273182964842497>2^59 -! Overall period>2^123; - real(kind=rb), dimension(:), intent(inout) :: ran_arr - integer(kind=im), dimension(:), intent(inout) :: seed1,seed2,seed3& - & ,seed4 - integer(kind=im) :: i,sz,kiss - integer(kind=im) :: m, k, n - -! inline function - m(k, n) = ieor (k, ishft (k, n) ) - - sz = size(ran_arr) - do i = 1, sz - seed1(i) = 69069_im * seed1(i) + 1327217885_im - seed2(i) = m (m (m (seed2(i), 13_im), - 17_im), 5_im) - seed3(i) = 18000_im * iand (seed3(i), 65535_im) + & - & ishft (seed3(i), - 16_im) - seed4(i) = 30903_im * iand (seed4(i), 65535_im) + & - & ishft (seed4(i), - 16_im) - kiss = seed1(i) + seed2(i) + ishft (seed3(i), 16_im) + seed4(i) - ran_arr(i) = kiss*2.328306e-10_rb + 0.5_rb - end do - - end subroutine kissvec -! - -!........................................!$ - end module rrtmg_lw !$ -!========================================!$ diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 73977e5cb..4d2e5fa42 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -371,6 +371,22 @@ kind = kind_phys intent = in optional = T +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From bb68108abe5bf6d5101dd8eb451d562bdd30267d Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Tue, 17 Mar 2020 10:08:38 -0600 Subject: [PATCH 074/404] HWRF RRTMG cloud-rad interaction --- physics/GFS_rrtmg_pre.F90 | 6 +--- physics/GFS_rrtmg_pre.meta | 18 +++++------ physics/GFS_rrtmg_setup.F90 | 33 +++++++++++--------- physics/GFS_rrtmg_setup.meta | 20 ++++++------- physics/radiation_clouds.f | 24 +++++++++++---- physics/radlw_main.meta | 34 +++++++++++++++------ physics/radsw_main.f | 10 +++---- physics/radsw_main.meta | 58 ++++++++++++++++++++++++++++++------ 8 files changed, 136 insertions(+), 67 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 165411a33..92f21683a 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -81,7 +81,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input type(GFS_sfcprop_type), intent(in) :: Sfcprop type(GFS_statein_type), intent(in) :: Statein type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_tbd_type), intent(in) :: Tbd + type(GFS_tbd_type), intent(inout) :: Tbd type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling @@ -724,10 +724,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input gridkm = 1.414*SQRT(dx(1)*0.001*dx(1)*0.001 ) - ! if(mpirank == mpiroot) then - ! write(0,*)'cldfra3: max/min(plyrpa) = ', maxval(plyrpa), minval(plyrpa) - ! write(0,*)'cldfra3: max/min(rho) = ', maxval(rho), minval(rho) - ! endif if(Model%icloud == 3) then diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 198cd0a5a..716090962 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -436,7 +436,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -445,7 +445,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -454,7 +454,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -463,7 +463,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -472,7 +472,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -481,7 +481,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -490,7 +490,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -499,7 +499,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -508,7 +508,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmg_setup.F90 b/physics/GFS_rrtmg_setup.F90 index b6d86a34e..043ea8560 100644 --- a/physics/GFS_rrtmg_setup.F90 +++ b/physics/GFS_rrtmg_setup.F90 @@ -5,9 +5,9 @@ module GFS_rrtmg_setup use physparam, only : isolar , ictmflg, ico2flg, ioznflg, iaerflg,& ! & iaermdl, laswflg, lalwflg, lavoflg, icldflg, & & iaermdl, icldflg, & - & iovrsw , iovrlw , lcrick , lcnorm , lnoprec, & - & ialbflg, iemsflg, isubcsw, isubclw, ivflip , ipsd0, & - & iswcliq, & + & lcrick , lcnorm , lnoprec, & + & ialbflg, iemsflg, ivflip , ipsd0, & +! & iswcliq, & & kind_phys use radcons, only: ltp, lextop @@ -136,6 +136,7 @@ subroutine GFS_rrtmg_setup_init ( & ! =1: max/ran overlapping clouds ! ! =2: maximum overlap clouds (mcica only) ! ! =3: decorrelation-length overlap (mcica only) ! +! =4: exponential overlap clouds ! isubc_sw/isubc_lw: sub-column cloud approx control flag (sw/lw rad) ! ! =0: with out sub-column cloud approximation ! ! =1: mcica sub-col approx. prescribed random seed ! @@ -177,8 +178,8 @@ subroutine GFS_rrtmg_setup_init ( & integer, intent(in) :: num_p3d integer, intent(in) :: npdf3d integer, intent(in) :: ntoz - integer, intent(in) :: iovr_sw - integer, intent(in) :: iovr_lw + integer, intent(inout) :: iovr_sw + integer, intent(inout) :: iovr_lw integer, intent(in) :: isubc_sw integer, intent(in) :: isubc_lw integer, intent(in) :: icliq_sw @@ -204,6 +205,8 @@ subroutine GFS_rrtmg_setup_init ( & real(kind_phys), dimension(im,NSPC1) :: aerodp_check ! End for consistency checks + integer :: iswcliq + ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 @@ -268,14 +271,14 @@ subroutine GFS_rrtmg_setup_init ( & iswcliq = icliq_sw ! optical property for liquid clouds for sw - iovrsw = iovr_sw ! cloud overlapping control flag for sw - iovrlw = iovr_lw ! cloud overlapping control flag for lw + ! iovrsw = iovr_sw ! cloud overlapping control flag for sw + ! iovrlw = iovr_lw ! cloud overlapping control flag for lw lcrick = crick_proof ! control flag for eliminating CRICK lcnorm = ccnorm ! control flag for in-cld condensate lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) - isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation - isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation +! isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation +! isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation ialbflg= ialb ! surface albedo control flag iemsflg= iems ! surface emissivity control flag @@ -303,7 +306,7 @@ subroutine GFS_rrtmg_setup_init ( & call radinit & ! --- inputs: - & ( si, levr, imp_physics, me ) + & ( si, levr, imp_physics,iswcliq, iovr_lw, iovr_sw, isubc_lw, isubc_sw, me ) ! --- outputs: ! ( none ) @@ -384,7 +387,7 @@ end subroutine GFS_rrtmg_setup_finalize ! Private functions - subroutine radinit( si, NLAY, imp_physics, me ) + subroutine radinit( si, NLAY, imp_physics,iswcliq, iovrlw,iovrsw,isubclw,isubcsw, me ) !................................... ! --- inputs: @@ -509,8 +512,10 @@ subroutine radinit( si, NLAY, imp_physics, me ) implicit none ! --- inputs: - integer, intent(in) :: NLAY, me, imp_physics + integer, intent(in) :: NLAY, me, imp_physics, & + & isubclw,isubcsw,iswcliq + integer, intent(inout) :: iovrlw,iovrsw real (kind=kind_phys), intent(in) :: si(:) ! --- outputs: (none, to module variables) @@ -619,9 +624,9 @@ subroutine radinit( si, NLAY, imp_physics, me ) call cld_init ( si, NLAY, imp_physics, me) ! --- ... cloud initialization routine - call rlwinit ( me ) ! --- ... lw radiation initialization routine + call rlwinit (iovrlw,isubclw, me ) ! --- ... lw radiation initialization routine - call rswinit ( me ) ! --- ... sw radiation initialization routine + call rswinit (iswcliq, iovrsw,isubcsw, me ) ! --- ... sw radiation initialization routine ! return !................................... diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 8405d160d..4f96b76f1 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -107,32 +107,32 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation - long_name = sw: max-random overlap clouds + standard_name = flag_for_cloud_overlapping_method_for_shortwave_radiation + long_name = control flag for cloud overlapping method for SW units = flag dimensions = () type = integer - intent = in + intent = inout optional = F [iovr_lw] - standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation - long_name = lw: max-random overlap clouds + standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation + long_name = control flag for cloud overlapping method for LW units = flag dimensions = () type = integer - intent = in + intent = inout optional = F [isubc_sw] - standard_name = flag_for_sw_clouds_without_sub_grid_approximation - long_name = flag for sw clouds without sub-grid approximation + standard_name = flag_for_sw_clouds_grid_approximation + long_name = flag for sw clouds sub-grid approximation units = flag dimensions = () type = integer intent = in optional = F [isubc_lw] - standard_name = flag_for_lw_clouds_without_sub_grid_approximation - long_name = flag for lw clouds without sub-grid approximation + standard_name = flag_for_lw_clouds_sub_grid_approximation + long_name = flag for lw clouds sub-grid approximation units = flag dimensions = () type = integer diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index c259fc22e..2a1184e99 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -2436,8 +2436,12 @@ subroutine progcld5 & logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, tvly, qlyr, qstl, rhly, cldcov, delp, dz, & - & re_cloud, re_ice, re_snow + & tlyr, tvly, qlyr, qstl, rhly, cldcov, delp, dz +! & re_cloud, re_ice, re_snow + +!mz: for diagnostics purpose + real (kind=kind_phys), dimension(:,:), intent(inout) :: & + & re_cloud, re_ice, re_snow real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw @@ -2689,9 +2693,11 @@ subroutine progcld5 & else rei(i,k) = (1250.0/9.387) * tem3 ** 0.031 endif +! if (icloud == 3 ) then rei(i,k) = max(25.,rei(i,k)) !mz* HWRF -!mz GFDL +! else !mz GFDL ! rei(i,k) = max(10.0, min(rei(i,k), 150.0)) +! endif endif rei(i,k) = min(rei(i,k), 135.72) !- 1.0315*rei<= 140 microns enddo @@ -2699,7 +2705,7 @@ subroutine progcld5 & !mz !> -# Compute effective snow cloud droplet radius - do k = 1, NLAY + do k = 1, NLAY do i = 1, IX res(i,k) = 10.0 enddo @@ -2717,8 +2723,14 @@ subroutine progcld5 & clouds(i,k,5) = rei(i,k) clouds(i,k,6) = crp(i,k) ! added for Thompson clouds(i,k,7) = rer(i,k) - clouds(i,k,8) = csp(i,k) ! added for Thompson - clouds(i,k,9) = res(i,k) + !mz inflg .ne.5 + clouds(i,k,8) = 0. + clouds(i,k,9) = 10. +!mz for diagnostics? + re_cloud(i,k) =rew(i,k) + re_ice(i,k) =rei(i,k) + re_snow(i,k) = 10. + enddo enddo diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 4d2e5fa42..6fc58d635 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -207,6 +207,22 @@ kind = kind_phys intent = in optional = F +[iovrlw] + standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation + long_name = control flag for cloud overlapping method for LW + units = flag + dimensions = () + type = integer + intent = in + optional = F +[isubclw] + standard_name = flag_for_lw_clouds_sub_grid_approximation + long_name = flag for lw clouds sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in + optional = F [npts] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -243,7 +259,7 @@ standard_name = total_cloud_fraction long_name = total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -303,7 +319,7 @@ standard_name = cloud_liquid_water_path long_name = cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -312,7 +328,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -321,7 +337,7 @@ standard_name = cloud_ice_water_path long_name = cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -330,7 +346,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -339,7 +355,7 @@ standard_name = cloud_rain_water_path long_name = cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -348,7 +364,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -357,7 +373,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -366,7 +382,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in diff --git a/physics/radsw_main.f b/physics/radsw_main.f index b10541fb7..30bc58bba 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -268,7 +268,7 @@ !! code from aer inc. module rrtmg_sw ! - use physparam, only : iswrate, iswrgas, iswcliq, iswcice, & + use physparam, only : iswrate, iswrgas, iswcice, & !mz: iswcliq-NML option & isubcsw, icldflg, iovrsw, ivflip, & & iswmode, kind_phys use physcons, only : con_g, con_cp, con_avgd, con_amd, & @@ -1542,7 +1542,7 @@ end subroutine rswinit !----------------------------------- subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & cf1, nlay, ipseed, dz, delgth, & + & cf1, nlay, ipseed, dz, delgth, iswcliq, & & taucw, ssacw, asycw, cldfrc, cldfmc & ! --- output & ) @@ -1557,7 +1557,7 @@ subroutine cldprop & ! ! ! inputs: size ! ! cfrac - real, layer cloud fraction nlay ! -! ..... for iswcliq > 0 (prognostic cloud sckeme) - - - ! +! ..... for iswcliq > 0 (prognostic cloud scheme) - - - ! ! cliqp - real, layer in-cloud liq water path (g/m**2) nlay ! ! reliq - real, mean eff radius for liq cloud (micron) nlay ! ! cicep - real, layer in-cloud ice water path (g/m**2) nlay ! @@ -1566,7 +1566,7 @@ subroutine cldprop & ! cdat2 - real, effective radius for rain drop (micron) nlay ! ! cdat3 - real, layer snow flake water path(g/m**2) nlay ! ! cdat4 - real, mean eff radius for snow flake(micron) nlay ! -! ..... for iswcliq = 0 (diagnostic cloud sckeme) - - - ! +! ..... for iswcliq = 0 (diagnostic cloud scheme) - - - ! ! cdat1 - real, layer cloud optical depth nlay ! ! cdat2 - real, layer cloud single scattering albedo nlay ! ! cdat3 - real, layer cloud asymmetry factor nlay ! @@ -1628,7 +1628,7 @@ subroutine cldprop & use module_radsw_cldprtb ! --- inputs: - integer, intent(in) :: nlay, ipseed + integer, intent(in) :: nlay, ipseed, iswcliq real (kind=kind_phys), intent(in) :: cf1, delgth real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index c5cbe768a..49e9cc6b3 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -234,6 +234,30 @@ kind = kind_phys intent = in optional = F +[iswcliq] + standard_name = flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation + long_name = sw optical property for liquid clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovrsw] + standard_name = flag_for_cloud_overlapping_method_for_shortwave_radiation + long_name = control flag for cloud overlapping method for SW + units = flag + dimensions = () + type = integer + intent = in + optional = F +[isubcsw] + standard_name = flag_for_sw_clouds_grid_approximation + long_name = flag for sw clouds sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in + optional = F [cosz] standard_name = cosine_of_zenith_angle long_name = cosine of the solar zenit angle @@ -304,7 +328,7 @@ standard_name = total_cloud_fraction long_name = total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -372,7 +396,7 @@ standard_name = cloud_liquid_water_path long_name = cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -381,7 +405,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -390,7 +414,7 @@ standard_name = cloud_ice_water_path long_name = cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -399,7 +423,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -408,7 +432,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -417,7 +441,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -426,7 +450,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -435,11 +459,27 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in optional = T +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From c47c2cbb85710dcbccc47c3360047cb178151859 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Sat, 21 Mar 2020 11:32:49 -0600 Subject: [PATCH 075/404] add progcld6 for GSD suite --- physics/GFS_rrtmg_pre.F90 | 69 ++-- physics/radiation_clouds.f | 788 +++++++++++++++++++++++++++---------- 2 files changed, 614 insertions(+), 243 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 92f21683a..7a5894f2e 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -36,41 +36,42 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input mpirank, mpiroot) use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_stateout_type, & - GFS_sfcprop_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type, & - GFS_cldprop_type, & - GFS_radtend_type, & + use GFS_typedefs, only: GFS_statein_type, & + GFS_stateout_type, & + GFS_sfcprop_type, & + GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_tbd_type, & + GFS_cldprop_type, & + GFS_radtend_type, & GFS_diag_type use physparam - use physcons, only: eps => con_eps, & - & epsm1 => con_epsm1, & - & fvirt => con_fvirt & - &, rog => con_rog & + use physcons, only: eps => con_eps, & + & epsm1 => con_epsm1, & + & fvirt => con_fvirt & + &, rog => con_rog & &, rocp => con_rocp - use radcons, only: itsfc,ltp, lextop, qmin, & + use radcons, only: itsfc,ltp, lextop, qmin, & qme5, qme6, epsq, prsmin use funcphys, only: fpvs - use module_radiation_astronomy,only: coszmn ! sol_init, sol_update - use module_radiation_gases, only: NF_VGAS, getgases, getozn ! gas_init, gas_update, - use module_radiation_aerosols, only: NF_AESW, NF_AELW, setaer, & ! aer_init, aer_update, + use module_radiation_astronomy,only: coszmn ! sol_init, sol_update + use module_radiation_gases, only: NF_VGAS, getgases, getozn ! gas_init, gas_update, + use module_radiation_aerosols, only: NF_AESW, NF_AELW, setaer, & ! aer_init, aer_update, & NSPC1 - use module_radiation_clouds, only: NF_CLDS, & ! cld_init - & progcld1, progcld3, & - & progcld2, & - & progcld4, progcld5, & + use module_radiation_clouds, only: NF_CLDS, & ! cld_init + & progcld1, progcld3, & + & progcld2, & + & progcld4, progcld5, & + & progcld6, & !F-A & progclduni, & & cal_cldfra3, find_cloudLayers,adjust_cloudIce,adjust_cloudH2O, & & adjust_cloudFinal - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & & profsw_type, NBDSW - use module_radlw_parameters, only: topflw_type, sfcflw_type, & + use module_radlw_parameters, only: topflw_type, sfcflw_type, & & proflw_type, NBDLW use surface_perturbation, only: cdfnor @@ -835,8 +836,26 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6 .or. & - Model%imp_physics == 15) then + elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6 ) then + if (Model%kdt == 1) then + Tbd%phy_f3d(:,:,Model%nleffr) = 10. + Tbd%phy_f3d(:,:,Model%nieffr) = 50. + Tbd%phy_f3d(:,:,Model%nseffr) = 250. + endif + + !mz* this is original progcld5 - temporary + call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + + + elseif(Model%imp_physics == 15) then if (Model%kdt == 1) then Tbd%phy_f3d(:,:,Model%nleffr) = 10. Tbd%phy_f3d(:,:,Model%nieffr) = 50. diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 2a1184e99..41da8953f 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -244,6 +244,7 @@ module module_radiation_clouds public progcld1, progcld2, progcld3, progcld4, progclduni, & & cld_init, progcld5, progcld4o, & + & progcld6, & !mz- for GSL suite & cal_cldfra3, find_cloudLayers,adjust_cloudIce,adjust_cloudH2O, & & adjust_cloudFinal @@ -2767,6 +2768,358 @@ subroutine progcld5 & end subroutine progcld5 !................................... + +!mz: progcld5 benchmark + subroutine progcld6 & + & ( plyr,plvl,tlyr,qlyr,qstl,rhly,clw, & ! --- inputs: + & xlat,xlon,slmsk,dz,delp, & + & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & + & IX, NLAY, NLP1, & + & uni_cld, lmfshal, lmfdeep2, cldcov, & + & re_cloud,re_ice,re_snow, & + & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & ) + +! ================= subprogram documentation block ================ ! +! ! +! subprogram: progcld5 computes cloud related quantities using ! +! Thompson/WSM6 cloud microphysics scheme. ! +! ! +! abstract: this program computes cloud fractions from cloud ! +! condensates, ! +! and computes the low, mid, high, total and boundary layer cloud ! +! fractions and the vertical indices of low, mid, and high cloud ! +! top and base. the three vertical cloud domains are set up in the ! +! initial subroutine "cld_init". ! +! ! +! usage: call progcld5 ! +! ! +! subprograms called: gethml ! +! ! +! attributes: ! +! language: fortran 90 ! +! machine: ibm-sp, sgi ! +! ! +! ! +! ==================== definition of variables ==================== ! +! ! +! ! +! input variables: ! +! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! +! plvl (IX,NLP1) : model level pressure in mb (100Pa) ! +! tlyr (IX,NLAY) : model layer mean temperature in k ! +! tvly (IX,NLAY) : model layer virtual temperature in k ! +! qlyr (IX,NLAY) : layer specific humidity in gm/gm ! +! qstl (IX,NLAY) : layer saturate humidity in gm/gm ! +! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) ! +! clw (IX,NLAY,ntrac) : layer cloud condensate amount ! +! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2! +! range, otherwise see in-line comment ! +! xlon (IX) : grid longitude in radians (not used) ! +! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! +! dz (ix,nlay) : layer thickness (km) ! +! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! +! IX : horizontal dimention ! +! NLAY,NLP1 : vertical layer/level dimensions ! +! uni_cld : logical - true for cloud fraction from shoc ! +! lmfshal : logical - true for mass flux shallow convection ! +! lmfdeep2 : logical - true for mass flux deep convection ! +! cldcov : layer cloud fraction (used when uni_cld=.true. ! +! ! +! output variables: ! +! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! +! clouds(:,:,1) - layer total cloud fraction ! +! clouds(:,:,2) - layer cloud liq water path (g/m**2) ! +! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! +! clouds(:,:,4) - layer cloud ice water path (g/m**2) ! +! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! +! clouds(:,:,6) - layer rain drop water path not assigned ! +! clouds(:,:,7) - mean eff radius for rain drop (micron) ! +! *** clouds(:,:,8) - layer snow flake water path not assigned ! +! clouds(:,:,9) - mean eff radius for snow flake (micron) ! +! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) ! +! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! +! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! +! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! +! de_lgth(ix) : clouds decorrelation length (km) ! +! ! +! module variables: ! +! ivflip : control flag of vertical index direction ! +! =0: index from toa to surface ! +! =1: index from surface to toa ! +! lmfshal : mass-flux shallow conv scheme flag ! +! lmfdeep2 : scale-aware mass-flux deep conv scheme flag ! +! lcrick : control flag for eliminating CRICK ! +! =t: apply layer smoothing to eliminate CRICK ! +! =f: do not apply layer smoothing ! +! lcnorm : control flag for in-cld condensate ! +! =t: normalize cloud condensate ! +! =f: not normalize cloud condensate ! +! ! +! ==================== end of description ===================== ! +! + implicit none + +! --- inputs + integer, intent(in) :: IX, NLAY, NLP1 + integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl + + logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 + + real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & + & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, & + & re_cloud, re_ice, re_snow + + real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw + + real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & + & slmsk + +! --- outputs + real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds + + real (kind=kind_phys), dimension(:,:), intent(out) :: clds + real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + + integer, dimension(:,:), intent(out) :: mtop,mbot + +! --- local variables: + real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, & + & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf + + real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix) + + real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & + & tem1, tem2, tem3 + + integer :: i, k, id, nf + +! --- constant values +! real (kind=kind_phys), parameter :: xrc3 = 200. + real (kind=kind_phys), parameter :: xrc3 = 100. + +! +!===> ... begin here +! + do nf=1,nf_clds + do k=1,nlay + do i=1,ix + clouds(i,k,nf) = 0.0 + enddo + enddo + enddo +! clouds(:,:,:) = 0.0 + + do k = 1, NLAY + do i = 1, IX + cldtot(i,k) = 0.0 + cldcnv(i,k) = 0.0 + cwp (i,k) = 0.0 + cip (i,k) = 0.0 + crp (i,k) = 0.0 + csp (i,k) = 0.0 + rew (i,k) = re_cloud(i,k) + rei (i,k) = re_ice(i,k) + rer (i,k) = rrain_def ! default rain radius to 1000 micron + res (i,k) = re_snow(i,K) +! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) ) + clwf(i,k) = 0.0 + enddo + enddo +! +! +! if ( lcrick ) then +! do i = 1, IX +! clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2) +! clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1) +! enddo +! do k = 2, NLAY-1 +! do i = 1, IX +! clwf(i,K) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1) +! enddo +! enddo +! else +! do k = 1, NLAY +! do i = 1, IX +! clwf(i,k) = clw(i,k) +! enddo +! enddo +! endif + + do k = 1, NLAY + do i = 1, IX + clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) + enddo + enddo +!> - Find top pressure for each cloud domain for given latitude. +!! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; +!! i=1,2 are low-lat (<45 degree) and pole regions) + + do i =1, IX + rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range +! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range + enddo + + do id = 1, 4 + tem1 = ptopc(id,2) - ptopc(id,1) + + do i =1, IX + ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) + enddo + enddo + +!> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . + + do k = 1, NLAY + do i = 1, IX + cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k)) + cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k)) + crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) + csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * & + & gfac * delp(i,k)) + enddo + enddo + + if (uni_cld) then ! use unified sgs clouds generated outside + do k = 1, NLAY + do i = 1, IX + cldtot(i,k) = cldcov(i,k) + enddo + enddo + + else + +!> - Calculate layer cloud fraction. + + clwmin = 0.0 + if (.not. lmfshal) then + do k = 1, NLAY + do i = 1, IX + clwt = 1.0e-6 * (plyr(i,k)*0.001) +! clwt = 2.0e-6 * (plyr(i,k)*0.001) + + if (clwf(i,k) > clwt) then + + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) + + tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + tem1 = 2000.0 / tem1 + +! tem1 = 1000.0 / tem1 + + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + + cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + else + do k = 1, NLAY + do i = 1, IX + clwt = 1.0e-6 * (plyr(i,k)*0.001) +! clwt = 2.0e-6 * (plyr(i,k)*0.001) + + if (clwf(i,k) > clwt) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) +! + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + if (lmfdeep2) then + tem1 = xrc3 / tem1 + else + tem1 = 100.0 / tem1 + endif +! + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + + cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + endif + + endif ! if (uni_cld) then + + do k = 1, NLAY + do i = 1, IX + if (cldtot(i,k) < climit) then + cldtot(i,k) = 0.0 + cwp(i,k) = 0.0 + cip(i,k) = 0.0 + crp(i,k) = 0.0 + csp(i,k) = 0.0 + endif + enddo + enddo + + if ( lcnorm ) then + do k = 1, NLAY + do i = 1, IX + if (cldtot(i,k) >= climit) then + tem1 = 1.0 / max(climit2, cldtot(i,k)) + cwp(i,k) = cwp(i,k) * tem1 + cip(i,k) = cip(i,k) * tem1 + crp(i,k) = crp(i,k) * tem1 + csp(i,k) = csp(i,k) * tem1 + endif + enddo + enddo + endif + +! + do k = 1, NLAY + do i = 1, IX + clouds(i,k,1) = cldtot(i,k) + clouds(i,k,2) = cwp(i,k) + clouds(i,k,3) = rew(i,k) + clouds(i,k,4) = cip(i,k) + clouds(i,k,5) = rei(i,k) + clouds(i,k,6) = crp(i,k) ! added for Thompson + clouds(i,k,7) = rer(i,k) + clouds(i,k,8) = csp(i,k) ! added for Thompson + clouds(i,k,9) = res(i,k) + enddo + enddo + +! --- ... estimate clouds decorrelation length in km +! this is only a tentative test, need to consider change later + + if ( iovr == 3 ) then + do i = 1, ix + de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) + enddo + endif + +!> - Call gethml() to compute low,mid,high,total, and boundary layer +!! cloud fractions and clouds top/bottom layer indices for low, mid, +!! and high clouds. +! --- compute low, mid, high, total, and boundary layer cloud fractions +! and clouds top/bottom layer indices for low, mid, and high clouds. +! The three cloud domain boundaries are defined by ptopc. The cloud +! overlapping method is defined by control flag 'iovr', which may +! be different for lw and sw radiation programs. + + call gethml & +! --- inputs: + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & IX,NLAY, & +! --- outputs: + & clds, mtop, mbot & + & ) + + +! + return + +!............................................ + end subroutine progcld6 +!............................................ +!mz + + !> \ingroup module_radiation_clouds !> This subroutine computes cloud related quantities using !! for unified cloud microphysics scheme. @@ -3715,91 +4068,90 @@ SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & k_m12C = 0 k_m40C = 0 - DO k = kte, kts, -1 - theta(k) = T1d(k)*((100000.0/P1d(k))**(287.05/1004.)) + DO k = kte, kts, -1 + theta(k) = T1d(k)*((100000.0/P1d(k))**(287.05/1004.)) if (T1d(k)-273.16 .gt. -40.0 .and. P1d(k).gt.7000.0) k_m40C = & - & MAX(k_m40C, k) + & MAX(k_m40C, k) if (T1d(k)-273.16 .gt. -12.0 .and. P1d(k).gt.10000.0) k_m12C = & - & MAX(k_m12C, k) - ENDDO - if (k_m40C .le. kts) k_m40C = kts - if (k_m12C .le. kts) k_m12C = kts - - Z2 = 44307.692 * (1.0 - (P1d(kte)/101325.)**0.190) - DO k = kte-1, kts, -1 - Z1 = 44307.692 * (1.0 - (P1d(k)/101325.)**0.190) - dz(k+1) = Z2 - Z1 - Z2 = Z1 - ENDDO - dz(kts) = dz(kts+1) - -!..Find tropopause height, best surrogate, because we would not really -!.. wish to put fake clouds into the stratosphere. The 10/1500 ratio -!.. d(Theta)/d(Z) approximates a vertical line on typical SkewT chart -!.. near typical (mid-latitude) tropopause height. Since messy data -!.. could give us a false signal of such a transition, do the check over -!.. three K-level change, not just a level-to-level check. This method -!.. has potential failure in arctic-like conditions with extremely low -!.. tropopause height, as would any other diagnostic, so ensure resulting -!.. k_tropo level is above 4km. - - DO k = kte-3, kts, -1 - theta1 = theta(k) - theta2 = theta(k+2) - ht1 = 44307.692 * (1.0 - (P1d(k)/101325.)**0.190) - ht2 = 44307.692 * (1.0 - (P1d(k+2)/101325.)**0.190) + & MAX(k_m12C, k) + ENDDO + if (k_m40C .le. kts) k_m40C = kts + if (k_m12C .le. kts) k_m12C = kts + + Z2 = 44307.692 * (1.0 - (P1d(kte)/101325.)**0.190) + DO k = kte-1, kts, -1 + Z1 = 44307.692 * (1.0 - (P1d(k)/101325.)**0.190) + dz(k+1) = Z2 - Z1 + Z2 = Z1 + ENDDO + dz(kts) = dz(kts+1) + +!..Find tropopause height, best surrogate, because we would not really +!.. wish to put fake clouds into the stratosphere. The 10/1500 ratio +!.. d(Theta)/d(Z) approximates a vertical line on typical SkewT chart +!.. near typical (mid-latitude) tropopause height. Since messy data +!.. could give us a false signal of such a transition, do the check over +!.. three K-level change, not just a level-to-level check. This method +!.. has potential failure in arctic-like conditions with extremely low +!.. tropopause height, as would any other diagnostic, so ensure resulting +!.. k_tropo level is above 4km. + + DO k = kte-3, kts, -1 + theta1 = theta(k) + theta2 = theta(k+2) + ht1 = 44307.692 * (1.0 - (P1d(k)/101325.)**0.190) + ht2 = 44307.692 * (1.0 - (P1d(k+2)/101325.)**0.190) if ( (((theta2-theta1)/(ht2-ht1)) .lt. 10./1500. ) .AND. & & (ht1.lt.19000.) .and. (ht1.gt.4000.) ) then - goto 86 - endif - ENDDO - 86 continue - k_tropo = MAX(kts+2, k+2) - -! if (debugfl) then -! print*, ' FOUND TROPOPAUSE ', k_tropo, ' near ', ht2, ' m' -! WRITE (dbg_msg,*) 'DEBUG-GT: FOUND TROPOPAUSE ', k_tropo, ' near ', ht2, ' m' -! CALL wrf_debug (150, dbg_msg) -! endif - -!..Eliminate possible fractional clouds above supposed tropopause. - DO k = k_tropo+1, kte - if (cfr1d(k).gt.0.0 .and. cfr1d(k).lt.0.999) then - cfr1d(k) = 0. - endif - ENDDO - -!..We would like to prevent fractional clouds below LCL in idealized -!.. situation with deep well-mixed convective PBL, that otherwise is -!.. likely to get clouds in more realistic capping inversion layer. - - kbot = kts+2 - DO k = kbot, k_m12C - if ( (theta(k)-theta(k-1)) .gt. 0.05E-3*dz(k)) EXIT - ENDDO - kbot = MAX(kts+1, k-2) - DO k = kts, kbot - if (cfr1d(k).gt.0.0 .and. cfr1d(k).lt.0.999) cfr1d(k) = 0. - ENDDO - - -!..Starting below tropo height, if cloud fraction greater than 1 -!percent, -!.. compute an approximate total layer depth of cloud, determine a total -!.. liquid water/ice path (LWP/IWP), then reduce that amount with tuning -!.. parameter to represent entrainment factor, then divide up LWP/IWP -!.. into delta-Z weighted amounts for individual levels per cloud layer. - - - k_cldb = k_tropo - in_cloud = .false. - k = k_tropo - DO WHILE (.not. in_cloud .AND. k.gt.k_m12C) - k_cldt = 0 - if (cfr1d(k).ge.0.01) then - in_cloud = .true. - k_cldt = MAX(k_cldt, k) - endif + goto 86 + endif + ENDDO + 86 continue + k_tropo = MAX(kts+2, k+2) + +! if (debugfl) then +! print*, ' FOUND TROPOPAUSE ', k_tropo, ' near ', ht2, ' m' +! WRITE (dbg_msg,*) 'DEBUG-GT: FOUND TROPOPAUSE ', k_tropo, ' near ', ht2, ' m' +! CALL wrf_debug (150, dbg_msg) +! endif + +!..Eliminate possible fractional clouds above supposed tropopause. + DO k = k_tropo+1, kte + if (cfr1d(k).gt.0.0 .and. cfr1d(k).lt.0.999) then + cfr1d(k) = 0. + endif + ENDDO + +!..We would like to prevent fractional clouds below LCL in idealized +!.. situation with deep well-mixed convective PBL, that otherwise is +!.. likely to get clouds in more realistic capping inversion layer. + + kbot = kts+2 + DO k = kbot, k_m12C + if ( (theta(k)-theta(k-1)) .gt. 0.05E-3*dz(k)) EXIT + ENDDO + kbot = MAX(kts+1, k-2) + DO k = kts, kbot + if (cfr1d(k).gt.0.0 .and. cfr1d(k).lt.0.999) cfr1d(k) = 0. + ENDDO + + +!..Starting below tropo height, if cloud fraction greater than 1 percent, +!.. compute an approximate total layer depth of cloud, determine a total +!.. liquid water/ice path (LWP/IWP), then reduce that amount with tuning +!.. parameter to represent entrainment factor, then divide up LWP/IWP +!.. into delta-Z weighted amounts for individual levels per cloud layer. + + + k_cldb = k_tropo + in_cloud = .false. + k = k_tropo + DO WHILE (.not. in_cloud .AND. k.gt.k_m12C) + k_cldt = 0 + if (cfr1d(k).ge.0.01) then + in_cloud = .true. + k_cldt = MAX(k_cldt, k) + endif if (in_cloud) then DO k2 = k_cldt-1, k_m12C, -1 if (cfr1d(k2).lt.0.01 .or. k2.eq.k_m12C) then @@ -3898,149 +4250,149 @@ SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & END SUBROUTINE find_cloudLayers !+---+-----------------------------------------------------------------+ - + SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs, T,Rho,dz, entr, k1,k2, & - & kts,kte) -! - IMPLICIT NONE -! - INTEGER, INTENT(IN):: k1,k2, kts,kte - REAL, INTENT(IN):: entr - REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, qvs, T, Rho, dz - REAL, DIMENSION(kts:kte), INTENT(INOUT):: qi, qs - REAL:: iwc, max_iwc, tdz, this_iwc, this_dz, iwp_exists - INTEGER:: k, kmid - - tdz = 0. - do k = k1, k2 - tdz = tdz + dz(k) - enddo - kmid = NINT(0.5*(k1+k2)) - max_iwc = ABS(qvs(k2-1)-qvs(k1)) -! print*, ' max_iwc = ', max_iwc, ' over DZ=',tdz - - iwp_exists = 0. - do k = k1, k2 - iwp_exists = iwp_exists + (qi(k)+qs(k))*Rho(k)*dz(k) - enddo - if (iwp_exists .gt. 1.0) RETURN - - this_dz = 0.0 - do k = k1, k2 - if (k.eq.k1) then - this_dz = this_dz + 0.5*dz(k) - else - this_dz = this_dz + dz(k) - endif - this_iwc = max_iwc*this_dz/tdz - iwc = MAX(1.E-6, this_iwc*(1.-entr)) - if (cfr(k).gt.0.01.and.cfr(k).lt.0.99.and.T(k).ge.203.16) then - qi(k) = qi(k) + 0.1*cfr(k)*iwc + & kts,kte) +! + IMPLICIT NONE +! + INTEGER, INTENT(IN):: k1,k2, kts,kte + REAL, INTENT(IN):: entr + REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, qvs, T, Rho, dz + REAL, DIMENSION(kts:kte), INTENT(INOUT):: qi, qs + REAL:: iwc, max_iwc, tdz, this_iwc, this_dz, iwp_exists + INTEGER:: k, kmid + + tdz = 0. + do k = k1, k2 + tdz = tdz + dz(k) + enddo + kmid = NINT(0.5*(k1+k2)) + max_iwc = ABS(qvs(k2-1)-qvs(k1)) +! print*, ' max_iwc = ', max_iwc, ' over DZ=',tdz + + iwp_exists = 0. + do k = k1, k2 + iwp_exists = iwp_exists + (qi(k)+qs(k))*Rho(k)*dz(k) + enddo + if (iwp_exists .gt. 1.0) RETURN + + this_dz = 0.0 + do k = k1, k2 + if (k.eq.k1) then + this_dz = this_dz + 0.5*dz(k) + else + this_dz = this_dz + dz(k) + endif + this_iwc = max_iwc*this_dz/tdz + iwc = MAX(1.E-6, this_iwc*(1.-entr)) + if (cfr(k).gt.0.01.and.cfr(k).lt.0.99.and.T(k).ge.203.16) then + qi(k) = qi(k) + 0.1*cfr(k)*iwc elseif (qi(k).lt.1.E-5.and.cfr(k).ge.0.99.and.T(k).ge.203.16) & - & then + & then qi(k) = qi(k) + 0.01*iwc - endif - enddo - - END SUBROUTINE adjust_cloudIce - -!+---+-----------------------------------------------------------------+ - + endif + enddo + + END SUBROUTINE adjust_cloudIce + +!+---+-----------------------------------------------------------------+ + SUBROUTINE adjust_cloudH2O(cfr, qc, qvs, T,Rho,dz, entr, k1,k2, & - & kts,kte) -! - IMPLICIT NONE -! - INTEGER, INTENT(IN):: k1,k2, kts,kte - REAL, INTENT(IN):: entr - REAL, DIMENSION(kts:kte):: cfr, qc, qvs, T, Rho, dz - REAL:: lwc, max_lwc, tdz, this_lwc, this_dz, lwp_exists - INTEGER:: k, kmid - - tdz = 0. - do k = k1, k2 - tdz = tdz + dz(k) - enddo - kmid = NINT(0.5*(k1+k2)) - max_lwc = ABS(qvs(k2-1)-qvs(k1)) -! print*, ' max_lwc = ', max_lwc, ' over DZ=',tdz - - lwp_exists = 0. - do k = k1, k2 - lwp_exists = lwp_exists + qc(k)*Rho(k)*dz(k) - enddo - if (lwp_exists .gt. 1.0) RETURN - - this_dz = 0.0 - do k = k1, k2 - if (k.eq.k1) then - this_dz = this_dz + 0.5*dz(k) - else - this_dz = this_dz + dz(k) - endif - this_lwc = max_lwc*this_dz/tdz - lwc = MAX(1.E-6, this_lwc*(1.-entr)) + & kts,kte) +! + IMPLICIT NONE +! + INTEGER, INTENT(IN):: k1,k2, kts,kte + REAL, INTENT(IN):: entr + REAL, DIMENSION(kts:kte):: cfr, qc, qvs, T, Rho, dz + REAL:: lwc, max_lwc, tdz, this_lwc, this_dz, lwp_exists + INTEGER:: k, kmid + + tdz = 0. + do k = k1, k2 + tdz = tdz + dz(k) + enddo + kmid = NINT(0.5*(k1+k2)) + max_lwc = ABS(qvs(k2-1)-qvs(k1)) +! print*, ' max_lwc = ', max_lwc, ' over DZ=',tdz + + lwp_exists = 0. + do k = k1, k2 + lwp_exists = lwp_exists + qc(k)*Rho(k)*dz(k) + enddo + if (lwp_exists .gt. 1.0) RETURN + + this_dz = 0.0 + do k = k1, k2 + if (k.eq.k1) then + this_dz = this_dz + 0.5*dz(k) + else + this_dz = this_dz + dz(k) + endif + this_lwc = max_lwc*this_dz/tdz + lwc = MAX(1.E-6, this_lwc*(1.-entr)) if (cfr(k).gt.0.01.and.cfr(k).lt.0.99.and.T(k).lt.298.16.and. & - & T(k).ge.253.16) then - qc(k) = qc(k) + cfr(k)*cfr(k)*lwc + & T(k).ge.253.16) then + qc(k) = qc(k) + cfr(k)*cfr(k)*lwc elseif (cfr(k).ge.0.99.and.qc(k).lt.1.E-5.and.T(k).lt.298.16 & - & .and.T(k).ge.253.16) then - qc(k) = qc(k) + 0.1*lwc - endif - enddo - - END SUBROUTINE adjust_cloudH2O - - -!+---+-----------------------------------------------------------------+ - -!..Do not alter any grid-explicitly resolved hydrometeors, rather only -!.. the supposed amounts due to the cloud fraction scheme. - - SUBROUTINE adjust_cloudFinal(cfr, qc, qi, Rho,dz, kts,kte,k_tropo) -! - IMPLICIT NONE -! - INTEGER, INTENT(IN):: kts,kte,k_tropo - REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, Rho, dz - REAL, DIMENSION(kts:kte), INTENT(INOUT):: qc, qi - REAL:: lwp, iwp, xfac - INTEGER:: k - - lwp = 0. - do k = kts, k_tropo - if (cfr(k).gt.0.0) then - lwp = lwp + qc(k)*Rho(k)*dz(k) - endif - enddo - - iwp = 0. - do k = kts, k_tropo - if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then - iwp = iwp + qi(k)*Rho(k)*dz(k) - endif - enddo - - if (lwp .gt. 1.5) then - xfac = 1./lwp - do k = kts, k_tropo - if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then - qc(k) = qc(k)*xfac - endif - enddo - endif - - if (iwp .gt. 1.5) then - xfac = 1./iwp - do k = kts, k_tropo - if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then - qi(k) = qi(k)*xfac - endif - enddo - endif - - END SUBROUTINE adjust_cloudFinal - + & .and.T(k).ge.253.16) then + qc(k) = qc(k) + 0.1*lwc + endif + enddo + + END SUBROUTINE adjust_cloudH2O + + +!+---+-----------------------------------------------------------------+ + +!..Do not alter any grid-explicitly resolved hydrometeors, rather only +!.. the supposed amounts due to the cloud fraction scheme. + + SUBROUTINE adjust_cloudFinal(cfr, qc, qi, Rho,dz, kts,kte,k_tropo) +! + IMPLICIT NONE +! + INTEGER, INTENT(IN):: kts,kte,k_tropo + REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, Rho, dz + REAL, DIMENSION(kts:kte), INTENT(INOUT):: qc, qi + REAL:: lwp, iwp, xfac + INTEGER:: k + + lwp = 0. + do k = kts, k_tropo + if (cfr(k).gt.0.0) then + lwp = lwp + qc(k)*Rho(k)*dz(k) + endif + enddo + + iwp = 0. + do k = kts, k_tropo + if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then + iwp = iwp + qi(k)*Rho(k)*dz(k) + endif + enddo + + if (lwp .gt. 1.5) then + xfac = 1./lwp + do k = kts, k_tropo + if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then + qc(k) = qc(k)*xfac + endif + enddo + endif + + if (iwp .gt. 1.5) then + xfac = 1./iwp + do k = kts, k_tropo + if (cfr(k).gt.0.01 .and. cfr(k).lt.0.99) then + qi(k) = qi(k)*xfac + endif + enddo + endif + + END SUBROUTINE adjust_cloudFinal + ! !........................................! end module module_radiation_clouds ! From ac32ce0297022819a2c984374a622fd71b8d1749 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Tue, 24 Mar 2020 11:23:01 -0600 Subject: [PATCH 076/404] remove the connection of iovrlw/iovrsw with physparam --- physics/GFS_rrtmg_pre.F90 | 67 +++++++++------- physics/radiation_clouds.f | 158 ++++++++++++++++++++++++------------- 2 files changed, 139 insertions(+), 86 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 7a5894f2e..952673f95 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -62,7 +62,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input & NSPC1 use module_radiation_clouds, only: NF_CLDS, & ! cld_init & progcld1, progcld3, & - & progcld2, & +! & progcld2, & & progcld4, progcld5, & & progcld6, & !F-A & progclduni, & @@ -787,11 +787,12 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! or unified cloud and/or with MG microphysics if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & + IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + Model%iovr_lw, Model%iovr_sw, & ! mz* for iovr=3 should come from + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & @@ -799,6 +800,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Model%uni_cld, Model%lmfshal, & Model%lmfdeep2, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & + Model%iovr_lw, Model%iovr_sw, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif @@ -809,23 +811,26 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cnvw, cnvc, Grid%xlat, Grid%xlon, & Sfcprop%slmsk, dz, delp, im, lmk, lmp, deltaq, & Model%sup, Model%kdt, me, & + Model%iovr_lw, Model%iovr_sw, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs elseif (Model%imp_physics == 11) then ! GFDL cloud scheme if (.not.Model%lgfdlmprad) then - call progcld4 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), cnvw, cnvc, & - Grid%xlat, Grid%xlon, Sfcprop%slmsk, & - cldcov, dz, delp, im, lmk, lmp, & + call progcld4 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), cnvw, cnvc, & + Grid%xlat, Grid%xlon, Sfcprop%slmsk, & + cldcov, dz, delp, im, lmk, lmp, & + Model%iovr_lw, Model%iovr_sw, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else - call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & + IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + Model%iovr_lw, Model%iovr_sw, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs ! call progcld4o (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs ! tracer1, Grid%xlat, Grid%xlon, Sfcprop%slmsk, & @@ -844,14 +849,15 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif !mz* this is original progcld5 - temporary - call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + Model%iovr_lw, Model%iovr_sw, & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs @@ -862,14 +868,15 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd%phy_f3d(:,:,Model%nseffr) = 250. endif - call progcld5 (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,tracer1,& ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%icloud,Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + call progcld5 (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%icloud,Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + Model%iovr_lw, Model%iovr_sw, & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs endif ! end if_imp_physics diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 41da8953f..b76d57eaf 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -194,14 +194,16 @@ !> This module computes cloud related quantities for radiation computations. module module_radiation_clouds ! - use physparam, only : icldflg, iovrsw, iovrlw, & +!mz* iovrsw, iovrlw need to come from NML + use physparam, only : icldflg, &!mz:iovrsw, iovrlw,& & lcrick, lcnorm, lnoprec, & - & ivflip, kind_phys, kind_io4 + & ivflip use physcons, only : con_fvirt, con_ttp, con_rocp, & & con_t0c, con_pi, con_g, con_rd, & & con_thgni use module_microphysics, only : rsipath2 use module_iounitdef, only : NICLTUN + use machine, only : kind_phys ! implicit none ! @@ -240,7 +242,7 @@ module module_radiation_clouds real (kind=kind_phys), parameter :: cldasy_def = 0.84 !< default cld asymmetry factor integer :: llyr = 2 !< upper limit of boundary layer clouds - integer :: iovr = 1 !< maximum-random cloud overlapping method +!mz integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & & cld_init, progcld5, progcld4o, & @@ -331,7 +333,7 @@ subroutine cld_init & ! ! --- set up module variables - iovr = max( iovrsw, iovrlw ) !cld ovlp used for diag HML cld output +!mz iovr = max( iovrsw, iovrlw ) !cld ovlp used for diag HML cld output if (me == 0) print *, VTAGCLD !print out version tag @@ -441,6 +443,7 @@ subroutine progcld1 & & xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & effrl,effri,effrr,effrs,effr_in, & + & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -524,7 +527,7 @@ subroutine progcld1 & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1 + integer, intent(in) :: IX, NLAY, NLP1,iovr_lw,iovr_sw logical, intent(in) :: uni_cld, lmfshal, lmfdeep2, effr_in @@ -552,7 +555,7 @@ subroutine progcld1 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf + integer :: i, k, id, nf,iovrw ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -560,6 +563,8 @@ subroutine progcld1 & ! !===> ... begin here +!mz + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output ! do nf=1,nf_clds do k=1,nlay @@ -801,7 +806,7 @@ subroutine progcld1 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then + if ( iovrw == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -815,7 +820,7 @@ subroutine progcld1 & call gethml & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & - & IX,NLAY, & + & IX,NLAY, iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -873,6 +878,7 @@ subroutine progcld2 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, f_ice,f_rain,r_rime,flgmin, & & IX, NLAY, NLP1, lmfshal, lmfdeep2, & + & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -961,7 +967,7 @@ subroutine progcld2 & ! --- constants ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1 + integer, intent(in) :: IX, NLAY, NLP1, iovr_lw,iovr_sw logical, intent(in) :: lmfshal, lmfdeep2 @@ -991,7 +997,7 @@ subroutine progcld2 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id + integer :: i, k, id, iovrw ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -1001,6 +1007,10 @@ subroutine progcld2 & !===> ... begin here ! ! clouds(:,:,:) = 0.0 +!zm +!mz$ + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output$ + !> - Assign water/ice/rain/snow cloud properties for Ferrier scheme. do k = 1, NLAY @@ -1247,7 +1257,7 @@ subroutine progcld2 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then + if ( iovrw == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -1264,6 +1274,7 @@ subroutine progcld2 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & + & iovr_lw,iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -1322,6 +1333,7 @@ subroutine progcld3 & & xlat,xlon,slmsk, dz, delp, & & ix, nlay, nlp1, & & deltaq,sup,kdt,me, & + & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -1404,7 +1416,7 @@ subroutine progcld3 & implicit none ! --- inputs - integer, intent(in) :: ix, nlay, nlp1,kdt + integer, intent(in) :: ix, nlay, nlp1,kdt,iovr_lw,iovr_sw real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, dz, delp @@ -1436,11 +1448,14 @@ subroutine progcld3 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf + integer :: i, k, id, nf, iovrw ! !===> ... begin here ! +!mz + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output + do nf=1,nf_clds do k=1,nlay do i=1,ix @@ -1644,7 +1659,7 @@ subroutine progcld3 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then + if ( iovrw == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -1662,6 +1677,7 @@ subroutine progcld3 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & ix,nlay, & + & iovr_lw,iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -1718,7 +1734,8 @@ end subroutine progcld3 subroutine progcld4 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, & ! --- inputs: & xlat,xlon,slmsk,cldtot, dz, delp, & - & IX, NLAY, NLP1, & + & IX, NLAY, NLP1, & + & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -1799,7 +1816,7 @@ subroutine progcld4 & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1 + integer, intent(in) :: IX, NLAY, NLP1,iovr_lw,iovr_sw real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, cldtot, cnvw, cnvc, & @@ -1825,11 +1842,14 @@ subroutine progcld4 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf + integer :: i, k, id, nf,iovrw ! !===> ... begin here ! +!mz + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output + do nf=1,nf_clds do k=1,nlay do i=1,ix @@ -1981,7 +2001,7 @@ subroutine progcld4 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then + if ( iovrw == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -1997,6 +2017,7 @@ subroutine progcld4 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & + & iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -2060,6 +2081,7 @@ subroutine progcld4o & & xlat,xlon,slmsk, dz, delp, & & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl,ntclamt, & & IX, NLAY, NLP1, & + & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -2139,7 +2161,7 @@ subroutine progcld4o & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1 + integer, intent(in) :: IX, NLAY, NLP1, iovr_lw, iovr_sw integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, & & ntclamt @@ -2169,10 +2191,12 @@ subroutine progcld4o & & tem1, tem2, tem3 real (kind=kind_phys), dimension(IX,NLAY) :: cldtot - integer :: i, k, id, nf + integer :: i, k, id, nf, iovrw ! !===> ... begin here +!mz + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output ! do nf=1,nf_clds do k=1,nlay @@ -2309,7 +2333,7 @@ subroutine progcld4o & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then + if ( iovrw == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -2325,6 +2349,7 @@ subroutine progcld4o & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & + & iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -2343,11 +2368,12 @@ end subroutine progcld4o !! microphysics scheme. subroutine progcld5 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: - & xlat,xlon,slmsk,dz,delp, & - & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & + & xlat,xlon,slmsk,dz,delp, & + & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & & IX, NLAY, NLP1,icloud, & - & uni_cld, lmfshal, lmfdeep2, cldcov, & - & re_cloud,re_ice,re_snow, & + & uni_cld, lmfshal, lmfdeep2, cldcov, & + & re_cloud,re_ice,re_snow, & + & iovr_lw,iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -2431,7 +2457,7 @@ subroutine progcld5 & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1,ICLOUD + integer, intent(in) :: IX, NLAY, NLP1,ICLOUD,iovr_lw,iovr_sw integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 @@ -2466,7 +2492,7 @@ subroutine progcld5 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf + integer :: i, k, id, nf, iovrw ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -2474,6 +2500,8 @@ subroutine progcld5 & ! !===> ... begin here +!mz + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output ! do nf=1,nf_clds do k=1,nlay @@ -2738,7 +2766,7 @@ subroutine progcld5 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then + if ( iovrw == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -2757,6 +2785,7 @@ subroutine progcld5 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & + & iovr_lw,iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -2772,11 +2801,12 @@ end subroutine progcld5 !mz: progcld5 benchmark subroutine progcld6 & & ( plyr,plvl,tlyr,qlyr,qstl,rhly,clw, & ! --- inputs: - & xlat,xlon,slmsk,dz,delp, & - & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & + & xlat,xlon,slmsk,dz,delp, & + & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & & IX, NLAY, NLP1, & - & uni_cld, lmfshal, lmfdeep2, cldcov, & - & re_cloud,re_ice,re_snow, & + & uni_cld, lmfshal, lmfdeep2, cldcov, & + & re_cloud,re_ice,re_snow, & + & iovr_lw,iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -2858,12 +2888,12 @@ subroutine progcld6 & ! ! ! ==================== end of description ===================== ! ! - implicit none - -! --- inputs - integer, intent(in) :: IX, NLAY, NLP1 - integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl - + implicit none + +! --- inputs + integer, intent(in) :: IX, NLAY, NLP1,iovr_lw,iovr_sw + integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl + logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & @@ -2888,11 +2918,11 @@ subroutine progcld6 & & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix) - - real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & - & tem1, tem2, tem3 - - integer :: i, k, id, nf + + real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & + & tem1, tem2, tem3 + + integer :: i, k, id, nf, iovrw ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -2900,7 +2930,10 @@ subroutine progcld6 & ! !===> ... begin here -! +!!mz$ + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output$ + +! do nf=1,nf_clds do k=1,nlay do i=1,ix @@ -3083,11 +3116,11 @@ subroutine progcld6 & clouds(i,k,9) = res(i,k) enddo enddo - + ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then + if ( iovrw == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -3106,6 +3139,7 @@ subroutine progcld6 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & + & iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -3163,6 +3197,7 @@ subroutine progclduni & & ( plyr,plvl,tlyr,tvly,ccnd,ncnd, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, cldtot, & & effrl,effri,effrr,effrs,effr_in, & + & iovr_lw,iovr_sw, & !mz* $ & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -3257,6 +3292,9 @@ subroutine progclduni & real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + !mz* for GFSv16 + integer, intent(in) :: iovr_lw, iovr_sw + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds @@ -3267,6 +3305,7 @@ subroutine progclduni & integer, dimension(:,:), intent(out) :: mtop,mbot ! --- local variables: + integer :: iovrw real (kind=kind_phys), dimension(IX,NLAY) :: cldcnv, cwp, cip, & & crp, csp, rew, rei, res, rer real (kind=kind_phys), dimension(IX,NLAY,ncnd) :: cndf @@ -3288,6 +3327,9 @@ subroutine progclduni & ! enddo ! enddo ! +!mz* + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output + do k = 1, NLAY do i = 1, IX cldcnv(i,k) = 0.0 @@ -3457,7 +3499,7 @@ subroutine progclduni & !> -# Estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then + if ( iovrw == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -3476,6 +3518,7 @@ subroutine progclduni & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & + & iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -3511,7 +3554,7 @@ end subroutine progclduni !! @{ subroutine gethml & & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & ! --- inputs: - & IX, NLAY, & + & IX, NLAY,iovr_lw,iovr_sw, & & clds, mtop, mbot & ! --- outputs: & ) @@ -3567,7 +3610,7 @@ subroutine gethml & implicit none! ! --- inputs: - integer, intent(in) :: IX, NLAY + integer, intent(in) :: IX, NLAY,iovr_sw,iovr_lw real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & & cldtot, cldcnv, dz @@ -3583,11 +3626,14 @@ subroutine gethml & real (kind=kind_phys) :: pcur, pnxt, ccur, cnxt, alfa integer, dimension(IX):: idom, kbt1, kth1, kbt2, kth2 - integer :: i, k, id, id1, kstr, kend, kinc + integer :: i, k, id, id1, kstr, kend, kinc,iovrw ! !===> ... begin here ! +!mz* + iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output + clds(:,:) = 0.0 do i = 1, IX @@ -3611,7 +3657,7 @@ subroutine gethml & kinc = 1 endif ! end_if_ivflip - if ( iovr == 0 ) then ! random overlap + if ( iovrw == 0 ) then ! random overlap do k = kstr, kend, kinc do i = 1, IX @@ -3630,7 +3676,7 @@ subroutine gethml & clds(i,4) = 1.0 - cl1(i) ! save total cloud enddo - elseif ( iovr == 1 ) then ! max/ran overlap + elseif ( iovrw == 1 ) then ! max/ran overlap do k = kstr, kend, kinc do i = 1, IX @@ -3654,7 +3700,7 @@ subroutine gethml & clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud enddo - elseif ( iovr == 2 ) then ! maximum overlap all levels + elseif ( iovrw == 2 ) then ! maximum overlap all levels cl1(:) = 0.0 @@ -3675,7 +3721,7 @@ subroutine gethml & clds(i,4) = cl1(i) ! save total cloud enddo - elseif ( iovr == 3 ) then ! random if clear-layer divided, + elseif ( iovrw == 3 ) then ! random if clear-layer divided, ! otherwise de-corrlength method do i = 1, ix dz1(i) = - dz(i,kstr) @@ -3761,7 +3807,7 @@ subroutine gethml & if (kth2(i) == 0) kbt2(i) = k kth2(i) = kth2(i) + 1 - if ( iovr == 0 ) then + if ( iovrw == 0 ) then cl2(i) = cl2(i) + ccur - cl2(i)*ccur else cl2(i) = max( cl2(i), ccur ) @@ -3843,7 +3889,7 @@ subroutine gethml & if (kth2(i) == 0) kbt2(i) = k kth2(i) = kth2(i) + 1 - if ( iovr == 0 ) then + if ( iovrw == 0 ) then cl2(i) = cl2(i) + ccur - cl2(i)*ccur else cl2(i) = max( cl2(i), ccur ) From 5404462a72fe10477595c25baab0ae28fe667f0f Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Tue, 7 Apr 2020 10:04:47 -0600 Subject: [PATCH 077/404] add new radlw/radsw main with modern fortran --- physics/radlw_main.F90 | 8976 ++++++++++++++++++++++++++++++++++++++++ physics/radsw_main.F90 | 6339 ++++++++++++++++++++++++++++ 2 files changed, 15315 insertions(+) create mode 100644 physics/radlw_main.F90 create mode 100644 physics/radsw_main.F90 diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 new file mode 100644 index 000000000..0596a987c --- /dev/null +++ b/physics/radlw_main.F90 @@ -0,0 +1,8976 @@ +!> \file radlw_main.f +!! This file contains NCEP's modifications of the rrtmg-lw radiation +!! code from AER. + +!!!!! ============================================================== !!!!! +!!!!! lw-rrtm3 radiation package description !!!!! +!!!!! ============================================================== !!!!! +! ! +! this package includes ncep's modifications of the rrtm-lw radiation ! +! code from aer inc. ! +! ! +! the lw-rrtm3 package includes these parts: ! +! ! +! 'radlw_rrtm3_param.f' ! +! 'radlw_rrtm3_datatb.f' ! +! 'radlw_rrtm3_main.f' ! +! ! +! the 'radlw_rrtm3_param.f' contains: ! +! ! +! 'module_radlw_parameters' -- band parameters set up ! +! ! +! the 'radlw_rrtm3_datatb.f' contains: ! +! ! +! 'module_radlw_avplank' -- plank flux data ! +! 'module_radlw_ref' -- reference temperature and pressure ! +! 'module_radlw_cldprlw' -- cloud property coefficients ! +! 'module_radlw_kgbnn' -- absorption coeffients for 16 ! +! bands, where nn = 01-16 ! +! ! +! the 'radlw_rrtm3_main.f' contains: ! +! ! +! 'rrtmg_lw' -- main lw radiation transfer ! +! ! +! in the main module 'rrtmg_lw' there are only two ! +! externally callable subroutines: ! +! ! +! ! +! 'lwrad' -- main lw radiation routine ! +! inputs: ! +! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, ! +! clouds,icseed,aerosols,sfemis,sfgtmp, ! +! dzlyr,delpin,de_lgth, ! +! npts, nlay, nlp1, lprnt, ! +! outputs: ! +! hlwc,topflx,sfcflx,cldtau, ! +!! optional outputs: ! +! HLW0,HLWB,FLXPRF) ! +! ! +! 'rlwinit' -- initialization routine ! +! inputs: ! +! ( me ) ! +! outputs: ! +! (none) ! +! ! +! all the lw radiation subprograms become contained subprograms ! +! in module 'rrtmg_lw' and many of them are not directly ! +! accessable from places outside the module. ! +! ! +! derived data type constructs used: ! +! ! +! 1. radiation flux at toa: (from module 'module_radlw_parameters') ! +! topflw_type - derived data type for toa rad fluxes ! +! upfxc total sky upward flux at toa ! +! upfx0 clear sky upward flux at toa ! +! ! +! 2. radiation flux at sfc: (from module 'module_radlw_parameters') ! +! sfcflw_type - derived data type for sfc rad fluxes ! +! upfxc total sky upward flux at sfc ! +! upfx0 clear sky upward flux at sfc ! +! dnfxc total sky downward flux at sfc ! +! dnfx0 clear sky downward flux at sfc ! +! ! +! 3. radiation flux profiles(from module 'module_radlw_parameters') ! +! proflw_type - derived data type for rad vertical prof ! +! upfxc level upward flux for total sky ! +! dnfxc level downward flux for total sky ! +! upfx0 level upward flux for clear sky ! +! dnfx0 level downward flux for clear sky ! +! ! +! external modules referenced: ! +! ! +! 'module physparam' ! +! 'module physcons' ! +! 'mersenne_twister' ! +! ! +! compilation sequence is: ! +! ! +! 'radlw_rrtm3_param.f' ! +! 'radlw_rrtm3_datatb.f' ! +! 'radlw_rrtm3_main.f' ! +! ! +! and all should be put in front of routines that use lw modules ! +! ! +!==========================================================================! +! ! +! the original aer's program declarations: ! +! ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! | +! Copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). | +! This software may be used, copied, or redistributed as long as it is | +! not sold and this copyright notice is reproduced on each copy made. | +! This model is provided as is without any express or implied warranties. | +! (http://www.rtweb.aer.com/) | +! | +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! ! +! ************************************************************************ ! +! ! +! rrtmg_lw ! +! ! +! ! +! a rapid radiative transfer model ! +! for the longwave region ! +! for application to general circulation models ! +! ! +! ! +! atmospheric and environmental research, inc. ! +! 131 hartwell avenue ! +! lexington, ma 02421 ! +! ! +! eli j. mlawer ! +! jennifer s. delamere ! +! michael j. iacono ! +! shepard a. clough ! +! ! +! ! +! email: miacono@aer.com ! +! email: emlawer@aer.com ! +! email: jdelamer@aer.com ! +! ! +! the authors wish to acknowledge the contributions of the ! +! following people: steven j. taubman, karen cady-pereira, ! +! patrick d. brown, ronald e. farren, luke chen, robert bergstrom. ! +! ! +! ************************************************************************ ! +! ! +! references: ! +! (rrtm_lw/rrtmg_lw): ! +! clough, s.A., m.w. shephard, e.j. mlawer, j.s. delamere, ! +! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: ! +! atmospheric radiative transfer modeling: a summary of the aer ! +! codes, j. quant. spectrosc. radiat. transfer, 91, 233-244, 2005. ! +! ! +! mlawer, e.j., s.j. taubman, p.d. brown, m.j. iacono, and s.a. ! +! clough: radiative transfer for inhomogeneous atmospheres: rrtm, ! +! a validated correlated-k model for the longwave. j. geophys. res., ! +! 102, 16663-16682, 1997. ! +! ! +! (mcica): ! +! pincus, r., h. w. barker, and j.-j. morcrette: a fast, flexible, ! +! approximation technique for computing radiative transfer in ! +! inhomogeneous cloud fields, j. geophys. res., 108(d13), 4376, ! +! doi:10.1029/2002JD003322, 2003. ! +! ! +! ************************************************************************ ! +! ! +! aer's revision history: ! +! this version of rrtmg_lw has been modified from rrtm_lw to use a ! +! reduced set of g-points for application to gcms. ! +! ! +! -- original version (derived from rrtm_lw), reduction of g-points, ! +! other revisions for use with gcms. ! +! 1999: m. j. iacono, aer, inc. ! +! -- adapted for use with ncar/cam3. ! +! may 2004: m. j. iacono, aer, inc. ! +! -- revised to add mcica capability. ! +! nov 2005: m. j. iacono, aer, inc. ! +! -- conversion to f90 formatting for consistency with rrtmg_sw. ! +! feb 2007: m. j. iacono, aer, inc. ! +! -- modifications to formatting to use assumed-shape arrays. ! +! aug 2007: m. j. iacono, aer, inc. ! +! ! +! ************************************************************************ ! +! ! +! ncep modifications history log: ! +! ! +! nov 1999, ken campana -- received the original code from ! +! aer (1998 ncar ccm version), updated to link up with ! +! ncep mrf model ! +! jun 2000, ken campana -- added option to switch random and ! +! maximum/random cloud overlap ! +! 2001, shrinivas moorthi -- further updates for mrf model ! +! may 2001, yu-tai hou -- updated on trace gases and cloud ! +! property based on rrtm_v3.0 codes. ! +! dec 2001, yu-tai hou -- rewritten code into fortran 90 std ! +! set ncep radiation structure standard that contains ! +! three plug-in compatable fortran program files: ! +! 'radlw_param.f', 'radlw_datatb.f', 'radlw_main.f' ! +! fixed bugs in subprograms taugb14, taugb2, etc. added ! +! out-of-bounds protections. (a detailed note of ! +! up_to_date modifications/corrections by ncep was sent ! +! to aer in 2002) ! +! jun 2004, yu-tai hou -- added mike iacono's apr 2004 ! +! modification of variable diffusivity angles. ! +! apr 2005, yu-tai hou -- minor modifications on module ! +! structures include rain/snow effect (this version of ! +! code was given back to aer in jun 2006) ! +! mar 2007, yu-tai hou -- added aerosol effect for ncep ! +! models using the generallized aerosol optical property! +! scheme for gfs model. ! +! apr 2007, yu-tai hou -- added spectral band heating as an ! +! optional output to support the 500 km gfs model's ! +! upper stratospheric radiation calculations. and ! +! restructure optional outputs for easy access by ! +! different models. ! +! oct 2008, yu-tai hou -- modified to include new features ! +! from aer's newer release v4.4-v4.7, including the ! +! mcica sub-grid cloud option. add rain/snow optical ! +! properties support to cloudy sky calculations. ! +! correct errors in mcica cloud optical properties for ! +! ebert & curry scheme (ilwcice=1) that needs band ! +! index conversion. simplified and unified sw and lw ! +! sub-column cloud subroutines into one module by using ! +! optional parameters. ! +! mar 2009, yu-tai hou -- replaced the original random number! +! generator coming from the original code with ncep w3 ! +! library to simplify the program and moved sub-column ! +! cloud subroutines inside the main module. added ! +! option of user provided permutation seeds that could ! +! be randomly generated from forecast time stamp. ! +! oct 2009, yu-tai hou -- modified subrtines "cldprop" and ! +! "rlwinit" according updats from aer's rrtmg_lw v4.8. ! +! nov 2009, yu-tai hou -- modified subrtine "taumol" according +! updats from aer's rrtmg_lw version 4.82. notice the ! +! cloud ice/liquid are assumed as in-cloud quantities, ! +! not as grid averaged quantities. ! +! jun 2010, yu-tai hou -- optimized code to improve efficiency +! apr 2012, b. ferrier and y. hou -- added conversion factor to fu's! +! cloud-snow optical property scheme. ! +! nov 2012, yu-tai hou -- modified control parameters thru ! +! module 'physparam'. ! +! FEB 2017 A.Cheng - add odpth output, effective radius input ! +! jun 2018, h-m lin/y-t hou -- added new option of cloud overlap ! +! method 'de-correlation-length' for mcica application ! +! ! +!!!!! ============================================================== !!!!! +!!!!! end descriptions !!!!! +!!!!! ============================================================== !!!!! + +!> This module contains the CCPP-compliant NCEP's modifications of the +!! rrtm-lw radiation code from aer inc. + module rrtmg_lw +! + use physparam, only : ilwrate, ilwrgas, ilwcliq, ilwcice, & + & icldflg, ivflip + use physcons, only : con_g, con_cp, con_avgd, con_amd, & + & con_amw, con_amo3 + use mersenne_twister, only : random_setseed, random_number, & + & random_stat +!mz + use machine, only : kind_phys, & + & im => kind_io4, rb => kind_phys + + use module_radlw_parameters +! + use module_radlw_avplank, only : totplnk + use module_radlw_ref, only : preflog, tref, chi_mls +! + implicit none +! + private +! +! ... version tag and last revision date + character(40), parameter :: & + & VTAGLW='NCEP LW v5.1 Nov 2012 -RRTMG-LW v4.82 ' +! & VTAGLW='NCEP LW v5.0 Aug 2012 -RRTMG-LW v4.82 ' +! & VTAGLW='RRTMG-LW v4.82 Nov 2009 ' +! & VTAGLW='RRTMG-LW v4.8 Oct 2009 ' +! & VTAGLW='RRTMG-LW v4.71 Mar 2009 ' +! & VTAGLW='RRTMG-LW v4.4 Oct 2008 ' +! & VTAGLW='RRTM-LW v2.3g Mar 2007 ' +! & VTAGLW='RRTM-LW v2.3g Apr 2004 ' + +! --- constant values + real (kind=kind_phys), parameter :: eps = 1.0e-6 + real (kind=kind_phys), parameter :: oneminus= 1.0-eps + real (kind=kind_phys), parameter :: cldmin = tiny(cldmin) + real (kind=kind_phys), parameter :: bpade = 1.0/0.278 ! pade approx constant + real (kind=kind_phys), parameter :: stpfac = 296.0/1013.0 + real (kind=kind_phys), parameter :: wtdiff = 0.5 ! weight for radiance to flux conversion + real (kind=kind_phys), parameter :: tblint = ntbl ! lookup table conversion factor + real (kind=kind_phys), parameter :: f_zero = 0.0 + real (kind=kind_phys), parameter :: f_one = 1.0 + +! ... atomic weights for conversion from mass to volume mixing ratios + real (kind=kind_phys), parameter :: amdw = con_amd/con_amw + real (kind=kind_phys), parameter :: amdo3 = con_amd/con_amo3 + +! ... band indices + integer, dimension(nbands) :: nspa, nspb + + data nspa / 1, 1, 9, 9, 9, 1, 9, 1, 9, 1, 1, 9, 9, 1, 9, 9 / + data nspb / 1, 1, 5, 5, 5, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0 / + +! ... band wavenumber intervals +! real (kind=kind_phys) :: wavenum1(nbands), wavenum2(nbands) +! data wavenum1/ & +! & 10., 350., 500., 630., 700., 820., 980., 1080., & +!err & 1180., 1390., 1480., 1800., 2080., 2250., 2390., 2600. / +! & 1180., 1390., 1480., 1800., 2080., 2250., 2380., 2600. / +! data wavenum2/ & +! & 350., 500., 630., 700., 820., 980., 1080., 1180., & +!err & 1390., 1480., 1800., 2080., 2250., 2390., 2600., 3250. / +! & 1390., 1480., 1800., 2080., 2250., 2380., 2600., 3250. / +! real (kind=kind_phys) :: delwave(nbands) +! data delwave / 340., 150., 130., 70., 120., 160., 100., 100., & +! & 210., 90., 320., 280., 170., 130., 220., 650. / + +! --- reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 +! and 1.80) as a function of total column water vapor. the function +! has been defined to minimize flux and cooling rate errors in these bands +! over a wide range of precipitable water values. + real (kind=kind_phys), dimension(nbands) :: a0, a1, a2 + + data a0 / 1.66, 1.55, 1.58, 1.66, 1.54, 1.454, 1.89, 1.33, & + & 1.668, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66 / + data a1 / 0.00, 0.25, 0.22, 0.00, 0.13, 0.446, -0.10, 0.40, & + & -0.006, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / + data a2 / 0.00, -12.0, -11.7, 0.00, -0.72,-0.243, 0.19,-0.062, & + & 0.414, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / + +!! --- logical flags for optional output fields + + logical :: lhlwb = .false. + logical :: lhlw0 = .false. + logical :: lflxprf= .false. + +! --- those data will be set up only once by "rlwinit" + +! ... fluxfac, heatfac are factors for fluxes (in w/m**2) and heating +! rates (in k/day, or k/sec set by subroutine 'rlwinit') +! semiss0 are default surface emissivity for each bands + + real (kind=kind_phys) :: fluxfac, heatfac, semiss0(nbands) + data semiss0(:) / nbands*1.0 / + + real (kind=kind_phys) :: tau_tbl(0:ntbl) !< clr-sky opt dep (for cldy transfer) + real (kind=kind_phys) :: exp_tbl(0:ntbl) !< transmittance lookup table + real (kind=kind_phys) :: tfn_tbl(0:ntbl) !< tau transition function; i.e. the + !< transition of planck func from mean lyr + !< temp to lyr boundary temp as a func of + !< opt dep. "linear in tau" method is used. + +! --- the following variables are used for sub-column cloud scheme + + integer, parameter :: ipsdlw0 = ngptlw ! initial permutation seed + +! --- public accessable subprograms + + public rrtmg_lw_init, rrtmg_lw_run, rrtmg_lw_finalize, rlwinit + + +! ================ + contains +! ================ + + subroutine rrtmg_lw_init () + end subroutine rrtmg_lw_init + +!> \defgroup module_radlw_main GFS RRTMG Longwave Module +!! \brief This module includes NCEP's modifications of the RRTMG-LW radiation +!! code from AER. +!! +!! The RRTM-LW package includes three files: +!! - radlw_param.f, which contains: +!! - module_radlw_parameters: band parameters set up +!! - radlw_datatb.f, which contains modules: +!! - module_radlw_avplank: plank flux data +!! - module_radlw_ref: reference temperature and pressure +!! - module_radlw_cldprlw: cloud property coefficients +!! - module_radlw_kgbnn: absorption coeffients for 16 bands, where nn = 01-16 +!! - radlw_main.f, which contains: +!! - rrtmg_lw_run(): the main LW radiation routine +!! - rlwinit(): the initialization routine +!! +!!\version NCEP LW v5.1 Nov 2012 -RRTMG-LW v4.82 +!! +!!\copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). +!! This software may be used, copied, or redistributed as long as it is +!! not sold and this copyright notice is reproduced on each copy made. +!! This model is provided as is without any express or implied warranties. +!! (http://www.rtweb.aer.com/) +!! \section arg_table_rrtmg_lw_run Argument Table +!! \htmlinclude rrtmg_lw_run.html +!! +!> \section gen_lwrad RRTMG Longwave Radiation Scheme General Algorithm +!> @{ + subroutine rrtmg_lw_run & + & ( plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr_co2, gasvmr_n2o, & ! --- inputs + & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & + & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, & + & icseed,aeraod,aerssa,sfemis,sfgtmp, & + & dzlyr,delpin,de_lgth, iovrlw, isubclw, & + & npts, nlay, nlp1, lprnt, cld_cf, lslwr, & + & hlwc,topflx,sfcflx,cldtau, & ! --- outputs + & HLW0,HLWB,FLXPRF, & ! --- optional + & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & + & cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, & + & cld_od, mpirank,mpiroot,errmsg, errflg & + & ) + +! ==================== defination of variables ==================== ! +! ! +! input variables: ! +! plyr (npts,nlay) : layer mean pressures (mb) ! +! plvl (npts,nlp1) : interface pressures (mb) ! +! tlyr (npts,nlay) : layer mean temperature (k) ! +! tlvl (npts,nlp1) : interface temperatures (k) ! +! qlyr (npts,nlay) : layer specific humidity (gm/gm) *see inside ! +! olyr (npts,nlay) : layer ozone concentration (gm/gm) *see inside ! +! gasvmr(npts,nlay,:): atmospheric gases amount: ! +! (check module_radiation_gases for definition) ! +! gasvmr(:,:,1) - co2 volume mixing ratio ! +! gasvmr(:,:,2) - n2o volume mixing ratio ! +! gasvmr(:,:,3) - ch4 volume mixing ratio ! +! gasvmr(:,:,4) - o2 volume mixing ratio ! +! gasvmr(:,:,5) - co volume mixing ratio ! +! gasvmr(:,:,6) - cfc11 volume mixing ratio ! +! gasvmr(:,:,7) - cfc12 volume mixing ratio ! +! gasvmr(:,:,8) - cfc22 volume mixing ratio ! +! gasvmr(:,:,9) - ccl4 volume mixing ratio ! +! clouds(npts,nlay,:): layer cloud profiles: ! +! (check module_radiation_clouds for definition) ! +! clouds(:,:,1) - layer total cloud fraction ! +! clouds(:,:,2) - layer in-cloud liq water path (g/m**2) ! +! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! +! clouds(:,:,4) - layer in-cloud ice water path (g/m**2) ! +! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! +! clouds(:,:,6) - layer rain drop water path (g/m**2) ! +! clouds(:,:,7) - mean eff radius for rain drop (micron) ! +! clouds(:,:,8) - layer snow flake water path (g/m**2) ! +! clouds(:,:,9) - mean eff radius for snow flake (micron) ! +! icseed(npts) : auxiliary special cloud related array ! +! when module variable isubclw=2, it provides ! +! permutation seed for each column profile that ! +! are used for generating random numbers. ! +! when isubclw /=2, it will not be used. ! +! aerosols(npts,nlay,nbands,:) : aerosol optical properties ! +! (check module_radiation_aerosols for definition)! +! (:,:,:,1) - optical depth ! +! (:,:,:,2) - single scattering albedo ! +! (:,:,:,3) - asymmetry parameter ! +! sfemis (npts) : surface emissivity ! +! sfgtmp (npts) : surface ground temperature (k) ! +! dzlyr(npts,nlay) : layer thickness (km) ! +! delpin(npts,nlay): layer pressure thickness (mb) ! +! de_lgth(npts) : cloud decorrelation length (km) ! +! npts : total number of horizontal points ! +! nlay, nlp1 : total number of vertical layers, levels ! +! lprnt : cntl flag for diagnostic print out ! +! ! +! output variables: ! +! hlwc (npts,nlay): total sky heating rate (k/day or k/sec) ! +! topflx(npts) : radiation fluxes at top, component: ! +! (check module_radlw_paramters for definition) ! +! upfxc - total sky upward flux at top (w/m2) ! +! upfx0 - clear sky upward flux at top (w/m2) ! +! sfcflx(npts) : radiation fluxes at sfc, component: ! +! (check module_radlw_paramters for definition) ! +! upfxc - total sky upward flux at sfc (w/m2) ! +! upfx0 - clear sky upward flux at sfc (w/m2) ! +! dnfxc - total sky downward flux at sfc (w/m2) ! +! dnfx0 - clear sky downward flux at sfc (w/m2) ! +! cldtau(npts,nlay): approx 10mu band layer cloud optical depth ! +! ! +!! optional output variables: ! +! hlwb(npts,nlay,nbands): spectral band total sky heating rates ! +! hlw0 (npts,nlay): clear sky heating rate (k/day or k/sec) ! +! flxprf(npts,nlp1): level radiative fluxes (w/m2), components: ! +! (check module_radlw_paramters for definition) ! +! upfxc - total sky upward flux ! +! dnfxc - total sky dnward flux ! +! upfx0 - clear sky upward flux ! +! dnfx0 - clear sky dnward flux ! +! ! +! external module variables: (in physparam) ! +! ilwrgas - control flag for rare gases (ch4,n2o,o2,cfcs, etc.) ! +! =0: do not include rare gases ! +! >0: include all rare gases ! +! ilwcliq - control flag for liq-cloud optical properties ! +! =1: input cld liqp & reliq, hu & stamnes (1993) ! +! =2: not used ! +! ilwcice - control flag for ice-cloud optical properties ! +! =1: input cld icep & reice, ebert & curry (1997) ! +! =2: input cld icep & reice, streamer (1996) ! +! =3: input cld icep & reice, fu (1998) ! +! isubclw - sub-column cloud approximation control flag ! +! =0: no sub-col cld treatment, use grid-mean cld quantities ! +! =1: mcica sub-col, prescribed seeds to get random numbers ! +! =2: mcica sub-col, providing array icseed for random numbers! +! iovrlw - cloud overlapping control flag ! +! =0: random overlapping clouds ! +! =1: maximum/random overlapping clouds ! +! =2: maximum overlap cloud (used for isubclw>0 only) ! +! =3: decorrelation-length overlap (for isubclw>0 only) ! +! =4: exponential overlap cloud +! ivflip - control flag for vertical index direction ! +! =0: vertical index from toa to surface ! +! =1: vertical index from surface to toa ! +! ! +! module parameters, control variables: ! +! nbands - number of longwave spectral bands ! +! maxgas - maximum number of absorbing gaseous ! +! maxxsec - maximum number of cross-sections ! +! ngptlw - total number of g-point subintervals ! +! ng## - number of g-points in band (##=1-16) ! +! ngb(ngptlw) - band indices for each g-point ! +! bpade - pade approximation constant (1/0.278) ! +! nspa,nspb(nbands)- number of lower/upper ref atm's per band ! +! delwave(nbands) - longwave band width (wavenumbers) ! +! ipsdlw0 - permutation seed for mcica sub-col clds ! +! ! +! major local variables: ! +! pavel (nlay) - layer pressures (mb) ! +! delp (nlay) - layer pressure thickness (mb) ! +! tavel (nlay) - layer temperatures (k) ! +! tz (0:nlay) - level (interface) temperatures (k) ! +! semiss (nbands) - surface emissivity for each band ! +! wx (nlay,maxxsec) - cross-section molecules concentration ! +! coldry (nlay) - dry air column amount ! +! (1.e-20*molecules/cm**2) ! +! cldfrc (0:nlp1) - layer cloud fraction ! +! taucld (nbands,nlay) - layer cloud optical depth for each band ! +! cldfmc (ngptlw,nlay) - layer cloud fraction for each g-point ! +! tauaer (nbands,nlay) - aerosol optical depths ! +! fracs (ngptlw,nlay) - planck fractions ! +! tautot (ngptlw,nlay) - total optical depths (gaseous+aerosols) ! +! colamt (nlay,maxgas) - column amounts of absorbing gases ! +! 1-maxgas are for watervapor, carbon ! +! dioxide, ozone, nitrous oxide, methane, ! +! oxigen, carbon monoxide, respectively ! +! (molecules/cm**2) ! +! pwvcm - column precipitable water vapor (cm) ! +! secdiff(nbands) - variable diffusivity angle defined as ! +! an exponential function of the column ! +! water amount in bands 2-3 and 5-9. ! +! this reduces the bias of several w/m2 in ! +! downward surface flux in high water ! +! profiles caused by using the constant ! +! diffusivity angle of 1.66. (mji) ! +! facij (nlay) - indicator of interpolation factors ! +! =0/1: indicate lower/higher temp & height ! +! selffac(nlay) - scale factor for self-continuum, equals ! +! (w.v. density)/(atm density at 296K,1013 mb) ! +! selffrac(nlay) - factor for temp interpolation of ref ! +! self-continuum data ! +! indself(nlay) - index of the lower two appropriate ref ! +! temp for the self-continuum interpolation ! +! forfac (nlay) - scale factor for w.v. foreign-continuum ! +! forfrac(nlay) - factor for temp interpolation of ref ! +! w.v. foreign-continuum data ! +! indfor (nlay) - index of the lower two appropriate ref ! +! temp for the foreign-continuum interp ! +! laytrop - tropopause layer index at which switch is ! +! made from one conbination kew species to ! +! another. ! +! jp(nlay),jt(nlay),jt1(nlay) ! +! - lookup table indexes ! +! totuflux(0:nlay) - total-sky upward longwave flux (w/m2) ! +! totdflux(0:nlay) - total-sky downward longwave flux (w/m2) ! +! htr(nlay) - total-sky heating rate (k/day or k/sec) ! +! totuclfl(0:nlay) - clear-sky upward longwave flux (w/m2) ! +! totdclfl(0:nlay) - clear-sky downward longwave flux (w/m2) ! +! htrcl(nlay) - clear-sky heating rate (k/day or k/sec) ! +! fnet (0:nlay) - net longwave flux (w/m2) ! +! fnetc (0:nlay) - clear-sky net longwave flux (w/m2) ! +! ! +! ! +! ====================== end of definitions =================== ! + +! --- inputs: + integer, intent(in) :: npts, nlay, nlp1 + integer, intent(in) :: icseed(npts) + + logical, intent(in) :: lprnt + integer, intent(in) :: mpiroot + integer, intent(in) :: mpirank + integer, intent(in) :: iovrlw,isubclw + + real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: plvl, & + & tlvl + real (kind=kind_phys), dimension(npts,nlay), intent(in) :: plyr, & + & tlyr, qlyr, olyr, dzlyr, delpin + + real (kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co2,& + & gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & + & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4 + + real (kind=kind_phys), dimension(npts,nlay),intent(in):: cld_cf + real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & + & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & + & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, & + & cld_od + + real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & + & sfgtmp, de_lgth + + real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & + & aeraod, aerssa + +!mz* HWRF -- OUTPUT from mcica_subcol_lw + real(kind=kind_phys),dimension(ngptlw,npts,nlay) :: cldfmcl ! Cloud fraction + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=kind_phys),dimension(ngptlw,npts,nlay) :: ciwpmcl ! In-cloud ice water path (g/m2) + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=kind_phys),dimension(ngptlw,npts,nlay) :: clwpmcl ! In-cloud liquid water path (g/m2) + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=kind_phys),dimension(ngptlw,npts,nlay) :: cswpmcl ! In-cloud snow water path (g/m2) + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=kind_phys),dimension(npts,nlay) :: relqmcl ! Cloud water drop effective radius (microns) + ! Dimensions: (ncol,nlay) + real(kind=kind_phys),dimension(npts,nlay) :: reicmcl ! Cloud ice effective size (microns) + ! Dimensions: (ncol,nlay) + real(kind=kind_phys),dimension(npts,nlay) :: resnmcl ! Snow effective size (microns) + ! Dimensions: (ncol,nlay) + real(kind=kind_phys),dimension(ngptlw,npts,nlay) :: taucmcl ! In-cloud optical depth + ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=kind_phys),dimension(npts,nlay,nbands) :: tauaer ! Aerosol optical depth +! ! Dimensions: (ncol,nlay,nbndlw) +!mz* output from cldprmc + integer :: ncbands ! number of cloud spectral bands + real(kind=kind_phys),dimension(ngptlw,nlay) :: taucmc ! cloud optical depth [mcica] + ! Dimensions: (ngptlw,nlayers) +!mz + +! --- outputs: + real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hlwc + real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & + & cldtau + + type (topflw_type), dimension(npts), intent(inout) :: topflx + type (sfcflw_type), dimension(npts), intent(inout) :: sfcflx + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +!! --- optional outputs: + real (kind=kind_phys), dimension(npts,nlay,nbands),optional, & + & intent(inout) :: hlwb + real (kind=kind_phys), dimension(npts,nlay), optional, & + & intent(inout) :: hlw0 + type (proflw_type), dimension(npts,nlp1), optional, & + & intent(inout) :: flxprf + logical, intent(in) :: lslwr + +! --- locals: +! mz* - Add height of each layer for exponential-random cloud overlap +! This will be derived below from the dzlyr in each layer + real (kind=kind_phys), dimension( npts,nlay ) :: hgt + real (kind=kind_phys):: dzsum + + real (kind=kind_phys), dimension(0:nlp1) :: cldfrc + + real (kind=kind_phys), dimension(0:nlay) :: totuflux, totdflux, & + & totuclfl, totdclfl, tz + + real (kind=kind_phys), dimension(nlay) :: htr, htrcl + + real (kind=kind_phys), dimension(nlay) :: pavel, tavel, delp, & + & clwp, ciwp, relw, reiw, cda1, cda2, cda3, cda4, & + & coldry, colbrd, h2ovmr, o3vmr, fac00, fac01, fac10, fac11, & + & selffac, selffrac, forfac, forfrac, minorfrac, scaleminor, & + & scaleminorn2, temcol, dz + +!mz* + real(kind=rb),dimension(0:nlay,nbands) :: planklay,planklev + real(kind=rb),dimension(0:nlay) :: pz + +! real(kind=rb) :: plankbnd(nbndlw) + real (kind=kind_phys), dimension(nbands,0:nlay) :: pklev, pklay + + real (kind=kind_phys), dimension(nlay,nbands) :: htrb + real (kind=kind_phys), dimension(nbands,nlay) :: taucld, tauaer + real (kind=kind_phys), dimension(nbands,1,nlay) :: taucld3 + real (kind=kind_phys), dimension(ngptlw,nlay) :: fracs, tautot + real (kind=kind_phys), dimension(nlay,ngptlw) :: fracs_r +!mz rtrnmc_mcica + real (kind=kind_phys), dimension(nlay,ngptlw) :: taut +!mz* Atmosphere/clouds - cldprop + real(kind=kind_phys), dimension(ngptlw,nlay) :: cldfmc, & + & cldfmc_save ! cloud fraction [mcica] + ! Dimensions: (ngptlw,nlay) + real(kind=kind_phys), dimension(ngptlw,nlay) :: ciwpmc ! in-cloud ice water path [mcica] + ! Dimensions: (ngptlw,nlay) + real(kind=kind_phys), dimension(ngptlw,nlay) :: clwpmc ! in-cloud liquid water path [mcica] + ! Dimensions: (ngptlw,nlay) + real(kind=kind_phys), dimension(ngptlw,nlay) :: cswpmc ! in-cloud snow path [mcica] + ! Dimensions: (ngptlw,nlay) + real(kind=kind_phys), dimension(nlay) :: relqmc ! liquid particle effective radius (microns) + ! Dimensions: (nlay) + real(kind=kind_phys), dimension(nlay) :: reicmc ! ice particle effective size (microns) + ! Dimensions: (nlay) + real(kind=kind_phys), dimension(nlay) :: resnmc ! snow effective size (microns) + ! Dimensions: (nlay) + + + real (kind=kind_phys), dimension(nbands) :: semiss, secdiff + +! --- column amount of absorbing gases: +! (:,m) m = 1-h2o, 2-co2, 3-o3, 4-n2o, 5-ch4, 6-o2, 7-co + real (kind=kind_phys) :: colamt(nlay,maxgas) + +! --- column cfc cross-section amounts: +! (:,m) m = 1-ccl4, 2-cfc11, 3-cfc12, 4-cfc22 + real (kind=kind_phys) :: wx(nlay,maxxsec) + +! --- reference ratios of binary species parameter in lower atmosphere: +! (:,m,:) m = 1-h2o/co2, 2-h2o/o3, 3-h2o/n2o, 4-h2o/ch4, 5-n2o/co2, 6-o3/co2 + real (kind=kind_phys) :: rfrate(nlay,nrates,2) + + real (kind=kind_phys) :: tem0, tem1, tem2, pwvcm, summol, stemp, & + & delgth + + integer, dimension(npts) :: ipseed + integer, dimension(nlay) :: jp, jt, jt1, indself, indfor, indminor + integer :: laytrop, iplon, i, j, k, k1 + ! mz* added local arrays for RRTMG + integer :: irng, permuteseed,ig + integer :: inflglw, iceflglw, liqflglw + logical :: lcf1 + integer :: istart ! beginning band of calculation + integer :: iend ! ending band of calculation + integer :: iout ! output option flag (inactive) + + +! +!===> ... begin here +! + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + +!mz* +! For passing in cloud physical properties; cloud optics parameterized +! in RRTMG: + inflglw = 2 + iceflglw = 3 + liqflglw = 1 + + istart = 1 + iend = 16 + iout = 0 + +! + if (.not. lslwr) return + +! --- ... initialization + + lhlwb = present ( hlwb ) + lhlw0 = present ( hlw0 ) + lflxprf= present ( flxprf ) + + colamt(:,:) = f_zero + cldtau(:,:) = f_zero + +!! --- check for optional input arguments, depending on cloud method + if (ilwcliq > 0) then ! use prognostic cloud method + if ( .not.present(cld_lwp) .or. .not.present(cld_ref_liq) .or. & + & .not.present(cld_iwp) .or. .not.present(cld_ref_ice) .or. & + & .not.present(cld_rwp) .or. .not.present(cld_ref_rain) .or. & + & .not.present(cld_swp) .or. .not.present(cld_ref_snow)) then + write(errmsg,'(*(a))') & + & 'Logic error: ilwcliq>0 requires the following', & + & ' optional arguments to be present:', & + & ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', & + & ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow' + errflg = 1 + return + end if + else ! use diagnostic cloud method + if ( .not.present(cld_od) ) then + write(errmsg,'(*(a))') & + & 'Logic error: ilwcliq<=0 requires the following', & + & ' optional argument to be present: cld_od' + errflg = 1 + return + end if + endif ! end if_ilwcliq + +!> -# Change random number seed value for each radiation invocation +!! (isubclw =1 or 2). + + if ( isubclw == 1 ) then ! advance prescribed permutation seed + do i = 1, npts + ipseed(i) = ipsdlw0 + i + enddo + elseif ( isubclw == 2 ) then ! use input array of permutaion seeds + do i = 1, npts + ipseed(i) = icseed(i) + enddo + endif + +! if ( lprnt ) then +! print *,' In rrtmg_lw, isubclw, ipsdlw0,ipseed =', & +! & isubclw, ipsdlw0, ipseed +! endif + +! --- ... loop over horizontal npts profiles + + lab_do_iplon : do iplon = 1, npts + +!> -# Read surface emissivity. + if (sfemis(iplon) > eps .and. sfemis(iplon) <= 1.0) then ! input surface emissivity + do j = 1, nbands + semiss(j) = sfemis(iplon) + enddo + else ! use default values + do j = 1, nbands + semiss(j) = semiss0(j) + enddo + endif + + stemp = sfgtmp(iplon) ! surface ground temp + if (iovrlw == 3) delgth= de_lgth(iplon) ! clouds decorr-length + +! mz*: HWRF practice + if (iovrlw == 4 ) then + +!Add layer height needed for exponential (icld=4) and +! exponential-random (icld=5) overlap options + + !iplon = 1 + irng = 0 + permuteseed = 150 + +!mz* Derive height + dzsum =0.0 + do k = 1,nlay + hgt(iplon,k)= dzsum+0.5*dzlyr(iplon,k)*1000. !km->m + dzsum = dzsum+ dzlyr(iplon,k)*1000. + enddo + +! Zero out cloud optical properties here; not used when passing physical properties +! to radiation and taucld is calculated in radiation + do k = 1, nlay + do j = 1, nbands + taucld3(j,iplon,k) = 0.0 + enddo + enddo + + +! if(mpirank==mpiroot) then +! write(0,*) 'mcica_subcol_lw: max/min(cld_cf)=', & +! & maxval(cld_cf),minval(cld_cf) +! write(0,*) 'mcica_subcol_lw: max/min(cld_iwp)=', & +! & maxval(cld_iwp),minval(cld_iwp) +! write(0,*) 'mcica_subcol_lw: max/min(cld_lwp)=', & +! & maxval(cld_lwp),minval(cld_lwp) +! write(0,*) 'mcica_subcol_lw: max/min(cld_swp)=', & +! & maxval(cld_swp),minval(cld_swp) +! write(0,*) 'mcica_subcol_lw: max/min(cld_ref_ice)=', & +! & maxval(cld_ref_ice),minval(cld_ref_ice) +! write(0,*) 'mcica_subcol_lw: max/min(cld_ref_snow)=', & +! & maxval(cld_ref_snow),minval(cld_ref_snow) +! write(0,*) 'mcica_subcol_lw: max/min(cld_ref_liq)=', & +! & maxval(cld_ref_liq),minval(cld_ref_liq) + +! endif + + call mcica_subcol_lw(1, iplon, nlay, iovrlw, permuteseed, & + & irng, plyr, hgt, & + & cld_cf, cld_iwp, cld_lwp,cld_swp, & + & cld_ref_ice, cld_ref_liq, & + & cld_ref_snow, taucld3, & + & cldfmcl, & !--output + & ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, & + & resnmcl, taucmcl) + +!mz +! if(mpirank==mpiroot) then +! write(0,*) 'mcica_subcol_lw: max/min(cldfmcl)=', & +! & maxval(cldfmcl),minval(cldfmcl) +! write(0,*) 'mcica_subcol_lw: max/min(ciwpmcl)=', & +! & maxval(ciwpmcl),minval(ciwpmcl) +! write(0,*) 'mcica_subcol_lw: max/min(clwpmcl)=', & +! & maxval(clwpmcl),minval(clwpmcl) +! write(0,*) 'mcica_subcol_lw: max/min(cswpmcl)=', & +! & maxval(cswpmcl),minval(cswpmcl) +! write(0,*) 'mcica_subcol_lw: max/min(reicmcl)=', & +! & maxval(reicmcl),minval(reicmcl) +! write(0,*) 'mcica_subcol_lw: max/min(relqmcl)=', & +! & maxval(relqmcl),minval(relqmcl) +! write(0,*) 'mcica_subcol_lw: max/min(resnmcl)=', & +! & maxval(resnmcl),minval(resnmcl) +! write(0,*) 'mcica_subcol_lw: max/min(taucmcl)=', & +! & maxval(taucmcl),minval(taucmcl) + +! endif + endif +!mz* end + +!> -# Prepare atmospheric profile for use in rrtm. +! the vertical index of internal array is from surface to top + +! --- ... molecular amounts are input or converted to volume mixing ratio +! and later then converted to molecular amount (molec/cm2) by the +! dry air column coldry (in molec/cm2) which is calculated from the +! layer pressure thickness (in mb), based on the hydrostatic equation +! --- ... and includes a correction to account for h2o in the layer. + + if (ivflip == 0) then ! input from toa to sfc + + tem1 = 100.0 * con_g + tem2 = 1.0e-20 * 1.0e3 * con_avgd + tz(0) = tlvl(iplon,nlp1) + + do k = 1, nlay + k1 = nlp1 - k + pavel(k)= plyr(iplon,k1) + delp(k) = delpin(iplon,k1) + tavel(k)= tlyr(iplon,k1) + tz(k) = tlvl(iplon,k1) + dz(k) = dzlyr(iplon,k1) + +!> -# Set absorber amount for h2o, co2, and o3. + +!test use +! h2ovmr(k)= max(f_zero,qlyr(iplon,k1)*amdw) ! input mass mixing ratio +! h2ovmr(k)= max(f_zero,qlyr(iplon,k1)) ! input vol mixing ratio +! o3vmr (k)= max(f_zero,olyr(iplon,k1)) ! input vol mixing ratio +!ncep model use + h2ovmr(k)= max(f_zero,qlyr(iplon,k1) & + & *amdw/(f_one-qlyr(iplon,k1))) ! input specific humidity + o3vmr (k)= max(f_zero,olyr(iplon,k1)*amdo3) ! input mass mixing ratio + +! --- ... tem0 is the molecular weight of moist air + tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw + coldry(k) = tem2*delp(k) / (tem1*tem0*(f_one+h2ovmr(k))) + temcol(k) = 1.0e-12 * coldry(k) + + colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o + colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(iplon,k1)) ! co2 + colamt(k,3) = max(temcol(k), coldry(k)*o3vmr(k)) ! o3 + enddo + +!> -# Set up column amount for rare gases n2o,ch4,o2,co,ccl4,cf11,cf12, +!! cf22, convert from volume mixing ratio to molec/cm2 based on +!! coldry (scaled to 1.0e-20). + + if (ilwrgas > 0) then + do k = 1, nlay + k1 = nlp1 - k + colamt(k,4)=max(temcol(k), coldry(k)*gasvmr_n2o(iplon,k1)) ! n2o + colamt(k,5)=max(temcol(k), coldry(k)*gasvmr_ch4(iplon,k1)) ! ch4 + colamt(k,6)=max(f_zero, coldry(k)*gasvmr_o2(iplon,k1)) ! o2 + colamt(k,7)=max(f_zero, coldry(k)*gasvmr_co(iplon,k1)) ! co + + wx(k,1) = max( f_zero, coldry(k)*gasvmr_ccl4(iplon,k1) ) ! ccl4 + wx(k,2) = max( f_zero, coldry(k)*gasvmr_cfc11(iplon,k1) ) ! cf11 + wx(k,3) = max( f_zero, coldry(k)*gasvmr_cfc12(iplon,k1) ) ! cf12 + wx(k,4) = max( f_zero, coldry(k)*gasvmr_cfc22(iplon,k1) ) ! cf22 + enddo + else + do k = 1, nlay + colamt(k,4) = f_zero ! n2o + colamt(k,5) = f_zero ! ch4 + colamt(k,6) = f_zero ! o2 + colamt(k,7) = f_zero ! co + + wx(k,1) = f_zero + wx(k,2) = f_zero + wx(k,3) = f_zero + wx(k,4) = f_zero + enddo + endif + +!> -# Set aerosol optical properties. + + do k = 1, nlay + k1 = nlp1 - k + do j = 1, nbands + tauaer(j,k) = aeraod(iplon,k1,j) & + & * (f_one - aerssa(iplon,k1,j)) + enddo + enddo + +!> -# Read cloud optical properties. + if (ilwcliq > 0) then ! use prognostic cloud method +!mz: GFS operational + do k = 1, nlay + k1 = nlp1 - k + cldfrc(k)= cld_cf(iplon,k1) + clwp(k) = cld_lwp(iplon,k1) + relw(k) = cld_ref_liq(iplon,k1) + ciwp(k) = cld_iwp(iplon,k1) + reiw(k) = cld_ref_ice(iplon,k1) + cda1(k) = cld_rwp(iplon,k1) + cda2(k) = cld_ref_rain(iplon,k1) + cda3(k) = cld_swp(iplon,k1) + cda4(k) = cld_ref_snow(iplon,k1) + enddo + ! transfer + if (iovrlw .eq. 4) then !mz HWRF + do k = 1, nlay + k1 = nlp1 - k + do ig = 1, ngptlw + cldfmc(ig,k) = cldfmcl(ig,iplon,k1) + taucmc(ig,k) = taucmcl(ig,iplon,k1) + ciwpmc(ig,k) = ciwpmcl(ig,iplon,k1) + clwpmc(ig,k) = clwpmcl(ig,iplon,k1) + !mz cswpmc(ig,k) = cswpmcl(ig,iplon,k1) + cswpmc(ig,k) = 0.0 + enddo + reicmc(k) = reicmcl(iplon,k1) + relqmc(k) = relqmcl(iplon,k1) + resnmc(k) = resnmcl(iplon,k1) + enddo + endif + else ! use diagnostic cloud method + do k = 1, nlay + k1 = nlp1 - k + cldfrc(k)= cld_cf(iplon,k1) + cda1(k) = cld_od(iplon,k1) + enddo + endif ! end if_ilwcliq + + cldfrc(0) = f_one ! padding value only + cldfrc(nlp1) = f_zero ! padding value only + +!> -# Compute precipitable water vapor for diffusivity angle adjustments. + + tem1 = f_zero + tem2 = f_zero + do k = 1, nlay + tem1 = tem1 + coldry(k) + colamt(k,1) + tem2 = tem2 + colamt(k,1) + enddo + + tem0 = 10.0 * tem2 / (amdw * tem1 * con_g) + pwvcm = tem0 * plvl(iplon,nlp1) + + else ! input from sfc to toa + + tem1 = 100.0 * con_g + tem2 = 1.0e-20 * 1.0e3 * con_avgd + tz(0) = tlvl(iplon,1) + + do k = 1, nlay + pavel(k)= plyr(iplon,k) + delp(k) = delpin(iplon,k) + tavel(k)= tlyr(iplon,k) + tz(k) = tlvl(iplon,k+1) + dz(k) = dzlyr(iplon,k) + +! --- ... set absorber amount +!test use +! h2ovmr(k)= max(f_zero,qlyr(iplon,k)*amdw) ! input mass mixing ratio +! h2ovmr(k)= max(f_zero,qlyr(iplon,k)) ! input vol mixing ratio +! o3vmr (k)= max(f_zero,olyr(iplon,k)) ! input vol mixing ratio +!ncep model use + h2ovmr(k)= max(f_zero,qlyr(iplon,k) & + & *amdw/(f_one-qlyr(iplon,k))) ! input specific humidity + o3vmr (k)= max(f_zero,olyr(iplon,k)*amdo3) ! input mass mixing ratio + +! --- ... tem0 is the molecular weight of moist air + tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw + coldry(k) = tem2*delp(k) / (tem1*tem0*(f_one+h2ovmr(k))) + temcol(k) = 1.0e-12 * coldry(k) + + colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o + colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(iplon,k))! co2 + colamt(k,3) = max(temcol(k), coldry(k)*o3vmr(k)) ! o3 + enddo + +! --- ... set up col amount for rare gases, convert from volume mixing ratio +! to molec/cm2 based on coldry (scaled to 1.0e-20) + + if (ilwrgas > 0) then + do k = 1, nlay + colamt(k,4)=max(temcol(k), coldry(k)*gasvmr_n2o(iplon,k)) ! n2o + colamt(k,5)=max(temcol(k), coldry(k)*gasvmr_ch4(iplon,k)) ! ch4 + colamt(k,6)=max(f_zero, coldry(k)*gasvmr_o2(iplon,k)) ! o2 + colamt(k,7)=max(f_zero, coldry(k)*gasvmr_co(iplon,k)) ! co + + wx(k,1) = max( f_zero, coldry(k)*gasvmr_ccl4(iplon,k) ) ! ccl4 + wx(k,2) = max( f_zero, coldry(k)*gasvmr_cfc11(iplon,k) ) ! cf11 + wx(k,3) = max( f_zero, coldry(k)*gasvmr_cfc12(iplon,k) ) ! cf12 + wx(k,4) = max( f_zero, coldry(k)*gasvmr_cfc22(iplon,k) ) ! cf22 + enddo + else + do k = 1, nlay + colamt(k,4) = f_zero ! n2o + colamt(k,5) = f_zero ! ch4 + colamt(k,6) = f_zero ! o2 + colamt(k,7) = f_zero ! co + + wx(k,1) = f_zero + wx(k,2) = f_zero + wx(k,3) = f_zero + wx(k,4) = f_zero + enddo + endif + +! --- ... set aerosol optical properties + + do j = 1, nbands + do k = 1, nlay + tauaer(j,k) = aeraod(iplon,k,j) & + & * (f_one - aerssa(iplon,k,j)) + enddo + enddo + + if (ilwcliq > 0) then ! use prognostic cloud method +!mz* + !mz calculate input for cldprop + do k = 1, nlay + cldfrc(k)= cld_cf(iplon,k) + clwp(k) = cld_lwp(iplon,k) + relw(k) = cld_ref_liq(iplon,k) + ciwp(k) = cld_iwp(iplon,k) + reiw(k) = cld_ref_ice(iplon,k) + cda1(k) = cld_rwp(iplon,k) + cda2(k) = cld_ref_rain(iplon,k) + cda3(k) = cld_swp(iplon,k) + cda4(k) = cld_ref_snow(iplon,k) + enddo + if (iovrlw .eq. 4) then +!mz* Move incoming GCM cloud arrays to RRTMG cloud arrays. +!For GCM input, incoming reicmcl is defined based on selected +!ice parameterization (inflglw) + do k = 1, nlay + do ig = 1, ngptlw + cldfmc(ig,k) = cldfmcl(ig,iplon,k) + taucmc(ig,k) = taucmcl(ig,iplon,k) + ciwpmc(ig,k) = ciwpmcl(ig,iplon,k) + clwpmc(ig,k) = clwpmcl(ig,iplon,k) + !mz cswpmc(ig,k) = cswpmcl(ig,iplon,k) + cswpmc(ig,k) = 0.0 + enddo + reicmc(k) = reicmcl(iplon,k) + relqmc(k) = relqmcl(iplon,k) + resnmc(k) = resnmcl(iplon,k) + enddo + endif + else ! use diagnostic cloud method + do k = 1, nlay + cldfrc(k)= cld_cf(iplon,k) + cda1(k) = cld_od(iplon,k) + enddo + endif ! end if_ilwcliq + + cldfrc(0) = f_one ! padding value only + cldfrc(nlp1) = f_zero ! padding value only + +! --- ... compute precipitable water vapor for diffusivity angle adjustments + + tem1 = f_zero + tem2 = f_zero + do k = 1, nlay + tem1 = tem1 + coldry(k) + colamt(k,1) + tem2 = tem2 + colamt(k,1) + enddo + + tem0 = 10.0 * tem2 / (amdw * tem1 * con_g) + pwvcm = tem0 * plvl(iplon,1) + + endif ! if_ivflip + +!> -# Compute column amount for broadening gases. + + do k = 1, nlay + summol = f_zero + do i = 2, maxgas + summol = summol + colamt(k,i) + enddo + colbrd(k) = coldry(k) - summol + enddo + +!> -# Compute diffusivity angle adjustments. + + tem1 = 1.80 + tem2 = 1.50 + do j = 1, nbands + if (j==1 .or. j==4 .or. j==10) then + secdiff(j) = 1.66 + else + secdiff(j) = min( tem1, max( tem2, & + & a0(j)+a1(j)*exp(a2(j)*pwvcm) )) + endif + enddo + +! if (lprnt) then +! print *,' coldry',coldry +! print *,' wx(*,1) ',(wx(k,1),k=1,NLAY) +! print *,' wx(*,2) ',(wx(k,2),k=1,NLAY) +! print *,' wx(*,3) ',(wx(k,3),k=1,NLAY) +! print *,' wx(*,4) ',(wx(k,4),k=1,NLAY) +! print *,' iplon ',iplon +! print *,' pavel ',pavel +! print *,' delp ',delp +! print *,' tavel ',tavel +! print *,' tz ',tz +! print *,' h2ovmr ',h2ovmr +! print *,' o3vmr ',o3vmr +! endif + +!> -# For cloudy atmosphere, call cldprop() to set cloud optical +!! properties. + + lcf1 = .false. + lab_do_k0 : do k = 1, nlay + if ( cldfrc(k) > eps ) then + lcf1 = .true. + exit lab_do_k0 + endif + enddo lab_do_k0 + + if ( lcf1 ) then + + !mz* for HWRF, save cldfmc with mcica + if (iovrlw .eq.4) then + do k = 1, nlay + do ig = 1, ngptlw + cldfmc_save(ig,k)=cldfmc (ig,k) + enddo + enddo + endif + + call cldprop & +! --- inputs: + & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & + & nlay, nlp1, ipseed(iplon), dz, delgth,iovrlw, isubclw, & +! --- outputs: + & cldfmc, taucld & + & ) + + if (iovrlw .eq.4) then + !mz for HWRF, still using mcica cldfmc + do k = 1, nlay + do ig = 1, ngptlw + cldfmc(ig,k)=cldfmc_save(ig,k) + enddo + enddo + endif + +! --- ... save computed layer cloud optical depth for output +! rrtm band-7 is apprx 10mu channel (or use spectral mean of bands 6-8) + + if (ivflip == 0) then ! input from toa to sfc + do k = 1, nlay + k1 = nlp1 - k + cldtau(iplon,k1) = taucld( 7,k) + enddo + else ! input from sfc to toa + do k = 1, nlay + cldtau(iplon,k) = taucld( 7,k) + enddo + endif ! end if_ivflip_block + + else + cldfmc = f_zero + taucld = f_zero + endif + +!!mz* HWRF practice, calculate taucmc with mcica + if (iovrlw .eq.4) then + !mz* HWRF practice, calculate taucmc +! if(mpirank==mpiroot) then +! write(0,*) 'bfe cldprmc: nlay,inflglw,iceflglw,liqflglw',& +! & nlay,inflglw,iceflglw,liqflglw +! write(0,*) 'bfe cldprmc: max/min(taucmc)=', & +! & maxval(taucmc),minval(taucmc) +! endif + + call cldprmc(nlay, inflglw, iceflglw, liqflglw, & + & cldfmc, ciwpmc, & + & clwpmc, cswpmc, reicmc, relqmc, resnmc, & + & ncbands, taucmc) + endif +! if(mpirank==mpiroot) then +! write(0,*) 'aft cldprmc: ncbands', ncbands +! write(0,*) 'aft cldprmc: max/min(taucmc)=', & +! & maxval(taucmc),minval(taucmc) +! endif + + +!mz* end + + +! if (lprnt) then +! print *,' after cldprop' +! print *,' clwp',clwp +! print *,' ciwp',ciwp +! print *,' relw',relw +! print *,' reiw',reiw +! print *,' taucl',cda1 +! print *,' cldfrac',cldfrc +! endif + +!> -# Calling setcoef() to compute various coefficients needed in +!! radiative transfer calculations. + call setcoef & +! --- inputs: + & ( pavel,tavel,tz,stemp,h2ovmr,colamt,coldry,colbrd, & + & nlay, nlp1, & +! --- outputs: + & laytrop,pklay,pklev,jp,jt,jt1, & + & rfrate,fac00,fac01,fac10,fac11, & + & selffac,selffrac,indself,forfac,forfrac,indfor, & + & minorfrac,scaleminor,scaleminorn2,indminor & + & ) + +! if (lprnt) then +! print *,'laytrop',laytrop +! print *,'colh2o',(colamt(k,1),k=1,NLAY) +! print *,'colco2',(colamt(k,2),k=1,NLAY) +! print *,'colo3', (colamt(k,3),k=1,NLAY) +! print *,'coln2o',(colamt(k,4),k=1,NLAY) +! print *,'colch4',(colamt(k,5),k=1,NLAY) +! print *,'fac00',fac00 +! print *,'fac01',fac01 +! print *,'fac10',fac10 +! print *,'fac11',fac11 +! print *,'jp',jp +! print *,'jt',jt +! print *,'jt1',jt1 +! print *,'selffac',selffac +! print *,'selffrac',selffrac +! print *,'indself',indself +! print *,'forfac',forfac +! print *,'forfrac',forfrac +! print *,'indfor',indfor +! endif + +!> -# Call taumol() to calculte the gaseous optical depths and Plank +!! fractions for each longwave spectral band. + + call taumol & +! --- inputs: + & ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, & + & rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, & + & selffac,selffrac,indself,forfac,forfrac,indfor, & + & minorfrac,scaleminor,scaleminorn2,indminor, & + & nlay, & +! --- outputs: + & fracs, tautot & + & ) + +! if (lprnt) then +! print *,' after taumol' +! do k = 1, nlay +! write(6,121) k +!121 format(' k =',i3,5x,'FRACS') +! write(6,122) (fracs(j,k),j=1,ngptlw) +!122 format(10e14.7) +! write(6,123) k +!123 format(' k =',i3,5x,'TAUTOT') +! write(6,122) (tautot(j,k),j=1,ngptlw) +! enddo +! endif + +!> -# Call the radiative transfer routine based on cloud scheme +!! selection. Compute the upward/downward radiative fluxes, and +!! heating rates for both clear or cloudy atmosphere. +!!\n - call rtrn(): clouds are assumed as randomly overlaping in a +!! vertical column +!!\n - call rtrnmr(): clouds are assumed as in maximum-randomly +!! overlaping in a vertical column; +!!\n - call rtrnmc(): clouds are treated with the mcica stochastic +!! approach. + + if (isubclw <= 0) then + + if (iovrlw <= 0) then + + call rtrn & +! --- inputs: + & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, & + & fracs,secdiff,nlay,nlp1, & +! --- outputs: + & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & + & ) + + else + + call rtrnmr & +! --- inputs: + & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, & + & fracs,secdiff,nlay,nlp1, & +! --- outputs: + & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & + & ) + + endif ! end if_iovrlw_block + + else + +! if(iovrlw == 4) then + +!mz*HWRF practice +! +! pz(0)=plyr(iplon,1) +! do k= 1,nlay +! pz(k)=plvl(iplon,k+1) +! enddo + +! do k = 0, nlay +! do j = 1, nbands +! ! taut (k,j) = tautot(j,k) +! planklay(k,j) = pklay(j,k) +! planklev(k,j) = pklev(j,k) +! enddo +! enddo + +! do k = 1, nlay +! do ig = 1, ngptlw +! fracs_r(k,ig) = fracs (ig,k) +! taut(k,ig)= tautot(ig,k) +! enddo +! enddo + +! call rtrnmc_mcica(nlay, istart, iend, iout, pz, & +! & semiss, ncbands, & +! & cldfmc, taucmc, planklay, planklev, & !plankbnd, & +! & pwvcm, fracs_r, taut, & +! & totuflux, totdflux, htr, & +! & totuclfl, totdclfl, htrcl ) + +! if(mpirank==mpiroot) then +! write(0,*) 'rtrnmc_mcica: max/min(htr)=', & +! & maxval(htr),minval(htr) +! endif + + +! else +!mz*end + +!mz*taucld(non-mcica) + call rtrnmc & +! --- inputs: + & ( semiss,delp,cldfmc,taucld,tautot,pklay,pklev, & + & fracs,secdiff,nlay,nlp1, & +! --- outputs: + & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & + & ) +! if(mpirank==mpiroot) then +! write(0,*) 'rtrnmc: max/min(htr)=', & +! & maxval(htr),minval(htr) +! endif + +! endif !end if_iovrlw block + + endif ! end if_isubclw_block + +!> -# Save outputs. + + topflx(iplon)%upfxc = totuflux(nlay) + topflx(iplon)%upfx0 = totuclfl(nlay) + + sfcflx(iplon)%upfxc = totuflux(0) + sfcflx(iplon)%upfx0 = totuclfl(0) + sfcflx(iplon)%dnfxc = totdflux(0) + sfcflx(iplon)%dnfx0 = totdclfl(0) + + if (ivflip == 0) then ! output from toa to sfc + +!! --- ... optional fluxes + if ( lflxprf ) then + do k = 0, nlay + k1 = nlp1 - k + flxprf(iplon,k1)%upfxc = totuflux(k) + flxprf(iplon,k1)%dnfxc = totdflux(k) + flxprf(iplon,k1)%upfx0 = totuclfl(k) + flxprf(iplon,k1)%dnfx0 = totdclfl(k) + enddo + endif + + do k = 1, nlay + k1 = nlp1 - k + hlwc(iplon,k1) = htr(k) + enddo + +!! --- ... optional clear sky heating rate + if ( lhlw0 ) then + do k = 1, nlay + k1 = nlp1 - k + hlw0(iplon,k1) = htrcl(k) + enddo + endif + +!! --- ... optional spectral band heating rate + if ( lhlwb ) then + do j = 1, nbands + do k = 1, nlay + k1 = nlp1 - k + hlwb(iplon,k1,j) = htrb(k,j) + enddo + enddo + endif + + else ! output from sfc to toa + +!! --- ... optional fluxes + if ( lflxprf ) then + do k = 0, nlay + flxprf(iplon,k+1)%upfxc = totuflux(k) + flxprf(iplon,k+1)%dnfxc = totdflux(k) + flxprf(iplon,k+1)%upfx0 = totuclfl(k) + flxprf(iplon,k+1)%dnfx0 = totdclfl(k) + enddo + endif + + do k = 1, nlay + hlwc(iplon,k) = htr(k) + enddo + +!! --- ... optional clear sky heating rate + if ( lhlw0 ) then + do k = 1, nlay + hlw0(iplon,k) = htrcl(k) + enddo + endif + +!! --- ... optional spectral band heating rate + if ( lhlwb ) then + do j = 1, nbands + do k = 1, nlay + hlwb(iplon,k,j) = htrb(k,j) + enddo + enddo + endif + + endif ! if_ivflip + + enddo lab_do_iplon + +!................................... + end subroutine rrtmg_lw_run +!----------------------------------- +!> @} + subroutine rrtmg_lw_finalize () + end subroutine rrtmg_lw_finalize + + + +!> \ingroup module_radlw_main +!> \brief This subroutine performs calculations necessary for the initialization +!! of the longwave model, which includes non-varying model variables, conversion +!! factors, and look-up tables +!! +!! Lookup tables are computed for use in the lw +!! radiative transfer, and input absorption coefficient data for each +!! spectral band are reduced from 256 g-point intervals to 140. +!!\param me print control for parallel process +!!\section rlwinit_gen rlwinit General Algorithm +!! @{ + subroutine rlwinit & + & (iovrlw,isubclw, me ) ! --- inputs +! --- outputs: (none) + +! =================== program usage description =================== ! +! ! +! purpose: initialize non-varying module variables, conversion factors,! +! and look-up tables. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: ! +! me - print control for parallel process ! +! ! +! outputs: (none) ! +! ! +! external module variables: (in physparam) ! +! ilwrate - heating rate unit selections ! +! =1: output in k/day ! +! =2: output in k/second ! +! ilwrgas - control flag for rare gases (ch4,n2o,o2,cfcs, etc.) ! +! =0: do not include rare gases ! +! >0: include all rare gases ! +! ilwcliq - liquid cloud optical properties contrl flag ! +! =0: input cloud opt depth from diagnostic scheme ! +! >0: input cwp,rew, and other cloud content parameters ! +! isubclw - sub-column cloud approximation control flag ! +! =0: no sub-col cld treatment, use grid-mean cld quantities ! +! =1: mcica sub-col, prescribed seeds to get random numbers ! +! =2: mcica sub-col, providing array icseed for random numbers! +! icldflg - cloud scheme control flag ! +! =0: diagnostic scheme gives cloud tau, omiga, and g. ! +! =1: prognostic scheme gives cloud liq/ice path, etc. ! +! iovrlw - clouds vertical overlapping control flag ! +! =0: random overlapping clouds ! +! =1: maximum/random overlapping clouds ! +! =2: maximum overlap cloud (isubcol>0 only) ! +! =3: decorrelation-length overlap (for isubclw>0 only) ! +! =4: exponential overlap cloud +! ! +! ******************************************************************* ! +! original code description ! +! ! +! original version: michael j. iacono; july, 1998 ! +! first revision for ncar ccm: september, 1998 ! +! second revision for rrtm_v3.0: september, 2002 ! +! ! +! this subroutine performs calculations necessary for the initialization +! of the longwave model. lookup tables are computed for use in the lw ! +! radiative transfer, and input absorption coefficient data for each ! +! spectral band are reduced from 256 g-point intervals to 140. ! +! ! +! ******************************************************************* ! +! ! +! definitions: ! +! arrays for 10000-point look-up tables: ! +! tau_tbl - clear-sky optical depth (used in cloudy radiative transfer! +! exp_tbl - exponential lookup table for tansmittance ! +! tfn_tbl - tau transition function; i.e. the transition of the Planck! +! function from that for the mean layer temperature to that ! +! for the layer boundary temperature as a function of optical +! depth. the "linear in tau" method is used to make the table +! ! +! ******************************************************************* ! +! ! +! ====================== end of description block ================= ! + +! --- inputs: + integer, intent(in) :: me,isubclw + integer, intent(inout) :: iovrlw + +! --- outputs: none + +! --- locals: + real (kind=kind_phys), parameter :: expeps = 1.e-20 + + real (kind=kind_phys) :: tfn, pival, explimit + + integer :: i + +! +!===> ... begin here +! + if ( iovrlw<0 .or. iovrlw>4 ) then + print *,' *** Error in specification of cloud overlap flag', & + & ' IOVRLW=',iovrlw,' in RLWINIT !!' + stop +!mz +! elseif ( iovrlw>=2 .and. isubclw==0 ) then + elseif ( (iovrlw.eq.2 .or. iovrlw.eq.3).and. isubclw==0 ) then + if (me == 0) then + print *,' *** IOVRLW=',iovrlw,' is not available for', & + & ' ISUBCLW=0 setting!!' + print *,' The program uses maximum/random overlap', & + & ' instead.' + endif + + iovrlw = 1 + endif + + if (me == 0) then + print *,' - Using AER Longwave Radiation, Version: ', VTAGLW + + if (ilwrgas > 0) then + print *,' --- Include rare gases N2O, CH4, O2, CFCs ', & + & 'absorptions in LW' + else + print *,' --- Rare gases effect is NOT included in LW' + endif + + if ( isubclw == 0 ) then + print *,' --- Using standard grid average clouds, no ', & + & 'sub-column clouds approximation applied' + elseif ( isubclw == 1 ) then + print *,' --- Using MCICA sub-colum clouds approximation ', & + & 'with a prescribed sequence of permutaion seeds' + elseif ( isubclw == 2 ) then + print *,' --- Using MCICA sub-colum clouds approximation ', & + & 'with provided input array of permutation seeds' + else + print *,' *** Error in specification of sub-column cloud ', & + & ' control flag isubclw =',isubclw,' !!' + stop + endif + endif + +!> -# Check cloud flags for consistency. + + if ((icldflg == 0 .and. ilwcliq /= 0) .or. & + & (icldflg == 1 .and. ilwcliq == 0)) then + print *,' *** Model cloud scheme inconsistent with LW', & + & ' radiation cloud radiative property setup !!' + stop + endif + +!> -# Setup default surface emissivity for each band. + + semiss0(:) = f_one + +!> -# Setup constant factors for flux and heating rate +!! the 1.0e-2 is to convert pressure from mb to \f$N/m^2\f$. + + pival = 2.0 * asin(f_one) + fluxfac = pival * 2.0d4 +! fluxfac = 62831.85307179586 ! = 2 * pi * 1.0e4 + + if (ilwrate == 1) then +! heatfac = 8.4391 +! heatfac = con_g * 86400. * 1.0e-2 / con_cp ! (in k/day) + heatfac = con_g * 864.0 / con_cp ! (in k/day) + else + heatfac = con_g * 1.0e-2 / con_cp ! (in k/second) + endif + +!> -# Compute lookup tables for transmittance, tau transition +!! function, and clear sky tau (for the cloudy sky radiative +!! transfer). tau is computed as a function of the tau +!! transition function, transmittance is calculated as a +!! function of tau, and the tau transition function is +!! calculated using the linear in tau formulation at values of +!! tau above 0.01. tf is approximated as tau/6 for tau < 0.01. +!! all tables are computed at intervals of 0.001. the inverse +!! of the constant used in the pade approximation to the tau +!! transition function is set to b. + + tau_tbl(0) = f_zero + exp_tbl(0) = f_one + tfn_tbl(0) = f_zero + + tau_tbl(ntbl) = 1.e10 + exp_tbl(ntbl) = expeps + tfn_tbl(ntbl) = f_one + + explimit = aint( -log(tiny(exp_tbl(0))) ) + + do i = 1, ntbl-1 +!org tfn = float(i) / float(ntbl) +!org tau_tbl(i) = bpade * tfn / (f_one - tfn) + tfn = real(i, kind_phys) / real(ntbl-i, kind_phys) + tau_tbl(i) = bpade * tfn + if (tau_tbl(i) >= explimit) then + exp_tbl(i) = expeps + else + exp_tbl(i) = exp( -tau_tbl(i) ) + endif + + if (tau_tbl(i) < 0.06) then + tfn_tbl(i) = tau_tbl(i) / 6.0 + else + tfn_tbl(i) = f_one - 2.0*( (f_one / tau_tbl(i)) & + & - ( exp_tbl(i) / (f_one - exp_tbl(i)) ) ) + endif + enddo + +!................................... + end subroutine rlwinit +!! @} +!----------------------------------- + + +!>\ingroup module_radlw_main +!> \brief This subroutine computes the cloud optical depth(s) for each cloudy +!! layer and g-point interval. +!!\param cfrac layer cloud fraction +!!\n --- for ilwcliq > 0 (prognostic cloud scheme) - - - +!!\param cliqp layer in-cloud liq water path (\f$g/m^2\f$) +!!\param reliq mean eff radius for liq cloud (micron) +!!\param cicep layer in-cloud ice water path (\f$g/m^2\f$) +!!\param reice mean eff radius for ice cloud (micron) +!!\param cdat1 layer rain drop water path (\f$g/m^2\f$) +!!\param cdat2 effective radius for rain drop (micron) +!!\param cdat3 layer snow flake water path(\f$g/m^2\f$) +!!\param cdat4 mean effective radius for snow flake(micron) +!!\n --- for ilwcliq = 0 (diagnostic cloud scheme) - - - +!!\param cliqp not used +!!\param cicep not used +!!\param reliq not used +!!\param reice not used +!!\param cdat1 layer cloud optical depth +!!\param cdat2 layer cloud single scattering albedo +!!\param cdat3 layer cloud asymmetry factor +!!\param cdat4 optional use +!!\param nlay number of layer number +!!\param nlp1 number of veritcal levels +!!\param ipseed permutation seed for generating random numbers (isubclw>0) +!!\param dz layer thickness (km) +!!\param de_lgth layer cloud decorrelation length (km) +!!\param cldfmc cloud fraction for each sub-column +!!\param taucld cloud optical depth for bands (non-mcica) +!!\section gen_cldprop cldprop General Algorithm +!> @{ + subroutine cldprop & + & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs + & nlay, nlp1, ipseed, dz, de_lgth,iovrlw,isubclw, & + & cldfmc, taucld & ! --- outputs + & ) + +! =================== program usage description =================== ! +! ! +! purpose: compute the cloud optical depth(s) for each cloudy layer ! +! and g-point interval. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: -size- ! +! cfrac - real, layer cloud fraction 0:nlp1 ! +! ..... for ilwcliq > 0 (prognostic cloud sckeme) - - - ! +! cliqp - real, layer in-cloud liq water path (g/m**2) nlay ! +! reliq - real, mean eff radius for liq cloud (micron) nlay ! +! cicep - real, layer in-cloud ice water path (g/m**2) nlay ! +! reice - real, mean eff radius for ice cloud (micron) nlay ! +! cdat1 - real, layer rain drop water path (g/m**2) nlay ! +! cdat2 - real, effective radius for rain drop (microm) nlay ! +! cdat3 - real, layer snow flake water path (g/m**2) nlay ! +! cdat4 - real, effective radius for snow flakes (micron) nlay ! +! ..... for ilwcliq = 0 (diagnostic cloud sckeme) - - - ! +! cdat1 - real, input cloud optical depth nlay ! +! cdat2 - real, layer cloud single scattering albedo nlay ! +! cdat3 - real, layer cloud asymmetry factor nlay ! +! cdat4 - real, optional use nlay ! +! cliqp - not used nlay ! +! reliq - not used nlay ! +! cicep - not used nlay ! +! reice - not used nlay ! +! ! +! dz - real, layer thickness (km) nlay ! +! de_lgth- real, layer cloud decorrelation length (km) 1 ! +! nlay - integer, number of vertical layers 1 ! +! nlp1 - integer, number of vertical levels 1 ! +! ipseed- permutation seed for generating random numbers (isubclw>0) ! +! ! +! outputs: ! +! cldfmc - real, cloud fraction for each sub-column ngptlw*nlay! +! taucld - real, cld opt depth for bands (non-mcica) nbands*nlay! +! ! +! explanation of the method for each value of ilwcliq, and ilwcice. ! +! set up in module "module_radlw_cntr_para" ! +! ! +! ilwcliq=0 : input cloud optical property (tau, ssa, asy). ! +! (used for diagnostic cloud method) ! +! ilwcliq>0 : input cloud liq/ice path and effective radius, also ! +! require the user of 'ilwcice' to specify the method ! +! used to compute aborption due to water/ice parts. ! +! ................................................................... ! +! ! +! ilwcliq=1: the water droplet effective radius (microns) is input! +! and the opt depths due to water clouds are computed ! +! as in hu and stamnes, j., clim., 6, 728-742, (1993). ! +! the values for absorption coefficients appropriate for +! the spectral bands in rrtm have been obtained for a ! +! range of effective radii by an averaging procedure ! +! based on the work of j. pinto (private communication). +! linear interpolation is used to get the absorption ! +! coefficients for the input effective radius. ! +! ! +! ilwcice=1: the cloud ice path (g/m2) and ice effective radius ! +! (microns) are input and the optical depths due to ice! +! clouds are computed as in ebert and curry, jgr, 97, ! +! 3831-3836 (1992). the spectral regions in this work ! +! have been matched with the spectral bands in rrtm to ! +! as great an extent as possible: ! +! e&c 1 ib = 5 rrtm bands 9-16 ! +! e&c 2 ib = 4 rrtm bands 6-8 ! +! e&c 3 ib = 3 rrtm bands 3-5 ! +! e&c 4 ib = 2 rrtm band 2 ! +! e&c 5 ib = 1 rrtm band 1 ! +! ilwcice=2: the cloud ice path (g/m2) and ice effective radius ! +! (microns) are input and the optical depths due to ice! +! clouds are computed as in rt code, streamer v3.0 ! +! (ref: key j., streamer user's guide, cooperative ! +! institute for meteorological satellite studies, 2001,! +! 96 pp.) valid range of values for re are between 5.0 ! +! and 131.0 micron. ! +! ilwcice=3: the ice generalized effective size (dge) is input and! +! the optical properties, are calculated as in q. fu, ! +! j. climate, (1998). q. fu provided high resolution ! +! tales which were appropriately averaged for the bands! +! in rrtm_lw. linear interpolation is used to get the ! +! coeff from the stored tables. valid range of values ! +! for deg are between 5.0 and 140.0 micron. ! +! ! +! other cloud control module variables: ! +! isubclw =0: standard cloud scheme, no sub-col cloud approximation ! +! >0: mcica sub-col cloud scheme using ipseed as permutation! +! seed for generating rundom numbers ! +! ! +! ====================== end of description block ================= ! +! + use module_radlw_cldprlw + +! --- inputs: + integer, intent(in) :: nlay, nlp1, ipseed,iovrlw,isubclw + + real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cfrac + real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & + & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, dz + real (kind=kind_phys), intent(in) :: de_lgth + +! --- outputs: + real (kind=kind_phys), dimension(ngptlw,nlay),intent(out):: cldfmc + real (kind=kind_phys), dimension(nbands,nlay),intent(out):: taucld + +! --- locals: + real (kind=kind_phys), dimension(nbands) :: tauliq, tauice + real (kind=kind_phys), dimension(nlay) :: cldf + + real (kind=kind_phys) :: dgeice, factor, fint, tauran, tausnw, & + & cldliq, refliq, cldice, refice + + logical :: lcloudy(ngptlw,nlay) + integer :: ia, ib, ig, k, index + +! +!===> ... begin here +! + do k = 1, nlay + do ib = 1, nbands + taucld(ib,k) = f_zero + enddo + enddo + + do k = 1, nlay + do ig = 1, ngptlw + cldfmc(ig,k) = f_zero + enddo + enddo + +!> -# Compute cloud radiative properties for a cloudy column: +!!\n - Compute cloud radiative properties for rain and snow (tauran,tausnw) +!!\n - Calculation of absorption coefficients due to water clouds(tauliq) +!!\n - Calculation of absorption coefficients due to ice clouds (tauice). +!!\n - For prognostic cloud scheme: sum up the cloud optical property: +!!\n \f$ taucld=tauice+tauliq+tauran+tausnw \f$ + +! --- ... compute cloud radiative properties for a cloudy column + + lab_if_ilwcliq : if (ilwcliq > 0) then + + lab_do_k : do k = 1, nlay + lab_if_cld : if (cfrac(k) > cldmin) then + + tauran = absrain * cdat1(k) ! ncar formula +!! tausnw = abssnow1 * cdat3(k) ! ncar formula +! --- if use fu's formula it needs to be normalized by snow density +! !not use snow density = 0.1 g/cm**3 = 0.1 g/(mu * m**2) +! use ice density = 0.9167 g/cm**3 = 0.9167 g/(mu * m**2) +! factor 1.5396=8/(3*sqrt(3)) converts reff to generalized ice particle size +! use newer factor value 1.0315 +! 1/(0.9167*1.0315) = 1.05756 + if (cdat3(k)>f_zero .and. cdat4(k)>10.0_kind_phys) then + tausnw = abssnow0*1.05756*cdat3(k)/cdat4(k) ! fu's formula + else + tausnw = f_zero + endif + + cldliq = cliqp(k) + cldice = cicep(k) +! refliq = max(2.5e0, min(60.0e0, reliq(k) )) +! refice = max(5.0e0, reice(k) ) + refliq = reliq(k) + refice = reice(k) + +! --- ... calculation of absorption coefficients due to water clouds. + + if ( cldliq <= f_zero ) then + do ib = 1, nbands + tauliq(ib) = f_zero + enddo + else + if ( ilwcliq == 1 ) then + + factor = refliq - 1.5 + index = max( 1, min( 57, int( factor ) )) + fint = factor - float(index) + + do ib = 1, nbands + tauliq(ib) = max(f_zero, cldliq*(absliq1(index,ib) & + & + fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) + enddo + endif ! end if_ilwcliq_block + endif ! end if_cldliq_block + +! --- ... calculation of absorption coefficients due to ice clouds. + + if ( cldice <= f_zero ) then + do ib = 1, nbands + tauice(ib) = f_zero + enddo + else + +! --- ... ebert and curry approach for all particle sizes though somewhat +! unjustified for large ice particles + + if ( ilwcice == 1 ) then + refice = min(130.0, max(13.0, real(refice) )) + + do ib = 1, nbands + ia = ipat(ib) ! eb_&_c band index for ice cloud coeff + tauice(ib) = max(f_zero, cldice*(absice1(1,ia) & + & + absice1(2,ia)/refice) ) + enddo + +! --- ... streamer approach for ice effective radius between 5.0 and 131.0 microns +! and ebert and curry approach for ice eff radius greater than 131.0 microns. +! no smoothing between the transition of the two methods. + + elseif ( ilwcice == 2 ) then + + factor = (refice - 2.0) / 3.0 + index = max( 1, min( 42, int( factor ) )) + fint = factor - float(index) + + do ib = 1, nbands + tauice(ib) = max(f_zero, cldice*(absice2(index,ib) & + & + fint*(absice2(index+1,ib) - absice2(index,ib)) )) + enddo + +! --- ... fu's approach for ice effective radius between 4.8 and 135 microns +! (generalized effective size from 5 to 140 microns) + + elseif ( ilwcice == 3 ) then + +! dgeice = max(5.0, 1.5396*refice) ! v4.4 value + dgeice = max(5.0, 1.0315*refice) ! v4.71 value + factor = (dgeice - 2.0) / 3.0 + index = max( 1, min( 45, int( factor ) )) + fint = factor - float(index) + + do ib = 1, nbands + tauice(ib) = max(f_zero, cldice*(absice3(index,ib) & + & + fint*(absice3(index+1,ib) - absice3(index,ib)) )) + enddo + + endif ! end if_ilwcice_block + endif ! end if_cldice_block + + do ib = 1, nbands + taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw + enddo + + endif lab_if_cld + enddo lab_do_k + + else lab_if_ilwcliq + + do k = 1, nlay + if (cfrac(k) > cldmin) then + do ib = 1, nbands + taucld(ib,k) = cdat1(k) + enddo + endif + enddo + + endif lab_if_ilwcliq + +!> -# if isubclw > 0, call mcica_subcol() to distribute +!! cloud properties to each g-point. + + if ( isubclw > 0 ) then ! mcica sub-col clouds approx + do k = 1, nlay + if ( cfrac(k) < cldmin ) then + cldf(k) = f_zero + else + cldf(k) = cfrac(k) + endif + enddo + +! --- ... call sub-column cloud generator + + call mcica_subcol & +! --- inputs: + & ( cldf, nlay, ipseed, dz, de_lgth, iovrlw, & +! --- output: + & lcloudy & + & ) + + do k = 1, nlay + do ig = 1, ngptlw + if ( lcloudy(ig,k) ) then + cldfmc(ig,k) = f_one + else + cldfmc(ig,k) = f_zero + endif + enddo + enddo + + endif ! end if_isubclw_block + + return +! .................................. + end subroutine cldprop +! ---------------------------------- +!> @} + +!>\ingroup module_radlw_main +!>\brief This suroutine computes sub-colum cloud profile flag array. +!!\param cldf layer cloud fraction +!!\param nlay number of model vertical layers +!!\param ipseed permute seed for random num generator +!!\param dz layer thickness +!!\param de_lgth layer cloud decorrelation length (km) +!!\param lcloudy sub-colum cloud profile flag array +!!\section mcica_subcol_gen mcica_subcol General Algorithm +!! @{ + subroutine mcica_subcol & + & ( cldf, nlay, ipseed, dz, de_lgth, iovrlw, & ! --- inputs + & lcloudy & ! --- outputs + & ) + +! ==================== defination of variables ==================== ! +! ! +! input variables: size ! +! cldf - real, layer cloud fraction nlay ! +! nlay - integer, number of model vertical layers 1 ! +! ipseed - integer, permute seed for random num generator 1 ! +! ** note : if the cloud generator is called multiple times, need ! +! to permute the seed between each call; if between calls ! +! for lw and sw, use values differ by the number of g-pts. ! +! dz - real, layer thickness (km) nlay ! +! de_lgth - real, layer cloud decorrelation length (km) 1 ! +! ! +! output variables: ! +! lcloudy - logical, sub-colum cloud profile flag array ngptlw*nlay! +! ! +! other control flags from module variables: ! +! iovrlw : control flag for cloud overlapping method ! +! =0:random; =1:maximum/random: =2:maximum; =3:decorr ! +! ! +! ===================== end of definitions ==================== ! + + implicit none + +! --- inputs: + integer, intent(in) :: nlay, ipseed, iovrlw + + real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz + real (kind=kind_phys), intent(in) :: de_lgth + +! --- outputs: + logical, dimension(ngptlw,nlay), intent(out) :: lcloudy + +! --- locals: + real (kind=kind_phys) :: cdfunc(ngptlw,nlay), rand1d(ngptlw), & + & rand2d(nlay*ngptlw), tem1, fac_lcf(nlay), & + & cdfun2(ngptlw,nlay) + + type (random_stat) :: stat ! for thread safe random generator + + integer :: k, n, k1 +! +!===> ... begin here +! +!> -# Call random_setseed() to advance randum number generator by ipseed values. + + call random_setseed & +! --- inputs: + & ( ipseed, & +! --- outputs: + & stat & + & ) + +!> -# Sub-column set up according to overlapping assumption: +!! - For random overlap, pick a random value at every level +!! - For max-random overlap, pick a random value at every level +!! - For maximum overlap, pick same random numebr at every level + + select case ( iovrlw ) + + case( 0 ) ! random overlap, pick a random value at every level + + call random_number & +! --- inputs: ( none ) +! --- outputs: + & ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptlw + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + case( 1 ) ! max-ran overlap + + call random_number & +! --- inputs: ( none ) +! --- outputs: + & ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptlw + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + +! --- first pick a random number for bottom (or top) layer. +! then walk up the column: (aer's code) +! if layer below is cloudy, use the same rand num in the layer below +! if layer below is clear, use a new random number + +! --- from bottom up + do k = 2, nlay + k1 = k - 1 + tem1 = f_one - cldf(k1) + + do n = 1, ngptlw + if ( cdfunc(n,k1) > tem1 ) then + cdfunc(n,k) = cdfunc(n,k1) + else + cdfunc(n,k) = cdfunc(n,k) * tem1 + endif + enddo + enddo + +! --- or walk down the column: (if use original author's method) +! if layer above is cloudy, use the same rand num in the layer above +! if layer above is clear, use a new random number + +! --- from top down +! do k = nlay-1, 1, -1 +! k1 = k + 1 +! tem1 = f_one - cldf(k1) + +! do n = 1, ngptlw +! if ( cdfunc(n,k1) > tem1 ) then +! cdfunc(n,k) = cdfunc(n,k1) +! else +! cdfunc(n,k) = cdfunc(n,k) * tem1 +! endif +! enddo +! enddo + + case( 2 ) !< - For maximum overlap, pick same random numebr at every level + + call random_number & +! --- inputs: ( none ) +! --- outputs: + & ( rand1d, stat ) + + do n = 1, ngptlw + tem1 = rand1d(n) + + do k = 1, nlay + cdfunc(n,k) = tem1 + enddo + enddo + + case( 3 ) ! decorrelation length overlap + +! --- compute overlapping factors based on layer midpoint distances +! and decorrelation depths + + do k = nlay, 2, -1 + fac_lcf(k) = exp( -0.5 * (dz(k)+dz(k-1)) / de_lgth ) + enddo + +! --- setup 2 sets of random numbers + + call random_number ( rand2d, stat ) + + k1 = 0 + do k = 1, nlay + do n = 1, ngptlw + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + call random_number ( rand2d, stat ) + + k1 = 0 + do k = 1, nlay + do n = 1, ngptlw + k1 = k1 + 1 + cdfun2(n,k) = rand2d(k1) + enddo + enddo + +! --- then working from the top down: +! if a random number (from an independent set -cdfun2) is smaller then the +! scale factor: use the upper layer's number, otherwise use a new random +! number (keep the original assigned one). + + do k = nlay-1, 1, -1 + k1 = k + 1 + + do n = 1, ngptlw + if ( cdfun2(n,k) <= fac_lcf(k1) ) then + cdfunc(n,k) = cdfunc(n,k1) + endif + enddo + enddo + + end select + +!> -# Generate subcolumns for homogeneous clouds. + + do k = 1, nlay + tem1 = f_one - cldf(k) + + do n = 1, ngptlw + lcloudy(n,k) = cdfunc(n,k) >= tem1 + enddo + enddo + + return +! .................................. + end subroutine mcica_subcol +!! @} +! ---------------------------------- + +!>\ingroup module_radlw_main +!> This subroutine computes various coefficients needed in radiative +!! transfer calculations. +!!\param pavel layer pressure (mb) +!!\param tavel layer temperature (K) +!!\param tz level(interface) temperatures (K) +!!\param stemp surface ground temperature (K) +!!\param h2ovmr layer w.v. volumn mixing ratio (kg/kg) +!!\param colamt column amounts of absorbing gases. +!! 2nd indices range: 1-maxgas, for watervapor,carbon dioxide, ozone, +!! nitrous oxide, methane,oxigen, carbon monoxide,etc. \f$(mol/cm^2)\f$ +!!\param coldry dry air column amount +!!\param colbrd column amount of broadening gases +!!\param nlay total number of vertical layers +!!\param nlp1 total number of vertical levels +!!\param laytrop tropopause layer index (unitless) +!!\param pklay integrated planck func at lay temp +!!\param pklev integrated planck func at lev temp +!!\param jp indices of lower reference pressure +!!\param jt, jt1 indices of lower reference temperatures +!!\param rfrate ref ratios of binary species param +!!\n (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o, +!! 4-h2o/ch4,5-n2o/co2,6-o3/co2 +!!\n (:,:,n)n=1,2: the rates of ref press at +!! the 2 sides of the layer +!!\param fac00,fac01,fac10,fac11 factors multiply the reference ks, i,j=0/1 for +!! lower/higher of the 2 appropriate temperatures +!! and altitudes. +!!\param selffac scale factor for w. v. self-continuum equals +!! (w. v. density)/(atmospheric density at 296k and 1013 mb) +!!\param selffrac factor for temperature interpolation of +!! reference w. v. self-continuum data +!!\param indself index of lower ref temp for selffac +!!\param forfac scale factor for w. v. foreign-continuum +!!\param forfrac factor for temperature interpolation of +!! reference w.v. foreign-continuum data +!!\param indfor index of lower ref temp for forfac +!!\param minorfrac factor for minor gases +!!\param scaleminor,scaleminorn2 scale factors for minor gases +!!\param indminor index of lower ref temp for minor gases +!>\section setcoef_gen setcoef General Algorithm +!> @{ + subroutine setcoef & + & ( pavel,tavel,tz,stemp,h2ovmr,colamt,coldry,colbrd, & ! --- inputs: + & nlay, nlp1, & + & laytrop,pklay,pklev,jp,jt,jt1, & ! --- outputs: + & rfrate,fac00,fac01,fac10,fac11, & + & selffac,selffrac,indself,forfac,forfrac,indfor, & + & minorfrac,scaleminor,scaleminorn2,indminor & + & ) + +! =================== program usage description =================== ! +! ! +! purpose: compute various coefficients needed in radiative transfer ! +! calculations. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: -size- ! +! pavel - real, layer pressures (mb) nlay ! +! tavel - real, layer temperatures (k) nlay ! +! tz - real, level (interface) temperatures (k) 0:nlay ! +! stemp - real, surface ground temperature (k) 1 ! +! h2ovmr - real, layer w.v. volum mixing ratio (kg/kg) nlay ! +! colamt - real, column amounts of absorbing gases nlay*maxgas! +! 2nd indices range: 1-maxgas, for watervapor, ! +! carbon dioxide, ozone, nitrous oxide, methane, ! +! oxigen, carbon monoxide,etc. (molecules/cm**2) ! +! coldry - real, dry air column amount nlay ! +! colbrd - real, column amount of broadening gases nlay ! +! nlay/nlp1 - integer, total number of vertical layers, levels 1 ! +! ! +! outputs: ! +! laytrop - integer, tropopause layer index (unitless) 1 ! +! pklay - real, integrated planck func at lay temp nbands*0:nlay! +! pklev - real, integrated planck func at lev temp nbands*0:nlay! +! jp - real, indices of lower reference pressure nlay ! +! jt, jt1 - real, indices of lower reference temperatures nlay ! +! rfrate - real, ref ratios of binary species param nlay*nrates*2! +! (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4,5-n2o/co2,6-o3/co2! +! (:,:,n)n=1,2: the rates of ref press at the 2 sides of the layer ! +! facij - real, factors multiply the reference ks, nlay ! +! i,j=0/1 for lower/higher of the 2 appropriate ! +! temperatures and altitudes. ! +! selffac - real, scale factor for w. v. self-continuum nlay ! +! equals (w. v. density)/(atmospheric density ! +! at 296k and 1013 mb) ! +! selffrac - real, factor for temperature interpolation of nlay ! +! reference w. v. self-continuum data ! +! indself - integer, index of lower ref temp for selffac nlay ! +! forfac - real, scale factor for w. v. foreign-continuum nlay ! +! forfrac - real, factor for temperature interpolation of nlay ! +! reference w.v. foreign-continuum data ! +! indfor - integer, index of lower ref temp for forfac nlay ! +! minorfrac - real, factor for minor gases nlay ! +! scaleminor,scaleminorn2 ! +! - real, scale factors for minor gases nlay ! +! indminor - integer, index of lower ref temp for minor gases nlay ! +! ! +! ====================== end of definitions =================== ! + +! --- inputs: + integer, intent(in) :: nlay, nlp1 + + real (kind=kind_phys), dimension(nlay,maxgas),intent(in):: colamt + real (kind=kind_phys), dimension(0:nlay), intent(in):: tz + + real (kind=kind_phys), dimension(nlay), intent(in) :: pavel, & + & tavel, h2ovmr, coldry, colbrd + + real (kind=kind_phys), intent(in) :: stemp + +! --- outputs: + integer, dimension(nlay), intent(out) :: jp, jt, jt1, indself, & + & indfor, indminor + + integer, intent(out) :: laytrop + + real (kind=kind_phys), dimension(nlay,nrates,2), intent(out) :: & + & rfrate + real (kind=kind_phys), dimension(nbands,0:nlay), intent(out) :: & + & pklev, pklay + + real (kind=kind_phys), dimension(nlay), intent(out) :: & + & fac00, fac01, fac10, fac11, selffac, selffrac, forfac, & + & forfrac, minorfrac, scaleminor, scaleminorn2 + +! --- locals: + real (kind=kind_phys) :: tlvlfr, tlyrfr, plog, fp, ft, ft1, & + & tem1, tem2 + + integer :: i, k, jp1, indlev, indlay +! +!===> ... begin here +! +!> -# Calculate information needed by the radiative transfer routine +!! that is specific to this atmosphere, especially some of the +!! coefficients and indices needed to compute the optical depths +!! by interpolating data from stored reference atmospheres. + + indlay = min(180, max(1, int(stemp-159.0) )) + indlev = min(180, max(1, int(tz(0)-159.0) )) + tlyrfr = stemp - int(stemp) + tlvlfr = tz(0) - int(tz(0)) + do i = 1, nbands + tem1 = totplnk(indlay+1,i) - totplnk(indlay,i) + tem2 = totplnk(indlev+1,i) - totplnk(indlev,i) + pklay(i,0) = delwave(i) * (totplnk(indlay,i) + tlyrfr*tem1) + pklev(i,0) = delwave(i) * (totplnk(indlev,i) + tlvlfr*tem2) + enddo + +! --- ... begin layer loop +!> -# Calculate the integrated Planck functions for each band at the +!! surface, level, and layer temperatures. + + laytrop = 0 + + do k = 1, nlay + + indlay = min(180, max(1, int(tavel(k)-159.0) )) + tlyrfr = tavel(k) - int(tavel(k)) + + indlev = min(180, max(1, int(tz(k)-159.0) )) + tlvlfr = tz(k) - int(tz(k)) + +! --- ... begin spectral band loop + + do i = 1, nbands +!mz* +! plankbnd(iband) = semiss(iband) * & +! (totplnk(indbound,iband) + tbndfrac * dbdtlev) +!mz + + pklay(i,k) = delwave(i) * (totplnk(indlay,i) + tlyrfr & + & * (totplnk(indlay+1,i) - totplnk(indlay,i)) ) + pklev(i,k) = delwave(i) * (totplnk(indlev,i) + tlvlfr & + & * (totplnk(indlev+1,i) - totplnk(indlev,i)) ) + enddo + +!> -# Find the two reference pressures on either side of the +!! layer pressure. store them in jp and jp1. store in fp the +!! fraction of the difference (in ln(pressure)) between these +!! two values that the layer pressure lies. + + plog = log(pavel(k)) + jp(k)= max(1, min(58, int(36.0 - 5.0*(plog+0.04)) )) + jp1 = jp(k) + 1 +! --- ... limit pressure extrapolation at the top + fp = max(f_zero, min(f_one, 5.0*(preflog(jp(k))-plog) )) +!org fp = 5.0 * (preflog(jp(k)) - plog) + +!> -# Determine, for each reference pressure (jp and jp1), which +!! reference temperature (these are different for each +!! reference pressure) is nearest the layer temperature but does +!! not exceed it. store these indices in jt and jt1, resp. +!! store in ft (resp. ft1) the fraction of the way between jt +!! (jt1) and the next highest reference temperature that the +!! layer temperature falls. + + tem1 = (tavel(k)-tref(jp(k))) / 15.0 + tem2 = (tavel(k)-tref(jp1 )) / 15.0 + jt (k) = max(1, min(4, int(3.0 + tem1) )) + jt1(k) = max(1, min(4, int(3.0 + tem2) )) +! --- ... restrict extrapolation ranges by limiting abs(det t) < 37.5 deg + ft = max(-0.5, min(1.5, tem1 - float(jt (k) - 3) )) + ft1 = max(-0.5, min(1.5, tem2 - float(jt1(k) - 3) )) +!org ft = tem1 - float(jt (k) - 3) +!org ft1 = tem2 - float(jt1(k) - 3) + +!> -# We have now isolated the layer ln pressure and temperature, +!! between two reference pressures and two reference temperatures +!!(for each reference pressure). we multiply the pressure +!! fraction fp with the appropriate temperature fractions to get +!! the factors that will be needed for the interpolation that yields +!! the optical depths (performed in routines taugbn for band n). + + tem1 = f_one - fp + fac10(k) = tem1 * ft + fac00(k) = tem1 * (f_one - ft) + fac11(k) = fp * ft1 + fac01(k) = fp * (f_one - ft1) + + forfac(k) = pavel(k)*stpfac / (tavel(k)*(1.0 + h2ovmr(k))) + selffac(k) = h2ovmr(k) * forfac(k) + +!> -# Set up factors needed to separately include the minor gases +!! in the calculation of absorption coefficient. + + scaleminor(k) = pavel(k) / tavel(k) + scaleminorn2(k) = (pavel(k) / tavel(k)) & + & * (colbrd(k)/(coldry(k) + colamt(k,1))) + tem1 = (tavel(k) - 180.8) / 7.2 + indminor(k) = min(18, max(1, int(tem1))) + minorfrac(k) = tem1 - float(indminor(k)) + +!> -# If the pressure is less than ~100mb, perform a different +!! set of species interpolations. + + if (plog > 4.56) then + + laytrop = laytrop + 1 + + tem1 = (332.0 - tavel(k)) / 36.0 + indfor(k) = min(2, max(1, int(tem1))) + forfrac(k) = tem1 - float(indfor(k)) + +!> -# Set up factors needed to separately include the water vapor +!! self-continuum in the calculation of absorption coefficient. + + tem1 = (tavel(k) - 188.0) / 7.2 + indself(k) = min(9, max(1, int(tem1)-7)) + selffrac(k) = tem1 - float(indself(k) + 7) + +!> -# Setup reference ratio to be used in calculation of binary +!! species parameter in lower atmosphere. + + rfrate(k,1,1) = chi_mls(1,jp(k)) / chi_mls(2,jp(k)) + rfrate(k,1,2) = chi_mls(1,jp(k)+1) / chi_mls(2,jp(k)+1) + + rfrate(k,2,1) = chi_mls(1,jp(k)) / chi_mls(3,jp(k)) + rfrate(k,2,2) = chi_mls(1,jp(k)+1) / chi_mls(3,jp(k)+1) + + rfrate(k,3,1) = chi_mls(1,jp(k)) / chi_mls(4,jp(k)) + rfrate(k,3,2) = chi_mls(1,jp(k)+1) / chi_mls(4,jp(k)+1) + + rfrate(k,4,1) = chi_mls(1,jp(k)) / chi_mls(6,jp(k)) + rfrate(k,4,2) = chi_mls(1,jp(k)+1) / chi_mls(6,jp(k)+1) + + rfrate(k,5,1) = chi_mls(4,jp(k)) / chi_mls(2,jp(k)) + rfrate(k,5,2) = chi_mls(4,jp(k)+1) / chi_mls(2,jp(k)+1) + + else + + tem1 = (tavel(k) - 188.0) / 36.0 + indfor(k) = 3 + forfrac(k) = tem1 - f_one + + indself(k) = 0 + selffrac(k) = f_zero + +!> -# Setup reference ratio to be used in calculation of binary +!! species parameter in upper atmosphere. + + rfrate(k,1,1) = chi_mls(1,jp(k)) / chi_mls(2,jp(k)) + rfrate(k,1,2) = chi_mls(1,jp(k)+1) / chi_mls(2,jp(k)+1) + + rfrate(k,6,1) = chi_mls(3,jp(k)) / chi_mls(2,jp(k)) + rfrate(k,6,2) = chi_mls(3,jp(k)+1) / chi_mls(2,jp(k)+1) + + endif + +!> -# Rescale \a selffac and \a forfac for use in taumol. + + selffac(k) = colamt(k,1) * selffac(k) + forfac(k) = colamt(k,1) * forfac(k) + + enddo ! end do_k layer loop + + return +! .................................. + end subroutine setcoef +!> @} +! ---------------------------------- + +!>\ingroup module_radlw_main +!> This subroutine computes the upward/downward radiative fluxes, and +!! heating rates for both clear or cloudy atmosphere. Clouds assumed as +!! randomly overlaping in a vertical column. +!!\brief Original Code Description: this program calculates the upward +!! fluxes, downward fluxes, and heating rates for an arbitrary clear or +!! cloudy atmosphere. The input to this program is the atmospheric +!! profile, all Planck function information, and the cloud fraction by +!! layer. A variable diffusivity angle (secdif) is used for the angle +!! integration. Bands 2-3 and 5-9 use a value for secdif that varies +!! from 1.50 to 1.80 as a function of the column water vapor, and other +!! bands use a value of 1.66. The gaussian weight appropriate to this +!! angle (wtdiff =0.5) is applied here. Note that use of the emissivity +!! angle for the flux integration can cause errors of 1 to 4 \f$W/m^2\f$ +!! within cloudy layers. Clouds are treated with a random cloud overlap +!! method. +!!\param semiss lw surface emissivity +!!\param delp layer pressure thickness (mb) +!!\param cldfrc layer cloud fraction +!!\param taucld layer cloud opt depth +!!\param tautot total optical depth (gas+aerosols) +!!\param pklay integrated planck function at lay temp +!!\param pklev integrated planck func at lev temp +!!\param fracs planck fractions +!!\param secdif secant of diffusivity angle +!!\param nlay number of vertical layers +!!\param nlp1 number of vertical levels (interfaces) +!!\param totuflux total sky upward flux \f$(w/m^2)\f$ +!!\param totdflux total sky downward flux \f$(w/m^2)\f$ +!!\param htr total sky heating rate (k/sec or k/day) +!!\param totuclfl clear sky upward flux \f$(w/m^2)\f$ +!!\param totdclfl clear sky downward flux \f$(w/m^2)\f$ +!!\param htrcl clear sky heating rate (k/sec or k/day) +!!\param htrb spectral band lw heating rate (k/day) +!>\section gen_rtrn rtrn General Algorithm +!! @{ +! ---------------------------------- + subroutine rtrn & + & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, & ! --- inputs + & fracs,secdif, nlay,nlp1, & + & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs + & ) + +! =================== program usage description =================== ! +! ! +! purpose: compute the upward/downward radiative fluxes, and heating ! +! rates for both clear or cloudy atmosphere. clouds are assumed as ! +! randomly overlaping in a vertical colum. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: -size- ! +! semiss - real, lw surface emissivity nbands! +! delp - real, layer pressure thickness (mb) nlay ! +! cldfrc - real, layer cloud fraction 0:nlp1 ! +! taucld - real, layer cloud opt depth nbands,nlay! +! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay! +! pklay - real, integrated planck func at lay temp nbands*0:nlay! +! pklev - real, integrated planck func at lev temp nbands*0:nlay! +! fracs - real, planck fractions ngptlw,nlay! +! secdif - real, secant of diffusivity angle nbands! +! nlay - integer, number of vertical layers 1 ! +! nlp1 - integer, number of vertical levels (interfaces) 1 ! +! ! +! outputs: ! +! totuflux- real, total sky upward flux (w/m2) 0:nlay ! +! totdflux- real, total sky downward flux (w/m2) 0:nlay ! +! htr - real, total sky heating rate (k/sec or k/day) nlay ! +! totuclfl- real, clear sky upward flux (w/m2) 0:nlay ! +! totdclfl- real, clear sky downward flux (w/m2) 0:nlay ! +! htrcl - real, clear sky heating rate (k/sec or k/day) nlay ! +! htrb - real, spectral band lw heating rate (k/day) nlay*nbands! +! ! +! module veriables: ! +! ngb - integer, band index for each g-value ngptlw! +! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 ! +! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 ! +! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 ! +! bpade - real, pade approx constant (1/0.278) 1 ! +! wtdiff - real, weight for radiance to flux conversion 1 ! +! ntbl - integer, dimension of look-up tables 1 ! +! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl ! +! exp_tbl - real, transmittance lookup table 0:ntbl ! +! tfn_tbl - real, tau transition function 0:ntbl ! +! ! +! local variables: ! +! itgas - integer, index for gases contribution look-up table 1 ! +! ittot - integer, index for gases plus clouds look-up table 1 ! +! reflct - real, surface reflectance 1 ! +! atrgas - real, gaseous absorptivity 1 ! +! atrtot - real, gaseous and cloud absorptivity 1 ! +! odcld - real, cloud optical depth 1 ! +! efclrfr- real, effective clear sky fraction (1-efcldfr) nlay ! +! odepth - real, optical depth of gaseous only 1 ! +! odtot - real, optical depth of gas and cloud 1 ! +! gasfac - real, gas-only pade factor, used for planck fn 1 ! +! totfac - real, gas+cld pade factor, used for planck fn 1 ! +! bbdgas - real, gas-only planck function for downward rt 1 ! +! bbugas - real, gas-only planck function for upward rt 1 ! +! bbdtot - real, gas and cloud planck function for downward rt 1 ! +! bbutot - real, gas and cloud planck function for upward rt 1 ! +! gassrcu- real, upwd source radiance due to gas only nlay! +! totsrcu- real, upwd source radiance due to gas+cld nlay! +! gassrcd- real, dnwd source radiance due to gas only 1 ! +! totsrcd- real, dnwd source radiance due to gas+cld 1 ! +! radtotu- real, spectrally summed total sky upwd radiance 1 ! +! radclru- real, spectrally summed clear sky upwd radiance 1 ! +! radtotd- real, spectrally summed total sky dnwd radiance 1 ! +! radclrd- real, spectrally summed clear sky dnwd radiance 1 ! +! toturad- real, total sky upward radiance by layer 0:nlay*nbands! +! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands! +! totdrad- real, total sky downward radiance by layer 0:nlay*nbands! +! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands! +! fnet - real, net longwave flux (w/m2) 0:nlay ! +! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay ! +! ! +! ! +! ******************************************************************* ! +! original code description ! +! ! +! original version: e. j. mlawer, et al. rrtm_v3.0 ! +! revision for gcms: michael j. iacono; october, 2002 ! +! revision for f90: michael j. iacono; june, 2006 ! +! ! +! this program calculates the upward fluxes, downward fluxes, and ! +! heating rates for an arbitrary clear or cloudy atmosphere. the input ! +! to this program is the atmospheric profile, all Planck function ! +! information, and the cloud fraction by layer. a variable diffusivity! +! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 ! +! use a value for secdif that varies from 1.50 to 1.80 as a function ! +! of the column water vapor, and other bands use a value of 1.66. the ! +! gaussian weight appropriate to this angle (wtdiff=0.5) is applied ! +! here. note that use of the emissivity angle for the flux integration! +! can cause errors of 1 to 4 W/m2 within cloudy layers. ! +! clouds are treated with a random cloud overlap method. ! +! ! +! ******************************************************************* ! +! ====================== end of description block ================= ! + +! --- inputs: + integer, intent(in) :: nlay, nlp1 + + real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cldfrc + real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, & + & secdif + real (kind=kind_phys), dimension(nlay), intent(in) :: delp + + real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld + real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, & + & tautot + + real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: & + & pklev, pklay + +! --- outputs: + real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl + + real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb + + real (kind=kind_phys), dimension(0:nlay), intent(out) :: & + & totuflux, totdflux, totuclfl, totdclfl + +! --- locals: + real (kind=kind_phys), parameter :: rec_6 = 0.166667 + + real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, & + & clrdrad, toturad, totdrad + + real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, & + & trngas, efclrfr, rfdelp + real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc + + real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, & + & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, & + & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, & + & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, & + & clfr, trng, gasu + + integer :: ittot, itgas, ib, ig, k +! +!===> ... begin here +! + do ib = 1, NBANDS + do k = 0, NLAY + toturad(k,ib) = f_zero + totdrad(k,ib) = f_zero + clrurad(k,ib) = f_zero + clrdrad(k,ib) = f_zero + enddo + enddo + + do k = 0, nlay + totuflux(k) = f_zero + totdflux(k) = f_zero + totuclfl(k) = f_zero + totdclfl(k) = f_zero + enddo + +! --- ... loop over all g-points + + do ig = 1, ngptlw + ib = ngb(ig) + + radtotd = f_zero + radclrd = f_zero + +!> -# Downward radiative transfer loop. + + do k = nlay, 1, -1 + +!!\n - clear sky, gases contribution + + odepth = max( f_zero, secdif(ib)*tautot(ig,k) ) + if (odepth <= 0.06) then + atrgas = odepth - 0.5*odepth*odepth + trng = f_one - atrgas + gasfac = rec_6 * odepth + else + tblind = odepth / (bpade + odepth) + itgas = tblint*tblind + 0.5 + trng = exp_tbl(itgas) + atrgas = f_one - trng + gasfac = tfn_tbl(itgas) + odepth = tau_tbl(itgas) + endif + + plfrac = fracs(ig,k) + blay = pklay(ib,k) + + dplnku = pklev(ib,k ) - blay + dplnkd = pklev(ib,k-1) - blay + bbdgas = plfrac * (blay + dplnkd*gasfac) + bbugas = plfrac * (blay + dplnku*gasfac) + gassrcd= bbdgas * atrgas + gassrcu(k)= bbugas * atrgas + trngas(k) = trng + +!!\n - total sky, gases+clouds contribution + + clfr = cldfrc(k) + if (clfr >= eps) then +!!\n - cloudy layer + + odcld = secdif(ib) * taucld(ib,k) + efclrfr(k) = f_one-(f_one - exp(-odcld))*clfr + odtot = odepth + odcld + if (odtot < 0.06) then + totfac = rec_6 * odtot + atrtot = odtot - 0.5*odtot*odtot + else + tblind = odtot / (bpade + odtot) + ittot = tblint*tblind + 0.5 + totfac = tfn_tbl(ittot) + atrtot = f_one - exp_tbl(ittot) + endif + + bbdtot = plfrac * (blay + dplnkd*totfac) + bbutot = plfrac * (blay + dplnku*totfac) + totsrcd= bbdtot * atrtot + totsrcu(k)= bbutot * atrtot + +! --- ... total sky radiance + radtotd = radtotd*trng*efclrfr(k) + gassrcd & + & + clfr*(totsrcd - gassrcd) + totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd + +! --- ... clear sky radiance + radclrd = radclrd*trng + gassrcd + clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd + + else +! --- ... clear layer + +! --- ... total sky radiance + radtotd = radtotd*trng + gassrcd + totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd + +! --- ... clear sky radiance + radclrd = radclrd*trng + gassrcd + clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd + + endif ! end if_clfr_block + + enddo ! end do_k_loop + +!> -# Compute spectral emissivity & reflectance, include the +!! contribution of spectrally varying longwave emissivity and +!! reflection from the surface to the upward radiative transfer. + +! note: spectral and Lambertian reflection are identical for the +! diffusivity angle flux integration used here. + + reflct = f_one - semiss(ib) + rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0) + +!> -# Compute total sky radiance. + radtotu = rad0 + reflct*radtotd + toturad(0,ib) = toturad(0,ib) + radtotu + +!> -# Compute clear sky radiance + radclru = rad0 + reflct*radclrd + clrurad(0,ib) = clrurad(0,ib) + radclru + +!> -# Upward radiative transfer loop. + + do k = 1, nlay + clfr = cldfrc(k) + trng = trngas(k) + gasu = gassrcu(k) + + if (clfr >= eps) then +! --- ... cloudy layer + +! --- ... total sky radiance + radtotu = radtotu*trng*efclrfr(k) + gasu & + & + clfr*(totsrcu(k) - gasu) + toturad(k,ib) = toturad(k,ib) + radtotu + +! --- ... clear sky radiance + radclru = radclru*trng + gasu + clrurad(k,ib) = clrurad(k,ib) + radclru + + else +! --- ... clear layer + +! --- ... total sky radiance + radtotu = radtotu*trng + gasu + toturad(k,ib) = toturad(k,ib) + radtotu + +! --- ... clear sky radiance + radclru = radclru*trng + gasu + clrurad(k,ib) = clrurad(k,ib) + radclru + + endif ! end if_clfr_block + + enddo ! end do_k_loop + + enddo ! end do_ig_loop + +!> -# Process longwave output from band for total and clear streams. +!! Calculate upward, downward, and net flux. + + flxfac = wtdiff * fluxfac + + do k = 0, nlay + do ib = 1, nbands + totuflux(k) = totuflux(k) + toturad(k,ib) + totdflux(k) = totdflux(k) + totdrad(k,ib) + totuclfl(k) = totuclfl(k) + clrurad(k,ib) + totdclfl(k) = totdclfl(k) + clrdrad(k,ib) + enddo + + totuflux(k) = totuflux(k) * flxfac + totdflux(k) = totdflux(k) * flxfac + totuclfl(k) = totuclfl(k) * flxfac + totdclfl(k) = totdclfl(k) * flxfac + enddo + +! --- ... calculate net fluxes and heating rates + fnet(0) = totuflux(0) - totdflux(0) + + do k = 1, nlay + rfdelp(k) = heatfac / delp(k) + fnet(k) = totuflux(k) - totdflux(k) + htr (k) = (fnet(k-1) - fnet(k)) * rfdelp(k) + enddo + +!! --- ... optional clear sky heating rates + if ( lhlw0 ) then + fnetc(0) = totuclfl(0) - totdclfl(0) + + do k = 1, nlay + fnetc(k) = totuclfl(k) - totdclfl(k) + htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k) + enddo + endif + +!! --- ... optional spectral band heating rates + if ( lhlwb ) then + do ib = 1, nbands + fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac + + do k = 1, nlay + fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac + htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k) + enddo + enddo + endif + +! .................................. + end subroutine rtrn +!! @} +! ---------------------------------- + + +!>\ingroup module_radlw_main +!> This subroutine computes the upward/downward radiative fluxes, and +!! heating rates for both clear or cloudy atmosphere. Clouds are +!! assumed as in maximum-randomly overlaping in a vertical column. +!!\param semiss lw surface emissivity +!!\param delp layer pressure thickness (mb) +!!\param cldfrc layer cloud fraction +!!\param taucld layer cloud opt depth +!!\param tautot total optical depth (gas+aerosols) +!!\param pklay integrated planck func at lay temp +!!\param pklev integrated planck func at lev temp +!!\param fracs planck fractions +!!\param secdif secant of diffusivity angle +!!\param nlay number of vertical layers +!!\param nlp1 number of vertical levels (interfaces) +!!\param totuflux total sky upward flux (\f$w/m^2\f$) +!!\param totdflux total sky downward flux (\f$w/m^2\f$) +!!\param htr total sky heating rate (k/sec or k/day) +!!\param totuclfl clear sky upward flux (\f$w/m^2\f$) +!!\param totdclfl clear sky downward flux (\f$w/m^2\f$) +!!\param htrcl clear sky heating rate (k/sec or k/day) +!!\param htrb spectral band lw heating rate (k/day) +!!\section gen_rtrnmr rtrnmr General Algorithm +!> @{ +! ---------------------------------- + subroutine rtrnmr & + & ( semiss,delp,cldfrc,taucld,tautot,pklay,pklev, &! --- inputs + & fracs,secdif, nlay,nlp1, & + & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs: + & ) + +! =================== program usage description =================== ! +! ! +! purpose: compute the upward/downward radiative fluxes, and heating ! +! rates for both clear or cloudy atmosphere. clouds are assumed as in ! +! maximum-randomly overlaping in a vertical colum. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: -size- ! +! semiss - real, lw surface emissivity nbands! +! delp - real, layer pressure thickness (mb) nlay ! +! cldfrc - real, layer cloud fraction 0:nlp1 ! +! taucld - real, layer cloud opt depth nbands,nlay! +! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay! +! pklay - real, integrated planck func at lay temp nbands*0:nlay! +! pklev - real, integrated planck func at lev temp nbands*0:nlay! +! fracs - real, planck fractions ngptlw,nlay! +! secdif - real, secant of diffusivity angle nbands! +! nlay - integer, number of vertical layers 1 ! +! nlp1 - integer, number of vertical levels (interfaces) 1 ! +! ! +! outputs: ! +! totuflux- real, total sky upward flux (w/m2) 0:nlay ! +! totdflux- real, total sky downward flux (w/m2) 0:nlay ! +! htr - real, total sky heating rate (k/sec or k/day) nlay ! +! totuclfl- real, clear sky upward flux (w/m2) 0:nlay ! +! totdclfl- real, clear sky downward flux (w/m2) 0:nlay ! +! htrcl - real, clear sky heating rate (k/sec or k/day) nlay ! +! htrb - real, spectral band lw heating rate (k/day) nlay*nbands! +! ! +! module veriables: ! +! ngb - integer, band index for each g-value ngptlw! +! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 ! +! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 ! +! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 ! +! bpade - real, pade approx constant (1/0.278) 1 ! +! wtdiff - real, weight for radiance to flux conversion 1 ! +! ntbl - integer, dimension of look-up tables 1 ! +! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl ! +! exp_tbl - real, transmittance lookup table 0:ntbl ! +! tfn_tbl - real, tau transition function 0:ntbl ! +! ! +! local variables: ! +! itgas - integer, index for gases contribution look-up table 1 ! +! ittot - integer, index for gases plus clouds look-up table 1 ! +! reflct - real, surface reflectance 1 ! +! atrgas - real, gaseous absorptivity 1 ! +! atrtot - real, gaseous and cloud absorptivity 1 ! +! odcld - real, cloud optical depth 1 ! +! odepth - real, optical depth of gaseous only 1 ! +! odtot - real, optical depth of gas and cloud 1 ! +! gasfac - real, gas-only pade factor, used for planck fn 1 ! +! totfac - real, gas+cld pade factor, used for planck fn 1 ! +! bbdgas - real, gas-only planck function for downward rt 1 ! +! bbugas - real, gas-only planck function for upward rt 1 ! +! bbdtot - real, gas and cloud planck function for downward rt 1 ! +! bbutot - real, gas and cloud planck function for upward rt 1 ! +! gassrcu- real, upwd source radiance due to gas only nlay! +! totsrcu- real, upwd source radiance due to gas + cld nlay! +! gassrcd- real, dnwd source radiance due to gas only 1 ! +! totsrcd- real, dnwd source radiance due to gas + cld 1 ! +! radtotu- real, spectrally summed total sky upwd radiance 1 ! +! radclru- real, spectrally summed clear sky upwd radiance 1 ! +! radtotd- real, spectrally summed total sky dnwd radiance 1 ! +! radclrd- real, spectrally summed clear sky dnwd radiance 1 ! +! toturad- real, total sky upward radiance by layer 0:nlay*nbands! +! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands! +! totdrad- real, total sky downward radiance by layer 0:nlay*nbands! +! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands! +! fnet - real, net longwave flux (w/m2) 0:nlay ! +! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay ! +! ! +! ! +! ******************************************************************* ! +! original code description ! +! ! +! original version: e. j. mlawer, et al. rrtm_v3.0 ! +! revision for gcms: michael j. iacono; october, 2002 ! +! revision for f90: michael j. iacono; june, 2006 ! +! ! +! this program calculates the upward fluxes, downward fluxes, and ! +! heating rates for an arbitrary clear or cloudy atmosphere. the input ! +! to this program is the atmospheric profile, all Planck function ! +! information, and the cloud fraction by layer. a variable diffusivity! +! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 ! +! use a value for secdif that varies from 1.50 to 1.80 as a function ! +! of the column water vapor, and other bands use a value of 1.66. the ! +! gaussian weight appropriate to this angle (wtdiff=0.5) is applied ! +! here. note that use of the emissivity angle for the flux integration! +! can cause errors of 1 to 4 W/m2 within cloudy layers. ! +! clouds are treated with a maximum-random cloud overlap method. ! +! ! +! ******************************************************************* ! +! ====================== end of description block ================= ! + +! --- inputs: + integer, intent(in) :: nlay, nlp1 + + real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cldfrc + real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, & + & secdif + real (kind=kind_phys), dimension(nlay), intent(in) :: delp + + real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld + real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, & + & tautot + + real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: & + & pklev, pklay + +! --- outputs: + real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl + + real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb + + real (kind=kind_phys), dimension(0:nlay), intent(out) :: & + & totuflux, totdflux, totuclfl, totdclfl + +! --- locals: + real (kind=kind_phys), parameter :: rec_6 = 0.166667 + + real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, & + & clrdrad, toturad, totdrad + + real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, & + & trngas, trntot, rfdelp + real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc + + real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, & + & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, & + & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, & + & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, rad, & + & totradd, clrradd, totradu, clrradu, fmax, fmin, rat1, rat2,& + & radmod, clfr, trng, trnt, gasu, totu + + integer :: ittot, itgas, ib, ig, k + +! dimensions for cloud overlap adjustment + real (kind=kind_phys), dimension(nlp1) :: faccld1u, faccld2u, & + & facclr1u, facclr2u, faccmb1u, faccmb2u + real (kind=kind_phys), dimension(0:nlay) :: faccld1d, faccld2d, & + & facclr1d, facclr2d, faccmb1d, faccmb2d + + logical :: lstcldu(nlay), lstcldd(nlay) +! +!===> ... begin here +! + do k = 1, nlp1 + faccld1u(k) = f_zero + faccld2u(k) = f_zero + facclr1u(k) = f_zero + facclr2u(k) = f_zero + faccmb1u(k) = f_zero + faccmb2u(k) = f_zero + enddo + + lstcldu(1) = cldfrc(1) > eps + rat1 = f_zero + rat2 = f_zero + + do k = 1, nlay-1 + + lstcldu(k+1) = cldfrc(k+1)>eps .and. cldfrc(k)<=eps + + if (cldfrc(k) > eps) then + +!> -# Setup maximum/random cloud overlap. + + if (cldfrc(k+1) >= cldfrc(k)) then + if (lstcldu(k)) then + if (cldfrc(k) < f_one) then + facclr2u(k+1) = (cldfrc(k+1) - cldfrc(k)) & + & / (f_one - cldfrc(k)) + endif + facclr2u(k) = f_zero + faccld2u(k) = f_zero + else + fmax = max(cldfrc(k), cldfrc(k-1)) + if (cldfrc(k+1) > fmax) then + facclr1u(k+1) = rat2 + facclr2u(k+1) = (cldfrc(k+1) - fmax)/(f_one - fmax) + elseif (cldfrc(k+1) < fmax) then + facclr1u(k+1) = (cldfrc(k+1) - cldfrc(k)) & + & / (cldfrc(k-1) - cldfrc(k)) + else + facclr1u(k+1) = rat2 + endif + endif + + if (facclr1u(k+1)>f_zero .or. facclr2u(k+1)>f_zero) then + rat1 = f_one + rat2 = f_zero + else + rat1 = f_zero + rat2 = f_zero + endif + else + if (lstcldu(k)) then + faccld2u(k+1) = (cldfrc(k) - cldfrc(k+1)) / cldfrc(k) + facclr2u(k) = f_zero + faccld2u(k) = f_zero + else + fmin = min(cldfrc(k), cldfrc(k-1)) + if (cldfrc(k+1) <= fmin) then + faccld1u(k+1) = rat1 + faccld2u(k+1) = (fmin - cldfrc(k+1)) / fmin + else + faccld1u(k+1) = (cldfrc(k) - cldfrc(k+1)) & + & / (cldfrc(k) - fmin) + endif + endif + + if (faccld1u(k+1)>f_zero .or. faccld2u(k+1)>f_zero) then + rat1 = f_zero + rat2 = f_one + else + rat1 = f_zero + rat2 = f_zero + endif + endif + + faccmb1u(k+1) = facclr1u(k+1) * faccld2u(k) * cldfrc(k-1) + faccmb2u(k+1) = faccld1u(k+1) * facclr2u(k) & + & * (f_one - cldfrc(k-1)) + endif + + enddo + + do k = 0, nlay + faccld1d(k) = f_zero + faccld2d(k) = f_zero + facclr1d(k) = f_zero + facclr2d(k) = f_zero + faccmb1d(k) = f_zero + faccmb2d(k) = f_zero + enddo + + lstcldd(nlay) = cldfrc(nlay) > eps + rat1 = f_zero + rat2 = f_zero + + do k = nlay, 2, -1 + + lstcldd(k-1) = cldfrc(k-1) > eps .and. cldfrc(k)<=eps + + if (cldfrc(k) > eps) then + + if (cldfrc(k-1) >= cldfrc(k)) then + if (lstcldd(k)) then + if (cldfrc(k) < f_one) then + facclr2d(k-1) = (cldfrc(k-1) - cldfrc(k)) & + & / (f_one - cldfrc(k)) + endif + + facclr2d(k) = f_zero + faccld2d(k) = f_zero + else + fmax = max(cldfrc(k), cldfrc(k+1)) + + if (cldfrc(k-1) > fmax) then + facclr1d(k-1) = rat2 + facclr2d(k-1) = (cldfrc(k-1) - fmax) / (f_one - fmax) + elseif (cldfrc(k-1) < fmax) then + facclr1d(k-1) = (cldfrc(k-1) - cldfrc(k)) & + & / (cldfrc(k+1) - cldfrc(k)) + else + facclr1d(k-1) = rat2 + endif + endif + + if (facclr1d(k-1)>f_zero .or. facclr2d(k-1)>f_zero) then + rat1 = f_one + rat2 = f_zero + else + rat1 = f_zero + rat2 = f_zero + endif + else + if (lstcldd(k)) then + faccld2d(k-1) = (cldfrc(k) - cldfrc(k-1)) / cldfrc(k) + facclr2d(k) = f_zero + faccld2d(k) = f_zero + else + fmin = min(cldfrc(k), cldfrc(k+1)) + + if (cldfrc(k-1) <= fmin) then + faccld1d(k-1) = rat1 + faccld2d(k-1) = (fmin - cldfrc(k-1)) / fmin + else + faccld1d(k-1) = (cldfrc(k) - cldfrc(k-1)) & + & / (cldfrc(k) - fmin) + endif + endif + + if (faccld1d(k-1)>f_zero .or. faccld2d(k-1)>f_zero) then + rat1 = f_zero + rat2 = f_one + else + rat1 = f_zero + rat2 = f_zero + endif + endif + + faccmb1d(k-1) = facclr1d(k-1) * faccld2d(k) * cldfrc(k+1) + faccmb2d(k-1) = faccld1d(k-1) * facclr2d(k) & + & * (f_one - cldfrc(k+1)) + endif + + enddo + +!> -# Initialize for radiative transfer + + do ib = 1, NBANDS + do k = 0, NLAY + toturad(k,ib) = f_zero + totdrad(k,ib) = f_zero + clrurad(k,ib) = f_zero + clrdrad(k,ib) = f_zero + enddo + enddo + + do k = 0, nlay + totuflux(k) = f_zero + totdflux(k) = f_zero + totuclfl(k) = f_zero + totdclfl(k) = f_zero + enddo + +! --- ... loop over all g-points + + do ig = 1, ngptlw + ib = ngb(ig) + + radtotd = f_zero + radclrd = f_zero + +!> -# Downward radiative transfer loop: + + do k = nlay, 1, -1 + +! --- ... clear sky, gases contribution + + odepth = max( f_zero, secdif(ib)*tautot(ig,k) ) + if (odepth <= 0.06) then + atrgas = odepth - 0.5*odepth*odepth + trng = f_one - atrgas + gasfac = rec_6 * odepth + else + tblind = odepth / (bpade + odepth) + itgas = tblint*tblind + 0.5 + trng = exp_tbl(itgas) + atrgas = f_one - trng + gasfac = tfn_tbl(itgas) + odepth = tau_tbl(itgas) + endif + + plfrac = fracs(ig,k) + blay = pklay(ib,k) + + dplnku = pklev(ib,k ) - blay + dplnkd = pklev(ib,k-1) - blay + bbdgas = plfrac * (blay + dplnkd*gasfac) + bbugas = plfrac * (blay + dplnku*gasfac) + gassrcd = bbdgas * atrgas + gassrcu(k)= bbugas * atrgas + trngas(k) = trng + +! --- ... total sky, gases+clouds contribution + + clfr = cldfrc(k) + if (lstcldd(k)) then + totradd = clfr * radtotd + clrradd = radtotd - totradd + rad = f_zero + endif + + if (clfr >= eps) then +!> - cloudy layer + + odcld = secdif(ib) * taucld(ib,k) + odtot = odepth + odcld + if (odtot < 0.06) then + totfac = rec_6 * odtot + atrtot = odtot - 0.5*odtot*odtot + trnt = f_one - atrtot + else + tblind = odtot / (bpade + odtot) + ittot = tblint*tblind + 0.5 + totfac = tfn_tbl(ittot) + trnt = exp_tbl(ittot) + atrtot = f_one - trnt + endif + + bbdtot = plfrac * (blay + dplnkd*totfac) + bbutot = plfrac * (blay + dplnku*totfac) + totsrcd = bbdtot * atrtot + totsrcu(k)= bbutot * atrtot + trntot(k) = trnt + + totradd = totradd*trnt + clfr*totsrcd + clrradd = clrradd*trng + (f_one - clfr)*gassrcd + +!> - total sky radiance + radtotd = totradd + clrradd + totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd + +!> - clear sky radiance + radclrd = radclrd*trng + gassrcd + clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd + + radmod = rad*(facclr1d(k-1)*trng + faccld1d(k-1)*trnt) & + & - faccmb1d(k-1)*gassrcd + faccmb2d(k-1)*totsrcd + + rad = -radmod + facclr2d(k-1)*(clrradd + radmod) & + & - faccld2d(k-1)*(totradd - radmod) + totradd = totradd + rad + clrradd = clrradd - rad + + else +! --- ... clear layer + +! --- ... total sky radiance + radtotd = radtotd*trng + gassrcd + totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd + +! --- ... clear sky radiance + radclrd = radclrd*trng + gassrcd + clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd + + endif ! end if_clfr_block + + enddo ! end do_k_loop + +!> -# Compute spectral emissivity & reflectance, include the +!! contribution of spectrally varying longwave emissivity and +!! reflection from the surface to the upward radiative transfer. + +! note: spectral and Lambertian reflection are identical for the +! diffusivity angle flux integration used here. + + reflct = f_one - semiss(ib) + rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0) + +!> -# Compute total sky radiance. + radtotu = rad0 + reflct*radtotd + toturad(0,ib) = toturad(0,ib) + radtotu + +!> -# Compute clear sky radiance. + radclru = rad0 + reflct*radclrd + clrurad(0,ib) = clrurad(0,ib) + radclru + +!> -# Upward radiative transfer loop: + + do k = 1, nlay + + clfr = cldfrc(k) + trng = trngas(k) + gasu = gassrcu(k) + + if (lstcldu(k)) then + totradu = clfr * radtotu + clrradu = radtotu - totradu + rad = f_zero + endif + + if (clfr >= eps) then +!> - cloudy layer radiance + + trnt = trntot(k) + totu = totsrcu(k) + totradu = totradu*trnt + clfr*totu + clrradu = clrradu*trng + (f_one - clfr)*gasu + +!> - total sky radiance + radtotu = totradu + clrradu + toturad(k,ib) = toturad(k,ib) + radtotu + +!> - clear sky radiance + radclru = radclru*trng + gasu + clrurad(k,ib) = clrurad(k,ib) + radclru + + radmod = rad*(facclr1u(k+1)*trng + faccld1u(k+1)*trnt) & + & - faccmb1u(k+1)*gasu + faccmb2u(k+1)*totu + rad = -radmod + facclr2u(k+1)*(clrradu + radmod) & + & - faccld2u(k+1)*(totradu - radmod) + totradu = totradu + rad + clrradu = clrradu - rad + + else +! --- ... clear layer + +! --- ... total sky radiance + radtotu = radtotu*trng + gasu + toturad(k,ib) = toturad(k,ib) + radtotu + +! --- ... clear sky radiance + radclru = radclru*trng + gasu + clrurad(k,ib) = clrurad(k,ib) + radclru + + endif ! end if_clfr_block + + enddo ! end do_k_loop + + enddo ! end do_ig_loop + +!> -# Process longwave output from band for total and clear streams. +!! calculate upward, downward, and net flux. + + flxfac = wtdiff * fluxfac + + do k = 0, nlay + do ib = 1, nbands + totuflux(k) = totuflux(k) + toturad(k,ib) + totdflux(k) = totdflux(k) + totdrad(k,ib) + totuclfl(k) = totuclfl(k) + clrurad(k,ib) + totdclfl(k) = totdclfl(k) + clrdrad(k,ib) + enddo + + totuflux(k) = totuflux(k) * flxfac + totdflux(k) = totdflux(k) * flxfac + totuclfl(k) = totuclfl(k) * flxfac + totdclfl(k) = totdclfl(k) * flxfac + enddo + +! --- ... calculate net fluxes and heating rates + fnet(0) = totuflux(0) - totdflux(0) + + do k = 1, nlay + rfdelp(k) = heatfac / delp(k) + fnet(k) = totuflux(k) - totdflux(k) + htr (k) = (fnet(k-1) - fnet(k)) * rfdelp(k) + enddo + +!! --- ... optional clear sky heating rates + if ( lhlw0 ) then + fnetc(0) = totuclfl(0) - totdclfl(0) + + do k = 1, nlay + fnetc(k) = totuclfl(k) - totdclfl(k) + htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k) + enddo + endif + +!! --- ... optional spectral band heating rates + if ( lhlwb ) then + do ib = 1, nbands + fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac + + do k = 1, nlay + fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac + htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k) + enddo + enddo + endif + +! ................................. + end subroutine rtrnmr +! --------------------------------- +!> @} + +!>\ingroup module_radlw_main +!> \brief This subroutine computes the upward/downward radiative fluxes, and +!! heating rates for both clear or cloudy atmosphere.Clouds are treated +!! with the mcica stochastic approach. +!! +!!\param semiss lw surface emissivity +!!\param delp layer pressure thickness (mb) +!!\param cldfmc layer cloud fraction (sub-column) +!!\param taucld layer cloud opt depth +!!\param tautot total optical depth (gas+aerosols) +!!\param pklay integrated planck func at lay temp +!!\param pklev integrated planck func at lev temp +!!\param fracs planck fractions +!!\param secdif secant of diffusivity angle +!!\param nlay number of vertical layers +!!\param nlp1 number of vertical levels (interfaces) +!!\param totuflux total sky upward flux \f$(w/m^2)\f$ +!!\param totdflux total sky downward flux \f$(w/m^2)\f$ +!!\param htr total sky heating rate (k/sec or k/day) +!!\param totuclfl clear sky upward flux \f$(w/m^2)\f$ +!!\param totdclfl clear sky downward flux \f$(w/m^2)\f$ +!!\param htrcl clear sky heating rate (k/sec or k/day) +!!\param htrb spectral band lw heating rate (k/day) +!!\section gen_rtrnmc rtrnmc General Algorithm +!> @{ +! --------------------------------- + subroutine rtrnmc & + & ( semiss,delp,cldfmc,taucld,tautot,pklay,pklev, & ! --- inputs: + & fracs,secdif, nlay,nlp1, & + & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & ! --- outputs: + & ) + +! =================== program usage description =================== ! +! ! +! purpose: compute the upward/downward radiative fluxes, and heating ! +! rates for both clear or cloudy atmosphere. clouds are treated with ! +! the mcica stochastic approach. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: -size- ! +! semiss - real, lw surface emissivity nbands! +! delp - real, layer pressure thickness (mb) nlay ! +! cldfmc - real, layer cloud fraction (sub-column) ngptlw*nlay! +! taucld - real, layer cloud opt depth nbands*nlay! +! tautot - real, total optical depth (gas+aerosols) ngptlw*nlay! +! pklay - real, integrated planck func at lay temp nbands*0:nlay! +! pklev - real, integrated planck func at lev temp nbands*0:nlay! +! fracs - real, planck fractions ngptlw*nlay! +! secdif - real, secant of diffusivity angle nbands! +! nlay - integer, number of vertical layers 1 ! +! nlp1 - integer, number of vertical levels (interfaces) 1 ! +! ! +! outputs: ! +! totuflux- real, total sky upward flux (w/m2) 0:nlay ! +! totdflux- real, total sky downward flux (w/m2) 0:nlay ! +! htr - real, total sky heating rate (k/sec or k/day) nlay ! +! totuclfl- real, clear sky upward flux (w/m2) 0:nlay ! +! totdclfl- real, clear sky downward flux (w/m2) 0:nlay ! +! htrcl - real, clear sky heating rate (k/sec or k/day) nlay ! +! htrb - real, spectral band lw heating rate (k/day) nlay*nbands! +! ! +! module veriables: ! +! ngb - integer, band index for each g-value ngptlw! +! fluxfac - real, conversion factor for fluxes (pi*2.e4) 1 ! +! heatfac - real, conversion factor for heating rates (g/cp*1e-2) 1 ! +! tblint - real, conversion factor for look-up tbl (float(ntbl) 1 ! +! bpade - real, pade approx constant (1/0.278) 1 ! +! wtdiff - real, weight for radiance to flux conversion 1 ! +! ntbl - integer, dimension of look-up tables 1 ! +! tau_tbl - real, clr-sky opt dep lookup table 0:ntbl ! +! exp_tbl - real, transmittance lookup table 0:ntbl ! +! tfn_tbl - real, tau transition function 0:ntbl ! +! ! +! local variables: ! +! itgas - integer, index for gases contribution look-up table 1 ! +! ittot - integer, index for gases plus clouds look-up table 1 ! +! reflct - real, surface reflectance 1 ! +! atrgas - real, gaseous absorptivity 1 ! +! atrtot - real, gaseous and cloud absorptivity 1 ! +! odcld - real, cloud optical depth 1 ! +! efclrfr- real, effective clear sky fraction (1-efcldfr) nlay! +! odepth - real, optical depth of gaseous only 1 ! +! odtot - real, optical depth of gas and cloud 1 ! +! gasfac - real, gas-only pade factor, used for planck function 1 ! +! totfac - real, gas and cloud pade factor, used for planck fn 1 ! +! bbdgas - real, gas-only planck function for downward rt 1 ! +! bbugas - real, gas-only planck function for upward rt 1 ! +! bbdtot - real, gas and cloud planck function for downward rt 1 ! +! bbutot - real, gas and cloud planck function for upward rt 1 ! +! gassrcu- real, upwd source radiance due to gas nlay! +! totsrcu- real, upwd source radiance due to gas+cld nlay! +! gassrcd- real, dnwd source radiance due to gas 1 ! +! totsrcd- real, dnwd source radiance due to gas+cld 1 ! +! radtotu- real, spectrally summed total sky upwd radiance 1 ! +! radclru- real, spectrally summed clear sky upwd radiance 1 ! +! radtotd- real, spectrally summed total sky dnwd radiance 1 ! +! radclrd- real, spectrally summed clear sky dnwd radiance 1 ! +! toturad- real, total sky upward radiance by layer 0:nlay*nbands! +! clrurad- real, clear sky upward radiance by layer 0:nlay*nbands! +! totdrad- real, total sky downward radiance by layer 0:nlay*nbands! +! clrdrad- real, clear sky downward radiance by layer 0:nlay*nbands! +! fnet - real, net longwave flux (w/m2) 0:nlay ! +! fnetc - real, clear sky net longwave flux (w/m2) 0:nlay ! +! ! +! ! +! ******************************************************************* ! +! original code description ! +! ! +! original version: e. j. mlawer, et al. rrtm_v3.0 ! +! revision for gcms: michael j. iacono; october, 2002 ! +! revision for f90: michael j. iacono; june, 2006 ! +! ! +! this program calculates the upward fluxes, downward fluxes, and ! +! heating rates for an arbitrary clear or cloudy atmosphere. the input ! +! to this program is the atmospheric profile, all Planck function ! +! information, and the cloud fraction by layer. a variable diffusivity! +! angle (secdif) is used for the angle integration. bands 2-3 and 5-9 ! +! use a value for secdif that varies from 1.50 to 1.80 as a function ! +! of the column water vapor, and other bands use a value of 1.66. the ! +! gaussian weight appropriate to this angle (wtdiff=0.5) is applied ! +! here. note that use of the emissivity angle for the flux integration! +! can cause errors of 1 to 4 W/m2 within cloudy layers. ! +! clouds are treated with the mcica stochastic approach and ! +! maximum-random cloud overlap. ! +! ! +! ******************************************************************* ! +! ====================== end of description block ================= ! + +! --- inputs: + integer, intent(in) :: nlay, nlp1 + + real (kind=kind_phys), dimension(nbands), intent(in) :: semiss, & + & secdif + real (kind=kind_phys), dimension(nlay), intent(in) :: delp + + real (kind=kind_phys), dimension(nbands,nlay),intent(in):: taucld + real (kind=kind_phys), dimension(ngptlw,nlay),intent(in):: fracs, & + & tautot, cldfmc + + real (kind=kind_phys), dimension(nbands,0:nlay), intent(in) :: & + & pklev, pklay + +! --- outputs: + real (kind=kind_phys), dimension(nlay), intent(out) :: htr, htrcl + + real (kind=kind_phys), dimension(nlay,nbands),intent(out) :: htrb + + real (kind=kind_phys), dimension(0:nlay), intent(out) :: & + & totuflux, totdflux, totuclfl, totdclfl + +! --- locals: + real (kind=kind_phys), parameter :: rec_6 = 0.166667 + + real (kind=kind_phys), dimension(0:nlay,nbands) :: clrurad, & + & clrdrad, toturad, totdrad + + real (kind=kind_phys), dimension(nlay) :: gassrcu, totsrcu, & + & trngas, efclrfr, rfdelp + real (kind=kind_phys), dimension(0:nlay) :: fnet, fnetc + + real (kind=kind_phys) :: totsrcd, gassrcd, tblind, odepth, odtot, & + & odcld, atrtot, atrgas, reflct, totfac, gasfac, flxfac, & + & plfrac, blay, bbdgas, bbdtot, bbugas, bbutot, dplnku, & + & dplnkd, radtotu, radclru, radtotd, radclrd, rad0, & + & clfm, trng, gasu + + integer :: ittot, itgas, ib, ig, k +! +!===> ... begin here +! + do ib = 1, NBANDS + do k = 0, NLAY + toturad(k,ib) = f_zero + totdrad(k,ib) = f_zero + clrurad(k,ib) = f_zero + clrdrad(k,ib) = f_zero + enddo + enddo + + do k = 0, nlay + totuflux(k) = f_zero + totdflux(k) = f_zero + totuclfl(k) = f_zero + totdclfl(k) = f_zero + enddo + +! --- ... loop over all g-points + + do ig = 1, ngptlw + ib = ngb(ig) + + radtotd = f_zero + radclrd = f_zero + +!> -# Downward radiative transfer loop. +!!\n - Clear sky, gases contribution +!!\n - Total sky, gases+clouds contribution +!!\n - Cloudy layer +!!\n - Total sky radiance +!!\n - Clear sky radiance + + do k = nlay, 1, -1 + +! --- ... clear sky, gases contribution + + odepth = max( f_zero, secdif(ib)*tautot(ig,k) ) + if (odepth <= 0.06) then + atrgas = odepth - 0.5*odepth*odepth + trng = f_one - atrgas + gasfac = rec_6 * odepth + else + tblind = odepth / (bpade + odepth) + itgas = tblint*tblind + 0.5 + trng = exp_tbl(itgas) + atrgas = f_one - trng + gasfac = tfn_tbl(itgas) + odepth = tau_tbl(itgas) + endif + + plfrac = fracs(ig,k) + blay = pklay(ib,k) + + dplnku = pklev(ib,k ) - blay + dplnkd = pklev(ib,k-1) - blay + bbdgas = plfrac * (blay + dplnkd*gasfac) + bbugas = plfrac * (blay + dplnku*gasfac) + gassrcd= bbdgas * atrgas + gassrcu(k)= bbugas * atrgas + trngas(k) = trng + +! --- ... total sky, gases+clouds contribution + + clfm = cldfmc(ig,k) + if (clfm >= eps) then +! --- ... cloudy layer + + odcld = secdif(ib) * taucld(ib,k) + efclrfr(k) = f_one - (f_one - exp(-odcld))*clfm + odtot = odepth + odcld + if (odtot < 0.06) then + totfac = rec_6 * odtot + atrtot = odtot - 0.5*odtot*odtot + else + tblind = odtot / (bpade + odtot) + ittot = tblint*tblind + 0.5 + totfac = tfn_tbl(ittot) + atrtot = f_one - exp_tbl(ittot) + endif + + bbdtot = plfrac * (blay + dplnkd*totfac) + bbutot = plfrac * (blay + dplnku*totfac) + totsrcd= bbdtot * atrtot + totsrcu(k)= bbutot * atrtot + +! --- ... total sky radiance + radtotd = radtotd*trng*efclrfr(k) + gassrcd & + & + clfm*(totsrcd - gassrcd) + totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd + +! --- ... clear sky radiance + radclrd = radclrd*trng + gassrcd + clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd + + else +! --- ... clear layer + +! --- ... total sky radiance + radtotd = radtotd*trng + gassrcd + totdrad(k-1,ib) = totdrad(k-1,ib) + radtotd + +! --- ... clear sky radiance + radclrd = radclrd*trng + gassrcd + clrdrad(k-1,ib) = clrdrad(k-1,ib) + radclrd + + endif ! end if_clfm_block + + enddo ! end do_k_loop + +!> -# Compute spectral emissivity & reflectance, include the +!! contribution of spectrally varying longwave emissivity and +!! reflection from the surface to the upward radiative transfer. + +! note: spectral and Lambertian reflection are identical for the +! diffusivity angle flux integration used here. + + reflct = f_one - semiss(ib) + rad0 = semiss(ib) * fracs(ig,1) * pklay(ib,0) + +!> -# Compute total sky radiance. + radtotu = rad0 + reflct*radtotd + toturad(0,ib) = toturad(0,ib) + radtotu + +!> -# Compute clear sky radiance. + radclru = rad0 + reflct*radclrd + clrurad(0,ib) = clrurad(0,ib) + radclru + +!> -# Upward radiative transfer loop. +!!\n - Compute total sky radiance +!!\n - Compute clear sky radiance + +! toturad holds summed radiance for total sky stream +! clrurad holds summed radiance for clear sky stream + + do k = 1, nlay + clfm = cldfmc(ig,k) + trng = trngas(k) + gasu = gassrcu(k) + + if (clfm > eps) then +! --- ... cloudy layer + +! --- ... total sky radiance + radtotu = radtotu*trng*efclrfr(k) + gasu & + & + clfm*(totsrcu(k) - gasu) + toturad(k,ib) = toturad(k,ib) + radtotu + +! --- ... clear sky radiance + radclru = radclru*trng + gasu + clrurad(k,ib) = clrurad(k,ib) + radclru + + else +! --- ... clear layer + +! --- ... total sky radiance + radtotu = radtotu*trng + gasu + toturad(k,ib) = toturad(k,ib) + radtotu + +! --- ... clear sky radiance + radclru = radclru*trng + gasu + clrurad(k,ib) = clrurad(k,ib) + radclru + + endif ! end if_clfm_block + + enddo ! end do_k_loop + + enddo ! end do_ig_loop + +!> -# Process longwave output from band for total and clear streams. +!! Calculate upward, downward, and net flux. + + flxfac = wtdiff * fluxfac + + do k = 0, nlay + do ib = 1, nbands + totuflux(k) = totuflux(k) + toturad(k,ib) + totdflux(k) = totdflux(k) + totdrad(k,ib) + totuclfl(k) = totuclfl(k) + clrurad(k,ib) + totdclfl(k) = totdclfl(k) + clrdrad(k,ib) + enddo + + totuflux(k) = totuflux(k) * flxfac + totdflux(k) = totdflux(k) * flxfac + totuclfl(k) = totuclfl(k) * flxfac + totdclfl(k) = totdclfl(k) * flxfac + enddo + +!> -# Calculate net fluxes and heating rates. + fnet(0) = totuflux(0) - totdflux(0) + + do k = 1, nlay + rfdelp(k) = heatfac / delp(k) + fnet(k) = totuflux(k) - totdflux(k) + htr (k) = (fnet(k-1) - fnet(k)) * rfdelp(k) + enddo + +!> -# Optional clear sky heating rates. + if ( lhlw0 ) then + fnetc(0) = totuclfl(0) - totdclfl(0) + + do k = 1, nlay + fnetc(k) = totuclfl(k) - totdclfl(k) + htrcl(k) = (fnetc(k-1) - fnetc(k)) * rfdelp(k) + enddo + endif + +!> -# Optional spectral band heating rates. + if ( lhlwb ) then + do ib = 1, nbands + fnet(0) = (toturad(0,ib) - totdrad(0,ib)) * flxfac + + do k = 1, nlay + fnet(k) = (toturad(k,ib) - totdrad(k,ib)) * flxfac + htrb(k,ib) = (fnet(k-1) - fnet(k)) * rfdelp(k) + enddo + enddo + endif + +! .................................. + end subroutine rtrnmc +! ---------------------------------- +!> @} + +!>\ingroup module_radlw_main +!>\brief This subroutine contains optical depths developed for the rapid +!! radiative transfer model. +!! +!! It contains the subroutines \a taugbn (where n goes from +!! 1 to 16). \a taugbn calculates the optical depths and planck fractions +!! per g-value and layer for band n. +!!\param laytrop tropopause layer index (unitless) layer at +!! which switch is made for key species +!!\param pavel layer pressures (mb) +!!\param coldry column amount for dry air \f$(mol/cm^2)\f$ +!!\param colamt column amounts of h2o, co2, o3, n2o, ch4,o2, +!! co \f$(mol/cm^2)\f$ +!!\param colbrd column amount of broadening gases +!!\param wx cross-section amounts \f$(mol/cm^2)\f$ +!!\param tauaer aerosol optical depth +!!\param rfrate reference ratios of binary species parameter +!!\n (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4, +!! 5-n2o/co2,6-o3/co2 +!!\n (:,:,n)n=1,2: the rates of ref press at the 2 +!! sides of the layer +!!\param fac00,fac01,fac10,fac11 factors multiply the reference ks, i,j of 0/1 +!! for lower/higher of the 2 appropriate +!! temperatures and altitudes +!!\param jp index of lower reference pressure +!!\param jt, jt1 indices of lower reference temperatures for +!! pressure levels jp and jp+1, respectively +!!\param selffac scale factor for water vapor self-continuum +!! equals (water vapor density)/(atmospheric +!! density at 296k and 1013 mb) +!!\param selffrac factor for temperature interpolation of +!! reference water vapor self-continuum data +!!\param indself index of lower reference temperature for the +!! self-continuum interpolation +!!\param forfac scale factor for w. v. foreign-continuum +!!\param forfrac factor for temperature interpolation of +!! reference w.v. foreign-continuum data +!!\param indfor index of lower reference temperature for the +!! foreign-continuum interpolation +!!\param minorfrac factor for minor gases +!!\param scaleminor,scaleminorn2 scale factors for minor gases +!!\param indminor index of lower reference temperature for +!! minor gases +!!\param nlay total number of layers +!!\param fracs planck fractions +!!\param tautot total optical depth (gas+aerosols) +!>\section taumol_gen taumol General Algorithm +!! @{ +!! subprograms called: taugb## (## = 01 -16) + subroutine taumol & + & ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, & ! --- inputs + & rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, & + & selffac,selffrac,indself,forfac,forfrac,indfor, & + & minorfrac,scaleminor,scaleminorn2,indminor, & + & nlay, & + & fracs, tautot & ! --- outputs + & ) + +! ************ original subprogram description *************** ! +! ! +! optical depths developed for the ! +! ! +! rapid radiative transfer model (rrtm) ! +! ! +! atmospheric and environmental research, inc. ! +! 131 hartwell avenue ! +! lexington, ma 02421 ! +! ! +! eli j. mlawer ! +! jennifer delamere ! +! steven j. taubman ! +! shepard a. clough ! +! ! +! email: mlawer@aer.com ! +! email: jdelamer@aer.com ! +! ! +! the authors wish to acknowledge the contributions of the ! +! following people: karen cady-pereira, patrick d. brown, ! +! michael j. iacono, ronald e. farren, luke chen, ! +! robert bergstrom. ! +! ! +! revision for g-point reduction: michael j. iacono; aer, inc. ! +! ! +! taumol ! +! ! +! this file contains the subroutines taugbn (where n goes from ! +! 1 to 16). taugbn calculates the optical depths and planck ! +! fractions per g-value and layer for band n. ! +! ! +! ******************************************************************* ! +! ================== program usage description ================== ! +! ! +! call taumol ! +! inputs: ! +! ( laytrop,pavel,coldry,colamt,colbrd,wx,tauaer, ! +! rfrate,fac00,fac01,fac10,fac11,jp,jt,jt1, ! +! selffac,selffrac,indself,forfac,forfrac,indfor, ! +! minorfrac,scaleminor,scaleminorn2,indminor, ! +! nlay, ! +! outputs: ! +! fracs, tautot ) ! +! ! +! subprograms called: taugb## (## = 01 -16) ! +! ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: size ! +! laytrop - integer, tropopause layer index (unitless) 1 ! +! layer at which switch is made for key species ! +! pavel - real, layer pressures (mb) nlay ! +! coldry - real, column amount for dry air (mol/cm2) nlay ! +! colamt - real, column amounts of h2o, co2, o3, n2o, ch4, ! +! o2, co (mol/cm**2) nlay*maxgas! +! colbrd - real, column amount of broadening gases nlay ! +! wx - real, cross-section amounts(mol/cm2) nlay*maxxsec! +! tauaer - real, aerosol optical depth nbands*nlay ! +! rfrate - real, reference ratios of binary species parameter ! +! (:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4,5-n2o/co2,6-o3/co2! +! (:,:,n)n=1,2: the rates of ref press at the 2 sides of the layer ! +! nlay*nrates*2! +! facij - real, factors multiply the reference ks, i,j of 0/1 ! +! for lower/higher of the 2 appropriate temperatures ! +! and altitudes nlay ! +! jp - real, index of lower reference pressure nlay ! +! jt, jt1 - real, indices of lower reference temperatures nlay ! +! for pressure levels jp and jp+1, respectively ! +! selffac - real, scale factor for water vapor self-continuum ! +! equals (water vapor density)/(atmospheric density ! +! at 296k and 1013 mb) nlay ! +! selffrac - real, factor for temperature interpolation of ! +! reference water vapor self-continuum data nlay ! +! indself - integer, index of lower reference temperature for ! +! the self-continuum interpolation nlay ! +! forfac - real, scale factor for w. v. foreign-continuum nlay ! +! forfrac - real, factor for temperature interpolation of ! +! reference w.v. foreign-continuum data nlay ! +! indfor - integer, index of lower reference temperature for ! +! the foreign-continuum interpolation nlay ! +! minorfrac - real, factor for minor gases nlay ! +! scaleminor,scaleminorn2 ! +! - real, scale factors for minor gases nlay ! +! indminor - integer, index of lower reference temperature for ! +! minor gases nlay ! +! nlay - integer, total number of layers 1 ! +! ! +! outputs: ! +! fracs - real, planck fractions ngptlw,nlay! +! tautot - real, total optical depth (gas+aerosols) ngptlw,nlay! +! ! +! internal variables: ! +! ng## - integer, number of g-values in band ## (##=01-16) 1 ! +! nspa - integer, for lower atmosphere, the number of ref ! +! atmos, each has different relative amounts of the ! +! key species for the band nbands! +! nspb - integer, same but for upper atmosphere nbands! +! absa - real, k-values for lower ref atmospheres (no w.v. ! +! self-continuum) (cm**2/molecule) nspa(##)*5*13*ng##! +! absb - real, k-values for high ref atmospheres (all sources) ! +! (cm**2/molecule) nspb(##)*5*13:59*ng##! +! ka_m'mgas'- real, k-values for low ref atmospheres minor species ! +! (cm**2/molecule) mmn##*ng##! +! kb_m'mgas'- real, k-values for high ref atmospheres minor species ! +! (cm**2/molecule) mmn##*ng##! +! selfref - real, k-values for w.v. self-continuum for ref atmos ! +! used below laytrop (cm**2/mol) 10*ng##! +! forref - real, k-values for w.v. foreign-continuum for ref atmos +! used below/above laytrop (cm**2/mol) 4*ng##! +! ! +! ****************************************************************** ! + +! --- inputs: + integer, intent(in) :: nlay, laytrop + + integer, dimension(nlay), intent(in) :: jp, jt, jt1, indself, & + & indfor, indminor + + real (kind=kind_phys), dimension(nlay), intent(in) :: pavel, & + & coldry, colbrd, fac00, fac01, fac10, fac11, selffac, & + & selffrac, forfac, forfrac, minorfrac, scaleminor, & + & scaleminorn2 + + real (kind=kind_phys), dimension(nlay,maxgas), intent(in):: colamt + real (kind=kind_phys), dimension(nlay,maxxsec),intent(in):: wx + + real (kind=kind_phys), dimension(nbands,nlay), intent(in):: tauaer + + real (kind=kind_phys), dimension(nlay,nrates,2), intent(in) :: & + & rfrate + +! --- outputs: + real (kind=kind_phys), dimension(ngptlw,nlay), intent(out) :: & + & fracs, tautot + +! --- locals + real (kind=kind_phys), dimension(ngptlw,nlay) :: taug + + integer :: ib, ig, k +! +!===> ... begin here +! + call taugb01 + call taugb02 + call taugb03 + call taugb04 + call taugb05 + call taugb06 + call taugb07 + call taugb08 + call taugb09 + call taugb10 + call taugb11 + call taugb12 + call taugb13 + call taugb14 + call taugb15 + call taugb16 + +! --- combine gaseous and aerosol optical depths + + do ig = 1, ngptlw + ib = ngb(ig) + + do k = 1, nlay + tautot(ig,k) = taug(ig,k) + tauaer(ib,k) + enddo + enddo + +! ================= + contains +! ================= + +!>\ingroup module_radlw_main +!> band 1: 10-350 cm-1 (low key - h2o; low minor - n2); +!! (high key - h2o; high minor - n2) +! ---------------------------------- + subroutine taugb01 +! .................................. + +! ------------------------------------------------------------------ ! +! written by eli j. mlawer, atmospheric & environmental research. ! +! revised by michael j. iacono, atmospheric & environmental research. ! +! ! +! band 1: 10-350 cm-1 (low key - h2o; low minor - n2) ! +! (high key - h2o; high minor - n2) ! +! ! +! compute the optical depth by interpolating in ln(pressure) and ! +! temperature. below laytrop, the water vapor self-continuum and ! +! foreign continuum is interpolated (in temperature) separately. ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb01 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & indm, indmp, ig + + real (kind=kind_phys) :: pp, corradj, scalen2, tauself, taufor, & + & taun2 +! +!===> ... begin here +! +! --- minor gas mapping levels: +! lower - n2, p = 142.5490 mbar, t = 215.70 k +! upper - n2, p = 142.5490 mbar, t = 215.70 k + +! --- ... lower atmosphere loop + + do k = 1, laytrop + ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(1) + 1 + ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(1) + 1 + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + + pp = pavel(k) + scalen2 = colbrd(k) * scaleminorn2(k) + if (pp < 250.0) then + corradj = f_one - 0.15 * (250.0-pp) / 154.4 + else + corradj = f_one + endif + + do ig = 1, ng01 + tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + taun2 = scalen2 * (ka_mn2(ig,indm) + minorfrac(k) & + & * (ka_mn2(ig,indmp) - ka_mn2(ig,indm))) + + taug(ig,k) = corradj * (colamt(k,1) & + & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & + & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & + & + tauself + taufor + taun2) + + fracs(ig,k) = fracrefa(ig) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(1) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(1) + 1 + indf = indfor(k) + indm = indminor(k) + + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indfp = indf + 1 + indmp = indm + 1 + + scalen2 = colbrd(k) * scaleminorn2(k) + corradj = f_one - 0.15 * (pavel(k) / 95.6) + + do ig = 1, ng01 + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + taun2 = scalen2 * (kb_mn2(ig,indm) + minorfrac(k) & + & * (kb_mn2(ig,indmp) - kb_mn2(ig,indm))) + + taug(ig,k) = corradj * (colamt(k,1) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & + & + taufor + taun2) + + fracs(ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb01 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 2: 350-500 cm-1 (low key - h2o; high key - h2o) +! ---------------------------------- + subroutine taugb02 +! .................................. + +! ------------------------------------------------------------------ ! +! band 2: 350-500 cm-1 (low key - h2o; high key - h2o) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb02 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & ig + + real (kind=kind_phys) :: corradj, tauself, taufor +! +!===> ... begin here +! +! --- ... lower atmosphere loop + + do k = 1, laytrop + ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(2) + 1 + ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(2) + 1 + inds = indself(k) + indf = indfor(k) + + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indsp = inds + 1 + indfp = indf + 1 + + corradj = f_one - 0.05 * (pavel(k) - 100.0) / 900.0 + + do ig = 1, ng02 + tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + + taug(ns02+ig,k) = corradj * (colamt(k,1) & + & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & + & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & + & + tauself + taufor) + + fracs(ns02+ig,k) = fracrefa(ig) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(2) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(2) + 1 + indf = indfor(k) + + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indfp = indf + 1 + + do ig = 1, ng02 + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + + taug(ns02+ig,k) = colamt(k,1) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & + & + taufor + + fracs(ns02+ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb02 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 3: 500-630 cm-1 (low key - h2o,co2; low minor - n2o); +!! (high key - h2o,co2; high minor - n2o) +! ---------------------------------- + subroutine taugb03 +! .................................. + +! ------------------------------------------------------------------ ! +! band 3: 500-630 cm-1 (low key - h2o,co2; low minor - n2o) ! +! (high key - h2o,co2; high minor - n2o) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb03 + +! --- locals: + integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, & + & id000, id010, id100, id110, id200, id210, jmn2o, jmn2op, & + & id001, id011, id101, id111, id201, id211, jpl, jplp, & + & ig, js, js1 + + real (kind=kind_phys) :: absn2o, ratn2o, adjfac, adjcoln2o, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_mn2o, specparm_mn2o, specmult_mn2o, fmn2o, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & refrat_planck_a, refrat_planck_b, refrat_m_a, refrat_m_b, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & tau_major, tau_major1, tauself, taufor, n2om1, n2om2, & + & p, p4, fk0, fk1, fk2 +! +!===> ... begin here +! +! --- ... minor gas mapping levels: +! lower - n2o, p = 706.272 mbar, t = 278.94 k +! upper - n2o, p = 95.58 mbar, t = 215.7 k + + refrat_planck_a = chi_mls(1,9)/chi_mls(2,9) ! P = 212.725 mb + refrat_planck_b = chi_mls(1,13)/chi_mls(2,13) ! P = 95.58 mb + refrat_m_a = chi_mls(1,3)/chi_mls(2,3) ! P = 706.270 mb + refrat_m_b = chi_mls(1,13)/chi_mls(2,13) ! P = 95.58 mb + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) + specparm = colamt(k,1) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(3) + js + + speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(3) + js1 + + speccomb_mn2o = colamt(k,1) + refrat_m_a*colamt(k,2) + specparm_mn2o = colamt(k,1) / speccomb_mn2o + specmult_mn2o = 8.0 * min(specparm_mn2o, oneminus) + jmn2o = 1 + int(specmult_mn2o) + fmn2o = mod(specmult_mn2o, f_one) + + speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2) + specparm_planck = colamt(k,1) / speccomb_planck + specmult_planck = 8.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + jmn2op= jmn2o+ 1 + jplp = jpl + 1 + +! --- ... in atmospheres where the amount of n2O is too great to be considered +! a minor species, adjust the column amount of n2O by an empirical factor +! to obtain the proper contribution. + + p = coldry(k) * chi_mls(4,jp(k)+1) + ratn2o = colamt(k,4) / p + if (ratn2o > 1.5) then + adjfac = 0.5 + (ratn2o - 0.5)**0.65 + adjcoln2o = adjfac * p + else + adjcoln2o = colamt(k,4) + endif + + if (specparm < 0.125) then + p = fs - f_one + p4 = p**4 + fk0 = p4 + fk1 = f_one - p - 2.0*p4 + fk2 = p + p4 + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + else if (specparm > 0.875) then + p = -fs + p4 = p**4 + fk0 = p4 + fk1 = f_one - p - 2.0*p4 + fk2 = p + p4 + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk0 = f_one - fs + fk1 = fs + fk2 = f_zero + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk0*fac00(k) + fac100 = fk1*fac00(k) + fac200 = fk2*fac00(k) + fac010 = fk0*fac10(k) + fac110 = fk1*fac10(k) + fac210 = fk2*fac10(k) + + if (specparm1 < 0.125) then + p = fs1 - f_one + p4 = p**4 + fk0 = p4 + fk1 = f_one - p - 2.0*p4 + fk2 = p + p4 + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p = -fs1 + p4 = p**4 + fk0 = p4 + fk1 = f_one - p - 2.0*p4 + fk2 = p + p4 + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk0 = f_one - fs1 + fk1 = fs1 + fk2 = f_zero + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk0*fac01(k) + fac101 = fk1*fac01(k) + fac201 = fk2*fac01(k) + fac011 = fk0*fac11(k) + fac111 = fk1*fac11(k) + fac211 = fk2*fac11(k) + + do ig = 1, ng03 + tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + n2om1 = ka_mn2o(ig,jmn2o,indm) + fmn2o & + & * (ka_mn2o(ig,jmn2op,indm) - ka_mn2o(ig,jmn2o,indm)) + n2om2 = ka_mn2o(ig,jmn2o,indmp) + fmn2o & + & * (ka_mn2o(ig,jmn2op,indmp) - ka_mn2o(ig,jmn2o,indmp)) + absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1) + + tau_major = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) + + tau_major1 = speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) + + taug(ns03+ig,k) = tau_major + tau_major1 & + & + tauself + taufor + adjcoln2o*absn2o + + fracs(ns03+ig,k) = fracrefa(ig,jpl) + fpl & + & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo ! end do_k_loop + enddo ! end do_ig_loop + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) + specparm = colamt(k,1) / speccomb + specmult = 4.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(3) + js + + speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 4.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(3) + js1 + + speccomb_mn2o = colamt(k,1) + refrat_m_b*colamt(k,2) + specparm_mn2o = colamt(k,1) / speccomb_mn2o + specmult_mn2o = 4.0 * min(specparm_mn2o, oneminus) + jmn2o = 1 + int(specmult_mn2o) + fmn2o = mod(specmult_mn2o, f_one) + + speccomb_planck = colamt(k,1) + refrat_planck_b*colamt(k,2) + specparm_planck = colamt(k,1) / speccomb_planck + specmult_planck = 4.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + indf = indfor(k) + indm = indminor(k) + indfp = indf + 1 + indmp = indm + 1 + jmn2op= jmn2o+ 1 + jplp = jpl + 1 + + id000 = ind0 + id010 = ind0 + 5 + id100 = ind0 + 1 + id110 = ind0 + 6 + id001 = ind1 + id011 = ind1 + 5 + id101 = ind1 + 1 + id111 = ind1 + 6 + +! --- ... in atmospheres where the amount of n2o is too great to be considered +! a minor species, adjust the column amount of N2O by an empirical factor +! to obtain the proper contribution. + + p = coldry(k) * chi_mls(4,jp(k)+1) + ratn2o = colamt(k,4) / p + if (ratn2o > 1.5) then + adjfac = 0.5 + (ratn2o - 0.5)**0.65 + adjcoln2o = adjfac * p + else + adjcoln2o = colamt(k,4) + endif + + fk0 = f_one - fs + fk1 = fs + fac000 = fk0*fac00(k) + fac010 = fk0*fac10(k) + fac100 = fk1*fac00(k) + fac110 = fk1*fac10(k) + + fk0 = f_one - fs1 + fk1 = fs1 + fac001 = fk0*fac01(k) + fac011 = fk0*fac11(k) + fac101 = fk1*fac01(k) + fac111 = fk1*fac11(k) + + do ig = 1, ng03 + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + n2om1 = kb_mn2o(ig,jmn2o,indm) + fmn2o & + & * (kb_mn2o(ig,jmn2op,indm) - kb_mn2o(ig,jmn2o,indm)) + n2om2 = kb_mn2o(ig,jmn2o,indmp) + fmn2o & + & * (kb_mn2o(ig,jmn2op,indmp) - kb_mn2o(ig,jmn2o,indmp)) + absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1) + + tau_major = speccomb & + & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) & + & + fac100*absb(ig,id100) + fac110*absb(ig,id110)) + + tau_major1 = speccomb1 & + & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) & + & + fac101*absb(ig,id101) + fac111*absb(ig,id111)) + + taug(ns03+ig,k) = tau_major + tau_major1 & + & + taufor + adjcoln2o*absn2o + + fracs(ns03+ig,k) = fracrefb(ig,jpl) + fpl & + & * (fracrefb(ig,jplp) - fracrefb(ig,jpl)) + enddo + enddo + +! .................................. + end subroutine taugb03 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 4: 630-700 cm-1 (low key - h2o,co2; high key - o3,co2) +! ---------------------------------- + subroutine taugb04 +! .................................. + +! ------------------------------------------------------------------ ! +! band 4: 630-700 cm-1 (low key - h2o,co2; high key - o3,co2) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb04 + +! --- locals: + integer :: k, ind0, ind1, inds, indsp, indf, indfp, jpl, jplp, & + & id000, id010, id100, id110, id200, id210, ig, js, js1, & + & id001, id011, id101, id111, id201, id211 + + real (kind=kind_phys) :: tauself, taufor, p, p4, fk0, fk1, fk2, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & refrat_planck_a, refrat_planck_b, tau_major, tau_major1 +! +!===> ... begin here +! + refrat_planck_a = chi_mls(1,11)/chi_mls(2,11) ! P = 142.5940 mb + refrat_planck_b = chi_mls(3,13)/chi_mls(2,13) ! P = 95.58350 mb + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) + specparm = colamt(k,1) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(4) + js + + speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = ( jp(k)*5 + (jt1(k)-1)) * nspa(4) + js1 + + speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2) + specparm_planck = colamt(k,1) / speccomb_planck + specmult_planck = 8.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, 1.0) + + inds = indself(k) + indf = indfor(k) + indsp = inds + 1 + indfp = indf + 1 + jplp = jpl + 1 + + if (specparm < 0.125) then + p = fs - f_one + p4 = p**4 + fk0 = p4 + fk1 = f_one - p - 2.0*p4 + fk2 = p + p4 + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + elseif (specparm > 0.875) then + p = -fs + p4 = p**4 + fk0 = p4 + fk1 = f_one - p - 2.0*p4 + fk2 = p + p4 + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk0 = f_one - fs + fk1 = fs + fk2 = f_zero + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk0*fac00(k) + fac100 = fk1*fac00(k) + fac200 = fk2*fac00(k) + fac010 = fk0*fac10(k) + fac110 = fk1*fac10(k) + fac210 = fk2*fac10(k) + + if (specparm1 < 0.125) then + p = fs1 - f_one + p4 = p**4 + fk0 = p4 + fk1 = f_one - p - 2.0*p4 + fk2 = p + p4 + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p = -fs1 + p4 = p**4 + fk0 = p4 + fk1 = f_one - p - 2.0*p4 + fk2 = p + p4 + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk0 = f_one - fs1 + fk1 = fs1 + fk2 = f_zero + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk0*fac01(k) + fac101 = fk1*fac01(k) + fac201 = fk2*fac01(k) + fac011 = fk0*fac11(k) + fac111 = fk1*fac11(k) + fac211 = fk2*fac11(k) + + do ig = 1, ng04 + tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + + tau_major = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) + + tau_major1 = speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) + + taug(ns04+ig,k) = tau_major + tau_major1 + tauself + taufor + + fracs(ns04+ig,k) = fracrefa(ig,jpl) + fpl & + & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo ! end do_k_loop + enddo ! end do_ig_loop + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + speccomb = colamt(k,3) + rfrate(k,6,1)*colamt(k,2) + specparm = colamt(k,3) / speccomb + specmult = 4.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(4) + js + + speccomb1 = colamt(k,3) + rfrate(k,6,2)*colamt(k,2) + specparm1 = colamt(k,3) / speccomb1 + specmult1 = 4.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(4) + js1 + + speccomb_planck = colamt(k,3) + refrat_planck_b*colamt(k,2) + specparm_planck = colamt(k,3) / speccomb_planck + specmult_planck = 4.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + jplp = jpl + 1 + + id000 = ind0 + id010 = ind0 + 5 + id100 = ind0 + 1 + id110 = ind0 + 6 + id001 = ind1 + id011 = ind1 + 5 + id101 = ind1 + 1 + id111 = ind1 + 6 + + fk0 = f_one - fs + fk1 = fs + fac000 = fk0*fac00(k) + fac010 = fk0*fac10(k) + fac100 = fk1*fac00(k) + fac110 = fk1*fac10(k) + + fk0 = f_one - fs1 + fk1 = fs1 + fac001 = fk0*fac01(k) + fac011 = fk0*fac11(k) + fac101 = fk1*fac01(k) + fac111 = fk1*fac11(k) + + do ig = 1, ng04 + tau_major = speccomb & + & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) & + & + fac100*absb(ig,id100) + fac110*absb(ig,id110)) + tau_major1 = speccomb1 & + & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) & + & + fac101*absb(ig,id101) + fac111*absb(ig,id111)) + + taug(ns04+ig,k) = tau_major + tau_major1 + + fracs(ns04+ig,k) = fracrefb(ig,jpl) + fpl & + & * (fracrefb(ig,jplp) - fracrefb(ig,jpl)) + enddo + +! --- ... empirical modification to code to improve stratospheric cooling rates +! for co2. revised to apply weighting for g-point reduction in this band. + + taug(ns04+ 8,k) = taug(ns04+ 8,k) * 0.92 + taug(ns04+ 9,k) = taug(ns04+ 9,k) * 0.88 + taug(ns04+10,k) = taug(ns04+10,k) * 1.07 + taug(ns04+11,k) = taug(ns04+11,k) * 1.1 + taug(ns04+12,k) = taug(ns04+12,k) * 0.99 + taug(ns04+13,k) = taug(ns04+13,k) * 0.88 + taug(ns04+14,k) = taug(ns04+14,k) * 0.943 + enddo + +! .................................. + end subroutine taugb04 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 5: 700-820 cm-1 (low key - h2o,co2; low minor - o3, ccl4) +!! (high key - o3,co2) +! ---------------------------------- + subroutine taugb05 +! .................................. + +! ------------------------------------------------------------------ ! +! band 5: 700-820 cm-1 (low key - h2o,co2; low minor - o3, ccl4) ! +! (high key - o3,co2) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb05 + +! --- locals: + integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, & + & id000, id010, id100, id110, id200, id210, jmo3, jmo3p, & + & id001, id011, id101, id111, id201, id211, jpl, jplp, & + & ig, js, js1 + + real (kind=kind_phys) :: tauself, taufor, o3m1, o3m2, abso3, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_mo3, specparm_mo3, specmult_mo3, fmo3, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & refrat_planck_a, refrat_planck_b, refrat_m_a, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21 +! +!===> ... begin here +! +! --- ... minor gas mapping level : +! lower - o3, p = 317.34 mbar, t = 240.77 k +! lower - ccl4 + +! --- ... calculate reference ratio to be used in calculation of Planck +! fraction in lower/upper atmosphere. + + refrat_planck_a = chi_mls(1,5)/chi_mls(2,5) ! P = 473.420 mb + refrat_planck_b = chi_mls(3,43)/chi_mls(2,43) ! P = 0.2369 mb + refrat_m_a = chi_mls(1,7)/chi_mls(2,7) ! P = 317.348 mb + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) + specparm = colamt(k,1) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(5) + js + + speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(5) + js1 + + speccomb_mo3 = colamt(k,1) + refrat_m_a*colamt(k,2) + specparm_mo3 = colamt(k,1) / speccomb_mo3 + specmult_mo3 = 8.0 * min(specparm_mo3, oneminus) + jmo3 = 1 + int(specmult_mo3) + fmo3 = mod(specmult_mo3, f_one) + + speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2) + specparm_planck = colamt(k,1) / speccomb_planck + specmult_planck = 8.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + jplp = jpl + 1 + jmo3p = jmo3 + 1 + + if (specparm < 0.125) then + p0 = fs - f_one + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + elseif (specparm > 0.875) then + p0 = -fs + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk00 = f_one - fs + fk10 = fs + fk20 = f_zero + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk00 * fac00(k) + fac100 = fk10 * fac00(k) + fac200 = fk20 * fac00(k) + fac010 = fk00 * fac10(k) + fac110 = fk10 * fac10(k) + fac210 = fk20 * fac10(k) + + if (specparm1 < 0.125) then + p1 = fs1 - f_one + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p1 = -fs1 + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk01 = f_one - fs1 + fk11 = fs1 + fk21 = f_zero + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk01 * fac01(k) + fac101 = fk11 * fac01(k) + fac201 = fk21 * fac01(k) + fac011 = fk01 * fac11(k) + fac111 = fk11 * fac11(k) + fac211 = fk21 * fac11(k) + + do ig = 1, ng05 + tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + o3m1 = ka_mo3(ig,jmo3,indm) + fmo3 & + & * (ka_mo3(ig,jmo3p,indm) - ka_mo3(ig,jmo3,indm)) + o3m2 = ka_mo3(ig,jmo3,indmp) + fmo3 & + & * (ka_mo3(ig,jmo3p,indmp) - ka_mo3(ig,jmo3,indmp)) + abso3 = o3m1 + minorfrac(k)*(o3m2 - o3m1) + + taug(ns05+ig,k) = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & + & + speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & + & + tauself + taufor+abso3*colamt(k,3)+wx(k,1)*ccl4(ig) + + fracs(ns05+ig,k) = fracrefa(ig,jpl) + fpl & + & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + speccomb = colamt(k,3) + rfrate(k,6,1)*colamt(k,2) + specparm = colamt(k,3) / speccomb + specmult = 4.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-13)*5 + (jt(k)-1)) * nspb(5) + js + + speccomb1 = colamt(k,3) + rfrate(k,6,2)*colamt(k,2) + specparm1 = colamt(k,3) / speccomb1 + specmult1 = 4.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(5) + js1 + + speccomb_planck = colamt(k,3) + refrat_planck_b*colamt(k,2) + specparm_planck = colamt(k,3) / speccomb_planck + specmult_planck = 4.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + jplp= jpl + 1 + + id000 = ind0 + id010 = ind0 + 5 + id100 = ind0 + 1 + id110 = ind0 + 6 + id001 = ind1 + id011 = ind1 + 5 + id101 = ind1 + 1 + id111 = ind1 + 6 + + fk00 = f_one - fs + fk10 = fs + + fk01 = f_one - fs1 + fk11 = fs1 + + fac000 = fk00 * fac00(k) + fac010 = fk00 * fac10(k) + fac100 = fk10 * fac00(k) + fac110 = fk10 * fac10(k) + + fac001 = fk01 * fac01(k) + fac011 = fk01 * fac11(k) + fac101 = fk11 * fac01(k) + fac111 = fk11 * fac11(k) + + do ig = 1, ng05 + taug(ns05+ig,k) = speccomb & + & * (fac000*absb(ig,id000) + fac010*absb(ig,id010) & + & + fac100*absb(ig,id100) + fac110*absb(ig,id110)) & + & + speccomb1 & + & * (fac001*absb(ig,id001) + fac011*absb(ig,id011) & + & + fac101*absb(ig,id101) + fac111*absb(ig,id111)) & + & + wx(k,1) * ccl4(ig) + + fracs(ns05+ig,k) = fracrefb(ig,jpl) + fpl & + & * (fracrefb(ig,jplp) - fracrefb(ig,jpl)) + enddo + enddo + +! .................................. + end subroutine taugb05 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 6: 820-980 cm-1 (low key - h2o; low minor - co2) +!! (high key - none; high minor - cfc11, cfc12) +! ---------------------------------- + subroutine taugb06 +! .................................. + +! ------------------------------------------------------------------ ! +! band 6: 820-980 cm-1 (low key - h2o; low minor - co2) ! +! (high key - none; high minor - cfc11, cfc12) +! ------------------------------------------------------------------ ! + + use module_radlw_kgb06 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & indm, indmp, ig + + real (kind=kind_phys) :: ratco2, adjfac, adjcolco2, tauself, & + & taufor, absco2, temp +! +!===> ... begin here +! +! --- ... minor gas mapping level: +! lower - co2, p = 706.2720 mb, t = 294.2 k +! upper - cfc11, cfc12 + +! --- ... lower atmosphere loop + + do k = 1, laytrop + ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(6) + 1 + ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(6) + 1 + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + ind0p = ind0 + 1 + ind1p = ind1 + 1 + +! --- ... in atmospheres where the amount of co2 is too great to be considered +! a minor species, adjust the column amount of co2 by an empirical factor +! to obtain the proper contribution. + + temp = coldry(k) * chi_mls(2,jp(k)+1) + ratco2 = colamt(k,2) / temp + if (ratco2 > 3.0) then + adjfac = 2.0 + (ratco2-2.0)**0.77 + adjcolco2 = adjfac * temp + else + adjcolco2 = colamt(k,2) + endif + + do ig = 1, ng06 + tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + absco2 = ka_mco2(ig,indm) + minorfrac(k) & + & * (ka_mco2(ig,indmp) - ka_mco2(ig,indm)) + + taug(ns06+ig,k) = colamt(k,1) & + & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & + & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & + & + tauself + taufor + adjcolco2*absco2 & + & + wx(k,2)*cfc11adj(ig) + wx(k,3)*cfc12(ig) + + fracs(ns06+ig,k) = fracrefa(ig) + enddo + enddo + +! --- ... upper atmosphere loop +! nothing important goes on above laytrop in this band. + + do k = laytrop+1, nlay + do ig = 1, ng06 + taug(ns06+ig,k) = wx(k,2)*cfc11adj(ig) + wx(k,3)*cfc12(ig) + + fracs(ns06+ig,k) = fracrefa(ig) + enddo + enddo + +! .................................. + end subroutine taugb06 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 7: 980-1080 cm-1 (low key - h2o,o3; low minor - co2) +!! (high key - o3; high minor - co2) +! ---------------------------------- + subroutine taugb07 +! .................................. + +! ------------------------------------------------------------------ ! +! band 7: 980-1080 cm-1 (low key - h2o,o3; low minor - co2) ! +! (high key - o3; high minor - co2) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb07 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & id000, id010, id100, id110, id200, id210, indm, indmp, & + & id001, id011, id101, id111, id201, id211, jmco2, jmco2p, & + & jpl, jplp, ig, js, js1 + + real (kind=kind_phys) :: tauself, taufor, co2m1, co2m2, absco2, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_mco2, specparm_mco2, specmult_mco2, fmco2, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & refrat_planck_a, refrat_m_a, ratco2, adjfac, adjcolco2, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp +! +!===> ... begin here +! +! --- ... minor gas mapping level : +! lower - co2, p = 706.2620 mbar, t= 278.94 k +! upper - co2, p = 12.9350 mbar, t = 234.01 k + +! --- ... calculate reference ratio to be used in calculation of Planck +! fraction in lower atmosphere. + + refrat_planck_a = chi_mls(1,3)/chi_mls(3,3) ! P = 706.2620 mb + refrat_m_a = chi_mls(1,3)/chi_mls(3,3) ! P = 706.2720 mb + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,1) + rfrate(k,2,1)*colamt(k,3) + specparm = colamt(k,1) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(7) + js + + speccomb1 = colamt(k,1) + rfrate(k,2,2)*colamt(k,3) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(7) + js1 + + speccomb_mco2 = colamt(k,1) + refrat_m_a*colamt(k,3) + specparm_mco2 = colamt(k,1) / speccomb_mco2 + specmult_mco2 = 8.0 * min(specparm_mco2, oneminus) + jmco2 = 1 + int(specmult_mco2) + fmco2 = mod(specmult_mco2, f_one) + + speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,3) + specparm_planck = colamt(k,1) / speccomb_planck + specmult_planck = 8.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + jplp = jpl + 1 + jmco2p= jmco2+ 1 + ind0p = ind0 + 1 + ind1p = ind1 + 1 + +! --- ... in atmospheres where the amount of CO2 is too great to be considered +! a minor species, adjust the column amount of CO2 by an empirical factor +! to obtain the proper contribution. + + temp = coldry(k) * chi_mls(2,jp(k)+1) + ratco2 = colamt(k,2) / temp + if (ratco2 > 3.0) then + adjfac = 3.0 + (ratco2-3.0)**0.79 + adjcolco2 = adjfac * temp + else + adjcolco2 = colamt(k,2) + endif + + if (specparm < 0.125) then + p0 = fs - f_one + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + elseif (specparm > 0.875) then + p0 = -fs + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk00 = f_one - fs + fk10 = fs + fk20 = f_zero + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk00 * fac00(k) + fac100 = fk10 * fac00(k) + fac200 = fk20 * fac00(k) + fac010 = fk00 * fac10(k) + fac110 = fk10 * fac10(k) + fac210 = fk20 * fac10(k) + + if (specparm1 < 0.125) then + p1 = fs1 - f_one + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p1 = -fs1 + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk01 = f_one - fs1 + fk11 = fs1 + fk21 = f_zero + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk01 * fac01(k) + fac101 = fk11 * fac01(k) + fac201 = fk21 * fac01(k) + fac011 = fk01 * fac11(k) + fac111 = fk11 * fac11(k) + fac211 = fk21 * fac11(k) + + do ig = 1, ng07 + tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + co2m1 = ka_mco2(ig,jmco2,indm) + fmco2 & + & * (ka_mco2(ig,jmco2p,indm) - ka_mco2(ig,jmco2,indm)) + co2m2 = ka_mco2(ig,jmco2,indmp) + fmco2 & + & * (ka_mco2(ig,jmco2p,indmp) - ka_mco2(ig,jmco2,indmp)) + absco2 = co2m1 + minorfrac(k) * (co2m2 - co2m1) + + taug(ns07+ig,k) = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & + & + speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & + & + tauself + taufor + adjcolco2*absco2 + + fracs(ns07+ig,k) = fracrefa(ig,jpl) + fpl & + & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo + enddo + +! --- ... upper atmosphere loop + +! --- ... in atmospheres where the amount of co2 is too great to be considered +! a minor species, adjust the column amount of co2 by an empirical factor +! to obtain the proper contribution. + + do k = laytrop+1, nlay + temp = coldry(k) * chi_mls(2,jp(k)+1) + ratco2 = colamt(k,2) / temp + if (ratco2 > 3.0) then + adjfac = 2.0 + (ratco2-2.0)**0.79 + adjcolco2 = adjfac * temp + else + adjcolco2 = colamt(k,2) + endif + + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(7) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(7) + 1 + + indm = indminor(k) + indmp = indm + 1 + ind0p = ind0 + 1 + ind1p = ind1 + 1 + + do ig = 1, ng07 + absco2 = kb_mco2(ig,indm) + minorfrac(k) & + & * (kb_mco2(ig,indmp) - kb_mco2(ig,indm)) + + taug(ns07+ig,k) = colamt(k,3) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & + & + adjcolco2 * absco2 + + fracs(ns07+ig,k) = fracrefb(ig) + enddo + +! --- ... empirical modification to code to improve stratospheric cooling rates +! for o3. revised to apply weighting for g-point reduction in this band. + + taug(ns07+ 6,k) = taug(ns07+ 6,k) * 0.92 + taug(ns07+ 7,k) = taug(ns07+ 7,k) * 0.88 + taug(ns07+ 8,k) = taug(ns07+ 8,k) * 1.07 + taug(ns07+ 9,k) = taug(ns07+ 9,k) * 1.1 + taug(ns07+10,k) = taug(ns07+10,k) * 0.99 + taug(ns07+11,k) = taug(ns07+11,k) * 0.855 + enddo + +! .................................. + end subroutine taugb07 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 8: 1080-1180 cm-1 (low key - h2o; low minor - co2,o3,n2o) +!! (high key - o3; high minor - co2, n2o) +! ---------------------------------- + subroutine taugb08 +! .................................. + +! ------------------------------------------------------------------ ! +! band 8: 1080-1180 cm-1 (low key - h2o; low minor - co2,o3,n2o) ! +! (high key - o3; high minor - co2, n2o) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb08 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & indm, indmp, ig + + real (kind=kind_phys) :: tauself, taufor, absco2, abso3, absn2o, & + & ratco2, adjfac, adjcolco2, temp +! +!===> ... begin here +! +! --- ... minor gas mapping level: +! lower - co2, p = 1053.63 mb, t = 294.2 k +! lower - o3, p = 317.348 mb, t = 240.77 k +! lower - n2o, p = 706.2720 mb, t= 278.94 k +! lower - cfc12,cfc11 +! upper - co2, p = 35.1632 mb, t = 223.28 k +! upper - n2o, p = 8.716e-2 mb, t = 226.03 k + +! --- ... lower atmosphere loop + + do k = 1, laytrop + ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(8) + 1 + ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(8) + 1 + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + +! --- ... in atmospheres where the amount of co2 is too great to be considered +! a minor species, adjust the column amount of co2 by an empirical factor +! to obtain the proper contribution. + + temp = coldry(k) * chi_mls(2,jp(k)+1) + ratco2 = colamt(k,2) / temp + if (ratco2 > 3.0) then + adjfac = 2.0 + (ratco2-2.0)**0.65 + adjcolco2 = adjfac * temp + else + adjcolco2 = colamt(k,2) + endif + + do ig = 1, ng08 + tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + absco2 = (ka_mco2(ig,indm) + minorfrac(k) & + & * (ka_mco2(ig,indmp) - ka_mco2(ig,indm))) + abso3 = (ka_mo3(ig,indm) + minorfrac(k) & + & * (ka_mo3(ig,indmp) - ka_mo3(ig,indm))) + absn2o = (ka_mn2o(ig,indm) + minorfrac(k) & + & * (ka_mn2o(ig,indmp) - ka_mn2o(ig,indm))) + + taug(ns08+ig,k) = colamt(k,1) & + & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & + & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & + & + tauself+taufor + adjcolco2*absco2 & + & + colamt(k,3)*abso3 + colamt(k,4)*absn2o & + & + wx(k,3)*cfc12(ig) + wx(k,4)*cfc22adj(ig) + + fracs(ns08+ig,k) = fracrefa(ig) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(8) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(8) + 1 + + indm = indminor(k) + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indmp = indm + 1 + +! --- ... in atmospheres where the amount of co2 is too great to be considered +! a minor species, adjust the column amount of co2 by an empirical factor +! to obtain the proper contribution. + + temp = coldry(k) * chi_mls(2,jp(k)+1) + ratco2 = colamt(k,2) / temp + if (ratco2 > 3.0) then + adjfac = 2.0 + (ratco2-2.0)**0.65 + adjcolco2 = adjfac * temp + else + adjcolco2 = colamt(k,2) + endif + + do ig = 1, ng08 + absco2 = (kb_mco2(ig,indm) + minorfrac(k) & + & * (kb_mco2(ig,indmp) - kb_mco2(ig,indm))) + absn2o = (kb_mn2o(ig,indm) + minorfrac(k) & + & * (kb_mn2o(ig,indmp) - kb_mn2o(ig,indm))) + + taug(ns08+ig,k) = colamt(k,3) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & + & + adjcolco2*absco2 + colamt(k,4)*absn2o & + & + wx(k,3)*cfc12(ig) + wx(k,4)*cfc22adj(ig) + + fracs(ns08+ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb08 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 9: 1180-1390 cm-1 (low key - h2o,ch4; low minor - n2o) +!! (high key - ch4; high minor - n2o) +! ---------------------------------- + subroutine taugb09 +! .................................. + +! ------------------------------------------------------------------ ! +! band 9: 1180-1390 cm-1 (low key - h2o,ch4; low minor - n2o) ! +! (high key - ch4; high minor - n2o) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb09 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & id000, id010, id100, id110, id200, id210, indm, indmp, & + & id001, id011, id101, id111, id201, id211, jmn2o, jmn2op, & + & jpl, jplp, ig, js, js1 + + real (kind=kind_phys) :: tauself, taufor, n2om1, n2om2, absn2o, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_mn2o, specparm_mn2o, specmult_mn2o, fmn2o, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & refrat_planck_a, refrat_m_a, ratn2o, adjfac, adjcoln2o, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp +! +!===> ... begin here +! +! --- ... minor gas mapping level : +! lower - n2o, p = 706.272 mbar, t = 278.94 k +! upper - n2o, p = 95.58 mbar, t = 215.7 k + +! --- ... calculate reference ratio to be used in calculation of Planck +! fraction in lower/upper atmosphere. + + refrat_planck_a = chi_mls(1,9)/chi_mls(6,9) ! P = 212 mb + refrat_m_a = chi_mls(1,3)/chi_mls(6,3) ! P = 706.272 mb + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,1) + rfrate(k,4,1)*colamt(k,5) + specparm = colamt(k,1) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(9) + js + + speccomb1 = colamt(k,1) + rfrate(k,4,2)*colamt(k,5) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(9) + js1 + + speccomb_mn2o = colamt(k,1) + refrat_m_a*colamt(k,5) + specparm_mn2o = colamt(k,1) / speccomb_mn2o + specmult_mn2o = 8.0 * min(specparm_mn2o, oneminus) + jmn2o = 1 + int(specmult_mn2o) + fmn2o = mod(specmult_mn2o, f_one) + + speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,5) + specparm_planck = colamt(k,1) / speccomb_planck + specmult_planck = 8.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + jplp = jpl + 1 + jmn2op= jmn2o+ 1 + +! --- ... in atmospheres where the amount of n2o is too great to be considered +! a minor species, adjust the column amount of n2o by an empirical factor +! to obtain the proper contribution. + + temp = coldry(k) * chi_mls(4,jp(k)+1) + ratn2o = colamt(k,4) / temp + if (ratn2o > 1.5) then + adjfac = 0.5 + (ratn2o-0.5)**0.65 + adjcoln2o = adjfac * temp + else + adjcoln2o = colamt(k,4) + endif + + if (specparm < 0.125) then + p0 = fs - f_one + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + elseif (specparm > 0.875) then + p0 = -fs + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk00 = f_one - fs + fk10 = fs + fk20 = f_zero + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk00 * fac00(k) + fac100 = fk10 * fac00(k) + fac200 = fk20 * fac00(k) + fac010 = fk00 * fac10(k) + fac110 = fk10 * fac10(k) + fac210 = fk20 * fac10(k) + + if (specparm1 < 0.125) then + p1 = fs1 - f_one + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p1 = -fs1 + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk01 = f_one - fs1 + fk11 = fs1 + fk21 = f_zero + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk01 * fac01(k) + fac101 = fk11 * fac01(k) + fac201 = fk21 * fac01(k) + fac011 = fk01 * fac11(k) + fac111 = fk11 * fac11(k) + fac211 = fk21 * fac11(k) + + do ig = 1, ng09 + tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + n2om1 = ka_mn2o(ig,jmn2o,indm) + fmn2o & + & * (ka_mn2o(ig,jmn2op,indm) - ka_mn2o(ig,jmn2o,indm)) + n2om2 = ka_mn2o(ig,jmn2o,indmp) + fmn2o & + & * (ka_mn2o(ig,jmn2op,indmp) - ka_mn2o(ig,jmn2o,indmp)) + absn2o = n2om1 + minorfrac(k) * (n2om2 - n2om1) + + taug(ns09+ig,k) = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & + & + speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & + & + tauself + taufor + adjcoln2o*absn2o + + fracs(ns09+ig,k) = fracrefa(ig,jpl) + fpl & + & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(9) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(9) + 1 + + indm = indminor(k) + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indmp = indm + 1 + +! --- ... in atmospheres where the amount of n2o is too great to be considered +! a minor species, adjust the column amount of n2o by an empirical factor +! to obtain the proper contribution. + + temp = coldry(k) * chi_mls(4,jp(k)+1) + ratn2o = colamt(k,4) / temp + if (ratn2o > 1.5) then + adjfac = 0.5 + (ratn2o - 0.5)**0.65 + adjcoln2o = adjfac * temp + else + adjcoln2o = colamt(k,4) + endif + + do ig = 1, ng09 + absn2o = kb_mn2o(ig,indm) + minorfrac(k) & + & * (kb_mn2o(ig,indmp) - kb_mn2o(ig,indm)) + + taug(ns09+ig,k) = colamt(k,5) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & + & + adjcoln2o*absn2o + + fracs(ns09+ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb09 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 10: 1390-1480 cm-1 (low key - h2o; high key - h2o) +! ---------------------------------- + subroutine taugb10 +! .................................. + +! ------------------------------------------------------------------ ! +! band 10: 1390-1480 cm-1 (low key - h2o; high key - h2o) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb10 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & ig + + real (kind=kind_phys) :: tauself, taufor +! +!===> ... begin here +! +! --- ... lower atmosphere loop + + do k = 1, laytrop + ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(10) + 1 + ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(10) + 1 + + inds = indself(k) + indf = indfor(k) + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indsp = inds + 1 + indfp = indf + 1 + + do ig = 1, ng10 + tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + + taug(ns10+ig,k) = colamt(k,1) & + & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & + & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & + & + tauself + taufor + + fracs(ns10+ig,k) = fracrefa(ig) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(10) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(10) + 1 + + indf = indfor(k) + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indfp = indf + 1 + + do ig = 1, ng10 + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + + taug(ns10+ig,k) = colamt(k,1) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & + & + taufor + + fracs(ns10+ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb10 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 11: 1480-1800 cm-1 (low - h2o; low minor - o2) +!! (high key - h2o; high minor - o2) +! ---------------------------------- + subroutine taugb11 +! .................................. + +! ------------------------------------------------------------------ ! +! band 11: 1480-1800 cm-1 (low - h2o; low minor - o2) ! +! (high key - h2o; high minor - o2) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb11 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & indm, indmp, ig + + real (kind=kind_phys) :: scaleo2, tauself, taufor, tauo2 +! +!===> ... begin here +! +! --- ... minor gas mapping level : +! lower - o2, p = 706.2720 mbar, t = 278.94 k +! upper - o2, p = 4.758820 mbarm t = 250.85 k + +! --- ... lower atmosphere loop + + do k = 1, laytrop + ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(11) + 1 + ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(11) + 1 + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + + scaleo2 = colamt(k,6) * scaleminor(k) + + do ig = 1, ng11 + tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + tauo2 = scaleo2 * (ka_mo2(ig,indm) + minorfrac(k) & + & * (ka_mo2(ig,indmp) - ka_mo2(ig,indm))) + + taug(ns11+ig,k) = colamt(k,1) & + & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & + & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & + & + tauself + taufor + tauo2 + + fracs(ns11+ig,k) = fracrefa(ig) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(11) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(11) + 1 + + indf = indfor(k) + indm = indminor(k) + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indfp = indf + 1 + indmp = indm + 1 + + scaleo2 = colamt(k,6) * scaleminor(k) + + do ig = 1, ng11 + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + tauo2 = scaleo2 * (kb_mo2(ig,indm) + minorfrac(k) & + & * (kb_mo2(ig,indmp) - kb_mo2(ig,indm))) + + taug(ns11+ig,k) = colamt(k,1) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) & + & + taufor + tauo2 + + fracs(ns11+ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb11 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 12: 1800-2080 cm-1 (low - h2o,co2; high - nothing) +! ---------------------------------- + subroutine taugb12 +! .................................. + +! ------------------------------------------------------------------ ! +! band 12: 1800-2080 cm-1 (low - h2o,co2; high - nothing) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb12 + +! --- locals: + integer :: k, ind0, ind1, inds, indsp, indf, indfp, jpl, jplp, & + & id000, id010, id100, id110, id200, id210, ig, js, js1, & + & id001, id011, id101, id111, id201, id211 + + real (kind=kind_phys) :: tauself, taufor, refrat_planck_a, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21 +! +!===> ... begin here +! +! --- ... calculate reference ratio to be used in calculation of Planck +! fraction in lower/upper atmosphere. + + refrat_planck_a = chi_mls(1,10)/chi_mls(2,10) ! P = 174.164 mb + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,1) + rfrate(k,1,1)*colamt(k,2) + specparm = colamt(k,1) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(12) + js + + speccomb1 = colamt(k,1) + rfrate(k,1,2)*colamt(k,2) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(12) + js1 + + speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,2) + specparm_planck = colamt(k,1) / speccomb_planck + if (specparm_planck >= oneminus) specparm_planck=oneminus + specmult_planck = 8.0 * specparm_planck + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + inds = indself(k) + indf = indfor(k) + indsp = inds + 1 + indfp = indf + 1 + jplp = jpl + 1 + + if (specparm < 0.125) then + p0 = fs - f_one + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + elseif (specparm > 0.875) then + p0 = -fs + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk00 = f_one - fs + fk10 = fs + fk20 = f_zero + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk00 * fac00(k) + fac100 = fk10 * fac00(k) + fac200 = fk20 * fac00(k) + fac010 = fk00 * fac10(k) + fac110 = fk10 * fac10(k) + fac210 = fk20 * fac10(k) + + if (specparm1 < 0.125) then + p1 = fs1 - f_one + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p1 = -fs1 + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk01 = f_one - fs1 + fk11 = fs1 + fk21 = f_zero + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk01 * fac01(k) + fac101 = fk11 * fac01(k) + fac201 = fk21 * fac01(k) + fac011 = fk01 * fac11(k) + fac111 = fk11 * fac11(k) + fac211 = fk21 * fac11(k) + + do ig = 1, ng12 + tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + + taug(ns12+ig,k) = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & + & + speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & + & + tauself + taufor + + fracs(ns12+ig,k) = fracrefa(ig,jpl) + fpl & + & *(fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + do ig = 1, ng12 + taug(ns12+ig,k) = f_zero + fracs(ns12+ig,k) = f_zero + enddo + enddo + +! .................................. + end subroutine taugb12 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 13: 2080-2250 cm-1 (low key-h2o,n2o; high minor-o3 minor) +! ---------------------------------- + subroutine taugb13 +! .................................. + +! ------------------------------------------------------------------ ! +! band 13: 2080-2250 cm-1 (low key-h2o,n2o; high minor-o3 minor) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb13 + +! --- locals: + integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, & + & id000, id010, id100, id110, id200, id210, jmco2, jpl, & + & id001, id011, id101, id111, id201, id211, jmco2p, jplp, & + & jmco, jmcop, ig, js, js1 + + real (kind=kind_phys) :: tauself, taufor, co2m1, co2m2, absco2, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_mco2, specparm_mco2, specmult_mco2, fmco2, & + & speccomb_mco, specparm_mco, specmult_mco, fmco, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & refrat_planck_a, refrat_m_a, refrat_m_a3, ratco2, & + & adjfac, adjcolco2, com1, com2, absco, abso3, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21, temp +! +!===> ... begin here +! +! --- ... minor gas mapping levels : +! lower - co2, p = 1053.63 mb, t = 294.2 k +! lower - co, p = 706 mb, t = 278.94 k +! upper - o3, p = 95.5835 mb, t = 215.7 k + +! --- ... calculate reference ratio to be used in calculation of Planck +! fraction in lower/upper atmosphere. + + refrat_planck_a = chi_mls(1,5)/chi_mls(4,5) ! P = 473.420 mb (Level 5) + refrat_m_a = chi_mls(1,1)/chi_mls(4,1) ! P = 1053. (Level 1) + refrat_m_a3 = chi_mls(1,3)/chi_mls(4,3) ! P = 706. (Level 3) + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,1) + rfrate(k,3,1)*colamt(k,4) + specparm = colamt(k,1) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(13) + js + + speccomb1 = colamt(k,1) + rfrate(k,3,2)*colamt(k,4) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(13) + js1 + + speccomb_mco2 = colamt(k,1) + refrat_m_a*colamt(k,4) + specparm_mco2 = colamt(k,1) / speccomb_mco2 + specmult_mco2 = 8.0 * min(specparm_mco2, oneminus) + jmco2 = 1 + int(specmult_mco2) + fmco2 = mod(specmult_mco2, f_one) + +! --- ... in atmospheres where the amount of co2 is too great to be considered +! a minor species, adjust the column amount of co2 by an empirical factor +! to obtain the proper contribution. + + speccomb_mco = colamt(k,1) + refrat_m_a3*colamt(k,4) + specparm_mco = colamt(k,1) / speccomb_mco + specmult_mco = 8.0 * min(specparm_mco, oneminus) + jmco = 1 + int(specmult_mco) + fmco = mod(specmult_mco, f_one) + + speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,4) + specparm_planck = colamt(k,1) / speccomb_planck + specmult_planck = 8.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + jplp = jpl + 1 + jmco2p= jmco2+ 1 + jmcop = jmco + 1 + +! --- ... in atmospheres where the amount of co2 is too great to be considered +! a minor species, adjust the column amount of co2 by an empirical factor +! to obtain the proper contribution. + + temp = coldry(k) * 3.55e-4 + ratco2 = colamt(k,2) / temp + if (ratco2 > 3.0) then + adjfac = 2.0 + (ratco2-2.0)**0.68 + adjcolco2 = adjfac * temp + else + adjcolco2 = colamt(k,2) + endif + + if (specparm < 0.125) then + p0 = fs - f_one + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + elseif (specparm > 0.875) then + p0 = -fs + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk00 = f_one - fs + fk10 = fs + fk20 = f_zero + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk00 * fac00(k) + fac100 = fk10 * fac00(k) + fac200 = fk20 * fac00(k) + fac010 = fk00 * fac10(k) + fac110 = fk10 * fac10(k) + fac210 = fk20 * fac10(k) + + if (specparm1 < 0.125) then + p1 = fs1 - f_one + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p1 = -fs1 + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk01 = f_one - fs1 + fk11 = fs1 + fk21 = f_zero + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk01 * fac01(k) + fac101 = fk11 * fac01(k) + fac201 = fk21 * fac01(k) + fac011 = fk01 * fac11(k) + fac111 = fk11 * fac11(k) + fac211 = fk21 * fac11(k) + + do ig = 1, ng13 + tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + co2m1 = ka_mco2(ig,jmco2,indm) + fmco2 & + & * (ka_mco2(ig,jmco2p,indm) - ka_mco2(ig,jmco2,indm)) + co2m2 = ka_mco2(ig,jmco2,indmp) + fmco2 & + & * (ka_mco2(ig,jmco2p,indmp) - ka_mco2(ig,jmco2,indmp)) + absco2 = co2m1 + minorfrac(k) * (co2m2 - co2m1) + com1 = ka_mco(ig,jmco,indm) + fmco & + & * (ka_mco(ig,jmcop,indm) - ka_mco(ig,jmco,indm)) + com2 = ka_mco(ig,jmco,indmp) + fmco & + & * (ka_mco(ig,jmcop,indmp) - ka_mco(ig,jmco,indmp)) + absco = com1 + minorfrac(k) * (com2 - com1) + + taug(ns13+ig,k) = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & + & + speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & + & + tauself + taufor + adjcolco2*absco2 & + & + colamt(k,7)*absco + + fracs(ns13+ig,k) = fracrefa(ig,jpl) + fpl & + & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + indm = indminor(k) + indmp = indm + 1 + + do ig = 1, ng13 + abso3 = kb_mo3(ig,indm) + minorfrac(k) & + & * (kb_mo3(ig,indmp) - kb_mo3(ig,indm)) + + taug(ns13+ig,k) = colamt(k,3)*abso3 + + fracs(ns13+ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb13 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 14: 2250-2380 cm-1 (low - co2; high - co2) +! ---------------------------------- + subroutine taugb14 +! .................................. + +! ------------------------------------------------------------------ ! +! band 14: 2250-2380 cm-1 (low - co2; high - co2) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb14 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & ig + + real (kind=kind_phys) :: tauself, taufor +! +!===> ... begin here +! +! --- ... lower atmosphere loop + + do k = 1, laytrop + ind0 = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(14) + 1 + ind1 = ( jp(k) *5 + (jt1(k)-1)) * nspa(14) + 1 + + inds = indself(k) + indf = indfor(k) + ind0p = ind0 + 1 + ind1p = ind1 + 1 + indsp = inds + 1 + indfp = indf + 1 + + do ig = 1, ng14 + tauself = selffac(k) * (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + + taug(ns14+ig,k) = colamt(k,2) & + & * (fac00(k)*absa(ig,ind0) + fac10(k)*absa(ig,ind0p) & + & + fac01(k)*absa(ig,ind1) + fac11(k)*absa(ig,ind1p)) & + & + tauself + taufor + + fracs(ns14+ig,k) = fracrefa(ig) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(14) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(14) + 1 + + ind0p = ind0 + 1 + ind1p = ind1 + 1 + + do ig = 1, ng14 + taug(ns14+ig,k) = colamt(k,2) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) + + fracs(ns14+ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb14 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 15: 2380-2600 cm-1 (low - n2o,co2; low minor - n2) +!! (high - nothing) +! ---------------------------------- + subroutine taugb15 +! .................................. + +! ------------------------------------------------------------------ ! +! band 15: 2380-2600 cm-1 (low - n2o,co2; low minor - n2) ! +! (high - nothing) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb15 + +! --- locals: + integer :: k, ind0, ind1, inds, indsp, indf, indfp, indm, indmp, & + & id000, id010, id100, id110, id200, id210, jpl, jplp, & + & id001, id011, id101, id111, id201, id211, jmn2, jmn2p, & + & ig, js, js1 + + real (kind=kind_phys) :: scalen2, tauself, taufor, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_mn2, specparm_mn2, specmult_mn2, fmn2, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & refrat_planck_a, refrat_m_a, n2m1, n2m2, taun2, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21 +! +!===> ... begin here +! +! --- ... minor gas mapping level : +! lower - nitrogen continuum, P = 1053., T = 294. + +! --- ... calculate reference ratio to be used in calculation of Planck +! fraction in lower atmosphere. + + refrat_planck_a = chi_mls(4,1)/chi_mls(2,1) ! P = 1053. mb (Level 1) + refrat_m_a = chi_mls(4,1)/chi_mls(2,1) ! P = 1053. mb + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,4) + rfrate(k,5,1)*colamt(k,2) + specparm = colamt(k,4) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(15) + js + + speccomb1 = colamt(k,4) + rfrate(k,5,2)*colamt(k,2) + specparm1 = colamt(k,4) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(15) + js1 + + speccomb_mn2 = colamt(k,4) + refrat_m_a*colamt(k,2) + specparm_mn2 = colamt(k,4) / speccomb_mn2 + specmult_mn2 = 8.0 * min(specparm_mn2, oneminus) + jmn2 = 1 + int(specmult_mn2) + fmn2 = mod(specmult_mn2, f_one) + + speccomb_planck = colamt(k,4) + refrat_planck_a*colamt(k,2) + specparm_planck = colamt(k,4) / speccomb_planck + specmult_planck = 8.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + scalen2 = colbrd(k) * scaleminor(k) + + inds = indself(k) + indf = indfor(k) + indm = indminor(k) + indsp = inds + 1 + indfp = indf + 1 + indmp = indm + 1 + jplp = jpl + 1 + jmn2p = jmn2 + 1 + + if (specparm < 0.125) then + p0 = fs - f_one + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + elseif (specparm > 0.875) then + p0 = -fs + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk00 = f_one - fs + fk10 = fs + fk20 = f_zero + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk00 * fac00(k) + fac100 = fk10 * fac00(k) + fac200 = fk20 * fac00(k) + fac010 = fk00 * fac10(k) + fac110 = fk10 * fac10(k) + fac210 = fk20 * fac10(k) + + if (specparm1 < 0.125) then + p1 = fs1 - f_one + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p1 = -fs1 + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk01 = f_one - fs1 + fk11 = fs1 + fk21 = f_zero + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk01 * fac01(k) + fac101 = fk11 * fac01(k) + fac201 = fk21 * fac01(k) + fac011 = fk01 * fac11(k) + fac111 = fk11 * fac11(k) + fac211 = fk21 * fac11(k) + + do ig = 1, ng15 + tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + n2m1 = ka_mn2(ig,jmn2,indm) + fmn2 & + & * (ka_mn2(ig,jmn2p,indm) - ka_mn2(ig,jmn2,indm)) + n2m2 = ka_mn2(ig,jmn2,indmp) + fmn2 & + & * (ka_mn2(ig,jmn2p,indmp) - ka_mn2(ig,jmn2,indmp)) + taun2 = scalen2 * (n2m1 + minorfrac(k) * (n2m2 - n2m1)) + + taug(ns15+ig,k) = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & + & + speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & + & + tauself + taufor + taun2 + + fracs(ns15+ig,k) = fracrefa(ig,jpl) + fpl & + & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + do ig = 1, ng15 + taug(ns15+ig,k) = f_zero + + fracs(ns15+ig,k) = f_zero + enddo + enddo + +! .................................. + end subroutine taugb15 +! ---------------------------------- + +!>\ingroup module_radlw_main +!> Band 16: 2600-3250 cm-1 (low key- h2o,ch4; high key - ch4) +! ---------------------------------- + subroutine taugb16 +! .................................. + +! ------------------------------------------------------------------ ! +! band 16: 2600-3250 cm-1 (low key- h2o,ch4; high key - ch4) ! +! ------------------------------------------------------------------ ! + + use module_radlw_kgb16 + +! --- locals: + integer :: k, ind0, ind0p, ind1, ind1p, inds, indsp, indf, indfp, & + & id000, id010, id100, id110, id200, id210, jpl, jplp, & + & id001, id011, id101, id111, id201, id211, ig, js, js1 + + real (kind=kind_phys) :: tauself, taufor, refrat_planck_a, & + & speccomb, specparm, specmult, fs, & + & speccomb1, specparm1, specmult1, fs1, & + & speccomb_planck,specparm_planck,specmult_planck,fpl, & + & fac000, fac100, fac200, fac010, fac110, fac210, & + & fac001, fac101, fac201, fac011, fac111, fac211, & + & p0, p40, fk00, fk10, fk20, p1, p41, fk01, fk11, fk21 +! +!===> ... begin here +! +! --- ... calculate reference ratio to be used in calculation of Planck +! fraction in lower atmosphere. + + refrat_planck_a = chi_mls(1,6)/chi_mls(6,6) ! P = 387. mb (Level 6) + +! --- ... lower atmosphere loop + + do k = 1, laytrop + speccomb = colamt(k,1) + rfrate(k,4,1)*colamt(k,5) + specparm = colamt(k,1) / speccomb + specmult = 8.0 * min(specparm, oneminus) + js = 1 + int(specmult) + fs = mod(specmult, f_one) + ind0 = ((jp(k)-1)*5 + (jt(k)-1)) * nspa(16) + js + + speccomb1 = colamt(k,1) + rfrate(k,4,2)*colamt(k,5) + specparm1 = colamt(k,1) / speccomb1 + specmult1 = 8.0 * min(specparm1, oneminus) + js1 = 1 + int(specmult1) + fs1 = mod(specmult1, f_one) + ind1 = (jp(k)*5 + (jt1(k)-1)) * nspa(16) + js1 + + speccomb_planck = colamt(k,1) + refrat_planck_a*colamt(k,5) + specparm_planck = colamt(k,1) / speccomb_planck + specmult_planck = 8.0 * min(specparm_planck, oneminus) + jpl = 1 + int(specmult_planck) + fpl = mod(specmult_planck, f_one) + + inds = indself(k) + indf = indfor(k) + indsp = inds + 1 + indfp = indf + 1 + jplp = jpl + 1 + + if (specparm < 0.125) then + p0 = fs - f_one + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + 2 + id210 = ind0 +11 + elseif (specparm > 0.875) then + p0 = -fs + p40 = p0**4 + fk00 = p40 + fk10 = f_one - p0 - 2.0*p40 + fk20 = p0 + p40 + + id000 = ind0 + 1 + id010 = ind0 +10 + id100 = ind0 + id110 = ind0 + 9 + id200 = ind0 - 1 + id210 = ind0 + 8 + else + fk00 = f_one - fs + fk10 = fs + fk20 = f_zero + + id000 = ind0 + id010 = ind0 + 9 + id100 = ind0 + 1 + id110 = ind0 +10 + id200 = ind0 + id210 = ind0 + endif + + fac000 = fk00 * fac00(k) + fac100 = fk10 * fac00(k) + fac200 = fk20 * fac00(k) + fac010 = fk00 * fac10(k) + fac110 = fk10 * fac10(k) + fac210 = fk20 * fac10(k) + + if (specparm1 < 0.125) then + p1 = fs1 - f_one + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + 2 + id211 = ind1 +11 + elseif (specparm1 > 0.875) then + p1 = -fs1 + p41 = p1**4 + fk01 = p41 + fk11 = f_one - p1 - 2.0*p41 + fk21 = p1 + p41 + + id001 = ind1 + 1 + id011 = ind1 +10 + id101 = ind1 + id111 = ind1 + 9 + id201 = ind1 - 1 + id211 = ind1 + 8 + else + fk01 = f_one - fs1 + fk11 = fs1 + fk21 = f_zero + + id001 = ind1 + id011 = ind1 + 9 + id101 = ind1 + 1 + id111 = ind1 +10 + id201 = ind1 + id211 = ind1 + endif + + fac001 = fk01 * fac01(k) + fac101 = fk11 * fac01(k) + fac201 = fk21 * fac01(k) + fac011 = fk01 * fac11(k) + fac111 = fk11 * fac11(k) + fac211 = fk21 * fac11(k) + + do ig = 1, ng16 + tauself = selffac(k)* (selfref(ig,inds) + selffrac(k) & + & * (selfref(ig,indsp) - selfref(ig,inds))) + taufor = forfac(k) * (forref(ig,indf) + forfrac(k) & + & * (forref(ig,indfp) - forref(ig,indf))) + + taug(ns16+ig,k) = speccomb & + & * (fac000*absa(ig,id000) + fac010*absa(ig,id010) & + & + fac100*absa(ig,id100) + fac110*absa(ig,id110) & + & + fac200*absa(ig,id200) + fac210*absa(ig,id210)) & + & + speccomb1 & + & * (fac001*absa(ig,id001) + fac011*absa(ig,id011) & + & + fac101*absa(ig,id101) + fac111*absa(ig,id111) & + & + fac201*absa(ig,id201) + fac211*absa(ig,id211)) & + & + tauself + taufor + + fracs(ns16+ig,k) = fracrefa(ig,jpl) + fpl & + & * (fracrefa(ig,jplp) - fracrefa(ig,jpl)) + enddo + enddo + +! --- ... upper atmosphere loop + + do k = laytrop+1, nlay + ind0 = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(16) + 1 + ind1 = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(16) + 1 + + ind0p = ind0 + 1 + ind1p = ind1 + 1 + + do ig = 1, ng16 + taug(ns16+ig,k) = colamt(k,5) & + & * (fac00(k)*absb(ig,ind0) + fac10(k)*absb(ig,ind0p) & + & + fac01(k)*absb(ig,ind1) + fac11(k)*absb(ig,ind1p)) + + fracs(ns16+ig,k) = fracrefb(ig) + enddo + enddo + +! .................................. + end subroutine taugb16 +! ---------------------------------- + +! .................................. + end subroutine taumol +!! @} +!----------------------------------- + +!mz* exponential cloud overlapping subroutines +!------------------------------------------------------------------ +! Public subroutines +!------------------------------------------------------------------ +! mz* - Add height needed for exponential and exponential-random cloud overlap methods (icld=4 and 5, respectively) + subroutine mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, & + & irng, play, hgt, & + & cldfrac, ciwp, clwp, cswp, rei, rel, res, tauc, & + & cldfmcl, & + & ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, & + & resnmcl, taucmcl) + + use machine, only : im => kind_io4, rb => kind_phys +! ----- Input ----- +! Control + integer(kind=im), intent(in) :: iplon ! column/longitude index + integer(kind=im), intent(in) :: ncol ! number of columns + integer(kind=im), intent(in) :: nlay ! number of model layers + integer(kind=im), intent(in) :: icld ! clear/cloud, cloud overlap flag + integer(kind=im), intent(in) :: permuteseed ! if the cloud generator is called multiple times, + ! permute the seed between each call. + ! between calls for LW and SW, recommended + ! permuteseed differes by 'ngpt' + integer(kind=im), intent(inout) :: irng ! flag for random number generator + ! 0 = kissvec + ! 1 = Mersenne + ! Twister + +! Atmosphere + real(kind=rb), intent(in) :: play(:,:) ! layer pressures (mb) + ! Dimensions: (ncol,nlay) + +! mji - Add height + real(kind=rb), intent(in) :: hgt(:,:) ! layer height (m) + ! Dimensions: (ncol,nlay) + +! Atmosphere/clouds - cldprop + real(kind=rb), intent(in) :: cldfrac(:,:) ! layer cloud fraction + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: tauc(:,:,:) ! in-cloud optical depth + ! Dimensions: (nbndlw,ncol,nlay) +! real(kind=rb), intent(in) :: ssac(:,:,:) ! in-cloud single scattering albedo + ! Dimensions: (nbndlw,ncol,nlay) +! real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter + ! Dimensions: (nbndlw,ncol,nlay) + real(kind=rb), intent(in) :: ciwp(:,:) ! in-cloud ice water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: clwp(:,:) ! in-cloud liquid water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cswp(:,:) ! in-cloud snow path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: rei(:,:) ! cloud ice particle size + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: rel(:,:) ! cloud liquid particle size + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: res(:,:) ! snow particle size + ! Dimensions: (ncol,nlay) + +! ----- Output ----- +! Atmosphere/clouds - cldprmc [mcica] + real(kind=rb), intent(out) :: cldfmcl(:,:,:) ! cloud fraction [mcica] + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: ciwpmcl(:,:,:) ! in-cloud ice water path [mcica] + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: clwpmcl(:,:,:) ! in-cloud liquid water path [mcica] + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: cswpmcl(:,:,:) ! in-cloud snow path [mcica] + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: relqmcl(:,:) ! liquid particle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(out) :: reicmcl(:,:) ! ice partcle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(out) :: resnmcl(:,:) ! snow partcle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(out) :: taucmcl(:,:,:) ! in-cloud optical depth [mcica] +!mz* + ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(out) :: ssacmcl(:,:,:) ! in-cloud single scattering albedo [mcica] + ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(out) :: asmcmcl(:,:,:) ! in-cloud asymmetry parameter [mcica] + ! Dimensions: (ngptlw,ncol,nlay) +! ----- Local ----- + +! Stochastic cloud generator variables [mcica] + integer(kind=im), parameter :: nsubclw = ngptlw ! number of sub-columns (g-point intervals) + integer(kind=im) :: ilev ! loop index + + real(kind=rb) :: pmid(ncol, nlay) ! layer pressures (Pa) +! real(kind=rb) :: pdel(ncol, nlay) ! layer pressure thickness (Pa) +! real(kind=rb) :: qi(ncol, nlay) ! ice water (specific humidity) +! real(kind=rb) :: ql(ncol, nlay) ! liq water (specific humidity) + +! Return if clear sky + if (icld.eq.0) return + +! NOTE: For GCM mode, permuteseed must be offset between LW and SW by at least the number of subcolumns + + +! Pass particle sizes to new arrays, no subcolumns for these properties yet +! Convert pressures from mb to Pa + + reicmcl(:ncol,:nlay) = rei(:ncol,:nlay) + relqmcl(:ncol,:nlay) = rel(:ncol,:nlay) + resnmcl(:ncol,:nlay) = res(:ncol,:nlay) + pmid(:ncol,:nlay) = play(:ncol,:nlay)*1.e2_rb + +! Generate the stochastic subcolumns of cloud optical properties for +! the longwave + call generate_stochastic_clouds (ncol, nlay, nsubclw, icld, irng, & + & pmid, hgt, cldfrac, clwp, ciwp, cswp, tauc, & + & cldfmcl, clwpmcl, ciwpmcl, cswpmcl, & + & taucmcl, permuteseed) + + end subroutine mcica_subcol_lw +!------------------------------------------------------------------------------------------------- + subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, & + & irng, pmid, hgt, cld, clwp, ciwp, cswp, tauc, & + & cld_stoch, clwp_stoch, ciwp_stoch, & + & cswp_stoch, tauc_stoch, changeSeed) +!------------------------------------------------------------------------------------------------- +!------------------------------------------------------------------------------------------------- +! Contact: Cecile Hannay (hannay@ucar.edu) +! +! Original code: Based on Raisanen et al., QJRMS, 2004. +! +! Modifications: +! 1) Generalized for use with RRTMG and added Mersenne Twister as the default +! random number generator, which can be changed to the optional kissvec random number generator +! with flag 'irng'. Some extra functionality has been commented or removed. +! Michael J. Iacono, AER, Inc., February 2007 +! 2) Activated exponential and exponential/random cloud overlap method +! Michael J. Iacono, AER, November 2017 +! +! Given a profile of cloud fraction, cloud water and cloud ice, we produce a set of subcolumns. +! Each layer within each subcolumn is homogeneous, with cloud fraction equal to zero or one +! and uniform cloud liquid and cloud ice concentration. +! The ensemble as a whole reproduces the probability function of cloud liquid and ice within each layer +! and obeys an overlap assumption in the vertical. +! +! Overlap assumption: +! The cloud are consistent with 5 overlap assumptions: random, maximum, maximum-random, exponential and exponential random. +! The default option is maximum-random (option 2) +! The options are: 1=random overlap, 2=max/random, 3=maximum overlap, 4=exponential overlap, 5=exp/random +! This is set with the variable "overlap" +! The exponential overlap uses also a length scale, Zo. (real, parameter :: Zo = 2500. ) +! +! Seed: +! If the stochastic cloud generator is called several times during the same timestep, +! one should change the seed between the call to insure that the +! subcolumns are different. +! This is done by changing the argument 'changeSeed' +! For example, if one wants to create a set of columns for the +! shortwave and another set for the longwave , +! use 'changeSeed = 1' for the first call and'changeSeed = 2' for the second call + +! PDF assumption: +! We can use arbitrary complicated PDFS. +! In the present version, we produce homogeneuous clouds (the simplest case). +! Future developments include using the PDF scheme of Ben Johnson. +! +! History file: +! Option to add diagnostics variables in the history file. (using FINCL in the namelist) +! nsubcol = number of subcolumns +! overlap = overlap type (1-3) +! Zo = length scale +! CLOUD_S = mean of the subcolumn cloud fraction ('_S" means Stochastic) +! CLDLIQ_S = mean of the subcolumn cloud water +! CLDICE_S = mean of the subcolumn cloud ice +! +! Note: +! Here: we force that the cloud condensate to be consistent with the cloud fraction +! i.e we only have cloud condensate when the cell is cloudy. +! In CAM: The cloud condensate and the cloud fraction are obtained from 2 different equations +! and the 2 quantities can be inconsistent (i.e. CAM can produce cloud fraction +! without cloud condensate or the opposite). +!----------------------------------------------------------------- + + use mcica_random_numbers +! The Mersenne Twister random number engine + use MersenneTwister, only: randomNumberSequence, & + & new_RandomNumberSequence, getRandomReal + use machine ,only : im => kind_io4, rb => kind_phys + + type(randomNumberSequence) :: randomNumbers + +! -- Arguments + + integer(kind=im), intent(in) :: ncol ! number of columns + integer(kind=im), intent(in) :: nlay ! number of layers + integer(kind=im), intent(in) :: icld ! clear/cloud, cloud overlap flag + integer(kind=im), intent(inout) :: irng ! flag for random number generator + ! 0 = kissvec + ! 1 = Mersenne Twister + integer(kind=im), intent(in) :: nsubcol ! number of sub-columns (g-point intervals) + integer(kind=im), optional, intent(in) :: changeSeed ! allows permuting seed + +! Column state (cloud fraction, cloud water, cloud ice) + variables needed to read physics state + real(kind=rb), intent(in) :: pmid(:,:) ! layer pressure (Pa) + ! Dimensions: (ncol,nlay) + + real(kind=rb), intent(in) :: hgt(:,:) ! layer height (m) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cld(:,:) ! cloud fraction + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: clwp(:,:) ! in-cloud liquid water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: ciwp(:,:) ! in-cloud ice water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cswp(:,:) ! in-cloud snow path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: tauc(:,:,:) ! in-cloud optical depth + ! Dimensions:(nbndlw,ncol,nlay) +! real(kind=rb), intent(in) :: ssac(:,:,:) ! in-cloud single scattering albedo + ! Dimensions: (nbndlw,ncol,nlay) + ! inactive - for future expansion +! real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter + ! Dimensions: (nbndlw,ncol,nlay) + ! inactive - for future expansion + + real(kind=rb), intent(out) :: cld_stoch(:,:,:) ! subcolumn cloud fraction + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: clwp_stoch(:,:,:) ! subcolumn in-cloud liquid water path + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: ciwp_stoch(:,:,:) ! subcolumn in-cloud ice water path + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: cswp_stoch(:,:,:) ! subcolumn in-cloud snow path + ! Dimensions: (ngptlw,ncol,nlay) + real(kind=rb), intent(out) :: tauc_stoch(:,:,:) ! subcolumn in-cloud optical depth + ! Dimensions: (ngptlw,ncol,nlay) +! real(kind=rb), intent(out) :: ssac_stoch(:,:,:)! subcolumn in-cloud single scattering albedo + ! Dimensions: (ngptlw,ncol,nlay) + ! inactive - for future expansion +! real(kind=rb), intent(out) :: asmc_stoch(:,:,:)! subcolumn in-cloud asymmetry parameter + ! Dimensions: (ngptlw,ncol,nlay) + ! inactive - for future expansion + +! -- Local variables + real(kind=rb) :: cldf(ncol,nlay) ! cloud fraction + +! Mean over the subcolumns (cloud fraction, cloud water , cloud ice) - inactive +! real(kind=rb) :: mean_cld_stoch(ncol, nlay) ! cloud fraction +! real(kind=rb) :: mean_clwp_stoch(ncol, nlay) ! cloud water +! real(kind=rb) :: mean_ciwp_stoch(ncol, nlay) ! cloud ice +! real(kind=rb) :: mean_tauc_stoch(ncol, nlay) ! cloud optical depth +! real(kind=rb) :: mean_ssac_stoch(ncol, nlay) ! cloud single scattering albedo +! real(kind=rb) :: mean_asmc_stoch(ncol, nlay) ! cloud asymmetry parameter + +! Set overlap + integer(kind=im) :: overlap ! 1 = random overlap, 2 = maximum-random, + ! 3 = maximum overlap, 4 = exponential, + ! 5 = exponential-random + real(kind=rb), parameter :: Zo = 2500._rb ! length scale (m) + real(kind=rb), dimension(ncol,nlay) :: alpha ! overlap parameter + +! Constants (min value for cloud fraction and cloud water and ice) + real(kind=rb), parameter :: cldmin = 1.0e-20_rb ! min cloud fraction +! real(kind=rb), parameter :: qmin = 1.0e-10_rb ! min cloud water and cloud ice (not used) + +! Variables related to random number and seed + real(kind=rb), dimension(nsubcol, ncol, nlay) :: CDF, CDF2 !random numbers + integer(kind=im), dimension(ncol) :: seed1, seed2, seed3, seed4 !seed to create random number (kissvec) + real(kind=rb), dimension(ncol) :: rand_num ! random number (kissvec) + integer(kind=im) :: iseed ! seed to create random number (Mersenne Teister) + real(kind=rb) :: rand_num_mt ! random number (Mersenne Twister) + +! Flag to identify cloud fraction in subcolumns + logical, dimension(nsubcol, ncol, nlay) :: iscloudy ! flag that says whether a gridbox is cloudy + +! Indices + integer(kind=im) :: ilev, isubcol, i, n ! indices + +!------------------------------------------------------------------- + +! Check that irng is in bounds; if not, set to default + if (irng .ne. 0) irng = 1 + +! Pass input cloud overlap setting to local variable + overlap = icld + +! Ensure that cloud fractions are in bounds + do ilev = 1, nlay + do i = 1, ncol + cldf(i,ilev) = cld(i,ilev) + if (cldf(i,ilev) < cldmin) then + cldf(i,ilev) = 0._rb + endif + enddo + enddo + +! ----- Create seed -------- + +! Advance randum number generator by changeseed values + if (irng.eq.0) then +! For kissvec, create a seed that depends on the state of the columns. Maybe not the best way, but it works. +! Must use pmid from bottom four layers. + do i=1,ncol + if (pmid(i,1).lt.pmid(i,2)) then + stop 'MCICA_SUBCOL: KISSVEC SEED GENERATOR REQUIRES PMID & + & FROM BOTTOM FOUR LAYERS.' + endif + seed1(i) = (pmid(i,1) - int(pmid(i,1))) * 1000000000_im + seed2(i) = (pmid(i,2) - int(pmid(i,2))) * 1000000000_im + seed3(i) = (pmid(i,3) - int(pmid(i,3))) * 1000000000_im + seed4(i) = (pmid(i,4) - int(pmid(i,4))) * 1000000000_im + enddo + do i=1,changeSeed + call kissvec(seed1, seed2, seed3, seed4, rand_num) + enddo + elseif (irng.eq.1) then + randomNumbers = new_RandomNumberSequence(seed = changeSeed) + endif + +! ------ Apply overlap assumption -------- + +! generate the random numbers + + select case (overlap) + + case(1) +! Random overlap +! i) pick a random value at every level + + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) ! we get different random number for each level + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + case(2) +! Maximum-Random overlap +! i) pick a random number for top layer. +! ii) walk down the column: +! - if the layer above is cloudy, we use the same random number than in the layer above +! - if the layer above is clear, we use a new random number + + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + do ilev = 2,nlay + do i = 1, ncol + do isubcol = 1, nsubcol + if (CDF(isubcol, i, ilev-1) > 1._rb - cldf(i,ilev-1) )& + & then + CDF(isubcol,i,ilev) = CDF(isubcol,i,ilev-1) + else + CDF(isubcol,i,ilev) = CDF(isubcol,i,ilev) * (1._rb & + & - cldf(i,ilev-1)) + endif + enddo + enddo + enddo + + case(3) +! Maximum overlap +! i) pick the same random numebr at every level + + if (irng.eq.0) then + do isubcol = 1,nsubcol + call kissvec(seed1, seed2, seed3, seed4, rand_num) + do ilev = 1,nlay + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + rand_num_mt = getRandomReal(randomNumbers) + do ilev = 1, nlay + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + +! mji - Activate exponential cloud overlap option + case(4) + ! Exponential overlap: weighting between maximum and random overlap increases with the distance. + ! The random numbers for exponential overlap verify: + ! j=1 RAN(j)=RND1 + ! j>1 if RND1 < alpha(j,j-1) => RAN(j) = RAN(j-1) + ! RAN(j) = RND2 + ! alpha is obtained from the equation + ! alpha = exp(-(Z(j)-Z(j-1))/Zo) where Zo is a characteristic length scale + + ! compute alpha + do i = 1, ncol + alpha(i, 1) = 0._rb + do ilev = 2,nlay + alpha(i, ilev) = exp( -( hgt (i, ilev) - & + & hgt (i, ilev-1)) / Zo) + enddo + enddo + + ! generate 2 streams of random numbers + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol, :, ilev) = rand_num + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF2(isubcol, :, ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + rand_num_mt = getRandomReal(randomNumbers) + CDF2(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + ! generate random numbers + do ilev = 2,nlay + where (CDF2(:, :, ilev) < spread(alpha (:,ilev), & + & dim=1,nCopies=nsubcol) ) + CDF(:,:,ilev) = CDF(:,:,ilev-1) + end where + end do + +! Activate exponential-random cloud overlap option + case(5) + ! Exponential-random overlap: +!mz* call wrf_error_fatal("Cloud Overlap case 5: ER has not yet & +! been implemented. Stopping...") + + end select + +! -- generate subcolumns for homogeneous clouds ----- + do ilev = 1,nlay + iscloudy(:,:,ilev) = (CDF(:,:,ilev) >= 1._rb - & + & spread(cldf(:,ilev), dim=1, nCopies=nsubcol) ) + enddo + +! where the subcolumn is cloudy, the subcolumn cloud fraction is 1; +! where the subcolumn is not cloudy, the subcolumn cloud fraction is 0; +! where there is a cloud, define the subcolumn cloud properties, +! otherwise set these to zero + + do ilev = 1,nlay + do i = 1, ncol + do isubcol = 1, nsubcol + if (iscloudy(isubcol,i,ilev) ) then + cld_stoch(isubcol,i,ilev) = 1._rb + clwp_stoch(isubcol,i,ilev) = clwp(i,ilev) + ciwp_stoch(isubcol,i,ilev) = ciwp(i,ilev) +!mz +! cswp_stoch(isubcol,i,ilev) = cswp(i,ilev) + cswp_stoch(isubcol,i,ilev) = 0._rb + n = ngb(isubcol) + tauc_stoch(isubcol,i,ilev) = tauc(n,i,ilev) +! ssac_stoch(isubcol,i,ilev) = ssac(n,i,ilev) +! asmc_stoch(isubcol,i,ilev) = asmc(n,i,ilev) + else + cld_stoch(isubcol,i,ilev) = 0._rb + clwp_stoch(isubcol,i,ilev) = 0._rb + ciwp_stoch(isubcol,i,ilev) = 0._rb + cswp_stoch(isubcol,i,ilev) = 0._rb + tauc_stoch(isubcol,i,ilev) = 0._rb +! ssac_stoch(isubcol,i,ilev) = 1._rb +! asmc_stoch(isubcol,i,ilev) = 1._rb + endif + enddo + enddo + enddo + +! -- compute the means of the subcolumns --- +! mean_cld_stoch(:,:) = 0._rb +! mean_clwp_stoch(:,:) = 0._rb +! mean_ciwp_stoch(:,:) = 0._rb +! mean_tauc_stoch(:,:) = 0._rb +! mean_ssac_stoch(:,:) = 0._rb +! mean_asmc_stoch(:,:) = 0._rb +! do i = 1, nsubcol +! mean_cld_stoch(:,:) = cld_stoch(i,:,:) + mean_cld_stoch(:,:) +! mean_clwp_stoch(:,:) = clwp_stoch( i,:,:) + mean_clwp_stoch(:,:) +! mean_ciwp_stoch(:,:) = ciwp_stoch( i,:,:) + mean_ciwp_stoch(:,:) +! mean_tauc_stoch(:,:) = tauc_stoch( i,:,:) + mean_tauc_stoch(:,:) +! mean_ssac_stoch(:,:) = ssac_stoch( i,:,:) + mean_ssac_stoch(:,:) +! mean_asmc_stoch(:,:) = asmc_stoch( i,:,:) + mean_asmc_stoch(:,:) +! end do +! mean_cld_stoch(:,:) = mean_cld_stoch(:,:) / nsubcol +! mean_clwp_stoch(:,:) = mean_clwp_stoch(:,:) / nsubcol +! mean_ciwp_stoch(:,:) = mean_ciwp_stoch(:,:) / nsubcol +! mean_tauc_stoch(:,:) = mean_tauc_stoch(:,:) / nsubcol +! mean_ssac_stoch(:,:) = mean_ssac_stoch(:,:) / nsubcol +! mean_asmc_stoch(:,:) = mean_asmc_stoch(:,:) / nsubcol + + end subroutine generate_stochastic_clouds + +!------------------------------------------------------------------ +! Private subroutines +!------------------------------------------------------------------ + +!----------------------------------------------------------------- + subroutine kissvec(seed1,seed2,seed3,seed4,ran_arr) +!---------------------------------------------------------------- + +! public domain code +! made available from http://www.fortran.com/ +! downloaded by pjr on 03/16/04 for NCAR CAM +! converted to vector form, functions inlined by pjr,mvr on 05/10/2004 + +! The KISS (Keep It Simple Stupid) random number generator. Combines: +! (1) The congruential generator x(n)=69069*x(n-1)+1327217885, period 2^32. +! (2) A 3-shift shift-register generator, period 2^32-1, +! (3) Two 16-bit multiply-with-carry generators, period 597273182964842497>2^59 +! Overall period>2^123; + real(kind=rb), dimension(:), intent(inout) :: ran_arr + integer(kind=im), dimension(:), intent(inout) :: seed1,seed2,seed3& + & ,seed4 + integer(kind=im) :: i,sz,kiss + integer(kind=im) :: m, k, n + +! inline function + m(k, n) = ieor (k, ishft (k, n) ) + + sz = size(ran_arr) + do i = 1, sz + seed1(i) = 69069_im * seed1(i) + 1327217885_im + seed2(i) = m (m (m (seed2(i), 13_im), - 17_im), 5_im) + seed3(i) = 18000_im * iand (seed3(i), 65535_im) + & + & ishft (seed3(i), - 16_im) + seed4(i) = 30903_im * iand (seed4(i), 65535_im) + & + & ishft (seed4(i), - 16_im) + kiss = seed1(i) + seed2(i) + ishft (seed3(i), 16_im) + seed4(i) + ran_arr(i) = kiss*2.328306e-10_rb + 0.5_rb + end do + + end subroutine kissvec +! + subroutine rtrnmc_mcica(nlayers, istart, iend, iout, pz, semiss, & + & ncbands, cldfmc, taucmc, planklay, planklev, &!plankbnd, & + & pwvcm, fracs, taut, & + & totuflux, totdflux, htr, & + & totuclfl, totdclfl, htrc ) +!--------------------------------------------------------------- +! +! Original version: E. J. Mlawer, et al. RRTM_V3.0 +! Revision for GCMs: Michael J. Iacono; October, 2002 +! Revision for F90: Michael J. Iacono; June, 2006 +! +! This program calculates the upward fluxes, downward fluxes, and +! heating rates for an arbitrary clear or cloudy atmosphere. The input +! to this program is the atmospheric profile, all Planck function +! information, and the cloud fraction by layer. A variable diffusivity +! angle (SECDIFF) is used for the angle integration. Bands 2-3 and 5-9 +! use a value for SECDIFF that varies from 1.50 to 1.80 as a function of +! the column water vapor, and other bands use a value of 1.66. The Gaussian +! weight appropriate to this angle (WTDIFF=0.5) is applied here. Note that +! use of the emissivity angle for the flux integration can cause errors of +! 1 to 4 W/m2 within cloudy layers. +! Clouds are treated with the McICA stochastic approach and maximum-random +! cloud overlap. +!*************************************************************************** + +! ------- Declarations ------- + +! ----- Input ----- + integer(kind=im), intent(in) :: nlayers ! total number of layers + integer(kind=im), intent(in) :: istart ! beginning band of calculation + integer(kind=im), intent(in) :: iend ! ending band of calculation + integer(kind=im), intent(in) :: iout ! output option flag + +! Atmosphere + real(kind=rb), intent(in) :: pz(0:) ! level (interface) pressures (hPa, mb) + ! Dimensions: (0:nlayers) + real(kind=rb), intent(in) :: pwvcm ! precipitable water vapor (cm) + real(kind=rb), intent(in) :: semiss(:) ! lw surface emissivity + ! Dimensions: (nbndlw) +!mz + real(kind=rb), intent(in) :: planklay(0:,:) ! + ! Dimensions: (nlayers,nbndlw) + real(kind=rb), intent(in) :: planklev(0:,:) ! + ! Dimensions: (0:nlayers,nbndlw) +! real(kind=rb), intent(in) :: plankbnd(:) ! + ! Dimensions: (nbndlw) + real(kind=rb), intent(in) :: fracs(:,:) ! + ! Dimensions: (nlayers,ngptw) + real(kind=rb), intent(in) :: taut(:,:) ! gaseous + aerosol optical depths + ! Dimensions: (nlayers,ngptlw) + +! Clouds + integer(kind=im), intent(in) :: ncbands ! number of cloud spectral bands + real(kind=rb), intent(in) :: cldfmc(:,:) ! layer cloud fraction [mcica] + ! Dimensions: (ngptlw,nlayers) + real(kind=rb), intent(in) :: taucmc(:,:) ! layer cloud optical depth [mcica] + ! Dimensions: (ngptlw,nlayers) + +! ----- Output ----- + real(kind=rb), intent(out) :: totuflux(0:) ! upward longwave flux (w/m2) + ! Dimensions: (0:nlayers) + real(kind=rb), intent(out) :: totdflux(0:) ! downward longwave flux (w/m2) + ! Dimensions: (0:nlayers) +!mz* real(kind=rb), intent(out) :: fnet(0:) ! net longwave flux (w/m2) + ! Dimensions: (0:nlayers) + real(kind=rb), intent(out) :: htr(:) +!mz real(kind=rb), intent(out) :: htr(0:) ! longwave heating rate (k/day) + ! Dimensions: (0:nlayers) + real(kind=rb), intent(out) :: totuclfl(0:) ! clear sky upward longwave flux (w/m2) + ! Dimensions: (0:nlayers) + real(kind=rb), intent(out) :: totdclfl(0:) ! clear sky downward longwave flux (w/m2) + ! Dimensions: (0:nlayers) +!mz*real(kind=rb), intent(out) :: fnetc(0:) ! clear sky net longwave flux (w/m2) + ! Dimensions: (0:nlayers) + real(kind=rb), intent(out) :: htrc(:) +! real(kind=rb), intent(out) :: htrc(0:) ! clear sky longwave heating rate (k/day) + ! Dimensions: (0:nlayers) + +! ----- Local ----- +! Declarations for radiative transfer + real (kind=kind_phys), dimension(0:nlayers) :: fnet, fnetc + real(kind=rb) :: abscld(nlayers,ngptlw) + real(kind=rb) :: atot(nlayers) + real(kind=rb) :: atrans(nlayers) + real(kind=rb) :: bbugas(nlayers) + real(kind=rb) :: bbutot(nlayers) + real(kind=rb) :: clrurad(0:nlayers) + real(kind=rb) :: clrdrad(0:nlayers) + real(kind=rb) :: efclfrac(nlayers,ngptlw) + real(kind=rb) :: uflux(0:nlayers) + real(kind=rb) :: dflux(0:nlayers) + real(kind=rb) :: urad(0:nlayers) + real(kind=rb) :: drad(0:nlayers) + real(kind=rb) :: uclfl(0:nlayers) + real(kind=rb) :: dclfl(0:nlayers) + real(kind=rb) :: odcld(nlayers,ngptlw) + + + real(kind=rb) :: secdiff(nbands) ! secant of diffusivity angle + real(kind=rb) :: transcld, radld, radclrd, plfrac, blay, dplankup,& + & dplankdn + real(kind=rb) :: odepth, odtot, odepth_rec, odtot_rec, gassrc + real(kind=rb) :: tblind, tfactot, bbd, bbdtot, tfacgas, transc, & + & tausfac + real(kind=rb) :: rad0, reflect, radlu, radclru + + integer(kind=im) :: icldlyr(nlayers) ! flag for cloud in layer + integer(kind=im) :: ibnd, ib, iband, lay, lev, l, ig ! loop indices + integer(kind=im) :: igc ! g-point interval counter + integer(kind=im) :: iclddn ! flag for cloud in down path + integer(kind=im) :: ittot, itgas, itr ! lookup table indices +!mz* + real (kind=kind_phys), parameter :: rec_6 = 0.166667 + ! The cumulative sum of new g-points for each band + integer(kind=im) :: ngs(nbands) + ngs(:) = (/10,22,38,52,68,76,88,96,108,114,122,130,134,136,138, & + & 140/) + +! ------- Definitions ------- +! input +! nlayers ! number of model layers +! ngptlw ! total number of g-point subintervals +! nbndlw ! number of longwave spectral bands +! ncbands ! number of spectral bands for clouds +! secdiff ! diffusivity angle +! wtdiff ! weight for radiance to flux conversion +! pavel ! layer pressures (mb) +! pz ! level (interface) pressures (mb) +! tavel ! layer temperatures (k) +! tz ! level (interface) temperatures(mb) +! tbound ! surface temperature (k) +! cldfrac ! layer cloud fraction +! taucloud ! layer cloud optical depth +! itr ! integer look-up table index +! icldlyr ! flag for cloudy layers +! iclddn ! flag for cloud in column at any layer +! semiss ! surface emissivities for each band +! reflect ! surface reflectance +! bpade ! 1/(pade constant) +! tau_tbl ! clear sky optical depth look-up table +! exp_tbl ! exponential look-up table for transmittance +! tfn_tbl ! tau transition function look-up table + +! local +! atrans ! gaseous absorptivity +! abscld ! cloud absorptivity +! atot ! combined gaseous and cloud absorptivity +! odclr ! clear sky (gaseous) optical depth +! odcld ! cloud optical depth +! odtot ! optical depth of gas and cloud +! tfacgas ! gas-only pade factor, used for planck fn +! tfactot ! gas and cloud pade factor, used for planck fn +! bbdgas ! gas-only planck function for downward rt +! bbugas ! gas-only planck function for upward rt +! bbdtot ! gas and cloud planck function for downward rt +! bbutot ! gas and cloud planck function for upward calc. +! gassrc ! source radiance due to gas only +! efclfrac ! effective cloud fraction +! radlu ! spectrally summed upward radiance +! radclru ! spectrally summed clear sky upward radiance +! urad ! upward radiance by layer +! clrurad ! clear sky upward radiance by layer +! radld ! spectrally summed downward radiance +! radclrd ! spectrally summed clear sky downward radiance +! drad ! downward radiance by layer +! clrdrad ! clear sky downward radiance by layer + + +! output +! totuflux ! upward longwave flux (w/m2) +! totdflux ! downward longwave flux (w/m2) +! fnet ! net longwave flux (w/m2) +! htr ! longwave heating rate (k/day) +! totuclfl ! clear sky upward longwave flux (w/m2) +! totdclfl ! clear sky downward longwave flux (w/m2) +! fnetc ! clear sky net longwave flux (w/m2) +! htrc ! clear sky longwave heating rate (k/day) + + +!jm not thread safe hvrrtc = '$Revision: 1.3 $' + + do ibnd = 1,nbands!mz*nbndlw + if (ibnd.eq.1 .or. ibnd.eq.4 .or. ibnd.ge.10) then + secdiff(ibnd) = 1.66_rb + else + secdiff(ibnd) = a0(ibnd) + a1(ibnd)*exp(a2(ibnd)*pwvcm) + if (secdiff(ibnd) .gt. 1.80_rb) secdiff(ibnd) = 1.80_rb + if (secdiff(ibnd) .lt. 1.50_rb) secdiff(ibnd) = 1.50_rb + endif + enddo + + urad(0) = 0.0_rb + drad(0) = 0.0_rb + totuflux(0) = 0.0_rb + totdflux(0) = 0.0_rb + clrurad(0) = 0.0_rb + clrdrad(0) = 0.0_rb + totuclfl(0) = 0.0_rb + totdclfl(0) = 0.0_rb + + do lay = 1, nlayers + urad(lay) = 0.0_rb + drad(lay) = 0.0_rb + totuflux(lay) = 0.0_rb + totdflux(lay) = 0.0_rb + clrurad(lay) = 0.0_rb + clrdrad(lay) = 0.0_rb + totuclfl(lay) = 0.0_rb + totdclfl(lay) = 0.0_rb + icldlyr(lay) = 0 + +! Change to band loop? + do ig = 1, ngptlw + if (cldfmc(ig,lay) .eq. 1._rb) then + ib = ngb(ig) + odcld(lay,ig) = secdiff(ib) * taucmc(ig,lay) + transcld = exp(-odcld(lay,ig)) + abscld(lay,ig) = 1._rb - transcld + efclfrac(lay,ig) = abscld(lay,ig) * cldfmc(ig,lay) + icldlyr(lay) = 1 + else + odcld(lay,ig) = 0.0_rb + abscld(lay,ig) = 0.0_rb + efclfrac(lay,ig) = 0.0_rb + endif + enddo + + enddo + + igc = 1 +! Loop over frequency bands. + do iband = istart, iend + +! Reinitialize g-point counter for each band if output for each band is requested. + if (iout.gt.0.and.iband.ge.2) igc = ngs(iband-1)+1 + +! Loop over g-channels. + 1000 continue + +! Radiative transfer starts here. + radld = 0._rb + radclrd = 0._rb + iclddn = 0 + +! Downward radiative transfer loop. + + do lev = nlayers, 1, -1 + plfrac = fracs(lev,igc) + blay = planklay(lev,iband) + dplankup = planklev(lev,iband) - blay + dplankdn = planklev(lev-1,iband) - blay + odepth = secdiff(iband) * taut(lev,igc) + if (odepth .lt. 0.0_rb) odepth = 0.0_rb +! Cloudy layer + if (icldlyr(lev).eq.1) then + iclddn = 1 + odtot = odepth + odcld(lev,igc) + if (odtot .lt. 0.06_rb) then + atrans(lev) = odepth - 0.5_rb*odepth*odepth + odepth_rec = rec_6*odepth + gassrc = plfrac*(blay+dplankdn*odepth_rec)*atrans(lev) + + atot(lev) = odtot - 0.5_rb*odtot*odtot + odtot_rec = rec_6*odtot + bbdtot = plfrac * (blay+dplankdn*odtot_rec) + bbd = plfrac*(blay+dplankdn*odepth_rec) + radld = radld - radld * (atrans(lev) + & + & efclfrac(lev,igc) * (1. - atrans(lev))) + & + & gassrc + cldfmc(igc,lev) * & + & (bbdtot * atot(lev) - gassrc) + drad(lev-1) = drad(lev-1) + radld + + bbugas(lev) = plfrac * (blay+dplankup*odepth_rec) + bbutot(lev) = plfrac * (blay+dplankup*odtot_rec) + + elseif (odepth .le. 0.06_rb) then + atrans(lev) = odepth - 0.5_rb*odepth*odepth + odepth_rec = rec_6*odepth + gassrc = plfrac*(blay+dplankdn*odepth_rec)*atrans(lev) + + odtot = odepth + odcld(lev,igc) + tblind = odtot/(bpade+odtot) + ittot = tblint*tblind + 0.5_rb + tfactot = tfn_tbl(ittot) + bbdtot = plfrac * (blay + tfactot*dplankdn) + bbd = plfrac*(blay+dplankdn*odepth_rec) + atot(lev) = 1. - exp_tbl(ittot) + + radld = radld - radld * (atrans(lev) + & + & efclfrac(lev,igc) * (1._rb - atrans(lev))) + & + & gassrc + cldfmc(igc,lev) * & + & (bbdtot * atot(lev) - gassrc) + drad(lev-1) = drad(lev-1) + radld + + bbugas(lev) = plfrac * (blay + dplankup*odepth_rec) + bbutot(lev) = plfrac * (blay + tfactot * dplankup) + + else + + tblind = odepth/(bpade+odepth) + itgas = tblint*tblind+0.5_rb + odepth = tau_tbl(itgas) + atrans(lev) = 1._rb - exp_tbl(itgas) + tfacgas = tfn_tbl(itgas) + gassrc = atrans(lev) * plfrac * (blay + tfacgas*dplankdn) + + odtot = odepth + odcld(lev,igc) + tblind = odtot/(bpade+odtot) + ittot = tblint*tblind + 0.5_rb + tfactot = tfn_tbl(ittot) + bbdtot = plfrac * (blay + tfactot*dplankdn) + bbd = plfrac*(blay+tfacgas*dplankdn) + atot(lev) = 1._rb - exp_tbl(ittot) + + radld = radld - radld * (atrans(lev) + & + & efclfrac(lev,igc) * (1._rb - atrans(lev))) + & + & gassrc + cldfmc(igc,lev) * & + & (bbdtot * atot(lev) - gassrc) + drad(lev-1) = drad(lev-1) + radld + bbugas(lev) = plfrac * (blay + tfacgas * dplankup) + bbutot(lev) = plfrac * (blay + tfactot * dplankup) + endif +! Clear layer + else + if (odepth .le. 0.06_rb) then + atrans(lev) = odepth-0.5_rb*odepth*odepth + odepth = rec_6*odepth + bbd = plfrac*(blay+dplankdn*odepth) + bbugas(lev) = plfrac*(blay+dplankup*odepth) + else + tblind = odepth/(bpade+odepth) + itr = tblint*tblind+0.5_rb + transc = exp_tbl(itr) + atrans(lev) = 1._rb-transc + tausfac = tfn_tbl(itr) + bbd = plfrac*(blay+tausfac*dplankdn) + bbugas(lev) = plfrac * (blay + tausfac * dplankup) + endif + radld = radld + (bbd-radld)*atrans(lev) + drad(lev-1) = drad(lev-1) + radld + endif +! Set clear sky stream to total sky stream as long as layers +! remain clear. Streams diverge when a cloud is reached (iclddn=1), +! and clear sky stream must be computed separately from that point. + if (iclddn.eq.1) then + radclrd = radclrd + (bbd-radclrd) * atrans(lev) + clrdrad(lev-1) = clrdrad(lev-1) + radclrd + else + radclrd = radld + clrdrad(lev-1) = drad(lev-1) + endif + enddo + +! Spectral emissivity & reflectance +! Include the contribution of spectrally varying longwave emissivity +! and reflection from the surface to the upward radiative transfer. +! Note: Spectral and Lambertian reflection are identical for the +! diffusivity angle flux integration used here. + +!mz* +! rad0 = fracs(1,igc) * plankbnd(iband) + rad0 = semiss(iband) * fracs(1,igc) * planklay(0,iband) +!mz +! Add in specular reflection of surface downward radiance. + reflect = 1._rb - semiss(iband) + radlu = rad0 + reflect * radld + radclru = rad0 + reflect * radclrd + + +! Upward radiative transfer loop. + urad(0) = urad(0) + radlu + clrurad(0) = clrurad(0) + radclru + + do lev = 1, nlayers +! Cloudy layer + if (icldlyr(lev) .eq. 1) then + gassrc = bbugas(lev) * atrans(lev) + radlu = radlu - radlu * (atrans(lev) + & + & efclfrac(lev,igc) * (1._rb - atrans(lev))) + & + & gassrc + cldfmc(igc,lev) * & + & (bbutot(lev) * atot(lev) - gassrc) + urad(lev) = urad(lev) + radlu +! Clear layer + else + radlu = radlu + (bbugas(lev)-radlu)*atrans(lev) + urad(lev) = urad(lev) + radlu + endif +! Set clear sky stream to total sky stream as long as all layers +! are clear (iclddn=0). Streams must be calculated separately at +! all layers when a cloud is present (ICLDDN=1), because surface +! reflectance is different for each stream. + if (iclddn.eq.1) then + radclru = radclru + (bbugas(lev)-radclru)*atrans(lev) + clrurad(lev) = clrurad(lev) + radclru + else + radclru = radlu + clrurad(lev) = urad(lev) + endif + enddo + +! Increment g-point counter + igc = igc + 1 +! Return to continue radiative transfer for all g-channels in present band + if (igc .le. ngs(iband)) go to 1000 + +! Process longwave output from band for total and clear streams. +! Calculate upward, downward, and net flux. + do lev = nlayers, 0, -1 + uflux(lev) = urad(lev)*wtdiff + dflux(lev) = drad(lev)*wtdiff + urad(lev) = 0.0_rb + drad(lev) = 0.0_rb + totuflux(lev) = totuflux(lev) + uflux(lev) * delwave(iband) + totdflux(lev) = totdflux(lev) + dflux(lev) * delwave(iband) + uclfl(lev) = clrurad(lev)*wtdiff + dclfl(lev) = clrdrad(lev)*wtdiff + clrurad(lev) = 0.0_rb + clrdrad(lev) = 0.0_rb + totuclfl(lev) = totuclfl(lev) + uclfl(lev) * delwave(iband) + totdclfl(lev) = totdclfl(lev) + dclfl(lev) * delwave(iband) + enddo + +! End spectral band loop + enddo + +! Calculate fluxes at surface + totuflux(0) = totuflux(0) * fluxfac + totdflux(0) = totdflux(0) * fluxfac + fnet(0) = totuflux(0) - totdflux(0) + totuclfl(0) = totuclfl(0) * fluxfac + totdclfl(0) = totdclfl(0) * fluxfac + fnetc(0) = totuclfl(0) - totdclfl(0) + +! Calculate fluxes at model levels + do lev = 1, nlayers + totuflux(lev) = totuflux(lev) * fluxfac + totdflux(lev) = totdflux(lev) * fluxfac + fnet(lev) = totuflux(lev) - totdflux(lev) + totuclfl(lev) = totuclfl(lev) * fluxfac + totdclfl(lev) = totdclfl(lev) * fluxfac + fnetc(lev) = totuclfl(lev) - totdclfl(lev) + l = lev - 1 + +! Calculate heating rates at model layers + htr(l)=heatfac*(fnet(l)-fnet(lev))/(pz(l)-pz(lev)) + htrc(l)=heatfac*(fnetc(l)-fnetc(lev))/(pz(l)-pz(lev)) + enddo + +! Set heating rate to zero in top layer + htr(nlayers) = 0.0_rb + htrc(nlayers) = 0.0_rb + + end subroutine rtrnmc_mcica + +! ------------------------------------------------------------------------------ + subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & + & ciwpmc, clwpmc, cswpmc, reicmc, relqmc, resnmc, ncbands, taucmc) +! ------------------------------------------------------------------------------ + +! Purpose: Compute the cloud optical depth(s) for each cloudy layer. + +! ------- Input ------- + + integer(kind=im), intent(in) :: nlayers ! total number of layers + integer(kind=im), intent(in) :: inflag ! see definitions + integer(kind=im), intent(in) :: iceflag ! see definitions + integer(kind=im), intent(in) :: liqflag ! see definitions + + real(kind=rb), intent(in) :: cldfmc(:,:) ! cloud fraction [mcica] + ! Dimensions: (ngptlw,nlayers) + real(kind=rb), intent(in) :: ciwpmc(:,:) ! cloud ice water path [mcica] + ! Dimensions: (ngptlw,nlayers) + real(kind=rb), intent(in) :: clwpmc(:,:) ! cloud liquid water path [mcica] + ! Dimensions: (ngptlw,nlayers) + real(kind=rb), intent(in) :: cswpmc(:,:) ! cloud snow path [mcica] + ! Dimensions: (ngptlw,nlayers) + real(kind=rb), intent(in) :: relqmc(:) ! liquid particle effective radius (microns) + ! Dimensions: (nlayers) + real(kind=rb), intent(in) :: reicmc(:) ! ice particle effective radius (microns) + ! Dimensions: (nlayers) + real(kind=rb), intent(in) :: resnmc(:) ! snow particle effective radius (microns) + ! Dimensions: (nlayers) + ! specific definition of reicmc depends on setting of iceflag: + ! iceflag = 0: ice effective radius, r_ec, (Ebert and Curry, 1992), + ! r_ec must be >= 10.0 microns + ! iceflag = 1: ice effective radius, r_ec, (Ebert and Curry, 1992), + ! r_ec range is limited to 13.0 to 130.0 microns + ! iceflag = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996) + ! r_k range is limited to 5.0 to 131.0 microns + ! iceflag = 3: generalized effective size, dge, (Fu, 1996), + ! dge range is limited to 5.0 to 140.0 microns + ! [dge = 1.0315 * r_ec] + +! ------- Output ------- + + integer(kind=im), intent(out) :: ncbands ! number of cloud spectral bands + real(kind=rb), intent(inout) :: taucmc(:,:) ! cloud optical depth [mcica] + ! Dimensions: (ngptlw,nlayers) + +! ------- Local ------- + + integer(kind=im) :: lay ! Layer index + integer(kind=im) :: ib ! spectral band index + integer(kind=im) :: ig ! g-point interval index + integer(kind=im) :: index + integer(kind=im) :: icb(nbands) + real(kind=rb) , dimension(2) :: absice0 + real(kind=rb) , dimension(2,5) :: absice1 + real(kind=rb) , dimension(43,16) :: absice2 + real(kind=rb) , dimension(46,16) :: absice3 + real(kind=rb) :: absliq0 + real(kind=rb) , dimension(58,16) :: absliq1 + + real(kind=rb) :: abscoice(ngptlw) ! ice absorption coefficients + real(kind=rb) :: abscoliq(ngptlw) ! liquid absorption coefficients + real(kind=rb) :: abscosno(ngptlw) ! snow absorption coefficients + real(kind=rb) :: cwp ! cloud water path + real(kind=rb) :: radice ! cloud ice effective size (microns) + real(kind=rb) :: factor ! + real(kind=rb) :: fint ! + real(kind=rb) :: radliq ! cloud liquid droplet radius (microns) + real(kind=rb) :: radsno ! cloud snow effective size (microns) + real(kind=rb), parameter :: eps = 1.e-6_rb ! epsilon + real(kind=rb), parameter :: cldmin = 1.e-20_rb ! minimum value for cloud quantities + character*80 errmess + +! ------- Definitions ------- + +! Explanation of the method for each value of INFLAG. Values of +! 0 or 1 for INFLAG do not distingish being liquid and ice clouds. +! INFLAG = 2 does distinguish between liquid and ice clouds, and +! requires further user input to specify the method to be used to +! compute the aborption due to each. +! INFLAG = 0: For each cloudy layer, the cloud fraction and (gray) +! optical depth are input. +! INFLAG = 1: For each cloudy layer, the cloud fraction and cloud +! water path (g/m2) are input. The (gray) cloud optical +! depth is computed as in CCM2. +! INFLAG = 2: For each cloudy layer, the cloud fraction, cloud +! water path (g/m2), and cloud ice fraction are input. +! ICEFLAG = 0: The ice effective radius (microns) is input and the +! optical depths due to ice clouds are computed as in CCM3. +! ICEFLAG = 1: The ice effective radius (microns) is input and the +! optical depths due to ice clouds are computed as in +! Ebert and Curry, JGR, 97, 3831-3836 (1992). The +! spectral regions in this work have been matched with +! the spectral bands in RRTM to as great an extent +! as possible: +! E&C 1 IB = 5 RRTM bands 9-16 +! E&C 2 IB = 4 RRTM bands 6-8 +! E&C 3 IB = 3 RRTM bands 3-5 +! E&C 4 IB = 2 RRTM band 2 +! E&C 5 IB = 1 RRTM band 1 +! ICEFLAG = 2: The ice effective radius (microns) is input and the +! optical properties due to ice clouds are computed from +! the optical properties stored in the RT code, +! STREAMER v3.0 (Reference: Key. J., Streamer +! User's Guide, Cooperative Institute for +! Meteorological Satellite Studies, 2001, 96 pp.). +! Valid range of values for re are between 5.0 and +! 131.0 micron. +! ICEFLAG = 3: The ice generalized effective size (dge) is input +! and the optical properties, are calculated as in +! Q. Fu, J. Climate, (1998). Q. Fu provided high resolution +! tables which were appropriately averaged for the +! bands in RRTM_LW. Linear interpolation is used to +! get the coefficients from the stored tables. +! Valid range of values for dge are between 5.0 and +! 140.0 micron. +! LIQFLAG = 0: The optical depths due to water clouds are computed as +! in CCM3. +! LIQFLAG = 1: The water droplet effective radius (microns) is input +! and the optical depths due to water clouds are computed +! as in Hu and Stamnes, J., Clim., 6, 728-742, (1993). +! The values for absorption coefficients appropriate for +! the spectral bands in RRTM have been obtained for a +! range of effective radii by an averaging procedure +! based on the work of J. Pinto (private communication). +! Linear interpolation is used to get the absorption +! coefficients for the input effective radius. + + data icb /1,2,3,3,3,4,4,4,5, 5, 5, 5, 5, 5, 5, 5/ +! Everything below is for INFLAG = 2. + +! ABSICEn(J,IB) are the parameters needed to compute the liquid water +! absorption coefficient in spectral region IB for ICEFLAG=n. The units +! of ABSICEn(1,IB) are m2/g and ABSICEn(2,IB) has units (microns (m2/g)). +! For ICEFLAG = 0. + + absice0(:)= (/0.005_rb, 1.0_rb/) + +! For ICEFLAG = 1. + absice1(1,:) = (/0.0036_rb, 0.0068_rb, 0.0003_rb, 0.0016_rb, & + & 0.0020_rb/) + absice1(2,:) = (/1.136_rb , 0.600_rb , 1.338_rb , 1.166_rb , & + & 1.118_rb /) + +! For ICEFLAG = 2. In each band, the absorption +! coefficients are listed for a range of effective radii from 5.0 +! to 131.0 microns in increments of 3.0 microns. +! Spherical Ice Particle Parameterization +! absorption units (abs coef/iwc): [(m^-1)/(g m^-3)] + absice2(:,1) = (/ & +! band 1 + 7.798999e-02_rb,6.340479e-02_rb,5.417973e-02_rb,4.766245e-02_rb,4.272663e-02_rb, & + 3.880939e-02_rb,3.559544e-02_rb,3.289241e-02_rb,3.057511e-02_rb,2.855800e-02_rb, & + 2.678022e-02_rb,2.519712e-02_rb,2.377505e-02_rb,2.248806e-02_rb,2.131578e-02_rb, & + 2.024194e-02_rb,1.925337e-02_rb,1.833926e-02_rb,1.749067e-02_rb,1.670007e-02_rb, & + 1.596113e-02_rb,1.526845e-02_rb,1.461739e-02_rb,1.400394e-02_rb,1.342462e-02_rb, & + 1.287639e-02_rb,1.235656e-02_rb,1.186279e-02_rb,1.139297e-02_rb,1.094524e-02_rb, & + 1.051794e-02_rb,1.010956e-02_rb,9.718755e-03_rb,9.344316e-03_rb,8.985139e-03_rb, & + 8.640223e-03_rb,8.308656e-03_rb,7.989606e-03_rb,7.682312e-03_rb,7.386076e-03_rb, & + 7.100255e-03_rb,6.824258e-03_rb,6.557540e-03_rb/) + absice2(:,2) = (/ & +! band 2 + 2.784879e-02_rb,2.709863e-02_rb,2.619165e-02_rb,2.529230e-02_rb,2.443225e-02_rb, & + 2.361575e-02_rb,2.284021e-02_rb,2.210150e-02_rb,2.139548e-02_rb,2.071840e-02_rb, & + 2.006702e-02_rb,1.943856e-02_rb,1.883064e-02_rb,1.824120e-02_rb,1.766849e-02_rb, & + 1.711099e-02_rb,1.656737e-02_rb,1.603647e-02_rb,1.551727e-02_rb,1.500886e-02_rb, & + 1.451045e-02_rb,1.402132e-02_rb,1.354084e-02_rb,1.306842e-02_rb,1.260355e-02_rb, & + 1.214575e-02_rb,1.169460e-02_rb,1.124971e-02_rb,1.081072e-02_rb,1.037731e-02_rb, & + 9.949167e-03_rb,9.526021e-03_rb,9.107615e-03_rb,8.693714e-03_rb,8.284096e-03_rb, & + 7.878558e-03_rb,7.476910e-03_rb,7.078974e-03_rb,6.684586e-03_rb,6.293589e-03_rb, & + 5.905839e-03_rb,5.521200e-03_rb,5.139543e-03_rb/) + absice2(:,3) = (/ & +! band 3 + 1.065397e-01_rb,8.005726e-02_rb,6.546428e-02_rb,5.589131e-02_rb,4.898681e-02_rb, & + 4.369932e-02_rb,3.947901e-02_rb,3.600676e-02_rb,3.308299e-02_rb,3.057561e-02_rb, & + 2.839325e-02_rb,2.647040e-02_rb,2.475872e-02_rb,2.322164e-02_rb,2.183091e-02_rb, & + 2.056430e-02_rb,1.940407e-02_rb,1.833586e-02_rb,1.734787e-02_rb,1.643034e-02_rb, & + 1.557512e-02_rb,1.477530e-02_rb,1.402501e-02_rb,1.331924e-02_rb,1.265364e-02_rb, & + 1.202445e-02_rb,1.142838e-02_rb,1.086257e-02_rb,1.032445e-02_rb,9.811791e-03_rb, & + 9.322587e-03_rb,8.855053e-03_rb,8.407591e-03_rb,7.978763e-03_rb,7.567273e-03_rb, & + 7.171949e-03_rb,6.791728e-03_rb,6.425642e-03_rb,6.072809e-03_rb,5.732424e-03_rb, & + 5.403748e-03_rb,5.086103e-03_rb,4.778865e-03_rb/) + absice2(:,4) = (/ & +! band 4 + 1.804566e-01_rb,1.168987e-01_rb,8.680442e-02_rb,6.910060e-02_rb,5.738174e-02_rb, & + 4.902332e-02_rb,4.274585e-02_rb,3.784923e-02_rb,3.391734e-02_rb,3.068690e-02_rb, & + 2.798301e-02_rb,2.568480e-02_rb,2.370600e-02_rb,2.198337e-02_rb,2.046940e-02_rb, & + 1.912777e-02_rb,1.793016e-02_rb,1.685420e-02_rb,1.588193e-02_rb,1.499882e-02_rb, & + 1.419293e-02_rb,1.345440e-02_rb,1.277496e-02_rb,1.214769e-02_rb,1.156669e-02_rb, & + 1.102694e-02_rb,1.052412e-02_rb,1.005451e-02_rb,9.614854e-03_rb,9.202335e-03_rb, & + 8.814470e-03_rb,8.449077e-03_rb,8.104223e-03_rb,7.778195e-03_rb,7.469466e-03_rb, & + 7.176671e-03_rb,6.898588e-03_rb,6.634117e-03_rb,6.382264e-03_rb,6.142134e-03_rb, & + 5.912913e-03_rb,5.693862e-03_rb,5.484308e-03_rb/) + absice2(:,5) = (/ & +! band 5 + 2.131806e-01_rb,1.311372e-01_rb,9.407171e-02_rb,7.299442e-02_rb,5.941273e-02_rb, & + 4.994043e-02_rb,4.296242e-02_rb,3.761113e-02_rb,3.337910e-02_rb,2.994978e-02_rb, & + 2.711556e-02_rb,2.473461e-02_rb,2.270681e-02_rb,2.095943e-02_rb,1.943839e-02_rb, & + 1.810267e-02_rb,1.692057e-02_rb,1.586719e-02_rb,1.492275e-02_rb,1.407132e-02_rb, & + 1.329989e-02_rb,1.259780e-02_rb,1.195618e-02_rb,1.136761e-02_rb,1.082583e-02_rb, & + 1.032552e-02_rb,9.862158e-03_rb,9.431827e-03_rb,9.031157e-03_rb,8.657217e-03_rb, & + 8.307449e-03_rb,7.979609e-03_rb,7.671724e-03_rb,7.382048e-03_rb,7.109032e-03_rb, & + 6.851298e-03_rb,6.607615e-03_rb,6.376881e-03_rb,6.158105e-03_rb,5.950394e-03_rb, & + 5.752942e-03_rb,5.565019e-03_rb,5.385963e-03_rb/) + absice2(:,6) = (/ & +! band 6 + 1.546177e-01_rb,1.039251e-01_rb,7.910347e-02_rb,6.412429e-02_rb,5.399997e-02_rb, & + 4.664937e-02_rb,4.104237e-02_rb,3.660781e-02_rb,3.300218e-02_rb,3.000586e-02_rb, & + 2.747148e-02_rb,2.529633e-02_rb,2.340647e-02_rb,2.174723e-02_rb,2.027731e-02_rb, & + 1.896487e-02_rb,1.778492e-02_rb,1.671761e-02_rb,1.574692e-02_rb,1.485978e-02_rb, & + 1.404543e-02_rb,1.329489e-02_rb,1.260066e-02_rb,1.195636e-02_rb,1.135657e-02_rb, & + 1.079664e-02_rb,1.027257e-02_rb,9.780871e-03_rb,9.318505e-03_rb,8.882815e-03_rb, & + 8.471458e-03_rb,8.082364e-03_rb,7.713696e-03_rb,7.363817e-03_rb,7.031264e-03_rb, & + 6.714725e-03_rb,6.413021e-03_rb,6.125086e-03_rb,5.849958e-03_rb,5.586764e-03_rb, & + 5.334707e-03_rb,5.093066e-03_rb,4.861179e-03_rb/) + absice2(:,7) = (/ & +! band 7 + 7.583404e-02_rb,6.181558e-02_rb,5.312027e-02_rb,4.696039e-02_rb,4.225986e-02_rb, & + 3.849735e-02_rb,3.538340e-02_rb,3.274182e-02_rb,3.045798e-02_rb,2.845343e-02_rb, & + 2.667231e-02_rb,2.507353e-02_rb,2.362606e-02_rb,2.230595e-02_rb,2.109435e-02_rb, & + 1.997617e-02_rb,1.893916e-02_rb,1.797328e-02_rb,1.707016e-02_rb,1.622279e-02_rb, & + 1.542523e-02_rb,1.467241e-02_rb,1.395997e-02_rb,1.328414e-02_rb,1.264164e-02_rb, & + 1.202958e-02_rb,1.144544e-02_rb,1.088697e-02_rb,1.035218e-02_rb,9.839297e-03_rb, & + 9.346733e-03_rb,8.873057e-03_rb,8.416980e-03_rb,7.977335e-03_rb,7.553066e-03_rb, & + 7.143210e-03_rb,6.746888e-03_rb,6.363297e-03_rb,5.991700e-03_rb,5.631422e-03_rb, & + 5.281840e-03_rb,4.942378e-03_rb,4.612505e-03_rb/) + absice2(:,8) = (/ & +! band 8 + 9.022185e-02_rb,6.922700e-02_rb,5.710674e-02_rb,4.898377e-02_rb,4.305946e-02_rb, & + 3.849553e-02_rb,3.484183e-02_rb,3.183220e-02_rb,2.929794e-02_rb,2.712627e-02_rb, & + 2.523856e-02_rb,2.357810e-02_rb,2.210286e-02_rb,2.078089e-02_rb,1.958747e-02_rb, & + 1.850310e-02_rb,1.751218e-02_rb,1.660205e-02_rb,1.576232e-02_rb,1.498440e-02_rb, & + 1.426107e-02_rb,1.358624e-02_rb,1.295474e-02_rb,1.236212e-02_rb,1.180456e-02_rb, & + 1.127874e-02_rb,1.078175e-02_rb,1.031106e-02_rb,9.864433e-03_rb,9.439878e-03_rb, & + 9.035637e-03_rb,8.650140e-03_rb,8.281981e-03_rb,7.929895e-03_rb,7.592746e-03_rb, & + 7.269505e-03_rb,6.959238e-03_rb,6.661100e-03_rb,6.374317e-03_rb,6.098185e-03_rb, & + 5.832059e-03_rb,5.575347e-03_rb,5.327504e-03_rb/) + absice2(:,9) = (/ & +! band 9 + 1.294087e-01_rb,8.788217e-02_rb,6.728288e-02_rb,5.479720e-02_rb,4.635049e-02_rb, & + 4.022253e-02_rb,3.555576e-02_rb,3.187259e-02_rb,2.888498e-02_rb,2.640843e-02_rb, & + 2.431904e-02_rb,2.253038e-02_rb,2.098024e-02_rb,1.962267e-02_rb,1.842293e-02_rb, & + 1.735426e-02_rb,1.639571e-02_rb,1.553060e-02_rb,1.474552e-02_rb,1.402953e-02_rb, & + 1.337363e-02_rb,1.277033e-02_rb,1.221336e-02_rb,1.169741e-02_rb,1.121797e-02_rb, & + 1.077117e-02_rb,1.035369e-02_rb,9.962643e-03_rb,9.595509e-03_rb,9.250088e-03_rb, & + 8.924447e-03_rb,8.616876e-03_rb,8.325862e-03_rb,8.050057e-03_rb,7.788258e-03_rb, & + 7.539388e-03_rb,7.302478e-03_rb,7.076656e-03_rb,6.861134e-03_rb,6.655197e-03_rb, & + 6.458197e-03_rb,6.269543e-03_rb,6.088697e-03_rb/) + absice2(:,10) = (/ & +! band 10 + 1.593628e-01_rb,1.014552e-01_rb,7.458955e-02_rb,5.903571e-02_rb,4.887582e-02_rb, & + 4.171159e-02_rb,3.638480e-02_rb,3.226692e-02_rb,2.898717e-02_rb,2.631256e-02_rb, & + 2.408925e-02_rb,2.221156e-02_rb,2.060448e-02_rb,1.921325e-02_rb,1.799699e-02_rb, & + 1.692456e-02_rb,1.597177e-02_rb,1.511961e-02_rb,1.435289e-02_rb,1.365933e-02_rb, & + 1.302890e-02_rb,1.245334e-02_rb,1.192576e-02_rb,1.144037e-02_rb,1.099230e-02_rb, & + 1.057739e-02_rb,1.019208e-02_rb,9.833302e-03_rb,9.498395e-03_rb,9.185047e-03_rb, & + 8.891237e-03_rb,8.615185e-03_rb,8.355325e-03_rb,8.110267e-03_rb,7.878778e-03_rb, & + 7.659759e-03_rb,7.452224e-03_rb,7.255291e-03_rb,7.068166e-03_rb,6.890130e-03_rb, & + 6.720536e-03_rb,6.558794e-03_rb,6.404371e-03_rb/) + absice2(:,11) = (/ & +! band 11 + 1.656227e-01_rb,1.032129e-01_rb,7.487359e-02_rb,5.871431e-02_rb,4.828355e-02_rb, & + 4.099989e-02_rb,3.562924e-02_rb,3.150755e-02_rb,2.824593e-02_rb,2.560156e-02_rb, & + 2.341503e-02_rb,2.157740e-02_rb,2.001169e-02_rb,1.866199e-02_rb,1.748669e-02_rb, & + 1.645421e-02_rb,1.554015e-02_rb,1.472535e-02_rb,1.399457e-02_rb,1.333553e-02_rb, & + 1.273821e-02_rb,1.219440e-02_rb,1.169725e-02_rb,1.124104e-02_rb,1.082096e-02_rb, & + 1.043290e-02_rb,1.007336e-02_rb,9.739338e-03_rb,9.428223e-03_rb,9.137756e-03_rb, & + 8.865964e-03_rb,8.611115e-03_rb,8.371686e-03_rb,8.146330e-03_rb,7.933852e-03_rb, & + 7.733187e-03_rb,7.543386e-03_rb,7.363597e-03_rb,7.193056e-03_rb,7.031072e-03_rb, & + 6.877024e-03_rb,6.730348e-03_rb,6.590531e-03_rb/) + absice2(:,12) = (/ & +! band 12 + 9.194591e-02_rb,6.446867e-02_rb,4.962034e-02_rb,4.042061e-02_rb,3.418456e-02_rb, & + 2.968856e-02_rb,2.629900e-02_rb,2.365572e-02_rb,2.153915e-02_rb,1.980791e-02_rb, & + 1.836689e-02_rb,1.714979e-02_rb,1.610900e-02_rb,1.520946e-02_rb,1.442476e-02_rb, & + 1.373468e-02_rb,1.312345e-02_rb,1.257858e-02_rb,1.209010e-02_rb,1.164990e-02_rb, & + 1.125136e-02_rb,1.088901e-02_rb,1.055827e-02_rb,1.025531e-02_rb,9.976896e-03_rb, & + 9.720255e-03_rb,9.483022e-03_rb,9.263160e-03_rb,9.058902e-03_rb,8.868710e-03_rb, & + 8.691240e-03_rb,8.525312e-03_rb,8.369886e-03_rb,8.224042e-03_rb,8.086961e-03_rb, & + 7.957917e-03_rb,7.836258e-03_rb,7.721400e-03_rb,7.612821e-03_rb,7.510045e-03_rb, & + 7.412648e-03_rb,7.320242e-03_rb,7.232476e-03_rb/) + absice2(:,13) = (/ & +! band 13 + 1.437021e-01_rb,8.872535e-02_rb,6.392420e-02_rb,4.991833e-02_rb,4.096790e-02_rb, & + 3.477881e-02_rb,3.025782e-02_rb,2.681909e-02_rb,2.412102e-02_rb,2.195132e-02_rb, & + 2.017124e-02_rb,1.868641e-02_rb,1.743044e-02_rb,1.635529e-02_rb,1.542540e-02_rb, & + 1.461388e-02_rb,1.390003e-02_rb,1.326766e-02_rb,1.270395e-02_rb,1.219860e-02_rb, & + 1.174326e-02_rb,1.133107e-02_rb,1.095637e-02_rb,1.061442e-02_rb,1.030126e-02_rb, & + 1.001352e-02_rb,9.748340e-03_rb,9.503256e-03_rb,9.276155e-03_rb,9.065205e-03_rb, & + 8.868808e-03_rb,8.685571e-03_rb,8.514268e-03_rb,8.353820e-03_rb,8.203272e-03_rb, & + 8.061776e-03_rb,7.928578e-03_rb,7.803001e-03_rb,7.684443e-03_rb,7.572358e-03_rb, & + 7.466258e-03_rb,7.365701e-03_rb,7.270286e-03_rb/) + absice2(:,14) = (/ & +! band 14 + 1.288870e-01_rb,8.160295e-02_rb,5.964745e-02_rb,4.703790e-02_rb,3.888637e-02_rb, & + 3.320115e-02_rb,2.902017e-02_rb,2.582259e-02_rb,2.330224e-02_rb,2.126754e-02_rb, & + 1.959258e-02_rb,1.819130e-02_rb,1.700289e-02_rb,1.598320e-02_rb,1.509942e-02_rb, & + 1.432666e-02_rb,1.364572e-02_rb,1.304156e-02_rb,1.250220e-02_rb,1.201803e-02_rb, & + 1.158123e-02_rb,1.118537e-02_rb,1.082513e-02_rb,1.049605e-02_rb,1.019440e-02_rb, & + 9.916989e-03_rb,9.661116e-03_rb,9.424457e-03_rb,9.205005e-03_rb,9.001022e-03_rb, & + 8.810992e-03_rb,8.633588e-03_rb,8.467646e-03_rb,8.312137e-03_rb,8.166151e-03_rb, & + 8.028878e-03_rb,7.899597e-03_rb,7.777663e-03_rb,7.662498e-03_rb,7.553581e-03_rb, & + 7.450444e-03_rb,7.352662e-03_rb,7.259851e-03_rb/) + absice2(:,15) = (/ & +! band 15 + 8.254229e-02_rb,5.808787e-02_rb,4.492166e-02_rb,3.675028e-02_rb,3.119623e-02_rb, & + 2.718045e-02_rb,2.414450e-02_rb,2.177073e-02_rb,1.986526e-02_rb,1.830306e-02_rb, & + 1.699991e-02_rb,1.589698e-02_rb,1.495199e-02_rb,1.413374e-02_rb,1.341870e-02_rb, & + 1.278883e-02_rb,1.223002e-02_rb,1.173114e-02_rb,1.128322e-02_rb,1.087900e-02_rb, & + 1.051254e-02_rb,1.017890e-02_rb,9.873991e-03_rb,9.594347e-03_rb,9.337044e-03_rb, & + 9.099589e-03_rb,8.879842e-03_rb,8.675960e-03_rb,8.486341e-03_rb,8.309594e-03_rb, & + 8.144500e-03_rb,7.989986e-03_rb,7.845109e-03_rb,7.709031e-03_rb,7.581007e-03_rb, & + 7.460376e-03_rb,7.346544e-03_rb,7.238978e-03_rb,7.137201e-03_rb,7.040780e-03_rb, & + 6.949325e-03_rb,6.862483e-03_rb,6.779931e-03_rb/) + absice2(:,16) = (/ & +! band 16 + 1.382062e-01_rb,8.643227e-02_rb,6.282935e-02_rb,4.934783e-02_rb,4.063891e-02_rb, & + 3.455591e-02_rb,3.007059e-02_rb,2.662897e-02_rb,2.390631e-02_rb,2.169972e-02_rb, & + 1.987596e-02_rb,1.834393e-02_rb,1.703924e-02_rb,1.591513e-02_rb,1.493679e-02_rb, & + 1.407780e-02_rb,1.331775e-02_rb,1.264061e-02_rb,1.203364e-02_rb,1.148655e-02_rb, & + 1.099099e-02_rb,1.054006e-02_rb,1.012807e-02_rb,9.750215e-03_rb,9.402477e-03_rb, & + 9.081428e-03_rb,8.784143e-03_rb,8.508107e-03_rb,8.251146e-03_rb,8.011373e-03_rb, & + 7.787140e-03_rb,7.577002e-03_rb,7.379687e-03_rb,7.194071e-03_rb,7.019158e-03_rb, & + 6.854061e-03_rb,6.697986e-03_rb,6.550224e-03_rb,6.410138e-03_rb,6.277153e-03_rb, & + 6.150751e-03_rb,6.030462e-03_rb,5.915860e-03_rb/) + +! ICEFLAG = 3; Fu parameterization. Particle size 5 - 140 micron in +! increments of 3 microns. +! units = m2/g +! Hexagonal Ice Particle Parameterization +! absorption units (abs coef/iwc): [(m^-1)/(g m^-3)] + absice3(:,1) = (/ & +! band 1 + 3.110649e-03_rb,4.666352e-02_rb,6.606447e-02_rb,6.531678e-02_rb,6.012598e-02_rb, & + 5.437494e-02_rb,4.906411e-02_rb,4.441146e-02_rb,4.040585e-02_rb,3.697334e-02_rb, & + 3.403027e-02_rb,3.149979e-02_rb,2.931596e-02_rb,2.742365e-02_rb,2.577721e-02_rb, & + 2.433888e-02_rb,2.307732e-02_rb,2.196644e-02_rb,2.098437e-02_rb,2.011264e-02_rb, & + 1.933561e-02_rb,1.863992e-02_rb,1.801407e-02_rb,1.744812e-02_rb,1.693346e-02_rb, & + 1.646252e-02_rb,1.602866e-02_rb,1.562600e-02_rb,1.524933e-02_rb,1.489399e-02_rb, & + 1.455580e-02_rb,1.423098e-02_rb,1.391612e-02_rb,1.360812e-02_rb,1.330413e-02_rb, & + 1.300156e-02_rb,1.269801e-02_rb,1.239127e-02_rb,1.207928e-02_rb,1.176014e-02_rb, & + 1.143204e-02_rb,1.109334e-02_rb,1.074243e-02_rb,1.037786e-02_rb,9.998198e-03_rb, & + 9.602126e-03_rb/) + absice3(:,2) = (/ & +! band 2 + 3.984966e-04_rb,1.681097e-02_rb,2.627680e-02_rb,2.767465e-02_rb,2.700722e-02_rb, & + 2.579180e-02_rb,2.448677e-02_rb,2.323890e-02_rb,2.209096e-02_rb,2.104882e-02_rb, & + 2.010547e-02_rb,1.925003e-02_rb,1.847128e-02_rb,1.775883e-02_rb,1.710358e-02_rb, & + 1.649769e-02_rb,1.593449e-02_rb,1.540829e-02_rb,1.491429e-02_rb,1.444837e-02_rb, & + 1.400704e-02_rb,1.358729e-02_rb,1.318654e-02_rb,1.280258e-02_rb,1.243346e-02_rb, & + 1.207750e-02_rb,1.173325e-02_rb,1.139941e-02_rb,1.107487e-02_rb,1.075861e-02_rb, & + 1.044975e-02_rb,1.014753e-02_rb,9.851229e-03_rb,9.560240e-03_rb,9.274003e-03_rb, & + 8.992020e-03_rb,8.713845e-03_rb,8.439074e-03_rb,8.167346e-03_rb,7.898331e-03_rb, & + 7.631734e-03_rb,7.367286e-03_rb,7.104742e-03_rb,6.843882e-03_rb,6.584504e-03_rb, & + 6.326424e-03_rb/) + absice3(:,3) = (/ & +! band 3 + 6.933163e-02_rb,8.540475e-02_rb,7.701816e-02_rb,6.771158e-02_rb,5.986953e-02_rb, & + 5.348120e-02_rb,4.824962e-02_rb,4.390563e-02_rb,4.024411e-02_rb,3.711404e-02_rb, & + 3.440426e-02_rb,3.203200e-02_rb,2.993478e-02_rb,2.806474e-02_rb,2.638464e-02_rb, & + 2.486516e-02_rb,2.348288e-02_rb,2.221890e-02_rb,2.105780e-02_rb,1.998687e-02_rb, & + 1.899552e-02_rb,1.807490e-02_rb,1.721750e-02_rb,1.641693e-02_rb,1.566773e-02_rb, & + 1.496515e-02_rb,1.430509e-02_rb,1.368398e-02_rb,1.309865e-02_rb,1.254634e-02_rb, & + 1.202456e-02_rb,1.153114e-02_rb,1.106409e-02_rb,1.062166e-02_rb,1.020224e-02_rb, & + 9.804381e-03_rb,9.426771e-03_rb,9.068205e-03_rb,8.727578e-03_rb,8.403876e-03_rb, & + 8.096160e-03_rb,7.803564e-03_rb,7.525281e-03_rb,7.260560e-03_rb,7.008697e-03_rb, & + 6.769036e-03_rb/) + absice3(:,4) = (/ & +! band 4 + 1.765735e-01_rb,1.382700e-01_rb,1.095129e-01_rb,8.987475e-02_rb,7.591185e-02_rb, & + 6.554169e-02_rb,5.755500e-02_rb,5.122083e-02_rb,4.607610e-02_rb,4.181475e-02_rb, & + 3.822697e-02_rb,3.516432e-02_rb,3.251897e-02_rb,3.021073e-02_rb,2.817876e-02_rb, & + 2.637607e-02_rb,2.476582e-02_rb,2.331871e-02_rb,2.201113e-02_rb,2.082388e-02_rb, & + 1.974115e-02_rb,1.874983e-02_rb,1.783894e-02_rb,1.699922e-02_rb,1.622280e-02_rb, & + 1.550296e-02_rb,1.483390e-02_rb,1.421064e-02_rb,1.362880e-02_rb,1.308460e-02_rb, & + 1.257468e-02_rb,1.209611e-02_rb,1.164628e-02_rb,1.122287e-02_rb,1.082381e-02_rb, & + 1.044725e-02_rb,1.009154e-02_rb,9.755166e-03_rb,9.436783e-03_rb,9.135163e-03_rb, & + 8.849193e-03_rb,8.577856e-03_rb,8.320225e-03_rb,8.075451e-03_rb,7.842755e-03_rb, & + 7.621418e-03_rb/) + absice3(:,5) = (/ & +! band 5 + 2.339673e-01_rb,1.692124e-01_rb,1.291656e-01_rb,1.033837e-01_rb,8.562949e-02_rb, & + 7.273526e-02_rb,6.298262e-02_rb,5.537015e-02_rb,4.927787e-02_rb,4.430246e-02_rb, & + 4.017061e-02_rb,3.669072e-02_rb,3.372455e-02_rb,3.116995e-02_rb,2.894977e-02_rb, & + 2.700471e-02_rb,2.528842e-02_rb,2.376420e-02_rb,2.240256e-02_rb,2.117959e-02_rb, & + 2.007567e-02_rb,1.907456e-02_rb,1.816271e-02_rb,1.732874e-02_rb,1.656300e-02_rb, & + 1.585725e-02_rb,1.520445e-02_rb,1.459852e-02_rb,1.403419e-02_rb,1.350689e-02_rb, & + 1.301260e-02_rb,1.254781e-02_rb,1.210941e-02_rb,1.169468e-02_rb,1.130118e-02_rb, & + 1.092675e-02_rb,1.056945e-02_rb,1.022757e-02_rb,9.899560e-03_rb,9.584021e-03_rb, & + 9.279705e-03_rb,8.985479e-03_rb,8.700322e-03_rb,8.423306e-03_rb,8.153590e-03_rb, & + 7.890412e-03_rb/) + absice3(:,6) = (/ & +! band 6 + 1.145369e-01_rb,1.174566e-01_rb,9.917866e-02_rb,8.332990e-02_rb,7.104263e-02_rb, & + 6.153370e-02_rb,5.405472e-02_rb,4.806281e-02_rb,4.317918e-02_rb,3.913795e-02_rb, & + 3.574916e-02_rb,3.287437e-02_rb,3.041067e-02_rb,2.828017e-02_rb,2.642292e-02_rb, & + 2.479206e-02_rb,2.335051e-02_rb,2.206851e-02_rb,2.092195e-02_rb,1.989108e-02_rb, & + 1.895958e-02_rb,1.811385e-02_rb,1.734245e-02_rb,1.663573e-02_rb,1.598545e-02_rb, & + 1.538456e-02_rb,1.482700e-02_rb,1.430750e-02_rb,1.382150e-02_rb,1.336499e-02_rb, & + 1.293447e-02_rb,1.252685e-02_rb,1.213939e-02_rb,1.176968e-02_rb,1.141555e-02_rb, & + 1.107508e-02_rb,1.074655e-02_rb,1.042839e-02_rb,1.011923e-02_rb,9.817799e-03_rb, & + 9.522962e-03_rb,9.233688e-03_rb,8.949041e-03_rb,8.668171e-03_rb,8.390301e-03_rb, & + 8.114723e-03_rb/) + absice3(:,7) = (/ & +! band 7 + 1.222345e-02_rb,5.344230e-02_rb,5.523465e-02_rb,5.128759e-02_rb,4.676925e-02_rb, & + 4.266150e-02_rb,3.910561e-02_rb,3.605479e-02_rb,3.342843e-02_rb,3.115052e-02_rb, & + 2.915776e-02_rb,2.739935e-02_rb,2.583499e-02_rb,2.443266e-02_rb,2.316681e-02_rb, & + 2.201687e-02_rb,2.096619e-02_rb,2.000112e-02_rb,1.911044e-02_rb,1.828481e-02_rb, & + 1.751641e-02_rb,1.679866e-02_rb,1.612598e-02_rb,1.549360e-02_rb,1.489742e-02_rb, & + 1.433392e-02_rb,1.380002e-02_rb,1.329305e-02_rb,1.281068e-02_rb,1.235084e-02_rb, & + 1.191172e-02_rb,1.149171e-02_rb,1.108936e-02_rb,1.070341e-02_rb,1.033271e-02_rb, & + 9.976220e-03_rb,9.633021e-03_rb,9.302273e-03_rb,8.983216e-03_rb,8.675161e-03_rb, & + 8.377478e-03_rb,8.089595e-03_rb,7.810986e-03_rb,7.541170e-03_rb,7.279706e-03_rb, & + 7.026186e-03_rb/) + absice3(:,8) = (/ & +! band 8 + 6.711058e-02_rb,6.918198e-02_rb,6.127484e-02_rb,5.411944e-02_rb,4.836902e-02_rb, & + 4.375293e-02_rb,3.998077e-02_rb,3.683587e-02_rb,3.416508e-02_rb,3.186003e-02_rb, & + 2.984290e-02_rb,2.805671e-02_rb,2.645895e-02_rb,2.501733e-02_rb,2.370689e-02_rb, & + 2.250808e-02_rb,2.140532e-02_rb,2.038609e-02_rb,1.944018e-02_rb,1.855918e-02_rb, & + 1.773609e-02_rb,1.696504e-02_rb,1.624106e-02_rb,1.555990e-02_rb,1.491793e-02_rb, & + 1.431197e-02_rb,1.373928e-02_rb,1.319743e-02_rb,1.268430e-02_rb,1.219799e-02_rb, & + 1.173682e-02_rb,1.129925e-02_rb,1.088393e-02_rb,1.048961e-02_rb,1.011516e-02_rb, & + 9.759543e-03_rb,9.421813e-03_rb,9.101089e-03_rb,8.796559e-03_rb,8.507464e-03_rb, & + 8.233098e-03_rb,7.972798e-03_rb,7.725942e-03_rb,7.491940e-03_rb,7.270238e-03_rb, & + 7.060305e-03_rb/) + absice3(:,9) = (/ & +! band 9 + 1.236780e-01_rb,9.222386e-02_rb,7.383997e-02_rb,6.204072e-02_rb,5.381029e-02_rb, & + 4.770678e-02_rb,4.296928e-02_rb,3.916131e-02_rb,3.601540e-02_rb,3.335878e-02_rb, & + 3.107493e-02_rb,2.908247e-02_rb,2.732282e-02_rb,2.575276e-02_rb,2.433968e-02_rb, & + 2.305852e-02_rb,2.188966e-02_rb,2.081757e-02_rb,1.982974e-02_rb,1.891599e-02_rb, & + 1.806794e-02_rb,1.727865e-02_rb,1.654227e-02_rb,1.585387e-02_rb,1.520924e-02_rb, & + 1.460476e-02_rb,1.403730e-02_rb,1.350416e-02_rb,1.300293e-02_rb,1.253153e-02_rb, & + 1.208808e-02_rb,1.167094e-02_rb,1.127862e-02_rb,1.090979e-02_rb,1.056323e-02_rb, & + 1.023786e-02_rb,9.932665e-03_rb,9.646744e-03_rb,9.379250e-03_rb,9.129409e-03_rb, & + 8.896500e-03_rb,8.679856e-03_rb,8.478852e-03_rb,8.292904e-03_rb,8.121463e-03_rb, & + 7.964013e-03_rb/) + absice3(:,10) = (/ & +! band 10 + 1.655966e-01_rb,1.134205e-01_rb,8.714344e-02_rb,7.129241e-02_rb,6.063739e-02_rb, & + 5.294203e-02_rb,4.709309e-02_rb,4.247476e-02_rb,3.871892e-02_rb,3.559206e-02_rb, & + 3.293893e-02_rb,3.065226e-02_rb,2.865558e-02_rb,2.689288e-02_rb,2.532221e-02_rb, & + 2.391150e-02_rb,2.263582e-02_rb,2.147549e-02_rb,2.041476e-02_rb,1.944089e-02_rb, & + 1.854342e-02_rb,1.771371e-02_rb,1.694456e-02_rb,1.622989e-02_rb,1.556456e-02_rb, & + 1.494415e-02_rb,1.436491e-02_rb,1.382354e-02_rb,1.331719e-02_rb,1.284339e-02_rb, & + 1.239992e-02_rb,1.198486e-02_rb,1.159647e-02_rb,1.123323e-02_rb,1.089375e-02_rb, & + 1.057679e-02_rb,1.028124e-02_rb,1.000607e-02_rb,9.750376e-03_rb,9.513303e-03_rb, & + 9.294082e-03_rb,9.092003e-03_rb,8.906412e-03_rb,8.736702e-03_rb,8.582314e-03_rb, & + 8.442725e-03_rb/) + absice3(:,11) = (/ & +! band 11 + 1.775615e-01_rb,1.180046e-01_rb,8.929607e-02_rb,7.233500e-02_rb,6.108333e-02_rb, & + 5.303642e-02_rb,4.696927e-02_rb,4.221206e-02_rb,3.836768e-02_rb,3.518576e-02_rb, & + 3.250063e-02_rb,3.019825e-02_rb,2.819758e-02_rb,2.643943e-02_rb,2.487953e-02_rb, & + 2.348414e-02_rb,2.222705e-02_rb,2.108762e-02_rb,2.004936e-02_rb,1.909892e-02_rb, & + 1.822539e-02_rb,1.741975e-02_rb,1.667449e-02_rb,1.598330e-02_rb,1.534084e-02_rb, & + 1.474253e-02_rb,1.418446e-02_rb,1.366325e-02_rb,1.317597e-02_rb,1.272004e-02_rb, & + 1.229321e-02_rb,1.189350e-02_rb,1.151915e-02_rb,1.116859e-02_rb,1.084042e-02_rb, & + 1.053338e-02_rb,1.024636e-02_rb,9.978326e-03_rb,9.728357e-03_rb,9.495613e-03_rb, & + 9.279327e-03_rb,9.078798e-03_rb,8.893383e-03_rb,8.722488e-03_rb,8.565568e-03_rb, & + 8.422115e-03_rb/) + absice3(:,12) = (/ & +! band 12 + 9.465447e-02_rb,6.432047e-02_rb,5.060973e-02_rb,4.267283e-02_rb,3.741843e-02_rb, & + 3.363096e-02_rb,3.073531e-02_rb,2.842405e-02_rb,2.651789e-02_rb,2.490518e-02_rb, & + 2.351273e-02_rb,2.229056e-02_rb,2.120335e-02_rb,2.022541e-02_rb,1.933763e-02_rb, & + 1.852546e-02_rb,1.777763e-02_rb,1.708528e-02_rb,1.644134e-02_rb,1.584009e-02_rb, & + 1.527684e-02_rb,1.474774e-02_rb,1.424955e-02_rb,1.377957e-02_rb,1.333549e-02_rb, & + 1.291534e-02_rb,1.251743e-02_rb,1.214029e-02_rb,1.178265e-02_rb,1.144337e-02_rb, & + 1.112148e-02_rb,1.081609e-02_rb,1.052642e-02_rb,1.025178e-02_rb,9.991540e-03_rb, & + 9.745130e-03_rb,9.512038e-03_rb,9.291797e-03_rb,9.083980e-03_rb,8.888195e-03_rb, & + 8.704081e-03_rb,8.531306e-03_rb,8.369560e-03_rb,8.218558e-03_rb,8.078032e-03_rb, & + 7.947730e-03_rb/) + absice3(:,13) = (/ & +! band 13 + 1.560311e-01_rb,9.961097e-02_rb,7.502949e-02_rb,6.115022e-02_rb,5.214952e-02_rb, & + 4.578149e-02_rb,4.099731e-02_rb,3.724174e-02_rb,3.419343e-02_rb,3.165356e-02_rb, & + 2.949251e-02_rb,2.762222e-02_rb,2.598073e-02_rb,2.452322e-02_rb,2.321642e-02_rb, & + 2.203516e-02_rb,2.096002e-02_rb,1.997579e-02_rb,1.907036e-02_rb,1.823401e-02_rb, & + 1.745879e-02_rb,1.673819e-02_rb,1.606678e-02_rb,1.544003e-02_rb,1.485411e-02_rb, & + 1.430574e-02_rb,1.379215e-02_rb,1.331092e-02_rb,1.285996e-02_rb,1.243746e-02_rb, & + 1.204183e-02_rb,1.167164e-02_rb,1.132567e-02_rb,1.100281e-02_rb,1.070207e-02_rb, & + 1.042258e-02_rb,1.016352e-02_rb,9.924197e-03_rb,9.703953e-03_rb,9.502199e-03_rb, & + 9.318400e-03_rb,9.152066e-03_rb,9.002749e-03_rb,8.870038e-03_rb,8.753555e-03_rb, & + 8.652951e-03_rb/) + absice3(:,14) = (/ & +! band 14 + 1.559547e-01_rb,9.896700e-02_rb,7.441231e-02_rb,6.061469e-02_rb,5.168730e-02_rb, & + 4.537821e-02_rb,4.064106e-02_rb,3.692367e-02_rb,3.390714e-02_rb,3.139438e-02_rb, & + 2.925702e-02_rb,2.740783e-02_rb,2.578547e-02_rb,2.434552e-02_rb,2.305506e-02_rb, & + 2.188910e-02_rb,2.082842e-02_rb,1.985789e-02_rb,1.896553e-02_rb,1.814165e-02_rb, & + 1.737839e-02_rb,1.666927e-02_rb,1.600891e-02_rb,1.539279e-02_rb,1.481712e-02_rb, & + 1.427865e-02_rb,1.377463e-02_rb,1.330266e-02_rb,1.286068e-02_rb,1.244689e-02_rb, & + 1.205973e-02_rb,1.169780e-02_rb,1.135989e-02_rb,1.104492e-02_rb,1.075192e-02_rb, & + 1.048004e-02_rb,1.022850e-02_rb,9.996611e-03_rb,9.783753e-03_rb,9.589361e-03_rb, & + 9.412924e-03_rb,9.253977e-03_rb,9.112098e-03_rb,8.986903e-03_rb,8.878039e-03_rb, & + 8.785184e-03_rb/) + absice3(:,15) = (/ & +! band 15 + 1.102926e-01_rb,7.176622e-02_rb,5.530316e-02_rb,4.606056e-02_rb,4.006116e-02_rb, & + 3.579628e-02_rb,3.256909e-02_rb,3.001360e-02_rb,2.791920e-02_rb,2.615617e-02_rb, & + 2.464023e-02_rb,2.331426e-02_rb,2.213817e-02_rb,2.108301e-02_rb,2.012733e-02_rb, & + 1.925493e-02_rb,1.845331e-02_rb,1.771269e-02_rb,1.702531e-02_rb,1.638493e-02_rb, & + 1.578648e-02_rb,1.522579e-02_rb,1.469940e-02_rb,1.420442e-02_rb,1.373841e-02_rb, & + 1.329931e-02_rb,1.288535e-02_rb,1.249502e-02_rb,1.212700e-02_rb,1.178015e-02_rb, & + 1.145348e-02_rb,1.114612e-02_rb,1.085730e-02_rb,1.058633e-02_rb,1.033263e-02_rb, & + 1.009564e-02_rb,9.874895e-03_rb,9.669960e-03_rb,9.480449e-03_rb,9.306014e-03_rb, & + 9.146339e-03_rb,9.001138e-03_rb,8.870154e-03_rb,8.753148e-03_rb,8.649907e-03_rb, & + 8.560232e-03_rb/) + absice3(:,16) = (/ & +! band 16 + 1.688344e-01_rb,1.077072e-01_rb,7.994467e-02_rb,6.403862e-02_rb,5.369850e-02_rb, & + 4.641582e-02_rb,4.099331e-02_rb,3.678724e-02_rb,3.342069e-02_rb,3.065831e-02_rb, & + 2.834557e-02_rb,2.637680e-02_rb,2.467733e-02_rb,2.319286e-02_rb,2.188299e-02_rb, & + 2.071701e-02_rb,1.967121e-02_rb,1.872692e-02_rb,1.786931e-02_rb,1.708641e-02_rb, & + 1.636846e-02_rb,1.570743e-02_rb,1.509665e-02_rb,1.453052e-02_rb,1.400433e-02_rb, & + 1.351407e-02_rb,1.305631e-02_rb,1.262810e-02_rb,1.222688e-02_rb,1.185044e-02_rb, & + 1.149683e-02_rb,1.116436e-02_rb,1.085153e-02_rb,1.055701e-02_rb,1.027961e-02_rb, & + 1.001831e-02_rb,9.772141e-03_rb,9.540280e-03_rb,9.321966e-03_rb,9.116517e-03_rb, & + 8.923315e-03_rb,8.741803e-03_rb,8.571472e-03_rb,8.411860e-03_rb,8.262543e-03_rb, & + 8.123136e-03_rb/) + +! For LIQFLAG = 0. + absliq0 = 0.0903614_rb + +! For LIQFLAG = 1. In each band, the absorption +! coefficients are listed for a range of effective radii from 2.5 +! to 59.5 microns in increments of 1.0 micron. + absliq1(:, 1) = (/ & +! band 1 + 1.64047e-03_rb, 6.90533e-02_rb, 7.72017e-02_rb, 7.78054e-02_rb, 7.69523e-02_rb, & + 7.58058e-02_rb, 7.46400e-02_rb, 7.35123e-02_rb, 7.24162e-02_rb, 7.13225e-02_rb, & + 6.99145e-02_rb, 6.66409e-02_rb, 6.36582e-02_rb, 6.09425e-02_rb, 5.84593e-02_rb, & + 5.61743e-02_rb, 5.40571e-02_rb, 5.20812e-02_rb, 5.02245e-02_rb, 4.84680e-02_rb, & + 4.67959e-02_rb, 4.51944e-02_rb, 4.36516e-02_rb, 4.21570e-02_rb, 4.07015e-02_rb, & + 3.92766e-02_rb, 3.78747e-02_rb, 3.64886e-02_rb, 3.53632e-02_rb, 3.41992e-02_rb, & + 3.31016e-02_rb, 3.20643e-02_rb, 3.10817e-02_rb, 3.01490e-02_rb, 2.92620e-02_rb, & + 2.84171e-02_rb, 2.76108e-02_rb, 2.68404e-02_rb, 2.61031e-02_rb, 2.53966e-02_rb, & + 2.47189e-02_rb, 2.40678e-02_rb, 2.34418e-02_rb, 2.28392e-02_rb, 2.22586e-02_rb, & + 2.16986e-02_rb, 2.11580e-02_rb, 2.06356e-02_rb, 2.01305e-02_rb, 1.96417e-02_rb, & + 1.91682e-02_rb, 1.87094e-02_rb, 1.82643e-02_rb, 1.78324e-02_rb, 1.74129e-02_rb, & + 1.70052e-02_rb, 1.66088e-02_rb, 1.62231e-02_rb/) + absliq1(:, 2) = (/ & +! band 2 + 2.19486e-01_rb, 1.80687e-01_rb, 1.59150e-01_rb, 1.44731e-01_rb, 1.33703e-01_rb, & + 1.24355e-01_rb, 1.15756e-01_rb, 1.07318e-01_rb, 9.86119e-02_rb, 8.92739e-02_rb, & + 8.34911e-02_rb, 7.70773e-02_rb, 7.15240e-02_rb, 6.66615e-02_rb, 6.23641e-02_rb, & + 5.85359e-02_rb, 5.51020e-02_rb, 5.20032e-02_rb, 4.91916e-02_rb, 4.66283e-02_rb, & + 4.42813e-02_rb, 4.21236e-02_rb, 4.01330e-02_rb, 3.82905e-02_rb, 3.65797e-02_rb, & + 3.49869e-02_rb, 3.35002e-02_rb, 3.21090e-02_rb, 3.08957e-02_rb, 2.97601e-02_rb, & + 2.86966e-02_rb, 2.76984e-02_rb, 2.67599e-02_rb, 2.58758e-02_rb, 2.50416e-02_rb, & + 2.42532e-02_rb, 2.35070e-02_rb, 2.27997e-02_rb, 2.21284e-02_rb, 2.14904e-02_rb, & + 2.08834e-02_rb, 2.03051e-02_rb, 1.97536e-02_rb, 1.92271e-02_rb, 1.87239e-02_rb, & + 1.82425e-02_rb, 1.77816e-02_rb, 1.73399e-02_rb, 1.69162e-02_rb, 1.65094e-02_rb, & + 1.61187e-02_rb, 1.57430e-02_rb, 1.53815e-02_rb, 1.50334e-02_rb, 1.46981e-02_rb, & + 1.43748e-02_rb, 1.40628e-02_rb, 1.37617e-02_rb/) + absliq1(:, 3) = (/ & +! band 3 + 2.95174e-01_rb, 2.34765e-01_rb, 1.98038e-01_rb, 1.72114e-01_rb, 1.52083e-01_rb, & + 1.35654e-01_rb, 1.21613e-01_rb, 1.09252e-01_rb, 9.81263e-02_rb, 8.79448e-02_rb, & + 8.12566e-02_rb, 7.44563e-02_rb, 6.86374e-02_rb, 6.36042e-02_rb, 5.92094e-02_rb, & + 5.53402e-02_rb, 5.19087e-02_rb, 4.88455e-02_rb, 4.60951e-02_rb, 4.36124e-02_rb, & + 4.13607e-02_rb, 3.93096e-02_rb, 3.74338e-02_rb, 3.57119e-02_rb, 3.41261e-02_rb, & + 3.26610e-02_rb, 3.13036e-02_rb, 3.00425e-02_rb, 2.88497e-02_rb, 2.78077e-02_rb, & + 2.68317e-02_rb, 2.59158e-02_rb, 2.50545e-02_rb, 2.42430e-02_rb, 2.34772e-02_rb, & + 2.27533e-02_rb, 2.20679e-02_rb, 2.14181e-02_rb, 2.08011e-02_rb, 2.02145e-02_rb, & + 1.96561e-02_rb, 1.91239e-02_rb, 1.86161e-02_rb, 1.81311e-02_rb, 1.76673e-02_rb, & + 1.72234e-02_rb, 1.67981e-02_rb, 1.63903e-02_rb, 1.59989e-02_rb, 1.56230e-02_rb, & + 1.52615e-02_rb, 1.49138e-02_rb, 1.45791e-02_rb, 1.42565e-02_rb, 1.39455e-02_rb, & + 1.36455e-02_rb, 1.33559e-02_rb, 1.30761e-02_rb/) + absliq1(:, 4) = (/ & +! band 4 + 3.00925e-01_rb, 2.36949e-01_rb, 1.96947e-01_rb, 1.68692e-01_rb, 1.47190e-01_rb, & + 1.29986e-01_rb, 1.15719e-01_rb, 1.03568e-01_rb, 9.30028e-02_rb, 8.36658e-02_rb, & + 7.71075e-02_rb, 7.07002e-02_rb, 6.52284e-02_rb, 6.05024e-02_rb, 5.63801e-02_rb, & + 5.27534e-02_rb, 4.95384e-02_rb, 4.66690e-02_rb, 4.40925e-02_rb, 4.17664e-02_rb, & + 3.96559e-02_rb, 3.77326e-02_rb, 3.59727e-02_rb, 3.43561e-02_rb, 3.28662e-02_rb, & + 3.14885e-02_rb, 3.02110e-02_rb, 2.90231e-02_rb, 2.78948e-02_rb, 2.69109e-02_rb, & + 2.59884e-02_rb, 2.51217e-02_rb, 2.43058e-02_rb, 2.35364e-02_rb, 2.28096e-02_rb, & + 2.21218e-02_rb, 2.14700e-02_rb, 2.08515e-02_rb, 2.02636e-02_rb, 1.97041e-02_rb, & + 1.91711e-02_rb, 1.86625e-02_rb, 1.81769e-02_rb, 1.77126e-02_rb, 1.72683e-02_rb, & + 1.68426e-02_rb, 1.64344e-02_rb, 1.60427e-02_rb, 1.56664e-02_rb, 1.53046e-02_rb, & + 1.49565e-02_rb, 1.46214e-02_rb, 1.42985e-02_rb, 1.39871e-02_rb, 1.36866e-02_rb, & + 1.33965e-02_rb, 1.31162e-02_rb, 1.28453e-02_rb/) + absliq1(:, 5) = (/ & +! band 5 + 2.64691e-01_rb, 2.12018e-01_rb, 1.78009e-01_rb, 1.53539e-01_rb, 1.34721e-01_rb, & + 1.19580e-01_rb, 1.06996e-01_rb, 9.62772e-02_rb, 8.69710e-02_rb, 7.87670e-02_rb, & + 7.29272e-02_rb, 6.70920e-02_rb, 6.20977e-02_rb, 5.77732e-02_rb, 5.39910e-02_rb, & + 5.06538e-02_rb, 4.76866e-02_rb, 4.50301e-02_rb, 4.26374e-02_rb, 4.04704e-02_rb, & + 3.84981e-02_rb, 3.66948e-02_rb, 3.50394e-02_rb, 3.35141e-02_rb, 3.21038e-02_rb, & + 3.07957e-02_rb, 2.95788e-02_rb, 2.84438e-02_rb, 2.73790e-02_rb, 2.64390e-02_rb, & + 2.55565e-02_rb, 2.47263e-02_rb, 2.39437e-02_rb, 2.32047e-02_rb, 2.25056e-02_rb, & + 2.18433e-02_rb, 2.12149e-02_rb, 2.06177e-02_rb, 2.00495e-02_rb, 1.95081e-02_rb, & + 1.89917e-02_rb, 1.84984e-02_rb, 1.80269e-02_rb, 1.75755e-02_rb, 1.71431e-02_rb, & + 1.67283e-02_rb, 1.63303e-02_rb, 1.59478e-02_rb, 1.55801e-02_rb, 1.52262e-02_rb, & + 1.48853e-02_rb, 1.45568e-02_rb, 1.42400e-02_rb, 1.39342e-02_rb, 1.36388e-02_rb, & + 1.33533e-02_rb, 1.30773e-02_rb, 1.28102e-02_rb/) + absliq1(:, 6) = (/ & +! band 6 + 8.81182e-02_rb, 1.06745e-01_rb, 9.79753e-02_rb, 8.99625e-02_rb, 8.35200e-02_rb, & + 7.81899e-02_rb, 7.35939e-02_rb, 6.94696e-02_rb, 6.56266e-02_rb, 6.19148e-02_rb, & + 5.83355e-02_rb, 5.49306e-02_rb, 5.19642e-02_rb, 4.93325e-02_rb, 4.69659e-02_rb, & + 4.48148e-02_rb, 4.28431e-02_rb, 4.10231e-02_rb, 3.93332e-02_rb, 3.77563e-02_rb, & + 3.62785e-02_rb, 3.48882e-02_rb, 3.35758e-02_rb, 3.23333e-02_rb, 3.11536e-02_rb, & + 3.00310e-02_rb, 2.89601e-02_rb, 2.79365e-02_rb, 2.70502e-02_rb, 2.62618e-02_rb, & + 2.55025e-02_rb, 2.47728e-02_rb, 2.40726e-02_rb, 2.34013e-02_rb, 2.27583e-02_rb, & + 2.21422e-02_rb, 2.15522e-02_rb, 2.09869e-02_rb, 2.04453e-02_rb, 1.99260e-02_rb, & + 1.94280e-02_rb, 1.89501e-02_rb, 1.84913e-02_rb, 1.80506e-02_rb, 1.76270e-02_rb, & + 1.72196e-02_rb, 1.68276e-02_rb, 1.64500e-02_rb, 1.60863e-02_rb, 1.57357e-02_rb, & + 1.53975e-02_rb, 1.50710e-02_rb, 1.47558e-02_rb, 1.44511e-02_rb, 1.41566e-02_rb, & + 1.38717e-02_rb, 1.35960e-02_rb, 1.33290e-02_rb/) + absliq1(:, 7) = (/ & +! band 7 + 4.32174e-02_rb, 7.36078e-02_rb, 6.98340e-02_rb, 6.65231e-02_rb, 6.41948e-02_rb, & + 6.23551e-02_rb, 6.06638e-02_rb, 5.88680e-02_rb, 5.67124e-02_rb, 5.38629e-02_rb, & + 4.99579e-02_rb, 4.86289e-02_rb, 4.70120e-02_rb, 4.52854e-02_rb, 4.35466e-02_rb, & + 4.18480e-02_rb, 4.02169e-02_rb, 3.86658e-02_rb, 3.71992e-02_rb, 3.58168e-02_rb, & + 3.45155e-02_rb, 3.32912e-02_rb, 3.21390e-02_rb, 3.10538e-02_rb, 3.00307e-02_rb, & + 2.90651e-02_rb, 2.81524e-02_rb, 2.72885e-02_rb, 2.62821e-02_rb, 2.55744e-02_rb, & + 2.48799e-02_rb, 2.42029e-02_rb, 2.35460e-02_rb, 2.29108e-02_rb, 2.22981e-02_rb, & + 2.17079e-02_rb, 2.11402e-02_rb, 2.05945e-02_rb, 2.00701e-02_rb, 1.95663e-02_rb, & + 1.90824e-02_rb, 1.86174e-02_rb, 1.81706e-02_rb, 1.77411e-02_rb, 1.73281e-02_rb, & + 1.69307e-02_rb, 1.65483e-02_rb, 1.61801e-02_rb, 1.58254e-02_rb, 1.54835e-02_rb, & + 1.51538e-02_rb, 1.48358e-02_rb, 1.45288e-02_rb, 1.42322e-02_rb, 1.39457e-02_rb, & + 1.36687e-02_rb, 1.34008e-02_rb, 1.31416e-02_rb/) + absliq1(:, 8) = (/ & +! band 8 + 1.41881e-01_rb, 7.15419e-02_rb, 6.30335e-02_rb, 6.11132e-02_rb, 6.01931e-02_rb, & + 5.92420e-02_rb, 5.78968e-02_rb, 5.58876e-02_rb, 5.28923e-02_rb, 4.84462e-02_rb, & + 4.60839e-02_rb, 4.56013e-02_rb, 4.45410e-02_rb, 4.31866e-02_rb, 4.17026e-02_rb, & + 4.01850e-02_rb, 3.86892e-02_rb, 3.72461e-02_rb, 3.58722e-02_rb, 3.45749e-02_rb, & + 3.33564e-02_rb, 3.22155e-02_rb, 3.11494e-02_rb, 3.01541e-02_rb, 2.92253e-02_rb, & + 2.83584e-02_rb, 2.75488e-02_rb, 2.67925e-02_rb, 2.57692e-02_rb, 2.50704e-02_rb, & + 2.43918e-02_rb, 2.37350e-02_rb, 2.31005e-02_rb, 2.24888e-02_rb, 2.18996e-02_rb, & + 2.13325e-02_rb, 2.07870e-02_rb, 2.02623e-02_rb, 1.97577e-02_rb, 1.92724e-02_rb, & + 1.88056e-02_rb, 1.83564e-02_rb, 1.79241e-02_rb, 1.75079e-02_rb, 1.71070e-02_rb, & + 1.67207e-02_rb, 1.63482e-02_rb, 1.59890e-02_rb, 1.56424e-02_rb, 1.53077e-02_rb, & + 1.49845e-02_rb, 1.46722e-02_rb, 1.43702e-02_rb, 1.40782e-02_rb, 1.37955e-02_rb, & + 1.35219e-02_rb, 1.32569e-02_rb, 1.30000e-02_rb/) + absliq1(:, 9) = (/ & +! band 9 + 6.72726e-02_rb, 6.61013e-02_rb, 6.47866e-02_rb, 6.33780e-02_rb, 6.18985e-02_rb, & + 6.03335e-02_rb, 5.86136e-02_rb, 5.65876e-02_rb, 5.39839e-02_rb, 5.03536e-02_rb, & + 4.71608e-02_rb, 4.63630e-02_rb, 4.50313e-02_rb, 4.34526e-02_rb, 4.17876e-02_rb, & + 4.01261e-02_rb, 3.85171e-02_rb, 3.69860e-02_rb, 3.55442e-02_rb, 3.41954e-02_rb, & + 3.29384e-02_rb, 3.17693e-02_rb, 3.06832e-02_rb, 2.96745e-02_rb, 2.87374e-02_rb, & + 2.78662e-02_rb, 2.70557e-02_rb, 2.63008e-02_rb, 2.52450e-02_rb, 2.45424e-02_rb, & + 2.38656e-02_rb, 2.32144e-02_rb, 2.25885e-02_rb, 2.19873e-02_rb, 2.14099e-02_rb, & + 2.08554e-02_rb, 2.03230e-02_rb, 1.98116e-02_rb, 1.93203e-02_rb, 1.88482e-02_rb, & + 1.83944e-02_rb, 1.79578e-02_rb, 1.75378e-02_rb, 1.71335e-02_rb, 1.67440e-02_rb, & + 1.63687e-02_rb, 1.60069e-02_rb, 1.56579e-02_rb, 1.53210e-02_rb, 1.49958e-02_rb, & + 1.46815e-02_rb, 1.43778e-02_rb, 1.40841e-02_rb, 1.37999e-02_rb, 1.35249e-02_rb, & + 1.32585e-02_rb, 1.30004e-02_rb, 1.27502e-02_rb/) + absliq1(:,10) = (/ & +! band 10 + 7.97040e-02_rb, 7.63844e-02_rb, 7.36499e-02_rb, 7.13525e-02_rb, 6.93043e-02_rb, & + 6.72807e-02_rb, 6.50227e-02_rb, 6.22395e-02_rb, 5.86093e-02_rb, 5.37815e-02_rb, & + 5.14682e-02_rb, 4.97214e-02_rb, 4.77392e-02_rb, 4.56961e-02_rb, 4.36858e-02_rb, & + 4.17569e-02_rb, 3.99328e-02_rb, 3.82224e-02_rb, 3.66265e-02_rb, 3.51416e-02_rb, & + 3.37617e-02_rb, 3.24798e-02_rb, 3.12887e-02_rb, 3.01812e-02_rb, 2.91505e-02_rb, & + 2.81900e-02_rb, 2.72939e-02_rb, 2.64568e-02_rb, 2.54165e-02_rb, 2.46832e-02_rb, & + 2.39783e-02_rb, 2.33017e-02_rb, 2.26531e-02_rb, 2.20314e-02_rb, 2.14359e-02_rb, & + 2.08653e-02_rb, 2.03187e-02_rb, 1.97947e-02_rb, 1.92924e-02_rb, 1.88106e-02_rb, & + 1.83483e-02_rb, 1.79043e-02_rb, 1.74778e-02_rb, 1.70678e-02_rb, 1.66735e-02_rb, & + 1.62941e-02_rb, 1.59286e-02_rb, 1.55766e-02_rb, 1.52371e-02_rb, 1.49097e-02_rb, & + 1.45937e-02_rb, 1.42885e-02_rb, 1.39936e-02_rb, 1.37085e-02_rb, 1.34327e-02_rb, & + 1.31659e-02_rb, 1.29075e-02_rb, 1.26571e-02_rb/) + absliq1(:,11) = (/ & +! band 11 + 1.49438e-01_rb, 1.33535e-01_rb, 1.21542e-01_rb, 1.11743e-01_rb, 1.03263e-01_rb, & + 9.55774e-02_rb, 8.83382e-02_rb, 8.12943e-02_rb, 7.42533e-02_rb, 6.70609e-02_rb, & + 6.38761e-02_rb, 5.97788e-02_rb, 5.59841e-02_rb, 5.25318e-02_rb, 4.94132e-02_rb, & + 4.66014e-02_rb, 4.40644e-02_rb, 4.17706e-02_rb, 3.96910e-02_rb, 3.77998e-02_rb, & + 3.60742e-02_rb, 3.44947e-02_rb, 3.30442e-02_rb, 3.17079e-02_rb, 3.04730e-02_rb, & + 2.93283e-02_rb, 2.82642e-02_rb, 2.72720e-02_rb, 2.61789e-02_rb, 2.53277e-02_rb, & + 2.45237e-02_rb, 2.37635e-02_rb, 2.30438e-02_rb, 2.23615e-02_rb, 2.17140e-02_rb, & + 2.10987e-02_rb, 2.05133e-02_rb, 1.99557e-02_rb, 1.94241e-02_rb, 1.89166e-02_rb, & + 1.84317e-02_rb, 1.79679e-02_rb, 1.75238e-02_rb, 1.70983e-02_rb, 1.66901e-02_rb, & + 1.62983e-02_rb, 1.59219e-02_rb, 1.55599e-02_rb, 1.52115e-02_rb, 1.48761e-02_rb, & + 1.45528e-02_rb, 1.42411e-02_rb, 1.39402e-02_rb, 1.36497e-02_rb, 1.33690e-02_rb, & + 1.30976e-02_rb, 1.28351e-02_rb, 1.25810e-02_rb/) + absliq1(:,12) = (/ & +! band 12 + 3.71985e-02_rb, 3.88586e-02_rb, 3.99070e-02_rb, 4.04351e-02_rb, 4.04610e-02_rb, & + 3.99834e-02_rb, 3.89953e-02_rb, 3.74886e-02_rb, 3.54551e-02_rb, 3.28870e-02_rb, & + 3.32576e-02_rb, 3.22444e-02_rb, 3.12384e-02_rb, 3.02584e-02_rb, 2.93146e-02_rb, & + 2.84120e-02_rb, 2.75525e-02_rb, 2.67361e-02_rb, 2.59618e-02_rb, 2.52280e-02_rb, & + 2.45327e-02_rb, 2.38736e-02_rb, 2.32487e-02_rb, 2.26558e-02_rb, 2.20929e-02_rb, & + 2.15579e-02_rb, 2.10491e-02_rb, 2.05648e-02_rb, 1.99749e-02_rb, 1.95704e-02_rb, & + 1.91731e-02_rb, 1.87839e-02_rb, 1.84032e-02_rb, 1.80315e-02_rb, 1.76689e-02_rb, & + 1.73155e-02_rb, 1.69712e-02_rb, 1.66362e-02_rb, 1.63101e-02_rb, 1.59928e-02_rb, & + 1.56842e-02_rb, 1.53840e-02_rb, 1.50920e-02_rb, 1.48080e-02_rb, 1.45318e-02_rb, & + 1.42631e-02_rb, 1.40016e-02_rb, 1.37472e-02_rb, 1.34996e-02_rb, 1.32586e-02_rb, & + 1.30239e-02_rb, 1.27954e-02_rb, 1.25728e-02_rb, 1.23559e-02_rb, 1.21445e-02_rb, & + 1.19385e-02_rb, 1.17376e-02_rb, 1.15417e-02_rb/) + + absliq1(:,13) = (/ & +! band 13 + 3.11868e-02_rb, 4.48357e-02_rb, 4.90224e-02_rb, 4.96406e-02_rb, 4.86806e-02_rb, & + 4.69610e-02_rb, 4.48630e-02_rb, 4.25795e-02_rb, 4.02138e-02_rb, 3.78236e-02_rb, & + 3.74266e-02_rb, 3.60384e-02_rb, 3.47074e-02_rb, 3.34434e-02_rb, 3.22499e-02_rb, & + 3.11264e-02_rb, 3.00704e-02_rb, 2.90784e-02_rb, 2.81463e-02_rb, 2.72702e-02_rb, & + 2.64460e-02_rb, 2.56698e-02_rb, 2.49381e-02_rb, 2.42475e-02_rb, 2.35948e-02_rb, & + 2.29774e-02_rb, 2.23925e-02_rb, 2.18379e-02_rb, 2.11793e-02_rb, 2.07076e-02_rb, & + 2.02470e-02_rb, 1.97981e-02_rb, 1.93613e-02_rb, 1.89367e-02_rb, 1.85243e-02_rb, & + 1.81240e-02_rb, 1.77356e-02_rb, 1.73588e-02_rb, 1.69935e-02_rb, 1.66392e-02_rb, & + 1.62956e-02_rb, 1.59624e-02_rb, 1.56393e-02_rb, 1.53259e-02_rb, 1.50219e-02_rb, & + 1.47268e-02_rb, 1.44404e-02_rb, 1.41624e-02_rb, 1.38925e-02_rb, 1.36302e-02_rb, & + 1.33755e-02_rb, 1.31278e-02_rb, 1.28871e-02_rb, 1.26530e-02_rb, 1.24253e-02_rb, & + 1.22038e-02_rb, 1.19881e-02_rb, 1.17782e-02_rb/) + absliq1(:,14) = (/ & +! band 14 + 1.58988e-02_rb, 3.50652e-02_rb, 4.00851e-02_rb, 4.07270e-02_rb, 3.98101e-02_rb, & + 3.83306e-02_rb, 3.66829e-02_rb, 3.50327e-02_rb, 3.34497e-02_rb, 3.19609e-02_rb, & + 3.13712e-02_rb, 3.03348e-02_rb, 2.93415e-02_rb, 2.83973e-02_rb, 2.75037e-02_rb, & + 2.66604e-02_rb, 2.58654e-02_rb, 2.51161e-02_rb, 2.44100e-02_rb, 2.37440e-02_rb, & + 2.31154e-02_rb, 2.25215e-02_rb, 2.19599e-02_rb, 2.14282e-02_rb, 2.09242e-02_rb, & + 2.04459e-02_rb, 1.99915e-02_rb, 1.95594e-02_rb, 1.90254e-02_rb, 1.86598e-02_rb, & + 1.82996e-02_rb, 1.79455e-02_rb, 1.75983e-02_rb, 1.72584e-02_rb, 1.69260e-02_rb, & + 1.66013e-02_rb, 1.62843e-02_rb, 1.59752e-02_rb, 1.56737e-02_rb, 1.53799e-02_rb, & + 1.50936e-02_rb, 1.48146e-02_rb, 1.45429e-02_rb, 1.42782e-02_rb, 1.40203e-02_rb, & + 1.37691e-02_rb, 1.35243e-02_rb, 1.32858e-02_rb, 1.30534e-02_rb, 1.28270e-02_rb, & + 1.26062e-02_rb, 1.23909e-02_rb, 1.21810e-02_rb, 1.19763e-02_rb, 1.17766e-02_rb, & + 1.15817e-02_rb, 1.13915e-02_rb, 1.12058e-02_rb/) + absliq1(:,15) = (/ & +! band 15 + 5.02079e-03_rb, 2.17615e-02_rb, 2.55449e-02_rb, 2.59484e-02_rb, 2.53650e-02_rb, & + 2.45281e-02_rb, 2.36843e-02_rb, 2.29159e-02_rb, 2.22451e-02_rb, 2.16716e-02_rb, & + 2.11451e-02_rb, 2.05817e-02_rb, 2.00454e-02_rb, 1.95372e-02_rb, 1.90567e-02_rb, & + 1.86028e-02_rb, 1.81742e-02_rb, 1.77693e-02_rb, 1.73866e-02_rb, 1.70244e-02_rb, & + 1.66815e-02_rb, 1.63563e-02_rb, 1.60477e-02_rb, 1.57544e-02_rb, 1.54755e-02_rb, & + 1.52097e-02_rb, 1.49564e-02_rb, 1.47146e-02_rb, 1.43684e-02_rb, 1.41728e-02_rb, & + 1.39762e-02_rb, 1.37797e-02_rb, 1.35838e-02_rb, 1.33891e-02_rb, 1.31961e-02_rb, & + 1.30051e-02_rb, 1.28164e-02_rb, 1.26302e-02_rb, 1.24466e-02_rb, 1.22659e-02_rb, & + 1.20881e-02_rb, 1.19131e-02_rb, 1.17412e-02_rb, 1.15723e-02_rb, 1.14063e-02_rb, & + 1.12434e-02_rb, 1.10834e-02_rb, 1.09264e-02_rb, 1.07722e-02_rb, 1.06210e-02_rb, & + 1.04725e-02_rb, 1.03269e-02_rb, 1.01839e-02_rb, 1.00436e-02_rb, 9.90593e-03_rb, & + 9.77080e-03_rb, 9.63818e-03_rb, 9.50800e-03_rb/) + absliq1(:,16) = (/ & +! band 16 + 5.64971e-02_rb, 9.04736e-02_rb, 8.11726e-02_rb, 7.05450e-02_rb, 6.20052e-02_rb, & + 5.54286e-02_rb, 5.03503e-02_rb, 4.63791e-02_rb, 4.32290e-02_rb, 4.06959e-02_rb, & + 3.74690e-02_rb, 3.52964e-02_rb, 3.33799e-02_rb, 3.16774e-02_rb, 3.01550e-02_rb, & + 2.87856e-02_rb, 2.75474e-02_rb, 2.64223e-02_rb, 2.53953e-02_rb, 2.44542e-02_rb, & + 2.35885e-02_rb, 2.27894e-02_rb, 2.20494e-02_rb, 2.13622e-02_rb, 2.07222e-02_rb, & + 2.01246e-02_rb, 1.95654e-02_rb, 1.90408e-02_rb, 1.84398e-02_rb, 1.80021e-02_rb, & + 1.75816e-02_rb, 1.71775e-02_rb, 1.67889e-02_rb, 1.64152e-02_rb, 1.60554e-02_rb, & + 1.57089e-02_rb, 1.53751e-02_rb, 1.50531e-02_rb, 1.47426e-02_rb, 1.44428e-02_rb, & + 1.41532e-02_rb, 1.38734e-02_rb, 1.36028e-02_rb, 1.33410e-02_rb, 1.30875e-02_rb, & + 1.28420e-02_rb, 1.26041e-02_rb, 1.23735e-02_rb, 1.21497e-02_rb, 1.19325e-02_rb, & + 1.17216e-02_rb, 1.15168e-02_rb, 1.13177e-02_rb, 1.11241e-02_rb, 1.09358e-02_rb, & + 1.07525e-02_rb, 1.05741e-02_rb, 1.04003e-02_rb/) + +!jm not thread safe hvrclc = '$Revision: 1.8 $' + + ncbands = 1 + +! This initialization is done in rrtmg_lw_subcol.F90. +! do lay = 1, nlayers +! do ig = 1, ngptlw +! taucmc(ig,lay) = 0.0_rb +! enddo +! enddo + +! Main layer loop + do lay = 1, nlayers + + do ig = 1, ngptlw + cwp = ciwpmc(ig,lay) + clwpmc(ig,lay) + cswpmc(ig,lay) + if (cldfmc(ig,lay) .ge. cldmin .and. & + & (cwp .ge. cldmin .or. taucmc(ig,lay) .ge. cldmin)) then + + +! Ice clouds and water clouds combined. + if (inflag .eq. 0) then +! Cloud optical depth already defined in taucmc, return to main program + return + + elseif(inflag .eq. 1) then + stop 'INFLAG = 1 OPTION NOT AVAILABLE WITH MCICA' +! cwp = ciwpmc(ig,lay) + clwpmc(ig,lay) +! taucmc(ig,lay) = abscld1 * cwp + +! Separate treatement of ice clouds and water clouds. + elseif(inflag .ge. 2) then + radice = reicmc(lay) + +! Calculation of absorption coefficients due to ice clouds. + if ((ciwpmc(ig,lay)+cswpmc(ig,lay)) .eq. 0.0_rb) then + abscoice(ig) = 0.0_rb + abscosno(ig) = 0.0_rb + + elseif (iceflag .eq. 0) then + if (radice .lt. 10.0_rb) stop 'ICE RADIUS TOO SMALL' + abscoice(ig) = absice0(1) + absice0(2)/radice + abscosno(ig) = 0.0_rb + + elseif (iceflag .eq. 1) then + if (radice .lt. 13.0_rb .or. radice .gt. 130._rb) stop& + & 'ICE RADIUS OUT OF BOUNDS' + ncbands = 5 + ib = icb(ngb(ig)) + abscoice(ig) = absice1(1,ib) + absice1(2,ib)/radice + abscosno(ig) = 0.0_rb + +! For iceflag=2 option, ice particle effective radius is limited to 5.0 to 131.0 microns + + elseif (iceflag .eq. 2) then + if (radice .lt. 5.0_rb .or. radice .gt. 131.0_rb) stop& + & 'ICE RADIUS OUT OF BOUNDS' + ncbands = 16 + factor = (radice - 2._rb)/3._rb + index = int(factor) + if (index .eq. 43) index = 42 + fint = factor - float(index) + ib = ngb(ig) + abscoice(ig) = & + & absice2(index,ib) + fint * & + & (absice2(index+1,ib) - (absice2(index,ib))) + abscosno(ig) = 0.0_rb + +! For iceflag=3 option, ice particle generalized effective size is limited to 5.0 to 140.0 microns + + elseif (iceflag .ge. 3) then + if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) then + write(errmess,'(A,i5,i5,f8.2,f8.2)' ) & + & 'ERROR: ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' & + & ,ig, lay, ciwpmc(ig,lay), radice + !mz call wrf_error_fatal(errmess) + end if + ncbands = 16 + factor = (radice - 2._rb)/3._rb + index = int(factor) + if (index .eq. 46) index = 45 + fint = factor - float(index) + ib = ngb(ig) + abscoice(ig) = & + & absice3(index,ib) + fint * & + & (absice3(index+1,ib) - (absice3(index,ib))) + abscosno(ig) = 0.0_rb + + endif + +!..Incorporate additional effects due to snow. + if (cswpmc(ig,lay).gt.0.0_rb .and. iceflag .eq. 5) then + radsno = resnmc(lay) + if (radsno .lt. 5.0_rb .or. radsno .gt. 140.0_rb) then + write(errmess,'(A,i5,i5,f8.2,f8.2)' ) & + & 'ERROR: SNOW GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' & + & ,ig, lay, cswpmc(ig,lay), radsno + !mz call wrf_error_fatal(errmess) + end if + ncbands = 16 + factor = (radsno - 2._rb)/3._rb + index = int(factor) + if (index .eq. 46) index = 45 + fint = factor - float(index) + ib = ngb(ig) + abscosno(ig) = & + & absice3(index,ib) + fint * & + & (absice3(index+1,ib) - (absice3(index,ib))) + endif + + + +! Calculation of absorption coefficients due to water clouds. + if (clwpmc(ig,lay) .eq. 0.0_rb) then + abscoliq(ig) = 0.0_rb + + elseif (liqflag .eq. 0) then + abscoliq(ig) = absliq0 + + elseif (liqflag .eq. 1) then + radliq = relqmc(lay) + if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) stop & + & 'LIQUID EFFECTIVE RADIUS OUT OF BOUNDS' + index = int(radliq - 1.5_rb) + if (index .eq. 0) index = 1 + if (index .eq. 58) index = 57 + fint = radliq - 1.5_rb - float(index) + ib = ngb(ig) + abscoliq(ig) = & + & absliq1(index,ib) + fint * & + & (absliq1(index+1,ib) - (absliq1(index,ib))) + endif + + taucmc(ig,lay) = ciwpmc(ig,lay) * abscoice(ig) + & + & clwpmc(ig,lay) * abscoliq(ig) + & + & cswpmc(ig,lay) * abscosno(ig) + + endif + endif + enddo + enddo + + end subroutine cldprmc + + +!........................................!$ + end module rrtmg_lw !$ +!========================================!$ diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 new file mode 100644 index 000000000..cd7705d3f --- /dev/null +++ b/physics/radsw_main.F90 @@ -0,0 +1,6339 @@ +!> \file radsw_main.f +!! This file contains NCEP's modifications of the rrtmg-sw radiation +!! code from AER. + +! ============================================================== !!!!! +! sw-rrtm3 radiation package description !!!!! +! ============================================================== !!!!! +! ! +! this package includes ncep's modifications of the rrtm-sw radiation ! +! code from aer inc. ! +! ! +! the sw-rrtm3 package includes these parts: ! +! ! +! 'radsw_rrtm3_param.f' ! +! 'radsw_rrtm3_datatb.f' ! +! 'radsw_rrtm3_main.f' ! +! ! +! the 'radsw_rrtm3_param.f' contains: ! +! ! +! 'module_radsw_parameters' -- band parameters set up ! +! ! +! the 'radsw_rrtm3_datatb.f' contains: ! +! ! +! 'module_radsw_ref' -- reference temperature and pressure ! +! 'module_radsw_cldprtb' -- cloud property coefficients table ! +! 'module_radsw_sflux' -- spectral distribution of solar flux ! +! 'module_radsw_kgbnn' -- absorption coeffients for 14 ! +! bands, where nn = 16-29 ! +! ! +! the 'radsw_rrtm3_main.f' contains: ! +! ! +! 'rrtmg_sw' -- main sw radiation transfer ! +! ! +! in the main module 'rrtmg_sw' there are only two ! +! externally callable subroutines: ! +! ! +! 'swrad' -- main sw radiation routine ! +! inputs: ! +! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, ! +! clouds,icseed,aerosols,sfcalb, ! +! dzlyr,delpin,de_lgth, ! +! cosz,solcon,NDAY,idxday, ! +! npts, nlay, nlp1, lprnt, ! +! outputs: ! +! hswc,topflx,sfcflx,cldtau, ! +!! optional outputs: ! +! HSW0,HSWB,FLXPRF,FDNCMP) ! +! ) ! +! ! +! 'rswinit' -- initialization routine ! +! inputs: ! +! ( me ) ! +! outputs: ! +! (none) ! +! ! +! all the sw radiation subprograms become contained subprograms ! +! in module 'rrtmg_sw' and many of them are not directly ! +! accessable from places outside the module. ! +! ! +! derived data type constructs used: ! +! ! +! 1. radiation flux at toa: (from module 'module_radsw_parameters') ! +! topfsw_type - derived data type for toa rad fluxes ! +! upfxc total sky upward flux at toa ! +! dnfxc total sky downward flux at toa ! +! upfx0 clear sky upward flux at toa ! +! ! +! 2. radiation flux at sfc: (from module 'module_radsw_parameters') ! +! sfcfsw_type - derived data type for sfc rad fluxes ! +! upfxc total sky upward flux at sfc ! +! dnfxc total sky downward flux at sfc ! +! upfx0 clear sky upward flux at sfc ! +! dnfx0 clear sky downward flux at sfc ! +! ! +! 3. radiation flux profiles(from module 'module_radsw_parameters') ! +! profsw_type - derived data type for rad vertical prof ! +! upfxc level upward flux for total sky ! +! dnfxc level downward flux for total sky ! +! upfx0 level upward flux for clear sky ! +! dnfx0 level downward flux for clear sky ! +! ! +! 4. surface component fluxes(from module 'module_radsw_parameters' ! +! cmpfsw_type - derived data type for component sfc flux ! +! uvbfc total sky downward uv-b flux at sfc ! +! uvbf0 clear sky downward uv-b flux at sfc ! +! nirbm surface downward nir direct beam flux ! +! nirdf surface downward nir diffused flux ! +! visbm surface downward uv+vis direct beam flx ! +! visdf surface downward uv+vis diffused flux ! +! ! +! external modules referenced: ! +! ! +! 'module physparam' ! +! 'module physcons' ! +! 'mersenne_twister' ! +! ! +! compilation sequence is: ! +! ! +! 'radsw_rrtm3_param.f' ! +! 'radsw_rrtm3_datatb.f' ! +! 'radsw_rrtm3_main.f' ! +! ! +! and all should be put in front of routines that use sw modules ! +! ! +!==========================================================================! +! ! +! the original program declarations: ! +! ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! ! +! Copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). ! +! This software may be used, copied, or redistributed as long as it is ! +! not sold and this copyright notice is reproduced on each copy made. ! +! This model is provided as is without any express or implied warranties. ! +! (http://www.rtweb.aer.com/) ! +! ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! ! +! ************************************************************************ ! +! ! +! rrtmg_sw ! +! ! +! ! +! a rapid radiative transfer model ! +! for the solar spectral region ! +! atmospheric and environmental research, inc. ! +! 131 hartwell avenue ! +! lexington, ma 02421 ! +! ! +! eli j. mlawer ! +! jennifer s. delamere ! +! michael j. iacono ! +! shepard a. clough ! +! ! +! ! +! email: miacono@aer.com ! +! email: emlawer@aer.com ! +! email: jdelamer@aer.com ! +! ! +! the authors wish to acknowledge the contributions of the ! +! following people: steven j. taubman, patrick d. brown, ! +! ronald e. farren, luke chen, robert bergstrom. ! +! ! +! ************************************************************************ ! +! ! +! references: ! +! (rrtm_sw/rrtmg_sw): ! +! clough, s.a., m.w. shephard, e.j. mlawer, j.s. delamere, ! +! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: ! +! atmospheric radiative transfer modeling: a summary of the aer ! +! codes, j. quant. spectrosc. radiat. transfer, 91, 233-244, 2005. ! +! ! +! (mcica): ! +! pincus, r., h. w. barker, and j.-j. morcrette: a fast, flexible, ! +! approximation technique for computing radiative transfer in ! +! inhomogeneous cloud fields, j. geophys. res., 108(d13), 4376, ! +! doi:10.1029/2002jd003322, 2003. ! +! ! +! ************************************************************************ ! +! ! +! aer's revision history: ! +! this version of rrtmg_sw has been modified from rrtm_sw to use a ! +! reduced set of g-point intervals and a two-stream model for ! +! application to gcms. ! +! ! +! -- original version (derived from rrtm_sw) ! +! 2002: aer. inc. ! +! -- conversion to f90 formatting; addition of 2-stream radiative transfer! +! feb 2003: j.-j. morcrette, ecmwf ! +! -- additional modifications for gcm application ! +! aug 2003: m. j. iacono, aer inc. ! +! -- total number of g-points reduced from 224 to 112. original ! +! set of 224 can be restored by exchanging code in module parrrsw.f90 ! +! and in file rrtmg_sw_init.f90. ! +! apr 2004: m. j. iacono, aer, inc. ! +! -- modifications to include output for direct and diffuse ! +! downward fluxes. there are output as "true" fluxes without ! +! any delta scaling applied. code can be commented to exclude ! +! this calculation in source file rrtmg_sw_spcvrt.f90. ! +! jan 2005: e. j. mlawer, m. j. iacono, aer, inc. ! +! -- revised to add mcica capability. ! +! nov 2005: m. j. iacono, aer, inc. ! +! -- reformatted for consistency with rrtmg_lw. ! +! feb 2007: m. j. iacono, aer, inc. ! +! -- modifications to formatting to use assumed-shape arrays. ! +! aug 2007: m. j. iacono, aer, inc. ! +! ! +! ************************************************************************ ! +! ! +! ncep modifications history log: ! +! ! +! sep 2003, yu-tai hou -- received aer's rrtm-sw gcm version ! +! code (v224) ! +! nov 2003, yu-tai hou -- corrected errors in direct/diffuse ! +! surface alabedo components. ! +! jan 2004, yu-tai hou -- modified code into standard modular! +! f9x code for ncep models. the original three cloud ! +! control flags are simplified into two: iflagliq and ! +! iflagice. combined the org subr sw_224 and setcoef ! +! into radsw (the main program); put all kgb##together ! +! and reformat into a separated data module; combine ! +! reftra and vrtqdr as swflux; optimized taumol and all ! +! taubgs to form a contained subroutines. ! +! jun 2004, yu-tai hou -- modified code based on aer's faster! +! version rrtmg_sw (v2.0) with 112 g-points. ! +! mar 2005, yu-tai hou -- modified to aer v2.3, correct cloud! +! scaling error, total sky properties are delta scaled ! +! after combining clear and cloudy parts. the testing ! +! criterion of ssa is saved before scaling. added cloud ! +! layer rain and snow contributions. all cloud water ! +! partical contents are treated the same way as other ! +! atmos particles. ! +! apr 2005, yu-tai hou -- modified on module structures (this! +! version of code was given back to aer in jun 2006) ! +! nov 2006, yu-tai hou -- modified code to include the ! +! generallized aerosol optical property scheme for gcms.! +! apr 2007, yu-tai hou -- added spectral band heating as an ! +! optional output to support the 500km model's upper ! +! stratospheric radiation calculations. restructure ! +! optional outputs for easy access by different models. ! +! oct 2008, yu-tai hou -- modified to include new features ! +! from aer's newer release v3.5-v3.61, including mcica ! +! sub-grid cloud option and true direct/diffuse fluxes ! +! without delta scaling. added rain/snow opt properties ! +! support to cloudy sky calculations. simplified and ! +! unified sw and lw sub-column cloud subroutines into ! +! one module by using optional parameters. ! +! mar 2009, yu-tai hou -- replaced the original random number! +! generator coming with the original code with ncep w3 ! +! library to simplify the program and moved sub-column ! +! cloud subroutines inside the main module. added ! +! option of user provided permutation seeds that could ! +! be randomly generated from forecast time stamp. ! +! mar 2009, yu-tai hou -- replaced random number generator ! +! programs coming from the original code with the ncep ! +! w3 library to simplify the program and moved sub-col ! +! cloud subroutines inside the main module. added ! +! option of user provided permutation seeds that could ! +! be randomly generated from forecast time stamp. ! +! nov 2009, yu-tai hou -- updated to aer v3.7-v3.8 version. ! +! notice the input cloud ice/liquid are assumed as ! +! in-cloud quantities, not grid average quantities. ! +! aug 2010, yu-tai hou -- uptimized code to improve efficiency +! splited subroutine spcvrt into two subs, spcvrc and ! +! spcvrm, to handling non-mcica and mcica type of calls.! +! apr 2012, b. ferrier and y. hou -- added conversion factor to fu's! +! cloud-snow optical property scheme. ! +! jul 2012, s. moorthi and Y. hou -- eliminated the pointer array ! +! in subr 'spcvrt' for multi-threading issue running ! +! under intel's fortran compiler. ! +! nov 2012, yu-tai hou -- modified control parameters thru ! +! module 'physparam'. ! +! jun 2013, yu-tai hou -- moving band 9 surface treatment ! +! back as in the rrtm2 version, spliting surface flux ! +! into two spectral regions (vis & nir), instead of ! +! designated it in nir region only. ! +! may 2016 yu-tai hou --reverting swflux name back to vrtqdr! +! jun 2018 yu-tai hou --updated cloud optical coeffs with ! +! aer's newer version v3.9-v4.0 for hu and stamnes ! +! scheme. (used if iswcliq=2); added new option of ! +! cloud overlap method 'de-correlation-length'. ! +! ! +!!!!! ============================================================== !!!!! +!!!!! end descriptions !!!!! +!!!!! ============================================================== !!!!! + +!> This module contains the CCPP-compliant NCEP's modifications of the rrtm-sw radiation +!! code from aer inc. + module rrtmg_sw +! + use physparam, only : iswrate, iswrgas, iswcice, & !mz: iswcliq + & icldflg, ivflip, & + & iswmode + use physcons, only : con_g, con_cp, con_avgd, con_amd, & + & con_amw, con_amo3 + use machine, only : rb => kind_phys, im => kind_io4, & + & kind_phys + + use module_radsw_parameters + use mersenne_twister, only : random_setseed, random_number, & + & random_stat + use module_radsw_ref, only : preflog, tref + use module_radsw_sflux +! + implicit none +! + private +! +! --- version tag and last revision date + character(40), parameter :: & + & VTAGSW='NCEP SW v5.1 Nov 2012 -RRTMG-SW v3.8 ' +! & VTAGSW='NCEP SW v5.0 Aug 2012 -RRTMG-SW v3.8 ' +! & VTAGSW='RRTMG-SW v3.8 Nov 2009' +! & VTAGSW='RRTMG-SW v3.7 Nov 2009' +! & VTAGSW='RRTMG-SW v3.61 Oct 2008' +! & VTAGSW='RRTMG-SW v3.5 Oct 2008' +! & VTAGSW='RRTM-SW 112v2.3 Apr 2007' +! & VTAGSW='RRTM-SW 112v2.3 Mar 2005' +! & VTAGSW='RRTM-SW 112v2.0 Jul 2004' + +! \name constant values + + real (kind=kind_phys), parameter :: eps = 1.0e-6 + real (kind=kind_phys), parameter :: oneminus= 1.0 - eps +! pade approx constant + real (kind=kind_phys), parameter :: bpade = 1.0/0.278 + real (kind=kind_phys), parameter :: stpfac = 296.0/1013.0 + real (kind=kind_phys), parameter :: ftiny = 1.0e-12 + real (kind=kind_phys), parameter :: flimit = 1.0e-20 +! internal solar constant + real (kind=kind_phys), parameter :: s0 = 1368.22 + + real (kind=kind_phys), parameter :: f_zero = 0.0 + real (kind=kind_phys), parameter :: f_one = 1.0 + +! \name atomic weights for conversion from mass to volume mixing ratios + real (kind=kind_phys), parameter :: amdw = con_amd/con_amw + real (kind=kind_phys), parameter :: amdo3 = con_amd/con_amo3 + +! \name band indices + integer, dimension(nblow:nbhgh) :: nspa, nspb +! band index for sfc flux + integer, dimension(nblow:nbhgh) :: idxsfc +! band index for cld prop + integer, dimension(nblow:nbhgh) :: idxebc + + data nspa(:) / 9, 9, 9, 9, 1, 9, 9, 1, 9, 1, 0, 1, 9, 1 / + data nspb(:) / 1, 5, 1, 1, 1, 5, 1, 0, 1, 0, 0, 1, 5, 1 / + +! data idxsfc(:) / 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1 / ! band index for sfc flux + data idxsfc(:) / 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1 / ! band index for sfc flux + data idxebc(:) / 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 5 / ! band index for cld prop + +! --- band wavenumber intervals +! real (kind=kind_phys), dimension(nblow:nbhgh):: wavenum1,wavenum2 +! data wavenum1(:) / & +! & 2600.0, 3250.0, 4000.0, 4650.0, 5150.0, 6150.0, 7700.0, & +! & 8050.0,12850.0,16000.0,22650.0,29000.0,38000.0, 820.0 / +! data wavenum2(:) / & +! 3250.0, 4000.0, 4650.0, 5150.0, 6150.0, 7700.0, 8050.0, & +! & 12850.0,16000.0,22650.0,29000.0,38000.0,50000.0, 2600.0 / +! real (kind=kind_phys), dimension(nblow:nbhgh) :: delwave +! data delwave(:) / & +! & 650.0, 750.0, 650.0, 500.0, 1000.0, 1550.0, 350.0, & +! & 4800.0, 3150.0, 6650.0, 6350.0, 9000.0,12000.0, 1780.0 / + +! uv-b band index + integer, parameter :: nuvb = 27 + +!\name logical flags for optional output fields + logical :: lhswb = .false. + logical :: lhsw0 = .false. + logical :: lflxprf= .false. + logical :: lfdncmp= .false. + + +! those data will be set up only once by "rswinit" + real (kind=kind_phys) :: exp_tbl(0:NTBMX) + + +! the factor for heating rates (in k/day, or k/sec set by subroutine +!! 'rswinit') + real (kind=kind_phys) :: heatfac + + +! initial permutation seed used for sub-column cloud scheme + integer, parameter :: ipsdsw0 = 1 + +! --- public accessable subprograms + + public rrtmg_sw_init, rrtmg_sw_run, rrtmg_sw_finalize, rswinit, & + & kissvec, generate_stochastic_clouds_sw,mcica_subcol_sw + + +! ================= + contains +! ================= + + subroutine rrtmg_sw_init () + end subroutine rrtmg_sw_init + +!> \defgroup module_radsw_main GFS RRTMG Shortwave Module +!! This module includes NCEP's modifications of the RRTMG-SW radiation +!! code from AER. +!! +!! The SW radiation model in the current NOAA Environmental Modeling +!! System (NEMS) was adapted from the RRTM radiation model developed by +!! AER Inc. (\cite clough_et_al_2005; \cite mlawer_et_al_1997). It contains 14 +!! spectral bands spanning a spectral wavenumber range of +!! \f$50000-820 cm^{-1}\f$ (corresponding to a wavelength range +!! \f$0.2-12.2\mu m\f$), each spectral band focuses on a specific set of +!! atmospheric absorbing species as shown in Table 1. To achieve great +!! computation efficiency while at the same time to maintain a high +!! degree of accuracy, the RRTM radiation model employs a corrected-k +!! distribution method (i.e. mapping the highly spectral changing +!! absorption coefficient, k, into a monotonic and smooth varying +!! cumulative probability function, g). In the RRTM-SW, there are 16 +!! unevenly distributed g points for each of the 14 bands for a total +!! of 224 g points. The GCM version of the code (RRTMG-SW) uses a reduced +!! number (various between 2 to 16) of g points for each of the bands +!! that totals to 112 instead of the full set of 224. To get high +!! quality for the scheme, many advanced techniques are used in RRTM +!! such as carefully selecting the band structure to handle various +!! major (key-species) and minor absorbers; deriving a binary parameter +!! for a paired key molecular species in the same domain; and using two +!! pressure regions (dividing level is at about 96mb) for optimal +!! treatment of various species, etc. +!!\tableofcontents +!! Table 1. RRTMG-SW spectral bands and the corresponding absorbing species +!! |Band #| Wavenumber Range | Lower Atm (Key)| Lower Atm (Minor)| Mid/Up Atm (Key)| Mid/Up Atm (Minor)| +!! |------|------------------|----------------|------------------|-----------------|-------------------| +!! | 16 | 2600-3250 |H2O,CH4 | |CH4 | | +!! | 17 | 3250-4000 |H2O,CO2 | |H2O,CO2 | | +!! | 18 | 4000-4650 |H2O,CH4 | |CH4 | | +!! | 19 | 4650-5150 |H2O,CO2 | |CO2 | | +!! | 20 | 5150-6150 |H2O |CH4 |H2O |CH4 | +!! | 21 | 6150-7700 |H2O,CO2 | |H2O,CO2 | | +!! | 22 | 7700-8050 |H2O,O2 | |O2 | | +!! | 23 | 8050-12850 |H2O | |--- | | +!! | 24 | 12850-16000 |H2O,O2 |O3 |O2 |O3 | +!! | 25 | 16000-22650 |H2O |O3 |--- |O3 | +!! | 26 | 22650-29000 |--- | |--- | | +!! | 27 | 29000-38000 |O3 | |O3 | | +!! | 28 | 38000-50000 |O3,O2 | |O3,O2 | | +!! | 29 | 820-2600 |H2O |CO2 |CO2 |H2O | +!!\tableofcontents +!! +!! The RRTM-SW package includes three files: +!! - radsw_param.f, which contains: +!! - module_radsw_parameters: specifies major parameters of the spectral +!! bands and defines the construct structures of derived-type variables +!! for holding the output results. +!! - radsw_datatb.f, which contains: +!! - module_radsw_ref: reference temperature and pressure +!! - module_radsw_cldprtb: cloud property coefficients table +!! - module_radsw_sflux: indexes and coefficients for spectral +!! distribution of solar flux +!! - module_radsw_kgbnn: absorption coefficents for 14 bands, where +!! nn = 16-29 +!! - radsw_main.f, which contains: +!! - rrtmg_sw_run(): the main SW radiation routine +!! - rswinit(): the initialization routine +!! +!!\author Eli J. Mlawer, emlawer@aer.com +!!\author Jennifer S. Delamere, jdelamer@aer.com +!!\author Michael J. Iacono, miacono@aer.com +!!\author Shepard A. Clough +!!\version NCEP SW v5.1 Nov 2012 -RRTMG-SW v3.8 +!! +!! The authors wish to acknowledge the contributions of the +!! following people: Steven J. Taubman, Karen Cady-Pereira, +!! Patrick D. Brown, Ronald E. Farren, Luke Chen, Robert Bergstrom. +!! +!!\copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). +!! This software may be used, copied, or redistributed as long as it is +!! not sold and this copyright notice is reproduced on each copy made. +!! This model is provided as is without any express or implied warranties. +!! (http://www.rtweb.aer.com/) +!! +!> \section arg_table_rrtmg_sw_run Argument Table +!! \htmlinclude rrtmg_sw_run.html +!! +!> \section gen_swrad RRTMG Shortwave Radiation Scheme General Algorithm +!> @{ +!----------------------------------- + subroutine rrtmg_sw_run & + & ( plyr,plvl,tlyr,tlvl,qlyr,olyr, & + & gasvmr_co2,gasvmr_n2o,gasvmr_ch4,gasvmr_o2,gasvmr_co, & + & gasvmr_cfc11,gasvmr_cfc12,gasvmr_cfc22,gasvmr_ccl4, & ! --- inputs + & icseed, aeraod, aerssa, aerasy, & + & sfcalb_nir_dir, sfcalb_nir_dif, & + & sfcalb_uvis_dir, sfcalb_uvis_dif, & + & dzlyr,delpin,de_lgth, iswcliq, iovrsw, isubcsw, & + & cosz,solcon,NDAY,idxday, & + & npts, nlay, nlp1, lprnt, & + & cld_cf, lsswr, & + & hswc,topflx,sfcflx,cldtau, & ! --- outputs + & HSW0,HSWB,FLXPRF,FDNCMP, & ! --- optional + & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & + & cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, & + & cld_od, cld_ssa, cld_asy,mpirank,mpiroot, errmsg, errflg ) + +! ==================== defination of variables ==================== ! +! ! +! input variables: ! +! plyr (npts,nlay) : model layer mean pressure in mb ! +! plvl (npts,nlp1) : model level pressure in mb ! +! tlyr (npts,nlay) : model layer mean temperature in k ! +! tlvl (npts,nlp1) : model level temperature in k (not in use) ! +! qlyr (npts,nlay) : layer specific humidity in gm/gm *see inside ! +! olyr (npts,nlay) : layer ozone concentration in gm/gm ! +! gasvmr(npts,nlay,:): atmospheric constent gases: ! +! (check module_radiation_gases for definition) ! +! gasvmr(:,:,1) - co2 volume mixing ratio ! +! gasvmr(:,:,2) - n2o volume mixing ratio ! +! gasvmr(:,:,3) - ch4 volume mixing ratio ! +! gasvmr(:,:,4) - o2 volume mixing ratio ! +! gasvmr(:,:,5) - co volume mixing ratio (not used) ! +! gasvmr(:,:,6) - cfc11 volume mixing ratio (not used) ! +! gasvmr(:,:,7) - cfc12 volume mixing ratio (not used) ! +! gasvmr(:,:,8) - cfc22 volume mixing ratio (not used) ! +! gasvmr(:,:,9) - ccl4 volume mixing ratio (not used) ! +! clouds(npts,nlay,:): cloud profile ! +! (check module_radiation_clouds for definition) ! +! clouds(:,:,1) - layer total cloud fraction ! +! clouds(:,:,2) - layer in-cloud liq water path (g/m**2) ! +! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! +! clouds(:,:,4) - layer in-cloud ice water path (g/m**2) ! +! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! +! clouds(:,:,6) - layer rain drop water path (g/m**2) ! +! clouds(:,:,7) - mean eff radius for rain drop (micron) ! +! clouds(:,:,8) - layer snow flake water path (g/m**2) ! +! clouds(:,:,9) - mean eff radius for snow flake (micron) ! +! icseed(npts) : auxiliary special cloud related array ! +! when module variable isubcsw=2, it provides ! +! permutation seed for each column profile that ! +! are used for generating random numbers. ! +! when isubcsw /=2, it will not be used. ! +! aerosols(npts,nlay,nbdsw,:) : aerosol optical properties ! +! (check module_radiation_aerosols for definition) ! +! (:,:,:,1) - optical depth ! +! (:,:,:,2) - single scattering albedo ! +! (:,:,:,3) - asymmetry parameter ! +! sfcalb(npts, : ) : surface albedo in fraction ! +! (check module_radiation_surface for definition) ! +! ( :, 1 ) - near ir direct beam albedo ! +! ( :, 2 ) - near ir diffused albedo ! +! ( :, 3 ) - uv+vis direct beam albedo ! +! ( :, 4 ) - uv+vis diffused albedo ! +! dzlyr(npts,nlay) : layer thickness in km ! +! delpin(npts,nlay): layer pressure thickness (mb) ! +! de_lgth(npts) : clouds decorrelation length (km) ! +! cosz (npts) : cosine of solar zenith angle ! +! solcon : solar constant (w/m**2) ! +! NDAY : num of daytime points ! +! idxday(npts) : index array for daytime points ! +! npts : number of horizontal points ! +! nlay,nlp1 : vertical layer/lavel numbers ! +! lprnt : logical check print flag ! +! ! +! output variables: ! +! hswc (npts,nlay): total sky heating rates (k/sec or k/day) ! +! topflx(npts) : radiation fluxes at toa (w/m**2), components: ! +! (check module_radsw_parameters for definition) ! +! upfxc - total sky upward flux at toa ! +! dnflx - total sky downward flux at toa ! +! upfx0 - clear sky upward flux at toa ! +! sfcflx(npts) : radiation fluxes at sfc (w/m**2), components: ! +! (check module_radsw_parameters for definition) ! +! upfxc - total sky upward flux at sfc ! +! dnfxc - total sky downward flux at sfc ! +! upfx0 - clear sky upward flux at sfc ! +! dnfx0 - clear sky downward flux at sfc ! +! cldtau(npts,nlay): spectral band layer cloud optical depth (~0.55 mu) +! ! +!!optional outputs variables: ! +! hswb(npts,nlay,nbdsw): spectral band total sky heating rates ! +! hsw0 (npts,nlay): clear sky heating rates (k/sec or k/day) ! +! flxprf(npts,nlp1): level radiation fluxes (w/m**2), components: ! +! (check module_radsw_parameters for definition) ! +! dnfxc - total sky downward flux at interface ! +! upfxc - total sky upward flux at interface ! +! dnfx0 - clear sky downward flux at interface ! +! upfx0 - clear sky upward flux at interface ! +! fdncmp(npts) : component surface downward fluxes (w/m**2): ! +! (check module_radsw_parameters for definition) ! +! uvbfc - total sky downward uv-b flux at sfc ! +! uvbf0 - clear sky downward uv-b flux at sfc ! +! nirbm - downward surface nir direct beam flux ! +! nirdf - downward surface nir diffused flux ! +! visbm - downward surface uv+vis direct beam flux ! +! visdf - downward surface uv+vis diffused flux ! +! ! +! external module variables: (in physparam) ! +! iswrgas - control flag for rare gases (ch4,n2o,o2, etc.) ! +! =0: do not include rare gases ! +! >0: include all rare gases ! +! iswcliq - control flag for liq-cloud optical properties ! +! =0: input cloud optical depth, fixed ssa, asy ! +! =1: use hu and stamnes(1993) method for liq cld ! +! =2: use updated coeffs for hu and stamnes scheme ! +! iswcice - control flag for ice-cloud optical properties ! +! *** if iswcliq==0, iswcice is ignored ! +! =1: use ebert and curry (1992) scheme for ice clouds ! +! =2: use streamer v3.0 (2001) method for ice clouds ! +! =3: use fu's method (1996) for ice clouds ! +! iswmode - control flag for 2-stream transfer scheme ! +! =1; delta-eddington (joseph et al., 1976) ! +! =2: pifm (zdunkowski et al., 1980) ! +! =3: discrete ordinates (liou, 1973) ! +! isubcsw - sub-column cloud approximation control flag ! +! =0: no sub-col cld treatment, use grid-mean cld quantities ! +! =1: mcica sub-col, prescribed seeds to get random numbers ! +! =2: mcica sub-col, providing array icseed for random numbers! +! iovrsw - cloud overlapping control flag ! +! =0: random overlapping clouds ! +! =1: maximum/random overlapping clouds ! +! =2: maximum overlap cloud ! +! =3: decorrelation-length overlap clouds ! +! =4: exponential overlapping clouds +! ivflip - control flg for direction of vertical index ! +! =0: index from toa to surface ! +! =1: index from surface to toa ! +! ! +! module parameters, control variables: ! +! nblow,nbhgh - lower and upper limits of spectral bands ! +! maxgas - maximum number of absorbing gaseous ! +! ngptsw - total number of g-point subintervals ! +! ng## - number of g-points in band (##=16-29) ! +! ngb(ngptsw) - band indices for each g-point ! +! bpade - pade approximation constant (1/0.278) ! +! nspa,nspb(nblow:nbhgh) ! +! - number of lower/upper ref atm's per band ! +! ipsdsw0 - permutation seed for mcica sub-col clds ! +! ! +! major local variables: ! +! pavel (nlay) - layer pressures (mb) ! +! delp (nlay) - layer pressure thickness (mb) ! +! tavel (nlay) - layer temperatures (k) ! +! coldry (nlay) - dry air column amount ! +! (1.e-20*molecules/cm**2) ! +! cldfrc (nlay) - layer cloud fraction (norm by tot cld) ! +! cldfmc (nlay,ngptsw) - layer cloud fraction for g-point ! +! taucw (nlay,nbdsw) - cloud optical depth ! +! ssacw (nlay,nbdsw) - cloud single scattering albedo (weighted) ! +! asycw (nlay,nbdsw) - cloud asymmetry factor (weighted) ! +! tauaer (nlay,nbdsw) - aerosol optical depths ! +! ssaaer (nlay,nbdsw) - aerosol single scattering albedo ! +! asyaer (nlay,nbdsw) - aerosol asymmetry factor ! +! colamt (nlay,maxgas) - column amounts of absorbing gases ! +! 1 to maxgas are for h2o, co2, o3, n2o, ! +! ch4, o2, co, respectively (mol/cm**2) ! +! facij (nlay) - indicator of interpolation factors ! +! =0/1: indicate lower/higher temp & height ! +! selffac(nlay) - scale factor for self-continuum, equals ! +! (w.v. density)/(atm density at 296K,1013 mb) ! +! selffrac(nlay) - factor for temp interpolation of ref ! +! self-continuum data ! +! indself(nlay) - index of the lower two appropriate ref ! +! temp for the self-continuum interpolation ! +! forfac (nlay) - scale factor for w.v. foreign-continuum ! +! forfrac(nlay) - factor for temp interpolation of ref ! +! w.v. foreign-continuum data ! +! indfor (nlay) - index of the lower two appropriate ref ! +! temp for the foreign-continuum interp ! +! laytrop - layer at which switch is made from one ! +! combination of key species to another ! +! jp(nlay),jt(nlay),jt1(nlay) ! +! - lookup table indexes ! +! flxucb(nlp1,nbdsw) - spectral bnd total-sky upward flx (w/m2) ! +! flxdcb(nlp1,nbdsw) - spectral bnd total-sky downward flx (w/m2)! +! flxu0b(nlp1,nbdsw) - spectral bnd clear-sky upward flx (w/m2) ! +! flxd0b(nlp1,nbdsw) - spectral b d clear-sky downward flx (w/m2)! +! ! +! ! +! ===================== end of definitions ==================== ! + +! --- inputs: + integer, intent(in) :: npts, nlay, nlp1, NDAY + integer, intent(in) :: iswcliq,iovrsw,isubcsw + + integer, dimension(:), intent(in) :: idxday, icseed + + logical, intent(in) :: lprnt, lsswr + + real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: & + & plvl, tlvl + real (kind=kind_phys), dimension(npts,nlay), intent(in) :: & + & plyr, tlyr, qlyr, olyr, dzlyr, delpin + + real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_nir_dir + real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_nir_dif + real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_uvis_dir + real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_uvis_dif + + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co2 + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_n2o + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_ch4 + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_o2 + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc11 + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc12 + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc22 + real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_ccl4 + + real (kind=kind_phys), dimension(npts,nlay),intent(in):: cld_cf + real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & + & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & + & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, & + & cld_od, cld_ssa, cld_asy + + real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aeraod + real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aerssa + real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aerasy + + real (kind=kind_phys), intent(in) :: cosz(npts), solcon, & + & de_lgth(npts) + + integer, intent(in) :: mpirank,mpiroot +! --- outputs: + real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hswc + real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & + & cldtau + + type (topfsw_type), dimension(npts), intent(inout) :: topflx + type (sfcfsw_type), dimension(npts), intent(inout) :: sfcflx + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +!! --- optional outputs: + real (kind=kind_phys), dimension(npts,nlay,nbdsw), optional, & + & intent(inout) :: hswb + + real (kind=kind_phys), dimension(npts,nlay), optional, & + & intent(inout) :: hsw0 + type (profsw_type), dimension(npts,nlp1), optional, & + & intent(inout) :: flxprf + type (cmpfsw_type), dimension(npts), optional, & + & intent(inout) :: fdncmp + +! --- locals: +!mz* HWRF -- input of mcica_subcol_sw + real(kind=kind_phys),dimension(1,nlay) :: hgt + real(kind=kind_phys) :: dzsum + real(kind=kind_phys),dimension( nbdsw, 1, nlay ) :: taucld3, & + ssacld3, & + asmcld3, & + fsfcld3 + +!mz* HWRF -- OUTPUT from mcica_subcol_sw + real(kind=kind_phys),dimension(ngptsw,npts,nlay) :: cldfmcl ! Cloud fraction + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=kind_phys),dimension(ngptsw,npts,nlay) :: ciwpmcl ! In-cloud ice water path (g/m2) + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=kind_phys),dimension(ngptsw,npts,nlay) :: clwpmcl ! In-cloud liquid water path (g/m2) + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=kind_phys),dimension(ngptsw,npts,nlay) :: cswpmcl ! In-cloud snow water path (g/m2) + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=kind_phys),dimension(npts,nlay) :: relqmcl ! Cloud water drop effective radius (microns) + ! Dimensions: (ncol,nlay) + real(kind=kind_phys),dimension(npts,nlay) :: reicmcl ! Cloud ice effective size (microns) + ! Dimensions: (ncol,nlay) + real(kind=kind_phys),dimension(npts,nlay) :: resnmcl ! Snow effective size (microns) + ! Dimensions: (ncol,nlay) + real(kind=kind_phys),dimension(ngptsw,npts,nlay) :: taucmcl ! In-cloud optical depth + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=kind_phys),dimension(ngptsw,npts,nlay) :: ssacmcl ! in-cloud single scattering albedo [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=kind_phys),dimension(ngptsw,npts,nlay) :: asmcmcl ! in-cloud asymmetry parameter [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=kind_phys),dimension(ngptsw,npts,nlay) :: fsfcmcl ! in-cloud forward scattering fraction [mcica] + ! Dimensions: (ngptsw,ncol,nlay) +!HWRF cldprmc_sw input +! real(kind=kind_phys),dimension(ngptsw,nlay) :: cldfmc,cldfmc_save! cloud fraction [mcica] +! ! Dimensions: (ngptsw,nlayers) + real(kind=kind_phys),dimension(ngptsw,nlay) :: ciwpmc ! cloud ice water path [mcica] + ! Dimensions: (ngptsw,nlayers) + real(kind=kind_phys),dimension(ngptsw,nlay) :: clwpmc ! cloud liquid water path [mcica] + ! Dimensions: (ngptsw,nlayers) + real(kind=kind_phys),dimension(ngptsw,nlay) :: cswpmc ! cloud snow water path [mcica] + ! Dimensions: (ngptsw,nlayers) + real(kind=kind_phys),dimension(nlay) :: resnmc ! cloud snow particle effective radius (microns) + ! Dimensions: (nlayers) + real(kind=kind_phys),dimension(nlay) :: relqmc ! cloud liquid particle effective radius (microns) + ! Dimensions: (nlayers) + real(kind=kind_phys),dimension(nlay) :: reicmc ! cloud ice particle effective radius (microns) + ! Dimensions: (nlayers) + ! specific definition of reicmc depends on setting of iceflag: + ! iceflag = 1: ice effective radius, r_ec, (Ebert and Curry, 1992), + ! r_ec range is limited to 13.0 to 130.0 microns + ! iceflag = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996) + ! r_k range is limited to 5.0 to 131.0 microns + ! iceflag = 3: generalized effective size, dge, (Fu, 1996), + ! dge range is limited to 5.0 to 140.0 microns + ! [dge = 1.0315 * r_ec] + real(kind=kind_phys),dimension(ngptsw,nlay) :: fsfcmc ! cloud forward scattering fraction + ! Dimensions: (ngptsw,nlayers) + +!mz* HWRF cldprmc_sw output (delta scaled) + real(kind=kind_phys),dimension(ngptsw,nlay) :: taucmc ! cloud optical depth (delta scaled) + ! Dimensions: (ngptsw,nlayers) + real(kind=kind_phys),dimension(ngptsw,nlay) :: ssacmc ! single scattering albedo (delta scaled) + ! Dimensions: (ngptsw,nlayers) + real(kind=kind_phys),dimension(ngptsw,nlay) :: asmcmc ! asymmetry parameter (delta scaled) + ! Dimensions: (ngptsw,nlayers) + real(kind=kind_phys),dimension(ngptsw,nlay) :: taormc ! cloud optical depth (non-delta scaled) + ! Dimensions: (ngptsw,nlayers) +!mz* + + real (kind=kind_phys), dimension(nlay,ngptsw) :: cldfmc, & + & cldfmc_save, & + & taug, taur + real (kind=kind_phys), dimension(nlp1,nbdsw):: fxupc, fxdnc, & + & fxup0, fxdn0 + + real (kind=kind_phys), dimension(nlay,nbdsw) :: & + & tauae, ssaae, asyae, taucw, ssacw, asycw + + real (kind=kind_phys), dimension(ngptsw) :: sfluxzen + + real (kind=kind_phys), dimension(nlay) :: cldfrc, delp, & + & pavel, tavel, coldry, colmol, h2ovmr, o3vmr, temcol, & + & cliqp, reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, & + & cfrac, fac00, fac01, fac10, fac11, forfac, forfrac, & + & selffac, selffrac, rfdelp, dz + + real (kind=kind_phys), dimension(nlp1) :: fnet, flxdc, flxuc, & + & flxd0, flxu0 + + real (kind=kind_phys), dimension(2) :: albbm, albdf, sfbmc, & + & sfbm0, sfdfc, sfdf0 + + real (kind=kind_phys) :: cosz1, sntz1, tem0, tem1, tem2, s0fac, & + & ssolar, zcf0, zcf1, ftoau0, ftoauc, ftoadc, & + & fsfcu0, fsfcuc, fsfcd0, fsfcdc, suvbfc, suvbf0, delgth + +! --- column amount of absorbing gases: +! (:,m) m = 1-h2o, 2-co2, 3-o3, 4-n2o, 5-ch4, 6-o2, 7-co + real (kind=kind_phys) :: colamt(nlay,maxgas) + + integer, dimension(npts) :: ipseed + integer, dimension(nlay) :: indfor, indself, jp, jt, jt1 + + integer :: i, ib, ipt, j1, k, kk, laytrop, mb,ig + integer :: inflgsw, iceflgsw, liqflgsw + integer :: irng, permuteseed +! +!===> ... begin here +! + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + +! Select cloud liquid and ice optics parameterization options +! For passing in cloud optical properties directly: +! inflgsw = 0 +! iceflgsw = 0 +! liqflgsw = 0 +! For passing in cloud physical properties; cloud optics parameterized in RRTMG: + inflgsw = 2 + iceflgsw = 3 + liqflgsw = 1 +! + if (.not. lsswr) return + if (nday <= 0) return + + lhswb = present ( hswb ) + lhsw0 = present ( hsw0 ) + lflxprf= present ( flxprf ) + lfdncmp= present ( fdncmp ) + +!> -# Compute solar constant adjustment factor (s0fac) according to solcon. +! *** s0, the solar constant at toa in w/m**2, is hard-coded with +! each spectra band, the total flux is about 1368.22 w/m**2. + + s0fac = solcon / s0 + +!> -# Initial output arrays (and optional) as zero. + + hswc(:,:) = f_zero + cldtau(:,:) = f_zero + topflx = topfsw_type ( f_zero, f_zero, f_zero ) + sfcflx = sfcfsw_type ( f_zero, f_zero, f_zero, f_zero ) + +!! --- ... initial optional outputs + if ( lflxprf ) then + flxprf = profsw_type ( f_zero, f_zero, f_zero, f_zero ) + endif + + if ( lfdncmp ) then + fdncmp = cmpfsw_type (f_zero,f_zero,f_zero,f_zero,f_zero,f_zero) + endif + + if ( lhsw0 ) then + hsw0(:,:) = f_zero + endif + + if ( lhswb ) then + hswb(:,:,:) = f_zero + endif + +!! --- check for optional input arguments, depending on cloud method + if (iswcliq > 0) then ! use prognostic cloud method + if ( .not.present(cld_lwp) .or. .not.present(cld_ref_liq) .or. & + & .not.present(cld_iwp) .or. .not.present(cld_ref_ice) .or. & + & .not.present(cld_rwp) .or. .not.present(cld_ref_rain) .or. & + & .not.present(cld_swp) .or. .not.present(cld_ref_snow) )then + write(errmsg,'(*(a))') & + & 'Logic error: iswcliq>0 requires the following', & + & ' optional arguments to be present:', & + & ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', & + & ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow' + errflg = 1 + return + end if + else ! use diagnostic cloud method + if ( .not.present(cld_od) .or. .not.present(cld_ssa) .or. & + & .not.present(cld_asy)) then + write(errmsg,'(*(a))') & + & 'Logic error: iswcliq<=0 requires the following', & + & ' optional arguments to be present:', & + & ' cld_od, cld_ssa, cld_asy' + errflg = 1 + return + end if + endif ! end if_iswcliq + +!> -# Change random number seed value for each radiation invocation +!! (isubcsw =1 or 2). + + if ( isubcsw == 1 ) then ! advance prescribed permutation seed + do i = 1, npts + ipseed(i) = ipsdsw0 + i + enddo + elseif ( isubcsw == 2 ) then ! use input array of permutaion seeds + do i = 1, npts + ipseed(i) = icseed(i) + enddo + endif + + if ( lprnt ) then + write(0,*)' In radsw, isubcsw, ipsdsw0,ipseed =', & + & isubcsw, ipsdsw0, ipseed + endif + +! --- ... loop over each daytime grid point + + lab_do_ipt : do ipt = 1, NDAY + + j1 = idxday(ipt) + + cosz1 = cosz(j1) + sntz1 = f_one / cosz(j1) + ssolar = s0fac * cosz(j1) + if (iovrsw == 3) delgth = de_lgth(j1) ! clouds decorr-length + +!> -# Prepare surface albedo: bm,df - dir,dif; 1,2 - nir,uvv. + albbm(1) = sfcalb_nir_dir(j1) + albdf(1) = sfcalb_nir_dif(j1) + albbm(2) = sfcalb_uvis_dir(j1) + albdf(2) = sfcalb_uvis_dif(j1) + + +! mz*: HWRF practice + if (iovrsw == 4 ) then + + +!Add layer height needed for exponential (icld=4) and +! exponential-random (icld=5) overlap options + + !iplon = 1 + irng = 0 + permuteseed = 1 + +!mz* Derive height of each layer mid-point from layer thickness. +! Needed for exponential (iovrsw=4) and exponential-random overlap +! option (iovr=5)only. + dzsum =0.0 + do k = 1,nlay + hgt(j1,k)= dzsum+0.5*dzlyr(j1,k)*1000. !km->m + dzsum = dzsum+ dzlyr(j1,k)*1000. + enddo + +! Zero out cloud optical properties here; not used when passing physical properties +! to radiation and taucld is calculated in radiation + do k = 1, nlay + do ib = 1, nbdsw + taucld3(ib,j1,k) = 0.0 + ssacld3(ib,j1,k) = 1.0 + asmcld3(ib,j1,k) = 0.0 + fsfcld3(ib,j1,k) = 0.0 + enddo + enddo + +!mz +! if(mpirank==mpiroot) then +! write(0,*) 'mcica_subcol_sw: max/min(cld_cf)=', & +! & maxval(cld_cf),minval(cld_cf) +! write(0,*) 'mcica_subcol_sw: max/min(cld_iwp)=', & +! & maxval(cld_iwp),minval(cld_iwp) +! write(0,*) 'mcica_subcol_sw: max/min(cld_lwp)=', & +! & maxval(cld_lwp),minval(cld_lwp) +! write(0,*) 'mcica_subcol_sw: max/min(cld_swp)=', & +! & maxval(cld_swp),minval(cld_swp) +! write(0,*) 'mcica_subcol_sw: max/min(cld_ref_ice)=', & +! & maxval(cld_ref_ice),minval(cld_ref_ice) +! write(0,*) 'mcica_subcol_sw: max/min(cld_ref_snow)=', & +! & maxval(cld_ref_snow),minval(cld_ref_snow) +! write(0,*) 'mcica_subcol_sw: max/min(cld_ref_liq)=', & +! & maxval(cld_ref_liq),minval(cld_ref_liq) +! endif + + + call mcica_subcol_sw (1, j1, nlay, iovrsw, permuteseed, & + & irng, plyr, hgt, & + & cld_cf, cld_iwp, cld_lwp,cld_swp, & + & cld_ref_ice, cld_ref_liq, & + & cld_ref_snow, taucld3,ssacld3,asmcld3,fsfcld3, & + & cldfmcl, ciwpmcl, clwpmcl, cswpmcl, & !--output + & reicmcl, relqmcl, resnmcl, & + & taucmcl, ssacmcl, asmcmcl, fsfcmcl) + +!mz +! if(mpirank==mpiroot) then +! write(0,*) 'mcica_subcol_sw: max/min(cldfmcl)=', & +! & maxval(cldfmcl),minval(cldfmcl) +! write(0,*) 'mcica_subcol_sw: max/min(ciwpmcl)=', & +! & maxval(ciwpmcl),minval(ciwpmcl) +! write(0,*) 'mcica_subcol_sw: max/min(clwpmcl)=', & +! & maxval(clwpmcl),minval(clwpmcl) +! write(0,*) 'mcica_subcol_sw: max/min(cswpmcl)=', & +! & maxval(cswpmcl),minval(cswpmcl) +! write(0,*) 'mcica_subcol_sw: max/min(reicmcl)=', & +! & maxval(reicmcl),minval(reicmcl) +! write(0,*) 'mcica_subcol_sw: max/min(relqmcl)=', & +! & maxval(relqmcl),minval(relqmcl) +! write(0,*) 'mcica_subcol_sw: max/min(resnmcl)=', & +! & maxval(resnmcl),minval(resnmcl) +! endif + + endif +!mz* end + +!> -# Prepare atmospheric profile for use in rrtm. +! the vertical index of internal array is from surface to top + + if (ivflip == 0) then ! input from toa to sfc + + tem1 = 100.0 * con_g + tem2 = 1.0e-20 * 1.0e3 * con_avgd + + do k = 1, nlay + kk = nlp1 - k + pavel(k) = plyr(j1,kk) + tavel(k) = tlyr(j1,kk) + delp (k) = delpin(j1,kk) + dz (k) = dzlyr (j1,kk) +!> -# Set absorber and gas column amount, convert from volume mixing +!! ratio to molec/cm2 based on coldry (scaled to 1.0e-20) +!! - colamt(nlay,maxgas):column amounts of absorbing gases 1 to +!! maxgas are for h2o,co2,o3,n2o,ch4,o2,co, respectively +!! (\f$ mol/cm^2 \f$) + +!test use +! h2ovmr(k)= max(f_zero,qlyr(j1,kk)*amdw) ! input mass mixing ratio +! h2ovmr(k)= max(f_zero,qlyr(j1,kk)) ! input vol mixing ratio +! o3vmr (k)= max(f_zero,olyr(j1,kk)) ! input vol mixing ratio +!ncep model use + h2ovmr(k)= max(f_zero,qlyr(j1,kk)*amdw/(f_one-qlyr(j1,kk))) ! input specific humidity + o3vmr (k)= max(f_zero,olyr(j1,kk)*amdo3) ! input mass mixing ratio + + tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw + coldry(k) = tem2 * delp(k) / (tem1*tem0*(f_one + h2ovmr(k))) + temcol(k) = 1.0e-12 * coldry(k) + + colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o + colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(j1,kk)) ! co2 + colamt(k,3) = max(f_zero, coldry(k)*o3vmr(k)) ! o3 + colmol(k) = coldry(k) + colamt(k,1) + enddo + +! --- ... set up gas column amount, convert from volume mixing ratio +! to molec/cm2 based on coldry (scaled to 1.0e-20) + + if (iswrgas > 0) then + do k = 1, nlay + kk = nlp1 - k + colamt(k,4) = max(temcol(k), coldry(k)*gasvmr_n2o(j1,kk)) ! n2o + colamt(k,5) = max(temcol(k), coldry(k)*gasvmr_ch4(j1,kk)) ! ch4 + colamt(k,6) = max(temcol(k), coldry(k)*gasvmr_o2(j1,kk)) ! o2 +! colamt(k,7) = max(temcol(k), coldry(k)*gasvmr(j1,kk,5)) ! co - notused + enddo + else + do k = 1, nlay + colamt(k,4) = temcol(k) ! n2o + colamt(k,5) = temcol(k) ! ch4 + colamt(k,6) = temcol(k) ! o2 +! colamt(k,7) = temcol(k) ! co - notused + enddo + endif + +!> -# Read aerosol optical properties from 'aerosols'. + + do k = 1, nlay + kk = nlp1 - k + do ib = 1, nbdsw + tauae(k,ib) = aeraod(j1,kk,ib) + ssaae(k,ib) = aerssa(j1,kk,ib) + asyae(k,ib) = aerasy(j1,kk,ib) + enddo + enddo + +!> -# Read cloud optical properties from 'clouds'. + if (iswcliq > 0) then ! use prognostic cloud method +!mz:GFS operational + !if (iovrsw .eq. 1) then + do k = 1, nlay + kk = nlp1 - k + cfrac(k) = cld_cf(j1,kk) ! cloud fraction + cliqp(k) = cld_lwp(j1,kk) ! cloud liq path + reliq(k) = cld_ref_liq(j1,kk) ! liq partical effctive radius + cicep(k) = cld_iwp(j1,kk) ! cloud ice path + reice(k) = cld_ref_ice(j1,kk) ! ice partical effctive radius + cdat1(k) = cld_rwp(j1,kk) ! cloud rain drop path + cdat2(k) = cld_ref_rain(j1,kk) ! rain partical effctive radius + cdat3(k) = cld_swp(j1,kk) ! cloud snow path + cdat4(k) = cld_ref_snow(j1,kk) ! snow partical effctive radius + enddo + if (iovrsw .eq. 4) then !mz* HWRF + do k = 1, nlay + kk = nlp1 - k + do ig = 1, ngptsw + cldfmc(k,ig) = cldfmcl(ig,j1,kk) + taucmc(ig,k) = taucmcl(ig,j1,kk) + ssacmc(ig,k) = ssacmcl(ig,j1,kk) + asmcmc(ig,k) = asmcmcl(ig,j1,kk) + fsfcmc(ig,k) = fsfcmcl(ig,j1,kk) + ciwpmc(ig,k) = ciwpmcl(ig,j1,kk) + clwpmc(ig,k) = clwpmcl(ig,j1,kk) + if (iceflgsw.eq.5) then + cswpmc(ig,k) = cswpmcl(ig,j1,kk) + endif + enddo + reicmc(k) = reicmcl(j1,kk) + relqmc(k) = relqmcl(j1,kk) + if (iceflgsw.eq.5) then + resnmc(k) = resnmcl(j1,kk) + endif + enddo + endif + else ! use diagnostic cloud method + do k = 1, nlay + kk = nlp1 - k + cfrac(k) = cld_cf(j1,kk) ! cloud fraction + cdat1(k) = cld_od(j1,kk) ! cloud optical depth + cdat2(k) = cld_ssa(j1,kk) ! cloud single scattering albedo + cdat3(k) = cld_asy(j1,kk) ! cloud asymmetry factor + enddo + endif ! end if_iswcliq + + else ! input from sfc to toa + + tem1 = 100.0 * con_g + tem2 = 1.0e-20 * 1.0e3 * con_avgd + + do k = 1, nlay + pavel(k) = plyr(j1,k) + tavel(k) = tlyr(j1,k) + delp (k) = delpin(j1,k) + dz (k) = dzlyr (j1,k) + +! --- ... set absorber amount +!test use +! h2ovmr(k)= max(f_zero,qlyr(j1,k)*amdw) ! input mass mixing ratio +! h2ovmr(k)= max(f_zero,qlyr(j1,k)) ! input vol mixing ratio +! o3vmr (k)= max(f_zero,olyr(j1,k)) ! input vol mixing ratio +!ncep model use + h2ovmr(k)= max(f_zero,qlyr(j1,k)*amdw/(f_one-qlyr(j1,k))) ! input specific humidity + o3vmr (k)= max(f_zero,olyr(j1,k)*amdo3) ! input mass mixing ratio + + tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw + coldry(k) = tem2 * delp(k) / (tem1*tem0*(f_one + h2ovmr(k))) + temcol(k) = 1.0e-12 * coldry(k) + + colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o + colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(j1,k)) ! co2 + colamt(k,3) = max(f_zero, coldry(k)*o3vmr(k)) ! o3 + colmol(k) = coldry(k) + colamt(k,1) + enddo + + + if (lprnt) then + if (ipt == 1) then + write(0,*)' pavel=',pavel + write(0,*)' tavel=',tavel + write(0,*)' delp=',delp + write(0,*)' h2ovmr=',h2ovmr*1000 + write(0,*)' o3vmr=',o3vmr*1000000 + endif + endif + +! --- ... set up gas column amount, convert from volume mixing ratio +! to molec/cm2 based on coldry (scaled to 1.0e-20) + + if (iswrgas > 0) then + do k = 1, nlay + colamt(k,4) = max(temcol(k), coldry(k)*gasvmr_n2o(j1,k)) ! n2o + colamt(k,5) = max(temcol(k), coldry(k)*gasvmr_ch4(j1,k)) ! ch4 + colamt(k,6) = max(temcol(k), coldry(k)*gasvmr_o2(j1,k)) ! o2 +! colamt(k,7) = max(temcol(k), coldry(k)*gasvmr(j1,k,5)) ! co - notused + enddo + else + do k = 1, nlay + colamt(k,4) = temcol(k) ! n2o + colamt(k,5) = temcol(k) ! ch4 + colamt(k,6) = temcol(k) ! o2 +! colamt(k,7) = temcol(k) ! co - notused + enddo + endif + +! --- ... set aerosol optical properties + + do ib = 1, nbdsw + do k = 1, nlay + tauae(k,ib) = aeraod(j1,k,ib) + ssaae(k,ib) = aerssa(j1,k,ib) + asyae(k,ib) = aerasy(j1,k,ib) + enddo + enddo + + if (iswcliq > 0) then ! use prognostic cloud method + !if (iovrsw .eq. 1) then !mz* GFS operational + do k = 1, nlay + cfrac(k) = cld_cf(j1,k) ! cloud fraction + cliqp(k) = cld_lwp(j1,k) ! cloud liq path + reliq(k) = cld_ref_liq(j1,k) ! liq partical effctive radius + cicep(k) = cld_iwp(j1,k) ! cloud ice path + reice(k) = cld_ref_ice(j1,k) ! ice partical effctive radius + cdat1(k) = cld_rwp(j1,k) ! cloud rain drop path + cdat2(k) = cld_ref_rain(j1,k) ! rain partical effctive radius + cdat3(k) = cld_swp(j1,k) ! cloud snow path + cdat4(k) = cld_ref_snow(j1,k) ! snow partical effctive radius + enddo + if (iovrsw .eq. 4) then !mz* HWRF +!mz* Move incoming GCM cloud arrays to RRTMG cloud arrays. +!For GCM input, incoming reicmcl is defined based on selected +!ice parameterization (inflglw) + do k = 1, nlay + do ig = 1, ngptsw + cldfmc(k,ig) = cldfmcl(ig,j1,k) + taucmc(ig,k) = taucmcl(ig,j1,k) + ssacmc(ig,k) = ssacmcl(ig,j1,k) + asmcmc(ig,k) = asmcmcl(ig,j1,k) + fsfcmc(ig,k) = fsfcmcl(ig,j1,k) + ciwpmc(ig,k) = ciwpmcl(ig,j1,k) + clwpmc(ig,k) = clwpmcl(ig,j1,k) + if (iceflgsw .eq. 5) then + cswpmc(ig,k) = cswpmcl(ig,j1,k) + endif + enddo + reicmc(k) = reicmcl(j1,k) + relqmc(k) = relqmcl(j1,k) + if (iceflgsw .eq. 5) then + resnmc(k) = resnmcl(j1,k) + endif + enddo + + end if + else ! use diagnostic cloud method + do k = 1, nlay + cfrac(k) = cld_cf(j1,k) ! cloud fraction + cdat1(k) = cld_od(j1,k) ! cloud optical depth + cdat2(k) = cld_ssa(j1,k) ! cloud single scattering albedo + cdat3(k) = cld_asy(j1,k) ! cloud asymmetry factor + enddo + endif ! end if_iswcliq + + endif ! if_ivflip + +!> -# Compute fractions of clear sky view: +!! - random overlapping +!! - max/ran overlapping +!! - maximum overlapping + + zcf0 = f_one + zcf1 = f_one + if (iovrsw == 0) then ! random overlapping + do k = 1, nlay + zcf0 = zcf0 * (f_one - cfrac(k)) + enddo +!mz else if (iovrsw == 1) then ! max/ran overlapping + else if (iovrsw == 1.or. iovrsw == 4) then ! mz* also exponential overlapping + do k = 1, nlay + if (cfrac(k) > ftiny) then ! cloudy layer + zcf1 = min ( zcf1, f_one-cfrac(k) ) + elseif (zcf1 < f_one) then ! clear layer + zcf0 = zcf0 * zcf1 + zcf1 = f_one + endif + enddo + zcf0 = zcf0 * zcf1 + else if (iovrsw >= 2 .and. iovrsw .ne. 4) then + do k = 1, nlay + zcf0 = min ( zcf0, f_one-cfrac(k) ) ! used only as clear/cloudy indicator + enddo + endif + + if (zcf0 <= ftiny) zcf0 = f_zero + if (zcf0 > oneminus) zcf0 = f_one + zcf1 = f_one - zcf0 + +!> -# For cloudy sky column, call cldprop() to compute the cloud +!! optical properties for each cloudy layer. + + !if (iovrsw .eq. 1 ) then + + if (zcf1 > f_zero) then ! cloudy sky column + + !mz* for HWRF, save cldfmc with mcica + if (iovrsw .eq.4) then + do k = 1, nlay + do ig = 1, ngptsw + cldfmc_save(k,ig)=cldfmc (k,ig) + enddo + enddo + endif + + + call cldprop & +! --- inputs: + & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & + & zcf1, nlay, ipseed(j1), dz, delgth,iswcliq,iovrsw,isubcsw, & +! --- outputs: + & taucw, ssacw, asycw, cldfrc, cldfmc & !mz: cldfmc(k,ig) + & ) + + if (iovrsw .eq.4) then + !mz for HWRF, still using mcica cldfmc + do k = 1, nlay + do ig = 1, ngptsw + cldfmc(k,ig)=cldfmc_save(k,ig) + enddo + enddo + endif + +! --- ... save computed layer cloud optical depth for output +! rrtm band 10 is approx to the 0.55 mu spectrum + + if (ivflip == 0) then ! input from toa to sfc + do k = 1, nlay + kk = nlp1 - k + cldtau(j1,kk) = taucw(k,10) + enddo + else ! input from sfc to toa + do k = 1, nlay + cldtau(j1,k) = taucw(k,10) + enddo + endif ! end if_ivflip_block + + else ! clear sky column + cldfrc(:) = f_zero + cldfmc(:,:)= f_zero + do i = 1, nbdsw + do k = 1, nlay + taucw(k,i) = f_zero + ssacw(k,i) = f_zero + asycw(k,i) = f_zero + enddo + enddo + endif ! end if_zcf1_block + +! if (iovrsw .eq. 4) then !mz* HWRF +!! For cloudy atmosphere, use cldprop to set cloud optical properties based on +!! input cloud physical properties. Select method based on choices described +!! in cldprop. Cloud fraction, water path, liquid droplet and ice particle +!! effective radius must be passed in cldprop. Cloud fraction and cloud +!! optical properties are transferred to rrtmg_sw arrays in cldprop. + +! call cldprmc_sw(nlayers, inflg, iceflg, liqflg, cldfmc, & +! ciwpmc, clwpmc, cswpmc, reicmc, relqmc, resnmc, & +! taormc, taucmc, ssacmc, asmcmc, fsfcmc) +! icpr = 1 + +! endif + +!> -# Call setcoef() to compute various coefficients needed in +!! radiative transfer calculations. + call setcoef & +! --- inputs: + & ( pavel,tavel,h2ovmr, nlay,nlp1, & +! --- outputs: + & laytrop,jp,jt,jt1,fac00,fac01,fac10,fac11, & + & selffac,selffrac,indself,forfac,forfrac,indfor & + & ) + +!mz* HWRF clouds +! if(iovrsw .eq.0) then +! zcldfmc(:,:) = 0._rb +! ztaucmc(:,:) = 0._rb +! ztaormc(:,:) = 0._rb +! zasycmc(:,:) = 0._rb +! zomgcmc(:,:) = 1._rb + +! elseif (iovrsw.eq.4) then +! do i=1,nlayers +! do ig=1,ngptsw +! zcldfmc(i,ig) = cldfmc(ig,i) +! ztaucmc(i,ig) = taucmc(ig,i) +! ztaormc(i,ig) = taormc(ig,i) +! zasycmc(i,ig) = asmcmc(ig,i) +! zomgcmc(i,ig) = ssacmc(ig,i) +! enddo +! enddo +!Aerosol +!mz* no aerosol at this moment (iaer .eq.0) +! ztaua(:,:) = 0._rb +! zasya(:,:) = 0._rb +! zomga(:,:) = 1._rb + +! endif +!mz* + +!> -# Call taumol() to calculate optical depths for gaseous absorption +!! and rayleigh scattering + call taumol & +! --- inputs: + & ( colamt,colmol,fac00,fac01,fac10,fac11,jp,jt,jt1,laytrop, & + & forfac,forfrac,indfor,selffac,selffrac,indself, NLAY, & +! --- outputs: + & sfluxzen, taug, taur & + & ) + +!> -# Call the 2-stream radiation transfer model: +!! - if physparam::isubcsw .le.0, using standard cloud scheme, +!! call spcvrtc(). +!! - if physparam::isubcsw .gt.0, using mcica cloud scheme, +!! call spcvrtm(). + + if ( isubcsw <= 0 ) then ! use standard cloud scheme + + call spcvrtc & +! --- inputs: + & ( ssolar,cosz1,sntz1,albbm,albdf,sfluxzen,cldfrc, & + & zcf1,zcf0,taug,taur,tauae,ssaae,asyae,taucw,ssacw,asycw, & + & nlay, nlp1, & +! --- outputs: + & fxupc,fxdnc,fxup0,fxdn0, & + & ftoauc,ftoau0,ftoadc,fsfcuc,fsfcu0,fsfcdc,fsfcd0, & + & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & + & ) + + else ! use mcica cloud scheme + +!mz if(iovrsw .eq. 1 ) then ! mz*:GFS operational + + call spcvrtm & +! --- inputs: + & ( ssolar,cosz1,sntz1,albbm,albdf,sfluxzen,cldfmc, & + & zcf1,zcf0,taug,taur,tauae,ssaae,asyae,taucw,ssacw,asycw, & + & nlay, nlp1, & +! --- outputs: + & fxupc,fxdnc,fxup0,fxdn0, & + & ftoauc,ftoau0,ftoadc,fsfcuc,fsfcu0,fsfcdc,fsfcd0, & + & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & + & ) + +!mz else if (iovrsw .eq.4 ) then +! call spcvmc_sw & +! (nlayers, istart, iend, icpr, iout, & +! pavel, tavel, pz, tz, tbound, albdif, albdir, & +! zcldfmc, ztaucmc, zasycmc, zomgcmc, ztaormc, & +! ztaua, zasya, zomga, cossza, coldry, wkl, adjflux, & +! laytrop, layswtch, laylow, jp, jt, jt1, & +! co2mult, colch4, colco2, colh2o, colmol, coln2o, colo2, colo3, & +! fac00, fac01, fac10, fac11, & +! selffac, selffrac, indself, forfac, forfrac, indfor, & +! zbbfd, zbbfu, zbbcd, zbbcu, zuvfd, zuvcd, znifd, znicd, & +! zbbfddir, zbbcddir, zuvfddir, zuvcddir, znifddir, znicddir) + + endif + +!> -# Save outputs. +! --- ... sum up total spectral fluxes for total-sky + + do k = 1, nlp1 + flxuc(k) = f_zero + flxdc(k) = f_zero + + do ib = 1, nbdsw + flxuc(k) = flxuc(k) + fxupc(k,ib) + flxdc(k) = flxdc(k) + fxdnc(k,ib) + enddo + enddo + +!! --- ... optional clear sky fluxes + + if ( lhsw0 .or. lflxprf ) then + do k = 1, nlp1 + flxu0(k) = f_zero + flxd0(k) = f_zero + + do ib = 1, nbdsw + flxu0(k) = flxu0(k) + fxup0(k,ib) + flxd0(k) = flxd0(k) + fxdn0(k,ib) + enddo + enddo + endif + +! --- ... prepare for final outputs + + do k = 1, nlay + rfdelp(k) = heatfac / delp(k) + enddo + + if ( lfdncmp ) then +!! --- ... optional uv-b surface downward flux + fdncmp(j1)%uvbf0 = suvbf0 + fdncmp(j1)%uvbfc = suvbfc + +!! --- ... optional beam and diffuse sfc fluxes + fdncmp(j1)%nirbm = sfbmc(1) + fdncmp(j1)%nirdf = sfdfc(1) + fdncmp(j1)%visbm = sfbmc(2) + fdncmp(j1)%visdf = sfdfc(2) + endif ! end if_lfdncmp + +! --- ... toa and sfc fluxes + + topflx(j1)%upfxc = ftoauc + topflx(j1)%dnfxc = ftoadc + topflx(j1)%upfx0 = ftoau0 + + sfcflx(j1)%upfxc = fsfcuc + sfcflx(j1)%dnfxc = fsfcdc + sfcflx(j1)%upfx0 = fsfcu0 + sfcflx(j1)%dnfx0 = fsfcd0 + + if (ivflip == 0) then ! output from toa to sfc + +! --- ... compute heating rates + + fnet(1) = flxdc(1) - flxuc(1) + + do k = 2, nlp1 + kk = nlp1 - k + 1 + fnet(k) = flxdc(k) - flxuc(k) + hswc(j1,kk) = (fnet(k)-fnet(k-1)) * rfdelp(k-1) + enddo + +!! --- ... optional flux profiles + + if ( lflxprf ) then + do k = 1, nlp1 + kk = nlp1 - k + 1 + flxprf(j1,kk)%upfxc = flxuc(k) + flxprf(j1,kk)%dnfxc = flxdc(k) + flxprf(j1,kk)%upfx0 = flxu0(k) + flxprf(j1,kk)%dnfx0 = flxd0(k) + enddo + endif + +!! --- ... optional clear sky heating rates + + if ( lhsw0 ) then + fnet(1) = flxd0(1) - flxu0(1) + + do k = 2, nlp1 + kk = nlp1 - k + 1 + fnet(k) = flxd0(k) - flxu0(k) + hsw0(j1,kk) = (fnet(k)-fnet(k-1)) * rfdelp(k-1) + enddo + endif + +!! --- ... optional spectral band heating rates + + if ( lhswb ) then + do mb = 1, nbdsw + fnet(1) = fxdnc(1,mb) - fxupc(1,mb) + + do k = 2, nlp1 + kk = nlp1 - k + 1 + fnet(k) = fxdnc(k,mb) - fxupc(k,mb) + hswb(j1,kk,mb) = (fnet(k) - fnet(k-1)) * rfdelp(k-1) + enddo + enddo + endif + + else ! output from sfc to toa + +! --- ... compute heating rates + + fnet(1) = flxdc(1) - flxuc(1) + + do k = 2, nlp1 + fnet(k) = flxdc(k) - flxuc(k) + hswc(j1,k-1) = (fnet(k)-fnet(k-1)) * rfdelp(k-1) + enddo + +!! --- ... optional flux profiles + + if ( lflxprf ) then + do k = 1, nlp1 + flxprf(j1,k)%upfxc = flxuc(k) + flxprf(j1,k)%dnfxc = flxdc(k) + flxprf(j1,k)%upfx0 = flxu0(k) + flxprf(j1,k)%dnfx0 = flxd0(k) + enddo + endif + +!! --- ... optional clear sky heating rates + + if ( lhsw0 ) then + fnet(1) = flxd0(1) - flxu0(1) + + do k = 2, nlp1 + fnet(k) = flxd0(k) - flxu0(k) + hsw0(j1,k-1) = (fnet(k)-fnet(k-1)) * rfdelp(k-1) + enddo + endif + +!! --- ... optional spectral band heating rates + + if ( lhswb ) then + do mb = 1, nbdsw + fnet(1) = fxdnc(1,mb) - fxupc(1,mb) + + do k = 1, nlay + fnet(k+1) = fxdnc(k+1,mb) - fxupc(k+1,mb) + hswb(j1,k,mb) = (fnet(k+1) - fnet(k)) * rfdelp(k) + enddo + enddo + endif + + endif ! if_ivflip + + enddo lab_do_ipt + + return +!................................... + end subroutine rrtmg_sw_run +!----------------------------------- +!> @} + + subroutine rrtmg_sw_finalize () + end subroutine rrtmg_sw_finalize + + +!>\ingroup module_radsw_main +!> This subroutine initializes non-varying module variables, conversion +!! factors, and look-up tables. +!!\param me print control for parallel process +!>\section rswinit_gen rswinit General Algorithm +!! @{ +!----------------------------------- + subroutine rswinit & + & (iswcliq,iovrsw,isubcsw, me ) ! --- inputs: +! --- outputs: (none) + +! =================== program usage description =================== ! +! ! +! purpose: initialize non-varying module variables, conversion factors,! +! and look-up tables. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: ! +! me - print control for parallel process ! +! ! +! outputs: (none) ! +! ! +! external module variables: (in physparam) ! +! iswrate - heating rate unit selections ! +! =1: output in k/day ! +! =2: output in k/second ! +! iswrgas - control flag for rare gases (ch4,n2o,o2, etc.) ! +! =0: do not include rare gases ! +! >0: include all rare gases ! +! iswcliq - liquid cloud optical properties contrl flag ! +! =0: input cloud opt depth from diagnostic scheme ! +! >0: input cwp,rew, and other cloud content parameters ! +! isubcsw - sub-column cloud approximation control flag ! +! =0: no sub-col cld treatment, use grid-mean cld quantities ! +! =1: mcica sub-col, prescribed seeds to get random numbers ! +! =2: mcica sub-col, providing array icseed for random numbers! +! icldflg - cloud scheme control flag ! +! =0: diagnostic scheme gives cloud tau, omiga, and g. ! +! =1: prognostic scheme gives cloud liq/ice path, etc. ! +! iovrsw - clouds vertical overlapping control flag ! +! =0: random overlapping clouds ! +! =1: maximum/random overlapping clouds ! +! =2: maximum overlap cloud ! +! =3: decorrelation-length overlap clouds ! +! iswmode - control flag for 2-stream transfer scheme ! +! =1; delta-eddington (joseph et al., 1976) ! +! =2: pifm (zdunkowski et al., 1980) ! +! =3: discrete ordinates (liou, 1973) ! +! ! +! ******************************************************************* ! +! ! +! definitions: ! +! arrays for 10000-point look-up tables: ! +! tau_tbl clear-sky optical depth ! +! exp_tbl exponential lookup table for transmittance ! +! ! +! ******************************************************************* ! +! ! +! ====================== end of description block ================= ! + +! --- inputs: + integer, intent(in) :: me,isubcsw,iswcliq + integer, intent(inout) :: iovrsw + +! --- outputs: none + +! --- locals: + real (kind=kind_phys), parameter :: expeps = 1.e-20 + + integer :: i + + real (kind=kind_phys) :: tfn, tau + +! +!===> ... begin here +! + if ( iovrsw<0 .or. iovrsw>4 ) then + print *,' *** Error in specification of cloud overlap flag', & + & ' IOVRSW=',iovrsw,' in RSWINIT !!' + stop + endif + + if (me == 0) then + print *,' - Using AER Shortwave Radiation, Version: ',VTAGSW + + if (iswmode == 1) then + print *,' --- Delta-eddington 2-stream transfer scheme' + else if (iswmode == 2) then + print *,' --- PIFM 2-stream transfer scheme' + else if (iswmode == 3) then + print *,' --- Discrete ordinates 2-stream transfer scheme' + endif + + if (iswrgas <= 0) then + print *,' --- Rare gases absorption is NOT included in SW' + else + print *,' --- Include rare gases N2O, CH4, O2, absorptions',& + & ' in SW' + endif + + if ( isubcsw == 0 ) then + print *,' --- Using standard grid average clouds, no ', & + & 'sub-column clouds approximation applied' + elseif ( isubcsw == 1 ) then + print *,' --- Using MCICA sub-colum clouds approximation ', & + & 'with a prescribed sequence of permutation seeds' + elseif ( isubcsw == 2 ) then + print *,' --- Using MCICA sub-colum clouds approximation ', & + & 'with provided input array of permutation seeds' + else + print *,' *** Error in specification of sub-column cloud ', & + & ' control flag isubcsw =',isubcsw,' !!' + stop + endif + endif + +!> -# Check cloud flags for consistency. + + if ((icldflg == 0 .and. iswcliq /= 0) .or. & + & (icldflg == 1 .and. iswcliq == 0)) then + print *,' *** Model cloud scheme inconsistent with SW', & + & ' radiation cloud radiative property setup !!' + stop + endif + + if ( isubcsw==0 .and. iovrsw>2 ) then + if (me == 0) then + print *,' *** IOVRSW=',iovrsw,' is not available for', & + & ' ISUBCSW=0 setting!!' + print *,' The program will use maximum/random overlap', & + & ' instead.' + endif + + iovrsw = 1 + endif + +!> -# Setup constant factors for heating rate +!! the 1.0e-2 is to convert pressure from mb to \f$N/m^2\f$ . + + if (iswrate == 1) then +! heatfac = 8.4391 +! heatfac = con_g * 86400. * 1.0e-2 / con_cp ! (in k/day) + heatfac = con_g * 864.0 / con_cp ! (in k/day) + else + heatfac = con_g * 1.0e-2 / con_cp ! (in k/second) + endif + +!> -# Define exponential lookup tables for transmittance. +! tau is computed as a function of the \a tau transition function, and +! transmittance is calculated as a function of tau. all tables +! are computed at intervals of 0.0001. the inverse of the +! constant used in the Pade approximation to the tau transition +! function is set to bpade. + + exp_tbl(0) = 1.0 + exp_tbl(NTBMX) = expeps + + do i = 1, NTBMX-1 + tfn = float(i) / float(NTBMX-i) + tau = bpade * tfn + exp_tbl(i) = exp( -tau ) + enddo + + return +!................................... + end subroutine rswinit +!! @} +!----------------------------------- + +!>\ingroup module_radsw_main +!> This subroutine computes the cloud optical properties for each +!! cloudy layer and g-point interval. +!!\param cfrac layer cloud fraction +!!\n for physparam::iswcliq > 0 (prognostic cloud scheme) - - - +!!\param cliqp layer in-cloud liq water path (\f$g/m^2\f$) +!!\param reliq mean eff radius for liq cloud (micron) +!!\param cicep layer in-cloud ice water path (\f$g/m^2\f$) +!!\param reice mean eff radius for ice cloud (micron) +!!\param cdat1 layer rain drop water path (\f$g/m^2\f$) +!!\param cdat2 effective radius for rain drop (micron) +!!\param cdat3 layer snow flake water path(\f$g/m^2\f$) +!!\param cdat4 mean eff radius for snow flake(micron) +!!\n for physparam::iswcliq = 0 (diagnostic cloud scheme) - - - +!!\param cliqp not used +!!\param cicep not used +!!\param reliq not used +!!\param reice not used +!!\param cdat1 layer cloud optical depth +!!\param cdat2 layer cloud single scattering albedo +!!\param cdat3 layer cloud asymmetry factor +!!\param cdat4 optional use +!!\param cf1 effective total cloud cover at surface +!!\param nlay vertical layer number +!!\param ipseed permutation seed for generating random numbers +!! (isubcsw>0) +!!\param dz layer thickness (km) +!!\param delgth layer cloud decorrelation length (km) +!!\param taucw cloud optical depth, w/o delta scaled +!!\param ssacw weighted cloud single scattering albedo +!! (ssa = ssacw / taucw) +!!\param asycw weighted cloud asymmetry factor +!! (asy = asycw / ssacw) +!!\param cldfrc cloud fraction of grid mean value +!!\param cldfmc cloud fraction for each sub-column +!!\section General_cldprop cldprop General Algorithm +!> @{ +!----------------------------------- + subroutine cldprop & + & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs + & cf1, nlay, ipseed, dz, delgth,iswcliq,iovrsw, isubcsw, & + & taucw, ssacw, asycw, cldfrc, cldfmc & ! --- output + & ) + +! =================== program usage description =================== ! +! ! +! Purpose: Compute the cloud optical properties for each cloudy layer ! +! and g-point interval. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: size ! +! cfrac - real, layer cloud fraction nlay ! +! ..... for iswcliq > 0 (prognostic cloud sckeme) - - - ! +! cliqp - real, layer in-cloud liq water path (g/m**2) nlay ! +! reliq - real, mean eff radius for liq cloud (micron) nlay ! +! cicep - real, layer in-cloud ice water path (g/m**2) nlay ! +! reice - real, mean eff radius for ice cloud (micron) nlay ! +! cdat1 - real, layer rain drop water path (g/m**2) nlay ! +! cdat2 - real, effective radius for rain drop (micron) nlay ! +! cdat3 - real, layer snow flake water path(g/m**2) nlay ! +! cdat4 - real, mean eff radius for snow flake(micron) nlay ! +! ..... for iswcliq = 0 (diagnostic cloud sckeme) - - - ! +! cdat1 - real, layer cloud optical depth nlay ! +! cdat2 - real, layer cloud single scattering albedo nlay ! +! cdat3 - real, layer cloud asymmetry factor nlay ! +! cdat4 - real, optional use nlay ! +! cliqp - real, not used nlay ! +! cicep - real, not used nlay ! +! reliq - real, not used nlay ! +! reice - real, not used nlay ! +! ! +! cf1 - real, effective total cloud cover at surface 1 ! +! nlay - integer, vertical layer number 1 ! +! ipseed- permutation seed for generating random numbers (isubcsw>0) ! +! dz - real, layer thickness (km) nlay ! +! delgth- real, layer cloud decorrelation length (km) 1 ! +! ! +! outputs: ! +! taucw - real, cloud optical depth, w/o delta scaled nlay*nbdsw ! +! ssacw - real, weighted cloud single scattering albedo nlay*nbdsw ! +! (ssa = ssacw / taucw) ! +! asycw - real, weighted cloud asymmetry factor nlay*nbdsw ! +! (asy = asycw / ssacw) ! +! cldfrc - real, cloud fraction of grid mean value nlay ! +! cldfmc - real, cloud fraction for each sub-column nlay*ngptsw! +! ! +! ! +! explanation of the method for each value of iswcliq, and iswcice. ! +! set up in module "physparam" ! +! ! +! iswcliq=0 : input cloud optical property (tau, ssa, asy). ! +! (used for diagnostic cloud method) ! +! iswcliq>0 : input cloud liq/ice path and effective radius, also ! +! require the user of 'iswcice' to specify the method ! +! used to compute aborption due to water/ice parts. ! +! ................................................................... ! +! ! +! iswcliq=1 : liquid water cloud optical properties are computed ! +! as in hu and stamnes (1993), j. clim., 6, 728-742. ! +! iswcliq=2 : updated coeffs for hu and stamnes (1993) by aer ! +! w v3.9-v4.0. ! +! ! +! iswcice used only when iswcliq > 0 ! +! the cloud ice path (g/m2) and ice effective radius ! +! (microns) are inputs. ! +! iswcice=1 : ice cloud optical properties are computed as in ! +! ebert and curry (1992), jgr, 97, 3831-3836. ! +! iswcice=2 : ice cloud optical properties are computed as in ! +! streamer v3.0 (2001), key, streamer user's guide, ! +! cooperative institude for meteorological studies,95pp! +! iswcice=3 : ice cloud optical properties are computed as in ! +! fu (1996), j. clim., 9. ! +! ! +! other cloud control module variables: ! +! isubcsw =0: standard cloud scheme, no sub-col cloud approximation ! +! >0: mcica sub-col cloud scheme using ipseed as permutation! +! seed for generating rundom numbers ! +! ! +! ====================== end of description block ================= ! +! + use module_radsw_cldprtb + +! --- inputs: + integer, intent(in) :: nlay, ipseed,iswcliq,iovrsw,isubcsw + real (kind=kind_phys), intent(in) :: cf1, delgth + + real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & + & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, cfrac, dz + +! --- outputs: + real (kind=kind_phys), dimension(nlay,ngptsw), intent(out) :: & + & cldfmc + real (kind=kind_phys), dimension(nlay,nbdsw), intent(out) :: & + & taucw, ssacw, asycw + real (kind=kind_phys), dimension(nlay), intent(out) :: cldfrc + +! --- locals: + real (kind=kind_phys), dimension(nblow:nbhgh) :: tauliq, tauice, & + & ssaliq, ssaice, ssaran, ssasnw, asyliq, asyice, & + & asyran, asysnw + real (kind=kind_phys), dimension(nlay) :: cldf + + real (kind=kind_phys) :: dgeice, factor, fint, tauran, tausnw, & + & cldliq, refliq, cldice, refice, cldran, cldsnw, refsnw, & + & extcoliq, ssacoliq, asycoliq, extcoice, ssacoice, asycoice,& + & dgesnw + + logical :: lcloudy(nlay,ngptsw) + integer :: ia, ib, ig, jb, k, index + +! +!===> ... begin here +! + do ib = 1, nbdsw + do k = 1, nlay + taucw (k,ib) = f_zero + ssacw (k,ib) = f_one + asycw (k,ib) = f_zero + enddo + enddo + +!> -# Compute cloud radiative properties for a cloudy column. + + lab_if_iswcliq : if (iswcliq > 0) then + + lab_do_k : do k = 1, nlay + lab_if_cld : if (cfrac(k) > ftiny) then + +!> - Compute optical properties for rain and snow. +!!\n For rain: tauran/ssaran/asyran +!!\n For snow: tausnw/ssasnw/asysnw +!> - Calculation of absorption coefficients due to water clouds +!!\n For water clouds: tauliq/ssaliq/asyliq +!> - Calculation of absorption coefficients due to ice clouds +!!\n For ice clouds: tauice/ssaice/asyice +!> - For Prognostic cloud scheme: sum up the cloud optical property: +!!\n \f$ taucw=tauliq+tauice+tauran+tausnw \f$ +!!\n \f$ ssacw=ssaliq+ssaice+ssaran+ssasnw \f$ +!!\n \f$ asycw=asyliq+asyice+asyran+asysnw \f$ + + cldran = cdat1(k) +! refran = cdat2(k) + cldsnw = cdat3(k) + refsnw = cdat4(k) + dgesnw = 1.0315 * refsnw ! for fu's snow formula + + tauran = cldran * a0r + +!> - If use fu's formula it needs to be normalized by snow/ice density. +!! not use snow density = 0.1 g/cm**3 = 0.1 g/(mu * m**2) +!!\n use ice density = 0.9167 g/cm**3 = 0.9167 g/(mu * m**2) +!!\n 1/0.9167 = 1.09087 +!!\n factor 1.5396=8/(3*sqrt(3)) converts reff to generalized ice particle size +!! use newer factor value 1.0315 + if (cldsnw>f_zero .and. refsnw>10.0_kind_phys) then +! tausnw = cldsnw * (a0s + a1s/refsnw) + tausnw = cldsnw*1.09087*(a0s + a1s/dgesnw) ! fu's formula + else + tausnw = f_zero + endif + + do ib = nblow, nbhgh + ssaran(ib) = tauran * (f_one - b0r(ib)) + ssasnw(ib) = tausnw * (f_one - (b0s(ib)+b1s(ib)*dgesnw)) + asyran(ib) = ssaran(ib) * c0r(ib) + asysnw(ib) = ssasnw(ib) * c0s(ib) + enddo + + cldliq = cliqp(k) + cldice = cicep(k) + refliq = reliq(k) + refice = reice(k) + +!> - Calculation of absorption coefficients due to water clouds. + + if ( cldliq <= f_zero ) then + do ib = nblow, nbhgh + tauliq(ib) = f_zero + ssaliq(ib) = f_zero + asyliq(ib) = f_zero + enddo + else + factor = refliq - 1.5 + index = max( 1, min( 57, int( factor ) )) + fint = factor - float(index) + + if ( iswcliq == 1 ) then + do ib = nblow, nbhgh + extcoliq = max(f_zero, extliq1(index,ib) & + & + fint*(extliq1(index+1,ib)-extliq1(index,ib)) ) + ssacoliq = max(f_zero, min(f_one, ssaliq1(index,ib) & + & + fint*(ssaliq1(index+1,ib)-ssaliq1(index,ib)) )) + + asycoliq = max(f_zero, min(f_one, asyliq1(index,ib) & + & + fint*(asyliq1(index+1,ib)-asyliq1(index,ib)) )) +! forcoliq = asycoliq * asycoliq + + tauliq(ib) = cldliq * extcoliq + ssaliq(ib) = tauliq(ib) * ssacoliq + asyliq(ib) = ssaliq(ib) * asycoliq + enddo + elseif ( iswcliq == 2 ) then ! use updated coeffs + do ib = nblow, nbhgh + extcoliq = max(f_zero, extliq2(index,ib) & + & + fint*(extliq2(index+1,ib)-extliq2(index,ib)) ) + ssacoliq = max(f_zero, min(f_one, ssaliq2(index,ib) & + & + fint*(ssaliq2(index+1,ib)-ssaliq2(index,ib)) )) + + asycoliq = max(f_zero, min(f_one, asyliq2(index,ib) & + & + fint*(asyliq2(index+1,ib)-asyliq2(index,ib)) )) +! forcoliq = asycoliq * asycoliq + + tauliq(ib) = cldliq * extcoliq + ssaliq(ib) = tauliq(ib) * ssacoliq + asyliq(ib) = ssaliq(ib) * asycoliq + enddo + endif ! end if_iswcliq_block + endif ! end if_cldliq_block + +!> - Calculation of absorption coefficients due to ice clouds. + + if ( cldice <= f_zero ) then + do ib = nblow, nbhgh + tauice(ib) = f_zero + ssaice(ib) = f_zero + asyice(ib) = f_zero + enddo + else + +!> - ebert and curry approach for all particle sizes though somewhat +!! unjustified for large ice particles. + + if ( iswcice == 1 ) then + refice = min(130.0_kind_phys,max(13.0_kind_phys,refice)) + + do ib = nblow, nbhgh + ia = idxebc(ib) ! eb_&_c band index for ice cloud coeff + + extcoice = max(f_zero, abari(ia)+bbari(ia)/refice ) + ssacoice = max(f_zero, min(f_one, & + & f_one-cbari(ia)-dbari(ia)*refice )) + asycoice = max(f_zero, min(f_one, & + & ebari(ia)+fbari(ia)*refice )) +! forcoice = asycoice * asycoice + + tauice(ib) = cldice * extcoice + ssaice(ib) = tauice(ib) * ssacoice + asyice(ib) = ssaice(ib) * asycoice + enddo + +!> - streamer approach for ice effective radius between 5.0 and 131.0 microns. + + elseif ( iswcice == 2 ) then + refice = min(131.0_kind_phys,max(5.0_kind_phys,refice)) + + factor = (refice - 2.0) / 3.0 + index = max( 1, min( 42, int( factor ) )) + fint = factor - float(index) + + do ib = nblow, nbhgh + extcoice = max(f_zero, extice2(index,ib) & + & + fint*(extice2(index+1,ib)-extice2(index,ib)) ) + ssacoice = max(f_zero, min(f_one, ssaice2(index,ib) & + & + fint*(ssaice2(index+1,ib)-ssaice2(index,ib)) )) + asycoice = max(f_zero, min(f_one, asyice2(index,ib) & + & + fint*(asyice2(index+1,ib)-asyice2(index,ib)) )) +! forcoice = asycoice * asycoice + + tauice(ib) = cldice * extcoice + ssaice(ib) = tauice(ib) * ssacoice + asyice(ib) = ssaice(ib) * asycoice + enddo + +!> - fu's approach for ice effective radius between 4.8 and 135 microns +!! (generalized effective size from 5 to 140 microns). + + elseif ( iswcice == 3 ) then + dgeice = max( 5.0, min( 140.0, 1.0315*refice )) + + factor = (dgeice - 2.0) / 3.0 + index = max( 1, min( 45, int( factor ) )) + fint = factor - float(index) + + do ib = nblow, nbhgh + extcoice = max(f_zero, extice3(index,ib) & + & + fint*(extice3(index+1,ib)-extice3(index,ib)) ) + ssacoice = max(f_zero, min(f_one, ssaice3(index,ib) & + & + fint*(ssaice3(index+1,ib)-ssaice3(index,ib)) )) + asycoice = max(f_zero, min(f_one, asyice3(index,ib) & + & + fint*(asyice3(index+1,ib)-asyice3(index,ib)) )) +! fdelta = max(f_zero, min(f_one, fdlice3(index,ib) & +! & + fint*(fdlice3(index+1,ib)-fdlice3(index,ib)) )) +! forcoice = min( asycoice, fdelta+0.5/ssacoice ) ! see fu 1996 p. 2067 + + tauice(ib) = cldice * extcoice + ssaice(ib) = tauice(ib) * ssacoice + asyice(ib) = ssaice(ib) * asycoice + enddo + + endif ! end if_iswcice_block + endif ! end if_cldice_block + + do ib = 1, nbdsw + jb = nblow + ib - 1 + taucw(k,ib) = tauliq(jb)+tauice(jb)+tauran+tausnw + ssacw(k,ib) = ssaliq(jb)+ssaice(jb)+ssaran(jb)+ssasnw(jb) + asycw(k,ib) = asyliq(jb)+asyice(jb)+asyran(jb)+asysnw(jb) + enddo + + endif lab_if_cld + enddo lab_do_k + + else lab_if_iswcliq + + do k = 1, nlay + if (cfrac(k) > ftiny) then + do ib = 1, nbdsw + taucw(k,ib) = cdat1(k) + ssacw(k,ib) = cdat1(k) * cdat2(k) + asycw(k,ib) = ssacw(k,ib) * cdat3(k) + enddo + endif + enddo + + endif lab_if_iswcliq + +!> -# if physparam::isubcsw > 0, call mcica_subcol() to distribute +!! cloud properties to each g-point. + +!mz if ( isubcsw > 0 ) then ! mcica sub-col clouds approx + if ( isubcsw > 0 .and. iovrsw .ne. 4 ) then ! mcica sub-col clouds approx + + cldf(:) = cfrac(:) + where (cldf(:) < ftiny) + cldf(:) = f_zero + end where + +! --- ... call sub-column cloud generator + + call mcica_subcol & +! --- inputs: + & ( cldf, nlay, ipseed, dz, delgth, iovrsw, & +! --- outputs: + & lcloudy & + & ) + + do ig = 1, ngptsw + do k = 1, nlay + if ( lcloudy(k,ig) ) then + cldfmc(k,ig) = f_one + else + cldfmc(k,ig) = f_zero + endif + enddo + enddo + + else ! non-mcica, normalize cloud + + do k = 1, nlay + cldfrc(k) = cfrac(k) / cf1 + enddo + endif ! end if_isubcsw_block + + return +!................................... + end subroutine cldprop +!----------------------------------- +!> @} + +!>\ingroup module_radsw_main +!> This subroutine computes the sub-colum cloud profile flag array. +!!\param cldf layer cloud fraction +!!\param nlay number of model vertical layers +!!\param ipseed permute seed for random num generator +!!\param dz layer thickness (km) +!!\param de_lgth layer cloud decorrelation length (km) +!!\param lcloudy sub-colum cloud profile flag array +!!\section mcica_sw_gen mcica_subcol General Algorithm +!> @{ +! ---------------------------------- + subroutine mcica_subcol & + & ( cldf, nlay, ipseed, dz, de_lgth,iovrsw, & ! --- inputs + & lcloudy & ! --- outputs + & ) + +! ==================== defination of variables ==================== ! +! ! +! input variables: size ! +! cldf - real, layer cloud fraction nlay ! +! nlay - integer, number of model vertical layers 1 ! +! ipseed - integer, permute seed for random num generator 1 ! +! ** note : if the cloud generator is called multiple times, need ! +! to permute the seed between each call; if between calls ! +! for lw and sw, use values differ by the number of g-pts. ! +! dz - real, layer thickness (km) nlay ! +! de_lgth-real, layer cloud decorrelation length (km) 1 ! +! ! +! output variables: ! +! lcloudy - logical, sub-colum cloud profile flag array nlay*ngptsw! +! ! +! other control flags from module variables: ! +! iovrsw : control flag for cloud overlapping method ! +! =0: random ! +! =1: maximum/random overlapping clouds ! +! =2: maximum overlap cloud ! +! =3: cloud decorrelation-length overlap method ! +! ! +! ===================== end of definitions ==================== ! + + implicit none + +! --- inputs: + integer, intent(in) :: nlay, ipseed, iovrsw + + real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz + real (kind=kind_phys), intent(in) :: de_lgth + +! --- outputs: + logical, dimension(nlay,ngptsw), intent(out):: lcloudy + +! --- locals: + real (kind=kind_phys) :: cdfunc(nlay,ngptsw), tem1, & + & rand2d(nlay*ngptsw), rand1d(ngptsw), fac_lcf(nlay), & + & cdfun2(nlay,ngptsw) + + type (random_stat) :: stat ! for thread safe random generator + + integer :: k, n, k1, ig +! +!===> ... begin here +! +!> -# Advance randum number generator by ipseed values. + + call random_setseed & +! --- inputs: + & ( ipseed, & +! --- outputs: + & stat & + & ) + +!> -# Sub-column set up according to overlapping assumption. + + select case ( iovrsw ) + + case( 0 ) ! random overlap, pick a random value at every level + + call random_number & +! --- inputs: ( none ) +! --- outputs: + & ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptsw + do k = 1, nlay + k1 = k1 + 1 + cdfunc(k,n) = rand2d(k1) + enddo + enddo + + case( 1 ) ! max-ran overlap + + call random_number & +! --- inputs: ( none ) +! --- outputs: + & ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptsw + do k = 1, nlay + k1 = k1 + 1 + cdfunc(k,n) = rand2d(k1) + enddo + enddo + +! --- first pick a random number for bottom/top layer. +! then walk up the column: (aer's code) +! if layer below is cloudy, use the same rand num in the layer below +! if layer below is clear, use a new random number + +! --- from bottom up + do k = 2, nlay + k1 = k - 1 + tem1 = f_one - cldf(k1) + + do n = 1, ngptsw + if ( cdfunc(k1,n) > tem1 ) then + cdfunc(k,n) = cdfunc(k1,n) + else + cdfunc(k,n) = cdfunc(k,n) * tem1 + endif + enddo + enddo + +! --- then walk down the column: (if use original author's method) +! if layer above is cloudy, use the same rand num in the layer above +! if layer above is clear, use a new random number + +! --- from top down +! do k = nlay-1, 1, -1 +! k1 = k + 1 +! tem1 = f_one - cldf(k1) + +! do n = 1, ngptsw +! if ( cdfunc(k1,n) > tem1 ) then +! cdfunc(k,n) = cdfunc(k1,n) +! else +! cdfunc(k,n) = cdfunc(k,n) * tem1 +! endif +! enddo +! enddo + + case( 2 ) ! maximum overlap, pick same random numebr at every level + + call random_number & +! --- inputs: ( none ) +! --- outputs: + & ( rand1d, stat ) + + do n = 1, ngptsw + tem1 = rand1d(n) + + do k = 1, nlay + cdfunc(k,n) = tem1 + enddo + enddo + + case( 3 ) ! decorrelation length overlap + +! --- compute overlapping factors based on layer midpoint distances +! and decorrelation depths + + do k = nlay, 2, -1 + fac_lcf(k) = exp( -0.5 * (dz(k)+dz(k-1)) / de_lgth ) + enddo + +! --- setup 2 sets of random numbers + + call random_number ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptsw + do k = 1, nlay + k1 = k1 + 1 + cdfunc(k,n) = rand2d(k1) + enddo + enddo + + call random_number ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptsw + do k = 1, nlay + k1 = k1 + 1 + cdfun2(k,n) = rand2d(k1) + enddo + enddo + +! --- then working from the top down: +! if a random number (from an independent set -cdfun2) is smaller then the +! scale factor: use the upper layer's number, otherwise use a new random +! number (keep the original assigned one). + + do n = 1, ngptsw + do k = nlay-1, 1, -1 + k1 = k + 1 + if ( cdfun2(k,n) <= fac_lcf(k1) ) then + cdfunc(k,n) = cdfunc(k1,n) + endif + enddo + enddo + + end select + +!> -# Generate subcolumns for homogeneous clouds. + + do k = 1, nlay + tem1 = f_one - cldf(k) + + do n = 1, ngptsw + lcloudy(k,n) = cdfunc(k,n) >= tem1 + enddo + enddo + + return +! .................................. + end subroutine mcica_subcol +!> @} +! ---------------------------------- + +!>\ingroup module_radsw_main +!> This subroutine computes various coefficients needed in radiative +!! transfer calculation. +!!\param pavel layer pressure (mb) +!!\param tavel layer temperature (k) +!!\param h2ovmr layer w.v. volumn mixing ratio (kg/kg) +!!\param nlay total number of vertical layers +!!\param nlp1 total number of vertical levels +!!\param laytrop tropopause layer index (unitless) +!!\param jp indices of lower reference pressure +!!\param jt,jt1 indices of lower reference temperatures at +!! levels of jp and jp+1 +!!\param fac00,fac01,fac10,fac11 factors mltiply the reference ks,i,j=0/1 for +!! lower/higher of the 2 appropriate temperature +!! and altitudes. +!!\param selffac scale factor for w. v. self-continuum equals +!! (w.v. density)/(atmospheric density at 296k +!! and 1013 mb) +!!\param selffrac factor for temperature interpolation of +!! reference w.v. self-continuum data +!!\param indself index of lower ref temp for selffac +!!\param forfac scale factor for w. v. foreign-continuum +!!\param forfrac factor for temperature interpolation of +!! reference w.v. foreign-continuum data +!!\param indfor index of lower ref temp for forfac +!>\section setcoef_gen_rw setcoef General Algorithm +!! @{ +! ---------------------------------- + subroutine setcoef & + & ( pavel,tavel,h2ovmr, nlay,nlp1, & ! --- inputs + & laytrop,jp,jt,jt1,fac00,fac01,fac10,fac11, & ! --- outputs + & selffac,selffrac,indself,forfac,forfrac,indfor & + & ) + +! =================== program usage description =================== ! +! ! +! purpose: compute various coefficients needed in radiative transfer ! +! calculations. ! +! ! +! subprograms called: none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: -size- ! +! pavel - real, layer pressures (mb) nlay ! +! tavel - real, layer temperatures (k) nlay ! +! h2ovmr - real, layer w.v. volum mixing ratio (kg/kg) nlay ! +! nlay/nlp1 - integer, total number of vertical layers, levels 1 ! +! ! +! outputs: ! +! laytrop - integer, tropopause layer index (unitless) 1 ! +! jp - real, indices of lower reference pressure nlay ! +! jt, jt1 - real, indices of lower reference temperatures nlay ! +! at levels of jp and jp+1 ! +! facij - real, factors multiply the reference ks, nlay ! +! i,j=0/1 for lower/higher of the 2 appropriate ! +! temperatures and altitudes. ! +! selffac - real, scale factor for w. v. self-continuum nlay ! +! equals (w. v. density)/(atmospheric density ! +! at 296k and 1013 mb) ! +! selffrac - real, factor for temperature interpolation of nlay ! +! reference w. v. self-continuum data ! +! indself - integer, index of lower ref temp for selffac nlay ! +! forfac - real, scale factor for w. v. foreign-continuum nlay ! +! forfrac - real, factor for temperature interpolation of nlay ! +! reference w.v. foreign-continuum data ! +! indfor - integer, index of lower ref temp for forfac nlay ! +! ! +! ====================== end of definitions =================== ! + +! --- inputs: + integer, intent(in) :: nlay, nlp1 + + real (kind=kind_phys), dimension(:), intent(in) :: pavel, tavel, & + & h2ovmr + +! --- outputs: + integer, dimension(nlay), intent(out) :: indself, indfor, & + & jp, jt, jt1 + integer, intent(out) :: laytrop + + real (kind=kind_phys), dimension(nlay), intent(out) :: fac00, & + & fac01, fac10, fac11, selffac, selffrac, forfac, forfrac + +! --- locals: + real (kind=kind_phys) :: plog, fp, fp1, ft, ft1, tem1, tem2 + + integer :: i, k, jp1 +! +!===> ... begin here +! + laytrop= nlay + + do k = 1, nlay + + forfac(k) = pavel(k)*stpfac / (tavel(k)*(f_one + h2ovmr(k))) + +!> -# Find the two reference pressures on either side of the +!! layer pressure. store them in jp and jp1. store in fp the +!! fraction of the difference (in ln(pressure)) between these +!! two values that the layer pressure lies. + + plog = log(pavel(k)) + jp(k) = max(1, min(58, int(36.0 - 5.0*(plog+0.04)) )) + jp1 = jp(k) + 1 + fp = 5.0 * (preflog(jp(k)) - plog) + +!> -# Determine, for each reference pressure (jp and jp1), which +!! reference temperature (these are different for each reference +!! pressure) is nearest the layer temperature but does not exceed it. +!! store these indices in jt and jt1, resp. store in ft (resp. ft1) +!! the fraction of the way between jt (jt1) and the next highest +!! reference temperature that the layer temperature falls. + + tem1 = (tavel(k) - tref(jp(k))) / 15.0 + tem2 = (tavel(k) - tref(jp1 )) / 15.0 + jt (k) = max(1, min(4, int(3.0 + tem1) )) + jt1(k) = max(1, min(4, int(3.0 + tem2) )) + ft = tem1 - float(jt (k) - 3) + ft1 = tem2 - float(jt1(k) - 3) + +!> -# We have now isolated the layer ln pressure and temperature, +!! between two reference pressures and two reference temperatures +!! (for each reference pressure). we multiply the pressure +!! fraction fp with the appropriate temperature fractions to get +!! the factors that will be needed for the interpolation that yields +!! the optical depths (performed in routines taugbn for band n). + + fp1 = f_one - fp + fac10(k) = fp1 * ft + fac00(k) = fp1 * (f_one - ft) + fac11(k) = fp * ft1 + fac01(k) = fp * (f_one - ft1) + +!> -# If the pressure is less than ~100mb, perform a different +!! set of species interpolations. + + if ( plog > 4.56 ) then + + laytrop = k + +!> -# Set up factors needed to separately include the water vapor +!! foreign-continuum in the calculation of absorption coefficient. + + tem1 = (332.0 - tavel(k)) / 36.0 + indfor (k) = min(2, max(1, int(tem1))) + forfrac(k) = tem1 - float(indfor(k)) + +!> -# Set up factors needed to separately include the water vapor +!! self-continuum in the calculation of absorption coefficient. + + tem2 = (tavel(k) - 188.0) / 7.2 + indself (k) = min(9, max(1, int(tem2)-7)) + selffrac(k) = tem2 - float(indself(k) + 7) + selffac (k) = h2ovmr(k) * forfac(k) + + else + +! --- ... set up factors needed to separately include the water vapor +! foreign-continuum in the calculation of absorption coefficient. + + tem1 = (tavel(k) - 188.0) / 36.0 + indfor (k) = 3 + forfrac(k) = tem1 - f_one + + indself (k) = 0 + selffrac(k) = f_zero + selffac (k) = f_zero + + endif + + enddo ! end_do_k_loop + + return +! .................................. + end subroutine setcoef +!! @} +! ---------------------------------- + +!>\ingroup module_radsw_main +!> This subroutine computes the shortwave radiative fluxes using +!! two-stream method. +!!\param ssolar incoming solar flux at top +!!\param cosz cosine solar zenith angle +!!\param sntz secant solar zenith angle +!!\param albbm surface albedo for direct beam radiation +!!\param albdf surface albedo for diffused radiation +!!\param sfluxzen spectral distribution of incoming solar flux +!!\param cldfrc layer cloud fraction +!!\param cf1 >0: cloudy sky, otherwise: clear sky +!!\param cf0 =1-cf1 +!!\param taug spectral optical depth for gases +!!\param taur optical depth for rayleigh scattering +!!\param tauae aerosols optical depth +!!\param ssaae aerosols single scattering albedo +!!\param asyae aerosols asymmetry factor +!!\param taucw weighted cloud optical depth +!!\param ssacw weighted cloud single scat albedo +!!\param asycw weighted cloud asymmetry factor +!!\param nlay,nlp1 number of layers/levels +!!\param fxupc tot sky upward flux +!!\param fxdnc tot sky downward flux +!!\param fxup0 clr sky upward flux +!!\param fxdn0 clr sky downward flux +!!\param ftoauc tot sky toa upwd flux +!!\param ftoau0 clr sky toa upwd flux +!!\param ftoadc toa downward (incoming) solar flux +!!\param fsfcuc tot sky sfc upwd flux +!!\param fsfcu0 clr sky sfc upwd flux +!!\param fsfcdc tot sky sfc dnwd flux +!!\param fsfcd0 clr sky sfc dnwd flux +!!\param sfbmc tot sky sfc dnwd beam flux (nir/uv+vis) +!!\param sfdfc tot sky sfc dnwd diff flux (nir/uv+vis) +!!\param sfbm0 clr sky sfc dnwd beam flux (nir/uv+vis) +!!\param sfdf0 clr sky sfc dnwd diff flux (nir/uv+vis) +!!\param suvbfc tot sky sfc dnwd uv-b flux +!!\param suvbf0 clr sky sfc dnwd uv-b flux +!>\section General_spcvrtc spcvrtc General Algorithm +!! @{ +!----------------------------------- + subroutine spcvrtc & + & ( ssolar,cosz,sntz,albbm,albdf,sfluxzen,cldfrc, & ! --- inputs + & cf1,cf0,taug,taur,tauae,ssaae,asyae,taucw,ssacw,asycw, & + & nlay, nlp1, & + & fxupc,fxdnc,fxup0,fxdn0, & ! --- outputs + & ftoauc,ftoau0,ftoadc,fsfcuc,fsfcu0,fsfcdc,fsfcd0, & + & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & + & ) + +! =================== program usage description =================== ! +! ! +! purpose: computes the shortwave radiative fluxes using two-stream ! +! method ! +! ! +! subprograms called: vrtqdr ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: size ! +! ssolar - real, incoming solar flux at top 1 ! +! cosz - real, cosine solar zenith angle 1 ! +! sntz - real, secant solar zenith angle 1 ! +! albbm - real, surface albedo for direct beam radiation 2 ! +! albdf - real, surface albedo for diffused radiation 2 ! +! sfluxzen- real, spectral distribution of incoming solar flux ngptsw! +! cldfrc - real, layer cloud fraction nlay ! +! cf1 - real, >0: cloudy sky, otherwise: clear sky 1 ! +! cf0 - real, =1-cf1 1 ! +! taug - real, spectral optical depth for gases nlay*ngptsw! +! taur - real, optical depth for rayleigh scattering nlay*ngptsw! +! tauae - real, aerosols optical depth nlay*nbdsw ! +! ssaae - real, aerosols single scattering albedo nlay*nbdsw ! +! asyae - real, aerosols asymmetry factor nlay*nbdsw ! +! taucw - real, weighted cloud optical depth nlay*nbdsw ! +! ssacw - real, weighted cloud single scat albedo nlay*nbdsw ! +! asycw - real, weighted cloud asymmetry factor nlay*nbdsw ! +! nlay,nlp1 - integer, number of layers/levels 1 ! +! ! +! output variables: ! +! fxupc - real, tot sky upward flux nlp1*nbdsw ! +! fxdnc - real, tot sky downward flux nlp1*nbdsw ! +! fxup0 - real, clr sky upward flux nlp1*nbdsw ! +! fxdn0 - real, clr sky downward flux nlp1*nbdsw ! +! ftoauc - real, tot sky toa upwd flux 1 ! +! ftoau0 - real, clr sky toa upwd flux 1 ! +! ftoadc - real, toa downward (incoming) solar flux 1 ! +! fsfcuc - real, tot sky sfc upwd flux 1 ! +! fsfcu0 - real, clr sky sfc upwd flux 1 ! +! fsfcdc - real, tot sky sfc dnwd flux 1 ! +! fsfcd0 - real, clr sky sfc dnwd flux 1 ! +! sfbmc - real, tot sky sfc dnwd beam flux (nir/uv+vis) 2 ! +! sfdfc - real, tot sky sfc dnwd diff flux (nir/uv+vis) 2 ! +! sfbm0 - real, clr sky sfc dnwd beam flux (nir/uv+vis) 2 ! +! sfdf0 - real, clr sky sfc dnwd diff flux (nir/uv+vis) 2 ! +! suvbfc - real, tot sky sfc dnwd uv-b flux 1 ! +! suvbf0 - real, clr sky sfc dnwd uv-b flux 1 ! +! ! +! internal variables: ! +! zrefb - real, direct beam reflectivity for clear/cloudy nlp1 ! +! zrefd - real, diffuse reflectivity for clear/cloudy nlp1 ! +! ztrab - real, direct beam transmissivity for clear/cloudy nlp1 ! +! ztrad - real, diffuse transmissivity for clear/cloudy nlp1 ! +! zldbt - real, layer beam transmittance for clear/cloudy nlp1 ! +! ztdbt - real, lev total beam transmittance for clr/cld nlp1 ! +! ! +! control parameters in module "physparam" ! +! iswmode - control flag for 2-stream transfer schemes ! +! = 1 delta-eddington (joseph et al., 1976) ! +! = 2 pifm (zdunkowski et al., 1980) ! +! = 3 discrete ordinates (liou, 1973) ! +! ! +! ******************************************************************* ! +! original code description ! +! ! +! method: ! +! ------- ! +! standard delta-eddington, p.i.f.m., or d.o.m. layer calculations. ! +! kmodts = 1 eddington (joseph et al., 1976) ! +! = 2 pifm (zdunkowski et al., 1980) ! +! = 3 discrete ordinates (liou, 1973) ! +! ! +! modifications: ! +! -------------- ! +! original: h. barker ! +! revision: merge with rrtmg_sw: j.-j.morcrette, ecmwf, feb 2003 ! +! revision: add adjustment for earth/sun distance:mjiacono,aer,oct2003! +! revision: bug fix for use of palbp and palbd: mjiacono, aer, nov2003! +! revision: bug fix to apply delta scaling to clear sky: aer, dec2004 ! +! revision: code modified so that delta scaling is not done in cloudy ! +! profiles if routine cldprop is used; delta scaling can be ! +! applied by swithcing code below if cldprop is not used to ! +! get cloud properties. aer, jan 2005 ! +! revision: uniform formatting for rrtmg: mjiacono, aer, jul 2006 ! +! revision: use exponential lookup table for transmittance: mjiacono, ! +! aer, aug 2007 ! +! ! +! ******************************************************************* ! +! ====================== end of description block ================= ! + +! --- constant parameters: + real (kind=kind_phys), parameter :: zcrit = 0.9999995 ! thresold for conservative scattering + real (kind=kind_phys), parameter :: zsr3 = sqrt(3.0) + real (kind=kind_phys), parameter :: od_lo = 0.06 + real (kind=kind_phys), parameter :: eps1 = 1.0e-8 + +! --- inputs: + integer, intent(in) :: nlay, nlp1 + + real (kind=kind_phys), dimension(nlay,ngptsw), intent(in) :: & + & taug, taur + real (kind=kind_phys), dimension(nlay,nbdsw), intent(in) :: & + & taucw, ssacw, asycw, tauae, ssaae, asyae + + real (kind=kind_phys), dimension(ngptsw), intent(in) :: sfluxzen + real (kind=kind_phys), dimension(nlay), intent(in) :: cldfrc + + real (kind=kind_phys), dimension(2), intent(in) :: albbm, albdf + + real (kind=kind_phys), intent(in) :: cosz, sntz, cf1, cf0, ssolar + +! --- outputs: + real (kind=kind_phys), dimension(nlp1,nbdsw), intent(out) :: & + & fxupc, fxdnc, fxup0, fxdn0 + + real (kind=kind_phys), dimension(2), intent(out) :: sfbmc, sfdfc, & + & sfbm0, sfdf0 + + real (kind=kind_phys), intent(out) :: suvbfc, suvbf0, ftoadc, & + & ftoauc, ftoau0, fsfcuc, fsfcu0, fsfcdc, fsfcd0 + +! --- locals: + real (kind=kind_phys), dimension(nlay) :: ztaus, zssas, zasys, & + & zldbt0 + + real (kind=kind_phys), dimension(nlp1) :: zrefb, zrefd, ztrab, & + & ztrad, ztdbt, zldbt, zfu, zfd + + real (kind=kind_phys) :: ztau1, zssa1, zasy1, ztau0, zssa0, & + & zasy0, zasy3, zssaw, zasyw, zgam1, zgam2, zgam3, zgam4, & + & zc0, zc1, za1, za2, zb1, zb2, zrk, zrk2, zrp, zrp1, zrm1, & + & zrpp, zrkg1, zrkg3, zrkg4, zexp1, zexm1, zexp2, zexm2, & + & zexp3, zexp4, zden1, ze1r45, ftind, zsolar, zrefb1, & + & zrefd1, ztrab1, ztrad1, ztdbt0, zr1, zr2, zr3, zr4, zr5, & + & zt1, zt2, zt3, zf1, zf2, zrpp1 + + integer :: ib, ibd, jb, jg, k, kp, itind +! +!===> ... begin here + +!> -# Initialize output fluxes. + do ib = 1, nbdsw + do k = 1, nlp1 + fxdnc(k,ib) = f_zero + fxupc(k,ib) = f_zero + fxdn0(k,ib) = f_zero + fxup0(k,ib) = f_zero + enddo + enddo + + ftoadc = f_zero + ftoauc = f_zero + ftoau0 = f_zero + fsfcuc = f_zero + fsfcu0 = f_zero + fsfcdc = f_zero + fsfcd0 = f_zero + +!! --- ... uv-b surface downward fluxes + suvbfc = f_zero + suvbf0 = f_zero + +!! --- ... output surface flux components + sfbmc(1) = f_zero + sfbmc(2) = f_zero + sfdfc(1) = f_zero + sfdfc(2) = f_zero + sfbm0(1) = f_zero + sfbm0(2) = f_zero + sfdf0(1) = f_zero + sfdf0(2) = f_zero + +!> -# Loop over all g-points in each band. + + lab_do_jg : do jg = 1, ngptsw + + jb = NGB(jg) + ib = jb + 1 - nblow + ibd = idxsfc(jb) + + zsolar = ssolar * sfluxzen(jg) + +!> -# Set up toa direct beam and surface values (beam and diff). + + ztdbt(nlp1) = f_one + ztdbt0 = f_one + + zldbt(1) = f_zero + if (ibd /= 0) then + zrefb(1) = albbm(ibd) + zrefd(1) = albdf(ibd) + else + zrefb(1) = 0.5 * (albbm(1) + albbm(2)) + zrefd(1) = 0.5 * (albdf(1) + albdf(2)) + endif + ztrab(1) = f_zero + ztrad(1) = f_zero + +!> -# Compute clear-sky optical parameters, layer reflectance and +!! transmittance. +! - Set up toa direct beam and surface values (beam and diff). +! - Delta scaling for clear-sky condition. +! - General two-stream expressions for physparam::iswmode . +! - Compute homogeneous reflectance and transmittance for both +! conservative and non-conservative scattering. +! - Pre-delta-scaling clear and cloudy direct beam transmittance. +! - Call swflux() to compute the upward and downward radiation +! fluxes. + + do k = nlay, 1, -1 + kp = k + 1 + + ztau0 = max( ftiny, taur(k,jg)+taug(k,jg)+tauae(k,ib) ) + zssa0 = taur(k,jg) + tauae(k,ib)*ssaae(k,ib) + zasy0 = asyae(k,ib)*ssaae(k,ib)*tauae(k,ib) + zssaw = min( oneminus, zssa0 / ztau0 ) + zasyw = zasy0 / max( ftiny, zssa0 ) + +!> - Saving clear-sky quantities for later total-sky usage. + ztaus(k) = ztau0 + zssas(k) = zssa0 + zasys(k) = zasy0 + +!> - Delta scaling for clear-sky condition. + za1 = zasyw * zasyw + za2 = zssaw * za1 + + ztau1 = (f_one - za2) * ztau0 + zssa1 = (zssaw - za2) / (f_one - za2) +!org zasy1 = (zasyw - za1) / (f_one - za1) ! this line is replaced by the next + zasy1 = zasyw / (f_one + zasyw) ! to reduce truncation error + zasy3 = 0.75 * zasy1 + +!> - Perform general two-stream expressions: +!!\n control parameters in module "physparam" +!!\n iswmode - control flag for 2-stream transfer schemes +!!\n = 1 delta-eddington (joseph et al., 1976) +!!\n = 2 pifm (zdunkowski et al., 1980) +!!\n = 3 discrete ordinates (liou, 1973) + if ( iswmode == 1 ) then + zgam1 = 1.75 - zssa1 * (f_one + zasy3) + zgam2 =-0.25 + zssa1 * (f_one - zasy3) + zgam3 = 0.5 - zasy3 * cosz + elseif ( iswmode == 2 ) then ! pifm + zgam1 = 2.0 - zssa1 * (1.25 + zasy3) + zgam2 = 0.75* zssa1 * (f_one- zasy1) + zgam3 = 0.5 - zasy3 * cosz + elseif ( iswmode == 3 ) then ! discrete ordinates + zgam1 = zsr3 * (2.0 - zssa1 * (1.0 + zasy1)) * 0.5 + zgam2 = zsr3 * zssa1 * (1.0 - zasy1) * 0.5 + zgam3 = (1.0 - zsr3 * zasy1 * cosz) * 0.5 + endif + zgam4 = f_one - zgam3 + +!> - Compute homogeneous reflectance and transmittance for both conservative +!! scattering and non-conservative scattering. + + if ( zssaw >= zcrit ) then ! for conservative scattering + za1 = zgam1 * cosz - zgam3 + za2 = zgam1 * ztau1 + +! --- ... use exponential lookup table for transmittance, or expansion +! of exponential for low optical depth + + zb1 = min ( ztau1*sntz , 500.0 ) + if ( zb1 <= od_lo ) then + zb2 = f_one - zb1 + 0.5*zb1*zb1 + else + ftind = zb1 / (bpade + zb1) + itind = ftind*NTBMX + 0.5 + zb2 = exp_tbl(itind) + endif + +! ... collimated beam + zrefb(kp) = max(f_zero, min(f_one, & + & (za2 - za1*(f_one - zb2))/(f_one + za2) )) + ztrab(kp) = max(f_zero, min(f_one, f_one-zrefb(kp) )) + +! ... isotropic incidence + zrefd(kp) = max(f_zero, min(f_one, za2/(f_one + za2) )) + ztrad(kp) = max(f_zero, min(f_one, f_one-zrefd(kp) )) + + else ! for non-conservative scattering + za1 = zgam1*zgam4 + zgam2*zgam3 + za2 = zgam1*zgam3 + zgam2*zgam4 + zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) + zrk2= 2.0 * zrk + + zrp = zrk * cosz + zrp1 = f_one + zrp + zrm1 = f_one - zrp + zrpp1= f_one - zrp*zrp + zrpp = sign( max(flimit, abs(zrpp1)), zrpp1 ) ! avoid numerical singularity + zrkg1= zrk + zgam1 + zrkg3= zrk * zgam3 + zrkg4= zrk * zgam4 + + zr1 = zrm1 * (za2 + zrkg3) + zr2 = zrp1 * (za2 - zrkg3) + zr3 = zrk2 * (zgam3 - za2*cosz) + zr4 = zrpp * zrkg1 + zr5 = zrpp * (zrk - zgam1) + + zt1 = zrp1 * (za1 + zrkg4) + zt2 = zrm1 * (za1 - zrkg4) + zt3 = zrk2 * (zgam4 + za1*cosz) + +! --- ... use exponential lookup table for transmittance, or expansion +! of exponential for low optical depth + + zb1 = min ( zrk*ztau1, 500.0 ) + if ( zb1 <= od_lo ) then + zexm1 = f_one - zb1 + 0.5*zb1*zb1 + else + ftind = zb1 / (bpade + zb1) + itind = ftind*NTBMX + 0.5 + zexm1 = exp_tbl(itind) + endif + zexp1 = f_one / zexm1 + + zb2 = min ( sntz*ztau1, 500.0 ) + if ( zb2 <= od_lo ) then + zexm2 = f_one - zb2 + 0.5*zb2*zb2 + else + ftind = zb2 / (bpade + zb2) + itind = ftind*NTBMX + 0.5 + zexm2 = exp_tbl(itind) + endif + zexp2 = f_one / zexm2 + ze1r45 = zr4*zexp1 + zr5*zexm1 + +! ... collimated beam + if (ze1r45>=-eps1 .and. ze1r45<=eps1) then + zrefb(kp) = eps1 + ztrab(kp) = zexm2 + else + zden1 = zssa1 / ze1r45 + zrefb(kp) = max(f_zero, min(f_one, & + & (zr1*zexp1 - zr2*zexm1 - zr3*zexm2)*zden1 )) + ztrab(kp) = max(f_zero, min(f_one, zexm2*(f_one & + & - (zt1*zexp1 - zt2*zexm1 - zt3*zexp2)*zden1) )) + endif + +! ... diffuse beam + zden1 = zr4 / (ze1r45 * zrkg1) + zrefd(kp) = max(f_zero, min(f_one, & + & zgam2*(zexp1 - zexm1)*zden1 )) + ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) + endif ! end if_zssaw_block + +!> - Calculate direct beam transmittance. use exponential lookup table +!! for transmittance, or expansion of exponential for low optical depth. + + zr1 = ztau1 * sntz + if ( zr1 <= od_lo ) then + zexp3 = f_one - zr1 + 0.5*zr1*zr1 + else + ftind = zr1 / (bpade + zr1) + itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) + zexp3 = exp_tbl(itind) + endif + + ztdbt(k) = zexp3 * ztdbt(kp) + zldbt(kp) = zexp3 + +!> - Calculate pre-delta-scaling clear and cloudy direct beam transmittance. +! (must use 'orig', unscaled cloud optical depth) + + zr1 = ztau0 * sntz + if ( zr1 <= od_lo ) then + zexp4 = f_one - zr1 + 0.5*zr1*zr1 + else + ftind = zr1 / (bpade + zr1) + itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) + zexp4 = exp_tbl(itind) + endif + + zldbt0(k) = zexp4 + ztdbt0 = zexp4 * ztdbt0 + enddo ! end do_k_loop + +!> -# Call vrtqdr(), to compute the upward and downward radiation fluxes. + call vrtqdr & +! --- inputs: + & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & + & nlay, nlp1, & +! --- outputs: + & zfu, zfd & + & ) + +!> -# Compute upward and downward fluxes at levels. + do k = 1, nlp1 + fxup0(k,ib) = fxup0(k,ib) + zsolar*zfu(k) + fxdn0(k,ib) = fxdn0(k,ib) + zsolar*zfd(k) + enddo + +!> -# Compute surface downward beam/diffused flux components. + zb1 = zsolar*ztdbt0 + zb2 = zsolar*(zfd(1) - ztdbt0) + + if (ibd /= 0) then + sfbm0(ibd) = sfbm0(ibd) + zb1 + sfdf0(ibd) = sfdf0(ibd) + zb2 + else + zf1 = 0.5 * zb1 + zf2 = 0.5 * zb2 + sfbm0(1) = sfbm0(1) + zf1 + sfdf0(1) = sfdf0(1) + zf2 + sfbm0(2) = sfbm0(2) + zf1 + sfdf0(2) = sfdf0(2) + zf2 + endif +! sfbm0(ibd) = sfbm0(ibd) + zsolar*ztdbt0 +! sfdf0(ibd) = sfdf0(ibd) + zsolar*(zfd(1) - ztdbt0) + +!> -# Compute total sky optical parameters, layer reflectance and +!! transmittance. +! - Set up toa direct beam and surface values (beam and diff) +! - Delta scaling for total-sky condition +! - General two-stream expressions for physparam::iswmode +! - Compute homogeneous reflectance and transmittance for +! conservative scattering and non-conservative scattering +! - Pre-delta-scaling clear and cloudy direct beam transmittance +! - Call swflux() to compute the upward and downward radiation fluxes + + if ( cf1 > eps ) then + +!> - Set up toa direct beam and surface values (beam and diff). + ztdbt0 = f_one + zldbt(1) = f_zero + + do k = nlay, 1, -1 + kp = k + 1 + zc0 = f_one - cldfrc(k) + zc1 = cldfrc(k) + if ( zc1 > ftiny ) then ! it is a cloudy-layer + + ztau0 = ztaus(k) + taucw(k,ib) + zssa0 = zssas(k) + ssacw(k,ib) + zasy0 = zasys(k) + asycw(k,ib) + zssaw = min(oneminus, zssa0 / ztau0) + zasyw = zasy0 / max(ftiny, zssa0) + +!> - Perform delta scaling for total-sky condition. + za1 = zasyw * zasyw + za2 = zssaw * za1 + + ztau1 = (f_one - za2) * ztau0 + zssa1 = (zssaw - za2) / (f_one - za2) +!org zasy1 = (zasyw - za1) / (f_one - za1) + zasy1 = zasyw / (f_one + zasyw) + zasy3 = 0.75 * zasy1 + +!> - Perform general two-stream expressions: +!!\n control parameters in module "physparam" +!!\n iswmode - control flag for 2-stream transfer schemes +!!\n = 1 delta-eddington (joseph et al., 1976) +!!\n = 2 pifm (zdunkowski et al., 1980) +!!\n = 3 discrete ordinates (liou, 1973) + + if ( iswmode == 1 ) then + zgam1 = 1.75 - zssa1 * (f_one + zasy3) + zgam2 =-0.25 + zssa1 * (f_one - zasy3) + zgam3 = 0.5 - zasy3 * cosz + elseif ( iswmode == 2 ) then ! pifm + zgam1 = 2.0 - zssa1 * (1.25 + zasy3) + zgam2 = 0.75* zssa1 * (f_one- zasy1) + zgam3 = 0.5 - zasy3 * cosz + elseif ( iswmode == 3 ) then ! discrete ordinates + zgam1 = zsr3 * (2.0 - zssa1 * (1.0 + zasy1)) * 0.5 + zgam2 = zsr3 * zssa1 * (1.0 - zasy1) * 0.5 + zgam3 = (1.0 - zsr3 * zasy1 * cosz) * 0.5 + endif + zgam4 = f_one - zgam3 + + zrefb1 = zrefb(kp) + zrefd1 = zrefd(kp) + ztrab1 = ztrab(kp) + ztrad1 = ztrad(kp) + +!> - Compute homogeneous reflectance and transmittance for both conservative +!! and non-conservative scattering. + + if ( zssaw >= zcrit ) then ! for conservative scattering + za1 = zgam1 * cosz - zgam3 + za2 = zgam1 * ztau1 + +! --- ... use exponential lookup table for transmittance, or expansion +! of exponential for low optical depth + + zb1 = min ( ztau1*sntz , 500.0 ) + if ( zb1 <= od_lo ) then + zb2 = f_one - zb1 + 0.5*zb1*zb1 + else + ftind = zb1 / (bpade + zb1) + itind = ftind*NTBMX + 0.5 + zb2 = exp_tbl(itind) + endif + +! ... collimated beam + zrefb(kp) = max(f_zero, min(f_one, & + & (za2 - za1*(f_one - zb2))/(f_one + za2) )) + ztrab(kp) = max(f_zero, min(f_one, f_one-zrefb(kp))) + +! ... isotropic incidence + zrefd(kp) = max(f_zero, min(f_one, za2 / (f_one+za2) )) + ztrad(kp) = max(f_zero, min(f_one, f_one - zrefd(kp) )) + + else ! for non-conservative scattering + za1 = zgam1*zgam4 + zgam2*zgam3 + za2 = zgam1*zgam3 + zgam2*zgam4 + zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) + zrk2= 2.0 * zrk + + zrp = zrk * cosz + zrp1 = f_one + zrp + zrm1 = f_one - zrp + zrpp1= f_one - zrp*zrp + zrpp = sign( max(flimit, abs(zrpp1)), zrpp1 ) ! avoid numerical singularity + zrkg1= zrk + zgam1 + zrkg3= zrk * zgam3 + zrkg4= zrk * zgam4 + + zr1 = zrm1 * (za2 + zrkg3) + zr2 = zrp1 * (za2 - zrkg3) + zr3 = zrk2 * (zgam3 - za2*cosz) + zr4 = zrpp * zrkg1 + zr5 = zrpp * (zrk - zgam1) + + zt1 = zrp1 * (za1 + zrkg4) + zt2 = zrm1 * (za1 - zrkg4) + zt3 = zrk2 * (zgam4 + za1*cosz) + +! --- ... use exponential lookup table for transmittance, or expansion +! of exponential for low optical depth + + zb1 = min ( zrk*ztau1, 500.0 ) + if ( zb1 <= od_lo ) then + zexm1 = f_one - zb1 + 0.5*zb1*zb1 + else + ftind = zb1 / (bpade + zb1) + itind = ftind*NTBMX + 0.5 + zexm1 = exp_tbl(itind) + endif + zexp1 = f_one / zexm1 + + zb2 = min ( ztau1*sntz, 500.0 ) + if ( zb2 <= od_lo ) then + zexm2 = f_one - zb2 + 0.5*zb2*zb2 + else + ftind = zb2 / (bpade + zb2) + itind = ftind*NTBMX + 0.5 + zexm2 = exp_tbl(itind) + endif + zexp2 = f_one / zexm2 + ze1r45 = zr4*zexp1 + zr5*zexm1 + +! ... collimated beam + if ( ze1r45>=-eps1 .and. ze1r45<=eps1 ) then + zrefb(kp) = eps1 + ztrab(kp) = zexm2 + else + zden1 = zssa1 / ze1r45 + zrefb(kp) = max(f_zero, min(f_one, & + & (zr1*zexp1-zr2*zexm1-zr3*zexm2)*zden1 )) + ztrab(kp) = max(f_zero, min(f_one, zexm2*(f_one - & + & (zt1*zexp1-zt2*zexm1-zt3*zexp2)*zden1) )) + endif + +! ... diffuse beam + zden1 = zr4 / (ze1r45 * zrkg1) + zrefd(kp) = max(f_zero, min(f_one, & + & zgam2*(zexp1 - zexm1)*zden1 )) + ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) + endif ! end if_zssaw_block + +! --- ... combine clear and cloudy contributions for total sky +! and calculate direct beam transmittances + + zrefb(kp) = zc0*zrefb1 + zc1*zrefb(kp) + zrefd(kp) = zc0*zrefd1 + zc1*zrefd(kp) + ztrab(kp) = zc0*ztrab1 + zc1*ztrab(kp) + ztrad(kp) = zc0*ztrad1 + zc1*ztrad(kp) + +! --- ... direct beam transmittance. use exponential lookup table +! for transmittance, or expansion of exponential for low +! optical depth + + zr1 = ztau1 * sntz + if ( zr1 <= od_lo ) then + zexp3 = f_one - zr1 + 0.5*zr1*zr1 + else + ftind = zr1 / (bpade + zr1) + itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) + zexp3 = exp_tbl(itind) + endif + + zldbt(kp) = zc0*zldbt(kp) + zc1*zexp3 + ztdbt(k) = zldbt(kp) * ztdbt(kp) + +!> - Calculate pre-delta-scaling clear and cloudy direct beam transmittance. +! (must use 'orig', unscaled cloud optical depth) + + zr1 = ztau0 * sntz + if ( zr1 <= od_lo ) then + zexp4 = f_one - zr1 + 0.5*zr1*zr1 + else + ftind = zr1 / (bpade + zr1) + itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) + zexp4 = exp_tbl(itind) + endif + + ztdbt0 = (zc0*zldbt0(k) + zc1*zexp4) * ztdbt0 + + else ! if_zc1_block --- it is a clear layer + +! --- ... direct beam transmittance + ztdbt(k) = zldbt(kp) * ztdbt(kp) + +! --- ... pre-delta-scaling clear and cloudy direct beam transmittance + ztdbt0 = zldbt0(k) * ztdbt0 + + endif ! end if_zc1_block + enddo ! end do_k_loop + +!> -# Call vrtqdr(), to compute the upward and downward radiation fluxes. + + call vrtqdr & +! --- inputs: + & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & + & nlay, nlp1, & +! --- outputs: + & zfu, zfd & + & ) + +!> -# Compute upward and downward fluxes at levels. + do k = 1, nlp1 + fxupc(k,ib) = fxupc(k,ib) + zsolar*zfu(k) + fxdnc(k,ib) = fxdnc(k,ib) + zsolar*zfd(k) + enddo + +!> -# Process and save outputs. +!! - surface downward beam/diffused flux components + zb1 = zsolar*ztdbt0 + zb2 = zsolar*(zfd(1) - ztdbt0) + + if (ibd /= 0) then + sfbmc(ibd) = sfbmc(ibd) + zb1 + sfdfc(ibd) = sfdfc(ibd) + zb2 + else + zf1 = 0.5 * zb1 + zf2 = 0.5 * zb2 + sfbmc(1) = sfbmc(1) + zf1 + sfdfc(1) = sfdfc(1) + zf2 + sfbmc(2) = sfbmc(2) + zf1 + sfdfc(2) = sfdfc(2) + zf2 + endif +! sfbmc(ibd) = sfbmc(ibd) + zsolar*ztdbt0 +! sfdfc(ibd) = sfdfc(ibd) + zsolar*(zfd(1) - ztdbt0) + + endif ! end if_cf1_block + + enddo lab_do_jg + +! --- ... end of g-point loop + + do ib = 1, nbdsw + ftoadc = ftoadc + fxdn0(nlp1,ib) + ftoau0 = ftoau0 + fxup0(nlp1,ib) + fsfcu0 = fsfcu0 + fxup0(1,ib) + fsfcd0 = fsfcd0 + fxdn0(1,ib) + enddo + +!> - uv-b surface downward flux + ibd = nuvb - nblow + 1 + suvbf0 = fxdn0(1,ibd) + + if ( cf1 <= eps ) then ! clear column, set total-sky=clear-sky fluxes + do ib = 1, nbdsw + do k = 1, nlp1 + fxupc(k,ib) = fxup0(k,ib) + fxdnc(k,ib) = fxdn0(k,ib) + enddo + enddo + + ftoauc = ftoau0 + fsfcuc = fsfcu0 + fsfcdc = fsfcd0 + +!> - surface downward beam/diffused flux components + sfbmc(1) = sfbm0(1) + sfdfc(1) = sfdf0(1) + sfbmc(2) = sfbm0(2) + sfdfc(2) = sfdf0(2) + +!> - uv-b surface downward flux + suvbfc = suvbf0 + else ! cloudy column, compute total-sky fluxes + do ib = 1, nbdsw + do k = 1, nlp1 + fxupc(k,ib) = cf1*fxupc(k,ib) + cf0*fxup0(k,ib) + fxdnc(k,ib) = cf1*fxdnc(k,ib) + cf0*fxdn0(k,ib) + enddo + enddo + + do ib = 1, nbdsw + ftoauc = ftoauc + fxupc(nlp1,ib) + fsfcuc = fsfcuc + fxupc(1,ib) + fsfcdc = fsfcdc + fxdnc(1,ib) + enddo + +!> - uv-b surface downward flux + suvbfc = fxdnc(1,ibd) + +!> - surface downward beam/diffused flux components + sfbmc(1) = cf1*sfbmc(1) + cf0*sfbm0(1) + sfbmc(2) = cf1*sfbmc(2) + cf0*sfbm0(2) + sfdfc(1) = cf1*sfdfc(1) + cf0*sfdf0(1) + sfdfc(2) = cf1*sfdfc(2) + cf0*sfdf0(2) + endif ! end if_cf1_block + + return +!................................... + end subroutine spcvrtc +!----------------------------------- +!> @} + +!>\ingroup module_radsw_main +!> This subroutine computes the shortwave radiative fluxes using +!! two-stream method of h. barder and mcica,the monte-carlo independent +!! column approximation, for the representation of sub-grid cloud +!! variability (i.e. cloud overlap). +!!\param ssolar incoming solar flux at top +!!\param cosz cosine solar zenith angle +!!\param sntz secant solar zenith angle +!!\param albbm surface albedo for direct beam radiation +!!\param albdf surface albedo for diffused radiation +!!\param sfluxzen spectral distribution of incoming solar flux +!!\param cldfmc layer cloud fraction for g-point +!!\param cf1 >0: cloudy sky, otherwise: clear sky +!!\param cf0 =1-cf1 +!!\param taug spectral optical depth for gases +!!\param taur optical depth for rayleigh scattering +!!\param tauae aerosols optical depth +!!\param ssaae aerosols single scattering albedo +!!\param asyae aerosols asymmetry factor +!!\param taucw weighted cloud optical depth +!!\param ssacw weighted cloud single scat albedo +!!\param asycw weighted cloud asymmetry factor +!!\param nlay,nlp1 number of layers/levels +!!\param fxupc tot sky upward flux +!!\param fxdnc tot sky downward flux +!!\param fxup0 clr sky upward flux +!!\param fxdn0 clr sky downward flux +!!\param ftoauc tot sky toa upwd flux +!!\param ftoau0 clr sky toa upwd flux +!!\param ftoadc toa downward (incoming) solar flux +!!\param fsfcuc tot sky sfc upwd flux +!!\param fsfcu0 clr sky sfc upwd flux +!!\param fsfcdc tot sky sfc dnwd flux +!!\param fsfcd0 clr sky sfc dnwd flux +!!\param sfbmc tot sky sfc dnwd beam flux (nir/uv+vis) +!!\param sfdfc tot sky sfc dnwd diff flux (nir/uv+vis) +!!\param sfbm0 clr sky sfc dnwd beam flux (nir/uv+vis) +!!\param sfdf0 clr sky sfc dnwd diff flux (nir/uv+vis) +!!\param suvbfc tot sky sfc dnwd uv-b flux +!!\param suvbf0 clr sky sfc dnwd uv-b flux +!>\section spcvrtm_gen spcvrtm General Algorithm +!! @{ +!----------------------------------- + subroutine spcvrtm & + & ( ssolar,cosz,sntz,albbm,albdf,sfluxzen,cldfmc, & ! --- inputs + & cf1,cf0,taug,taur,tauae,ssaae,asyae,taucw,ssacw,asycw, & + & nlay, nlp1, & + & fxupc,fxdnc,fxup0,fxdn0, & ! --- outputs + & ftoauc,ftoau0,ftoadc,fsfcuc,fsfcu0,fsfcdc,fsfcd0, & + & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & + & ) + +! =================== program usage description =================== ! +! ! +! purpose: computes the shortwave radiative fluxes using two-stream ! +! method of h. barker and mcica, the monte-carlo independent! +! column approximation, for the representation of sub-grid ! +! cloud variability (i.e. cloud overlap). ! +! ! +! subprograms called: vrtqdr ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: size ! +! ssolar - real, incoming solar flux at top 1 ! +! cosz - real, cosine solar zenith angle 1 ! +! sntz - real, secant solar zenith angle 1 ! +! albbm - real, surface albedo for direct beam radiation 2 ! +! albdf - real, surface albedo for diffused radiation 2 ! +! sfluxzen- real, spectral distribution of incoming solar flux ngptsw! +! cldfmc - real, layer cloud fraction for g-point nlay*ngptsw! +! cf1 - real, >0: cloudy sky, otherwise: clear sky 1 ! +! cf0 - real, =1-cf1 1 ! +! taug - real, spectral optical depth for gases nlay*ngptsw! +! taur - real, optical depth for rayleigh scattering nlay*ngptsw! +! tauae - real, aerosols optical depth nlay*nbdsw ! +! ssaae - real, aerosols single scattering albedo nlay*nbdsw ! +! asyae - real, aerosols asymmetry factor nlay*nbdsw ! +! taucw - real, weighted cloud optical depth nlay*nbdsw ! +! ssacw - real, weighted cloud single scat albedo nlay*nbdsw ! +! asycw - real, weighted cloud asymmetry factor nlay*nbdsw ! +! nlay,nlp1 - integer, number of layers/levels 1 ! +! ! +! output variables: ! +! fxupc - real, tot sky upward flux nlp1*nbdsw ! +! fxdnc - real, tot sky downward flux nlp1*nbdsw ! +! fxup0 - real, clr sky upward flux nlp1*nbdsw ! +! fxdn0 - real, clr sky downward flux nlp1*nbdsw ! +! ftoauc - real, tot sky toa upwd flux 1 ! +! ftoau0 - real, clr sky toa upwd flux 1 ! +! ftoadc - real, toa downward (incoming) solar flux 1 ! +! fsfcuc - real, tot sky sfc upwd flux 1 ! +! fsfcu0 - real, clr sky sfc upwd flux 1 ! +! fsfcdc - real, tot sky sfc dnwd flux 1 ! +! fsfcd0 - real, clr sky sfc dnwd flux 1 ! +! sfbmc - real, tot sky sfc dnwd beam flux (nir/uv+vis) 2 ! +! sfdfc - real, tot sky sfc dnwd diff flux (nir/uv+vis) 2 ! +! sfbm0 - real, clr sky sfc dnwd beam flux (nir/uv+vis) 2 ! +! sfdf0 - real, clr sky sfc dnwd diff flux (nir/uv+vis) 2 ! +! suvbfc - real, tot sky sfc dnwd uv-b flux 1 ! +! suvbf0 - real, clr sky sfc dnwd uv-b flux 1 ! +! ! +! internal variables: ! +! zrefb - real, direct beam reflectivity for clear/cloudy nlp1 ! +! zrefd - real, diffuse reflectivity for clear/cloudy nlp1 ! +! ztrab - real, direct beam transmissivity for clear/cloudy nlp1 ! +! ztrad - real, diffuse transmissivity for clear/cloudy nlp1 ! +! zldbt - real, layer beam transmittance for clear/cloudy nlp1 ! +! ztdbt - real, lev total beam transmittance for clr/cld nlp1 ! +! ! +! control parameters in module "physparam" ! +! iswmode - control flag for 2-stream transfer schemes ! +! = 1 delta-eddington (joseph et al., 1976) ! +! = 2 pifm (zdunkowski et al., 1980) ! +! = 3 discrete ordinates (liou, 1973) ! +! ! +! ******************************************************************* ! +! original code description ! +! ! +! method: ! +! ------- ! +! standard delta-eddington, p.i.f.m., or d.o.m. layer calculations. ! +! kmodts = 1 eddington (joseph et al., 1976) ! +! = 2 pifm (zdunkowski et al., 1980) ! +! = 3 discrete ordinates (liou, 1973) ! +! ! +! modifications: ! +! -------------- ! +! original: h. barker ! +! revision: merge with rrtmg_sw: j.-j.morcrette, ecmwf, feb 2003 ! +! revision: add adjustment for earth/sun distance:mjiacono,aer,oct2003! +! revision: bug fix for use of palbp and palbd: mjiacono, aer, nov2003! +! revision: bug fix to apply delta scaling to clear sky: aer, dec2004 ! +! revision: code modified so that delta scaling is not done in cloudy ! +! profiles if routine cldprop is used; delta scaling can be ! +! applied by swithcing code below if cldprop is not used to ! +! get cloud properties. aer, jan 2005 ! +! revision: uniform formatting for rrtmg: mjiacono, aer, jul 2006 ! +! revision: use exponential lookup table for transmittance: mjiacono, ! +! aer, aug 2007 ! +! ! +! ******************************************************************* ! +! ====================== end of description block ================= ! + +! --- constant parameters: + real (kind=kind_phys), parameter :: zcrit = 0.9999995 ! thresold for conservative scattering + real (kind=kind_phys), parameter :: zsr3 = sqrt(3.0) + real (kind=kind_phys), parameter :: od_lo = 0.06 + real (kind=kind_phys), parameter :: eps1 = 1.0e-8 + +! --- inputs: + integer, intent(in) :: nlay, nlp1 + + real (kind=kind_phys), dimension(nlay,ngptsw), intent(in) :: & + & taug, taur, cldfmc + real (kind=kind_phys), dimension(nlay,nbdsw), intent(in) :: & + & taucw, ssacw, asycw, tauae, ssaae, asyae + + real (kind=kind_phys), dimension(ngptsw), intent(in) :: sfluxzen + + real (kind=kind_phys), dimension(2), intent(in) :: albbm, albdf + + real (kind=kind_phys), intent(in) :: cosz, sntz, cf1, cf0, ssolar + +! --- outputs: + real (kind=kind_phys), dimension(nlp1,nbdsw), intent(out) :: & + & fxupc, fxdnc, fxup0, fxdn0 + + real (kind=kind_phys), dimension(2), intent(out) :: sfbmc, sfdfc, & + & sfbm0, sfdf0 + + real (kind=kind_phys), intent(out) :: suvbfc, suvbf0, ftoadc, & + & ftoauc, ftoau0, fsfcuc, fsfcu0, fsfcdc, fsfcd0 + +! --- locals: + real (kind=kind_phys), dimension(nlay) :: ztaus, zssas, zasys, & + & zldbt0 + + real (kind=kind_phys), dimension(nlp1) :: zrefb, zrefd, ztrab, & + & ztrad, ztdbt, zldbt, zfu, zfd + + real (kind=kind_phys) :: ztau1, zssa1, zasy1, ztau0, zssa0, & + & zasy0, zasy3, zssaw, zasyw, zgam1, zgam2, zgam3, zgam4, & + & za1, za2, zb1, zb2, zrk, zrk2, zrp, zrp1, zrm1, zrpp, & + & zrkg1, zrkg3, zrkg4, zexp1, zexm1, zexp2, zexm2, zden1, & + & zexp3, zexp4, ze1r45, ftind, zsolar, ztdbt0, zr1, zr2, & + & zr3, zr4, zr5, zt1, zt2, zt3, zf1, zf2, zrpp1 + + integer :: ib, ibd, jb, jg, k, kp, itind +! +!===> ... begin here +! +!> -# Initialize output fluxes. + + do ib = 1, nbdsw + do k = 1, nlp1 + fxdnc(k,ib) = f_zero + fxupc(k,ib) = f_zero + fxdn0(k,ib) = f_zero + fxup0(k,ib) = f_zero + enddo + enddo + + ftoadc = f_zero + ftoauc = f_zero + ftoau0 = f_zero + fsfcuc = f_zero + fsfcu0 = f_zero + fsfcdc = f_zero + fsfcd0 = f_zero + +!! --- ... uv-b surface downward fluxes + suvbfc = f_zero + suvbf0 = f_zero + +!! --- ... output surface flux components + sfbmc(1) = f_zero + sfbmc(2) = f_zero + sfdfc(1) = f_zero + sfdfc(2) = f_zero + sfbm0(1) = f_zero + sfbm0(2) = f_zero + sfdf0(1) = f_zero + sfdf0(2) = f_zero + +!> -# Loop over all g-points in each band. + + lab_do_jg : do jg = 1, ngptsw + + jb = NGB(jg) + ib = jb + 1 - nblow + ibd = idxsfc(jb) ! spectral band index + + zsolar = ssolar * sfluxzen(jg) + +!> -# Set up toa direct beam and surface values (beam and diff). + + ztdbt(nlp1) = f_one + ztdbt0 = f_one + + zldbt(1) = f_zero + if (ibd /= 0) then + zrefb(1) = albbm(ibd) + zrefd(1) = albdf(ibd) + else + zrefb(1) = 0.5 * (albbm(1) + albbm(2)) + zrefd(1) = 0.5 * (albdf(1) + albdf(2)) + endif + ztrab(1) = f_zero + ztrad(1) = f_zero + +!> -# Compute clear-sky optical parameters, layer reflectance and +!! transmittance. +! - Set up toa direct beam and surface values (beam and diff) +! - Delta scaling for clear-sky condition +! - General two-stream expressions for physparam::iswmode +! - Compute homogeneous reflectance and transmittance for both +! conservative and non-conservative scattering +! - Pre-delta-scaling clear and cloudy direct beam transmittance +! - Call swflux() to compute the upward and downward radiation fluxes + + do k = nlay, 1, -1 + kp = k + 1 + + ztau0 = max( ftiny, taur(k,jg)+taug(k,jg)+tauae(k,ib) ) + zssa0 = taur(k,jg) + tauae(k,ib)*ssaae(k,ib) + zasy0 = asyae(k,ib)*ssaae(k,ib)*tauae(k,ib) + zssaw = min( oneminus, zssa0 / ztau0 ) + zasyw = zasy0 / max( ftiny, zssa0 ) + +!> - Saving clear-sky quantities for later total-sky usage. + ztaus(k) = ztau0 + zssas(k) = zssa0 + zasys(k) = zasy0 + +!> - Delta scaling for clear-sky condition. + za1 = zasyw * zasyw + za2 = zssaw * za1 + + ztau1 = (f_one - za2) * ztau0 + zssa1 = (zssaw - za2) / (f_one - za2) +!org zasy1 = (zasyw - za1) / (f_one - za1) ! this line is replaced by the next + zasy1 = zasyw / (f_one + zasyw) ! to reduce truncation error + zasy3 = 0.75 * zasy1 + +!> - Perform general two-stream expressions: +!!\n control parameters in module "physparam" +!!\n iswmode - control flag for 2-stream transfer schemes +!!\n = 1 delta-eddington (joseph et al., 1976) +!!\n = 2 pifm (zdunkowski et al., 1980) +!!\n = 3 discrete ordinates (liou, 1973) + if ( iswmode == 1 ) then + zgam1 = 1.75 - zssa1 * (f_one + zasy3) + zgam2 =-0.25 + zssa1 * (f_one - zasy3) + zgam3 = 0.5 - zasy3 * cosz + elseif ( iswmode == 2 ) then ! pifm + zgam1 = 2.0 - zssa1 * (1.25 + zasy3) + zgam2 = 0.75* zssa1 * (f_one- zasy1) + zgam3 = 0.5 - zasy3 * cosz + elseif ( iswmode == 3 ) then ! discrete ordinates + zgam1 = zsr3 * (2.0 - zssa1 * (1.0 + zasy1)) * 0.5 + zgam2 = zsr3 * zssa1 * (1.0 - zasy1) * 0.5 + zgam3 = (1.0 - zsr3 * zasy1 * cosz) * 0.5 + endif + zgam4 = f_one - zgam3 + +!> - Compute homogeneous reflectance and transmittance. + + if ( zssaw >= zcrit ) then ! for conservative scattering + za1 = zgam1 * cosz - zgam3 + za2 = zgam1 * ztau1 + +! --- ... use exponential lookup table for transmittance, or expansion +! of exponential for low optical depth + + zb1 = min ( ztau1*sntz , 500.0 ) + if ( zb1 <= od_lo ) then + zb2 = f_one - zb1 + 0.5*zb1*zb1 + else + ftind = zb1 / (bpade + zb1) + itind = ftind*NTBMX + 0.5 + zb2 = exp_tbl(itind) + endif + +! ... collimated beam + zrefb(kp) = max(f_zero, min(f_one, & + & (za2 - za1*(f_one - zb2))/(f_one + za2) )) + ztrab(kp) = max(f_zero, min(f_one, f_one-zrefb(kp) )) + +! ... isotropic incidence + zrefd(kp) = max(f_zero, min(f_one, za2/(f_one + za2) )) + ztrad(kp) = max(f_zero, min(f_one, f_one-zrefd(kp) )) + + else ! for non-conservative scattering + za1 = zgam1*zgam4 + zgam2*zgam3 + za2 = zgam1*zgam3 + zgam2*zgam4 + zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) + zrk2= 2.0 * zrk + + zrp = zrk * cosz + zrp1 = f_one + zrp + zrm1 = f_one - zrp + zrpp1= f_one - zrp*zrp + zrpp = sign( max(flimit, abs(zrpp1)), zrpp1 ) ! avoid numerical singularity + zrkg1= zrk + zgam1 + zrkg3= zrk * zgam3 + zrkg4= zrk * zgam4 + + zr1 = zrm1 * (za2 + zrkg3) + zr2 = zrp1 * (za2 - zrkg3) + zr3 = zrk2 * (zgam3 - za2*cosz) + zr4 = zrpp * zrkg1 + zr5 = zrpp * (zrk - zgam1) + + zt1 = zrp1 * (za1 + zrkg4) + zt2 = zrm1 * (za1 - zrkg4) + zt3 = zrk2 * (zgam4 + za1*cosz) + +! --- ... use exponential lookup table for transmittance, or expansion +! of exponential for low optical depth + + zb1 = min ( zrk*ztau1, 500.0 ) + if ( zb1 <= od_lo ) then + zexm1 = f_one - zb1 + 0.5*zb1*zb1 + else + ftind = zb1 / (bpade + zb1) + itind = ftind*NTBMX + 0.5 + zexm1 = exp_tbl(itind) + endif + zexp1 = f_one / zexm1 + + zb2 = min ( sntz*ztau1, 500.0 ) + if ( zb2 <= od_lo ) then + zexm2 = f_one - zb2 + 0.5*zb2*zb2 + else + ftind = zb2 / (bpade + zb2) + itind = ftind*NTBMX + 0.5 + zexm2 = exp_tbl(itind) + endif + zexp2 = f_one / zexm2 + ze1r45 = zr4*zexp1 + zr5*zexm1 + +! ... collimated beam + if (ze1r45>=-eps1 .and. ze1r45<=eps1) then + zrefb(kp) = eps1 + ztrab(kp) = zexm2 + else + zden1 = zssa1 / ze1r45 + zrefb(kp) = max(f_zero, min(f_one, & + & (zr1*zexp1 - zr2*zexm1 - zr3*zexm2)*zden1 )) + ztrab(kp) = max(f_zero, min(f_one, zexm2*(f_one & + & - (zt1*zexp1 - zt2*zexm1 - zt3*zexp2)*zden1) )) + endif + +! ... diffuse beam + zden1 = zr4 / (ze1r45 * zrkg1) + zrefd(kp) = max(f_zero, min(f_one, & + & zgam2*(zexp1 - zexm1)*zden1 )) + ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) + endif ! end if_zssaw_block + +!> - Calculate direct beam transmittance. use exponential lookup table +!! for transmittance, or expansion of exponential for low optical depth. + + zr1 = ztau1 * sntz + if ( zr1 <= od_lo ) then + zexp3 = f_one - zr1 + 0.5*zr1*zr1 + else + ftind = zr1 / (bpade + zr1) + itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) + zexp3 = exp_tbl(itind) + endif + + ztdbt(k) = zexp3 * ztdbt(kp) + zldbt(kp) = zexp3 + +!> - Calculate pre-delta-scaling clear and cloudy direct beam transmittance. +! (must use 'orig', unscaled cloud optical depth) + + zr1 = ztau0 * sntz + if ( zr1 <= od_lo ) then + zexp4 = f_one - zr1 + 0.5*zr1*zr1 + else + ftind = zr1 / (bpade + zr1) + itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) + zexp4 = exp_tbl(itind) + endif + + zldbt0(k) = zexp4 + ztdbt0 = zexp4 * ztdbt0 + enddo ! end do_k_loop + +!> -# Call vrtqdr(), to compute the upward and downward radiation fluxes. + call vrtqdr & +! --- inputs: + & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & + & nlay, nlp1, & +! --- outputs: + & zfu, zfd & + & ) + +!> -# Compute upward and downward fluxes at levels. + do k = 1, nlp1 + fxup0(k,ib) = fxup0(k,ib) + zsolar*zfu(k) + fxdn0(k,ib) = fxdn0(k,ib) + zsolar*zfd(k) + enddo + +!> -# Compute surface downward beam/diffuse flux components. + zb1 = zsolar*ztdbt0 + zb2 = zsolar*(zfd(1) - ztdbt0) + + if (ibd /= 0) then + sfbm0(ibd) = sfbm0(ibd) + zb1 + sfdf0(ibd) = sfdf0(ibd) + zb2 + else + zf1 = 0.5 * zb1 + zf2 = 0.5 * zb2 + sfbm0(1) = sfbm0(1) + zf1 + sfdf0(1) = sfdf0(1) + zf2 + sfbm0(2) = sfbm0(2) + zf1 + sfdf0(2) = sfdf0(2) + zf2 + endif +! sfbm0(ibd) = sfbm0(ibd) + zsolar*ztdbt0 +! sfdf0(ibd) = sfdf0(ibd) + zsolar*(zfd(1) - ztdbt0) + +!> -# Compute total sky optical parameters, layer reflectance and +!! transmittance. +! - Set up toa direct beam and surface values (beam and diff) +! - Delta scaling for total-sky condition +! - General two-stream expressions for physparam::iswmode +! - Compute homogeneous reflectance and transmittance for +! conservative scattering and non-conservative scattering +! - Pre-delta-scaling clear and cloudy direct beam transmittance +! - Call swflux() to compute the upward and downward radiation fluxes + + if ( cf1 > eps ) then + +!> - Set up toa direct beam and surface values (beam and diff). + ztdbt0 = f_one + zldbt(1) = f_zero + + do k = nlay, 1, -1 + kp = k + 1 + if ( cldfmc(k,jg) > ftiny ) then ! it is a cloudy-layer + + ztau0 = ztaus(k) + taucw(k,ib) + zssa0 = zssas(k) + ssacw(k,ib) + zasy0 = zasys(k) + asycw(k,ib) + zssaw = min(oneminus, zssa0 / ztau0) + zasyw = zasy0 / max(ftiny, zssa0) + +!> - Perform delta scaling for total-sky condition. + za1 = zasyw * zasyw + za2 = zssaw * za1 + + ztau1 = (f_one - za2) * ztau0 + zssa1 = (zssaw - za2) / (f_one - za2) +!org zasy1 = (zasyw - za1) / (f_one - za1) + zasy1 = zasyw / (f_one + zasyw) + zasy3 = 0.75 * zasy1 + +!> - Perform general two-stream expressions. + if ( iswmode == 1 ) then + zgam1 = 1.75 - zssa1 * (f_one + zasy3) + zgam2 =-0.25 + zssa1 * (f_one - zasy3) + zgam3 = 0.5 - zasy3 * cosz + elseif ( iswmode == 2 ) then ! pifm + zgam1 = 2.0 - zssa1 * (1.25 + zasy3) + zgam2 = 0.75* zssa1 * (f_one- zasy1) + zgam3 = 0.5 - zasy3 * cosz + elseif ( iswmode == 3 ) then ! discrete ordinates + zgam1 = zsr3 * (2.0 - zssa1 * (1.0 + zasy1)) * 0.5 + zgam2 = zsr3 * zssa1 * (1.0 - zasy1) * 0.5 + zgam3 = (1.0 - zsr3 * zasy1 * cosz) * 0.5 + endif + zgam4 = f_one - zgam3 + +!> - Compute homogeneous reflectance and transmittance for both convertive +!! and non-convertive scattering. + + if ( zssaw >= zcrit ) then ! for conservative scattering + za1 = zgam1 * cosz - zgam3 + za2 = zgam1 * ztau1 + +! --- ... use exponential lookup table for transmittance, or expansion +! of exponential for low optical depth + + zb1 = min ( ztau1*sntz , 500.0 ) + if ( zb1 <= od_lo ) then + zb2 = f_one - zb1 + 0.5*zb1*zb1 + else + ftind = zb1 / (bpade + zb1) + itind = ftind*NTBMX + 0.5 + zb2 = exp_tbl(itind) + endif + +! ... collimated beam + zrefb(kp) = max(f_zero, min(f_one, & + & (za2 - za1*(f_one - zb2))/(f_one + za2) )) + ztrab(kp) = max(f_zero, min(f_one, f_one-zrefb(kp))) + +! ... isotropic incidence + zrefd(kp) = max(f_zero, min(f_one, za2 / (f_one+za2) )) + ztrad(kp) = max(f_zero, min(f_one, f_one - zrefd(kp) )) + + else ! for non-conservative scattering + za1 = zgam1*zgam4 + zgam2*zgam3 + za2 = zgam1*zgam3 + zgam2*zgam4 + zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) + zrk2= 2.0 * zrk + + zrp = zrk * cosz + zrp1 = f_one + zrp + zrm1 = f_one - zrp + zrpp1= f_one - zrp*zrp + zrpp = sign( max(flimit, abs(zrpp1)), zrpp1 ) ! avoid numerical singularity + zrkg1= zrk + zgam1 + zrkg3= zrk * zgam3 + zrkg4= zrk * zgam4 + + zr1 = zrm1 * (za2 + zrkg3) + zr2 = zrp1 * (za2 - zrkg3) + zr3 = zrk2 * (zgam3 - za2*cosz) + zr4 = zrpp * zrkg1 + zr5 = zrpp * (zrk - zgam1) + + zt1 = zrp1 * (za1 + zrkg4) + zt2 = zrm1 * (za1 - zrkg4) + zt3 = zrk2 * (zgam4 + za1*cosz) + +! --- ... use exponential lookup table for transmittance, or expansion +! of exponential for low optical depth + + zb1 = min ( zrk*ztau1, 500.0 ) + if ( zb1 <= od_lo ) then + zexm1 = f_one - zb1 + 0.5*zb1*zb1 + else + ftind = zb1 / (bpade + zb1) + itind = ftind*NTBMX + 0.5 + zexm1 = exp_tbl(itind) + endif + zexp1 = f_one / zexm1 + + zb2 = min ( ztau1*sntz, 500.0 ) + if ( zb2 <= od_lo ) then + zexm2 = f_one - zb2 + 0.5*zb2*zb2 + else + ftind = zb2 / (bpade + zb2) + itind = ftind*NTBMX + 0.5 + zexm2 = exp_tbl(itind) + endif + zexp2 = f_one / zexm2 + ze1r45 = zr4*zexp1 + zr5*zexm1 + +! ... collimated beam + if ( ze1r45>=-eps1 .and. ze1r45<=eps1 ) then + zrefb(kp) = eps1 + ztrab(kp) = zexm2 + else + zden1 = zssa1 / ze1r45 + zrefb(kp) = max(f_zero, min(f_one, & + & (zr1*zexp1-zr2*zexm1-zr3*zexm2)*zden1 )) + ztrab(kp) = max(f_zero, min(f_one, zexm2*(f_one - & + & (zt1*zexp1-zt2*zexm1-zt3*zexp2)*zden1) )) + endif + +! ... diffuse beam + zden1 = zr4 / (ze1r45 * zrkg1) + zrefd(kp) = max(f_zero, min(f_one, & + & zgam2*(zexp1 - zexm1)*zden1 )) + ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) + endif ! end if_zssaw_block + +! --- ... direct beam transmittance. use exponential lookup table +! for transmittance, or expansion of exponential for low +! optical depth + + zr1 = ztau1 * sntz + if ( zr1 <= od_lo ) then + zexp3 = f_one - zr1 + 0.5*zr1*zr1 + else + ftind = zr1 / (bpade + zr1) + itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) + zexp3 = exp_tbl(itind) + endif + + zldbt(kp) = zexp3 + ztdbt(k) = zexp3 * ztdbt(kp) + +! --- ... pre-delta-scaling clear and cloudy direct beam transmittance +! (must use 'orig', unscaled cloud optical depth) + + zr1 = ztau0 * sntz + if ( zr1 <= od_lo ) then + zexp4 = f_one - zr1 + 0.5*zr1*zr1 + else + ftind = zr1 / (bpade + zr1) + itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) + zexp4 = exp_tbl(itind) + endif + + ztdbt0 = zexp4 * ztdbt0 + + else ! if_cldfmc_block --- it is a clear layer + +! --- ... direct beam transmittance + ztdbt(k) = zldbt(kp) * ztdbt(kp) + +!> - Calculate pre-delta-scaling clear and cloudy direct beam transmittance. + ztdbt0 = zldbt0(k) * ztdbt0 + + endif ! end if_cldfmc_block + enddo ! end do_k_loop + +!> -# Call vrtqdr(), to perform vertical quadrature + + call vrtqdr & +! --- inputs: + & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & + & nlay, nlp1, & +! --- outputs: + & zfu, zfd & + & ) + +! --- ... compute upward and downward fluxes at levels + do k = 1, nlp1 + fxupc(k,ib) = fxupc(k,ib) + zsolar*zfu(k) + fxdnc(k,ib) = fxdnc(k,ib) + zsolar*zfd(k) + enddo + +!> -# Process and save outputs. +!! - surface downward beam/diffused flux components + zb1 = zsolar*ztdbt0 + zb2 = zsolar*(zfd(1) - ztdbt0) + + if (ibd /= 0) then + sfbmc(ibd) = sfbmc(ibd) + zb1 + sfdfc(ibd) = sfdfc(ibd) + zb2 + else + zf1 = 0.5 * zb1 + zf2 = 0.5 * zb2 + sfbmc(1) = sfbmc(1) + zf1 + sfdfc(1) = sfdfc(1) + zf2 + sfbmc(2) = sfbmc(2) + zf1 + sfdfc(2) = sfdfc(2) + zf2 + endif +! sfbmc(ibd) = sfbmc(ibd) + zsolar*ztdbt0 +! sfdfc(ibd) = sfdfc(ibd) + zsolar*(zfd(1) - ztdbt0) + + endif ! end if_cf1_block + + enddo lab_do_jg + +! --- ... end of g-point loop + + do ib = 1, nbdsw + ftoadc = ftoadc + fxdn0(nlp1,ib) + ftoau0 = ftoau0 + fxup0(nlp1,ib) + fsfcu0 = fsfcu0 + fxup0(1,ib) + fsfcd0 = fsfcd0 + fxdn0(1,ib) + enddo + +!> - uv-b surface downward flux + ibd = nuvb - nblow + 1 + suvbf0 = fxdn0(1,ibd) + + if ( cf1 <= eps ) then ! clear column, set total-sky=clear-sky fluxes + do ib = 1, nbdsw + do k = 1, nlp1 + fxupc(k,ib) = fxup0(k,ib) + fxdnc(k,ib) = fxdn0(k,ib) + enddo + enddo + + ftoauc = ftoau0 + fsfcuc = fsfcu0 + fsfcdc = fsfcd0 + +!> - surface downward beam/diffused flux components + sfbmc(1) = sfbm0(1) + sfdfc(1) = sfdf0(1) + sfbmc(2) = sfbm0(2) + sfdfc(2) = sfdf0(2) + +!> - uv-b surface downward flux + suvbfc = suvbf0 + else ! cloudy column, compute total-sky fluxes + do ib = 1, nbdsw + ftoauc = ftoauc + fxupc(nlp1,ib) + fsfcuc = fsfcuc + fxupc(1,ib) + fsfcdc = fsfcdc + fxdnc(1,ib) + enddo + +!! --- ... uv-b surface downward flux + suvbfc = fxdnc(1,ibd) + endif ! end if_cf1_block + + return +!................................... + end subroutine spcvrtm +!! @} +!----------------------------------- + +!>\ingroup module_radsw_main +!> This subroutine is called by spcvrtc() and spcvrtm(), and computes +!! the upward and downward radiation fluxes. +!!\param zrefb layer direct beam reflectivity +!!\param zrefd layer diffuse reflectivity +!!\param ztrab layer direct beam transmissivity +!!\param ztrad layer diffuse transmissivity +!!\param zldbt layer mean beam transmittance +!!\param ztdbt total beam transmittance at levels +!!\param NLAY, NLP1 number of layers/levels +!!\param zfu upward flux at layer interface +!!\param zfd downward flux at layer interface +!!\section General_vrtqdr vrtqdr General Algorithm +!> @{ +!----------------------------------- + subroutine vrtqdr & + & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & ! inputs + & NLAY, NLP1, & + & zfu, zfd & ! outputs: + & ) + +! =================== program usage description =================== ! +! ! +! purpose: computes the upward and downward radiation fluxes ! +! ! +! interface: "vrtqdr" is called by "spcvrc" and "spcvrm" ! +! ! +! subroutines called : none ! +! ! +! ==================== defination of variables ==================== ! +! ! +! input variables: ! +! zrefb(NLP1) - layer direct beam reflectivity ! +! zrefd(NLP1) - layer diffuse reflectivity ! +! ztrab(NLP1) - layer direct beam transmissivity ! +! ztrad(NLP1) - layer diffuse transmissivity ! +! zldbt(NLP1) - layer mean beam transmittance ! +! ztdbt(NLP1) - total beam transmittance at levels ! +! NLAY, NLP1 - number of layers/levels ! +! ! +! output variables: ! +! zfu (NLP1) - upward flux at layer interface ! +! zfd (NLP1) - downward flux at layer interface ! +! ! +! ******************************************************************* ! +! ====================== end of description block ================= ! + +! --- inputs: + integer, intent(in) :: nlay, nlp1 + + real (kind=kind_phys), dimension(nlp1), intent(in) :: zrefb, & + & zrefd, ztrab, ztrad, ztdbt, zldbt + +! --- outputs: + real (kind=kind_phys), dimension(nlp1), intent(out) :: zfu, zfd + +! --- locals: + real (kind=kind_phys), dimension(nlp1) :: zrupb,zrupd,zrdnd,ztdn + + real (kind=kind_phys) :: zden1 + + integer :: k, kp +! +!===> ... begin here +! + +!> -# Link lowest layer with surface. + zrupb(1) = zrefb(1) ! direct beam + zrupd(1) = zrefd(1) ! diffused + +!> -# Pass from bottom to top. + do k = 1, nlay + kp = k + 1 + + zden1 = f_one / ( f_one - zrupd(k)*zrefd(kp) ) + zrupb(kp) = zrefb(kp) + ( ztrad(kp) * & + & ( (ztrab(kp) - zldbt(kp))*zrupd(k) + & + & zldbt(kp)*zrupb(k)) ) * zden1 + zrupd(kp) = zrefd(kp) + ztrad(kp)*ztrad(kp)*zrupd(k)*zden1 + enddo + +!> -# Upper boundary conditions + ztdn (nlp1) = f_one + zrdnd(nlp1) = f_zero + ztdn (nlay) = ztrab(nlp1) + zrdnd(nlay) = zrefd(nlp1) + +!> -# Pass from top to bottom + do k = nlay, 2, -1 + zden1 = f_one / (f_one - zrefd(k)*zrdnd(k)) + ztdn (k-1) = ztdbt(k)*ztrab(k) + ( ztrad(k) * & + & ( (ztdn(k) - ztdbt(k)) + ztdbt(k) * & + & zrefb(k)*zrdnd(k) )) * zden1 + zrdnd(k-1) = zrefd(k) + ztrad(k)*ztrad(k)*zrdnd(k)*zden1 + enddo + +!> -# Up and down-welling fluxes at levels. + do k = 1, nlp1 + zden1 = f_one / (f_one - zrdnd(k)*zrupd(k)) + zfu(k) = ( ztdbt(k)*zrupb(k) + & + & (ztdn(k) - ztdbt(k))*zrupd(k) ) * zden1 + zfd(k) = ztdbt(k) + ( ztdn(k) - ztdbt(k) + & + & ztdbt(k)*zrupb(k)*zrdnd(k) ) * zden1 + enddo + + return +!................................... + end subroutine vrtqdr +!----------------------------------- +!> @} + +!>\ingroup module_radsw_main +!> This subroutine calculates optical depths for gaseous absorption and +!! rayleigh scattering +!!\n subroutine called taumol## (## = 16-29) +!!\param colamt column amounts of absorbing gases the index +!! are for h2o, co2, o3, n2o, ch4, and o2, +!! respectively \f$(mol/cm^2)\f$ +!!\param colmol total column amount (dry air+water vapor) +!!\param fac00,fac01,fac10,fac11 for each layer, these are factors that are +!! needed to compute the interpolation factors +!! that multiply the appropriate reference +!! k-values. a value of 0/1 for i,j indicates +!! that the corresponding factor multiplies +!! reference k-value for the lower/higher of the +!! two appropriate temperatures, and altitudes, +!! respectively. +!!\param jp the index of the lower (in altitude) of the +!! two appropriate ref pressure levels needed +!! for interpolation. +!!\param jt, jt1 the indices of the lower of the two approp +!! ref temperatures needed for interpolation +!! (for pressure levels jp and jp+1, respectively) +!!\param laytrop tropopause layer index +!!\param forfac scale factor needed to foreign-continuum. +!!\param forfrac factor needed for temperature interpolation +!!\param indfor index of the lower of the two appropriate +!! reference temperatures needed for +!! foreign-continuum interpolation +!!\param selffac scale factor needed to h2o self-continuum. +!!\param selffrac factor needed for temperature interpolation +!! of reference h2o self-continuum data +!!\param indself index of the lower of the two appropriate +!! reference temperatures needed for the +!! self-continuum interpolation +!!\param nlay number of vertical layers +!!\param sfluxzen spectral distribution of incoming solar flux +!!\param taug spectral optical depth for gases +!!\param taur opt depth for rayleigh scattering +!>\section gen_al_taumol taumol General Algorithm +!! @{ +!----------------------------------- + subroutine taumol & + & ( colamt,colmol,fac00,fac01,fac10,fac11,jp,jt,jt1,laytrop, & ! --- inputs + & forfac,forfrac,indfor,selffac,selffrac,indself, nlay, & + & sfluxzen, taug, taur & ! --- outputs + & ) + +! ================== program usage description ================== ! +! ! +! description: ! +! calculate optical depths for gaseous absorption and rayleigh ! +! scattering. ! +! ! +! subroutines called: taugb## (## = 16 - 29) ! +! ! +! ==================== defination of variables ==================== ! +! ! +! inputs: size ! +! colamt - real, column amounts of absorbing gases the index ! +! are for h2o, co2, o3, n2o, ch4, and o2, ! +! respectively (molecules/cm**2) nlay*maxgas! +! colmol - real, total column amount (dry air+water vapor) nlay ! +! facij - real, for each layer, these are factors that are ! +! needed to compute the interpolation factors ! +! that multiply the appropriate reference k- ! +! values. a value of 0/1 for i,j indicates ! +! that the corresponding factor multiplies ! +! reference k-value for the lower/higher of the ! +! two appropriate temperatures, and altitudes, ! +! respectively. naly ! +! jp - real, the index of the lower (in altitude) of the ! +! two appropriate ref pressure levels needed ! +! for interpolation. nlay ! +! jt, jt1 - integer, the indices of the lower of the two approp ! +! ref temperatures needed for interpolation (for ! +! pressure levels jp and jp+1, respectively) nlay ! +! laytrop - integer, tropopause layer index 1 ! +! forfac - real, scale factor needed to foreign-continuum. nlay ! +! forfrac - real, factor needed for temperature interpolation nlay ! +! indfor - integer, index of the lower of the two appropriate ! +! reference temperatures needed for foreign- ! +! continuum interpolation nlay ! +! selffac - real, scale factor needed to h2o self-continuum. nlay ! +! selffrac- real, factor needed for temperature interpolation ! +! of reference h2o self-continuum data nlay ! +! indself - integer, index of the lower of the two appropriate ! +! reference temperatures needed for the self- ! +! continuum interpolation nlay ! +! nlay - integer, number of vertical layers 1 ! +! ! +! output: ! +! sfluxzen- real, spectral distribution of incoming solar flux ngptsw! +! taug - real, spectral optical depth for gases nlay*ngptsw! +! taur - real, opt depth for rayleigh scattering nlay*ngptsw! +! ! +! =================================================================== ! +! ************ original subprogram description *************** ! +! ! +! optical depths developed for the ! +! ! +! rapid radiative transfer model (rrtm) ! +! ! +! atmospheric and environmental research, inc. ! +! 131 hartwell avenue ! +! lexington, ma 02421 ! +! ! +! ! +! eli j. mlawer ! +! jennifer delamere ! +! steven j. taubman ! +! shepard a. clough ! +! ! +! ! +! ! +! email: mlawer@aer.com ! +! email: jdelamer@aer.com ! +! ! +! the authors wish to acknowledge the contributions of the ! +! following people: patrick d. brown, michael j. iacono, ! +! ronald e. farren, luke chen, robert bergstrom. ! +! ! +! ******************************************************************* ! +! ! +! taumol ! +! ! +! this file contains the subroutines taugbn (where n goes from ! +! 16 to 29). taugbn calculates the optical depths and Planck ! +! fractions per g-value and layer for band n. ! +! ! +! output: optical depths (unitless) ! +! fractions needed to compute planck functions at every layer ! +! and g-value ! +! ! +! modifications: ! +! ! +! revised: adapted to f90 coding, j.-j.morcrette, ecmwf, feb 2003 ! +! revised: modified for g-point reduction, mjiacono, aer, dec 2003 ! +! revised: reformatted for consistency with rrtmg_lw, mjiacono, aer, ! +! jul 2006 ! +! ! +! ******************************************************************* ! +! ====================== end of description block ================= ! + +! --- inputs: + integer, intent(in) :: nlay, laytrop + + integer, dimension(nlay), intent(in) :: indfor, indself, & + & jp, jt, jt1 + + real (kind=kind_phys), dimension(nlay), intent(in) :: colmol, & + & fac00, fac01, fac10, fac11, forfac, forfrac, selffac, & + & selffrac + + real (kind=kind_phys), dimension(nlay,maxgas),intent(in) :: colamt + +! --- outputs: + real (kind=kind_phys), dimension(ngptsw), intent(out) :: sfluxzen + + real (kind=kind_phys), dimension(nlay,ngptsw), intent(out) :: & + & taug, taur + +! --- locals: + real (kind=kind_phys) :: fs, speccomb, specmult, colm1, colm2 + + integer, dimension(nlay,nblow:nbhgh) :: id0, id1 + + integer :: ibd, j, jb, js, k, klow, khgh, klim, ks, njb, ns +! +!===> ... begin here +! +! --- ... loop over each spectral band + + do jb = nblow, nbhgh + +! --- ... indices for layer optical depth + + do k = 1, laytrop + id0(k,jb) = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(jb) + id1(k,jb) = ( jp(k) *5 + (jt1(k)-1)) * nspa(jb) + enddo + + do k = laytrop+1, nlay + id0(k,jb) = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(jb) + id1(k,jb) = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(jb) + enddo + +! --- ... calculate spectral flux at toa + + ibd = ibx(jb) + njb = ng (jb) + ns = ngs(jb) + + select case (jb) + + case (16, 20, 23, 25, 26, 29) + + do j = 1, njb + sfluxzen(ns+j) = sfluxref01(j,1,ibd) + enddo + + case (27) + + do j = 1, njb + sfluxzen(ns+j) = scalekur * sfluxref01(j,1,ibd) + enddo + + case default + + if (jb==17 .or. jb==28) then + + ks = nlay + lab_do_k1 : do k = laytrop, nlay-1 + if (jp(k)=layreffr(jb)) then + ks = k + 1 + exit lab_do_k1 + endif + enddo lab_do_k1 + + colm1 = colamt(ks,ix1(jb)) + colm2 = colamt(ks,ix2(jb)) + speccomb = colm1 + strrat(jb)*colm2 + specmult = specwt(jb) * min( oneminus, colm1/speccomb ) + js = 1 + int( specmult ) + fs = mod(specmult, f_one) + + do j = 1, njb + sfluxzen(ns+j) = sfluxref02(j,js,ibd) & + & + fs * (sfluxref02(j,js+1,ibd) - sfluxref02(j,js,ibd)) + enddo + + else + + ks = laytrop + lab_do_k2 : do k = 1, laytrop-1 + if (jp(k)=layreffr(jb)) then + ks = k + 1 + exit lab_do_k2 + endif + enddo lab_do_k2 + + colm1 = colamt(ks,ix1(jb)) + colm2 = colamt(ks,ix2(jb)) + speccomb = colm1 + strrat(jb)*colm2 + specmult = specwt(jb) * min( oneminus, colm1/speccomb ) + js = 1 + int( specmult ) + fs = mod(specmult, f_one) + + do j = 1, njb + sfluxzen(ns+j) = sfluxref03(j,js,ibd) & + & + fs * (sfluxref03(j,js+1,ibd) - sfluxref03(j,js,ibd)) + enddo + + endif + + end select + + enddo + +!> - Call taumol## (##: 16-29) to calculate layer optical depth. + +!> - call taumol16() + call taumol16 +!> - call taumol17() + call taumol17 +!> - call taumol18() + call taumol18 +!> - call taumol19() + call taumol19 +!> - call taumol20() + call taumol20 +!> - call taumol21() + call taumol21 +!> - call taumol22() + call taumol22 +!> - call taumol23() + call taumol23 +!> - call taumol24() + call taumol24 +!> - call taumol25() + call taumol25 +!> - call taumol26() + call taumol26 +!> - call taumol27() + call taumol27 +!> - call taumol28() + call taumol28 +!> - call taumol29() + call taumol29 + + +! ================= + contains +! ================= + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 16: 2600-3250 +!! cm-1 (low - h2o,ch4; high - ch4) +!----------------------------------- + subroutine taumol16 +!................................... + +! ------------------------------------------------------------------ ! +! band 16: 2600-3250 cm-1 (low - h2o,ch4; high - ch4) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb16 + +! --- locals: + + real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & + & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 + + integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 + integer :: inds, indf, indsp, indfp, j, js, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG16 + taur(k,NS16+j) = tauray + enddo + enddo + + do k = 1, laytrop + speccomb = colamt(k,1) + strrat(16)*colamt(k,5) + specmult = 8.0 * min( oneminus, colamt(k,1)/speccomb ) + + js = 1 + int( specmult ) + fs = mod( specmult, f_one ) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,16) + js + ind02 = ind01 + 1 + ind03 = ind01 + 9 + ind04 = ind01 + 10 + ind11 = id1(k,16) + js + ind12 = ind11 + 1 + ind13 = ind11 + 9 + ind14 = ind11 + 10 + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG16 + taug(k,NS16+j) = speccomb & + & *( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & + & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & + & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & + & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & + & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & + & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) + enddo + enddo + + do k = laytrop+1, nlay + ind01 = id0(k,16) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,16) + 1 + ind12 = ind11 + 1 + + do j = 1, NG16 + taug(k,NS16+j) = colamt(k,5) & + & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & + & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) + enddo + enddo + + return +!................................... + end subroutine taumol16 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 17: 3250-4000 +!! cm-1 (low - h2o,co2; high - h2o,co2) +!----------------------------------- + subroutine taumol17 +!................................... + +! ------------------------------------------------------------------ ! +! band 17: 3250-4000 cm-1 (low - h2o,co2; high - h2o,co2) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb17 + +! --- locals: + real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & + & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 + + integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 + integer :: inds, indf, indsp, indfp, j, js, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG17 + taur(k,NS17+j) = tauray + enddo + enddo + + do k = 1, laytrop + speccomb = colamt(k,1) + strrat(17)*colamt(k,2) + specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,17) + js + ind02 = ind01 + 1 + ind03 = ind01 + 9 + ind04 = ind01 + 10 + ind11 = id1(k,17) + js + ind12 = ind11 + 1 + ind13 = ind11 + 9 + ind14 = ind11 + 10 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG17 + taug(k,NS17+j) = speccomb & + & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & + & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & + & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & + & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & + & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & + & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) + enddo + enddo + + do k = laytrop+1, nlay + speccomb = colamt(k,1) + strrat(17)*colamt(k,2) + specmult = 4.0 * min(oneminus, colamt(k,1) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,17) + js + ind02 = ind01 + 1 + ind03 = ind01 + 5 + ind04 = ind01 + 6 + ind11 = id1(k,17) + js + ind12 = ind11 + 1 + ind13 = ind11 + 5 + ind14 = ind11 + 6 + + indf = indfor(k) + indfp= indf + 1 + + do j = 1, NG17 + taug(k,NS17+j) = speccomb & + & * ( fac000 * absb(ind01,j) + fac100 * absb(ind02,j) & + & + fac010 * absb(ind03,j) + fac110 * absb(ind04,j) & + & + fac001 * absb(ind11,j) + fac101 * absb(ind12,j) & + & + fac011 * absb(ind13,j) + fac111 * absb(ind14,j) ) & + & + colamt(k,1) * forfac(k) * (forref(indf,j) & + & + forfrac(k) * (forref(indfp,j) - forref(indf,j))) + enddo + enddo + + return +!................................... + end subroutine taumol17 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 18: 4000-4650 +!! cm-1 (low - h2o,ch4; high - ch4) +!----------------------------------- + subroutine taumol18 +!................................... + +! ------------------------------------------------------------------ ! +! band 18: 4000-4650 cm-1 (low - h2o,ch4; high - ch4) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb18 + +! --- locals: + real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & + & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 + + integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 + integer :: inds, indf, indsp, indfp, j, js, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG18 + taur(k,NS18+j) = tauray + enddo + enddo + + do k = 1, laytrop + speccomb = colamt(k,1) + strrat(18)*colamt(k,5) + specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,18) + js + ind02 = ind01 + 1 + ind03 = ind01 + 9 + ind04 = ind01 + 10 + ind11 = id1(k,18) + js + ind12 = ind11 + 1 + ind13 = ind11 + 9 + ind14 = ind11 + 10 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG18 + taug(k,NS18+j) = speccomb & + & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & + & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & + & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & + & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & + & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & + & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) + enddo + enddo + + do k = laytrop+1, nlay + ind01 = id0(k,18) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,18) + 1 + ind12 = ind11 + 1 + + do j = 1, NG18 + taug(k,NS18+j) = colamt(k,5) & + & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & + & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) + enddo + enddo + + return +!................................... + end subroutine taumol18 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 19: 4650-5150 +!! cm-1 (low - h2o,co2; high - co2) +!----------------------------------- + subroutine taumol19 +!................................... + +! ------------------------------------------------------------------ ! +! band 19: 4650-5150 cm-1 (low - h2o,co2; high - co2) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb19 + +! --- locals: + real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & + & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 + + integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 + integer :: inds, indf, indsp, indfp, j, js, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG19 + taur(k,NS19+j) = tauray + enddo + enddo + + do k = 1, laytrop + speccomb = colamt(k,1) + strrat(19)*colamt(k,2) + specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,19) + js + ind02 = ind01 + 1 + ind03 = ind01 + 9 + ind04 = ind01 + 10 + ind11 = id1(k,19) + js + ind12 = ind11 + 1 + ind13 = ind11 + 9 + ind14 = ind11 + 10 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG19 + taug(k,NS19+j) = speccomb & + & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & + & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & + & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & + & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & + & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & + & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) + enddo + enddo + + do k = laytrop+1, nlay + ind01 = id0(k,19) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,19) + 1 + ind12 = ind11 + 1 + + do j = 1, NG19 + taug(k,NS19+j) = colamt(k,2) & + & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & + & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) + enddo + enddo + +!................................... + end subroutine taumol19 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 20: 5150-6150 +!! cm-1 (low - h2o; high - h2o) +!----------------------------------- + subroutine taumol20 +!................................... + +! ------------------------------------------------------------------ ! +! band 20: 5150-6150 cm-1 (low - h2o; high - h2o) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb20 + +! --- locals: + real (kind=kind_phys) :: tauray + + integer :: ind01, ind02, ind11, ind12 + integer :: inds, indf, indsp, indfp, j, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG20 + taur(k,NS20+j) = tauray + enddo + enddo + + do k = 1, laytrop + ind01 = id0(k,20) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,20) + 1 + ind12 = ind11 + 1 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG20 + taug(k,NS20+j) = colamt(k,1) & + & * ( (fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & + & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j)) & + & + selffac(k) * (selfref(inds,j) + selffrac(k) & + & * (selfref(indsp,j) - selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j))) ) & + & + colamt(k,5) * absch4(j) + enddo + enddo + + do k = laytrop+1, nlay + ind01 = id0(k,20) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,20) + 1 + ind12 = ind11 + 1 + + indf = indfor(k) + indfp= indf + 1 + + do j = 1, NG20 + taug(k,NS20+j) = colamt(k,1) & + & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & + & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j))) ) & + & + colamt(k,5) * absch4(j) + enddo + enddo + + return +!................................... + end subroutine taumol20 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 21: 6150-7700 +!! cm-1 (low - h2o,co2; high - h2o,co2) +!----------------------------------- + subroutine taumol21 +!................................... + +! ------------------------------------------------------------------ ! +! band 21: 6150-7700 cm-1 (low - h2o,co2; high - h2o,co2) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb21 + +! --- locals: + real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & + & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 + + integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 + integer :: inds, indf, indsp, indfp, j, js, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG21 + taur(k,NS21+j) = tauray + enddo + enddo + + do k = 1, laytrop + speccomb = colamt(k,1) + strrat(21)*colamt(k,2) + specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,21) + js + ind02 = ind01 + 1 + ind03 = ind01 + 9 + ind04 = ind01 + 10 + ind11 = id1(k,21) + js + ind12 = ind11 + 1 + ind13 = ind11 + 9 + ind14 = ind11 + 10 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG21 + taug(k,NS21+j) = speccomb & + & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & + & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & + & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & + & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & + & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & + & + selffrac(k) * (selfref(indsp,j) - selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) + enddo + enddo + + do k = laytrop+1, nlay + speccomb = colamt(k,1) + strrat(21)*colamt(k,2) + specmult = 4.0 * min(oneminus, colamt(k,1) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,21) + js + ind02 = ind01 + 1 + ind03 = ind01 + 5 + ind04 = ind01 + 6 + ind11 = id1(k,21) + js + ind12 = ind11 + 1 + ind13 = ind11 + 5 + ind14 = ind11 + 6 + + indf = indfor(k) + indfp= indf + 1 + + do j = 1, NG21 + taug(k,NS21+j) = speccomb & + & * ( fac000 * absb(ind01,j) + fac100 * absb(ind02,j) & + & + fac010 * absb(ind03,j) + fac110 * absb(ind04,j) & + & + fac001 * absb(ind11,j) + fac101 * absb(ind12,j) & + & + fac011 * absb(ind13,j) + fac111 * absb(ind14,j) ) & + & + colamt(k,1) * forfac(k) * (forref(indf,j) & + & + forfrac(k) * (forref(indfp,j) - forref(indf,j))) + enddo + enddo + +!................................... + end subroutine taumol21 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 22: 7700-8050 +!! cm-1 (low - h2o,o2; high - o2) +!----------------------------------- + subroutine taumol22 +!................................... + +! ------------------------------------------------------------------ ! +! band 22: 7700-8050 cm-1 (low - h2o,o2; high - o2) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb22 + +! --- locals: + real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & + & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111, & + & o2adj, o2cont, o2tem + + integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 + integer :: inds, indf, indsp, indfp, j, js, k + +! +!===> ... begin here +! +! --- ... the following factor is the ratio of total o2 band intensity (lines +! and mate continuum) to o2 band intensity (line only). it is needed +! to adjust the optical depths since the k's include only lines. + + o2adj = 1.6 + o2tem = 4.35e-4 / (350.0*2.0) + + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG22 + taur(k,NS22+j) = tauray + enddo + enddo + + do k = 1, laytrop + o2cont = o2tem * colamt(k,6) + speccomb = colamt(k,1) + strrat(22)*colamt(k,6) + specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,22) + js + ind02 = ind01 + 1 + ind03 = ind01 + 9 + ind04 = ind01 + 10 + ind11 = id1(k,22) + js + ind12 = ind11 + 1 + ind13 = ind11 + 9 + ind14 = ind11 + 10 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG22 + taug(k,NS22+j) = speccomb & + & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & + & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & + & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & + & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & + & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & + & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) + o2cont + enddo + enddo + + do k = laytrop+1, nlay + o2cont = o2tem * colamt(k,6) + + ind01 = id0(k,22) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,22) + 1 + ind12 = ind11 + 1 + + do j = 1, NG22 + taug(k,NS22+j) = colamt(k,6) * o2adj & + & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & + & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) & + & + o2cont + enddo + enddo + + return +!................................... + end subroutine taumol22 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 23: 8050-12850 +!! cm-1 (low - h2o; high - nothing) +!----------------------------------- + subroutine taumol23 +!................................... + +! ------------------------------------------------------------------ ! +! band 23: 8050-12850 cm-1 (low - h2o; high - nothing) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb23 + +! --- locals: + integer :: ind01, ind02, ind11, ind12 + integer :: inds, indf, indsp, indfp, j, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + do j = 1, NG23 + taur(k,NS23+j) = colmol(k) * rayl(j) + enddo + enddo + + do k = 1, laytrop + ind01 = id0(k,23) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,23) + 1 + ind12 = ind11 + 1 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG23 + taug(k,NS23+j) = colamt(k,1) * (givfac & + & * ( fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & + & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j) ) & + & + selffac(k) * (selfref(inds,j) + selffrac(k) & + & * (selfref(indsp,j) - selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) + enddo + enddo + + do k = laytrop+1, nlay + do j = 1, NG23 + taug(k,NS23+j) = f_zero + enddo + enddo + +!................................... + end subroutine taumol23 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 24: 12850-16000 +!! cm-1 (low - h2o,o2; high - o2) +!----------------------------------- + subroutine taumol24 +!................................... + +! ------------------------------------------------------------------ ! +! band 24: 12850-16000 cm-1 (low - h2o,o2; high - o2) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb24 + +! --- locals: + real (kind=kind_phys) :: speccomb, specmult, fs, fs1, & + & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 + + integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 + integer :: inds, indf, indsp, indfp, j, js, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, laytrop + speccomb = colamt(k,1) + strrat(24)*colamt(k,6) + specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,24) + js + ind02 = ind01 + 1 + ind03 = ind01 + 9 + ind04 = ind01 + 10 + ind11 = id1(k,24) + js + ind12 = ind11 + 1 + ind13 = ind11 + 9 + ind14 = ind11 + 10 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG24 + taug(k,NS24+j) = speccomb & + & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & + & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & + & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & + & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & + & + colamt(k,3) * abso3a(j) + colamt(k,1) & + & * (selffac(k) * (selfref(inds,j) + selffrac(k) & + & * (selfref(indsp,j) - selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) + + taur(k,NS24+j) = colmol(k) & + & * (rayla(j,js) + fs*(rayla(j,js+1) - rayla(j,js))) + enddo + enddo + + do k = laytrop+1, nlay + ind01 = id0(k,24) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,24) + 1 + ind12 = ind11 + 1 + + do j = 1, NG24 + taug(k,NS24+j) = colamt(k,6) & + & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & + & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) & + & + colamt(k,3) * abso3b(j) + + taur(k,NS24+j) = colmol(k) * raylb(j) + enddo + enddo + + return +!................................... + end subroutine taumol24 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 25: 16000-22650 +!! cm-1 (low - h2o; high - nothing) +!----------------------------------- + subroutine taumol25 +!................................... + +! ------------------------------------------------------------------ ! +! band 25: 16000-22650 cm-1 (low - h2o; high - nothing) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb25 + +! --- locals: + integer :: ind01, ind02, ind11, ind12 + integer :: j, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + do j = 1, NG25 + taur(k,NS25+j) = colmol(k) * rayl(j) + enddo + enddo + + do k = 1, laytrop + ind01 = id0(k,25) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,25) + 1 + ind12 = ind11 + 1 + + do j = 1, NG25 + taug(k,NS25+j) = colamt(k,1) & + & * ( fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & + & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j) ) & + & + colamt(k,3) * abso3a(j) + enddo + enddo + + do k = laytrop+1, nlay + do j = 1, NG25 + taug(k,NS25+j) = colamt(k,3) * abso3b(j) + enddo + enddo + + return +!................................... + end subroutine taumol25 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 26: 22650-29000 +!! cm-1 (low - nothing; high - nothing) +!----------------------------------- + subroutine taumol26 +!................................... + +! ------------------------------------------------------------------ ! +! band 26: 22650-29000 cm-1 (low - nothing; high - nothing) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb26 + +! --- locals: + integer :: j, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + do j = 1, NG26 + taug(k,NS26+j) = f_zero + taur(k,NS26+j) = colmol(k) * rayl(j) + enddo + enddo + + return +!................................... + end subroutine taumol26 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 27: 29000-38000 +!! cm-1 (low - o3; high - o3) +!----------------------------------- + subroutine taumol27 +!................................... + +! ------------------------------------------------------------------ ! +! band 27: 29000-38000 cm-1 (low - o3; high - o3) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb27 +! +! --- locals: + integer :: ind01, ind02, ind11, ind12 + integer :: j, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + do j = 1, NG27 + taur(k,NS27+j) = colmol(k) * rayl(j) + enddo + enddo + + do k = 1, laytrop + ind01 = id0(k,27) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,27) + 1 + ind12 = ind11 + 1 + + do j = 1, NG27 + taug(k,NS27+j) = colamt(k,3) & + & * ( fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & + & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j) ) + enddo + enddo + + do k = laytrop+1, nlay + ind01 = id0(k,27) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,27) + 1 + ind12 = ind11 + 1 + + do j = 1, NG27 + taug(k,NS27+j) = colamt(k,3) & + & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & + & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) + enddo + enddo + + return +!................................... + end subroutine taumol27 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 28: 38000-50000 +!! cm-1 (low - o3,o2; high - o3,o2) +!----------------------------------- + subroutine taumol28 +!................................... + +! ------------------------------------------------------------------ ! +! band 28: 38000-50000 cm-1 (low - o3,o2; high - o3,o2) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb28 + +! --- locals: + real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & + & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 + + integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 + integer :: j, js, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG28 + taur(k,NS28+j) = tauray + enddo + enddo + + do k = 1, laytrop + speccomb = colamt(k,3) + strrat(28)*colamt(k,6) + specmult = 8.0 * min(oneminus, colamt(k,3) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,28) + js + ind02 = ind01 + 1 + ind03 = ind01 + 9 + ind04 = ind01 + 10 + ind11 = id1(k,28) + js + ind12 = ind11 + 1 + ind13 = ind11 + 9 + ind14 = ind11 + 10 + + do j = 1, NG28 + taug(k,NS28+j) = speccomb & + & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & + & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & + & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & + & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) + enddo + enddo + + do k = laytrop+1, nlay + speccomb = colamt(k,3) + strrat(28)*colamt(k,6) + specmult = 4.0 * min(oneminus, colamt(k,3) / speccomb) + + js = 1 + int(specmult) + fs = mod(specmult, f_one) + fs1= f_one - fs + fac000 = fs1 * fac00(k) + fac010 = fs1 * fac10(k) + fac100 = fs * fac00(k) + fac110 = fs * fac10(k) + fac001 = fs1 * fac01(k) + fac011 = fs1 * fac11(k) + fac101 = fs * fac01(k) + fac111 = fs * fac11(k) + + ind01 = id0(k,28) + js + ind02 = ind01 + 1 + ind03 = ind01 + 5 + ind04 = ind01 + 6 + ind11 = id1(k,28) + js + ind12 = ind11 + 1 + ind13 = ind11 + 5 + ind14 = ind11 + 6 + + do j = 1, NG28 + taug(k,NS28+j) = speccomb & + & * ( fac000 * absb(ind01,j) + fac100 * absb(ind02,j) & + & + fac010 * absb(ind03,j) + fac110 * absb(ind04,j) & + & + fac001 * absb(ind11,j) + fac101 * absb(ind12,j) & + & + fac011 * absb(ind13,j) + fac111 * absb(ind14,j) ) + enddo + enddo + + return +!................................... + end subroutine taumol28 +!----------------------------------- + +!>\ingroup module_radsw_main +!> The subroutine computes the optical depth in band 29: 820-2600 +!! cm-1 (low - h2o; high - co2) +!----------------------------------- + subroutine taumol29 +!................................... + +! ------------------------------------------------------------------ ! +! band 29: 820-2600 cm-1 (low - h2o; high - co2) ! +! ------------------------------------------------------------------ ! +! + use module_radsw_kgb29 + +! --- locals: + real (kind=kind_phys) :: tauray + + integer :: ind01, ind02, ind11, ind12 + integer :: inds, indf, indsp, indfp, j, k + +! +!===> ... begin here +! + +! --- ... compute the optical depth by interpolating in ln(pressure), +! temperature, and appropriate species. below laytrop, the water +! vapor self-continuum is interpolated (in temperature) separately. + + do k = 1, nlay + tauray = colmol(k) * rayl + + do j = 1, NG29 + taur(k,NS29+j) = tauray + enddo + enddo + + do k = 1, laytrop + ind01 = id0(k,29) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,29) + 1 + ind12 = ind11 + 1 + + inds = indself(k) + indf = indfor (k) + indsp= inds + 1 + indfp= indf + 1 + + do j = 1, NG29 + taug(k,NS29+j) = colamt(k,1) & + & * ( (fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & + & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j) ) & + & + selffac(k) * (selfref(inds,j) + selffrac(k) & + & * (selfref(indsp,j) - selfref(inds,j))) & + & + forfac(k) * (forref(indf,j) + forfrac(k) & + & * (forref(indfp,j) - forref(indf,j)))) & + & + colamt(k,2) * absco2(j) + enddo + enddo + + do k = laytrop+1, nlay + ind01 = id0(k,29) + 1 + ind02 = ind01 + 1 + ind11 = id1(k,29) + 1 + ind12 = ind11 + 1 + + do j = 1, NG29 + taug(k,NS29+j) = colamt(k,2) & + & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & + & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) & + & + colamt(k,1) * absh2o(j) + enddo + enddo + + return +!................................... + end subroutine taumol29 +!----------------------------------- + +!................................... + end subroutine taumol +!----------------------------------- + +!mz* HWRF subroutines + subroutine mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, & + & irng, play, hgt, & + & cldfrac, ciwp, clwp, cswp, rei, rel, res, tauc, & + & ssac, asmc, fsfc, & + & cldfmcl, ciwpmcl, clwpmcl, cswpmcl, reicmcl, & + & relqmcl, resnmcl, & + & taucmcl, ssacmcl, asmcmcl, fsfcmcl) + +! ----- Input ----- +! Control + integer(kind=im), intent(in) :: iplon ! column/longitude dimension + integer(kind=im), intent(in) :: ncol ! number of columns + integer(kind=im), intent(in) :: nlay ! number of model layers + integer(kind=im), intent(in) :: icld ! clear/cloud, cloud overlap flag + integer(kind=im), intent(in) :: permuteseed ! if the cloud generator is called multiple times, + ! permute the seed between each call; + ! between calls for LW and SW, recommended + ! permuteseed differs by 'ngpt' + integer(kind=im), intent(inout) :: irng ! flag for random number generator + ! 0 = kissvec + ! 1 = Mersenne Twister + +! Atmosphere + real(kind=rb), intent(in) :: play(:,:) ! layer pressures (mb) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: hgt(:,:) ! layer height (m) + ! Dimensions: (ncol,nlay) + +! Atmosphere/clouds - cldprop + real(kind=rb), intent(in) :: cldfrac(:,:) ! layer cloud fraction + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: tauc(:,:,:) ! in-cloud optical depth + ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(in) :: ssac(:,:,:) ! in-cloud single scattering albedo (non-delta scaled) + ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter (non-delta scaled) + ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(in) :: fsfc(:,:,:) ! in-cloud forward scattering fraction (non-delta scaled) + ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(in) :: ciwp(:,:) ! in-cloud ice water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: clwp(:,:) ! in-cloud liquid water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cswp(:,:) ! in-cloud snow water path + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: rei(:,:) ! cloud ice particle size + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: rel(:,:) ! cloud liquid particle size + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: res(:,:) ! cloud snow particle size + ! Dimensions: (ncol,nlay) + +! ----- Output ----- +! Atmosphere/clouds - cldprmc [mcica] + real(kind=rb), intent(out) :: cldfmcl(:,:,:) ! cloud fraction [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: ciwpmcl(:,:,:) ! in-cloud ice water path [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: clwpmcl(:,:,:) ! in-cloud liquid water path [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: cswpmcl(:,:,:) ! in-cloud snow water path [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: relqmcl(:,:) ! liquid particle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(out) :: reicmcl(:,:) ! ice partcle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(out) :: resnmcl(:,:) ! snow partcle size (microns) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(out) :: taucmcl(:,:,:) ! in-cloud optical depth [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: ssacmcl(:,:,:) ! in-cloud single scattering albedo [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: asmcmcl(:,:,:) ! in-cloud asymmetry parameter [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: fsfcmcl(:,:,:) ! in-cloud forward scattering fraction [mcica] + ! Dimensions: (ngptsw,ncol,nlay) + +! ----- Local ----- + +! Stochastic cloud generator variables [mcica] + integer(kind=im), parameter :: nsubcsw = ngptsw ! number of sub-columns (g-point intervals) + integer(kind=im) :: ilev ! loop index + + real(kind=rb) :: pmid(ncol,nlay) ! layer pressures (Pa) +! real(kind=rb) :: pdel(ncol,nlay) ! layer pressure thickness (Pa) +! real(kind=rb) :: qi(ncol,nlay) ! ice water (specific humidity) +! real(kind=rb) :: ql(ncol,nlay) ! liq water (specific humidity) + +! Return if clear sky + if (icld.eq.0) return + +! NOTE: For GCM mode, permuteseed must be offset between LW and SW by at least number of subcolumns + +! Pass particle sizes to new arrays, no subcolumns for these properties yet +! Convert pressures from mb to Pa + + reicmcl(:ncol,:nlay) = rei(:ncol,:nlay) + relqmcl(:ncol,:nlay) = rel(:ncol,:nlay) + resnmcl(:ncol,:nlay) = res(:ncol,:nlay) + pmid(:ncol,:nlay) = play(:ncol,:nlay)*1.e2_rb + +! Convert input ice and liquid cloud water paths to specific humidity ice and liquid components + +! cwp = (q * pdel * 1000.) / gravit) +! = (kg/kg * kg m-1 s-2 *1000.) / m s-2 +! = (g m-2) +! +! q = (cwp * gravit) / (pdel *1000.) +! = (g m-2 * m s-2) / (kg m-1 s-2 * 1000.) +! = kg/kg + +! do ilev = 1, nlay +! qi(ilev) = (ciwp(ilev) * grav) / (pdel(ilev) * 1000._rb) +! ql(ilev) = (clwp(ilev) * grav) / (pdel(ilev) * 1000._rb) +! enddo + + call generate_stochastic_clouds_sw (ncol, nlay, nsubcsw, icld, & + & irng, pmid, hgt, cldfrac, clwp, ciwp, cswp, & + & tauc, ssac, asmc, fsfc, cldfmcl, clwpmcl, & + & ciwpmcl, cswpmcl, & + & taucmcl, ssacmcl, asmcmcl, fsfcmcl, permuteseed) + + end subroutine mcica_subcol_sw + +!------------------------------------------------------------------------------------------------- + subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, & + & icld, irng, pmid, hgt, cld, clwp, ciwp, cswp, & + & tauc, ssac, asmc, fsfc, cld_stoch, clwp_stoch, & + & ciwp_stoch, cswp_stoch, & + & tauc_stoch, ssac_stoch, asmc_stoch, fsfc_stoch, changeSeed) +!------------------------------------------------------------------------------------------------- +! Contact: Cecile Hannay (hannay@ucar.edu) +! +! Original code: Based on Raisanen et al., QJRMS, 2004. +! +! Modifications: Generalized for use with RRTMG and added Mersenne Twister as the default +! random number generator, which can be changed to the optional kissvec random number generator +! with flag 'irng'. Some extra functionality has been commented or removed. +! Michael J. Iacono, AER, Inc., February 2007 +! +! Given a profile of cloud fraction, cloud water and cloud ice, we produce a set of subcolumns. +! Each layer within each subcolumn is homogeneous, with cloud fraction equal to zero or one +! and uniform cloud liquid and cloud ice concentration. +! The ensemble as a whole reproduces the probability function of cloud liquid and ice within each layer +! and obeys an overlap assumption in the vertical. +! +! Overlap assumption: +! The cloud are consistent with 4 overlap assumptions: random, maximum, maximum-random and exponential. +! The default option is maximum-random (option 3) +! The options are: 1=random overlap, 2=max/random, 3=maximum overlap, 4=exponential overlap +! This is set with the variable "overlap" +!mji - Exponential overlap option (overlap=4) has been deactivated in this version +! The exponential overlap uses also a length scale, Zo. (real, parameter :: Zo = 2500. ) +! +! Seed: +! If the stochastic cloud generator is called several times during the same timestep, +! one should change the seed between the call to insure that the subcolumns are different. +! This is done by changing the argument 'changeSeed' +! For example, if one wants to create a set of columns for the shortwave and another set for the longwave , +! use 'changeSeed = 1' for the first call and'changeSeed = 2' for the second call +! +! PDF assumption: +! We can use arbitrary complicated PDFS. +! In the present version, we produce homogeneuous clouds (the simplest case). +! Future developments include using the PDF scheme of Ben Johnson. +! +! History file: +! Option to add diagnostics variables in the history file. (using FINCL in the namelist) +! nsubcol = number of subcolumns +! overlap = overlap type (1-3) +! Zo = length scale +! CLOUD_S = mean of the subcolumn cloud fraction ('_S" means Stochastic) +! CLDLIQ_S = mean of the subcolumn cloud water +! CLDICE_S = mean of the subcolumn cloud ice +! +! +! Note: +! Here: we force that the cloud condensate to be consistent with the cloud fraction +! i.e we only have cloud condensate when the cell is cloudy. +! In CAM: The cloud condensate and the cloud fraction are obtained from 2 different equations +! and the 2 quantities can be inconsistent (i.e. CAM can produce cloud fraction +! without cloud condensate or the opposite). +!---------------------------------------------------------------------- + + use mcica_random_numbers +! The Mersenne Twister random number engine + use MersenneTwister, only: randomNumberSequence, & + new_RandomNumberSequence, getRandomReal + + type(randomNumberSequence) :: randomNumbers + +! -- Arguments + + integer(kind=im), intent(in) :: ncol ! number of layers + integer(kind=im), intent(in) :: nlay ! number of layers + integer(kind=im), intent(in) :: icld ! clear/cloud, cloud overlap flag + integer(kind=im), intent(inout) :: irng ! flag for random number generator + ! 0 = kissvec + ! 1 = Mersenne Twister + integer(kind=im), intent(in) :: nsubcol ! number of sub-columns (g-point intervals) + integer(kind=im), optional, intent(in) :: changeSeed ! allows permuting seed + +! Column state (cloud fraction, cloud water, cloud ice) + variables needed to read physics state + real(kind=rb), intent(in) :: pmid(:,:) ! layer pressure (Pa) + ! Dimensions: (ncol,nlay) +! mji - Add height + real(kind=rb), intent(in) :: hgt(:,:) ! layer height (m) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cld(:,:) ! cloud fraction + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: clwp(:,:) ! in-cloud liquid water path (g/m2) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: ciwp(:,:) ! in-cloud ice water path (g/m2) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: cswp(:,:) ! in-cloud snow water path (g/m2) + ! Dimensions: (ncol,nlay) + real(kind=rb), intent(in) :: tauc(:,:,:) ! in-cloud optical depth (non-delta scaled) + ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(in) :: ssac(:,:,:) ! in-cloud single scattering albedo (non-delta scaled) + ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter (non-delta scaled) + ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(in) :: fsfc(:,:,:) ! in-cloud forward scattering fraction (non-delta scaled) + ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(out) :: cld_stoch(:,:,:) ! subcolumn cloud fraction + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: clwp_stoch(:,:,:) ! subcolumn in-cloud liquid water path + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: ciwp_stoch(:,:,:) ! subcolumn in-cloud ice water path + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: cswp_stoch(:,:,:) ! subcolumn in-cloud snow water path + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: tauc_stoch(:,:,:) ! subcolumn in-cloud optical depth + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: ssac_stoch(:,:,:) ! subcolumn in-cloud single scattering albedo + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: asmc_stoch(:,:,:) ! subcolumn in-cloud asymmetry parameter + ! Dimensions: (ngptsw,ncol,nlay) + real(kind=rb), intent(out) :: fsfc_stoch(:,:,:) ! subcolumn in-cloud forward scattering fraction + ! Dimensions: (ngptsw,ncol,nlay) + +! -- Local variables + real(kind=rb) :: cldf(ncol,nlay) ! cloud fraction + ! Dimensions: (ncol,nlay) + +! Mean over the subcolumns (cloud fraction, cloud water , cloud ice) - inactive +! real(kind=rb) :: mean_cld_stoch(ncol,nlay) ! cloud fraction +! real(kind=rb) :: mean_clwp_stoch(ncol,nlay) ! cloud water +! real(kind=rb) :: mean_ciwp_stoch(ncol,nlay) ! cloud ice +! real(kind=rb) :: mean_tauc_stoch(ncol,nlay) ! cloud optical depth +! real(kind=rb) :: mean_ssac_stoch(ncol,nlay) ! cloud single scattering albedo +! real(kind=rb) :: mean_asmc_stoch(ncol,nlay) ! cloud asymmetry parameter +! real(kind=rb) :: mean_fsfc_stoch(ncol,nlay) ! cloud forward scattering fraction + +! Set overlap + integer(kind=im) :: overlap ! 1 = random overlap, 2 = maximum-random, + ! 3 = maximum overlap, 4 = exponential, + ! 5 = exponential-random + real(kind=rb), parameter :: Zo = 2500._rb ! length scale (m) + real(kind=rb), dimension(ncol,nlay) :: alpha ! overlap parameter + +! Constants (min value for cloud fraction and cloud water and ice) + real(kind=rb), parameter :: cldmin = 1.0e-20_rb ! min cloud fraction +! real(kind=rb), parameter :: qmin = 1.0e-10_rb ! min cloud water and cloud ice (not used) + +! Variables related to random number and seed + real(kind=rb), dimension(nsubcol, ncol, nlay) :: CDF, CDF2 ! random numbers + integer(kind=im), dimension(ncol) :: seed1, seed2, seed3, seed4 ! seed to create random number + real(kind=rb), dimension(ncol) :: rand_num ! random number (kissvec) + integer(kind=im) :: iseed ! seed to create random number (Mersenne Twister) + real(kind=rb) :: rand_num_mt ! random number (Mersenne Twister) + +! Flag to identify cloud fraction in subcolumns + logical, dimension(nsubcol, ncol, nlay) :: isCloudy ! flag that says whether a gridbox is cloudy + +! Indices + integer(kind=im) :: ilev, isubcol, i, n, ngbm ! indices + +!------------------------------------------------------------------------------------------ + +! Check that irng is in bounds; if not, set to default + if (irng .ne. 0) irng = 1 + +! Pass input cloud overlap setting to local variable + overlap = icld + +! Ensure that cloud fractions are in bounds + do ilev = 1, nlay + do i = 1, ncol + cldf(i,ilev) = cld(i,ilev) + if (cldf(i,ilev) < cldmin) then + cldf(i,ilev) = 0._rb + endif + enddo + enddo + +! ----- Create seed -------- + +! Advance randum number generator by changeseed values + if (irng.eq.0) then +! For kissvec, create a seed that depends on the state of the columns. Maybe not the best way, but it works. + +! Must use pmid from bottom four layers. + do i=1,ncol + if (pmid(i,1).lt.pmid(i,2)) then + stop 'MCICA_SUBCOL: KISSVEC SEED GENERATOR REQUIRES PMID FROM BOTTOM FOUR LAYERS.' + endif + seed1(i) = (pmid(i,1) - int(pmid(i,1))) * 1000000000_im + seed2(i) = (pmid(i,2) - int(pmid(i,2))) * 1000000000_im + seed3(i) = (pmid(i,3) - int(pmid(i,3))) * 1000000000_im + seed4(i) = (pmid(i,4) - int(pmid(i,4))) * 1000000000_im + enddo + do i=1,changeSeed + call kissvec(seed1, seed2, seed3, seed4, rand_num) + enddo + elseif (irng.eq.1) then + randomNumbers = new_RandomNumberSequence(seed = changeSeed) + endif + + +! ------ Apply overlap assumption -------- + +! generate the random numbers + + select case (overlap) + + + case(1) +! Random overlap +! i) pick a random value at every level + + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + case(2) +! Maximum-Random overlap +! i) pick a random number for top layer. +! ii) walk down the column: +! - if the layer above is cloudy, we use the same random number than in the layer above +! - if the layer above is clear, we use a new random number + + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + do ilev = 2,nlay + do i = 1, ncol + do isubcol = 1, nsubcol + if (CDF(isubcol, i, ilev-1) > 1._rb - cldf(i,ilev-1) ) then + CDF(isubcol,i,ilev) = CDF(isubcol,i,ilev-1) + else + CDF(isubcol,i,ilev) = CDF(isubcol,i,ilev) * (1._rb - cldf(i,ilev-1)) + endif + enddo + enddo + enddo + + + case(3) +! Maximum overlap +! i) pick same random numebr at every level + + if (irng.eq.0) then + do isubcol = 1,nsubcol + call kissvec(seed1, seed2, seed3, seed4, rand_num) + do ilev = 1,nlay + CDF(isubcol,:,ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + rand_num_mt = getRandomReal(randomNumbers) + do ilev = 1, nlay + CDF(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + +! mji - Activate exponential cloud overlap option + case(4) + ! Exponential overlap: weighting between maximum and random overlap increases with the distance. + ! The random numbers for exponential overlap verify: + ! j=1 RAN(j)=RND1 + ! j>1 if RND1 < alpha(j,j-1) => RAN(j) = RAN(j-1) + ! RAN(j) = RND2 + ! alpha is obtained from the equation + ! alpha = exp(-(Z(j)-Z(j-1))/Zo) where Zo is a characteristic length scale + + ! compute alpha + do i = 1, ncol + alpha(i, 1) = 0._rb + do ilev = 2,nlay + alpha(i, ilev) = exp( -( hgt (i, ilev) - hgt (i, ilev-1)) / Zo) + enddo + enddo + + ! generate 2 streams of random numbers + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol, :, ilev) = rand_num + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF2(isubcol, :, ilev) = rand_num + enddo + enddo + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1, nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + rand_num_mt = getRandomReal(randomNumbers) + CDF2(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + + ! generate random numbers + do ilev = 2,nlay + where (CDF2(:, :, ilev) < spread(alpha (:,ilev), dim=1, nCopies=nsubcol) ) + CDF(:,:,ilev) = CDF(:,:,ilev-1) + end where + end do + +! mji - Activate exponential-random cloud overlap option + case(5) + ! Exponential-random overlap: +! call wrf_error_fatal("Cloud Overlap case 5: ER has not yet been implemented. Stopping...") + + end select + + +! -- generate subcolumns for homogeneous clouds ----- + do ilev = 1, nlay + isCloudy(:,:,ilev) = (CDF(:,:,ilev) >= 1._rb - spread(cldf(:,ilev), dim=1, nCopies=nsubcol) ) + enddo + +! where the subcolumn is cloudy, the subcolumn cloud fraction is 1; +! where the subcolumn is not cloudy, the subcolumn cloud fraction is 0; +! where there is a cloud, define the subcolumn cloud properties, +! otherwise set these to zero + + ngbm = ngb(1) - 1 + do ilev = 1,nlay + do i = 1, ncol + do isubcol = 1, nsubcol + if ( iscloudy(isubcol,i,ilev) ) then + cld_stoch(isubcol,i,ilev) = 1._rb + clwp_stoch(isubcol,i,ilev) = clwp(i,ilev) + ciwp_stoch(isubcol,i,ilev) = ciwp(i,ilev) + cswp_stoch(isubcol,i,ilev) = cswp(i,ilev) + n = ngb(isubcol) - ngbm + tauc_stoch(isubcol,i,ilev) = tauc(n,i,ilev) + ssac_stoch(isubcol,i,ilev) = ssac(n,i,ilev) + asmc_stoch(isubcol,i,ilev) = asmc(n,i,ilev) + fsfc_stoch(isubcol,i,ilev) = fsfc(n,i,ilev) + else + cld_stoch(isubcol,i,ilev) = 0._rb + clwp_stoch(isubcol,i,ilev) = 0._rb + ciwp_stoch(isubcol,i,ilev) = 0._rb + cswp_stoch(isubcol,i,ilev) = 0._rb + tauc_stoch(isubcol,i,ilev) = 0._rb + ssac_stoch(isubcol,i,ilev) = 1._rb + asmc_stoch(isubcol,i,ilev) = 0._rb + fsfc_stoch(isubcol,i,ilev) = 0._rb + endif + enddo + enddo + enddo + + +! -- compute the means of the subcolumns --- +! mean_cld_stoch(:,:) = 0._rb +! mean_clwp_stoch(:,:) = 0._rb +! mean_ciwp_stoch(:,:) = 0._rb +! mean_tauc_stoch(:,:) = 0._rb +! mean_ssac_stoch(:,:) = 0._rb +! mean_asmc_stoch(:,:) = 0._rb +! mean_fsfc_stoch(:,:) = 0._rb +! do i = 1, nsubcol +! mean_cld_stoch(:,:) = cld_stoch(i,:,:) + mean_cld_stoch(:,:) +! mean_clwp_stoch(:,:) = clwp_stoch( i,:,:) + mean_clwp_stoch(:,:) +! mean_ciwp_stoch(:,:) = ciwp_stoch( i,:,:) + mean_ciwp_stoch(:,:) +! mean_tauc_stoch(:,:) = tauc_stoch( i,:,:) + mean_tauc_stoch(:,:) +! mean_ssac_stoch(:,:) = ssac_stoch( i,:,:) + mean_ssac_stoch(:,:) +! mean_asmc_stoch(:,:) = asmc_stoch( i,:,:) + mean_asmc_stoch(:,:) +! mean_fsfc_stoch(:,:) = fsfc_stoch( i,:,:) + mean_fsfc_stoch(:,:) +! end do +! mean_cld_stoch(:,:) = mean_cld_stoch(:,:) / nsubcol +! mean_clwp_stoch(:,:) = mean_clwp_stoch(:,:) / nsubcol +! mean_ciwp_stoch(:,:) = mean_ciwp_stoch(:,:) / nsubcol +! mean_tauc_stoch(:,:) = mean_tauc_stoch(:,:) / nsubcol +! mean_ssac_stoch(:,:) = mean_ssac_stoch(:,:) / nsubcol +! mean_asmc_stoch(:,:) = mean_asmc_stoch(:,:) / nsubcol +! mean_fsfc_stoch(:,:) = mean_fsfc_stoch(:,:) / nsubcol + + end subroutine generate_stochastic_clouds_sw + + +!-------------------------------------------------------------------------------------------------- + subroutine kissvec(seed1,seed2,seed3,seed4,ran_arr) +!-------------------------------------------------------------------------------------------------- + +! public domain code made available from http://www.fortran.com/ +! downloaded by pjr on 03/16/04 for NCAR CAM +! converted to vector form, functions inlined by pjr,mvr on 05/10/2004 + +! The KISS (Keep It Simple Stupid) random number generator. Combines: +! (1) The congruential generator x(n)=69069*x(n-1)+1327217885, period 2^32. +! (2) A 3-shift shift-register generator, period 2^32-1, +! (3) Two 16-bit multiply-with-carry generators, period 597273182964842497>2^59 +! Overall period>2^123; + +! + real(kind=rb), dimension(:), intent(inout) :: ran_arr + integer(kind=im), dimension(:), intent(inout) :: seed1,seed2,seed3,seed4 + integer(kind=im) :: i,sz,kiss + integer(kind=im) :: m, k, n + +! inline function + m(k, n) = ieor (k, ishft (k, n) ) + + sz = size(ran_arr) + do i = 1, sz + seed1(i) = 69069_im * seed1(i) + 1327217885_im + seed2(i) = m (m (m (seed2(i), 13_im), - 17_im), 5_im) + seed3(i) = 18000_im * iand (seed3(i), 65535_im) + ishft (seed3(i), - 16_im) + seed4(i) = 30903_im * iand (seed4(i), 65535_im) + ishft (seed4(i), - 16_im) + kiss = seed1(i) + seed2(i) + ishft (seed3(i), 16_im) + seed4(i) + ran_arr(i) = kiss*2.328306e-10_rb + 0.5_rb + end do + + end subroutine kissvec + +!! @} + +! +!........................................! + end module rrtmg_sw ! +!========================================! From 5b5b663d2bd59942a711551f34e3c9c28c475909 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Wed, 8 Apr 2020 03:34:12 +0000 Subject: [PATCH 078/404] Initializing ice fluxes by PBL calculated values when fluxes from CICE are unavailable. --- physics/GFS_PBL_generic.F90 | 23 +++++++++++++++-------- physics/GFS_PBL_generic.meta | 11 +++++------ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index ff59aa465..261ae8c19 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -286,7 +286,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, & dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, & dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag, dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt, & - dq3dt_ozone, rd, cp,fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, fice, dusfc_cice, dvsfc_cice, dtsfc_cice, & + dq3dt_ozone, rd, cp,fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, flag_cice, dusfc_cice, dvsfc_cice, dtsfc_cice, & dqsfc_cice, wet, dry, icy, wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1, dkt_cpl, dkt, errmsg, errflg) use machine, only : kind_phys @@ -301,10 +301,11 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, lsidea logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu + logical, dimension(:), intent(in) :: flag_cice real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), intent(in) :: rd, cp, fvirt, hvap - real(kind=kind_phys), dimension(:), intent(in) :: t1, q1, hflx, oceanfrac, fice + real(kind=kind_phys), dimension(:), intent(in) :: t1, q1, hflx, oceanfrac real(kind=kind_phys), dimension(:,:), intent(in) :: prsl real(kind=kind_phys), dimension(:), intent(in) :: dusfc_cice, dvsfc_cice, dtsfc_cice, dqsfc_cice, & wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1 @@ -334,7 +335,6 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), parameter :: zero = 0.0d0 real(kind=kind_phys), parameter :: one = 1.0d0 real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue, same as in GFS_typedefs.F90 - real(kind=kind_phys), parameter :: epsln = 1.0d-10 ! same as in GFS_physics_driver.F90 integer :: i, k, kk, k1, n real(kind=kind_phys) :: tem, tem1, rho @@ -502,11 +502,18 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, if (cplflx) then do i=1,im if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES - if (fice(i) > one - epsln) then ! no open water, use results from CICE - dusfci_cpl(i) = dusfc_cice(i) - dvsfci_cpl(i) = dvsfc_cice(i) - dtsfci_cpl(i) = dtsfc_cice(i) - dqsfci_cpl(i) = dqsfc_cice(i) + if ( .not. wet(i)) then ! no open water + if (flag_cice(i)) then !use results from CICE + dusfci_cpl(i) = dusfc_cice(i) + dvsfci_cpl(i) = dvsfc_cice(i) + dtsfci_cpl(i) = dtsfc_cice(i) + dqsfci_cpl(i) = dqsfc_cice(i) + else !use PBL fluxes when CICE fluxes is unavailable + dusfci_cpl(i) = dusfc1(i) + dvsfci_cpl(i) = dvsfc1(i) + dtsfci_cpl(i) = dtsfc1(i) + dqsfci_cpl(i) = dqsfc1(i) + end if elseif (icy(i) .or. dry(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point tem1 = max(q1(i), 1.e-8) rho = prsl(i,1) / (rd*t1(i)*(one+fvirt*tem1)) diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 2319f0044..a413321d6 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -1079,13 +1079,12 @@ kind = kind_phys intent = in optional = F -[fice] - standard_name = sea_ice_concentration - long_name = ice fraction over open water - units = frac +[flag_cice] + standard_name = flag_for_cice + long_name = flag for cice + units = flag dimensions = (horizontal_dimension) - type = real - kind = kind_phys + type = logical intent = in optional = F [dusfc_cice] From 28d1bc22802b30220a3f5f0782b50b9d2d66d9f4 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 7 Apr 2020 10:29:48 -0600 Subject: [PATCH 079/404] Clean up HWRF RRTMG additions --- physics/GFS_rrtmg_pre.F90 | 265 +- physics/GFS_rrtmg_pre.meta | 17 - physics/GFS_rrtmg_setup.F90 | 32 +- physics/GFS_rrtmg_setup.meta | 4 +- physics/module_MP_FER_HIRES.F90 | 4 +- physics/physparam.f | 2 + physics/radiation_clouds.f | 151 +- physics/radlw_main.F90 | 191 +- physics/radlw_main.meta | 32 - physics/radsw_main.F90 | 175 +- physics/radsw_main.f | 5472 ------------------------------- physics/radsw_main.meta | 40 - 12 files changed, 265 insertions(+), 6120 deletions(-) delete mode 100644 physics/radsw_main.f diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 952673f95..8acb24a50 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -20,7 +20,7 @@ end subroutine GFS_rrtmg_pre_init ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd, Cldprop, Coupling, & - Radtend,dx, & ! input/output + Radtend, dx, & ! input/output f_ice, f_rain, f_rimef, flgmin, cwm, & ! F-A mp scheme only lm, im, lmk, lmp, & ! input kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output @@ -32,47 +32,50 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input faerlw1, faerlw2, faerlw3, aerodp, & clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & clouds7, clouds8, clouds9, cldsa, & - mtopa, mbota, de_lgth, alb1d, errmsg, errflg, & - mpirank, mpiroot) + mtopa, mbota, de_lgth, alb1d, errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_stateout_type, & - GFS_sfcprop_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type, & - GFS_cldprop_type, & - GFS_radtend_type, & + use GFS_typedefs, only: GFS_statein_type, & + GFS_stateout_type, & + GFS_sfcprop_type, & + GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_tbd_type, & + GFS_cldprop_type, & + GFS_radtend_type, & GFS_diag_type use physparam - use physcons, only: eps => con_eps, & - & epsm1 => con_epsm1, & - & fvirt => con_fvirt & - &, rog => con_rog & - &, rocp => con_rocp - use radcons, only: itsfc,ltp, lextop, qmin, & + use physcons, only: eps => con_eps, & + epsm1 => con_epsm1, & + fvirt => con_fvirt, & + rog => con_rog, & + rocp => con_rocp, & + con_rd + use radcons, only: itsfc,ltp, lextop, qmin, & qme5, qme6, epsq, prsmin use funcphys, only: fpvs - use module_radiation_astronomy,only: coszmn ! sol_init, sol_update - use module_radiation_gases, only: NF_VGAS, getgases, getozn ! gas_init, gas_update, - use module_radiation_aerosols, only: NF_AESW, NF_AELW, setaer, & ! aer_init, aer_update, - & NSPC1 - use module_radiation_clouds, only: NF_CLDS, & ! cld_init - & progcld1, progcld3, & -! & progcld2, & - & progcld4, progcld5, & - & progcld6, & !F-A - & progclduni, & - & cal_cldfra3, find_cloudLayers,adjust_cloudIce,adjust_cloudH2O, & - & adjust_cloudFinal - - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & - & profsw_type, NBDSW - use module_radlw_parameters, only: topflw_type, sfcflw_type, & - & proflw_type, NBDLW + use module_radiation_astronomy,only: coszmn ! sol_init, sol_update + use module_radiation_gases, only: NF_VGAS, getgases, getozn ! gas_init, gas_update, + use module_radiation_aerosols, only: NF_AESW, NF_AELW, setaer, & ! aer_init, aer_update, + NSPC1 + use module_radiation_clouds, only: NF_CLDS, & ! cld_init + progcld1, progcld3, & + progcld2, & + progcld4, progcld5, & + progcld6, & ! F-A + progclduni, & + cal_cldfra3, & + find_cloudLayers, & + adjust_cloudIce, & + adjust_cloudH2O, & + adjust_cloudFinal + + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & + profsw_type, NBDSW + use module_radlw_parameters, only: topflw_type, sfcflw_type, & + proflw_type, NBDLW use surface_perturbation, only: cdfnor implicit none @@ -86,19 +89,18 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling - integer, intent(in) :: im, lm, lmk, lmp - integer, intent(out) :: kd, kt, kb + integer, intent(in) :: im, lm, lmk, lmp + integer, intent(out) :: kd, kt, kb ! F-A mp scheme only - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_ice - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_rain - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_rimef - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: cwm - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: flgmin + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_ice + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_rain + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: f_rimef + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: cwm + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: flgmin real(kind=kind_phys), intent(out) :: raddt - - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: dx - INTEGER, INTENT(IN) :: mpirank,mpiroot + + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: dx real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: delp real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: dz real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: plvl @@ -160,11 +162,12 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & cldcov, deltaq, cnvc, cnvw, & - effrl, effri, effrr, effrs,rho,plyrpa + effrl, effri, effrr, effrs, rho, plyrpa real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: qc_save, qi_save - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: qs_save + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: qc_save + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: qi_save + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: qs_save real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,min(4,Model%ncnd)) :: ccnd real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 @@ -172,11 +175,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw -!mz *temporary - real(kind=kind_phys),parameter:: con_rd =2.8705e+2_kind_phys - INTEGER :: ids, ide, jds, jde, kds, kde, & - & ims, ime, jms, jme, kms, kme, & - & its, ite, jts, jte, kts, kte + + integer :: ids, ide, jds, jde, kds, kde, & + ims, ime, jms, jme, kms, kme, & + its, ite, jts, jte, kts, kte ! !===> ... begin here @@ -188,8 +190,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input if (.not. (Model%lsswr .or. Model%lslwr)) return !--- set commonly used integers - me = Model%me - NFXR = Model%nfxr + me = Model%me + NFXR = Model%nfxr NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) ntcw = Model%ntcw ntiw = Model%ntiw @@ -542,7 +544,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice enddo enddo - elseif (Model%ncnd == 2) then ! MG or + elseif (Model%ncnd == 2) then ! MG do k=1,LMK do i=1,IM ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water @@ -651,7 +653,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cldcov = 0.0 endif - ! ! --- add suspended convective cloud water to grid-scale cloud water ! only for cloud fraction & radiation computation @@ -687,79 +688,71 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo endif -!mz HWRF physics: icloud=3 - ! Set internal dimensions - ids = 1 - ims = 1 - its = 1 - ide = size(Grid%xlon,1) - ime = size(Grid%xlon,1) - ite = size(Grid%xlon,1) - jds = 1 - jms = 1 - jts = 1 - jde = 1 - jme = 1 - jte = 1 - kds = 1 - kms = 1 - kts = 1 - kde = Model%levr+LTP - kme = Model%levr+LTP - kte = Model%levr+LTP - - do k = 1, LMK - do i = 1, IM - rho(i,k)=plyr(i,k)*100./(con_rd*tlyr(i,k)) - plyrpa(i,k)=plyr(i,k)*100. !hPa->Pa - end do - end do - - do i=1,im - if (Sfcprop%slmsk(i)==1. .or. Sfcprop%slmsk(i)==2.) then !sea/land/ice mask (=0/1/2) in FV3 - xland(i)=1.0 !but land/water = (1/2) in HWRF - else - xland(i)=2.0 - endif - enddo - - - gridkm = 1.414*SQRT(dx(1)*0.001*dx(1)*0.001 ) + !mz HWRF physics: icloud=3 + if(Model%icloud == 3) then + + ! Set internal dimensions + ids = 1 + ims = 1 + its = 1 + ide = size(Grid%xlon,1) + ime = size(Grid%xlon,1) + ite = size(Grid%xlon,1) + jds = 1 + jms = 1 + jts = 1 + jde = 1 + jme = 1 + jte = 1 + kds = 1 + kms = 1 + kts = 1 + kde = Model%levr+LTP + kme = Model%levr+LTP + kte = Model%levr+LTP + do k = 1, LMK + do i = 1, IM + rho(i,k)=plyr(i,k)*100./(con_rd*tlyr(i,k)) + plyrpa(i,k)=plyr(i,k)*100. !hPa->Pa + end do + end do - if(Model%icloud == 3) then - do i =1, im - do k =1, lmk - qc_save(i,k) = ccnd(i,k,1) - qi_save(i,k) = ccnd(i,k,2) - qs_save(i,k) = ccnd(i,k,4) - enddo - enddo + do i=1,im + if (Sfcprop%slmsk(i)==1. .or. Sfcprop%slmsk(i)==2.) then ! sea/land/ice mask (=0/1/2) in FV3 + xland(i)=1.0 ! but land/water = (1/2) in HWRF + else + xland(i)=2.0 + endif + enddo + gridkm = sqrt(2.0)*sqrt(dx(1)*0.001*dx(1)*0.001) - CALL cal_cldfra3(cldcov,qlyr,ccnd(:,:,1),ccnd(:,:,2), & - & ccnd(:,:,4),plyrpa,tlyr, RHO,XLAND,GRIDKM, & - & ids,ide, jds,jde, kds,kde, & - & ims,ime, jms,jme, kms,kme, & - & its,ite, jts,jte, kts,kte) -! if(mpirank == mpiroot) then -! write(0,*)'cal_cldfra3::max/min(cldcov) =', maxval(cldcov), & -! & minval(cldcov) -! endif + do i =1, im + do k =1, lmk + qc_save(i,k) = ccnd(i,k,1) + qi_save(i,k) = ccnd(i,k,2) + qs_save(i,k) = ccnd(i,k,4) + enddo + enddo - !mz* back to micro-only qc qi,qs - do i =1, im - do k =1, lmk - ccnd(i,k,1) = qc_save(i,k) - ccnd(i,k,2) = qi_save(i,k) - ccnd(i,k,4) = qs_save(i,k) - enddo - enddo - endif + call cal_cldfra3(cldcov,qlyr,ccnd(:,:,1),ccnd(:,:,2), & + ccnd(:,:,4),plyrpa,tlyr,rho,xland,gridkm, & + ids,ide,jds,jde,kds,kde, & + ims,ime,jms,jme,kms,kme, & + its,ite,jts,jte,kts,kte) + !mz* back to micro-only qc qi,qs + do i =1, im + do k =1, lmk + ccnd(i,k,1) = qc_save(i,k) + ccnd(i,k,2) = qi_save(i,k) + ccnd(i,k,4) = qs_save(i,k) + enddo + enddo -!mz*end + endif ! icloud == 3 if (lextop) then do i=1,im @@ -787,12 +780,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! or unified cloud and/or with MG microphysics if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - Model%iovr_lw, Model%iovr_sw, & ! mz* for iovr=3 should come from - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & + IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & @@ -800,7 +792,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Model%uni_cld, Model%lmfshal, & Model%lmfdeep2, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & - Model%iovr_lw, Model%iovr_sw, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif @@ -811,7 +802,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cnvw, cnvc, Grid%xlat, Grid%xlon, & Sfcprop%slmsk, dz, delp, im, lmk, lmp, deltaq, & Model%sup, Model%kdt, me, & - Model%iovr_lw, Model%iovr_sw, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs @@ -822,16 +812,14 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(1:IM,1:LMK,1), cnvw, cnvc, & Grid%xlat, Grid%xlon, Sfcprop%slmsk, & cldcov, dz, delp, im, lmk, lmp, & - Model%iovr_lw, Model%iovr_sw, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & IM, LMK, LMP, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & - Model%iovr_lw, Model%iovr_sw, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs ! call progcld4o (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs ! tracer1, Grid%xlat, Grid%xlon, Sfcprop%slmsk, & ! dz, delp, & @@ -841,14 +829,15 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6 ) then + elseif(Model%imp_physics == 8) then if (Model%kdt == 1) then Tbd%phy_f3d(:,:,Model%nleffr) = 10. Tbd%phy_f3d(:,:,Model%nieffr) = 50. Tbd%phy_f3d(:,:,Model%nseffr) = 250. endif - !mz* this is original progcld5 - temporary + ! mz* this is the original progcld5 - temporary + ! will be replaced with GSL's version of progcld6 for Thompson MP call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & @@ -857,8 +846,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Model%lmfshal,Model%lmfdeep2, & cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - Model%iovr_lw, Model%iovr_sw, & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs elseif(Model%imp_physics == 15) then @@ -876,7 +864,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Model%lmfshal,Model%lmfdeep2, & cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - Model%iovr_lw, Model%iovr_sw, & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs endif ! end if_imp_physics diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 716090962..2c00f697b 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -573,23 +573,6 @@ type = integer intent = out optional = F -[mpirank] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F - ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmg_setup.F90 b/physics/GFS_rrtmg_setup.F90 index 043ea8560..7a52f573c 100644 --- a/physics/GFS_rrtmg_setup.F90 +++ b/physics/GFS_rrtmg_setup.F90 @@ -5,9 +5,9 @@ module GFS_rrtmg_setup use physparam, only : isolar , ictmflg, ico2flg, ioznflg, iaerflg,& ! & iaermdl, laswflg, lalwflg, lavoflg, icldflg, & & iaermdl, icldflg, & - & lcrick , lcnorm , lnoprec, & - & ialbflg, iemsflg, ivflip , ipsd0, & -! & iswcliq, & + & iovrsw , iovrlw , lcrick , lcnorm , lnoprec, & + & ialbflg, iemsflg, isubcsw, isubclw, ivflip , ipsd0, & + & iswcliq, & & kind_phys use radcons, only: ltp, lextop @@ -178,8 +178,8 @@ subroutine GFS_rrtmg_setup_init ( & integer, intent(in) :: num_p3d integer, intent(in) :: npdf3d integer, intent(in) :: ntoz - integer, intent(inout) :: iovr_sw - integer, intent(inout) :: iovr_lw + integer, intent(in) :: iovr_sw + integer, intent(in) :: iovr_lw integer, intent(in) :: isubc_sw integer, intent(in) :: isubc_lw integer, intent(in) :: icliq_sw @@ -205,8 +205,6 @@ subroutine GFS_rrtmg_setup_init ( & real(kind_phys), dimension(im,NSPC1) :: aerodp_check ! End for consistency checks - integer :: iswcliq - ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 @@ -271,14 +269,14 @@ subroutine GFS_rrtmg_setup_init ( & iswcliq = icliq_sw ! optical property for liquid clouds for sw - ! iovrsw = iovr_sw ! cloud overlapping control flag for sw - ! iovrlw = iovr_lw ! cloud overlapping control flag for lw + iovrsw = iovr_sw ! cloud overlapping control flag for sw + iovrlw = iovr_lw ! cloud overlapping control flag for lw lcrick = crick_proof ! control flag for eliminating CRICK lcnorm = ccnorm ! control flag for in-cld condensate lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) -! isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation -! isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation + isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation + isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation ialbflg= ialb ! surface albedo control flag iemsflg= iems ! surface emissivity control flag @@ -306,7 +304,7 @@ subroutine GFS_rrtmg_setup_init ( & call radinit & ! --- inputs: - & ( si, levr, imp_physics,iswcliq, iovr_lw, iovr_sw, isubc_lw, isubc_sw, me ) + & ( si, levr, imp_physics, me ) ! --- outputs: ! ( none ) @@ -387,7 +385,7 @@ end subroutine GFS_rrtmg_setup_finalize ! Private functions - subroutine radinit( si, NLAY, imp_physics,iswcliq, iovrlw,iovrsw,isubclw,isubcsw, me ) + subroutine radinit( si, NLAY, imp_physics, me ) !................................... ! --- inputs: @@ -512,10 +510,8 @@ subroutine radinit( si, NLAY, imp_physics,iswcliq, iovrlw,iovrsw,isubclw,isubcsw implicit none ! --- inputs: - integer, intent(in) :: NLAY, me, imp_physics, & - & isubclw,isubcsw,iswcliq + integer, intent(in) :: NLAY, me, imp_physics - integer, intent(inout) :: iovrlw,iovrsw real (kind=kind_phys), intent(in) :: si(:) ! --- outputs: (none, to module variables) @@ -624,9 +620,9 @@ subroutine radinit( si, NLAY, imp_physics,iswcliq, iovrlw,iovrsw,isubclw,isubcsw call cld_init ( si, NLAY, imp_physics, me) ! --- ... cloud initialization routine - call rlwinit (iovrlw,isubclw, me ) ! --- ... lw radiation initialization routine + call rlwinit ( me ) ! --- ... lw radiation initialization routine - call rswinit (iswcliq, iovrsw,isubcsw, me ) ! --- ... sw radiation initialization routine + call rswinit ( me ) ! --- ... sw radiation initialization routine ! return !................................... diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 4f96b76f1..18ed4c49c 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -112,7 +112,7 @@ units = flag dimensions = () type = integer - intent = inout + intent = in optional = F [iovr_lw] standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation @@ -120,7 +120,7 @@ units = flag dimensions = () type = integer - intent = inout + intent = in optional = F [isubc_sw] standard_name = flag_for_sw_clouds_grid_approximation diff --git a/physics/module_MP_FER_HIRES.F90 b/physics/module_MP_FER_HIRES.F90 index 23a2de7d7..02a09481b 100644 --- a/physics/module_MP_FER_HIRES.F90 +++ b/physics/module_MP_FER_HIRES.F90 @@ -306,7 +306,7 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !----------------------------------------------------------------------- ! -! MZ: HWRF practice start +! MZ: HWRF start !---------- !2015-03-30, recalculate some constants which may depend on phy time step CALL MY_GROWTH_RATES_NMM_hr (DT) @@ -341,7 +341,7 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !write(*,*)'braut=',braut !! END OF adding, 2015-03-30 !----------- -! MZ: HWRF practice end +! MZ: HWRF end ! DO j = jms,jme diff --git a/physics/physparam.f b/physics/physparam.f index 795cb4fab..e722297de 100644 --- a/physics/physparam.f +++ b/physics/physparam.f @@ -234,6 +234,7 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method +!!\n =4: exponential overlapping cloud !!\n Opr GFS/CFS=1; see IOVR_SW in run scripts integer, save :: iovrsw = 1 !> cloud overlapping control flag for LW @@ -241,6 +242,7 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method +!!\n =4: exponential overlapping cloud !!\n Opr GFS/CFS=1; see IOVR_LW in run scripts integer, save :: iovrlw = 1 diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index b76d57eaf..8a943a032 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -194,8 +194,7 @@ !> This module computes cloud related quantities for radiation computations. module module_radiation_clouds ! -!mz* iovrsw, iovrlw need to come from NML - use physparam, only : icldflg, &!mz:iovrsw, iovrlw,& + use physparam, only : icldflg, iovrsw, iovrlw, & & lcrick, lcnorm, lnoprec, & & ivflip use physcons, only : con_fvirt, con_ttp, con_rocp, & @@ -242,13 +241,13 @@ module module_radiation_clouds real (kind=kind_phys), parameter :: cldasy_def = 0.84 !< default cld asymmetry factor integer :: llyr = 2 !< upper limit of boundary layer clouds -!mz integer :: iovr = 1 !< maximum-random cloud overlapping method +! DH* TODO - HOW TO GET/SET THIS CORRECTLY? + integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld4o, & - & progcld6, & !mz- for GSL suite - & cal_cldfra3, find_cloudLayers,adjust_cloudIce,adjust_cloudH2O, & - & adjust_cloudFinal + & cld_init, progcld5, progcld6, progcld4o, cal_cldfra3, & + & find_cloudLayers, adjust_cloudIce, adjust_cloudH2O, & + & adjust_cloudFinal ! ================= @@ -307,6 +306,7 @@ subroutine cld_init & ! =1: max/ran overlapping clouds ! ! =2: maximum overlap clouds (mcica only) ! ! =3: decorrelation-length overlap (mcica only) ! +! =4: exponential overlapping cloud ! ! ivflip : control flag for direction of vertical index ! ! =0: index from toa to surface ! ! =1: index from surface to toa ! @@ -333,7 +333,7 @@ subroutine cld_init & ! ! --- set up module variables -!mz iovr = max( iovrsw, iovrlw ) !cld ovlp used for diag HML cld output + iovr = max( iovrsw, iovrlw ) !cld ovlp used for diag HML cld output if (me == 0) print *, VTAGCLD !print out version tag @@ -443,7 +443,6 @@ subroutine progcld1 & & xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & effrl,effri,effrr,effrs,effr_in, & - & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -527,7 +526,7 @@ subroutine progcld1 & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1,iovr_lw,iovr_sw + integer, intent(in) :: IX, NLAY, NLP1 logical, intent(in) :: uni_cld, lmfshal, lmfdeep2, effr_in @@ -555,7 +554,7 @@ subroutine progcld1 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf,iovrw + integer :: i, k, id, nf ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -563,8 +562,6 @@ subroutine progcld1 & ! !===> ... begin here -!mz - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output ! do nf=1,nf_clds do k=1,nlay @@ -806,7 +803,7 @@ subroutine progcld1 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovrw == 3 ) then + if ( iovr == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -820,7 +817,7 @@ subroutine progcld1 & call gethml & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & - & IX,NLAY, iovr_lw, iovr_sw, & + & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & & ) @@ -878,7 +875,6 @@ subroutine progcld2 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, f_ice,f_rain,r_rime,flgmin, & & IX, NLAY, NLP1, lmfshal, lmfdeep2, & - & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -967,7 +963,7 @@ subroutine progcld2 & ! --- constants ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1, iovr_lw,iovr_sw + integer, intent(in) :: IX, NLAY, NLP1 logical, intent(in) :: lmfshal, lmfdeep2 @@ -997,7 +993,7 @@ subroutine progcld2 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, iovrw + integer :: i, k, id ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -1007,10 +1003,6 @@ subroutine progcld2 & !===> ... begin here ! ! clouds(:,:,:) = 0.0 -!zm -!mz$ - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output$ - !> - Assign water/ice/rain/snow cloud properties for Ferrier scheme. do k = 1, NLAY @@ -1257,7 +1249,7 @@ subroutine progcld2 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovrw == 3 ) then + if ( iovr == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -1274,7 +1266,6 @@ subroutine progcld2 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & - & iovr_lw,iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -1333,7 +1324,6 @@ subroutine progcld3 & & xlat,xlon,slmsk, dz, delp, & & ix, nlay, nlp1, & & deltaq,sup,kdt,me, & - & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -1416,7 +1406,7 @@ subroutine progcld3 & implicit none ! --- inputs - integer, intent(in) :: ix, nlay, nlp1,kdt,iovr_lw,iovr_sw + integer, intent(in) :: ix, nlay, nlp1,kdt real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, dz, delp @@ -1448,14 +1438,11 @@ subroutine progcld3 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf, iovrw + integer :: i, k, id, nf ! !===> ... begin here ! -!mz - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output - do nf=1,nf_clds do k=1,nlay do i=1,ix @@ -1659,7 +1646,7 @@ subroutine progcld3 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovrw == 3 ) then + if ( iovr == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -1677,7 +1664,6 @@ subroutine progcld3 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & ix,nlay, & - & iovr_lw,iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -1734,8 +1720,7 @@ end subroutine progcld3 subroutine progcld4 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, & ! --- inputs: & xlat,xlon,slmsk,cldtot, dz, delp, & - & IX, NLAY, NLP1, & - & iovr_lw, iovr_sw, & + & IX, NLAY, NLP1, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -1816,7 +1801,7 @@ subroutine progcld4 & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1,iovr_lw,iovr_sw + integer, intent(in) :: IX, NLAY, NLP1 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, cldtot, cnvw, cnvc, & @@ -1842,14 +1827,11 @@ subroutine progcld4 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf,iovrw + integer :: i, k, id, nf ! !===> ... begin here ! -!mz - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output - do nf=1,nf_clds do k=1,nlay do i=1,ix @@ -2001,7 +1983,7 @@ subroutine progcld4 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovrw == 3 ) then + if ( iovr == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -2017,7 +1999,6 @@ subroutine progcld4 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & - & iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -2081,7 +2062,6 @@ subroutine progcld4o & & xlat,xlon,slmsk, dz, delp, & & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl,ntclamt, & & IX, NLAY, NLP1, & - & iovr_lw, iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -2161,7 +2141,7 @@ subroutine progcld4o & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1, iovr_lw, iovr_sw + integer, intent(in) :: IX, NLAY, NLP1 integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, & & ntclamt @@ -2191,12 +2171,10 @@ subroutine progcld4o & & tem1, tem2, tem3 real (kind=kind_phys), dimension(IX,NLAY) :: cldtot - integer :: i, k, id, nf, iovrw + integer :: i, k, id, nf ! !===> ... begin here -!mz - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output ! do nf=1,nf_clds do k=1,nlay @@ -2333,7 +2311,7 @@ subroutine progcld4o & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovrw == 3 ) then + if ( iovr == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -2349,7 +2327,6 @@ subroutine progcld4o & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & - & iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -2373,7 +2350,6 @@ subroutine progcld5 & & IX, NLAY, NLP1,icloud, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & - & iovr_lw,iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -2457,16 +2433,15 @@ subroutine progcld5 & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1,ICLOUD,iovr_lw,iovr_sw + integer, intent(in) :: IX, NLAY, NLP1, ICLOUD integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, cldcov, delp, dz -! & re_cloud, re_ice, re_snow -!mz: for diagnostics purpose +!mz: for diagnostics real (kind=kind_phys), dimension(:,:), intent(inout) :: & & re_cloud, re_ice, re_snow @@ -2492,7 +2467,7 @@ subroutine progcld5 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf, iovrw + integer :: i, k, id, nf ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -2500,8 +2475,6 @@ subroutine progcld5 & ! !===> ... begin here -!mz - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output ! do nf=1,nf_clds do k=1,nlay @@ -2672,19 +2645,9 @@ subroutine progcld5 & enddo endif !mz - if (icloud .ne.0) then + if (icloud .ne. 0) then ! assign/calculate efective radii for cloud water, ice, rain, snow -! if (effr_in) then -! do k = 1, NLAY -! do i = 1, IX -! rew(i,k) = effrl (i,k) -! rei(i,k) = max(10.0, min(150.0,effri (i,k))) -! rer(i,k) = effrr (i,k) -! res(i,k) = effrs (i,k) -! enddo -! enddo -! else do k = 1, NLAY do i = 1, IX rew(i,k) = reliq_def ! default liq radius to 10 micron @@ -2722,11 +2685,7 @@ subroutine progcld5 & else rei(i,k) = (1250.0/9.387) * tem3 ** 0.031 endif -! if (icloud == 3 ) then rei(i,k) = max(25.,rei(i,k)) !mz* HWRF -! else !mz GFDL -! rei(i,k) = max(10.0, min(rei(i,k), 150.0)) -! endif endif rei(i,k) = min(rei(i,k), 135.72) !- 1.0315*rei<= 140 microns enddo @@ -2739,8 +2698,7 @@ subroutine progcld5 & res(i,k) = 10.0 enddo enddo -! endif -! + endif ! end icloud !mz end do k = 1, NLAY @@ -2756,8 +2714,8 @@ subroutine progcld5 & clouds(i,k,8) = 0. clouds(i,k,9) = 10. !mz for diagnostics? - re_cloud(i,k) =rew(i,k) - re_ice(i,k) =rei(i,k) + re_cloud(i,k) = rew(i,k) + re_ice(i,k) = rei(i,k) re_snow(i,k) = 10. enddo @@ -2766,7 +2724,7 @@ subroutine progcld5 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovrw == 3 ) then + if ( iovr == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -2785,7 +2743,6 @@ subroutine progcld5 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & - & iovr_lw,iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -2806,7 +2763,6 @@ subroutine progcld6 & & IX, NLAY, NLP1, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & - & iovr_lw,iovr_sw, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -2891,7 +2847,7 @@ subroutine progcld6 & implicit none ! --- inputs - integer, intent(in) :: IX, NLAY, NLP1,iovr_lw,iovr_sw + integer, intent(in) :: IX, NLAY, NLP1 integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 @@ -2922,7 +2878,7 @@ subroutine progcld6 & real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id, nf, iovrw + integer :: i, k, id, nf ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -2930,8 +2886,6 @@ subroutine progcld6 & ! !===> ... begin here -!!mz$ - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output$ ! do nf=1,nf_clds @@ -3120,7 +3074,7 @@ subroutine progcld6 & ! --- ... estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovrw == 3 ) then + if ( iovr == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -3139,7 +3093,6 @@ subroutine progcld6 & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & - & iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -3197,7 +3150,6 @@ subroutine progclduni & & ( plyr,plvl,tlyr,tvly,ccnd,ncnd, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, cldtot, & & effrl,effri,effrr,effrs,effr_in, & - & iovr_lw,iovr_sw, & !mz* $ & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) @@ -3292,9 +3244,6 @@ subroutine progclduni & real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk - !mz* for GFSv16 - integer, intent(in) :: iovr_lw, iovr_sw - ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds @@ -3305,7 +3254,6 @@ subroutine progclduni & integer, dimension(:,:), intent(out) :: mtop,mbot ! --- local variables: - integer :: iovrw real (kind=kind_phys), dimension(IX,NLAY) :: cldcnv, cwp, cip, & & crp, csp, rew, rei, res, rer real (kind=kind_phys), dimension(IX,NLAY,ncnd) :: cndf @@ -3327,9 +3275,6 @@ subroutine progclduni & ! enddo ! enddo ! -!mz* - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output - do k = 1, NLAY do i = 1, IX cldcnv(i,k) = 0.0 @@ -3499,7 +3444,7 @@ subroutine progclduni & !> -# Estimate clouds decorrelation length in km ! this is only a tentative test, need to consider change later - if ( iovrw == 3 ) then + if ( iovr == 3 ) then do i = 1, ix de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) enddo @@ -3518,7 +3463,6 @@ subroutine progclduni & ! --- inputs: & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & & IX,NLAY, & - & iovr_lw, iovr_sw, & ! --- outputs: & clds, mtop, mbot & & ) @@ -3554,7 +3498,7 @@ end subroutine progclduni !! @{ subroutine gethml & & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & ! --- inputs: - & IX, NLAY,iovr_lw,iovr_sw, & + & IX, NLAY, & & clds, mtop, mbot & ! --- outputs: & ) @@ -3610,7 +3554,7 @@ subroutine gethml & implicit none! ! --- inputs: - integer, intent(in) :: IX, NLAY,iovr_sw,iovr_lw + integer, intent(in) :: IX, NLAY real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & & cldtot, cldcnv, dz @@ -3626,14 +3570,11 @@ subroutine gethml & real (kind=kind_phys) :: pcur, pnxt, ccur, cnxt, alfa integer, dimension(IX):: idom, kbt1, kth1, kbt2, kth2 - integer :: i, k, id, id1, kstr, kend, kinc,iovrw + integer :: i, k, id, id1, kstr, kend, kinc ! !===> ... begin here ! -!mz* - iovrw = max( iovr_sw, iovr_lw ) !cld ovlp used for diag HML cld output - clds(:,:) = 0.0 do i = 1, IX @@ -3657,7 +3598,7 @@ subroutine gethml & kinc = 1 endif ! end_if_ivflip - if ( iovrw == 0 ) then ! random overlap + if ( iovr == 0 ) then ! random overlap do k = kstr, kend, kinc do i = 1, IX @@ -3676,7 +3617,7 @@ subroutine gethml & clds(i,4) = 1.0 - cl1(i) ! save total cloud enddo - elseif ( iovrw == 1 ) then ! max/ran overlap + elseif ( iovr == 1 ) then ! max/ran overlap do k = kstr, kend, kinc do i = 1, IX @@ -3700,7 +3641,7 @@ subroutine gethml & clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud enddo - elseif ( iovrw == 2 ) then ! maximum overlap all levels + elseif ( iovr == 2 ) then ! maximum overlap all levels cl1(:) = 0.0 @@ -3721,7 +3662,7 @@ subroutine gethml & clds(i,4) = cl1(i) ! save total cloud enddo - elseif ( iovrw == 3 ) then ! random if clear-layer divided, + elseif ( iovr == 3 ) then ! random if clear-layer divided, ! otherwise de-corrlength method do i = 1, ix dz1(i) = - dz(i,kstr) @@ -3807,7 +3748,7 @@ subroutine gethml & if (kth2(i) == 0) kbt2(i) = k kth2(i) = kth2(i) + 1 - if ( iovrw == 0 ) then + if ( iovr == 0 ) then cl2(i) = cl2(i) + ccur - cl2(i)*ccur else cl2(i) = max( cl2(i), ccur ) @@ -3889,7 +3830,7 @@ subroutine gethml & if (kth2(i) == 0) kbt2(i) = k kth2(i) = kth2(i) + 1 - if ( iovrw == 0 ) then + if ( iovr == 0 ) then cl2(i) = cl2(i) + ccur - cl2(i)*ccur else cl2(i) = max( cl2(i), ccur ) diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index 0596a987c..4ee7ca22b 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -243,14 +243,15 @@ module rrtmg_lw ! use physparam, only : ilwrate, ilwrgas, ilwcliq, ilwcice, & - & icldflg, ivflip + & isubclw, icldflg, iovrlw, ivflip, & + & kind_phys use physcons, only : con_g, con_cp, con_avgd, con_amd, & & con_amw, con_amo3 use mersenne_twister, only : random_setseed, random_number, & & random_stat !mz use machine, only : kind_phys, & - & im => kind_io4, rb => kind_phys + & im => kind_io4, rb => kind_phys use module_radlw_parameters ! @@ -391,13 +392,13 @@ subroutine rrtmg_lw_run & & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, & & icseed,aeraod,aerssa,sfemis,sfgtmp, & - & dzlyr,delpin,de_lgth, iovrlw, isubclw, & + & dzlyr,delpin,de_lgth, & & npts, nlay, nlp1, lprnt, cld_cf, lslwr, & & hlwc,topflx,sfcflx,cldtau, & ! --- outputs & HLW0,HLWB,FLXPRF, & ! --- optional & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & & cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, & - & cld_od, mpirank,mpiroot,errmsg, errflg & + & cld_od, errmsg, errflg & & ) ! ==================== defination of variables ==================== ! @@ -494,7 +495,7 @@ subroutine rrtmg_lw_run & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud (used for isubclw>0 only) ! ! =3: decorrelation-length overlap (for isubclw>0 only) ! -! =4: exponential overlap cloud +! =4: exponential overlapping cloud ! ! ivflip - control flag for vertical index direction ! ! =0: vertical index from toa to surface ! ! =1: vertical index from surface to toa ! @@ -574,9 +575,6 @@ subroutine rrtmg_lw_run & integer, intent(in) :: icseed(npts) logical, intent(in) :: lprnt - integer, intent(in) :: mpiroot - integer, intent(in) :: mpirank - integer, intent(in) :: iovrlw,isubclw real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: plvl, & & tlvl @@ -648,7 +646,7 @@ subroutine rrtmg_lw_run & ! mz* - Add height of each layer for exponential-random cloud overlap ! This will be derived below from the dzlyr in each layer real (kind=kind_phys), dimension( npts,nlay ) :: hgt - real (kind=kind_phys):: dzsum + real (kind=kind_phys) :: dzsum real (kind=kind_phys), dimension(0:nlp1) :: cldfrc @@ -678,8 +676,8 @@ subroutine rrtmg_lw_run & !mz rtrnmc_mcica real (kind=kind_phys), dimension(nlay,ngptlw) :: taut !mz* Atmosphere/clouds - cldprop - real(kind=kind_phys), dimension(ngptlw,nlay) :: cldfmc, & - & cldfmc_save ! cloud fraction [mcica] + real(kind=kind_phys), dimension(ngptlw,nlay) :: cldfmc, & + & cldfmc_save ! cloud fraction [mcica] ! Dimensions: (ngptlw,nlay) real(kind=kind_phys), dimension(ngptlw,nlay) :: ciwpmc ! in-cloud ice water path [mcica] ! Dimensions: (ngptlw,nlay) @@ -734,10 +732,9 @@ subroutine rrtmg_lw_run & !mz* ! For passing in cloud physical properties; cloud optics parameterized ! in RRTMG: - inflglw = 2 - iceflglw = 3 - liqflglw = 1 - + inflglw = 2 + iceflglw = 3 + liqflglw = 1 istart = 1 iend = 16 iout = 0 @@ -814,7 +811,7 @@ subroutine rrtmg_lw_run & stemp = sfgtmp(iplon) ! surface ground temp if (iovrlw == 3) delgth= de_lgth(iplon) ! clouds decorr-length -! mz*: HWRF practice +! mz*: HWRF if (iovrlw == 4 ) then !Add layer height needed for exponential (icld=4) and @@ -839,25 +836,6 @@ subroutine rrtmg_lw_run & enddo enddo - -! if(mpirank==mpiroot) then -! write(0,*) 'mcica_subcol_lw: max/min(cld_cf)=', & -! & maxval(cld_cf),minval(cld_cf) -! write(0,*) 'mcica_subcol_lw: max/min(cld_iwp)=', & -! & maxval(cld_iwp),minval(cld_iwp) -! write(0,*) 'mcica_subcol_lw: max/min(cld_lwp)=', & -! & maxval(cld_lwp),minval(cld_lwp) -! write(0,*) 'mcica_subcol_lw: max/min(cld_swp)=', & -! & maxval(cld_swp),minval(cld_swp) -! write(0,*) 'mcica_subcol_lw: max/min(cld_ref_ice)=', & -! & maxval(cld_ref_ice),minval(cld_ref_ice) -! write(0,*) 'mcica_subcol_lw: max/min(cld_ref_snow)=', & -! & maxval(cld_ref_snow),minval(cld_ref_snow) -! write(0,*) 'mcica_subcol_lw: max/min(cld_ref_liq)=', & -! & maxval(cld_ref_liq),minval(cld_ref_liq) - -! endif - call mcica_subcol_lw(1, iplon, nlay, iovrlw, permuteseed, & & irng, plyr, hgt, & & cld_cf, cld_iwp, cld_lwp,cld_swp, & @@ -867,26 +845,6 @@ subroutine rrtmg_lw_run & & ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, & & resnmcl, taucmcl) -!mz -! if(mpirank==mpiroot) then -! write(0,*) 'mcica_subcol_lw: max/min(cldfmcl)=', & -! & maxval(cldfmcl),minval(cldfmcl) -! write(0,*) 'mcica_subcol_lw: max/min(ciwpmcl)=', & -! & maxval(ciwpmcl),minval(ciwpmcl) -! write(0,*) 'mcica_subcol_lw: max/min(clwpmcl)=', & -! & maxval(clwpmcl),minval(clwpmcl) -! write(0,*) 'mcica_subcol_lw: max/min(cswpmcl)=', & -! & maxval(cswpmcl),minval(cswpmcl) -! write(0,*) 'mcica_subcol_lw: max/min(reicmcl)=', & -! & maxval(reicmcl),minval(reicmcl) -! write(0,*) 'mcica_subcol_lw: max/min(relqmcl)=', & -! & maxval(relqmcl),minval(relqmcl) -! write(0,*) 'mcica_subcol_lw: max/min(resnmcl)=', & -! & maxval(resnmcl),minval(resnmcl) -! write(0,*) 'mcica_subcol_lw: max/min(taucmcl)=', & -! & maxval(taucmcl),minval(taucmcl) - -! endif endif !mz* end @@ -977,7 +935,6 @@ subroutine rrtmg_lw_run & !> -# Read cloud optical properties. if (ilwcliq > 0) then ! use prognostic cloud method -!mz: GFS operational do k = 1, nlay k1 = nlp1 - k cldfrc(k)= cld_cf(iplon,k1) @@ -990,8 +947,8 @@ subroutine rrtmg_lw_run & cda3(k) = cld_swp(iplon,k1) cda4(k) = cld_ref_snow(iplon,k1) enddo - ! transfer - if (iovrlw .eq. 4) then !mz HWRF + ! HWRF RRMTG + if (iovrlw == 4) then !mz HWRF do k = 1, nlay k1 = nlp1 - k do ig = 1, ngptlw @@ -1102,8 +1059,6 @@ subroutine rrtmg_lw_run & enddo if (ilwcliq > 0) then ! use prognostic cloud method -!mz* - !mz calculate input for cldprop do k = 1, nlay cldfrc(k)= cld_cf(iplon,k) clwp(k) = cld_lwp(iplon,k) @@ -1115,7 +1070,7 @@ subroutine rrtmg_lw_run & cda3(k) = cld_swp(iplon,k) cda4(k) = cld_ref_snow(iplon,k) enddo - if (iovrlw .eq. 4) then + if (iovrlw == 4) then !mz* Move incoming GCM cloud arrays to RRTMG cloud arrays. !For GCM input, incoming reicmcl is defined based on selected !ice parameterization (inflglw) @@ -1209,7 +1164,7 @@ subroutine rrtmg_lw_run & if ( lcf1 ) then !mz* for HWRF, save cldfmc with mcica - if (iovrlw .eq.4) then + if (iovrlw == 4) then do k = 1, nlay do ig = 1, ngptlw cldfmc_save(ig,k)=cldfmc (ig,k) @@ -1220,12 +1175,12 @@ subroutine rrtmg_lw_run & call cldprop & ! --- inputs: & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & - & nlay, nlp1, ipseed(iplon), dz, delgth,iovrlw, isubclw, & + & nlay, nlp1, ipseed(iplon), dz, delgth, & ! --- outputs: & cldfmc, taucld & & ) - if (iovrlw .eq.4) then + if (iovrlw == 4) then !mz for HWRF, still using mcica cldfmc do k = 1, nlay do ig = 1, ngptlw @@ -1253,30 +1208,13 @@ subroutine rrtmg_lw_run & taucld = f_zero endif -!!mz* HWRF practice, calculate taucmc with mcica - if (iovrlw .eq.4) then - !mz* HWRF practice, calculate taucmc -! if(mpirank==mpiroot) then -! write(0,*) 'bfe cldprmc: nlay,inflglw,iceflglw,liqflglw',& -! & nlay,inflglw,iceflglw,liqflglw -! write(0,*) 'bfe cldprmc: max/min(taucmc)=', & -! & maxval(taucmc),minval(taucmc) -! endif - - call cldprmc(nlay, inflglw, iceflglw, liqflglw, & - & cldfmc, ciwpmc, & - & clwpmc, cswpmc, reicmc, relqmc, resnmc, & - & ncbands, taucmc) - endif -! if(mpirank==mpiroot) then -! write(0,*) 'aft cldprmc: ncbands', ncbands -! write(0,*) 'aft cldprmc: max/min(taucmc)=', & -! & maxval(taucmc),minval(taucmc) -! endif - - -!mz* end - +!mz* HWRF: calculate taucmc with mcica + if (iovrlw == 4) then + call cldprmc(nlay, inflglw, iceflglw, liqflglw, & + & cldfmc, ciwpmc, & + & clwpmc, cswpmc, reicmc, relqmc, resnmc, & + & ncbands, taucmc) + endif ! if (lprnt) then ! print *,' after cldprop' @@ -1382,51 +1320,10 @@ subroutine rrtmg_lw_run & & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & & ) - endif ! end if_iovrlw_block - - else - -! if(iovrlw == 4) then + endif ! end if_iovrlw_block -!mz*HWRF practice -! -! pz(0)=plyr(iplon,1) -! do k= 1,nlay -! pz(k)=plvl(iplon,k+1) -! enddo - -! do k = 0, nlay -! do j = 1, nbands -! ! taut (k,j) = tautot(j,k) -! planklay(k,j) = pklay(j,k) -! planklev(k,j) = pklev(j,k) -! enddo -! enddo + else -! do k = 1, nlay -! do ig = 1, ngptlw -! fracs_r(k,ig) = fracs (ig,k) -! taut(k,ig)= tautot(ig,k) -! enddo -! enddo - -! call rtrnmc_mcica(nlay, istart, iend, iout, pz, & -! & semiss, ncbands, & -! & cldfmc, taucmc, planklay, planklev, & !plankbnd, & -! & pwvcm, fracs_r, taut, & -! & totuflux, totdflux, htr, & -! & totuclfl, totdclfl, htrcl ) - -! if(mpirank==mpiroot) then -! write(0,*) 'rtrnmc_mcica: max/min(htr)=', & -! & maxval(htr),minval(htr) -! endif - - -! else -!mz*end - -!mz*taucld(non-mcica) call rtrnmc & ! --- inputs: & ( semiss,delp,cldfmc,taucld,tautot,pklay,pklev, & @@ -1434,12 +1331,6 @@ subroutine rrtmg_lw_run & ! --- outputs: & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & & ) -! if(mpirank==mpiroot) then -! write(0,*) 'rtrnmc: max/min(htr)=', & -! & maxval(htr),minval(htr) -! endif - -! endif !end if_iovrlw block endif ! end if_isubclw_block @@ -1546,7 +1437,7 @@ end subroutine rrtmg_lw_finalize !!\section rlwinit_gen rlwinit General Algorithm !! @{ subroutine rlwinit & - & (iovrlw,isubclw, me ) ! --- inputs + & ( me ) ! --- inputs ! --- outputs: (none) ! =================== program usage description =================== ! @@ -1615,8 +1506,7 @@ subroutine rlwinit & ! ====================== end of description block ================= ! ! --- inputs: - integer, intent(in) :: me,isubclw - integer, intent(inout) :: iovrlw + integer, intent(in) :: me ! --- outputs: none @@ -1634,9 +1524,7 @@ subroutine rlwinit & print *,' *** Error in specification of cloud overlap flag', & & ' IOVRLW=',iovrlw,' in RLWINIT !!' stop -!mz -! elseif ( iovrlw>=2 .and. isubclw==0 ) then - elseif ( (iovrlw.eq.2 .or. iovrlw.eq.3).and. isubclw==0 ) then + elseif ( (iovrlw==2 .or. iovrlw==3) .and. isubclw==0 ) then if (me == 0) then print *,' *** IOVRLW=',iovrlw,' is not available for', & & ' ISUBCLW=0 setting!!' @@ -1780,7 +1668,7 @@ end subroutine rlwinit !> @{ subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & nlay, nlp1, ipseed, dz, de_lgth,iovrlw,isubclw, & + & nlay, nlp1, ipseed, dz, de_lgth, & & cldfmc, taucld & ! --- outputs & ) @@ -1880,7 +1768,7 @@ subroutine cldprop & use module_radlw_cldprlw ! --- inputs: - integer, intent(in) :: nlay, nlp1, ipseed,iovrlw,isubclw + integer, intent(in) :: nlay, nlp1, ipseed real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cfrac real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & @@ -2044,7 +1932,7 @@ subroutine cldprop & endif lab_if_ilwcliq -!> -# if isubclw > 0, call mcica_subcol() to distribute +!> -# if physparam::isubclw > 0, call mcica_subcol() to distribute !! cloud properties to each g-point. if ( isubclw > 0 ) then ! mcica sub-col clouds approx @@ -2060,7 +1948,7 @@ subroutine cldprop & call mcica_subcol & ! --- inputs: - & ( cldf, nlay, ipseed, dz, de_lgth, iovrlw, & + & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- output: & lcloudy & & ) @@ -2094,7 +1982,7 @@ end subroutine cldprop !!\section mcica_subcol_gen mcica_subcol General Algorithm !! @{ subroutine mcica_subcol & - & ( cldf, nlay, ipseed, dz, de_lgth, iovrlw, & ! --- inputs + & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- inputs & lcloudy & ! --- outputs & ) @@ -2122,7 +2010,7 @@ subroutine mcica_subcol & implicit none ! --- inputs: - integer, intent(in) :: nlay, ipseed, iovrlw + integer, intent(in) :: nlay, ipseed real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz real (kind=kind_phys), intent(in) :: de_lgth @@ -2473,11 +2361,6 @@ subroutine setcoef & ! --- ... begin spectral band loop do i = 1, nbands -!mz* -! plankbnd(iband) = semiss(iband) * & -! (totplnk(indbound,iband) + tbndfrac * dbdtlev) -!mz - pklay(i,k) = delwave(i) * (totplnk(indlay,i) + tlyrfr & & * (totplnk(indlay+1,i) - totplnk(indlay,i)) ) pklev(i,k) = delwave(i) * (totplnk(indlev,i) + tlvlfr & diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 6fc58d635..da7496f87 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -207,22 +207,6 @@ kind = kind_phys intent = in optional = F -[iovrlw] - standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation - long_name = control flag for cloud overlapping method for LW - units = flag - dimensions = () - type = integer - intent = in - optional = F -[isubclw] - standard_name = flag_for_lw_clouds_sub_grid_approximation - long_name = flag for lw clouds sub-grid approximation - units = flag - dimensions = () - type = integer - intent = in - optional = F [npts] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -387,22 +371,6 @@ kind = kind_phys intent = in optional = T -[mpirank] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index cd7705d3f..51512835c 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -268,8 +268,8 @@ !! code from aer inc. module rrtmg_sw ! - use physparam, only : iswrate, iswrgas, iswcice, & !mz: iswcliq - & icldflg, ivflip, & + use physparam, only : iswrate, iswrgas, iswcliq, iswcice, & + & isubcsw, icldflg, iovrsw, ivflip, & & iswmode use physcons, only : con_g, con_cp, con_avgd, con_amd, & & con_amw, con_amo3 @@ -369,7 +369,7 @@ module rrtmg_sw ! --- public accessable subprograms public rrtmg_sw_init, rrtmg_sw_run, rrtmg_sw_finalize, rswinit, & - & kissvec, generate_stochastic_clouds_sw,mcica_subcol_sw + & kissvec, generate_stochastic_clouds_sw, mcica_subcol_sw ! ================= @@ -470,7 +470,7 @@ subroutine rrtmg_sw_run & & icseed, aeraod, aerssa, aerasy, & & sfcalb_nir_dir, sfcalb_nir_dif, & & sfcalb_uvis_dir, sfcalb_uvis_dif, & - & dzlyr,delpin,de_lgth, iswcliq, iovrsw, isubcsw, & + & dzlyr,delpin,de_lgth, & & cosz,solcon,NDAY,idxday, & & npts, nlay, nlp1, lprnt, & & cld_cf, lsswr, & @@ -478,7 +478,8 @@ subroutine rrtmg_sw_run & & HSW0,HSWB,FLXPRF,FDNCMP, & ! --- optional & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & & cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, & - & cld_od, cld_ssa, cld_asy,mpirank,mpiroot, errmsg, errflg ) + & cld_od, cld_ssa, cld_asy, errmsg, errflg & + & ) ! ==================== defination of variables ==================== ! ! ! @@ -597,7 +598,7 @@ subroutine rrtmg_sw_run & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! ! =3: decorrelation-length overlap clouds ! -! =4: exponential overlapping clouds +! =4: exponential overlapping clouds ! ! ivflip - control flg for direction of vertical index ! ! =0: index from toa to surface ! ! =1: index from surface to toa ! @@ -657,7 +658,6 @@ subroutine rrtmg_sw_run & ! --- inputs: integer, intent(in) :: npts, nlay, nlp1, NDAY - integer, intent(in) :: iswcliq,iovrsw,isubcsw integer, dimension(:), intent(in) :: idxday, icseed @@ -696,7 +696,6 @@ subroutine rrtmg_sw_run & real (kind=kind_phys), intent(in) :: cosz(npts), solcon, & & de_lgth(npts) - integer, intent(in) :: mpirank,mpiroot ! --- outputs: real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hswc real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & @@ -822,7 +821,7 @@ subroutine rrtmg_sw_run & integer, dimension(npts) :: ipseed integer, dimension(nlay) :: indfor, indself, jp, jt, jt1 - integer :: i, ib, ipt, j1, k, kk, laytrop, mb,ig + integer :: i, ib, ipt, j1, k, kk, laytrop, mb, ig integer :: inflgsw, iceflgsw, liqflgsw integer :: irng, permuteseed ! @@ -834,13 +833,13 @@ subroutine rrtmg_sw_run & ! Select cloud liquid and ice optics parameterization options ! For passing in cloud optical properties directly: -! inflgsw = 0 -! iceflgsw = 0 -! liqflgsw = 0 +! inflgsw = 0 +! iceflgsw = 0 +! liqflgsw = 0 ! For passing in cloud physical properties; cloud optics parameterized in RRTMG: - inflgsw = 2 - iceflgsw = 3 - liqflgsw = 1 + inflgsw = 2 + iceflgsw = 3 + liqflgsw = 1 ! if (.not. lsswr) return if (nday <= 0) return @@ -942,7 +941,7 @@ subroutine rrtmg_sw_run & albdf(2) = sfcalb_uvis_dif(j1) -! mz*: HWRF practice +! mz*: HWRF if (iovrsw == 4 ) then @@ -973,25 +972,6 @@ subroutine rrtmg_sw_run & enddo enddo -!mz -! if(mpirank==mpiroot) then -! write(0,*) 'mcica_subcol_sw: max/min(cld_cf)=', & -! & maxval(cld_cf),minval(cld_cf) -! write(0,*) 'mcica_subcol_sw: max/min(cld_iwp)=', & -! & maxval(cld_iwp),minval(cld_iwp) -! write(0,*) 'mcica_subcol_sw: max/min(cld_lwp)=', & -! & maxval(cld_lwp),minval(cld_lwp) -! write(0,*) 'mcica_subcol_sw: max/min(cld_swp)=', & -! & maxval(cld_swp),minval(cld_swp) -! write(0,*) 'mcica_subcol_sw: max/min(cld_ref_ice)=', & -! & maxval(cld_ref_ice),minval(cld_ref_ice) -! write(0,*) 'mcica_subcol_sw: max/min(cld_ref_snow)=', & -! & maxval(cld_ref_snow),minval(cld_ref_snow) -! write(0,*) 'mcica_subcol_sw: max/min(cld_ref_liq)=', & -! & maxval(cld_ref_liq),minval(cld_ref_liq) -! endif - - call mcica_subcol_sw (1, j1, nlay, iovrsw, permuteseed, & & irng, plyr, hgt, & & cld_cf, cld_iwp, cld_lwp,cld_swp, & @@ -999,25 +979,7 @@ subroutine rrtmg_sw_run & & cld_ref_snow, taucld3,ssacld3,asmcld3,fsfcld3, & & cldfmcl, ciwpmcl, clwpmcl, cswpmcl, & !--output & reicmcl, relqmcl, resnmcl, & - & taucmcl, ssacmcl, asmcmcl, fsfcmcl) - -!mz -! if(mpirank==mpiroot) then -! write(0,*) 'mcica_subcol_sw: max/min(cldfmcl)=', & -! & maxval(cldfmcl),minval(cldfmcl) -! write(0,*) 'mcica_subcol_sw: max/min(ciwpmcl)=', & -! & maxval(ciwpmcl),minval(ciwpmcl) -! write(0,*) 'mcica_subcol_sw: max/min(clwpmcl)=', & -! & maxval(clwpmcl),minval(clwpmcl) -! write(0,*) 'mcica_subcol_sw: max/min(cswpmcl)=', & -! & maxval(cswpmcl),minval(cswpmcl) -! write(0,*) 'mcica_subcol_sw: max/min(reicmcl)=', & -! & maxval(reicmcl),minval(reicmcl) -! write(0,*) 'mcica_subcol_sw: max/min(relqmcl)=', & -! & maxval(relqmcl),minval(relqmcl) -! write(0,*) 'mcica_subcol_sw: max/min(resnmcl)=', & -! & maxval(resnmcl),minval(resnmcl) -! endif + & taucmcl, ssacmcl, asmcmcl, fsfcmcl) endif !mz* end @@ -1093,8 +1055,6 @@ subroutine rrtmg_sw_run & !> -# Read cloud optical properties from 'clouds'. if (iswcliq > 0) then ! use prognostic cloud method -!mz:GFS operational - !if (iovrsw .eq. 1) then do k = 1, nlay kk = nlp1 - k cfrac(k) = cld_cf(j1,kk) ! cloud fraction @@ -1107,7 +1067,7 @@ subroutine rrtmg_sw_run & cdat3(k) = cld_swp(j1,kk) ! cloud snow path cdat4(k) = cld_ref_snow(j1,kk) ! snow partical effctive radius enddo - if (iovrsw .eq. 4) then !mz* HWRF + if (iovrsw == 4) then !mz* HWRF do k = 1, nlay kk = nlp1 - k do ig = 1, ngptsw @@ -1128,7 +1088,7 @@ subroutine rrtmg_sw_run & resnmc(k) = resnmcl(j1,kk) endif enddo - endif + endif else ! use diagnostic cloud method do k = 1, nlay kk = nlp1 - k @@ -1210,7 +1170,6 @@ subroutine rrtmg_sw_run & enddo if (iswcliq > 0) then ! use prognostic cloud method - !if (iovrsw .eq. 1) then !mz* GFS operational do k = 1, nlay cfrac(k) = cld_cf(j1,k) ! cloud fraction cliqp(k) = cld_lwp(j1,k) ! cloud liq path @@ -1222,7 +1181,7 @@ subroutine rrtmg_sw_run & cdat3(k) = cld_swp(j1,k) ! cloud snow path cdat4(k) = cld_ref_snow(j1,k) ! snow partical effctive radius enddo - if (iovrsw .eq. 4) then !mz* HWRF + if (iovrsw == 4) then !mz* HWRF !mz* Move incoming GCM cloud arrays to RRTMG cloud arrays. !For GCM input, incoming reicmcl is defined based on selected !ice parameterization (inflglw) @@ -1269,8 +1228,7 @@ subroutine rrtmg_sw_run & do k = 1, nlay zcf0 = zcf0 * (f_one - cfrac(k)) enddo -!mz else if (iovrsw == 1) then ! max/ran overlapping - else if (iovrsw == 1.or. iovrsw == 4) then ! mz* also exponential overlapping + else if (iovrsw == 1 .or. iovrsw == 4) then ! max/ra/exp overlapping do k = 1, nlay if (cfrac(k) > ftiny) then ! cloudy layer zcf1 = min ( zcf1, f_one-cfrac(k) ) @@ -1280,7 +1238,7 @@ subroutine rrtmg_sw_run & endif enddo zcf0 = zcf0 * zcf1 - else if (iovrsw >= 2 .and. iovrsw .ne. 4) then + else if (iovrsw >= 2 .and. iovrsw /= 4) then do k = 1, nlay zcf0 = min ( zcf0, f_one-cfrac(k) ) ! used only as clear/cloudy indicator enddo @@ -1292,13 +1250,11 @@ subroutine rrtmg_sw_run & !> -# For cloudy sky column, call cldprop() to compute the cloud !! optical properties for each cloudy layer. - - !if (iovrsw .eq. 1 ) then if (zcf1 > f_zero) then ! cloudy sky column !mz* for HWRF, save cldfmc with mcica - if (iovrsw .eq.4) then + if (iovrsw == 4) then do k = 1, nlay do ig = 1, ngptsw cldfmc_save(k,ig)=cldfmc (k,ig) @@ -1306,16 +1262,15 @@ subroutine rrtmg_sw_run & enddo endif - call cldprop & ! --- inputs: & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & - & zcf1, nlay, ipseed(j1), dz, delgth,iswcliq,iovrsw,isubcsw, & + & zcf1, nlay, ipseed(j1), dz, delgth, & ! --- outputs: - & taucw, ssacw, asycw, cldfrc, cldfmc & !mz: cldfmc(k,ig) + & taucw, ssacw, asycw, cldfrc, cldfmc & & ) - if (iovrsw .eq.4) then + if (iovrsw == 4) then !mz for HWRF, still using mcica cldfmc do k = 1, nlay do ig = 1, ngptsw @@ -1350,20 +1305,6 @@ subroutine rrtmg_sw_run & enddo endif ! end if_zcf1_block -! if (iovrsw .eq. 4) then !mz* HWRF -!! For cloudy atmosphere, use cldprop to set cloud optical properties based on -!! input cloud physical properties. Select method based on choices described -!! in cldprop. Cloud fraction, water path, liquid droplet and ice particle -!! effective radius must be passed in cldprop. Cloud fraction and cloud -!! optical properties are transferred to rrtmg_sw arrays in cldprop. - -! call cldprmc_sw(nlayers, inflg, iceflg, liqflg, cldfmc, & -! ciwpmc, clwpmc, cswpmc, reicmc, relqmc, resnmc, & -! taormc, taucmc, ssacmc, asmcmc, fsfcmc) -! icpr = 1 - -! endif - !> -# Call setcoef() to compute various coefficients needed in !! radiative transfer calculations. call setcoef & @@ -1374,33 +1315,6 @@ subroutine rrtmg_sw_run & & selffac,selffrac,indself,forfac,forfrac,indfor & & ) -!mz* HWRF clouds -! if(iovrsw .eq.0) then -! zcldfmc(:,:) = 0._rb -! ztaucmc(:,:) = 0._rb -! ztaormc(:,:) = 0._rb -! zasycmc(:,:) = 0._rb -! zomgcmc(:,:) = 1._rb - -! elseif (iovrsw.eq.4) then -! do i=1,nlayers -! do ig=1,ngptsw -! zcldfmc(i,ig) = cldfmc(ig,i) -! ztaucmc(i,ig) = taucmc(ig,i) -! ztaormc(i,ig) = taormc(ig,i) -! zasycmc(i,ig) = asmcmc(ig,i) -! zomgcmc(i,ig) = ssacmc(ig,i) -! enddo -! enddo -!Aerosol -!mz* no aerosol at this moment (iaer .eq.0) -! ztaua(:,:) = 0._rb -! zasya(:,:) = 0._rb -! zomga(:,:) = 1._rb - -! endif -!mz* - !> -# Call taumol() to calculate optical depths for gaseous absorption !! and rayleigh scattering call taumol & @@ -1431,8 +1345,6 @@ subroutine rrtmg_sw_run & & ) else ! use mcica cloud scheme - -!mz if(iovrsw .eq. 1 ) then ! mz*:GFS operational call spcvrtm & ! --- inputs: @@ -1445,19 +1357,6 @@ subroutine rrtmg_sw_run & & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & & ) -!mz else if (iovrsw .eq.4 ) then -! call spcvmc_sw & -! (nlayers, istart, iend, icpr, iout, & -! pavel, tavel, pz, tz, tbound, albdif, albdir, & -! zcldfmc, ztaucmc, zasycmc, zomgcmc, ztaormc, & -! ztaua, zasya, zomga, cossza, coldry, wkl, adjflux, & -! laytrop, layswtch, laylow, jp, jt, jt1, & -! co2mult, colch4, colco2, colh2o, colmol, coln2o, colo2, colo3, & -! fac00, fac01, fac10, fac11, & -! selffac, selffrac, indself, forfac, forfrac, indfor, & -! zbbfd, zbbfu, zbbcd, zbbcu, zuvfd, zuvcd, znifd, znicd, & -! zbbfddir, zbbcddir, zuvfddir, zuvcddir, znifddir, znicddir) - endif !> -# Save outputs. @@ -1634,7 +1533,7 @@ end subroutine rrtmg_sw_finalize !! @{ !----------------------------------- subroutine rswinit & - & (iswcliq,iovrsw,isubcsw, me ) ! --- inputs: + & ( me ) ! --- inputs: ! --- outputs: (none) ! =================== program usage description =================== ! @@ -1690,8 +1589,7 @@ subroutine rswinit & ! ====================== end of description block ================= ! ! --- inputs: - integer, intent(in) :: me,isubcsw,iswcliq - integer, intent(inout) :: iovrsw + integer, intent(in) :: me ! --- outputs: none @@ -1838,7 +1736,7 @@ end subroutine rswinit !----------------------------------- subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & cf1, nlay, ipseed, dz, delgth,iswcliq,iovrsw, isubcsw, & + & cf1, nlay, ipseed, dz, delgth, & & taucw, ssacw, asycw, cldfrc, cldfmc & ! --- output & ) @@ -1853,7 +1751,7 @@ subroutine cldprop & ! ! ! inputs: size ! ! cfrac - real, layer cloud fraction nlay ! -! ..... for iswcliq > 0 (prognostic cloud sckeme) - - - ! +! ..... for iswcliq > 0 (prognostic cloud scheme) - - - ! ! cliqp - real, layer in-cloud liq water path (g/m**2) nlay ! ! reliq - real, mean eff radius for liq cloud (micron) nlay ! ! cicep - real, layer in-cloud ice water path (g/m**2) nlay ! @@ -1862,7 +1760,7 @@ subroutine cldprop & ! cdat2 - real, effective radius for rain drop (micron) nlay ! ! cdat3 - real, layer snow flake water path(g/m**2) nlay ! ! cdat4 - real, mean eff radius for snow flake(micron) nlay ! -! ..... for iswcliq = 0 (diagnostic cloud sckeme) - - - ! +! ..... for iswcliq = 0 (diagnostic cloud scheme) - - - ! ! cdat1 - real, layer cloud optical depth nlay ! ! cdat2 - real, layer cloud single scattering albedo nlay ! ! cdat3 - real, layer cloud asymmetry factor nlay ! @@ -1924,7 +1822,7 @@ subroutine cldprop & use module_radsw_cldprtb ! --- inputs: - integer, intent(in) :: nlay, ipseed,iswcliq,iovrsw,isubcsw + integer, intent(in) :: nlay, ipseed real (kind=kind_phys), intent(in) :: cf1, delgth real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & @@ -2170,8 +2068,7 @@ subroutine cldprop & !> -# if physparam::isubcsw > 0, call mcica_subcol() to distribute !! cloud properties to each g-point. -!mz if ( isubcsw > 0 ) then ! mcica sub-col clouds approx - if ( isubcsw > 0 .and. iovrsw .ne. 4 ) then ! mcica sub-col clouds approx + if ( isubcsw > 0 .and. iovrsw /= 4 ) then ! mcica sub-col clouds approx cldf(:) = cfrac(:) where (cldf(:) < ftiny) @@ -2182,7 +2079,7 @@ subroutine cldprop & call mcica_subcol & ! --- inputs: - & ( cldf, nlay, ipseed, dz, delgth, iovrsw, & + & ( cldf, nlay, ipseed, dz, delgth, & ! --- outputs: & lcloudy & & ) @@ -2222,7 +2119,7 @@ end subroutine cldprop !> @{ ! ---------------------------------- subroutine mcica_subcol & - & ( cldf, nlay, ipseed, dz, de_lgth,iovrsw, & ! --- inputs + & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- inputs & lcloudy & ! --- outputs & ) @@ -2253,7 +2150,7 @@ subroutine mcica_subcol & implicit none ! --- inputs: - integer, intent(in) :: nlay, ipseed, iovrsw + integer, intent(in) :: nlay, ipseed real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz real (kind=kind_phys), intent(in) :: de_lgth @@ -2268,7 +2165,7 @@ subroutine mcica_subcol & type (random_stat) :: stat ! for thread safe random generator - integer :: k, n, k1, ig + integer :: k, n, k1 ! !===> ... begin here ! diff --git a/physics/radsw_main.f b/physics/radsw_main.f deleted file mode 100644 index 30bc58bba..000000000 --- a/physics/radsw_main.f +++ /dev/null @@ -1,5472 +0,0 @@ -!> \file radsw_main.f -!! This file contains NCEP's modifications of the rrtmg-sw radiation -!! code from AER. - -! ============================================================== !!!!! -! sw-rrtm3 radiation package description !!!!! -! ============================================================== !!!!! -! ! -! this package includes ncep's modifications of the rrtm-sw radiation ! -! code from aer inc. ! -! ! -! the sw-rrtm3 package includes these parts: ! -! ! -! 'radsw_rrtm3_param.f' ! -! 'radsw_rrtm3_datatb.f' ! -! 'radsw_rrtm3_main.f' ! -! ! -! the 'radsw_rrtm3_param.f' contains: ! -! ! -! 'module_radsw_parameters' -- band parameters set up ! -! ! -! the 'radsw_rrtm3_datatb.f' contains: ! -! ! -! 'module_radsw_ref' -- reference temperature and pressure ! -! 'module_radsw_cldprtb' -- cloud property coefficients table ! -! 'module_radsw_sflux' -- spectral distribution of solar flux ! -! 'module_radsw_kgbnn' -- absorption coeffients for 14 ! -! bands, where nn = 16-29 ! -! ! -! the 'radsw_rrtm3_main.f' contains: ! -! ! -! 'rrtmg_sw' -- main sw radiation transfer ! -! ! -! in the main module 'rrtmg_sw' there are only two ! -! externally callable subroutines: ! -! ! -! 'swrad' -- main sw radiation routine ! -! inputs: ! -! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, ! -! clouds,icseed,aerosols,sfcalb, ! -! dzlyr,delpin,de_lgth, ! -! cosz,solcon,NDAY,idxday, ! -! npts, nlay, nlp1, lprnt, ! -! outputs: ! -! hswc,topflx,sfcflx,cldtau, ! -!! optional outputs: ! -! HSW0,HSWB,FLXPRF,FDNCMP) ! -! ) ! -! ! -! 'rswinit' -- initialization routine ! -! inputs: ! -! ( me ) ! -! outputs: ! -! (none) ! -! ! -! all the sw radiation subprograms become contained subprograms ! -! in module 'rrtmg_sw' and many of them are not directly ! -! accessable from places outside the module. ! -! ! -! derived data type constructs used: ! -! ! -! 1. radiation flux at toa: (from module 'module_radsw_parameters') ! -! topfsw_type - derived data type for toa rad fluxes ! -! upfxc total sky upward flux at toa ! -! dnfxc total sky downward flux at toa ! -! upfx0 clear sky upward flux at toa ! -! ! -! 2. radiation flux at sfc: (from module 'module_radsw_parameters') ! -! sfcfsw_type - derived data type for sfc rad fluxes ! -! upfxc total sky upward flux at sfc ! -! dnfxc total sky downward flux at sfc ! -! upfx0 clear sky upward flux at sfc ! -! dnfx0 clear sky downward flux at sfc ! -! ! -! 3. radiation flux profiles(from module 'module_radsw_parameters') ! -! profsw_type - derived data type for rad vertical prof ! -! upfxc level upward flux for total sky ! -! dnfxc level downward flux for total sky ! -! upfx0 level upward flux for clear sky ! -! dnfx0 level downward flux for clear sky ! -! ! -! 4. surface component fluxes(from module 'module_radsw_parameters' ! -! cmpfsw_type - derived data type for component sfc flux ! -! uvbfc total sky downward uv-b flux at sfc ! -! uvbf0 clear sky downward uv-b flux at sfc ! -! nirbm surface downward nir direct beam flux ! -! nirdf surface downward nir diffused flux ! -! visbm surface downward uv+vis direct beam flx ! -! visdf surface downward uv+vis diffused flux ! -! ! -! external modules referenced: ! -! ! -! 'module physparam' ! -! 'module physcons' ! -! 'mersenne_twister' ! -! ! -! compilation sequence is: ! -! ! -! 'radsw_rrtm3_param.f' ! -! 'radsw_rrtm3_datatb.f' ! -! 'radsw_rrtm3_main.f' ! -! ! -! and all should be put in front of routines that use sw modules ! -! ! -!==========================================================================! -! ! -! the original program declarations: ! -! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! ! -! Copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). ! -! This software may be used, copied, or redistributed as long as it is ! -! not sold and this copyright notice is reproduced on each copy made. ! -! This model is provided as is without any express or implied warranties. ! -! (http://www.rtweb.aer.com/) ! -! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! ! -! ************************************************************************ ! -! ! -! rrtmg_sw ! -! ! -! ! -! a rapid radiative transfer model ! -! for the solar spectral region ! -! atmospheric and environmental research, inc. ! -! 131 hartwell avenue ! -! lexington, ma 02421 ! -! ! -! eli j. mlawer ! -! jennifer s. delamere ! -! michael j. iacono ! -! shepard a. clough ! -! ! -! ! -! email: miacono@aer.com ! -! email: emlawer@aer.com ! -! email: jdelamer@aer.com ! -! ! -! the authors wish to acknowledge the contributions of the ! -! following people: steven j. taubman, patrick d. brown, ! -! ronald e. farren, luke chen, robert bergstrom. ! -! ! -! ************************************************************************ ! -! ! -! references: ! -! (rrtm_sw/rrtmg_sw): ! -! clough, s.a., m.w. shephard, e.j. mlawer, j.s. delamere, ! -! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: ! -! atmospheric radiative transfer modeling: a summary of the aer ! -! codes, j. quant. spectrosc. radiat. transfer, 91, 233-244, 2005. ! -! ! -! (mcica): ! -! pincus, r., h. w. barker, and j.-j. morcrette: a fast, flexible, ! -! approximation technique for computing radiative transfer in ! -! inhomogeneous cloud fields, j. geophys. res., 108(d13), 4376, ! -! doi:10.1029/2002jd003322, 2003. ! -! ! -! ************************************************************************ ! -! ! -! aer's revision history: ! -! this version of rrtmg_sw has been modified from rrtm_sw to use a ! -! reduced set of g-point intervals and a two-stream model for ! -! application to gcms. ! -! ! -! -- original version (derived from rrtm_sw) ! -! 2002: aer. inc. ! -! -- conversion to f90 formatting; addition of 2-stream radiative transfer! -! feb 2003: j.-j. morcrette, ecmwf ! -! -- additional modifications for gcm application ! -! aug 2003: m. j. iacono, aer inc. ! -! -- total number of g-points reduced from 224 to 112. original ! -! set of 224 can be restored by exchanging code in module parrrsw.f90 ! -! and in file rrtmg_sw_init.f90. ! -! apr 2004: m. j. iacono, aer, inc. ! -! -- modifications to include output for direct and diffuse ! -! downward fluxes. there are output as "true" fluxes without ! -! any delta scaling applied. code can be commented to exclude ! -! this calculation in source file rrtmg_sw_spcvrt.f90. ! -! jan 2005: e. j. mlawer, m. j. iacono, aer, inc. ! -! -- revised to add mcica capability. ! -! nov 2005: m. j. iacono, aer, inc. ! -! -- reformatted for consistency with rrtmg_lw. ! -! feb 2007: m. j. iacono, aer, inc. ! -! -- modifications to formatting to use assumed-shape arrays. ! -! aug 2007: m. j. iacono, aer, inc. ! -! ! -! ************************************************************************ ! -! ! -! ncep modifications history log: ! -! ! -! sep 2003, yu-tai hou -- received aer's rrtm-sw gcm version ! -! code (v224) ! -! nov 2003, yu-tai hou -- corrected errors in direct/diffuse ! -! surface alabedo components. ! -! jan 2004, yu-tai hou -- modified code into standard modular! -! f9x code for ncep models. the original three cloud ! -! control flags are simplified into two: iflagliq and ! -! iflagice. combined the org subr sw_224 and setcoef ! -! into radsw (the main program); put all kgb##together ! -! and reformat into a separated data module; combine ! -! reftra and vrtqdr as swflux; optimized taumol and all ! -! taubgs to form a contained subroutines. ! -! jun 2004, yu-tai hou -- modified code based on aer's faster! -! version rrtmg_sw (v2.0) with 112 g-points. ! -! mar 2005, yu-tai hou -- modified to aer v2.3, correct cloud! -! scaling error, total sky properties are delta scaled ! -! after combining clear and cloudy parts. the testing ! -! criterion of ssa is saved before scaling. added cloud ! -! layer rain and snow contributions. all cloud water ! -! partical contents are treated the same way as other ! -! atmos particles. ! -! apr 2005, yu-tai hou -- modified on module structures (this! -! version of code was given back to aer in jun 2006) ! -! nov 2006, yu-tai hou -- modified code to include the ! -! generallized aerosol optical property scheme for gcms.! -! apr 2007, yu-tai hou -- added spectral band heating as an ! -! optional output to support the 500km model's upper ! -! stratospheric radiation calculations. restructure ! -! optional outputs for easy access by different models. ! -! oct 2008, yu-tai hou -- modified to include new features ! -! from aer's newer release v3.5-v3.61, including mcica ! -! sub-grid cloud option and true direct/diffuse fluxes ! -! without delta scaling. added rain/snow opt properties ! -! support to cloudy sky calculations. simplified and ! -! unified sw and lw sub-column cloud subroutines into ! -! one module by using optional parameters. ! -! mar 2009, yu-tai hou -- replaced the original random number! -! generator coming with the original code with ncep w3 ! -! library to simplify the program and moved sub-column ! -! cloud subroutines inside the main module. added ! -! option of user provided permutation seeds that could ! -! be randomly generated from forecast time stamp. ! -! mar 2009, yu-tai hou -- replaced random number generator ! -! programs coming from the original code with the ncep ! -! w3 library to simplify the program and moved sub-col ! -! cloud subroutines inside the main module. added ! -! option of user provided permutation seeds that could ! -! be randomly generated from forecast time stamp. ! -! nov 2009, yu-tai hou -- updated to aer v3.7-v3.8 version. ! -! notice the input cloud ice/liquid are assumed as ! -! in-cloud quantities, not grid average quantities. ! -! aug 2010, yu-tai hou -- uptimized code to improve efficiency -! splited subroutine spcvrt into two subs, spcvrc and ! -! spcvrm, to handling non-mcica and mcica type of calls.! -! apr 2012, b. ferrier and y. hou -- added conversion factor to fu's! -! cloud-snow optical property scheme. ! -! jul 2012, s. moorthi and Y. hou -- eliminated the pointer array ! -! in subr 'spcvrt' for multi-threading issue running ! -! under intel's fortran compiler. ! -! nov 2012, yu-tai hou -- modified control parameters thru ! -! module 'physparam'. ! -! jun 2013, yu-tai hou -- moving band 9 surface treatment ! -! back as in the rrtm2 version, spliting surface flux ! -! into two spectral regions (vis & nir), instead of ! -! designated it in nir region only. ! -! may 2016 yu-tai hou --reverting swflux name back to vrtqdr! -! jun 2018 yu-tai hou --updated cloud optical coeffs with ! -! aer's newer version v3.9-v4.0 for hu and stamnes ! -! scheme. (used if iswcliq=2); added new option of ! -! cloud overlap method 'de-correlation-length'. ! -! ! -!!!!! ============================================================== !!!!! -!!!!! end descriptions !!!!! -!!!!! ============================================================== !!!!! - -!> This module contains the CCPP-compliant NCEP's modifications of the rrtm-sw radiation -!! code from aer inc. - module rrtmg_sw -! - use physparam, only : iswrate, iswrgas, iswcice, & !mz: iswcliq-NML option - & isubcsw, icldflg, iovrsw, ivflip, & - & iswmode, kind_phys - use physcons, only : con_g, con_cp, con_avgd, con_amd, & - & con_amw, con_amo3 - - use module_radsw_parameters - use mersenne_twister, only : random_setseed, random_number, & - & random_stat - use module_radsw_ref, only : preflog, tref - use module_radsw_sflux -! - implicit none -! - private -! -! --- version tag and last revision date - character(40), parameter :: & - & VTAGSW='NCEP SW v5.1 Nov 2012 -RRTMG-SW v3.8 ' -! & VTAGSW='NCEP SW v5.0 Aug 2012 -RRTMG-SW v3.8 ' -! & VTAGSW='RRTMG-SW v3.8 Nov 2009' -! & VTAGSW='RRTMG-SW v3.7 Nov 2009' -! & VTAGSW='RRTMG-SW v3.61 Oct 2008' -! & VTAGSW='RRTMG-SW v3.5 Oct 2008' -! & VTAGSW='RRTM-SW 112v2.3 Apr 2007' -! & VTAGSW='RRTM-SW 112v2.3 Mar 2005' -! & VTAGSW='RRTM-SW 112v2.0 Jul 2004' - -! \name constant values - - real (kind=kind_phys), parameter :: eps = 1.0e-6 - real (kind=kind_phys), parameter :: oneminus= 1.0 - eps -! pade approx constant - real (kind=kind_phys), parameter :: bpade = 1.0/0.278 - real (kind=kind_phys), parameter :: stpfac = 296.0/1013.0 - real (kind=kind_phys), parameter :: ftiny = 1.0e-12 - real (kind=kind_phys), parameter :: flimit = 1.0e-20 -! internal solar constant - real (kind=kind_phys), parameter :: s0 = 1368.22 - - real (kind=kind_phys), parameter :: f_zero = 0.0 - real (kind=kind_phys), parameter :: f_one = 1.0 - -! \name atomic weights for conversion from mass to volume mixing ratios - real (kind=kind_phys), parameter :: amdw = con_amd/con_amw - real (kind=kind_phys), parameter :: amdo3 = con_amd/con_amo3 - -! \name band indices - integer, dimension(nblow:nbhgh) :: nspa, nspb -! band index for sfc flux - integer, dimension(nblow:nbhgh) :: idxsfc -! band index for cld prop - integer, dimension(nblow:nbhgh) :: idxebc - - data nspa(:) / 9, 9, 9, 9, 1, 9, 9, 1, 9, 1, 0, 1, 9, 1 / - data nspb(:) / 1, 5, 1, 1, 1, 5, 1, 0, 1, 0, 0, 1, 5, 1 / - -! data idxsfc(:) / 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1 / ! band index for sfc flux - data idxsfc(:) / 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1 / ! band index for sfc flux - data idxebc(:) / 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 5 / ! band index for cld prop - -! --- band wavenumber intervals -! real (kind=kind_phys), dimension(nblow:nbhgh):: wavenum1,wavenum2 -! data wavenum1(:) / & -! & 2600.0, 3250.0, 4000.0, 4650.0, 5150.0, 6150.0, 7700.0, & -! & 8050.0,12850.0,16000.0,22650.0,29000.0,38000.0, 820.0 / -! data wavenum2(:) / & -! 3250.0, 4000.0, 4650.0, 5150.0, 6150.0, 7700.0, 8050.0, & -! & 12850.0,16000.0,22650.0,29000.0,38000.0,50000.0, 2600.0 / -! real (kind=kind_phys), dimension(nblow:nbhgh) :: delwave -! data delwave(:) / & -! & 650.0, 750.0, 650.0, 500.0, 1000.0, 1550.0, 350.0, & -! & 4800.0, 3150.0, 6650.0, 6350.0, 9000.0,12000.0, 1780.0 / - -! uv-b band index - integer, parameter :: nuvb = 27 - -!\name logical flags for optional output fields - logical :: lhswb = .false. - logical :: lhsw0 = .false. - logical :: lflxprf= .false. - logical :: lfdncmp= .false. - - -! those data will be set up only once by "rswinit" - real (kind=kind_phys) :: exp_tbl(0:NTBMX) - - -! the factor for heating rates (in k/day, or k/sec set by subroutine -!! 'rswinit') - real (kind=kind_phys) :: heatfac - - -! initial permutation seed used for sub-column cloud scheme - integer, parameter :: ipsdsw0 = 1 - -! --- public accessable subprograms - - public rrtmg_sw_init, rrtmg_sw_run, rrtmg_sw_finalize, rswinit - - -! ================= - contains -! ================= - - subroutine rrtmg_sw_init () - end subroutine rrtmg_sw_init - -!> \defgroup module_radsw_main GFS RRTMG Shortwave Module -!! This module includes NCEP's modifications of the RRTMG-SW radiation -!! code from AER. -!! -!! The SW radiation model in the current NOAA Environmental Modeling -!! System (NEMS) was adapted from the RRTM radiation model developed by -!! AER Inc. (\cite clough_et_al_2005; \cite mlawer_et_al_1997). It contains 14 -!! spectral bands spanning a spectral wavenumber range of -!! \f$50000-820 cm^{-1}\f$ (corresponding to a wavelength range -!! \f$0.2-12.2\mu m\f$), each spectral band focuses on a specific set of -!! atmospheric absorbing species as shown in Table 1. To achieve great -!! computation efficiency while at the same time to maintain a high -!! degree of accuracy, the RRTM radiation model employs a corrected-k -!! distribution method (i.e. mapping the highly spectral changing -!! absorption coefficient, k, into a monotonic and smooth varying -!! cumulative probability function, g). In the RRTM-SW, there are 16 -!! unevenly distributed g points for each of the 14 bands for a total -!! of 224 g points. The GCM version of the code (RRTMG-SW) uses a reduced -!! number (various between 2 to 16) of g points for each of the bands -!! that totals to 112 instead of the full set of 224. To get high -!! quality for the scheme, many advanced techniques are used in RRTM -!! such as carefully selecting the band structure to handle various -!! major (key-species) and minor absorbers; deriving a binary parameter -!! for a paired key molecular species in the same domain; and using two -!! pressure regions (dividing level is at about 96mb) for optimal -!! treatment of various species, etc. -!!\tableofcontents -!! Table 1. RRTMG-SW spectral bands and the corresponding absorbing species -!! |Band #| Wavenumber Range | Lower Atm (Key)| Lower Atm (Minor)| Mid/Up Atm (Key)| Mid/Up Atm (Minor)| -!! |------|------------------|----------------|------------------|-----------------|-------------------| -!! | 16 | 2600-3250 |H2O,CH4 | |CH4 | | -!! | 17 | 3250-4000 |H2O,CO2 | |H2O,CO2 | | -!! | 18 | 4000-4650 |H2O,CH4 | |CH4 | | -!! | 19 | 4650-5150 |H2O,CO2 | |CO2 | | -!! | 20 | 5150-6150 |H2O |CH4 |H2O |CH4 | -!! | 21 | 6150-7700 |H2O,CO2 | |H2O,CO2 | | -!! | 22 | 7700-8050 |H2O,O2 | |O2 | | -!! | 23 | 8050-12850 |H2O | |--- | | -!! | 24 | 12850-16000 |H2O,O2 |O3 |O2 |O3 | -!! | 25 | 16000-22650 |H2O |O3 |--- |O3 | -!! | 26 | 22650-29000 |--- | |--- | | -!! | 27 | 29000-38000 |O3 | |O3 | | -!! | 28 | 38000-50000 |O3,O2 | |O3,O2 | | -!! | 29 | 820-2600 |H2O |CO2 |CO2 |H2O | -!!\tableofcontents -!! -!! The RRTM-SW package includes three files: -!! - radsw_param.f, which contains: -!! - module_radsw_parameters: specifies major parameters of the spectral -!! bands and defines the construct structures of derived-type variables -!! for holding the output results. -!! - radsw_datatb.f, which contains: -!! - module_radsw_ref: reference temperature and pressure -!! - module_radsw_cldprtb: cloud property coefficients table -!! - module_radsw_sflux: indexes and coefficients for spectral -!! distribution of solar flux -!! - module_radsw_kgbnn: absorption coefficents for 14 bands, where -!! nn = 16-29 -!! - radsw_main.f, which contains: -!! - rrtmg_sw_run(): the main SW radiation routine -!! - rswinit(): the initialization routine -!! -!!\author Eli J. Mlawer, emlawer@aer.com -!!\author Jennifer S. Delamere, jdelamer@aer.com -!!\author Michael J. Iacono, miacono@aer.com -!!\author Shepard A. Clough -!!\version NCEP SW v5.1 Nov 2012 -RRTMG-SW v3.8 -!! -!! The authors wish to acknowledge the contributions of the -!! following people: Steven J. Taubman, Karen Cady-Pereira, -!! Patrick D. Brown, Ronald E. Farren, Luke Chen, Robert Bergstrom. -!! -!!\copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). -!! This software may be used, copied, or redistributed as long as it is -!! not sold and this copyright notice is reproduced on each copy made. -!! This model is provided as is without any express or implied warranties. -!! (http://www.rtweb.aer.com/) -!! -!> \section arg_table_rrtmg_sw_run Argument Table -!! \htmlinclude rrtmg_sw_run.html -!! -!> \section gen_swrad RRTMG Shortwave Radiation Scheme General Algorithm -!> @{ -!----------------------------------- - subroutine rrtmg_sw_run & - & ( plyr,plvl,tlyr,tlvl,qlyr,olyr, & - & gasvmr_co2,gasvmr_n2o,gasvmr_ch4,gasvmr_o2,gasvmr_co, & - & gasvmr_cfc11,gasvmr_cfc12,gasvmr_cfc22,gasvmr_ccl4, & ! --- inputs - & icseed, aeraod, aerssa, aerasy, & - & sfcalb_nir_dir, sfcalb_nir_dif, & - & sfcalb_uvis_dir, sfcalb_uvis_dif, & - & dzlyr,delpin,de_lgth, & - & cosz,solcon,NDAY,idxday, & - & npts, nlay, nlp1, lprnt, & - & cld_cf, lsswr, & - & hswc,topflx,sfcflx,cldtau, & ! --- outputs - & HSW0,HSWB,FLXPRF,FDNCMP, & ! --- optional - & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & - & cld_rwp,cld_ref_rain, cld_swp, cld_ref_snow, & - & cld_od, cld_ssa, cld_asy, errmsg, errflg - & ) - -! ==================== defination of variables ==================== ! -! ! -! input variables: ! -! plyr (npts,nlay) : model layer mean pressure in mb ! -! plvl (npts,nlp1) : model level pressure in mb ! -! tlyr (npts,nlay) : model layer mean temperature in k ! -! tlvl (npts,nlp1) : model level temperature in k (not in use) ! -! qlyr (npts,nlay) : layer specific humidity in gm/gm *see inside ! -! olyr (npts,nlay) : layer ozone concentration in gm/gm ! -! gasvmr(npts,nlay,:): atmospheric constent gases: ! -! (check module_radiation_gases for definition) ! -! gasvmr(:,:,1) - co2 volume mixing ratio ! -! gasvmr(:,:,2) - n2o volume mixing ratio ! -! gasvmr(:,:,3) - ch4 volume mixing ratio ! -! gasvmr(:,:,4) - o2 volume mixing ratio ! -! gasvmr(:,:,5) - co volume mixing ratio (not used) ! -! gasvmr(:,:,6) - cfc11 volume mixing ratio (not used) ! -! gasvmr(:,:,7) - cfc12 volume mixing ratio (not used) ! -! gasvmr(:,:,8) - cfc22 volume mixing ratio (not used) ! -! gasvmr(:,:,9) - ccl4 volume mixing ratio (not used) ! -! clouds(npts,nlay,:): cloud profile ! -! (check module_radiation_clouds for definition) ! -! clouds(:,:,1) - layer total cloud fraction ! -! clouds(:,:,2) - layer in-cloud liq water path (g/m**2) ! -! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! -! clouds(:,:,4) - layer in-cloud ice water path (g/m**2) ! -! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! -! clouds(:,:,6) - layer rain drop water path (g/m**2) ! -! clouds(:,:,7) - mean eff radius for rain drop (micron) ! -! clouds(:,:,8) - layer snow flake water path (g/m**2) ! -! clouds(:,:,9) - mean eff radius for snow flake (micron) ! -! icseed(npts) : auxiliary special cloud related array ! -! when module variable isubcsw=2, it provides ! -! permutation seed for each column profile that ! -! are used for generating random numbers. ! -! when isubcsw /=2, it will not be used. ! -! aerosols(npts,nlay,nbdsw,:) : aerosol optical properties ! -! (check module_radiation_aerosols for definition) ! -! (:,:,:,1) - optical depth ! -! (:,:,:,2) - single scattering albedo ! -! (:,:,:,3) - asymmetry parameter ! -! sfcalb(npts, : ) : surface albedo in fraction ! -! (check module_radiation_surface for definition) ! -! ( :, 1 ) - near ir direct beam albedo ! -! ( :, 2 ) - near ir diffused albedo ! -! ( :, 3 ) - uv+vis direct beam albedo ! -! ( :, 4 ) - uv+vis diffused albedo ! -! dzlyr(npts,nlay) : layer thickness in km ! -! delpin(npts,nlay): layer pressure thickness (mb) ! -! de_lgth(npts) : clouds decorrelation length (km) ! -! cosz (npts) : cosine of solar zenith angle ! -! solcon : solar constant (w/m**2) ! -! NDAY : num of daytime points ! -! idxday(npts) : index array for daytime points ! -! npts : number of horizontal points ! -! nlay,nlp1 : vertical layer/lavel numbers ! -! lprnt : logical check print flag ! -! ! -! output variables: ! -! hswc (npts,nlay): total sky heating rates (k/sec or k/day) ! -! topflx(npts) : radiation fluxes at toa (w/m**2), components: ! -! (check module_radsw_parameters for definition) ! -! upfxc - total sky upward flux at toa ! -! dnflx - total sky downward flux at toa ! -! upfx0 - clear sky upward flux at toa ! -! sfcflx(npts) : radiation fluxes at sfc (w/m**2), components: ! -! (check module_radsw_parameters for definition) ! -! upfxc - total sky upward flux at sfc ! -! dnfxc - total sky downward flux at sfc ! -! upfx0 - clear sky upward flux at sfc ! -! dnfx0 - clear sky downward flux at sfc ! -! cldtau(npts,nlay): spectral band layer cloud optical depth (~0.55 mu) -! ! -!!optional outputs variables: ! -! hswb(npts,nlay,nbdsw): spectral band total sky heating rates ! -! hsw0 (npts,nlay): clear sky heating rates (k/sec or k/day) ! -! flxprf(npts,nlp1): level radiation fluxes (w/m**2), components: ! -! (check module_radsw_parameters for definition) ! -! dnfxc - total sky downward flux at interface ! -! upfxc - total sky upward flux at interface ! -! dnfx0 - clear sky downward flux at interface ! -! upfx0 - clear sky upward flux at interface ! -! fdncmp(npts) : component surface downward fluxes (w/m**2): ! -! (check module_radsw_parameters for definition) ! -! uvbfc - total sky downward uv-b flux at sfc ! -! uvbf0 - clear sky downward uv-b flux at sfc ! -! nirbm - downward surface nir direct beam flux ! -! nirdf - downward surface nir diffused flux ! -! visbm - downward surface uv+vis direct beam flux ! -! visdf - downward surface uv+vis diffused flux ! -! ! -! external module variables: (in physparam) ! -! iswrgas - control flag for rare gases (ch4,n2o,o2, etc.) ! -! =0: do not include rare gases ! -! >0: include all rare gases ! -! iswcliq - control flag for liq-cloud optical properties ! -! =0: input cloud optical depth, fixed ssa, asy ! -! =1: use hu and stamnes(1993) method for liq cld ! -! =2: use updated coeffs for hu and stamnes scheme ! -! iswcice - control flag for ice-cloud optical properties ! -! *** if iswcliq==0, iswcice is ignored ! -! =1: use ebert and curry (1992) scheme for ice clouds ! -! =2: use streamer v3.0 (2001) method for ice clouds ! -! =3: use fu's method (1996) for ice clouds ! -! iswmode - control flag for 2-stream transfer scheme ! -! =1; delta-eddington (joseph et al., 1976) ! -! =2: pifm (zdunkowski et al., 1980) ! -! =3: discrete ordinates (liou, 1973) ! -! isubcsw - sub-column cloud approximation control flag ! -! =0: no sub-col cld treatment, use grid-mean cld quantities ! -! =1: mcica sub-col, prescribed seeds to get random numbers ! -! =2: mcica sub-col, providing array icseed for random numbers! -! iovrsw - cloud overlapping control flag ! -! =0: random overlapping clouds ! -! =1: maximum/random overlapping clouds ! -! =2: maximum overlap cloud ! -! =3: decorrelation-length overlap clouds ! -! ivflip - control flg for direction of vertical index ! -! =0: index from toa to surface ! -! =1: index from surface to toa ! -! ! -! module parameters, control variables: ! -! nblow,nbhgh - lower and upper limits of spectral bands ! -! maxgas - maximum number of absorbing gaseous ! -! ngptsw - total number of g-point subintervals ! -! ng## - number of g-points in band (##=16-29) ! -! ngb(ngptsw) - band indices for each g-point ! -! bpade - pade approximation constant (1/0.278) ! -! nspa,nspb(nblow:nbhgh) ! -! - number of lower/upper ref atm's per band ! -! ipsdsw0 - permutation seed for mcica sub-col clds ! -! ! -! major local variables: ! -! pavel (nlay) - layer pressures (mb) ! -! delp (nlay) - layer pressure thickness (mb) ! -! tavel (nlay) - layer temperatures (k) ! -! coldry (nlay) - dry air column amount ! -! (1.e-20*molecules/cm**2) ! -! cldfrc (nlay) - layer cloud fraction (norm by tot cld) ! -! cldfmc (nlay,ngptsw) - layer cloud fraction for g-point ! -! taucw (nlay,nbdsw) - cloud optical depth ! -! ssacw (nlay,nbdsw) - cloud single scattering albedo (weighted) ! -! asycw (nlay,nbdsw) - cloud asymmetry factor (weighted) ! -! tauaer (nlay,nbdsw) - aerosol optical depths ! -! ssaaer (nlay,nbdsw) - aerosol single scattering albedo ! -! asyaer (nlay,nbdsw) - aerosol asymmetry factor ! -! colamt (nlay,maxgas) - column amounts of absorbing gases ! -! 1 to maxgas are for h2o, co2, o3, n2o, ! -! ch4, o2, co, respectively (mol/cm**2) ! -! facij (nlay) - indicator of interpolation factors ! -! =0/1: indicate lower/higher temp & height ! -! selffac(nlay) - scale factor for self-continuum, equals ! -! (w.v. density)/(atm density at 296K,1013 mb) ! -! selffrac(nlay) - factor for temp interpolation of ref ! -! self-continuum data ! -! indself(nlay) - index of the lower two appropriate ref ! -! temp for the self-continuum interpolation ! -! forfac (nlay) - scale factor for w.v. foreign-continuum ! -! forfrac(nlay) - factor for temp interpolation of ref ! -! w.v. foreign-continuum data ! -! indfor (nlay) - index of the lower two appropriate ref ! -! temp for the foreign-continuum interp ! -! laytrop - layer at which switch is made from one ! -! combination of key species to another ! -! jp(nlay),jt(nlay),jt1(nlay) ! -! - lookup table indexes ! -! flxucb(nlp1,nbdsw) - spectral bnd total-sky upward flx (w/m2) ! -! flxdcb(nlp1,nbdsw) - spectral bnd total-sky downward flx (w/m2)! -! flxu0b(nlp1,nbdsw) - spectral bnd clear-sky upward flx (w/m2) ! -! flxd0b(nlp1,nbdsw) - spectral b d clear-sky downward flx (w/m2)! -! ! -! ! -! ===================== end of definitions ==================== ! - -! --- inputs: - integer, intent(in) :: npts, nlay, nlp1, NDAY - - integer, dimension(:), intent(in) :: idxday, icseed - - logical, intent(in) :: lprnt, lsswr - - real (kind=kind_phys), dimension(npts,nlp1), intent(in) :: & - & plvl, tlvl - real (kind=kind_phys), dimension(npts,nlay), intent(in) :: & - & plyr, tlyr, qlyr, olyr, dzlyr, delpin - - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_nir_dir - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_nir_dif - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_uvis_dir - real (kind=kind_phys),dimension(npts),intent(in):: sfcalb_uvis_dif - - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co2 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_n2o - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_ch4 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_o2 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_co - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc11 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc12 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_cfc22 - real(kind=kind_phys),dimension(npts,nlay),intent(in)::gasvmr_ccl4 - - real (kind=kind_phys), dimension(npts,nlay),intent(in):: cld_cf - real (kind=kind_phys), dimension(npts,nlay),intent(in),optional:: & - & cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, & - & cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, & - & cld_od, cld_ssa, cld_asy - - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aeraod - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aerssa - real(kind=kind_phys),dimension(npts,nlay,nbdsw),intent(in)::aerasy - - real (kind=kind_phys), intent(in) :: cosz(npts), solcon, & - & de_lgth(npts) - -! --- outputs: - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hswc - real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: & - & cldtau - - type (topfsw_type), dimension(npts), intent(inout) :: topflx - type (sfcfsw_type), dimension(npts), intent(inout) :: sfcflx - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - -!! --- optional outputs: - real (kind=kind_phys), dimension(npts,nlay,nbdsw), optional, & - & intent(inout) :: hswb - - real (kind=kind_phys), dimension(npts,nlay), optional, & - & intent(inout) :: hsw0 - type (profsw_type), dimension(npts,nlp1), optional, & - & intent(inout) :: flxprf - type (cmpfsw_type), dimension(npts), optional, & - & intent(inout) :: fdncmp - -! --- locals: - real (kind=kind_phys), dimension(nlay,ngptsw) :: cldfmc, & - & taug, taur - real (kind=kind_phys), dimension(nlp1,nbdsw):: fxupc, fxdnc, & - & fxup0, fxdn0 - - real (kind=kind_phys), dimension(nlay,nbdsw) :: & - & tauae, ssaae, asyae, taucw, ssacw, asycw - - real (kind=kind_phys), dimension(ngptsw) :: sfluxzen - - real (kind=kind_phys), dimension(nlay) :: cldfrc, delp, & - & pavel, tavel, coldry, colmol, h2ovmr, o3vmr, temcol, & - & cliqp, reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, & - & cfrac, fac00, fac01, fac10, fac11, forfac, forfrac, & - & selffac, selffrac, rfdelp, dz - - real (kind=kind_phys), dimension(nlp1) :: fnet, flxdc, flxuc, & - & flxd0, flxu0 - - real (kind=kind_phys), dimension(2) :: albbm, albdf, sfbmc, & - & sfbm0, sfdfc, sfdf0 - - real (kind=kind_phys) :: cosz1, sntz1, tem0, tem1, tem2, s0fac, & - & ssolar, zcf0, zcf1, ftoau0, ftoauc, ftoadc, & - & fsfcu0, fsfcuc, fsfcd0, fsfcdc, suvbfc, suvbf0, delgth - -! --- column amount of absorbing gases: -! (:,m) m = 1-h2o, 2-co2, 3-o3, 4-n2o, 5-ch4, 6-o2, 7-co - real (kind=kind_phys) :: colamt(nlay,maxgas) - - integer, dimension(npts) :: ipseed - integer, dimension(nlay) :: indfor, indself, jp, jt, jt1 - - integer :: i, ib, ipt, j1, k, kk, laytrop, mb -! -!===> ... begin here -! - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 -! - if (.not. lsswr) return - if (nday <= 0) return - - lhswb = present ( hswb ) - lhsw0 = present ( hsw0 ) - lflxprf= present ( flxprf ) - lfdncmp= present ( fdncmp ) - -!> -# Compute solar constant adjustment factor (s0fac) according to solcon. -! *** s0, the solar constant at toa in w/m**2, is hard-coded with -! each spectra band, the total flux is about 1368.22 w/m**2. - - s0fac = solcon / s0 - -!> -# Initial output arrays (and optional) as zero. - - hswc(:,:) = f_zero - cldtau(:,:) = f_zero - topflx = topfsw_type ( f_zero, f_zero, f_zero ) - sfcflx = sfcfsw_type ( f_zero, f_zero, f_zero, f_zero ) - -!! --- ... initial optional outputs - if ( lflxprf ) then - flxprf = profsw_type ( f_zero, f_zero, f_zero, f_zero ) - endif - - if ( lfdncmp ) then - fdncmp = cmpfsw_type (f_zero,f_zero,f_zero,f_zero,f_zero,f_zero) - endif - - if ( lhsw0 ) then - hsw0(:,:) = f_zero - endif - - if ( lhswb ) then - hswb(:,:,:) = f_zero - endif - -!! --- check for optional input arguments, depending on cloud method - if (iswcliq > 0) then ! use prognostic cloud method - if ( .not.present(cld_lwp) .or. .not.present(cld_ref_liq) .or. & - & .not.present(cld_iwp) .or. .not.present(cld_ref_ice) .or. & - & .not.present(cld_rwp) .or. .not.present(cld_ref_rain) .or. & - & .not.present(cld_swp) .or. .not.present(cld_ref_snow) )then - write(errmsg,'(*(a))') & - & 'Logic error: iswcliq>0 requires the following', & - & ' optional arguments to be present:', & - & ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', & - & ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow' - errflg = 1 - return - end if - else ! use diagnostic cloud method - if ( .not.present(cld_od) .or. .not.present(cld_ssa) .or. & - & .not.present(cld_asy)) then - write(errmsg,'(*(a))') & - & 'Logic error: iswcliq<=0 requires the following', & - & ' optional arguments to be present:', & - & ' cld_od, cld_ssa, cld_asy' - errflg = 1 - return - end if - endif ! end if_iswcliq - -!> -# Change random number seed value for each radiation invocation -!! (isubcsw =1 or 2). - - if ( isubcsw == 1 ) then ! advance prescribed permutation seed - do i = 1, npts - ipseed(i) = ipsdsw0 + i - enddo - elseif ( isubcsw == 2 ) then ! use input array of permutaion seeds - do i = 1, npts - ipseed(i) = icseed(i) - enddo - endif - - if ( lprnt ) then - write(0,*)' In radsw, isubcsw, ipsdsw0,ipseed =', & - & isubcsw, ipsdsw0, ipseed - endif - -! --- ... loop over each daytime grid point - - lab_do_ipt : do ipt = 1, NDAY - - j1 = idxday(ipt) - - cosz1 = cosz(j1) - sntz1 = f_one / cosz(j1) - ssolar = s0fac * cosz(j1) - if (iovrsw == 3) delgth = de_lgth(j1) ! clouds decorr-length - -!> -# Prepare surface albedo: bm,df - dir,dif; 1,2 - nir,uvv. - albbm(1) = sfcalb_nir_dir(j1) - albdf(1) = sfcalb_nir_dif(j1) - albbm(2) = sfcalb_uvis_dir(j1) - albdf(2) = sfcalb_uvis_dif(j1) - -!> -# Prepare atmospheric profile for use in rrtm. -! the vertical index of internal array is from surface to top - - if (ivflip == 0) then ! input from toa to sfc - - tem1 = 100.0 * con_g - tem2 = 1.0e-20 * 1.0e3 * con_avgd - - do k = 1, nlay - kk = nlp1 - k - pavel(k) = plyr(j1,kk) - tavel(k) = tlyr(j1,kk) - delp (k) = delpin(j1,kk) - dz (k) = dzlyr (j1,kk) -!> -# Set absorber and gas column amount, convert from volume mixing -!! ratio to molec/cm2 based on coldry (scaled to 1.0e-20) -!! - colamt(nlay,maxgas):column amounts of absorbing gases 1 to -!! maxgas are for h2o,co2,o3,n2o,ch4,o2,co, respectively -!! (\f$ mol/cm^2 \f$) - -!test use -! h2ovmr(k)= max(f_zero,qlyr(j1,kk)*amdw) ! input mass mixing ratio -! h2ovmr(k)= max(f_zero,qlyr(j1,kk)) ! input vol mixing ratio -! o3vmr (k)= max(f_zero,olyr(j1,kk)) ! input vol mixing ratio -!ncep model use - h2ovmr(k)= max(f_zero,qlyr(j1,kk)*amdw/(f_one-qlyr(j1,kk))) ! input specific humidity - o3vmr (k)= max(f_zero,olyr(j1,kk)*amdo3) ! input mass mixing ratio - - tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw - coldry(k) = tem2 * delp(k) / (tem1*tem0*(f_one + h2ovmr(k))) - temcol(k) = 1.0e-12 * coldry(k) - - colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o - colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(j1,kk)) ! co2 - colamt(k,3) = max(f_zero, coldry(k)*o3vmr(k)) ! o3 - colmol(k) = coldry(k) + colamt(k,1) - enddo - -! --- ... set up gas column amount, convert from volume mixing ratio -! to molec/cm2 based on coldry (scaled to 1.0e-20) - - if (iswrgas > 0) then - do k = 1, nlay - kk = nlp1 - k - colamt(k,4) = max(temcol(k), coldry(k)*gasvmr_n2o(j1,kk)) ! n2o - colamt(k,5) = max(temcol(k), coldry(k)*gasvmr_ch4(j1,kk)) ! ch4 - colamt(k,6) = max(temcol(k), coldry(k)*gasvmr_o2(j1,kk)) ! o2 -! colamt(k,7) = max(temcol(k), coldry(k)*gasvmr(j1,kk,5)) ! co - notused - enddo - else - do k = 1, nlay - colamt(k,4) = temcol(k) ! n2o - colamt(k,5) = temcol(k) ! ch4 - colamt(k,6) = temcol(k) ! o2 -! colamt(k,7) = temcol(k) ! co - notused - enddo - endif - -!> -# Read aerosol optical properties from 'aerosols'. - - do k = 1, nlay - kk = nlp1 - k - do ib = 1, nbdsw - tauae(k,ib) = aeraod(j1,kk,ib) - ssaae(k,ib) = aerssa(j1,kk,ib) - asyae(k,ib) = aerasy(j1,kk,ib) - enddo - enddo - -!> -# Read cloud optical properties from 'clouds'. - if (iswcliq > 0) then ! use prognostic cloud method - do k = 1, nlay - kk = nlp1 - k - cfrac(k) = cld_cf(j1,kk) ! cloud fraction - cliqp(k) = cld_lwp(j1,kk) ! cloud liq path - reliq(k) = cld_ref_liq(j1,kk) ! liq partical effctive radius - cicep(k) = cld_iwp(j1,kk) ! cloud ice path - reice(k) = cld_ref_ice(j1,kk) ! ice partical effctive radius - cdat1(k) = cld_rwp(j1,kk) ! cloud rain drop path - cdat2(k) = cld_ref_rain(j1,kk) ! rain partical effctive radius - cdat3(k) = cld_swp(j1,kk) ! cloud snow path - cdat4(k) = cld_ref_snow(j1,kk) ! snow partical effctive radius - enddo - else ! use diagnostic cloud method - do k = 1, nlay - kk = nlp1 - k - cfrac(k) = cld_cf(j1,kk) ! cloud fraction - cdat1(k) = cld_od(j1,kk) ! cloud optical depth - cdat2(k) = cld_ssa(j1,kk) ! cloud single scattering albedo - cdat3(k) = cld_asy(j1,kk) ! cloud asymmetry factor - enddo - endif ! end if_iswcliq - - else ! input from sfc to toa - - tem1 = 100.0 * con_g - tem2 = 1.0e-20 * 1.0e3 * con_avgd - - do k = 1, nlay - pavel(k) = plyr(j1,k) - tavel(k) = tlyr(j1,k) - delp (k) = delpin(j1,k) - dz (k) = dzlyr (j1,k) - -! --- ... set absorber amount -!test use -! h2ovmr(k)= max(f_zero,qlyr(j1,k)*amdw) ! input mass mixing ratio -! h2ovmr(k)= max(f_zero,qlyr(j1,k)) ! input vol mixing ratio -! o3vmr (k)= max(f_zero,olyr(j1,k)) ! input vol mixing ratio -!ncep model use - h2ovmr(k)= max(f_zero,qlyr(j1,k)*amdw/(f_one-qlyr(j1,k))) ! input specific humidity - o3vmr (k)= max(f_zero,olyr(j1,k)*amdo3) ! input mass mixing ratio - - tem0 = (f_one - h2ovmr(k))*con_amd + h2ovmr(k)*con_amw - coldry(k) = tem2 * delp(k) / (tem1*tem0*(f_one + h2ovmr(k))) - temcol(k) = 1.0e-12 * coldry(k) - - colamt(k,1) = max(f_zero, coldry(k)*h2ovmr(k)) ! h2o - colamt(k,2) = max(temcol(k), coldry(k)*gasvmr_co2(j1,k)) ! co2 - colamt(k,3) = max(f_zero, coldry(k)*o3vmr(k)) ! o3 - colmol(k) = coldry(k) + colamt(k,1) - enddo - - - if (lprnt) then - if (ipt == 1) then - write(0,*)' pavel=',pavel - write(0,*)' tavel=',tavel - write(0,*)' delp=',delp - write(0,*)' h2ovmr=',h2ovmr*1000 - write(0,*)' o3vmr=',o3vmr*1000000 - endif - endif - -! --- ... set up gas column amount, convert from volume mixing ratio -! to molec/cm2 based on coldry (scaled to 1.0e-20) - - if (iswrgas > 0) then - do k = 1, nlay - colamt(k,4) = max(temcol(k), coldry(k)*gasvmr_n2o(j1,k)) ! n2o - colamt(k,5) = max(temcol(k), coldry(k)*gasvmr_ch4(j1,k)) ! ch4 - colamt(k,6) = max(temcol(k), coldry(k)*gasvmr_o2(j1,k)) ! o2 -! colamt(k,7) = max(temcol(k), coldry(k)*gasvmr(j1,k,5)) ! co - notused - enddo - else - do k = 1, nlay - colamt(k,4) = temcol(k) ! n2o - colamt(k,5) = temcol(k) ! ch4 - colamt(k,6) = temcol(k) ! o2 -! colamt(k,7) = temcol(k) ! co - notused - enddo - endif - -! --- ... set aerosol optical properties - - do ib = 1, nbdsw - do k = 1, nlay - tauae(k,ib) = aeraod(j1,k,ib) - ssaae(k,ib) = aerssa(j1,k,ib) - asyae(k,ib) = aerasy(j1,k,ib) - enddo - enddo - - if (iswcliq > 0) then ! use prognostic cloud method - do k = 1, nlay - cfrac(k) = cld_cf(j1,k) ! cloud fraction - cliqp(k) = cld_lwp(j1,k) ! cloud liq path - reliq(k) = cld_ref_liq(j1,k) ! liq partical effctive radius - cicep(k) = cld_iwp(j1,k) ! cloud ice path - reice(k) = cld_ref_ice(j1,k) ! ice partical effctive radius - cdat1(k) = cld_rwp(j1,k) ! cloud rain drop path - cdat2(k) = cld_ref_rain(j1,k) ! rain partical effctive radius - cdat3(k) = cld_swp(j1,k) ! cloud snow path - cdat4(k) = cld_ref_snow(j1,k) ! snow partical effctive radius - enddo - else ! use diagnostic cloud method - do k = 1, nlay - cfrac(k) = cld_cf(j1,k) ! cloud fraction - cdat1(k) = cld_od(j1,k) ! cloud optical depth - cdat2(k) = cld_ssa(j1,k) ! cloud single scattering albedo - cdat3(k) = cld_asy(j1,k) ! cloud asymmetry factor - enddo - endif ! end if_iswcliq - - endif ! if_ivflip - -!> -# Compute fractions of clear sky view: -!! - random overlapping -!! - max/ran overlapping -!! - maximum overlapping - - zcf0 = f_one - zcf1 = f_one - if (iovrsw == 0) then ! random overlapping - do k = 1, nlay - zcf0 = zcf0 * (f_one - cfrac(k)) - enddo - else if (iovrsw == 1) then ! max/ran overlapping - do k = 1, nlay - if (cfrac(k) > ftiny) then ! cloudy layer - zcf1 = min ( zcf1, f_one-cfrac(k) ) - elseif (zcf1 < f_one) then ! clear layer - zcf0 = zcf0 * zcf1 - zcf1 = f_one - endif - enddo - zcf0 = zcf0 * zcf1 - else if (iovrsw >= 2) then - do k = 1, nlay - zcf0 = min ( zcf0, f_one-cfrac(k) ) ! used only as clear/cloudy indicator - enddo - endif - - if (zcf0 <= ftiny) zcf0 = f_zero - if (zcf0 > oneminus) zcf0 = f_one - zcf1 = f_one - zcf0 - -!> -# For cloudy sky column, call cldprop() to compute the cloud -!! optical properties for each cloudy layer. - - if (zcf1 > f_zero) then ! cloudy sky column - - call cldprop & -! --- inputs: - & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & - & zcf1, nlay, ipseed(j1), dz, delgth, & -! --- outputs: - & taucw, ssacw, asycw, cldfrc, cldfmc & - & ) - -! --- ... save computed layer cloud optical depth for output -! rrtm band 10 is approx to the 0.55 mu spectrum - - if (ivflip == 0) then ! input from toa to sfc - do k = 1, nlay - kk = nlp1 - k - cldtau(j1,kk) = taucw(k,10) - enddo - else ! input from sfc to toa - do k = 1, nlay - cldtau(j1,k) = taucw(k,10) - enddo - endif ! end if_ivflip_block - - else ! clear sky column - cldfrc(:) = f_zero - cldfmc(:,:)= f_zero - do i = 1, nbdsw - do k = 1, nlay - taucw(k,i) = f_zero - ssacw(k,i) = f_zero - asycw(k,i) = f_zero - enddo - enddo - endif ! end if_zcf1_block - -!> -# Call setcoef() to compute various coefficients needed in -!! radiative transfer calculations. - call setcoef & -! --- inputs: - & ( pavel,tavel,h2ovmr, nlay,nlp1, & -! --- outputs: - & laytrop,jp,jt,jt1,fac00,fac01,fac10,fac11, & - & selffac,selffrac,indself,forfac,forfrac,indfor & - & ) - -!> -# Call taumol() to calculate optical depths for gaseous absorption -!! and rayleigh scattering - call taumol & -! --- inputs: - & ( colamt,colmol,fac00,fac01,fac10,fac11,jp,jt,jt1,laytrop, & - & forfac,forfrac,indfor,selffac,selffrac,indself, NLAY, & -! --- outputs: - & sfluxzen, taug, taur & - & ) - -!> -# Call the 2-stream radiation transfer model: -!! - if physparam::isubcsw .le.0, using standard cloud scheme, -!! call spcvrtc(). -!! - if physparam::isubcsw .gt.0, using mcica cloud scheme, -!! call spcvrtm(). - - if ( isubcsw <= 0 ) then ! use standard cloud scheme - - call spcvrtc & -! --- inputs: - & ( ssolar,cosz1,sntz1,albbm,albdf,sfluxzen,cldfrc, & - & zcf1,zcf0,taug,taur,tauae,ssaae,asyae,taucw,ssacw,asycw, & - & nlay, nlp1, & -! --- outputs: - & fxupc,fxdnc,fxup0,fxdn0, & - & ftoauc,ftoau0,ftoadc,fsfcuc,fsfcu0,fsfcdc,fsfcd0, & - & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & - & ) - - else ! use mcica cloud scheme - - call spcvrtm & -! --- inputs: - & ( ssolar,cosz1,sntz1,albbm,albdf,sfluxzen,cldfmc, & - & zcf1,zcf0,taug,taur,tauae,ssaae,asyae,taucw,ssacw,asycw, & - & nlay, nlp1, & -! --- outputs: - & fxupc,fxdnc,fxup0,fxdn0, & - & ftoauc,ftoau0,ftoadc,fsfcuc,fsfcu0,fsfcdc,fsfcd0, & - & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & - & ) - - endif - -!> -# Save outputs. -! --- ... sum up total spectral fluxes for total-sky - - do k = 1, nlp1 - flxuc(k) = f_zero - flxdc(k) = f_zero - - do ib = 1, nbdsw - flxuc(k) = flxuc(k) + fxupc(k,ib) - flxdc(k) = flxdc(k) + fxdnc(k,ib) - enddo - enddo - -!! --- ... optional clear sky fluxes - - if ( lhsw0 .or. lflxprf ) then - do k = 1, nlp1 - flxu0(k) = f_zero - flxd0(k) = f_zero - - do ib = 1, nbdsw - flxu0(k) = flxu0(k) + fxup0(k,ib) - flxd0(k) = flxd0(k) + fxdn0(k,ib) - enddo - enddo - endif - -! --- ... prepare for final outputs - - do k = 1, nlay - rfdelp(k) = heatfac / delp(k) - enddo - - if ( lfdncmp ) then -!! --- ... optional uv-b surface downward flux - fdncmp(j1)%uvbf0 = suvbf0 - fdncmp(j1)%uvbfc = suvbfc - -!! --- ... optional beam and diffuse sfc fluxes - fdncmp(j1)%nirbm = sfbmc(1) - fdncmp(j1)%nirdf = sfdfc(1) - fdncmp(j1)%visbm = sfbmc(2) - fdncmp(j1)%visdf = sfdfc(2) - endif ! end if_lfdncmp - -! --- ... toa and sfc fluxes - - topflx(j1)%upfxc = ftoauc - topflx(j1)%dnfxc = ftoadc - topflx(j1)%upfx0 = ftoau0 - - sfcflx(j1)%upfxc = fsfcuc - sfcflx(j1)%dnfxc = fsfcdc - sfcflx(j1)%upfx0 = fsfcu0 - sfcflx(j1)%dnfx0 = fsfcd0 - - if (ivflip == 0) then ! output from toa to sfc - -! --- ... compute heating rates - - fnet(1) = flxdc(1) - flxuc(1) - - do k = 2, nlp1 - kk = nlp1 - k + 1 - fnet(k) = flxdc(k) - flxuc(k) - hswc(j1,kk) = (fnet(k)-fnet(k-1)) * rfdelp(k-1) - enddo - -!! --- ... optional flux profiles - - if ( lflxprf ) then - do k = 1, nlp1 - kk = nlp1 - k + 1 - flxprf(j1,kk)%upfxc = flxuc(k) - flxprf(j1,kk)%dnfxc = flxdc(k) - flxprf(j1,kk)%upfx0 = flxu0(k) - flxprf(j1,kk)%dnfx0 = flxd0(k) - enddo - endif - -!! --- ... optional clear sky heating rates - - if ( lhsw0 ) then - fnet(1) = flxd0(1) - flxu0(1) - - do k = 2, nlp1 - kk = nlp1 - k + 1 - fnet(k) = flxd0(k) - flxu0(k) - hsw0(j1,kk) = (fnet(k)-fnet(k-1)) * rfdelp(k-1) - enddo - endif - -!! --- ... optional spectral band heating rates - - if ( lhswb ) then - do mb = 1, nbdsw - fnet(1) = fxdnc(1,mb) - fxupc(1,mb) - - do k = 2, nlp1 - kk = nlp1 - k + 1 - fnet(k) = fxdnc(k,mb) - fxupc(k,mb) - hswb(j1,kk,mb) = (fnet(k) - fnet(k-1)) * rfdelp(k-1) - enddo - enddo - endif - - else ! output from sfc to toa - -! --- ... compute heating rates - - fnet(1) = flxdc(1) - flxuc(1) - - do k = 2, nlp1 - fnet(k) = flxdc(k) - flxuc(k) - hswc(j1,k-1) = (fnet(k)-fnet(k-1)) * rfdelp(k-1) - enddo - -!! --- ... optional flux profiles - - if ( lflxprf ) then - do k = 1, nlp1 - flxprf(j1,k)%upfxc = flxuc(k) - flxprf(j1,k)%dnfxc = flxdc(k) - flxprf(j1,k)%upfx0 = flxu0(k) - flxprf(j1,k)%dnfx0 = flxd0(k) - enddo - endif - -!! --- ... optional clear sky heating rates - - if ( lhsw0 ) then - fnet(1) = flxd0(1) - flxu0(1) - - do k = 2, nlp1 - fnet(k) = flxd0(k) - flxu0(k) - hsw0(j1,k-1) = (fnet(k)-fnet(k-1)) * rfdelp(k-1) - enddo - endif - -!! --- ... optional spectral band heating rates - - if ( lhswb ) then - do mb = 1, nbdsw - fnet(1) = fxdnc(1,mb) - fxupc(1,mb) - - do k = 1, nlay - fnet(k+1) = fxdnc(k+1,mb) - fxupc(k+1,mb) - hswb(j1,k,mb) = (fnet(k+1) - fnet(k)) * rfdelp(k) - enddo - enddo - endif - - endif ! if_ivflip - - enddo lab_do_ipt - - return -!................................... - end subroutine rrtmg_sw_run -!----------------------------------- -!> @} - - subroutine rrtmg_sw_finalize () - end subroutine rrtmg_sw_finalize - - -!>\ingroup module_radsw_main -!> This subroutine initializes non-varying module variables, conversion -!! factors, and look-up tables. -!!\param me print control for parallel process -!>\section rswinit_gen rswinit General Algorithm -!! @{ -!----------------------------------- - subroutine rswinit & - & ( me ) ! --- inputs: -! --- outputs: (none) - -! =================== program usage description =================== ! -! ! -! purpose: initialize non-varying module variables, conversion factors,! -! and look-up tables. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: ! -! me - print control for parallel process ! -! ! -! outputs: (none) ! -! ! -! external module variables: (in physparam) ! -! iswrate - heating rate unit selections ! -! =1: output in k/day ! -! =2: output in k/second ! -! iswrgas - control flag for rare gases (ch4,n2o,o2, etc.) ! -! =0: do not include rare gases ! -! >0: include all rare gases ! -! iswcliq - liquid cloud optical properties contrl flag ! -! =0: input cloud opt depth from diagnostic scheme ! -! >0: input cwp,rew, and other cloud content parameters ! -! isubcsw - sub-column cloud approximation control flag ! -! =0: no sub-col cld treatment, use grid-mean cld quantities ! -! =1: mcica sub-col, prescribed seeds to get random numbers ! -! =2: mcica sub-col, providing array icseed for random numbers! -! icldflg - cloud scheme control flag ! -! =0: diagnostic scheme gives cloud tau, omiga, and g. ! -! =1: prognostic scheme gives cloud liq/ice path, etc. ! -! iovrsw - clouds vertical overlapping control flag ! -! =0: random overlapping clouds ! -! =1: maximum/random overlapping clouds ! -! =2: maximum overlap cloud ! -! =3: decorrelation-length overlap clouds ! -! iswmode - control flag for 2-stream transfer scheme ! -! =1; delta-eddington (joseph et al., 1976) ! -! =2: pifm (zdunkowski et al., 1980) ! -! =3: discrete ordinates (liou, 1973) ! -! ! -! ******************************************************************* ! -! ! -! definitions: ! -! arrays for 10000-point look-up tables: ! -! tau_tbl clear-sky optical depth ! -! exp_tbl exponential lookup table for transmittance ! -! ! -! ******************************************************************* ! -! ! -! ====================== end of description block ================= ! - -! --- inputs: - integer, intent(in) :: me - -! --- outputs: none - -! --- locals: - real (kind=kind_phys), parameter :: expeps = 1.e-20 - - integer :: i - - real (kind=kind_phys) :: tfn, tau - -! -!===> ... begin here -! - if ( iovrsw<0 .or. iovrsw>3 ) then - print *,' *** Error in specification of cloud overlap flag', & - & ' IOVRSW=',iovrsw,' in RSWINIT !!' - stop - endif - - if (me == 0) then - print *,' - Using AER Shortwave Radiation, Version: ',VTAGSW - - if (iswmode == 1) then - print *,' --- Delta-eddington 2-stream transfer scheme' - else if (iswmode == 2) then - print *,' --- PIFM 2-stream transfer scheme' - else if (iswmode == 3) then - print *,' --- Discrete ordinates 2-stream transfer scheme' - endif - - if (iswrgas <= 0) then - print *,' --- Rare gases absorption is NOT included in SW' - else - print *,' --- Include rare gases N2O, CH4, O2, absorptions',& - & ' in SW' - endif - - if ( isubcsw == 0 ) then - print *,' --- Using standard grid average clouds, no ', & - & 'sub-column clouds approximation applied' - elseif ( isubcsw == 1 ) then - print *,' --- Using MCICA sub-colum clouds approximation ', & - & 'with a prescribed sequence of permutation seeds' - elseif ( isubcsw == 2 ) then - print *,' --- Using MCICA sub-colum clouds approximation ', & - & 'with provided input array of permutation seeds' - else - print *,' *** Error in specification of sub-column cloud ', & - & ' control flag isubcsw =',isubcsw,' !!' - stop - endif - endif - -!> -# Check cloud flags for consistency. - - if ((icldflg == 0 .and. iswcliq /= 0) .or. & - & (icldflg == 1 .and. iswcliq == 0)) then - print *,' *** Model cloud scheme inconsistent with SW', & - & ' radiation cloud radiative property setup !!' - stop - endif - - if ( isubcsw==0 .and. iovrsw>2 ) then - if (me == 0) then - print *,' *** IOVRSW=',iovrsw,' is not available for', & - & ' ISUBCSW=0 setting!!' - print *,' The program will use maximum/random overlap', & - & ' instead.' - endif - - iovrsw = 1 - endif - -!> -# Setup constant factors for heating rate -!! the 1.0e-2 is to convert pressure from mb to \f$N/m^2\f$ . - - if (iswrate == 1) then -! heatfac = 8.4391 -! heatfac = con_g * 86400. * 1.0e-2 / con_cp ! (in k/day) - heatfac = con_g * 864.0 / con_cp ! (in k/day) - else - heatfac = con_g * 1.0e-2 / con_cp ! (in k/second) - endif - -!> -# Define exponential lookup tables for transmittance. -! tau is computed as a function of the \a tau transition function, and -! transmittance is calculated as a function of tau. all tables -! are computed at intervals of 0.0001. the inverse of the -! constant used in the Pade approximation to the tau transition -! function is set to bpade. - - exp_tbl(0) = 1.0 - exp_tbl(NTBMX) = expeps - - do i = 1, NTBMX-1 - tfn = float(i) / float(NTBMX-i) - tau = bpade * tfn - exp_tbl(i) = exp( -tau ) - enddo - - return -!................................... - end subroutine rswinit -!! @} -!----------------------------------- - -!>\ingroup module_radsw_main -!> This subroutine computes the cloud optical properties for each -!! cloudy layer and g-point interval. -!!\param cfrac layer cloud fraction -!!\n for physparam::iswcliq > 0 (prognostic cloud scheme) - - - -!!\param cliqp layer in-cloud liq water path (\f$g/m^2\f$) -!!\param reliq mean eff radius for liq cloud (micron) -!!\param cicep layer in-cloud ice water path (\f$g/m^2\f$) -!!\param reice mean eff radius for ice cloud (micron) -!!\param cdat1 layer rain drop water path (\f$g/m^2\f$) -!!\param cdat2 effective radius for rain drop (micron) -!!\param cdat3 layer snow flake water path(\f$g/m^2\f$) -!!\param cdat4 mean eff radius for snow flake(micron) -!!\n for physparam::iswcliq = 0 (diagnostic cloud scheme) - - - -!!\param cliqp not used -!!\param cicep not used -!!\param reliq not used -!!\param reice not used -!!\param cdat1 layer cloud optical depth -!!\param cdat2 layer cloud single scattering albedo -!!\param cdat3 layer cloud asymmetry factor -!!\param cdat4 optional use -!!\param cf1 effective total cloud cover at surface -!!\param nlay vertical layer number -!!\param ipseed permutation seed for generating random numbers -!! (isubcsw>0) -!!\param dz layer thickness (km) -!!\param delgth layer cloud decorrelation length (km) -!!\param taucw cloud optical depth, w/o delta scaled -!!\param ssacw weighted cloud single scattering albedo -!! (ssa = ssacw / taucw) -!!\param asycw weighted cloud asymmetry factor -!! (asy = asycw / ssacw) -!!\param cldfrc cloud fraction of grid mean value -!!\param cldfmc cloud fraction for each sub-column -!!\section General_cldprop cldprop General Algorithm -!> @{ -!----------------------------------- - subroutine cldprop & - & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & cf1, nlay, ipseed, dz, delgth, iswcliq, & - & taucw, ssacw, asycw, cldfrc, cldfmc & ! --- output - & ) - -! =================== program usage description =================== ! -! ! -! Purpose: Compute the cloud optical properties for each cloudy layer ! -! and g-point interval. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: size ! -! cfrac - real, layer cloud fraction nlay ! -! ..... for iswcliq > 0 (prognostic cloud scheme) - - - ! -! cliqp - real, layer in-cloud liq water path (g/m**2) nlay ! -! reliq - real, mean eff radius for liq cloud (micron) nlay ! -! cicep - real, layer in-cloud ice water path (g/m**2) nlay ! -! reice - real, mean eff radius for ice cloud (micron) nlay ! -! cdat1 - real, layer rain drop water path (g/m**2) nlay ! -! cdat2 - real, effective radius for rain drop (micron) nlay ! -! cdat3 - real, layer snow flake water path(g/m**2) nlay ! -! cdat4 - real, mean eff radius for snow flake(micron) nlay ! -! ..... for iswcliq = 0 (diagnostic cloud scheme) - - - ! -! cdat1 - real, layer cloud optical depth nlay ! -! cdat2 - real, layer cloud single scattering albedo nlay ! -! cdat3 - real, layer cloud asymmetry factor nlay ! -! cdat4 - real, optional use nlay ! -! cliqp - real, not used nlay ! -! cicep - real, not used nlay ! -! reliq - real, not used nlay ! -! reice - real, not used nlay ! -! ! -! cf1 - real, effective total cloud cover at surface 1 ! -! nlay - integer, vertical layer number 1 ! -! ipseed- permutation seed for generating random numbers (isubcsw>0) ! -! dz - real, layer thickness (km) nlay ! -! delgth- real, layer cloud decorrelation length (km) 1 ! -! ! -! outputs: ! -! taucw - real, cloud optical depth, w/o delta scaled nlay*nbdsw ! -! ssacw - real, weighted cloud single scattering albedo nlay*nbdsw ! -! (ssa = ssacw / taucw) ! -! asycw - real, weighted cloud asymmetry factor nlay*nbdsw ! -! (asy = asycw / ssacw) ! -! cldfrc - real, cloud fraction of grid mean value nlay ! -! cldfmc - real, cloud fraction for each sub-column nlay*ngptsw! -! ! -! ! -! explanation of the method for each value of iswcliq, and iswcice. ! -! set up in module "physparam" ! -! ! -! iswcliq=0 : input cloud optical property (tau, ssa, asy). ! -! (used for diagnostic cloud method) ! -! iswcliq>0 : input cloud liq/ice path and effective radius, also ! -! require the user of 'iswcice' to specify the method ! -! used to compute aborption due to water/ice parts. ! -! ................................................................... ! -! ! -! iswcliq=1 : liquid water cloud optical properties are computed ! -! as in hu and stamnes (1993), j. clim., 6, 728-742. ! -! iswcliq=2 : updated coeffs for hu and stamnes (1993) by aer ! -! w v3.9-v4.0. ! -! ! -! iswcice used only when iswcliq > 0 ! -! the cloud ice path (g/m2) and ice effective radius ! -! (microns) are inputs. ! -! iswcice=1 : ice cloud optical properties are computed as in ! -! ebert and curry (1992), jgr, 97, 3831-3836. ! -! iswcice=2 : ice cloud optical properties are computed as in ! -! streamer v3.0 (2001), key, streamer user's guide, ! -! cooperative institude for meteorological studies,95pp! -! iswcice=3 : ice cloud optical properties are computed as in ! -! fu (1996), j. clim., 9. ! -! ! -! other cloud control module variables: ! -! isubcsw =0: standard cloud scheme, no sub-col cloud approximation ! -! >0: mcica sub-col cloud scheme using ipseed as permutation! -! seed for generating rundom numbers ! -! ! -! ====================== end of description block ================= ! -! - use module_radsw_cldprtb - -! --- inputs: - integer, intent(in) :: nlay, ipseed, iswcliq - real (kind=kind_phys), intent(in) :: cf1, delgth - - real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & - & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, cfrac, dz - -! --- outputs: - real (kind=kind_phys), dimension(nlay,ngptsw), intent(out) :: & - & cldfmc - real (kind=kind_phys), dimension(nlay,nbdsw), intent(out) :: & - & taucw, ssacw, asycw - real (kind=kind_phys), dimension(nlay), intent(out) :: cldfrc - -! --- locals: - real (kind=kind_phys), dimension(nblow:nbhgh) :: tauliq, tauice, & - & ssaliq, ssaice, ssaran, ssasnw, asyliq, asyice, & - & asyran, asysnw - real (kind=kind_phys), dimension(nlay) :: cldf - - real (kind=kind_phys) :: dgeice, factor, fint, tauran, tausnw, & - & cldliq, refliq, cldice, refice, cldran, cldsnw, refsnw, & - & extcoliq, ssacoliq, asycoliq, extcoice, ssacoice, asycoice,& - & dgesnw - - logical :: lcloudy(nlay,ngptsw) - integer :: ia, ib, ig, jb, k, index - -! -!===> ... begin here -! - do ib = 1, nbdsw - do k = 1, nlay - taucw (k,ib) = f_zero - ssacw (k,ib) = f_one - asycw (k,ib) = f_zero - enddo - enddo - -!> -# Compute cloud radiative properties for a cloudy column. - - lab_if_iswcliq : if (iswcliq > 0) then - - lab_do_k : do k = 1, nlay - lab_if_cld : if (cfrac(k) > ftiny) then - -!> - Compute optical properties for rain and snow. -!!\n For rain: tauran/ssaran/asyran -!!\n For snow: tausnw/ssasnw/asysnw -!> - Calculation of absorption coefficients due to water clouds -!!\n For water clouds: tauliq/ssaliq/asyliq -!> - Calculation of absorption coefficients due to ice clouds -!!\n For ice clouds: tauice/ssaice/asyice -!> - For Prognostic cloud scheme: sum up the cloud optical property: -!!\n \f$ taucw=tauliq+tauice+tauran+tausnw \f$ -!!\n \f$ ssacw=ssaliq+ssaice+ssaran+ssasnw \f$ -!!\n \f$ asycw=asyliq+asyice+asyran+asysnw \f$ - - cldran = cdat1(k) -! refran = cdat2(k) - cldsnw = cdat3(k) - refsnw = cdat4(k) - dgesnw = 1.0315 * refsnw ! for fu's snow formula - - tauran = cldran * a0r - -!> - If use fu's formula it needs to be normalized by snow/ice density. -!! not use snow density = 0.1 g/cm**3 = 0.1 g/(mu * m**2) -!!\n use ice density = 0.9167 g/cm**3 = 0.9167 g/(mu * m**2) -!!\n 1/0.9167 = 1.09087 -!!\n factor 1.5396=8/(3*sqrt(3)) converts reff to generalized ice particle size -!! use newer factor value 1.0315 - if (cldsnw>f_zero .and. refsnw>10.0_kind_phys) then -! tausnw = cldsnw * (a0s + a1s/refsnw) - tausnw = cldsnw*1.09087*(a0s + a1s/dgesnw) ! fu's formula - else - tausnw = f_zero - endif - - do ib = nblow, nbhgh - ssaran(ib) = tauran * (f_one - b0r(ib)) - ssasnw(ib) = tausnw * (f_one - (b0s(ib)+b1s(ib)*dgesnw)) - asyran(ib) = ssaran(ib) * c0r(ib) - asysnw(ib) = ssasnw(ib) * c0s(ib) - enddo - - cldliq = cliqp(k) - cldice = cicep(k) - refliq = reliq(k) - refice = reice(k) - -!> - Calculation of absorption coefficients due to water clouds. - - if ( cldliq <= f_zero ) then - do ib = nblow, nbhgh - tauliq(ib) = f_zero - ssaliq(ib) = f_zero - asyliq(ib) = f_zero - enddo - else - factor = refliq - 1.5 - index = max( 1, min( 57, int( factor ) )) - fint = factor - float(index) - - if ( iswcliq == 1 ) then - do ib = nblow, nbhgh - extcoliq = max(f_zero, extliq1(index,ib) & - & + fint*(extliq1(index+1,ib)-extliq1(index,ib)) ) - ssacoliq = max(f_zero, min(f_one, ssaliq1(index,ib) & - & + fint*(ssaliq1(index+1,ib)-ssaliq1(index,ib)) )) - - asycoliq = max(f_zero, min(f_one, asyliq1(index,ib) & - & + fint*(asyliq1(index+1,ib)-asyliq1(index,ib)) )) -! forcoliq = asycoliq * asycoliq - - tauliq(ib) = cldliq * extcoliq - ssaliq(ib) = tauliq(ib) * ssacoliq - asyliq(ib) = ssaliq(ib) * asycoliq - enddo - elseif ( iswcliq == 2 ) then ! use updated coeffs - do ib = nblow, nbhgh - extcoliq = max(f_zero, extliq2(index,ib) & - & + fint*(extliq2(index+1,ib)-extliq2(index,ib)) ) - ssacoliq = max(f_zero, min(f_one, ssaliq2(index,ib) & - & + fint*(ssaliq2(index+1,ib)-ssaliq2(index,ib)) )) - - asycoliq = max(f_zero, min(f_one, asyliq2(index,ib) & - & + fint*(asyliq2(index+1,ib)-asyliq2(index,ib)) )) -! forcoliq = asycoliq * asycoliq - - tauliq(ib) = cldliq * extcoliq - ssaliq(ib) = tauliq(ib) * ssacoliq - asyliq(ib) = ssaliq(ib) * asycoliq - enddo - endif ! end if_iswcliq_block - endif ! end if_cldliq_block - -!> - Calculation of absorption coefficients due to ice clouds. - - if ( cldice <= f_zero ) then - do ib = nblow, nbhgh - tauice(ib) = f_zero - ssaice(ib) = f_zero - asyice(ib) = f_zero - enddo - else - -!> - ebert and curry approach for all particle sizes though somewhat -!! unjustified for large ice particles. - - if ( iswcice == 1 ) then - refice = min(130.0_kind_phys,max(13.0_kind_phys,refice)) - - do ib = nblow, nbhgh - ia = idxebc(ib) ! eb_&_c band index for ice cloud coeff - - extcoice = max(f_zero, abari(ia)+bbari(ia)/refice ) - ssacoice = max(f_zero, min(f_one, & - & f_one-cbari(ia)-dbari(ia)*refice )) - asycoice = max(f_zero, min(f_one, & - & ebari(ia)+fbari(ia)*refice )) -! forcoice = asycoice * asycoice - - tauice(ib) = cldice * extcoice - ssaice(ib) = tauice(ib) * ssacoice - asyice(ib) = ssaice(ib) * asycoice - enddo - -!> - streamer approach for ice effective radius between 5.0 and 131.0 microns. - - elseif ( iswcice == 2 ) then - refice = min(131.0_kind_phys,max(5.0_kind_phys,refice)) - - factor = (refice - 2.0) / 3.0 - index = max( 1, min( 42, int( factor ) )) - fint = factor - float(index) - - do ib = nblow, nbhgh - extcoice = max(f_zero, extice2(index,ib) & - & + fint*(extice2(index+1,ib)-extice2(index,ib)) ) - ssacoice = max(f_zero, min(f_one, ssaice2(index,ib) & - & + fint*(ssaice2(index+1,ib)-ssaice2(index,ib)) )) - asycoice = max(f_zero, min(f_one, asyice2(index,ib) & - & + fint*(asyice2(index+1,ib)-asyice2(index,ib)) )) -! forcoice = asycoice * asycoice - - tauice(ib) = cldice * extcoice - ssaice(ib) = tauice(ib) * ssacoice - asyice(ib) = ssaice(ib) * asycoice - enddo - -!> - fu's approach for ice effective radius between 4.8 and 135 microns -!! (generalized effective size from 5 to 140 microns). - - elseif ( iswcice == 3 ) then - dgeice = max( 5.0, min( 140.0, 1.0315*refice )) - - factor = (dgeice - 2.0) / 3.0 - index = max( 1, min( 45, int( factor ) )) - fint = factor - float(index) - - do ib = nblow, nbhgh - extcoice = max(f_zero, extice3(index,ib) & - & + fint*(extice3(index+1,ib)-extice3(index,ib)) ) - ssacoice = max(f_zero, min(f_one, ssaice3(index,ib) & - & + fint*(ssaice3(index+1,ib)-ssaice3(index,ib)) )) - asycoice = max(f_zero, min(f_one, asyice3(index,ib) & - & + fint*(asyice3(index+1,ib)-asyice3(index,ib)) )) -! fdelta = max(f_zero, min(f_one, fdlice3(index,ib) & -! & + fint*(fdlice3(index+1,ib)-fdlice3(index,ib)) )) -! forcoice = min( asycoice, fdelta+0.5/ssacoice ) ! see fu 1996 p. 2067 - - tauice(ib) = cldice * extcoice - ssaice(ib) = tauice(ib) * ssacoice - asyice(ib) = ssaice(ib) * asycoice - enddo - - endif ! end if_iswcice_block - endif ! end if_cldice_block - - do ib = 1, nbdsw - jb = nblow + ib - 1 - taucw(k,ib) = tauliq(jb)+tauice(jb)+tauran+tausnw - ssacw(k,ib) = ssaliq(jb)+ssaice(jb)+ssaran(jb)+ssasnw(jb) - asycw(k,ib) = asyliq(jb)+asyice(jb)+asyran(jb)+asysnw(jb) - enddo - - endif lab_if_cld - enddo lab_do_k - - else lab_if_iswcliq - - do k = 1, nlay - if (cfrac(k) > ftiny) then - do ib = 1, nbdsw - taucw(k,ib) = cdat1(k) - ssacw(k,ib) = cdat1(k) * cdat2(k) - asycw(k,ib) = ssacw(k,ib) * cdat3(k) - enddo - endif - enddo - - endif lab_if_iswcliq - -!> -# if physparam::isubcsw > 0, call mcica_subcol() to distribute -!! cloud properties to each g-point. - - if ( isubcsw > 0 ) then ! mcica sub-col clouds approx - - cldf(:) = cfrac(:) - where (cldf(:) < ftiny) - cldf(:) = f_zero - end where - -! --- ... call sub-column cloud generator - - call mcica_subcol & -! --- inputs: - & ( cldf, nlay, ipseed, dz, delgth, & -! --- outputs: - & lcloudy & - & ) - - do ig = 1, ngptsw - do k = 1, nlay - if ( lcloudy(k,ig) ) then - cldfmc(k,ig) = f_one - else - cldfmc(k,ig) = f_zero - endif - enddo - enddo - - else ! non-mcica, normalize cloud - - do k = 1, nlay - cldfrc(k) = cfrac(k) / cf1 - enddo - endif ! end if_isubcsw_block - - return -!................................... - end subroutine cldprop -!----------------------------------- -!> @} - -!>\ingroup module_radsw_main -!> This subroutine computes the sub-colum cloud profile flag array. -!!\param cldf layer cloud fraction -!!\param nlay number of model vertical layers -!!\param ipseed permute seed for random num generator -!!\param dz layer thickness (km) -!!\param de_lgth layer cloud decorrelation length (km) -!!\param lcloudy sub-colum cloud profile flag array -!!\section mcica_sw_gen mcica_subcol General Algorithm -!> @{ -! ---------------------------------- - subroutine mcica_subcol & - & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- inputs - & lcloudy & ! --- outputs - & ) - -! ==================== defination of variables ==================== ! -! ! -! input variables: size ! -! cldf - real, layer cloud fraction nlay ! -! nlay - integer, number of model vertical layers 1 ! -! ipseed - integer, permute seed for random num generator 1 ! -! ** note : if the cloud generator is called multiple times, need ! -! to permute the seed between each call; if between calls ! -! for lw and sw, use values differ by the number of g-pts. ! -! dz - real, layer thickness (km) nlay ! -! de_lgth-real, layer cloud decorrelation length (km) 1 ! -! ! -! output variables: ! -! lcloudy - logical, sub-colum cloud profile flag array nlay*ngptsw! -! ! -! other control flags from module variables: ! -! iovrsw : control flag for cloud overlapping method ! -! =0: random ! -! =1: maximum/random overlapping clouds ! -! =2: maximum overlap cloud ! -! =3: cloud decorrelation-length overlap method ! -! ! -! ===================== end of definitions ==================== ! - - implicit none - -! --- inputs: - integer, intent(in) :: nlay, ipseed - - real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz - real (kind=kind_phys), intent(in) :: de_lgth - -! --- outputs: - logical, dimension(nlay,ngptsw), intent(out):: lcloudy - -! --- locals: - real (kind=kind_phys) :: cdfunc(nlay,ngptsw), tem1, & - & rand2d(nlay*ngptsw), rand1d(ngptsw), fac_lcf(nlay), & - & cdfun2(nlay,ngptsw) - - type (random_stat) :: stat ! for thread safe random generator - - integer :: k, n, k1 -! -!===> ... begin here -! -!> -# Advance randum number generator by ipseed values. - - call random_setseed & -! --- inputs: - & ( ipseed, & -! --- outputs: - & stat & - & ) - -!> -# Sub-column set up according to overlapping assumption. - - select case ( iovrsw ) - - case( 0 ) ! random overlap, pick a random value at every level - - call random_number & -! --- inputs: ( none ) -! --- outputs: - & ( rand2d, stat ) - - k1 = 0 - do n = 1, ngptsw - do k = 1, nlay - k1 = k1 + 1 - cdfunc(k,n) = rand2d(k1) - enddo - enddo - - case( 1 ) ! max-ran overlap - - call random_number & -! --- inputs: ( none ) -! --- outputs: - & ( rand2d, stat ) - - k1 = 0 - do n = 1, ngptsw - do k = 1, nlay - k1 = k1 + 1 - cdfunc(k,n) = rand2d(k1) - enddo - enddo - -! --- first pick a random number for bottom/top layer. -! then walk up the column: (aer's code) -! if layer below is cloudy, use the same rand num in the layer below -! if layer below is clear, use a new random number - -! --- from bottom up - do k = 2, nlay - k1 = k - 1 - tem1 = f_one - cldf(k1) - - do n = 1, ngptsw - if ( cdfunc(k1,n) > tem1 ) then - cdfunc(k,n) = cdfunc(k1,n) - else - cdfunc(k,n) = cdfunc(k,n) * tem1 - endif - enddo - enddo - -! --- then walk down the column: (if use original author's method) -! if layer above is cloudy, use the same rand num in the layer above -! if layer above is clear, use a new random number - -! --- from top down -! do k = nlay-1, 1, -1 -! k1 = k + 1 -! tem1 = f_one - cldf(k1) - -! do n = 1, ngptsw -! if ( cdfunc(k1,n) > tem1 ) then -! cdfunc(k,n) = cdfunc(k1,n) -! else -! cdfunc(k,n) = cdfunc(k,n) * tem1 -! endif -! enddo -! enddo - - case( 2 ) ! maximum overlap, pick same random numebr at every level - - call random_number & -! --- inputs: ( none ) -! --- outputs: - & ( rand1d, stat ) - - do n = 1, ngptsw - tem1 = rand1d(n) - - do k = 1, nlay - cdfunc(k,n) = tem1 - enddo - enddo - - case( 3 ) ! decorrelation length overlap - -! --- compute overlapping factors based on layer midpoint distances -! and decorrelation depths - - do k = nlay, 2, -1 - fac_lcf(k) = exp( -0.5 * (dz(k)+dz(k-1)) / de_lgth ) - enddo - -! --- setup 2 sets of random numbers - - call random_number ( rand2d, stat ) - - k1 = 0 - do n = 1, ngptsw - do k = 1, nlay - k1 = k1 + 1 - cdfunc(k,n) = rand2d(k1) - enddo - enddo - - call random_number ( rand2d, stat ) - - k1 = 0 - do n = 1, ngptsw - do k = 1, nlay - k1 = k1 + 1 - cdfun2(k,n) = rand2d(k1) - enddo - enddo - -! --- then working from the top down: -! if a random number (from an independent set -cdfun2) is smaller then the -! scale factor: use the upper layer's number, otherwise use a new random -! number (keep the original assigned one). - - do n = 1, ngptsw - do k = nlay-1, 1, -1 - k1 = k + 1 - if ( cdfun2(k,n) <= fac_lcf(k1) ) then - cdfunc(k,n) = cdfunc(k1,n) - endif - enddo - enddo - - end select - -!> -# Generate subcolumns for homogeneous clouds. - - do k = 1, nlay - tem1 = f_one - cldf(k) - - do n = 1, ngptsw - lcloudy(k,n) = cdfunc(k,n) >= tem1 - enddo - enddo - - return -! .................................. - end subroutine mcica_subcol -!> @} -! ---------------------------------- - -!>\ingroup module_radsw_main -!> This subroutine computes various coefficients needed in radiative -!! transfer calculation. -!!\param pavel layer pressure (mb) -!!\param tavel layer temperature (k) -!!\param h2ovmr layer w.v. volumn mixing ratio (kg/kg) -!!\param nlay total number of vertical layers -!!\param nlp1 total number of vertical levels -!!\param laytrop tropopause layer index (unitless) -!!\param jp indices of lower reference pressure -!!\param jt,jt1 indices of lower reference temperatures at -!! levels of jp and jp+1 -!!\param fac00,fac01,fac10,fac11 factors mltiply the reference ks,i,j=0/1 for -!! lower/higher of the 2 appropriate temperature -!! and altitudes. -!!\param selffac scale factor for w. v. self-continuum equals -!! (w.v. density)/(atmospheric density at 296k -!! and 1013 mb) -!!\param selffrac factor for temperature interpolation of -!! reference w.v. self-continuum data -!!\param indself index of lower ref temp for selffac -!!\param forfac scale factor for w. v. foreign-continuum -!!\param forfrac factor for temperature interpolation of -!! reference w.v. foreign-continuum data -!!\param indfor index of lower ref temp for forfac -!>\section setcoef_gen_rw setcoef General Algorithm -!! @{ -! ---------------------------------- - subroutine setcoef & - & ( pavel,tavel,h2ovmr, nlay,nlp1, & ! --- inputs - & laytrop,jp,jt,jt1,fac00,fac01,fac10,fac11, & ! --- outputs - & selffac,selffrac,indself,forfac,forfrac,indfor & - & ) - -! =================== program usage description =================== ! -! ! -! purpose: compute various coefficients needed in radiative transfer ! -! calculations. ! -! ! -! subprograms called: none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: -size- ! -! pavel - real, layer pressures (mb) nlay ! -! tavel - real, layer temperatures (k) nlay ! -! h2ovmr - real, layer w.v. volum mixing ratio (kg/kg) nlay ! -! nlay/nlp1 - integer, total number of vertical layers, levels 1 ! -! ! -! outputs: ! -! laytrop - integer, tropopause layer index (unitless) 1 ! -! jp - real, indices of lower reference pressure nlay ! -! jt, jt1 - real, indices of lower reference temperatures nlay ! -! at levels of jp and jp+1 ! -! facij - real, factors multiply the reference ks, nlay ! -! i,j=0/1 for lower/higher of the 2 appropriate ! -! temperatures and altitudes. ! -! selffac - real, scale factor for w. v. self-continuum nlay ! -! equals (w. v. density)/(atmospheric density ! -! at 296k and 1013 mb) ! -! selffrac - real, factor for temperature interpolation of nlay ! -! reference w. v. self-continuum data ! -! indself - integer, index of lower ref temp for selffac nlay ! -! forfac - real, scale factor for w. v. foreign-continuum nlay ! -! forfrac - real, factor for temperature interpolation of nlay ! -! reference w.v. foreign-continuum data ! -! indfor - integer, index of lower ref temp for forfac nlay ! -! ! -! ====================== end of definitions =================== ! - -! --- inputs: - integer, intent(in) :: nlay, nlp1 - - real (kind=kind_phys), dimension(:), intent(in) :: pavel, tavel, & - & h2ovmr - -! --- outputs: - integer, dimension(nlay), intent(out) :: indself, indfor, & - & jp, jt, jt1 - integer, intent(out) :: laytrop - - real (kind=kind_phys), dimension(nlay), intent(out) :: fac00, & - & fac01, fac10, fac11, selffac, selffrac, forfac, forfrac - -! --- locals: - real (kind=kind_phys) :: plog, fp, fp1, ft, ft1, tem1, tem2 - - integer :: i, k, jp1 -! -!===> ... begin here -! - laytrop= nlay - - do k = 1, nlay - - forfac(k) = pavel(k)*stpfac / (tavel(k)*(f_one + h2ovmr(k))) - -!> -# Find the two reference pressures on either side of the -!! layer pressure. store them in jp and jp1. store in fp the -!! fraction of the difference (in ln(pressure)) between these -!! two values that the layer pressure lies. - - plog = log(pavel(k)) - jp(k) = max(1, min(58, int(36.0 - 5.0*(plog+0.04)) )) - jp1 = jp(k) + 1 - fp = 5.0 * (preflog(jp(k)) - plog) - -!> -# Determine, for each reference pressure (jp and jp1), which -!! reference temperature (these are different for each reference -!! pressure) is nearest the layer temperature but does not exceed it. -!! store these indices in jt and jt1, resp. store in ft (resp. ft1) -!! the fraction of the way between jt (jt1) and the next highest -!! reference temperature that the layer temperature falls. - - tem1 = (tavel(k) - tref(jp(k))) / 15.0 - tem2 = (tavel(k) - tref(jp1 )) / 15.0 - jt (k) = max(1, min(4, int(3.0 + tem1) )) - jt1(k) = max(1, min(4, int(3.0 + tem2) )) - ft = tem1 - float(jt (k) - 3) - ft1 = tem2 - float(jt1(k) - 3) - -!> -# We have now isolated the layer ln pressure and temperature, -!! between two reference pressures and two reference temperatures -!! (for each reference pressure). we multiply the pressure -!! fraction fp with the appropriate temperature fractions to get -!! the factors that will be needed for the interpolation that yields -!! the optical depths (performed in routines taugbn for band n). - - fp1 = f_one - fp - fac10(k) = fp1 * ft - fac00(k) = fp1 * (f_one - ft) - fac11(k) = fp * ft1 - fac01(k) = fp * (f_one - ft1) - -!> -# If the pressure is less than ~100mb, perform a different -!! set of species interpolations. - - if ( plog > 4.56 ) then - - laytrop = k - -!> -# Set up factors needed to separately include the water vapor -!! foreign-continuum in the calculation of absorption coefficient. - - tem1 = (332.0 - tavel(k)) / 36.0 - indfor (k) = min(2, max(1, int(tem1))) - forfrac(k) = tem1 - float(indfor(k)) - -!> -# Set up factors needed to separately include the water vapor -!! self-continuum in the calculation of absorption coefficient. - - tem2 = (tavel(k) - 188.0) / 7.2 - indself (k) = min(9, max(1, int(tem2)-7)) - selffrac(k) = tem2 - float(indself(k) + 7) - selffac (k) = h2ovmr(k) * forfac(k) - - else - -! --- ... set up factors needed to separately include the water vapor -! foreign-continuum in the calculation of absorption coefficient. - - tem1 = (tavel(k) - 188.0) / 36.0 - indfor (k) = 3 - forfrac(k) = tem1 - f_one - - indself (k) = 0 - selffrac(k) = f_zero - selffac (k) = f_zero - - endif - - enddo ! end_do_k_loop - - return -! .................................. - end subroutine setcoef -!! @} -! ---------------------------------- - -!>\ingroup module_radsw_main -!> This subroutine computes the shortwave radiative fluxes using -!! two-stream method. -!!\param ssolar incoming solar flux at top -!!\param cosz cosine solar zenith angle -!!\param sntz secant solar zenith angle -!!\param albbm surface albedo for direct beam radiation -!!\param albdf surface albedo for diffused radiation -!!\param sfluxzen spectral distribution of incoming solar flux -!!\param cldfrc layer cloud fraction -!!\param cf1 >0: cloudy sky, otherwise: clear sky -!!\param cf0 =1-cf1 -!!\param taug spectral optical depth for gases -!!\param taur optical depth for rayleigh scattering -!!\param tauae aerosols optical depth -!!\param ssaae aerosols single scattering albedo -!!\param asyae aerosols asymmetry factor -!!\param taucw weighted cloud optical depth -!!\param ssacw weighted cloud single scat albedo -!!\param asycw weighted cloud asymmetry factor -!!\param nlay,nlp1 number of layers/levels -!!\param fxupc tot sky upward flux -!!\param fxdnc tot sky downward flux -!!\param fxup0 clr sky upward flux -!!\param fxdn0 clr sky downward flux -!!\param ftoauc tot sky toa upwd flux -!!\param ftoau0 clr sky toa upwd flux -!!\param ftoadc toa downward (incoming) solar flux -!!\param fsfcuc tot sky sfc upwd flux -!!\param fsfcu0 clr sky sfc upwd flux -!!\param fsfcdc tot sky sfc dnwd flux -!!\param fsfcd0 clr sky sfc dnwd flux -!!\param sfbmc tot sky sfc dnwd beam flux (nir/uv+vis) -!!\param sfdfc tot sky sfc dnwd diff flux (nir/uv+vis) -!!\param sfbm0 clr sky sfc dnwd beam flux (nir/uv+vis) -!!\param sfdf0 clr sky sfc dnwd diff flux (nir/uv+vis) -!!\param suvbfc tot sky sfc dnwd uv-b flux -!!\param suvbf0 clr sky sfc dnwd uv-b flux -!>\section General_spcvrtc spcvrtc General Algorithm -!! @{ -!----------------------------------- - subroutine spcvrtc & - & ( ssolar,cosz,sntz,albbm,albdf,sfluxzen,cldfrc, & ! --- inputs - & cf1,cf0,taug,taur,tauae,ssaae,asyae,taucw,ssacw,asycw, & - & nlay, nlp1, & - & fxupc,fxdnc,fxup0,fxdn0, & ! --- outputs - & ftoauc,ftoau0,ftoadc,fsfcuc,fsfcu0,fsfcdc,fsfcd0, & - & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & - & ) - -! =================== program usage description =================== ! -! ! -! purpose: computes the shortwave radiative fluxes using two-stream ! -! method ! -! ! -! subprograms called: vrtqdr ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: size ! -! ssolar - real, incoming solar flux at top 1 ! -! cosz - real, cosine solar zenith angle 1 ! -! sntz - real, secant solar zenith angle 1 ! -! albbm - real, surface albedo for direct beam radiation 2 ! -! albdf - real, surface albedo for diffused radiation 2 ! -! sfluxzen- real, spectral distribution of incoming solar flux ngptsw! -! cldfrc - real, layer cloud fraction nlay ! -! cf1 - real, >0: cloudy sky, otherwise: clear sky 1 ! -! cf0 - real, =1-cf1 1 ! -! taug - real, spectral optical depth for gases nlay*ngptsw! -! taur - real, optical depth for rayleigh scattering nlay*ngptsw! -! tauae - real, aerosols optical depth nlay*nbdsw ! -! ssaae - real, aerosols single scattering albedo nlay*nbdsw ! -! asyae - real, aerosols asymmetry factor nlay*nbdsw ! -! taucw - real, weighted cloud optical depth nlay*nbdsw ! -! ssacw - real, weighted cloud single scat albedo nlay*nbdsw ! -! asycw - real, weighted cloud asymmetry factor nlay*nbdsw ! -! nlay,nlp1 - integer, number of layers/levels 1 ! -! ! -! output variables: ! -! fxupc - real, tot sky upward flux nlp1*nbdsw ! -! fxdnc - real, tot sky downward flux nlp1*nbdsw ! -! fxup0 - real, clr sky upward flux nlp1*nbdsw ! -! fxdn0 - real, clr sky downward flux nlp1*nbdsw ! -! ftoauc - real, tot sky toa upwd flux 1 ! -! ftoau0 - real, clr sky toa upwd flux 1 ! -! ftoadc - real, toa downward (incoming) solar flux 1 ! -! fsfcuc - real, tot sky sfc upwd flux 1 ! -! fsfcu0 - real, clr sky sfc upwd flux 1 ! -! fsfcdc - real, tot sky sfc dnwd flux 1 ! -! fsfcd0 - real, clr sky sfc dnwd flux 1 ! -! sfbmc - real, tot sky sfc dnwd beam flux (nir/uv+vis) 2 ! -! sfdfc - real, tot sky sfc dnwd diff flux (nir/uv+vis) 2 ! -! sfbm0 - real, clr sky sfc dnwd beam flux (nir/uv+vis) 2 ! -! sfdf0 - real, clr sky sfc dnwd diff flux (nir/uv+vis) 2 ! -! suvbfc - real, tot sky sfc dnwd uv-b flux 1 ! -! suvbf0 - real, clr sky sfc dnwd uv-b flux 1 ! -! ! -! internal variables: ! -! zrefb - real, direct beam reflectivity for clear/cloudy nlp1 ! -! zrefd - real, diffuse reflectivity for clear/cloudy nlp1 ! -! ztrab - real, direct beam transmissivity for clear/cloudy nlp1 ! -! ztrad - real, diffuse transmissivity for clear/cloudy nlp1 ! -! zldbt - real, layer beam transmittance for clear/cloudy nlp1 ! -! ztdbt - real, lev total beam transmittance for clr/cld nlp1 ! -! ! -! control parameters in module "physparam" ! -! iswmode - control flag for 2-stream transfer schemes ! -! = 1 delta-eddington (joseph et al., 1976) ! -! = 2 pifm (zdunkowski et al., 1980) ! -! = 3 discrete ordinates (liou, 1973) ! -! ! -! ******************************************************************* ! -! original code description ! -! ! -! method: ! -! ------- ! -! standard delta-eddington, p.i.f.m., or d.o.m. layer calculations. ! -! kmodts = 1 eddington (joseph et al., 1976) ! -! = 2 pifm (zdunkowski et al., 1980) ! -! = 3 discrete ordinates (liou, 1973) ! -! ! -! modifications: ! -! -------------- ! -! original: h. barker ! -! revision: merge with rrtmg_sw: j.-j.morcrette, ecmwf, feb 2003 ! -! revision: add adjustment for earth/sun distance:mjiacono,aer,oct2003! -! revision: bug fix for use of palbp and palbd: mjiacono, aer, nov2003! -! revision: bug fix to apply delta scaling to clear sky: aer, dec2004 ! -! revision: code modified so that delta scaling is not done in cloudy ! -! profiles if routine cldprop is used; delta scaling can be ! -! applied by swithcing code below if cldprop is not used to ! -! get cloud properties. aer, jan 2005 ! -! revision: uniform formatting for rrtmg: mjiacono, aer, jul 2006 ! -! revision: use exponential lookup table for transmittance: mjiacono, ! -! aer, aug 2007 ! -! ! -! ******************************************************************* ! -! ====================== end of description block ================= ! - -! --- constant parameters: - real (kind=kind_phys), parameter :: zcrit = 0.9999995 ! thresold for conservative scattering - real (kind=kind_phys), parameter :: zsr3 = sqrt(3.0) - real (kind=kind_phys), parameter :: od_lo = 0.06 - real (kind=kind_phys), parameter :: eps1 = 1.0e-8 - -! --- inputs: - integer, intent(in) :: nlay, nlp1 - - real (kind=kind_phys), dimension(nlay,ngptsw), intent(in) :: & - & taug, taur - real (kind=kind_phys), dimension(nlay,nbdsw), intent(in) :: & - & taucw, ssacw, asycw, tauae, ssaae, asyae - - real (kind=kind_phys), dimension(ngptsw), intent(in) :: sfluxzen - real (kind=kind_phys), dimension(nlay), intent(in) :: cldfrc - - real (kind=kind_phys), dimension(2), intent(in) :: albbm, albdf - - real (kind=kind_phys), intent(in) :: cosz, sntz, cf1, cf0, ssolar - -! --- outputs: - real (kind=kind_phys), dimension(nlp1,nbdsw), intent(out) :: & - & fxupc, fxdnc, fxup0, fxdn0 - - real (kind=kind_phys), dimension(2), intent(out) :: sfbmc, sfdfc, & - & sfbm0, sfdf0 - - real (kind=kind_phys), intent(out) :: suvbfc, suvbf0, ftoadc, & - & ftoauc, ftoau0, fsfcuc, fsfcu0, fsfcdc, fsfcd0 - -! --- locals: - real (kind=kind_phys), dimension(nlay) :: ztaus, zssas, zasys, & - & zldbt0 - - real (kind=kind_phys), dimension(nlp1) :: zrefb, zrefd, ztrab, & - & ztrad, ztdbt, zldbt, zfu, zfd - - real (kind=kind_phys) :: ztau1, zssa1, zasy1, ztau0, zssa0, & - & zasy0, zasy3, zssaw, zasyw, zgam1, zgam2, zgam3, zgam4, & - & zc0, zc1, za1, za2, zb1, zb2, zrk, zrk2, zrp, zrp1, zrm1, & - & zrpp, zrkg1, zrkg3, zrkg4, zexp1, zexm1, zexp2, zexm2, & - & zexp3, zexp4, zden1, ze1r45, ftind, zsolar, zrefb1, & - & zrefd1, ztrab1, ztrad1, ztdbt0, zr1, zr2, zr3, zr4, zr5, & - & zt1, zt2, zt3, zf1, zf2, zrpp1 - - integer :: ib, ibd, jb, jg, k, kp, itind -! -!===> ... begin here - -!> -# Initialize output fluxes. - do ib = 1, nbdsw - do k = 1, nlp1 - fxdnc(k,ib) = f_zero - fxupc(k,ib) = f_zero - fxdn0(k,ib) = f_zero - fxup0(k,ib) = f_zero - enddo - enddo - - ftoadc = f_zero - ftoauc = f_zero - ftoau0 = f_zero - fsfcuc = f_zero - fsfcu0 = f_zero - fsfcdc = f_zero - fsfcd0 = f_zero - -!! --- ... uv-b surface downward fluxes - suvbfc = f_zero - suvbf0 = f_zero - -!! --- ... output surface flux components - sfbmc(1) = f_zero - sfbmc(2) = f_zero - sfdfc(1) = f_zero - sfdfc(2) = f_zero - sfbm0(1) = f_zero - sfbm0(2) = f_zero - sfdf0(1) = f_zero - sfdf0(2) = f_zero - -!> -# Loop over all g-points in each band. - - lab_do_jg : do jg = 1, ngptsw - - jb = NGB(jg) - ib = jb + 1 - nblow - ibd = idxsfc(jb) - - zsolar = ssolar * sfluxzen(jg) - -!> -# Set up toa direct beam and surface values (beam and diff). - - ztdbt(nlp1) = f_one - ztdbt0 = f_one - - zldbt(1) = f_zero - if (ibd /= 0) then - zrefb(1) = albbm(ibd) - zrefd(1) = albdf(ibd) - else - zrefb(1) = 0.5 * (albbm(1) + albbm(2)) - zrefd(1) = 0.5 * (albdf(1) + albdf(2)) - endif - ztrab(1) = f_zero - ztrad(1) = f_zero - -!> -# Compute clear-sky optical parameters, layer reflectance and -!! transmittance. -! - Set up toa direct beam and surface values (beam and diff). -! - Delta scaling for clear-sky condition. -! - General two-stream expressions for physparam::iswmode . -! - Compute homogeneous reflectance and transmittance for both -! conservative and non-conservative scattering. -! - Pre-delta-scaling clear and cloudy direct beam transmittance. -! - Call swflux() to compute the upward and downward radiation -! fluxes. - - do k = nlay, 1, -1 - kp = k + 1 - - ztau0 = max( ftiny, taur(k,jg)+taug(k,jg)+tauae(k,ib) ) - zssa0 = taur(k,jg) + tauae(k,ib)*ssaae(k,ib) - zasy0 = asyae(k,ib)*ssaae(k,ib)*tauae(k,ib) - zssaw = min( oneminus, zssa0 / ztau0 ) - zasyw = zasy0 / max( ftiny, zssa0 ) - -!> - Saving clear-sky quantities for later total-sky usage. - ztaus(k) = ztau0 - zssas(k) = zssa0 - zasys(k) = zasy0 - -!> - Delta scaling for clear-sky condition. - za1 = zasyw * zasyw - za2 = zssaw * za1 - - ztau1 = (f_one - za2) * ztau0 - zssa1 = (zssaw - za2) / (f_one - za2) -!org zasy1 = (zasyw - za1) / (f_one - za1) ! this line is replaced by the next - zasy1 = zasyw / (f_one + zasyw) ! to reduce truncation error - zasy3 = 0.75 * zasy1 - -!> - Perform general two-stream expressions: -!!\n control parameters in module "physparam" -!!\n iswmode - control flag for 2-stream transfer schemes -!!\n = 1 delta-eddington (joseph et al., 1976) -!!\n = 2 pifm (zdunkowski et al., 1980) -!!\n = 3 discrete ordinates (liou, 1973) - if ( iswmode == 1 ) then - zgam1 = 1.75 - zssa1 * (f_one + zasy3) - zgam2 =-0.25 + zssa1 * (f_one - zasy3) - zgam3 = 0.5 - zasy3 * cosz - elseif ( iswmode == 2 ) then ! pifm - zgam1 = 2.0 - zssa1 * (1.25 + zasy3) - zgam2 = 0.75* zssa1 * (f_one- zasy1) - zgam3 = 0.5 - zasy3 * cosz - elseif ( iswmode == 3 ) then ! discrete ordinates - zgam1 = zsr3 * (2.0 - zssa1 * (1.0 + zasy1)) * 0.5 - zgam2 = zsr3 * zssa1 * (1.0 - zasy1) * 0.5 - zgam3 = (1.0 - zsr3 * zasy1 * cosz) * 0.5 - endif - zgam4 = f_one - zgam3 - -!> - Compute homogeneous reflectance and transmittance for both conservative -!! scattering and non-conservative scattering. - - if ( zssaw >= zcrit ) then ! for conservative scattering - za1 = zgam1 * cosz - zgam3 - za2 = zgam1 * ztau1 - -! --- ... use exponential lookup table for transmittance, or expansion -! of exponential for low optical depth - - zb1 = min ( ztau1*sntz , 500.0 ) - if ( zb1 <= od_lo ) then - zb2 = f_one - zb1 + 0.5*zb1*zb1 - else - ftind = zb1 / (bpade + zb1) - itind = ftind*NTBMX + 0.5 - zb2 = exp_tbl(itind) - endif - -! ... collimated beam - zrefb(kp) = max(f_zero, min(f_one, & - & (za2 - za1*(f_one - zb2))/(f_one + za2) )) - ztrab(kp) = max(f_zero, min(f_one, f_one-zrefb(kp) )) - -! ... isotropic incidence - zrefd(kp) = max(f_zero, min(f_one, za2/(f_one + za2) )) - ztrad(kp) = max(f_zero, min(f_one, f_one-zrefd(kp) )) - - else ! for non-conservative scattering - za1 = zgam1*zgam4 + zgam2*zgam3 - za2 = zgam1*zgam3 + zgam2*zgam4 - zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) - zrk2= 2.0 * zrk - - zrp = zrk * cosz - zrp1 = f_one + zrp - zrm1 = f_one - zrp - zrpp1= f_one - zrp*zrp - zrpp = sign( max(flimit, abs(zrpp1)), zrpp1 ) ! avoid numerical singularity - zrkg1= zrk + zgam1 - zrkg3= zrk * zgam3 - zrkg4= zrk * zgam4 - - zr1 = zrm1 * (za2 + zrkg3) - zr2 = zrp1 * (za2 - zrkg3) - zr3 = zrk2 * (zgam3 - za2*cosz) - zr4 = zrpp * zrkg1 - zr5 = zrpp * (zrk - zgam1) - - zt1 = zrp1 * (za1 + zrkg4) - zt2 = zrm1 * (za1 - zrkg4) - zt3 = zrk2 * (zgam4 + za1*cosz) - -! --- ... use exponential lookup table for transmittance, or expansion -! of exponential for low optical depth - - zb1 = min ( zrk*ztau1, 500.0 ) - if ( zb1 <= od_lo ) then - zexm1 = f_one - zb1 + 0.5*zb1*zb1 - else - ftind = zb1 / (bpade + zb1) - itind = ftind*NTBMX + 0.5 - zexm1 = exp_tbl(itind) - endif - zexp1 = f_one / zexm1 - - zb2 = min ( sntz*ztau1, 500.0 ) - if ( zb2 <= od_lo ) then - zexm2 = f_one - zb2 + 0.5*zb2*zb2 - else - ftind = zb2 / (bpade + zb2) - itind = ftind*NTBMX + 0.5 - zexm2 = exp_tbl(itind) - endif - zexp2 = f_one / zexm2 - ze1r45 = zr4*zexp1 + zr5*zexm1 - -! ... collimated beam - if (ze1r45>=-eps1 .and. ze1r45<=eps1) then - zrefb(kp) = eps1 - ztrab(kp) = zexm2 - else - zden1 = zssa1 / ze1r45 - zrefb(kp) = max(f_zero, min(f_one, & - & (zr1*zexp1 - zr2*zexm1 - zr3*zexm2)*zden1 )) - ztrab(kp) = max(f_zero, min(f_one, zexm2*(f_one & - & - (zt1*zexp1 - zt2*zexm1 - zt3*zexp2)*zden1) )) - endif - -! ... diffuse beam - zden1 = zr4 / (ze1r45 * zrkg1) - zrefd(kp) = max(f_zero, min(f_one, & - & zgam2*(zexp1 - zexm1)*zden1 )) - ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) - endif ! end if_zssaw_block - -!> - Calculate direct beam transmittance. use exponential lookup table -!! for transmittance, or expansion of exponential for low optical depth. - - zr1 = ztau1 * sntz - if ( zr1 <= od_lo ) then - zexp3 = f_one - zr1 + 0.5*zr1*zr1 - else - ftind = zr1 / (bpade + zr1) - itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) - zexp3 = exp_tbl(itind) - endif - - ztdbt(k) = zexp3 * ztdbt(kp) - zldbt(kp) = zexp3 - -!> - Calculate pre-delta-scaling clear and cloudy direct beam transmittance. -! (must use 'orig', unscaled cloud optical depth) - - zr1 = ztau0 * sntz - if ( zr1 <= od_lo ) then - zexp4 = f_one - zr1 + 0.5*zr1*zr1 - else - ftind = zr1 / (bpade + zr1) - itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) - zexp4 = exp_tbl(itind) - endif - - zldbt0(k) = zexp4 - ztdbt0 = zexp4 * ztdbt0 - enddo ! end do_k_loop - -!> -# Call vrtqdr(), to compute the upward and downward radiation fluxes. - call vrtqdr & -! --- inputs: - & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & - & nlay, nlp1, & -! --- outputs: - & zfu, zfd & - & ) - -!> -# Compute upward and downward fluxes at levels. - do k = 1, nlp1 - fxup0(k,ib) = fxup0(k,ib) + zsolar*zfu(k) - fxdn0(k,ib) = fxdn0(k,ib) + zsolar*zfd(k) - enddo - -!> -# Compute surface downward beam/diffused flux components. - zb1 = zsolar*ztdbt0 - zb2 = zsolar*(zfd(1) - ztdbt0) - - if (ibd /= 0) then - sfbm0(ibd) = sfbm0(ibd) + zb1 - sfdf0(ibd) = sfdf0(ibd) + zb2 - else - zf1 = 0.5 * zb1 - zf2 = 0.5 * zb2 - sfbm0(1) = sfbm0(1) + zf1 - sfdf0(1) = sfdf0(1) + zf2 - sfbm0(2) = sfbm0(2) + zf1 - sfdf0(2) = sfdf0(2) + zf2 - endif -! sfbm0(ibd) = sfbm0(ibd) + zsolar*ztdbt0 -! sfdf0(ibd) = sfdf0(ibd) + zsolar*(zfd(1) - ztdbt0) - -!> -# Compute total sky optical parameters, layer reflectance and -!! transmittance. -! - Set up toa direct beam and surface values (beam and diff) -! - Delta scaling for total-sky condition -! - General two-stream expressions for physparam::iswmode -! - Compute homogeneous reflectance and transmittance for -! conservative scattering and non-conservative scattering -! - Pre-delta-scaling clear and cloudy direct beam transmittance -! - Call swflux() to compute the upward and downward radiation fluxes - - if ( cf1 > eps ) then - -!> - Set up toa direct beam and surface values (beam and diff). - ztdbt0 = f_one - zldbt(1) = f_zero - - do k = nlay, 1, -1 - kp = k + 1 - zc0 = f_one - cldfrc(k) - zc1 = cldfrc(k) - if ( zc1 > ftiny ) then ! it is a cloudy-layer - - ztau0 = ztaus(k) + taucw(k,ib) - zssa0 = zssas(k) + ssacw(k,ib) - zasy0 = zasys(k) + asycw(k,ib) - zssaw = min(oneminus, zssa0 / ztau0) - zasyw = zasy0 / max(ftiny, zssa0) - -!> - Perform delta scaling for total-sky condition. - za1 = zasyw * zasyw - za2 = zssaw * za1 - - ztau1 = (f_one - za2) * ztau0 - zssa1 = (zssaw - za2) / (f_one - za2) -!org zasy1 = (zasyw - za1) / (f_one - za1) - zasy1 = zasyw / (f_one + zasyw) - zasy3 = 0.75 * zasy1 - -!> - Perform general two-stream expressions: -!!\n control parameters in module "physparam" -!!\n iswmode - control flag for 2-stream transfer schemes -!!\n = 1 delta-eddington (joseph et al., 1976) -!!\n = 2 pifm (zdunkowski et al., 1980) -!!\n = 3 discrete ordinates (liou, 1973) - - if ( iswmode == 1 ) then - zgam1 = 1.75 - zssa1 * (f_one + zasy3) - zgam2 =-0.25 + zssa1 * (f_one - zasy3) - zgam3 = 0.5 - zasy3 * cosz - elseif ( iswmode == 2 ) then ! pifm - zgam1 = 2.0 - zssa1 * (1.25 + zasy3) - zgam2 = 0.75* zssa1 * (f_one- zasy1) - zgam3 = 0.5 - zasy3 * cosz - elseif ( iswmode == 3 ) then ! discrete ordinates - zgam1 = zsr3 * (2.0 - zssa1 * (1.0 + zasy1)) * 0.5 - zgam2 = zsr3 * zssa1 * (1.0 - zasy1) * 0.5 - zgam3 = (1.0 - zsr3 * zasy1 * cosz) * 0.5 - endif - zgam4 = f_one - zgam3 - - zrefb1 = zrefb(kp) - zrefd1 = zrefd(kp) - ztrab1 = ztrab(kp) - ztrad1 = ztrad(kp) - -!> - Compute homogeneous reflectance and transmittance for both conservative -!! and non-conservative scattering. - - if ( zssaw >= zcrit ) then ! for conservative scattering - za1 = zgam1 * cosz - zgam3 - za2 = zgam1 * ztau1 - -! --- ... use exponential lookup table for transmittance, or expansion -! of exponential for low optical depth - - zb1 = min ( ztau1*sntz , 500.0 ) - if ( zb1 <= od_lo ) then - zb2 = f_one - zb1 + 0.5*zb1*zb1 - else - ftind = zb1 / (bpade + zb1) - itind = ftind*NTBMX + 0.5 - zb2 = exp_tbl(itind) - endif - -! ... collimated beam - zrefb(kp) = max(f_zero, min(f_one, & - & (za2 - za1*(f_one - zb2))/(f_one + za2) )) - ztrab(kp) = max(f_zero, min(f_one, f_one-zrefb(kp))) - -! ... isotropic incidence - zrefd(kp) = max(f_zero, min(f_one, za2 / (f_one+za2) )) - ztrad(kp) = max(f_zero, min(f_one, f_one - zrefd(kp) )) - - else ! for non-conservative scattering - za1 = zgam1*zgam4 + zgam2*zgam3 - za2 = zgam1*zgam3 + zgam2*zgam4 - zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) - zrk2= 2.0 * zrk - - zrp = zrk * cosz - zrp1 = f_one + zrp - zrm1 = f_one - zrp - zrpp1= f_one - zrp*zrp - zrpp = sign( max(flimit, abs(zrpp1)), zrpp1 ) ! avoid numerical singularity - zrkg1= zrk + zgam1 - zrkg3= zrk * zgam3 - zrkg4= zrk * zgam4 - - zr1 = zrm1 * (za2 + zrkg3) - zr2 = zrp1 * (za2 - zrkg3) - zr3 = zrk2 * (zgam3 - za2*cosz) - zr4 = zrpp * zrkg1 - zr5 = zrpp * (zrk - zgam1) - - zt1 = zrp1 * (za1 + zrkg4) - zt2 = zrm1 * (za1 - zrkg4) - zt3 = zrk2 * (zgam4 + za1*cosz) - -! --- ... use exponential lookup table for transmittance, or expansion -! of exponential for low optical depth - - zb1 = min ( zrk*ztau1, 500.0 ) - if ( zb1 <= od_lo ) then - zexm1 = f_one - zb1 + 0.5*zb1*zb1 - else - ftind = zb1 / (bpade + zb1) - itind = ftind*NTBMX + 0.5 - zexm1 = exp_tbl(itind) - endif - zexp1 = f_one / zexm1 - - zb2 = min ( ztau1*sntz, 500.0 ) - if ( zb2 <= od_lo ) then - zexm2 = f_one - zb2 + 0.5*zb2*zb2 - else - ftind = zb2 / (bpade + zb2) - itind = ftind*NTBMX + 0.5 - zexm2 = exp_tbl(itind) - endif - zexp2 = f_one / zexm2 - ze1r45 = zr4*zexp1 + zr5*zexm1 - -! ... collimated beam - if ( ze1r45>=-eps1 .and. ze1r45<=eps1 ) then - zrefb(kp) = eps1 - ztrab(kp) = zexm2 - else - zden1 = zssa1 / ze1r45 - zrefb(kp) = max(f_zero, min(f_one, & - & (zr1*zexp1-zr2*zexm1-zr3*zexm2)*zden1 )) - ztrab(kp) = max(f_zero, min(f_one, zexm2*(f_one - & - & (zt1*zexp1-zt2*zexm1-zt3*zexp2)*zden1) )) - endif - -! ... diffuse beam - zden1 = zr4 / (ze1r45 * zrkg1) - zrefd(kp) = max(f_zero, min(f_one, & - & zgam2*(zexp1 - zexm1)*zden1 )) - ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) - endif ! end if_zssaw_block - -! --- ... combine clear and cloudy contributions for total sky -! and calculate direct beam transmittances - - zrefb(kp) = zc0*zrefb1 + zc1*zrefb(kp) - zrefd(kp) = zc0*zrefd1 + zc1*zrefd(kp) - ztrab(kp) = zc0*ztrab1 + zc1*ztrab(kp) - ztrad(kp) = zc0*ztrad1 + zc1*ztrad(kp) - -! --- ... direct beam transmittance. use exponential lookup table -! for transmittance, or expansion of exponential for low -! optical depth - - zr1 = ztau1 * sntz - if ( zr1 <= od_lo ) then - zexp3 = f_one - zr1 + 0.5*zr1*zr1 - else - ftind = zr1 / (bpade + zr1) - itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) - zexp3 = exp_tbl(itind) - endif - - zldbt(kp) = zc0*zldbt(kp) + zc1*zexp3 - ztdbt(k) = zldbt(kp) * ztdbt(kp) - -!> - Calculate pre-delta-scaling clear and cloudy direct beam transmittance. -! (must use 'orig', unscaled cloud optical depth) - - zr1 = ztau0 * sntz - if ( zr1 <= od_lo ) then - zexp4 = f_one - zr1 + 0.5*zr1*zr1 - else - ftind = zr1 / (bpade + zr1) - itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) - zexp4 = exp_tbl(itind) - endif - - ztdbt0 = (zc0*zldbt0(k) + zc1*zexp4) * ztdbt0 - - else ! if_zc1_block --- it is a clear layer - -! --- ... direct beam transmittance - ztdbt(k) = zldbt(kp) * ztdbt(kp) - -! --- ... pre-delta-scaling clear and cloudy direct beam transmittance - ztdbt0 = zldbt0(k) * ztdbt0 - - endif ! end if_zc1_block - enddo ! end do_k_loop - -!> -# Call vrtqdr(), to compute the upward and downward radiation fluxes. - - call vrtqdr & -! --- inputs: - & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & - & nlay, nlp1, & -! --- outputs: - & zfu, zfd & - & ) - -!> -# Compute upward and downward fluxes at levels. - do k = 1, nlp1 - fxupc(k,ib) = fxupc(k,ib) + zsolar*zfu(k) - fxdnc(k,ib) = fxdnc(k,ib) + zsolar*zfd(k) - enddo - -!> -# Process and save outputs. -!! - surface downward beam/diffused flux components - zb1 = zsolar*ztdbt0 - zb2 = zsolar*(zfd(1) - ztdbt0) - - if (ibd /= 0) then - sfbmc(ibd) = sfbmc(ibd) + zb1 - sfdfc(ibd) = sfdfc(ibd) + zb2 - else - zf1 = 0.5 * zb1 - zf2 = 0.5 * zb2 - sfbmc(1) = sfbmc(1) + zf1 - sfdfc(1) = sfdfc(1) + zf2 - sfbmc(2) = sfbmc(2) + zf1 - sfdfc(2) = sfdfc(2) + zf2 - endif -! sfbmc(ibd) = sfbmc(ibd) + zsolar*ztdbt0 -! sfdfc(ibd) = sfdfc(ibd) + zsolar*(zfd(1) - ztdbt0) - - endif ! end if_cf1_block - - enddo lab_do_jg - -! --- ... end of g-point loop - - do ib = 1, nbdsw - ftoadc = ftoadc + fxdn0(nlp1,ib) - ftoau0 = ftoau0 + fxup0(nlp1,ib) - fsfcu0 = fsfcu0 + fxup0(1,ib) - fsfcd0 = fsfcd0 + fxdn0(1,ib) - enddo - -!> - uv-b surface downward flux - ibd = nuvb - nblow + 1 - suvbf0 = fxdn0(1,ibd) - - if ( cf1 <= eps ) then ! clear column, set total-sky=clear-sky fluxes - do ib = 1, nbdsw - do k = 1, nlp1 - fxupc(k,ib) = fxup0(k,ib) - fxdnc(k,ib) = fxdn0(k,ib) - enddo - enddo - - ftoauc = ftoau0 - fsfcuc = fsfcu0 - fsfcdc = fsfcd0 - -!> - surface downward beam/diffused flux components - sfbmc(1) = sfbm0(1) - sfdfc(1) = sfdf0(1) - sfbmc(2) = sfbm0(2) - sfdfc(2) = sfdf0(2) - -!> - uv-b surface downward flux - suvbfc = suvbf0 - else ! cloudy column, compute total-sky fluxes - do ib = 1, nbdsw - do k = 1, nlp1 - fxupc(k,ib) = cf1*fxupc(k,ib) + cf0*fxup0(k,ib) - fxdnc(k,ib) = cf1*fxdnc(k,ib) + cf0*fxdn0(k,ib) - enddo - enddo - - do ib = 1, nbdsw - ftoauc = ftoauc + fxupc(nlp1,ib) - fsfcuc = fsfcuc + fxupc(1,ib) - fsfcdc = fsfcdc + fxdnc(1,ib) - enddo - -!> - uv-b surface downward flux - suvbfc = fxdnc(1,ibd) - -!> - surface downward beam/diffused flux components - sfbmc(1) = cf1*sfbmc(1) + cf0*sfbm0(1) - sfbmc(2) = cf1*sfbmc(2) + cf0*sfbm0(2) - sfdfc(1) = cf1*sfdfc(1) + cf0*sfdf0(1) - sfdfc(2) = cf1*sfdfc(2) + cf0*sfdf0(2) - endif ! end if_cf1_block - - return -!................................... - end subroutine spcvrtc -!----------------------------------- -!> @} - -!>\ingroup module_radsw_main -!> This subroutine computes the shortwave radiative fluxes using -!! two-stream method of h. barder and mcica,the monte-carlo independent -!! column approximation, for the representation of sub-grid cloud -!! variability (i.e. cloud overlap). -!!\param ssolar incoming solar flux at top -!!\param cosz cosine solar zenith angle -!!\param sntz secant solar zenith angle -!!\param albbm surface albedo for direct beam radiation -!!\param albdf surface albedo for diffused radiation -!!\param sfluxzen spectral distribution of incoming solar flux -!!\param cldfmc layer cloud fraction for g-point -!!\param cf1 >0: cloudy sky, otherwise: clear sky -!!\param cf0 =1-cf1 -!!\param taug spectral optical depth for gases -!!\param taur optical depth for rayleigh scattering -!!\param tauae aerosols optical depth -!!\param ssaae aerosols single scattering albedo -!!\param asyae aerosols asymmetry factor -!!\param taucw weighted cloud optical depth -!!\param ssacw weighted cloud single scat albedo -!!\param asycw weighted cloud asymmetry factor -!!\param nlay,nlp1 number of layers/levels -!!\param fxupc tot sky upward flux -!!\param fxdnc tot sky downward flux -!!\param fxup0 clr sky upward flux -!!\param fxdn0 clr sky downward flux -!!\param ftoauc tot sky toa upwd flux -!!\param ftoau0 clr sky toa upwd flux -!!\param ftoadc toa downward (incoming) solar flux -!!\param fsfcuc tot sky sfc upwd flux -!!\param fsfcu0 clr sky sfc upwd flux -!!\param fsfcdc tot sky sfc dnwd flux -!!\param fsfcd0 clr sky sfc dnwd flux -!!\param sfbmc tot sky sfc dnwd beam flux (nir/uv+vis) -!!\param sfdfc tot sky sfc dnwd diff flux (nir/uv+vis) -!!\param sfbm0 clr sky sfc dnwd beam flux (nir/uv+vis) -!!\param sfdf0 clr sky sfc dnwd diff flux (nir/uv+vis) -!!\param suvbfc tot sky sfc dnwd uv-b flux -!!\param suvbf0 clr sky sfc dnwd uv-b flux -!>\section spcvrtm_gen spcvrtm General Algorithm -!! @{ -!----------------------------------- - subroutine spcvrtm & - & ( ssolar,cosz,sntz,albbm,albdf,sfluxzen,cldfmc, & ! --- inputs - & cf1,cf0,taug,taur,tauae,ssaae,asyae,taucw,ssacw,asycw, & - & nlay, nlp1, & - & fxupc,fxdnc,fxup0,fxdn0, & ! --- outputs - & ftoauc,ftoau0,ftoadc,fsfcuc,fsfcu0,fsfcdc,fsfcd0, & - & sfbmc,sfdfc,sfbm0,sfdf0,suvbfc,suvbf0 & - & ) - -! =================== program usage description =================== ! -! ! -! purpose: computes the shortwave radiative fluxes using two-stream ! -! method of h. barker and mcica, the monte-carlo independent! -! column approximation, for the representation of sub-grid ! -! cloud variability (i.e. cloud overlap). ! -! ! -! subprograms called: vrtqdr ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: size ! -! ssolar - real, incoming solar flux at top 1 ! -! cosz - real, cosine solar zenith angle 1 ! -! sntz - real, secant solar zenith angle 1 ! -! albbm - real, surface albedo for direct beam radiation 2 ! -! albdf - real, surface albedo for diffused radiation 2 ! -! sfluxzen- real, spectral distribution of incoming solar flux ngptsw! -! cldfmc - real, layer cloud fraction for g-point nlay*ngptsw! -! cf1 - real, >0: cloudy sky, otherwise: clear sky 1 ! -! cf0 - real, =1-cf1 1 ! -! taug - real, spectral optical depth for gases nlay*ngptsw! -! taur - real, optical depth for rayleigh scattering nlay*ngptsw! -! tauae - real, aerosols optical depth nlay*nbdsw ! -! ssaae - real, aerosols single scattering albedo nlay*nbdsw ! -! asyae - real, aerosols asymmetry factor nlay*nbdsw ! -! taucw - real, weighted cloud optical depth nlay*nbdsw ! -! ssacw - real, weighted cloud single scat albedo nlay*nbdsw ! -! asycw - real, weighted cloud asymmetry factor nlay*nbdsw ! -! nlay,nlp1 - integer, number of layers/levels 1 ! -! ! -! output variables: ! -! fxupc - real, tot sky upward flux nlp1*nbdsw ! -! fxdnc - real, tot sky downward flux nlp1*nbdsw ! -! fxup0 - real, clr sky upward flux nlp1*nbdsw ! -! fxdn0 - real, clr sky downward flux nlp1*nbdsw ! -! ftoauc - real, tot sky toa upwd flux 1 ! -! ftoau0 - real, clr sky toa upwd flux 1 ! -! ftoadc - real, toa downward (incoming) solar flux 1 ! -! fsfcuc - real, tot sky sfc upwd flux 1 ! -! fsfcu0 - real, clr sky sfc upwd flux 1 ! -! fsfcdc - real, tot sky sfc dnwd flux 1 ! -! fsfcd0 - real, clr sky sfc dnwd flux 1 ! -! sfbmc - real, tot sky sfc dnwd beam flux (nir/uv+vis) 2 ! -! sfdfc - real, tot sky sfc dnwd diff flux (nir/uv+vis) 2 ! -! sfbm0 - real, clr sky sfc dnwd beam flux (nir/uv+vis) 2 ! -! sfdf0 - real, clr sky sfc dnwd diff flux (nir/uv+vis) 2 ! -! suvbfc - real, tot sky sfc dnwd uv-b flux 1 ! -! suvbf0 - real, clr sky sfc dnwd uv-b flux 1 ! -! ! -! internal variables: ! -! zrefb - real, direct beam reflectivity for clear/cloudy nlp1 ! -! zrefd - real, diffuse reflectivity for clear/cloudy nlp1 ! -! ztrab - real, direct beam transmissivity for clear/cloudy nlp1 ! -! ztrad - real, diffuse transmissivity for clear/cloudy nlp1 ! -! zldbt - real, layer beam transmittance for clear/cloudy nlp1 ! -! ztdbt - real, lev total beam transmittance for clr/cld nlp1 ! -! ! -! control parameters in module "physparam" ! -! iswmode - control flag for 2-stream transfer schemes ! -! = 1 delta-eddington (joseph et al., 1976) ! -! = 2 pifm (zdunkowski et al., 1980) ! -! = 3 discrete ordinates (liou, 1973) ! -! ! -! ******************************************************************* ! -! original code description ! -! ! -! method: ! -! ------- ! -! standard delta-eddington, p.i.f.m., or d.o.m. layer calculations. ! -! kmodts = 1 eddington (joseph et al., 1976) ! -! = 2 pifm (zdunkowski et al., 1980) ! -! = 3 discrete ordinates (liou, 1973) ! -! ! -! modifications: ! -! -------------- ! -! original: h. barker ! -! revision: merge with rrtmg_sw: j.-j.morcrette, ecmwf, feb 2003 ! -! revision: add adjustment for earth/sun distance:mjiacono,aer,oct2003! -! revision: bug fix for use of palbp and palbd: mjiacono, aer, nov2003! -! revision: bug fix to apply delta scaling to clear sky: aer, dec2004 ! -! revision: code modified so that delta scaling is not done in cloudy ! -! profiles if routine cldprop is used; delta scaling can be ! -! applied by swithcing code below if cldprop is not used to ! -! get cloud properties. aer, jan 2005 ! -! revision: uniform formatting for rrtmg: mjiacono, aer, jul 2006 ! -! revision: use exponential lookup table for transmittance: mjiacono, ! -! aer, aug 2007 ! -! ! -! ******************************************************************* ! -! ====================== end of description block ================= ! - -! --- constant parameters: - real (kind=kind_phys), parameter :: zcrit = 0.9999995 ! thresold for conservative scattering - real (kind=kind_phys), parameter :: zsr3 = sqrt(3.0) - real (kind=kind_phys), parameter :: od_lo = 0.06 - real (kind=kind_phys), parameter :: eps1 = 1.0e-8 - -! --- inputs: - integer, intent(in) :: nlay, nlp1 - - real (kind=kind_phys), dimension(nlay,ngptsw), intent(in) :: & - & taug, taur, cldfmc - real (kind=kind_phys), dimension(nlay,nbdsw), intent(in) :: & - & taucw, ssacw, asycw, tauae, ssaae, asyae - - real (kind=kind_phys), dimension(ngptsw), intent(in) :: sfluxzen - - real (kind=kind_phys), dimension(2), intent(in) :: albbm, albdf - - real (kind=kind_phys), intent(in) :: cosz, sntz, cf1, cf0, ssolar - -! --- outputs: - real (kind=kind_phys), dimension(nlp1,nbdsw), intent(out) :: & - & fxupc, fxdnc, fxup0, fxdn0 - - real (kind=kind_phys), dimension(2), intent(out) :: sfbmc, sfdfc, & - & sfbm0, sfdf0 - - real (kind=kind_phys), intent(out) :: suvbfc, suvbf0, ftoadc, & - & ftoauc, ftoau0, fsfcuc, fsfcu0, fsfcdc, fsfcd0 - -! --- locals: - real (kind=kind_phys), dimension(nlay) :: ztaus, zssas, zasys, & - & zldbt0 - - real (kind=kind_phys), dimension(nlp1) :: zrefb, zrefd, ztrab, & - & ztrad, ztdbt, zldbt, zfu, zfd - - real (kind=kind_phys) :: ztau1, zssa1, zasy1, ztau0, zssa0, & - & zasy0, zasy3, zssaw, zasyw, zgam1, zgam2, zgam3, zgam4, & - & za1, za2, zb1, zb2, zrk, zrk2, zrp, zrp1, zrm1, zrpp, & - & zrkg1, zrkg3, zrkg4, zexp1, zexm1, zexp2, zexm2, zden1, & - & zexp3, zexp4, ze1r45, ftind, zsolar, ztdbt0, zr1, zr2, & - & zr3, zr4, zr5, zt1, zt2, zt3, zf1, zf2, zrpp1 - - integer :: ib, ibd, jb, jg, k, kp, itind -! -!===> ... begin here -! -!> -# Initialize output fluxes. - - do ib = 1, nbdsw - do k = 1, nlp1 - fxdnc(k,ib) = f_zero - fxupc(k,ib) = f_zero - fxdn0(k,ib) = f_zero - fxup0(k,ib) = f_zero - enddo - enddo - - ftoadc = f_zero - ftoauc = f_zero - ftoau0 = f_zero - fsfcuc = f_zero - fsfcu0 = f_zero - fsfcdc = f_zero - fsfcd0 = f_zero - -!! --- ... uv-b surface downward fluxes - suvbfc = f_zero - suvbf0 = f_zero - -!! --- ... output surface flux components - sfbmc(1) = f_zero - sfbmc(2) = f_zero - sfdfc(1) = f_zero - sfdfc(2) = f_zero - sfbm0(1) = f_zero - sfbm0(2) = f_zero - sfdf0(1) = f_zero - sfdf0(2) = f_zero - -!> -# Loop over all g-points in each band. - - lab_do_jg : do jg = 1, ngptsw - - jb = NGB(jg) - ib = jb + 1 - nblow - ibd = idxsfc(jb) ! spectral band index - - zsolar = ssolar * sfluxzen(jg) - -!> -# Set up toa direct beam and surface values (beam and diff). - - ztdbt(nlp1) = f_one - ztdbt0 = f_one - - zldbt(1) = f_zero - if (ibd /= 0) then - zrefb(1) = albbm(ibd) - zrefd(1) = albdf(ibd) - else - zrefb(1) = 0.5 * (albbm(1) + albbm(2)) - zrefd(1) = 0.5 * (albdf(1) + albdf(2)) - endif - ztrab(1) = f_zero - ztrad(1) = f_zero - -!> -# Compute clear-sky optical parameters, layer reflectance and -!! transmittance. -! - Set up toa direct beam and surface values (beam and diff) -! - Delta scaling for clear-sky condition -! - General two-stream expressions for physparam::iswmode -! - Compute homogeneous reflectance and transmittance for both -! conservative and non-conservative scattering -! - Pre-delta-scaling clear and cloudy direct beam transmittance -! - Call swflux() to compute the upward and downward radiation fluxes - - do k = nlay, 1, -1 - kp = k + 1 - - ztau0 = max( ftiny, taur(k,jg)+taug(k,jg)+tauae(k,ib) ) - zssa0 = taur(k,jg) + tauae(k,ib)*ssaae(k,ib) - zasy0 = asyae(k,ib)*ssaae(k,ib)*tauae(k,ib) - zssaw = min( oneminus, zssa0 / ztau0 ) - zasyw = zasy0 / max( ftiny, zssa0 ) - -!> - Saving clear-sky quantities for later total-sky usage. - ztaus(k) = ztau0 - zssas(k) = zssa0 - zasys(k) = zasy0 - -!> - Delta scaling for clear-sky condition. - za1 = zasyw * zasyw - za2 = zssaw * za1 - - ztau1 = (f_one - za2) * ztau0 - zssa1 = (zssaw - za2) / (f_one - za2) -!org zasy1 = (zasyw - za1) / (f_one - za1) ! this line is replaced by the next - zasy1 = zasyw / (f_one + zasyw) ! to reduce truncation error - zasy3 = 0.75 * zasy1 - -!> - Perform general two-stream expressions: -!!\n control parameters in module "physparam" -!!\n iswmode - control flag for 2-stream transfer schemes -!!\n = 1 delta-eddington (joseph et al., 1976) -!!\n = 2 pifm (zdunkowski et al., 1980) -!!\n = 3 discrete ordinates (liou, 1973) - if ( iswmode == 1 ) then - zgam1 = 1.75 - zssa1 * (f_one + zasy3) - zgam2 =-0.25 + zssa1 * (f_one - zasy3) - zgam3 = 0.5 - zasy3 * cosz - elseif ( iswmode == 2 ) then ! pifm - zgam1 = 2.0 - zssa1 * (1.25 + zasy3) - zgam2 = 0.75* zssa1 * (f_one- zasy1) - zgam3 = 0.5 - zasy3 * cosz - elseif ( iswmode == 3 ) then ! discrete ordinates - zgam1 = zsr3 * (2.0 - zssa1 * (1.0 + zasy1)) * 0.5 - zgam2 = zsr3 * zssa1 * (1.0 - zasy1) * 0.5 - zgam3 = (1.0 - zsr3 * zasy1 * cosz) * 0.5 - endif - zgam4 = f_one - zgam3 - -!> - Compute homogeneous reflectance and transmittance. - - if ( zssaw >= zcrit ) then ! for conservative scattering - za1 = zgam1 * cosz - zgam3 - za2 = zgam1 * ztau1 - -! --- ... use exponential lookup table for transmittance, or expansion -! of exponential for low optical depth - - zb1 = min ( ztau1*sntz , 500.0 ) - if ( zb1 <= od_lo ) then - zb2 = f_one - zb1 + 0.5*zb1*zb1 - else - ftind = zb1 / (bpade + zb1) - itind = ftind*NTBMX + 0.5 - zb2 = exp_tbl(itind) - endif - -! ... collimated beam - zrefb(kp) = max(f_zero, min(f_one, & - & (za2 - za1*(f_one - zb2))/(f_one + za2) )) - ztrab(kp) = max(f_zero, min(f_one, f_one-zrefb(kp) )) - -! ... isotropic incidence - zrefd(kp) = max(f_zero, min(f_one, za2/(f_one + za2) )) - ztrad(kp) = max(f_zero, min(f_one, f_one-zrefd(kp) )) - - else ! for non-conservative scattering - za1 = zgam1*zgam4 + zgam2*zgam3 - za2 = zgam1*zgam3 + zgam2*zgam4 - zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) - zrk2= 2.0 * zrk - - zrp = zrk * cosz - zrp1 = f_one + zrp - zrm1 = f_one - zrp - zrpp1= f_one - zrp*zrp - zrpp = sign( max(flimit, abs(zrpp1)), zrpp1 ) ! avoid numerical singularity - zrkg1= zrk + zgam1 - zrkg3= zrk * zgam3 - zrkg4= zrk * zgam4 - - zr1 = zrm1 * (za2 + zrkg3) - zr2 = zrp1 * (za2 - zrkg3) - zr3 = zrk2 * (zgam3 - za2*cosz) - zr4 = zrpp * zrkg1 - zr5 = zrpp * (zrk - zgam1) - - zt1 = zrp1 * (za1 + zrkg4) - zt2 = zrm1 * (za1 - zrkg4) - zt3 = zrk2 * (zgam4 + za1*cosz) - -! --- ... use exponential lookup table for transmittance, or expansion -! of exponential for low optical depth - - zb1 = min ( zrk*ztau1, 500.0 ) - if ( zb1 <= od_lo ) then - zexm1 = f_one - zb1 + 0.5*zb1*zb1 - else - ftind = zb1 / (bpade + zb1) - itind = ftind*NTBMX + 0.5 - zexm1 = exp_tbl(itind) - endif - zexp1 = f_one / zexm1 - - zb2 = min ( sntz*ztau1, 500.0 ) - if ( zb2 <= od_lo ) then - zexm2 = f_one - zb2 + 0.5*zb2*zb2 - else - ftind = zb2 / (bpade + zb2) - itind = ftind*NTBMX + 0.5 - zexm2 = exp_tbl(itind) - endif - zexp2 = f_one / zexm2 - ze1r45 = zr4*zexp1 + zr5*zexm1 - -! ... collimated beam - if (ze1r45>=-eps1 .and. ze1r45<=eps1) then - zrefb(kp) = eps1 - ztrab(kp) = zexm2 - else - zden1 = zssa1 / ze1r45 - zrefb(kp) = max(f_zero, min(f_one, & - & (zr1*zexp1 - zr2*zexm1 - zr3*zexm2)*zden1 )) - ztrab(kp) = max(f_zero, min(f_one, zexm2*(f_one & - & - (zt1*zexp1 - zt2*zexm1 - zt3*zexp2)*zden1) )) - endif - -! ... diffuse beam - zden1 = zr4 / (ze1r45 * zrkg1) - zrefd(kp) = max(f_zero, min(f_one, & - & zgam2*(zexp1 - zexm1)*zden1 )) - ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) - endif ! end if_zssaw_block - -!> - Calculate direct beam transmittance. use exponential lookup table -!! for transmittance, or expansion of exponential for low optical depth. - - zr1 = ztau1 * sntz - if ( zr1 <= od_lo ) then - zexp3 = f_one - zr1 + 0.5*zr1*zr1 - else - ftind = zr1 / (bpade + zr1) - itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) - zexp3 = exp_tbl(itind) - endif - - ztdbt(k) = zexp3 * ztdbt(kp) - zldbt(kp) = zexp3 - -!> - Calculate pre-delta-scaling clear and cloudy direct beam transmittance. -! (must use 'orig', unscaled cloud optical depth) - - zr1 = ztau0 * sntz - if ( zr1 <= od_lo ) then - zexp4 = f_one - zr1 + 0.5*zr1*zr1 - else - ftind = zr1 / (bpade + zr1) - itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) - zexp4 = exp_tbl(itind) - endif - - zldbt0(k) = zexp4 - ztdbt0 = zexp4 * ztdbt0 - enddo ! end do_k_loop - -!> -# Call vrtqdr(), to compute the upward and downward radiation fluxes. - call vrtqdr & -! --- inputs: - & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & - & nlay, nlp1, & -! --- outputs: - & zfu, zfd & - & ) - -!> -# Compute upward and downward fluxes at levels. - do k = 1, nlp1 - fxup0(k,ib) = fxup0(k,ib) + zsolar*zfu(k) - fxdn0(k,ib) = fxdn0(k,ib) + zsolar*zfd(k) - enddo - -!> -# Compute surface downward beam/diffuse flux components. - zb1 = zsolar*ztdbt0 - zb2 = zsolar*(zfd(1) - ztdbt0) - - if (ibd /= 0) then - sfbm0(ibd) = sfbm0(ibd) + zb1 - sfdf0(ibd) = sfdf0(ibd) + zb2 - else - zf1 = 0.5 * zb1 - zf2 = 0.5 * zb2 - sfbm0(1) = sfbm0(1) + zf1 - sfdf0(1) = sfdf0(1) + zf2 - sfbm0(2) = sfbm0(2) + zf1 - sfdf0(2) = sfdf0(2) + zf2 - endif -! sfbm0(ibd) = sfbm0(ibd) + zsolar*ztdbt0 -! sfdf0(ibd) = sfdf0(ibd) + zsolar*(zfd(1) - ztdbt0) - -!> -# Compute total sky optical parameters, layer reflectance and -!! transmittance. -! - Set up toa direct beam and surface values (beam and diff) -! - Delta scaling for total-sky condition -! - General two-stream expressions for physparam::iswmode -! - Compute homogeneous reflectance and transmittance for -! conservative scattering and non-conservative scattering -! - Pre-delta-scaling clear and cloudy direct beam transmittance -! - Call swflux() to compute the upward and downward radiation fluxes - - if ( cf1 > eps ) then - -!> - Set up toa direct beam and surface values (beam and diff). - ztdbt0 = f_one - zldbt(1) = f_zero - - do k = nlay, 1, -1 - kp = k + 1 - if ( cldfmc(k,jg) > ftiny ) then ! it is a cloudy-layer - - ztau0 = ztaus(k) + taucw(k,ib) - zssa0 = zssas(k) + ssacw(k,ib) - zasy0 = zasys(k) + asycw(k,ib) - zssaw = min(oneminus, zssa0 / ztau0) - zasyw = zasy0 / max(ftiny, zssa0) - -!> - Perform delta scaling for total-sky condition. - za1 = zasyw * zasyw - za2 = zssaw * za1 - - ztau1 = (f_one - za2) * ztau0 - zssa1 = (zssaw - za2) / (f_one - za2) -!org zasy1 = (zasyw - za1) / (f_one - za1) - zasy1 = zasyw / (f_one + zasyw) - zasy3 = 0.75 * zasy1 - -!> - Perform general two-stream expressions. - if ( iswmode == 1 ) then - zgam1 = 1.75 - zssa1 * (f_one + zasy3) - zgam2 =-0.25 + zssa1 * (f_one - zasy3) - zgam3 = 0.5 - zasy3 * cosz - elseif ( iswmode == 2 ) then ! pifm - zgam1 = 2.0 - zssa1 * (1.25 + zasy3) - zgam2 = 0.75* zssa1 * (f_one- zasy1) - zgam3 = 0.5 - zasy3 * cosz - elseif ( iswmode == 3 ) then ! discrete ordinates - zgam1 = zsr3 * (2.0 - zssa1 * (1.0 + zasy1)) * 0.5 - zgam2 = zsr3 * zssa1 * (1.0 - zasy1) * 0.5 - zgam3 = (1.0 - zsr3 * zasy1 * cosz) * 0.5 - endif - zgam4 = f_one - zgam3 - -!> - Compute homogeneous reflectance and transmittance for both convertive -!! and non-convertive scattering. - - if ( zssaw >= zcrit ) then ! for conservative scattering - za1 = zgam1 * cosz - zgam3 - za2 = zgam1 * ztau1 - -! --- ... use exponential lookup table for transmittance, or expansion -! of exponential for low optical depth - - zb1 = min ( ztau1*sntz , 500.0 ) - if ( zb1 <= od_lo ) then - zb2 = f_one - zb1 + 0.5*zb1*zb1 - else - ftind = zb1 / (bpade + zb1) - itind = ftind*NTBMX + 0.5 - zb2 = exp_tbl(itind) - endif - -! ... collimated beam - zrefb(kp) = max(f_zero, min(f_one, & - & (za2 - za1*(f_one - zb2))/(f_one + za2) )) - ztrab(kp) = max(f_zero, min(f_one, f_one-zrefb(kp))) - -! ... isotropic incidence - zrefd(kp) = max(f_zero, min(f_one, za2 / (f_one+za2) )) - ztrad(kp) = max(f_zero, min(f_one, f_one - zrefd(kp) )) - - else ! for non-conservative scattering - za1 = zgam1*zgam4 + zgam2*zgam3 - za2 = zgam1*zgam3 + zgam2*zgam4 - zrk = sqrt ( (zgam1 - zgam2) * (zgam1 + zgam2) ) - zrk2= 2.0 * zrk - - zrp = zrk * cosz - zrp1 = f_one + zrp - zrm1 = f_one - zrp - zrpp1= f_one - zrp*zrp - zrpp = sign( max(flimit, abs(zrpp1)), zrpp1 ) ! avoid numerical singularity - zrkg1= zrk + zgam1 - zrkg3= zrk * zgam3 - zrkg4= zrk * zgam4 - - zr1 = zrm1 * (za2 + zrkg3) - zr2 = zrp1 * (za2 - zrkg3) - zr3 = zrk2 * (zgam3 - za2*cosz) - zr4 = zrpp * zrkg1 - zr5 = zrpp * (zrk - zgam1) - - zt1 = zrp1 * (za1 + zrkg4) - zt2 = zrm1 * (za1 - zrkg4) - zt3 = zrk2 * (zgam4 + za1*cosz) - -! --- ... use exponential lookup table for transmittance, or expansion -! of exponential for low optical depth - - zb1 = min ( zrk*ztau1, 500.0 ) - if ( zb1 <= od_lo ) then - zexm1 = f_one - zb1 + 0.5*zb1*zb1 - else - ftind = zb1 / (bpade + zb1) - itind = ftind*NTBMX + 0.5 - zexm1 = exp_tbl(itind) - endif - zexp1 = f_one / zexm1 - - zb2 = min ( ztau1*sntz, 500.0 ) - if ( zb2 <= od_lo ) then - zexm2 = f_one - zb2 + 0.5*zb2*zb2 - else - ftind = zb2 / (bpade + zb2) - itind = ftind*NTBMX + 0.5 - zexm2 = exp_tbl(itind) - endif - zexp2 = f_one / zexm2 - ze1r45 = zr4*zexp1 + zr5*zexm1 - -! ... collimated beam - if ( ze1r45>=-eps1 .and. ze1r45<=eps1 ) then - zrefb(kp) = eps1 - ztrab(kp) = zexm2 - else - zden1 = zssa1 / ze1r45 - zrefb(kp) = max(f_zero, min(f_one, & - & (zr1*zexp1-zr2*zexm1-zr3*zexm2)*zden1 )) - ztrab(kp) = max(f_zero, min(f_one, zexm2*(f_one - & - & (zt1*zexp1-zt2*zexm1-zt3*zexp2)*zden1) )) - endif - -! ... diffuse beam - zden1 = zr4 / (ze1r45 * zrkg1) - zrefd(kp) = max(f_zero, min(f_one, & - & zgam2*(zexp1 - zexm1)*zden1 )) - ztrad(kp) = max(f_zero, min(f_one, zrk2*zden1 )) - endif ! end if_zssaw_block - -! --- ... direct beam transmittance. use exponential lookup table -! for transmittance, or expansion of exponential for low -! optical depth - - zr1 = ztau1 * sntz - if ( zr1 <= od_lo ) then - zexp3 = f_one - zr1 + 0.5*zr1*zr1 - else - ftind = zr1 / (bpade + zr1) - itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) - zexp3 = exp_tbl(itind) - endif - - zldbt(kp) = zexp3 - ztdbt(k) = zexp3 * ztdbt(kp) - -! --- ... pre-delta-scaling clear and cloudy direct beam transmittance -! (must use 'orig', unscaled cloud optical depth) - - zr1 = ztau0 * sntz - if ( zr1 <= od_lo ) then - zexp4 = f_one - zr1 + 0.5*zr1*zr1 - else - ftind = zr1 / (bpade + zr1) - itind = max(0, min(NTBMX, int(0.5+NTBMX*ftind) )) - zexp4 = exp_tbl(itind) - endif - - ztdbt0 = zexp4 * ztdbt0 - - else ! if_cldfmc_block --- it is a clear layer - -! --- ... direct beam transmittance - ztdbt(k) = zldbt(kp) * ztdbt(kp) - -!> - Calculate pre-delta-scaling clear and cloudy direct beam transmittance. - ztdbt0 = zldbt0(k) * ztdbt0 - - endif ! end if_cldfmc_block - enddo ! end do_k_loop - -!> -# Call vrtqdr(), to perform vertical quadrature - - call vrtqdr & -! --- inputs: - & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & - & nlay, nlp1, & -! --- outputs: - & zfu, zfd & - & ) - -! --- ... compute upward and downward fluxes at levels - do k = 1, nlp1 - fxupc(k,ib) = fxupc(k,ib) + zsolar*zfu(k) - fxdnc(k,ib) = fxdnc(k,ib) + zsolar*zfd(k) - enddo - -!> -# Process and save outputs. -!! - surface downward beam/diffused flux components - zb1 = zsolar*ztdbt0 - zb2 = zsolar*(zfd(1) - ztdbt0) - - if (ibd /= 0) then - sfbmc(ibd) = sfbmc(ibd) + zb1 - sfdfc(ibd) = sfdfc(ibd) + zb2 - else - zf1 = 0.5 * zb1 - zf2 = 0.5 * zb2 - sfbmc(1) = sfbmc(1) + zf1 - sfdfc(1) = sfdfc(1) + zf2 - sfbmc(2) = sfbmc(2) + zf1 - sfdfc(2) = sfdfc(2) + zf2 - endif -! sfbmc(ibd) = sfbmc(ibd) + zsolar*ztdbt0 -! sfdfc(ibd) = sfdfc(ibd) + zsolar*(zfd(1) - ztdbt0) - - endif ! end if_cf1_block - - enddo lab_do_jg - -! --- ... end of g-point loop - - do ib = 1, nbdsw - ftoadc = ftoadc + fxdn0(nlp1,ib) - ftoau0 = ftoau0 + fxup0(nlp1,ib) - fsfcu0 = fsfcu0 + fxup0(1,ib) - fsfcd0 = fsfcd0 + fxdn0(1,ib) - enddo - -!> - uv-b surface downward flux - ibd = nuvb - nblow + 1 - suvbf0 = fxdn0(1,ibd) - - if ( cf1 <= eps ) then ! clear column, set total-sky=clear-sky fluxes - do ib = 1, nbdsw - do k = 1, nlp1 - fxupc(k,ib) = fxup0(k,ib) - fxdnc(k,ib) = fxdn0(k,ib) - enddo - enddo - - ftoauc = ftoau0 - fsfcuc = fsfcu0 - fsfcdc = fsfcd0 - -!> - surface downward beam/diffused flux components - sfbmc(1) = sfbm0(1) - sfdfc(1) = sfdf0(1) - sfbmc(2) = sfbm0(2) - sfdfc(2) = sfdf0(2) - -!> - uv-b surface downward flux - suvbfc = suvbf0 - else ! cloudy column, compute total-sky fluxes - do ib = 1, nbdsw - ftoauc = ftoauc + fxupc(nlp1,ib) - fsfcuc = fsfcuc + fxupc(1,ib) - fsfcdc = fsfcdc + fxdnc(1,ib) - enddo - -!! --- ... uv-b surface downward flux - suvbfc = fxdnc(1,ibd) - endif ! end if_cf1_block - - return -!................................... - end subroutine spcvrtm -!! @} -!----------------------------------- - -!>\ingroup module_radsw_main -!> This subroutine is called by spcvrtc() and spcvrtm(), and computes -!! the upward and downward radiation fluxes. -!!\param zrefb layer direct beam reflectivity -!!\param zrefd layer diffuse reflectivity -!!\param ztrab layer direct beam transmissivity -!!\param ztrad layer diffuse transmissivity -!!\param zldbt layer mean beam transmittance -!!\param ztdbt total beam transmittance at levels -!!\param NLAY, NLP1 number of layers/levels -!!\param zfu upward flux at layer interface -!!\param zfd downward flux at layer interface -!!\section General_vrtqdr vrtqdr General Algorithm -!> @{ -!----------------------------------- - subroutine vrtqdr & - & ( zrefb,zrefd,ztrab,ztrad,zldbt,ztdbt, & ! inputs - & NLAY, NLP1, & - & zfu, zfd & ! outputs: - & ) - -! =================== program usage description =================== ! -! ! -! purpose: computes the upward and downward radiation fluxes ! -! ! -! interface: "vrtqdr" is called by "spcvrc" and "spcvrm" ! -! ! -! subroutines called : none ! -! ! -! ==================== defination of variables ==================== ! -! ! -! input variables: ! -! zrefb(NLP1) - layer direct beam reflectivity ! -! zrefd(NLP1) - layer diffuse reflectivity ! -! ztrab(NLP1) - layer direct beam transmissivity ! -! ztrad(NLP1) - layer diffuse transmissivity ! -! zldbt(NLP1) - layer mean beam transmittance ! -! ztdbt(NLP1) - total beam transmittance at levels ! -! NLAY, NLP1 - number of layers/levels ! -! ! -! output variables: ! -! zfu (NLP1) - upward flux at layer interface ! -! zfd (NLP1) - downward flux at layer interface ! -! ! -! ******************************************************************* ! -! ====================== end of description block ================= ! - -! --- inputs: - integer, intent(in) :: nlay, nlp1 - - real (kind=kind_phys), dimension(nlp1), intent(in) :: zrefb, & - & zrefd, ztrab, ztrad, ztdbt, zldbt - -! --- outputs: - real (kind=kind_phys), dimension(nlp1), intent(out) :: zfu, zfd - -! --- locals: - real (kind=kind_phys), dimension(nlp1) :: zrupb,zrupd,zrdnd,ztdn - - real (kind=kind_phys) :: zden1 - - integer :: k, kp -! -!===> ... begin here -! - -!> -# Link lowest layer with surface. - zrupb(1) = zrefb(1) ! direct beam - zrupd(1) = zrefd(1) ! diffused - -!> -# Pass from bottom to top. - do k = 1, nlay - kp = k + 1 - - zden1 = f_one / ( f_one - zrupd(k)*zrefd(kp) ) - zrupb(kp) = zrefb(kp) + ( ztrad(kp) * & - & ( (ztrab(kp) - zldbt(kp))*zrupd(k) + & - & zldbt(kp)*zrupb(k)) ) * zden1 - zrupd(kp) = zrefd(kp) + ztrad(kp)*ztrad(kp)*zrupd(k)*zden1 - enddo - -!> -# Upper boundary conditions - ztdn (nlp1) = f_one - zrdnd(nlp1) = f_zero - ztdn (nlay) = ztrab(nlp1) - zrdnd(nlay) = zrefd(nlp1) - -!> -# Pass from top to bottom - do k = nlay, 2, -1 - zden1 = f_one / (f_one - zrefd(k)*zrdnd(k)) - ztdn (k-1) = ztdbt(k)*ztrab(k) + ( ztrad(k) * & - & ( (ztdn(k) - ztdbt(k)) + ztdbt(k) * & - & zrefb(k)*zrdnd(k) )) * zden1 - zrdnd(k-1) = zrefd(k) + ztrad(k)*ztrad(k)*zrdnd(k)*zden1 - enddo - -!> -# Up and down-welling fluxes at levels. - do k = 1, nlp1 - zden1 = f_one / (f_one - zrdnd(k)*zrupd(k)) - zfu(k) = ( ztdbt(k)*zrupb(k) + & - & (ztdn(k) - ztdbt(k))*zrupd(k) ) * zden1 - zfd(k) = ztdbt(k) + ( ztdn(k) - ztdbt(k) + & - & ztdbt(k)*zrupb(k)*zrdnd(k) ) * zden1 - enddo - - return -!................................... - end subroutine vrtqdr -!----------------------------------- -!> @} - -!>\ingroup module_radsw_main -!> This subroutine calculates optical depths for gaseous absorption and -!! rayleigh scattering -!!\n subroutine called taumol## (## = 16-29) -!!\param colamt column amounts of absorbing gases the index -!! are for h2o, co2, o3, n2o, ch4, and o2, -!! respectively \f$(mol/cm^2)\f$ -!!\param colmol total column amount (dry air+water vapor) -!!\param fac00,fac01,fac10,fac11 for each layer, these are factors that are -!! needed to compute the interpolation factors -!! that multiply the appropriate reference -!! k-values. a value of 0/1 for i,j indicates -!! that the corresponding factor multiplies -!! reference k-value for the lower/higher of the -!! two appropriate temperatures, and altitudes, -!! respectively. -!!\param jp the index of the lower (in altitude) of the -!! two appropriate ref pressure levels needed -!! for interpolation. -!!\param jt, jt1 the indices of the lower of the two approp -!! ref temperatures needed for interpolation -!! (for pressure levels jp and jp+1, respectively) -!!\param laytrop tropopause layer index -!!\param forfac scale factor needed to foreign-continuum. -!!\param forfrac factor needed for temperature interpolation -!!\param indfor index of the lower of the two appropriate -!! reference temperatures needed for -!! foreign-continuum interpolation -!!\param selffac scale factor needed to h2o self-continuum. -!!\param selffrac factor needed for temperature interpolation -!! of reference h2o self-continuum data -!!\param indself index of the lower of the two appropriate -!! reference temperatures needed for the -!! self-continuum interpolation -!!\param nlay number of vertical layers -!!\param sfluxzen spectral distribution of incoming solar flux -!!\param taug spectral optical depth for gases -!!\param taur opt depth for rayleigh scattering -!>\section gen_al_taumol taumol General Algorithm -!! @{ -!----------------------------------- - subroutine taumol & - & ( colamt,colmol,fac00,fac01,fac10,fac11,jp,jt,jt1,laytrop, & ! --- inputs - & forfac,forfrac,indfor,selffac,selffrac,indself, nlay, & - & sfluxzen, taug, taur & ! --- outputs - & ) - -! ================== program usage description ================== ! -! ! -! description: ! -! calculate optical depths for gaseous absorption and rayleigh ! -! scattering. ! -! ! -! subroutines called: taugb## (## = 16 - 29) ! -! ! -! ==================== defination of variables ==================== ! -! ! -! inputs: size ! -! colamt - real, column amounts of absorbing gases the index ! -! are for h2o, co2, o3, n2o, ch4, and o2, ! -! respectively (molecules/cm**2) nlay*maxgas! -! colmol - real, total column amount (dry air+water vapor) nlay ! -! facij - real, for each layer, these are factors that are ! -! needed to compute the interpolation factors ! -! that multiply the appropriate reference k- ! -! values. a value of 0/1 for i,j indicates ! -! that the corresponding factor multiplies ! -! reference k-value for the lower/higher of the ! -! two appropriate temperatures, and altitudes, ! -! respectively. naly ! -! jp - real, the index of the lower (in altitude) of the ! -! two appropriate ref pressure levels needed ! -! for interpolation. nlay ! -! jt, jt1 - integer, the indices of the lower of the two approp ! -! ref temperatures needed for interpolation (for ! -! pressure levels jp and jp+1, respectively) nlay ! -! laytrop - integer, tropopause layer index 1 ! -! forfac - real, scale factor needed to foreign-continuum. nlay ! -! forfrac - real, factor needed for temperature interpolation nlay ! -! indfor - integer, index of the lower of the two appropriate ! -! reference temperatures needed for foreign- ! -! continuum interpolation nlay ! -! selffac - real, scale factor needed to h2o self-continuum. nlay ! -! selffrac- real, factor needed for temperature interpolation ! -! of reference h2o self-continuum data nlay ! -! indself - integer, index of the lower of the two appropriate ! -! reference temperatures needed for the self- ! -! continuum interpolation nlay ! -! nlay - integer, number of vertical layers 1 ! -! ! -! output: ! -! sfluxzen- real, spectral distribution of incoming solar flux ngptsw! -! taug - real, spectral optical depth for gases nlay*ngptsw! -! taur - real, opt depth for rayleigh scattering nlay*ngptsw! -! ! -! =================================================================== ! -! ************ original subprogram description *************** ! -! ! -! optical depths developed for the ! -! ! -! rapid radiative transfer model (rrtm) ! -! ! -! atmospheric and environmental research, inc. ! -! 131 hartwell avenue ! -! lexington, ma 02421 ! -! ! -! ! -! eli j. mlawer ! -! jennifer delamere ! -! steven j. taubman ! -! shepard a. clough ! -! ! -! ! -! ! -! email: mlawer@aer.com ! -! email: jdelamer@aer.com ! -! ! -! the authors wish to acknowledge the contributions of the ! -! following people: patrick d. brown, michael j. iacono, ! -! ronald e. farren, luke chen, robert bergstrom. ! -! ! -! ******************************************************************* ! -! ! -! taumol ! -! ! -! this file contains the subroutines taugbn (where n goes from ! -! 16 to 29). taugbn calculates the optical depths and Planck ! -! fractions per g-value and layer for band n. ! -! ! -! output: optical depths (unitless) ! -! fractions needed to compute planck functions at every layer ! -! and g-value ! -! ! -! modifications: ! -! ! -! revised: adapted to f90 coding, j.-j.morcrette, ecmwf, feb 2003 ! -! revised: modified for g-point reduction, mjiacono, aer, dec 2003 ! -! revised: reformatted for consistency with rrtmg_lw, mjiacono, aer, ! -! jul 2006 ! -! ! -! ******************************************************************* ! -! ====================== end of description block ================= ! - -! --- inputs: - integer, intent(in) :: nlay, laytrop - - integer, dimension(nlay), intent(in) :: indfor, indself, & - & jp, jt, jt1 - - real (kind=kind_phys), dimension(nlay), intent(in) :: colmol, & - & fac00, fac01, fac10, fac11, forfac, forfrac, selffac, & - & selffrac - - real (kind=kind_phys), dimension(nlay,maxgas),intent(in) :: colamt - -! --- outputs: - real (kind=kind_phys), dimension(ngptsw), intent(out) :: sfluxzen - - real (kind=kind_phys), dimension(nlay,ngptsw), intent(out) :: & - & taug, taur - -! --- locals: - real (kind=kind_phys) :: fs, speccomb, specmult, colm1, colm2 - - integer, dimension(nlay,nblow:nbhgh) :: id0, id1 - - integer :: ibd, j, jb, js, k, klow, khgh, klim, ks, njb, ns -! -!===> ... begin here -! -! --- ... loop over each spectral band - - do jb = nblow, nbhgh - -! --- ... indices for layer optical depth - - do k = 1, laytrop - id0(k,jb) = ((jp(k)-1)*5 + (jt (k)-1)) * nspa(jb) - id1(k,jb) = ( jp(k) *5 + (jt1(k)-1)) * nspa(jb) - enddo - - do k = laytrop+1, nlay - id0(k,jb) = ((jp(k)-13)*5 + (jt (k)-1)) * nspb(jb) - id1(k,jb) = ((jp(k)-12)*5 + (jt1(k)-1)) * nspb(jb) - enddo - -! --- ... calculate spectral flux at toa - - ibd = ibx(jb) - njb = ng (jb) - ns = ngs(jb) - - select case (jb) - - case (16, 20, 23, 25, 26, 29) - - do j = 1, njb - sfluxzen(ns+j) = sfluxref01(j,1,ibd) - enddo - - case (27) - - do j = 1, njb - sfluxzen(ns+j) = scalekur * sfluxref01(j,1,ibd) - enddo - - case default - - if (jb==17 .or. jb==28) then - - ks = nlay - lab_do_k1 : do k = laytrop, nlay-1 - if (jp(k)=layreffr(jb)) then - ks = k + 1 - exit lab_do_k1 - endif - enddo lab_do_k1 - - colm1 = colamt(ks,ix1(jb)) - colm2 = colamt(ks,ix2(jb)) - speccomb = colm1 + strrat(jb)*colm2 - specmult = specwt(jb) * min( oneminus, colm1/speccomb ) - js = 1 + int( specmult ) - fs = mod(specmult, f_one) - - do j = 1, njb - sfluxzen(ns+j) = sfluxref02(j,js,ibd) & - & + fs * (sfluxref02(j,js+1,ibd) - sfluxref02(j,js,ibd)) - enddo - - else - - ks = laytrop - lab_do_k2 : do k = 1, laytrop-1 - if (jp(k)=layreffr(jb)) then - ks = k + 1 - exit lab_do_k2 - endif - enddo lab_do_k2 - - colm1 = colamt(ks,ix1(jb)) - colm2 = colamt(ks,ix2(jb)) - speccomb = colm1 + strrat(jb)*colm2 - specmult = specwt(jb) * min( oneminus, colm1/speccomb ) - js = 1 + int( specmult ) - fs = mod(specmult, f_one) - - do j = 1, njb - sfluxzen(ns+j) = sfluxref03(j,js,ibd) & - & + fs * (sfluxref03(j,js+1,ibd) - sfluxref03(j,js,ibd)) - enddo - - endif - - end select - - enddo - -!> - Call taumol## (##: 16-29) to calculate layer optical depth. - -!> - call taumol16() - call taumol16 -!> - call taumol17() - call taumol17 -!> - call taumol18() - call taumol18 -!> - call taumol19() - call taumol19 -!> - call taumol20() - call taumol20 -!> - call taumol21() - call taumol21 -!> - call taumol22() - call taumol22 -!> - call taumol23() - call taumol23 -!> - call taumol24() - call taumol24 -!> - call taumol25() - call taumol25 -!> - call taumol26() - call taumol26 -!> - call taumol27() - call taumol27 -!> - call taumol28() - call taumol28 -!> - call taumol29() - call taumol29 - - -! ================= - contains -! ================= - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 16: 2600-3250 -!! cm-1 (low - h2o,ch4; high - ch4) -!----------------------------------- - subroutine taumol16 -!................................... - -! ------------------------------------------------------------------ ! -! band 16: 2600-3250 cm-1 (low - h2o,ch4; high - ch4) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb16 - -! --- locals: - - real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & - & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 - - integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 - integer :: inds, indf, indsp, indfp, j, js, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG16 - taur(k,NS16+j) = tauray - enddo - enddo - - do k = 1, laytrop - speccomb = colamt(k,1) + strrat(16)*colamt(k,5) - specmult = 8.0 * min( oneminus, colamt(k,1)/speccomb ) - - js = 1 + int( specmult ) - fs = mod( specmult, f_one ) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,16) + js - ind02 = ind01 + 1 - ind03 = ind01 + 9 - ind04 = ind01 + 10 - ind11 = id1(k,16) + js - ind12 = ind11 + 1 - ind13 = ind11 + 9 - ind14 = ind11 + 10 - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG16 - taug(k,NS16+j) = speccomb & - & *( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & - & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & - & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & - & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & - & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & - & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) - enddo - enddo - - do k = laytrop+1, nlay - ind01 = id0(k,16) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,16) + 1 - ind12 = ind11 + 1 - - do j = 1, NG16 - taug(k,NS16+j) = colamt(k,5) & - & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & - & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) - enddo - enddo - - return -!................................... - end subroutine taumol16 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 17: 3250-4000 -!! cm-1 (low - h2o,co2; high - h2o,co2) -!----------------------------------- - subroutine taumol17 -!................................... - -! ------------------------------------------------------------------ ! -! band 17: 3250-4000 cm-1 (low - h2o,co2; high - h2o,co2) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb17 - -! --- locals: - real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & - & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 - - integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 - integer :: inds, indf, indsp, indfp, j, js, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG17 - taur(k,NS17+j) = tauray - enddo - enddo - - do k = 1, laytrop - speccomb = colamt(k,1) + strrat(17)*colamt(k,2) - specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,17) + js - ind02 = ind01 + 1 - ind03 = ind01 + 9 - ind04 = ind01 + 10 - ind11 = id1(k,17) + js - ind12 = ind11 + 1 - ind13 = ind11 + 9 - ind14 = ind11 + 10 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG17 - taug(k,NS17+j) = speccomb & - & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & - & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & - & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & - & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & - & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & - & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) - enddo - enddo - - do k = laytrop+1, nlay - speccomb = colamt(k,1) + strrat(17)*colamt(k,2) - specmult = 4.0 * min(oneminus, colamt(k,1) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,17) + js - ind02 = ind01 + 1 - ind03 = ind01 + 5 - ind04 = ind01 + 6 - ind11 = id1(k,17) + js - ind12 = ind11 + 1 - ind13 = ind11 + 5 - ind14 = ind11 + 6 - - indf = indfor(k) - indfp= indf + 1 - - do j = 1, NG17 - taug(k,NS17+j) = speccomb & - & * ( fac000 * absb(ind01,j) + fac100 * absb(ind02,j) & - & + fac010 * absb(ind03,j) + fac110 * absb(ind04,j) & - & + fac001 * absb(ind11,j) + fac101 * absb(ind12,j) & - & + fac011 * absb(ind13,j) + fac111 * absb(ind14,j) ) & - & + colamt(k,1) * forfac(k) * (forref(indf,j) & - & + forfrac(k) * (forref(indfp,j) - forref(indf,j))) - enddo - enddo - - return -!................................... - end subroutine taumol17 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 18: 4000-4650 -!! cm-1 (low - h2o,ch4; high - ch4) -!----------------------------------- - subroutine taumol18 -!................................... - -! ------------------------------------------------------------------ ! -! band 18: 4000-4650 cm-1 (low - h2o,ch4; high - ch4) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb18 - -! --- locals: - real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & - & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 - - integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 - integer :: inds, indf, indsp, indfp, j, js, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG18 - taur(k,NS18+j) = tauray - enddo - enddo - - do k = 1, laytrop - speccomb = colamt(k,1) + strrat(18)*colamt(k,5) - specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,18) + js - ind02 = ind01 + 1 - ind03 = ind01 + 9 - ind04 = ind01 + 10 - ind11 = id1(k,18) + js - ind12 = ind11 + 1 - ind13 = ind11 + 9 - ind14 = ind11 + 10 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG18 - taug(k,NS18+j) = speccomb & - & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & - & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & - & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & - & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & - & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & - & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) - enddo - enddo - - do k = laytrop+1, nlay - ind01 = id0(k,18) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,18) + 1 - ind12 = ind11 + 1 - - do j = 1, NG18 - taug(k,NS18+j) = colamt(k,5) & - & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & - & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) - enddo - enddo - - return -!................................... - end subroutine taumol18 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 19: 4650-5150 -!! cm-1 (low - h2o,co2; high - co2) -!----------------------------------- - subroutine taumol19 -!................................... - -! ------------------------------------------------------------------ ! -! band 19: 4650-5150 cm-1 (low - h2o,co2; high - co2) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb19 - -! --- locals: - real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & - & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 - - integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 - integer :: inds, indf, indsp, indfp, j, js, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG19 - taur(k,NS19+j) = tauray - enddo - enddo - - do k = 1, laytrop - speccomb = colamt(k,1) + strrat(19)*colamt(k,2) - specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,19) + js - ind02 = ind01 + 1 - ind03 = ind01 + 9 - ind04 = ind01 + 10 - ind11 = id1(k,19) + js - ind12 = ind11 + 1 - ind13 = ind11 + 9 - ind14 = ind11 + 10 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG19 - taug(k,NS19+j) = speccomb & - & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & - & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & - & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & - & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & - & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & - & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) - enddo - enddo - - do k = laytrop+1, nlay - ind01 = id0(k,19) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,19) + 1 - ind12 = ind11 + 1 - - do j = 1, NG19 - taug(k,NS19+j) = colamt(k,2) & - & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & - & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) - enddo - enddo - -!................................... - end subroutine taumol19 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 20: 5150-6150 -!! cm-1 (low - h2o; high - h2o) -!----------------------------------- - subroutine taumol20 -!................................... - -! ------------------------------------------------------------------ ! -! band 20: 5150-6150 cm-1 (low - h2o; high - h2o) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb20 - -! --- locals: - real (kind=kind_phys) :: tauray - - integer :: ind01, ind02, ind11, ind12 - integer :: inds, indf, indsp, indfp, j, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG20 - taur(k,NS20+j) = tauray - enddo - enddo - - do k = 1, laytrop - ind01 = id0(k,20) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,20) + 1 - ind12 = ind11 + 1 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG20 - taug(k,NS20+j) = colamt(k,1) & - & * ( (fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & - & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j)) & - & + selffac(k) * (selfref(inds,j) + selffrac(k) & - & * (selfref(indsp,j) - selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j))) ) & - & + colamt(k,5) * absch4(j) - enddo - enddo - - do k = laytrop+1, nlay - ind01 = id0(k,20) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,20) + 1 - ind12 = ind11 + 1 - - indf = indfor(k) - indfp= indf + 1 - - do j = 1, NG20 - taug(k,NS20+j) = colamt(k,1) & - & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & - & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j))) ) & - & + colamt(k,5) * absch4(j) - enddo - enddo - - return -!................................... - end subroutine taumol20 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 21: 6150-7700 -!! cm-1 (low - h2o,co2; high - h2o,co2) -!----------------------------------- - subroutine taumol21 -!................................... - -! ------------------------------------------------------------------ ! -! band 21: 6150-7700 cm-1 (low - h2o,co2; high - h2o,co2) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb21 - -! --- locals: - real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & - & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 - - integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 - integer :: inds, indf, indsp, indfp, j, js, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG21 - taur(k,NS21+j) = tauray - enddo - enddo - - do k = 1, laytrop - speccomb = colamt(k,1) + strrat(21)*colamt(k,2) - specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,21) + js - ind02 = ind01 + 1 - ind03 = ind01 + 9 - ind04 = ind01 + 10 - ind11 = id1(k,21) + js - ind12 = ind11 + 1 - ind13 = ind11 + 9 - ind14 = ind11 + 10 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG21 - taug(k,NS21+j) = speccomb & - & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & - & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & - & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & - & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & - & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & - & + selffrac(k) * (selfref(indsp,j) - selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) - enddo - enddo - - do k = laytrop+1, nlay - speccomb = colamt(k,1) + strrat(21)*colamt(k,2) - specmult = 4.0 * min(oneminus, colamt(k,1) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,21) + js - ind02 = ind01 + 1 - ind03 = ind01 + 5 - ind04 = ind01 + 6 - ind11 = id1(k,21) + js - ind12 = ind11 + 1 - ind13 = ind11 + 5 - ind14 = ind11 + 6 - - indf = indfor(k) - indfp= indf + 1 - - do j = 1, NG21 - taug(k,NS21+j) = speccomb & - & * ( fac000 * absb(ind01,j) + fac100 * absb(ind02,j) & - & + fac010 * absb(ind03,j) + fac110 * absb(ind04,j) & - & + fac001 * absb(ind11,j) + fac101 * absb(ind12,j) & - & + fac011 * absb(ind13,j) + fac111 * absb(ind14,j) ) & - & + colamt(k,1) * forfac(k) * (forref(indf,j) & - & + forfrac(k) * (forref(indfp,j) - forref(indf,j))) - enddo - enddo - -!................................... - end subroutine taumol21 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 22: 7700-8050 -!! cm-1 (low - h2o,o2; high - o2) -!----------------------------------- - subroutine taumol22 -!................................... - -! ------------------------------------------------------------------ ! -! band 22: 7700-8050 cm-1 (low - h2o,o2; high - o2) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb22 - -! --- locals: - real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & - & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111, & - & o2adj, o2cont, o2tem - - integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 - integer :: inds, indf, indsp, indfp, j, js, k - -! -!===> ... begin here -! -! --- ... the following factor is the ratio of total o2 band intensity (lines -! and mate continuum) to o2 band intensity (line only). it is needed -! to adjust the optical depths since the k's include only lines. - - o2adj = 1.6 - o2tem = 4.35e-4 / (350.0*2.0) - - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG22 - taur(k,NS22+j) = tauray - enddo - enddo - - do k = 1, laytrop - o2cont = o2tem * colamt(k,6) - speccomb = colamt(k,1) + strrat(22)*colamt(k,6) - specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,22) + js - ind02 = ind01 + 1 - ind03 = ind01 + 9 - ind04 = ind01 + 10 - ind11 = id1(k,22) + js - ind12 = ind11 + 1 - ind13 = ind11 + 9 - ind14 = ind11 + 10 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG22 - taug(k,NS22+j) = speccomb & - & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & - & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & - & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & - & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & - & + colamt(k,1) * (selffac(k) * (selfref(inds,j) & - & + selffrac(k) * (selfref(indsp,j)-selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) + o2cont - enddo - enddo - - do k = laytrop+1, nlay - o2cont = o2tem * colamt(k,6) - - ind01 = id0(k,22) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,22) + 1 - ind12 = ind11 + 1 - - do j = 1, NG22 - taug(k,NS22+j) = colamt(k,6) * o2adj & - & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & - & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) & - & + o2cont - enddo - enddo - - return -!................................... - end subroutine taumol22 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 23: 8050-12850 -!! cm-1 (low - h2o; high - nothing) -!----------------------------------- - subroutine taumol23 -!................................... - -! ------------------------------------------------------------------ ! -! band 23: 8050-12850 cm-1 (low - h2o; high - nothing) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb23 - -! --- locals: - integer :: ind01, ind02, ind11, ind12 - integer :: inds, indf, indsp, indfp, j, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - do j = 1, NG23 - taur(k,NS23+j) = colmol(k) * rayl(j) - enddo - enddo - - do k = 1, laytrop - ind01 = id0(k,23) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,23) + 1 - ind12 = ind11 + 1 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG23 - taug(k,NS23+j) = colamt(k,1) * (givfac & - & * ( fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & - & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j) ) & - & + selffac(k) * (selfref(inds,j) + selffrac(k) & - & * (selfref(indsp,j) - selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) - enddo - enddo - - do k = laytrop+1, nlay - do j = 1, NG23 - taug(k,NS23+j) = f_zero - enddo - enddo - -!................................... - end subroutine taumol23 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 24: 12850-16000 -!! cm-1 (low - h2o,o2; high - o2) -!----------------------------------- - subroutine taumol24 -!................................... - -! ------------------------------------------------------------------ ! -! band 24: 12850-16000 cm-1 (low - h2o,o2; high - o2) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb24 - -! --- locals: - real (kind=kind_phys) :: speccomb, specmult, fs, fs1, & - & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 - - integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 - integer :: inds, indf, indsp, indfp, j, js, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, laytrop - speccomb = colamt(k,1) + strrat(24)*colamt(k,6) - specmult = 8.0 * min(oneminus, colamt(k,1) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,24) + js - ind02 = ind01 + 1 - ind03 = ind01 + 9 - ind04 = ind01 + 10 - ind11 = id1(k,24) + js - ind12 = ind11 + 1 - ind13 = ind11 + 9 - ind14 = ind11 + 10 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG24 - taug(k,NS24+j) = speccomb & - & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & - & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & - & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & - & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) & - & + colamt(k,3) * abso3a(j) + colamt(k,1) & - & * (selffac(k) * (selfref(inds,j) + selffrac(k) & - & * (selfref(indsp,j) - selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) - - taur(k,NS24+j) = colmol(k) & - & * (rayla(j,js) + fs*(rayla(j,js+1) - rayla(j,js))) - enddo - enddo - - do k = laytrop+1, nlay - ind01 = id0(k,24) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,24) + 1 - ind12 = ind11 + 1 - - do j = 1, NG24 - taug(k,NS24+j) = colamt(k,6) & - & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & - & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) & - & + colamt(k,3) * abso3b(j) - - taur(k,NS24+j) = colmol(k) * raylb(j) - enddo - enddo - - return -!................................... - end subroutine taumol24 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 25: 16000-22650 -!! cm-1 (low - h2o; high - nothing) -!----------------------------------- - subroutine taumol25 -!................................... - -! ------------------------------------------------------------------ ! -! band 25: 16000-22650 cm-1 (low - h2o; high - nothing) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb25 - -! --- locals: - integer :: ind01, ind02, ind11, ind12 - integer :: j, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - do j = 1, NG25 - taur(k,NS25+j) = colmol(k) * rayl(j) - enddo - enddo - - do k = 1, laytrop - ind01 = id0(k,25) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,25) + 1 - ind12 = ind11 + 1 - - do j = 1, NG25 - taug(k,NS25+j) = colamt(k,1) & - & * ( fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & - & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j) ) & - & + colamt(k,3) * abso3a(j) - enddo - enddo - - do k = laytrop+1, nlay - do j = 1, NG25 - taug(k,NS25+j) = colamt(k,3) * abso3b(j) - enddo - enddo - - return -!................................... - end subroutine taumol25 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 26: 22650-29000 -!! cm-1 (low - nothing; high - nothing) -!----------------------------------- - subroutine taumol26 -!................................... - -! ------------------------------------------------------------------ ! -! band 26: 22650-29000 cm-1 (low - nothing; high - nothing) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb26 - -! --- locals: - integer :: j, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - do j = 1, NG26 - taug(k,NS26+j) = f_zero - taur(k,NS26+j) = colmol(k) * rayl(j) - enddo - enddo - - return -!................................... - end subroutine taumol26 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 27: 29000-38000 -!! cm-1 (low - o3; high - o3) -!----------------------------------- - subroutine taumol27 -!................................... - -! ------------------------------------------------------------------ ! -! band 27: 29000-38000 cm-1 (low - o3; high - o3) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb27 -! -! --- locals: - integer :: ind01, ind02, ind11, ind12 - integer :: j, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - do j = 1, NG27 - taur(k,NS27+j) = colmol(k) * rayl(j) - enddo - enddo - - do k = 1, laytrop - ind01 = id0(k,27) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,27) + 1 - ind12 = ind11 + 1 - - do j = 1, NG27 - taug(k,NS27+j) = colamt(k,3) & - & * ( fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & - & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j) ) - enddo - enddo - - do k = laytrop+1, nlay - ind01 = id0(k,27) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,27) + 1 - ind12 = ind11 + 1 - - do j = 1, NG27 - taug(k,NS27+j) = colamt(k,3) & - & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & - & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) - enddo - enddo - - return -!................................... - end subroutine taumol27 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 28: 38000-50000 -!! cm-1 (low - o3,o2; high - o3,o2) -!----------------------------------- - subroutine taumol28 -!................................... - -! ------------------------------------------------------------------ ! -! band 28: 38000-50000 cm-1 (low - o3,o2; high - o3,o2) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb28 - -! --- locals: - real (kind=kind_phys) :: speccomb, specmult, tauray, fs, fs1, & - & fac000,fac001,fac010,fac011, fac100,fac101,fac110,fac111 - - integer :: ind01, ind02, ind03, ind04, ind11, ind12, ind13, ind14 - integer :: j, js, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG28 - taur(k,NS28+j) = tauray - enddo - enddo - - do k = 1, laytrop - speccomb = colamt(k,3) + strrat(28)*colamt(k,6) - specmult = 8.0 * min(oneminus, colamt(k,3) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,28) + js - ind02 = ind01 + 1 - ind03 = ind01 + 9 - ind04 = ind01 + 10 - ind11 = id1(k,28) + js - ind12 = ind11 + 1 - ind13 = ind11 + 9 - ind14 = ind11 + 10 - - do j = 1, NG28 - taug(k,NS28+j) = speccomb & - & * ( fac000 * absa(ind01,j) + fac100 * absa(ind02,j) & - & + fac010 * absa(ind03,j) + fac110 * absa(ind04,j) & - & + fac001 * absa(ind11,j) + fac101 * absa(ind12,j) & - & + fac011 * absa(ind13,j) + fac111 * absa(ind14,j) ) - enddo - enddo - - do k = laytrop+1, nlay - speccomb = colamt(k,3) + strrat(28)*colamt(k,6) - specmult = 4.0 * min(oneminus, colamt(k,3) / speccomb) - - js = 1 + int(specmult) - fs = mod(specmult, f_one) - fs1= f_one - fs - fac000 = fs1 * fac00(k) - fac010 = fs1 * fac10(k) - fac100 = fs * fac00(k) - fac110 = fs * fac10(k) - fac001 = fs1 * fac01(k) - fac011 = fs1 * fac11(k) - fac101 = fs * fac01(k) - fac111 = fs * fac11(k) - - ind01 = id0(k,28) + js - ind02 = ind01 + 1 - ind03 = ind01 + 5 - ind04 = ind01 + 6 - ind11 = id1(k,28) + js - ind12 = ind11 + 1 - ind13 = ind11 + 5 - ind14 = ind11 + 6 - - do j = 1, NG28 - taug(k,NS28+j) = speccomb & - & * ( fac000 * absb(ind01,j) + fac100 * absb(ind02,j) & - & + fac010 * absb(ind03,j) + fac110 * absb(ind04,j) & - & + fac001 * absb(ind11,j) + fac101 * absb(ind12,j) & - & + fac011 * absb(ind13,j) + fac111 * absb(ind14,j) ) - enddo - enddo - - return -!................................... - end subroutine taumol28 -!----------------------------------- - -!>\ingroup module_radsw_main -!> The subroutine computes the optical depth in band 29: 820-2600 -!! cm-1 (low - h2o; high - co2) -!----------------------------------- - subroutine taumol29 -!................................... - -! ------------------------------------------------------------------ ! -! band 29: 820-2600 cm-1 (low - h2o; high - co2) ! -! ------------------------------------------------------------------ ! -! - use module_radsw_kgb29 - -! --- locals: - real (kind=kind_phys) :: tauray - - integer :: ind01, ind02, ind11, ind12 - integer :: inds, indf, indsp, indfp, j, k - -! -!===> ... begin here -! - -! --- ... compute the optical depth by interpolating in ln(pressure), -! temperature, and appropriate species. below laytrop, the water -! vapor self-continuum is interpolated (in temperature) separately. - - do k = 1, nlay - tauray = colmol(k) * rayl - - do j = 1, NG29 - taur(k,NS29+j) = tauray - enddo - enddo - - do k = 1, laytrop - ind01 = id0(k,29) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,29) + 1 - ind12 = ind11 + 1 - - inds = indself(k) - indf = indfor (k) - indsp= inds + 1 - indfp= indf + 1 - - do j = 1, NG29 - taug(k,NS29+j) = colamt(k,1) & - & * ( (fac00(k)*absa(ind01,j) + fac10(k)*absa(ind02,j) & - & + fac01(k)*absa(ind11,j) + fac11(k)*absa(ind12,j) ) & - & + selffac(k) * (selfref(inds,j) + selffrac(k) & - & * (selfref(indsp,j) - selfref(inds,j))) & - & + forfac(k) * (forref(indf,j) + forfrac(k) & - & * (forref(indfp,j) - forref(indf,j)))) & - & + colamt(k,2) * absco2(j) - enddo - enddo - - do k = laytrop+1, nlay - ind01 = id0(k,29) + 1 - ind02 = ind01 + 1 - ind11 = id1(k,29) + 1 - ind12 = ind11 + 1 - - do j = 1, NG29 - taug(k,NS29+j) = colamt(k,2) & - & * ( fac00(k)*absb(ind01,j) + fac10(k)*absb(ind02,j) & - & + fac01(k)*absb(ind11,j) + fac11(k)*absb(ind12,j) ) & - & + colamt(k,1) * absh2o(j) - enddo - enddo - - return -!................................... - end subroutine taumol29 -!----------------------------------- - -!................................... - end subroutine taumol -!----------------------------------- -!! @} - -! -!........................................! - end module rrtmg_sw ! -!========================================! diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 49e9cc6b3..692042937 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -234,30 +234,6 @@ kind = kind_phys intent = in optional = F -[iswcliq] - standard_name = flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation - long_name = sw optical property for liquid clouds - units = flag - dimensions = () - type = integer - intent = in - optional = F -[iovrsw] - standard_name = flag_for_cloud_overlapping_method_for_shortwave_radiation - long_name = control flag for cloud overlapping method for SW - units = flag - dimensions = () - type = integer - intent = in - optional = F -[isubcsw] - standard_name = flag_for_sw_clouds_grid_approximation - long_name = flag for sw clouds sub-grid approximation - units = flag - dimensions = () - type = integer - intent = in - optional = F [cosz] standard_name = cosine_of_zenith_angle long_name = cosine of the solar zenit angle @@ -464,22 +440,6 @@ kind = kind_phys intent = in optional = T -[mpirank] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 2933be7ef786d843e9eb7e8cfb793bfcdda6f2e2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 8 Apr 2020 06:09:44 -0600 Subject: [PATCH 080/404] Cleanup comments in newly added/modified radiation code --- physics/physparam.f | 4 ++-- physics/radiation_clouds.f | 21 +++++++++++---------- physics/radsw_main.F90 | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/physics/physparam.f b/physics/physparam.f index e722297de..3c5d22186 100644 --- a/physics/physparam.f +++ b/physics/physparam.f @@ -234,7 +234,7 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method -!!\n =4: exponential overlapping cloud +!!\n =4:use exponential overlapping cloud method !!\n Opr GFS/CFS=1; see IOVR_SW in run scripts integer, save :: iovrsw = 1 !> cloud overlapping control flag for LW @@ -242,7 +242,7 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method -!!\n =4: exponential overlapping cloud +!!\n =4:use exponential overlapping cloud method !!\n Opr GFS/CFS=1; see IOVR_LW in run scripts integer, save :: iovrlw = 1 diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 8a943a032..96c3dd664 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -241,7 +241,6 @@ module module_radiation_clouds real (kind=kind_phys), parameter :: cldasy_def = 0.84 !< default cld asymmetry factor integer :: llyr = 2 !< upper limit of boundary layer clouds -! DH* TODO - HOW TO GET/SET THIS CORRECTLY? integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & @@ -2341,13 +2340,13 @@ end subroutine progcld4o !----------------------------------- !> \ingroup module_radiation_clouds -!! This subroutine computes cloud related quantities using Thompson/WSM6 cloud -!! microphysics scheme. +!! This subroutine computes cloud related quantities using +!! Ferrier-Aligo cloud microphysics scheme. subroutine progcld5 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, & & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & - & IX, NLAY, NLP1,icloud, & + & IX, NLAY, NLP1, icloud, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: @@ -2356,7 +2355,7 @@ subroutine progcld5 & ! ================= subprogram documentation block ================ ! ! ! ! subprogram: progcld5 computes cloud related quantities using ! -! Thompson/WSM6 cloud microphysics scheme. ! +! Ferrier-Aligo cloud microphysics scheme. ! ! ! ! abstract: this program computes cloud fractions from cloud ! ! condensates, ! @@ -2393,6 +2392,7 @@ subroutine progcld5 & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! icloud : cloud effect to the optical depth in radiation ! ! uni_cld : logical - true for cloud fraction from shoc ! ! lmfshal : logical - true for mass flux shallow convection ! ! lmfdeep2 : logical - true for mass flux deep convection ! @@ -2755,7 +2755,8 @@ end subroutine progcld5 !................................... -!mz: progcld5 benchmark +!mz: this is the original progcld5 for Thompson MP (and WSM6), +! to be replaced by the GSL version of progcld6 for Thompson MP subroutine progcld6 & & ( plyr,plvl,tlyr,qlyr,qstl,rhly,clw, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, & @@ -2768,8 +2769,8 @@ subroutine progcld6 & ! ================= subprogram documentation block ================ ! ! ! -! subprogram: progcld5 computes cloud related quantities using ! -! Thompson/WSM6 cloud microphysics scheme. ! +! subprogram: progcld6 computes cloud related quantities using ! +! Thompson/WSM6 cloud microphysics scheme. ! ! ! ! abstract: this program computes cloud fractions from cloud ! ! condensates, ! @@ -2778,7 +2779,7 @@ subroutine progcld6 & ! top and base. the three vertical cloud domains are set up in the ! ! initial subroutine "cld_init". ! ! ! -! usage: call progcld5 ! +! usage: call progcld6 ! ! ! ! subprograms called: gethml ! ! ! @@ -3883,7 +3884,7 @@ end subroutine gethml !.. cloud fraction and is relatively good at getting widespread stratus !.. and stratoCu without caring whether any deep/shallow Cu param schemes !.. is making sub-grid-spacing clouds/precip. Under the hood, this -!.. scheme follows Mocko and Cotton (1995) in applicaiton of the +!.. scheme follows Mocko and Cotton (1995) in application of the !.. Sundqvist et al (1989) scheme but using a grid-scale dependent !.. RH threshold, one each for land v. ocean points based on !.. experiences with HWRF testing. diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index 51512835c..924d750b1 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -1228,7 +1228,7 @@ subroutine rrtmg_sw_run & do k = 1, nlay zcf0 = zcf0 * (f_one - cfrac(k)) enddo - else if (iovrsw == 1 .or. iovrsw == 4) then ! max/ra/exp overlapping + else if (iovrsw == 1 .or. iovrsw == 4) then ! max/ran/exp overlapping do k = 1, nlay if (cfrac(k) > ftiny) then ! cloudy layer zcf1 = min ( zcf1, f_one-cfrac(k) ) @@ -2068,7 +2068,7 @@ subroutine cldprop & !> -# if physparam::isubcsw > 0, call mcica_subcol() to distribute !! cloud properties to each g-point. - if ( isubcsw > 0 .and. iovrsw /= 4 ) then ! mcica sub-col clouds approx + if ( isubcsw > 0 .and. iovrsw /= 4 ) then ! mcica sub-col clouds approx cldf(:) = cfrac(:) where (cldf(:) < ftiny) From 6a8c80e538f23cfa7b6703b423dd9963c4477334 Mon Sep 17 00:00:00 2001 From: Man Zhang Date: Mon, 13 Apr 2020 20:32:19 -0600 Subject: [PATCH 081/404] Merge mzhangw:HAFS_fer_hires into NCAR:dtc/hwrf-physics Squashed commit of the following: commit 406f7408b6308145d81e84cc6047d8cd19396f22 Author: Man.Zhang Date: Mon Apr 13 20:24:59 2020 -0600 FA uses progcld5 commit 682fab9654f7c6188109efa3fec9a922d8034c39 Merge: 25b3f66 d979604 Author: Man.Zhang Date: Mon Mar 16 10:42:12 2020 -0600 Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 25b3f66d74fc4ece9a665c4e2c353294bb60e636 Author: Man.Zhang Date: Mon Mar 16 10:37:42 2020 -0600 modify stateout update of FA scheme commit 05c533134ac5d61581dbd37a7995ca8af21fda60 Author: Man Zhang Date: Tue Feb 11 16:45:48 2020 -0700 sci doc updates commit 982a11d13d0f8287fefc8b3c217f0933c57e1a95 Author: Man Zhang Date: Fri Feb 7 16:47:00 2020 -0700 FA sci doc updates commit 27c1fcbe3e57ece5a039a083451195e2ed652303 Merge: 8d87e55 73f9f09 Author: Man.Zhang Date: Fri Feb 7 14:26:54 2020 -0700 Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 8d87e55fef1a4e7b7b8ce9420b190951a4e47cc3 Author: Man.Zhang Date: Fri Feb 7 14:24:47 2020 -0700 FA scientific documentation commit 67ad5a523f4815d145233383343d15655a29896d Author: Man.Zhang Date: Wed Dec 11 13:13:48 2019 -0700 consolidate with Chunxis version commit 76b547584344386ce4cee467b588e348676b6ef6 Merge: 7c6a472 02812f6 Author: Man.Zhang Date: Wed Dec 11 11:49:22 2019 -0700 Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 7c6a47282704958e18f02b8c9f36f6ebf2262d71 Author: Man.Zhang Date: Thu Dec 5 16:28:50 2019 -0700 output mass weighted RF in GFS_suite_stateout_update_run, it will used in FA commit 41086af5af34ed011ecc7fbad64458a7c9c54ee5 Merge: 92d9edf f895fc0 Author: Man.Zhang Date: Thu Dec 5 12:08:30 2019 -0700 Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 92d9edf0d624eea93d1a0ce740c6d55bb556015c Author: Man.Zhang Date: Mon Nov 25 14:16:16 2019 -0700 chunxi fix : f_rimef = qg in FA code commit f9e3ee0af2c0cd27b9861ae6d89fd06744ee233e Author: Man.Zhang Date: Mon Nov 25 11:39:54 2019 -0700 From Eric: convert wet mixing ratios of cloud species to mixing ratio before the scheme, and convert back after scheme. From Chunxi, modify: 1. FA interface with GFS RRTMG using progcld2; 2.air pressure improvement; 3. add f_qrimef mixing in PBL commit f497d403dc61b52b0cba01808a2e58ad2461db60 Merge: bd4a30c 73b8c0d Author: Man.Zhang Date: Mon Nov 25 09:44:14 2019 -0700 Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit bd4a30c08411d2bcb692c7499028284920ccee08 Author: Man.Zhang Date: Fri Nov 22 14:30:16 2019 -0700 monir format fix commit 4c2abd18beaaa068c32324f7dbda5deff78712a3 Merge: db7fc8d a7c38a6 Author: Man.Zhang Date: Thu Nov 21 19:29:50 2019 -0700 Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit db7fc8db07c4291f791e835f2f28f824b6daace1 Author: Man.Zhang Date: Thu Nov 21 19:29:04 2019 -0700 minor change commit ab52b2610907aa7aeae78a95c610133c526a9195 Author: Man.Zhang Date: Thu Nov 21 18:48:53 2019 -0700 delete update_moist module commit db9e3a75590043ef03dd840229fe98572081c9cb Author: Man.Zhang Date: Mon Nov 18 14:40:10 2019 -0700 cleanup FA codes commit 482a43bc753ec033374dfc387edbfde5281b5083 Merge: 380229c 74851c1 Author: Man.Zhang Date: Mon Nov 18 14:31:07 2019 -0700 Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 380229cf38ec5ecec5aae31677c7038de9d9b79c Author: Man.Zhang Date: Thu Nov 14 13:46:13 2019 -0700 1. do some code cleanup 2. correct tracer diffusions definition before/after PBL in GFS_PBL_generic commit a312444323d43746cca3fbff816a087ab14e2787 Author: Man.Zhang Date: Mon Nov 11 10:52:21 2019 -0700 Chunxi's email 11/07/2019: the srflag is based on sr. so we need to make sure 'cal_pre' is always set to false in namelist file. commit f2c927192cbdf27e91ab3f5b4bbbba1709bb7743 Merge: 6777489 333980d Author: Man.Zhang Date: Thu Nov 7 11:03:56 2019 -0700 Merge branch 'dtc/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 6777489880b16735c809a70cc98c134566b52b72 Author: Man.Zhang Date: Thu Nov 7 10:56:33 2019 -0700 add Chunxi GFS_MP_generic change related to FA scheme commit 327b07f577d1cd367de27a7104113533cb098e36 Author: Man.Zhang Date: Wed Oct 23 19:56:11 2019 -0600 minor fix commit bfedaabc2a9900cbc2e1428823e8ef57d1f31f1a Author: Man.Zhang Date: Wed Oct 23 09:44:46 2019 -0600 add meta files for FA scheme and HAFS_update_moist commit a5b5fa967a3a350c04c8f7936226ce71ce973ca7 Merge: 1ff46c7 cfafb29 Author: Man.Zhang Date: Fri Oct 18 09:56:40 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 1ff46c78740c8d69dcaeab4dac881651f9f757d6 Author: Man.Zhang Date: Tue Oct 8 20:42:58 2019 -0600 add update_moist() module to F-A suite commit 258fcebef1cb17750fc1f3de0d143e1ce3ea53da Merge: 53fba5b ecb641e Author: Man.Zhang Date: Mon Oct 7 15:36:47 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 53fba5b4086361d4d4c2ceb0fb41334c48ee30cd Author: Man.Zhang Date: Mon Oct 7 14:55:21 2019 -0600 1. recalculate some FAmp tables which depend on physics time step in F-A scheme 2. change ncw value to HWRF application commit 1656aac7574026f40bd006d37771bb845b0ed4bb Author: Man.Zhang Date: Mon Sep 30 12:02:24 2019 -0600 revert MP_generic to original version to obtain B4B for control/csawmg/satmedmf commit dfccc5b66b3148b6b27f5ea41c519280db1a9537 Author: Man.Zhang Date: Sun Sep 29 11:06:55 2019 -0600 fix bugs in GFS_PBL_generic commit fc744d37b4d1793c5b12915a6980a0226d630406 Merge: 1a024b7 dc74b57 Author: Man.Zhang Date: Mon Sep 23 14:17:29 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 1a024b7e33569813915088ea89cec4004af2e46c Author: Man.Zhang Date: Fri Sep 20 22:01:07 2019 -0600 fix ccpp_control crashed problem commit 957ff823926e8eae5b94cdc9baec00a50725cd09 Author: Man.Zhang Date: Thu Sep 19 10:14:59 2019 -0600 turn on/off spec_adv option is working in CCPP F-A scheme. commit 370d49f718bd1c13be7b8d1176d54183d8452a5c Author: Man.Zhang Date: Tue Sep 17 16:55:24 2019 -0600 use progcld5 for F-A in GFS_rrtmg_pre commit bbbf155ebf1584d27fc357f66b35f874c78d706c Author: Man.Zhang Date: Thu Sep 12 09:19:17 2019 -0600 F-A scheme modification related to meta data file update commit 2b8d9e4cce92c59447078d61feef8dca11dcbd20 Merge: 08662ae 9fc5ac1 Author: Man.Zhang Date: Wed Sep 11 16:15:30 2019 -0600 Merge branch 'HAFS_fer_hires' of https://github.com/mzhangw/ccpp-physics into HAFS_fer_hires commit 08662ae5463aeb30524ac0798219f5c7454cbe13 Author: Man.Zhang Date: Wed Sep 11 16:14:47 2019 -0600 add vars to meta table commit 9fc5ac15ff2b7a4e822f68e592ddb4aa7d207832 Author: Man Zhang Date: Wed Sep 11 16:12:00 2019 -0600 initialize Doxygen documentation in F-A scheme commit d749a6879a47656bad756e1823a12db92df14efa Merge: dff5b0f 20dd8d2 Author: Man.Zhang Date: Tue Sep 10 15:19:15 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit dff5b0f17da3a6d6d47ff5d184fea30f7b21f010 Merge: bed9c0e 727417c Author: Man.Zhang Date: Wed Sep 4 14:30:28 2019 -0600 Merge branch 'chunxi_physics' of https://github.com/ChunxiZhang-NOAA/ccpp-physics into HAFS_fer_hires commit bed9c0e4308b5c44ea4b3daac0976c69d848200a Merge: 1f8a26a 44137a3 Author: Man.Zhang Date: Wed Sep 4 14:26:51 2019 -0600 Merge branch 'HAFS_fer_hires' of https://github.com/mzhangw/ccpp-physics into HAFS_fer_hires commit 1f8a26a47908983229e19052b511035e0f5aea92 Author: Man.Zhang Date: Wed Sep 4 14:24:27 2019 -0600 bug fixed in augument list of FER_HIRES commit 44137a3741ad118cfbf6b46a1e39ebcdff84d808 Merge: 1808226 6abba22 Author: Man.Zhang Date: Tue Sep 3 10:33:04 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 1808226b104453dc0907aad07015a098991db9df Author: Man.Zhang Date: Sat Aug 31 17:51:49 2019 -0600 tracer treatment fix commit 727417c249e2c20d91c55334bdd8da1ba0de9a71 Author: Chunxi.Zhang-NOAA Date: Fri Aug 30 22:13:06 2019 +0000 GFS_MP_generic.F90: recalculate srflag GFS_PBL_generic.F90: define tracers for vertical diffusion GFS_rrtmg_pre.F90: change ncnd module_mp_fer_hires_pre.F90: revised the definition to tracers mp_fer_hires.F90: revised the definition to tracers commit ec729e8434a0b63010547ba3b8ed3e21a6d54342 Author: Man.Zhang Date: Thu Aug 29 21:43:36 2019 -0600 make consistent standard name as Chunxis implementation commit 3a26975a0524594c917a99826c6b7c558894ce8a Merge: 1426c6e c7faeb7 Author: Man.Zhang Date: Thu Aug 29 21:02:59 2019 -0600 Merge branch 'chunxi_physics' of https://github.com/ChunxiZhang-NOAA/ccpp-physics into HAFS_fer_hires commit 1426c6ee9ea83346319faf966d22b93ae508096e Author: Man.Zhang Date: Thu Aug 29 20:32:12 2019 -0600 fix omp message and pass F-A scheme commit c7faeb7b8b3a2e98596308f088824d4f097886af Author: Chunxi.Zhang-NOAA Date: Thu Aug 29 16:20:51 2019 +0000 mp_fer_hires.F90: changed the definitions for f_ice, f_rain and f_rimef. Deleted QS since it will not be used. we only need QI. module_mp_fer_hires_pre.F90: changes related to f_ice, f_rain and f_rimef module_mp_fer_hires_pre.F90: added commit 4e0d9bd0026cc53ea67fed262d3632d05ac917f1 Merge: 9aaa575 01823bc Author: Man.Zhang Date: Tue Aug 27 17:13:12 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit 9aaa57535015ffb489ba51635a65fe0fc26cc1e9 Author: Man.Zhang Date: Tue Aug 27 15:57:43 2019 -0600 minor fix commit 6b888640907453ae7f90c4c16107afe811a478ec Author: Eric Aligo Date: Tue Aug 27 17:31:03 2019 +0000 Fixed bug to allow both Qi and Qc to be updated from CU scheme. commit 73f95a60f1f7fbc2a2679f2a19498c036845a436 Author: Man.Zhang Date: Mon Aug 26 22:05:00 2019 -0600 fortran format fix commit d5f8a622be5f9ad4c1b636f4762cf44cdca91774 Author: Man.Zhang Date: Mon Aug 26 17:16:30 2019 -0600 minor fix commit fb011da3962ce69c10c23c6241cc0f29153936f3 Author: Man.Zhang Date: Mon Aug 26 17:05:04 2019 -0600 Aligo-use the dx of the 1st i poit to set an integer value of dx to be used for determining RHgrd commit 80fedc458556b9c7ca4a73d61dd1c50eec023fb4 Author: Man.Zhang Date: Mon Aug 26 13:41:24 2019 -0600 further constants fix commit 473ff9ea06d080d5a17483c5731081e463523840 Author: Man.Zhang Date: Mon Aug 26 10:45:49 2019 -0600 dimension fixed commit c29c3cdcdf13db9e53e838a6e42d7c6f6afb379c Author: Man.Zhang Date: Sun Aug 25 22:44:04 2019 -0600 convert USE ESMF to ccpp mpi method; temporary constant treatment commit 8b886b9627cf5fa8a053522f7411d77f61c8a368 Author: Man.Zhang Date: Wed Aug 21 11:06:19 2019 -0600 delete HWRF F-A scheme commit b78a1a2ae7f8ef288c368b5b0cf3fa46405038af Merge: dbabee7 ff2c6d8 Author: Man.Zhang Date: Mon Aug 19 13:42:42 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit dbabee7650a6fbed815c3dc566f478b78166baf8 Author: Man.Zhang Date: Mon Aug 19 13:41:36 2019 -0600 update commit 7c481b51e96a40e43fa5b79e45dc5c12a3908401 Author: Man.Zhang Date: Thu Aug 15 08:34:33 2019 -0600 initialize FER_HIRES scheme commit bbac675e1379f533a6b492c0c6cd4cf90d9d3a21 Merge: d06f755 fb29006 Author: Man.Zhang Date: Mon Aug 5 10:33:29 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into HAFS_fer_hires commit d06f7550c6873d7b724d96fb6b066e7324396699 Author: Man.Zhang Date: Thu Aug 1 11:29:43 2019 -0600 minor fix commit 970ae6694eafe6d0481b527f39dfccf51cdc3f73 Author: Man.Zhang Date: Wed Jul 31 13:41:12 2019 -0600 change file name commit d666a3e34cab2efcd3aab998c510150fecf3b022 Author: Man Zhang Date: Wed Jul 31 12:25:36 2019 -0600 pass prebuild commit 63f07c4b13a2b73aff22402560a32839c9d79e51 Merge: d0d4035 6bb0897 Author: Man Zhang Date: Wed Jul 31 10:10:31 2019 -0600 Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics into FA-HWRF-V4_0a commit d0d40355c48ea3741aa5d365145d7b5c68e0c8e7 Author: Man Zhang Date: Wed Jul 31 10:09:44 2019 -0600 initialize FER_HIRES implementation commit e77c0a16075569a3856fc2ca7990ad2ccd9e93a5 Author: Man Zhang Date: Fri Jul 19 14:55:03 2019 -0600 add fer_hires wrapper module commit 193435bde766b7a0c891b88a8af6bc33fa2f1652 Author: Man.Zhang Date: Mon Jul 1 16:31:01 2019 -0600 initialize Ferrier-Aligo MP scheme implementation from HWRF V4.0 --- physics/GFS_suite_interstitial.F90 | 20 +- physics/GFS_suite_interstitial.meta | 41 ++ physics/docs/ccpp_doxyfile | 4 +- physics/docs/img/FA_DRI.png | Bin 0 -> 162043 bytes physics/docs/img/FA_MP_schematic.png | Bin 0 -> 135098 bytes physics/docs/img/FA_NOR_EQ.png | Bin 0 -> 47494 bytes physics/docs/library.bib | 554 +++++++++++++++------------ physics/docs/pdftxt/HWRF_FAMP.txt | 91 +++++ physics/module_MP_FER_HIRES.F90 | 255 ++++++------ physics/mp_fer_hires.F90 | 103 ++--- physics/radiation_clouds.f | 240 ++++-------- 11 files changed, 697 insertions(+), 611 deletions(-) create mode 100644 physics/docs/img/FA_DRI.png create mode 100644 physics/docs/img/FA_MP_schematic.png create mode 100644 physics/docs/img/FA_NOR_EQ.png create mode 100644 physics/docs/pdftxt/HWRF_FAMP.txt diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 935dd9430..1707c7f7c 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -409,7 +409,8 @@ end subroutine GFS_suite_stateout_update_finalize !! subroutine GFS_suite_stateout_update_run (im, levs, ntrac, dtp, & tgrs, ugrs, vgrs, qgrs, dudt, dvdt, dtdt, dqdt, & - gt0, gu0, gv0, gq0, errmsg, errflg) + gt0, gu0, gv0, gq0, ntiw, nqrimef, imp_physics, & + imp_physics_fer_hires, epsq, errmsg, errflg) use machine, only: kind_phys @@ -419,7 +420,9 @@ subroutine GFS_suite_stateout_update_run (im, levs, ntrac, dtp, & integer, intent(in) :: im integer, intent(in) :: levs integer, intent(in) :: ntrac - real(kind=kind_phys), intent(in) :: dtp + integer, intent(in) :: imp_physics,imp_physics_fer_hires + integer, intent(in) :: ntiw, nqrimef + real(kind=kind_phys), intent(in) :: dtp, epsq real(kind=kind_phys), dimension(im,levs), intent(in) :: tgrs, ugrs, vgrs real(kind=kind_phys), dimension(im,levs,ntrac), intent(in) :: qgrs @@ -431,6 +434,7 @@ subroutine GFS_suite_stateout_update_run (im, levs, ntrac, dtp, & character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + integer :: i, k ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -439,6 +443,18 @@ subroutine GFS_suite_stateout_update_run (im, levs, ntrac, dtp, & gu0(:,:) = ugrs(:,:) + dudt(:,:) * dtp gv0(:,:) = vgrs(:,:) + dvdt(:,:) * dtp gq0(:,:,:) = qgrs(:,:,:) + dqdt(:,:,:) * dtp + + if (imp_physics == imp_physics_fer_hires) then + do k=1,levs + do i=1,im + if(gq0(i,k,ntiw) > epsq) then + gq0(i,k,nqrimef) = max(1., gq0(i,k,nqrimef)/gq0(i,k,ntiw)) + else + gq0(i,k,nqrimef) = 1. + end if + end do + end do + end if end subroutine GFS_suite_stateout_update_run diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 9cda625ab..0f02e7c63 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1043,6 +1043,47 @@ kind = kind_phys intent = out optional = F +[ntiw] + standard_name = index_for_ice_cloud_condensate + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[nqrimef] + standard_name = index_for_mass_weighted_rime_factor + long_name = tracer index for mass weighted rime factor + units = index + dimensions = () + type = integer + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_fer_hires] + standard_name = flag_for_fer_hires_microphysics_scheme + long_name = choice of Ferrier-Aligo microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[epsq] + standard_name = minimum_value_of_specific_humidity + long_name = floor value for specific humidity + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/docs/ccpp_doxyfile b/physics/docs/ccpp_doxyfile index 339ddb3f8..0578d14a8 100644 --- a/physics/docs/ccpp_doxyfile +++ b/physics/docs/ccpp_doxyfile @@ -133,6 +133,7 @@ INPUT = pdftxt/mainpage.txt \ pdftxt/GSD_CU_GF_deep.txt \ pdftxt/GSD_RUCLSM.txt \ pdftxt/GSD_THOMPSON.txt \ + pdftxt/HWRF_FAMP.txt \ ### pdftxt/GFSphys_namelist.txt \ ### pdftxt/GFS_STOCHY_PHYS.txt \ pdftxt/suite_input.nml.txt \ @@ -262,9 +263,8 @@ INPUT = pdftxt/mainpage.txt \ ../module_mp_radar.F90 \ ../mp_thompson_post.F90 \ ### HAFS - ../module_MP_FER_HIRES.F90 \ ../mp_fer_hires.F90 \ - ../module_mp_fer_hires_pre.F90 \ + ../module_MP_FER_HIRES.F90 \ ### utils ../funcphys.f90 \ ../physparam.f \ diff --git a/physics/docs/img/FA_DRI.png b/physics/docs/img/FA_DRI.png new file mode 100644 index 0000000000000000000000000000000000000000..63737c469b2e16b5dcd624d12cbb3824142abe90 GIT binary patch literal 162043 zcmd4(Ra_lQ)HV)c37Z6WcMTBSHMqN5g1fuBy9Rd&?iM__I|L67!QI33&dK|J-+$&e zcXKi4ChWbttE*O3ty+)t30II4M|g+(4gvxKK~h3Q2?7Fg5CQ@^9P}3W#*FDO6awO1 zr@64Of~2r8v4VrGiMf?A1cXF*@>f_DWlh|{GtWbkyf;Ges2<`T$$HS#60mqA{>V}w z8df~gKr&8D5s{jxAq5QlWNys9fZ$JpwMTwo0pAfZ1x1aCYJ#%X>f20T_gAlc9@f1# zo;sgS`Syt*BnsdO8E{hG5(m@nz&^Fik{0Bfx9meeF?K_X=Z=1P=VtTi6C}j+kDKcB z_Q)|Yrxhdi#jcIl>ID6MxKs$iPoTj%m@)LAN#cUg;qCX3g1aR4mGC6CDVE47+hlJ@ zyibaoJbBS$WEx%@shvMpMeBoOCh;YL_Lt&rG7o=Ec=^{im=wXS^o)UB_jKYC zNV;EqENVCfINU}3IDPST$Lyi1K6@4hrM%M+Wq> z4PJHh^A&?IEe)A5Hz;I4H@X!hN;*ii6SLCz`yt``S3##+ne98d{f~*>efFO`!tOOm z>UuCa<2SJyQmG```H9iVAy9rnVTM6_A-`Ap#EcAudk%w748gmD1x>snjQy1+)A|Ql z^4I?T8nhr*jve&==>whOQl{}AV?W^imRPu6hXoY&CvZhNYO$q{Ai6st;Oejp;prik z^&kY(bfU~V#G6KKASP~@MW3%9ejYcy!4`y35=5kiWXpYX?GIN2!9KL)`bMuC35GOF z#J|xm{5mnfDFKq*kDizaJz(t%5jC`UH`71>AeY}^2#G4-IH8vX`vfoN zMou|@L-K$?_+&WcdGJ0eK(YqE;@!~?X?>ob2)Cian{14Da)I@mylzxF@6@{oH%;zI zz0e5#U^f@fVczAEE2t#B9f2_py%c2K<=dw@yg5@= zOxaJfQNMpG@DU&axH@R z&{Tc9+laqnwm<%Qv?ptkcY|x^UWYo1jva8kXuU`EBKX7GN%V>;AR9+{fQ%3FhruL? ztcg^RG^1K2jY2LCXBOehM`KD#l~@&`qhLp_MkYcNkdTltllm!Lk@QPqMT0OF3p>%yrF?%tNjz4;>EK4?Snln9*?@(*)Dd z(+HTInHP=4jP2{b*Xh;KE%7cH)_pY!rJ;_%><|1=XjP=5RHY!cQ{&*_;M6M8D%6VR zz~``iS$C;+xp|p(xqG?416xX6_Ayybw)iwZJAb{%M^Qo5PB~2ZXVp~hR5fE!i^#Mp zlU%J}t)ji)MI@^1ur!UNd8|_844QF6UEZbCF8prqhIOHga!m*G+hB-Jk% z!pUEfZ$1pFd{?DZnOE^vaW8{aVJPiXEGTO&qbS2D&r-)zF8Rh&?l>1Y&+x4)e|UD) zY`8&b*?74nBqF3bL}L4!SnNPUakfdSNtH>#9vXdqN|su?TCG~iLQB*4TZa>b<(p+B zXArjwHyrnq^LM9WryD0Sr{=?^gP7kmzo&2NZhqeo9wpxBUe8|BUY}uqK{$p_fJel+ z#{Chp5CRvn8`2#0g$$1@W}2jc-!Q7SgK4ql$9*>3aNjujTH(6UP?81imvqZzgGZOr z+nIwR&lDH>7aJ4n6e~6J+aaBW)k)sP_O<7Z;Ji1p`Kwzo6iYKJ4)w<6yF9dH<(%cc zYIl`13!|0Inyy;D^|g(gE37}GmMm5VeiAlxm{OTy88!Ewrt=M~uldx!Xg*CMvLgzG zDkJ)Gr*l$rEpWwroYlr`u5ehYNi0U|J^VJC%QDV2@L;kB^&IF`Ga8O*Wriou0m)v7USfTgTG+&H6U~0{@XW zw-;0ApH5G&vuV{s84r5z)yW0hf(>Ke1m7^d;kr9#69a9%0E(l;kk&flV=9#$ua%$RX(pndxX=pEJFKW-QowXIY zCB7tg+;LnB^ED_Thyx!<4rgCC-*zj$ue7kc@ONR_PT0->x|fuU6rOrYMqfu}SxS1^ z@*vCB?$z5_{F&RL=&P3pRVaxXv8fM9!ejEy5}&UF&8XM7I(T1{#oPuCWzuA9Ok7j+ z7j7%QF0C(hRft!cR-LWp*6NRjxFW*b>BA#2X?PzEwMs8;Q+$1_4K( zPT#qGGsj>X(P5_J+G|6G552T)KDAFpO;W98HNUmlnmuYLTlO3(t*x!Iq}HlDTJ%%| zT)b{B*3q)5wD4qbW7w7O-pdCh<|kJBL_ge|(!45Xm7K_NWKMHA)`ZWfOu@66vc)!& zH^4WEHQqKpG&(o&G;zF`JZj%)M%VA|?@XR>%k$>A`s@ka28Sc+4Q50hNA_kNaTDoA zv^(uzj*RlDKUeFt{r0|5`l`JcY$>-mq37DN?$UcIHY%HuF}}92CflX`x;|$(JL@%i zt7cj4ZR@#F*Ln5w@deA)bG_3e)MtOMJHo%SP2crwL)+W-od4+0LEsMT8DX(Nrccrp z_EpO-;1o?L`5;gGhw;9^e#+#0HEv(wu0GB*HYBaLI_G`1FTt?qCm+R2r5EFqZ~X^L zOlP(0>g9UT?Ry>BK8dd!XFF}#!>Rj!s!9T&fbF));{bZ&K~_^{kB{8@W_+D=PK!yycuOs$8aHtN2(fM~CN z>xUog2HU5OMzPO#m6_|FBOv}u;G(@cI}rh5z6v5}7XsPOEva{CYB=p~p+1FX4x>9I zW$OY7Zi}9N&oLf(Km37}^?Lc_yU6E2ni=K7 zJVOur2K;k|N1kS?_ng&K)?b0rHp^T^!%0I{hTG8A`lG&)t%31JH)}hf(uIKFb>jy9 zv^I9qCw8;8vT@{g<0Jih1vl_F_-h7I;=h+TS@Mx;$SM#E+d3E%vwdX!$Vkfnj+mI3 z*TKkyTS-Lh-|fIBK2kF$Cp&Hi23J?tkFG2qZ5>P*n7FvO7#Nuun3?H;E9f2FZJhMo z=xrRy{%hoa+7U5!G;}bxb27KJAqKarZ(!@}#79aBe$fB^_g_Da-OT^blWZLS4GS0` z1NavPrjLva|JycjD=+w4ZUu8UV=E02b8BN8N8lO!tZZz&f3N@l_~rjR@&CG0^Z(q* z#rXfY^Z)wg-<`Y+-~s$!1Ntvof4>F7#s7|%;eSKV|L#+?`fmsbK?q5aPbzMZ$62tc z=>4dJM=@S~Wa5yY0w5tFp+AI0q_TvRgyE2V`!)$m#c=#_4j=Yz4}vtp56T32SYm?9 zl=t-ZraJFyt1-jz`srFo+1bjo?Gs3d`jT45%-`dI7Icpt=Abxs(e%Exs^e~?*9d2{uTV&CW=D6 z1-zX7!{zSovSoE6-_c65E&Q!QTjAeM8j$6t8Wi6t=j(=3(_z@ix?Cb77b-HpHvBk?+2u<4|^F!o_D7UWR0$8>pc-q zv3Y!IWh%oyzQ6oop9gOO{|l(#HMp0g0|L+If!9Zilj#y1w(E57G3m}fpQM>)$L9%$ zK6b%A+1<>mukz8%A}b6Apd``LK0N>}N-llfDJ&&y+- z-KNlMYd4a>>vKK6=W*@rc@mBCPE9Z3d%FCMf3uYD2lQDHVxGsp;Gk$y`e#+v>#B7ku290I&X;-zKa`%jBmBBKy=o+Pv~nWurC&aPeYaEl+c{|ay)di=DLwgTh(IFb>;DImlAV> zsJX;o7p*E$R}OwK>-?}^ASapBYP5iJSAh;5! zX@=50>~vLXmFedrk`w$-R-V5LV)>N}#^A{Ls{StZBxHqgCaG@BLd}G?tk%mai@5Kh z@)uOW>ns-ncrGSHyP2x9W%Th5%GeHW<&j0(zrlDSPbtJ;KT*`Yl3m^`ex_y8BEOFP z`}E*gU||Kvy2q$zGU^93Sg)u(ULTUhkUP>d41TpHdnzzA?^0|N27$ zPCBGtv~>QPP2vk+W63;oEueh(|JuMX)5X4q__u%Sh!jdHh6Jj(|KHL@C4!_F?8`AE z$om)4Fd!Nspj1rt|MsAS7myp#{+}JlAP5C%==FQ^=TvAn%ekDcrl~9b?>dEovf5WK zk;_812>Prt%;a?(u%Odm7N6<+=b_H~$wg9DwV#(-!b9P2AQ+MF?>2mmCo;M8=ioac z5)2PgceMf$BCtN{P&0Hr*UgowN>7oi{tM^35QvetZI~D-z&gP;r>v1lW1gus6qk-c zvC+#={+kWWQK;z>KR}ePF-Qs2M@2Bwu5Ja zfu-n0%P={nQHJ0NOcPunAZDLs*@sMpnZ%`ZLVicD{~0gjDjg2bw8w~rTtk4(zK+{!!B0q zS?AMEZXn_%(IQf9G_d@vCSz~qfax*7hYULpMB`AJ;k9V zL`vC0pdlcKAHLM2vstEiT@F*FU~{=oaP3P}>orT3DpBmt$_pfy z!x`f)_EpFxBOoCpubucT)fv}0AE|jp9I;#doJu#NRj)dZIPygQd(N~hH-Lu?3sr$6 zWLMpBn?9DxB)m}lIj3^ls&1vqTKmwx7h$H=ao=j+=lMc>GZ;8h|0Zqo**(xx2QWrv zn^jI67LzE74&Y>vWOTTG@TxN!Ms@%5uwM!1viT#p&SV_-;`Fmdxf(s!c{lX#as6b9 z&DwW3>v9n!AoK_N<@B^b9RSd5OdWUYo|oOwNJAsZw1KzS^r!Eyw5&iCp90^iB|5z! zVUj5ZY3X)&+^o`+D&z&|ng-#Ma4(BT%1BFJecgn%Oo$cu(-MWxHN$;r#M62=8i7F@ zv^ZC)Tv>|AQYCc_&QJgIv?#J}kIjSWg55t)XOm)4z*QNC;Hc;6MkqlEG#V8 z>#|tQ6L>F&$e2BEt$Ydir$Xx|xTUok%=Cwv62QrZn#Z6Il*Z*)d@?$b#ZzQ7oUru! z@aqssjqL*IVsX=db&U=&qv-^GIoJ0I15EGp9@yQjNQS0R#=Lc(r<0U+MsHH&c_QCu zlCQchX*UuSDbvGMx@{F`vNylyPe_JPt*7B|iH$;Y8xe7sMFwIBj^y6&gb%#acR83M z!Hb_M0WKcVw(T&kj!Y>-c}E(~!3e8Y1}(Zp@+pvZ0bfW5={cRQKucYLpsHcMl&e)n)yt$=75D{B5l{cl zyrb?55i{%1SRpWPY>bVK-i*wx~GhoBgX+7Wkwhw{W;dDumSGpFU+B2Cjtw=1AGQn{e z+ejRZA>euL+kKmuoo&M=a<|qY>||ycgYOOm7l})#`0Hn%R^-!*D*ICs>6lrN{eV8f z)sOcKN!fg!j|65@YFKm{ztWq}cJwMgclk6KJ{BDyPx)Tt_v%&Shl0>K^j=c1Z@`aa z=)eA^@yBiYmY{OFpXz%Lvd89F_9^xmGTDCSue{$f75ITa2|bUQgadSUfkUfap9Gos zDBdmetwqpWKg99RTW5wscRJ?A9Mt14(O(56kJ-MBpU9HE~qmbLVj%Nlj)0@S( zef8+aOWEX;8w%ne@AaJUE*^^)Z@Mxav>((ghbPym3Jf{K0BP_kbcCUwm{JVp_kXS? zGzEH^E*UXRsC?HSJh%ixZEn*H!BJKux}u5G)eHKntlT<3UX5i=tS>Z&%ucD3oG&go zTzjxD=!q;2;4SV5t5m&H$mOu=iHJ~bH0*7nW{dam z0MGO`f!KVP@g^ZlyyyTtIgeaZgncMbp$p7emC3JocK8VNhu`1zyzwZm>p-^*_FpE_ z$6LRVgnED$<`;rQRxamohj6~IK)B9ED3Ybe(}WSy=!`iIZe;sg(nO#_F5E-SR-^Qt zIXBq9kU90bmpQ;!&K~7%kL=zN)YH*ywL>u_s^|bbHBhHUyHDwX@e~TNAaa-bpFdBw zZI&T-*h^-`@;TY#?)!ewh}3bWG$!-x*2_jK_o+v5f?qCohSx{W?$V;T{bNL)FlM0N zhyk(aMz(+kAD`8rIF!MoBw;O1tb&7qzV(Q%Kab^478`Jr)Mh_}R|J<<&V%64j}4vV_3k{g}gMZlS`;OW%u2e~wKao&s6j7JFTkrDDJOw4{cBhAp*W>ulv zwxH&^yxs18wG;6EV_dOp#_~C$%=g#ltJv{=Zl7m2uB|Y#o!{lvm`x2z;fO#InC?;4 zR)sOZ^IzLDX}{NupEnf!t!JdiCj;aC@blCW-D9yrlZESU)p2)T{c~gGcDxjB%TaZg z9xl6;*&@#Lo{obZDE^WhA~pzIl`*@X>bL`?!?R^p71A~IAW_|I9AkG;-uCxvs>q)h z$=^tT5{b>MQD2l;3}uKh<7&cJ!;99}pjl5+^D?h>#RlEn?kmaA&Wy-Z`)S9WUXRm= zUO4Brpxkjq&nT^14NxCy+O%wjya)-l?+QIcEqL6mxvn@*0MOyR9GBjv=PxE+EBn1t z1(F9sllGq?PxT3g4JZq@82%bUU+z5OgJZ)haBRb;3vEzx;B+N4nRE(+m?{@qDGx!Y zCHP8RD9cP1bJWsedaqYqR3VE{j9B9i>SEzv5Uoh)~N5y3^4>pGLWqA%9iH*yqH2C;=VOw~;+D@u)4?r#1+IPe#G)=4@nt6If= z)451)>@~!TWN<%K3CWd>RVjCg`9p;IEvACkC+F&wJ##b>&nM`hYEx6h}=2P9dsWrvR#gJN-X2z z#Wl2}m|#>KqiW%%PpP5wNq%i%t7Au_D4P|&LAcz=+S0!7WUA%Y57SsACPS!g!qNtP z+r!qr%Ii>s5fX<`E*nlxmo>Z|V8Q${Zr{~1Bx6{n%k*Q1g#``@v1Q3D?lA98-I5y0 z-VZoa@nsTR6j6py{Kx1?%lT24%-DzM<0)wS;vWI!_xG!OZfT;RY zDu*Tnfoc-PiVPhH?dC&jhE8c)BBZxBg(to&f1HhF7chBZ$|A&`J zFhm!er~LPM3lH)}E&A+XcAXZgmCR2VQ6EdhpfL6B`JHGbi#*8ra-}In8D(QGuQuzu#E(Pj^mhU4*m~7Mg;@po}%D?{YroYo@kV6Oi=I-GD?5} zGR#*@wSNHlEilkT{S@b@|3T;^xq0}18}R=r@@0P_tIqSzhDNn4DT!K_+%#VIx>bi!dWSXV z#o&3wF`JcuxW?lcXi4HRNGz*Xes8Gn`P1Y+$02k)~6!@e5u!Pjx1JQ}G{Erg2 zY!>9+kJs@D6w)Dc#zQv?+P014E&y%{RpF>%3>q&7PQ;l?ZH^VnbaQ}$gNpnOG@S=# zF%Ayrd-_qKD&Y99r-W0y0GvY!prSgh9e}hmhP!;Z+xWWPaW*CvW0orSt=EI}DALTO zg5eU;U0=$%SYZeOb&q$S*kHuI0^kL1>n&%W{&c;*$cMn=7)&->%u4}~MDfi0Da~>= zcB?;f#b=5#hak_9zCl0862QdEK8OI!d~)&4q27KZ)R60_upmZJ5$0)jo5;WAfv71i|s+Yy5kd$9;Hs@61j!vkw+qvpTFnJ-xuCK9#xO_ zz!K3Bd7b;Ox^8%b;Ul;hUj?QD%p_?;1!6O_Ju@HLd&lM$HUdnhX1z)DJZg^DrKGL; zvFW34KZd$SKnO1^5~0=L48Zxi-*1K*Z~hS7^SFa6HY^0d^yU3_tTY%`K~=MlXm6 zubPHUs_nXkA`%?i4;aW)@E0UMMu}HVnhkc&%JGaZoNaVQCaHy{%3BJ8QF+d8LLDjq*!ZjdX*$z8nsOpp+u# zQ8PDaoH&mut{w&COMOpYZ?^nYQ)3Njk5kM7SVp=YS$7bwKkOImx zYj5?h4j&B>b4cWuTL7T@93%J#VAdxxBbTt4fyumUU@H+ax!xUPnY_*^XeToo=>2Za zm`CWaYCrfO$*#c#xV`$`ft8^V88ZP?T*!qt!(Rdgl>kD^pTvefVe%t-z+}?q%?NFE z7?bSsWW`0^_$QA!N9SRyKr+OQHkT6%VJ@@4qgKoBb@;AzJ}+;(0ulCgb5`BY+HTxB zj+xI$d{?f~>=%38&DOp<-=?-z;bj~lS>|yP0VgC=sNX|;8L%{U9ixa-;pURUaT<=S zE7$ zHg7)xiqJ^{mU(k+R}(zmlyWm! zb!X4TvUN}^Rd5^UI7+uUrde@@74da0W@Fv_3n+)KfYjzau(FV1ESr2(zc=Epmt<^x z4M<2A%_T(W{;SB;V{GDV<>@>D5v0i0Fkv^ng+t$UpbeWuKB&tzXMf}KylueEV+qf8 zoZwoRi@>6Ve9`^x6i-{-E_K>o-^?ecM!?Ew06R_Uu3y*hnT!lKmbw1RbAdD(I?CyE zmCMY7Yk>;Lh)x;mH$d*a%h0f<8YfyN^OUbQ8Moq@5E*fwh(9z1_89wEpLtkj@6$rC z$&~39lkLH@@B*%Nf`eIlRJ2zOkdP}#;-I7lwMw>H1vqujktVfJkEA~QD8mK?Eza%t7UPMD2 z&e(iEEVhbazu?Osy6ZIPj}UrGhz5=GFwiI}N(>KN*$W|CP7ReuEO<=JrJ(8wAA?KF z6IY<^h@dAG`vEE#5Jn9*w<^`8g<$OZNRl(8CP3e~*i5aiWu}1xM1!^ENHq~2vg3hj zDd@;U{ zB9anS*doxe=$8|P_+6rO^2(Jle`I*kPP%wz%CrZ_jxl!padbIR;zNK4koiut2uXzj z#q%}XDx0DcKJgbXI>i)q1`Q6Sx!YcGVSqGjIfxS&9|7uP6^NV^ibhPE)m?_3=`!2a zpCB@ACU0)obz4gTCCnX0sHVQ}S)(EFU$7$tMZio0C~7(EUxh~sAl_7o`clJxI%F6K z7#51ZBHq8x66C;x(9GGL>Hal=@(CCYDWe71zt7=8Kp08Ki(~$2Zp5TOStbS}W-anh zwTTB0sc>nomKy4bL?O=CJ^}WxLMOow!zwIyIo=w>8IL@)`Z1w#J}OLx9dgNPC`>u- z+O|^$MQP}So#FGBONY)3^;)OIx<(OFk}{yDbU+^;g%x17aQtkMm2%DR0` z3vR44Xgg&RMR*J6?B61foU!+{T@%DBea?U`28f?@ol4`3u(?y4q1v*$C?7Q#R4D)M z*Ww`TBt#(;pjeRNKrgjxAsO1-T4^%+sXrY)Q1wW}B8M-JeGlA#(n?t%pK^u9I%3*H0Ug5a}jU}t7BSER1N@4n(3%Y-* z2mmotGciw+NRh!a9a!NKqe->;fhJOqol>p7wN`!meQoPY1YT%n(q*Fv?i~~EHq)L{ zP~+^&$8WIc{`sQ7{a{+H3M7K*kEGrdqAksOx9<(hPx9FE#EK|VNhX##43~7Iu{R2J+cH_4A*>gI9pLrA)T9^ z*UDmO(_1(uHBP}DLDm7oyT)?hx#XXK-jb)85tt;9D(pHL8l0H34mHHdRJe@S^;nxk zUmTFXkqgZ_29Rm$aTf%EuL0SYMdC>oLm4LfIQcN!ufraR8Cd1B*m$>?k^&^PwbRoy zP_1AB|KqO%8c||>AlxAmfrJT4%ve+eVJHmh(oqDcCI{TeqQv+BHim~~t1JNZ;X#qZ zRxge3e5R+Rxyo59_~bDN!IV->qx7makKNI7uwMv{YGIZKf!hp8_pP$3Y^r!*Mt$`s zp(x`IIMEk!@guqkh?oR5q{#4)^Z0>z`Ge^GBBFk5L+M|`(W{ARu7>)*o5!k`RWVWi zjyh`j0ZtJzzZ%j>krzR~`lZTRF^F)LE#%Rv@+_n5`Er&Y!od82y+q?DK!QN-?$g>P zH8f!}ncKpU4RsEtKs1qU(*TQ^n4~{FfMFIR`w>TGoRollAzuVwuI=pwB(DGYJp}83 zrv3)6>%SDx?F0Iz>HPPCI1P}IiAls{kR_lWE@9;;%cNu)^hasVOITQxy*e61>xdVC zf?|OUfB(~5R+QKT#SfW^d3CnOC{@O$H-I1*;FDPql5ha!r402S!QaBhLhA5^O{UlpR~%hg9`ilpg> zeE{WYruwtMicPc4+76f{-ANBZK8j032L?l)buWT_TR|_q>yJY;w3&>Uv>rW~GSe?( z(Lf%**5*3;v(|7Iz@u^Iv&F+qgZO0fycaaub0^mIm5{tqn zsqTC%14A-qhaCy`=ZnGJIAKJ%a_h=M@QTMBL9t~ierW_fH`;fuvhUJAIPZ$MdrmOA z>#s8|C8x!sAJp*Q17gEavbr9PR|xTj=NTW@b`;AGN-+jIw>qJO*M~{p9l(o_0I-ci zfH|cQ@X9b-{bcM}5(mi1N$QE&eIETH?c!wQCuQ~cA0@qX0i7nJ zQ;BYrGdxtI`_r~FDS%Vn1+>H@Fo^fKJEaFI@cK=hCn?Nlv^+x2UEbTDhG1fO7$~Oc z6@6ZA7T?(FX#dr6DF(4~h)?ufVE(K(2-;*kr^x8>$tuZsWyAdHDK6+t64Ayu0D8 zLb>9tl~W4INZ)<<>(!*d<>e@YG_Zemn^tUSoeZ29iQISM12~Q=o7XMI+uRybKB$gl zAwG6m%zw~qv5S`!tWltp%cKSvo2J6B5_)}#K79aosee%U_T{tnN>ehJxN{hOsmj@yEL}Ted+Rg|Np`u;^Ib_2+|a*Gm&nh%SZ1{_5Mt$aJBUeO%$Z zhOZ5hIHu4itw^kk(QLF(#j^?61GU;L)ro>AHc9-PRhaLP%a;lz(YW?A9mm+X)3C>- z)};?jMTyJ6g$ah9b$c%8SMsv$!k4txk4OgBderl&8m?zauKV7!r8K1u>WPj;Fe@zm zrF0rKf?(4C9w4{1?u)HnP^xH1@VPD-e;o#7YHEPI2+x%jG65k98}0R&9{}Igz`Z5z zi)85hSrwa)g6b*xz-&AtQ?)2lj#HN%fjRs>+5xc5Tms2psSxI`j|*@zxMVd-fBncl zuKUe<;W9!HVCJ|&B2rTrSYh^Tv_E!~w9~(87>re=?JUDt8py_Hi3NIjFPJLTilpl( zzZ#*zYLYHmO!E&%zi#-xHd2ZX`DutYuMhBOT55Q{N0$g=wFAKU=dp^xM%#_`ge?Ht z(SV7jCAXoCh*?B9IOLJs3j@kvcpO8yAKYZEx+qGES>Crx?3HVmyQ6`2&Xl|IM@CjX}Z(dhBb ztA=St9IPcAv#Lg*m-EEp0B#29BF6z;|M+-i4a_WQkUu4>?;o!Wh)gHz_Js;fL)$;8 z=$h(**qZWI)A_;U_7U~(8El3sW)tj27M_szCwB^Rirt)|xa8gG8vXQqsq$dDEQyHC{c7fPH?iDU z1!qwlk@Jr}IA)t;PT`sjt$;NE)3Rx!KKhB9R)CCTUta+=@`xNppTPI|Lh*#K^kfJz zNbCXd8fcjkvP#z=sNSYZ3M1VNgquCxTIcD>jSk`fHM%{!e)y_xyOO88w{)>~^&Ij7 z_7#+Ib$BwHgwl8s1_S*fHkxJsR=lKIOw$miVk$-!+%?#{DM!27KqAbJj)>lD@>cOX z8wbAH)KFFHBkobs<&tU65`Iacy`lB-1kYK6mZ{B=tN&v7!X2=oltHuIB>NBhIn6H- z3ytk3z!%XCk67r-jeo^^cvBOiJ^9wC`w^o|qz4H~bVJ8@5K7%UDICwd-5IXOGf z=WxC*dzSCR8JHu1VuqQWCSp6RVrK_;=^CzSB9PVTB9Lv-UyZ5E91N^GElZipuU=o=&+b&v z?tO(CF&%7Y-*<$*SSSPF5nRHh+^_c7D{&=Z@@dRsf)Z*vB`fsl;NY+r-4jYf z**5KrdPAZq$@k4krrXdmZ9zBRRLfI%3eO}1fHo6k8W8J$fof#Yw8)mV7!{2}^8+|<&SYFF{fH&2G3h@U_GQW}q<&B>6FFkmZ;niB zRV)~w47Hw(TS?`1E^EISz+(^2DVKq|DVO=-DD(5fa468hzsw0d*mXz&5ON7A^xC-M zN!N^8VR{$~%NmYkBrdGMe(pdVRf&)7BrGD)>O z4p7$yrP}t>SPP24Xf0>^S`n|1?e@}4#pZ)K(FNurQ1V&Aq9auq3!O-L*JO{Fwp-ptULfK|i{-rY%7OIUhdpF(_DR>RtbntxL}2~gA<{26kI$k}WMiSqnh8DHr&13O>;c=~Gc*AySh=1&AdT4wf* z)|F6ehVs8$EBgw;@D?n+GGl*S!j+3-kcxq0j^~C4lwlA8B(Ktijc&V}eN#jXL_NXk zQ$I?eHit+eKCfHN+U!gQuisWG*9PE{#2;S+bWCO%&{Lx?oh%8_648m zxq&Dgv^mxzZlSU^K!qLhZp0-D$G=SEB%qIp5+o0Bee&3f3#M{j<92>FB*8ZZ3`w`R zX0?FS*I-|k!ETMJgedgunBM_-Yh#(YAu`U5z`%GBW0|T6gCqrWa^=~quSp31RnZ}8 zdw8}AY;3&;2^xT%cjIm_hr8-iL&OrSl_+Fl_u=uCz1i-2INKG8CPT)46mliz9xE<` zr(Lf;o~dX1Ili5|fU~KIkCkQS*Dj@zsKIC11ZH?#)*(!a@ihY1YxcvJ2+aUWq*DL{ z8BNCjIR*5YW?Tw5q$&Umrty1!pVyj3428$pqEh*Qj49#(cRN(*6-&rh5hCm9y5{^f z`h6n;)j1KxAWXInK{~+Z?8HF8;8bA-3Cq9!d3nJ)m_K5F#U=E#-lO=4^)W5<&(ntI zvB^^00wB=>`+~v zD>r&8Ph2I;4_v48iJ+Whd^CMbXLx`(Rv-ttg$IkEY)S!Y{EO-|IT^`%=bNTOStEaU z&Q!Nim<1#?{^=MRF3RPo-)_K8$(=&B(<|4B>$}!_c)1gBaIUhC;c#n@A>>{QU(ZPI0{<_EdYBPh3g;yT zr>(wlE*<;VUOfjwcB|C2gR~%I&Z%EJ!d7H`646itBp#S~HSuFaFP2W}vZtV1hv zww<^da1zgl$XIQ3uK9>1dIAK2wP&B~_qwX_ZdW12Fn#h5p zR^&{LzA#v`&w-!Dggdg++WrJfU?hor5>@jK1_3EL2KoIK0henp0>{sv(hU*|&tWWM zvRchH*42@wG};EAieZVoY6R$@naNNfYr}1L>edxPR_FmCTWZ1(*ICnk z>VQ~fIp6Dx=Azy&9uuAAJ<*l9s|cP+rjeE-m=yh2sRT4)a&gX^Ic56It<`M=yo&|e zu}N|@Dl$d=FyLhu|2jQkK*0bcNf3Rr+pu8WWdLNF`*4C|oH}&^mi?|X|IbGJ@V7i) z;Rolm+5Xp5Bgl_zSF9ef*SMY*ySMcnXvv<>d)fW30f#gYVwpi&sIaOxO3EbD2ovzy zWP1~|{iR_&QMw_+g0@qYQTAmT?wn>ifVIDtbmaHfnFERutV7Gk!q9cR&d&0u>0Qu1t9u@VX1+t6b3b| zn9@}`oX{#mzz*b3Dng9Tql)69%uxBC>j_v(gaCdD4sFzv{3rd$0gsAG44<+2_rlKq zPcFdS*KpIodPz=6`-m+5x$U4$2nmx;gScG1I_3J>$s8b&Rk#}gA~%i2v?_^CQwVU> z#~;Z-A1zcS0&hX=mRqTCmq!B~5*!2T0%J0wNj%KLeH=qnov~vstXKJ7l^x^tH{*cq znF0J-ju*h6Jn3HNg%Tzh#`39o+#a`Xv`P?Qb2${Yig|LKG|a+Wj>>}R)jWGPvQJ5>ob^GrF@Dh@c0h<(4ufChAgdp{!7LfEN z@6~&vYng#A4Gs1A)_!W>9n;`ec2P(t)yRJR`E=SL2hig?A$T@%fR^upBz}EGQ<6#A z^>UlRl$??TyrZ#SZte0(UD6At#_9__xY%5K;IBqe&VE4zwkapz#$8ZqZ&~NR`azdH zd2~E*b-X+88fIUkKQv#QOD6W)?kvX`1@J8BO@7f=Me~lk5 zF>dX$xEm?h*iM7w@~2kx%UQ#?r*DM&kkzE$A>lsMK)O zIP8ur-3iXD{J*Gs>$fQ1HtP2)0)jM%AU$+(;~WPJF?XEjTA#IUAot5<3HJWRotdFqGKak(!|2Q{uGDQ+Z?IbXK8VT) z&FBCCiE7Kno&c*e3Ftu*;L?}CWS0j)r~#tdC4hZouJ*?5EwmN;gutC)17D2AM2RcCdXid5NBuTH4F?GL2NF!@?#f)9z?nIxaDybFopZ6tqsqxs#<{! zwz(U9=UX7j5j-7wyWwh?^T~38WrX$VYBN+7TQUSkbC$#L;uI!<;=f>RGzZ7xGk^S5 z06bWxl@XJgO2=Mv+Cl%n&Zedge$75u2TZ z%M`QToQ%IU@b6;2B?SL?XdLzqe7=u+OrHnaTOsgXw?xkSfP2G`4MaZ!ABUM-tr{$A z|7Mc|ChyzI`5yty^zuUw!HQt!hIX|WQZ`W zk*r+7468|Zn={3WB=Q6__rxMp-UAZZaGfy6VXb=71)3q4SYcVaWsKC<<|!eR$qI-m zcOaN@B~S+lp5-?fTZ)hoQ(n2^6q>`DlMzMwY=T_RuKpxS{iMFfMSusegYMq?A=aO`P`>~KY!r;_Y2~HRgmj(x z0^ppUorguS{aWvfPxq!Dd z538WR2-36N2~i0k<2h@|X|&idagIQ)&D=@oGIyEm-v&V3}wS9`t@y~3v{$La_6IdLI z06Y2d`6}xL)^cIao_yq98vyj*#-fC@K6|CxN<ul?LgBI zy5=q2ck2JQ3m^}UNu7Nt0M4Ad*VJh!DlizRyp+)SiNJ0MlK7a;8FCYJ-mX%JwF_9m z#yl55;jK6d*BqgL-%RN6d>8@e99=Y{0=p!kV?2taO@W#TspFYxKqP@}Q5WLth_^xE zz?m7PNYdHTcei`G&|~^7n0paUaOdgMit;{J?jUGp7HRcMI9C@p3zcD{lOg3|*80}B zBwb_TRRa%%<#q(fPgEWZn3`W{nnuC4{tzbCb#YO{zo=a)##1EYv0>K+C}d-=b4UlO z0J69={~AJXSF-ia4}PJ}Oyy+`_`Z#)B;qojBhX-+)0zcXU7zimHgjKXDb;=(eSg%} zTfdyfU!u)veeuQ=(5fTfbGfghk^l4Yw+2w5du}dTv@u|{0%|}HK>hIR>FJSwmAis+ z=`F&7g!gHA@#l{#$t?*pqq3Eyys{VVNBQwDhL;|92LFg-l~>t#jOph})MK?K9w zdSP|c7;iI5OIv?~Z>#Jm-(V{^7#~ngZDvB22u(_gfBWG6<=)9MiQ}kICed2a6!{v5 zUYE`qm8f=qIkS^uOv7EzF;uleW8T~0ch2191eKw@=j7}3JB&S*nZc{vp1w|Xe}@MakqXsQ_f=2c5!CU1~WFV&qCUS#6)rQT)tMoO>%FCKTT|Ngu2er!Ct?4Tfk^=**0Bj z!gThzv^eJ*ybP#B*a0d#GCw^K|9+n(^D!HqzWu;_{zjTXWttFEzd#X>NJ-x6)Jd7s zE?v+)rS0Z7TCDPS#e06*e@-USaS|N616G0O{OLTle?(m^H->)Hq)fMI>WYzMAoJWa zQQ5z*h+h!I&9Iy>12@DHyWu6thhY{r`$h{k*%F#vlug&6xrX@b$_u&7tPBF#JU9x; zrD`?S8e~n^AbiG@os7Z-P+0SK33qk~jb<9`2j^AoM zl&eKGXVwjCVz%c`_>49Rx4(_2%0CdjL%v92(w~pkOS9OKT51%;Gbaj{d;I!6G$ZKV zu~g@`}jn z6f*DPlqqUo=rX*&Yx7j-s+8v6KbVgs(re1exYbMBU#5mdHsVDAM4rg90fbMRl0J-I zFb)z^dV4*gf4m7f5i6N3Q6Kg$6Ay`v)#DYbNkqFP9=(CsYd2KZ*k>3q5GFq1t|Rj# ze4n2WHzXDl6ZS^+bm^?wP_CR8Jc)!k(c*|*?>s(wk#3ghN6wxrPieP^pv5-Yad#fI zvX`&SORaJIevFU5PyMhhd7FBA@>G4A5%fLb)-2~Y=jBxj$1MNtsP*n*YRvNUVy0BD zFvo`E(+J4DpD*0?KHjEt6{s&+dI^i0viuFHxu%M9U z{^yU+nyRayrSAo=9o=$gra$@)55~W@s@q=V_585Fh*-$Nj<%^EwLjA4c|a~s@g+zZ zn0%*v#m5qXP4|9^R}>Pi%M`;0#@6QTToY`crjP&Cl0fK=#W5qRRNm;d`+Q~JtivvK zL~wXk} z4im}@Ik)|6&-@ks08L5&NR$dPSn4+-1k|IuuM~d!@fPOliD~Zj>1EZikf7+uFTOY|7d6oA)-b(q!jxf%54aB+jO9j( zf+Wx@rwo!XB_JN|0KB;2K?8nI`F82^oA0ttjT40Ig-l7k#fJm3nA!55|5jtOT z6G~nC{y$`%n#@tB??!IEQW-(!e()&A%g4TONERF;m{f<#gmwbUZ_Eu`AqEMHP#eQ( zpR(9(Kt5C_aaFD<1ZOY8@10p3<&!0Qa7GVGqyPHy|T03Sfo2&y@lp z)KavZUF|D6l6`x2;2^`_XeJFqa`Y;i~xW%U4InN6DOdBWp;?EM$!Rz`l(c{*MrFx zKBuPEMy6X|yLUgK^pT(Qb!tx!HOB{`@7`Y@Syn$kW!0FWw(C_|B!-8$f%=_5Zj<}8 z*1c47|GZNpv#m{WiW}%E-p(W4M6`(*tb$-`lzhc33t80wfXn#s?x*oHdD>|bTU~ZU zE3aXaVF~~4z4-cG5MdvC=6uaD^ktW4;OuoFA-`*euoZ#HQ!MO1C~Kr!>#*eXYZ~+s z(2E5kSFd=-OrW1QfQ^XrqCGZOjJ4r+0)e5qAZ86$UrYopOV4j5co6W2i(pf7T1f^) zA}p5Q?gw?>afQy#8r=Uq&GOl~7bY;wGxz{XR!p6*y5eOh3yW0>mo1lt5b>lp9CnSUFVwHUW?1xKF?=zf+ zBZ8^>l}>Lt(AjG40YfK`TM^yv8Z%_gobfa0LMIErRRfTZN%#uKU{mv;48om z#ZBc(4C7?#^0=@LHgAG3Yr|d%;8~X4&WJMpRL}>4NwsO@lc^lCV2NP_OIy^aM^#IAq-`zUx8OwBnPh8-+Pt65 zPmM+^-6~o)IiS7aH(J%V3c7@hW|(jxMq=TI+|p=~ z>6OE(lI87g;Z4jWsOlLpg55RLRo_s>y}7|<&^_8-$9}Fvz|zKJt)>1UVYexiG#UqH zJe4C3xXry2`nNFH0hl>cRR`?A<)~zJ>HFSOP#s@S0Tn z3=IuEk_i8kXmzr@r5h0=Z2tT@!05k|Wi?d(vUNlBR~)4S8+qi)Nkf5bK#zdXA*2!= zZjsRF86kILP%@NRrtMh_zR(`dOO0bqN|Rv`!;P4OQ3GI=&albie9xZ%GloUI zB>QJ7D9{KpKMGO=!aTuo4bYwk?Zm#7{}U(3!^Ki}vVPN_CyXGM#yS3-xAXBbjKHSr z72J2aosl&8(?RDkhY5~KCA$w-NMCN#8;pYjU;LF>c8I>i{ZB>hk@zv*DlMXkn`1oJ zBdl5ZzlJlAr2h;US&oVVS-w*67sZJG*ZaYIB9D743IjzFf9!?vlrz?Is=)v{7%rwp z`Ce0wYp5u)8BZ~MO_eBpcYLX(jSQGq77{ zRtU6U5=?|Il;cr69Oqi(u_TB7GFzlT*W8*YkA$Aym%={*2Q**S0`d_*DV15*z)C5^ z84|z+-vCNkVly){C6C;AGoj$t{*tV3$3x$7jEMn;E1G2Jhw+~pZ*6Jeu?<9ZP?K<3@dB2$Nb1L~6WwK;J+eVh^M!_Dtyn}5t_(@s^s(U(HVHp_N zH_#`!7j`m*H861fmdNJDyUTNtk#5d;mY&}3Qh6H=cTpO}e;KS}(+zhMz{9BSUnXjV zTB1>%!w;nS>gn>PLrE(%ehYhvd5WZOAvLLkD zv{9{DQB57=AK6Xx;f^2q&v1Go>2M(z68`z3@B~CdxGsSQfD8xh$t7SJ!Q{ z^8AD*v~tZ-XmBstD=SNvcA`VAzqpT89^?3p%EC2}hhxe61vSdZ_47E(fN_gXvmJEI zK1x(v0L@SYP+hZ3`prpfeKfd-;KxnUekJ?L{z3UmHELf(Sl*DuR#?-{P?<=DRz0h> z2N4%mW^i$>(}~uD9l4b5L=uCx`k(po(FKD36;4NzXpLV*cE>ia6n;$pkMk{o`frZE zcz^(k^vmF%TFM#7$7(X{&#EZaYgyJ=|K{(yI1g|%cz$%15aT0#d?ntr2PAK!ZeO^Y zTdiW{{wggK9qvt_o%QPz+u!RtukEgDtaytGk@JJA7z<}VI`T_iA4q(yvkcZH8IPwf ztsMb{@gqc&_2>sWBn__fa)gdEVGii(cuXU)pqa`<)@t4Bp}ea3EE?i>QqUdwD3eHU zmgPG|kNE1RU}`a+eu*kg8pF;(Zd3z{oi5 zoj7v=Q2+|4D{`U_GU=Dv4BE|`y+PVo^|vHwsgFX%}kO?C=@3ocAD|;L)Se zf?H#dqpGMOBR$jsKNdr<{|oRlsjuHF{aMc4H@W(joxsV9WWLCw7gYZXuqba|@J**q zyIBX{iYRPcJODuK1JWq%%aRx>PoLIX(ytYJJ}~wS*}{*3Rj2^1AN6K9ds7BOUrG;R z&WXFXP5=^e3;QRe;sgMSo)`X?R&pxSg^Kc*HZKHdk=}VV-E6962fe!h!kC#0K^Of9 zN~$+7ADek5eZvn-BLl2=V6;K8;oM{P9)UdVL)`5 zY@Gz*%|`N(+Yl@&JgNlFL~4yzabL648*!MYP0HCuYyH-ak#R(}ZH@&UvLqe5kbb6V zG2JGc?2IF5;N&KiKi%QaEX|6aa$aSMiaWGRa!#G4-+p`GQBT!(dkoyfnSczK1g1hE zBQ&jNoO8Q?@Kr{9eveGRaQHgAkk?5Bp{V0ixeEMp8FeEL)b%`TZM4V{jCLE;)&L|1 z64D`zPSCXgPVLZmR}9(WbSlN1j{%n zK%tCB9Q431V-R?s2Hm+f+FY{UvE13H^qCd7Tx_ZH0lod|HkE4q5#d@hi~QZI6H29D zz8XwMgqI+pgTSA0!k4#kkANXuFih+6SVPCpWwJ&529ttjorH|*-nZ@YZ@cejbE5=kKRX-|VYvz*68aEK&HvKTb35D>J;OQ5 zg!1!xbN)h`ns_CTV4QMF>DESj)Fd`y^g~1|%){F832>CA>VC$#DjkNKAD69lSU~nD zBxr_?C; zNRmPb5O$naEE|`+SCv}ED^OhG?XYs&p|SN-kBO*s8@Aa<5FyY z0iFAcaK25lWA6ObeB-ZtNpjH&B!>7k{o4vGJo}bUxYj+$vb^q#9}U=T=lwO2j88(} zV9ndD$rC)LSnF}eRT1%>%`57!u#u9dsfcQzOZ>u-lyDcX z#aEYcR<9n0uCy2Ix*MAX`0Bj#mrd+v;`6=8$3RfAnrR`+NH7QqzFTavB}=M8LmNYqWxt>uw!aO%_^<^Za!w{@zrEKR zg&M_S#qSwm>2_9xnZZSGYP#INJnw7 z)L~R@@AZu%ocN{j^?3L(otfsErmd1|&TMA~^Eh9j(=A@QXIGYaVi6Caq~OzgMkPjH zBL=Znyumm}mykkq2_&PJ6(%_?AdEGJ#mt_p{J=Yv9|Yqp zG@VG%JZLGz5V(;3s2A5zJ)_F+f)sl+=H5VB^({>bJ_8;~4~nmMa;!w{-%RI_vgRfG zD;uK9+08f5scYHWAzbzKvY^%eMJmUAJm-}laUKB}((Lz6 z(3H{O>GL;P@f7P(U#x~7**)W#M0H@|DKID>S`5J}IYoK$AF>REFM?bK z@0tf^m*NnaiZJj^=%UN0&| z;@lz{;@x4O2$22+ee)tuF0vC}N+@u`U?AdE8a}fGiVYnZD#{3NVxhbhdhGcSV`mXFDJA&Q9<)`C7 zH&0l{R(B{(OkGgAi98+y+=-9lS=)V->xYOBXW!?oh7H49V;w(^CHdp?#2IsYMj2%! z(0$glHdr?D&@fH^(mgES^~w^74%NKgUlUTMy^RsB$*S5t`aZn+eaz$QBUELJ%5QJX z`#?>NfdO}AV=A2n-;CgHo4ty0lEhD5u2)~cAYcHysc5Y&p!w&=V4K6Ce6XSfL2hns&9+=UFJ zxZ6$`o~+3B#fxbm^|y_Rp%0&21a(1xB=e7k8I2xNB{*`=lsBYBaowI0*h3h0B98I= z$&Oz1{Cav|crb~kwt+t3B;`eh1f>Aa;L+sBZpmySfXsMKJ<&>^Dvm3KqoeGYD@}lt zIBQnEl(t?rKWN4ydrm}_G&430kE;xR;HrwcF|5Zg<`;<+UPLs0&S!8V9^DQw#5~e1 zOUd!6!hV5F*8hNzE{iaQIZ&7$W)u({^Nxmj z5jOP)NJAr^yFVf_6J!$YAp`esbwpeX3d!(=BH^$=+~`;I@dA@-2{R7vamd!?)V+ znr%Nm5Jvo0OS3>3|3-9FzKP}Xj}^Q0W$2cNFBTfAo{IwMs@znA4f8hPKD%DE0q?k_ zM>GZ#0+Bo(la|xPMq?PI9PP(TMdc8viZ6YhfpSB&{Q}Ee@%lR*-d}y2+h%W2E z9JEb#>kEvCK_`P=>4{7jeC~C|OoIyNzB34w-D`Vk+|>R<&TjUe5a?yk!-Z!#Ek24X z=i^HLd_zyAlk1_y!P9xlVyD!+Z0keGrMzwNb=<(nL8O%Q?mxvp0TiYv{@=g+rf7q` z(((%6=|4*RObSR*K#H{LB7G#=%kJlHT3lydX3=6d`aq3NN-4kHWJK)5EFY`nli?8T z9N^G3W|ru4?dNHto0mkf>)%ptt8*`UxO%Cz|v`WakZ7E)xZycQT#)b0uGLXO8qqBms+@O;NI z>&Z!bIk<}c*39LdWhadm&uM>S+my(AqUP!ue{cD^mXfa|dOX;r;dH<#1Rje4!osDO zv#QkmDlXhNEpLPf)`p&x4}E7Z*6e3~jD2Dm55n?0`vEcdJmu2)%rO?1-Wk5P~iSv$+v zc(LfsARpe~F)#S!*&=VdDY$TxR3kj?W&dytNG1w#ATvbs$em-mx2*FAHOq~Z)jCW)pgQRkJtVAo}^@T&WaJ2W0KJAOK z@lX}TwjAXL!_ZLSr0;kJ9y$GLc6Rkc$CEgBF+uaB=8^nQh7AVpEUYmbzkKGqS+>S{ z5NU)}AV_b`CC}QfBF8<%5a9N-+pyH$`4~Y{BQeH!ltvxOri4F6gpmZuhD zW7BAt)vd0#mF8hHQ4mi&4J4b5eG~l)%vmW6u`9c!y^%)mD)~(Z?96=l3XPfxZxr8~!9^dIpLjj5D3=)SA@qcS2OozFH0s^% zmM`O{aQReu*b@VBE|u&`y716=be61;t(9vIsw9HvgR}*tyC72YRV3W=kv1EUI7BVd zBk8iwn@dvBT;G1Zvz_ib>^WLXRw4e|L>dikrJ&p@qZ~@6eJ30DTYiFLv`Fx-2V~KH zHn;9uJ9N+&YgHuvwVGFptn`o)#WW;A=l-!FEyK)76zx)rSvASa&4ejZ>ok-KQNZVp z-H1ecrTm6TdVUyGAU`DoJ7x^}1Fnt-yBCjAkU66Woth8LLOtqT!Y`894y!M>By(9r z!=vh(loiUSMyRJ<)q-D>h#ru-A6)b#WC~mRp4c`H`j7A}lXq`;|0;y=zu#f`@!^e#h^>SFOGCH=nf0r$e`irx1G`CbP3P#0++~`qWuBM^t|4Md9 zbYNp2s(E#0>-1tslo~W>?yTdkc4{OFk)(%jo2pMwz=O2POqF}q=8i$A-d-x^uObu3 zvcrV<0b?bEElHXs_D??T@S6N&+zI9L1)HJ4c%Sqj_wj6r#-wq_q0Y5UZBMd}dAKyo z1+Ub{pV1gfZaY>QI}g3iYJwB6-1Cia`BA zLa0CZgo9qVO%*qR#n3VgN%$k{SHrPWhG)6uK)!4VjFaGxK<_uSRj*UL6aBHq@5X*$ zut0o*XVmfC4Dvr;?bw<1L;GB9WcOy zG7h#%%R$#ph_JeP;#xKtc(&5%fQawqtg5GaZxK-s`y(h)qFY$GQD;!sGW8P z`WP4>ZfOqWcff;|t<-BbI-Jg*E>t9@(QT<~Oa=u-v2S1L8cCHL&UaIi!3fq)?nXnz zj25fDg0^}RBJiMtL~t1xemLv2c7nZv%bW+U=rriAN|sU?w|H;VSl~M=PfmbkK|h+v znE0x)gC6MBBMU z;Z$&I#%#+hu*d17r5%26aabyyNcT&j{ zt8AgKsh_Awt4>W;=*Z8ny<}FKG`v3ZKDFlI&jYKcaW3~%U?ozjSH*57OP0|;YNAeTw zK3Wn>qzP&;%&IgP4R1~7iy_fiSJ~GXngk*fvuQe=-Y+~3+|+A>WFpVqq8NGmR)?d~ z2r40mG*s8EsnZuMud6ekQ~ItZ>n#5V^!`Bu<6p%-i(`LIbzf2H)oUFyUl*`fG$CO| zU_E!y)6M61GlT@clRlzmn9M#Dh%_}3$ygd4IEGwE{ypE6a3a>yKBC zcQk5p^3=`GDqH8mkE$1*Cx5#OYdR&Eg zmX^6}Ezi=HhxtzJ{1(Sko`>V74Er1B=SR!gS-~jc=c}`ylM7Y%Ybo8*kH?ZDhS7pc zQVLd$NK8+ogPUhX`bz^ZS;xeK?n3uCLo;_K3FlHBn^nY$o`;PX2OUz8S5vrNcb!iR z#>Tl-@x3y*c9_Wb7dz{oe=+UiJ=b5fy(4yaVG-ATF>jCln0A@GOupppG=+9}HGP1k z_tA|Yjt86MJyBv0`BjE(1;}@B_(&eH)I_TOWTYTFM_i4AtHJjFM4w!y9!N@ zR_N2@I2vBQghE4E43E4Vow$P=2gnw?0oof|+uNkCPEXCVm7IL2n>?)`fmeq1tG8R6 zOABH!OG^u5*N;3t#6H%cq-qk5A+=Po$Gsr>P zq%i}SX6XV#0WZ&kFBwjKoy{&kbaqx*-zfIba?yn>5mCQ<+@jy=C4Qp*eO>Y5PuLz| z^T~~_QJnQPM5NJy_-ljoW;u( zq9f=$+`-vFFto~l8pecHbA~9h8eq_UOy}8>uHaBN3pwbNYTE6%c6KB=@555u2-APu zDv;aT%4nu3oQYdyhj}MXFEsEm5JvP6Unh3@xVlYr&0>Fga=F7Fmj+hjcVC2dIxgID z3ts14%;bW3%<_LbCIaQfg2;E8idb`7TGw0kkr)ZP+3mV68()Y!{szD*7n?5PG-`j+C*?KH;Q_KP~z8(*7zVF)A^Hb5uC{#uj&u?5% z9y*K0OJ+aRWyyh*8#@0uZaZKdW zA(4XAr&&(Fk>`|1a3dDdXaBlpG3oZmAWHJ??WX6MJMnjOCf*|*b87J1sopn2|3qZc za&mqZAXvzQ+u_;YBSu&n%$;p=DYxwzrp-An$N)mf1z{V5__xxM+0RkCmQFjs%Jo(B z{G+l6%qKNTN>mO|ztm49c!9|OZ{y?STq)5{eQFrB@E?rcb2hg9r&2*5klL4J*U9;& z8@I6a$`;ZJxfw$vE>6e?UO$#$ZeOFf=5{zw$6f7vo$eLJiF>p71|{M?mkTzMZZG@1IB(!`R-IsJ4;1l{_50g{~;9~ zp2k_CN+IF$8kc6{`WXO23;$U`T?iqat3jtu&z3EoR-jR7-6*sBf%DZAzX#n8sf>Ac5f z_mQ}TL`2ZlhvZ{=n=+PKiA%oV7-1jFr;rO7>O)R2cP#oM=qOe!`bMjE$5V(PyuOXV zDMcsZxx|(ym#AjxNND`Qy-v;20Ykb5eY}r0&Z`81((7eei!Cy8Dc+;_4tb}%+KG}- zwctqOKM7f$LA(@zok-W)*M-wXpwY_iuE4V_@ADg_)Q4BQ9C$Q~oq%Nb5h%%4bWj3kMhQjy9#}O2ZfG zkj|9-1a7Isv>K^72!69-Hgi5iM#p2Tn*?RT~IKb3Dq1*E|I z)_@ArB4?FhUQSf3eW-P$1E!{p0(7O)8TszQHz3^%t%Xx10|)Dzi<+at|6WqVaDh7L z?f)NsfmT8;US-JyG=DfB&;`6VW?tU6VFA0V6*DsVnCS{sHzzAW%gf7-g!UPX`WKGb zN?koYFpN=wmFFAiN9v z=&?ga+zlu>#8O938Ft9fZQH)UzxMS90d{t&>+=zg50jmbqn#U3FaM%000BZ4H!R#B z9e2S)fZFzaT{(F6e0sJ8TH7>klj*p6%ID%@x93}a^J;^GvgwB~Z33&Z7GqK?L=I$| zL%X}XLt}HL!e9O>zWD1u&FS~=?2!BWFK|MnA*0?8jo!UOLkNOThl<-L*4_`xx_|8h zz&TLH{Bt=2dR%-!Xj-$%C8}RJSx{BkySkGdlF8#Pol~EZCKB|(?R;A4MER7Pm^QdA zA}Ja4AuZaLGmRs52ef}*geZFS6lt`!w2ZVKoxKH(ff`?h>-nI+A{%K|8K6+3ma5*>z~LThjm_ScLubc zwv1Xl^x$;-fL^MoWt$}<3A&Ry{!(}xh!M9?R#!R|5nJJcfgV3l4h{PFxbGqxAblP1 zs8bx$_pckx3;oc+?b_V7&vh$=3Oz(zy>ab0sJNKM@b=xXQfl;N<>N>t?lj}=lMkB5 zf0O)I$Q@57)@kw~;xOxX6VB(S&YdgV2l2Nv>j`3CJk<|IG8Ena_h`wDNa2l9{b$yW z%Y;fDQnijld23b$mW1@K+DXB%?Ck70#rDSpnI?xBlnPcg~MKKCe6;w~4tXn7%RJ z-`}5aqIu)$RW`N_KZ3$)99$>cV@%9;qaeCRTTqN`0ID7&Wa6tLOxasn7Qizj!xJA2UVcOO^_|c|tx)Ut*Yw^H*lWJdEBy#!^#z{pg61YEi{zAhBf=V?go~4=# z{!vs@x7L9m)sT7(e^%-IJ~m@-^5t=oMNqKAO-frE-)qmr3!Z~xbIx)XjdZwum%+Ll z)Nm~byuVO5IXyM@<_KK%|FXatqg=_(R5;@pB2Gi=9pX9LzyhwLR>&30rO=b-D?;$> zKOFB19CXQaJNsrGmoxWubA+lk%M)uzlMo;m*p)XT77ISUeK)!A{QN9CTVnpu@mM=^ z=n^1KGyJ;F5*b`n@%>6~pu4&=E)3{N>0N&uU)RBGf!GFOGD4L9B&4F}6p8Ha&#}i~ zGMzn0NU3Auny%o&(w^yRHZsBNhO;E#ZmzBpJa3>qZ(vdpNS{C9 zcV6Hh93PkU(Nru36@7c{(?zi!LU<{2t0$=6r6v98I4X(QU0U*fP#*HLl8_57i%4f2 zfq>fvz4Q5~(`xl#^okzaY(ItnRbl;qX+lH&CBb(~u8YYE^thNNh*XVqV<)04B8U>PECQ|Lfncv^Fb??M=>z}8ZW_W*U7{8|fi4y)$%}^?n0aI)1j_uClSiU? zoCs*%+GUJvod$w$yqRHJdqXZZA-uooH#;O>$kI;}nBPLsAny??i^Su8+}r)|Y!zE-&?fY0J>;ztf4=N=DqYz3NkK7!482TJc7fC5g-?NAPQDk% zj#L9@K=Ci;D=nys7S)L%w*N;e zGR$R?_*wAvvx^Q~8uy?S>6xO}Wn6SsxLurvSn;B*faBrczwClH)lqBAJPmbqxU7kb z{q@sX;rpx2_5*=5OdrkDT>4}ZWIizIW|f+rM|Wa^YsM?Trrc5lDU5%(R7qu)2s=gr$A$E+TUs=(lcouRXQ-zrqnv^qRnJ3hYaES@jgO=3+~rr0XpET_09zA&=zw{3 z0V^8c!yiw2;&jvPX&7%j6E87y2$Rnnxw`4IE{$ma75-|506%|~Kfk}Y88?Rp$LSPl zD~3x*ZaS;??=d;WJS+?&6}&=L_p#_Zwg3XP=qGC1AA}i%rWTfz-Fz6b(gHmcWC8bL z4zx=-W z|Ft-sc01|+U_y&eraKm^(qt7jJT;LpTZ{c*vZEq*M%(XNGu5vWY;GACDL^nc=?dCH~^(7C$|QT7q~&onJfj zZQ3Trf)^%2Do$g+m@}QCc=ymVd7nr0t5B46PTo$RT{^8IW_Uu|q4UE=_N)dq4^8#b zug2Op0xP^We|AXh?vURbvg}Bas<*!8h`%AwIVenu)6gM(;CF0jM zKk^9WzeN|mOBls2M!iu=IPQB?j>SAA!R#~fq7kXLNBM)NEuBNum&*}vkrZ7!Ci44D z;zty|K}_X%r?U#Pk0#D^b2Bs=7L2nT9LjDH%x&2{V?*wL)7Bp;1woT;KdVx4N~qFURPwRmVGE`HF;e)siJJj9dQIZr_}SR}&RCyo zR{O%#zw^=ZBw`dlT2l;;7?udAv%sjcsv@0OiG0Qo;B(u|ap2?>e4{8v=8G)z^4$51 zzeiOVolVGy6@`aLoirLNP9Hog8J*2wHw{dpHFW^VTM5R!vBz9UR z(pCNR{t7Wq`U^(mYcJxtvIgXnJThwIZPU{~y-hPw7uAs2`k8sD!*9k01R;y`%MZNO z<@Pw1-hwjeG~vkUd7fjDcqKxvb`BvZH68H3r5NJ$gT6w#@9>Y%m**qiS%$?GP8xhQ zcpFz&ufRy3OUdjfmj~}uojpBoT)$IYTZxjZa#dtqw0&`voHo9>-f;y(G0xqiS5oBX zCDUD3Zd`+K`jfQT_mSF3{X&7E&@gUA{n%wI+pT^F&EP0rjziQm)GuOr0~P-S>e0Pfqk$k%MN|2IcPhvv~D%v-x&}87}X9QcD((O{%;&< z6)G&f6i!)kF1zuEOlBum;<=J+8x($2x*naeLWxV4i@V$dGiyH~bcxA{_5*Se&iV#? z6T%9oSbD7Pd&=c!0$e1Zag2^UB*%W^?bdghZ(o@V>bStvvFMke|VU7zQ+!ke(rHR5!;U3F# zDeD)As5L}#x%YNYM$!{JbVYvVU=O7oBGzV_}Y@Vnw`A->z3tI z9!?>OHU1ja71T^(v4;js4*>?;Y_`cQ+~G_GF8jEv0UiW6Ob+PP^V&weYv=4Qeynj#H4QZ<=Q0YLh1)%6c5mVy7q_Dc?zKbFD z*)f@Gu!YWa1P#mf9Hb;xNp%m+$>n|BlOi(VaLbriV|E6^R8yn8-f{5+lPoC?kc{rN zH>gw6{XrI?v{K*MdSl?Zi+glJnP%AHh;miU7%7u?`!;(UDtPPaqK(Yb!X$7G;;VyO z0-Y?*+K@)4C`;Dfn+fGbloV!oep(LCkj%VkA(u9Xq;wzrg(2vF_uW^o#58xT7Tw_g z?E;W9QzzY=C!3yqMRgLAFNzo95i`MC_gVQ*9zHq+JMT-L-CwEeobq<;@@ucZe;vPi zI3f1#zquGw5&Ds(m))&Is5Yq1i;i6^h?*T3=9GFhtfWhunJ-%>pULfsS|~YS8;VL{ z_*$&4JeIn-=iLG1=vt*FPs<@BS)=B|qS+b!r+^e1g%8701h%2=C#EL|x$TB{_V%^$ z)JaNqV^g`cnbVi0VPtLd4AkQP4|i|b6<5@Biv|f22p(L5LvVL@cXxLPPU8|FI5dp~ zcXxLP(zsi2cM0xrI?wyO=lq2`Zhza|YmZ)g*QzB|HRsf3#MD?<5~UOm1$0s=vL)Gy zdWbe`Uq0Ojyx$k;;er4Dt$A#H;oqjeiRylcYM?&3^5fx5deNJ%r1-VGh%GD}+;xKP zp|^$9vRPQ>X8N7bLpDq?J>2PDXZho61NCx3;WDF~d(nzwI4&?e6LvQjU*or6B=RWQ z(PtDc#KZz=S~gX);^o9UUaLU!wm@!&1e-DwHg%h@qmRe#e0b+3A=w9Gvx7K!-jhnG zbH0or>@uvQXz~1o9lFcp218SHoRNj0JhE{yyRPtg4SKrtirypp%pClRU?rxe*{YV} zcEnBvlbiFkF#Kg+f|7Ih#IYAgKCplopEZ6I=tHI^AMY{2rpZHC#ptaFHGMvKFrNr zp%`Z2=;C^PX2E<^Jxo3>G5&x7UsJv~G-Fy%;>emQMt2J&b|pFoO0qm7;ljW})BM!Ofg>Hej~EH3BP%Lt){0klXu^tu!g zmzOfiSCOiDatDWhc%pi95qU?nr>56JKbT=r4^mIba})@nke_VXY272 z@=jXdnoH#tCfRus#o&@gWH7q=y;Ww$PdcA`gWx{pIz8Mngh5$xYC7`+!0tkL8EWGl z5NqPhC`(o}` zC~R}mz*5Bq{u}#23|Ty{;WD&m!T|+9np2^>y@A(-xl1GPB=g{Y%YaLm+ND{{?z{Id$Hb0)pT=(7DphMKwQHJIsPtwOgt|@ zsQ7ApYKRhrSpR)$Atm1&dvgQRjhhGXl&YfUaeJ4W+Zu#n05!{oB<+KTDNRl6LmO^S z7Teo<&Fyjnd(K;v{jCp~Kj$+rav}qETu&8wC#O%T2IYJ?P{qhHRC&$B>j>8@pIx_r zw?_FSSSC<&nZ5I-h2d}bWrn)e3Qb-X9(PRB(@5oTN1vO)<`xnNH)A5o7jVMzx!!o?EEC|g1%vV7%yeqpi=gJgTi4>CKHq!TcxR6jXiT2SOq zrKRahf%0GKgGI>SL6KK`@<^F&<&V3At;3_Q1uc(@qtQZ4yeTpsAiN2a$eKu^h?eD$3>^h|N;; z^3%ky{GgdaaMTfZJm4{i+oWnLtJ0Ro5QmXWIVDWS8?ytBt?#A?iw#xIJ61240k?q3_fw@)EcXb>rTg7$|{H zikBd6<}B-~A8)XlTx^z5K${r)hXBOip7BGkigXh(ipHe_V#D=6TP0+< zkVn7!tg5dx<+NH+^AlC)V-ZN!0Qmg>CcQ`KdT)$NUWK=huukpUE(F$Y&9$} z{ZWTjzx(*1@loYN)tmr8)|#SR1*aqq@g~56@IRJ7K$(h~&JykA zpcw@NPtB9pt2p&{-(%r zh&HZ zeqRku;_>40mn1w z%1A#(u4F}GYmfJRn-xX&r9=UJi5;?RaDBEFP~rIcbv@Em-4A7!m^$gtwcA%b;%pO_ zOCEX^jE49&LJw~**1eUX-DnlHL1{%9V5!noPE%uknqdUSj&}XEiDk+WXU#59PWukQ z3*Qf))f;t>a1%{kZnmQ~%zis_@wT;1kLA2pwO_E5t-FE^`{$-~)Nb>u$}w}FEL&35 zjgMbwc{ds3Tl7>GXB6RcWV|9r|8jcfCll9WjPeNHJA`Q?n+7U!+(vsM!^| z@gJYApX*Z&yE)}F%T6aC5xwt%cYe>m*!7I&$-tFdnFyf@INo9kAjY)H3XSo*J?lUv zYQG4lRu=nW8!<1sKUH_;NFSFWYOtgb(FmWl@JzGyq>|#6^S;Y6sK97^0OKUqmj$mZ zHYr^Ujylv9;yw4v*zL$9t|(RkUxu#S&1_NkM-t1WMyX*4`h8-P|6rW|ttHo=+94`j zS#2W>ymH<<^TM9dU?6+l;(NH(1%`cPBI1#}SmWV+UOF6Kk%gz~5?6N6H9w3DkAQRW zMa0cbRB&*J` zfl@)`d)efQM%`1bo7am9`BLFU2)@f;h=Bbt~~& z2ugt<{ycg*i6bU{mLI3xFAO2ic;b`Se{s(Ic>0Sb>ov^@4<@!N6fTd_kv3TkX>&&^CVgvv_mwN8FxhDtg*6CroE}WtYe3}_!4M28pC;bgj7{u z6~EacStrHC=2znv^1oA$;G;{k3%hmuPbBa(9I|j(WSQZ~mSG9H8ImQnFkQ=HxTd)NVImELtjS40^?Z-g4Ho?DwMZ}t6&si{NNuYFuKDTR#`qftxd#d!HV zqtV=>WAFsYgyr%mn<>$}AW2HFJ&`~F11FNDmGuQO2g`KeW}o<}9fdXy{&!B2+dh~ zK6t+=WMgnSxS{V;C#{y3Gmx0UU3?@29KRPf+hN@*Fwm1UCc++LVw;t_$(< z#XihH@1SN{SKF}3^p1NHuKb>(Fe5M<`e8a)Ta*PNvsFRe`ItC1rRInM+&24|fUtwQ z23j9s820L8PfV6uleHm3XPi)d9ex;TJf5$ub>_c@c1RPrpIsQ*Vk4Nu5ReZK8;ti1 zbB-sjo?*RlGe{-w`(WTsk9j6Eey62;fH z=E1s4yRm0Aw4tRUWm0vZo#*GaEmJC8FR$z~2`u2lrs3^ZqXr?DiBBA~Y` zyHYRf7!)KmEwzPFU8_#jI-u4z8mB#T)2MJlG@6V=F(MiwF4aBg^Q*hLU?4fAabcZF z6$u3CJ)}XL!IWt7=)^w`d9(SrR)E4oevKl=FgAL5GHK|)Y&OlKBl?BN&eAo9-;=lS z7^&8qJ|0VRBQD>j=7Ww!>EdkGuO&~rnn}nHw2k5wId2wpdZW#)igz2D{?Oi1mIBA7 z7!RdYW#uUueH}zDy5QqaN<^kLLWJo$4FDY_$_ImRy~e04+Q1=c?+SRE>a{RSAGVhU zrDTFV_Pch`tU3kOvj)~1^E4h+ObEh?CPobc^Yf`E5SbiV(r=)>JM9cNYs_~Ci9?rjv~QH z1#9Xj(l_{2QOGEJuycjJIjQ}dxUo`iDdvL%OK4#z#8CxkQc|}p>`h})D6!#&!l#!O z;7HVR6%;2;Nt>j73JBO-k?5z{74>#WF%ZPQZZQgiBuuaGP zKH0y@crn0?a4DOaO*nX&V%XCgp5~*m6g4j9eiEC>XKbOr_pnR$6vy9JhC{^tP~^#s z%`zl_n@k!^fM{!SgZqRU;4tu<*wo)YN8568pRO%MpppA=`AHRms`e!X%$7=J`0sY8 zdaC@gPq*xvwaR`XJ`q?a&-``9h?DqpcGP2cX!biBwY}QKnxrmBIT1_1%c9_1m;sY= zY8J#fi&eiqgw%%-@+wD(M|hU=GNCakIu2^-zT0!k$)6sG=663_?OHUy7@jF_PA=0Z zt_8gVT>k!|^_iCe%tts%p9y0`fKOY#&C`~4cjSon01+E2yL`MIvt8jYYIO8k?l z{gfGeFB%WOnx^lp`u?P#n*F_T4olRQXLaE_3sMuKE)_I1m*vsK=eZUGa+iC~ahSwT zaLpdXDx41dbCnK7S6L% zse~L|VqUvJ!yaQ^Rc$CKi9A0upZnH)&d51+=7a+zbh+c;W8-GrOb$)PRp^2(77c{1 zq*5LA;`erAq}Cxxxcveigk((Mn_)nNXRC4FRKwIMQh6B^foO4>h{xIKxKiuq`JHhQ zEl2ch^Y74Ru#;+yLsJN4);KzH&TfC{9e(f(;)JpIUIEIim2#VcI7KxVQ;GRwbTs#u z+$Uj{Jgu1={B*E2vj#>to&vPh{|v$&fR+!5SC+;<;W<+w#dY@JM-jqD?7s{<<-Lbq z;4^6>3dpctl-_jrH+X5vCU&~z(C*`WzbUOYi@5!o?Q@RMX#n$+nQkf%ja03zP^V%^ zE>0buE{GyOk^6ndgq+9wm10X2E~*qjD6}@Yq!ecNw<9-~_{ct|rXY7fEJS(XjZKQ}lkYVWc{ZcS!cAxziiS8b2PqQ8fP~A^VH>iFWYKaE zAnNi7Ngvz?`4++o70Hp_T}&qHeqQ{ke?@MKGgfj!TGmTvx!KmiCZkGYo-^?$l{FcU zINYUhjfu^31#@}@lX|5NQ%Mh3)zzB=nTH&WaFuX=B*j3G)RaQqsEz(5dBJ&MZnR#91e038754 ztb(1XRE(z&KVUXnl}IWe9Q2ms_fnEXocsGjqBsd6^R$Dwd&X z7XB)z^GSx-j1vjc_Q-=wb&{sv6irP5bR;`C>A34tE4oTPUy<;YCJ4yT;j;@5F?Kk# zzqYg{97`=frm`EC1fcorCBQ1cC+lM*OcljD6Y~>@jufm3iA%BFB0}%v6R4~>@usk4*98JYsR*p-wV*;&o|_V6-?Z;DeS4_ zHwA~WGJm8pR@G9<%die?532nXKW=dtE^#05nYa5EzUt8&j8YQ$ugGvas$6a51FW^H z8(X(^;CdDix=I=zWc^JFj7g{OUj{4ZW}If!-m6IqjmRSBCy`Q`SmtlR zU$=_KO-cI^odd=NQd12i--p=YxbLi#P;#?w$w+u>h&aYl@D(g6nb0&c#u!F%ph)|X zU3;j~SgT7Jqm>5IF4B@~cX^cAWZX=C7 ziSg0bf0W6Nj?D!P{hp#YJ;)M_h9}|fe^9`Ylmh=uMDjsp#$mYp=d9TOoHeu|tN0rl z8k0Pe*^1#RwX0d&Yf`6iB;o*^WKOo#;pl!8?lytDOm@;8(w9hbb z0q%fyJY|q6`#6%-B$nZ60l=5yG*L%$7P)lei~_##)moliBnr=wP*PsPM;qnwSrlCJ zU}x0%YM{OTHi1MLp#|ABp+>VH#&=T>s06s;UMj4j@q}kR8?muz$@Hz&PGV|)WEp2z zKN=Mdhpp9p$%(uGW6%~ONK$5bCtpooWf3u8gIIRb7yVxu{QsTdywSeTNK(}X${Z`= zq`k9E3i}qr-q*t>=Er(8W)c4oFl%6=su`<6<%4;mWY8yq*_WdTgq=@l#UOG$M8?GV zQc=Q3OSD{}DC zhqr4Loa8J-OC>V^V&vM!vwNNULeQuU=ky0YirX+PMxQt(J5kW083DM(v}<4 zC~ombu;7!M#S?ab=m+#Tdg9~oc@L%KE#A|h`0wcjbYx0an%&tz`LVWo*dL1O$LKqa zlxC`M3)kwZtl+Pz;z`%r&^oRC923_dq9(*4R+1{_-h6zs>oOS7&i18twms{9KGO?| zK4hH+gJF`FtD_+mncCt=0^e6oLy&ikSY5(hC3HNrM+?{hlxG1DsH6LO4nljCL(gm@|l2X2|fE=^CvrJWZ-u{K}p zJQ%tVN_2QqCH0fIW_=mqmnU0tBGV^VOf~M;oBF}@TaPvzH~RUQKuBf0pP#$O7fE4R zwU`*>zF!e6T-Nc&vSGN&zkiukWI;#<`a8VpSVxiS=cBVpjHw8WH{SdtIRL<{V!$_1 zh8s}@AcaA+O7tABar4xrcUJf}W?J@;wNh)TkQq8MwxFsnAF$T&RXtuvo#In>RsF}gy9Q0{c zrwvbg}Rz$_Dhrj6^X4j zGH<{?in11k*5QSNDFZntxT4zw;x5o?NJuy9462Rgkl;2U?2X~dzc7$Sa9|8Tft;e$ zgg0_5p7~e$iOyXF)X5z3vfK@<0uw2A(v__7>JC{%M5}@ta%YZKF+{(CinR2}TR!%V zz{b|ch|4#Ye_4l|Rl~(3kQAa4SHUt#&nE}E;`gsEecK|_p`=Os_~0qWK;&1_RB>_~ zD!>fR8v)~Oz6*WdJa3;~m@(bP2!(3*)-CO_H~&K8Jvf6`RG-*;>*MJ{?{=P+*?amo z$9X$VX$Fc$r)NEjxsAa0#@Il(%zEIiOK?u*w;Yx93`HkaBCN7iBtho9W7tek>P{&JO2GR@ns5$mF_ZieQ{4KUBrj|b7$;hwu5e(Y z2334(!^Xkgy~vHMsjZ5Ix~Ja||B}Zy1aeUi!KV4lz`zC@Ql>^tNfoy! zHE)B4BC8zp`LB!COqw}g@fYU^drZVQ zk;2mb)8g;TD?ItQ*xx`I<5=gQ;S5YRHI}eM;ZM&C%2#sqjm(xTV!waZ#hQRHP&3sJmFvZAoFnjDw%rzN9Ib^5{0Jf_P`Jdf zWIZegBUpsrZfIfoQBIfY!E=sd(;}8xOqz76H!LTOx7&JC8jP;XQdP^1HWyuJLGOF=oV<5 ze$8~N$orIO6c`%Ia~;8ti6%ZpHP2CT<58&2t(4@Lyh~iOFiR{QPQpv__)6b2mJ)0} z4XKGCh$01-@+wTX(kOuQFx1+|jk6wA3>dkZSZag%CVB#v`SZ<}anH(40s=k27-5Gm zW;=r9m~15`qJdx8V0M>Mk`R$8Fk_Q8_9Dy}`a~rOF}cCJ=anE20-F_N)!;AC3;)@h zcsD!zH;;GfjuEVEglRnGhj=NDoaun>T?M3HVMa;l>&@G;D`ZI3a^r~a(}s5(Hdjqp@mVkRBS9u@&v&8#aYIP928^dVL#=WwY$W9 z)|VdmVV<9zcaKQ$Wmsjt6oONv^yt8v7kT2cQg~&)m8H1gQF(R{F*q!B!Xe=@6qzZ( z?K=nZ$bGo=NWSAn=@E_?W1E6*4k+-#qq zz*Z9OfR1;vqVo9i+}u!Ydzu7wNW_tZ>{x#!!0^N_1o@Oibo&Kiz6x^Zo-R)nK0rI@%z7QSWWJ_eA9<}Db|=MmR&d*Jwk$mc$*7ErLNY4#@e9}LAEC*3 z+Fm&1_XeLr*W7V)*+GS{9G&s3e@u_1Q9R0!D%G`E;Y9f54{>+$*%YSYE#sTIsgkRY zkE{nU5HIIS6AyEVR1t)axhLdNa{JlcSiEa>`76G(j*SpeR0w#UNy@>fRakhCCl_IH zDk6S&1`U5C1buMe=Bewcfe*8pQd8eXUm>uaTKpqYoGVynYbR46g&hBnbYLM-_paXDFG{4=-rHgcW2NCUgn zVbZbb>mbb_PO1$xzFFQa+n~?l#+-dq)pyiIUNHZ-!pQ;`Yh=aItHuzF7)^u)Pw-S<^@D5bT(dw{SfxUjy)I9!ZiKfkff3NoHB9 zfNck4{@vUL)Vd-vL}f)>EAG&K!^r&jmm%%b2C?PTbq1yOk`lSre9~_TIpf@aQbJsT zkE7b=Z^1GEjoczHi-58y9%UePL}rs34%o_~OTF}6dvmGZh8Fy0;jbv$!2dbZ&3XqU z2+({yLzEbMdr@1#me`D-&g#MGei%?l>x7)LpzE^=Y|%DN86|udIi0M}jI`cPcNDvR z$#o;O1h;4}Kg?WI-KGpF@6vmZ8S=9nowdb)T*t9poL-PCwA*uh50QJPIz~{f$_AHQme)H1D#iRc!9sd8g0oP$LpZ1Y{Is_vHd3xbJ zv>IKmxVqCMf~Grl$*T*`-bru3BTwF8qguwm&wbmwqju1EXeznH=FDNxqc>Ze* z;L~bZkUaH2f)>cv%4d)mtmgBVg~$JBxk6A|%#ih;3ptJWKb`ykc7s2IgkK*w*wT<8 zFg{Ys>VFXCe_-5IUdUK-BD&ij!^Fgl=e1Bh9y#;K&&`D*d4B*qU6$P3{HK|{!@p*i zw@x-Ty;oPPf;YLSm9hN?*OmTV>+qzD+VmcsYd1cS_xTS+Ngymdd@t9m0q3GKl~ef(C>HCI07a;=!IK9ZCAM>cG0Ru9hEf!;n0D@c$b^lGE7u1qlhM zq_h;E@p>roUwh!7Ltx2d*q*1wOuk!4mZy!4jWpO%o~Qh7oB#75j1c3jGiq&9fg#8| zNAG{~8cuc80{Z{D1hMpRt?W6J^XWe%=ikl?KUAaV<;5~{P2SJ{>9pf#h$Wlh?mzRK zK!oA|vlkGwc~vctAh^ckpBw6Zgm~b}Us<_|{D$0I(wAGKcMielKa==2%t^8at_{R- z@J>D}D`SEXn)>JJ)@uLK|9Qsm?y&S@W2$XWi%;X0q+fG!x1Dtzx4z>}TQ|HM9RCMu z^e`kPSod_lN0Jrr23YmE=(Kd@%?umeYxBi<)%%~mZ}K9P?0OLeI?gW&y1}%VV|w|{!xC7q z>Hqz%jt%*JWV_X*Q%0wZ$^SB{=>1<|?jpT{`^}+B{RYAMUpVbb?+C8bJZmsy@F_PU zSZC}wxY#TX@{GhMr=*Zd#6uiST=wOrSja*0=^rlHu2YkV#Gf9UZ6MC#SxreG6e6hc z_sZbE?+h#G1&Sd{I|9t)q(u>_LVW|pBlrpk&IP}{}g*Uzd+qCEUC9}-I+T>kue^PTRjwEb!!cH&IE{rBv{;A5&W|Enl{%c=kU|W~_#;+<08{yOV_)Gj74f zwzW~mjdS1rKL}SE==nHEbVK8N%&5-ys^prEPemna|MxDJRrMCSfVzK7qjQd+7HLHI z>Hkg>->(r$bZ_@rItm2}RB6>{9777K+7~oNuH1bwk*7`-CV_eXE$1dWe5~7d8j! ztoF%^aWX#g@l=oYQRJm3%GWLoP5 zw})QDeeS$tP4bD|9o_QS3q6XV-FlyzS>i)^_cI+bGK%oi$;nCIZa>Ac?($bs?R{d_ z5Z%_ek)0joF@EGXoWagWI?rz#QWh2FRr`>FT476io=bG zJjoXttuKYEp?1A?#*MC^{_=Px$nLApX3M?1rfGFXJMe8mA z;+q4mjm_d@LB#~D7$Z`geY;am3)-H`oBQf--g`MVHE4yJ_sNVuc zA(y%I@_T0s7|m4>JdYx2a&+&>-S3mjsyUzCaa)FwX@2mR*d!6zfKvNUqY)PMhYuZs z^*N~$=}4J`bf`b+fmh50i8l4|ZL5rl_QKf2t-YZ`yS+(R9>eN0{PIvrAL_ElM){>n zky#^<2_5121>;EjRfE9aeaO-R*KEQU4>+O}I2C^Hn4Y<`j`dMQrJKK@2j6=02u%p2 zDg1JM(ihaW_YDLP>&Snk(}6X2yqdJ%`E9u`$4aNIDXqf{I{AwFwzp#5<)UET^~W3= z1qVE~`{`;5iIbBtaL;TU0Qf!s=B3CZn7HdZi^t|Kb3%Qc=&Zx2@5xh5NY_0Z(ZG|k zxqa8Fh3zyUHbKgbP&Dj@p_qaxVl=gx2_8X;%%IL5?K`>0?-+mWmyp3;cVl#@Nq$zu z2C1`#nlsukyS1+l71c=>&+I#;fGzG)y7*BhM@A9A)Mvow7}rE9?$L*l`|2@=J;(O% zN=8f7z7_gNf3yr)cYlpWLxz0Ipj;v3ej zkEkrqm);}(duA3UijUDoc|+N0Q2*$i7E-^Ua!1XjOOM@mq*m;_{eU>PFt_dQ zy%jbnHWhfXN zwhVW=(mYA;aWyqGZs550vBw6&V%%I$fV zLA&q!cReItbV4-P>UmQ1+s`>zyPEeY|N6}r2<3lZ=@IR!>xRHmlOMsLN(igjd`uJfO8rS5FAC@20-W&`mex^6DrXkuSU#1L53>po} zt?PzrLzrfQb9+r-#Y71CzoX@TABs;R)N>5ZCDdEDEcnh?=CU@K#e)<#8Uh24ni{TE z)y~5Nre0K|Xm{g{A!j1)HMU0+U|3t~w2A}JqG5coktk@vq*gLEHvW*XjBw8571yen z<_pI*%f{_|1DjV%zZBFfL>T%Qu2^UhBET0cN9 z36>i7qwpK){02;wo|zfD-F+0t0M%ym0zMtUP2|=l+x5J?!iA`2{WNSjca?MXI)6N< zX=wRD)ZPNu;QF~m*z(|MGVNK_kRGHDDPYlG>}rz#9+`@Y zdTM$-2<92(AHM?=vEQ_GOTrU^q@?8EEA%P=i1?!Qo|sa~wecMEerXBfVg=;e+1U54 zkOc6pU!UKna?#dHk3hSa^m0bYJZ^DLw(#%Kq1LvxwhI5pv0nE)vyjgF`?)7F34}47 zumDpMpU~#@00}^|QPkmOGmGcl8;Xf6fhc8~A6@H$4>10Y`?dNR<4!scj~}Q^5s|Y< z`hUL!15T2zhX{)3vu2uKnwi^;iB(k!-R?c|YjdaL^E>bqqhri`?V(ktT0Qlu0b=7S zWQ63oStQ)ub(s*vSVG-b1au*YP?FcK6bVbz{NWUhuOLaAPn+}2gUTI;qx5d4(7U0V zyC+`K!Z9=ePm^`>N`C~kJ-Yct*vOw~*93ch?rVhEFA5@*AD=nN@PaN5@8ss`syW+DkDL{*WFiKloCbu28V;s=q|_Q%p*Vx~;uEdXCBrTfbhNE)FHe z*xM98R~kWJ#d~a}p(H(Tnnv=$fWE8lXLCb?bV`wNQ$_%U7UV4R?C|hdm^G{a(e(h` zAQoRky@hJ*GRDN)WyJW~;>OO+SK^p-u1m203k&(5%FODcm*4LrxI@`{ldOil00+7N zE5j>keKuD%TwWpb0&vzjaYIv6m9dM62K_@S)phsZXzA{}LhV>40{Mge{i)TN=<_OK z*?n_;(gmc+pQqHjWU$msW-b9Ea$vLRa!bBa>Ej32`MePTcr6{D~+xx(;Y*v9k>R&+pnw;p}zn} zgvRKIk|YUR-_uL*U&t{QuQ8v$d}d)=E6eAR`}%d6Bg6-3f$rXRK_8skOM0z;w%Urh z=W~1IvvNa?dkxw*+^gs1LZz7ts2d3=0PQLkc;yBJkXE4 zGJun^tM`^zpOo&^Ok+(BvJCnKeqT?)ijL1dJpAaDr4RuCk~e}IJ90*GmseKCqtf*; z0XA8=GG!qv;$H-~_^i}t^LSByKzkjR7XNLm4)}cOl_7-4RvGh<4PgZev;`zU3Qp+x zDajR-rBmD!cm;o= zlZTG{CiCN* z;e3dy)T#=JSC+C0f9&c|$ns3sS52Gy;z~4n8@~e^CClEbB{t_cg#T5X>Y8DL{N%`} zCO!qmCJ&Co+$#yDZ;RREz?0x}9E4T~35~q9dbdz~4E?GjMK5r%pt#xURwv~^=6i`< z3EQIjIecr;RWPG2e(MBl%2gBOGhd6C*7bKAX%JcMJb>K4+a-*^IhkR(xa0FLF3~dL z-Onk%q9VC;jH6%oG;Zj@%N;mQo8=z81Uim}V)j~pWQfaL{#1;5CVUj}XH;)tn*3ib z0H^(ztf&ZMnvGb?L$ z=YJZ(n#c9h@uqVAjc2yn`s>-oYF$>0?}~597Z#UYraPUC9)qLlty)Yz0Q8woUqM#M z6pMjj+4BuLj@Is&g`k}h@%9&76fGY|rVA^92O~tjBdIL2+AYKNs)nkeR~n%` zDl@k>t*VIW4v5tB>Byuspj-C6>jtsR?Lx0XNGGQNj{tYxCeN0=EF5X2nTCEbqlq5d zLY3Xn^#%jf9kX`)JK-w+=jCf-wNE90d*NBx=(@l8K@Nb3rm>p1;Xkva(?56x(S*~K zuhX8q`C%?GPibpMnpD@&kY(nctwr|rzK(ud%R!5Dy!^b{sDjLR0r3~t;Wy*crE(+t z9(YRd=MRk)njFLtI2~_Qci62^#ogrX^xeusd1QCGW*2S0M}L%*y`sDm@qp<*>)O|C z3tz_>JxMLcPMVxExDL`5soFNvWnN!7Sje2{&MfSK4>uxvDusm?5T}KI_AQV6s&#h4 zC&)Q${}R8Jb$|ua{W9Am2rDi?amP~YBx~KLX)Vdof1vl9hN4Q%^gTLcSTnU_LIvF` z3Bi7_tqizR-od@dE5B|%Cgg1xiQgj)Ok!cuKWXs1^X!+}t~d`Ef3-fbXN%<}a8PR@ z`heMfwBCNdUHl%GJvcW9kq_m1DJf=+Da{8ExsF8osqgC`SP1$&i8+(}tzq`NQ z2dJ&Sn4Nx&4@rbtxh1RNUkn~1#bWz4)4I8~Of?b!pykKkjk(# z%z4EZ9p`~{ZN=(FJlnv}sgWLla`gE44@Kvur=LokI_LAJuj!zhv7mJHVmfP2M{9%f z|J~M`RJEr7F45q6;D=OZllAat7CQMO$^XzT#GJFCh2{zitSALy0ty{6yfq-1h^o=H zJ5F2ma~1I>Oks&Qte093>UoA|x;F4r}hfk*i1mjwnYf*LD9A zIpRkn7YQUS&iH5q!A13Xj^6aQfH5#(Hisg<466(Qb%Gt;6WRTN&#D;3>9El9h}1gn zyB5k2sO%Pk^3)P?I3Z*Jwg4@LRbW$LMJ%5pr!Bev^yc z^UV#T=Mwo`1En_2=!6c{->#7JFD?-S|Ev%{s+2FfIF5t>V+~5;w z_f>;Hp2^6E`v-9LfBiFZ(+g%HU?Dw}jl!F=eTgvK10G z+)CW_+$#u_*VBs*IU9$JN{$l-30 z63o&~6)NjC*4yg+fYI z4Gj(9_>to{aPYt@>N#F|#2x+@i$^0CN9iyA5~ULi(HXgjYUA#330}`=ox+CIoN>HDmiWdsAb7`&upR`I9M^-=tJp^fQbd1Q|7L@>R|bg?|_AMAX)sPLsD{Fg`)BwY$ZxS%#vf;#=YQFe&DyTM|m3*qFj}@Z{b)facapVv%DN* zS0(s7K8Q2R6;+(At+4#^FTx_W*5CZE!0F*Do}QeC#Lg}hfAyE(d-PG*gMrm`LZt28 zbjbOIU--{BKQxHG-ahQvvj=vEKIT^hQ#amm2*}zXYwAUZ9JM*#aTierEE#f49zgkH zs#Mqd~yH2edy`!(a*iTybY3cMroQa zmYM`;ITDOR&yu~HSyI|T!s;UAdR`_nQ?hD)0=8Vyj3*3@3`wTKlvIWJb@Nzl)h={z z7cX7JFMjz8G&eS*qrC$$@iBT7r6C2-~G&XMgk8bfeEjYh2>btpk3gBjdEO| zz!thWCw zK}Q$CJFTs)sHv_&UthoEEk+&J(5RxcWc_`{D7H0sx1fN-=)n#WIo zD`HWOH+~)1)B*o<=iv0U=K%MGGvf3JLr;m+ioA635-Mve5f&DPy?gi0sT_v}hfq^n zgUeSgOR33X1cwAGn-P`1J;(;EYc|hD0+s~Sl}}`votsgPGYFV5FWv;TWF8P4q9v?ir-5wVblqzVO}mxD{13Nkz_eD0O5EDDrZ{7xybArlUN{arX5cm^YaKpm)W zfWysVxCryjL=zb~Ub_LDIt{$?vVP3*%5lpS4!Sv+5;GI6o12>(qM{>_wK@x-5ur$4 zkqi${$(x*`5hxWB6pW1Y3}xS0k+K3l-ad0*-yHp#uZ;xeBLNy41moOK^?K02!rVtQ z%5jQ}Sje@tr4>cRMQCknMPyhcl9H3)>pL@oa7q_yEn2Qr#+kI)f1xw=G?vzTk&lOv zSZAbVz)|w}B4y%cYQnN;^SSrUEkIeBu-&YO<3IeL!XKA1ap}FAH)CW?1_CbROnfFQ zH=w!^qn{pz!_FNT70a!mu>oIv@dYZYDpihKH*ZCd0CuKpUOryfvSX_#$Y_Z<_8}@Z zYEG+>{ZQ$y%vy=>|LxzRn=wb>Sfyn=lMz_Gc4rTx-dP?noEZ^DX< zRK&zaKRFXF6&(o>_UysP>#w8Q(;M|-6?%Di$RZ&c?g@$Ld1?;^^KQeXyZ`=8?ibhd zE#YOYszSfyJLc!-e>yiN59DF(cpBl??{1$K(T;EVH%pzrQ_j1SPt(&nTX$A5M@^JO)RVl)L7iq#@ z>Fw)1<4v=^ux_4V$gw0c&u7sQREkfeB_h|&_+m>-GcI4gjHAboA}}COEVMPq-n0(x z;<*@o^<|7!{7`turQDU(q`cMW#VZ)j$rWx@VsqS88CBI(;ln?CsNN6%Ab(`~W?FmL z^_kum{*JC)yN0HQCL|;#AS-LNfRX&rF6k$260#s;Pf&1>xY0d~(zNT{Sf-uR(P98O zkM8Euhs~HxvrJCWk0+!SsJ(Mqq~_) z^hl0$S^D@&xG@E5SFhFdh?v+IIE&&WBGuuUr!h(p&WFeDUm?fU?J{_Ob{M5`7;PNA;j_5q`&U$!Rbs1D3i0&v!b+jF`|Pt%@zF;g zX)Yx#;-~gK1y_%0>yO;OKJ&^*z(xWb%N9ekcrluyeNW#CrpWl~U ztMfUhg>1tW{XpLUS{qwYS62tJ1dWV{n^lMga&mI;`H|1z;_4#GawWFy+-8*HLWFC! z9g~2})tp=H-HdXyButl{#9x#sT9UD;DB1c4`_bOfu7zXi4w_3b-tUeoQs}kD|E$l= zvys4T65tq1mnt1AR;(CXoY}?%8M~82{n2;c2XgOB?xwy4&X+DA@P&i$6E|jbR5SvG zB;fe*&w8 zR%wb!SX9{b1nl!WjM?f5mVi|!cMOmt6Stk(vR95&PL?G%n+%!2%vC#iDJv=~P*hl? zxm%@D-GHvvREanGc>B&vIZh}rtrW zK0OA9Z@dA=b?YR%b_CVc)k=C!Pl&Goa;UTxl9KcwBICI;&iJiA`4)Qmdf?;Zg8=^k z{oU+)YM&}?B3v^vGvFzyJEj>4EJOktvXXgqqM*Yherx>O&5v9auw+bGGZeA`foVkF0LHZ>mCt&OLt%!|@g_i&avIQ0B>F$Z5q9Q@p zwIeP)PHW=vhdmVvZ}mC#*|HohK#qR@2yW)o^Dyt1sRSY;;qd0`7`^@fNT7Uj>~Zw? zDRd_#p{S`*EXNwP*m`?=RXJX~a1pCAR!Lfi@U_Z#?3T0omfZvxEl8Y%p zdS@7KG|fohVI)9r+yrMe2eO^ovQUn!FfcMS0`f)X-OR&BfBXn{itlLLW33dAwHmF( zvuDrZ_aFQow+n8=VZ;I67rk+><{n;r@kJy`ZM>kMAZ*yU0dcW$=$3f38r&vS3&;`5`QD`02G_8r*&%zjO=nCQ&BFcNsoB%oe78SbzI;*GY}Ln+5s!@RL8{=&_^l@e;mA5h7O@Yy{dA7Z>CG_uof(dATyN z`1twY_O08RQ$|GKx4-iz2nh67Mv1_kKl8O1r`{vpNXv?x`ki@iB=ArYh=>r{ zxa}A{CJNGqbJa;KN&nni@Rra*>WWnO3*z<6+0*Fg>_BH*CwlvObxd+0nVX-BKYsW} z+^f5%)zvo(O&#+OO*0ZO5`Zx9EQ7`vV{>aWDk>_`-PsLqq2KcGk_2NX2c;U~CAPG- z;L6o2sFZD3M(BIr{T}}6dw+#*e)F3OQXpkqQDLDfQEqS1Vm*jroKT3es9}9PSH_9N zrDWRd5@0O2MUuqp>+8XiN{<4rJ^L9w#@{l5Udlz`1$j(q?!xrsSuA6@yF=sYE>13p z5M{b~(`F>ZB}|}T{beCYZd4*$S(DMtW8u|3rX1S5H4?C^1T5D)jhQiQ$9=EKVjp-} zSdOmlu856~g}bLa;uGT$c03GsitcE20&9Y8ZEi(rNvTq5Z4~7gpAfI`@~q4(q_0fJ z#fuk_e>)$k!s|(N-NQECIMQp44v(U*zfWDhyrG1&8z92;((RCh_48-X2~}tnHf`F3 z)oWMVH3l~QSuBxHNjVo93WqgW82v;@0cevig90Zmo(mN&Iyo8XM8xBnW+dcDAL*a4)=#c!ypuiw0Arv;@DrJ4W z$Z)A-F8O7oy&^c_VH+nOt6Wf1W0SghIYFhRrArQ5+RQcm9`?XXd4IWAeLcO%&&@|p zUXG$2R|_YoX|qT`6x^^d&xWLZ&Bf!v$9 zXlQ6qyhwRfIg%2S?h|C#;dGXTaqw-zaIakZZcvtQ5lkkUN*qyiim8n{o}HogxhUm`~d%;6+#HT_)Zt>{8pw8>a> zERV%RY~KK1O%vI@dpDAkli}v-ZXMb@+emJ2 zLR8Tu@x@o%CX?dFIy&PuFJDoRLpXKvq>Mc`q^G9CH(hFz&f<+492!KUq=HaM()~)W z%cA`@rnwIDk&(b`5};QjG9nUNw`@g1Y=SDtTgA6@mq97|ZLhZMlq21!mes}yzK^wK_|wt#04E zjq5kAD>{{A$ll)5PZ|rkh%pqEP{+y5b8~WozmLCx$j>1_E-2V&p-_Gk`Jr>{_auMK zSbK6xGXDIp{~8TzvQhlu?~#71YLZAIgf#ydvHniW!mLzWQy+i!F?{`fk)53lqE)#V zoQlW}2nxV+&p)SS+en}h5gzfSZ6+PWyfG56qXf8Mb9Z;w2Z1@H`DC5Yu{Jhu*yHfa zPC0UNC8DXPw+FNet-4BxJWNYw zO8mpE@+&V( zUAfP2=JXj|HB)JA*}4TUJpTeh!a^QKmJ|D`TU9I}0&)ll;-9^5>Z%%Di6x{d2WhMOc=O*^^X|A7YxEdA9(uc|AGmCF13`!)Wuaot8GL|&|kOeYpr;}Ci} z5|=ZnoxXDBVVX9*1SS>~Vtuiiye(*I`aK@6Pszi3`t)i1R*1hl+dFaS&>_6~+97bv zJ&MLfVW1QgZrQsFL+^hCR~yb%;flfmM^_|eug8y9B;&I`jOB^dO1;Gvsr48s1Oc3A zh6LQebS5hLfPernE@^k`_fZJP9AjBXfa9{ZrWRK(UjE<=cab^jR zIZ4EwDsEL50prkWSxVM6UHSF3^-6l*DusosDyuNe^qoi4MrGm{62MuLl%?_v@kexZ zlUR@A=A%40NyU!7FHWF0IUeEB(HLy&Kv`78wBMIZz9)#lwi1W! z(WoG2``&ijhj~rKNX6{o?xE;EKASeP1k`fmWG?ur5s8y=l}L9qS%#KE^AQfywQJVm zg@Z4kL((d;H>`W4iy;zRoI3sme*T9Kv00A)cjD3y9M_F1KZ(El3Fm54VF8LH**{ji zCeh_pC>k7qUup_=`FNo~zWe3dzZ43;79|E?4O1exiIt)oi}!@TA9`5$Y?_h4qm%$s zI^u*(pJfHx+S`;5cv$jy?bVi@ale`dRmsqykeL6(betxija`P~U*G)HJN$upYr-!IMH9 zQ};9PjRfW+0Y_)?#z|2LcNx2EBUVYk`Ru&FZH#hUpupz4ITa-T2rl7dN!OIkJT>2L zo}BGu4)^x;*22@tX~{@QOIdoZJGqA05S~;VJzYIYk4N-0OQyNIEe=SFirCZ3Q>;IC z4Ep#WS5T-e4ejvn60Ts5z44ar?1uk+#0Rdjy|+N(eWdz{lek&A0&fv={?;a`iXySo zoEtgFSebz}UTcKcvK+@w9K-qZ=aoR8%8xO7R~M-^GsV413-;EnTlmqx{Rrjd<=8H1 zCcZ(w2n-SAxE#|oBY}sKfQ)6*CK9k`(5eq5$**Q-T8v6QAd{twqstfxxzUVs-V8Db zty#B52R^E?dmm68`{2WyVhKsO`*;ywDAqdNn2K0hKlkE_(;jN zwJ*FViq{kPA3v6g9eoqsc+s8e>V-kEbX{c8=Fli$z3 zjSZ-gl#devCk?rg{M@veB|v4km?R7{AL-G5L&hH> zSU>ypGkpBX$B0dgg-?JF62-z>4CTnN#(p%$9TtH|;qfgI%D8UHvrVzNT#i7}%1saj z)Hh*7(wbbe*C8r42HES^Av7u+net(PrzUPPU#bWt`MRsC3r#Ie80a4`#boUv>m|}B#{)?r=usFP8B}+> z#Rjw(m%te94q?6NYVAaOTN~=@YH+F`AHMya`2Qf*+e`=PkfPGpbKu<5g|y5J{Kfaa zi_Wf2#Kpvk((}d5yqm(j(~1y@O-4pVY0>aA=g)xYD!!r=H*emoO7Pux-bL}fCT15X)AKveskDNS7tt6W)h%cWX|}FoEt)7QLQ=Zi?OhrNlY{TW@g&K zd_F%3aHY&iu(iDv_iFEHDJD~CeSWfAj$3g&#K*_uwbx$5s;pI-Z@X^YI(0c(*GmsW zn~(_<+`g$q_;g{$iuE=hYntTDq=NI1IO4gV{1`o-e};Hr?D6dEL4}JWk|YOm+9uS7 z4&oxkfBR?n#KmEwOh7!3;hO~#d%OpqYuB+&T&C_Xy@U)Y5`ON?X;q9}on0s|Ek{{# znJ)THo<51(++2;JZr-v5tQ~2r#c3sOK72q4FrHm5o{Y0+&Z1aybYr7qO`hWe%JM7S z%_>>tEPR#(O1Qe3Y8+qb4f%=>&R7W%pc^-C6y=zuKWbW3wku!8?TU&D@h|`KFKCkZ z-+_GxaOjOgT9IJJ)0ePIcV{=Ms;bc3){I*>Z{qyTJfs(w;#Efv1i1RD8+FG0`9+=N zHU8p#@wd9DlS)oi$oog&(btcL?shc9N8@S9;oKu-*ScCeaO~J|1r@bRok)5{5>gWI z^fOOuX|_$9HX(G8Xc%WbXY=I~CjtIem`W5A9fNx{_tZOQPbMv6Ioe@}X^c?-7>qjx z`3cXfK;<80&YK-B$#l605}+mJE@)Cdti~Kdrb>)RlD&h(4eJ~0k(ZaJ$}v7BUJ;~; zN!He1e&%YLtLS&%eHRz6T!5zlVSJ_daib`xs+vYbmQ=xCaz|%vERx(Q^{)6BZ!Hod z|K&g@-Wu+Mzc10IA@CE|En}Ko=uxr9NQ{z?)U;HDhJ>Q6wG9Em0SFOrkFgppNt)-y zl7O=SaTw2jYVT8^=fXiy)`NCrp)$&GvF@BrKNj#tDoDaziW}1{M&=&Vj09{Yz!*wZ zMHNn*JfT+KnyfYO^YX)m4ecN_C|BW|= zK5+#)g#`VEl&DJi;w+-uMe)rC+$Sj3f$%`w$V|hLvb*T-?!qP(nN5hty?gg?yYRL$ z=rG2)Y5gW-NSxBk(@P&DT4%oJ)bx%oowWJDNZ>&vARY}a%7TM~HI~hBHY%xd_G(5s z+Cj1w#CTLnBdB{-TvS@JN>)0i83|YtAo2b6E7$SX&)z~yTMJrWXvIq}zJ%|7?|bO& z>rpaPIl_^RV{ z+OAmM1K7F-PJi(oscI9CH}mpwPvVxrL4jy!Xi&N?y0M5(B@@ufRhe4W%IeMDd1uyf z%<~g00a@S;iM6O@t7IW&&t{aP9i>ZTBL6I9X~#pEu9uhuXf;+;RN&;9lgN`8A;|!G zBq5)bFw%uMpRReXjOTJsGKY`_kKg#l8#r+A03yR9rLsl?e)`jY$AwE51f;VX=_zUW zqpug99;(Fa&XW5$LmP+>hx0%DA8?VhjukQqMJ6TU>Xobb@Z%3bz|HQRyRmltS_Fg! zz~9dwS*un}ikZ&Pt@+qUU`a~AC`UWoHo8^$H_@2xX!CaBbMxYfl>n{Ay!k&BMal&+ceAsj69N7K2#p9e%5v(> zG4B^$0{Z)q`E<D|qzX(q+dO8tI|vE~Hho zoEz&Wvav8Xa}+mi*rYDYnXZ{*iutm&)wNm*jg>$G#pOw0Lh0R71@bVq9U|bFm%jFr z#sq_e)08W-CLsh^-PkS~aQeU_ho@6rGa62wfg7uFNSvG$a>u_ouB^WFQ_p9n^EaOx2|Tm}WT3KI59ijgLiW>-=Z8Ly zbg;ZHN zo}O-Z{=~0JuB2GoxM3sy{(t*>^h?Ubnl)>*;I?gQ$JBFUtfi>12><>+{~fmrZX+T* zLTi(*T(uHpt$FwTcNG2mCcfU~F|b^FB-U8&)7ml$c(ySa~e%S(71q1}3Lh>K;&YVHK$kj_~Iz zmGv~HIx}3j2)|v3qrdtE&IzyT*;6N!Xq<@D^&8hCJvALf)H=C3q2Ou(E}XxBn(7*5 z`zbCi#<|nyK*Vaaq>>oKs>sr`MU?=(N+q(;JA3LZDoQI13BaOC_YrqS>yf!RF76~B zpE?yi;*(hdha*UZ{G7BzxTp{>;<9d3kO5MnYrf4{(4>KZftmz;QTdQ7* zox67;ASgf;K7>~DcHMbFN*Gn(z{crDHW{2xPAL})?<#XmaCoq!E4rXtSa(jHJc$#(`vB|f>hU{K zdOs1in=%19xrhatBeBCz2Yc|QtM{bCc!;vha&$wu^C0@g<-2S5F3>7<7%8f2AS zBa=v@xcDPwV(}OEYi~yf&WH>3fP5ZkV?A<7k|N4AMX-8TMB#PFcKrkWC@LvZ@C|b_ z4?K53%3DPtDJe1mh@#`t}@TW_kV) z_i3(OtqETzjb$D`n@bjReQ!;y3gi%XiS>T2{g&PLGES;1tC5qN0}^|$Sg``DB-y^F zrw1p$IEgc7&w$iz&%f|Iwn+60rdwRRa1p1@p3?YVO>K>)b@X=k;?m{I7?jvdPiQCx zS{mUbaa?yPKI|=YZ@mJ3IyF3q&j!2jP4~&J&_J=;*GoL|iX8ve?OUi5+Bk<%N2R!H z5ayjeDW0s#Z(R5m_@=kF7Y%g{3JfB}S5R<}$$MOO1N8B@AbK+F-HdXyqlBp(l_7`L zkp1ta9k0axT~k*4Q+KpjGkpCdwxQu6oI7_8KltxIP!jT2UVcSEIJCy70DtqF-@x0; z8?kY*$j;7ISLTL|8&FbKg6isOoH%g;IXOA#>FQA;fK5_nYU8HOxRHBZ`aP@l@K{M> zP>$m$it>wrVYMEEY^+Cr8LY33xZ+q}Cn~F}P+U@qU6P0SH-GgvC@L;Opn!CWi;C6t z9T^n~Cl@EB^vcW4$0r|stjc-AmJN92l~*+0{v_T^6OUeHfI~3nu*&1Vi*G-I%L|4sOkw)oLX&?ntEQj-5O3 z!t*a6Ix1RGzAOYwImXAwBOxvUp`pR@9FOS8X!Q5?Yr$easkE_v#}15Utwf0vmn4&0 zoPciLbn?Kkl+L<%;v@=-?qK)s-PpNfC(268@QYvm0!NMvF)y_(dEr4(r`GG4@o<$9X5p?NbQ0SR`ZhA`&>Lx(Akc{)2Hx`ETdy2&dB|9@^erru}r#m*KJsbh^PpSjnb7$WOj$d zMib%_^n0s6^K2xr7!nvu=NON}(<3KJ(q7FdM>|NClRDEl93@UOEPR!8m6@s>vkRIF z3T?I{<^ih*R6t zf`Z;IWC*R?>+U}MdZHzW_4uD${qO^cPhP4hLu*Sbf&+uGDsvV5eEpD+BnnVcH>?RO zRcPm46rj+C4I8jptXo#@FwIC{F(tscv_~q|^bhurGmhDg*u^}Op^sZ!X{bK3{ z<3ye9oyvvTEetu{zLR0|*5>AU41mK0#K^#i(y4J#@uW5u#*XxeoIp5J`6$|1tVQM+ z(rRQ8?XaLQb-fl86rioG4Zh+k{nne`LTo}TT!fA3^odg_D=Wjj+Iw(wa|6d9^Ca20 zFWGjAg(RRzfI8=8G57qaP{i3-k1p~$N%ng^J{IZ1)tW5eAa6Gh?A^6jDgHCE|*$my{B^ zd(+a>G#*OBzq+DI%$4MQVH%0;rlz=j5$pY+7;T_aV?(VAeRqD=P zU^nyL+$hI+i)vvTDxgH-G;W@5I$?PV5rAp4OTbOIMakpo?(L4qn6awzv+uFYzZHek zDe=4WXV2sFW1oXnI1WghaNE{xl3y5rb?dXSK6|||;gq4XyHgcqQ*#sIV&aq}yrR4U zO-)Vk^6*kJ3g$xcL8VL21}7ULSJ|56ac*P)ha`@}c;iG9Yu>H40j{!QACUNGk)TvR z`t&0-);B8Yz`FJ81n?88#b=$xs-?mtzbZd-73zbCnI zfz{U1uE@_1|L`IF1N;#g8j1C5*TYMS7spG?@8EL>QP)tX)+6IFbe|Fs!?IS5&5fD{ zlD#Hdc~?uzN^#@H4KN>ZYU`H|z7TQWbQr=W2bak>hqf-XeR3FuQU#$*06>ESQoTct z!-B`|^2~aUrNyOEWVv4BjeGX&L1tDa$d+T8k-%a}fWSu9JI!8~jf%<&4KEB1jg@^{ ztYg^rW0a$FhM~< z>T>25j4|$ic0Z!yV^CF9sS3^A&0UeCzxvg$(A3tXO6o7a_m^7rBTVQs3^>T4=4eylu03H0clv7W2(E^%BAHY=!#`U7;>vJ z=drM$5I<}DnF7ODkeGz-j^f4eknIjRdti%rHXP-()f|P_Hb~-;Q~ez7qDWtJ^}^0! z@q+Y8%(A8pj2AVE=2ZHL9&tLo-sv&Z9LsQ6>wA7UZ~^H z+tXWtPE?u|oo)C;(k$X#+_AS?VwK}=R7*`xRgUaCOq6D*Jghb-WBaa`Gg`K7z~(nz z$I4Axm5AKk(_KM7)^_IENMJD~K%--5bVxiP^npw_QWxiFMma8y94GZ+xl>uPiUiHN zg0^OzNn4sXMgr4IfNs!gVXh(KlqJuSQxqy!Z$P{QC@D7ipDV*eo(I%@AVV1LIDVkL$+*Hok5 z%YQ?z&Zvk8#;u)O5GHjU*Gb|(0ad0M3D{EtI=7OJbFP892q$5b<01%grY^|t!aw6) znn^)%8m@37uzxs6ry08K|lc8_kx`}sx{Vs0Zx~0`G)~;TQ z-TU@v{E>*hmtT4rn>KC2o#H$A_>+%uR!GO0ciY_3jHcExnz_ctMx2q@;dOaj?(e~$ zx_Beo*&TGD&enP*-?DV$8aVvPH<2aC!KjFEAw&0^Z5Q*Mk-(x!fb;32m{W~%T(n#E z<&HSX5mcdp<0m^S;mg7?pUf%&Ceas5ZsEmC7ZDm6DwQ=hVt85d#9E;kYEJd1G%q8s$uW zE{|L2!2c@<)6EX95{I1m^txo<{OBmGTel9W$%&ITq&v60y zk^sj^P)Lw6;E+nr&)*O0*R6+}hnw!|BE^W)($etS>#rd!B1{=;T%BB{?qZ!L`Nzk{ zgBB*oVOK{NYHDiGF8PwI@yNcTqoa|vDocp~3JMEQTU#rIV_ncDZqd#Wi79r85|)MC zOwF%<2yy4m;q2xOhzbjVw~vo*O2t@SR*vJxkK>M{cdW}^ho_%;S}og|`ZAvz2`p3s z1A_y~`sC&!;4r~;*sB@kXb;JX4rHv6%CV!9)!Q4iRFH?4Vac(FxR+y}0RaJcO5%oO zpdm8|3kNfv$VTu@d_p`99Xf;!8#f~NW)7}hz9zL63-Qi-@8IcuPpdMeg?Q!q6}2u& z7w78gs->=oe%&RgQpPINR;DQ(SGzEdL`a%PQkf`90XxjrNM{jS--?Q(N0GBS3){1^ zb#s>1VsYdT{_p{A=HEnBb=6qiNn!G#l}fSzf{fIYBD&X8T(SPX{#s>Zw&R)aj07kF zF21U3t8wMZ6^+HGB&Eo2<32!av87~`<6=v6ygzbVGI-qG(+yTnCzHHUj&lo}KLD!{ zeDb7P+f;x7f&TiCVe};c0#iIf!$MVQ28-gXEw9Cq&yPsa1EXefK3|zl-2?05|2o$SOk0*zetPb=`+K01Pn=XS$RUzApSuu>Fe-*cIND@tmnM){D&jTD7^CQYH2 zrqjMvLryq$-N6 zNYEp0)hiMb$cYHV-k4adDy{%J?$ge>iNaph+z!WUH*ijf352r_Uz|9B8iWajTVFBvKFM9yPM_% z>jpFYM>dqY+B&s>nWLGyA{7aV3C0~egS?jO#|$qdB`0Cu-hF6pZq`hI!9k-Om(=~X z@*KHBc5s%Ev8%WT%}RI9d)U|Chr1PbkzbIH&6_rhsUW-9FQhQ%`7D(UsAyPdI5BYy zIm-9+TExW0;N@3dMp{N1KKc9;eEiYJ3fLiez~ImrNQ_lG9A%tliHgc_3qYxW$9~+` zhF?g94x(7S8XE9PVG(?#$nhJVuJGt4Mfq5B7FVlB#XVG)m7q{a(UaohbU|2AQK6m_ zdP`XSg9?qL=%l`T{@LddA0Myo^4Pdo&Ci?*&8o4}%UAHuZ{ATd_16x)hF60RNz7Cf zw`ot51n6O4r6b1A$AFKrs1rJBo-*UMQ@3aR$H1^aq&uafLP*1}U%jp=AaqN% zcD16rvs-&`6IW%TDAQKSgZ#gGTX9UDJIDL(?&`#a>sK)p6pZzvI9JidJ3b%rWu}u9 zLl#B)c5n#Nv(}(U@-HhZE0q&AGb2-DLU)SpfTgt7X064c*A5{yJym}fjLXxSoU1X` zRC})$1-A-73cQU1Lh6-xDQMN2_QXkmu2eqA3}w$?wNZ|C8d{v}Wv(|2IrEgSr5IgZ zT(t}m^O&Bb#zjhhAk zZFA27Q+I!&-dls+aa3$Zk(u@WNfAQ3)L^`L=>nL{&lq)DYMRE?sMw}jgbS4kEi~pf z63jq{Mr&&;GK47n)TvXrTPhVhdOFc31(Aou9UCV|(<%Yx^oc9fYE)o71O0ecKFD_R z##T{~R+H|qR_Z^NH?-hCYVS!*CV8LJoAHZQim)-NgN3MMgzM3i!y+ItBCmq)CAK@&5YEZdY%Vqa8$RP3+`W zC8CN}(WAJTcDR&B)}_iwj;18-PvAmgNMe9Y;x8;LL``LlqD*_bd$4j+5mx{6z)Fu=Lf+l`E08GE0fckDoY>n-b&o3=Bd5j#&#h z<1RUgrIM%ku5hx(x%wkYs(VS%+{!!10<&DCjcHczMo5>&eos#ZfQ$^VF70c!;rHi z@1ix)lgpA1RhCcSgujrRXDui=nOjKTh3vo7we6baBLP2!J!{{C}blAe#mRZV-cB`{%V$T+g*40}mr_9dIW zj`{@j%bRF{O6+|Tmy0+lC+4#8!8({vQez?GY+;&-6U9Ocl8WqJ-931F`+y~&QqoeC zM8aBlEkrg1<`DQorAI#2lDj2iC9tHEuI?_-LZx+CCaD-yrbLHwkwRt0*l%BNpT-VZ zBeGQP%?~8a;|I>J605v#&60~XwyX+uRn_QE4!mW^9=&ilwo zUl$aDnk4-HNvmeU)C+eHcLaw7D-eh27A2A*@!7G@G#8L#DkVh}BrV7VxL7I6xVSN@ zIVwq3`d~E<+eWL5sTKoWq7>!NYE+VK9c^&vbkNicas&?xxy4mkxZED<$2I}t*f!sm zPPl*gNA#`}&Q($Jp&_9tzFVxWVj@m!zR1_+?bgJElXBXVs$V zqeaQMANy%(ZUJ*mt;TJv?X1t(ce%Xz!9WMrN_i`yRjuYA3f-~jE*#_-D_5^le%Ff1 z3I+WX3h(Qt=1nLsFW2KRw~>VEcJ67Qn#^Umi`sa?+SR$v>GV~ZSq9LM}`}gsS5N96dqF-xOzxg zDX}1%B+hqExh5-Aaqif;LoLs#MxJQ<9&RT!Ab`LJ^zK589{0AI7_#FBN`?YF2*>FDn^izEJ z#}74;KQSQ@%!3^49aMmhx3@RK!oxuKvUS|4*I?co32z%>_$YcV8cGqM+>JJW|H z0Zwv?Ruu)wXY+%%Bs23fCt(7Z2IY^9AgMa?7{|#5KUB#YVdlYEno9R1dXhP0(*Av zMZF~Dzjyp7!Ww&!BFcKAiDGxZSqM)lgLUA!1EP4dbfLq(|LOn!Cor`mMbNBoy!HlS zg|qc%Z~Y7`o3&xX2E6i$AYHShl$HVBOo-FGm@EO#qa2sSB#foW-46py-tyt!8Rhu! zGW>E6VkNTb09WU%%0V7LCRJ4k z0)mu>l*-UW6qb)zSMFk2Ik`HGxguqpQAV`7NIK4ERV>qZDLNztqr6mNe3GU?UeY~J z?ZI;got(YZfIagl^+)*BrcB^rObO$R8%yf92p|;^7fLrXb@T?7I{O4?bX5F z$;weabF6QH!-pTjD=k$kCy>pAyslo7xKGNs-Me-x7cA3O4j(y;($Z1|2<_Ru$NUhC z1ZI=~QS9`TuyA*EO*LYoV`RMBPleg9=NT{Y$@qdUFQP76J6lm(SF1|WD973FJ*^ey zziryM384|8Po#3ByC^L=4Z{bA5fT)lii@C@VnLWDBqwTdV~!&#K`OH7*l6tCw^tQv zqI}Pk5cNinD@a=7okA+k*dG^Zbk~yLov!P!urPI}G9U5O*;5MC;i{bUeLN3Z@l=pj zWBo-c?BPMFt0xq3MH0I_I^2i7BVGs-;Lk+s>Bq>~3mAQ^9L{3>(tVqpn2bX&A3{!k z4&q|s6a`CKI0AuurN}ZD13Vww<4yEuUKk081n5yAuu$|7h|$GCv;BI%Wa~hVj{qWu2U+vF>c7o zVjv(XCMsH~-n{+2Q7i6A7R+vIZ$n#ao2Gg&G2dz)o*qiW*4)yJp<6>*xgszmP_0PH zk&2M@@80{(d%EK0e(WbdHy?R7@-+T;^7Kh9Qam&=qzadH9toVGa_p7ZqSd%~3Gxp@ zUw0qw$$7O(8c3mdweASFYN(UM3T-@G4y831`nMlrSgcexu|$Jt4QHg{%C##vdFrI* zKhnMW{qKKYW31b@ZAZMIYI)yHGZL6i0(AFlwHf(+kOq-}$5Ht$*{d1lXb;KCBtcga zU8}(X!HA8HH6^R&Dd*)nITBGy+B7D|Gq*4^D-#)+8Nv}NmY&sQ+%SjBKQKV5VEAcX zBVDCTsUToxLDtX-qZk=yk3^x@XcTUzwE zyt14hDZq!x|A#+6tmz?{t1>m#$a;$eLQy$ds8uR*ZL-*-qAV&aQcnnpz=!4d`7&X> z=Q5&%5Xz z>5m=M{BI<1UjkH)3CRiAy?eKkRme(CejBD_)qM#qfme#M#x6#u#hl#CWvwz_gr$^FzKGFW5yMkn!)%VKO?IQV|MQD z?i1HT%i6=$1MxBO$Xb=9N&9rOx=W2jHvL{=l;L6Fny$fW8MIufRO=h-m7#`pAhS1Q zYrh{#oUpNJEC+HzDOyL9@k|AM@zO=OIJ%%ys&z<57!nJ(N>V{8WEJn<*kx_4&(4Be zb^5RW1EU+)0&ji;0aD9xW!g%$PKi{F43C7b5Ud*j&Lpv!H?v59q!NKafn$qG`Q40& zcf(%ISdMm(EMr0ZV{-Gr(16As?Qj^=h$tl%0dDPRMSE8}y864&KhiJiaGZNr zu7%2su2!N#)uk*$$jQSAkwUbsFEY#}`IMc)uWG9}X%XKL zYxYw)W~$UKbsw@Z9|e%+P}d5azY0jYNXB1o#rOa2e~~=LCPaipAT}}9EE;VEZC=ky z0vvyuf2$t&@s;Jg_FULTMma7_Uh~?Tla&5hK^V>#Hgm?jIx!n9D+#zuY%nux72bIL z4RrN%Vf*&&2$Fn3uAwG1d9RAm=0jSL{F|=P)kHG!h^PofM^7l$@r`MfQTe_2!iyLl z7}j`ULra4eN8Y=CFCro%qzXqBO7E7c+tl)KSPGEmLW`C3Z&dCzH8twywa#Tk05$cE z4LB<7K8M_$k=!+whGTut=h2QH3=7$~kDv`#X061i0D1^mTL{ySZGYzVlPdvhZe{pk zrr*S3NyjM1#ge2=KWa6~d*Lh5hy?MF(B|z8unzgGXQ9nWB(LR1Y@bs{W zH$H?2sKC@UIlcZ=%P&1M9e?KcXG#>nGF4Q{^$qoS>lbg~R{kxVJ9kcNNsuY1C37pH!m}sMb&#HEALekkwa1do^+Z>oCQdlfjWE~s> z10_Fm=4prhF$Icg zvLD68#W;QHG_K`dQ+FzXI;4?XnYvPQC7CkP+1-hvJ4I?Ol7N6#qt$3Vl0bk=C9JwJ zoRNXh(kiS0tFl8YaPrw#@_WB@>%>xYyLJ^$-oK7wL(mi)$1H#ayuvlq_a z`4hwn%g?h1pG9&?5~3rbmCKc68uM+OFiBn>8x@O``<|x1%p8-*dvW;%p)j#&z*tQW4fAMEZ4L=^N-XN~rOT+Os=$`bTd-Qtor=PoV?Xot zeF=1Rb)i;Vm!y*;cWF&s4UQZ=BBbR$=;`m#iYEl9L`Oy=HCYM|d--ZYb&$mW$ks!y zQvz*fYK%=*R#hr;_1f(Ml*$U;B{me!Zr<2j)c_Y^#+gskpF@~G9Nu^Z4&VDO5EG-j zaYAB!Nj@I5k-$DJBMmFkR_Nl&N>6#v{>*-lmjo<8j=j&yC`UU=m|z@&asAXl3lRe2r4Q;k z;C^OdH6hkz^MZy4@2x)6;;`SuI@=gtHUj-BE<|sl+&pyy&~h|wP6<$13=R(}GLpG& z%em3zStH6NHzybUQpI9LY6_C&K_(iGod<2K)wprvMkO34=PKiM%v~f)4%u_)8fDSp z6Q@oHQ%#Fh`zS_qbhK9OAOOeL$5+Z?xoe3va=+Qgu^ekF?5) z3yV-CAe-ajhP^DHpa1OQgAGzi3F_ql=U3P#>Gsd?BOriD94AF;g@>g4J3mDpYP}6d}%ZD z!4wH_HR$H-1`l_MU(FM`Kc$N$^LC(b09UVE#gG2=M;hBZc;F!3_{JMZOi6sGQeDhL z%wCtRaYWL^aSSq++uqiWJCaJl?-|F72#wJCju$UpRAoqOjg}fYPZQ!3K;&v(ULLx8 zyC=z%u3A2Rwe1hjGQo{a8=(PH_o-{qC=E=Ij}D ziTeJXuPR4=Z`-J($yLij%sg*De?L{~96zQle+h7I<)6KqQI2+yuw^wWAV< z*DfPN5T*$U35bb}QGiZmb){N?R5)bDq2grnJ%Kr-qFYE~CStsUBNCikMMcis9GEkC z@hV1t{SF+2kerS8yIbT?Ra2$bEM38@48oZG)Xr$J=H=$${XQ369HKInsr>N>U6WWm4y4?-%F~ zKT#5kjjZHk5*8MUJ$v`SKfqtBdr%p(N(Ygt+qZ7l5WK5uvc?_mHZ2BeuP3p}sNTxFEw zeGxCKSDX__d3fpSC6ttvD8S6wj@SgF9PKoG_`{|Pt3%-Jr0n7ZWR&B~!ln|i{xpxt z#x*zdUQ7R*=@cW!O0@u1hybPgm30?GLqi`pHG%9f;Su2~EGpbKp?-^riovadTS^;8 zW}JJq_a?F7EL5_LH*OWh=q<|l)KD+}yW((^4O(>WNzD8_$x;OFCq$goJG9OsZTtw#Fe z97ZHJbZ|_5whD8O-IwOqw))5>#L6@U<|yVC=pV$$=f`m?CfS-by9)w7N*ViT~E(HZQ!5mNK zgRV$jq3&6pnrV-h1Q=_Mj)}&WEn7g8HOK3aLdYU#@M;wb_Q!(lYdPc7t?oQE^dVL1g~mnE;=ZlBA#$#taEQ=ohkX#^D~O zQR!Y2H|EJNPO5^m7I3t@*f-;iJU0S$=-Oora6XMXzJU)>jAK)k^dZ2Bi6;G4OMS_A zgkT`S%N45zKT^|-J8!>@8vK-}~LL)*E>>rG@ z)HHbccqv+yysR9*3=1&EGhgd*uJwDL)Qvn|bO#v@E{GbHdXF~9Z6{HbJ48YL7JcXo ziI5UnSxShmitIrzczi$7=#`h1Yy8$tDu5)fNJel_uqsL_$2MX7p&Ps8Zi%LlbaZs8 z2V=R8y@wR%SHHW=qspQsp1HB{VZTY$C`UWoZcg<4V_E`NHbcL9*h|-Dx#ii_R|2%2-1M)!Ndk6m!=1 z5Aw|8wzqa@9%DyWhgzmz|N7UlZp}JLA@S4m$XZEX=POwu#LIPfR_6206XCZTSCc?wR%p!J9!G84{kVJ#*WAq7V=Dxljb|_-lK|#2v{n|#P~#I z&|w^sh*k2YT7W3JUFX|)uUIN7Fenh+-QAkLM8(eEf|Zg%mu;CW8hv}I3-wh29o!X6g{}@R?%??>;$*r|}Gs@AH31oJUAt2=?vY2PWtBQssFt4wSVf3t6kOP;#dP$4?yBa6(i>6q1vZ^)-tuw|91;IwB0sE*|i2p3K|o z*3yZv!=Ir;(mG0tizWB6Qx^qvGyC}Z=rMRLbcd2BmW7);#SOZ7^JZ+@xozCdHd!jP z7B_F)jA4m$GPcTdA?nd;jPoWWCg`=QA{IHB_IOLcl&pHZ@6Wu>jwP%3(Dn#cI`cXy zv(Z;70ir>J1A>u}nt`;mH0;>EL*ePRRx&4PDuZ-MZ(zLIvb^SV;;i&>^2AA19%(6Q z*tut?#xmIlt?|Uv76jI#SLFnq( zD94bH5PajCZ{lk&d`%Z!blp=9wv7u1%iCl7xq1EgNkBaj;&IT0jNCPQnvj!6$>S%B zC3{Bta}#%}0&?gB82i00+3PVUzBm#Hl9UCyGg&!sg__^L^K)%iQ2F}6QSpFCUx!D z+=2d2K0}dEFBaXaRSs1aVP3ysJ;Fl6z!)JFJ@baC2m^{1(#41jVW!LxW@KAar$p`^|4_9P+K7zlBq0PmQ^0#gTI5+EpA8 z_vm^dAo$ME0MeZAD{g1`ouqdUVVhGwYDF13iQ=a6rmNZ0!&5B=D#oqbw(9AzHs$Fv zr}4oDLLVo}lB_92JDawACBS)=U`GSUS%UX?Y(*mhe*xn-vSbz8B20i|9hv`^vIJ-i z5^Tc9Vm2x>7B4OCt=YU5QRv0agA)9>F9w}QI6K( z_#7?2nQ!<6!f*Eu^hwNcSmLKUckj}a6I!>FVRURX4*DO|@>;$9z4-W(k8$?gS!~*} z2~YVx1uyT1%L&yBG5+y_-6P^{xvC-nIjy1O14Kih{4d zk6sJUzfXWfgJPvJ2Dx|7Ua;@mcW&d|ci+_n@pbFg!CzddQx^uda0&2!;t0RH&sKXsI#9f+$vJNflw5hP$gfe7t;=gq*Z#R0wom zK5V0l_2kKu%DVHNzxWRJ?c0aynrhs>eOtjaOxYm_hAcWolCM@cDsI#%Ict6mZSa;d zTFzg81(KjRmJ>Oyj`~%c#K6>OR282zhva%9;pOS?_eB6W# zrn@f6rR;7QE?&F{f|*h?(j;|e3s_szD9Gs~_SJsIxs<6!^g!6V*;P5x)x*K3pcLk& zNTasr1zOKjKhyW}Bjrk%57}_ZwTYFD0pu*Xd$*KNn5CRZD4+{5{psBQ@pMT7{`s@# zaXsg{mii$p4goA{*RE9sLJr`@rbbN4%zr>(Q1RB**W%3CGYF3gM|?s&+B@2nD>Wo2 z1SzR0=7!b!4qCKMu3ATPUnI`IEvdB;!?F5tvoW`eDv{0V7$@S z&lfQ zzj_I9ZlyjMk_8okWA;=Kc2kc1ef?;ZQZ;n1bPH!93;tTBFxd_GS}iKQJh|ZU&-gii zxOZN;hPEUA@xAQK{?@S7mrexB`RL zZdfbGPY(g+4B=k=J$21ml{y~ge5u6BD$DTR`|pW6)EA8njat0;nf=dT&z?O(_FbTK zcFm%Y^ZeaVA%;N4R1Ui0N{s&Q_i)&}338HpI_<(JbX5R7r%s*{$2D3+kg6Pq^(R_vhEF{sm4|}6PIdU%pw8u zdD10Dz=oTFYG3Q1OE?>H=3r`;(A2hWzDTz71qZiXRz;{v_$@=W| zk}H@#0qUXb`CHcC>nz8b=_^v=-M)2uOwq{iJux8>G4V0TTAPK2rUp$PahLo^PeHc! z$HW3hP6I*&Fwul8eB{_kjC^(&&M&_N30Ml(Y>lE*$#}z5nCA{YheL-BDGgt5U$0hc zAZm5zj-8+t=;rD+(cN?}nDe-8>o$10c;cRrqm#CfIjHKjnr;X4*;guoN2M5fk#oHET?uq_hOA&YhT)sL8ox$LC6o%8?gpHOtM~(9j@7Pj6uK+9;lR<{6|(3}C6P z;wG+3R`3(-IQK8rx@7Y_MFL#4=UmT0RZW$$tFCPwe3Qf zs8})sF}0-VR+0X$nG5;aq1O={7lYxOg>bS}j?$~cy%zNT^k=A+w2ojQP4JR*j|&A8nr^1@b4J77n9W@Ha->yq+&M* zBK`ZkFb4fOSjR4IOiAi%xz_sndK^D`Tz;$)kQdIxrQC!cM_27j`5GSCxy#~#RA7Ys z=jP_Bry(UJW!fCQM|Mt2;6Pl6s&&nI!lvo(NvuOhS4U0ACu()~?%hJH9U%(DMe{3l zKiQ|hzaM!b^LKyqF7B4xRq}x64?d6loB613sDCKsXmd(hV43M7MYoGEFgO4v_wU%Y z9ea1~LYufjPx*P_fc#>DCA2cp^qQujl>y)|#31=FM8Orq=2=T~%FOuIh3qmvh1-lXFf2B!Pq^ z6aWQKL_&aOfA-}ku4E(x=*kH05to~O_ZQCZoU_w+f46-8t6xd%>eVuP@+8Swn4>(g z!v$)(N&249OURHAt>!V#Ksbr;l zL#0udjpD83U`0m{(*ZqE{Qd4F{BHk_XFWI3lo3jIC>d!dUwYd z^ejY_Qo2^JRVXxOZ3}$we*SE2rHTZIP2%~rTBJ8BJkkIplw_jP1VV2}=n$DZf1V8X zS6)?pKSL?oQd3inZ?$V@f%c^MF=e!vqs&2sBKwOR8Y%vl{7sm-IeNP8qF3*Ufnv2a zD8DMg1x!I*U7Zw{T$I5ourKR;uM9dP(Kqf=F5ca1RO@ZYR4e#{%aw9L1^iUyZ=Izi z00{~4Ruq}dhQ|^t$%?1F{0V%J%{E94JzT8z(t()I?KlWS?uqF@_9=L!U9Yhcw11+Z!M8_Hc z-VO0DEEZ9b_ZNFNFvN(40?zx?7$b9=@Njj<$tVtG);g@%V(0pJNr1fHTwDncnDBEl%w=o!2=B>K1A zY7?l|pn8KPCnYIG&gGqx1BVVsgOYv|lLP}mA>`Zj>Ic!|_C@3P?5nD(N;YrZEY;Vl zH9zw?3Doe*!HO#~;^0XM)9{Pa{B&F-H@1o*apYsgG91>LjAKWSk%{9cDh=NxMc-yg zkaDZ?pg!Z)@3+cWEf<%Trm{N|a9>h0y?b>Ch zGj{Y?S-4=KS2#L1r=Oo$SDimkAKD|9BPY#5=Lk1nXsmSL0_Q$<^q6uko-m$82Cc;( zb$hH$wt*UIpa;Xbd9?n@$FYMA@c&E@st$omo&~$VCcr@KHo_C7Wu>xh=Qab}&|g@4 zB*Rl_BQqq^EVIA>W#SpGKsZ7eIv;7grfk+(MT=fMf6)pkk5i$Vl9D2`XU&#<2lrV@ z$KC^bB{U?|JUj@~|a z#4Hh(4{8D0ha)pa%FG!vt?wWm@DF(WT+jy{*ZY0D5uzdAUDV2;d-r>BNx*TH*+BOnWIoxe|f=6 zJ>E(bNf!U9Q>Tik5Gg4uk%s05Q$E{nDiXCz|2cw@onl4eI(`5B_hpA7L2*Yuzxa89 zQ6@Gq)_`*)@e_xn$TA8ZW0&9cbu+6~Jq4g=Ve0V<@|VCtzH+_greq8Xkwks%G+1+{ zXo2K;(OQ^UV}7?=n&r}^ONNN&++KVAHM0&Oa-TVErny@a;uAU)ZTcWmD{@SqKHaXx z@~Ab|_@EZ1)lrr_zr<2T*hiLHsUeE|^|l|c2UsJZ=Ja&CH~KtzB%N2d$wnlPkm{?| zhGac{?6_*Pnq#B``_9cfh8{~yOf*61$y4dieFMnhuj^vfpXV^pj)g0ln1Z8V47Bs_ zkMqUj0zxw>E=fvOm&mEJr=+T;N}zyCNmVXY_0)9Nh~=MAW*O=?<`?G6po@d7vPF)9 zT%LdKd6_yUadS&G>SR{ZlTU1vBzq?hQ^x>vQ6*)Y(F3Q>%j0% zhfP%r`9H@dNcr2pkZNBa*|_05191J@@BhupQT_bQpUa!;-jwHZ7U_FmE7ip@oQ7~C z*7-1C8ny+56Q88`2NvZX`qnv)_t|qjz`Ef4xsKwQvB|#sML04*)6&u`2C#DFN)vz< zcTjpY23))HDv}48tZo%w|9&|o&)vPdd*%ij(Sb6^)5}auZ|k`SScm~I@i3*L=gptp zZ*?dUf=Eo!a#YGdlRYk5TH9JR%^_H=n(h(al%*nmhLwiZMZ@YMVIJ0*vP)$KghH9a zvLeKRm3rgm4Y{SY7MZh;(j0+g_fyP(soGWf*-X;K}OqewaDr_Arhm< zcUpiRe(H@D8J(FX`6^V8D}YF+nWbnnH#S@D=CHV7W)1T>*Wr}o!mWx@VV1D7!(Ki! zcd>H4?Fr}sy|06O)#5jY1~=JrtzYgq+7?`eQA49F@fSC$<3@9ynS>23G#0Y@8T@v?^^eZBp4|GsknlsUt^>P@qHj|UIRo;`aMxN^PY zC(Osvl2WzAHX2&E=30&Am!hzS1cr!jv#-?Ms(U0r4)Ym+6;y73a7fW|VwgO09z&ys z%FNj_%~ibNyA85w(1c02Ts}nBLZN4PRa#nJDy>=#1BNGvJ08{ZK^`W@ z;`azG_x&(Guw26&H{dYx2Us*pyF^+ZK^h2w*60Iq2Fh5JFr?*Vf)aMl zvTEfjNlQtSU}dNw9b(VEJ%%9VevoWUGmEpE(;;jE;7+kr<{@gk-TB_JpPQg)@6&9- zE4nCu_|qTEy8=Nu1Q3YXQe6yp`QDUO`Z~hRdh}5tmsoaLUe~$R_7DF_hUoi23Y>9o zxN`ACt$lf|@yS}{jrab;1U=Mv(C4{ZvF^Y1zJ79hz(?ba0l@)QZq4v2YE62o^@}8e zfdkhf6AZ}s+O=zCcAFSdjYTZRA=<%esKZdI*tmD5>U9oN`~xh-S>c5 z8>&CB&|*zsW!Puk|HS)EFM5D+SXogi8#iv0&%gX!E?>Fq3T3EfIx2mXagZh@CaGtm zQOYXI%xXMv@PO5Rbl-hX_X4XCrIx>z_7<}ad)nT8zpM>4H8n=jh7fgcZR!R-7#6Go zQe^cFw{LVa-?}DgS1P)5YVEe_f;mOOe9@^Y@PdMDL%=ubY3Y_Ch5)X)USnmfa37PV z;%x)32MD*Nr>DsREnx<85l*I?>Sp&;^QdrSu=4<|7O50hxK2US1?d3h;oiDV4EOH_ z+-se@hPKq3M|Fwdkl?4rBKFk1KuHQwCYGtHJVixENlHp;CpVd=jysU|Yqe6*oN;Rs zPt>?x*T%de>Ho~RGg4GsWELUYzf-{Q65dn|Ic@ZHdo;8bzS=s_7vKn_wB< z^11Z`w`p(ofdIc>v+&Evk>WQZMP&C8g{7*C*J&+n(z&L#=i~!r4x(EHALC=v9KU0f0#U^`(4zN z@EImQZYCZqVnz_{b**-PYqYzdD0PaOtx$^^tCv`7P;h5u-TA%u`3dU* z9dCqOAdm4e#HtP^4>gYoMC>l8IO4Sl4+%E~Bt9-)MlKj>wGpvE0qwx8 z3h;r(Tm)sxZ*ZN00!7*F&f2pdJ>WkC68j^)10mdSy}{hLSOQLi`fjw=mRvAzzQibx zYKc?CDUdo&D;a<4)i;DlMtEIUavI(VN6VnDfwK7xAjjCa36RW zc#oUvq2>|c$hlgAuWD*k*d~qyyMIh-bg})l zTU>-Rbuw8zwZD$*JW~H4f77N z4LCV_%!8HpX>f^@ke3cq5bV#VJ z4Q=WoruzEpax^zrw&?kcYP%sXDQ#Ggn;?o%t2O+#rvKc&DeVUji_c&E zRBkI8{%XZ#$vu&4vBqpIm_9Ny(-5k7aOxZD<wOirr%Y;#8rxy2GZ;a<0r_JNmFF@yxAt;Ky_lJ!PR=T>Z%l7EV5Eq09rCLGG)&E zInsKg)m)Nze*n)o2yEsoLYnyG!&s7Ri_%Q(RupGaJy-|a8>tt^j~};v4^eNzF|Ek4 zpt)Y2_YGI!cu(>VvY+XH>VcBH0+FI3X&XD%(DA=hTDkKo$X{Ojvi#!bzmVkAWIKf4 zU_Xh_iX3tAae|N@uGU{~7;w1Oii!%^v15l3oRgag^Vfv&*BhiMVx1v%!Hr1&pn+XzGV#`uGwYR%d;TH`&#g3o5UQ}OK>+z7>88u3p zRp6HC?@N^u@2a{{Z|b=tf2;I$?#WzJCUWNH$k;JsWy*}H;@68x8>~}96kHdtbtJK< z>1!unyUUq)-+HJAoOQL`oi@os$MTGDL{nAaN5NxIo0rQk8^b?ffXd2B1p?%o6$!h= z@L|Kvr31g>)6%$swEn7C{j~I(_d0st0|+lr(3x48GExzpj5#dEu7c6oWAKn*nWXN& zi4!Lp0O#Uo7vm5@{QY;A)J?=CncpNW;NnQ<(LRDtV$YI zCjtZBQgT!84twX24}9(_5WD`MT`kPp8slqIkSa5(M%}DCzI_&;b(tWvXmpwY$Yc)QoV!|XPCs~}arMbm86-n?V z$(Y)0rA4Kx3AS6!xagQ@8))P{qQPQO4&>Hx^K?cVYL$z5@Z1~7m+U?FAE^ge)B!R% z%`|KE(%`y8P~rl0#-44f+XIH7M&Z(BOQo@?(O7aeZ{IANH*U66kI~s$PEI{P#2uNl zju3O6EpJf0L6C;yj)aNkeu9zX8K6f6D5z~vhK}OsobUaf`5o@g0R35-#uPJk9{K7; zv}wGsS>30NzPBaD=RQjpF5aUjr1n?;uLQQX$qW9(TH_^2XmfqD=2Kl!-otV$+*+>B&M_CU_Q)TcF>{8D9Xn1#b!}2~ zzR2o3!koig%}mcUl5SG5_Uzpw#U;g^05}{6CZpDBmo>??IfB#uI3w#T{`_f8EYk1@O#UgXCvQAs3(mQk|m`tOD%5O@(Ms<#ieTm+vG? zw++w=KmH(4^?XI$rhY3H%YeSHx8C~arI%hZ z%MjOf*Tyx`hdjKk|9b$#gFhEi)w9RzdRV!@y(q)#wzvX+Sn9DtFLXFyvq=l?szh2IqJ=0N5!~LS2`Rx9g`)kSz z1%!O;yPbL4P0e#Gy<|zt6&fhV z-Q!S%k>`k}$Rouk#qC!E^CdSAO1wKh%K1nf2!XGY+uOW7;OQP{Xljt+(qa>4RJ({! z0f=k##EBDTwSicjHFK6#si2523M<>poHI+^q&MZz;X@W{ynOkxj2JP(s^na~a@A@* zLcR7d%}}Wg>LI#w)vQE7HWW6VJbAL6!^I01<%_SskW!8Rxi^Gk%gq)U)aEKZm9LZM zf81)4v&zBzPeGBAp~Acy+tGbDE_d>XSn>I<|0F&umWxD2iob3Vs~|!57U-vF-Kb%b zn2>0mE>QD>{dyL{?!WiG?!O)|V?)Dn0~V0ewW~m;T~I&&7hilKJGbxDVEIjR-xzVM z4t$WTR0SBSWoX7v9Pe?BpzHa0;ynTp%?9(|grg@8@)YjVDA9Cr>&nVz5#zKl`pEQsw}O8+()nhxH_*?U9tLz)LW!#$DFxy48#I} zjNZ!Mg1#tk4_k>i4?SX)8Zf>?z5NChx&&JZD zf|~-)xM3UA1$$8QE_bLaI7*pqB8w|!a8JCNfm-cj)?~T$_RpkR*Ob=!I*CvPH8Mge z%yqvs3OK_Mboj_&yT&zZ))-3{>|G&4yhIf4_v1-=jezWr)-RSLlZ#17K31I$(m8YH zSkT+z4!RIB5#Y>=iBk;P-GSR57w@TKbO=MehmHb(@#t+m_W*IJ(&ADhsRt@glKRsy z9(um&zWWwoH6nS0%%449wr|~T!VV7&WdEbbj5Z66)D4iS&^59>4dHc6*=0Wc{8JN> zFTVJqJh$jMy${#qFCTv-hc&sLR1NM0zd^|H40kES0N@DVR_!Vr*|%x>3Z!vbQ&W>1 zK5$shpF6Jr8&}?>^PT%M$`Rl^&YN7qApanHo~P#(c&%F6|M&k>umcGn_8wvAxzl^i4~3W-i#$xwc4Gw~oI=Aw&B9%{aG_*njxxHrp-LJa zT%kI>t|dLTYR${kbI;RLd-o6jAvIc!Wc3THE#?{?6>b*qO|@dn%FB$SHnt_!&WS$s z3dSCL_DBB`#mNeyo5kU|h4ld=tZ(`uKq1v=t0c@4i(^s*_yx!vKYgvibA$<>!MMSD zyXL+*^pCO^$8zLaZYz_63CrHEA3w@D|JVm*(QQ-sJ@M$mi-pF=+s(T9W1s31aePWW zQ9*+u;*7V<%uEB%u&^g2CCD3Zydm>*=9|DHzmdFSVvM9!;Y#Ju=d7VYw3^zs~%I107liLG~ zb;cugMqPj$&n>L|A{=qyq>f0H(BM$nzkk2@2l-3($ZQjaOb{j*5OUZmMrMt)7{il$ zdwPFn2t{wqvG@Ijf`l887!xi$#{%#D9tQ4~Sb@;AF&7Y0pgQS~?i#Vd{d@Nt&nHUQ zD=)ty%a$)Q%MsAaECtxGPZoQ}62fx>u{+HXOdJCXkaA(9TOsiH4MZoiu6Q zW>!YJBqS(<(A|E8y=%s-88R$(m>QyflA-`4azMT9$?XAWO>mw)d8Yj$9GOUHf(?xg z1~Eq?1PO;Lh&gY%iT)S*Ceni0CZc_nMTW6^f2tc%L1lkov zpORxtOpkI-xKvMQ=_^t|uGd|c7nZ-Ebv38TE3dp_d6W5h`S&{w6EY~i5C)L<_&C)% zIAs^9VKFWmyq?X_PJ8vfc}9AmUxXuo9GLz=$&E}O zDYItH5?FDZfqF+>AmLieFD@~z6Whl?zX!Mg`a{DR=>7DA^CyhpxlqCn4)|HfV_WcNLII zDOdk5|0){_w9<&4*2FPcy8g`8{6@`vbhhmxQ}5U35AzxOg=oRC*dOM%-fesC0oGLa zzn-^#yl?wOIO3{7BW1wMUoc;O`Sveu65~2C?NBX7CWlSB2L;+6?|S>?*GzJo=t`2@ zk&p8XE%uMn$qaZJ{l%XlBkz9pDEk{ozd>*j1H{dTC5F}K^hbBs5w0%Jc{%eWBP&C$ zT)yH;{(tX1L#EEu5>(Zyh<@_fC-U{zU%Sdd(YFXK4Yx5L5oWaN>MBKwhfDFrVxxFO zNevGTmn)T5tSSbTI@}v`6k$k+1Y!Z);NS_cOpA(&T(M&Pfg>P-0)tH8-nez6V>bxc ztc)y+_aUqy0>7+)8D1kyZ{1d2DHW2$2dSU|!uEQ2olMTkmgS925_##W97$j3HQzXXMoyMql=b@dvX+>lLQuFe_jCwH_w66! zHA(>e3Kbnng44&3u}kkyyYv8S1IiV|6|UyFh1EGims9B5w@iE{P;`_g*Xm@#Z3ai7 z1^VwEip2o;$q7X(f-5^jw`EJ{_P4?{CBP&*{kd%}ZbGw#TmRo9u#TwO81Mrp*lVFI{ zfFS{9Ia1pZVMW!BtgI{%2BS=k7X&A{;R^LT1mIEpc&ivORXYeE8=NrCHskfcIDf*d{DE%z!`?7N(8Y zl3eq2UNtCT_?grZ;**>r$wQ-Ma*GlKoINeSR^H~Rca%s(ty=ds^yY1uQFcYPg$IeB z7Cy!j?Q6lvbwb^@d;4xVdi{Ahf5MmgvJ;`=-jXIx%HR!nJU!=aR=s3j_91(b4>72$QXec91v`^ z3rUCYRe^|Wk+MsKH5SZYAYq|lk~K0*#*7^!&8^K=hczxX&b&TYa?I6MMT!IM zxsRbvU-ac0v?{bgCOm_9+m3Bk8plsrESQ)8atMsGNI-8j(1oMZce-o|pd1!`Z|hwT zuxPP3b|(yax0ivp71!$^C7CbvN`_sa)?1y1BVepaNlme^MAs|BDumD<@XVCSQw;G< zb(`R@U|F?#m7+0cs)ZS8fH%^oI1V5eM>sGx0mzZ$UteEuwHb%0FpZDXbdWdS5ON-| zh-zzVrRG|V2}J}OIg^@tSNTje%nRQe^pHR|*5~axt3uu*ZH8jtEA0 z9_P)UCnM5E*o3mliL$HIaZD^Kb3ZMND2_11`mwxCy4@=ue=zvmKX3*-h-DtmqU*lR zv+^2?>D;+I`O|xUvRL5ri=US_-g?8_pNV?E$ajb2p8|fNfTwLPsXfsIwP027 zkZwYOXOyYSx0S$L_i;)s)en@1^}qRri=Ufy=%Y$_;MoH4Iet>^Bqk|c+zqu<+bqV5 z*UG(NB&CnAL;BE z3kXDbcbi+9ZG1Qa^G7dI8oj6AQ65n;5^(L z3pR=;f`yukeri>*jk~a<&u{BCD6jxxicS`(#abXcckPs4{OlJ({1Yq4m}H6yb^bOO zQWc;~*9Ow{il&HgT&&9bS&dzPgX@)t)382qsdC> zv9=B0-O;*@*EC&Yn+o2Xc0YMu-N>CM6zhRxA zuL&i%E-`Xw>P)YMeTS&$=XDQUJC{P9nJG%w54sZ-^r zKmV!a1NXF8(=}LU6=fB&d(Uno{!dqAC#fGpV}^FPRn0A%nkMk6!fgvM2KOqdAUbfR zrmEUvgCBhOfx0nEY`*e6=~-PH_sm_;b^ZQ9@0l~K2?%i%X1q$Q8wg$cBrGz_aw$oD z0aXhUwy31Y2+VQ8l4r>{Dp3-JZ90Z#=xd7Lbu<;&viFEw@&CPisX{zY-PY5zKO1j0 zN_tAVx{~7!%aixT78Z43jZ)AAi(_(P@-r8Abov)h3*4s>e;py!SF7dVfrIkz@BX`7EWT** z!qqRX={!$#Y+yduP;u(`Y#^RM& zmVjxZBBN{{)H&R_bElQEg0Y6}J*l|B5X7Q~TbN29SkWlZ8R;1YSmJyrp#|`Vbds`5 zWd`gcHH3Ahp}9c@YyTB1gHTOfn+nIy;67hv)`>WLTtd@FXitfpIhQL}s;@}ckT5HV z@XAkKQOnieENK*5tYBZY%-vTw_F%yeBGP69V;5_bldt!bMS`v8w`0?XAVo6WT z$@TMzSUzD!hQ$p7RoIblSW;3V)22+**nH>eH8(VVMy}wYLx+?}#!s!GX)zSHSYBguqY1^sM-NNkg+dcd zaS4iCMd&Di=W#5=?z)nN4~vlp?p0j92u6S|q2Zy5v>h(3&8<3>^mDZ;uhm>L>kRJL z7gxV%N>$0F5;>{yzH>@`@a~Q4^1lT}N~pTvI+_ZsjBAbZcS>%M{?ngo>cv*OZmn+k-~Q#>k~|{Wh&D)g2XT7(^l7Y?p6-ddUc=H2!aJci;$?iTq&2zF4=0y%wcO|2qXLtH5! zN+y>%D$_uHxw&VgTw{-g(GgN7ffCx}B0O-;WysB2GDX2VEow!dRkSRgE9fi9^Ndg{ z8U_COrO!)FPL3%XT$i^!IX%EwBNM>WtzU#AU>meADs0zQ*V-gSOXMOgCZ~%blZt_k zO9&x3kQ>)V^Omf7_`5jJ@BPDHapzx>tamkX(0cfVGwn}a{-AnawwtJXo z$NIw6iclsFI)2=E$w#wkwpJGO=`ZT1i>T|7oIOt z1X`;F{0X8n@Nt!-DQb=h{X{nvicI*cm#>=J3AY!EP1nib2+000|DWjo@}As7^#IBi zY&ql_LYR@EamS%*DPj>#96!+%vH1A-P6`>`mZ{UG8uc53BqAchV)uAyjvqTNP{Dx) zU!m+U@S?(QQ(RJPf^qW1$@25Jel8OyOpr}mHe0?Ud55r7t$J~lOqw`JD$6Qm$BrGc zaq~uteVPzf^r*Q$)vBX$ToU=)tJMpn@j_B79Luk32QXK<`_6q^+YT>`{v&mS>q>}C zkg=LxLXm=2Mb}n%d-V+S}wqt?4*g^E%moU$w65L0|3nS>F#{IsWi|xIA?C43WO>n|=|F4NVPl zuHc-xhNjJ!CTmu&F>RK(gkGTuL^vW@2#9w)u}#mF9L?h=k6RuS!hY>5Yb8+u4qYb$ zH*Rpdn*aK+=DB*boV&5&DMqnxB? z&zzHsg%{=e_3O6iL`Fu+_%RdAN<)wl_ry9obmWl5GLK3tsj6qna)VahN!?|tQxlnIAeAr>~*`u&dY&FxFv zuvV|DLF1H1Rq0+lZ@L8UJ|xN%;GC`msgR!IKSV+_RU>uM6eT+Eo7f`jT3ub80i8My z=6%t3J)r9_a>LWDUxcHLY?Tq=L&Ifc#zPo6Kaj921ih6-*ayu2Nix~eFP+gHwYJPMP-Evgzf|$ z!VEVqba9|V-RFPT{s54L17(8y6_S*^!!m?@25Xt$lkfQ2PhOMP*1cxHBT_w3 z3Q9{$ZSKVY4g=0;pLq)2iYL2Fi_-Ya8LE4v(+wgpmYH~jRyj2r< z-2Hif-?;}E56)lbZ~FdSzX-=b)yU9(BSIsj_HwNu@eBc`W08qOyn+QFNdK5XJf6hH zO(7ODX4Dv|x>{vP(Qv1-2*FqBGz21lFyuf!&TIa8o3{sg(*p=NM<_bmGbfr97_)2F zF8NdmwvaDINM$$*7+rq(bu+T=19BE#fY>n@yj7YIkR9}AmrPXf4146sf zdc}~dSgMqh8##KUy!WT~%-Vz{XVR2O5~7rH*Ay9At5^ZRHq>}bO-{AE$Q8?0Sgevt z6rX(hiHj&e=k)y=bDbDyn{uCajahcxp6_Ay;Wx}Ln@{@Lt!7s_E3V&3CuzFTBw=A; zvTWHhX=!eeU;pOUa^~zA0|;d*I)1{G$?96wzPWTs+W+V8MOyAL^7tqK%Kw}1#Ao(w zQLa2Cpt!sC=p{gkP+e1PDI=g*sX>bZ(o;h?R%?v5w7Arik)F2oe)sS_z&J3)NlR9- z9(!_O?HA#Qwn<@Apx7YGt~Xvc3zFCcC_C6K2%u9%0GRoY1)XLRGWkuTWq#k2cP6lL z^$ZCeBAMBlQr}oFOiG))T_hhj4UHY`*wDCq@3yap9}?bQczZxy`gIL*`h;?JDm5A7 z&lE~^J>ssMK7G2m7M+}Tgz50O;j&m$5@yYrWk3^BImkE0J?S*YJfz-OV|(}SHDC?} zj2XA5wG7mTO&hE%7H&f7JPrvQVpb(-ARt(Yg@&lrMVyqxe0R&$IR?+53ppoBUXeOs z06xBX1RmIrXsSTmne^~XA`FQi;Fcmblc^H}HjzNB3CFkM_dj@F_U_wj;5p)*xLm*Z>I;iCCMj9>9i= zT7`_tOO^8efBZ?^$R{LCh5Pf$$vROF)(P35ame=1zZIY7pBK^M2w0B@UqzR^HNe$x>eSgYlebV?oimN zV10o!VE69bmiUi*5+EF&9nh@^QoJ`*!~pTSb?a8w{9Urb<|vFhg++xXTuJ{xh?wwg zy$=~rsy&aZzfgVY5pp`kYC z5yaCbPm}hxcA21{o#?w|_1sSDzAtgTMutZ|&;@(nAA3LSu?JXNo%OZH4g26rj|fKw zJO28H2K6bZUX{bDE1`8p-5>{>mi;5_KE2F&*; z8@T-NDiA}0TeGV*G+-{q11HM(L=aNi&E^b~OB>@9EAm0jH^5i2#%Oh%kEJKu2xJg@@S`2gpWgE;iCr+J^OP4OmzJvRW!HDA}CnZ}hrPYE|j|)~N))w>Q zehuM?5MynKR7$r&0jf4O>p61?-TcOVKmNY{5*-z7=a`<6ArmJ~G^^H&!cqdPulJknVJ=c0$Qq^PI$tkDvTu$W5?L$f!uxO!z zjWqu;I!4}F_omF7Jy!uy%Ali_g|G~n_ptM@zF`ehOd6r@ZT-^&1G;1tlLSN^kZ}U% zFi)V_(y$cWYaBY0+!2x_AaCEk-F~-b&5N36HPHm8{kWI^5!0x@UT@S-#2>o4Khe4= zv|DR_GURl0NH1SpzgA~?cIOMv%hKnT%G8-tdvsy-a<@;_W{gwDUT+(7q46%TWr(_E zSV$UT*7 z<*g9p)Q1d6SIbS$KP@v&ViRKxLCZ0xC|dR4m@(3*g1+smO)^+X$UC(w*QM$I`IQuC zALXls$@P#2O5BzhrXv^&@(SeB&pwr-M~|8ie&?^>k&#&=JFPQZtGD%i4T2xNzYQ z1kZymmkC>tUm&TvQ$W8vyfI5=LVhq(?Dq>5C993A1u{7OqpGbW&a z_=kUxOQo00iu~mBPs}p~6VNcV=9s5gj67&m@kk%3xzx%<>&qPf_rG*L4J_YN=Oq9C z`XBN?weJEIaQE`7ud1b;;8Kir>v{!69Y22Dn1op0NH1BrVx@th2KhhOdhdKd@4H9o z0mcyH%eC%$ZejI^aAYu(t3}c>?ihmoB+TRXut}pA=c9sf&>fAL@Ha@Mi2fr+M+NRc zUnM$Lp*1u@>(1%lgBmUygkrr;+LJn9zxwJcJLapey(*I@X$;|RW8XWr?huf601`MZ z<$%yQ*REM>NHna%2Q?-gLNPjes7{)|P8uV>wQJ&kz1|KDN3YM@y6*w*GlQP{_%Iel z_j~ky)7a2tamC-g`#TdFO>ZSX|^* zGIyAYm8zgDYomnBiN;4+zMEVx)DRLV=sjkNsA>0CV&Du3meXUw{?c61Y z_8&5)9LU&ldlJGqdFrIBdSR8k@x~iQ=g4_*JgxzS7f>DJ3*ru2QpSvy_MExWo>!t_ zo_oUEPhU>(@ss~W1%IJ>uI6Z12VfEnmoTIUhmRb#9L5RbCkT0-DXI4?ZQIcMpJ#i3 z+jZ}jdF)so5spkWCI}?QnOT{gv_}Rg!jb2W3*_b90qPpS8q-sakpbPC2Ed0rEE0Cv z52!xs;UT11bZL~>L3pAW&zwC|-hTUSbGMMZ{DNDr1a!B(_j7g0=^x5PcWyavAN9Tm0J9NRcvW44^y!Q_Gt>&w3Kv?(u}Q5;+@V-n z2uKu?+4E*wC<2!%-WZr(C{BJR_l!^=VCKx3vTofvA$0?kX=+NUL};1_tToI%rkdpm zs|yt6c*%2$HAqe|VX}V1dh^zR{_fOt?i2IG8g=HXeXpOBl0iBIas9z6)UrlqS(-`S zxjZQ;D=}pk#wyUVwRN>dgNG1CaAUoeUn)0Y79JUHRxTv!+6}fwRH?FD7#}Bb!^0%` za$ToW3U9k3D-;0Kws?_*Do80nm33P4jb=M${`q`E_rmEqW7Z4<4R+dr_l?JTfY2LA zYQUR}>3c$??+@8K>GKH3MaUr(`byCBbP7PH$v=X@f|53yHf%EV8rGsS;i_w^1NP)HK2GD9{86%sSPVI71{6?hlNgRE29I-qr|`F~ zfv!VcT_!xdZmP$>$;=D#{Zi9XZD(O2;aV`cScVN9X7r8CEzKqj7cX3F>^k5AsNg|E z$RTucPv;uF90~s8#*Z^XbSzB-W=Uy@T)uKy&YeAHl{@$y=x*GwpgHjZIpGmd$d}45 zNkd!btauhV9=I+I#jeUN3NDH<)NtfNQ-hLtC`1F->$TQpd6_McfqsD|5J8PbhD2I^ z^1uD&-(<|_F*0WS7&)d?d7pj$nZ&6Oe0|;PCfq^J(HZ&*l~ygbO4JahVtz_AGX4i*TV+oUlQtV`T9!*oESfzSZo4Ab-t ztjy}FYIQLw$?;=0gdh9EopYs1%K&ZJAh+6Y$poED)Qx)(;O8+9KcIgOfQkFYLg{Uf z*8_}0JUBc^kGYU{-hgVYw^{`joa;r`1@!5p36o@A{5+$0bmj$PmsA=m&fq>AI&7%S zo;}-g3DKO4< zd!mFRLd7|zp$xZAY zma9$QZIa*p+wUYVKhMygRSY?ia9&q`cOoXnj+SN`#z{)-epw^)3>+aPkbM6JPl>yK(^BKr=@oh@6W{jE1m znChV{UpqN98K8u%8RpsRxN`3cPxJtwvC9>g<;cM!Qczf6T(^ujP|3bJ);-nwML2?Z zBSt|S(eeWCb2SJxD65zVOqxe+ECdL_u8m2Az`Wh2L3$N}PD2>te#QOSXK^l0K`kGE zM$wVcmJ79H=@QA#9`#t)=A84>_{{xr8Um8${+aWg_qlTqFwQ7OOj-fJ7hHbh)H@Lw zh!78 z7Q-tkDY2>;fMEd7QNrzhmOgPr1RsyC4MB*{d59HSzmtRJfD zs?8lcclIphW}PdSv=6V8{Yhf#S~|kkoSYmPHD;9LozcoGxn~WZKn&ee&7;B*ZI(&JfTlPw0dbOy3D(2!h=$ju z3B=7>Bo)96rFSN1(NzTG<1{9g?;saCjRh7>H9$L<0ex9rEVxgdhD!#w3k)CRLy^1n zxQ$~v?m^s9C~5sRDq=eYNNxTW_K_Z~pm!_D;J`ya}I!v|#b z3#*OlEnF=+$S&whlv0q`OBOFN)+urXvofvhU0Z%AsjEi%$qCH<-_o~fl;(A*)ZLxZ-?&sFsYeymFUPDCA`Nb*&4fBur zf+fl^K)K`1Va^Z^p}I(HOso_Y7Fph9lTVYmUQvh%TL8p^=56elv09xf*XA@XdiYI= zyRKfd+G4OgH=$! z^;d7XQ0)p7^0xlz0oG(F4`UOw#;Gbm2jUJ`-B4R+Rq63m^Vmv_tLJ>dc}tzxv15mk zi>IcfN@-cCRpdb1w78%O#~Y0|%oVh9YG3=^LCOkXunc(`i;0QBX4`|A9j#QiXCuoh4*yzRj~fOXc| z+-jB(ifGBD5-Be)mum)Gxn#m?tb$62F)mW{Wk%*mMRN|Zn0VFYDic5`qqs*ANC+d8 z$DK-&fp*UL1k3O(`=Qmz|L!yU9TOM?NUcMBZFOaf|av7$ybl0_9RaD(q5?NVm=j8n7 zr+u5bd52tYx+b-Hd}>$H=ib(TJz#El6_5x?(rQ>sF?8_E88XU4r{Xc;2tXcE|ZysVg9`NvU=reD}VDi z$L{o7y>GBMu)f>EuUd{1OY5|q_f1C+u!wT+D5Oh$PuJk@_}cs8ZVxy@h5li_#Ky7V!8rIaP^ifu3Y0TI$ zrm(_e`qejI8L2l`9;rwO7z7sM7_x8DI1o+%WUw{?-Z0-ycn;QFRkiwVG~Y1ch;YS~ zivR-z1cx#%VYGjgBEULaOX0;rDK0Ix{Z5!P!7N3Xe4x8Sh{C#q0)Q))@q%DPU>o#R$ms-PjX6%R8O5MCDGxM z-qg9w)DZ3GnYwL|rm{@Y)R^wbKddvo|9QLzFg8%W@Hh-O%Ms}g|00twK0aQ?Xzm~b z6pagn(TIc*#;QM8gW-IxGr$(YzKAn138zh)YPn6gdak+g3W-mOH%L1R z27c^mQ>Pg$_;CfZGb(UFaZPByFq9DUxY=^k5|f>6yw9C`fQ246_pDj74Di4>>5K8u z`6vVX9q#7J%avxap#-wvlb47PLU>hQt~Q|qi8#WNsuEMCO;H};SnEr;MblE!%sokt z7#3u?x)ph5j7DFHmXPoe6JlTkzyxqSP_1}(u(l9t%o`M77^k>zEK~?=U;Vq~bIa%- zagp8{30otw;kwt>og!^`OvXAkfUAs#GVTfU8Ko17Mp8aN zw*t&TXp(aX(+=N5uSU3pDjf(hlw{@?!V}?3wUvy)8OG;|HOkt+10|Yc82CoLIrfx>EP|Z#;`miptIXAFO2mj1SCtX9d^1ur zBqb%qknvcNDDf!oEt>cE)py^DzwUEfu%9febESegz3-z|uJ4(A8FZmgWV$N!-q!Cu zz*wUg{l2~X%v+J3lCB`f0VW&~f`CzQTi*7)t$Bp5)C@F8G(~&(>GNZ{Q15qlI5z0E zZc(AS-m>sME(^~6j@|JYhNEhl{yzSe3x;(Zq`(1h>$wNGcPKRcdD{+Jfaq(a(1{Y-om8=)?*d*69q^-B-1Hl(OxGkxlG^L8-4ZfZt^ zrdUWM?a@h-Ct0j5C?H4{Em~w{)KEx4 zry}s&8^9Q}?!SEW7bEGWAi&?g^Ea9kInEOO5lox6Y_?b*tT+JJYSs0*d)IEOK!HUF zNXO!HBa%%JGrrBus_sn$B32?XNs9xjrNw=B1Rv+ZF>a`ZhGzvb4lIH8o9!mt88epi zsP5DD+d6*qJ#z>wLZE-3fpz#T^N8P(?g5~0RMsfNGazt>MGaHy@`^I&)LRi}z6ar2 zSWswjO04LBU`6JJhS|CU(iMby&f*+tQw89T4%0!ZSf@{#BC>Ilh`Vs)0u;I0zH_hm ztSj*fNBX0m8}eaz+;EvNae@E>V|*c3Jk>lS99awX!6ZRr`}mWO4VsNsdg|0EOC&~s zqS@i{A!Y)_6eV!rMeNq<^HeYN@qQfu&h0_EK=`_>A#Uum&{zzwYc0>pvI}l%5e@-(m!%<;FpWz>AGt||8o8USJtzr)yY?U2ZxuZlhX`>Hx>OBW`{G)Q zMMBQbaTAgf_1NtauNJny5)jCa-6FM(op0R5a%q3>0~hD2TI}A|zdgXX$5TQ0jHW7- z$4MIF~6&E3nwYYKHc z4Pgaq&Y=T`By32SS$dbNE?ZoWiWQ`G438ad`HQgW0FL7~LX9_V`ZO7;`HBE;K2M!K20gCGwS8#-0 zCv|0u&KFtQ*veI_WRlY5u^%kd%u$(kPJnZK)S|pIS$S2rYt2WUza6bbQ;ZHA7N29s zMOg$oKK8!opB}&?W#dD~3yPIlVIDfPN2CzK5tQl+%U+NXDI<)51C5r(WFUDL*D7ul zG)9C6TIL81oFgm;dPDd#IaOabt==I680gp4tMkWl(Rfnx&1OSF!h{qP8)J)EuYT{{ z=z%@pE)=`l7(usV`wsc-?|y4;Ntf^#YUxVMF_7cr7Lw}V8lQtKPtvSB6+XBmhYcHM zu|rU#^B2rFR5w;C2yE&n9yxr(;&})hYbx)k%ZlJaaAIMCm_?wm4+NKcL+H}X)vCV% z5laIV%bH*)TveuxI6&74+_F>vAv}YCg>(S+9t14_AW}+5`+!ysxN&36#cL;_)OoiQ*)GRUi*Hx!@qDSY>wbLH zy{BfcZSMWAe|mti#ri@Thpn?Lv>s|6kwgU5!y?0E($qp%XqL+bl^5iM9yS z7c8K}##k`1DjD$J*0()?D-}d1))uiwas%Vy;*1O*c9}i9_ZWHO-p@-Pw&ol*$J)@uqtQos%tDVPQj zw?O+5@Bn_GzY7WuGIT1))*5vkC#t)YkPg>Jbr5nO5snDbJ$v_<0t;|wR904paBR^b znXhBEJ$;0XuRYWG<|rDrebaVj2iPD!YhUX8o%fwbdjJIoU>f7r6{_;w+Tju5Nbj&n zGDvwmYYmNt1>f=V1Zq{ zc(KKnp0zRJ>FW&*3z5ZIaRMRq?fP$J|K9ypo{IP$_Xjo|%KjkGXecVUG!x?!W#x*M zvhMYDW|8ebyx(G!7fUb7EM<|QY6k)r&rgIB49uUiKs9-P*}HGA6;XDs3*m-9Y-?Pou%qSZFQ~n&00~< z002M$NklCAQ-P` zolPUzFS{hk3JmLw7v)jU#$&?qQBUZp_?;>aj5>h^ z+gErzmFH<#jwlT*Kv)+p*GLaL^nUe7J%A^M>KcSKD9ZcUC!fj2jT_}`{#lD1PMtQ@ z@)^ko+_rt2k?-UFoHuKpQ16h!!W*}2l&#yg8vPoU<=}RW@u>1saIQdp^V{FZ*>h)& zU5AQ0>I~?%F(wew2w+@d)QQA8tgq2BSIJ`W!Xd#!j7%J!SX{ou2XT+GAW~o$OafM4 z^)+S3Aug$285Ty|zX(gJa9q7|)#9V1vj8|kaAu}uN^*R%6c-iS`Eq>72zKt=X;x-% zSg@p|DtnHCbbkHoUkl)zi4!JjsjXx3`IlcQLbpI>3=WYMenafqJ1$b0dfL}-7Ag}RJ>2trNaK^U4FU02uu?U$rDb+uYh{aNUl{=G)xaLoeW<7#%kB^PFx{=kQ6m~k#Nb|sT3~>P5vgF4>GEQt1YXkQ#*Fanr1%f=} z(`QZ_7c^EauH|D2xGBiXmph6`J(`>#b1v6OxTcwOYS$X1U1OF$N`t9Vy3<$QH+|m& ztf!$0oQhA3mx`+u7P`817uePJM*}nBZGGMYOm5sx$~`fV_{JflV#CzkHZ=|Qn#gy843k1KqiE@b?yN)Xlg7X*bp)!Ge_D2 z?~1{wJW+Qf71I%5SWH&Ef zmb<7aA>40LP}rXFz%}6lzBA~KkpVynNgTi6LV@uzKfmaCMVwBuR2Bpt=SBJ$%Gk*4 zk*@lG`Z?@6oNrP>k_lhj`;ZGv7(2lf2rLp%s|ZfUXT7G2h;k!mXdY#vDi${m9g)!8 zM`h4mH?&<}tJ32gIU(%|O!CpH9(pr6UAFg4-}V5CPkKg%g$qz%h%*^u3!H0m$qP#qCq3AqEfB2O`A8#&K)}i zKGo^drdtXGJil7oN!+NH z%P-6J?c0Tvtf7%ZO@V=VXZ+~#5*`&UhYlT-BO0sYdjK(xfWu>eLWHnG5ITrdzOQPj zvM~T4hulUy3UaxTM=oOE=U|m7+hA5wVOB--`jvncm0kl&SifT3z zqha#%FqaXl!!yuW$SxFJkPYiM$d(PRBDgS_ptVE#fYyIZD@5QDTfTg`fi18;pdX{E z#L2TKC1Pl#WMyY{jS7z6TB*u-NYT^XFyutl6EodwrE~AIlrG=dqK= zKZJW-;k?np#jz* zE{f8Kpwt^}RXvR3Smh`L<|s|1bAW0Gc{^_GI6Fq|^;#<)06Be(B3?-dA09B=QaKQO z>^m(z&D^!5oFE_(j9DYIOi=^X%5QNiFU(n}Zn^{`P+;Ch4T~~%9jx)OEl0 zo8J7yYdQ9&mmXmo790MUaQr<>?b`KgY5^X$BGMGE1r&lcU^#Vat$;p+T_0C7?z17j zE-erxqM^CL+-$8HGeV*8wjcHY)(Z{ep!AdM{@uJ06bo^Z2 zIb*!R<%!!B_a+T1Z10}E^0}sDP;hwZlBM#Tx(G?LIIY&=U;g|T*|1@Qi}w^4x84%& z3xCA+h})4S!K1RW($K7F$!QW69A-e6$}5!yv^m>!)~r9HkJNKSC}RmS7Ep?C$zmTRbx%PC-7y8Bb?Es&WSGk^W{*Cjy( zC+Dh3pW-uRigK%d^F!90Qss<2q{INK6e#M*`qlfNXL^8fXX#+7Fp*N^$>tS~9_U?e zAh~?EeQulU3K;scA|DZOEY2ik6XSVh-77};ym#+jTTroPaOLqGXv9_pY9J(WncylT zCID_hk-ixmr~oFlW}Y>rqPIgaGE!40)QvaTPhIu_{)RdQtU_zl=qGs$D*J`%@6x?)id6EcV z%4+4G%QshhW@eVfTmQK2k0vB*Yicd#2oo1**7US=nL2r@ELprnGBYx*J|xt5#9%?^ z!bOY4x<}uiQKla}6et6Sj~r>bNjjG7K z_mTK4%2DX83P^ABSPyVt825M`Jl#Bh1W#YV6S{wwz34*TAtbq}&q8C7vqeyI(jZ-j zC>XaGi#XLI7}U4)Juw{?+fH66?IOp`_pJ2Sql^jSE)yqBl+^T88&{DLk>;{wUzA28 z#=B?#9-&?#s8doGh}8jTC@CwE4O=#tFdz>SDmoJ;n%aRI^w^PO5+4_D@i>GQCEgGy zSa-N9@7K7GJWzHJlB7kD3rXq*^8i$;6GL$zbhP-aSSsx$mt3Ue#8I7AtroeK z6Z27GcyIG;5BMlUJg8>=Ogrq7cJ*y51Uyb%hq$<_YpboI!LNSxD@%X)<=elMoP{}(G$KjaZoZJ; z{q}eAFaO`a*zec8v_}5vfBh%<@WT&ehXQ*5*#P3f3gnNJ9nJx3kYj^B2JML;1WgEX z)POkm>2CxtUIvsUlqPC0A|y%f$JI()v$4L>z&10K82wzqIXQ9cgymQk7Zw`@9Eexq zoCxjQW4VT^rF0kW-uFLz-{RM=yz+|Vp^7AjHRasA{R9}0o)+psJUbrZr1GBTUJMuqSEctWd2`s+6_qN{k0D=Zr zHWhGo?Al@cr&c$0&>$=3`_ngnD&r@Omp!{Q4MVM`{PX!{*`c^ipE2F)B7$W7;?pmz z-XltRa#FI6USQ&>$~s1v#JSzacZh+ES8j#oMNC43h6qUxywnS|Ff|0 zufuKftn}LBT_;KfB=1L$9W`NMu{;Id5IdZvaj?Zp78~Ld1Tpcui0}w2WE@9KP5T=` z0D$G4zj?>veDibW8zS)3$x~8LSYYwMq}U`wxrWq+n5%Yd_E=f7=0yqCxFSNcsJO_y z1R-f5CWMMhi$yeDu)Buxh)}VR#>knWH9NFa)Rr0Nazr=L~kg#i`XkxY}Mr|i;V^c1-}|sVYZ~ z91{TKW@B@b7X>Cz1Rdo{^L4gV^Xx~aM zmDu}~j1(giFFapp<*)$eSlmzx8bcC6#Sbh;*l;-aWy_XH_NZ(-Z>(5ik1*bR^Uc?S zTN!V~jvYG;lte82r59f^<$?4e(7Y(LFTAkQEa4Uv%)uHny)W=X6<(j^%cT9_A(2lu z+`Xu~PfZHW`D(q~Q81LEk~)9qefL;BfT59wGXi(ac!~>;)pcBJo^splfC=* znl*@$gM0jZ;d!HgLxBMei{QJmP+4)5Xdd7UL!S_W39R@;@gMAOF+My8xJ$7T$x$PI z+lo7LywxjL8&N`jUcPMGvCYU0Mvfe5*H%_mrn|UfF5ZiUMN*i5!7NW)tmHf5 z`gIzX%1z}}ZB#}CL7Yy5sDUbRO&sa5C4Dm-u$b|bKCQssHiB4h}cUHDz*qHpeSPBrZJsK zw!1maKDAF%_l{9D?if|S+&|#fxHV4I-Fs(uNlvn3cA|+U8v71GK|lpmY>-AokVa5I z5K->@OtJ_d#wILd4}x5`%ThvUqLWBT+So60Si%A zLI|MhdX>>NkiFaR>ITz%P0vU-&<#;9JV=aMWlg2kIiZapHh^IUVaxTFtx7$lg^3t3 z;*>X#l$$$ut~spKThUx?Y-*J0k<+b3SMKRt*?(Zaz5cDY-x5E6zjmXqpO5bkP$)Aa zQ|Te45~#qTxzQSt9?9&|5V?QD9T|D%g7^(k6s|fPZ7Pc4jNX|6_65!@dcIbI>7B#& zcofGt_Bbs+>`vE4&qiRiM+=dD*fD=fug1GZ`!gjaMS#cG)z-C3#A#GP^g-((qRO=^ z*IN4^HbYzVq}lXwQg<$6`cwMeKjvq}_+hjLYaMR-wCQFXsWoEsDk>{X?-X^SDPfaM zL>v-5hKLQ{RB1YWc+#a%K`<;hGh{xf>oFkXQ$MHi@ZI}&h33eoa!wgF2QhQ{BvSJ$ zFH>T?I)#AHs11(sA7cU!blouB;cws1Ksj3Pxbk<-2#@fN=`bH)6-??p`KksMfTuTpp7E{jA?|~ua7(}QTb-0iL69W`YJJnLCdFS#> zSb%ge8zho)&@@2CQfr0tNIelS&ggNY?YU9WbBrEB(`UMJkm@Ie{HH(vNs5Y!1SIdO z6|1a6hnJ@ONe=_yp?@XOw`)-2vO3qj7NwcgYxJwmp4ND8=jdn3Jfk48?^1j|dUKgl zxwh%=Vm*M8K%~rdAm{f}&w$H$!sT%H{@@tLr#?-Oej#2f7a`tpXAktzul(sggJ_|) zx>gDc3axtr9UtQ2;;b7yo0-e=BkhMs0Q2J-Y`74%>F5!r>icX&&Uo|;K&1dQKhLm?(|N~EPr z>HA1aEBK4ljR*SS_Gy?ghXF~$f3@M>ylGC=^=5{43L2DMe{ zrvQTZ+5G8dL+g^F#pv<8Xr*hg<`yO{l%Sv>Yl$^WQP!bhAy(%^yZ`_blok|!K+mG_ zO8pXmPe@3(gsb7bf9{Oj&$}S~mFwsltlUTyQeV)|QzCTT574>T>co()>3QnktSOHH z`lHkvTT4%Uq({HdF^-R(qbGg_Mv;H!+2|&KQNSbTz88J4;qkqZ01F8TG2U2UNZ@0A zZKB5b_;>?Dpu5>U-S=1r>4Q&VZ6WrK>JT+Ij2hat2r$gj$Obt#s0l%#K_=;j5ki4x z%a>c^TE#U3*{pwgy#aWLn)rF+jW=Y$`~_wxsqX=NiJTrO$jlu}J0>+XHBx>@TS;kJ zmLCRbT2hfvIA}9fS5s%73nPOwL_`RX215z5mA~O8QY$1SOs54>wt#c^PIPPu4h}XU zbT4nMQL6!KJJe>iNCXLdhWl9L%6H&9I~Gk(;20jm(@#45o*VP1l?Xew}sMp_d!(kdz}lD+%)%IVzG zCh`uc|BOaIMEGyN{k8-L1)F1oG2+~CPBA=0Zx|BlhiJ3{zQKrf9)KmR#;j(7*K$rV zp7&Z*sYiiAq+*FAxjry%JcoXcM4TL#NRr5uwSg`xH9m~-?3uHTu%DNkXZ36h7!fYQ z63E*T${o?r&h@h!VjW{s0?-^b7DNME9cM^Id*(MwU-!XG+GIz&^;xZB_gcVe;81Bi4(?7Fs>xL zNInNTssMce?C_m1dON<}VXe95#j5DHzAo!zmZf0fFaq|W4ob9|xFFGv0Ya4sk7HC+ zRmeQ=c@_mj?--KM;$9Uv)soAcm|C!YbL zcEDa=@A%qUqRn48Uuibqoy#Xb;`hJ8F^=CqKTrKA7cyy704X#(cBhB))F0AKFGQV$ zO|G!0Q0S*eG!$MYWUG14TJ;+(bh(stm0&e&7rc-T96jVG1G~$`#SMqBqy! z@9ErAJ0k@O*knP%0*k1q7b4ufdGlt;)D&T`Mp{H?6UI+4Kup=SGLw~Cv~ZE7zBj(L z(F`Z`KVHZC!3X5rGN6sb#m8Ct3tEV!K9w>-mkoG|gZj18I#9SF70+t{;keXpC`Hf$ z3nN@wR%&V8)@IE_XjBa97Dp3`2&V)%5+Ec;T z%H?kJT^TiIlzmo|cy{mEE&1nEs6y!@RaI5CW}$dc(?qo=Iwsm20E{ZYAyBPkL%Ix2 zwR-&9Z=~)2_;04O+T}6*!$*NfGu1$zB+^mi=orZEGxX@c*-t%n4q2D17r>64vr&&e z!jnD2F^*3*Uyt`}^_=mhF^HscX!1+pzb_0nNm>Ze%$T%W^5SG`EX#t1Xw72Aap3RC zQxpWE5rQ*%Zw4Oags~0*qP+9YJ61niv|y101qVr1R+eo4db^~gr3lTFsaLXw0oOo* zppJ*y49$wE3xjwCag1@gP;kM%0FfM^8=NEC{PlDLzzPluwsTFy1;7RH4YfW%JjQKQ zgM-E?&t;%0MU;SeIU6GNK#o^YU13xXT5XLSp-qYNE6l*rFOxn z+N7y0Z8ZDsKbr$JkZj^?V%F=jFHFpH@*UaKXGYJINkNm$uuxNjJ~4FoP(y2SKT$ss z6}3sgRe)zu&;cMrFG$pl_yOQUZ5abYvwYI2+k!TNv9R$!J{-e}Gdo4CMWEJV< zNK{B`D~uq6+9A;|gnhI#>EJ@Pf#>@U_ifiE)^&pcM(hBtEYT(WM~pSmB$4B=p~J*W zK{93KWk&GF`GV|EpUM*|_ePWpcxU>I>1O=<59}`+-`;3Ok5nwRRMsRY*hCc=PfSYG z6mffPl)36M^m}T^%wo1^P=bQQ;~#z{Z8`s!=m+oeR9wLE9s^`V?M)LWh)@J?AQoR_jN=xIuFbbgQ&o9o!xWlnR^@+>Vy~wHheY{en@k> zfKRB~SVxV*%N7a#(?9-`NzEbly?gg=*|~G4iGPnCJK9jMq%2FdpWy&Sl>&~y@p19(Zdi= z^qXj^JI&ha4f+TjUZC~_sR80WNZFH>K|K7;H{UcvPc(@j0TJZ+bLWjG373|%EL}dJ zyO@F2_do<;%ip#bP;TSKjfQT`I*}!}8*WQzP^i&eUVZIVGyZ%B2H%VMmGV4I`^s3w7F?}<;KYvAbMSIagIxOSr*idJhWJjOCccv+^n0msRarcR z35$nvFg1jI;I+;j-^~D>Sq7-1;qKx7cX0PNcn*)xrf(a++5o&;ODDEpU(eyE?cI;W z1~yDli69dpYJc?MN7k4ZdH{ygWzZDi~9=WYJU&4h}X1Dzb6G;lc9$U*4C~r%nre&sj5P z*&2iE31x)TC@9&qqiK?HBEz`0Nm@r8JaDk}vqUi`EF?^$(Kwl=#tS`I26I(hTx{SV ze7jk*^|LD|$W!SdZTk+0TvP*zapXs}S9==6bp0>UT5J3*by&`5d#_8S;^B2r+Axk& zl-K*qOFK4;eXbe!c2Bhoghkly+gKgr=$iCi{OyX2NUIVVxeR45zQuEUC^qIh zT0;VzNZsn_;iE!JAdDmPfTkuJ9(5&Z2V=*KH2}qP`-OgjAB@yy;pHOPx@D_i6cAPz zGiHo|Sh{~5BD0#x8abbTUM^g?AayrxN>p@|_A{Jg2+a}0N67dw?FOx&puk>EPdyAB z2u_UXyt(rfd=qbx93UUigrr&FxhBLbjYQL(8JQV|KBb;X6JzKUh@`Jsv&IZ;rTCsN;mP)zp8m%+j)5G;4W6dJAeD;}iH;PHfBq-y z6X|sF=xOG<-sj59k)C(waEzlHXBT6@h1i#dIR<+1qq-73J6fu0tE}z>V%LVIm`O>o zQIYO*ITC$oj@m&&%;AYI<_8s?-pPl1AopQUfKU0c8cmDI(?|Q!f`?wmLaA zR2n!lFRpYd&IYn{MAt;5a6W5Q;NV7OwG?P;to`aNgiMfCJ^t2a z%^n+8i^t#nQnV{GD(pQz&AIct8DK3xt3AUpj^E9DuidgpQIFQYP3scCjTv~0ePEC} z9pyJlmMvXsO?Htsv+u4(kzq?)H*e}nY)<_>yLx|YL~OuB78p@yJoyaZbijKArAb>V z5SZJ(+-9mp@rm(P<0I`&YMWH#>UC>mu8IYaW_<5Y@5!0mGm@K^YmI^-{S&nToZ(!N zqNPpn)~8012&y%B){hVdHWC3h7`Sgi&mI3U;r3W!qqEYKxL(?at(nRQYU z)EM2Ut&yY0k4kEKs-|}Xjhaz#vA_u50Jo5EBmK_n;1H8CB~40$Wwd&;Pi326J?Uis zk^YjDoTLQ)k=EOh_a(Z;K$c%Gm+YKut5HVJiI&MK#C|;OxSYy6Wz-EcR*~2nJ8o>p z#8bQF7$9IV`p{HDr-T}&AYEU(`HL@Q+LS30_{LkJ;j#?*bgTF_wmdwpA@w@mPdwh* zARhne*P5ua0S31V=(R1{~&v1D*0CMPGXXD}7mM1>` z^Y{Wb5Yk}$F!~Q1U>cV=3e1P=H;-|fe;CLPppM?((%d3Nnhqq|3fU`|w+V?SB_>(=6qOlYMWE7Q9U?x6(=WDtA%{~B zTXYYVgGR~FFo>k+x&fgcfp2nYcIfIv5@ZrJOssj>oT z4j(#fuL%ndGf{igskVH!#p;UmdSnn4*HqQm`a(DWBhH)m_G(dHfHA(Uhx7)=3TWU(jfm}CyhKR?e zx0Dz8uc8*&b+7aLF=l{$0|%U}0=L`q(~t4Or+A8E9G_y+9_J-?;`H3HQP~FnZ2>HGlYhn{Ke}$L(TI`MCdP^l2jhq#B=yK^ z;141x2fe}+XVlOk25__fri6xvO3Bp{Ij#l}+C~2Pe7RDjqU72g1Q|H82Sj-Yo1-)X z4Fc3D=QBJc+{peIO9Tf1aS=`O`N$k#h>sjSV$UH;rNtDyNc3Pq*AiKJDr%O`fpLSV z5C8De#Y<)|TPL>Kd*xrqw}^6X>|Co)LJa}TLtn=kn#M$B2gEGKnHo6Y9?;eN4F_?U zf^CRW`58Z{J^dUT7i(!^$|biOZ=0hqZo)VL&Fi6AqQm?4il=@T>949e>P+-F^m@^- zU6kY1rfW)V5f0)Y z&vq~h=}OX(I5l)pId}e?@dT%68WHI>)^&q+|A1^y?T(0W*|KHw+AFV_LB;rhnnfjt zlqMhCgmUdbQnxprM zu_N;2K8zeKwx}WI6WoT^@i>v2lgM3KmYO1 zRxe%u(t2|i*o;Bc60!1rhy-lgwoU7fwH8fo*swtcc@44_V0W)97M}~3#Q##+!W zle8Vr5RX@iMS_DL{ygWA9%sO{eg^jY7RS)zvwrxUj&c0qbNJv9um$Q3Gw6+1UQup} z8^}?;r~~~?+V~6}Fj#Ii-ZJlw)Q6>1)ktC}`Nt;9eQdPA_^FS%29E>s7&2&xxO?Hd z-t$HLje$bX^m@g0t1pH}gv;91Yi0iY`BGF+WV*H>FIktn_U*E@N^2+_7aSA7F3VRe zH)EN0EX@Eo0B#} zBoQKLR=9}(bchIf4`?BPaS%pFL>xjt1`R`upa#7iQLn*(BWQq14}B@&Uh+4`1TaH? zNvJ2JPFJj0VQE$()j4zKNKkN)so{{ibL8F0&&g57M8qs!uIj#XEg$Q}; z=Ue6TEuTwMbCVhFRjXH71UpgzObZY;uhUjx-#64DQ0pyiDp}{@7{~9MsV*p&qsx(qhq6G`buX3sn?QNHZ}Ag3+t1I(B$C4@?)qkzWM^ed zP(YBZU%y_KBrlPP0V?)ANzy2|b@Y1Uvk<95V{9p14% zIm7k!4VFg!dgs?tT3Tx9XbgHktur$EUnv#u|NT2HqTaN>UH{XoK`v-JvE0@>vTl&K z4AJXFu4}#Y>^aeic0JAc{fHR=&v3Qms-c=`=0M$fphooW8jf*v)6C+9(|!l_4=x}O zcQ5k5$YK0DI{?(F*re_#(56)vHh;tYgr9WJQ&Ux%dSwH1MU~7CMv{Njz?|{qGk{}q z^~zNP$)ImbPezFF)XXqAoS&GO80$;{vHs%ui&9cvBE==e-#Rhv?+IlBDn@d0vI&e6 zL6%-Cwb~z`8jeFlWxy*}uU(b8`Z`nO;nmdas6|4V@bl4HWBC;`oTEpLwrhcii|BOR zm~p0F!{_iB=3@v{(y;I%r%jzE!GXcDb=y|sMUM0tX{mUG#R1QdYK3Y7fCy>{YlzlT zpl68)i7Y|1@;7UYA5ymHr`o#H=*?PvDdC@M6UP7t0B{doWoT#RHONcqYwHEcGSaGT zI=9qOsefW@lNTn-(&VM;M0jdTuDjAtyLm{C>Z-Q;e;p_9w!U}D-P`i#`^qWpH$dL; z^cEkDzT0wg#X~uqIw>8`b#6R-1~^BYKcattTFf)iyt{^D9NjRpu8R?a0f`!-J1L>Q zG}y$bK^-}KM6Q)yvs4)KLc~Em7Fn+a3l~UIQj&ppm>Y~D^~lz?_PS(Wny=pat{4e6 z5ex&M7$Pk{f4?q53m7&!S5-N+67Mp>&w*8uN zGVhA#P*1B>Un#p{ln_1-^+V99=n?}8Vlzachf>AZ31ck^r0z%U5a14vpUpihM8uWV zl_qybv~lp@L5uQ;G)SS+B1^xJ1cd}yG@W@Y)0_z$gt!H9GAnA9rGHU(qF%mi)pAwD znJGht4KXz9^;g^5bR}wJ3?1f>qHO&dn`G+$^FL)sV{?~NiJdG_s>vT)Z%d9kCj-a& z%e1+3Wzoe#Rn<{Z1x*(_#<9zkJ@gOu(+L3+1W;7b71jM!2f9_)pu2`+9NjgunmHl0 zO3H=JsxL)CY@BpIpxXQt2$Iu-cBZ~0^q(f?Psy6He{YlM@x*E|J#CKF;@Xk3e zFRgjWB;9In)k?`_HGFFPNZpcBh3lA@n5f{EJ5s5wpD=DXNTf`gZZ{b}kS;BxZ5J?d=V+d&4R=x7_D`p&_oB;Y+yMC>uaZ^%L+VCZ-4(=tFdAfy}gH;0j5s=uS&td=-$*Qa`%C~vVZ4J`GrP;)5=s&6>HdOG-!?e z!#g)cn|i5}&?ZfauD$irOVUpxpf(jSXe%rd51o4@_I7%ebMs*{fPn;|>^Z0%@Q1_g zuHl>!cg?JxGdpqorU380bLg&b@Knd;JCk|>5J9bp?gv4QLE56H#RR8GRUswD=1jVo z->%^@j6{~)cE(f8fKD6r--QboT4ZO=nWnG141JEjQV(8Q_mZ_`q85p9q+7*Mul5KM z01Ocxsx;6nhyb|M1=)R&$&^Yqm8N=KS8Oy=4Lqq(5^s)o2J< zMXJ&ci{p^K1Qj}Lgles7Wc%*B@5)zSeZx|HPq)V1Au?P%#xWt4+>!Jbp z1b!s-V!CahliPf^S*}-Kw{$8|U6Q89i5!jgq3xRBxsqN5eah>1?cF80=X2%0K8BI` zYUfub2mpX)-I{gc=j$ioVd0i;higcGNz`sePabV)RRjT0w!D~n}BY%g}cD?GlwxJqsoJcxxkmUe?gT!5MP_X@-ot-oGYulco z*N6>Nc(mP@qLI43(E01(Gw|&k)0xBF!!eF-m|@pO-|C^YGgZhjW7+M(al_j_7l$;Z z9QDSL&9j=961efo=?&P}+-P+sq`;0JJuYP>WhTo-J+^ZMiDAS*x}1#X;)}fiAA)%$ z^0Il=y~XBS_i63}CQo`ZCN{?Se29Z{{zi=+B@=@tO7XQ~`SS;VmgC2c8z2I89Qb~u zxT0o9sTxm`Aw!7_TQsds24RTz5EBqb;tk{}Qf(Mv^iqqj6t@e9tAbBexys2k)R~Am z#uT9e>XSqVXuD!ui9it>m@#vPtszpZ0KCvpB_afX12+;hEm1HI0?}epa+0A`5mn#3 zd9#U-L;pyammpEIqKtn@sun{xM-3g(EIeJx03cXF`2rkj(wZWqe?UBgmD5OKW4ylR zb)|c>DXw5dKaBu8UE|!$Xl<5#T4V28h3vMF)G>6%k1!Tg-)E5Su(oiLhQ>$vYp}+^t7ezBO4kU zOvwhKKkceWLlVUSjF~=dx-46=%nTc8*<)$Ptj>(O(JVDC1*&TE+1Ag@xDj!JbcI5} zc_&iD@E~|zSz9U4G7t&RJCkQoBhq#la8jjk8$pP|sjR+UZAe&JSP>nft$Hf=lznax zwjseGaw7AD?Ar5XkBP+!#4{<3)pK=NHoZ}!{cHn*U`@IVqWI`> zqYd7lmy;*Wx0_AydTONd+_bAZ!)8h6$|6Sf+HKzSZ)fz*3;>QvKb|h1{Phz%Ach9T znY{cwYv}7e+}q^(a7u7ue)s#|8Mz+eanW6Z_G6q|1h~(hJ!|zzBCx3uQ?0WGT{&v% zYApTu(SLkoH9%+%q+U^~p@s?Ng6I@_4}ch`B~U=1at!Q0P-@l4q*kU{Q(~Mfj5dZ3 zP!3#0RFmMqrk_i<&K&$bZ{9o;E2ln4dN*!voYkV>TJoMg8rAV#X|4>l1Vk-eJ8%}Z zZ`&?4DtNwHxrWdKF#Lbq`A0dCenOTmTWaFxMa4z(`4^uXP>Aj&bPPcQ_LQ#UNt!xd zp$@~On))s$2|=if{qM^G6+CFUtInSSnw-&lGeCO(p2t0{;kq{+?HI@2J7*n7az#9x zJW>E=96KI;@o#vm$4^QMFoS7MdU^=L&qRbE65*aLUb5IWHdo}RlVs6M#MJiYw-B?r z&l$Zl1E4FZ`(|cmT6B)SDTa==Pj|Ji;9YIdOL`UO1Qi^>QUG!C&gNMiC&?lgE97;JPO)X7!zDdQBqP(eEy9W*(Fy$N^e2#~KzJ2qyWfkD7VJL|dK{peD zLVM!a{0$I@mK?IFgjukjjQNOAgi@?H`FSkmnqIx%} zlGBL0xEO0 zGnRd1qbL1^2abXTfQ-9})T6InLR^BiE~1virbkqO!b<1C-%A!NASA9)J$zLj(T&;} zy)y%-5kZ0{HOQD8KG~ut#J-VhiwKP{qkzGh7dOw^Q|;NeNA~XBD|OfF%rLB6u~Mc^ zo2vZBQx@I9FDxi7FqNJ3v~+p>jn}RI_u7WnEc!$^fCw!pILLr8q|?z?9Xo!keGYFg z)ofLO4v{1chB1mr%aLy7HEN&?t|3Jm9kUXU1pa~IBa zoC`x{D%v3^F)SE4qCg@;&La^gA_E{$8KhGY1_x0}w~g@= z#!E|6i`7FR_)nTR$+8X*|B=8$m>_bhwup+2wbom3WJ!$z>T+>rF~GyMHOh|~e0H1zqIP8X__1r_Q7`PH zkFzh}G#em?J%qG`n}%Z?-88WrmPPK-zh^_>#<%@Z4$Z}F{59PWPMtg@ep+_~h(j86 z*UnwmJQnU9>8nQ#XLESe3_bbdfN-e2@ng=1Z7d?e`p@OCxQ@z(jecp~>2_cY#)yau zzM+pQ%=oBLLBxTUR-_uk0>cc*f?OS`*c){>453UK6RHk<7a{i}`Gt@;hVS&r({g>n zbxUcI#-)yTI`6be){#L#fS|NY#l*F4M?H|b;Qsyl4Gct+Y&J=1h-50zcg3*+ty-c6 z7CAUx!)MIO$THypju|;U($cX_+7$!ij7a&~HERv^N`0Kjl1P%snKW*~-2_WFGhYb{ z5-j84p>@(lq2a3H)Fxiv&Y^4G_#E^Fsz}9Os0{JtHkcg%c{R zWmarljLq>wUgq4b_K;e&o6C(h&yI0)<8pJQQz;<7=o>!XFZCcG_6w613aK>!8<4&C z9oT0zpII|z88yI-Q|=u4F=n9qTEx(F9?&sRwjo7HO%6qyw>G{dK|w(s(LTnAXmgRK zX_27I&dD}zBWPo|glzUuEgOgTFCyyidxp6qyt-Nfsok z)LZ{S^1%lm$eElo){k=2rcD;%{{9cYH)SA112%5lC^7S5jQ1E386m-{HUzB$MHWl* zD=lfD0(m?S9P2z~cKg0+uvR4}${~%w4}AT#p>iL1Ql~p`D08xN0>R@9+x(l=- z@Ow6=De66wo{LY2Hxwb!2&pY+JpVI5bRQNPX8b_9bI|Gvpbf^Z^B^+3RB%~RkEL2I zkaNrr3OVosF`lui1T!UaiqH@k>IKIpx`g`*r2`Pm@wDTHWF@L4)k@lzpUB8anHM|H zp7)mz{vx?5)D3k5!E=zWAZr2L(4q?CNhC=ZjwCpjzM~{9HO-tdSf>F zeR8Sjl4%{I@5{Bx^9oA}W$5ss2KpiO%fJC39Zl{0`nBsC5!Xqp0&?2+>=Vrwcb*En zeSd_vR4OPaJ2hP?GnX|o{Qi_5`vmVriks*hxjX8aTu;t;a0XagMEEDOPMWwrju7X_ zUBihS-88dY+?+f%0SL+<^+3tJsDq6P4NhuRa62)CG<(KDAPquuTX=9FBnea~sH397 zJavy`Uer1IseCVp?lIBPX8h+RCIA3H07*naRCq33x+MAe`BwkC(|AY1BEqyT=Bf0Y zq1M7FJ>$56VgOnpsm8gy)u22^(zwugbn|CDObnbT0B|@K{79|^lxv`1T)leL+GCLh z9W+pz23OS>tpr0je$05|8KPv<+T3cuE(8TCDl0k+3td2C4(ICu^AGLO*Yyq^0{{q!FYBS*ReFvPKA$2y4S z7gPb|Ox_vWr2I$vOTdHxQJTLD9ynNngM-aecc=IF^xvrOz7hjBoXuUMKhoqocI>b; z>BWl|1>U2d3WigI#K_PCvAU{S{73lY-~?0I%#^-Z_gfZrrG~jTHk}T~Td<0Mw<}6xfj11Rdk(jz#zbj;U)G1(-ue z4$0@AeQpS3j19=v6t5H+F>-_?E=V+E0-urIixBXmHQKy$_l^N%Fj#bKC)LS@&pF1R zRa8}2)Hre6L<8HPcS_xGO2ibsWZFz@fT$3<#gSu2czS-Mfd|&!*laeoF5!&()`r40p+x6s?}Y? zF^+DUS<;L5``xz%PpXK>>O~&35t=f2igheFfBt+&-Dv!T3E~;$Y0ztGRMrGqYgcrL zALi385B4I@%TMvUkqW$~`li(4vQK4OdXUTqyhBo$7%%!ZlFEc@7!(*}yh%%$Y8rCd zjA;tgStQr4UNdKjS|d^5`3vW*=7@^TjOjD%^%z}f7^K~aQsFWJ0wN+Hm3qDWy4B-Q zS)wZkJja$hEfP0BPTt-4uA!hwVG_*}5dtRKwOc758ubDIqqE4_GiRmznjTlb1C$Wx zMHduJ3U!2>sa#%l z!DR)Zd28><(Z=EJo-M+OWZ+Qj-LpsD|KNR#prLOdWydw-jPIWT=tjPNzB1T*unFPg z6uE0S#?cKkiwDd<3?wO%4#H~twc&<${P7QIUDefd_t$2w)PDHtpmcEx@c2l7(X|~p zFaQSt4@liXI(Npip8@n!F?4LyM0TUcj5edhCn192e8Nwp;{|C)j3Bi{96fl7q%7ea zq8Nig;(VVxebS!OaJ#`GF=!qhGd=9N@CpG`ApS5valY03ic5A{T^pwO9vWB1p<=@Vi%8E)m9s=nYFpTDkecP)HJ@)W;Q-QaL%oMu^J9bz zs3n46rIB&dohFMmO>$17OY~R~s~{Z=Mqv8%>6YfLs;QFx^`5eLZoI6})UnT3`=o#O zs8K&>Wn#SS(DZP+B2>dQvU&B@SFQHSy6-+*pe0HWJPs0;2H>Pwo$=@yAeG8+{eJW- zp8gpRp1r3(mh;MQXTWvh=uBZoqWcB)g3c6egZM!Qv-2Qg1dzn0i+B9J=_5_);aJ!l zzQE2z=lOZow{cFW34Xryb88I+MPgCXB9m4l3WJLXauPvt1jOm9h$I`vkJ=yYpk~dS zC3)xatdTH)7NpkdZq-?I22G==pvVxefNEMaElKJVBMQl$I%C1b0yEB}M*V#JFEl(DK`G&l7&mGX8Aw< z=l@WivZwqkVS&usxmN}#AnAeO?;}?gm3>HM=8o*$FO@T*Oqs{!7^Um5QN}WA( zwhZJOjEGYj4&H(rCMP@3!-iawNrmPna~p zv~O`@P^+OHhcRos*=X`^0B?wXh`LbRfh@oC>z$H)GF!qz!h|j!^i@22?yRLR0mL9a zPB)Mtszpj&5A-Mcs2E-(-bg=^W$_vAV+I;SK^hb}IVdHlCV`qIBM}r7Bz|N3Oq2DS zZ@y_)mr)72`kVFQGJ2#~g93wXEgeodY`_;%x%21FH>o)QH#n}bb7E!o^x1*|MJf+~ z%sX$rBX7R(rtICfSHApmyLhVz!TK{=Cb(3hj&8S$c$k+oEl!j|b`7`qU9 ze7RZRwih5TAfOpJjasL@eVrb%#4ZjPKhby8yE zV`bP-MTa)l%LrA@K_ZZJD~*j6l4Tt?&YeGJy%`aS80Iz1>V_bid4GCEwzRg$>9ePe z;sdCMR$7P;U|{|H{mj^sRz-Z=qAmq;)m7J7q*_y5V-X?BOxw0^v&fd~ZLBsC1`UnM z4!t2szrwfl7~o;YuCA=M8YOzEVVc4v?MjL`JUrZ}730Q_SHbia<0g+(g`Y9`m!y9W z6x}ARdu3{U^sD^`q)J~O6B8?|)~qt+AP~1kTk3X}*xYdh5EU3XNS!}tJkboWuac7f z&hb$1!cD_5j&7RR0E0n%zRrg=L)rO`K6IOnfD{N3Bz2YV7IoK2VAEg&1=KzYa3vET)dI~5ei`a3>z{`5KzbH@fl34K%-UaqZr}J z>PiznkDL}MwYO@`5K^;5XO$+&)HF|IpD<7u=vc(X$7zpAj50OHnNc(CGi7SaD*8cs zX#~4QTWL+}A)DGdpr4#pnnXXG)4njEjfBz{3XT!UfQI*mIow zd!7OI3KVikhr4q)#?cM4%gM8$PR#(1Z^M80MgMO22EBJkzCY?8sG6XGIY5zsJ&i67 z1lR-zpU~4Z{h<3u>0wkp`ScUXIFVsd9>`6iM*~rPdvu-$(1l0}BqzWeC>fI@6wsoz zM!;2|Mm@D2hhZEsY=n#&Im$#HFjQ;StT8$Rl#8ufw_0CFv`vv;!)Wn3njE*?YqPo~ zk*nWGKSQ=+ED;c=ZVmbr`8mKi)J08GRkeysuaz2dmd}pBIqkLp+>n-~h6tbs%EzV4 zmy9+N92{&LDMlVNEOd^zd2t3bBEmz)ZuXqn`dy>sw(72a@Yx4)`0!x~8$3{!4;m_7 zDt_K&=ylyPdV~}PPLPwDKE9>3*08Wp6B0m82ej;0JHC2=#?j>%&L2-T1GcvkEV?gX z?D$-caqO6i-n-%2=n(+`soHTud+#lNGDjkPWb$F7#~HWGN7HgW4VOa!56rqlD2mS+ zy*mTc3UA!JAtj|Ha#`igNTZUn1Tkq!Hu^ZvfddGC5ELiTTk@i0^VEq7p*J8vj^Tsk zj#>>g1W5hcwrw+A)wS!^%J_-nB{MVA(w<3+k_>vEb~MdYYXZgxSZ_#DsHAHV0Y@f| z$o1rvlNJdg30HN!N@&Q8L4ym(ef#$BGawJf6e9?i_+rULi#TV-&a^Zzs9KCRDSZqh zXk6M>9ZflE(Pv^}qIHPbvwx55*|Wz|#XtM`&m<%?R4$&sC=KYnD!n4nqrc3pQ^J3D z$9AAfye(QFelM?+*?;{=0@UeSy=t|@#l_iY%gxKR7FiF=lJxFb?R!VFdF_5q+%OG} zadg9^x;A>$LIC90cm^la4PWK44@tCPJVu558C&J@=f;y$v zmzGqjeiL!46Wn6`}aylR))Q|(NXj}AyWQ|ismm+9&Yl! z12W=%x2TaXJ~>#te)DUIo-k4Qy1tesCc6ruhH8!Om6u=9NNuk8sv0vTq}IAJFyNZPu07=rLc7y{3Fe>*w%SItc5(s=P`* z+x?kE)6_N*GQh!b8QpG2asK=PGvEq7e!w9f>!siAN{{t)=Shz<19&&C@vKgy>-~PL z-zbt?F1TzR;1PEQ(80!IZ2ojp>ML{C`TM*3w)b#v ztFHk*VV+%4;QWLHOFtsoO~(sbNYS{OmQv6>hy*um*r1e!2HC!2yIj0{(NuAM_Rb~~ z^WL&`i{!TEnpgnoRH8rXhG?;p=Ay_7yUx~ng*B~!j2L}%xl!luPLSt+q zNqRF@R8&Y%P>{fVq^^iaI6~l%`DxIM;l5sTU6wCjF3CyB2Ef_!5GQF~c6Ru`qE$$(qkqDIzpWT<%j z@)x3TUY$L)>6(@%Q$o!Xg`KQZS!VPxxM;$nJL`QwnZV_&s?~E+kr89x|zVEn>=;$1N<%w zDv?TuVSVCHnDFTdIXJ$ckkLQ z)pga@UJ730>=Co=d{Wb+mt+2!e9IPKbU?SlE5v!46h6re$BpwhEY*oB4_N{@k$_k* zB#q6D29QBuTo;Z-gLK+Jy#~ZA(IzQgBGOMk`_!V$H(%Fo7%D4PdbQMmLo_=^D1cNa z=-A-UVENUrer1YGjcS0;ojYd+8v4oHn7K02XQb)CZr|~>4A$s+YVH|HE-vppJ?*!L zdx^)o)tY;q)a5be)5q6GrB$a{go;Bj+;_MkgB|18WvY7R5B8I1F&yLQhFNxVeg@)z&L<`}Xa!c+p}>oS$f*99mc9<>kp3zcD7> zU2>(w06=64=z2jt6QGQ**6K*9QsV=y3Lpq)33)+i6z~pB!cOTXplPY&AqoJvXYH!B zCPMJdoo_7SE4xxAn?K!b1{N^@v|XcTMq97Q4?p_QqSe=4ea-5bAFAlV{=@stDO;4d zNLDXjEd|8|vhUD7m8L6~SdB<$p1UOdy3;qPvrf^dQI&W!#O^pB$m+qHq_zr`Wq!O$ z<0(xAY6-#@&TzvF=vLv{C){xKjzc=ev12NF?*ug4!KCQOp(D>XW! z?ao@q)T(HKhxW3R;NXtCs5K&J@V8I@X0mk=lOyDnS6(qBYoxA0mJ>M8$ zDmo@wX3m&t=~H-u0l@*Le6(}dPO0BlZ#6<9JL+simvow_xL#p~k@W!u1VL}41IH@y z9wQ2kgLEpK$+>gp%8jZUa<$~D)YjCR(}XT7^=VSI90Q&uhLKt|of+PK`)vaV(Me<9 z;e8S?DL`gSn_>LO{EPXfmr4pBKu=kDnOwMV!GJ`RIwq;%g(C?sY1+i^ng2t|=1lj)(Y6eAXkXtD2IMB2x>eT0Ix43wt(?JENCpfb9gU zMZ(F=)7y^8?&Z(l*AIt5-~#lxuTn>JqEPSmMc(Y$1c>xVm6{TYa?hw6k}`Gua6gh^ z+)p*&Y&{?rGvGO|oxl(tj|erIN9%F)9|tphv8 zZ|d}^2A&}`85|rew;FFr{`q`MeIibdhAM&sh>;^P2jB$*f>A`uZTd{D&uL4mix)21 zxu(vEo+-u{lqX^XsLhbB1UU;A66G62&JUUC5rYc^+1{(7nfd<(Tdz%rUpFlP7nP773Jy?J4aL%q01@ZbK?8a zk}D!2!s@H24q?zi^>W>JA6z3`D^5+l`^-Gv-|P=$9&WeXHq^77fX9336FqxyIWA&moJmx|tG9VH};F+|lUHs~L8OfXoTK|~=Wct(yf@bwmkKWbR zhsWVOf?x~`3~U!C?-X=C-mE*%>Wvv78aj6Tn4HQzW!)*DQS98gQ}T22<>i-OmS6t; zFRef0+BIuUnvE19sZSFxS6~*kM8GkuebjIu?}J|b_kaI)NnVmH8#Ur9QQE}0{ByQW zsBO|bnPc25x@QPi(59D*E=$(wECX;wMn+m)`_nC-N<)2vYh+_sg20?^}T6cQv+bD|_7BtpiH8Y`!=P8qEUj%fG6K0s!L zv@(W}ra)897q7l>Eu_&zn#>Nad-&Um&nfI|l#@zzZ> zZ0f+EI~q7C(2UL1@~Z~Kp+Pa+)Ie?W3pJ!Ir_H)(tX;j<(w?a0kZLR~Ewv~qG(6PO ztDsg<=E*&kBXAGVQ1uz+VBmGUZoJbEt4aXAU0JKVt!>C<2&R;xl z>DhgI_gSrRuy)3v)>)}Ek=&eIiwbG5OzM<$@1?>^W~>1K#V5p@p*^Ij*dhh`M1+LO z+QCC*d`l08k$U*br5YYi>^KoPe<~-Qd8_ZFJHD?f;AeYtg!i$&1!Vhtp?xm zBE4bGvKmIBTI#TY0fCNj>^wn_xP7qB&|Ki1q zO_vvAd8_u8WfoAl+40Q|IdtTZb@o`9w9+_>Sy@@uii@=af;J{P#`IgMYtl#Yjo02# zUgKQJNINPOM~+C6rts%znsw>b3i0aRuTihxyORT@?aepDQ~O(*tEQj1Oe4-Mf7>D- zefW{!Fi<~l(ljc~k@p?kC);;!H)Wxo&K{!d@HtzWS{%dJ(*%9beUxHwcAy-AN+vyh zR~;314aYdTVP=VrFan+)o58n8s6fNuCq!NI|% zpo8(HZ{@AJTc*U5pkfE$ZBDDxHmRycHjElAgKwxnz>Qmkc3mc&naS6Pv_OseY!xdA z2@251Ju}CI6R2T19WWFXwqH7F^=wVFXND=R8Z$25L^yl~$D z7406Xh|gD5ZD&>Us`j<8xgCf_6JU_1H)?KJO=+axNHem0*5k*Ho6!TYis2*0N(9Fs zJvp%dKr>7T7C;eNv22AkQ%*mgZc=rm{XxqP8aPO`SC2`#)(e;1^N=Lf6>q*)C4puKoul9WR(}2SU&`3g8%#wAKvG~xptZpY3JQ|->()z9P@sPH3kJji zkOXhD@_ME9uXG)kJpd5Vq`*nK?)wQkwzT&0_xHCxmPFD3khngos;bn&WW7*!XTYmrL+#f4{SuQ zsfaV11fKi+g-VcCRTPkrq`6q&%#Smk{S4GAs3rYax*0QgfAR70GJpPji^>q}hRna^ zv(IJgwyoAlgXoMpBpRwbA7ex95dweYwhTRjcMN+dWdYL*Q38ft3;kPXL16dl7$#K?L9z%o5@x}i-0?*M8UGir=> z(+Dv+JL-@0j$E>MiS>b`uj1FLdQ*3^&XBG|prm#W?%ped)d0`&^pb(9^*gYK>A$N+ zyvTQ$;pt z!z{OZG#VMvvP$V3W*GHXUl^p4*eIH`2Ob3fDcWe3+5k021fM}Bs?T6(#)`5Eiz?{E z;EZQD1G=}gYV8YN;T5GZkfOR?eO=Oyr5Rdye!_gKDME7~or$h0Bz(}P)Xad=XJ=(z5n6+2H5)7 zfBjdh%>!tm=OfW6qV#~cPUW1k^+Sr4v?R4pj4sX>TCfoLp>t3drLQE&R*Vp@gLmoY zt7<>We?(#~Gb__5C(E=}HDjn(k4|fwzV?crw`5ESlL3|0vQ)nxDPb>-ssZ=l7=TWl zHhr2I#Pes)Tm6$}%RCRkbKaZoAl(O!@{Q^nMq$~yWvk71P;ijVAxKOj^OR#LCYBJO z5oTj!gX2JUnnVjW*if}>)lC7h)3bW#rehp?XCAv8r6Y1wg&aB%Smgg~oSiP8qBi6R9$u-`yAk$u7_ zAEa0(hfX$wO!pT)BPmuQHLf>mjX0$MhT;<9EIo+^jAky~`vMgG|z|nviZsE1EYZhe!u0a^!c=~bc>qxqG_KexO zrqsx4y|h&M#pARVn6NNOMyioZRYQA4ReK^8{-2=Kjh-$|5z2>7A&7 z)=FQt=t7o0D#A)Rm|WIpfEh0p@?$kYT1vNWL^LSa#%0eomiOjMMS zt^|3FRH;QK%uBFniP|S17P@tCY%@X%>H@w$C31?aTE5CaF+^)9?vPUDvmaLF8;lAH zO%X~Txu*&@sam%jeW^hHWzcX5%eyE;ipnHF0Z3D|7v=qa!(@~KfrhG~>S=iD-E*4n z%m1y;zz}_J|5InBEg(he6dV*793-n(uF*7Yq&X26&R;NDJ-|Z<6)ao2%;t>sPVK#? zh>vT7%nINjP^*Y2+|r0~*EhS2>xpBsX6+hN65=~C--xph_8cr>S_1_D#GLfy(K$2c z&UtW*qZ?+|b@IBjtm;EHfK7|~k?4QM^-|9l@n^)VNssl{TI0~6L+m2Qn|2JO8y4YX z9+KXNadB}*yr&z+C!0Sp@;w;<3|4AJs?gDbh%e(rhMfHPq^aQ$*#U?lMflCmZw$FP zFJYeKp3Rl=s&W$&7~wO*s2Lzcsr?bvp^1tC1*n5$9GyE(=bbji7}B)Elm|)b5x@_K zO?Yk86(gob7{?MmN~s%41I z$5^dX@n83duJcsk%8pitcC^+z+ceT`oHki@>hBY&M-^#3R{rkqe`V-V0A^oo`9gN= z*kOR5*Is_jnkzFeMAbc^OIha_cBmg@Qi4K)jiv#81N~Z3%7K~&rX+#5I`zrzUv8JL zzW&P2&pSVRM^-FfsS)Rh&L6q&-Bt(2X<79XJ?*YkYL}K(Jv*vD(Qo+Zk4+i~R36>i zx#+pjA$3!OZN1kj!@Y*fjOjBBK;hCyCp=1^|6VUmz7(DNNu>XtWv@>MH(Ee!VL=K0rkmg0h|Jl5xr0VGN4oW8Lh;6 zc!qEv4<9^i&x6ZH)I+@)u>j6B5f^DjB0r1`Fy7-$6(_)%pg$%mTb1RN8X33R zd?TJfQVMP;P725FD+7fsr)AYo^lZB}bfO|^H)bsR&f2vLo>UM#u7g@%X;i{E0@Pg0 zEp08vOMo;W2;-2D5ZUzZCYdpH zhV0(8TMnfhG6x5WLQ_k#Q5QD6w!zS?7){cOb+vU?SLSoVPXvVtdKEq*oXEnGLgTZN zW(REcC8Df6AEwRRsw zltVOY;-!*$I0R5v($dllZ}JyQ-IIcW9z zq@<+wR${6I)E5SOEBh)x?ZbT=tCLoB(~5E#NDl9cB;E8@&(&f1t`MeEQ&UY!3@JDe zg{0Vcto44YrCK3Bqq<@eS?Y-WksE=;6j0s`iUeF2|!C2P9f=9M8dCED9=&PKLP`w zF-d_^R|H_gbC0E}T8&0}fVbw%o@1itL{l_Rh6X~jrX;pZX3@^=|EMKwQl!h>tI1^B0 z_8;Ca@BQIDyQZk&qF4K(cKqo+fBbFPCk5nq>OXf5$2huSb}<4*;m{3(6o45@m!so` z_j{fWNxF;;42~O$Cp4s`)=2tJr^O5;hLHLaH7HW84D$%}(Ytr)T z5QBn(BsnQrRxMj)a>!bKMOZrlE)cqnyaqOL^{sBM~- zd|0e;S0A{cNNaCJQTr>3mzG(z+IEU{JbUJBNtmBt1{2jCdRw-%v{*D96BA?7c4SKS zAJ}gWAkN<%)s*dNu-0)Dpu-$Ka@bUT5O~J`x{N2UBT6J4O-hy5;7Af}(%Ox5DqU<4 zXn5!s>gmmY;`dpg!3liWN$kb%=NQLcoXpOLVlktT16q~aePyu0QcEEvL=B5pMEri7 z!8{=;2V&0^Q9jP=oaglJ3}A>R1WYg^Nu+nP{-#O6fi5O;#IYGOZj3BkywK`@=$8^D z64}jBng)@gkM=%9VvQOmN;2FR92RVCov0UPp3IbECytrw&h(knt(Hl~VE3NgmNf_t z3YMDdHIkl@ZW3&80+SMxWSGw|xl(q;j1<%fI)BjZ<@}}dmX@EYicGYm0vSu{u~}1_ z{9Wh^)Av*o=JQ!bDk;yu>0nqFf9%y&9Ph zB5jNsz?_}m>@@Wtga|Nd%o~w+=YhdveyPDDbq6XKF@bq;^JL1@DTdVT{CsZn8rOiA znw*?$X;xCRfR#WJ_oabz?ErFq;%D3dIqk91PyCxa`s1@;A%PR^`6=2C2`_Xup$7Q* z)3U2ws>?h-J)8ju)Mx0@fde0ceL#Qul0)(6*?soUut;CeL-y%x`Eu)*X5?Of?R8nX zLeY|%79B8HBYy?w@RK+o(WKR`D)4H=$Pp&=Fsf;kEYJw@w$=_oow61pRZWMMWHbZL z&de4%TOb+^O(P*bL8`7-S^5(GWK+FrlkVOva385hzWmb5GG|tllJNIhggAVdrrlMM z2XG9HnXg{CY6wpZBZ%k$g9a$iGECOL`kKsA1Hbm7W-^+-zk@@6UBlzGKCXItvQ;~5 zeDU!ocFbS>>Q`pGK$^mBYal z;46dPrc=pF>s~S^+usxJyE zl$LDC%a<6{V(0Fi@~Ik%z@Q*mx_GHYhNK!H&2QSY$;9Ue4;WJVLU*hOVas7Ux0dwON!;|onK46 zHW**2b?wDp?UXU4RjPB`bxqw@bnA`4v2v%fTE^BiN`HO0wW3A}Kl@C!-)R!4Ep!qA zNs7T{K(%<|jW=Z3vgL}#^|uJwrI15}M<){MtE7m@pmZMqh@i1FYswW$3bYLxH4`b5 zE`6Lq8XBjh&kj9Lu6@Lv8>?d+-MPXri27q2eb?*Ko$vai9J{XWrku<^X&vBeZ`La0 z{GM^n0BlfOA{|73OXdQ_4>pCib#01_Y)7lQ910${e|Xr=_|ay7O+5d6zIBgiyxnLK z9lEFVUZkG(@+&VJhy>$Ev;)0^P5)@hQAH>plJKx_qh#D}ye+6Af$&7`Enam`Ck0Qk z*GJA$pqADpD^${rR#ichf~-S@m!dh39Zj={aM*}pX7ms!IFfQiE*D=mE@YTWx{-B2 zNW7q+z&^{W6{{?2{Pfem$;W^FSmLz)xT(JaSxT!F#qr>JYSMaldeB5UH-5Av=bV#S zwHh_vz9Y@qs&CrbBp&Lt5t#yZA-zn4U67{1p_(4nGegA2S|(CmxooA}QDY1rbmD|b zMuQ=B+Ig^{S1UM(?jemg8%+cO9axMb(a@6)j)&8M(?DZ!Qn{2cUSx2N?F}Bfhp29~ zy9HJp|yc)qkMqWyx5&%^5SIUMxraqYd5~R(ToO2(Bo;x4awZ9fErMv7~ksJYU?OMsxxLzj8QrOK$7Jo(_dLbLX-fBma zYgxsW%J}wI`yVgX|JfWtIMUD-6e61yDJ4rQsl(1@OR980{{dE)#8C1W2GV5&xsSmH z!c8_hC+JMTFxfcutf`N%VemIHStZ3+ zGzB-nbXQ5WcApw^D|GX88O;}c-k!JbNBWXZ^zc-Rm0Jjp&&StCZfZ@rs;0`$FXtK6 z7C4AWi<0Ecjc;0d6hQ~-h4gz2m=s`YFBnY(!|fXAbQ#du<8=0Et1Dte0B}W2jxcGu z{rmS@#5i>5P@`|aT`Vgvv$aGA3rP3y8j-gHof;b(D^NPp(@)6JV<{4@DgJ*fE|UpO zJtI>~eTT|cHGXFf9MrYxp&|yOWq@WYQWc2v`_fVwe7{lNnU*LoYtKpV(PL!mmMzw0 z1mT0)$+hO-0T_al`t5K(_6qNavPM9cN|q7LSWbSn4-cMtc!gS)@M zb9j8$VsF#jIQ<;$?`PoYJP%XB#Y=|-c#c(7RWfbLG^;P7n1kv{x{6M-=`B@{JaJK? zZJc~=*T#TDfj4atBR;{vh<+dGPNp9*=E30@ECk8%mt z`gq9!O=IqZB2rf)Aqon@z~a=kwdm?oT1K@-$}NctBv_4gQE8d+EQ!d_I|YPsp1$;D1ji9eatge9rNff_f!v<^rHbGOmpnto}z3a&@$Zy+A@elN;ea~>;#_AYH zH!K=Xnw>a3Z_pcD#?lRM_1qnjItVSP4j(vdFm{^UQfJz=dzbxq4f2w^3aO_-EQSy{ zG8bBvloP5X@WVhy_N94y9!@0bzVs96a^S!LJBOn+qC%C0PAVA9O+VWt|L~9hV70U| zH5$|%8|oY6^S^yA-Xpv%f`eW`y;*l?1@35OK!ccy(h50o;)FH3hSSIoYBnHSQBxvC ziczh*S!d59TADmzvZc;2KnD&Uu;>+j-;Br^n)3a|2=oA1pfa?nAxSx&D*1{o{X69` z{$jB2gK0O7y6!~;%K0@bWSh#|6`st}sMyb_7*H}Ql)p$hAUSEVw$cjJh07B_+z5bRgU%Eo-s_SIOH#_93onILk4WLr@X5N$* za3YAlNi73n`{2V548XH&`7(K3^8zW{oe22GbaL3ga7{D{<|8-D68QkwMcCr zCjvka)DGV7MK+9FBkZd<&&YCmwt?>bE|Tu;YsfK0Mv3ziWnRoYi|FZk z$&qTrD&(|s5OJdDMTx{*fo3HNR6yVt&3ENDY8c0AH2c6%W8EAYB;}zR6{;lMIE~O^ z6^MhDD;lWVw{4eGr%%cB8Pk==7%!t0O?^<)uAeEbgZ5f6Q8BV!)2!qD$IITmd*$Tm zlU7To*12ZQ8VOQ^N;71H01#3~CQ-M6E`#-qI0ETs+PU#KfEpZ!LT%0rC1&yBWTTDn znV_uTu%Jvtx|&E42eSNHx$#7~rh+wcj8h5==~Z*cc}M8Rnzec%uOHnf5M5w>wtv5F zliX#-f7l<6ar|NP_r0%XvAUETY_Yo0%lY09@+=?3ky8&A@2*7!ps5!T9RRi<1r!w> zWtx9qvcmC$`B}>Ex<5HUUF$7qw^)~Z;o@aLd`JdWH z@s3fSk<)~h4z%f14PAm}eSOL6GA4P98A(U8y>#6ZdW<_ zK&n_Ylq7V#+tDoCOI4Swfh-H5tq-hQ*gx1zk7pm3Z@&G;LT}__A|oPgLjc^tra_*k zqXKrELAZ&HgWME9x1~kx++$1r4w4kQKe#*rpQLA`YeD}qLspW@qJRL(i>-~Uu0gKlrC&-0A zd?p7p&$)j6Po_}EO&ljCvpG~4CL~FK?BsA_MHmz-H}`ObNJO)Zy^x%o=^mYL25Kl z(YxC($@E`+f);uJHUKtPcrQUc5}G2kjP*Ne#3;+9kiTMs4el3gAtUEjkQpI2tV2)8 z#QBT+{dq_LnFodhN}r%UW}Q<|4!QN2(`SV84){<3)-k<`gQwPlWc|=}Qa8N4N0QhlQbIoQ9!*@$cBaL%L{P*&JmK85%d# zHc}9I(1Fp3!8kk{oyk>e?|5fDSS~{0d3mJlc%&$|IZUA16}|CKmbWZK~$Ds z95{HOHRYW!Zh~>2vRU&y2?^$$R$_1c_u6Z(*+#y5_ip*?mwz=+?Y(#3GgK&E&du95 zZNsjutF>bIfBu($Hq`4M|KX3aNJE`x&g2?+3&tJ7hVYfrD-va6%2~a*z`j9BF;^fR zHIzGAn`-xJf??*i=CH3#87tSdOytOcbSXHUFG<6b73lGJshFT!!x7kpIl?#puVzBY3T6EC`EejH}A>ZIm(8kq0S?Rj~F@|5^;VXH({I| zAFxp4!TncPRhuFum)k$IzbeOm(!0+uTQNohG(SbC5& zTAtRvn3q`b7;04Ov@rZzTSm0gVB`u=*@TJf^3o+k&1qZ{B?^ zbu4tMVJUaC0tsj;tGuk-LgTcPq9qj`BShSR%8nZ4J?u4IM0%T6WSUK3?{y56 z_?YGgGmm6iZWLnt=(uQOal%8T%!HgcsR2U8ernY5IvqmD_k{+9TDTL>Z|l}Ag3_e_ zD0$VHx^YKGMJq4tUW<}=Ul%`f&lm&{D$tpP@bi>uQ#?cost6hE6@)^aa3}y2I($$A z3P_FcGofYHlK0?u5WaA%GEg4;YfFQ@6mOgGJh$eAr+smcu5$E&RL$a5qt}Yr;dLZm zuHV|r08m4X)+G&h5#niY{pQ-tbJop=jTypi%8_8PL6H#3V`HMT3JPM|_HB}`b%Qh` z26+mKbNLU;O%XySj<93l`JFs0ojvyM1d0^;ay!nbB_bWo{G#Lo7cE*OBNU*Lmw#4? z%TJpU9Y1lrd1ch{5mJN)H8L{N(3v|`X%S|{6Jj1@9LX?%4_#gG4*3GHO6x32Kq9m@ zFkC;|L6vOCPaB$)SB+ltp3uJ1QI*bM_0mvkggpsEju|(`(72QqUAuA3ytZ+QSfy1K z^@oSj4q5(?%@<}TT4hmIv2*)QyADFkv9YlhR`u)J&1!e?00)N;HlqPx4ZtE$>g3W% zA$SiI9mWJ9W=cR7%wJ%QnfrzI^M2cXKjZD@<>eW()XAKast|jd_t~C|ZEt}Pl{4qV z`$Zr9eE-w)(Mj6vVRfNCuLs#uWQ+w&=m+2g?TsknPDo6Ui0}yM*0Gxz3-wxOMjmCn z7Gaa0>C{whT1&a1c77dwlvj1;teMu>7q4pR(xq15{>q|PbV>OZ5t%DFG3^nBP_}p1ltazY!XZ(#ko8{kz z57$zW2{Q7`Nr_sqMtYTBe&ESm)YbNVNDsNWzQ@vc&~F?QluiHeDOXvzg; zN;@tXf%YHVZ(-IsbLOZ_Co8hm-{aL^y{79;6!hf(fHH1;?zZqd`zhWddx*9+&|A`* z_t9{bqYnhzpb+)Bk%MVZgPbFI725e=IbW){WHn$w;K{+(-KjI0u24nj!Gr@4!c~qf zcZLuNpu_;s3S6IrBmqX8%04Mu1GZ{wr~sKXev%9fA87m3%9Sgv$0E<3+!v$(d_f5C z?z`_A$p9gD@@_;AtOZo+49Py4Z9PCi$KuJQ&Q6t(0b1zqmuz{*dIi|@QDqVIfBoO$ zUv{ZUft^>PffK{yQKTPHf=Buee4+Za@C6;rHY@B;u&o#mT@@4@@^@0q&AVM@>NS=;($p~#i|un_|I#UXn-;WY_o0KHuD-G z97st?v92O%X=$=+_bwwr7@j!Xlxd&fzLsO$tAHC2sc}Q&tosOITSyP~?b&CXtI#46 z67?QLRk$9A!WS)BWJ=%r@7_OybcJ4Vmr~uK1Sw&FoE`FYYALxt7<_*C;Ri#;lgot1 z*uTqzC|2*|wuzs~Qay)Em8%?mI9qJ7>r-@;r4LWlq7F@uzqny>5<5KBGl_K~15!W^ zj#ur3U%kNtgpu$(*&tD}-hXRRH`tCYhD{m;SXohN;Hrd#VfGBOG?zzPE0C#^r%bjk z6el(02|Esof`|ZQ*zk~^t2ieKbqPv{QKh-aQ*!e3Nr{Mvu)kC5x@Y$u^U^?~lE3Sr zMg8YW&q>$rU6m*zM7pZ2*>U-I()oYnQGrV|LZ5Ri^Mkl)@#8(x%L0 z%eF0+V+DymOy!ZR=VZQ~%{^M2J0By=Zz94z=00u$%z63c2 z@3Gf4@={h>W&{jGVn7IU4S3e96Hvq`P82vs$i?#-RBpm(u!FUs|FMT)WYe*hdO=wbZhRrX|v`P6^s%V8YaUN zh8taApI&_gFOY5*lr_Yt7X}g&geRLipd46rV4j&cX`;-SF~bz^=YRcNx^(IyfB5|$ ztcyJa;DCIBH7q-K;VTjaD)E1PDILlm45z}(yS1)HGKPf8r^=c$LUWUpl`LJp)X=XG z5)4zXFa1!OtX;R(xMJZx#eidzg$I^UF>?<^otm0z3{T&${9bnM+G*gU(Mh9a!h{LR z=NfD!N=Gx5`25;+88UE)brT5=(f*c4kI7GKf0E+jVxzlbUc)R@UQvGEGb7yWC_sQs zl#_r4ra^I3bd+5eAK*PuFp_`e=c$vYn&*fDN1^iB;-X?>(!tAyoB@8;wmxhx#eVSE z5I((KS2_AXyxyLoM;){;&4?1btOebfT1@@(`k&2$r?Wc~8XitM7674N_{u`dq39lE z9wr?h==pd&=eWH2`kOMZ|2%aWeDHwWLq3rNc#bH*P3t#V!ThY5vrKvM96db%JHf=FP>1V(F%sObmu7eVa8mgcg&GF?b>&<`v=l?DT_8+jECH0FmL?-+Q=!SDu zT&S@Ag(;F^50l=D3tn0v z$zzix@61_iNrh4ZWQ12r-m;*mK>qxfKMMrxj3rB!n0NSv0+<>rM@S@891%cBmT3 zMUp3N56Y3}M??+;yl0>FotAW!qfNJG`#-a8?j2HnB;DWJ*A5T-{Y2Jr`Ek{c1{kQS zuCfg=I560hWAV9StM{^w1zvL-5DzRVWhG_SrU=gy`MKl8NWi=o4Uxi1f=39m4Rmpo zCq)d2u(BMK;E~KD=4HW^`}^Ph-st400fa^nW+c9!I(^D`F$odEm_vPETwI(XFkf5p znkiP;T%eo-IeJx#@I&=$(9-Xu(}_F{D>Pz4>C#DV#79c`r13IHnQUfGouTz_w`I-R zHFDy_2`kMYKZ-ZDW$PBnNcXhEijIty1@p9oV&Wv@{OzL+j6eD4W2JPvY6^(_IN@SS zR#4a=S3%tN^y?`be%>H^ckeYKfDwr!WZ}Yv#;OB3Kv7wdk%5EAB|pjM0N*@pkUD^j zpD0Q7wQBPo>7?O!m3$`zJ4QKc@f7hmiLg+2%KD;1$)}(ER%?kbo1%=2jC_C;;9=)( z&96JohW8%ptNU@4qYotOc#Z&asClvn>7@jGaLN{QNb?$X!5%+$TnUsfYJa+!LRS*P zR@AM*Y(Ya^@-iR*v7#Bs2)Pk*rHxU0L-~57(DMFI>#Ez# zSI=GsKp}k2v!fP|M#$tI$*qB|gtY}?@A!mx3#ZfhBQhe=6hcs+AbIDVcjWTL%d%z5 z7R%?6#|#@VSjK9}NA#ggQ3inr1*6KMlZIxK{>vX_jLt1hdI~)ww{6*G3MX=Oq{PI> zNbRj!BdRVeDzs~0KF(3z(wj9mWyAiBs%+}alO*(tH%I;xb|<=$;7vlP4oHX3@6%8( zT_Na>F?QTo3v&{l?V;c@a*u>Z0nCgWJx;1?s!fqSc;PzN@8#4Zq9f$3x8JhR@{|cv z48`gwN9S`WMZOqT^Qd0%iOdtytw%RW8l9y4w{g;)6v$Eqg{{%zI_U+rP z$0G|Kz=IhSI^S93wD#)Kv5V)mmUMIN@LDinAdIK6@ai8{TX+(NmpQZNSbmNY4aza7 z^P_h4#`POk&Om)0-XlsRY(SXh)IR&{GpVesv}geQrR3;fm09@eLJPeD)FA{)EPaI5 z%FfDBB7vF*6(ix)gPm^6(cAShU&E(E72HCP!<B=NtdvGVe(t`-Aj*k@31v`m9x24K*PnKNX# z5}wocie|weT4|aLxCMYsR%Vt_+)MYWMtKv zRaWmfEPj~$?hn7ST1YO~a*Ov}x#t&@9$$EfFhrqf@g(`3JSjQZt=qSn0-!TT%FGlq z7+Fs!xbv0gCFe|zkfH!Vd<(DoF;vBTwz9m^DEp|31ROPc{%q^5iK1~w(-Lr%W7Bf^ zRj*>vn1w?~RVSux^!GOZUv=PC@L?7{8zJGgOBXMx570q+tECR}2nfW^9Xi|QSzKN$ z{RZ~ayo|?sZIF|0X#CvXjEa{2XbJ71c;0yZ4a*1j3+pHQ4(ziqcd5QpCb6~Q`k#0W)K)>zL$ygWkfgko!N-Z0OvsJKLWDQfjqh3U_~sUdcq z2aQK{puc1#CrVF6H4j#$NM4R(pb%eCWGj6a0ny+I?%1`%A{21_CPpV3O&$EGTQ_et zS~;Q=kc&s_^%oWv%G$MSEq}^638z9vz&&l=ve~#@c^!UMdXu7H=&XU!N63|Q0mtT; z%-@HFImsCsNroyq-eby%h^XEwULzjo(r=eq83;Wbr%s=0??ZWlRHa_?^*3I(R#x#! zc;MIb@m)7izUMVm4b#uspVk@=?4a;Lh9d5$0bX*dY@K1?Y7J^T&KL1+!I#qM27KCS;^qGBv(foZIm#2_Uzju>k8J{h7Nm9P)Lv#`1ds+3N6WK|3p8*AJ_b7 z$W{O_|Mj2#>%IJ$_8!!hRzv&)OsSQeE0%*t)8&ei2Q1KIy{YbD_eS^|yZb&pB;d0T zWwCm0qt920zbd4dxEKS-fbN9+J1#!Xq7i%d?vqtNtddh_P8pDB-kf>HAd_}5O}6jY zZu!As+KTG6MXzZy;V@aXdX@aN?k5Y&;?3c;kv~j3a7cby^OLpJ3JD6ayg5K3yy-px zeGJ$`0X_hwA%lk4Ws)j@-3Cw3d!RHi65)Ftp@sr^R|jE=0*6rt79yf3P}&iyh49@O zD96;9sa8IMvV?{YPFg7GsxDTU5so2hWh&ktp&qZBcKHYn3bw|{9Jg;TW#{pJk8_gN z@Llf*8ToqrB6(k*sU02P+2}jn)lFW#M;p)KVYUf%K zhy1ho*6xQzj&<%7`kQyn4X6=;{ICw)(Xu2!3nfD2fKm?ZJ0OJxg;x9cvX)UKjz}~w z3xElYtUGq;XlyxzP66?-*+Viuc!;7um4@x6)=zd){GrWwh^ z+f6K%K0T$wTgqtjH=jwodZj}(oCpy*JfU|PyFYkNg& zEr|64dIreHAAO>payrqZMjjSuv25x87M>u7Wi@o-s<6u!{!aMmZoVplCk5*T1vxt51$KFwknu;@cya6 z~`OY5U0&-f-rVX#nUvu^D=*{CD{SFc|+BPe-PvJ@8-OS#r5#>5P@ z%^6_Jp@WA^5dkboNKkSBE%iY8Ob?Hgk@{Nw2k%L)DwtIY%(}~3>OT1B10yMi^qX_zrA0(U2+ErV#dvrQ(s97R z0meAvuV9>IN=vs_Y2WY$LE##4fGWac$B#)yrj~$csRiJf+4E-0=&_@%Zud`r`jcd2 zWJvOeWcmAl_#x2x<$V5vdV!4w$_#PgG8_?P_ z424ejKnQpAbwC>AR|10q4Y|rfbqoqZuGR| zw-7~`R_Q%mGD2~T3^-Q3M`z8^@;V`G(5Dz6P1RSTAo*(TCD-h$wl(-pCpL(;>Dk!u zXZMF+BLN;Hn>`zUTOSlApFDBW>eL8B`E~U(N-#R7->Sc5iqa;w&TW(?N>4Ib4SaP0M8B2pS&1(Mj8Ppj~=6FPwl*-;YvDKfZBvE5Wvd31@kN? zn3$MoO7g3v-%3w?uCJdsCH=JoBJ0a9Wpm9n8FlQ0d{(C(VH3A|J0w7g=BCPb3hLSR z*Uu$BHb!|#BkY}&HP9A~d>y3;eU#L^q^QJ{W$C$6s~bcqlWRj+mX_&jn*08T|NIXE z*aby#F#Vu~RZ%D?(wQ?;O_8qqNlQJx|K1pGX6b8hyzz#_#l*>e^)UGx3J|m@Kp>PS zK$}Y!G%BK=@ziNkrMq8uIgxYXfwoo1jTT%}l)sgR${=KaSowny4{$vodTG~17#dG^ zpCW4a?cZnRCbMSFmXS##?7WVs{I%2rq%gUAJYPIyx_z|e!Jg{2tZJoC*inW6azJM` zSUausexBsAQEFJyba*GvWY+AUaPtna*im+DAh)$xn^Fya2T0&p*T@JE4jh|ZHFO5* z)g3KM0@R=4)y$nUSI%ENZ-A=Wt2dNZEl&b^_mU|}Ku+O5Xi>bPPd@&{YFR54JhN%j zW?A{;4>C-_Rtu`NyyHf_T-?1+1F7}$`t{oq)D)SFA}R0AN)h?=Q|a`t|5L+;U8GN7 zA1i%0dibazQBl;CSKuAO#zQH@v8-bzIIb1)^CInT@s%oKXbJIb-+%9YyFSWMC{H1m z3gUM5tl7%mGgxz^dB&=fot>@s6`-_oQ`HDawtQ=0L6Mb)aDw5(hg+Q?3iqs1%dOwM z-g2O0lE+A-hK{d%e#JabyBPf+o*PCXpCe?7GNY9n3La7nkh8N=v`j>c`?)4O(mgx( z7*8w;4=&<}sBl99JI4gj6CE3^ImP~Fgrh9U3%Au_d#f7QIFP;`uIK0j37az1o6Zw>Gf6c}VoIN?3Q&5MMT zo3e@u^|t0~E-dhlpC~1&48L?$`l_KcOc{|L7@d^3esqF#{qQ{*tj&=B=C{9<1?o|u z25Gr%#&9Sy<@T5}40C*=dQgfH85NVyZ zX3ZKas;5um;zf&%Cl!MHHCoa^3oCveHfWep-St(PIZ97JgF^HT**Kpe412livaI@X zmDNu2p7-8;Pd(gtQ{>+Fg>uBR#H;S3wZ3fhs9QTOxZ#8sf27TSA>UdBPBuu;f6YMs1@rZr9&YFHDi3+jlCr>S>A84j!|V`KWJ| z)&uJ97N=2_SoI{kc+CMmdslzI7BxWX|M>UPN0kN866OUPevOt$tXjF+CIvMm4bUb$*QZ`zf!}+G%Ti77syWt4LBA#Lvn?NGtj_CQ=l>wS@)jZ zJ*foU<0&Wk?9jTM)@AkK5j}eMsuQ2;t>&nIjHe4<{TU!^?r~ei0;t-q2}!||5+0N)&MWj<1ul> zaQh&wCpWj^W6!@!#Cv zTaE-!C`p=M9HMoKwbyHZr2n5;E=HCnc?Ve1A9(E`GuTgH1@4l*QS zi2S$z=fBCu4I8Zn@Xfd0lsOCL$dMyQWX;cOr1Em5L`Fo)l2@0Qf~4!lmtTEp^_t}W z@Jfkhq-UgCYc5FCXU&==AAS6h)#8#S*t~VKHE!(Qdw)O~cI>K_<-KuP!Ax+q!X~8@FdDjDq-$uzeQO0p&z=Gj zSQpEE0|ugkf&w{`bwsWy*lA?aNU2k>9D~nbJQU^^ns*5xC}L=&DNfd1YZ*ik@XkH^ zgzv7~RgONG5vB||u0A*1e`9-j#D3s|OL(D&B(zg=twt`KzaUx1v#fRtnNaIS8zFL& zO)16~deQF5nn5Uy%iyrcBjx$w$O1!L*=?)BHD zv*rsQJ?=_Zl*R|`{%(J4-5Sqiev*()kNxk6D>wY#QDxM{X(UF?}CVxk9 zKAfZ|BfL~tcp&dCSH({)B+8SV`=}A4%rm9OBHkal(dG=+O{E$bdv@)SW#2C|&oL?@ zN@8MTEmz6k&sUr`A`R9LulMfjq0e*91B(vV2oVE0Q&(mJD!ijkYmcycLt6R?%?STNq;&ztF!S?KgQ-kHw2J& zZ@%`X6>5hK3NyBj$AyQU?h4#by-*1#&_v$*jnt{qx&7z=C4MDz;837db1q8vyp9^) ztPJTR>w^O1@a;O8t$Dl~>hT;od_<0EeI&?eDC)+I8E0KUwr$@gxp}$fNxt)&cMRN; zr4((OH*YorjZps^Z@yt=CHoKTw_c6#n_{eu88^lv8K?G~G9vQgl48s8K}g=izo+F> zfB4}Co71tXj9z{9Rm)GJ3@=`|Xe>A&bD@;u+^{~OPzlXa!qn7wn3qP5o#R4q09qAF zJil&!4Y^A=YRPTFz1mCB!8Avv914`KGhojl7aFbkeUvFVQRw6tc&v0DIeq%H8Lf9T zC(J#l-P*c_Ua!lL)4Cp6!__*TBi2oOX<0=l4qE-JUbWilvRH8BQm|ZO)zXfSidFc0 zpygocdH`o6T%7(Ij(gZ<(I8Owht?qh^=9ryMM;GsICm+fSy1VEnQ^C!_%$bF*H=~P zYp+Pp1@mQ$HUf^-P;5e6tenX?W8q6Y!7v5(OrJhoq9dcN_u_ZUzSI2nY3s{4ZSpj0 ze+7#Vt*THEczV#K0SZGI(6E`BMe>isMYS1tcaXOg_rdDhAbW!9WQsJ37KepdTSTer?#JDc)$ z_*d)H13#O0R`%}SD|n|+#lczYJ@5b_*8p9MGW5>t^E1fUX;YN~Pn$PKL`GPhX5-MT z_wicV&o~~)i7$^6;ycamdX7GL`i|$=UI+jXAqC4=q(J7W+XBr80H^%CdXH*FXKMex zI`sljqOhl+7^hE}Zr~g%@$kWOa1Z(XCD4IKmRP1mnyYxafpQ(@f5dj+ioqXK&(>!fr15H$}uSS0R1{?!X$0t{D##b zlCxaDe!Y30Fw+biI8YU2kTF2*+PzCwtX^Sx%im4=ohcl=%}eJmS-z0cm8vUM4?FAT1yUeSJyv~Y`50|P>Jlo`2DC*(=Ulv>DFUwPHaI)*0OgBm}(`7eJp*Zw1=av0CD5&K~Q_Yjc&OkEF}PgLItaaeD}>5+%9y7JH8;InSPd<^<*{M=kTxbRM1;quH z|YlbZ&rf_9?^7{JHZLZMs0> z65}l#yYA<8mdixB5vH7=NLdudv17-KZ3o2)^Us7a6Ksytyc^aU+HTR{8PWrCoEU!D zr?X|-u5HGSL-^NwF#kcJ0!pJSBPue=(5EQMA|)3f7VVR(%RQZI2u^w!22g~r zbCGZ?G;e@<28Iok_=I?)qPwPmA}A11ei0E7rlcoNova>Ty>P4_!Zi@Uh26L z^4+dz-L%7L2K;H5@Ao9i`RK~AXU85%9+_+%NxF6FX5byVh1tdYl*iKK2pjfeXla(NCh$`Pt+NAC{Ds7!r=K zX>@e7Sz;_CXCm_e8F)m7RBd#ew)iUx4t`6%*dR?7_qt9sp2(I=*LBTebw}Hf0N&5} z^7B^TN;o|_N-51k`iUQg(bX#we63b*^p}!_`|etmM$N$t*{O4Avyzu%c#a%3QX(QF zY%WpEPS}*N;N}m8OYB4yZdV=m^clKRvNb| zNKb$+A^k(7vtMT;2S2#)pj4cz5G&D83Obl-Fy3GQLSX{tp{>^JIkT+>_hil~BO9R5 zo-i(9Sim@R+km=m+tzJHzE1%^=>+b@d*Jolx_!%149-5m+F^~<+^mu6nrdssg*j>4 zNE1uMLW)hi?tLETXZEYIvNEAV2>mA^1VE0?Ugf;6HGSv)O$I)`Xg93d3;|n{*WG(8 z)Iuo7vE)dKPZ&QzdiA-Vy#nR=JRV{*ZsEDSwL$6Ki$NMS2DCbtMk+U^dWRR9)y#40e zrtDU%S|Nwh4q3Pp!fyCaApqFBZ?EyTf?ECH{ST~6qfYahD44+m2V2Mz9LvOpu8aCt5-M{vG=*4~b%f31{(Zi-l-L_VH|^g4?-!r^Lm^Ssz4lfB??E z{OaH3=Z!yGKK-rN-ZF$L3O6k+O;)d7ZLO;MsZjvi&Z*Os|fi;RkRs4dZOz{mW6!2%B8o3Fny;1Vt4-u=zH8aAHLkjH$? zAzI|0aX4^1Jo}2r5%I-^y2|khrOHGjf0lJLOR6qcnPm#hngwu3yM+TVNg9)6i;jn8 z4^E$3{oQ-DPETm*J>liF$+rQvpcI5!G}uSzrqGE4e8^Ca}cp-@o6y6FjbN ziVE$h)N#Wzvvob_(EpY9@{=!=YbPM9!3N{UNl_s-o?d9l($x?{#B>)h#R zy$*j^^@E%(IBQ^(xv6uF|Mgn6rw=0Qmkt;xUUJ|Vy_>gfmQ|}(NnU=Qh5e1yMlT;l zM_nTxGGXJXQ>Pjl`?{7Zoy|RK$`im1(IkK~wDoGN9O)cFUViX^!Ipa`7g|zQVvVAa z8F@v@IlRF-Pdfz&<6_VgvL&C%y`{`Z@uW7M_Mk8LbI!i%aja2{zS~$`<@kgTn~8>} zNF&iPW5-x)7&i0TTeVWCmNAoj*oa}$y|bs_);TQJs}nwPUUR=UApxD|^myEtV&)~CG#-VwH z_R_NIo|t~sH;{&S37JPSZS&!IxXSTYiS)UB*oYq9d{aZI)6K})rrzBNRSx5e&&#cV zzH)W)Sh@XQ{wUWKso7asZU(7`G*PM1IxCoEx#r;_R zD^5&QjMXKQD+A;O$0%rL@{-gr0?Hu=dFs?Dt5f8r>u=SY(Mkhm4BN!`M42~xo|Z{O z>alY@-8&QoJ0NU;%uJbSt*vUbrZPJ#+mtCvZ}P;+vP3&?zybssJ2E0tXv0MlXTUOp z2M^ZLi(68nNYf4)DxN)iwiV}(n=oE3YR-~9pz+{Z_(vX<>&2_3rz6KksnTc}5`X?q zF0@j;&p_Qd0aYQ52lkT`78v1UFV8xd|5Rgh>;$BSpL|TIX;m z(_iA^&a3YCM@ax6k5lU5gt8v>e)n%JM*^_9K%$Kzp*7StMQwK1NIdCE zJL+9^F^_Q3;zgQ!3zHesW~c{PF5jFhm8!a{@{hfH%1a7lId{EUw(Qs@8R;43nb9K> zkBvsb@o}EK8FX*FM)*DLP?{l8$wduQvhtMaDHf)LQ76A3-^v!?S{*lOoHZZbymgB} zNKWYmIn2~qsiu&iZTn&M57v<*S;Mj)e5AQdMUHZBq*Z7)1^5O9hxf(j4=dTh=YRR! zn4l;F0T@IBv+9*xEKZe?tC@AuGaLsDahw=!LD-j67o&$AW&LVYIR80 zZd@}93+sTTHQl<%>VN%LLny;0lbSk9 z3+T_unje2Of{1SFiJf_KiPS5*j#dX-c|)%ry{xoifz~AAgsoA)PI*PS<@-jAQZjB; z42Kj5vuWcdxpeuGg)-^uIA!t_%m3{^xZj8XMvomWGiT0}frAHHWCCJt@|mDslSU=U zz##*rD8ES7u3IaBaPSfd>CaMxszyO2BQ3)e5(MWcFrpbK#+;Km^8L#1W%o%;DufG0D^0e_XoUy4h zQ?1<_$E68!fpVmxWTT=Z&5Lck_jpee=e*vpwbq~66L2~@>p#!_K;F?e!&Q!6as_n; zV?^!kT0v1_mEq0!>0}R7CXKR^GGo{{dFrGk+{bJ9B)DI&)jMJFQS0YDoR(GIuem=z zLIU@~CBWU?(fTC7#!b1z;q=1_GC3z9YB-KcnW6M=39?=b_Gv^+H~ZPCvz3~yMt1Mo zEt@uPGD7i5Qzpqs^}K@T%n|=9)w1~d4F#<27SfYBO+vLkHzZCj|{)fN&4;HN{ zE-03@tJcc)UE3|pmNYua@`|*II&koS<*o@OLLE1F$YASf7^EOCh{>m)oo?5{wN+iL zlKuPk8!Gm?k`_>}3yHX&8pSBaua%SlVBLJBw0l_z&?&sXs-A0ldb+XpkSh-i2sEXL za>L7{goE$i1CI}40D46dnmv3}bFD<4)B^_G6A~O^?X>VHjW70WuJqNAG)kRXPLv$` z5+3!MAJ>={{_?_?4XI1cw>^x;28S>2xlJlZ!WrZ$x@g`2iX&UQgZ^t^=W_# zaWC&-(kCc)Vsvb@S*mwCYWPHZ$dN>+=4s#VeUhJ_Zy^!Tc}FsjSm*?JHpR(MRqD{NdDadmr=ZvOp>-Mci@0OUDXdzN)3sEeq*RD3yGh_fSEzsVJ3YLNEwEmWcQZ+X? zO3|j>w1MydRltW2WytCuS9=h!x?jwiIm>ugYgNG!_5{7ko&l@OEd4C|#BJR>P}HDf zscD43eEh`mR-jK;4-_V!X*{Z{t7Z4@-PYWg5*6g};m03Z{*?EUbBC}10|SGb#>%fP zdCm3~j1TgwTPE+i=O_M#k-k;{;S6rN&Wu^r1iu1K^DLuXk{Q;%PiBM@#Z zzTJCv+vJUij4+PHp+kq7f`ky897E&LwO*UMYB4Zu7}O$xeq#aLu2cW;miAXu57TlH zsv4b*UVm&i3^|SE)!g45gMv_zwfWNTO%9Espghe4QA^q#&qe~wU7fg|)WB1S6)&kk z^LsSf1q9Q*TX(5bl`9y)vIOzz`NQ_(Yd2Xjg|!EknPsJ zn|YggXYvFj?YW9`hK!#xcaAAeQVl3~_AdIP8WDPMu+>fCeYUHi^RqFrh%fH{K`r2m zv-tR!Oga|l4Mm$#)3b8LO5;p?>+QE>{N3>lXQ#&+6L00Jm6DU4V*>7ZsHaq1sF2qd zzou*&@ef6E;aNs%d_N#Cz$WJ1Iz^l*FDQ!upa2BM4hqa!7__Y7%f?e|I1Lxx4t{7b zD0G8nlg2u1c+I(gef@@p+h{C{R}X=7Q-+N5cK7>}Nr1I;`O;;9` zaYaL+H2yt!=%7VpMokzcW0J;L7YRau(6o(C*67NhAyQmeY~CQoCB^j^umS!7vVPrq zE7k`9M?Qbj_(>Lm+_Y(v0cl{pdHe0R1x6e?Za{F)nx;@61>3V%PuaL-qof~7mpgTL z44i{v^Y7trAfz&rn*{_^pM zA8Y%n9=85Ty)aOY1_;uEe?Vm6QQ;Dz`BmKx%;UqmMDcqMQ;vGiXHK87&vR`rFL>EJ zQr^ekZ{4|NQ7UqmC|eXYo+;jF&WRk$ub#;}W6x;R=ur|kEUwx7s@~Vs8h=Jk>=E|m z!y9N5$`Nl7RGP8qYgmU|1~Gc`LhglB35#ZCWy-hTerw^7g$oyI3#GnR)W2uv9;L+> z`Tg&HZx&;d^43Yu;-g5Hhhq=u-W$mUSVH{Xe&THESU2#i+TU3K){=4r>P)LyTXZQP4N&uQOl+BThBQk&Xd>K1&taR%7OSI)l z4qIJ)#nu=6qSOOYY){vSufF-pN*2id#m2-c*KVBvlp(JM@FiS%Ps#hS@e^(YSVM#+ zuy>$Tp0BhLjU798749%Gi%Zbac0inS1nri7QVXWHlZAiuTT@+^g9DJh6UH9 za~IE~xu=up6i#cKQiY8JA*c2S1xiTc-~RM(wlM&->D{-tg+?AG@F$&!Tod(@3as)R z?;%mbhn?q1UuRAEu4(626_Prw6jBa}oQ z7o!311H>MK&vK1ydK6D{jgAa~w|%D!^T;y-VpPN^E%i3B&P$^0gDowBbzjvWm5xLRcom1vc4BGX*>k) z!QUyWCj>_rA5wQ`1IAF`9OS;)q#ZCAUW~ndz}GjTdi(-&eZ}m8=t4HV2Zmc9Bwt8YRu(HRb~$OuVP=UAr5N z8|#njqfa3nHj2xNjp3&HaR+z9Y!MEWBp3rc=o*zX?XQ^ojR#0xx?-fxN|hN3R_g7wmYDC{ z3lT5oeRsd^_S`uJ^AE2Tv@Fk*deZS@$J=@|3`Iqybne#K_CAjDqywjc^~HW=r6hWN zO%3G9y;oINnV0X~VA**;^X%fKi?-e&ad-Mq@^|(C3=`(5tqHwG&%CVGIj;MP?z_x? z&Qqm*JTbNcG$PkWU&m`ETEzYY!w~xjh6K%|?#EoYu3oz;Cyt%4a2D1+ zjaDH|Krutbb#VVd88Uc?6+m-tI(o3NU@5an!Bj$y1=#)cl<9UY*Hx+BQUyw{NP0m6 zta?_1`z2I&DC3ak%TAhXtbGuK>W_JLY+x7($BrH|_LZIiN|deqqHM5@Kg)U80Mibp znHqAbdieIna7Smq8PRh|jTg8qqkj*YL`xvr+ZqX+=M zz#zpa*7@-LitjB~=-0!~a(7(!K}C`B+*unGq=!d@OXl%R*|B?vZLH)6+4KRUP)khr z3vd8_UHmL-!a%J604w83L_t)Hy6?a~GZ3I)OX>WcN5lapi72^8b3S+lI27;Bt)S(sla z7*As-jFlVLZdhBf+`L>FrFmg!{n)qn?A>E^reoF9h8>A#LfMxuN1ITNSW2L^_#($= zU9{C|=fP=!&c4@Zt_lmhw_1F`N~z>{0$9uP$@vL8Vo?#EI*@+Am@vqrQX9s7H&$}q$7J!bc+Tdl;@N*lg8Bx@iIXR6 zgWzus6JCEtPUNHTDuB+Dm(4z@UIH!E79CEC&y$a#U-X#ela7q`su2#G1^WI&(_$^72eUkkch}&SsIDn`c(!vSrK6 z({R90-uL*lKjWDJzBrh6&^8^qHJm(s(!4V^cSkl&9iKUb=SKH$Ja+!P+1r)(kZ}~1_lNUJ6sGet0ICGWtdi=z3i5L=Lh9mPE z#v*5qSV@c`ijgnR8_yl@5rYw0KJw9&^1xBeHDcTzNArd-dL&wM= zOh_+3Hhc=cu@I31AsxI1Hcz|?HbOi~!mBJ^?t}9^Y&iGse0Sbwvbra8drc3)Iq;TI zP*vB|>q<{EufXQgy?NE-aWu!w2F&Kiy}-MhnVBhhr}ON2+;@%0)saot&bAp?AIwf3 zv@?ye>-70rNs`K%zu~=i*7vfR^6UspBY%_t9wRw!?s)cl6dt%eCxm6=qu6dpT zr2=@HpdFE8K~aGf%JXah;uMt>+3$G$+#~bIk&(B2`T4&2srSRP;QE-8Y-pr8XnGC5 zr`b=Eei%U&Ex+hltgN z<;4c(4Bk)dnuTHS{pC;2Tb}AWVMhx;>Lg%sF>xKG+%Q4!O+L=+Okih1IbNENY#j_r2fl>E0bMfgJ^GpVf&=NXlfO$_lx7pUXa`@_-+fO@K`bS>dsA z>GodTR2VEy7A19|{N3^ay2#jI_$=4SbE&;q>yf{1ro7IzV|^M>LGJAqP%s-4NJSQS30|pK-rN?<}p6K;4*x)%AN`>c+?D*YerpF=|&3&?2^Zfb3Q$oRk zTBbFWlPhPgAa6UnUIUvvKXVS0iW#PQPUZ|o2W1qt=_7ZY(>Ay@eJsd==g-e~>OIfU zjB0(M>|B{CWJt;>&c~4B*-)Gh_>TKPff1zw8M}JbY73ome7s$HO@cth5M?hSg2Qzn zSFV@u{9~OugWnnao&Rj;OWZHd8HLL;NB%@TY#pmC8Q#ZpeuiPj3^jcZiivwg_I#Fm z@tnry&Un-{+Z%qx|0q7^8FIgzS1;{}M`vWELSrr>3-0S-!?|A; zep7SAkx}F8uxF=o;u?|FZ8kL>jbG=Oo%B5&kgIOO&a-ju&-pCZ;T-Ex*ZZ*h;C1fT zHgNr!B6(AMdd{vWW>wnUqbV7#=iYU5etvdd_gs%BBEfU!Z`?ay4E~O1#|F(>WnOa6 z&NVyN;M|Y%JNM48=!PE3nM2O~+aK@!582p!WgpT1m}guEU!0pSlr4%MT|&Wp*<8S8;ArLOOtU+Dlb!sR)YIx7Z zrq1I%_mG+Q{dr%bvu?fL?>vWxz1FY?sG-ChV=qTx`f{{6<%p26Kx_f&19BD>Af5Q3 z@p2^nh~*T*Bf||CLL8j9H=qG%rpO;WtHEMo0rBMyR|2jCTE7H9?EWyx)oZJ?qJ$7?&7t=qQBjvYHpc@mNV z)k@ysB}G@k{_ksRN4jOj!1oNNwnSFFVP<&_e&RT8}$a>V!sD>~Gw@Q&Jbz?x>NkEfSPfkjfsHmuC zmT&aYt+|JFCE!ZHm4GXO=OlqPryL2V0_7$l4ul)zSYykLd?WxIlKMc3DW-Mv0MBX0 zxusO8)5ov377QCY_bJcOo<9cilmhrFm2G#W8w?2xF@Op3 zb;r{IpC4f0Nr3Vz&-z!sS8bXAB^^ch);JxAxI3C90m^AAN-LzYs#3xRgh^=sP+R|$ z5ZS(J+P=rl-8PqVY?d@%;G5ZOXit-oks+|`LwOZDEY_&Npc`{N+2%bQ zP|7g*P+OLjrQI58YE6a|6vM|jckWynKYqNc9GfRrdpG4y`MLSBbLUPgpa*q1Y~(O& z8Vn!j<2IS6IAxpv2qiTaDlS;>$?W6VMuyI24h19>X+*Q!@#GS~Fg|hogt8p%w7Ok- zi9!)dtt6~m5NJR}Nqs9-31h~OF%pMI?X#}g_vG?_X78jf3T{m3wdf@Wts11#(6ga1 z$%VS3c@iLWPT_Zm7KW2Q9vVB;+K63I!t|oTA}b!plXOS(B*0vyHhABjeP(?lTew6I zC`am%tRq&i-@GHb?-MvUlHJ z*|KGeIUCS`B4saKR7PwaYrpwM0kYA zAZ71R_77M;V7+ih^CW=x0<-_9Q6sgFUxJ0K;WvdQjSd3z@AEZLar3UYb-bG*dgklJ zs*BQpV1G$TNwIDg5O-H!sx}6h)^R5-=PC*FL1CA3T#3=U^|US_;o;%N%W52>+8~-{ z%OSzqAJQF9Bmu}6=!^oNtAB5QixA;8!sAQ#6}WI`OrK%hg?8@TAt!TA8nq{%d06Db zRgO<2`e*khHXFb|Sch2TcS7z6-4UQsiin6XZ^tDKcshBLPlUFQFLDeer6tm&-i&`)>9C0E5uY5!S=Q;U9az z&FeQ!aYB^tD#s_AE6h>C`_rdSmu{W9NkL(O)w$z+)2IOY%Y@hjiH(g_-qtFO&=nck z|JACi#(?y&v$)FfVUqFH>k7odqJfB)vJ+^kAku}QzOb~=cps-sovJmLeSLKWZT`3< z=FjHk%em5XR?0JU=uqRbZ1XqngBt|-2dbN}H5T~k+|w4C3hNhUuaP^4FV(d>o?Q6U zT$4(PjgPek&)c?dld%3_MnqmvTp$5~0Vd-oKcf3ij0|{gA-X4YsCyWW!^7`h zNVU5f&OQ8l7>yvr^!)8%!&QzClZ+2vcL;kyrqR2O2D5ZW*t~VKfl0{gfUJB}ve<{0 z*QyVV6;3OnQ`%;VZVj=~v4&P{)i?D5FaDZ#L!lQRT@z?bJScpSb!Rwr@|0ws%9f!1 zL1vM=DBvf5NEjNhbJ431;215gVCkZx1>r%O83P<~$CFEdbq~or9cajt6D8s`@{y3u z*WU8rIQSi>1P2AO^hXU>IX+4{KKdKslfXWKa$~AV?hp4#00l`qCp^ZmQ1!yQbddDJ3eM5a6<`pW!{K`0f!pyf?3sj8YwK$* z+5rhXon2@l$9x^GO{y33^srD3QCLZRB&gBD6` z7>*|hV2rRdXutyp4p@YPc2U=>uiNVb2Mv5EprNJ9bK?=n}e)>mBIVvkF<#^6PvfL4R*ogLSWl81>0edg4Jh9u{%a zIm-NO3VBYOFB+@^Xv8aI?-&|ARHCD!t>HCFvi3%;_1sLReY|IpFY zAKcd-F9DL~Sx2(u+_`fS(5JWNwfq`B#KwK;!X?Q_%aF7~Y1SZ=hs7d*xu<7$?E|O1 z;y|qd&S7E<8#YX)PM>N8tiP7sq2WSW*$?Enu=28wXW8VYjhHu@3_0bV&Xt4v4;ql^ zhSoRrQDcK%bGl}f2te77bmQ(7&`V+yVhzFes0Gl<#Pigb3kdAkvEy>Syh7+jNI8c0 zxS}2)jhSg=O$Zg{s9yfPOs)ZHV9=t8Ccn9Pxfb1E!vW|tIDBxs^~^DRK|@kkOX>=g zq%|YHCs-8c=~JgA?Z6>>4-LWl_U-GTsnog3TrMsuwnzt_IbLM)m}G1GOkT1*4MLq+ znORnLMF*v>e!sM%VlRc* zf4P3`x;-n5Kbp`_o;q2=28KOy?z#*)&6t5aBv58NND9uW{o1y5o7L65|Ka;GBw~mi zjSaq}phPzOyg@c@*(et-U9jGcQzlQ5MT-_S@V(Ocnvm5cb@f>cAOh){-rjPJjt73N z=9+;L)~;PEMa4z(H^2KEnKWsV$phKbVV=6MRX?oKjsBP=)gvP#WzoV#GGk_n%DAtE zORiqKrs0)33r(@fx5wekRf?l&ybIaHhV>gHE;>%$eeYcf9S~|_!Gi&~v~|l?S-)Yu zA$$QWuz4(5v_yu*53`2LHP>q_H%6!XZrV$4fHIKKehEXbJq=iGP-->mJ(p^y`YoHZ zt}geCyt?RBnK5IAbnn^S#9^EL(JcA;>#t2gBIo{t`pd$F3neu*Rf2i)3Pd}6{>(;HaIrWeK_>U6O-&4kd+)7JJW%K6EvVPNgQ*bD} z31cV7>q}mfxMA@PEdhBidjzBvem(s>b&aYt`MvUdrR}rKSCl4o<&WEE+tx-(M?Jd7)A^Y}g=c)~zuF)#OQ&bs?3?_HElOY5eZH?@DA; zq(S7#E!>ILSb>hmJ*;1O`7QI~YH<^mD$XyKtLf`9M@AARtVB#cP#$WKeT@ZRy_i6S|JHiQEPtDLo46T>1= zUVnGq*Z8}u92-mIQNOFu2~V9XJ|`uGB|?~l2MNH&3H@QIAJ0B6dk*d~>*cL?-ZDgL zwifn&|K0bJb}&s6;u6ey!QCh1*U9Ot^{8{V;lH8yDlb)9KI=l|1?#+yp}-g65*89h z$^L`;B`+^e#*7^!Z@>Arm1k_;v{~>pckkM5`5MA~W@J3UgB%c!JLHdouD zQOueKd{|amW}#FRB{^Agh7N{+eE~;g_nzGbw0UFk8|HNv78RP24AafX5hEo$I{bb_ z`a{;fw^8`G=gi+-<@h90y7wLwS#QlP#%W(j$gBhU2AEZTN3;`&T8j)qr6;pbYK;4u zj8iU8@-hPl43u74no*)*n6*Ey6<9Em#w3YZeC;sr?>og~wyO|u*#Wd>8GO|iKOU*-4-;|1mD z4$+WuH!~JSCyy3n8Wv+4PoGU*kxw*N<={sxoEE$zN%8chpw*BzxGzrezOj&i(p zztlWwc)r^z3(YLZlP>#rI(11aPAS)^< zvfLs$2`o%Pga8%@6B2>~xPTSd;cf@poCXgXY+-9k3qWML%Fz=#f;KNP(O=>;92(d+ zP;yS@*v11WfdO4%d3m`-KQQ2^uVe5$kST`X`Ag@e>Z;CFci83&@C&x3u&^+xj;+?* zV~t$ga?wK2%vJUQJWC=WFbjEO2zVak9nTh=wQd}g$+T15XtM03K(FD6!!^a^;p@d< zV6ET1OP6;$UHxnmx^?@OD^srtWph=HVgPhE{c25yDlU()#t%9#S^pr> zt&UEkP0ql$?xF3zI_hh;>Xe;D<=>tMYZkgUtH_pN#)!(6jT~!}+DI0YJ06q(VgEWMnLrUDQ+{^_wRIitcnlEdHNM*h zrEjyjs$T*-ovV&iJaVGGk@f98 zETy6{v`B|%OKAAB%~|y@&C`VG#!Jo(Z~B!#xI6Sy3J~Q+0-jA9tHrT)tii5YL|3j} zG1Q+aP(26lA?ZwiK`f=tURKakUP9aam@~j4n@ZwRg*Wex`z7G_TwsIp_ni#x?d3yQEWivv&YxnLyay$Qx zsitD}7{h9K=o)9P;t{c-8-MbRng$`!-Gne8-zh2R-0{Ie_l7sSKQu%?YOmEA_cY}( z45D*@&5WH%6(f0I=J>N7?oRS+B&voEmJ18P*>JjRZgKFC!Ip!7006cY9wy(9W*(KQ zYgLw14%K=lcRVNotZ%cxbt88|C4>k2YmSGUE%}LoNca$&yA-mYJ#*IbJ><;kD_CApZhr?P<&GvKpmUUUk1?U& zY}j1Yk^%DKkSQF?JSNrE)wUm;&DFVkG}9Ulgoj5o)aNyE#?;Z(Yydh6K8o*8ao!}9U)c&j^MvgEf>$0WG zte79*&W6n!q-Q`+nK*Hx0i+yk$Fr2Ds~n$Jn(A{y!3EPopWc0}K8HiGk;e>;k-4+y z8WNCB8@u;uosK5yL;8luyt(rvL7VY5#l!lvm(rF#2W=hA^muqXlxk!h%alV04_O@89|hzytG`1Wc2FY%jAXE$iVxls=6Ylm8m5CNV*gj7m9y(e@PylY!Q!s z{rj0W^pHch>zB!Q=bXqfLI8M?DerRfv&>a$Z};xmYb;I>>BG`O^aG|Lx7_HLsY8Uw z(oUK#p-f}y%&86apUh8c$Fp^x%}7hPT5-63DFGQhMr%zq-GUPJ#c-A5Q%aSG286iw zdaXf<;Z!6M?>z{+Qp|q!+EwxI;cqp0SV-=8xCB@zB-;sB;k^K|0p#Eea=iQ5*nZTX^;7$KgV1o{C`XL0Y4?4fGpd4t};I{_O7V$LF9{d{E0?RK z;A}qdWApF{iMhj-Kuec^n{#aGPsqJKR|2hA0&oo<){Y<>H*S>3m`E8gXn?rNu@yhi zc690Y#{t{Xjk~w%O2CzXZzTZgklZodD*&Ytvh`&c%(r*r9=*Luz*Uaz?TNeh>q_7` zNuWyeLjcz3cuxy55XcTv_BmaGdm2{)Pb~pAtoqcVb3f=xzy}gg@C-mM0361N+C>ZZ zz4$pfBj{5AHq?Z6>Z+yv%|Pop^^Pz%;l_8{AeHRe-xZ!bD1pOrJS%728%gQC|NS2(=J#8)5rcIeKekJVN*`p+%$a7czl;`}P?rJUuo+7ju4kaY6@n?D#QAiM8%; zw2ab1Z-~#`;Yy$-Nx=0SThh~Tuch5f0Od$M;-CKXCnJjZ{jJ{{`;XK24^Qp9HiU*; zf)-uB>HZr}LHQGCH_BwroIWEfe^_ZXjnsz@Pe_#Lr;vKBw!7k3X&Grkn>Lgpgxe4| z(4&v?rGkP2D_?*}o(8qR^I?UluBw(zn>NYCDo-1-sHjL+IX=ZRa6jT(3AoD9xAJw5 z?nA4}HINZe5mxjLA%+p|!*rrW+`*b#tWk1p z+A=}yXU%`l<{GEy$i$IC!F=V#O4+h?i_xh$gwl_@e)sRL1fHh^T;=#YrR|=}mB8a9 zpkY&TaG{~0rf3Qa3uVieEfNzGBZMb$5K&O%BfE9+^uj}NJqZfb$rJYM-ctsK4U`ch zMhFdOZ(P5j1OeBLK%cf&ph_WO;2J2luDMoYsMFfIS_$nRYFw)*LAtNQBYIcErF6C8 zy10%mow`^~G;~0yGDTgsM$|O=Wk8=685wB}fgz1Y0i(3t;Yy&TNx)T(E$xZ8*VC>g zKwggCcEQ2HM&X9{btd}-pb{RfbF48n0b9^lzQ+efGr>a+O^=F7OTAxc1rr8bV-O$ zu#PbRXwsF-67MuBDoR2^LgakKdCASqHDC=MQ_|`TyHH+n+YeD2$&$OMz0QFSxXW zQPN;tATcILfNH`F0cSQe`@0tZj>T_F{4SejpB57x(SVNagH+<6b1$@%H$B&(4{NY} z+ERFY60W-e%JX&}exWLq4UYBm#<`QZcgSG=H=lJ59RJRcde)9R-qu7 zCZ}_;9tlyb9ats-oc)fcgmIufpm`LUzcU+ z`y~s`S(yLa+DLV1ej~g<^B!HUd2$zmeh_qnHAr}lh>%4p1zN35PEATCn~}|zo01+$ zn`lnWObK!o3!4QQx-ulC-I98J+Q0CW17Zl<)+E?&zXiAVls0)93A9Rp;@B!N9!~=2 zNC3hC@jB24f@2P~8$t3)QgWZ`&t=}X9{6-o39DcS^~3J<(X4CE_f8;n>C{AlMuv;5P#F9R2o+@O~~l0i;p9*?uF% za?!*JQK?9)SX^Ax-hsPv=j%I`S}{F6ttk}h396?D5yPW8H?bDTT0#WDE0&59&|Z%y zTZe)EdhkvI9lA~TW0d#HvR&NPsMEdn(=SvH9nrOm^BW2Hi~v1HpS>WwoeNGt9Wpd= z?G5)zPpC(OZr*-=Ma1ar?5xa8&sd#Oc#ROR7h8YJ(5Yp^3|)2e8A+=;1M9hgcDhIM>C*wk=tM0mVv~845kJp8tK>07r)5L?<dri2Ud%!k)LClw)RX?$&`7o&78|) zNWe=1Tyyl2Hf@nW69gbU@aXCZkh9-8#->PB^i&zm)2n9!Q<<1{9U308V3_5fmL>m3 z-VVn#5!h30)3M`hvtt_ETRq#(c8KHZZ>zGlwq|RbR|l`!PiH@Wl7L?b&~x<5E5Z99 zfm0BGr-%quRGUG|D7OJ|!xZYxTQ_BVY+T-rXtf=!;R;dpVqkp{d6Foge(TFy=INsN zdAKj^g?ZW_ftCnR99zQ0gGsFp^VZHOtYCD8H5{byf z-oB+`NuK}pTnaA=$6|=;I+q77OaDNB+tqA*4}mvG0_Q-0;&={Fc}WuRnt&AyNBgSE zK=8}S)C^}If06(RG$ufCY|My9kN^pg00~?$0`7@X7YqjfToNDw5+DH*00D|4{|`uj u1W14cNZ9`z^}0$<})pY`ynhw{C0Eg@_V8Iw6SOyRG+Lf`o`JS|oZeA$l(%dWp_i zzVF=Mx%d2a|JcuZu+}oo`OY!lcZ~6h($rAG#-PAJLPElZE6ZymA%RkW4-y0o_>P3g zogHvNcGp&tMXDa9+6BHqcTqNUM?xYcc={mQwhbGP+*K`?;t&#M8IErmd(% zxe|_;Z%le2!{| zmgko)?|rRp4!bk?$J#$^i#lhuh=Ae)=~p5DbMb(grFl6jDD+&qF8u!g{wN-%j;~BO z7@cLZxg+|2J%%4-xDo#4IkM7sd>1g)|Gore%6v!P8ZOxW{Xeh&&l`2=RzqtEFjoH0 zolg&Bkb`qHN3q`e$Nj&@6AxnqX|S*t9%KLid^OL9tu$xg_rXHsVAocZi~Q4<&$6u2 z1|1wP?zP$;|E~d1kbnr8HR?MbZa$ey>PiMsKpt}3NA1o=#lMX3_EBBj*|pvN_Yo*C zW(>>~H!uYe$hqUXERI@o-a6Y+$i3>Nw{L?^nc7#zw3k0-jO;n>CyErj-wl3Pdzw`k zHJ*!X<}9!&YxVirETsz&9jMiJe2f5RsR z?{=)tbi4L?FWS9j4|u$9I$2cqwVuD($q#tzxa1~l`0D)L_y5dec{-%+-@N_5u4go} zCGcd>*KS4@0^WXNOTu-b72mTtr`7{&^(+C_UH8fSuNHmts@(0C*^Z5woDILUQ}3@2 znpXA?TaOy0AFh682|GK9@7II~+Rt#{$yJ9CDZUZ8Ty!@u=|ck(OW!`D@g28)7NlI= z{%^i<{_Ur^)}s#lPoHa5s*K%pG||ZJ6X?gi@FMFbde6E`y|t}xw+fb6My76GKMy*U zU;XyCx{f*DcT#BC%i`~NVTj+=T7>76x-jZ`{Xyfxd^CHt?U?jqTl>{|OygQO<)}bm z?EKibA|yj9v3KRU?}Nmb`@a=l@pY%I6nx&7qd9Z2@bB;QAfHeq%Or?}^(Q9`?tM~W@6*i! z(ehn0i&8s-*Y?D zX6CIdB*@ZNVQApO7WS&)tse6@)c;GzO=Yh8sAwU#`-q@{E$+caq7t>8TsYQOUW?w@ z^%!oaY^QG(9=nr0Brna77o0oq_fvE<(6f|!edYrLPt|N0Z!iAZw12q7K@J|1yv%8E zTxhJ#M@#^Jap&oCt?ZK_bSuW#jx~sYFPJBw-fpT_-^h+JCPe3Fz}}<;RO_ED)@f-4 z%ZSbuuukD&urDUGQX|_!7@KJL05vC@g(#T7&^ps9c#QcsLLvA8p#>ro z9TRa{Y~~>`mr`1Y3i$K<{UY!4%#z&Vcrmv6C?TSXk*lpxKG=4^|Gus^liV$R5GjF zdyXYF<8Yb~z0Zg)FUh^!?V^8@Feh8P=;XIsZvvcerZcUxv!e~=^L>q)!ya%kZQyx#(zjrdAV~r;j*JY?z<;d{d*Rq`(3nqR^di_+ z>hbQ(Y;@V~V=m}xC`&C~q6uLT9sz#Gh|ogll!Ys1Bv01hQRk!7)qBM^S#wM~+>Ntu zGFxq~=FqpWpr?fYvxI1&fsjoqZMPBD%T~iR7VJRH2XRL4GFgAsE7c-m28A(+vtdGI z@{T0PL;96T(fuclaiKRPFYHO6MOVrMsp{YIw$e?dz|UlmHd+=*>pa!Lvhdpy=|Q65 zrFw+`XbrEG_O>_w*>&gp>`eVT3IH2zi6A^=bgsR_LLsCmq;*DUY-pby_%Cd0*L=~o zMHaRxsxRkf3U=2aM99c?C$wgd4^6GT(m8Yb2u9jZmMdWALMyoycT0&{Ov`8^h5K-?i90paNj**fYP~b0GlOh4FDbv!0l$egrG*{$g5-u@v(s*AdSlayzqq{5`@LTSGln*~Ud^NS z%qbq>a{HX1-RCGp83rP`K7!tWa z_LVtb-h@6CCAo9w?O`iV8DBhKV{hn233D{aP=4GgNs+}rzRyt3cuZsi>%(5f$KW~2 z0~@ZO?jqNb8I5XtivAa@zc;S^f%WMp1>s5e)8dB%i0np&=SsHXe|r$J8zB>`OG@>3 zr89txtVI}Q%du%me-0Z>X3`9ihT^y-^Xxeh+Do+Yd5kD8=*Qdrx)&zu!VL!z`A3jn z%wTJsu#UL+FE1oV15C-sin^n?Lz7%t-aft&D`>_&^OPX@vh;q%FK#P>#=j;(>V|~@ z$}G$P|5=CH?$EN8)|;e09+>1H$!RN>S;KFqC^t~jYS9-DP09}40i*NwCYchj3r3G0GQsb+hB<;P*!gH*CFH5d<-T>r3x-m!{LYpk~ z5sVreSnsgvvEoaQ-9wFNSm^2VtSzgwO;CS1$cVd%m}@;8bdaBU<7=-f5+hkbJ(tg92Z zBgQh8(7Rq0 zCNIw&|C6}Tfns0F+v~7K*uL$hJB7B^7PyGpGF%UEqeGo>|wxHhWa zO5dOBY*j(K@O0+oUdeRYa_5Cu!Zrke)Odu=&wVc z$@_5BF1%1kaX{}9Sy1E~ML6gS-8~Qi#X*qOMmAMLQh0wdyK*sL%MQS>24bT8c;{ey zwDt%wW$FhQM`De+$&b6xZMV(-#2^8;B_LxV?BATT$$zf4o8e#Gb~8ybsH-NMkn;N+nN12h(vX{F)(DldsDvduAbq$|tnZqAH>vf;bZr~ssBtoXEhFaOl zhW^9*f%-M%eB?8X1pRZ+U7=oy`W+Lw3pBG>F%E+Qu1sCQLmQrha^edNLiX321ZqhT zaw%?x$?=xVZRB>X{qJfSIT73O0vFtPi$U{7jof))l?Cg6Hi#4uu7+?kgYn)(Cv5v& zE|F4=yP8FatYe}=mn@UjgFClKO?~mLFD0IheUAy56T4_~_54Vak@40(>EjE?7*#_- zqKMq*lQ2+>F+42!)BP79B2oyD9}LJ>$dq{T`I$a<-0V%MhpNtXy0takYNl;8t^2uw z_mDwLt?zL=lCat`+9%Lt%_?kS&=7%?Y9rvGf}n12oM`r)BSJb}K_(lLxhbY?S)jG( z+V}imH3S!j>0J>s5S}*$6Ww=lqGBrNbD<8h>*Er#@)Ha&wHFd6@*!;m*zh^t!ywQ4 zhDj=gLT9|OA?{9zjKc}dH@*3WeB=ukPYCks1^A6;^lQ&KMm$xfHgJ9Sfcd>|<&S?p z+j>M{2kA|Rz%p6IBh72v;Xs`-LV5g({eG&+pT1V68Qr`R;~VO8CKy>KEB!@Fk$6@F zqvF+}w>=u)FBIK04wcD4rjF`RUkiB{$NdLI7*hR(f9Sf0vxk!3*NsVG_Cd>RU!YT{ z>;x^CgLoi zJ2Gq&Ig`?AOC?i*$4OVhIy~M=+87la<&jh|P||af*DaYw0omPR-p(PI{f<3%>v)QRZTy3{O@nV3UbsQ)hCg(k{njQ2g$T5f5Ra- zHvtmupb|G%E*%{o>FrBptdkE#NvI{lc|X5qxO2TLCkn89_$`<8iosAm`1ODB?g-M1 zYvuQd*8Ug|!vV9EKrJ%|jdqzaptiKGx_xTur4Tyk1k(CWWC4B&fyQ6EhiF^62@>nU z*YB6CfYiJZD4lp1lp@O46QVqMIWwB@BQ1#f=@{^_S)~#(Dxsgxw{}0~<5;F`Txl!= zK?Dt8{9U4csP&0_fn%29wA_DSVCu88sg7kL>)U}8*5yr!w?4Lnu-OaD8C2)lr(!)w zmR8dXyHpKs9>^ho)UN)t9C3mDzd4MoiM_K*1Ho2vR_WNGd|9b*yc{6CgvLZX_sn?h z(uF#Oy3u_mb+sCTSO0UzmcoYeQ7N>5`i>SFr@Ik^R14#nQwn~gwv|G(0AQA!8Sb=i zI4%t}U5gz}r`ipuBFt?4k{mTzSoM4=_V%n}`vYwOM5m)t7wi@#l+Mu4{>6cbW9xgS zuRcS^>{s*}OMEzq&gh5qHktn%1gAl;H6>>3^TD58lu(-c3!$f+B^*+(1ykkEOoFCt z=;53^!>^FNI@EfI`SbRU8cvvE2*P)S?uM2_hs3h-rxIis7_S-NTPTITK!x?$eP^@_ z`jDi`g>H%WBZ4HwQ{T`kRdXn<;JG#^@hTnSIEiNN))#OJ{)Wr4UEGf;4R@cpon(dB(WxHY44!J^`VWDmaBblIQi~9BH6vP+I2P50$QEn6C_R z7HY}1_jPvEc+x(Nm)K!=h5jT=S%R!fxPNC=c;UJ7|QwWrc6D?5ibVKN0$m zDG%GaTqTzmWr#+Uq`o9pTQ);C^i6(s*oHTr;_x>3K1Kc*h0!XhzhSnvB9f~mq4Ef0 zB^Q*Ra>Qb&Eh_P;b38%piHOpq0%ORrlYA^=iiaWN7qF?vmOrRUy${10W?i)qSS;gh8X^_IQz+G`)K`W7^8I4MG+miI z5PlnT%*;*)vW)$HkBX_HX3;A}a#xPIrz#n;6YE!u%fAs!m>;r0bY=()nb(#7Wf}U` zzlH46h>W+DBSNv_I6UNyzMt)aNvy%6_iiLFnccc4)MwD#5WZh{8ba| zzqEN$`t7CK&)%QfOlci`#+`OZnshFbn3)`Sc?s?VPBLtQjZ+7uU%veHG>2FWF$JZu?1<8#*rDRw;GpePX*-zPL^I-eYpsWK{2g^M>qL2}ITUq%97PU2jr zJ}QgG!*A9qi-%=Le792V;#LXYi4BbL**vvOJmLgrAmr54+EOn;=R!;GrdHGMA8wBp zfV7NyGQO&QQboa=39<^*L*@X5^nyh%W=ypEy&$Sql4n&*@F~QJ!GL>5dpXS__Nf2r zWaA*{8MWqmB(p5snC~qtT3SEtx!cVX(FBb==_Y)EH9d%NqS-^A5^%pYpD61avRp=w zKna>tklog;?wR{aR@0oq45GMl{L(&*hD95orAJeo&ycmn@PI(xo zJ=a}L#ew*4fN*fqY$j`n4TyQ}lT9WhN;w>_c0o12q%W$Bt0cwmpHIEO%^G}5`DshW zZG(V?tf6Rk2%2D%=WWe03NQ)Gvp0XgIO9s+)qGWVSqC87Cf&rxuAE6xKL&uw-+7Z> zuu6gcP0^hk!u~&Lr$bT(nY8^$K?s~U&!GEk8q%O)l{>}L*6)lW-Bs~*m+W(Zw3L0TjV7xis z)qykZ((dR~#qPA<|67n_YkVti5)q=o@)s%3bnic~VS)#<5A4;-3Pt>(l7_qK5`@x^ z1UneQ?Rsqqn2+&K(dTqg>E=3zjhZ~w-FkNtkP75$?WrOkzOmyL0D^Gs9#?8V6MZz zkH2Rd60___6lj%7o-PR4O)_Nc^4b-fZ*^o0)NPS6;d1xTH{)(LXs(CWYWDlIK2ak` z5f{Vco<6kk@V2?WByT5_uu`Xl9#zE$$!AvxXHq{KpmCrxZEI=P#L}!$6mKMn=RM^D;NQ09jW5Oi7kLn47U8)N`eM zPb{-T&H5XnN!yC$U@N@`{7|l<`vON5mAL<8X#Y>~NaO5}^RkL>%S}{4Sm3fq&E=we ztsY#lam|-Vdg_8l-&{x~b@0&{Hz>hJ01JUx=2(ztU?|Aai?mCB9KmKX4Oe@e0%w@| z%@gj_alI{rIUqvC9?+Ab6#EIh+`VVIYd_cf-VNZR#ujsbk6~|pOfk@G<9*6u;*n6u zHTJJSiT)vzkyybZQST4t1x1qNSWeV`_?`h|WJI}~^#NA+6`E+_aC}wU$%xQ=zeBQm zZ9a_P9iLUXb&KSEJ)BrOwUvN>#{NrY5%%ym5B_8(dfn-P<)kCWO~|TAoZXdpVofyK z50LeAodCCS8+_ChD@&nQY;dfoP@b@P$#WrWK=2{vN_Iv*BgKGuVm_JNWAq-M=_Gb+ zQ95aOZ=SvTE83|J8(08Xx7F-K;e!y$bNpm^<=z~}&l8HW zv?nXx0FQJ4RO}>uhGKQ_#~ej7MPywcnSpJqaJyD#(`0@X)6-;XQ8!E49J@*M z%dz&SuU>Z{z{pLfgL^CLLlceL}xsZmmYBll9`*YK9FKgX;2s*dk=skPqOvQ z2yO516;K}QRUdeSp!odKPGZ{7Q-BhtOnvkCtMZF%HlwGGi7s)&mUkydKP~mXWS*80 z4TT+r7lke4A1<9nPJ*;%weQ>W2>Z+liyLT_qS%{cnN)Ds1V?w4u~WtoFS#rC=uU?f z`*~cy6GXzuw1rmrbq)e9#+ip(@yqm6bpjgz{tr_Cd>-kVL+!Mr0eVi5N35O zijhTfdxCmm4bZFF0hK^sPR5*#M67W5ANI8ru-D2-kkRypIpm4>AjPHKO$3j50R1Lp zJY)u0+h@w}5P<}+>2ORSxLMdTgOa-_Ci^)kJB$CAUIStbYLXa0>bv9^J76Wf7QQ}4AurI%;_j-=8#PEtUwP>ivr@Q0MCf*0dWp((|B*j@~xL&$BYKcSy)Na21I}lO#6mmjWH>^fU=(|6mPwEpUjaCg)B?ndI4)j_k-E7 zrO+r+f8aoYde5`^=vMY`nR8-wzGzn+SLiC^3_SgEOz^%ghk!t~A)XCpS_t&!&MVUk z8jW~qy^i;r{Yx9);?CXK7_O8WLSC80af+GbYK;sQu0-%*fYU zywYq-&9&ojnP)O&0lG>S`u9K#giVFq|2%QQ7CfPu#1v^%e}&9Tt22#!Kzm`GxmJuU zZxN+WNQn24Rwek#T0frYG|RsFD?l@i%{SPS-i48M-5O-m63DCwymLqVjNF{k`(pJlRz+B-~Ewf+G;cz${9&u*$@PxY{`$*Amj_dU8}XX8h*1Ov0u z%qjTj|4ARK@B?dPPRF^lO|bY0Ht{+c>eHUcB7RF{sI?=TmR9dB(G~@~ps7dMz&29W{ehxkR7y$CrjaSDqNhBq#%!6%;r8xeInT(g1?EVMO zGVoXgPH4qoB>l+YJ4EJY+*gKpxtGQnvwV3(+GMTA)1OsAr^W*#m~+nap0b9vq3wPE zqf8$-M`@}|HRy`LtcPZ#RMa{_O^1~PlpGKWg?r|voY?fkA(-Tf@}{D=?tmGU|_Tfi4h`Zm)}hFx!8p8B*&k_d^k z+au>J{ET0ufz)Hi4fNxG@Xg$!Qo(dl_Be!Q!KN;q1A_hnp5udy8*N_$Bp>eLVb}C9 zJ6@2X3#?BqgbC5r1kmwQ9(fk>?>9Ew4_kJ^yRwjd6#b(S{q-f%#RKv@6(27@jwLK0 zhW{ATT=sY{6r8xXn+}D3!Rljr_L;%C)EM3JcmBiI^5&_J3Gk(C`QVR{H|NYZ%t{3( z&_Gq(YQd|}5-OJ&U`=hSC!ufd+wX79EWupmLxJ`M=6Ou`C%y13jJq zk%{Im+!33C^RtOJNfd3*A;iOnX2F(`-n$z&+AkyGjg#OEuNWmK3TE&%hBV!10+Z{% zGts=U9W+K;_To+k^s!RAidfK&Ohsb|Q*!8^K~o#ujgy>I>^550jaBkS?F1 z;4JT(?bQJvz1|eTzoH#e{~>&GAh7<(dL~%JTYOvg0j*4uBKoNE?!~x*3WhjT{J4qD z5#GV{d#b5rHT%FWs(hvTya@yTtgi_vG_+vCx?8{&KvG|_`Rb=Ip$_qZd3c12=k6pU z2SRK31hTLw?Vsm46yEd$T>XwtB{m&=R1)HPtjAb|K0mnN#IHc7oBGbdOZkdW6x5*j zeZX>r)*ahw#O1W^X|^c9$L1we^b=vfu9%(~8I2P-)r|;sy^}98xno8ThiclyPTt{_ zV)HU0BDyzAC{-}!Prvq2V{V`PO>uS&Bi4sp7PEmJlf}6dZHpNh-y2gZ@Fu@}e%f-> zacgw6+%A{s z1p1$AtzPjJ=`qNN{!RozIFU+{Aqw>|TC*#adY=&N@plgLmdVkPe@^SoM#FWrAF!$z zY9|yaD^%9Hx*nr+VUX@r_X>D?AU8v@M+m9fYIGZJmzaUE`KhS#ppXWpk9Is`vU4!& z;NWJy*`Sa!hNI(g%@qnjgTR*X0YddXRy(RvK>-BzuDm9YDZabm*Sj9`wncCpjejCX z3&SfS!A%4sr=44$ko6IH!^j0QGe$S$Z~XRchKQxht*4jms+G*Ih zY30svd9a4x-6?GfW-hHh)}F(B zMsXR-kyv_4{x^Eo4-Boi6)i*7BNZzb^bLD(y5v}$P4eq17TM?C~T`59yJpj5z zCm{LmoDOm03Ny7+bXyef9fDwNsrGjP%k9ZH2 z)Vn{L9{_pb;P@wQQ^SmrsW`=p*df+Nsk-B z`?~#$Yq002_?h6`45lU(-5Xi}uvo<)O}7BHj4HE}uDD2aj_#O~RW(BPEf71i?{R<;wvHBgQL6vkjpR4_}yV_C^7*+Nty(}y0Y8G8IcR*1GoEK72Z}{;-XGe`_B1dFkACs8W=h8j1 z)5G`6KkL5@d7c`D26*zrD*&J6_Dhi7xzxlfRrbJ{u^hKVds`?Kn&hLW2CNW^1^7@a zivxqY`+M)0)GfzVQF6A>H_Z0xl1IxK+CN`2LX(QH0CLQwnR^iF^zwn#fG`D|5*W)m z2e3$lku=i-EJVm_C29<;6a6Q*5f8!}%`f7YE>pVJ00kU7G}*Wlp*{+@%Wgp=x}?Q> zWQOuNnq~fNf%x_}Wu6hBBkYOLG=IevCt%@aiZHOjyxBZM);x2%6|a@aI=)usAQmaz zAzhqYTOmlH1n~)JwLhaV#^2mUo$}&%4C3DPD{2&BZ&DXd%&xf0m4JYk9a=K3m=O9I8Y)d$VwM2ax9|&5EA7U! zj`JKjR-(QAe31*1?mU%}_Z*T$;z0~hrvp=!O==qsAFC!5LY zcHm)M9mx{HXd`!ptZ){WK_P9Dvp|&1b5^u{ZBGc#K=((kczmnhU77oM8+7wcd%Y5B z3tHooYfPkqJ`VK8G^!1~?i&=G+pHgR2qLL1s~YNaY;XE&z8-%2J2NkjW4_r6vyTp7 zHWdGZ%jbW0#iL)F>(6u(XNDFa>%QSRhpML8DqPrzBV#||1+A-~J?;InmTJ!lM)UvI`vYkeFsBNv^K_F5Q6U8cn22v@s6#WM{RXejCPiIrd4kEg0S--0Zm{e7hl zc;9ypk?{ej_(Uc+$C?O*P@@4|O9{mGz)Z1e1qppGy^v_tlijaS%T5n&)uxW$Ia7X6`p zCfYAidduZnTOT8uV0fukfUx{5>}pOSAxk}@L`||*f}25=%DB$5Xr(x3B#B6luVL<> z>63djbyk^S;+cMulQMp3;h@IlAxTk>>Wq1(D+Tfc4V)hhYRB^9B`7gwzFk(zp#F2g z(odo|cqVG{*^~L>jvGBm6maZ?bXqlb;HibIFi2%zxxYD#2dttVZ)9q|!SLMCnQlbF z%jmy}N*_kB$T}F5_ZlI-1mnkrYi{4j`gYQ5(%_k)p;vTEhj$fr;K6GY>IShMZ1s$~ z?t;C;b|O(sC<1c&Gwq6_dL(}GTZF$!Qy-s*4L#$PHc$M{j834Dbm`WE$$pxIneA9C zlD200XSe1Ze4wcSvJo5&el(KjL#V|4T4Bo_ZwN`XRv!EwGCy>~5oa|K?CysAg2?M= z8SVpBX1w@bs*W3My_Njp*RDNr*@F`SC)YtdV4_AshB}+`LSFLbWt=dq1o83j2^%Ru zC}omuDKm!&u+Yi7le(Kz;q&ARWC_RK-FNZ-5dQ8a0-gN3)f)Vw#s022jkM*yowg;{ z)%JYhGbIPcJ0gX{VX;T=!GmCAG!f9)MOO@Vbw3NqN0DmhXp#`Tc3!~mCj`x*B})jt9=G-~=cNTKLdk1Vws$4bla{_65L=x!`r)#AzD>Su}O`6e)l37KkWx>ZabP8XYa zm;c-Ivs&`rxhI$LakizlT7}%A1B=IOi~A1VK^$w&Sga(T{Ab3@EJbY`83w?xO#!mY zfKAyzr0kZjhPx?Mi7>$_mRq|!>poz6+!ZS!L)RYSpWRut?Y0`wt}qhjlrY8Fh4)|z zUeItJIZNhqC3Cd+xo2x4M)LIttnHLodCHjHq@bkDA6R*FlkdC#)mGW1happ}F!`no zrfN<;UMo;tE`R?#LTBABri;4#?&b1+t>lOXX@#%iVPwGitBT7$8on6ZL=W%J0$H6g zgbrV3i%Urd!{zZW%{!G;z1O44%Gq^V_@>i+N6r=1#h{#ZtP!S>IOzeOsEm`(Wfk^| zR@h_$AEn(W74zG}gE1`>#VC7Y^J2~{I^eyTYRN7+cvCn#L6n3`GZ+stA0oFhlkGjQS=DEVYZUcbHVn9rOyY%S3n_LiddU95G}q9 zjI|A#n|_nq%F{WURVhNuzwXmI4NJ{H>DwZ<{OFrqP1@Tkq)G)ZAuxgy&Ti7$)>=H+ zGGyC=CX_(u;-rs;1_W{K=^{<~8Y+FX3cDVjBa@!ryVsVoleFb-S0PWuP z+4Fbf@2rm<{E9k%T`)li)Y-OuD%a)DgpGbvp9XA;Fw}{;WmVk|`)RQ7iTa=}mh>EseDVR4XhD zpsQC&kBLpbE!zm9Hns}97u=Tnu>4noMO31%4ag&}8Uib~03n2uu< z{QJk`r6{*|6EL$u!YRY~Q{&*v2^^d3@MG5Q`w z&Z3}eIizGhrnNnAoYnbS?{7TQ0b{9{=?0x-3q0k>H(WtPvSK#+Ch~HP+svt;Byo3Li8Sf*o34>hnfG(7-O_XZ}O=eD8(FklxlAL~W zD)N0ezC434lRMRTrlb1{>*dez?HIJ+$i8s867s!96M{Lv$G>ow(fmoZtl=&2-?ode zIaZWm{~X)Km2j)mUpF1+Lb}~rU*unT4=^&_zS7%qaUOsF$xxo4x$d_Kyk6ut(7wh9 z3*-%@Bglwib?ldKvKh;haVO(sW&ERWxH9?pYUt+g$*3skf(E%hv}Bq#7?IVGq8Rg# zNL76Jui|4K1y!FbUZ=bzN&us;KW)67Obnc1GYVrn(AX`91?X++5YH$PNl&uS-Rhdi zGnAwloX?1uyk!6Fn3VV4&c^ffpY>}6u55O*zK3zTW@Ya4hxF4H-~Rndn+rq#G%IM9 z8VfE)i^gzu$Gk(n-@`%`uLY6SyB3FAW=8z=Q+Ib)uu2e;j97YQJl)?9<`?SX#*Bgg10B7)^BG7Pyggnh z$NnL(0^P=gjsTt%k4rR>W;~R2=VZ&s+M?{FI;i*8)7o5ipswB6IR|$WdsmkMCXif5(598mY#h zKK|4x(og3xKwi(w`BgKR1EV{MDoLbViIXuz^darnAdp=<%I#rMja1ZxgcGVWPzb#lf)eyOzkgVsYq_tkc zkd#+*UUa10fmb$sQD*6HO$tys83x2P#Yb9o;S4XIRh1eu>GpS=-~Xc)5Cdm?{`Lzi zX!igv*xEY=IAQ=IP#*$An_w}aU9b6xBOY4Pkx_QyH_RmRLyix>TH!3RMlreN)8OTr zjrUJ%Vekq(DJ>Z-RDgzFDIV)@xCRpntr?wDW2D;hhnR%?X$7O9t$M;U;jUlWAJQX#1O4^NgEI_<`o=zb))hPU!Q8@69&`ZAW zcRXzFsr7KbgWw23KkkD6ox|_pdgqz6GTSDeXcP$_=ccKgc$5%f7x@Dq!$GduuGKVg zSq1QXIe}7V2qyImhl*_SO-`xpn@X925eKzNU88|qtEJ9&xT&tjhA(go@=1_2_|Aj0 zubzMCBnsLXE>pwxwlk-bj6Qt;jGv4ZA(`F zrX#)^zBcxF7%v`dh;*dCr`dE{GV;c{izZ2cJkw8x9!>!*`u3hVq7ZE3MR2+<4fny` zTOeqYTh$P-BTSqFy2=nUAwnvgTAz%D{fC9qD-V?Ayray-4IYvc+ACT&vdR-5oD=&$ zuIORA*l~{~X}ehD3fmN2aaxnQuc%g(mVDDlDoi$tWH~PHvX0xmO?#y#g)_M7AH1uC zXyufC@>D7)0lwb}=q05Xs8kLqNiNr+-ajK%m2o2Wx&36>Z5J z(arGyG(v>?N#N>nzX^+~sS6D_Mp1}Xcd|)evdf);V;?h38ZAqzOzHnn2qF(1g6szzGO2^XEShOy%#&;b2+=cSwI7=SIebE3fhnMY5U@;r^J1{RfJOy5?bv&Xb-k)q8R%<>6pV`$aHK;nvR#Q^ZYwwExhvCwz#kITi?;EsC__*R?}!?qj~2h3mc;4`Ba(Qp~nS5eDa(u zfoH|2)ej^yN6>a!tC)t}V%^rnYQ79|ARtmwzI7$tAb0uO#kgx=x3O#BanW9P@ocNh z0PyyyOx4Coiya_dB#%j$7VagA1E!3)D=EOzMT_K04kV<*0~5e8{?kmn+#zp0A3!BsOBZ zaovr$rUu=8iznz|o{>*B_7dXaL6Yvc?^4Pnh77ccx(mU^Nzo1!bT>N$x?Ud_MNBk# zC_>Yu-W|+O{{tGXj@xB?OnpxjvU$v9%Ry;yPoUw}sugI>J@|0X4P!Wwd)&@;{!s_? zw<~L})2nT=o zaw7&R*s|`|(?|AufA7>XZr@DL3p`HgzcvmtOUe5fCg5KeNqAq(^Y@zM<#-m?%PbZ$ z*VhXwgB=ZNOr1Ld9KYUglXJN5UHNV~@G8EV({~`{+{D1p>O38k7bowWS<$o6zE}+j zVANXug=x_4MXE$g2aA8jG`m^(I^g~y4unZ0V>?%CMQf+KPp4q$jQT<5I9h>aphJe3 zr#>cE{5?+U&pf~frul-ZiE*%h*?p|XR;Av*r0(YbEW`$o2YiVnqJcqOdErhrkh}HttV7FfU!XqZ~5PXGY!*G1AM4=R$WB^ zFwieLHqI%2wN(w*u0`|%9n4EC{6j*1OS=9&h~B9e(vr4xfNPMe_4o&-+~ZtR56P=g zsqy!258BC8I$~L4vfma(3O^5g=^1kc50W9H(OWkqNSrEXl=>GTp$_8FU5)UZ_2&Ex z+|_;wHo{o1#&Bx6iJEh)C5U|dr%s@LAFVilO$6cZOtBgvttn_Resxr7m6gr8K*!6U z-e6r*Q!`@xmk)i9(_WF_{8P0GUDuRedOwOvOYh~fD%wgkV3iTYKWKbq7zp^}uhJ$b~}CZ~tS5^cbS(NbCqV2 ziq<*zP)nS2Nc#MB<& zzdj)10lsuecc-*;cc(NGhXzTdLmKIBICLZ3ormrY=|;NY8Gmd2*Ykef%sq40b?yDx zRXz#vrPU1kuk-m1_nAx(-+cSEVy~F1a2XosEVfe-J5KjszX3gAHQ?Wx`{xz$Vy7RS zY;(U-IgMa2w8U{nl)#02_|x0TcWSCA49X|>3-!z>dM@X&h6Lg|V+gX&7k}*yevcXU zIo&(8=RSHbF|Iyl{QrxN-b?t=i9AzXq`U7XYKxWhjJ8Ftl8DK^oGhmpAuXOtO(6#f!+K5t& zp7UXdZjTdfBDiF|sCy9~#f51Uv{a%VgK;&BmdyHF{`wex*}26dPJh-Gb7}U;N{FVm z^DXmqWL{bQ3A*sTj!F0-ft#R(+yAG^+JePEo`4c`o4v&;Y-7|EeLKdNexEJ$R$_W3 zGsFL;e^hjf!K6_!36mzRhA`~F6eFLCDxQylcVte4nH%4TS>rzX=~D1Z)iMp?vnU(j zF77VO6=3T8sr5+PNv4l48-JfXHD=LPET5>+-|k;hw*3Tud=$GB&1OF;;ODz_)01v zD`BH5sd?TWyY!V<@<0M|#DFD<;DDL!aqRqF;0>~JAXLUe?nE&3c+vKwmD+HRQPdz&Y&jXW$~MO zg+vKFe}hycWTy{Pm4JdX#<=d^`R~3hS92y@;xQ$%4VYMi{n=P*N7>2Q5S(v-7P|G_ z+IORaW$Vi)YHPw;54-oyJVI%fYlnYnNCL)~QX#A-v?-`4q1q7ylvEmKCswA9szCt zU34pa<-hcHCQ}DlIH&As{sQ3*>^q~mdL<_goWM?fVP-Ko`<-tESoBCgmjLgRcA zP196koeNcgBRRpxx_^%s+Fi>eSU;U)>lbm^q?>mos z_8&AuB(SmhZ-DwYMsCWNzTb+G@?+?*Aox(h*Nrpg-nnosae4#kY34Qa(3B3FH;Q%l z%IW-IwnQDoCzq{WZbzHYFSdNX4VuM(g|iJ^9Kb6qjGCkBALBBuF#Y~~X^rkjBsR2; zY4M;(v?m33qXw|I2;vjPVLo(#Z~c;#j<)5P zCGRERF4hv_dck;Mw%p2^-VSjP)|~w%ux9<|WSuuW$>+z?(|4mSGAl#vX$QPFy?9gH zR9L6SJrs#4t4n(iY}q_B?&>$AJm0Z4^wjpg#cmjx6J+b%!yS;Ke0r;@aL$ zXjI1;uFlsM^&BV5!?^{cCaxLYy1-A18p9DNSO;eRfI#6-(}-*oe1{)lXecOA#O`Br z3s_>&3j`%J(`9bN{r+oaPMwTLviym{4chxQI`$=!J?Im`6_?G>SDN2DE&2qC)1(z8 zvKTBXmSTuBJ#7X^fN=n6_9ZK-OM$HG1b6=ou=aeCxDf;@{T`$p1{K5UslTzHsW7ck z$z6D@au=?5$KZ1>7R-Y0YrYasG@-V@?MWzlx-WA|hsNk4$4f@VFT6?A><~F@E>DEl z0%Q0|{Vp5Y%@oHc_%~A6ti?!;>O3HGOzM~B&f`-JNoT4hl|{Dt=|OO zE+Th`E03Uy)o)8?V-?#z<9Wmc-O1P-f?~cFa%2kW4q28=CGRWW@Sg6s^Xd7d$K`g( z>b9emy_ha4MlWl!OFWaGB*RG>EV8E1#E&+DsRZzJj|hqHv>zA>rOP+*=zaJ`|PD~oc)&7jOy>`102N@^p zka?&ny)X*FhLmZ|O1~tCktsS`;iH}8v~8Kj)7?m>rDisZi=n#8MZQ=2Oqps$k!qi! zp#%8WGiHA00eAgjv_HFjMR8Xu7$a0x$wpZ*(Asf1%)+7-%g`0eE6ylRw{Bw47->GU zHR4Q)NKYkTLD@76Y>3TCIcQB0iuUHGi+~aRWC^-3w_Vn-ej`A7Au~Yt7bNw*R{a}I zdw>uG>&_0~6Ap4tN9T!N&VW`ZXuNqZ&8DZBN?t78nsbwR zXH!mo#4wKe$Yrg;RuLmdk<2z3Gds_f(2UM-;sctpXGh$iW!^m(J~phWDkcau-8EcgiN+xfLb&y1~O+?xVJzfye7VgdsH z{J?m$zmiWW@a4Znd_g|h&`KGDhMvZappgd*+0E= zxi)QC9JascJ#fs~W6^>t;>vL*{G)e?c#FZzAe7K${n!daKb77fPo2`hd|||2 zT-`BPc5vHG0u$$h2>wC>;^*xA zdR~S51MUZ{*s2oB*#auBp#-O4mr{C%|Eziw#}4nCmAsK0ID*;Yz8&R$M=)} zDdD#on}5HgZ;ye_Iy%BM+a(2x`}*q?fID688Q}~WuvD1Vk<7g>w)BSVPzt5Q=s$|} zXW05Ar{47pW?lXw=6CyVVK7H=xqw(s=2B_XITt9d=f>Q)5&OfD{RJda!9(3enpM1~ zjJ^L|2VyCy%qK*e&$Tk$U$XtE7ETjHnk05`LI902qSnTPcH*bi>>EpmwhCqQIpjVC zm?4CAuF^1XWLGO%J-p6^KHs2$X;Ijo#B|3v_`+=F&7bkyskkPCTB&w0P$(WqhTrSp z#j`haKau1d{9PH#iXo(+xsG><#^3vu0c-ePSYbBSYdoOPDb*a)u7I6Z1BvFFRZxN; z-$j*%h$QHQep9~ba=k-U1D;F=o);75Ctyjy6ida8`b{d2CZ8MR6C;i3>;8!Oq&f41 zx%ktU$}az%=Z|2MFQoux>N@@MipU?6lFjvKHijt~Q$Ixv!WL?5|9K}yJYWM=DCu;i zv8p@^ed5a13jND>D=VTqPMc0!F&auys`|;AvG}2bzh0IK-Bm+c{al{6#I+{LqF0h^$$&wePIbB^ z$eK#*)w(3@beH!yIx1&Sxtp~W@rLo}n+54uFff>)R_D`&ULSwHN*kT{-L3z$eGyPG z#m7)R7R4)O9(fjrCK9~OFlQ#i82CmY${(YUEcFwHMdIc0MxEVnLmZyF&?3OjOJM8; z>;J0vD%_x$Gylhm+0!UQ`$M9iL_3alUcG8!)*#&EX-dCn6Bc1fY^n&RnEZ`gu~GVW zW9#=a-dYSKGSoha6K#xQrHf_GlIz?CKDt?h_yV|lwwM{|kS6l@oxt+ggH@gSO$Yp- zh9S~0Ep~O8ET1bMITh60S*}ESKNpJF-CQ(^fqZOeViWP0Rg;o8HC#JO;r;0A*k2AK zzg01X=I84PD$UC!2FGiaIrCxzM{L12uiqZtpQMQssT2lX&ZcuP$S%{0?VMyN?mwBJ zI1NYo1(!=a%51r1E=Xh@?a~T5YN{VsmhtHkQct;QdR}#Ksn*JforbN-A+s9vyc!Vs zKZbVIL-X#s-k}8&{QmuRFMU=TIGT@YvUj2;jDcQ&=o6QZAHe2AKXOdFU57Q7`D3J$ z!f6BA`)8Lm&TN;Fg}c3w!>EtHPSL2*3m%}+g|C~>Rp6x;S7SGU!FK^ z20lLEM~TQ{nqxhAT%-80(#qCXSlFG`-{I!>_erF)lGMhG;|atMXa@ z5Y^soR5_tiBN1UWIl%>EOE45z*p#d0k3ZNE`CtAkvp@JsulGv*>Pq=!DmKggc?PmU z^{pH@DC9czl$KR4hfZ1jh-Q&9WtRLqzS3`tPd}>UsY0bB5G+D`srh=HUS1O|^ON4m z9eT?rEh@O>ID^;`S;icD5^zE;kyx8Kmhm5=zIq?3Z1#i&=zx71x8aXa%d1g6hu$8F zt0A(&(K0F8*MWh+s+l4ij)tl=QL?Q2*nyX8tYImycuL9ph_az^ep8uW0WH0|^PZZnD`ft{988IO=?J%r!0 zTdqT#3N~nUt5Byh&il~x3)XMvW|^rZ-W!lxFKk3)glU+-WiwUm8dT9SctMsr2-94( zR1}JXGCi{1&})XS)%N=ohgN-MOpcyK#EQJfrDUvVF?(FnQ=b@?zyh+zE-PQZA9a+> zgm;FOCJhr*>P^ULDr{X1xgDZ(Br>IR{!`(Tk!=P}`+@*LDTPSIS!*I?bOMelsBQ^h zVTmiAr}*)ZT)Fm&`E{iTF2t7T5{%@XYnyjX$)dXSax$@8&8COpKU*}HpRX$IU@_;) zzoK`+M{Rf~v&=Pyz5Ne|z_#HE=+XV1#5c>TI*`npLeG?tZwwLp=%wP;uD!imIYGu9 z>n@*bS3HX;Hp%Emuz9cWz+X?ZAyZG{F9Iw-W>4xTFtP5P*yEEUo@p2_7PCj!@ryzo zZg5D4$&Q3Ewoj83yqHG{IzK=8V-^3a%8#N0Re6rUA!R_r9RX8#7Qxa&XT~T~1fl?a z;J9mnrl^$m)%Q#GoFl-cRE7QOuxG8U%?~IjCf(*NDMbU_g*&pA^o&QJuc zSEjOylUe4Vu#;Z5aC=MN^+#6SBGzJS^&qWXL7V=^HGOY?VPw(1K z}<&{sldt0?Lw@NfE=A zkVlpP_ZR17M2w_{OQQnLM}@t=Z)^0mFZOaAbq#LE&v8hqtE}?x%gd3-HxY#8;GAAH z)~N%@h@3PBjEOGQeJ;Z=t>h%zHUrdpj}ql1c%L*2Cw5vO*6?zxC2a0q%(RMfNgp?R zxu`}8O(v%08RcZ}2nBepq~nLsK@xh$6&CX?t_Na^MY0x6(WT9So=(i}?4Og5K_9ma zuY*WYKXU^hM=N2g{x?22_kT;sI{6I(v45(#U!90WrfX6p0hiqQyLR-#VJQaCHvlgd zh#6sc%LtkNvEXbqyAD+56#J>qJmyX?tf*+;s0GNZwos`)2w#!M)}JSu$Sf;x1{Gl6 zkD6>LTAXKSj5I%6U2t3wUD{wa3!O>FZnpOO)>W+_fUm-g5*5fi;JYIemg|f<19LDE zYENnq9a|s3wXpB{|mtYD1=dARI1V0rG4BP;;p$O9D&rnEBh{D6m&3{MdhV&{8fnvH756lJl>-eU7ZI%3#5cNX1F<{%8J$oD zs8*+m*!4R0m3DCOH$hFnY{`E@w!e6csrC@9(fEao?rpK%vnI!NCk;odIN;~8$E^bU zfVj&N7{y!|tHe$Oa zwndEA&a$g%-ISsHrZZjwBdMGWfmtU8`!(i6j5`ITabD*=8>KhV^6uwh7TqB*4=Fyhj0 zgn}{Sx$RkE00US)W4IlJxghI@?xbPIJ!A<(n#y}i|8eMM6&Vx%2}AKHMw7EJ+dIjA zxRKbu4QTnZJE(YwM|F*o`*rRBGEr9Ta^*rB81*{<4SQ06QzYImoR8rr%(Tu)U;m?j z9ZXo2pSQ*5pKs-oO_B9UL9TMmfz4BwXovLTmm0F{;&%i2Zt)Kh$YI-~1W#oz>V3oZ z9#Uzeu%%A-_4gOT)JJwyeyc+5nKdM%8WUs@F$y}AwyRBnFb#I;mJB>=b)~YLDW0c^ zURsB9n|b)rVz^T=_VtNgpzGZ$%HqgxzJL-826WF_29x6v{|^-1HM`d7>+1;^9k18L z>JvbPXYtBHOG)}pvhA$a4?Urg_bpRoA}?oAHQ|`5Ybb_2%82a2J#yf`%KZknO|oXE z)EA1e4Qj~Ue8frGEqT3WB{+y#kwT(w^}eO+a?$N}ZW+7_?G8i2*gZOO-68c105@q`uqS1`erb*Vt%Do56A#2g!e>v-DwStl1%(i5uOr_>I^*ldB zKDU&6P;no2A-qn89H<_gPYBcQ#EX#q?|o#X&;IwPiEOf_b{cvdQvXw{Ui(b@Wnnto@ZlAJaz>mq_FF19S_D(yvNCLPP z^aX6n6rFpDPpQPtovTml7#0w557dNjtV5^g@)uQMzC)Sc#NXq|Hfw8y0S-xnfha}L zPUd$Ss%q^js?gxeU-hxHSu!AVD!|)#9>0Vd`{(V>SGFK4FG_A6UD4d14bEm#X%7>0 z!0`xc92WvFd?_Qwc5y23dathy&@*$CfL4DwmY2_ON|o>M9(QNVl0lp}Gx<8TV5zj6 z_iUa(L7`s4nA|aH<~y5BZS_2w{3mMruM`Oq{^D#CSdAaA@^rGtp>`$C#k%SYqIVrV zCKQQlk_>Z$gBxmvgkK6?i5XnJU88L&M~}3tRQf)Z7g_Y2*DS)N23}tX%WcXx+RKKM z-tJQTY<`r1K@p0#r2INYU)JZ#B02){-^oD48m(-WLalAbLZSDGom(R$onY-$;7rMo z#&(Y;k$uc5wtJaC@eZL>;eiJ(zbL|;%NQwE@O#tpUn7_sK=NQp`@M0AKH&ufSV%tF zvPK$|223lQuMuW+Xf0D9_3SITc;>NW+ZGBwKkegMK2izWfS+aT)Dfsq=BVwcK~NU^ z$||Ip>*IYDf!V?sY~J@V_D?1bZ+lY|jyT1VIAQa}Kv;0xla}-jc$Rf^6`fCp8kSwc zjj~*aEw7gB3#|-ZAou0G-WUR^f|Kf&b93A?yve4r)9tnIr#xrkX4<^jf{ouOfOKY# zEXSzf->D}72{zQUp+Mv1;)$CGUIw#cCN2DpS3>8T)~vHEKmH4LN#)hA)xS~g(y!sV z%3EK;g4)vXPAK9c_FTwarTTd81Hz47u3ObuIxBIxP$e@hK}T*e}Cpj zRx~QrCBPq&Rkg+CqfwlyV2}5fuN5lRgb2l8TGr2jiGKaO#p)q=(qHfy6na?3C`R~a z?)2LZ0S=h}*kJ;sLP^*Oef_}L4%rggL#GYH*i7k?mUDJLX$OA~9rPl2PqnCw4;gD(do*gp@~PjL<1t=Y`HW{q#)MFt)Go#|!v7dtEbnn~jiVqP}hw zK2r$AfC6JCm@>qB90P0{{Khu}EaTHdM+XMi}hW4s$H<*9; z;u1Rfm2_a|%w#9j>+vwKPZWLl9pYCiF}~U^n4QSw4W88)qM!Go*ub`T zS`T(;Po!cqvZk-4PGa*kV$h1}f0G8B5Onl|O{WdA#Al-)x|w_~`orF+%!z9eH9hT{ zsY}-1(HFc}WGjYVH18{Ai_xvzbWC6jy@RXW&qZ@sTjmb}!*;`Nl3pof`SuUrBQJO~WwMj-+GOhr z;3t~_vYvW|-}OjlF+M_nyWXjZc`+uJa+lt_g<|85iLIR%WqB|p*af1W=cw85R7#w6 zzP+L|kJrXgd9Uk#KJHn1E&4^Ywq35=9 zEP=xDbs8cDGmgJ9V*ZV#_Jee&h};yOOf`tgD&|q9>~V%_j%7ns(qeC1+z2u7VdE{X zfM)DMSW?j;$yTi9(xvCpc7N28)QBJuTM^9CU3D4G=tO+;5+&k@F^SCSd)bSIgHxe< zm`IfHI{aAO%fKM?Cg6KFG!KXou+G!Bmixj&sNg9PhBG9x25ZbDK02+b&FZ2L90_84Vs#Yv*6#6m^)nWn| zY&ddphPecPaN=o|D+TrlqqtjdUuWC-GV&1GV1`SJ+JqpcVGB`2)(E{2C=6I+I0iGxG{TSVnkO6Jj)yIT<}XF^ ztXqB{`X*8k9BV3Ef;1rHR5$45T{i6nXsWnUDz;ry3Z@hcO9(nrR-?58zA7AoUed^f z%UtJm1}j^RN^?>ro=S#Q7biYb1paAp!E|Yu>N1%wM0q4N7o7Xx^SAp$@0D6l>~xf+ zFi?a*|6+iWPY zBrJK%AIzXQeG1Or|K`e+y#Ln+utwkm8xG3D%8f-C1{}J=(8rEgs*j}XW}*6->)QTd zvfbzGdI65(?EuouHq|_-q}<6F=$L;HmS657ikvVjtY&?b+KM0MLYIWExhu*zE|5i$ zz^#e+oZ0bAZp8ffMK3py@@|JDWi;>H(r)GAir8O`lC7$I3VogMPSeM+8FM_?hW(0? zsL{nX=9$U!TG84sS$yoWZ8J!j7M4dLfFn7jmz|a8Qi{mGg%S|ro_+K{z5&5sh}7F=EY zghoq+^Ph5~EkEdJ8^*Vwp@bY#8VIg2mo>giPeOtP?IxExM&M$K5{4?9dQuYvlMQ&ENJk(xn`TB51;?xVS`u~# zj&n5!nx<68{!naio-(s91*uZZUKH3CJ$B|Z>N+cyfUW83qVY5LOU?|rY{!)uG2tW( zJ8u$8m)aQn)4lL5Fm%!>rm=?!5J$e-CeLnV$p>P*UM$_o-B(;$Ox4%Q#}6u3i!Gd# zaEdq&Q+ZuY=BI6(@R7!Wy8r7_7G6=*X4BIe2H|EYFC6h+hLl&3Mr#M9-CRH!%^N14p`#pMlKx8={+ zW2*%9*_a_e6oh^<(p4xmD)#eVUrCI}AofcqJnm=mNJ6wY`P`&vpDF+#-Cv3oD{gSBbV));7iewC>edw=Yx7@qQ>IJ1bB8cNRKi0)EB@36` zy4WRWCTuu;#qm)kynbkR1S@wyeBQFYL0D|8A=Ev0M@5LgPm4WOP>RBM)eX#qZm!CS z$8d4J3cQft#JUqWaE+n(qTli5b}oHEHC zez%UiJS^n>sNq?a)^NCwLjubgbE-={a_UeTSgXJ5hD*OlhUw!eY^$aQb z819o5Vw(|u8D2DWQ>1${$*~#kRrk%8moKy_w7iTbyO(b@ObP<7JKWyZaWl{A`LkOqKo?|Xb0YFyI=^B+Tl)AM&o7>3 z*k=|@w0!khNunG{74|g797}{j#)bpYn67^uriG+z_A@9HA~=B_55{MPp=XAzz;9<% z7+i%!zK6>S56IK5>nIgc{<`PgbdYr)m{H;&6x1~e zAOS@FfI(<{86cZ5_CD z^jO`?h_M67JHsmeG;yCHedkTvsQ*eYVyN;UT8VFna+R_|aV1An(xfO;^Y^wUZnTpK z{?GJZJq{?n^Ng&VKPNg`p7YNgMG|NYG3d&V@8f@(yUOsAs#L+In{)ez?alfMq^O_< zauHn%-=O-lJ>iK)z%>V6|1nBMQ)i)aRidvS7*Tkc)B_(k#xAwVw&~SmN$-p3vJx|$ zT3yc6YvN+%VyBJ>@EE2ZIV}dU((Sk?#g2H%(^`q+B_v%hzJe(ShpOTT|0ZEAcFLn?s)?|&qt2#(8`3q61vfjvqF(`c1*Bgv zZ`Le8h?yh|MJQrg4sIxwu7nI8Jc=`iYg4Ti6S)f&O~}0{33*~~FbXnn?yjDJk6fK7 zysK_#J`LX!z_CFy!!{uZBbOcgtklO<-!iNjHYp9IElpD-3m%l~?YaR%XGF-yS4<+9 z^Ibj?bLMyz{>m#oh2M~?%aqyZ@cxNLyJ9-QmwA2o zuEMtLU?R66-y5Q4{WUcov9P2}q$W5z3GU>5qS3QL0Sc|MGUnUdi}Xm%9g~K~0oj51PRWXW+0F{(XHZ;U^P)b8%QHLLdXzCsE&;xInsZ)*&4D1Mr3p zqz&ku*bW>Upo5L&ehkYd5PBEf!_PiRlffAXMqs(7bPbziJfEfZuK)3Lfqdxto^GXV zV}A#L<0^bat*@H`OV#q6PG#5Wq#Z9xd*mo(@&&ma66SNI^_Z?4SGHFEmLPvY@4NCX z6(kCyO@mqn6p^w3aRRCK*)I~EdKfZZ2p@cNHgaWlUx{~Xn;gZ?jvn)o!xCylI>51F z$Z+XNC67Rw1CxaMh#9lF?+wI_rmVA9Vrx(P?UQ#jy6Ve?c5Pk@^-W`$gYjN;gPvOK zh9^Ug?8HS6o#t=M&eELDqr0b#Vw$F=dH7R)QSfU)`mv7jz>O-WXoEaUY^JaK?}PNd z`OZ?LMbRKd7I}&;$5O#R@RCZ1DNKi>N85Rx*&}Gck$d+p^GEdMFPJ{2_>8$ETTwV0 zPn2kku=QUgh-$+Dv)4lCD+<{|qZ1r0RistIpq$7I0Z9V8i@=H%D-GFchESU@;iW@L8ZZ}uy5!KMYw?Ku%k(1^EW5xgeP2OARk4`vu@?i=1n zRlaI&FB`jPxui$|pY@ZFQ>_!4u58sWSEP|Uj&iPp|5vx7Lx-afk@#|6 zFN(Qq5Zd}5?#9P*0}n)HP>t%az-wl_tA5 zniA}n@+-kl=B9A8=IF7TRDy#canq3?t6)Pf)n-UO!P%M~$Ir7zr_u{`naaz~D3J>E z(6`6>mLX*~pvwvmt1t>b(Dz6gzlh$o6E7N(noR0%XR~arJcQX|(-wqc4MkhcIP-Cqyj@0hz$5TXThIM2qToNNu9x_bwiZeci z#aG37CBdKN+`2i!Uk3W^S^evcvT=aW?OuSTMLWqcABCbrHqd9&|HG@W=RPcrWMciF zcaTv0+F~{k0=Dz`N4EVs7Mjr-@WM&yfyry6&AjG+AGH@U-v25yf$t9l(UBF0n!v%n zowsv+FScs2XtD4Bdw7hyXJwt0{5aN_Yu|WLLV8V3Exc{X7`(GeB?zUl=y-sEV~kAs zj3Wl`wpisv`Z~A}>-~UIa8J9U@jAiYwKGG?uqb8k7BP(7KFm;>y!Pqy`$3a*7_%kW zo;OC8STD9t-^a*Xyr;&3p--z zaKJN2|H3J5lb<^FWNa)<*>uA{v8Ci`^eM{IU^0&T53_MK?q16pk}mKuF+}U@dqN?7 zx+ncL+Xu23nc03W6=f9Oobn<#@4KWD*pEZx;=z_Rz6zRYS;dG+7}SR9UCOKTod)lg zIAPp+_Z@cNceAlM=!wjXe99O+w=t`w->27A3l{3lN2e1pwcKXj(x$oh7rX5nMnw(GOPQkN;-K&=gW^B}w=O~rtxN55wCWxBeQymI6p<5Yd_v(cC zJNDE377$aY{#CB`eEu$XTWKRI9pVtDFR$KEZ@3@4Oan*M)wC5ZHiZ{|`!xwM<7e5W z7F$HNcf(R;t2OuU6nlp6bHGUO{2Ph%b+0Pia@a3JVOX@wl6VFhC<<_7-!%ul(!3Iq zzKG=&McCv-5%}%qdHoS&Em_?{f)nV0_iG8+z!3V<#!kTRYWq<_?NNYB!T6hDqS&h8 zq6p02r0(zqbeVkn+nb+pj|-ls37f&N4m2N9Xu3Sw8a8D1b(B&lkN}ursEzD-S^JuTY;sGE0AkLStv z*iCNq;dCX{fL7rq66QSnSD-UB%vHW8<~N^fTsY{}Sch+|F5K0RE?C4Sc#XLGXYDZo zh%uZtfI3HeZrTP2imX29_1hcot-D~&{gJN54Bp+##=TuU>`NZ!!>ivN%1!+-W-q{g z)1gI)sj*162LQG2x`eQ~QrW=*I)Hh`vH z_cHZkHRTDk`d4V!8yruGFa2?y8rK@1j(vm5zdH)n*MC>(@5Lp8j>^>maIK&*F#>1O zhH{v3Re)4ir|i7%^m&DAlYkBdCC1tLynd`w!#a14VF#B?A16a2s59m`8>8$o$4g?6 zcGR|}F7>tFAEylQGvkBHSq5)gA!~?>xW>F{Ju4x9LyNmWd*+)P%Fd+UJ19~3MSrEg z0*dhwiLj3sOuXsgH^%qsJoTMu8Vslt@9^ulHY)w67hq(!8jo52Hg(D=R#LGm)4VXK z&>OqojerN&((fac(p4W9)NPPIS&%Z6dUU}AwKjfGFk{r(N4d6pZJV3 z2wmoLbGn(BxJ0vK$Sve`9dY=q5_?oOvcVZ3$K2QeX7w_5J6Y?|&ZaI&PbG75J&= zPVVgw@TE0oU~EY+=H6Dt=VvM52a@nC`@Ey;1dtCYpPkwbt7cyF+LDb@U$`rl&mteu zrcSj_@-*aDs2{lWdNl&7;28#o&3v;&cKgGP@VT{`xe<5hKP-7U*QVRcJu~vVmXcJ9 zFAcmQ8jyOHQ>0XC^o(Cje?W3{MA29Pe*UA!zi;~Q<~U&}KLdz|Rv?eGEa@H1N}~fS zUY@!wKn$(WJrn*nFVnc#qD{nJYoZw5F@V6t56lg)<%$a*8r1f7LxS{_+LRwSg%zH0 z(vcd`%bgq45HdUBb%LCnwfyBiCCB?{`AjankIL2v%8523a1i^eSKENBFTXT!HLhNn z?@Pti&GF7nhD)LvwIh*q=r=$-g;U;4Pi{pZQb~FuzCA9hMWCy=uT!&H%};#-fP+S^ z8E&V`LGXM3s_%2`{~N`fBL5gub((EG&-5F811f47a}o1`&MkTIv2l;dlkP@M`h!*) zg(XTY9IWRcPbfv(ue1;M{rl=UPH7#a#1vihQa8din95c?ITZE9KOh~<68=U$&GdGX zan_+8X{w=*G%5R=KgY7LA+Lu;O#{FN+ReN?w+VbdGfSAxVIUS$?@atIq%Gc&YtQbB z?BZ~P-O51!>nZR6b`Gq%v^N9D zyk4q2L8>ppsa*?a<%Ls1%k=01;+?|rOHU_n46b=8bLai~Ns%hZM1^XwAq}sO?03kP zQsfwqPv>PyyQ;EcF3-^PaJeYE%k#KNKaK=yN5VFYfQJ9)@x|R){CgR=QOCHR0gG(g(;C%ABGFuH*b1qE5Ro+u| zOq&fzfgK76VW;ydU8sBR%fkosSg$Ez;FsBfh^$ZPUz7q3LQrMN#yell8;UHKC2^plu<^N`R}x~)HniOH?^fOyyRcsU=r2euaYFox=*u$eGMkclZR?B#>&AK9^i9348g^Wk`EUI^d+W7Y z?c8p*h>zTnueyK`6oAmHZdzm(0CnGV!-h}Rh5g?A;!9ih%|_p5Va%~PfbGC1{tW;} zYA)YimCoHOR#u|k!0(z~S@UXIUyxS%L##IGQae~*BL2z;i4bahU?My7d~Caw?SV7o zQ2DXvc2L#9j->T0oUKNEE+Q zv1oyseFH%`-{?Xx`aZ`KYhG-v;o;QTwU=dff`)eZ(Sz+;hB zOy&n>y+@cE>0XvoO10vu+kkjNXqsa=U{f!!Zhrd)ER5l0{+ZewtzJg8ne!Ul^WYHA;{HZ3WiHt++@*tnnRbKi!?}X>)p2Ti4rQ)s6y7;=Z`+m z75VzxD@S7B{LnT5RDr~uitYQG9rC|m1ZsAXuT5WGEV1dx+@6@)1kJ|6dl%zkgFpIwP zkTlSL$E^Mi$We}Q1-pbU23M397lTyS4zWdN_t!;eNc{GR4zKZ<)y;k8D*dIVM6^@m zpUzAg)}5SIJg01n7dxytT&yF%*&RBve(Q{pc;iQq}mZo!e)^d-WxN8978R;Cd*D#$-QL%wz`1#Sk7MA^! z@}ukRym~))G(T8TKqy3N@{D+Nd}Hk7FEb8^Im4Wfm0cZo3r^v<>i<{(7^d}Yol9#D zH2#w2i3TAxk*(0&>xPxlTUEmXNxa<}i{UQ@&;59`hao%3XP+4@N(%LTKj$zl@EucVIJ%{(LDU0?XGF~3UXlK2 z=j6eW8bJS@)kdy59yRA6{*K!N_=o-!;s8#HqBZOh;YUjog8n6D@_r=%vOMu z@iSMxZ`y@jglF)5Q3US~Vk2J`V@4{YuVWj!U&%|F3RhZlI}Al%Z0G;VYp_>IHTtz9 zEBM~W9Ih%S62_={MnI1Cx~!By2;xTxyP>*~OkS-2ts9=x2PU4ckYES~$|qEqO)z_ntTw?x?+?l!$6B5~3IZ0NbKPLGq) z0PdT)A*C=Dm|9kw-kKgiM5z0I7&;C2g<(Y&p97gr%eVljH{JL3p`A~O#r(l(LFAo{ zvEc)mn~{{U;@bT_7S8#FI5j1`itJI=cPUVL7;NBNn+)#!cOk4otb=FqP?zmWC^Ow z@9(lrx`Den=Bf7}F&LVI;YV$qW4q1YBAZscVj=cS;bHr*i{+wQKwx2QsL~%DjI5lR`B9pM*LJ)KXB!;v_^qh zWMej}k6zj`AvwnqL5^MblT+AK)jbRms*0fQ)9(-s!Yqu~wf(OCwgh4yeb7s zyMd=l8^BUiQsu*dp#E!j{WzVtDOV@tJz<_^<$FqFdJLND z3E^zEl%lLOiC?XHx{!46W8(=7^_@SICe;?xHa@}z28FG;OPGCy>ZivV4h~KO!2DfG z(zCY$AmUN0UaJ#>*+dH>B~~!LLj`!4UsiO2batxlYqo@7qW{F(m+$!-(N8}z`$Jh< z(kqy4XHur^=xaydz4q~9yv=0HAIbI#;X3k#9&e>FTza%TEAspfQ3*PscExImzq_>H z7)agwei0>3eJ6gCqv%xTlf}N2Ml>yX)&BXzbe%$2JC^hR(exG$QFQO$@GRZkjldGp zAky6+rEr51OE=Obv2;jxhcwb9h``bv0@BhQ(p}H;{k`u$u)8xmbI!RwIl&E02n&W~ zHE6sQ65c6JCB1zcK*;#*-&BcuBg6Znp58Z5l<Ql#5d#4bdgW=wDFaBI&7{fe?BZ0O+FuN zJTXs>@99qz7$AB2W2Wbi$`-z3TSU6hX_p=Iiifhr7u)M-ZEmwv6z(uluxFQm9*od@ z86i3nJZJz$;L#xj`KD}^A|5;$MY$Gd-)%SxJGEJA6s28B-$-n*2Y3IgQ_&I?umA8q zUTrVT345~uL~~xaQd$uBsHTs|R2eY1&YnXBKC^{> zD|@p^cHU8r&rz_)ml(buB%tM0gYmQ~bAOO4F$04D*I0fZC>{kN3X2{^C;q%J!jFJDNh7SI@0DIF) z7|Q!L+POCx{MaLSk`KysXDij|k5y*a_B|Kxn7NrJUjdD1GlJj!f<7&in_uOG^Gx0~ z3?hrqw+94&kSeiH1g7=NPH3@|knPdbX=lr>W%^%q2U}7|YUrlK6y*#oG zv`Xz;{bSj?X@qxp4&HxlV_Q)xf6~e^g#JMHzq64oka`oc^G3wkrJm+BOO=dxg3&IY z&gQJT#Ou0G`hCYHj|ea#Nz7F(h|A^=f3}bb*G~oAt_O6>4C~`4pB?v+8XnP**WiaL z*S)Dq`?)y*0rPUZB{+oFn%*?+Gu5N>q*uxBZgYKh6G0#_-&65Tx_7KvWA0w&r}4MX z1rVmmU ze5&(O_Yl&iN}h~2h^$3@av}trqyjRs1kOVL98(Ej)>T?A&=9-K`|y$0&-QT^B}7%) z|7Gf^HAtnfo$4R2!R-qS9@Yht&kS(mS25Z1eALfC;Rs*KR4F?dX)3dv3{pPdIVz@W zC+q(8U8!d&jVBSxvtyLo5ys}~)OQ&rCgVj-YH9eew6%NtcGMe`$jIg41V2P){6JCs zEyMqY7RjjhbFg~*gLql_`7+rpyPDQQj?r^X?+)4L_h28Jl^8?~0ci1??0z4MKzVcUfab$K@MZWRojgEl(W|qLwy}Q75*1LX< zK9q5d(Sf4v+j;lun*oavJNxsdbPK+xti^?~cZ(n63K2aw%)1S@SueJ7m<83%->h0- zBeE#Osu83;?MRe=EpnAYySTE*WKvQSan*324@uaPySZ=m;gT4~c zo&Lf^@t@=T@UiK=%ITOPd8T*g9YXw)?bhO)MFj!t2+Cc%rHf@5{a4Fhl;}Nq!nDs; zo-?wj5(X-LllF-Fc-wz#QxZRI@clvZg|h~SftZ}73*e^fv9m19_NCXY!Gk=N% zDXe0~C7r64V%I5H-eaTTsXZz|Gz?##Z(2uXRB^tM4YDi^j>1jv<>nPQ^;c0uY-ZCG zCjDL*G&I@5(~FpNBdnnlQCK)GT2KdM;FJ$30&zErJtik+gJGSrSIdiLscL?+r^iH^ zTS$$+n1R-MXCs1^uP1qJ-(29rzqzJ4ldr-wZPxClO`LudF>Snnril|CdC%SPZ4HmtQy=heOQ;TW(>&?Ts*7u!{F(l--%?Eu^dnmxSoa`T_M71y^;jGr8d54A zd=N^V8Lxy)s@}e9clWo-)!~OvRG{X3v4!>wE3sK_?Wox-Vf8G^AKE^k*(83qRbr_p9GojE#<9)lzm89zsu%dzgJUoR!cbYyZrO#lMT_$ zjcGl-%!qunR&+%w;RJeGp`*_N`47pz5cn8b!IIqx2lk01$-?NU$C*;~O&;&BKc_$w zA|+%ijDLER<)Re7{zXXg z%F_VQwntb6JZD987R>_3%}DRB7y|M<{-kKylr#nCeX@`V$lrSX_N4mP8$2+9^OXPf z%8=4+@sQl-Vs`#Jc6NiY)-;^Nk}dcy@=X1wPCp|IrTITKoTTM8Hk>@Og|`m+T55Yy zd>m(vUP?h&Kevt^3c?ms z&u71!_6jZLk`{GQk}dz+WC``;grP$PPT!dx#^iJi<$dRElDy20f}v4^Vm4+3^Y2H@ zk~P){Z2n|r7hLLtrKf3nJC&n4ORUBui+h(eZ*&iG_z!+o&QpXj0#$!h>yh0mJpN=y zd28O=6;)Yq1q>k*7UP`=RRh~MKSo2B>AB1PSxim6p07}@gem(u{@3N+c$@%D6sQT^ zUjV)u;b>_$TmDJOPIMoW`Hz8wAk?M3Xu8ON<$E~vb)M(mWupBnI_#1OCopD(-&Jr- zfja_=&7s2{ZuCR#6uY7R4iE1zYj3Te(!1;mS; zmb;5>7vini$#u|>(tbRTORk&F(MPTHR>+m#r8eIX{|usrw8w_JlT{t&S_ky|d{n*f_ zit(^(^l;zA8vkK*(XPWa!hWht>QQ9>NzukfXAA1LI>yl)qhK7;a55J8&%H<=`ZnC> zo$NjTafs@vY3J=mI(mv-itG~I` zt{sMd#3uNrl*U1aT;l++;x@09OVaVLZvtvq`wE=_c=~$VUYq6&N;v!vxAOy!aTk)_ zR9Nt_Cku3QuGaJjo+Ml2_juRaYpin)hqt_1y4j)|mS~~bN(@L~Llu-FG`f#f@{t}} zJ&C`G**gjh&$a7lN$H-Md*Ds(f{(0_un`_h1OODkhg@F#oWUN(kwp)HHjw6qh@kX4 zX4I>%I8>?DodlWvVgco*`+teS*+>IbUy^hcvfn%N`G zkr)a=@+LKqD!#lnH+lXjo=r%&N*0TVICQyojxI9nb&9$5GpJ1BukK@UG@+aL7&2xF zxY^7KdXEjwk~!uXN4ZA#K)Q&^>^?z7V!w3YYScksC;j*Ba?)Qs%Dk`a!RQ4J#lKX; zqs)j?kzE7Z2dKE(FRYZHRya zAC-Y$Y!hb@Bm0CsoCK`PI!CwG6>0qTu@Wqhu)I8Y8^Tli3V(hy>`3%yXp5J4eFLjY zZpw}Sgei_WFZ*b|F?#Z|sM@u0gZ?Ym>YaJ{;Z2hKto6o~aM2{?I|}_OGIc+AK;_B1 zMiNELV4lcRFv=62s`P|8Jj41X0`9Q?p}iMxMLRD$DJ_6iMUTQ(i#Col5#G)F=&`mX zc(+^7J-n<1FvXwLG`spVBha~eBJuvtpIG}H!Cp7;ieC5$?!zxv{;#3NIi&6vs}|ox zL^K)CxBVqo3;6imdoXfw1M&d~jbS7;POLE~fNqUKT81s5?!f0T%meF9RDk=$l)zA? zn$OSiYt@HEe60gFT&4c=R{i=Qp*CmYBYI)|AEK@z+Fz_dSfo3McqmsjHd__6uG&bq zaRlK(6Jz`ZL*7*d8{jj{Hi?#;!GeUQ*e{>@N$Mkx!Nqg@c-d~D^ZvEeez}!M%0lhK zhZK@KzcmYn4O4NHgkW%xODB9pS0(iYlhJ;NU24AkDzMt2#9Z!G0PZD`=d>pvy1tmeH#de$ix?Akz=H~7jdP=>2 z#Lo~e@2?00!c*XRvTPHYi}{{HWAL`)a?*~bqs((};V@DopWiR#wG;7`Z~}a$(RQ|6 z5|gVKky|PtwPc4M;6kf=m>EokFRr? zRykj{Pj$s)X5iPH&orLxw+!1Q`)p>G-$ zSe!HbazqS1vMg`ze|a1eby=E!7bwK8ZuqzNDQKk~!JSBKBtJBy@=oC0Ty^mL^bz+Z zCxrue(3ezRj1#U34P6TKL*bX}e=h~7ItS|Xvwo2}9>L2%e!y)$ zbu;Hbf{~hbH`wKt5-+mV0FCC;KFTn1i)l*g<>dbit+^9`ce(>iDY~z?Qvso1v(#B08h$D#voDf!SC=6#LCc6dW#Xe#ouI?N?_i}z{URblk@jFD7$86-6CpkUVM za5CC+WddW>32ci4$Un7XjqcA)20ninOH6#F)UivfXTE#-D|A#Osd0@VBmqib;>~MW z|H8PBzgodD*#s$P9+kLv(``dp{L^yeH6hSO1NZsfF|lj??{J1B@#2E4z6;|u(rXIv zv0U<(+v)e}*z63CHuS4e>(o$D47ceb+RcYJE=|Qug~cfZ+rco=v6@OW$p(1;`5MLK z;@#(2$zqhqw^0O1iPbHcI&g;OY|u_K;Muh6@#+4!yW*H!dpBUravPa)R?B>@#@PLA zka5*t_EGlh`on!MT_>uwSLu65MGa#GKXU&#hUla`(2pc8*vUG=D+EcpF z6PSHj$h)(tJ9*^!FI39l8al89vzc*Dv$7Z?LrrXB>+frRcc)>ePMqy2K5~F&PiMJS z^Mxq?F~)~B3~Xm@^{Gzj=6?8xk~|P-PGTfwFe{%7(Srrs3;BtHHP^qoC3Y;w^{hD8 zyIe$BKSc#M?Ri_Hc5H|noA=Se95@Mm`ieQuj4sshhzZg3DG=g_P(C{IVM-D_fBJSj zCA>|JIj*-=uVvIL7uQtLS05P}S>6reFMuFNb`|=05T6gcMdgLX+c6=fXf+2tJIR!P z$0Pus`!Hs-&ZoG@|5xU7b!q>x3T4;ifa{`;K_TPv__O<3NIflA)Pi%VGG>I?Eg-uW zeZaDr$*6P-FVVI5^tr9E?RGo!3U2RTT1J&k_3)s>brZ zm)mdAp|#TC?*R9A3$bj}`z;1nUO?=@mN&%hH>+6HS5?dQZ2E1+1wy7r5zg<&9{VSk zVoAqFP!s@EIFiqX(;hw5BhbmY73DW$%55-0Smr;M1Mggh^@;`iW_6yj&DL^^Fssr6 zCO>D?cSI|m^%nPi(o{iAH}VeN#q-}unKl0)*|;sgGHz%tRLXs=b)!^kTn#?lP;MRN zEpdr*q!y-G;jT;5`)^JTYwG}^#Ncu-t0BmK<4y3v#G4Zdd)1&Egz34uw|{(b#{*mi zkJput7zGHX1i=47gu&kSR>(Z`{gDLsO?ErOSx9^>s6@QReN21rlbQN<68!MtAUABA z?Ir*hti3uWxPkQr-X9YrA=KaREt~tUMe)v^T|+lL2Tq#cxypPJWTx{FX~~x>j`!tT z?5eYa&n)&|RVLxf1Az~pki2DWTG~TPXu~hKXdxeq7vc`rfj5a=FS#^9@-D8PT5oOg z1fdBBs8m|rpDc#vgUvCpl$^b+MC5^lyzW;|m(^!UeN$}?fr;FZgw%M{pVIZRff^^E zU+|(m1Ufy1H@!R}6-m`X?GEo)Biew;ScxZ3?y?EG{miM_O$4Wrq-%KJ8f1N72Vqy% z;e9g01K%DVD4HEH&6yStwn?ZinlG(5u03j}t|_E8r_M&|L*#Jl?&!$yxZ3T1Ig%rPk2PfgT-;>Gf@{}J(c}nd(siAW^D4#hbD7JnJ zlPsz#%3NaohP%1@UqbLA64qMD;2YfcBEr^-y*iUT1{hP&f1u<@MJ@GUaqTd)3KQuG zU1?fHs49I|S_nk5^=AF6%*t>N?eGK?gm?(o!D0RT1TSxY58-_~Z0xIge2N@ip zo)^%0;DT+@;kVl_fnTVwzBfEyMzeT|tCMl?>2hLMiPTWLP-*EA+y$So-!9?3qIMD!{GhfB z{ZAMdV2aqn&-(dx!gq(vHDg34LbQaTsD4A-se`k5HISRKpFMaHfx0U5(^-qisBI>) zFykr~7_SD!s%I9jCY9Bd$%P{h>6a@J5Y;7~mSFq}y;x74HU=5ZuF`k=Pcyb|;r=Lr zEu)?BiRrZWb^|oFfxX3hy&qoCp*7@aXvXUH{$`V-=8%0RVXGz*(?;(QwSIbi#9ZW-9+s3OsD+FX1v_&QoG(rl7Pyw zFa(15cX<v7Lt|NAS_ zY_Nu^tbu1bU0j|PHr}psYb6<8jV3+*btU^-@SDptH%ZM~3{t*%qlg@(lmoe%j)z`Z z>$2JG&ofPO56If%hgblg&2;Gr@7d^ZNIDeNtK;$N`}>8^R|54?ILU*u>%;F8g}^KF z+ziM|V(`gt%`;64NAv^+= z!uxWuiw`qd_#5WOLx4P7Dop)s`rCLt`U|PAT|=L-n8`Oo_BATq=iTqd3PKVy62W=8 z3!QJ`jtNvqW;+EXF9hlMniBOVYD#tc^@kJ?;W%oN!IHK+DiX8VE9S z@Cx%d#e)tY`}no~Qf~g==+d#pnn+)cXvp zBCdcyy&WyXmvK#&Iqior)g|l$NJ)s`!1}GwP`c<>!d#_EWMWNE9w)nPsowN-a(rAa zE{lqJY(Wsx>DgMnf*du?oimX|;0PKB`fC%3$sDDBdh6%joCzvg^H*vrYQ;k&y-=YN zaKwGl4`cHFlA!#8h{cJ{ZA$EP@tptZB=r%C%0ZGekNR0=mbT0XC)Cx}lvfNaXrXwo zaiZu}34U;$G~MmWj1u5X!|zPw=UdtXKv{5t?F?8`_}yVr+O4!%#ktUi*^`bA>Wz# zXj=*UU=l4e$MyHPe(b|E4h;b%JQgbL= z^D&w-R22%oEw{)ESf>*eW0!WaV9tU#d%rjN!3kD3NcPf=b$$57RR3MNp+(S<(4e%( zSZR9kkn&G^upR*}7Zwwd2+lz3Pz4UbBe$YNJ!#SoOMe7?cMQe8FX!7#U4zIBg` z(@p(e{*}$2I!6ECoN+VCenEh%M93TVzofh^{m)q#kegV<=H2tT&?lUl2=j+J%-!deJeCymK})y-Cl!vRq>$MVqbffyByx|+Z4$; z`95r)&F8Bh9rN&N1mZCTYXxOKodM<~s7fE5B8|@mI{1|z$VJpTj;z1{F5`v|zPqyG zU*W-G5$;L6bZI{?=~$;zOT67H2Y+a)MGw{2J{%rk=yna0(Vi8=2(t+?bW5Auy$i}i zz?naMyCv7Rm-%3xbZde#Jc3u8fWwC2SA4^{PN@`3BfSG^r9{TVfUks18L_5o)iQB7 zE4#V+*1HrF-gkQ?VMludj^eR_rh;WmyR!4R`BO!RNOlfQ^A>A@g})#(zHpyu2+Q&F zeaG{6ggp3`?53;mlm5!(h0=q+2;V?Z$|B>v|4#X$0#!)zxKWCMnNt1G-Y8{rq_6A3 z!EdlT{Mqf3I?Y83p3Mo=xLNz9?#eWJaYPRDWLZ%|k{t1WIm3%l;_Faf6Z^#g(`c&@ zE>uFgPpmy86KZ!;igm;Ifoi}Y&;Xsxq$00lI|DQTyaQg(B1gzj zl2h)EgW{rSqwqK9kRHw!i+=HIP)VXgdOXy;5M@@Qf$W@hB*lHXAvUC=nyMTaG!G`GwUe)VrDNYQ=;RN1GDs&&FK618QOgfhOKWxxyZ(|E{32O+8D$7nP{T3LD zop6eG2uvae)|#_Ewlu`X41>%ylAm90p|T|6h2~8{A_*!W|4;EwHn<&668W6$e4p1M z9y{oX5HH*vY8;&)ci)kJRMGTJ&w zI_xR^k?TV~A;2V_(?C6em1Z}XeE99(@M){|FP1huJ*%GPrj*and_%_8tA#=>9M-^# zlYOO;wt~np__`~yj>cqhknyGUwBSH%HLJcPP2B*qg@fQt-^L-j$gild#B%kG;gUV9GgK;0>W##1agb__ zIy-nPggNeGo?0w%x(m@FLb>vlv$`S8sPC=ytB>2(Ax{0riM#LRhMrxtC~&x zDia1jsOu$kXhFVJbp^%TCZk4?)8rxPV4|)zXrLyuKaOO0?&^FH+4!2gTvhA;mN74C zwhKOG;#np*32{Lz`a{I`fIUULC(G7`DnY|T$ZpbZ%^diXWtZ1R0dXgLzk;CJVS@?t za1;AZVvFyC#GyWnc3~e{2ZY=fR|QxUg6^=O?=6f{jtGFa*vKsP+2g5iqTupWfhfa+ zFVpL3zpRn1J#RK&pAr84z_e27;((e~=!~g%o4=KR&-2y{L756_T#&cwMCGUYloOvm z>~+Gc*QrWA(O)7E0dP5_V)rT9&JPiFR)2QxA)ygjMJ}<;7 z;C;m08?_;f|GWPIG3{`s(xU#RqRsiqB(5{-t5-53JVEig>P$@OIQTu^(`%@j@~2KS z-f%P1Ka=;jpI<&xkOGhe<&Ax?;UTjgvgJKB74mC^w$ki#oxpzx+G>}1Q1Epj!a?y9 z0xa$zyZ1xbIA;}UbH^qE95e+O;>&K_L1w1laR0{xBYH>BFbHIEmLpFi{UrRtRBXw zy2*2$Xo(4d7e-LKC<9i-?>oir)t`7P^%11vEm@rA`v*b+_Oc74EZ09+u6CL{$LFEC7vw zA_k(RO`I+x44veM)P`y@o&b4rLIO6FrkZqO=;D2aN^5UBFHpuWOFBSXPjAM ziKkv-i5f$V1(Z?M6{N!gTd)KYq(CVF5C6d#wEXk6jmf$c-&ab;_mE>Uevj zZJq!&5vs;M6OPi*pNQA-DG}ZSzJ_fN7~}#>FlB%VrbTV%8;lczdkEaN?y8nrDqm*7 zb0~swB*bcJD#x`B3Qo`FQl)60-{ugayh>fS22M~#Qq$RK>Bv{a0(;g!L+OA7kHjzd z$EXL!#J4fSb&UyM272%l`M2#J3VDi5@1g(%ZgjqIy`*zMa0-&JfuLV&@}TbJ%v0p- zfW#+kx7j#kCM7PZWzt#x%C6h50k>w*3+O*oU*H7ZEj)}h_NX`6notw2XMS!MqFQ;L zt^nn*!aKz=Hh?MuJgnvqj=07_USp8L-+beF|1(rjynMS(A%9chM@Cw7O$()@p{cpt!2me?RAEZUYY~V9er~c`EvO&A8knHy_uBBV#!#c&-Qf z1MM=-&8q^s-oTGdWop_}ZH#!#D*~&*ob~E+Tr0kHb_xo(al!d?&XmS+CXlWO8h>`- zM}9)!2FcS~Awe#m!w!EOWgL+`Oy!gxCYkNGGpP`B{1*-yP$C$5k`CHqeD#>ovkV!e z!*9LC&=&JtIkjgrV)IMe>}Sv>ilPS}urx&ALQ*8t^%L}ZgTzCW*y8tP6ZnKeZiAzP zw~CkaD{@uwa4VPyKR!sdRC$iJjHR}Sil?RzKR*AohTeC!brA>Ja5qx`?1LBy>G*{X zmM3j5Gw3>?JSVQJAg3Bh!M$}YL+aHx6ns2yimM{9f^QJSz{6 zdw#ahw$sD&b|vVaKfkrW@oUz$8N`Je3^PI)fwTsOWZd)VXRsT*LxF@lqpbcY*HE4g z1s0u0rf&#gG?rIV59VUZMPsohwAlTLR>Aa?`FjQ5WgiY#5;`xN*z~*7s4RDKY8hkn z5j+nytJCikRdQk%fWX|UENT3*QyvCmJ!0$g(d=IgVt!9vuRW@N!vFYFJmdb76jh_V zzA+Nxy*T#!fZsi_3Hz@<&_E-i0y`KXXYKa{w8~6msno1hl~Zpm*o9r3r{eD`1@Z}D z?7gtA&nS`3cu@R^Me^`;U&Iu$ng~(zxNUzjA`~w&!m7+MZa5Os6c^Rfv|cYY9n;wVp23)W*VtM)I>l<*zz@f%lAu7+j*@{KxAR30IgKC<*IqI+a7tm=_^PmM!C_ z{wG$$_hk(cI~_hifYCU z(W?ehAPN`U^7;0}Pje?{C+xDO;+F`#b*D5NZhbWN&BwyBM+GFFZZ<;rt9u>34rBOI zB?j9e5YE?IsvqQ2l>nqU=y$M-`ZW6vyJ1I5K{(HeKpBJUAjDkIzuqs>g%q`uGx(7Q z`3KoU&hzcKKguNHie>6{&COTaajV z?7fdm63jB>L+jr3ItjVVl91Be1Ems<&N9mWNI;_i^SU?ehIhtHGp7;0Kn8dXu)Nro zm@yJ#jh>yaAJ}e+@HL#^)t1PRp{5YD9cB%Xf+y606$7AsnA@bg{>F)A?^q-Nd(W>5Gc$o;|y%dfL_|47mDGgqY0&EnHGgG~)IW0R_ zZu`>MjUaov$H>fdD2`}EG_r$qzr_3+Q#=DuMEMkab&B%>SJF=*4STNeR>xnRuB8tn z3(Uh)hKt;>Ve(TQ<`~y8`bkl^Oa61#|B$7GRbjW(66yCA_qkZ051YmWAg@k1>AhNO z*U!FX{!4`MIc(6JK<7|A;Tl=es|%eODNaqEM9aH{-w2y1l)$D{%`Fhjmx3p|&Y+a^ z3XWJYk&PhYaBCVC=kN~xSJwHhT{?_P#9SDC4$UHGk6&uf1#sPk4!tAuG$tpX0N~M~ zy`_3Hzt_${q6q{c>Qog|)N)vKc~d=9WTRUl`h3b-M8w0RAFHSR%fE{Vi2(u+G117_ z>u-8Vji{i=5JC?;g8b{0H^`xk;w7qGz}K`YuPeUAUN}ghBu<6+mU5XqxCyeoodNOC z9TOo5v4xU%M*=FLU(oZC4qlD(jB!H<3y@ewUTMfyvBSRjL|X@Zy)4ADK^`0^IOCI za$^R*Y$GU-p}vnu{{*I-PaWVF`A&RhtQnhW$7gHZ=Ff8iDMyw))j;6J#q$)SAmL~F zMdyn0nT0MKClr*o6iiC6I?%|o8qbM{5(8QxD(l#-bukdaGp+*!vJFzqCI5_HVDQ> zkWFX-&0@n|MeP`P{4Mf2#G%K?v_ElTJf<6$*jZn?KnHZmyd-HyM4sZBJMbE*QMo0l z=?L8ul&rHViWlX-++Q70#-xt={~LN;jb-s!w}RiLuT_qTbP@;T%H4~g%pHs9Os!Ge zs6Y4l-y3#DF9lGdC?7B=eP3;7*?YOuFr|j6`u35WFcnQ>YHdYo>$B&G|T6xF9+DoW{L|WGA?s9 z_17VHj|mR9_H9-aTZ#lKFJt?}4xSFRsjBx)?wqX@eSg_NNAWI6(wCcq^EbVX8Ew7u zc)|#iqg&A9^l*(KYf_A~R9r+|d0nbR=Nw(ahKC9?UWJivEb^9wIEK>x&0yWcT}1Rn zX-+jQ)04XX)T98ae1-yxH&sb<@auO?5W(>U4&LW{R(Uiw? zlAN!G#{c0I1Wd@E-GBsJ6h7HEY6I{?hIL+IZ_*%-5H5OQ3rY;;Iig~?pKa~mCxZnF z$OQBceR#;qlI=gSAmSkPVi@Ooq@@^HL;x9>aAsgGC>c9HVuB=s4Y` zfJC$*FNAWo9@kTLqW7MmfVHaX02s!X=vP(a*$L57Mbt7a$#%yOk}V?~52pT#pNNw4 zc;VL&uU`P|5_I@8?Xbk*xFY#fiSR1x>k|QiF$@Y?YbnXTh`%V~KEA}y8NR8q5WzXd zQWY_^MG9=d6+4NU6wmR1y1iRX5r;+qiE``&NRz#%Y>QsLdV4nTu}llME(a}9M$_-V z*NNZlB$Sdo!~mvkPDzvJr$@vB=n72`avoZVry&F-!@smoP%>Q4(5M#kcTcjBY38iX zFIWxZucfr-W`{XFLwywW5nH5h6XX;4CQsW;D5X5ZW;&y*>Xw0ySZ9dqK}7RvO(oru zv4D&XarYVQZlY7(h|FT>1KHZr5-G~uFekjcD;?hxCO+a|Du?g<=roSz3EeX5uusB< zsu8%S!{IfeJS;j$o5~)1*czkjW~N;e-&h%9&fNSs*7W8mRa__EUio;qwevpiot4PA zZ*k49tRO+&>L0aFCAfJKD(YmBUJgDcdvEc_Iz0)PF#zE}>R6%eG(fQS%C4ppC4c;Y zqc{^L0iK2awhR19a439eVNa0jbtjRqbI!iDftJS@LOkqL29Zv32bCT*S6E8;kWax< zYKezw??Q~DXGdhwCCu*3tKv_C049Wj-FqP%Q{F0$C|0LeY2T@-Qm;ciFbtfiZ@_%4 z!$_+wF>AvrGA}@`H(fB6>YLGoX{lR%O0H5}J|W?)dbcrqPb;sJ*Zh1%uaLnYVFwsN zeOEg|tY{LHjphOoSCo6iudeo$kox3^j-$P+AS!DJp*M7%!4c>SOU+HaE=*LbgOeoO zzYe*RTp53}qfZpnM^X=@Tjr1pv%?riu&B|qNq+WgKH|t-b=Oe2O>2U}i$P4P`0cHA3e&I z0|R8w7}-|c0v1=_AI8s`ISmnq$zKmVN2*|~CLi=RV6z~tn$XMqcd>FCC>`@PPoI-uQrdd<8=r?>BTLfA~4GOV@jB=Xh$k`XjQ%sPV+BYN7$1m`>kr=DpWj%+&0uNRkXkdGBR!P*&F= z>LtBB0sNY2vFmL(ly|gnmHbB}C>sVquE@wO=n z%D`GCS?9;9qrFs2{JV{`T%mtqUkFpcXlQpwEEj`O96hYEV1D2BIgkD$%tv{Tz0;D3 zN8kJ6DapqPeY>}~T-E`b?-|2dnj5x1^L&z~S5i~1)paAL*|Z8(?124R0*I-6c#=(M zqAM7=#^45Kt>}>N2e&G25+e&=SZ0~2L1T-BP@n+>2CV|N7LB_&B!nHLu(!ibn2MNX zZ+A!LNVw6v2Tp--G%kOn>IYg8ZNCx`3Sk+5W4Qg{Y5WYJ|_n8tKyrg6hm? zOlyTDiStE}d9i#(|1f?S$Lf)Gs>lHi^n*B*pP0 z%xfcm$JkOQe2TYY__DLN5X-8#8=(e%1E!&J7a+%O)prokQ{?VR)1m{Ws@b&hgM|c{ zk+Ap!FR0vAe3$BZ(1)qg_KKMUe>LSEs8{L_X~|UMr2 zvDrtN=x@*;gt(+TsO~@L_VDK?*gs$Jg0GRL=zbgVSO|wNI*p!o&!toV#mkc3C>}dtWDOsAB zRQjVu)J9qbZyKKR7v7a1}=A`cTRfV_s)0NbD_UCwwS9)`83Z~deiy%lqQ8> zL4vK~fdY&k(&uH}x4{Es>L<38(RDF#x6+EK4>^OWrSZUSk= zg)~3^I_-n?;Ag)x8tfr0#+iwq7P~NjGL^Rh>2?wfUC66)M!IMs zg8^w1i8!$lZ?PCaF&Arvr^esZRw$6;(7s2~ib2yTHlgeA`7=zKBnmSQ5h|>o%R7j) zfRY$#7Lyo7eX-M=ZcJX7yQ3ckLLy(INxtGhJ|S2|{N8u z{FMz~1RN9h-T_IQ6G_z;GaMnmnBWXt%)3Fl;SQ3-BdXbS3`p`EA!B8z>HDNA`1lK&-h(x}Gv2ZnXZe?P0;Yb=W z@8Az|vT=wDx3po-Gix7WBDU1T2%(x50}tvuk?7eQ^|;x@5fj#2)Ncc1a9Ha9QX6ek zSb0&TffG)O#z)m2W1-)|Vb;7x>d8u9GCZ-{zcXeu-liOzQG$kqE)BvbP=C*A5~CaW zfLol_M}@(AH=CyRAX(7n?m?*_Nr+#}6SgA;bp6?`0S% zDJ^mudtCDIx*-gv+$ScY+CEwDK*BnB5EBCg~TLqy6?pn9Cn-j+CGw}&u zHdtZf>DTKh)c@h17LC}!-irc7`+WS*@8G*KgrU)At7ufm*mE*2nOTY)M^jT1KTx;y zPHuT=ps$xF_zBOM0RxNi@e|SAXamr<-oCeW`&9fns_N6BjM&YHOAQq)!iy45c_lI; z=b`&z@J)cy)#!gG0Xu{t?uCn8pZiDyWv$`;Nh9ZQo4-A<1{iA*#fzjnfoBDYVvqm7 zp{`0Dw@L$cxJ5FE$Z90iCibT>k5o;)ffb>^us!LQ?#RsvYRko>N{~%8&T`CdM`GK)GG*zV|4( zvH-m*ZG~wuH)qkkJb1+})<^`B@Kg)F;yU+ie8lA=8}ENh=sAY!h$Ks(kN7p>3n4q3 z9i6=t(A8^)`RIW(9EZvC9gRtW9+UIu?l%p{1{{IMNvVHQ9*7yv2pU}Y=e$=v9)q$! z>99ODgxaw1&wB!qFCCp_t0Q07-y+gGkt2VBGvq1AALYq&+CQet?l6jP3@v8BDc!&I zMcD*j=Dnx06b%=$^AlbEcnV3G?8n|>3 zyQZqWH}V9B2!!yjF-Asj?>rX47#ug=4Mzzh?+MESi1iZygG>C8L0s`0h&Jc2W`TT& zQ>;_`)w)E49NG^sf(70JREVkt-a;ZhVPT0ceTkg%fw-%h02YaN8KW-d7f;j=v&SF> zk-b+vsZF31hMjFq{(AF5Ql-aX)9C;8C-`e6z}Qc?WuuX1Ap9})Aq4s^S-K(?Pf8Vr zrqmRn)%OE8GFuYg&}RsT;AHJ3QsHIo-6{ZmYcZm=zB>7mylt!ccV1RX=sTBXQ=|T2 zD~stuKViZVW>4bU08|-Z%tMnHumhs(PZYwuzN%7Vz0yg4p?@-F)4ERwRa-C3Y`w*Y z1yLM~%+6MQqWpD>ASlMtFH$&!PzZ~jIyaLf8K3JC4L9jx#<-A+eYY37A;Je2(W*rE zc*6)NHH>qoOXC00bQWw;b!{7_OFEU18oEQeLztmk=^Q{Bq`Mo20i;uqkP?t?=~P1L z4(XDvZ}Ysz_XlS7KGt4q-F2PU>pb7ZVoJsBN$9zOG0>_&SHS%UE_5A>sfBEfmd>}> z?}n8-sNYFmo1dtg`vfJ0Wys}Udk2>p9R}5Uh~JX_FO+MxSw%l37VJpz>knl5P4F=t zhc+fUTUNGb+>X^ZM{0|59@;iHF zzYHP-1Tgu^QZKtX|Gd=}={So^4N?wzO+&oq`OihIv6-_Iu?%5rmNa4P&6zY)cAoo% zIQ5?hiH(P^N(TOU>p;ghh|o=txRKd@!SFKD&$8&tCm({IfE)Wf3yRn8jG3W9yBWB6 z90WGU=DHL3*&)&P5zs`ufPTiuY9I}Hj>l5c(E`%GJ`QY*aeB=k2*2w166KE#b?gG2 zru)5|Ss!GSYW@)J$JD1<)f8s7?OwblY{u9VG$Z@O=R>eb89rsoK(^Z%b90c}v& zdm;-e*lBs$Oc=Pkub2+fe4M0j8`XyYkxHq8jxr;C8hA8qQ%6!6vzQ!cNGqJF)XE+;)QN&zqn5 z|{<5QvRF(qk6a-1wWCY5?eq;Ns3;j^*qx^d~>z+)&@Ki(UsS-OdcwZ1{UnoUs zbwN9(PCST)^x>uGwb56b)}LIK`xLWzCue>MTKmyw3;FI19-EDJl?G$>z5Au#dA#lM zkEvIhI-B_`(PGeu97fFRvOFwFYQ@@GVx;;_Pu=d6#)M#h9h>a(F2j774#Zi z;ESxxb!wx5qM{w6d=Ri4(vH+6xXDIktK ztWy*y@+rm-%;mZ5ud%6%zw95zdE>g@eL<<1smp300IcgMO1_a1j2C^SC2ZD3R1T?{ z_6)~zR+b?6gvhu{#++Rs!F#XzTj1}?E|x~1|03wlXV~dC6c^vaWfPC8@kg860=W{q z&5Q30EIuv?3+W2o>*=_o4x?^&&4f7ozEbZsG|Y&ta-O6-`vT{?Xul$a zhFB|kPit2QnsMvc(lvSVdvCNORt29;b+OTpa{Bey50XKX|FJ$|)*uQ-V-y*#YnFS| zt)TTdi;sPR4QOXkrpFZR%zf~%NQx0Ax0^PW(*`I2G3)$RtExdDQAFm{NKN^YF`p{| zt3zE1H~ymjWa19Ze)lYkVeC7L+iU@?6#H+^)Iqf~_lNe~moFB2+^lK-^<>Ri`ZiG* zB$r8KH<=+6yGoUJz*&6vD$?+^%+)TC%6v-tnm)dSNQ6gCnAh6H-qs^X`e`0_+#RW} z<-g-%4*05VNmIaK)lj;z>V-};tk!lL0sUDA5hIa2h%RB>MS0F9HH+4zZstn2*l&fi zy+52Cv)EE)0pBtci{Kv@0`4*(6Buj5E_Gd}B@&0ZU_zA(y~@W;EitK~Q+vjMsKA&U zc2ecaiPYPUF%4vZx=1T*D zx`FV?ckU9VpQv_=n7hA^i|o&alNsAE<@wdZk+Sphc3DPFV`?#oNCT2*5Yis!2AK!^f!=>s9E=@b3dc^qMP)hNne8V9sFU!?hY$|bRW zD-Nx$_qg|b@kie6~x#MIburci|JT(<&=)P9eLJ+U}+hlk(m#r&b5vpMS}V2j5z8@@DNmwW4K)q8(|m z<}2m$Qj8no;=fV=wP(6DPWh=+PevQC{aA$Dn#d|*x7pU%S-{IMod!!N0ieZ@t`6;q z+c?jLIFrr9Kwar8;9fw%>HX7qy*KDL$NR+f`063*;wM6|klavZB~8kb=Zb#=y^;4; zDxxzdJ86Q*cQsZXajW`LfqyM$e$P%HzpG6;=PpMKYXGH4Y^m{|$Md|Wu*HJ=BS1>B z4UNB(+^u>^lfu$9m{@*$Lc1$rC1(;aXFtoWRXa7e5LT8ACZhJ^l)V2LHmagwj!6Ny zszVK8^xp&cIBK^``fI{JQn6DA_fNB6XqqIK>~FTrEX*G|-{9sT%(mTfz3rFYiW-5w z3&}Q^Vy?E&fiXdLA+-` z$ECCZ5Oz+p#OIz+lzWCV`ddjIsgP!|^HDyWPf5%tv71bHA)}o^%7mjk^pq5+& zhk!Cv@oKs(nX)KTKWc9ixfKJ0_?kph;075Kq`@E>+MGr68ZECLf%8?^H3FxZ5IVM^ zUj^~f>-$Le%6@lvC_oPXiS&kBXY(6bnP|NN!gIj{1PuY>7th4Y#V zHrCJeW}FoIH9~THp7XW+-a5z&Rqekm;Ti@O78EVg0e*j^&Zhue=eFlW%)EKfk|*RK z9?z;_^$SPbk_Uo+(LG=}jra!e5PfILvOiDr;hXterZgKcroBkQr5^^}4?#lp zrh(VdYBNud)-r2Qr?#XT_*@qQ0#T(KQ9CV`F^A3p!Kt=f^W>YoGhJkWR&L)f;ZbZR30{5Yw-aiMigqley%g za5i2mhDD?KI|C*$+HE-<1EdJGAMyeG+GCK@F#6H^LRT%hT`pv=S)z3i`tYvz^(FJU}DA7!{XV4X6VQ7GxCw#%R9KgrtG`O%+w;VUylC;^L% z+SaGd0O62WfJO3E{;_6P&o*4Jrks7}U?Z1K|CbbaIjxl{{m|VjDB`d0`g7UG?kra% zUD>YxfA7GKxHWR-OFszW07e%*q%w3Bb2}F>6y@-&=C^{X{dx+=yCX&{zj4 z1a4>a9>dwuvGr}&0wuW9u%Lwcg01JObun0cA(s^_=u`0-H|av*4$6qIckB1{e??4G6?Tfg7dGFe;9 zxGL`$u%CXoXbUguzcz%wMbQl%eueV4OCR@jc6u8)KOs+7|K+qPKhI6z{kK=rQrd^_ zKmGzGi6Dxn_eFEMM}R7YpN!VYgHru863-tp`NaQuth?Sb9YrF%6+f%|9?+aH+*SA0 ze2w^c(y{7o8;zj`Lb7#Es`BHcE-E`gnT5!(RR|O_;4DK;P&Q=NW*^N4 zfj76jXrFD!(NW;!m~H}4=e@`cr<>~yOunI7WyE)9-2?k;kwn|@dIpqJ(}W+Rs=V&+ zG*qwvFr-Q)BFTG9sk6zFi>N@3>V%ay3g%&mX}cPZ9Nf(n2%BIaaBbN=aBrY!d*DtE z0+%o-`po+b^EZf)i3 zCyw8m&|E6*=8w&9p$xxJB}UZ5l2SD9rT($}4q`@`?^ZT;PYoR^B?2zRX=#Aax}RU~ zx`6t#Dc_a;wa2WPE1QVY*4Gm4R=HWo=oF701KY|U>?hfK6fK$QE5IYL>Z~yhC0|j$ zpvrt_T*Ez@1jU29_gRlKWG)M=<*>h8E*3f$IcV+Ba#zE&gP*GYe`URIL}@S^SaTAhk=GR>kv z38jV}Czx+1cG`W<7J#vUGw(EU-%$NK$g41I*=tBG)zc62b-N*_!bZeI>R6S}6&w9Akp48dyNZi=cHR4(7G+6< zn%L==J3pi_Euy*DhNjIxJo{!yX;nX%+PMI$ho&MVjAlNby5xP=ua$7Ww3^SjoKwKn zIf)?U8n?|$Chp*|U@C5Yt?*V?v(sRIO6NS6s6hjg?>;&|@}qDl?0~3f-{)*-&lJ9+ z|L`ft8>$HlGNt^F5^Y27EcKpWhxAw~J&`Fon!KnhPSf(YDT5g~8QP*Y7Q(ewhIu3o z1?ha;jb8w2&Pn&?Lz3ne0&^AwA?5G)iZDciJS7PfQuW_S`LDNdNc^*}&DK3La18s& zH>O{e92oM)U;Q=vviMn7qhOMu*5Ix4P@_`pbQjlID(GZ8TR|=%kd~xNL^ote*Qag% z@Ar8-|GLjs>&A`Ax^K2hd%_?ct7}xI<|Oj|x?XAs$=4)$w-Ey~{}}>In;@&)?EUGy zu<}8X0ufC8(l(4qyWtBeLIdbOCLi7{Tz~z^BGqIcj!1~m^v4(qWF9FYerw^qS8$(= z&5lvhX(AFCOG(odJZbE+P@D<|)6~B%XErVM%s8X!&SQ-}?2pA=S^LKPcS(BWG((Fr zZnEV|?Cnv5UAa(y0K~`S+By^lCSv)Hkj$NI%N?y0>DQgA+mk~4r`s}l2_)&#{CxIA zFPkB#v(zRtlyf@i>Lb@g%hdpO3uhWZDK_SOQUMO^Jo`hwWnu-xGI{BJvFhf0OJYw( zx8yV|H>(pQ-Qt4>yI0f3QkD#CVB;YHA7z2$7e_a(QK<(NIyIkE7@AyR6FL$L-Hqu_ zpXIpcs!cR8@)s+JPemRU-l!uzFD;T_cNV}NR>x5{icADNdPs3r*@V{=P?wn__UCs} zl}t!CVS0pJrS9oXWQJV_>6M#YEKt{^FaJ_E^$`+lj{R>z_F^N2UGscpA{%ii%Dlf^ zpM`4V%D|;Tq5S=Z>Sbro^^jBIj`QwTqAJ++7lIU_$&hvU z*lRC?REd?OnRkp1KjLt3iEPEwY782&>H?2w1?5m7g3b6fitc5ycsjc7Z-h9wlY+pg zxDmtJxQtWtr+{}1+AkmnK+~{$M9-0Bd=(;JyX7$R2Qr#HH(1krq~%*24jF*>d_+-&PE{()k_mVZ@D^)NVN zUL$W%RM274#_P6#HwVP`O2aaWM$1BnfLyrIF29=}IIOz0vsQuu(RPJwB<_uaA)SFn zUe*T@fOMpw6Z=U^LYDATGDdqd20L3&u39rz+$ld!$1f&9-XTM$wg5)t`-C3L;KOy^ zcZQ5&&Hs8)LLG!us~pz9Z3sHV*bD3+&Yq8b6T%(X@U%z1JI(T_p>~MdUw`9*eQDL% z#C|j&I54`%RK<0*18|3l%YFrrz4Nm#okSG>>~~`Ue^OcHsevP9uHRIQOag)Z4*`v! ztBL{8xpVxLr0H2@<7k3t0(s5M#EW!Lr{ziq^ytpONboVwEdaTv&TWlSL#t zbkQY;grVsCdJDk+U`YF0O4$&dJA|n&HKmmUPVgW=nYI zIf8uCe@LIdCG?eL?g9;Rt(y52L*z&F$iIn?88r%lP9FPTflU$}vn>Fp(XNG8qA;E& zE*53YN%AWgwrWK)ha3u6%%5U|bCY}M^roiQDZ;G0> zu{L#}*4FWf8)LxEL3IVdoJqv-O1)rwwTkNXS#10JA7ctbG7lXUi*kAw>N#sb_>36k zT1f_=-x18`swlcVcXB*gwMLSGKq``DW<~!!;;RX4PC_7V>JWdrKWEKpQ!gdKOQ#U? zsu8cs+_IngW-$O$&$~D-r~7$W-aUH8kQzpnuXKkHw)rL=TiEpaIPl4LrWgCCQr0rr zi4b5a|KoIahvS<*Xt5;X9kMK1vy69#-GOUrc;ORpIzq7Bpm?_eS)%4U`esqEeGol9#JJ zfcWk|IDdQ=Em8)cdUH&P54Z!$dLug3!2V_OV6=&g^5J$ow>eN{Ly|2iuWlOmD zqF`)161eH*vp+km?Gd}svJQjBezhxjc>1jT0q|uvd+}1E%j8SVJwTAf*qH~^El4km zjznE6$}_XsbTNOv_*s0v1I==P=7_jsnZiA~3Tv^~t^pD$-eEhyd_m^(iQ3~uCQbr) zP{Q09zO2+c0Q-w5;njmb01KPZQWa*H&e=fVrQfH$h21`hf3+*$u~(Fk<(IA5K&ZQWH}Cw}AEDXfvMuvgxp* zz(~|G$&?vNKBzJv0rQ!5j@0O_$R&NJTrPoVC`_$vfs$-L(7~M+$*ND5?8fh=6>STY zFECa;DiBaF)~Aqu40cf7#jsV?PzP#vP+;CoMF76ajeBD3Sz_LUR@5y6+jTHJ(SrSUDceW}pa@P8~P>RX|;<2Ah=NX~EvL z3lSZqf#>!u66YTPmZUED+T&t7%L%tD%^$IgGIHaWM1TTK3?`N2C};T*^1>?ye=1uO z^&k&oDI1^Grncq)H!Ddts-F%$>%N9xL0d)0g?|S0G~eOq5++|J4YPTxaMk@F@zNsH zSY*zQ#suF~w+tVA$B%y`wqR2*j8^?@fbIwcobsaq}Q6BW7Gf-@^JmxI@$XlD?wgmY(OThQ#xXxlsF8J-7{jtvSv8Yal`fku8ipd73 z%-tbeK<_t4r=?Rf!%@Ys;K<0W5i2GhLh@!hu^apR0x_b{z5oIv&=R9-Mohjx{;$2! zjCPU>xKcHt=|`bS0EY3;UQ{?MkRWP%y8M&;P~2L;H%82f1K}-T{O~GOL1MPW^Z0c_ zpP@VBm54OzJLwvg zaht*GXHAQMQxpIYdA99g>_lBg_#?Gpi_nh`O`su{VvrV+gCbX95rlYiyVX%kC74pD z%THd2-Jkq;yQ*M2mI5-cr2r<;G;Yi8lmSQ-Mqr{lCD*UeI7hGZ9^7-+rVE zX)T#6pul`LeugnvT;6Xq?pFBs5q29%L)k2#jcKa+Sk>LDLh`>zyNDl_!^&L7=wtC* ztTzYLj@N=)C-kmaiaP)&j1-#@(Sob}pC-Z=`nPd4fZycHj^y-KGxSqWkU7O_6apGz z@Zb=yMt{_P4NamX$_{Kk^4$EA@qr-76>u2C3CNSPb;At_F;$$)eR9Jb-I~K%r>fv^%H$0+o0YaUZyzH3kZp<*cOz$ds2hrjjqN#!J9r|J=;s`+)PsSj` z${m$0i4YU3v(QR3#?x?AWmYdGTMSmN;m+qL*PH}aL9>None^G+1R+m4=)D6Ria*sk zhgT=e;=k;BEZzzfI*7SklGmmb)v+rW>_NX)5Z)j#E)e#q)ZjeE5ZFK)f<1n9yfh^G zvw;qF#syE!UGWvick@%BMi9Iuyd*JEq5Hu%H}vn#PYLA>fd4YPc@0Dj-cb@IV`C~` zVx}p|@-OU+@z1>)=ei17LWD2MfbxIkLVFl5YYwaA5aQW~ch#SD)8Nq*;rnyHDtc3B zrvI6iSxy|YtAv?jnzzXg=Tqt2{rc||2jesiwSt^t1&0B#BMw3rg1#-j9!0*TFT%^a z8V-rX`)%ab>z}fC;pJ~q=0Pw9EK^ulI+3=CH=qZj<+(L^JWG4BK4$MaXc@kE>RU3( zRIaz(%k|OUn`U;7C1xh$^jRwq;?QK)%(scXk8K@sC_r+*n*0JUN&;^j4S_PikH=1x z?~`+q`Gy8FgssQ@>~h6-vfKX{pE>$omC)AQej9jgx0CBzwXV5BFg>LRP6BMyoQ>7poh#UqRfz}S$|ktP`?JRf?JG?l|G zYPl}G7kNmB%T<3@lg*;eve6bAzflBE4vDAFu!GqU^1-_{Smb^JN*j`pYNDv@Z(F2M zRFkSvTYow(ze^F;Std$oSkdG3H8UB!B(qEn7yd?_APZC5>%19rY5)qT0*Z#1dkH0i znrfQhLc)?2O*R9DpT4?_``gxI0T20J>0(Wx+Jsq(r#zZWxJMkFskZCpJHsscYvf9` zQjAX*)ryRm1fVk$y^q+$w#x@ZdEBDwQ7to%eFV-Z5F)^nx!Bv#Pdh+-uh7eDpQr2HUR#s?Z7mL?$(zB#x;0ptgeV9h#3 z8La5y@H)W->4Pk0(bqUPaxGwpJSZ-Xjb!rmIuCA!9B;Y-O>{LN>qkbEklCbDVl2DM zy=r5E$-DX|J1`jx686qI?}6QV>?k!~6!b2`7uQRVG5;on;sSinhhw~6;k10{g5%-w zNu|5Nm}8Ruoq;Da`%m*NeX?eL<+lv+2Q(L+p8l^5X%jpm4p`Ja91;i=N)8rjdPJ}b zHd_)7HJ<3@{qXTc=*S+NHj-ro>h(UzQi^HLKTjN<#P2(`C2iv6e zx12NS=7};~i04qm*|(!cQoQZ++X9%Mf}d`&P(0@AZOzK6Raq(qbX}`JNh?Vn*G_5~ zm4+o6v|@e6nsRl?pVr`zT*jG8rg0)X3L~t~Ro2+>Z1kZbV-)*h#?(~h^_)bGVq@-q zzctm6JLaDk1Lt`$Jmmbu0NdkLj7^#vW6dF7Xr_^8>zq~{@0?>P(}jQw2rtF-@}VTF z9sJ=)qL>tyS(G|MI{oYm`eb@M516WGr0u7v;I1WaY-XS*3gk8LlMI1TenG%b{xl{i zO%mT+zksfE4jd@pG4sRPnv;Df42H%P8Sb*E#Fr0->p(f#hCPa?{_VZxyn?Xc!(7CX zR|1G5B$mb=n6B*eQ@9Ob)?2b}fPb_;uyJn7RxyN-a1?^1rXbCw=~BMO$Y!S9(efGA zJ@A3ouE$jVDiSCHFV+WkviwyV;GU2^Dp%)`-B)zc+O>^G%jn?Bhw)wLj!Nprm}AL} z-x!G})lT?<_ZEcu$J1byMNr`^m-jTu^v_sk?W8{oI+2+Dg z-lz&veIHC9G#HYGLyS3RE{hd1R47W^?b&8}nvpZ^htvvDcquI4JoFhUI~_x|?AemV zB6!qkz^WWP@0h!=0YMR@gdlUo40D`}hXZS9=e0a2p}A)8d?5md57i|uw>f5~6d|$s z`~6h_e%I-Ccpr2H-|6X)zMLIw8O1gfF#lVt_jC{peR9jZ{<8*sfEe*%XK34NY>o2w zLFf5Qh26?a)%EkLMKe%da3x4lC;&#|6p}#_ehT@0`0DwteOSDxuoQxoD-~(>s}#s2 z4-4+;a9=Drmz{)$r>`wB5{6e=Y~zaH!hw=tY^UA_PnUnDTr8>)nORNnG)k%sNCJg+ z$ebhps5lm(T@T^|FiCd5<_AHo!$7TRbPC{u)F#>cx&X^85FcdH7cb;zxj@sz*PV~~ zrpF0MMC)3mKi(c&9Epi2HW9{%qQGc@esN<-by(Cjen;_k_)@z47KtOdEbOt)|5pH( z@tD`7msX&?+J?F4UCC`+j>G+zvD;e}hpm8GF0ZYG=!=SxzSxVR4kiDyjFZAcezF=n zMKg)|?k0*_ymOTY21-IwO1s}Y67!J5U+CSnEGUR-FMn|@)HVTChj(d9)wFK5Ga}^H z>b7jg#f7k}BopCA8(aaYU$rDx8Z7qatGmj-vlsUsTLVyF5Zx-?yXAI5gcU9#9bxG| zUa%?i2Xj^PaNKxP`Z&ph#orwiLffQ6E zRb~pWm$Vot;*6isdy!ChIiG zDm?#>r5m^xJ5F;=)P-bdL3#0q+~wru0h8P(doGj>iH$hE%i&yj zVvhlI18n?|3cfAHIjDHHLH#s~E3_H}i@g3!{a~}4;)abk^y=9wzZRp zUUjSe*x!l9(NeI$WRUpqO+B}x=Hi3a9QR8Kluy$hFmA<-Y+*NMJy_6#Le#J7>%Yz zo^pRzZ}iB^xP$d7lOuH^hW0O->glbj2#6kyZ6Ur0ehkNV!UxrH5DykrnG{oK!cWC4 z&o+~{Y(M5?xVHXxaGc2iD}|iM1Q!LVz_2uj9`^J)Yp05;f~BN%Y1H!6$KOvj(vpM< z<+}fVFO39_5h>Dx4LJGl8x$z)$*wCNd$jjh(YT8px1FCsmOin+H-DZfrYYG}|MCDJ zPLFw9G3e#c;dg&OCq{_%-ZNgguxgd4;%pLzV7|ZYLYKe?mBytS_Tx+32CK^yb)2PE zhq=S(w&khgS?Z-*@vGB}eZae3i8T{`+k9tBFG(|RCeu1V4zoA~6BGVNZnTYjW%qA~ z81ZDHH_t{)9$jgGq4$dzDfCx?C1$USPuDoQ&48}hgm*X*4_LFhhUYx70~S$u7C~9i|IpG#w<~HQ?Vv3AUdOLt8Coo6Ar|+d zjDq#**l$Nv8f!41^nwMSy?3r(zq=I{sFf2Ma!#{q(EG$3B^(zAy2-w*4($d05^ znepBI?W`^7Bo^4)LD0tb79tCKc(W8^cQ)m`JeSyg>c+fd3k#GT06Vk~6^#eOD#K1B zXEn`VM7B&0StjFByD(4_1h+ln)~P)W9bmd}Hd(@y_mmVk=%%TNB{g%!BHt4@cM6G<+h3=S8eYBjEPmO$7uM{&au_Eg^35GU&nzmggGdhMWn!=L4@h2yoyT}_x z3^GrpLzxAeAEz;xG~a!iKMo`7eIXOYO3q%R5jMTWhRGErX25(dtCmc{rLHMOFCkFSmp^javBqsF_kdzmkEP$-l%$qA8x ztwM7^(!=fiFM@G++3qhaASMqfAUIr8^<@EBvOce^2)lUEy2QtdIdo%&fvjI+d*v6N zzh5LDm=W*)Rr39!xmg_6w#d7cl%vF-Z1eETJMlR@kHHWsut%H4N2BDR@!{M28Kl)8 z&6H~cAZo3QzcWs9+auG`<73-n&?cDxXX#;KEGIzIQIZYuT0@b!1Ar;2FfX%>$SExU zDP#ZMH{UfNd5Q-|pZKvu!u4+j!i&3=5mI^2M>z0hv#m~2N`lBVO^ZUDlC>}_xeRC` z6`g3y(wO(rW`7FE5zhz`%7C)VXjsBvGNb#+>N33Fwk*NL))TpFUJn|*aT`xSVPTF$ z&yZk#K;S|f^&-NugFTgZa?2t?m{C!HcC5Lfx@?T}VY48S9Nx8Q*(_a{V!=woo!WYg zFojuR7;v0ocWTQaQgk`(*B<8PltK+5TXK>Ae#xA}kW+-)TdP7c&bFRRn4W!H zCdDY6w)}APx2x|(4B2zi?)%?{!ek`>FosO9CRZPMn1(n#ZAvFY7!&@bm~ibuqV4WwyZ?ig6Ed8&5o&p(K1tZ{R{EA1(*t86L`3s?S8l$} z8f*+~rEx+OCZ?+fd)am&q&s;juE{f@SS8MkUfcalyTT%aFD%BChzj`+G^=5?uLj65 z$>0MKq>7Z5_*`osVcBv_7rI=lPoq*{u#W`-^5jDTw=z1oJi#z?g`t79k!W(A5MUC?&jFyKgG zKoXEu8}hd!l=m_<+xWd-9d_sfrHH|Rd|ChiKx-8j6{47Mg%z1tU=-Qj7@ncTM{2dvzCS3I)yWc*MukwQBTc2N zU@>1@2s{B7xn>D?+>tcv#H46P|hoFxSzB6dH0NslhA zrgg?N$Tp*it@d5oCq6pblvM_G^nCpf-W904+odmj+iIfp|vPysqB{OpRkAeC7ygKyDc&iJu}gwY=fb#`eZDG8$p_U4I^;m0tgNxVX| z$5nL6m-c)vn%(_yp(wx;$i;?;3yPryH-%#nl8Bc3m@7eFpb*;H#AIP)_yGM(S(3Ig zT90^+xa6Bjrt`>?UyNY{GHJ17{^Q9x)B@4OMX?8J{xTQ%9XpYd_huMjxGeV}GRr|P zSRJx+`e%I9LVaCp&9L!pDJ`7yyR&jvgj8u?F`_YDn;J{`P5gmeWNDvKq90I~ndBYP z55!swd1(KAe}?T+f`>F@;WqTHR&%C*J)^OMyKZ=xIX(p>TGTdD$vjkvEo5PO##R;e zy3vYGx@Akaj*R~ymCjnU&+hF%GP9|Vc5=kD)(VQTPvtDb{8I`$$%AXj<#!X-qn}D8 zT&U4MJiN=e@n5GT5KcE#eb0P&gy+OZA*r13=1h;g;`Rp1zfv~~$fRx8Lh178La06t zY0J{dGjd62M?y6yM^G*V?K0*hA3wWP2pCk0(VhTm8dVmUKj{W{T+DF3$H{?kUHP7AskCuK@(%QNW!Zi2D;4hQfORYwFgN9)ndEf za~t8+mQWDRX8bpJEdix4TE)&wso%SyH^G=?)TdGdm>AeL$^L)=o4V5uDTWJO{6XTm z_9bNyzuUoJNZ4@J%?|wU;`edlKmX4H5TLj>IM=hhQUs+6D|!omUb1vV?h!6+NS#wK zKeS5~MC(mK7Q{+L;%yp(li;35Z1Rilg;%0uRD%ANr7v7IWpfIms@;)T<(rmQI z*pkz9c#*c))^RoJUurngr|E(qr%b!O#0!|n^yX-&2r(!;j)98rw}mc3K}2b7j*RGC zmZ+QAsA+cpE05oj^L=02^5u83k@Pc{e5+Xop`aAH178yGS1WtFGhEHKOu@_pw3uGS zOY-;9dXxhCJHgW!cPDvrXlXX*_F!u3*!y_0SEK$hPE)&Q4pcG6_j$`1iTJ_ydE(JK zUP%jA_j06|c5hTKDwRefc26iJr8l&wbKGqr%8a7uQG)q=Vg`>z>n9%QK6Uyk+lrfT zfUWITD!+L%@*?Ce%3%(Y8pU?&67rV$W;?phRRSlsGs-+IQUIAvuXN;3(}^^!qSB6_ z#p&Q)(Al8VpuYdbxr0(zlE0Q2cC*9gSA~bgM=gpAe;I^2hQ_>uh6ulj93m7)6Bj;O z%jnTbiMyQymIWtAgZC9$;`5_9=r3zGN&C|dB|Yyt0(Rg-{xc3|0$@8U3xXdA1aC3T zGYmeCKZgc(D(c3*E2M+&_K3=nIV2uanJsTl_2FT3i{=9c%Z3z~sBX&?%(ZM>orOs;%>HW>Qk--5A4uX(vxQuKDGp0^-O8KOm( zI=XC0h$)znT-C}szu5x=qOt_3Rt3}Jk`Jwsy@)`k0voZXe()22kyM-7feaLz@Y|8F zVv<=gF7NJfpWI`s5h|nF#|X7-2a%boQc^ilxml5zimf_n<-0>n%X`#aU)SIY)Gz5{ zh860ub)&B*X}wly>XZ@}+tE=jBU(QS6?sqt9*lX8t&LWlRQ$^2?wDs05Z;X2Ek6I_ zQm!HIs0W&?uhWdL+*S4RZu;{aI`da(lX-72!g!eU{9$se{pE3qpS9AGheBkIK3LJ&IB8VTfv44`t*cAg&ftEZva6is-0jw_ zQJ8%R$UnAN_w9OQ{aG}mtVM6w+Ooo{AY@kz5=)ck7o1 zy^TH)eC4@R3JU1)XTH(67%(!-+``u(p<_w{q)@F-)k zrGu|&9}d1h9Da8y&@;VCAT~TTk)18Gze|sU{fc>+QY(MC4isq;0KXfil=u8VOsLL^ zp{?8Bwg6dU_IzyL02lU02(6oj-=20pj%;olvwn7ZaEVHxow*yc(4@E`Wg$8akVkQd zq4BP3x}^O~@j3*3=A2_)+ZxO(WVm;(B~R#*o6$IYFy~FU9G#!b%cH8XgjP7r)Pa3R zI6I@jNZS*}+p_zps7s*ubojn6^H0IU@`6?3oLeKPPCmGgRFAg#z_XLj``_Ul$?`(X zOM;?LuAk2T_spC??CM5vx{@HpLqOxqpW(1MRE>}5yRE3Y(X)o;|I{%vY&J&)P*k9!H1>!BF3bn652 z@c&Yx%M2scymB8GILN}f%&}b9E%tv&t)w1mhpx!RdS^?N8n;~urG893V5Wv0mP{`n zi!+o@X^EmfC|km_j}-^Bx{HvIqBFCwg<@3ppZm|0!Tz+XVXh{BuLTtHi}Abc!n!uG z@TsR4dQ(Q-n+lv>Z=xjXqUFJU<3=Z?iJ)M#B1bP4pGfM^eJB!JY>`#vTVIXl|1t~{ zP+a$kCYSvncQ~*E^@rmo9ea+)6of5%W{TAo^GGW(=#i)YpX;pVNzvw3oZU|iy;QDL!^I*QdEdgRfaU_uT9DAN_jEl!ILOa zcD;F9lVFB|ct!L0m8@^y%hXc9D|o^#HiODWwv){z*#GIy{D=1-h>JU>`opn*b!Qtt zv063oIk`ReEzgO%N>+w3q(G?zgV52aalF8%R@cjD+fC9a`i3MF#z}DI8nM3;(32a@45bW&vx92q;+G<1={-Eyd%N8 z7{x6turMZO%*Z7)X_iE!w}g`T2bw#9ZBe`L%*qR3#R>O7>o3?R}qba$iDUDByYNDE3y z?F;Ywe%@#Q2Ydha{=~P7bIx=1I@YmfmnhA(L7?p`SrRIx6So1^Coj!!I9?KHvAEt? zG9;+HN&eu~&W0Qy9d(%bK<8(4SG92j?%@6D(a}T_5gLJF{-|~!j5{l6Z~y9(q1G!` znS1S<{F&hvl6^ERt3N`lvi!{x|2QUzkWX{l9WHf>SeD_IY?g9HmTaf)TTx8+dJ;;S zDH*$aC*A|=KoZq?%$EzUJ$KGZ>#mo~PmBUSyl354m-bLghrQ2|Ec1Gchk$BYcfLNV z)jE4*P^aqnjU@0lI!svpmDjc)njIv`W_JK~6FS6zrxWBJLhKpSkmqS_H)ZQemjpHq z=?|1mUDAG5PHT5BrD)|BHMe86E!W>JJs$yJmhsRBONG%?6{NQ5L%Z8X}-z{AVI2N6B_9U`jw>Ka#L{=M&1l)HshA8v8x)6}z75}Qj1ihM^o-faK% z4G#djHGeO@Et-BDg0A_>bq@kSZ}W|PG|kw20xWRlfFfMjy_P+meA8y_Ty`HPpd^a} z|MY9}#3aB2k}yw3j#`U{x^|e*PB{8KdS_x&)-JA?O$7$(EmYL*S*~of&zv*g9b0H9 z#@q135nwPk60rYy^>im^C9sP^>=Mc;ant%5>-FQnb$XtqHZS#UAucZKEXUJgb@^X7 zObOv#O9rm!3r_)OusDDJY`ftZ+E6mvlW*n-=!#oh8@KMBK)14y*P)Z{bHeX1aFW=~ zd0merZrDBPe!XV`-5o9_reQc!mbL<+L{CBn0fdSV{c`ixlgr;xTVMMmE1p1kX1eM6 z{;}Yya-R-qRnbSi+|W;@?&%1y_N?CM-bZ)VUHSN8z4?CL05M8hHiFf2_;=BQ#4nYe zMnvM|kObi;?C_sbF*B?O4e0Hqf-|~gdc&lYHYE>*7Yxm`kgb02(!UoDvRFknX&JQ* z?x}5DW&AoUF3e386-)wK93KzmF#$uzPL&3uTOng3gfECaiRh z@kEM!!q&~?fCj$Bi-{EwT6|Tx8IoIzwQ(K0bpi@s4S}vm8nBFPF*|ID5f0*&JWjC) zaqL{w3pVOB(c}b0rsu~6etA5-p!3->-HlL3!0x~SW`PXeKs$>`W8_%Xj0yRNK zw5`^9H*{JgI%Ck+`wzLUlAi83=4x-fC#27HBp(&n$~yE!HlMFwy}c@5ApXwR!M=On zjDIw~>P$YMa;0Q&srq$bgp{s*2ut+KSdFl>XgZuOUNvs!ddfV@M47|iL^%##mY1Hj z5!5`Fon)ts3EhJ2YdHC97q8#3j_(D(-+yeBRRy@ysZiiBzQIS+u~NpsX?7t3e)@m=ly`jP+5hXAS%4ndRHXM1(rDc|Xo%)R zx_2N^j{_}oD}$_d`D@sB;83)PAz-F`@{K-7xNmP>KDr*BO@@tvn#V(rqxdvE6EoyV z`yxx@Bx#Y*n!$8%(`A%l!zEhE`qI^D<4C5DmAVjZ0y>)_kMK+OrGG^9p#snt4Y|+J zw`pfVG*^7zQ@0tCaJ@sH<%m-VKSpall&B55`LY))I=neHCV8c$4v&3Ym{IVXnP^FX z17FD^{qtjF+Z=wB)acX}TMc4~wWbMoEmB0ZJsElpSE2w3Th`6M!*y=05+(e7K zG9NGOmgFm&8z0=B-JYuC_bab>-#_i)Qc!$W^X;xX0~A*u-dPZ|?DqxRf$vF{V(|VA( zh$LY^X0oPUz1*p6{BBIJMY1^Y~0Xw|ZfepN=HE zz#Vn!zDfgxtnME0rUv(>TL+e`Hi5c~T9St3fY{cq|E)3R`~)8B}5WiG8=S-sm&^P#=EgNG^zb@pT_)VvYx144Evv=ZH)?HHufG zu85dVTfN%MK3?(K2QB_ti+R5AD=w&i`rNXX-~N=Ec8%8zid?q(X{ zf%f$fhgHzIEMJdQY9@|_>jK{wij4WE)M*8!oi2fbHFMwRBPLot5~ly1NZGGV2>zPwV@f_zbCjY2pZb%+5w;b$I3dkr_slWX&yC= zB}uL04>B?z>!@#oC*_x8xH_6L$;+EkRp>6YPUu`noFsi8MhNI0xRL36yao&p(~fpud#%N-J(2iW8h|ugq3@mEL?%a$ujU-#pxQE)okaW2JJoz(VchdIaH zAcRqRPgEGlG`|o6w!nRFVL4NA;AmY1wrw?*nejp?${i_k*8zx*!Nb?zqjAxdT7y=Y z!Bl0X;i{2ItG6qATtSGyQ$2?0m9{f){P-vPVMMtZkjvxN`#A}xPDT5b^Q=NyCT0Dw zT6xBvR%>?RFijWd_pcq8x)H5dxJW3}0)A!R?W~|o4*PVZWkKdM{8C!zlS43Hjd5!5 zy)6!lV~W*C)6yEBHQ27tB+Lq>DYp6Hic4Mf$E4RkR*d_u6#qznzm2mYvGTc1deH6V zYJ)N8lcTq+HO}OKV8;>MHIOuc*@_NDXmRuz^Ltkk=FwS)b%U)|T>_+QBrk5WF#*C) z75m7QxrRPAQm%%|swsrIqfLgaA);H&wYUk~=}Dc;?)JD_liv~%k5T@F<-8^T5S z_ld5>sE1OVME@0G;yWy9cwb$afm}JfYXr%l{ANcK#-iBYKtM5+tHgv@r%mcM5Jf0- z+lobgJSn%Kk4ofe1i%Q%#wAjbX7b*H4fHVeBvef8!-CH)ph3aa$p8ncO#z`?SN#Z* z=|(F{Go7Iw-Dj?3(|n)fu1ZpSC%X<u1EU$lIf-12ync*?%&&zZ;R?5*1lDhTzx#i!vk_Jp0Y zFKFwQ^8hZ(tT&!=akRY`-BzwVVBT`V7$jQfDFZQy$GM!Bf1V+(94o*wg&!+OXAD6{ zwxUf!A&DR)9w3q3V=hD+P_Z5dl=m4HM@G?Z{!c6^+R9eW%rXBl(tgOivzo;GfCVYp z?E#QG$SVdbMvy6HPhb&{{@^QKWMyN6Pra+uyb?Y3Co8|Y7_;(PrP2w#BuCdA!1t%^ zO`sIjEirU&-Y}X0)HE^+K;8#hWI_+3~T+VrY+5j zoK=xBi%OQw);9{X5;$}f@hUf0TYd>JnU??#OpS4|FXd~kJNg0yILhL>>7uwz=h;`6 zc3G#Uo_K=Tq(tY!cL$q9qbL&GkeN$7atm?(+s77F+xii&x`(J1TAKFbn zGhc4`6m^Q7F+dCTs;fy4V%w@&<>6rIiXNg0A=RAMw@m(^^@4Cv0vW3o`1L+TLDL5# zx9QLmJPhpon(HvJ{<++!#DJiKzL9FrX_{by1|aqfh%0I^ zMSn3;A(IZ|^ON}k0-q2muDkRs%uUvn%`Q>mPR)$uX2iBlvcHWf=dyD$%WXJ5S+;xP zt$3#gq<5A&G=lKB!F5B)&v<1R%1q}GUnX~;@22!y*>chCI0Tv2;Y~t36YyoZu=^*-AF1T!M8<(3@yf(FrVdAvHu zoa8A4(MxI&!qpt;2pBGi6w4G72EoMY6bDd=8j=|gQ<8NRf**wQ&S!X~wllYexqSCb zP#87s)H78FdikxhjmHG-qClwe8l5~ENM_!Gb!1LJIfjKALUTL~j45n%Ps&13b)}a0 z&Cm55F_cy3p08{j6Ck&sAEA^N5MqLLkTqo_J-*#BHT`o2E-wmj!koNrG@ryz*WZ(Y zw$*Q9*`~%=346&=hrLuXmXL0eXmaC80zQd%7RA zAKO6wyrc{r>6rfUgXO=mJKh~I0*?~4L4;= zups!>5_${X#fb#FhzkU?gBc`jfXhNqifXUavW-#3#CMdr{*=NHpAl$N7bE6_)C)(i z4rR!3Z|w((KK1SYZoAeEqDaK=`&+i_r5``dYJg|C>FpuZSqDVY-Kr{8N`BOQaM*|R zGjzJ?R7Pr7B)+9)Vd(4=;c^Uwj=&RC$?l@9 zF%hAXxmxkNj#Tn9dUO&>+NwrAfUmuz-=f4Ltkiwv zU0hcUPv@*ZeU0dscCGqf|BUqRpW$xn{=nQ`uQKg&*qJJxyiq#Tv)TZN{c6h%8kGq2 zj0-uoA0Ni6_dY<%NibhRI|(b^@3dfS)B6S#40#=G63e=xwCB(%m>#Z8n6H1Na~r=u znR#mGJP9?1{7eM&+JWE#zMi@|H@#_$JCKkXz&zDwg;@13l(^(?ct)C$^_D#CW;^1r zPSyQ>r~ZT!xwX@!ZP1MQmhv~tsPO8IQTmymw|`x7B0Ac}i3KM%G)5FF(n4MQ-5^2( zoWhQ&BhhA>0NlE~RpUomObWsQA5G`V1r2+$D0Cznky@xKWR(ApxQ6~UjE5v#Ztay8 zT~I9H@#2qp9ZLE1d?Qjb0g!G)_G$N%4NH1qGgvAWrNO9}mNBdkb}I?-J-b~aevcljdHxmNv!xkBig(JYt(KD)It*;OW+66=L9RotH84B?Jq+gE9qxXT{F%yhDS z@T@X3Db6GmeTYB_JHHCPH>1cx(8C=|;p~~&ga<(yE(COQFDV;5p&RhKTpa26MOAxy zDOr1jw!@qC+#kha75(Ow;Htyv{Fs8wd6YUc-gvc@bruyv_+g+IB;@0D`8-0g*CW}O zJU_Zln!G#NIQmkGw3b_$E-L<|X5i#uXSmhviHX&rpGhL4uJ(rs33I*5dTBbTrCHIf(4)t{ zK@mi)-pA}-CD2?;WGyceKQkPDMX!ZR!EdK7(`*^TLf`=LhDwrgL|;yDJ%m~6{|G(e z=7c0QhmT9m8WQy>NJ7;RN;1q(0do?Ms5%BFk;tTP_kl=*AsDcrAR#P?uw&VK)~QVS z18w{Awi*omsjVtvrU`Xf{2;05XBe0iE;*1WIUX3+NLPi$N;t8Dt5BsmDS`1fZSPjg1%5dMF@~A`VD&GtATsF6k+hDfg5* zjSDT8s?g@eVv`7JXTFh((0f%fij)r~tY1wUXcS!*HKE zL5Cq=?E@KF9=aX3@_CokymTg9$$)%Vi&1VXHAK_4(O@f8hRUqp7)fjhc3)l<&i72X8^S{GbRH+(usFfwhR0v$1N1iTB(xc5MYe4M&#jhqJAR#TcO)ro;byYpqL0r#hrH z=8+?xVp-#_e4o90?!r@?P;4v-V?LTZ)uct=9Ok~f+RAGo*WnXL6zWd*ubJoW<7*>= zf-&{C9Djc8jYU4}qd+B8wt+I7$X9Y_fe90!7FGu25PCBaf@%km^s(^`2UWE2HemR| z;!nKx? z{$k+ZH80AVp3K#y^Fh%@sZ93k@9#WInS+zLK!)+v1c)Mlf^s~Fi>EXN@AC5FCVjB> z5#0G*=6K!PeY#P0p)S7O(`WOXYFX6cJqT#cR~s$8;;&hXicB;PY-w6mJ%)@A40@`YVn1B<+)WGFl6DB?L_7gEqg38w?rce%3I82(e(Be2luy85%^FC< z&2cuULUdYmOLN`!E8{S+%Q36!mLb`2(kef}0Agy$KC=DMgwN02_|aLd+H)g;NW+89 zXPU@90$$CJTBqcJG;BJjQA8ug3?N}+f2&08C6v^jN&pu}#62!4%;Tx0nUw(I3b_1kLL0%b8bg%Dw!hth z|D5C^28z%_kkxK5nuP5X2r{m7ADh5cQ*b7gkL_h?Tc<@x#u+`TCj48?eoh$MC9n%Z z73U*7_SElr@?1G+=@OoP^U})CwS6~o4Urv5PXa+l;zIhYm4oY~h8TohT$gLbR{RsVLVForIR5`Ghh*fB3d=to3sUuAqM$I)Z#E-g(fKg<21}r`Bh>0cb z8(;2WEr3|B**%QBiVkpnKa7#19{`SXN0g< zWX*Em`4_DF^u2O0NCUzgBT`OjXknTGQSS32ckn|p9oDOT<>&1Wq-s7)4b4#zc<~s} z#-o#|?|&VZm2z3r%T1jTE=dqS_3~uCFX4M-Ep~vw% z{Q1GpmBu28Mu2)>ZrSTY>@ZLoFq?CnOvfeUC=0rqm|g(*sNMXA3|2H>#H|Ja|FMoKDrIpZBYhY#BvYpWru&G$phnw^v(|B(*-FBbnj`N7-cC zJ`!R@y;%W3F^f{~Nu;ekXt33S2uAIAY|Hf?;!5I)c*Eb{=3OECIOHh|)emWVr754N zkm;K3FWwvdQVBFKsE=QS1oEKZudA!K9ous6j%aUx(R>-OJB{_~4&ETBaR9vkUYKe_ zch0M>^8t0GGXH`U72Z8-NnQX?oEuGny+-n)`|Db~1S-lu(*=Vpyn9Z>)~RJ+?;F4- zS#$ha9BCQh9{u|Pc0T9o)<}%N2X~cIO6?!-)VVZ1&m=6ZmbGrY|8Xwcei%5bG8?`! zSfytQ|HncofkH+ZgiEX*;lLK(6Wa)V89h50hoQ69wx|ZmTlxbOI1BbBmkZg(PJ<9y zA8#{Yf;rUMOkB6vX%Aeks(9lRXRWhu?!P~>KWy!AWf2o{F`)3Ty%A=7a^~uTR<+MLRLD%wlq*M5aI2l$wbng zZZr-H?%+6DPR|#$=qZNuuRT{A);+ZhdB$TL$-cjy*6m^Zz@HDWRqgT_ckV@jh19-;KDq3_n~ghWdP(+kBcbyp zxoD;w=Y`6utog$$#iFdftv(G&{Eo8UL%8cXMhtmHnakh=C|I2!1cC=P zUg(acqy^1u8FoL2Q*6>-mqZa(T6g})rZ#Syvv@!#NtYnPwcG!K9AIHFH>sk{nMXq? zGk6*3k1+*URtjU;NVLLsYRap>n@RQ}snkzJ7w=$iK&2uVE0HQE>?&KAf%35$-3CZS z)bHl2&PW?lo2#`vXO-^toEqrsRjcMufTpL#9YJSRzJK1@`Em(muXg|wGSZGhR4H=H zXOKnZY7nqnJawNN3S#q%FE>Vcv14Dx5shf(>)mWU>d7UI@>g22Xx3gbV35K&riP+2 z&pvZ%TG@ZovTzx+!EP;xmQz{``p`ii1^LlbS{MF22lw<1I%d$3d;*7jopAS&e8H2? zbQp`!j4Th3NV=}OZDE@m&T zeH~A5=@sxw_-foAu&)d*Vqhs)K0O6TO7lg_0D1rCclQ>Dh%B_;ejhbML0Jh5DZ@2k za*3-a0b|SWPaXG|x-0Xrz&U{$wyW$kZ=c2tla|M(PC9~-()oBahYz<)*qG zttNa6(1&dmbV(=;hetW+333PV>jeQ9vDXmvV>XiurFenB-+456b~c*NYBDq=)4b11 zzh?hJwY|XRMK8{0Pe=s;4ekRAD(5)`j7;sCRompwmOAPv1~+?~kn?XZfBnw0x}DtO z5sLQieT?WA!K7#@gdLH{B~n?u@$E(MBqua4l;ZPKhzj}IdM%0%zx6yk0ijXyVu3*l z{kaYfp@aI9_I`S1W}`${^hg*fmZ>bRmQ0C_tv0V#S!8t5Zd{^bC77*&k*#Rv!GkA zc$r)b#d>(3Aj^~IE`OOcSY5;mcGwbyM9e#G2$w&n=Vi8rOh@klR^~)qg+Cs znVm(}rDmV8Lm6F|LmtUcyXD8?ZR49k7rLW}^73#Hn6$__t;ZCkjYl<|;Iywlw=HVu z`hBVXJ~vJ*kWapm)z`<9nS5O&yi=6d`6(V9{4~r4^f*$TGKCp%RPmHG{l5Kl=+3#+ zKfHso+$UkCH2w6KRVo=G{6!zPBR*|Hne;HDR6x)_PgyEoKypn03RKzFsR&|xBJNk0 zQPGFVlx}lzpZ4)sUQ6>VI($hsf;|iWsccwK3tg8|g$p4n#q~i018a2c8;W$GZPtB^ z>=-#hS15rKDwdZ4jggcd@HL1zVa5~QZbCF{7YkdJZ!c@5s9|YEPYOh$z&_muspH~M zYC1T90x4?ohH?B!Vtd73>&kIgaU>0I<>ke$b;sM(7z~)V-d8HOhy7hHveN@0!383x4tZ=p2iDVN`$6B{wwR4M8e`c z8Qt*1bV(6O**$1m*-0me6cWej;(#;Q5%>3~<#$h^8_{+ms)Ekhxb2qvoV$(ew*$&x+nsa(w%#*}<2@+A}E1Fhdz~Jz9h+U7W~U>6(7!NMoBsFbh&)k`j=j zLGn&4pY??BfPdO7K-mz6?oI|c?mAU;0u?8cEuRcZ2MK}a*oq2(FIo1`#e~}|rt6w2 z;9-YRt}%zM6T;|Ot~3ntdaVp3JUq+?=t1(RSa0AK^de1_PRSvNqMGM=Z2D3e@VwGe zT(@`aB!7ia2@7b7F}OeTXND`@yByH!G3tf!%p2Vm(e}s?0=X3ms_;RP;?j%QL_%Bo zQEt^FAvE^xc;avp5(N7(6*gp@P}H!&IzP6k)M#gpQyrF7cUSY2yu%NDG&lC-eOv23 zImwA*i!}h2ReJ6~p{4Ltdq!xGV1cE$lrEKBl||^&R~>jaB3=wdC8v`?+CXnBXPJ?1 zkvbW7`28-h{d#5R)%yuyjN`}>@>WH$is$CFR8jO{g!~?V z9EQ>9LI*<0o$a)zh5EnR!ihCav)`~%97nDbqHSyT_0sNnP~G_y8^OB@zF@=xlRgsb z(^~{5rx7`DYl>4-LPJvEsIACU^3KS0#2;JR;jk)?Fg_5Hskr>8M!^z3g<$7}8R5CO zGo|!q@BaI>v%9aI6$U>Tx5JWpd{o7FO^YHtj$9C#mjoligshSa9zB+cO!a;9Ncp)A zJ@7pl01-P-E22!fJX6gAy_EP{5EVkJ2fp)LE9aUnxa3LY_xG%G!nsIBw@1icVYl1} z{&mDjQCV>)io3Xkg3TlBQEqf^7x^}LX9rdDRt~wE>Zs?zk3wAkCqzPM|6z5KHxF8N zE8?k`EGKMt+N_iul^Ze~q<$4NOz&N5P_f}Ri(l8x^Uum%e%j>2!GA4QP1$d!-CLIq~r0q^WT})A_-noRYdtFc% z6#3@aE^XI&hL8Y>?dsTFi62PCrGUF+Cx{<$!q7af3`)uH(1j4-F^G&D2npPC@rTK6 z1Du_;z{qcJMceV9)D3xRbwP(IZOYYLpM=#N)6>4Hvu}dX@|leB;h!Bce{qO&?>lBh z+x6)Ok$4XjsoYv}46kQwQJzbpDV-NTQqh50%h*1WK~o`;9(R=jc;tKF=PJTw*kiI4 z9{uzz*a)FDQ@jhcbwq$`pZ@ErHtD}Acz06UJLw^J3SYJVu28EUIJsxA%G0`rQ~PT) z2K~X>L}$MKN>?qaBmhV%?eDg|fO-zRAChIq8xz`Yt=`^vS+0sstz530EzEwr@i;1o zT2th37*iDZAbQAmxki?UL(XNZ6ukizk9dl_RH+rQDAB zu1NY+tn8?Saf4PMmi>2J?ITvlDk$#yM1E}c)?chMa8CGLAvf{yRD&bp+%TYio-5GQ zb3*>PnXqH(J#rf5Oj~%ji4&q7fO2UNIujokG(W883EP*v<-Qy;0ULW89V$;^ zd0uwK2|Rznt6(OSoB3Ai4I%DiAMtx8W%7%If5ieYrixf~k8;+f;eP}SoLWZ!?4Myz zau4K^Y8VMOIq;1nM8|f$m@|J4X5=B=JFbE7wVFKW$UDenTKr7m)I>Mc%Wa(&Yaj^K zbo_jJ1aQS*Pj&-kkL7P}Rp|;1%F#I7-S(|HCH4yi`0sb~W8c0KNYem6L>Gkf7By7| zsc=(&fsp@6K@0l+Bs9WfkiAQpV4aXD1y%5tPsGK6xyJZEgD^~J^HgR)RssfQxR1Ne z16vxT94F17ezInB{IhFK$;WJ<@I46hlM$Y{OFF`Xw?1B)m~vzAcFL8PZj{zKh`vJD|+X_ z?vl+|DU6W!bctf|H2%*@h*vMvY7Ly`4a`!Wh6Oo7(4f4C#QN8Ig+GOol9E98W_%SJ zUkAaRs41UNbpJ#u=Xwc@3JJ|?>+FAQe(`a^;tBZ(CdgDJ>vDC`{;!Yx=Ra_uamX_J zFn>?{3ScG(%-%}PuG@{$>o}-H6lGTDm8ma$@TeIGRLq?>+y)0s2G!y|N%yg;nO_Np8A+jF>P2r`diXGh(D*C*W<7x@C=1ci z5-RbH4j$s(rohX~w7_j5vxU9RApqj7E><~UJ@Q5=vu&P0rTAb!1as}pFCu~W#G236 zNYqZB{)1Ql`)kK7&~bjst*WmI8+Tn6F9!Go848T<))VK^Rc^=rn+5sYGbIj*F;JQf|?mv{M4xYhrMEKSX9+a~|#3Q*;tLx=^4 zlFAGRCayxgjmyup#}UU^7K>BOy!`)QD6O%CTMbfQA4 zT)h4X=6Kkf)C8JV5)~{QQEBIqf7}p|zEYv@jG*L)~>?zV$WKYDAqItC;0nK%h~?_2&XVTVA-`}IY$`?V8=piSq*X_Ru=uXrXK7l zC!mQ;$GA?Gl>3t`+9w5zVVsg_n|a6w+z6$iOAf>PGoT(=gPCKoEI+vC29PtnJpm{c zL&T7Sh&Sz!ONaTIo{E;85`sWxA9w^#53ntP;(tHozwj|M{(COk>3vd+*sqMSE;}(E z@!)T=_yDJ0v7cT3;DHaC=ijb&} zf2J$nsBQq%*%Xu9o1oq>t@kzs*R@#$%9H#^C&C(EfL9!2`r^(IFePBi-O+gcs}gs? zv!(m9G*Oa0mY}oN)rU!ZCA;#+k)vb_nA3tK_LL5DYJYm`UeRNJGpw~zeckW#BPSw} z|M)cfp!cYcAz?&ZspFqg6z~ojzF19zt-oVo35w{=$`CFZLI-FU>Uo=rK)Ut7(;`VV zcGhM`L^R==ceHCX)7Vb~;sDGujo9WEPDSZSOqR&Tpx>1 zoohiq?|0y-3~g58>q@1L&j0fZ07ohHNnWq~o@-8PunN-l?NrqIEGMLSxTFkM{J@Bh znZ+&#ht*^1E5Kd1NN;78vvB75pN|E?7t^~i>xmkJ4z6e?uxJglFlBIX@asLTqWhi@ zOaWzSTu4pmJ~D5#BK_5mk!_6Wo4IOp*+;4`ehFg2R%ib^h7C2)qDqS}nK)&%5t_Hh zz#}J?IVYB@Vc!1Mpu^@^%CqsZPX;-dfu!}UGd5={<9!;!^VB=_0j(*#pCuMG^AC#t zujUcs0~gWL)iE!gwA_A5ThyujB4Sr&j-P5q_4W~5 zcxYGTy)-4jG>WP*HRrO?PZO{rH#K5 z`=2%d1foPCoz-v6MmsM7M8ZGv{Pzzt`CZo*qup!opX}=&&*F0z_=&~ljs4#qBloUr zYBTQF_n#TLb9ITBzz2rD3;kjLf8%F6ljZdO;{y2SUj9FRA^-m+{55oU8uI@fNl3Qp zqY`OYVj)~O7|-EjI>>XqdnTaw`~!7qt-LH_+i0%%Q8M|QMPssS*KjiL*Jpl;kc`E~ z#R{WV_9ezsH>QR9(q7N$Jo31z&bd z17>f56>Z7U-t(Z2eECQr?P*1=8h*F|Og z`$782E8HwUB0U{eEDVy_8&XFM+`lRRd9ot4+e~kJ^4?Ne{#-jw)IfZiTwE%$%qcZ( zbF_Y+O?N7mE{N@0M~SFGVWxPQSC7!{QmfZZbO&JN0B0i*dyngKw^3(t4Q}8#6iePN zC(HWli_(nl;esti!#)H+_1FE>3*XU5$FmErQS6Pv9=Ciw6TrO%q{PuLuj^x^x zTvLlH_TF7-;McEg^I0cwf`Q{c?wG;Idk%1Pi_yMf`LeWgMmRf_oS9dYhSLXet&xN8 zn|W!woXgKzPxqYz3aK5aTHIOIpS5xPjf|CW?)RHpFVhG{4!5^?)|Rh!bhSv0qrrxJ z^0o>EjwX%fMC)nq|%^T0AgW5JmG)_iAUE z_9CtKdbe$Or(_-04zO!y;fZws`hyl zobVu4Z1NAacecmDig;to9mWihhCPCpFY3EkXPq0Ek}DI?YZTDA#!3YRm6o50(h}R; zNAC=1q9!M3C?3n0q=xS;kHk_4kM}Bzq*y0%JmYb$DW}!&G8V~kV2dcT{l27UWUj;Z zesRG%vq2S?m3s*huomd>G;KzQ{xn*!*Jv_}7QQE7QG_RQAhauNwjP*Y1pm=pdPg!$ zuW^hu6F?#r`KN91=y#Ezt3f$nQE1%m@D-t`R~e17 zEAnZ;;v&;Sf)@}p8)h_bRs8+wJl~WoKB{TooOh% z&%e!h4QlT$5q)?1FSfwGf6#5;;M5qAT=tmyYlgu<0cgOYUW8_@JtorP_N)IFgPbrR zbi0%VhWBp>Shx0Iou@xO1pAUx_xs&c6C?DXS{gaZz7N^Qk&7Dm&xywEi=&lP7>lttQrJS*vP4ok2qL z&T5mQq4Ng4p0G=+_te6Itble7U-1@W$AVJCbazg_iMJY@jfTg1>#?J^ug=`D^V(-G zVf+b(RwRpW>@d+d-`AY~Y$wOqda`T(fFWg1)Yer2w1DyHi0&WZwm_#%!sjqH=c=4{ zXcb{jdwHKBNt%ZxZ(t(8ckYP(a)`S~QF@V!$9*M$?JitO3UmSPobJAYH|D}$;j zDY=J=`=Zf+OzYk0yro&r1$Fg?7*} zDSJMZ{a77}MUFs>H^U*N`EPUL3ODXbuC8+p1Mlq{oNM8=R*Qp*)FnyUpsTh6KHKi} zH3`val6S4yei5Rt+CzBIaG736@+ zwci4^CNTOi!GSU@+Z_fFop7n_Se7O{OL`5qUnQcYrHP@f>D|> zjM$ib>+4!&XLC68j|=`mZcv77(n%d07ABY1K4lYR{&=c}_|&^7!pI|RD#i7XohDmD zemT`W%Xvk`|Iqc0eOH)j1a0)8X0yu-yTQdAy>6|Z%eaW(TWzJ0a&|GJ%d^@XrVP9G zUidHV=!aqgD~W%j+cY`Wtd|WlRs#jDX$P}#x}>7!()`U#p{m9VRNK-666c!OM?!V6 zQbdGBq7jBN^K$4z-i<~rFvkz#qI251&M&z%=V5{wEn19Y!zAXKtWPvWJSl|c-ln_f zp2+abhc#}A!7o|=T7JrqM`&plS{F+tC#Oq;@DOd!sdi5jFB?x)i{nqy0S>8)2B_+G?*pBg!d<*wDvf8gwIi0a*Tab28~zo z$4`MtHXtARgXI8B3y)P8T8~xC+2}x7Ew%Jk#YGSUEZ_ttIJL#K*ejo1nkt@y32e)! zG)pq79LT}uhPCI#ACrtC{9iQ-mKlkXxS3hQJ!nLRF{pyxoRIVCA_rQ&lxoNx{g)fL z5@yQge0|O5(=LWzD0U0Wr**_%HVx*RdRv8jU!fV>jR&}(@ z)7Z8a7Yef)N_5!V%_sezTSkP5L`M}=E=N4V%?WA2qoM2j*`ih27IHNI_orx}VL6mn zR1f0moc=yOX|Rg{X#=^*Dd&`F+Sitpw&Z*DBF8G&WbJKHGo@Qpa5b| zdi8zcK6Y{wbf1D~_f)4S83$RNfqYxdsWdRxYned!t5kBwop@+FyCXhxdzn3+hO=6& ziY94F;m;#B-dhcPxlYuzdn3iTYU7gH{p!AQ-+j9;Y6X7pr=P_k=*uom z73W589ykuolvGIuOa^u~)@~Z*xxBDfc_kxRE%|Kxojutf)uC7_QEkCdCU}6qojMBc29$_lRV(#koz5GF+nRc`kIr}VNPlD|GmATu|RZg6HheDYd zg{{-Kg(C6fFGBPf*h9;1d6lonJ-c$bdwm_u(uXDMM+$^ag(8A;Zn!IBse}cm(lM0J zsDu#wABBv|Ux+V!qmF0W&Z+cvens<5(de3Cc)mg>2kss?PQCksH|cR}nEbi97~yIi z{JpGcp~f1eT~N2V?&2#knn@q|_Brf;8Jj>M`>^J)OXM^>VcFiU#C$g;U~*}m>Dy-) zG#aIyxWg%U)BXXG%38zE=LXhi*Ac%s>Iu){99<39jZ3+CGvR_Aah&ct{@?45@Y{3szY}&LH9nF$h6OWsrx7wpRgda7H^P9(*t3TGaW)Tq{&9RL!Y?AGi zUUQ3!E}q^jJ8o9k8MNuqE&fn+44yqd$k_XoNmaf$O4S+b_v~z%(=_M+m;ak^XFGi+ z*L2Irhzq-0K&jXIx-ms(Z<#9Wnhb#P)b0)!^-UKFzdl_G%1O3Og`CNoo(6a{bVTU@X}h`_jjEO z$#-{lj4od`)PGib#_~8^=uuZj-Xsr*P z-qGrHXv%9nR;OCx2P~BPac*}d^1iN7zpqevR&BE8utt?!xzS0y^P=8kNY|j<3hzZc zJnNbCld~G23^@Pi#J=3*H*e4=lFVCxNu>(&L&TuY-`u7Rr~#fbzj>kd>1WRXd5?d(wv9u z{OGPRtkLzeJdAIWuD7vcD{P&xnm=!Txb6-(Alkvw7w0|K*)|2hXYL$_?Yb_w#`^Z{ z6MnB)u`;yDwX|LsZxf!J>%E$u0Q6>`NKn@N_{R_vN(*3 z`Essr)cN`HoR`DBgJZ=*fBl9HI&XD8Y913NjMsgjN9}pG&6clNuCc5O=iUfix7&AY zw+-uKs1`8bcvPuxKKu9UZ(X%+r_L+RL9GhMze?wPpFR;IuG1ZgBglD7wiB+GmAXck z3%4G+AB`G4I$TrW4x!+DOeBLoxR3B4;aVPTFE1p}BlL7tvhnMSZIybnt(|%ReHsQ5e_q$EHhiuoqX=u1cd-d!c+TwWxncgL= z*@t`dw(V8wx3lfg{J8!(UOPlGH&pMkdDWe5)lP`5*`V#Zhpb#=HJjGkXq{WVxgY2` zI%@PN;nOo*ZwnW`5-{Nz%|*yFaP8VPI;Xqagz@8Skd6`0+Ld}v^wvFluzqviaZEZ( z;t4*Gwl1A@pVR%3vG(rOCmff}TQ=*yx+=8arAtR$LrNjpDZYg5&^$ONnHSGL?#Z0T z^K{;=)pNhUumTIt2}mZ-f6gb45%(~zg*kKPXuPX!jP76k6@hu{&EeD)N_pU0sg@~jAstl z3gb9Hf|ee=dKi3wYm5;5OYG7$5gYh%VU!Ormx}Oo(F0)Ah*5fQ zudv4+e^L*Tcyr((J8alcTfBHlco6eO#)-U;ReCU#KGkv zU_88a@zChgr&l<(w8cY%lOw!6sSoBFt_K=Zp*=3zUAv;xlLzi7Ne5}Wr*2r>)R;3j zQBGiR9Lfzsq_ndxbjHnv!G+mT{qtae%=hivOBcq7aKSJpbsJAi^*2z2Bo^Ly^ljW2 z>&yjBB`wt&LzUKRSm6Sp4+>)qH*?L0lbr87NVwT^AwoPMg7n9nxDhZ;E`E+L`y4X$ zAdNN74GAIZz-HjU{$VVqE)kiB#>WBtH^{la{?P#F{Tn14DJJP=vW z0?8aSsDIeTI3XuhRXw$AwVAVC4mUN{cM#cMwQ7wXwhO}8wQC@C%wfH5RNJ;~wTVhG zIaoJANG>-Pqy!uEz=KFayyl8bRfs_K)G_F<2UIV;U~CM8A>s!CoUb}O6emm=7j8<7 zhcQA>!2_HY>PEOy4`Uu`y>%`wUc5A%&&ze)4Id#wuerYT;w)Rdbg}i(ISql2^Y5T> z?$CEhdsK%vbzaaGELbGcHP1$m9%+Mz3=cOx#>ETBrcE0IHe83isBkRC>0!g$J1+}d z-;hCGOqMKKYV#`R2V%{*d6;su=KAC&$PIO!ZlYXQH9Mm4>lYy z7UsmP-&ng{Yj*{_T|s9)PQZQ7do?5JZfZQ8WR@7R#G1*M~7d0lIWu6f;= zeltvV2M>)~*lv9;vc7QPlByiXjvF7$?w2|@RTF1(XaNcRe#I-F5R15c|4 zoVlUL7@+z&Ec0OOa&?`5#B{*vb1S|K36a+~xaitZA&RXwWt~hU3oSiSF|^Ke^imFU zcaL#fwtQLn)fLyrI2@6A8yVwzYvgoC)*s_3WIP66U00Fo6~Uc#(fdm~R#eWwxHD(& zFkIAG7k{;&k6;sD_1TLD2=Zqh*ARL6ple#6HnaESQaLXqOQOYa5yEN z4HE&__Gba?>lfBPc69Z$u)0{4GiT1MN{%4y+-Xtmt`j^s%4b?zTNUmK@KJD{#k}3<;nd zy9_?|SNR4swM2AZPn&yM$ib8fxGj*_9_7ERTK?+niYy{%$OF#~ zOBp#tB((>4?clY@x}(-gOmp22GzHQZ_uExGj}*oSOB*@SuQr zi77B1)4c)t9Ra24B?)m{9S>8~MSc#|evKVFCeLnp*0!dvJPtgEn***J)@`Utf{|!_ zY9FG>lfv@$IM3y2uufL3Tv-WYTh`v((@v|NO!ci;v7%x^v&MNktugDEw_$qfoH%K6 z*7ukStiI#1SRO^7ojkt%qkQW6jqFnZEy6ycdeqFx#28?d!^Vvps>fHzIl|^|ZWdg9i_+UfsR>;z11o z%;F;k?pa8Xn2ZS;kR{~KDYRjF|D9@vu=u#?~{8ujlguRk;j) zd!{+o9v)j>ZbX9Nbi?)6r#=R3-*~cy#K;+14Vg2}m{;X_N1{dM7bepUjDa;F<78A+ zL7lLbcbH=3BoNU;basW9QldP7evT~1ix(q$fQ`R<#$93L@2>iv^4H+Ohsv1fE@h|< zIGKxM6@+cXh+)V2`taxUILBe{b+U5s=8a{v&zT3!H^T3|S-> z##md{%<^F1f}3xyp7L?wIdkUB4rWcx`a}vvAa|9H5J*NXudTWnk|Pr#6fv__=^@xb zuh0|7r!{?|%LylxIxuL^kXR>UYDk2Ign1)*I^7nlc}hT^=LQq!Et%flUKIggXK`@J z1Cf^ z#RuSl88ynw#3RF70K9|~2#iUh=y*K45?;}^5eau85tOko-=Rap>*xA^vi$EJ0bVcO zn=K(xysC&LtB=KOK?|8s{=!$R&xr}`k{JYqya5}Y=dF>ez9FZKp{bGk=^=VZA`l^i zh?c(e`z{YFIHZ`~S0#6o-8+hpi}pIxqbL;0PW?gmk)w*O7aSMBW!p0DVKi85cL-dUN#@&z(EBj_uxr zKSd`_KYdrjmI9=S9}a6S&#GtL(6)akW>?E z8D49@;%{jnaE)DV>x$89W1FmZ`XaIv^nKF4wuILqo&Exc;ei02DG zb#B;D!vI20JTe<&F_`4>@d|L`vxuvbiRY86oyFq0gbYF8siYKu-Jk$H3(iEJEdO^# zz;q&6yd+W;C{#oSc>^4*zX~|%GO{=(i<=h+z#v9s47qb1#ZI1C!&?I+?&}+Qr%V|} z)<&a5r6y3?WSK<^OpqipUI8QZA+GA|*Qa02IpW0!bc`NrL&!va;l_BHMkRIQKIfcW z+phgc3WA^yqtk9-9%KcG2{ZLeUX(D3wdQ$)Y9?goE>ASHo{?$X0Hc)nFoN;EHRzs_COden&Ss;rH0lAf9$BeDU1rJs$?6;-L zEJJ6)gj4D`c6H?lnv4lAi;YIJXU{GN61t{r6&oftbam#wEs^123H?v5GWB2o^k(*WbLA zZi_-6QS&(fuv|Mz+u+#*Lm^N+6r$vC`GisJRl%K_5SL{ArOTGaQ<2He#Po|2$Mkty zBpnM|nIIO*(BxtYg#fq_!zI>c6UgSyvU2sx3e1!#!5~~fb7=Acc@Zkug#b`Oi1Eqt ze`5s5B_joajQ)-{Jr-q1A|*F1hqsesUM=8*+{vXuKIK&*fkPvU!g@#wBtkId4$ArE zkwMxRH}mJuuhy)brQIPB^0z2{Yh-7_lat~#92Lb&=8!m~kG%3~tz4Bn;^YOAVV*3F z;X#*JZ-WJbfVggtm#&pFJG=syFo<^WNNRfxp@*;`EPeaPwMxQ&$P@3LXNee$8Pg(F z$cc>?z-?SY%@x4Xmbx~w1~&(Ik(;pr&MhIdNHuZ?VC5>US-+;P?_ODt!x9#iS0+R( zv}8li&JZl&8zEogX3bisNUP8e0QG$Bm~e_bVLL>FAHf3c929I2X^;~Q?9GLozF{Lo z84z(B&_-6T0S}w#3B_Rijor$SIe21|#HO?#=@LF49vnK9JY}I-ZC#z*R31g1>A}GQ zgjzf0C(5G|g16ylNIV2&g`ojcAcW93(s;|lTa!cH>St%t59Au#jDhqc*}F3S`%&oCnlWVP^KG7ee4(D`dKu(sEBXBQ` zK#f3VjlvS%MC*2Gj4*OX-fg<$%p$vM@-r|PxxRB<{T_}Ff%U;A`KI!VMR1lZT@*uk zK;8V*Kb!|=V0haYhB(3`yoK>;V-vDkbINng<}Ja@70W6Sw5F^Z(XR7y5B#?t8SV^Q zn`cFRMOj2^Cj?7|1{($@x@&D)tFYokmlIAX5keu4Lw)QtN^*GsX;6UT)OcTbPV8b@ z89=7A5IebC`w#5RWF|D2glURfxM=g%grWP!iappTyP^_i93Sw`paS`=$?@Sek@&rD z|FG&h_FM_nfN5jG&_Ga5jvO!qP`GJmaz^&&cm?@Q82z{jW9xPP4Upv|u^bLW39O7) zW7Vn^)f%A4ss|!T%q$H+-?@21yb+_TAWK$k>1@8}8zQx5cw}~O zS+ROWRoX)6dm?|lOR2VoNBj1RtoF-Bv&iuN&h=$?2<5N?Au9nqVdnU#O6Qi1+2pY$ zuV33!cISTKLWC1oA%en@a+7&{dZ)fV*XYr_N}qs;r{_omhH=4H*<(P=ZBvUdI2 zn)fp}Z$whp_N6mR>n_#CQ+L zuJw={k&z+8LaYbGdlq7|Zo`_=xv4W)7HsGrk7#gaaR}b_7`!zsoB4xRW1?X6fA_xK zA;!Bi_Awl?Ydw0Rj2aiu#OUE6iMuOtgNi!7XWxPSs=_m#NMhn<4v&b^5e;f>?&uxG zL>`dI(PNXJnQsOq_YO99M9zl{$!3(u0wV9Ej1?DR^#>&Cba6xNJP&B}N+eWZW3`0|yU?yzQz+mD2}$ zrTwF$e5aPlY30dsas=+Z5#R_w@Fq>2Tpa{(d~1GI#F12uq+Z!56+Vz``kGRbEmhU& zCFE=~;qt7DzNv#=K;q!elEvB37F?UPbykhy#MG=9CwjCw^33QZ&+9j?Pe*!{=`*KS zeIjpJ#8m3a{-p8j9-Sy}@W;lSYp%PtIwD|`e>2o1ktZ@)KT8IH8=AJQ|(~1H692+5lZF-gqI$jvXEAb6*8=BoZ)A%phaZl#NlPT;&^3 z6z%Qp8IT-d6OdoEDg-n@HFIV{bFpZ719%F!i-i+;U<@`!&Ls>K0pF6POKLbtl57}d zX`i9aQtOkWCaHC3h^>&=qD2d%)9^nliw9$ z)|sQ9B6kRp99#fXEz8)mdCF~?0vtSu2;z=- zEFE*ivPBeFrSfxX*e0ZL(V|$!k==P`oKco1M2ZMB*02pZ$Qb$bQ$1i?Z0>OcQ&;s2 z4oe-pa@Gy6qT)Cep;@_vBLlo51-xU9zmgxR-8@PNC1b2lpZ;}h-0wMvg@Rbym@*}6 z$F5)@UHOJWjVWxBjQ)rRhAa7B4FlW6?x$8Tavy`IXI=X zr+tVC0xd7PEB#`G@+7O12UB{0z96<8?wdNLtP9~E6;d^8#*FG+GY32qLbCo|yg0@{ zep}hdvJh?{E5v7Dx&DUh>$uOFJ*zz8!i&nOlPA`VRok{~t7GT5rh_3=(iV)_-hKHz zibF((2eW^0(XnJwA9$sOsD;1dVyvD&Br$%`U=Om~r^)~_40qrw64yEg>y*0LW@Y4o z7ld+Ix@2jLi)>8V8jou5Rokb;yFMT?X-zM%k2_Q6cPup8NCXQz!JC#dC9wR{D$y}Nf0gp z<_a<@{OuSZAVray2+BqXkP-*D(~`^OyfsJVcqU-p5EpTyi0vSy+}rw3i#4z(N5U+v zU_9@PGfP{-I=y4s-*nTB)lxtPlnRc#JDIe#af8b-Gs$&=>lG*e^M7FkSclHhbH1U? zG{Vj{Ufg`kE!C)@6nUaX+%9`gEFc?Xv8!uSB^r#MtoF!A{|X!yKiNeffB=GX+rr!G zQ9_6iX{`q*IQfH7@Uv=hBYMQF}+%@e!FoyrdJD(-z?N%ldAs^T2pT z?&`*wJm2nUsQ@!(Os`%62FOB9 z!-#A+*RgJJiL%o#M!E2~BSjY6cvB^iJc@nN1|D-n8KGxb@GhEPb0_pJN0!&H|Bgh0 zqV(jEoqcvI50^|C^P$5BXXpLIdUTMmA$ienV`Af4uU@TmBI|{+)MkvFJV}qxj|sV7 zKj;bTNPgLb;o~zt`-*4)dA0G8o*-){%gGVAw?}}HW*tgLl5Vp*>sMrFaEwowPj>w~ zR$*Nm%fb&B-1Fw09{F!YJXU6%GuCbBv-S|gY8=K>iP*tvat@27&p5A^@gz-&ql_a9 zHc1(gsxl%`4iN~rKXGz$?0fa9YxCAyZ>?=&oWocc0k=eZnjPcPWt^`o(qNrW4+%Zd z<%APTp{`9)#H`zDLFZh%%uAHq(t38}t{fpTb;`8lJ;nPH3%(|8XL6j=M9G$kvHrvK z`^6h0fgDg`?-Z5|Fb)l8`MZV!G3f(C>g+x>ft&kmsX3LD!b2YXkP1l7X{5j?MBaxP z5tiM%oekH!*5^E}(@x9zhXFHZs!gBPRzpDxa}FUueZ)nN$XSy!>*UGF5)z{rgw54w zB9FHKR!RZ516;z0H~?MBxbg0&*Jq0t=e*4HS>C2`J>Ej72|k6Y4r5J`Q+|ric%5vP zx+g__1l_o(QOKIHH*Fvy&;Iff7eYD}IdtU5f$x!AF{ zElScH3tLm1#%guWHbWR#zDQTi$w_JkSp_CQ$h_}JevTgp+b$2mnUp-qr$6Rt7(=YYqSGD$iHZ|wz?b>x- z9TRe)9>?%FV=#M5$|)g=4|&i7v;N{C4xp1KgwYObXU64J!Kz^NUq2pn|NCYA&!85C#Q9TVsOY|#XQs3UUOaAm;a@04vd!nDo2XP^VA7>Q9Ppb$JrNzquD|jq~iBF9T4G2bBH*@C9DW}glJsWw1n77sStsT6O))pcd zS7UvizQC6>vCN5VOY70reIdj{c+`W}QY02HT~g(eTnXPhj!j+W#ClQ42_wOp<0aKk zGST5>$FX~wNG2M z+c?o%@YeX9dFGk*bK`2>_0K)z*}oa#4X)f9ZMwJX&ag@-Pq@OANjZ)z7(=dYn2{?!JL_D;MtY7-b!}~J_0$9VH)hV9RUY|>N7l3>V^SAa zp24Uao%J;+>uLG26%`wX506)J?1YS2&XSIvkc+vuuU+0bTQlByxVJXOtHaQF^{2N_ zuky-}9h}^7b=%Mb$M@~tSGu+)`jAu+SaPDv2`7{WeO$m{+?aSKhYd++YG-v1Z|ckm z_))AQlDN(ixM9T&mF+*|ArHy9+3nS%g53j63dSk+js)R_q?CjRz3jd#lWAulB`{>5 zqkWPi6wuodLP2p-+*5O)Fmh;OZd$vb=0OOT`wjt|HDh)Ka0*a3rz<3NOF%|QZ_e!5 z(Ll+M$N|O{9xSI?%8wei9izOa%Y z8#53vJ0%w`Tv(IX|L_n0ux^@A8&dT7&wswU&@E`;&Ud}*U6s`I>}jp52=({A_r3D- zpZ~mEbImn}0RhoczW@F2SKxo?OJ7>y+^AH@cr_azbs$+(wB0c*bNn|FS+EB zstEM=BOm!lm7h1f;SJ?UPkK_16@!f(ow{>gQ1-L?Zq9mQw*EXfC%J8IEqV)|tkz=V8 zdv|1G%CuAJef#(3m1%v27{^2|VFyx{Jin|BVOrp=ObrM&WpY9#N+nde-tVIobs=)ine&nz9#-Ob^_+0(%)7mSkN0xa_C@UMSMEo1hARZl8N;{c0C?2*tlJHUW*m>_w=r=>>l@$r#+oK|;e{90 z`tNg}`_wc8-l%6j^O=XM{K-##QvUg$|G63sFbJ+a;t`Li$73D7sE2=uhQ0EYudKL; zz#{v|2ciZ;V3KzHPb<Cm7uP7>BOm$5ipTWCZ-4vSa{l?} zmnS^o2{khE{`bGX9;DBRc*#p%QZBmaqI6V^Pdo=Ep|xW&yTtSN>a>UVhu2Y#!`kHjD6C1qe(TK% zb;bg4lo4XblVih%z8ue{oL~R?*X32OdR5+(adY{nfBL6N-n7T!{lXW%Q2zLj|G50o zAN^5%wnhDc4}73}^{ZbkfBxrxUVib5Uld1g0HA;PhkvNo^z=Uzj78tx-d+$c7UVnM z`OfOeP=~VwkuGBl6kJSJZjn>VkVd+xdA-~R32ss(Ls^$(c61)6x2Q#5f*V*OC8jo_(~>^-K60 z0i;;SkJ%z0NExq*?=e^&3m!inUa}^%nu3{rtCvjkJTv&)+uQ5<;K|<{A}gn}PmK1yk!SsLUF$@It~@u#w4`r5^XfN7 z)*cTh59&QF)(TuQfBoyr&wlo^`uls;jOl#zLEs z@mIh4)%E2GZ++`q%VQt=*xF?HZ2UMw%s-i;FTF}xJ}^CbZx;lO?)=VozEkzr?^8dy z>gZTfZi&$%UlF!50PM}6doN60v=lz7%o?d@%7(+xrF4v_6}`o~tu9dm9&jf~@Xks- zI*iqkXfMN%8p1Ik9gs|kR%P(2lT01fjg%*8f{ZTuP4sK>q{)@w`nR@-ph$y)5sbIG z`7-0J{%Ik?!ue8ePINipgmQn}#5!0>SjdS1Wt9O>yBT++(?VWAaz==xFt&Wi3V;zp zljVLy(tsj~22GB`ZK==q(*ac`)a3JO4o`>>QS|CLV03EousqLm9k(I*oh8otkfY}B z^_`souYQ&BBZ|m^x>z5Q;e{$siIB;IlUvywR=qAvU`sqx>XP3h)Y{fIr5s8w#?h3= zkrQgM{pL5nselDcno!HjU;gq6c-l=!6#~l3W(<)gUd`*Tzdqit8An!oxBn)*NC>4x zAhp%MS?3C%b@WK{k7%rgM=5jEr% zaIwh9#<7Zic(%Fow>~J^t)3>FWFhvnxL2JNB?YUnhMg7wXaFwxc3jKecvc+uFg{-S zA(0E7AU_B-aFv52-;(@{4N#CzN`23sKx@#4jY*SKeh z;2=ZD5ySt_{_M}{TKDhcE#{3Az}WIcwzaiYjFOV0zet;T{hwA^M607>9TKe{NHEX# z)1LOUDp%V4SAX?a)d4|gk|lCPUi24+_EdNDwEyOe!-A7RO2_Y8wAuT(JF-5IuSwZd z$591$$u*84D!@T@Fi}gV#vF(-1liv}Wo~k+crjh8 z7(j2>@h((kkh@o2k>|P2E-c}o-pM^6D9DoMnkc($0iiRc+=C3Ph!7Ec6EQp!L6cWN07OjZ6E@6HTNu@BH{AhyIL=R@9D%5BK0A|NaWkz_O?1MJQI(5+~aD0 zj03CorwKJ6G{)e^KmKtQG@e63sQ6wz#>V|fr#>C4crMGTDaN5G2$UUZ#uLyri=g@5 zW(Ah2MdEqqop)YcP`>A_5c;6h8Zhy>op4u2d8yMPkf#breeODKR#!)IrY^no(rS6C z%RS%y?stn__2k0!fL{In&4XzXHpP5XdPf%h^>e(%_*$6UBs+F&ukD;W_q3`QZC(H* zo@tjh?~=vtNoE0+L%JnpE zne3V;$oR2aTe#GFceU$e`QJMNlr3+xBXn$#@p?jv8Nu*5#UnI|fRRUX?DxUQ`Jvov z6A>ANm1M}h6(e(xHHJh|P9iD3x8t92-4-0Sp~?02jY?VfWJ_JHlk`6^;dJpfUJ@a2 z3evOXY$;NXc<*^vt&vcN>T%?C?6)_@d*piAvX1H)V03HOt+(dYa#;h&p?XBDd3wGn*(*hS@o}XK?q3$)Wc}iRK26`|M{Q) zS;;3{bgeWXp>EePRADg!>W2Yqz1}}3JshhvM9ZB1?ce@w^->CZ!$KIw;n6rTM26rT zqoF+x6FZH9OX_*W%|S?K2dd%aY49U(-`b`g}KI6x)oib?~SLk`}k=m@@niv zoje2P!$^AR-S2*Pb;x**$Q7Nb?f0ap!;xh?_j1K+PGV%k-i;!nMzJrB*w=&FqU#N@tR6X zqxXF7*`C4a(4M(s;F%ZwP(-qN_iJs2v^LH2i7qFcP#OR~z-U?o(mRP+)dbz(nS4Sr zIOmNmU%onoXj!h$S!?;+fD&ZNo5jFG7P~t<$mqG>86{iw~oN*2QXtfdycUb z-W5(^K>|W!AV=uQPkwUk|J}92_W-ARX}o)ndeoyTNHrGbCqMbg@}nR9s0uou6Vm?J z$39kE2aqWYhQR;(fB&z}J)$g+(ijV`^A4~mpZ)A-*U*#DxN!u=!b`vdF-92mPyYcO zIWliAdeMujqG6B#q;G%w+m+B7GhWCOQOv93URa|RJJ|z*LJG!>hn>u>isyw43RCvV zJqI%nLn41dC=>_9-zWXRGUeYoHm9RwS>|$4<|zl_W`2c6yc^m(n}IeUXMlMQdF9!+ zS;a;f=@^R^EzX#2E%VPk=R|bDzQD!^}V$x zj4s@49V49X@9Nqf%*_!#A&y86OeBj^KO9;w;U6w(zfEQG#Nd)Vb>{|C#L|JBbIFM3 zX>orvb0tpdcZTc1gF|X4kMedrm-S$+IXY!V<`JADQ7q#q%94}9PQ%avDNS@nnf$mc)*`A3x)_cEg4pAap5 zgP_VmJm;Kq@^+TfE2hFp81VOh|Myh~KJR(Ys|3++WQw7WNYO2q5F7x{ zc*Zj-!J;dqGr?4C|L})DTyaI4VJAH++GPyjHa%n<)Wtgnd*!9WYkC)1ZN|_2fBBbx zS=;oASG?kIde)JIxBGy=adpyJa^!i5IS3GTxvEVOKId3~oBAzP!FbVejlQM>{Y~GQ zFLQTKi|C_GE@zx^dNpF2mj%Fn{YLP~t+mlI4i44l^4N}z-f@jJ#2ZLAFa-OB&}qN* zjTHJ`Ul4yqG}h;xo%`x_h%3&)z-l%a;zQn=#=Eb-=3G7GkzCT9XT;k%eR^A>wTbcu zEB54brzO}#WX+o6THie#oF3kHIPUkRlpfx5T$la)7r&|skDJ&oN?=f5xtLJq#t1%Z z7$|PaU`aYXB?HPLP)wk~^Dbk#G(gh;@&3p~lXz-dyuqUEc^?nhExx@g?XP za}Y5L0uauLo7+y$o>&B|$p<{(0oA(nY(ny@U;U~A8PY{CJ%<7ThO9M0^ql8Br#$`X zPp^HF`@_-(G6*CA=ONVRhd=z`$0U>hpI~2n@x`^RtmKA3|KmUYW3}9Q9^d}18}ty zh&Pt>T?w`4cEw}lRiHpiiiCN0#DtKwdMQ2gQslZb%YR7iLlzFfTa2%hm;%x2C%J+61nP%D=R2HAiIoDmj9h2fQVgp z{f(8#@Otx7l3B{vnrS@HRVl@IX~-7&axY~8!=%s1)w3pB?{1f;*tgaTH|nu$@gUBa zIX&lcPN?<6N`_4!aYT1+SGmH3yd4$!$k^%P6($*BQaB6AH*PA|t&8Zt{S_Y5nq!V;Eh@bAE3NacK4J zj+?N0I_tbwRM(_|bE6Q9WCZJST)Ycsj|Ny2%s*Yg}BT&GKH6 zPBJE4L7n#duzz|B{R3|=*lfW7Db;)axTrMxo;&c`iva5}(NB3;nl%o$a z8QI)e^Ct-cAdmom*4bxOVRP=2ckFs!CQG6&rqt1sqECPVQF~K3Jxh>v>EEnamZE${ z;MRSyxDQzp=0L6pk86R6UEc^8!L_*Wsx%89F!7YK8UZaq6~2(Wh|D&NlrjMd@*-LK zJ_k5Hrx==I(QBj9kT&z}GtUG{KtT9LfA!UZR?MOAoBJ$6^TX0M1_&xZVG$yZ78Vi< z%uhr?^tPvOLL3w_V5mD$v%o0^?VdO9^vwN~swjmkS(A>E08EsFIslC}lCxPeXI0{> zE;1wJVI0gUV5hL<#Q~UMF>H*pIc9v3V_>5`9;uF{OUmpyvra_UPuBV0Fao63hAnbr z-3T=h?Vu92;V1 zce~?xR;|1y>v3T9TEPix*p5>8%uv@ZZ$uiGBTUrOlIxcD3n^nDk#7Xlu2u@TA%en! z&3d#M2sT)w+K?}@dwY9TdWiC-P05YVo5{Mi=LoYn6P$~x?UiVTq>_Yr_OOaNjP}__ntb~C`oQ*>~kP4mG6q|XpU!=&KAcMY#i!fDN zkvEP3`hoY6R~GSOT*Ddq3`sVhNTJX&%=dgA$WMLhQ{{q?LH$(_e)WCkGoPs>8?i)s zjo%M`@PopWDimJltZC@&zZu`Iw*eJ?!7^iska8#>y}Z1}hYq6m8t<>RA<9UvwPLJ| zk2y8A=I8e*o_}NJ;o57j&lsFj$3rTeHkx;9WnXwlR~J6uyww~Ln6-%XRwFFe+F#*X zYxB^dgJn%**?HRQ*C#D6vTlxzt#!@;Wg{}LC>b9>Po!VQC7r4~$GmQjKJiTa$xerJE`UoqO*52vBzZh2`ze00W+F zL$;M6vs(m;vR}DkWftr&v*7Q47<4J^3aTNPaBbtp4QX52mo_%Q0Yv*nNFDx+P*V2Z z9osi#(S&XY31xja3-ipg&a48BT;A{g=hux9a*33l(aBQ1k-!|Ov_OFjfZ=sxIU{(0 z0*O-^khY-wZ4m%N0;&%d7XkOvlhV{@yoIP6BB>tMEx>8Wr21IKevCQtYsWe8Li*g( zy)<=q|4h3TpacMbR#V*Hy^gAU@@4az%orC0&2KB$OQ(pDyY*m}Z$fh$R7e)a949a=d%-K1*s3jlwX1`C?_1`lBR*eMu zQ{u^kIgA!5J`}Qix7o91Cr^AsjhuL^Pb-v`9NNeNqr)3(I-+Q;NvRccgB37?Jo$_q zb#!!8?3|tG2_=NU$iqG}#*1|*@2e8XtU+tkuG48zeBK@gCvVQF7SpCpt=E!w?IhE@ z=)&2PCr_$*90sSQ zA6~#hey!2lZd+K#w=H^tyx=Ij>I0Hd3%^SrBCQW z>(+SD|G15I+PLgKzoLE200`qroSKQcu+V?<^ z_@XuOA%aKddv09k5a!EKwG!MJ=Di!fRPO;Qr3V0#`h*3Um6_ zljq*KrdAFm%T)-1CCj=+aD;W51?;zc$;&Ulygo+=M~H$otPMRa&9x06^yEHZ(h+6A zvKC5VIWxtE;2qsj#N;-T3a#VSeo=gF%ojavkYzR>pP-TlHO!@K}P$E(6?r&oebN=_67 z)z;R2d_%DH((>;g`C@tRM}JgSWiwo6zqFnAN9ARoeq(vej_;KB|M2|shNq4#-~H>k z<%R#11N%oNKe#?2N7ZcJUM4>8i{)RQcYZnh;J3?Pzv#W?vIQH;*4~lBVN=Vr`#+&P zVdMMC`>x2FA+lBmxiOpWb_VcvReK^wB1Pth^zBtHeEavxn;)6{(gCgJ|MIKm2lS32&+7_zroX#ewn#3_B=jFz#tb{HJogKil$V@2r1a0T?^v!aKTQ9= ze9h=`QO?VI^0{~Isc+qTWqI=hUtYelW@XvDC(pgT!iWCDf0Vy`%md29wp?8n=d)FL zKkiMh`_uFxeb4RqU!>9raT}yo~Cn zsLnq7tawYNR_}<-jgD{=N|$y-5hAB#oL9)0Q%bxm2mqO164|u#)U#}4&}Q=PI&JZp z^=$)?zIZMVk2;17kuH>DWP%x|2hbD3bmMQwYera;k^~D!jJW5!RViQj z-|)v+X$#|ca$~n56tapVSpP0&ta%DHl5uFb9qW(s`eSP z?xp#6^Sk?Zo^LL?7j1N{&wcOT=7s*EyXX{0!F}+9AFSbb1c!IqwREJpqC0~#~Qz;AM~Cyf|iWu#ELwZoFYRAlJc;JJ*+tIQoFU2 zT>0&%dpX*(x_{r3zvZycm^rH~x@~dg7$T31dwHkUj`XDAF_1(pZ5*Qu89KW&)&nE+ zupDL#%4b5>#)@+c5!6S0@T315Hgs0QPQ8_<#=yq;s;i3A!b9>)CT=*Ccd{ z!UV`WGoVj=;uGrY&;SzPP=qacj(W$tDL(>;0jrvW84xAZghV?mitWf`CQut4qhaTG z140ttY(Ou&I9vLlu_0@2d~eBbxJ_f>0Ha<=FDVc`iuTU-R%^Sc-S_JdGa$ShT1 z26-s@4h-}`SXv#&Do9#Wco8TIKx4s5g60X7Z(}YLmaOj^ix(L3tP)&xSyV@s?rrb> zx9j{{JDbm&-_3X3f9oT%%QN>M|M4G{c-zFo3u9rbrzyv(r}@13-CTcHzw7A%kzpWm z@Zi2GU&e~!@mw-GI^jqlXn|9ZP6R*AIw7M5ESl6)z}dsa?F_ zlsGxxw#_rf)U^Rwn)-zNs|P2~cX;~7crkliuKRd-*6aSc{A%}o%b)(kCFL*fpTl~~ z=CbtKua%F@o>Sg1adbKLX6^-*ojJeE z9v2pP=n>^rA3VEU^o@(lFFTX2aN%>xQ|AUa_dldOVCl8xBhP+exnxDWvV%`A&-udl z%1dTy<*ntzkNeB=nUx6C~=7t47Izgu4W=y#Q01tIkB#sBub^4#`rPe>ad{f@$;%G;K;@h8eW(o@uX8QRZfG&`-6dGb716D9qOgn;BGAcke_U($@dIt7%L3e zuWz4(@XieO_Q_h_ci^#`7N8_uY#iw)~quW{5zm~Gwofv@_Y-Q&iMt$AsO4tcB6 zj=VvnS0%mPT*M=Zz%kfiGhK2|i+knk$-|aTz<{TptYMo&91Vm(882(G!HMQKTy&r4 zkz8==5gFtRux61p$TNA&1ZB9 zeD*vc_U1df!nu();0Q6dMQ+;L+iO@GnMD$fN8@RQv-+tXdPHfkT1u7(mN7Ga`e9R~ zd`EKTo(7MbcDbL9fSI0c>_oR7^O(m}dE@CcFE(9zo*YB#Kwq@o^+-9Q)r>J&^Bi(T zW_f{yg0<;*3&MTweaxP-}>g-68s}Khw zM(`-Y#)26d;rE&#%GUXPuHCVtt6H#xl8^uuW!ttKc$>*xvS@J@Wm^?2pCeRAlu7bl zV7s`>CbIh?(#B&ILdPnV$Su)Zg0}@?_nVv zMQf~tnS~(;x=k-~wk&+b!nrsh5TSF$m@3`JqWRmr>W@W4ak;kXQ@ttw@ww9c*3OQ2 zC>5Svo=J-dz)%vrmKIOrA!){|>A!!IJH^-?Pw9&6U3JwJ6(An`;D_cJP7WAQm4iIo z8W!Kzk`D%r9A93ZB!$&b2|i)mSm55bJt3Y(J8N@eZN`YwLw82Y(Voy8Qv&6%e%T-7X97#siS=T(_bvV{6#iPJmbFQq9qB478UV~a6miK(m z%u!s^&MrG+vyHiER+&|Y)>*RK%Y@rWS?@l1*X(JjtG>+QwDOM2-&NM0`FG{}YZsOu zzV(CU`{)0CnRv>~GHOEJlRja1nK>nAq*mV0Cmz|H1mWHpP46q3npF)xWuE<7{`_ zUZ!7CKGXTvX&&S8frg(ILuU?^ouh?4ha8iyl~&d=#t&kPJH5eyiq zLN)`88PhrkkFwel9KAV*GmGXl-Y{|}oa{KY&6~GY`J5gyVNJ+AZykJ`Ur+(g=ds^U|XCiNmQKSihfh|Z9tdO&g zR5qCFSq+xK7T!9##s(P}h(scVQV4w4kewsj2xIjdp)+?#C9Fm6{2-b(5RwJs4P% z*XSSjd8Tm@2Is(VkDN(`vq8PaPhYfG+q?g0w@~==pa1;&G7k4T0mOL9^)#ODd)@0^ zS3dW-&()MF&$KpdW}@qjF`PFi+717WJyPk1Ty`I;+PEJ4hfWxqcW2K`iV68Z%5V@| z0)Md8*Jdu{+@E{y{Car56A*A8NB0;zYn1GJ-6GyV zuX;g>HE#Us+KW66jP7vV?ySRo`yFbY!~ci!a^?+!nNzu>#(;<2_~^Hd$c{Wxhq~}B z^^Y0jgoa}~mU=KeJ-XzuR((@SkM20mi`EAqI+l0Td>UaI?B0$<%CX-7WQ-*hK}c9c z$dJd+i_yo2xwCF}C&#Q64iB(|oeO7=80qLCM_g>L0<|{)ye}RfZe~ZZY}&lBPVgWh z?cC2ZYLHF7_rwyAwE=+vdH#?PzybMePd<~cMnL0`tnWbHx_wJ>KXbTx+95o?Ekt+w zuI-hGvOEqQiXdh2d0UC+dS52MK_qxVErh!(Hq{U|3k$eil4EuJAZow`(WDgQtq3by zIDo(+5~e|<-Oppi%4G5REnMyJTmp5pcJMIpEb?d~iHZe-WDCOp7TyLV&Ei7bv9mY}DC1AzWdS`Z~@`J&!vOaPa+#mCMt|+X4c&)v+QgLV?ct zGj40vudcugz#MllY*<3<(?jrLko6znUC;4!My4E}BBxhKaC>BMM}F);ADo?n?b(TY z_hn7_<-dKo{N#q5pLg@pvSYyLGBEQsdr;0Y>=$c$;?#2H^sVKJm1mcyTrj>>UGH1U z*WUb<_!Yx{%iQwVzs?T%k++9>Z-3zW1vi(@5QkwQz-{%jyiTtxJ54YCe7Ry{#$~{y z@}TEDue7Sn5gNIF>DN9}u3R54Ro3OH7d*B+VD_Xkvg*tnF8u4CmTP|b>vHXukd$G0 z-RU!*QSLt`a=+_W1BBEq5sJA@jlr#8*060`>JyJ7k<~jhduXs<-thnnopHaU2#S^V`g5uaKDF^ zbEk|gBL;|b9KDb~ie*i9jxvayS+^s&HFW5ZO7uiLrsib{jPp^ER|Yp|X&qIPP+XWV zS=bXrwPSZHkL$pp9MKb_L*#|gJ8EqD5Hcqxa=<`?9Pi4=7{){F3eBd*zI~z?ox!&= zvgRnYDC%G#|F6*VxC!GThXbop+P$~+&Tcu6ib&7E;PHWY@B5}6pTlG8ot(nm&W#(= z$GrSu!uX^+dFOB|hZ;W1ClfMUyJ2nJ06Ff|@f8R5=6dT&eZ~T|4ojOI$u)fV(E9A- z{SSQONraiOgApu+h5-+Yc@Ra4j2(}eyg*o|5AE&k^*#!mw~2y=Bk&Qya-7WzUhsm7 zokwdIqK62;dKhX03atO>Pk&nR$wnYvKhJ{ozW28uB#gtsvtSymlmiOi<$?NbSGWx~ zh#+DmoGdKe5K409?~WMdkI2axoEPv`UwOI^LD&uVZG>_5FWsY0h>ha8bb)$oLNb1w z7xFUUE)OUiMq&^^ILz=zpkb}CL)MKyJQqIKSO4}LDO5<8_H%}Kj%XD9r@izGokKtQ z(SBsy_u5SFdB)vg`qAcxZsGm2q0*S|-Jj@X))b63*ADY{P``Ah0a-T;CH->JLW0zh z(?nfE{FX0YQGbs>5Tob3K6G<*#K!Ov@@)QaAJI&=nhFaL-O79_UX|R)9ZMMsP+q=nGpUoEZ5*#U3tDUFFm7q-R#l& ze{Xzt7~^6^w9KG;qt9XDctH(6Pr62wuba^Utg2`*j5A&lYoon>j!UXh9@mX72TP4iR_%&_P*1Ibf zrQOt5{Q5WPTTU2=r<$insDkH(Tp;$W)Yb8Z`_2244%acJz<3rZTN@b27tapms(+3n zGRAd0BePyfXC43#GVc3vBQ;IJ=Nn|DwF<;g2l;d|RF~?ELbYD33SJYwo$M zylleb%4gSSNAcKaln;I7AIdWymW?D8k=B>XKJw;r@jrc}T)Z@!Qzk#8y#1>0mS+!K zS$_PF4=vBz@ZPfOb5Ck2y3_BgKlqsPuU#|C(#viwi?ZRNqu=~;_C-%ApZe~r%KXDu z=kVce-z_hn_T=)(Ev-D{M}KTX`Ra4VmLZkY9=`DKANw-ak`7=7oN1r^r3_eC(hbzq=WZ7E#!B2jg4Tv4L%S!9bIin*F-gZOD z^Bk^->|1-t4Ta1A*|KG8HAXjW>Wu6;QYf3ZvNpX7cumOAkU@iUCgmAb(Zb4GVyxb@ zAYt#2wAr)fr0#xE$hXz{oyIXS*e8FTfyv^X@yaAu zIC9?}a)WpbPMzb%O4B(00`HBrF}L=O2TX!Z)*PIGx7H>6f`9&oeej1tZC&~|GUXce z=_d?8+K*LWq~f{S!GMQ*@Cnwt*R$a({BnKsZ2d-T;e_II7*BWjOh4c`qN+aFO4q4R z-UEz`vhTFTXRsUw`ApwnkA7*JJ}d60GyEodaF@5*J=zcd)uDalgnrW>k^hurWt#X=nXoF2E`gTu>FR_H1vgr&; zi{6nEy?PCfAj)6B>{}|0fFhK=!s3NWOaKq4ow=<0v17)TgSp;D1~{o{$s0_vaNNQ1@H(_*nU zh2UwMa%3IG3g8h`g|Ie%TkL))n4T6uK`E)Hd6vJs7tiBHR{((0TwDLq?LQW~pQZp7 zi%03+R`oUQZl2ftyZg1q7JxUUsRL*=ZEC)=kh>S{Fs@C#&AkZdk)L(H?^u7k-%(T+ ztvB6Fm^!)aj#m(fcn%$zC_nzjgfjd8 zJ*_}Ae{hD#*r`Lv1HfO)b`*2{SL=1zZ-NjSyhur>w?9P8UJIg-4DQM$d> zmWpoyud39xhCouZ)?_P3i-JE8g+8K^zESavAT0<1#pTSrnX_hA1>+uGOL)TbENM2Rf+5( zq&&X}jEIDK5Gr1Oq4o($-*DoF=eQnGa4p5@m3E^O`X4@QOX(jya8Cd|Io9h}(^Sv>Li{`W` z&2`Pco8Q`vq;xNyhYWWw>hp7Caew2j^qqToRh1*hPkXyx>zbx7u0;+T=Y{W%Eab`k zN7m6?r;l_LVtsEFdY>A!et7xh?QYt-;^o8Hwqux81H zvt315c`{E8_BVS-v|H5R;6dp;F&y(O=dBtK&(+@{S%cQJdi4=^k(x3%YZQsMZW==d zm)V!=T2X-(W>`PI=TPIB#G%xEqRR;_I~Z*W^~9 ztzG~IFnFBm1m}Lw2VBUgqdSHS$q`1GEFtYt!$+01IaCzEl&4@f7J@8X#2eW^R)#ha zNWkCv@$};>M=r|lcXtPg?tgc`=6L>ANB4TV|9xaVch#;Vul4Wlb@k-$rjF*?=J%1G zH~+r7-`($T{%(G|xBK6BR~LlwKOqgpMld;&odE&)z%9j?H=D$B1q{f5(*hViWKqtW z#mv|U>{g&4OFOgsZ*0C}2nb6Ij$(Bk;<_rHsL45|<-X_6PdIyUz+`RO9L1eAfG7wd z4h`r`PNFqM;%z)VErUispuF_c-z(4j?Z20Iz5j#d1K(R#_V39~^JO=b&Xu>7S3dlf z^7U7JseJia_f`^ji*UW^jM3$NBLbFTWjoe)ln1&Z@a{$@^-@ z%`dOGpB*f z?|kN4<;fp-VyV3{r%9}D`Saaw$0oTrT-9;>5o2=58Rexp8R7ZU7nb*2@PxAIIO`!p za<{8@F2rePycs-;FpWo^5pkb$?vwe>i5a`D4u(0b{6JM2t5>gyh#o9$ZEY=YQtv)B zye1ujvgO%gC?jY*YKUTc!eqi=qAg@J2_s+u??Aa zeDjndtZ>$b9UB-J??Qss(W%`G@#C1Nqh5L}Y&#Moj{NsgD?5%4kM&$tbbnU&znkiN z`dM@RiTr)6e*8~rV^8{TUEn4#m{VYQJdkue!j5C;Cnpw+C)d`e^d|R^P4bJ#A%L~6 z@C2L7)`Y*fM&VIqw9yOJnW7H$Bj)af^VT;$(s*$39N2&$dgD|jnOW1;pVJubJ3slF zF#sG9q`lU(H74RZGSOOZ7i4Ij=yJjd<)|o-zI|7f6*)_CMHKC6b5BbMc|pNybNApmlWHpG>^Gm|V-LlA^Rf%`pEOecD}Pu71=MgTA} zA|{SMwaUZ3EY@w=*uZ-;c1#kdBjejc2yOP-n$O22nR-x2r^BNMNB(#OkiONcSH;@h zTrE-?w>q=wYue;#kZn>r30La@O<-W#Yx}D8Kr(Hs2<9SH9pR?uIjmeisFTHzbV@#X#A7_;J zeC~zi-Rl$fJNl(}`jq0JT;vAMo<2J}&2J3O4NQnP5rh~SlP4yPgc3>=#&Ksu2Mvw< zb(Iwz%hShrRU;c+2{A8SlFeMfABK-pGK6J>qI)GQ#|Y}$n)ie!9CsjF&S96FNv}y9 zF(kQ^kyC^go^IaQI;)XVNTr_b^FSu4I9g#v~_Hh?Ed}I zSCTdq0%>O|FN*YyNx@y8_X-BDi_F4Q(E{sZXpAseEcX*ZUa@>-#rCjpE4a$gg74u8lhf<8*Mu5IuqO;0PRP3@|Tc89O#|JuuuNBy&*zyd@__ z9lf!3{n|Jca!zZwPXDB^Y~Q`TOwJk_6zA0~Il*CMayU5>@S;64TCb_rjsg9XdeNtU z&9k)Tp=z&#*$}sSZP^>#aP-~yZc)GAZ?ukn_X#JIj(p%f;i!uPWo!D_2(w+p#|;nKjKr%Dai}kBzk~gu_$h_xN#fNk;%|0%BQs z7A3H?*VeMNZ+-&e!ce`0I@1ORpPnrLcSaynT|JJhK15JX7-e`MWX>XIvGTU;-v&wHG|{j>7xv$G3x#_ZA-*&aFW)R2}rW&UrT zP!@jcAIpQ^az)v*`HFINnASzJ)tS)C;i_Z2)s=SmgZf9Ggrlv$V@W>3HG0~N^5U;u zS{9!9=DsTI%PnL_m_E+W133-3*9jm;+{mXp6uiU&O zhbbROm@k{F?n%+c++0RH?A_(nd*kuEJwCqbl8eiNC;my9AEV-T!B*F{3WG(ujQ7N^ zUAv)@J^zM>qk}~gV=yps8OvH`?&T}OR%sOu+_!OHS5C+hiyopmL zCwD7&C!#`uNh{hD59G)gLq6Y<`vR)jv@pWh=*Q2xnquUR&W&TzR0lf?|>*#23cKCkz>jfdG>Db z0e$r=n>C~0M@CN=BWsRf&!{?CPL9C6JpxiMcJJC7&d^!Y@@$N2Zy%b?a5H1PZ-~*8 z+}o^iM{Y6PmM>Xeb-o?nqqBD9&Ua;P?T>s9Nd9@BtfTE&GY9-Tq*OjMJ;5MC_qK0q zy~@#AuKFUfEwXhWI-obaJCtL(VnmL~8sS{%2p^GZhubjLI4*Fc)-LpIRYypJ;_%?* zACVp5oMengYsYg=bUERK5_s*&fI4r9$4`EnftSCdqkzYbW;+|Xb#318<{2Tz6)W;a znkePzGm>8w1q+01rZJ#{5~`LzW`MDNVQK)xs^%ed;4T8FeqdxGFEyd z6Fs>n>%VtKKsaM#JUgqCib1}dAu0DvPE0j=;$0_mtXr?qYUIvAv(6`#vjzZw2KkbQ zD}3lElYe2=ubol8`MO7y2V_@ttAr9|O@+f8QPTEaNijJ_3f-^1bxAq>Z!aw$c=)6;=k{xQ z^}4luGcO4E?EAl4ew#VF_S-)w>!0)Nk__9Vsf;Xt{+j2OcU<~)1I`2kzM<=M|vN4YpB09wp)^ zrAU+r$*eNT!=b=(Q!%j728lsB1$-8?%&@%?x@Yj`^$?i^F(xVVT+ zZM%0R%cJ*f^_(mxN8sKb0pV)-lDy85nY8gdw3gnvhX>DbB@8xCjqDA#> zI9}4i=vtNa(vgj^3?L3KPN((Z45F-3>8v%zo&4D;@i3Bojx@Q&ctbsvCR_s%b^47p zEE4MbTW`Ik>Ipf?q7*oXqr9wV>x*G&E#gm%MjQlBqE~F{le1|(p6GHX$iBB9=*S5J zi5%Lc$l{cv0N}*`mu3QluMsq#PsoOsY9(g?y7bKD?=6dFp48 zd#gzcSWSG3#A>G^X;vtbyBUxIb0A5OPL}^WBVayRfzmR73+2m5;ZZ^mE$&vhgI6dU za1z3%0Oi|;C&cIp*d$y{)`hK|THweCJ6x~7?z$?Qh$%zGaVlg=oqiZGypZ*~$e+-t zb5<#E29S324hgMqp6c8A35SAMG8+L?3C>TMg!S6=eoa^w14WyTX8R%YB@7q;0eZ{Hcv zU|7PP11q2EQ-+`Ng7UdaMg&n1+aW2ly?EF?0< zV2*yg%d+N^Pbx3C>W|BdpLTkA(EMpNq$;dBb?PI_lOO-M^0KE-D~Gl(Ez2)^TY21@ ze%Y$4Pj=T{@b+@e_g`8j=9B%~E-ufU_qg)GTjRm|olCZqtKMDS@w}&$zrS=*>3^T| zN^7e`jw;)?sw`V{d$aWK$dhc=e6l>_{HK=>@5u`q;$glk8bnFh<+*Ix@~RAMPJuTR zhPg)M7%+B&`kcaHfFP67BgjGhiOk5QA}}zXltBMRhQG5&^p=LRf{;fXOldD^A zYn|=dk%$eW8eWolGV918n>RQGs^@)s>zFl4_qywED9h!+hbY=*PM$@e$S|XyhqG=b z$n!kQnnDmA_2R??9#qP9`Ld2mbe*l~jb)U4#rfoeA-6U~ICAS`IXMFN_6S%nWL7@$ zjG5DG)WB&7UJ`ma*H@=O`}FCFdY)bhqIJ0<^6!X4kytvS?$VC}kg_4o zL;d90I>kAxI}Wq$J6b2VFuw2_(Nad99A#v5@#2L!3hJ7AY|)^Q%Ml@n?p2@l1tXkB zvo(CBo(hprJUxL|*;G{ZM6QDuC%VvgwPb;xkf+^tTXv7$xF9>BTA%@pkS-v^k_KoP zd#ki|#CCSBub|@E*-0wrB4*JV6YL$qL-vHT?HD&fcH2_!fz^=K!8x{NMrG!5fSk+q zo2##`&oL3K4T<6%9ZM>(+G#euy**x<0abykzbfoJkkvjQ1Yt*Vk@`ll*|AO-B*Hts zh{7WXCXfI)ukwjccw8mMw|DB~um9yEKw(p?S6_Wi4L>;k0We5%b~F{>03gDYHgoZY zZ{C{lL_!a|JuFRfE+=MalqnF9z_&0R5SO3vv=A++QzWvRY zlsRfiTh_0Or|df~ET{eTrDfZ}fq5-tp4y<}`7bLkd+KA#tN!HN%x7M|dYk?|GX2YI zD0g&Yp0$6sH_NYmIioJ!KlHHomPKEBVVOQ5hG)00n?GTPw467+=^yJ+Szd?eAY!-% zn;6&(8r}(!5Mi*f*>Or?P&^D4o^T{odXdx{`I0u%z)M)`8SU-um9$YrTVr4^T9Pw% zgKuz_2g8OKyG=!p;3Rxrx^zk8EBT!5)3Pi1^eVePZ-}lC-ccAiitLh#~m%&|w#0h~H@Qrgt=s@hGfU6i4n@Vxai;#@fE z%z4f5o&0@r1n!j)u-Qc}@~)i;d*|HYpX3Z?#~fO3j4+tIc=4i281aSK*(5V2-gqQZ zZajyX$cnWCm+1(&FA_Q?dV&+nTC@guC#?gY?TRjNY$4fZ)bTdb8}QZlOO`CnVd>XE z!5CgyE5SJH)e%YRq9;Vnq)YMe<2M_^Vb;cZA&NmaXwTG~PBL{$%N)K}2J9%69LBd3 zMJR8+d121*TUM1VVBwwxjsOO8X8j_4W3s(oA}d$(f(18Z;_`0FOyZn)4keVcdU+W~ zWpdqT;O!2#mEO)jN_yJVq6mb%p~;gcCCt7uWMET0 zhQ=$3Opf-kq*==V+kvH?0Ys4j`4R}^!dUX&bb@&LuAZY6a6XW@-lT+>9QnfaT**Xs zx9^Og0(WGDR{?SGtSf$XMJ3Dg=bzgm#PM|6(K|57x>K{um*5EBd#3RtoIF@*R>Gsn ztI95}E%|;`#(*d1-20ppVBVPVTT(r~+U4E1>T|>gCABlpc6u9Xc3+WZPY$WKmxt9J{`AU92|Y1|BCbS zc1FR}dqTnyBq6oUA^H^2h#X)%AOy`qbsiX^)*?_j&LS2VubrK6+J7*c3!DeWgTWY} zxP}eMduuZv`s*NaO3|)th7IMV?&jK-qRkG{ob5O?DG@Vg&N>VT$fSj8OgCk-!uEJ& zELI*DudOpSixT?qN>7LOZ_G8uVrpbjcw}#WdS$FEY+gj|Aul}N@@t%EKo*=f@atdy zrq=b)yua4w2XekO;cTHv=l6L>D+TK;LeFJH@kSj=ofG4YpE0AYj_qCl=l{2Nr_FU` z*Li?1L69Ipa00*y0Gj|OaOgqmK`yHm$J2+z`67RctDGO>|B&Q=q>_sLA(kR_#XZU0 zoY^F15&$QFBLETvKr-*M4sY8o%OzLJNR_K}WtfeNd(YW>?X}+Zu3_)vxC!Td#<90n zYb;AIHr{?kwliQBGLwC7|M(T+^>AUiwVwG{|K=6q5W=%F4TIa?qRH#%`$~=@S_+vm z-|t`fPEMa~?H|bJz4`KK>%mjD=34pN8ztnXRAfE>!7CrxvNgTehxRt#{r-=6GEB(Mc6OvZ6g^p5P5|)s@AWkq;7;ubaT4{$+y9sG+hx&MPfHL-S?2|3 zoW=tyl;n&RezOHO4(lIgBcndd_SvfDuhi)NFp@*&WLM*icLak1GKD*yHD2?~T=oUi z9Eao#S_y~!8IS4|y|&R(rXQI_!fA$p&pqjx#Dn0E19u**?>jG1PwB2~!q8?ipAB>{ zLWY;~x5)^uE9G~3I7j-YIdb!Acd>fqhl6cTwWem%~9+|2G{fDEcIp!tb zx0yqEQmYHB(dObMNRa8;l{q;bCd#Aa>$D5=aF(;NYyIHw zjD1_@+YA00yyVI^@@c+{ zXjThIYz(2}$7CRl+Z?s69Cegk=E=v<^If^0H7A?)6RY6=ty|MIAC-m6moHYv(!)X= zM9;Tsvyvo3GPS2T83#6~2)EBiJvuay%FWSQlg;{n{{T-n<0j5P!t5RK!|`M61j^Y{ zOoWn<8N}$R(U7R4G1}o6b<+a?Wb_{ZOGL#<^azpf5@hdzzSde4_*s-YM{l-sHC-uAC+*mq-wLkAOy7e@_&m>|tE=K_{Mg(;^NOdg`0Ky^U-?cPUybAy zj~H=Y8*vEEUqr+YW@qM>4(Hn~6fs0Fr?SJ}6OTHwrht?Kp$|_yIUq{s;P@?1mdXH> z82o*3aIne=j%*@JPHkz)uFzzkkLPioacY{3jj2-m0SW{YkO=?)&+v(nH2QZ%W+^>q z;l@M!%+GU>?`7xeuHAINri2_uo3R+PYdp;kT2CP0P{@c5llPlA9tYprIg4<}7IFB9 z>BPi%Ib8a{=z$Bz1voiI3I0Hl0 zq7&m2MQ}a6hpl;Vg){ezSDB9fcO|g$;#_UKky&9oaC+p#@q90jBFq?H1`oG)DdA-U zX9z_mRyZXfSKi|TJVB^7S0+#%P7m8i%8kg);$p~0dh{O!!?ZdbOA!7vSo<(I@I3gc ztdFE3C+r8|u<6alOBqjrFH$o#HIeGl?jn80j@0Vov=I)r!s3Mo4?`>-R7(pINXC`z z%^W-(MPLc91Y5(wf&SR(XTf*bF2^7Z<#25HfA{V}$sW!*A;fvMvP#JFQsyeK<`bHX z?v8wCz4d?o=8M87eu91&leHWi7^)!Lc#jKgw?3`g}zjyRKXEjWB@X1djvESSE&pa1M<^>-B##O2-d z=Znlqm>`XO^vm3ze7o`)V<&U%9dv7Je5N&_yMC54HiVq-^%6j7oiJCrec)h@V|%Rx zJXxd;A$*7b4F=m7wvg;LUuKQBCSfs}IU(5i!fZ0=l_&~{cQ1YxCxFF*6#ecJGuBh9 z2h83T{S~liX>%5}jg-&xq`V`Mg%b-9wx`hx{sGzDA72l%J@JbFWvd8-YO0nx_cL~W zK@i|yIM0S{w9^JC|^2X zMTkT*iAqG*H*egihHtwind_!MKQUi@hE)*62{Akmth2~&z?J5~ zu}=q3$je+r>vqLA8HUHTTUm)fr?>I8&Gl&8(9!h_ww|E zGiT1!dYGdz8>^!k>ghX3U!1n}kl`qqM<&QFGH*3{$|+nZ?CyI5};#jLAi}F&?}Dg^y$-0Su2>yY0IK<(n?>PlRzA?qyun_{&E^f zfVLl5Avjk-Z=5dOc76DxjRIkj6%&{sjT-{q=yB~54K~0Z&daG4%4I4CYzWS=OJ}F9 zCZh@)kUfM-fa@9D4suq}aXr~RRU+9g6${xT7~%VL->%x#T(d6(7k)m8eIT1EE9RoL zi4C@~0lu*p!JZ9A&*NDA?Obq}O?4#0cx&cX>zAMXqBS|4c8*{oToYgq2CoKVpL_E; zSwJLOHd4h4u_9Mv8a+LlHmLNT7Iw*c?Th`zPu#p&B#3N$uCVe+9v7VZ%Zv@BT>&Xp z1%b^z$MIWF`0QWpE-=A*3Do(4o_szFpH>CCWSiA(${G2ST`N^gR1L-y=IIH4$H0$bGd=8!W13M98e&U-8-{u-g#KZ?3%GuON@?hq1D7t~v z3xrgnnjkD>?`49y$eABOTCIb?hP_$)D_7Dt9OB52;tc$Q`MpR&sVkXSr!#1al2G$q zFY~l6%H_w8pRBRs0?sf-YW>iSxWuwEx+B?u!)W_s7mh@H|NZxBe&m~>Wc~A0x#)eC zzvK=Zkm=$h!G^AI3%cg9y_@;kbV7OK=0t>+@@jz4jwgz#SHYq)1Pk5>ZFec2EF{2S zNMmDTC0xXXASuz47%xR8cx4Vm$q$2Mn6CdaBnSX2n*e7IUPlZOJ6S@Dz_2Nw&mm8g zg0UfX#$;i9PKGJnn~6GK)dA_08~L(jUzAMgEjWd7f5Zjhat-}SMM$C)=IeUSj{@LV zQ+fgdoCX2{>lw`4++6-UBskv{(Q_E08W}NTqZB@;M@h!aj!9)3#MSp0?%^1V`zw#$ zjRE*P0%CmT>-Za`C(cLakc03$@@OsmcyDir{oRz<=H_QZ9^WaaRZb*-uP7>WW>{_c zA=n%c05eu==AOVnNy|KB+q^Fu=pMn)M3BkIMXpG*qjEY^ey};qdRVv45KHX|B2Uk^ z_I`nR*7s@jfq_~FPEJ(Lku~ePt+JOkYXLl9g?KBkls-hJQL{RlMZn`6K6B^z7`3vM zYbukFw=x; zbM@-A`i`iY{LIhe>g+DB5>DoXh}zhLWGYh@NI{d>4CnjLJBM;J;pDg1{(qH#5U(2oHY5_y$kX#qekq_I4YlXp)8BDbXMc^{VBMA(R*EzHB1~#ZFkV{Wba3y27e}AFY6VAX9 z>xR^-PVf_wBd$9>k<&)fzdaH{Y5lzT6sMvfTYEz^d|%Q5p?6;d2~qSirY$)_s?nRK zt&E=#yta4ZKTV*20na-y#3yGJ@{K(S8el2Cu+gS>@m{()BEr zCf}v|jbF$C_qmsf5Pre0AfsBgWB}oxcNxEIu7C(%xPJY5$?DyA-zz_1T#_A#u5&SA10A}Nz=tgP2={Q5 znEvnH=M!$%tQ90S7BZL5^GG`Hx z&*>eYD1?q=VB>%USa8_Rq67{~Iu=Vho}%aBiFwIdIR zis({w&$wtl@KQ>q5TAVVNs%PiBo~ILCs6rFMwRg($H=I$QD}zBu-l{^NC|t)Ya{az zg;G>wP$IT-UPji_GL+;27+J{>kbR9U_tl@_e#U~ZJ`K5k5d)NJH;+Sy4wQi_Dfr!I zk#(}L4nRgfk4H#7dibI>mQ=lGrOI4eYesJkl+ctd5b=dPp3uK!!3mlR0AcVSe)wUC zw5H^>(lhCPG9u%4a8ZOmfQ4*#cc+AqDBNdcJhz6#(i1w7&eDvlyL!L$T^@`+lI2=- z60pkjzKHDHPf)}$mxGD^m?wR;HZnP#aRwaK!z%&Atfi=yuGqL`jp!UO)&t5pxt90o zA>s&}SMwy7ZRyuyKgwtbgJZ17(P8K0PZsnF0r>6fU#A3M6UU`w>ABT{M7Tp2I16_D zf-Ypu5xj+9D7`sz_H3;^-GzfO?+SqRQa^jPP;Ej3(Rmp{nG-fbSJO5C!4N1V|bKVZ|W3J!8?j{Jo6tQLf<-Fxr7-+J%e z?0n8Ol)#<3q4nuO^u~+K=%_h(zyu<^))C^HF(8!2$fuGQCq+IIH@$uPTf-sxe39`< zT)fQszImBkF~5}eBruSFSw@7?wUAQdwBG!!^7jdTn_%gD1OJa$y9K(*{@9}l!ON8IM3Kr$VU#?#M~pCJvo~Usg#1o zb`~Ry9Wf%MUrIij?48eX;G!=eqo1L&k|6?&v>a-bkkBq(xLD8cK9b%SJtU`3ovwvI zQktHj=CJg7Ms5fYAXA0~RE&35gpN@7yykbnhp-(@KO@6xA1n;401V|RVB8f$PsBNu zNRko1|Ni?GH39(<`mF#nMg_p^g*0lw=FIfw&UR#1J=*c&Vn)QMLk4T&p{! z$sHLxOh;JhHf-yQV-`@dMKAh{eDox%Vl2o3n{*wd0SQKMS63gjhU3r?JegFFEPapw z)Ze^p{)6E~E@EqBzzG|Fl|^$b-TAZUi+BijWw1DF7-|gF{}&sB&#r;&*1!30WXT%2 z9y^8&wYe$swjN|brv3)UdU~>vC7;*t<{Iz5_g-bl%t8^b5Sk^h4Gcz~eKX>k2jqU5NzG_XTEo$`4=}K52?Zz)l=|yH< z<+t;mEFHaASnz1&ruB^Cw^!`ogB@QX}KnWnX$9 zaR;RK$&))}uXw`#{ygVBdhYWQKV(+PiHs56@7XKi@g@nCu_F9hrRW_wE!MbmHf(J6 z)LV{YEo5;|WWNTPTR+5|j{3bSXYo7adZ6z>Y%v5qV-`3G5(J~=V>|}o;Y>Id< z&iCP?JeeU;no_J3GlSlF9h_3-z(`Pm$bo!y8T6QhtJ zG(VA}UJ@B8{c=*$hr16}w1ZIY3$f8WjueSTDKs*)CF9%PCA-T|n*KV9B(ulCyvTg! z(ihZ@Y7jQWugU`1sVZuD_OjV&tW?S<^j1_)(%?`OeWMIx?H@Rl)VTtj zBb=JYRAms=4|y;LVIyVwGw_}qvYnch86;<^ zk4K*^;EUMnC2QlU9I}OW0m@eX{FlFIUAcI<^+$jFM`I%nDW_}7p6Vg}?#5W%2f!l*BHcPpBL8j7$cfesnQ6UFoISv&{~Q@xi~EaB zG>-yANNRiu0PJEX0~sFI6`hNUfxD;p*pzMFY(T*1dq7aMzAv`mI13vakO%gq{UsrM z9BN8SnWLUjSt@$$Rn8@jkL){BM#|Ts`+C;03pUE3M^=eyGMgzbUA~$}lMTd)*;tT( zD`SBToGE?eKoJ<5^MJYyO-Dk^J9AGvn%SYb(rG~=Y(WT=%4FwkXb>>5H?rkiWTN~x zN71ZVlNBRFax#84XRbc){l=*^P6}=+I}tk*WIaf5y%-|kDPkN!@9sFL zU_td`#b!Nz&4xq)rn#~8w#;FUfJCc@zDU91q5KcV*?1sh=roGHI6atAEg`vvVAc+1 zRTNl*FdH=Vs?>6CcMqK0Z-pQum-s+KSi=-7qh6Hg_3&I7h~#nd^&} z&lB+F8OE`J^>xn#e^j;vn|$}=$>2i%2Ah-;$rK*bdpppbuO~2Vdiv6865O4do@)Ko zU;SkzE&ly~_>+>C1Jz}8$y(MAKEOfcRK1^c=}n&U)SD-!tt3b{CpJwVWXMzl;Jd7% zQg5B85nES*v4(p8`4^Zd39=S>3knglLy?(&JbmZN?2;v9Y2N@Wb6w?ga#vnP^6#XI z2K(TJmpMLLil0a_1>vPvyK}AXwAU0t%4gb{Gsna5dT^@o6Dhy0?#%Vla~d0y1lg7+ zNI7)_-om-rxuzvY1`9qqL4&^TNJ0h%$ugUx^&RRNDmxGq=nu5sGGY@GleI3lZqJl% zd4yp8RDUO6c$I~0bv}>o$3H0tt0FEgE`*ql6t-ETBFNEon_b|-p7=vAe&TqDl%xov zO+U#>u*ClawCes&1W{tvPfW*u_P>8#k1_qpk3X$VM>3kSfiu}83WLkX$HupWobQeQ zlbB%3id3e0cRxN-p9WOQ4(h|2CaaUbu8AK(>--?0gXk(I%%(2`E12WaqI3)H8_PGn&dw zW&sz{M+VGyPnT0RewE#_ zQM{{HFPF2DT0edIOo8w7=Su;O-b#9*yFl$XmnDkDblEQ-xIkroCZ>qUG$Pw4M{Xmazfbz59+9 z7?l&v+#f#9&bPcjeBzxr4d=@>yM}FKc@ol5nS<^`BHNIQJcxc&1t5m2HV4r}Q5AIkMow#fzovGNLlP2-nX)`(?6h19jYj zvH~zIhY?_|ew{cY@<&8udW*os@byq~+#04UI?r7C5A{bEvhil{NCD-->~!l=)>yPE zb8~X^R5=9(hm;nf4Y+ggQ_~aWV2<58R^>aHPsEZ@a%OiEEL^;Bp`0hj;_r?zs?0$Q zQ#72toJD>)V0|-swiX`Q+1^tnncav+0*C2+z;=+c7#^vlfO6BA@Z zffEO8Y~;t`<#y54Z8<=Ct|Dh(!^tDVY*R3&tW^O@Hu=a9a6E#FFTVJ^j-5Go?tJS{ z|MaIW6cxxpKmoj{RFQa@2FG40d1*A~$VJIOQ>J1d>kj1p@-P2qaACRid;jL&w%!?j zCpMjV2V{{j#8lsuvlI~+@6k^-j|}L;Th8z1IX*Go`tny_wLV<`LF;hz{W<%|u{583 z_KVzmA?uc>zYHhy5GS*e&p(OGWD^!5E4zsA$5t<0yj1vcESYTOT=rv(oW$JRe9j;J z+W>f)@uN%dqbDTAe`qnDx-Gx z?AZ#S*FvC|lhJq+yF@BDa+t^_1R4t=ncIUu2qi*jo!H6JN@Nx1$SJ9WbSHpD2)4vQ z`>*s&^QrVGcsUUL^%lnYam1@3b1y>f1yJ-2p6a_6tRa}NSWsm%#O|yK%q2g^ zwaH3;bMbFO;JT|U|LISDw|o&jGftSTFZxw5@4N4=Rgyt6LwQmkDs1TO+nbD6j+F{F zIBLgwz;|oe7tBQ-$YOV}fgJpOYp~)~&Qi6hNYZ0R>{KrsoqYN%tqk+aA+LwxZv@$C z2?&-w&Anc(uNH>9dc#j7Qx>~{&DLC?49`?3oOSyq2?jU_4|gT&B`{o$Un4UaE%?+M zJwfU^^OS+-&vK+q^ue{@4T5zrJ*mI<2ftUo#N#hjQ10C`1{J4ljEs(L%V%M)0FMqo zdh#%SLT_bC&5QTzRD$^=4F2R#{#`bi{;=??GkT^qOW8?Vz6 z74pnR$Y=0qvw3tjdhSd|GS!Rw`+xWcA>`S#qS6z&DyPq9jdz5P+`2WLjQ4!}!CY%( zcqBSCP#7wi^v ztDqyg{LVYWk=eHDMU{x-4>#WAc)mOi_F0}R#!oowtg^V_MDzhx&|v{6U6gR!*PE(u z7O;qO0+N@((8C$aX1_L_P|E&r=13pXC=E@ZKt|T3jzo#_b8Lj|v19wA?@GU=5)tw@ zG&mG6w6l0Q=U?SGpO8dgBP(GJ9Hz{u9qbPRz#N(TncHH3lJk?!N0ur>5+JOn4n-M7 zBHklYAmV((Tj`N84~MS;W*MW^7fpk^z8%+TM>QIXky^%xxN`y`9oG^CajunR3m{SS zjaMODc9dnFzKi@Qn~=LKA`o&tGSUZvj8S@-0a>%)Y`tWPfRoa-0K@0JXWT`sbN^=E z>p8^uy*h&9+Y8?o0Dk!4N3Eay|WFB>Yhq&zAJkL?CIP+nS|Wa>26jmUaz?HzvgfqvhYemz2*6`c9E0_&@#mi8gZLm5QvoCT z&RJK`5TbGPsNIE!TfhG>6BZDk*OqB_bTma;q=#$bB!l>+Mu87Rx989eN9QnH!eX$A4cadavK-W5>=X&7~ z;;oT4edCDR*C~ge&-s^r%NR5P;b@f^r=};PHwRn)>CgYX)=VITys{s<;C_1Y9P7oo zA~*B}(YtizaxzfKXheSOoQ}%22ryv;S<@l9AUi;==EhEtZW$bo!}SG|j+vUB%agkj zII#<*Q(3F#xS9KvHFuxF!RUz%T$N=Fo~be*NJ^Tu2G%3@X4~YUH*9=zvet_Zx*sAi zH8oxGETOcNW||E$s@ zSa98e*tfP3Hek~m+r1x*n@pzF8GuUue2ky~M$&^@d3uleAU4MA2f1-QegdBE*_~su z;!E6n2`FC%3W0ib8T{APoBskTX-yfft!gV`k8s}(e)|L@RP^vy2M3#t z!gOCNgS8=Vf3pukwU4b<-+u6h&a)dysw168Dv)vV%zXTxgb90QA9QTjt|YYLPcY{B zWV`uW!MKw=RQC?WzSyVAmeUM8p~{g%NU_Bc0FA|_9Pg)1&b(yE@vF^#ZEfG+FY;>t z_rK)7$-&e_5gUs_k?-W3MFzn+UP=a&Kx8KvYJq-)BZ3ET2n~mKEEyi3x1fMU>Bsc| zJpg0;N>TvrMpDoKi8JfU=af+xjHvU>nX?5LN-L{AZb^)?{kz$^x9gQ zu;a{J7dQe*q`^2Cs`Yp`#Qq0A$f57~4DfUBi8wb|EaioR$(l78z9uR*H*(ke)9z7Z z`~&&@?D_L~4(jpBy6Evil4b(dbV2rUIu7#EoKa128nU+Wi@s4GtVGkenDF zFYt98^0t<~hddZN-H`#hoqJR!FM6U8n>-u^@$S3t1@LpWSmp{StruXRTO8o%=xE92 z;lqWh6DHl26wzL>=j+taPMD) zfGiL_`Y!v^I0PlJm6{Lvu$AEe@$dZ3@09a%7%!)IC(eX3vpz_vjE(VYQ!qXR+aCcW}KdlIH-ehNB*A~%fxMw*;_c=HSwQcbm-RakQaO8j zw#ETat)ZU=7m&)78e_j2`vq-+$=YlXeOA8HPbGkrRb{X2n4Y@^J=zr+o;YE5=8?`v&gV@RFf z*@DcZ0P4n#8-N|ovA${dh`k&)rnx%20WY?>>7Lk4Vv zJdjg%O|~-F@JDHUJ+_SuxfVZxtXebnqlH0VK0FfipFVZ6Y>%uvIwTLAu#sbc@*VSo z?|Y)>+G-FLF99}tw)UMk=I9^0t6>K@E9WAlbc#Qu+kS`Z)z=qn zFuzx^0Ys9YpwD!w9auGfqO;_UXdzr%@;^P4&QW#m!msEAAL?Nidq&QXp*v$jJ_YXD0oc7WP?2ic%Ds-DgHs83&57(DL|w6XWl`c5E-ER9v28f=%R+z1##+E%5uP3;{CLGaY_cZJltm*$J7qWnNXV0D~tP>Dh zn|&#tvlrv)$a=7E?M3_m9|IR0K~;VtSzY*b@?=W-u?fBh#?vj=s1}|qUitsbO-q<( z+#}5T{o$?v_;||l`to7_(^Phx_sk~gmo=gPuCHHuGhdsYp%huIuY0a!dh3!(mL{(f zT@1yUTl!QgQjAO^;aed6m!3pHS^WK0oE0bjI)f8Q zjtq~)8KmT$oo@`%;)|M-iVcW3hq5tpr1tfjN7dUWy7~Cy9~IeCIzScy5#XfkFY|o> z-nIQu^(u*I^~Q;SJRJx?5rW;ksgx#Ca}>{$*8J>TjU7115SBr`O1~SWN+d3#Lmn2> zcd{i$vOn^W)sZc^c;QldpvD3Q=gZ(_hedmw+wtQk%IHg>Lxhwf^o-2Sil{ncXom`@ z7w+c~Pbmlb+j77I$*coeV?;86=Es4Xo5;<9u%c#Q#EAh&z^k-|Kmn({F=&QeP1d;{ z;LyO&$oIr4xrS(sGeJZzfE;2g6NlgM8j)quZkQ2 zqG!<~_wadh=k#4q7QtBblgYx!%w=f`6s;rB6(n3pnZE(ZvjxcW^Y`K)RRRvQ&Yw@q zO4byCHa^ku!a|;gllvVD5d*l7^OT^42a9E^PjZj#=~0$N*01IaRO7F9i|9{ZZ=U3l z_g>{3RM%R0pd6gGiL6NlS&U?URUd783~Kn}Un%S;~Zmy_?zWat92IyN?5b|b6f zdWf>@7EEz1@5uxJ*5&0KnjD?aTO~vDbZ`G!3;+En&IvGEf20iI@>oDSr3F~xiaX`z# z3Jw;*WD|PJng=Az)M3>sHnLv`yw-@};o%C1l#r|6JvO67;a-lO@f5P*>^8Q}v$yAB zkB*B;VEh&vR5aY9o<`J{EL1R!KRB3&3m_G+!3IaI6fh1}yD#F-CI#k*QI;(0)K@yM z6#|)1ZuGuj0Wt9uG^7!cHtxz0hqTjqttHDxLTJOL>CS=Nn=T*$WYHfy5CFoB!@D1fifO;0AJ|*ww&LoSJFHLRsrLhhad{s7UXHc&+?$a)}TLl|7gpj zv{$5GH$;Y?Fn2c3Kk2Kr!HYkXh|tTpH3U~ufZUMJsj11<7oShGhDU~5Bf}#_#O!optY3XH#dC#^4;8?vuF3v=DGr#scZ%!jPmH(f?l4oq4|_b|yLF2~dbPn?{D&sX$C%GnW8vOFr)@P5g!V;um^tZQ2#os*Gy0bN%k< zFx^oRkeMY5cBWUHe4Nj^H|u20`QE9wIL*m z+Z_X=^qv-QCS;D00ih$OPe+k+975g)&Omb_PGc@TU=9#PZV)=oli-U81`G%lspP!3 z4Q?x8GU8|YvSK8FSk?j&TF;^*f*o6$ERsGrfMT&6x@(~*!>%YF(zr#fA*Ak5n$$fz z*SNNKruSrVp*1s=r&$z0@2rf5=&OW(^AAm)=f)|}3GL{mLc$c{K3hAFzc7Z6zw**-UVu6jfP z)MSW=zOOT9&n5~><{;q7P(8k?T{aT!asn90U%!66ocigL9*d}1JFOG}`Nao0h&GukFCeI2wmDX(t99!5$&!PTnsrj{ebXOD z)Z1Ug8$c{Qvy)KYSo&LH==7m8PxRToExmk^CFjzd879lMR^VZ6_6EG^K}Q}@X0w$n z+sTk{;MdoijCBCfZtWY_Ze*UwZ-1-LlbO;*^(aqt;22(WQt8XGw%rGms->O}QTBjP7dG-rPb2D?H?)&jQI^5hhyxFX=WPIKH$ca8JV*@La2 z*pzIG?7a2sJ{BF1BaM-j1F`8xo6C#mHuGqEi4J6392~PB8aP_P3q>X;>$E3N(CCVs z1$rg(=#Tq2dl24O(-$c%U(bmPoS=Y9W_U|<2bps?xc^>>{u!5kQke2$J!ir8?9F2} zkHm?Glq9p`i8crG=sx6#J|KpiqO8#3DvU`6yQizwmrV^wjvqSVf5t4MgA8p8Rv>`a z5}0RETW5l^Y<)T#7G%OW%_g&+&$wrA&6Zu$fA->Y?;IV@Lk;wgN_I56=aJ}+Lu4e| z*j?);5Tgt6_oeHrtLbG7Zf)I?jBRkdzc=N}1Q4~zD1|q{H5*Zo z4|Y8kzxc2>N85z_8`Hk*yjO15SGbY!Td!w1W7m3FXZ~>K_H6X&Z%(?Hot;ep_cY^6 zb~U=ECs8ly&fu071B7E`H9=_C>k!R6i6!?HP#|u#i7w+Z?t^{W60#=2ftzDvRb@Fb zk}6%U$z}x-f`1R0(B6T7ddgS@IKf++cvKAd2ML62(fzTBv9gV0!49X5Ak=i9&#%^| zj0Fb5O(fI?6og+8sM5e^!!Y^>I|Z@UkB@%+Do^%`eD%&ce^SuKPY7aE5UziBz5L*4 z`Hk$S2#9B7(YvwM{phhSPz>3x51aIkYcK5Vgd z_2QLgvtVpO5@#jrfk&(chxj==z6CD`FLFt*_*K4fej|O!3y+F3z#XzvHR+DNXm`lD zOTix%tbo}jzc#((ef|24WcY3u5XmT*U`GH*IhFw`Srb5$T5q0`(vEsKDOng`jxe@+ z<`6Pbgi?kkT%R9_qtbY<^f5L*o;$qVkrgGkBTees^<=s}|NQe9OB&~+)Mcn~7#0Sp z;D~`FpqZGQsFD>RM*ft>fin_|ICy3=MXHQLJt4+3rKP7mv$pB`V(5C?jGrPSVUB#@ zl&@a7(wa#mH#j(y^6Ke|ra1P?m(t%AfE(iU-zpeTp{NK&6X`X*gR&{IV6wSNL^2#e zP^QUTH1>)LIT7+Ng^RKQSDRu+MouI;+84mjQxIZM>`o%xuy!Mr-Kaa0hv{8~JF6MH9e0ZG9K4q7N`ZiBg7K zkiyy9+t5| z=)z)j!LdHbB#bo#m22`~drMD&AiBRk_aHrdX~u4mk;aW`+? zEPFk3#_=+{VpDUqfe41t0~t2tl%2u`yWo|}k)MD>wHnCy$|R44IFb#Y#7|fYGPIcp zRt*gdR=`to4&KT5j-(aLgA)W?Y`lvS9{>Oj|4BqaR2yy}h}M=a@V62*+9LRSV`6)H zW05!VGiUOVT(NNvc~-_|*K|)6!#q_oWl3eJWf}!xZ!!nLQw0?`MDAHOmvvC#ur~BB z!!KRXPEs})84H9}1menK%i$5R4Z47Y8mBd|-tAuSBG18;caG*EB>617`{tW(>Igm= zeMFlrlO0TOgcZB>dbp6i5R*+?1ET5Pu18yLoSP?D+hRs}2U zS(SwEw6V{3zWw&wx{fvj7*1cVrEgTrSoyci3kK2!HVPkPZ}|X~mCbx@dWQ1+`EzkH z%{f{Gx{&9Xa%_ycc~E@QXl>D?f0cJdnE-_$a#Al|OqXGb4j6}>aRZ%$VeSFa7(xjx zMx;FFm;;M$N0w+(bR}&Ld@Q710_2GS0S8J!nHh5R%LL3hSD>QT1Nce9*K=vJKnNa! z)1;u&K%50vmXbjgG5B#U?^7OQMn-M4aNG~$1)g(r*D8W9rx2%ztS~lXtj9}b4#1;7 z_XJFg*SNfp0?!nU9TmX44*;TA3ju9TzYHZ{M)B=fx2rp!uF?@8aV?H+cQQoCW^Pl! zYu*%*yeO;hi-wyh%u|EX%M()UY(j)^oEHl>%>spmy8( zYz%*WeW~Omi)oEqgDyG}hkWe5l#RBA*3ZT-WS8>=mUM|T=P+smNY+ckx^Xso>Nty( zA~HAR()H<=bu~6e<3ymPXUg)T;jOvPWJ*fbpWNvp`N-l)bI2%6PTVYjQ5H2$=YCq3 zt(hM^Zir$UutUz=>+f`-d1RgSU`xt*hqKFGTL^HMg(3&`1QZ2Spj2eN=PPOL{ATn*an+bo9o^$VleXYRv?=&2wbrc=aAVc#w?| zanPK?-DD8-^l^-2E^y*h9j=YYBN}9lFu(`I-P~oFJ?_*-Hsq0Rw=tp0sF?#`=0w>Z zy|EESx!J+n)|*XeOJVPvh(289PIH$5LVN^QTe8~{;JcRh1jegtjU#sk9w4XJGNc@| zN1Gz`WT!OhC@c45&m1Woqo*<*WKYLD1;y^n)2Byk9+xj)$!BHD8*&IA_4g`gy@@>9 z*r1xRWL+~?^Y=ouT$6rUE4ZavB>T!HWfZN4XG$XzWPv;*`fLv&vKG6tqg2+E>}!Kp zbV|u@a&o#HzunMUTgXMAe>&r1|L_?3p3MdobF4FXhX*6q12ryo1rz88vWfsX5ZY$C zYGVp{GH){H_@5?l7o4#z)r>Yan41llNS&kEI8bvz63u~3=qdZ43&zgh2pDV*fjM_% z!SfySc28sTv(}eQG5skEM<1-O(x~fnZRuj_6@ZX299EH%RqfbvIQV$9 zg2ldElg#@c?ojNnU5zcx_9ElNd6)a@}!^0B){<&2%UB-8B3pIJBy1C zf_=>+Gb_-_=k(peJ!^CHXtN0sK0Z$+K^ByAgkySsVTFyi5+)g5`2m3dUkEo;cgRRk z(jOhwhDOKTn+&$(OU77wmUZ6|JD#1JZAp;0r-~81ay>8dN5EUchz zJvaOR@M;)JZuA#sEXo3Et~D_+QO>uL&>8yS^RlEOJVfDn+97Jkdx$P$Ggk5i$V$-+jXv5GrYBG762JjSdV`#C zpi1D+q6d!tKw^L+5^b#kzVk+nO=C3Y*4>>xx!lirk1|l?Btj(D1Bp77a;*=?4A5mp z9cT~qOW$)3V0$OK`#68==qxji2v~Cj^u>Gus*D@pCL6ls-c_oNU62bxMW3x7xfh|# zS}Z-&*B2m+jv)^has-U5m|m~3@rnG~?C!TNoSFLyuqp^hNs2DnxoFdg5~t6|yvhJ{ zB)g#R)tKoWAZ?uAd}Ope#8ALVTY43U!@e59j*BX+wz{n;60U>$Qg?s7ks!VTgrZvP4QBI?`x4-&| z^_?0BTXl^(o+Egp%>dbKblcNen!ZHym7Vu_SU`u3zo#cz*ElTp$VuAm>3785+`Q;B zLS_AxzUdpC5MUrI^ky+Qp~u_0SU;G+R^5*-_^j{HPgxKZo+i7irqB>f`XS3gXXtWJ z<83=iQzA!FKL4A~D?2xr|Gt&u*;&EV$Zc9f zC@O26Im0knV>(H{={_=qC~Qx8&M`$CB-~Ygm02Zox(*WHchow+wvV~8siKh)S+Qw^ z>H78WD!EX^D&Mtv%o=*C7a0q<}d@{0Y`5`O1BtVdSV8`r>uOM3_6Irre z#_w^P*7fO=^uGp!T#tW?nw8GLiP}LN`$S%B67u~BA)jxKuCtafjxNAc_Bk>#oM5g= zXy~~nZ!)@k`EvZkSj`n_QEt_6pGS9Of$4&|$u?Rq z@<61uNoiZKX;1~Chi8^I?;4 zny)}gkxAD5gf5QewplS$`f?SBEtzjSPPmBXC7>@nJ@CKR~7;u|BJt7XXi4Zu<`)-_6Yh( z4hiPK>PVI-ul_lTUFdL?Cj77mr&AK~leknL3Jq@Y;5h4opD%N*^{ z&_G3j0NR3BWQzot9aUhVHCu~dDYj#NERankQthHyq<43mn5a`Et4Wtbki7ulGAJBR z!jXy=I4N`SHv~`FlvD9cSS3lNdTDiw&f&?b%2n6F$BA3>;CLJN4h!h}mk9GtO9LQQ$ z2k8|Bo4@yECS@K)X0vm1HEu`KFnY=>OKc2`OYaOKg-`&OW7(k$kZh>&nYKJ8*+rR9-O-Wp6U3Pc^3isA!e*l0_0kSWkq#Kr(aU0K5+vR#wtG7?PwV0=WVdoG73` zf{-m^;na-Pd$Q{yas;%Gvx(#M7}B)_CeK%Lb|P{X-QxV%hTw)n)<%)(=ly_EbYWNS zY25B75J67ZhK(@*7+`vOi1D%s4#DRUdl_ce-^hITBy)Wv`p`uE0sS~l-~^NfOHFfp zcAZDgh&ZCaP5`%cVsn+*&HZgudXlpT*F%zIZ8#VX51PJA|MGg~DY&FB?J?19!H3>d z*=y^@IU@jeUz!YCbqazWP%>50qbD4?tUd>g%&=wuD!JN3GIBg+`urWx%K`&!W7WTm zkXa{LGmfJxJ!xwjDN6+#;7nyl=tX47zKv5!m7aN#Cp&5Dv~_Y{vR9s_@7BW_k{SJC zvmED>*xQcG*@u0HZpcKCE5hL3p7qTp;HPUKZ2~E>;Q(P49Y74|eU_tanLfyP*rnQ? zY~q&S134Nmf<*q68FBA8#qqJU4Z*2oE6K*0l}h*me)B_A*bpp-gED+8vFG0GaFvmU zJ#fwoxk3qHg!!ARYp}K9W5e}b!C!`&_nm?u>(`vOC{u2Ofgn#sYp?c$V9w(NJ_0y? zgN?~T!dyY@LbBe<^Rn;cYaDb*uuj)yQUzED1^li@QKppp`c=jm9|Tin;W=wQ2sQ{b zZ3=Y+9$Yc!!iKDc9y>a~{`RMR2+qr#>4k%Pa98pIPS!&Wa&PuZr<@5%kF@0Qj|k*) z-h**SA54?wWgEUD6HhN(SJi`kZ_j-NTlAlgvo-=J>kV&}tl35RiQLnR&iNeOvF-vf z8#d{_Yaw-W!CHr_drBR9Z&&qT9la*2HnC@Cj^q&pTQk)$8Ee%8_|di@b5jbZ z5Bwl|k?CZY0x~$Gye`NfKZzChBWIXP5BXZUjwG{x`eYpZFfq8rwKVxpzl-^8DPZee({s+SwV1zN+WVM!aL!)M8XZ)tbk@bLE zHi=qG^HWJM4}616$X_B!ZzNq7tiopgkA0U;M<4hZJ=m2!%{*-^Wt+yrW?&57K$hm} ryZm_JX2yf)vT>&_98c@QX1@L}tBEsRpfq;M@N=pG%KtRA0{*()0p#HpHB6k@B0N@?4Fnj3Aa@<&c$z=pY_ScBe0nu z!XhwZO%M|pp}$E=BF1;&L5258oxdWGI;PvAr05Ml5Ia7Kz`k`ioe}G zFP*hP;s`^i2qRI0auh<|1;I9eaDHF*gf!?!h5+ONgIWWl?oxu?l0i8G8AymRg4d0R zslg@tS(LyP0#yqkb0M(@)Sb}pfjvSZ1M%uZ2SNwzTYB1{4+inxkA3x7^= z99i6%-`U@x_z=7kij7tp#WEw|@KT};jhY$Vuux>u%Ap^?S%9zwXAPS)s?`!LV4cRq z4N{scntB=`8{;<;E(xA7dw@j@(QL;$DRc-EfKv_c?;>r*?=o(^IFofKdcpSaZh&3J zC5*aWcRrzgA^hO)BmP7al24>OLLq<&g1{n;X^2shwxU`C#G;f(u>u8((OFV6rPf60 zDL7H;QHarnq@<**WR_%WQ@5n{q*7&aQ#&YG$gi`=Wm(C+6E#wRrFo?`D$vKE$KY9V z3l!bSCF7zu3N8%KXwNjyDdgfaYRQb_$!ql5jLY=POwSt8BxPj#l&u=Hy4ApwmN|wh zt{DhxeQRXv@H@(5mt)Rj-x+jP3|!YN;Vg_SLRNRyMRN&r=ccYEgC_cA{$S(Nykik;BGBuStC5gQT7ate5PGF~KC%TJ(%kE9njmFLPP1eo+&EXz&6?HXZnu2`! zMR9)dMw!2|lDd;>r0P=LRN+)Tb6E#)TAf9qQMggrS@=2zO@3UKM%p?-C1wWQyrrq= zMrI#jf9Qv1>Lz`X?oLN&XQ|P66$P@o5vEw0QQAH2m|B-QrP{ojpPF|yv>H=YpK?ic zXEjANW=)cyL{qXi!BQkul_-WD-LDSgAUY5m< z!KZxK@!?7G_0kQq@2NI;M%lJ2CNCaU4>Lz)zUdwe?+zCB>2?~{58w3`)_(IZ_N>44 zh80217O(BZQ!LM{x-^^D?DNr))o|AgX*_ixNO)@HcbZ2blbF3SuXH)VEe9v1~g5aqi?-!Q7k3Qcom(%LUay|@xYrhv9OE%2|k^>?G zvOb$ZhCuv64y^@59m*$!GIkH`GOZf97C2tzPF)uvs#%y|G*wN7{Cwi z7NsUV6+IE96k8Yb3=@Q#MMe*E|6^l4Qaxfp^i?c%G)}A@UMI_qMXC!1RW%15HX)Hd zraO?Fu%8rt8Nza&ka9{RvG8l9FH+RM`Xp z9KK(7Mi-WS7M)Ge+NRD5&f?BYyLme?JCe%^XT4{Q5E-G#p*#g02k!&RmI zr6;9Xdy#vi7++-MWbif9bB23!tJAZyR>s(N_HUtP31%M3;%?uc)xo41B&KLn#U>Qn zr3~*vtf<#{dimc~CA>zD<+9`)EIiYV7anRemN%Ba)k@Y|)?Ka@HX8p7FN$-(PjCq4 z9C0{Vt8L|Ryp@VqRG7rtNiSvic9^}7weP=%*Vrnc$iYPA_yk=*d~!>1`~3Xa#^b39sbs3Qq4eq$=^!3oDC<-0Wp?7%Q=UM#od@AY-1_9YpJ&3) z{A@s0@mcY9@6Sh0?Ad7eXrT+;_Di2A_3@XXM$I)^hI`sYrQ?! zg+B()p(~IYk?x5-1lF8@_fp$QOhT^yeF1ZaR<2>EO%Z#dE6Q!z%`-6sOet$35R) z(0r=qRh%nu$yy)I*$2IRC?)^UJ zRpc-5^gj@N2#Z287|V${iy6v0H%vNFXmw{); zhR4u_#83I0oXPctb@^|)pBrI>lW0|>``Mf{a-RNl?cD@Tr&SuPtlG;0jvdJcN?{Zl@uy$R7A{f9@62W}YP0_9YmlCLs6c`+FX&-Sbc#cP+uTC$0wKvQq3fRd{1ilx z`8tr$eGrsDuhgOMQ{!2W3(e^?bC~_<={wiRusaM42d+sdhf&Y$Y_}qqAbNZtn@?

S_L6AZ+`;D64a4~NoG&8EDMW#N^Ed*CgFMRD(@Z9xO_8A}`pn2A6T5ekM za=fOF_Ke16jwa@eUiMCZGF=c5elOlXMSF8MV-hcWI|o-@F9E>c6uf`Re^oO9Nd6{q zvlRen$t#hFIl7pWa4@nnG6MwRNJvQdUCbbiI09d)XIq@da^M( zx>z!?@bK_3F|#tUvNHUkU~u(za5MH|aBwC2myrLH12lIvb+LAGvvzbK`Ae>`iKDxl z008ipqJKaCveVql`ahZ+T>o+FkAqBqwJ@K_8(UMziN4vti8_rF!TRS|Npi8N8^8SYX66mh4X(n|EuL6PJX7p9QZGX{uQmiYyX5x5RRYe-=Pxzbb>sJq}yjGKug(!50GyyOODH7Oa-$Tas&jL@<#6$=%Fo3sWLigJHsBgh0e!*j2 zGzh#|5{wiCIT#vfR3K0oK!VCm3-+Ugh!i>Tf2&~tBvC16F#jg|t63s4kX(TbLWYPE z^}ngnsFtDsOJE{QEDES}t^`afzuX`B|DhyTXhQxU)i|VJ$=q=$)ZUqYTk?OD(z#~D z|5yIoNM=z8a%VhJr5omdZ2nhkGWWRPf6E6Ng~CYfu!|P%8UK&jYpIY!UQEpNdI@llw@I$#7MRxHi-i_u>(~~!d0A? zE^mITh6gV02QET;f%TM)fyYgQwd%lrFva}iTCNntn}gRnkz0#LKP1NlCw_|#hnveF zVQ3S%LWJ1PG0@cyT4z-+@)r>}8@9D{J`(it+?#&qhy0n%Lvd-^dP@h4Y5fN;E80*J zK`{>pW}@f6`mqE8R8bZ6!C@_O%>PO9OSGEa>u$G_QesFmtEdDl7@1=^pr7?-==T~K zxY=s{!MWGYFX+ZHnF!8Rt+$7=0upWb%CfoRIl-quXs5KDUuBNQ6S;13z3k}a+3HUl zWLSC)+}K?H9MGexx@6v5f5+d+0wBx)5BBxxtoN&x?Q!6*TH)J#&#TxIFd(JbPE{GM zrA4=pWKHR?bl~B+sG=-~;FlNgx63@(9+Uv)FMerIRn=!16#E%&|L63_4RgO_d-P16uoOLkcFJUrt7HE1^MkyBjarodo(sm;V@oe&g(+ zE~I8>Al$(e4$hgg)OeJ5j0@d{E$fg`;hu212n>S3Bov`bdBAo=cL`J+#p(6h(C=b3 zZw5v|U(~wK19~7DVO2R_+adAR1qI4gaYYUKtEYoV1`koBoKP$`BnkPKN%gYII!6&d zS!8}0LSB9wV3@8qy{B*;V@vk>(Zb8tt@HG37V1e=(9CR*!is<~`Rzudx<1i+nPlLg z>o;uqeTt>-Z&+pb>r)b?#t&!wq1ks+0Z|K0DKFH)GEghdP#8)?=E3k!JXj-xKNd3_ z(T^i)nu+Y~zf#lI0TbYvLq~>e+R5m`$b;JWimgLpG7G*qd8n0mU4CrD3dcSOJIH+mzCF0ddN_D`BQgD#VQ5Dr0rpwCggesgF zv=Y!2e4=mISPeXWcynMW{FZRYm9IXEFTsXhJ3n&RNN6wkBqQ>_W;4qT0RPp;2$}M# zFPlgiFbnmzcR<|F?7^#Y_)F4f%(mlvBTdWgUb|y^;aCbTZX~p;V5ogFf+1}=v&g<* z@EfQp_xG}|CPK{nV`4Cg>_wJLMBmP>sZ&y?V&}K&AJ<~K^Znpmn^Kqs)mBC!2X;nB z6>GcJbYzq|I*5(kAGrx&tk{)~+@4&H&wjozrpU&mB3?BueiR5t@ zdoC5V_|r#!R~JzSk>DX}UFXnUTkelcg;VWxo9cV**$N4diZ2?!a2O6zn2Jp`K8o?* z*K=LX(Gd?wYe;wksON1$C8)Oe5}1Z|=EC0oa_$=mfRMAlodl{A!C!9d3qQk|oY1JE#b7yy6xAE;OAxzA? z(R{#0gn&7L3gvH6gVGOS+gvC1)Lo%PfACA7ejw~E*4B(SdS$#UaBM}gp}QHH?u5)~ zJXNj~SY-^uQBrKj^<#lQcArp{#rwgFJ{tqNmte%OX~X%Z=JecJYy=v4D<6|ZDo2no z!;m)tf*%i(t%7X9B2*iX4vIMVn;)@F^ukt`Zh_d3JANGMI5xs?`Kg0uYchxDg@nfD zM(CAL0&;ByXqNf{G%M_`l~d&|OLRdWQ*@8>sxTfl%wiwE+2GAniDl@7op!~x;tmeN z_Dyd{i+E{~*kUv%zNvP_p>7)!A>Rxb)CIYm0O4Trr{*CmocuJxT5F^7jGBrHhE zAL~oa?f9R*-59e>Qe)A4{(%w!)XCTZn43L5Eam25BI{ZSO^Dssjkf$)zh%NlDxZVZ zhl`z4>1oxN!@|h`0JNkezj|t*xVXv>;&>@OfpqD@u)A@i7~x;T2pt>CkiPclqxAV< z%qG4N{(d*mkJcU$VtcpjHB005@k>ch%HMp!fBc|R+UMN42|FZPa0ouWN^-lQbCp;V zDPkEERd$yP#>3s+MX8t`#9NCXv@z(P4Xay_p?~#)H}QYBjgD|lBp`$m?+;&25mi>v zN@%^b7rkAiB=g-6)jG{-^fZL^_*yx*r>*_{dt}gYL)698{C>rBbYMX>reXqm9Oj7C zTv@+mjEI>YC04#=h`^d$HwNT9#+sk6&(!*QNMLf21UoNIT-Vm%!Z%sSj-!_}T8PR~ zC0}3aEMpjia7xs=Wy{bu#i|G$TVSRMv4O8Oq{U=jsJ1FAigQ0B)z*cuq$*^7z=d~e zH-c1gT=71$35T5!I*zLiCX=z|gLlmD^Uxfd@`rSbx%o8H#SPk)R?iuSDtsSR7=k>B zP&~T`hLas0&yu&HMy1bWZ?^*UZx2J6oaSInXC|>onxXP2=Xl+G)7wt2*H~?; zdV6UGUh^86Rz~!()smtmp{3t1ZwL21hNi`jTbffY39Twu67s@ou3w;al~$J&&}v4` z;Oj=7oU^2)V#Q%Jo5XHC>V2y1>`@WW>x9kxX+@E_p)+@$c-rt-E&!>VZUb3XLxB-^ zPDK^Hko)*Cs2;zxLc?^8Fb`GGOy$QV)V}M4K4KVqYGb+`>V>p8kAE-Gj!1t1FN)&% zPJkb`qPMl|M-B+SB!J55AHQ@j>MbHdBqSu)lvy#yM>(t-gj2fW8~sx5L1?(Xx@(k0KL8JC?fP>ZAa zjTrG4YgY!}RrUtG=TFF*vQ6v6jPB4lPthPYTu&2k8AY^O+k=6L#H1xeSR26SHX6|H$|;G{paPGs&q)!NC1m*7zm7%~9U`C< z^nH$ArnUpVL{p860vxmKRJq9;`2m9qaFY|zAN&Tyd$xI%PXuRV_{3?2d74(y4%IK{ zO%VEY$LFO9TWYO_{mH?Hn&e4Qmx~%-x09gUaRC11^O|?hSWNBLCTqiB~Tbv*DArbISWD*XelCacsVQJ>EIu5<&s>U=XFV#-CUt zpam&SK?XLKv(zkhXhPc5YL7mB&6JuPl-HKMT<;~|sqD7h%l%&F?dX*6>TuCNLQj)) z*FHRo|T^6>1VbDvP}q?ye8c%3g#6GL7`gaXDK4&?YW*HuhF?UT># znnQ(=ukcM!_Qm1Vjm-|oCr9izA1547SB96ShTOe5WF;(omh`NuzXu70bl{q&1DR`r zBsR90vtmWi%rW$uE`wW&?mABzdcT9pDGd$slpqsBmTloF@M0C9uRgLD+S)--E1dGB zgiqh~**XsYT4&TsKMEco4mphOE1aJV4axT=#|~?adK&RIO+vAN!OMz)ucRKBJ37|3 z+!xVSW=GP5v=2ej&vhwM;02toN548gu}oy>hmP*3%$?H)c|6bq`C@VSe2FOY1(2K3 z5%?!VP6pMNUZz){j@d2;GMYfLPGrb^9*x8sq5Z2jDSzig1Xn#DdA%b)88%|ClPl2n zVrFc-67+HML5_RqUp>H~Er&ea)h9m5F%f;07jJ?l_S+*XjWhG&Cw zRv>>HQY8Eu@Oa8nf)EUzXTHb_ee$SVSjZ5UPs9GRQn>HONoV< zc3@(;qKRRHl3jM_O0ag%Hvl5FK|DcZ)J({s z;{eglhYA@tg>pL>o~j=ME&PJ8-ekFE^=foXzT>`cwZX`QJk`6ZvW&d=Zh^|_vfk9` zUOmP6K3HplKY(+?%bTJa53r5!bEx-QPF$M~_UPe0bg$j(=DnJq1KkHm*lOEOQ9w`J zxa_wW>neex+Kq&7pIetpPbFj5X~$7gg+Gq9qJvcodKs|T7+;}cS!@&AEExLSpTl6T zImp;~h^-etPz-xb7)L{oY2LZnC7?G;2*oeo@C$lBpolJWgI4Qu!qjY`r&{1W4L<>Q z?O8@s_>%M#7q#@j>8{^b-_d_6>uSWT#ZZwlP+)tfP??$>-~gA7FX}0-XI(gm+hAZb zBcN9K15>5~SJ=RVBI+d+Bc=>uyua*gM?wRK~A}OQf}TQw0j90X5VJ*@!Ald+P4?E<`wFD zo%_lC_^>&YpB`S@&}UgC;WdL}CZ88O{`(#DCv7>I=Lf+=P5|OBXRfWX*UQm9WG*(& z224-?PtA_8&Cqba?(5Ob{C@a?vr(SiVid)lx%zOwueeWjB%&u$xqhqdN>lS8`QN#L zF1NODG5ZpkqG2H<2>kZ!pYCdMzxAA!Uf+?}+aabV<6uR9uchaEFz|7sgsqPktxWS} zvtgbqf??pYu?O)`W?ySq^+=DWic-vO5{Sz9<3$F7`NR-zJ4=6`EL}0PCl@tMPT~!p z!3iVIG4zHG<6B$Wl^P-bMI&4tR2>7s7iYqt#eRDEG#MU8os}CHFRm?>!ws6GmuZSV zTS(0fjh)L?K#PDaN;VjLQW*3oupAIIAd*n|xG@$k-+e8uiBmWE1E_(v3-w%CXQLB= zStIL&R7TlIt{_>AHZ(tn!UDyEo?Yaoxh0t(B-?}%1V6(B+~|4!4#Ne(#Wj>i*XOv= zigv2$I1sJ4n&ke|ZlZt_HHo@{ybMoXzdyG{i=27*yA(EFo&ZsjH9GSr0kV3)dF0QD zz{zrP%V&k2R$q9EIpYQ`dz_TKK<-h$=2dz%&6y9oz;fY<^A=c>cL+-GFEpKOSQk$_ zeC-WmJFkJFd?ZOOG3j81+H0gcsy@>2aMOb{7bhB0ZJN*?vA74Pd`GX zGNF?AxK>W9mGt#u%b!-0QnRD1d;-FcR*n6vc#3CdP%-ht8bVmgQ)6p@yXUD0W~)I@ zm2zeZ+3~^Jrl@5O!sEB!B;=!@(ir(%EE#~&ZLsH6M^Aap`P zQ-iC><61CFL1b!5QsZ-0$i7!W^>eO#aPyX1vI7W62zW%X8Gcqt3J)XT;&kLA2X_-2 zD;gCwmX3=mdn>_x4`PS`Zo$A%2fs^H)~@N{bcU1z#igaAqNm+|a5)OAy261KIS+W5 zm_WMx(~Qq|7NDj7#=(eizXGKr0lrTP=;LTy6F^NiI3ri<%o+O7Be+#5NnP* zX(4yeuxpsIS5J)I9>*D@E#vjo>|mI%<;&9os=cfibOi zAJ?L#3dbzy!0(^_EmDEpy|SuKSk<1vqi!>{o%5n_iYhC}W!L#3>^YNL5L_9xu|b=j zT$vQ-=y{XwdI2VR&M>afBv8N4?hM?4^qh#jHFBizQIGV|*d}hHI>vUYTyD&j{_O}= zr33shI#ZEIl0xI#3$M*k1?fZbPZoxB=OL&>9%o$SHF7q6hL&Bp)1ZWRwXwil53~=f zUtuhqZ1hm?AYz`z+;ye1aZ&BEnTbKebKFFhCY1y$Ys+cOl1a+TQh+dW1>7H&R^lCT zXzdnw(QMOHJX0_+V6+>u;u@8xvrYjM5?*1`ZcEfu3N7$^vqTMKxbljhF;+F1amcY2 z+r)tMhLA9HlsEPd4GXfUZFu&Un#A2l65g937!(|-;SpGqZBu%{0LT%DixmTzNQJzN zl_-KQ3APy(Vi@k8gz@=#0_aM`)13}ulTF{Sdtcz-$ed<7xFaV=v7Y4!7gK(a65F{I zw=JDC!aTdvWs!4p@JaFR*Wz!TDD^_0O!S6*Xk2eE#F^V~Fg2VGBYy2^WIJWhEG)S( zuS)($!zFx{zWQ7XJ$co@Dw~dOZ+!cJ(axO+`K_5~ zv4i=0yd-Y8q9WlfQu6y{Fd9`G4Wmls`^%)zjwb_R$#b+NU-Xju+dCDBKNcDep|q+A z`+Pz$e`5zB!_v#!<8|h}i5|Nj<%JeI=qRcEpp}jAC0JfM?{NEu$`$7=~_SG-$EBSgts^YN91tLWWPSFb)f}F@M z>At2>tUW(EnZyJou{nM6)Lh~`Gos=k1sN;{8Yk)#LQ2E9b)g;|mA_SG$UxSU0xY4I z#K70~U6oa4U+d~4TNf4s2F_o%G5TT}rwtnMGJ6gY)tZamUD?syz|90V&c98rHr&kKd%b)`Ga9guY{o@#L6BheuZ{+`xG)(O zSF*os$tp_2nR*Q6e7}NFpmMD)1F*2b;yw!=i2+c4jCoo0kvOa9q7cH{sXkk0%=v!Z zg7nrWJwBih>7d4^Sc#Zal0l>DjgpuKwcB&<1HXq^!MJM9I1wPVkFF?{lp^J$Z7+-^ zwZB+R3OQxsL3V9ILvh5^z4lO3o4v>dE;5!n4HS!f`Gv8U*ADS?N&EI%HP(=vh01;> zq35y~l9@yh#7(M$R~PxQv^pLlnb@U5OWjvUwI1X;Y`EjA>=SVOPX8&;2t%-7t8g~5 zKQF-omaCO#*GDQPi>$1g#48S=Wm?P4&fZ=kKRj2orr0sGaJ~i|Atquv&z(8!a580G zf+Mwjhf3C;Hh8!XIL2Vy)VmAzQylLPP;Ln-vgJ2LPvhb>su*ZS!Fuv@aGPTvP~=0) zi>v0_4#d#&>r};_2@|8cj;wJ4AY(uj_x6QvgW=>(p~VaZKsTy&hQ+PQH9&c#FD|HJo!Z!l zPd-T>pi&;eO6|QurHcf=GmebWWSf+RnKyY;U=G{LB_(H)04Br*<#?!^yCcSC=0SoN zbawX!8Ph%G0q|JdU}mO!H^ntSU;NUPD$D@6L>@ZLxXM||N3~TJS}}TeSN^;zsrd)A z;ks8PveG4|N@QU1K5A#nvG=w@BAp*56S4`SaAgum+dOM6M85b{Ix$G+lDU~}Va^w# zyQ)Ez_o?~wN@zbif>xC1yWUt!S!)B!h`leth1sR2XrRTEJHkL`f_T)wr}&u5yi>_s z=TYy(er!U2Oa06xfso*GHbF+ut8FjIBLPa@n}-@x^d8`}{F>DZ5%pKt1xr74DT&ze zAhpr3$~vUsCz8d+xgNU@i$rcVmMBJg5f)frS`E6m%KEOwOAO1-%zdDLS2^m>&XxZj zpA5%ECd$PzKV&!$VW|qOljl$^?uNtls6wt@H+-_27RfSQXX_iBECdf?6%j@O#dUDT)~YO| z=j!%b{mJV|!{Y`oj0qie@TL%v=`Gw<%o{;+OCL`Ngskmo z>1q9NO2P#YahKz~$A{I0UU+2XvC($cUro18*nr=Zo#s^O=M;wG`ZWoF$O|?@UNKmJ z67^Y=N#wNmbLir>`54DYw7MGKSI`S{B`!uAnr(~vK`VB0z^VFkO2juO*%o?AS6DBylsc?I_nZZ zRnU=3PlXUPEt?CWyQ5GXap_k)i5`AZ*{cLi>)|j~cW>Kx5>lbOx)S~JTTs*-Sskg_ z()4;C-g?QZ5Q2m-<9&xmZS59?v$qdRwtdgYc-Dm<-$Yh4x${^ILzw)$s%noW(-A*+lhZ#F)@M zBm=qmR+aZF2Ocl)jQx+0YMBrt7Sa<8Kb~zSq}v94I`V!gPpML~GqZJ^wYGo2Ve2=6 zG~W5Z8=oZg0nTD;m8~;f=kq#byW!IBFphBMngWz(5|^aNF2uiVK3uTAS$mQinVw--%ax-knCO1b&kRW7p~n%c;L5*2uPf36a4H$zhTERU%2Ef|V^Rl!eWzSQ{A zee!!rO)F?MedEtU54G{($bb>fy>|QCktD?+1WIBRD<0HW=3(%so&#ets-G0t47NYv zWBMD^r~h4nR^8(6n>Hx_ryKI6U1@A4J0ilw#oSYt@HD}Y7)-g z;MpRdkoa~r*Ok+sttf_gROi!x|6C9{i+b?XwyUArnyX9Ha7@TBMy$;T`$X!;#?!<| zXkWnK>1B9HuP<%-uSpWZ^nD;e__dKqD=7e=>q@@}H>Ew_3*K&~7del~+d?5X@{`YC z5aZ#NiJteWaqhE)e<7^x#fN=4dUyGVaT-6$=)M%r%4B*mJY>bh;k zDsS^#Ma3b2W2RrcG5);?>{3O=G&VY7d=V171W1Q=ydl5n!B!^k#IpTJW!uo&1j#5- zySOx%n3f*me4G?}O*sdwXn5-0wp)%WnA8azY|I$orNqXbz!_qvLA1IZ8!|~4*n6`Z z){#EqRs$0(A2kAgAmYp7crE;%z>QrZObd&mAq^3OV~+01QQ1DRSa}{^veJ@^8b%qC zFRirxT2_QKe`*u%yY=-2b4PsWK>pJk{B;#KDG#;0^?El+@6(gNy$Ai$A!^vSn@E)R z-V{$}d@UBlpeb!YI!<|__cUNQZ8%8tRQ`E%HwdCH&9PJTT4Rlt7VFAXfX9A- zO*^<2)DbmIY7v72cTQg8B=`3n}>{`TTWia3h=F0k62Y zBq@))IQgdw0F}FCk~>NBy-6e?wKYbR^nLn0TU%rOF^JXVaXO2*6vwUHkSKKSg`@TItj$y zoz;?2H2SE+?>#-Kyj4`)GkO38lt4f~ZfSK(a&AT&hs&0du>gIjg+)-}2Ufm20ERqn zP<-SKL1$^>M+5vwrLBX+X`jhTcSJuYALefI>zw90USatdZOI$el$Q<;H}WDU>H;Zw zG&E%6k*EI^*)oW#e{A=WNvyFPHu7!mu{@rgZz-INB92^RRwR4$nhk#@#KhQ|i+gH| z-7zjadXzFb;*Z!A+^lRNWUV=GrfXvF?}to1>3QQ(lhZ`Q<+B2RkS4;`*+=M#;OcF287)jkCju0_29sO0D4d;23+jkA#`; zng+}|5dx(JJsX|~5hvQA)i}#{b|^APbCmJayp}r|M{jTQDsP1pTkh`9-JS;U{qrfx?4rPmjI@*D=@ri>I^#l|mZ0LQs zqWra4g%-xW7;abpuudHkMT~dt`|0uqVOhex?am=ws@uGiT8gSR0 zd*nbp1a-jLO-loHT$Rd-Yb_;*8LtF=Ur_ND&w9p0Kb9i29C@0d9}{nBD4Y``9gV$) zqo)O}nSR)OF4BHKAcXWJLEkfkg+}*ve3aiRl_cfpx#xcAMFy4kycxxn@jQpS9qM#E zHxO=R?J4>r99u9mWUYsvUMCe9KIkIhv*GcXKnNzSIG$XphK<=YNU6-Z4mr6Q9NQc} zwFQ)wnQowe@HujL2(1`)G#mY=I5Af55}h=LBvFBk-l}>pc(<-jMS6%rK%lavz}+H$sb(y(#3zS%5zKlrhZr0=njnviHH=o@ixy_ zp{v4$3ed-kgtAXF79)HK;a}SM>{UZMpl0M?9& zNfN5*-gEIq2$Smlae%V&GUz3uY!U%x|LQu;(cMYa1q);^G<1P8;M+FNg|&#KA4|H> zCwD%5O_9i}LT2~IP{rb&iBEJM8lF!G4{yW$W*m;^t9vGwA3fFq>j@XnGRh=RQW~EV z!$Q*UHy8}3C11Fz94%S}pfbKFO0{)h-G}{JlNU7W*gll{uuMBLA6$vke7oaVX;mzm z10P3aZX{>if^Dq94tYK|bl8&R9q(A1sGaT380WOoQyJn=HsaYp6wEW zW{O(3!ESK z%uP8!Fa-%(p5drS`Ri!E69lE8ZA#LEM~f=29HKAalBwQ(2Zj5&Or{!1b>B z53EQZy6f4IZRJ_LKzjqWFRLf_Z)g<`517a*J|RxbHFX&3%Mjo6{B)pVdO&Cl;6Q0m z3{y*!ZUxs;e8Q4S|5{AHJK4aUa*}j4w@(H>c+bjKLQxm7e2qV0Tk5WmZS{!0rD#^E zt8@W3$qW_|&xOv)b1{c4=AN2T0hp>h5*k{i`Gb5!o~kNg{HM$xWEd4B z=z#ED<^)N47816_Yz-}`8L3No%y2JMEG*xayQj*<`e$*iEwu@EeDZ%uH1`rY~&O29S?ULLPEGdCXCm3Mx-|*H$UVg47nNL!H zm7s%SilVs~@AolDRF0{E0)cnYZfX_M!&aDa#c@9PA)IhbqZ?guzbq+q{mMz0qodG? zNmXUxrMcyCcuJ3TsXFGeZp_U2{@~t%l!F3AX?9)+q9cZxg(|dBcc_!gXKOW@c+rA( z#f2aC1@|&ZSu2}TCaRE8|J=L$2R&yD6Kk?VK0&!&S^i8utIEo)L#A^S%DN-<839W3 znff0b;nswt5e7Pypk4u2=9Xq=WQ^QqFgs+Kg5`&62E%{Taiie$4ofqW#6Zlrl)Z#j7>-E(fk|Bhr{c6;{Xx{E5t$EEMi@ z(Xu?1tGACr`4lOcDkBs*&~OayycsGIM-N_rFxcLsZ%AiL4*{mnB=c)c;F9&zmQfe7 zG8ln?%nIVkJpwfy^vv;-nR(t{U4tIj|7Wb}A!N?;QCeX+h}HlQIKwy1U2L?;!AfvI zqxIg`sn@Tt9=N(1mW6OVb2E^7HHOQHwBG7CTQ2m&3j98=NxYjVEy)hk4Yx+KSf*Ik zBmSA%(Rkfcy&4mXXof3 zSLw@2Tzt9*hQCVCHMTwyewj*ogA|ZLw@5=~hW+Iw-mVd7bVtJ66@^~V9KnPNf)2-s zx6>&*L#~u)J_kS%PMAgf1IcTJI=aA1=5U^JD`{>8)#XYX@V^i>GczLr%*97ap?g*T zV_>YfQL3V|jGHybmDQV4)%sm+%ILPGouUvpK2~9za$uX(uR2CIcb=^y=OMA~-d!dc z>NH;R*hvWs8}?+tBur%92+AK2Mp*d|(ORu*!?%kIVw2~HoW{_08-A0*39?~rpO)6Oe1@94O4 zpzF{-F8kUOz{f#^zB2(GK-fzBc3xR&HQHywWwGXlp8R96SZO&Zz^)D+jY{#Bv*+1> zLva0M)bpYfVp``#lpuszDmH{H4l-;7qIo?Oc6KN!D-TRvm5`Pfd-ZY^9&k|Pk7 zV99DDe$X%yp?4UiKpWvAygRy9U{8hy&Ad+L8EhsuBjy1m_J;F}$(2;BEyQDb#NX)R zpjq6%vN~WPE+ZUe0yZ8OPpV|;OIq7@g{tMfuWrL($*0l$>CfvgYweBnLWswxl+mJJ zuI|`N%od4SJUh3Mtc+t6C3SKMu|gicdvLbE-}n+%u4sZrkm#R5)AnUQ+CerQ^kbpM zIini3vaow7`(4 zBg@dq709#m^Fii7F_TRg$VloX`@a3jLH~j@=l=R@Q6$fY!qb1>QG8^S&}c!FXoZenkm-5d(!8p?_K{O;G70YlSA5?&%)HL?O=6=V zzEug=+<(rSB$uXhnr;6Kjt39IA5g+D82hqz`-m%rdn=9%Di7p3g@xUZhyApHYuQp)`DozQgZjzwWLrzCn=K;d|^szt?|{j z<8Xjn&u1Lri~Bftc{5QTOqGhKA8eaF!?5MZ$(&g}T?#rp=f0QF5=OeqZseL3*}%H^~x(`8-#-oJiOwQ4G7Ax_^ zGvw=&rpE?zRfgmMe+o22G2EB#=?$#}`A^+2SZsqZU*bMdfZO%8)|AJ|Qq2TNfTW9LI z8{VyWgAtu&Jff+oc6LuU*i&$F9kJNU0I(($Lh?(aqRHIUF2wf_T9<;Xy{Ih_ns&Z2 zcMdUM=2m$fK;tWIPKCVd%c9m-^v)Xpp1yRDv^8Z|aHJIXW}IHaD{qVGXAn#G>v8sS(Yr+OkAecLar0O}aABF)o`teeN;v z%375#nuaQ4@73J>CL__JC=;%TQZ@vCSv7@20--!mVC`t8NDvW&-F)%7IaZP5Sr`&r zW%PraRCzudg~I{VV)PwdH;1<2q#ZbN_K=)8%G9vBx;_P z<&IgD@ZcUrq$++9+#U)0O3V>E7lw_`G)q%QcII750%A|yo9w@46zO02%`nyXG|990 zk!1QmcX*Tn*($=8x`Z2kN6w|WpD1t#av}yD5?9E{aYXD`8O3(%NI*kRs-2^G^I0pY zFLIH&%!K1Bn#$|b!TRp{nOLJR3%!7q2#G1se!tEd?e8H{8BBz$Qci z9os7(A5VN(eX2KJ{1ywoopZd7Zr$mHjVOf(=&mc^aCp)eW*4*i774_dc|3L#p&m}r zUV5L}5wLT9NXHP%u z?TQ7DCO!_LfTMAr!k|QGva)YO^nuw_8Z|r=P)OUxE_TWMBP_Ac?Pqa$x zsYI|?N^_Xw?OAH-MqNzU2V)v$eV0+ShP9D>C@e2SWD%p(?@2FQ zo1a|ZKNgeVk3By5A@6mk`#4~jh)gBU^Q!qZ#NmKF)VC@-T7K}Zrhf2_TOdjY{^apu z@H9a%Dx)o9FpF2vi$i@Jt3xkUn8wuznK0sV-D0HRqX}VBPJ5@!GFOEU_S@U*I!*yv zyjOKs@UWGXv(lAI@23||@phQ`(^1;vw$2M?>@06#(+JsX<y9er)C_Gc?Cit23mGE&TO0d_cc`66zmp*fP$~RMK7*VrSkV zQuef>tMg6MELQx@JZ@+j3+#u^$8F8eS0>6_U-(*b18L45Z9sht2^{Owlw`uN$=?i; zZa|`$%;>$I<>#wZzhFltrhVRcDXVy=gJH?_>x#8+q zNOlRV5Hu;4Afr-l73P5Svl$#TSoFAo`(j$~gm6*p__LmCr}m89`hYKp>dlT}e}2%P zh#>Y_^1f00=XW2RNa1hl)?3IoOi}$+68)DBBF}w(ODY}sJerEak;)OEZ7XxQQI+z5 zW4pw)t9PSq$33~Lt98l8=b~s9Uczxynhsi5G+vuWV^t}xHiz}-UOLXL^T)@X1?$*w z`JGZeuO?!Fb%x5NXIxrSCNY->a=EAz5&mfBP1VaGoRq++7M4g3HhH(iKpdkMagq`v z0{R{a6+POU+w$!u*V%1GmH!7}K%T#&zWP;c-dTbsZ4wqHq=F$!+J)2T61@wAKycniHr5rBYfEw1=6vU6shw5jmQPp}KbIVy^ z)*qsY{Vy*+O9UhW5&?<8&Q8^t&*<%;-#Toj!~bBv#$6qGV|8J z-1ANR^sPPUxOFDFGtkfW#|3YX6D^fJ@I(<82FKKe(AawHM2z8|DWNucm)ZKojiRNT z&Ol@B6y(#$D0gfIa&yNb(#jMjIr+$p{uGmSO3a#GfW!zp!vZ8i)suxuOf#)vyZHYx z6xvp4>0QUR=!Ahe@5iPevFO8-5s}(~g@Jppac3=TCJW+|Ek`}?h!>SVN(3YV5`j^M zfZT45vIlg$8sX`G{lTAUC_VzxB+gT4>@bHX;NmMg@!t;%v0+CohRNYO_%`wziGV~v zA|Me6A~0~)KO7WcC?Y(WYTLLcW)a4=DkDYwrryQj!0~=}2fce-Xlip)WuRg@3m!%Z zfF&X{m^k!GsNCR7BBBoq&EmZHW#vA|s3kp|v%c|j%pRYCEc;MHC=d*5 zpa@El4$wOVB}xR7F}W#O5~zw7f8+PTu|@K8$Q3TwsuTZ@LPHW5ioEleqUE8rs7Q}Q z^*I?x8KGI#iLa2nqC`L)OG(SoYdQnYouV6r8_7Rt!R z;h_Vsb;kYWhs)6o4{cMtv@=obr~=YavT!tys1u4qZ#*DpcMmiSKzPWdz3(P;k@wMc zz1sl~`H4nvBw0`g0~+=o!JKE^beG?=gA$cGv};r(4;J{jpr5)Th))N~_B6mBqe4PK z9Q3^TVA4h@QB)|xQ^U|!QHd^h4#^VR#1tVt%~fdgSm0LM5gTfN((h!O_A^}w4awtE z5JfBK)`mtfngEn$#&5FfIiNgjJ7Y%esYX=FScI5p+&zG;kyz3#a##z@ek~!V~qqtERSXdzvI6(!4x^qw~NT!1Emju}p;wKV3F^pUu+Gq`9n>FzI zpYJabFf$^3CJc?Q!y(3Xm!B%fzJdJtu6??k9bifw2SYVD=*g(jn_)IFbixRwa;Hlh z4zGtugX8IO!0BcOrqor8VI$KE4IU$hpUHGmZYR8q8RjG&;`!^DqDQOkuLc((HyB2P zYH4wK5o=6IdpSMlvXNYW@EzqhrxF42?7S}adEvRs*+fa9h1tmYZ3GW5n19m8c~BUR zius7?tO7o!R`TdzHPgnlH_pnbY|e4qD}XM>=WDDgLq+)>lVGOW?xgD*j+*^ufs&6_yN=n#bkebSf&va|o zivWoSF5mx6B$z!?;KW16_S(E0=~zGG3wd1~Xm4&q$+mLD&zX%V6XWyrJ{Dd|B(v>6 zXL~F5?k1^q0+yImgxKv!jb%(BHaOsKr3?Lbyn6o=i1_Zkn3)oRa0?|bA_DYK4G>Zi zapmAR8}fkQ@4d&c4g4V5aKt0UV0F}B<9-j+$yUtFr3C2URr-I>AvP}$f?VI4Ac@-{L%$QQ~l%i5H6&~B` zz2USdOp+aNM{!XTs=kv{L{eT$N*QtD6Mm11|`U6OyStp*2o7o);QBZh=OHZ}rQ1}zmN-{)c6v2OmpuLKR8Xle}18iva_!u5x{ z?@-^5eC`|S>|_6KWcM5Se0J~6-&KubR}SV*j6o!`6rA2gJU>55H(G6bZ;HB zHdyS@$eWOZs?>3qG+_c}XGWj?6BQ#s2TN2eRAa|cdce)xNG1t-e|1zASdFqycmA!lFZUW9>6P#K!U_ylh&6y9<|G1hVCGUUa2zw}eL>#E(2jgDwcvBhE{@f^A+5t2F$xuz&QSn_K;^xZ#TY=#C| zNj@xlp$F&PdIKg+%?YMkQMGlVa(_9>I6Ap~4p+We3-wMw=TO#JFyr^zy#g>vrT$eq}v;KT{I`wA< zXtC8(hR1Jv3chFtw@p*w`3D}rcb;5^S(%B*2^}VG)v2%PG2O9o`*LjFxDO9J-HC7i zd>&d~e*hH@{wVIz002M$NklKu5 ziPf<`edVE7Nu<6E<3%h$v}>I<3!pYdLGu!2<#q;7PDkX}h(R0S&;1|{T;M3gNgPFy zurQ9LI?B=3d)CI6mLs3irs>(yNEU>YX&-zvDt6TFW$KGtk&zOE2oAO*tf{>h`U3y; zQ#|RZDaB^KS4D)toDq)@j;~=mS--lrS8hP@#&_^cUBM+fI#MCM9n!D7iNbY{Q1xa2U_>A4r%q7tVG*siGRhWYqY8Sd&Jt+Gm0bjrID~PdDl1LS% z*W*Hus~vk@UjtQD71mdui?~z+C3r?k9WyXx$@lTw>4K~!A~Yf#2~2)#pLr>+O__%| z*D^(kG67=~VxXjoEW#3w2U8cY<3%GrJr&7OeUZ5jVSZviv4^YZ&zGu1k;Z}T3@8dD zpV(V`L09v+x={D&(|EngjCtcSvH0u+1UhZVjIzP@WemH(Im6$!1AlpX8H%et7=P(^ zF+Mv39_@Ts3isfRfBXh-WIuvMxiJXuAMcF#2Rxlj*1Q#W|NeO(<0eeVo`CULDM-F> zA*xptWBW6Y;I#=4Bdh!=tgr3B=9IH>%ltG1y6RBA^#c@bTZgwvIB#B*&Gksn`Ry1V zDmQ<^KDMT$5JhV?VAu8vG%may-=EKUmd+6;wa~o8-CcvHfAAZaFT9Z0~UH1|7U?IBepoFQ_o{5}rs(nf}qkQi~>}hl$Inl_Q)5fIBiP~+|$UirlZqB+R zijPNBTXr75--VXCmZ0a4uo)S)2=y1)vCe9z#Dx-uqcS$ynNU34RI&;CsbW)xhaj2R z-vz%u>Zv@&*;<3<>Rl)?T}f$EB2r>Z&;}f^&z=U=-G4z(VHqgPk_0~b?zdc>8*tO|XtlcmRf&6qBlEY{lbf67< zW}aB-ok zHE#xOS!na23D$#k(S>3Bf^$h;1g{sl-2zCPvJgqkH#eb&yG)XO1JyTb?nc#2+oJBP zf4^J%dz#SI+KG~?BrHCEF@s|oVNy^E#lh_8uEmP=tC?Q70Ua)(x)mofj#Ee?#?8M1 zndHf2D3nYwHytOSK;Aqgji=lzm_$xR^&UHi-wuCbIwiN_VBulMdQkOpa*KFQdf3w} zRP*{#Q`gSX+q+>n@B~lp?N8Fx1Dr2>ZjR}FTTrE62t`x|#-xvh@j@FSA}y2@9>A5y zx#=}ZH-ccRH6mpXKZ?!v!9sN^O%{V+D*eL#gU^xu<5b&8iE-g<*p5#&)u1sDjvt+0 zK*t9X{E*pfg93?VFXH2pCKQO|)Fe&=n&9a|XYF>p^GO44xpWMs%pQ-Ja6O`@FGR-r zGVCZ{iTCz2LdUpiJ(jTuUpOC^UzUqNM+J)P?XWq@@aFOjXzZjJ0u2d6MRLOt6rab* zR6rf*YHLGveJ$!LOR;Br5%%q@hGQx>RKfl~f(w1FLpUCN+%T5zq{Mdvvk5Q}btE^d z=05vVVbeutrn1dg``LQz>(--t4Cm0^K|F#x3p+(x6A2TK6IhNFyPn1(6cv@>lbsIy z`ZrUM7;k_{X@y;PHqw9mckJ9-$#Ia3IV4VlpPn1_h1*b5*$PkY`Ix(K3^fR1EC?@P zB|@13YLHj+fwl^1p4gasX+KI3pgEE{H;Ac-y(dgR#3U)qM>zkIPl!3Uce5%sqXK{a z%zU2OgXERZiKYyWwidKfc_Eg#|3f2Lu;)mfl%VSEn zT(u}?uou^GjRJ^xazR_pTEVr;zqoYd_Dd)FBJ*)L*W?vs-v|s+3K{*alKcE z=9R1AV+s-WoW7sgH#zY$QSP31K7&4gKB6fVi=}!{JnYa+ey;08V)ygdRnvlq3NH*k z6XwmDfaqugW}lOa&#E1GbZaf{DhL}S>Qq{j5SFgPJ-4jEJ->Sbm6x0k#SIrCpX5=+ zCD_$gf&IHT;%oo+7^d8GKjzJugh@xC{9=J{IqMOKod{KkJ{bA>P-BMp#6cp$3E1pf z5*A@cMYS2FMg0&U93(78LF)Sojl?O+GU~WQ2lrgBf6Xz*J0$`?p8Nivv4~*|LXjIS$SA03>SaJMG zD*`1w;wGoVx=suC&KfFo86ttN6Ftwu+C98{rM$Vz0t65ghoM1)1ep&-eDKX0qRwKI}2CW48V`=KHn zK57}bwab-{gs2!K3&JHP8Eb0LzA-1d3xB3vNUm-&CQO}(^QKRL-Awg?VGJfrSpbc% z2mXIQO;2eDZS}bQIGFdS-%Z3vv50cMA-J@)5spNqDBZOYg`3vliC5Ple#R2yWzWSq z7o}iaKAnb+ByAG&mLRR-6c3Dobbo z73bPim>I4_0cuCu%kb7i|A&{Ib79Sxga_uvLw9h&9_pfOq96;jQ*=|b@8K%05q7L% zUgyieV7*6~P6l7}b7EJ!=QA|d(oPZu$Ywk?1N(+rX@Vhi45l;r_EY<5FdbHpZ_kbo z&i#ifAf8t%*1xm{TlX@J)uL2vFAYIn4%Z@^iIOH^6h4GqDxZ(optzk*G&k3Qel=8$ z(JMJ30!EEL=t(c;VNGzY7UYU+ILDle9`{`VJ) zP~XULOI4}bgt++dp!1S=>T0bKi8%$Ziz**#K<_7#FR>1Yc~x*Stu+oY&thPh*|Ozsu$0~xk=^`oY{MGV;CbwCuIShFXFD76}Wh5J{HUgLGd4djkB)1 z3v{^vn;(bqVJ^IT&kcC2IunZcxp?H} zrI;9Hq1tJ1dwQj75uj!b4(^zV)Id}MF6LOP!L~vgl4j|s%HpJX;0Prba2+KrA^uKm z+ue>!Vv>R$Hf23rN0{8zYzZJbRDpshd(f6=;DyB;LC-;ZJmy?=Cw}aC3@bK&fFFKy zCmwnJUW|1W;;rYG;nn4=MypyC28QoJgb?TJg&79>TxYmC|FAJ6b`|Dc$Yy zDzW&+n{nAqHzRwX)_hP+PUsh0SlgTG;H81PJ~o@Sdj|-FSTGnD%oOTJTTwZ>yQY9N z9{sloVh7*e(g@_tVUSiUqD3AaQ7CEEnz+zgd}!HTjdAx~glsy5*k}YCJc1s38Ur^k z78?(qfGB=%J(9G^Pt$^$eb~QaE8e{SulUd%j>L(SGEbe4pa1q+B*Y~k+)h&lD`T)x z8!&7?;~W4FwHaGCQwrLG;(8bCjC4Pas-|!Tn&q-`425fj#)yRc^YNX#0@%7?8=m^{ zEl_faVbOaAlIScezekeT2|=yMmaqut3P@hi>qSbUAi8P z42;@a$pDOGAZXHch>VHB<*8z2vXNfqQ|#Qi3vVpRfIVyyMk+I)wUuM#;TDTi+W4^; z!slDN{4Ffa;>L&GA1$%cb02*J_l%A5+VEVI}dPf*Vn_-h{wd zcO--+poHnCoWyHgh;o)%g^pK+ZA&6F{6>xv!qIoQ2q z8NU0HN}u=j`1_61F(EMo9=&L^)-MTR=`uWd*KWMDU@^Yq`FCb+yon50F3YCDCK6RMb0EBR>UHH`=wJrBCZYHVM%0NYGyD98^$6LYTp zWUx=SmOB}D<2s*6Ot^{wXWy;ZxOo@;@ZjC>wHGnepGxJVTX5aA(~!u>y|ZHmY;>{I z5u}*oiZF9@DA{XkyeINdWoGF#(g-ldo6ljSp?GL{hSK&tg5Cn#Yal;$JltVty^V%Y(WXpdY zYB}`>6{ecvWBB~(*RW0#51qe1u1xj9(G}0*<&9UtFFFOkoj=rN747*r;}zXJ5R*Oy z9{v%uYB;d^l|NzkM>4v27yu(5j{EMs33G-;A&{2jGdLTQ9`5J$HbtOz8Nl3b4 z9@0{cShebHWR_cz=S-r7hR>oWjXN*06Z1J?9l2Sg-H2rTmH`67*K&E@H;oK#)HLLb zAV%Zqv#E=u*BFhr3%OPZp0VgZbVMbVOW}tc>d*|AjHry61AaV2Qqi= zq$M#AbN+lQ;^B_cJ^Qi$sU_T`+<@O*>4`A^wm=gFe8VFVRF)5O#da*KPsY@1ry!2W z&|}7xVe#uP5bKNTJ*`0y+H)P@3A?%k_oJ7x))AHM?2cGIX zuCOPx24XyY+2N{JI;m%~3Q3E}2bJ-gjW=ltEax(GowzH+v$~ zBzgzA5hkV~;yC@|$Btri#v$&6GD+^If;o9SExM=KKYm;zxdRaZ?y7q?Xh`b=02RV<4kaGcXI?XlXY8!WrJm26Gff-lN#KsTq#I`(=cTrhMzT-vQGb9N^ zB78Uy#8mSmORF~J@(FV^pGt^*Mp_8z4!WUa=vXIr_Ehp}imRYz zK!KXkhG)2}>r~PHi&Dt6Z3;4A%5{E7DlJE2D~FE3j2z|Yq2+W5R%8u#KiQW2qI>qNFNAe z)M(7RauzBJn&2N2=n5XWs5eIUS3`9%$0GH!tn8g19o;viA!r~`YgZjp z7_nXF5_jT?5N%htwK|vh)f3o%*n;8H)8R`lAE8vYFHYj88Y*(J`nx6ge8Db+4;h7# z)0o0&-dMzhc)RFWl$4=TtOY&jQ`XvIlxOe8xBuOU!r4iPjSE6ttQneWn#g>kHpd6{gIYh&6A|$I6NZH2TM5@Qr`O<-=nb@IlM#85$|b zovWzSZCbkmJ5MMuV{{D0&Y6r9zb0fEi3Q@?Q4!$hBF^n3rmh-9(Ej<7o#-27WDj5j zu3Kjz3zwac6~8Ch?rH6!H%Flh#L#K8i8o?DsV&6;Qn+L@m*(EX6NyBX%(^P!B;NNJHA47O#B*s1v=mOiG;d(v)Nkm4}Wa0gL@4?Et29%xUOjB4g#?JpM zp1PU~f9D;NIG60$Oi_=2J^U=z?Ds;k?sB~U#5~0K7^v)Z?s#Xun4_T-wYi6|=wHWh z*+Wd%QLziP`_|&6Rqx@EH$!mmwc~NmoMgHKx+%i#sB(iLI2JMCHtZ{}=R_puE;)v# zaYl`GAgAl5jd3gWz z6nN3<(79VU7*SfuB-yWg{5{GlQ!v7uiqRv7BPA{vI?@dYWvn-)B6}|~H!Q`*>Qwx0 z)_9DW5RX8;9fJm^L9yyMs&kAe;l29O6?V2c>9p%|{3=O;>Om6Q_=rY)$GO(Y_C>_S z5>U_nah3|3%XZ`N-VOM_k2Yc6pB7-!uxJblqz6V`jDmy2IR%@k5X3M~X3rM+^C>&= ze4X;nbD`K6xAu+BKeZPQv6yZQC~(ti>9#c@edewB6D^PHH*Uf2URr^JC+ZPPH?6T9 zBXCtg7Ai?HX{AL<$u&Zw4~CaH0Et6Lys2n*DOv3~=!6HzjZx5EbeF|X7=gH`U_>#A zx|&9oNPh)98hzn(=NcHuyq#>1+3bNJx}R+soW~_(z=qunA3X@5aKpGZCPiKq`ir@b!NU z&#ib1+XJn{Fh$~us5b4p?cBEaCPoV6;rr+A$0w%ikTBnXYlD?o`raR~Nc#w~(*}1# zRnT_+S>Cyb$kj#!aDu4ep&ew$@5F*Cbl?C+i3t{A0h;zE^?;3tS&>hzr@7A@<@>Pg zi!ZTk@jBf6<;dDoZP$4#(ySBj^{R4#7BpXp!(dk z_|3Dq@JSef-@Gsdi41z_%4#mt1;Hldid+e0~W? zjtPc8m9DdwYUFP@h>Xv7qh`vlkx1n$g_~I=gIko0u#(Yo<{ zv>np+&b2@!KG$&*kvMV`X;!QlivOV6a(V=$(Hudq4l#Gl8?kv;F(OCkVPmF{;w(AR z<})&r$;>-Id&Qc|m#|A{8K|S7+qOlqq9u!*i#4nGe+ok4M;dyJ7OhuLYOr!ZoTc$JfFA#&e8J^_QL zj6v83n@|!N0!vU7f@l^ydCWOCjyo5%2?>+9>+4Bft`0!qce?_xWen9!op}X{oXa8K zxC>u@_%5PN_aQFW8|EIH^ceD-oky1REQH*i&WIH=0t|kznSC+$n&VjZ^w2+p4c1VfDSu-$skT1pr&_c9hKlW~1j*7xumC=1??c>?G`6?Uh@C250&MR`{DS(VrYpiqd-(Kd&2o_Gd+BEju=PMO>bz5M?d7u( zXZ43^)lRJCMEJow-{7uWr*H?sC=HjT@(k^5{YhBI&ZKt>D~gf3BVR^wNaf5D&~c&? zmc{N$Q+*}P^tGI9)vkr})TG( zJ5J=pG4Z|(?sVgnoFLYbz+0}KEmNGJZJ?X7k@p%zpfs^ka%(l}OY`vcdz%_d_tBPkcycj;M|`wg2n<$&Shb zpRbx0Z)ZtSOWzOz7S>7jTf#=+^rTV1$Ji2e*1i$ld{&VVSj(3P3(#@LE9)e1LvRxO zgUgU;`x2{HE{4Ym4P{w|`lwl$Hzo@H9vo-g)ZMD7pZv8&VHeNnlu|ErJ@LILEx)vU z?&-g-pr5m9OuP!ydu4pK7?s8#AR-Y{lLeT)ccsg|%u&g_Mb)S-$)~oR2fukTR|*c1 z&!)xa$-e_45Rx(iX+*|uNu{<&o*=KwT+#+hwG9m=4*I!`E-hL?*MMB_iP%vSk)Zw?2`L$tTPqx8 zos00r=Hbu}E3tOjGHegHAOD`7MuI*@oG9(M;ei{G{iio@jQMt!aVH$+MRyQE zI@fyg?~}r3r&myM5?nppvDK47*UJ7PtUt|7{7hEsdO2CM84l{^Qt?mLaMllk;=h>- zZc)}&EcpC8xFt@);H$60q8HwiQm5QF~g5zke(ch7-636Gzh!8kidpD z^Cbq&$y;f6pilF14SR~su#L`x+wpMg}}|=2{kd4HkARz^$sphRCEN4ftG=?a?Zn}gSeY#`x*5m z(xy}qLhU7Z^k_wJ(|f?JjP8}{I+Qm!U?wI9q#3BMV{k|{T_xi~=&~fkc3BQ`_U**` zpXTGv_iiCkW&pgEB6nQ_vNLm_4fKb%SX580img^_A+wMe=8p_U%+RSAKeZSKwy(wV z^;@xOR}SQfQ^;>;LtJ&U#I~r@{op}XV~tCZVzvvXU{P0*lS{?m zfqFDC5=XeTwZxSwsBnpVcUF=SH|jizZDarGG-qpkBS?dhk0jCtY~1}FzB{TWN0J|W z=G=nIhXs<%_w(VOgws9)B)x`JWck#LH_twMC&zsl` zIZCnSr5A80Y&@K^jOS5ta+KrHhDBJr@JqbBFAHfOe}?Mm)1VxiPS;k8A|od@#v^zL zZog|Ve4@C(M}>81);&LWd%kKRmk;wWg%6tq9m6;;Bdx-RkA4i>&#y$_PbVV0NBy6P zX30xr46`+Kmk!XG<*ZpTNz zzltDiDqqyt=sbgW!espF_s!V3bq8K}{BA}Ge#X=-VFcxOuRMym%r&2h{wBtac;`1t zTI)vMa|7Obc{{4}s*!bL8sd3>`CFFY(3UJ5l;417BI#Q`H5-Z(&sv<8LKJ21z|0$d zgHg9Vh3R9{Flk5>46d+GBZ87A!QDR!Pg|eI|2^^t0;{jVjrUxO)EYd zNu8Xd+qFoz5H%X&3;2@CxklP-hD_T|EKOPAW&XD)KS$ zLI%Ek>3T{C*o&Cj1Ni%Ei!kez>!BuQ&5iD$V;dJ>k2Mt&8R#%`C@nM!!D_|P$iAlQ zsRi}|-H^c21rNUriTXbvzq%Uh4^|*K-3#)HEVBJ);ltx{+&dx)p$zw{Ej)nDpFWE} zI&Z>1ZXAQ5W*>wNpMgQn2XQz%mpS{$R!@$b=Hh+Wl2e3*MJoJuTntRjIavDXr}*^a zZ=t;DF$5c^I93%g?-`YsyzlV9=SEyLOO1OYL%Y071+gyTrJ<7MLCcW0e<+g2&&3^; z6(~G@6x+Ug1dFrkkZ%dZjZeIf`J)KBXS7sXX)HdDh>0Z1rN;-2RUHM*E#2eRS<4Y^WzmYy;_Vlnh&w(}I<|^%HDa@*4hIT8)M& z>F|mVM>z4IKc<|k>;luKBX;$Nh-lb|)qBd2Fx-a`?RBse?!iBgG-K+G!5Enm#EotZ zw!ZsIyx24i?u-h2^Xfs!T=5Y$lrxaRCm2`G83r$UCbHN52YdDv;J~EcBAuyPJWhpi zx^AzTfdi%0wOHde1CKxW0Fp>qo{PK(Z~IiSl0CZk$X2Y&tcRRQX4M9! z<`^~^qe;BBb;CB4RMeuH_<)1z15o7a}& z`)wXjtck#rGsAjtF%6<8Uk)YBpxfX71AhMKJPeBTMgl=?2fx^i^jm&U9;Z>565iSL zE2?G`+u*A(*EbqhCJn{VV2^g@YcZe=wBk*I-ZzrKJrl~=89QtJq86vXBa~-h$@0zE zx#oKuJbauxP&Gb$`R~|2WHe&JLNGo(0-;mx$Ip(xgwIzbZI5H#b<+`QHo>RGe;}I1eqf~H6oaWZGmoEYExZy!xa$-e zU3Y~8hHix*PC!k2NUD}pb&_|ayECNk&s_pCG>}!8d8{aRKlXu6o6B>*z(uXWM)&u2 z?58F7@%Im-qPz;LR%WBoZ7*g|y9N_zy`6RgQ|3^4_{T>t;5WA(L1L^L;lWK`nTp*Z{;G*6WFGj3}+CLrlKXMy( z(~ZC2;alLmc`gc9FGFpU4AXx1DsD~>V)g+!YD($yI=%`AoU>5J#L_ZGgt|wJ#gl)h zReRC9_#;=~kZK($A|LCV!wQL(!?=6AG_5vPW)nefmfe?;{ zBE;VLwkyi5jRvZF5pez@R?OgO=F0~`A$HC~5r_))#e|}ARMa$cUeLFYaJH+Yt6|9X_*v>ic!!1} zg^Iw*Iz&{N)`X~$bMe5>u!JIkNN!LWT!T#aRb``{~!}yd+0_eZkYooX(*0=|1E~!_bjes z&eQ}FV>+3Wt}Jgg4mTvgTNO^r4tM%*b6W80eD_)*v!$V!HaZ#U zaV;4=evDMRJcoJ)?>jRr#NSBA5?aPyWsl$OXH+T?iW$G$rwexzLTWZxJa?CWid3nJQ=yPfyx4VLj36nhn zqA+@f8hJJkT5`G=l>(2U(sGCA%`_g9xtpwp-(Uq|X%hE0k(NOa&9Nh^Jj0m3Z9IH} z3sAq&3ccQmNQMp@yn--uY8Z^dY~JqLJ^3h8GPQ|!I4+;d=s8Bfxd{T3PDPl54gLw3 zGLz<3gEx;klSDa*(XHS`oS9-bA&vyWO69^!fPvbKx*`CYkwwC=a;7JA;ahXAR}er` z9X!k-NSk^SQkq5XLQ)d=F^d72szsoLe_Sd7um;>%TZ^3~+##D~@bpz6B|QzZW{^OT zpY>c|Oabw@?3UZmKybB&ld8ACZS*qg_FV7g)cJfWD$Y}*CP3>Gh=M97*}V;DibzHP z-6;vPr!%i30o;se(l9hUX7u&A6R`*;NvoVnms0DEq0{Fen=qx4>ITX}2VZi?B_s_; zBw+=C%)M9r8v=+WblGHA_)_&y$fTw+Qo;M*+#A( z@WGJFZbm@88=7?fjDq8L3Lk{0j>A|6nMLy0aPs3BG#%3jwYB5i-ubi$Q;8i%H=THL zTql1_k@3dQ(UnMla_h9)Hu>6$R%0{s*4_K26^q}z5y^P(q2Z==M6Cutd5An?p%j z|CYKt+#Y`yKK%LyMhcOKqnSGho1Gn%E-XPMpyC9m;ch^P)81HzMn)8sSJrc4WLt@S z636)v-}IwA5w2@HTv^lwK8m;9ZLu>A25*+HGlzv*Ym0E`<6AKEy~()s)=BvN10xC8 z?Y3I!hjW&I1N+{)4XO6 z48$3B;6l65x6`S9R}QWw3z@*niAzzyM(zj|sTNG!fawMMJ7-{#4y2KQ{~AJjJ&AE@ z;ZWn;Y;S5gkNLr@#I%TW^-OMUFdCqzm8Fph!!1?@rnGrcI$hgHqFy)7RV_InJN?+h zKV6ZI0#8O&=Ttf>E;~*O-DyMc;ju{kpqYa&p1vFbboq-dxSjK-rw6G?m?}yrG@_1X zOC<>ycc7TowcMHpR8@MAJ8A-ggM4X8>C_k=FXmc>h|=Za*xhs@@_q{Fjh%AoD&>kG z5^c0thzVoFrJEiqOBSQZHe>XxC-MB6?HHdNjwElP*frzW58q%K%%hM}N zYVU>U(;C;Qt!MbNYuTMT!G$?x->)n!MicMB!L_KFiibCYmGr!Kmomups}rWVQ3&NodTpLmF;AMBYwa>)LVZD*QyOTE_c7MP^|&HUvC~pN;h9 z8YS}85iHLr#bYa8!hbclP*EC;SFVi}C%AA_A}?eOgA+v25GN;;HX^Kuvuj`g0G}(@ z2AzR&mDz}?W1dsG^TgI!OR`}R@$DwYuIudn_0Q?%f?l_e){jo-)RE)EM$lyd-A2CD zf{kjr{QQb>t#KEQ6k8EZP2P_AD52FIBe;7-+_pFaif3nL;T`JPu@&z%gD z=CWpio;m9R;)+^hgqL>!3__6*a{ynbt`^I0=b1x*`vR#j5Rq-oCr8O{`IOZEIJb;L+(xkuztQXHXL4g@;gA z77K2I7>U=DGo@pCF9CrdYeWtiddr<7Atwex;DFBB=X-yli+Bd@XUtip6)!>px-8r^ zC^$)b_%elvHzSca0>rDMm4T5;p1v-5bXi9qeJRGenv0#U*60eJ5Y~M`DRRm{!q0>~ z=m?$Y2oMl1Am$P?2XgFFxgtPUY-C(a-mMdW#@+0i^DgAA39?)Yx}$}ii@5;l9$ZC` zGA)CVqf@A45I5_Z^w@6RT>Cl7LFM4+l4r5hK8zH3gaO z*@^(si>a);=}cf^RfHcHOk#qUqipADlLR2r8x`?EYLzm$GYDp~#J?q_XK76yBOZoIkRi9W00JFB*4(#M_;xBCy;{uZ!px zyt9^dq22EtK5~tNEf##-g+)sdcw%ly z_$T3SoeGsSedl$HV^??nbINtP@Ok_5JSa}5w?(DZ!(La7V@nR9=2vOdVEG{J4390Q zS&r<`I)O$d=+3BPh^pB2U39HUv{?)U8F?p2ZdYCgM|L(!h$i(FYke>Jy6D(_()`oK z-u*YONw&MGq5IP=)-S>WX9|vi-2NZ(?a-}Dqe0}^=eywk4Znk=}(chVgpvWa(T zTs-Zp{_=&GCK<)Fp%z}zYK)Ha?{?AXFD*Xb?GR*{y%^%>`|>}sKDLl&zp zh;#c@N9AH{uSQ;tgE&YNk_U%!qe!K$E7u9B39Qve@Xr@481YAcghkS=xc@LhuDq7+ zS^e3Qg7;cpolYRvS+lhqKYY6gE52ib_U|_HfMjgR$Yub641>c6*k_L_J-8S}azE4$ zzX#V`b{TwpJ!llTNLv!lLlj@{MSW#hT*0z!0s{>0?oMzC?(XjH65QS0-66OHhv4o` zaCZg`?ki(u>70gTU5vDmlEDvN+b40X>Z@=!#)iHx@pP%zi zxEzW$J*;E>HKXTqN;-=pQXqKSLClG6|MSNTrig=*mv{mk3Rd}6$Q?HVaj!QN7 z!0h_EYv4VNG1Jrm+VaKw^vXa5!$`fyOub)>LF1KyIXUL2t-%S=&M`cCIwREs4+-}-U9_=hES zf5=H>l!ZG96dJeblJEh^9r{jxLE+j$sG9CEiLPcF961pfVltp|*n(Ooa&87Cv^ChZ z#OX*_5!#8Z)k*4x*}<8=P?66All96ekLRA3IufStn|cVh9+qex)lr{#?VV;rta+WFX!4NT?-e;4%2R@Yfi<9pYE(*fTO&;lr9lI9-W$RI;Dy72ctIHpQ z23J8gzGr$=c0I9E9y&fDo4*J1H*=O>|0qNR-zXy`@_emt>BqpJsOtTRCt>?Kfx%d7 z@Imhf(7}lPX58=2fY~5=c-ZBs6UE4Efy}+*3MgG5u4@59Z*(;yAS#CH6r+HoO<#{_ zCS@xRimDyH)AxkZLmHGUv8QCxLNVKT0nXCFl@&|N__Lw|v^=p)u>96wv201bs)ph+ znz2sd+V9Or41gr0xbGX?MlB_s~3`G%9{??&8}4}=rJ!ldJE%u1wvUiO65KAJRwVJs|V zkJhC_K``POLohO*Hj#mo70a~y$c6G`VCd6=i*A~GL0ZH0MzNyQsgQz1bS6*T)Zd-u z+zq6X>#HpzqMkUCrUt9)FSaD(DYHq{KRXr6?=LR0GS#GS$Q4bc115t4O%I za!uakTuvctm8VOn&T3+66#d%O@d0h^02k_DL4Drh4Q7-M@p`#P;pv(Yq3sKyB!mSJ zq}BhRCs`0$cOh+#qN8%2`G%b5(!!UU3BkA`%%^fICq{ zhb_q9K$lpw3Pfp8wnFch&8bs<6cy|x1d8WGhcKWnv^`)-_l(~EtU*lvdL>7qbq5-G z^=^E5U2^KZ(7%juUfY`dc#~k&`;DSNY%(GNuwDTdzW2ndYQsO5A)ZG6dNkM}Dy~dd z?$~6E?1U?}?n8qz93%Xlv>xpma_{_`fNc}Rb#LLe{Jnd^Y>7T*7{uZ;%&C?a+*P45 z^gY?mhQJ#2{RtEqYqd0V_%9)4MhaP`W(A3GzLRjWVt{hUG-&2fSL3qdmk-nT5Qj|b zsgKId`Tc(Ebp88>viCkdbTCtS3S1K-N%g>9KEe>p`_vbwvy#hRAR9ZWKph144V}er z*dEO-3~gQXF=lpSpF*%7qlW3JC?J^r#s%};Z8i!gzD3|e#MNb9>vQ0R(4-=ooEJQ5 za!yZ^4NkOVtcVT}bs)$1=j`7^0DT7_xHyRTj?7affm@C^oC|_Jk{%BEa)BW-ym}vR zI$^Uwzd^=w03yDpM>Si-85z1m>S^+nZz5PP#?ex4!k9LNFYz-;FH&f+r}5&EB~N3d z3IO;_JBx0c!80*>8}+K-NZjP{Y@Z+^J!9&KGYB9nJC`*FKLej^53XE}axj1<{(a^Q z-P6xZF|HSW6kVgc zj^U;8_XcT)g0-dIb#+WCejA z*3{Mu9^0CosLozcI@&C|42Zgruy6R!uwPfU*l#thAL*E5zv_*8Va1WSPQ=Xc;{wFB zyB+2Wn<{}`zRR&v#vEvalzC2W;zxUBKyuQzIH_{)>Z!C*8$;eex12{{qeH#@;O-J> zq~p3DD}@0TBb@Pk`aN%=-6l>y4W6Y(N`C zSBLles%S-@84yBMt4Z z=7*oMwM}GDtuL;|fBNVcJ)RhsjF_Yxoig^)T2F(QkIE}5eiJ!0bBpQvL5Ru9h&y_V zNKf~Qo@>aJ1W<7{p?a~?54ZJYw3zBJ4-GvYxMOX7`9j+#DI%!iU)EVf@@Xsoe=&DR z6c7OGg4Bf?g7NPCV34^3yQ1>?2!F9j_YY5=evK}&SYg1V`I zu$Fr*@($hj@<6?rh<8>REI9Xro_c}m6G+dOCi9{mul!TK)<9q0gUjua#sTLUr%iNNr8cDJAewUx5uf8c9^wc8FiF$ zo^_$plH6xmXai=fR2*L7c{QpzputO{4>o4E*$DdRd^^`!2USD6Q z)p)~jpmX1pq?9VPoR5};EP5#80bWYve@8$v=xlLlIGw==Db#siEWZt&M>I}F@lAYu z%nY@faSyaQl?8zWf1N6~R^OLU2g^JO%{KXeqZb+UZPn-a1tN3L&XlV2Ix{ob`(|)e zZ^&mzgYZ@Nb1!eMSzfZO?SGU=d(z zTqX0s|H}PORYG#cT4W@E|50XEz9mIhndSo6fej|@0wH1gJjMUj`*iaQGR9hT%ICe{ zFF;BE56BrfvY>9h*6luVzwSz zSG69WI?qYwwD~TH7eh+^|Ihu&0(?mW0xCG5;UkEhNz{MlQKPjU1C;doLLaiazOjn@ z*RB6!5bl45EK{!LYE7=F-g1#E6Z}6QdEJu#!Vx4X(R%!>?U%et`acno2zYJ;K-PlD zyj@&XP!~)bOe-pc!9B7cKl~XGP_$O6TuX8jko3X3SR}yy+oVrSpR?vNAU!xFP1&Jb zob;ng5Wle`pqv^=KKjE>NVpLH-fS#?1sai|F!<@1QKyLizxJ^ICe;J2EsSr?MpKS! zt#BM|zw{#?Wpsqxz^;by=!;r56-_>I14i#Y*@PWc_Vh_ELT zb%87d@?9luJzuWg_NSAF6{=Y# z{?~atslJM{5Pu6(E1Ymb>KLK~G4#tB?C-)VvN55DysKn8^Hxf5ofiEwp$PU!^7OSV zgr$retBQ~`(wGNB14LNkR~HwTUlq+gpTz3hf5AJ&AYz_Dy~B8FZOhcsiZ!hL$~D26 zY6bVA8cEr*cT}|1{<0;Zv$EiJ`gRr`Ys@4amQjv%Z}m0thprIWQez?&foi4L@lqyU zt&+J6y3pSj)bgs^PzLXq-80{Is?~*S2$ttIieJ7@RqdPSd`v1e_rtVr#I`}wAQs)} znu)V~(9<;$k#PZSPnF*`3`ln&Kba1QiI~v@Z7l)guyspL_;A+kCA&%v7={x3&5{QG zQ)CF3SnJ>3Q#d7pMrW0aBPMncvLMKxo~UXng-l)OaL%NTym7ZL4&nI;5#{Df5x<#R zQ5aHk-(aS%HR5dsnU}y77)Z<*y zgrLTMp)7E98^NyvW~Nu{7j#?=)x_XKuC>tiMYV{jB0?;yTH)exz#fp-gnqxgitVp% zqQFO*f4^3o(*57{!Z3%T0_ZMeQe;$HF_ZXV%^{tS?&g~nAtp@Dj2h($dfh2TkmUeh zTWzk~h{tKM+9cP<%;5A}=UlI<7Z~fp0*B6YkG8r%K2oF#DuOAez2+~%WS>e7&P9L@&sG=f*QY0VbHUw*)3MPc+P$%rPO2JEwCL$TT&&L(ij-AIn5s$&-M8k zdkxuoH!#CCcQ?ZA_N6R>=r!_)#ABchW4(%rhdfMy>D@4l_DgEzO{p%$I}RxS5MoysVZ*y z^8wy*`|8tjb^fE}qt_Yh*=>$N>m+z~&!RF&)!07~CZT+dhTFjAcfXlS-}cN~^upO+ zpV$7CgKmx_+y?V$sJO~U@P90lr5FyK_GKD!R53Z1-B%D3&cM~ZF1l0@Uh=+~QU46& zwC1#+$M3bq%S$HXVf?__d9GQS8|l!`xeH8 zHV0;(&$_S9`TO2iT85~huV-i-SM^M#Z}jwA8Yywc+I;2V;(e^RVmv4^WFKf-c^ARYQA|MXt){tR@c~&S%%Z zIQ0<{Sn@qx$=vAt)cqGoI3f91{-j)GmCT@uW-!*xZgAY?!RYx>Wu1|4mKC${ZSy|o zqo4cHQWW2p!@3Waa3YN14@)FVhQ+Gf>&!*;Ggm?!{&<(5`t5K?#QLeU)g^WKw7$iC`*SB`H+q6S8S$w)(-KlsVl`?hM=Q! zP&cnc{?^n>8GNCU!+RUxXsti7+7^=n<8?mO<;_IRmaS!1C3fQJE%DMC$1<+E+i`T$$W@N4F65lBUB*-o^a^wrB zWAG|DZ_PEgR2R>cwg)rOVvm=#WuwSS`&z(q_jb2_=i=Rz|}DGBx_1x8O3 z*@&j8U9X6X1yv)$@F+@Y1XEQ)aNd>_Wo#@AU&-c}!aAOBDA5#pj^R=I3km9T+trL- zY#>+zd&uTchqy3B!)w*xRGs9=!Pvxk2kTYHaP2o>4ULtE@v|=@I7Q$*!m5x{hMPe* z49!Fp)W9}>s4X2 zb8pPlRt&+H#{7LJb#~(C{E9f_wtS-x#hV4qvLAjq9Gi<4AxecMMnivizJcRp;!U?U zYk-?}V0tNocasvR&kygeV%Qch0y~vr?3IV%J+JdTgN{UpG2q=pvq%$C*`3>k9B* zv$g<9Z>wjo3w&F!tc_Qklq%n#w1Pud zJHM3ws|XN-vB~|E*lx*gQ`kt3(J^u^Qvhax~26G=@vPxi#4er6D4N7FO!o=~oqOBsz zTuGoJ9UEX1xZ5)QEJ5t@Q*<$@`*XS=8|b$He_sQOLo4(3(lCK+!3JjnJp;X;?&>)l zydj&+Cwpqd*tQ=&7D-%%NPOMKCCZIUajn;*6C|>{paM~pXI_t{u5Q#*T7E1_tg{jW zOiwm@^!3IB8vCNd^xsfRW;(a!LdxgN!c%@%Nx{od#ENBMaWLDn%+@J5{7%Izh&|Y+ z*i2uP6$uWXArI0r7ZCVNgtd5KkN`nKKMRid8rgLrdcvgP7L1yMQb_PK=nEYwJoh5? z8@XhjpHz=x*wC>Kt;d5fZ8;got2@T+3C3D(;C0-ujj zE48lFCwxAsJP2~&g#W6UeAI%uy*u#xzQ<8ASxS6I3F4K@4O`vFs?QLlB7eC&C-e>4 zWo9W~@6Vso3ng^)Umj&QdPQ&E>2e4-n>;!vrQ`BM6@rWzG(|2;XWW6I#*BV#WDGAZ zk5v0*jb>&&d>w~iu=c(ij?aXP%p{r4Vf($LC@jfMZl+-R*7@By6d-M02wPY4N4EIU zP?mU1x;|e0ld^|U7Y@HF=?6=7f3OETs7rFDbjv@8==u(}&Sl^2v78HehZ2LNbOQD% zhB(;qi(%Ra-Y#T_p-6J+$@(>~^yS9!MXmD&#py&rdBzae$_1VWIelbr`iXC>iZOZM zF#@QOfmvs3w4jv4;&K1+AmT6G+jKD%^Yqbox^tBqJU~6Bqm9QN9V8PcT+90+*}VFo zF=$T$0P&p7rSLp&41H_caM!Z>aR=T??{(hOwgG!}_b$uv`h!J=g` z$KQ0$k(XQi2x(dv3t3{ImzQ#P}0dH zRO?!Ep$p@?*_(Iz9!5#|NuwOWLXZ4)WPvm|l|L{z;@0045g_9Ul^;Z}Ck_8PQ{a7a zxZHK#?LNwd8MncM3;m8$a#tNXqZUoc_rh&CUL){hPM(pU4`2B(e#`6%vT`dW3h6AU z#m5&fbAu%BvM40&!SyPI0^|#GZ?qQ3zcUy@obIp&7c4f{mROGy_kNq(@={mI^xcIK zg~xM^nVd&hiRqb|RS1-{{dkH03QA=+D9c9|KM(WDDHP&lg6R6520TtYk1V9e3>kLa zJ=aIM;XJ^B!%y}P7QmNEvl|Xv$U+iW`qf_JB4%La5kcM*Kfvd{EJ3-Fbkvx9hzR3|aQfrvDlSy%9FU_z*dP2(Bv%x^S#ePd)xO^suaKxP! zHGH9kCb#$`br`4Ml*qZb2v5>?8phOWTsn#>?eM8I8-X%QDlnALoeb$}zXW0ddK_XjTud;L`NyRCv36e&;W_J^8fND}Lv{d;}8P?>zr zAY#K&#Vrt*8IRbRpN(~~fQ%k4G|;GWqYbnD!OUQzmpK}K#zi5!-07Z(p&6}Jl|TXy zEeufnwGsQ(c228O^_gU37>N2buo{_V4g>=aL_#GisOe|4Jfe!0h89n5BM301xjZ=D zuy?u-{8!- zvVfmHW}uWn%O-TuK5KB5YDcn4LH3>K2u)?*xiwVi zaOiB6DCT!egapnW7Ei39r_s8~CKRvxp8})-O%w+f^Ru8l@=ymMEi$2KBXjvz}8v^u1orXuUJo&qemKK7oWHlRYgjEoApMIl%MGj|5`lzZVxI-VjeU1wb zBL)jNH=plX-Dt9xTs5q!5RlX(zOsZ;jCVuQ{v^&#@!G3}DC*?NH1`pSh42Z08YX5S5)Wo91it-n%TQ}G z%;lX?I^3xI5e%F(r5C%F!>napB(m#YbH7c|31+r_E@tFLRg^Zj?XUV$d zg#6vGE)`E)(3BiO+Z2n!b=9UF<=(AzbwIZpuT6-WD26Q-CHBkCA_lUd^F$++CSHGa zjF_|!=F8S^Qf>w3M~>slIVR6vz^NsHKfmfB#a_-1-ozpnTHYep$05}Ytp|5(Dz4_b zRkwR7-$M^N{!sDV;`m+%vh%$@i3GccUuINGYYr(@{+Z}$j*)eLP5lPEn`ODKMP6`; zKJvL>%%s>vBz53@=UvD$5cRl6sPw*Sc4sApC@dW&CF6lawe^KeJ9#^bCC|&yAZ20C zqCgCs+`!Tl->;UA4Bnjd)7>OViB?<6hl)@MlU*GYX%)XLSDh?t+_nAzBS!*P=pO*p zAaO=3s>8(z7G+H}s$@7H^zCw+qH#BHt)QpjR@}^T`#_cAnQS8ll90d4X%S;1VJoU& z@i^ZAzrf9{D$zVBm#xS?9$EZ~#qx4Z&!27#9WL7JQi zxmCkSBw!qJrU3^VFo}7I$BxQ=Fd=m3CtY{jqo{)FKG2gm*N}@ttvmc+)0>;S79r^5 z8(3Gk%g8f`$!Zn~;a3OKYUK(dzQ6ovx5escnd7+0rt_t=EmyuV?ci@LC48N?#Ps<2 z^C>cTT<-hO;{CxUrE+WNeQ^+2?-Y9yw84^D@)?WgE10fyv*?;ZZw=Stthw-0S-@0fKKbXiVzF^UAV=A_!KZ zta6Mh-H8~K@D9{Ngb}LWDEMx&$hqqrZ=hwmKjbEUvI36F6_W9QVk=NnyB~bcM)yZ( z6Zklet9Ycr3P1gTjw%H27#X;HJ(wQwSRWM@MItjsv&Ioj`$^_V zppvb?wK*Z=BrK6hVsM!~2S;;-sB9$gy2oY{mF-=Mdr1>Ri;@BwS}q$+jLDDJ;fmS2 z5+}Ew@zO~7eP{Fm76%fgR|JwyUm8B&4~Y3H`#!OCs*=qp{iz6Env10L9NmqW2U3!K z5jNPX7^_u`T%EV4+mm~ZhS`8a+5hY~;O8FvASA>VPFT@hk!)9TY)foN+G!$jFbWBR z+kTZlg&C+88QQP{1T1cD@1&&L2DX1>Pw2>)D9=O0r%| z1&Om3mQ`a=-kbLSVTj!pV3+VzR+ra&KA%nU*Ki%^n`K5>Z32fW#D3ot6Tzw+8DH;L zxS&ca$XAU29YnPIiqp24QA*VlSM9R20-9_kO4^8VmiNBs2U!a^$RS6{tAKS;INk%@ ziqIQbQ#exV2>-MRxZ^lq@}PRQM;*YrrKd+Rv)T6M^utr7gn-P| zqc1RbQa;)JD^!&X=ZrOi)2s+AyPcz)5_ z=;iFh7ajaD2qn|@j;J#>Bb5k^(TSC1RG^^vRw5`m+#c6Y)(RRnU9B=Ez5(M#O;u06 zk1}l0B@NvG;i5WV#C_>W-1cn=*JQ>WqvuP@F9hd?_hsA)1trC}-D0_5(IYu0<8nAX zM&^mFenSyMAL8q{@ooIf$oPQ-EL6$!qUw?Cfz=smg}O91pOTWj2DWQoQ9CsKrcD}j zKf(HKYMZUbcd|}h9cZ}ErDf`FGsfgVrHPtFvF5A z5vabuW4Wve1J~Qp;r;vw;<}DLPdw(tIA2#Fnaz~h6D36rsp$s(&SXB_Gsv1Z30fGd zHR!`n4x9_ln}F_@oOdmP(f7#>fD(HaDk-B7^+Ra#O^67$@|Ei58s&zvXE-8L`8y@8 z24-X~=Z(sa+$TIY5F_iOOiEf;Ip7K)rryNd4b{H74Wz7fI9FIk?L*q{RUz>p^WgdA ze{l)a;bup-g-iWq1@fNu4s_}@L{m?il9a9{tG4(#d>w*`uKJnxI{_S{%YsR+k?{>$ z*ZGeq)x>Jte(rgo=ki+-DztdC`UPa&PyfU0JGg|8jW$*DGj zz=4p*zNvclWty>WGE{9$p1?G` zr7?M$#>$lr1!@U-jAvrXjW^3uVkizub7H2TiK@*unO$j$qJ5g1meDG^Q)X>g_NyQ;xW0r_&nJ_1r(mk4Ckk=e^K6ftG zzYLX5Y_jqhEcj6v1K}Hz8RA-g6J%)kZ^6D6MbwGjBt$Bp_x@!X~9_0+Syz&*2hD{Wfg3yFZl^+h$+-}(#7SL^HP%9jf5aX z)di_Cv~T6bMRFTdEz+R2fvOYW(qJs?R~beuMyz@S@czXQA1o{X00VA2n0^oBuTvB4 z7n@sN4->72Iij&hsNs1OAAXG@VeTC?^z8QU0KMmhZym2M6;vGFV3dAJQQ0Qr<&*JI z@V|zd+?Q>Mk(4Yc4K>0J$CU&x<`JiQ!!P$HGJrv zPmB7|6vt+FQ5q5^s=2-rxvF+El3_p`J&|~diNbHyNm;-!fP(NTfD2_W$9?sCi!e=X!_1rY6_nwu(K<@ zq3^cV#+AtH7#S;?sK4G_JaB8U#Kb;KWPP88=V>baq9&F?mtxmIQ2r(L<;kodN5YrM_iKMO+!~q!djMj=dx(X)IMV!kuByXhfl1jTuEbxt819FwCAbWo;H`0BzcDV z*!|*C+_tP1!_{)V4X4||AVNnFGPRd0aQ;<#~Z_1&H$ zj0uS!KTiOiwS$(wxiOiDnJcQJ4!*_vl1Ib6TJKO86ED%07~@0&oOV;mUg3cOSIH0g zp9dnP7Gg}&L<5XfT`+D46yX#1^AM$~rcwxtwVpAtv5*HvlG5gAAzD?Hk9Z+~6bANs zzfzOKne}l%y41+@)R=%_*|pQJGv_lN-$|n>p;0}k^<7_)KWW!2+16@{9EpH5nvpTs ztduXLsnHQ5UJZ~rKi9Wra(r#0exYE(JuNn^Xk?PQ9TJ45I=#sL!KTNCYd^A<<>#kE zhdPw8cBH4anr);*v5_2YwE(?5kX#9ci+^7FZ1@iU@&nz~WILktSfRJTvVQ$skuQaU zrNX*A1d+0BjQX6gJ4Tw&H9wc!R4jC8W{WfU*k)oBt(%!bPSif5btKZ1TdJ=znF$s= zChs-86oi^qi_#PD7`CFf1Vw8 zj&^nv^LV!h*Br1=-)cWVG55qvjIKG@0ol!0@aSD`#c~CqbI!w;>mBLgr=p_!opm>u zq1a-q=wKhMIA<+H%RlOD^kN!$`8qOb=8X!$+whBPKUL1hie!h{hsUFp>vojsUoF}E z&%DQ%L-vk}Un3d^dIvlT&w8D>AhhpjIjshZV7=M5?Womch<^|Dj!s0B_%8BcJY%Dd zH-Ix)j$Lhy=?lM5XuimJr~|DDz>ZthuuK0^by${W=*P^s%vAodP(x^W&5rDX$=c|g`&r?XCg5A zUGL=wczGPYwrRC8ByA{4HRp2sZzJ^j1`6;$D)h!>;j=Z?zw05ELOmT~?Yotet5XCr zNUa*vqfBrDCfVgcyv7usQkIuzl+@ot?lu`0PltoLB$X`lTT)*OD;F^O7X7X4Y39Z( zWX3lRMMR$~>6yzw6V8S2XD5uRX9M@0&Q#_A16urrl)+K+bWy~QNvE}K14GcD@cv|! z8h;c6;1z*lsqmNmSRE6v@{?_isqL2?1Bu1TD6OdvMaligRg7BpgjoN!iK8~+GLLg8s|d5OWC`-&HfU(uhG1HkBpzm=Z7@#XP<)qZg5~6;M$CDk;w_|v|M9W|wDuU3++j&S zlQ3Gg*q9+Snsk66Y(Oa7VZSK2zXEe_!2@E5KHD$vTN4ujf_t<8kD~HhqqF_|eXt4S zjO1+wYOoCkrH@dI6P{KdEee68-QoQy`Z;2Acf@3>KC)}a(4KO&t^^=fQ(h)YbHgR4 z;RJ4`2nVgcji*-o!C?!-$1zIhhC7naQ_QF-s;tZU$&gSi;C8PNhn{)Uc;e!>KH~Z! zTEj%to~1{qW@46dfvb_*58~e=Y05P%GTTuF>yv8^ajr9BL&5<5Az z?;NK(5!JJ>7bkwwwV{p>1A_gLfJ|St(y&%iRW-v@Ry$es(-u5?lE2I;vtYHLLVa8k zt!D9wm~R1$q~LD%+i){V>hYA>9`paU9}R@k%c2FJp40J zqj_$Qw?oHer$hq>3Imh8xF~+xCkW2{BwxumXm*$s3QyHVf?C?O@Q??o9ds%mx%xtno5f9H_=2<3Uy~Z2Nn>sLMQAJn5v!- z`xyB$3WoL4&4SBP>_XB4Xr6Cr_5oBX$YI>Mhy zjw>L=EaYFEe=hU>PZZ8zG=E_JSKN;Hr-sY+Qf89>Q6MBh z30A=I7oe7j{vSdAs`kZwir;aQHx>CmopJyXhgs;#?=*n_;QD+KO!z6j?;>X`{C`S- zUw;BW??a(#{80N}s6hTt@gZBhDailVC@$pBD?pUBvz7k~70LHgJWRJ2H7UyfqHrd; Z2.0.CO;2}, Author = {Zhang, Guang J. and Wu, Xiaoqing}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvWmhhbmcvMjAwMy5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqjuYIMjAwMy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFrUP9K0L8MAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVpoYW5nAAAQAAgAANHneLIAAAARAAgAANK0kjMAAAABABgAKo7mAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFpoYW5nOgAyMDAzLnBkZgAADgASAAgAMgAwADAAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9aaGFuZy8yMDAzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {2003/05/01}, Date-Added = {2016-06-14 23:39:50 +0000}, @@ -2142,13 +2161,13 @@ @article{zhang_and_wu_2003 Url = {http://dx.doi.org/10.1175/1520-0469(2003)060<1120:CMTAPP>2.0.CO;2}, Volume = {60}, Year = {2003}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvWmhhbmcvMjAwMy5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqjuYIMjAwMy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFrUP9K0L8MAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVpoYW5nAAAQAAgAANHneLIAAAARAAgAANK0kjMAAAABABgAKo7mAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFpoYW5nOgAyMDAzLnBkZgAADgASAAgAMgAwADAAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9aaGFuZy8yMDAzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(2003)060%3C1120:CMTAPP%3E2.0.CO;2}} @article{fritsch_and_chappell_1980, Abstract = {Abstract A parameterization formulation for incorporating the effects of midlatitude deep convection into mesoscale-numerical models is presented. The formulation is based on the hypothesis that the buoyant energy available to a parcel, in combination with a prescribed period of time for the convection to remove that energy, can be used to regulate the amount of convection in a mesoscale numerical model grid element. Individual clouds are represented as entraining moist updraft and downdraft plumes. The fraction of updraft condensate evaporated in moist downdrafts is determined from an empirical relationship between the vertical shear of the horizontal wind and precipitation efficiency. Vertical transports of horizontal momentum and warming by compensating subsidence are included in the parameterization. Since updraft and downdraft areas are sometimes a substantial fraction of mesoscale model grid-element areas, grid-point temperatures (adjusted for convection) are an area-weighted mean of updraft, downdraft and environmental temperatures.}, Annote = {doi: 10.1175/1520-0469(1980)037<1722:NPOCDM>2.0.CO;2}, Author = {Fritsch, J. M. and Chappell, C. F.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvRnJpdHNjaC8xOTgwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAARCuMwgxOTgwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEKs103xvpgAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHRnJpdHNjaAAAEAAIAADR53iyAAAAEQAIAADTfMQGAAAAAQAYARCuMwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBGcml0c2NoOgAxOTgwLnBkZgAADgASAAgAMQA5ADgAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Gcml0c2NoLzE5ODAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {1980/08/01}, Date = {1980/08/01}, @@ -2169,12 +2188,12 @@ @article{fritsch_and_chappell_1980 Volume = {37}, Year = {1980}, Year1 = {1980}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvRnJpdHNjaC8xOTgwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAARCuMwgxOTgwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEKs103xvpgAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHRnJpdHNjaAAAEAAIAADR53iyAAAAEQAIAADTfMQGAAAAAQAYARCuMwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBGcml0c2NoOgAxOTgwLnBkZgAADgASAAgAMQA5ADgAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Gcml0c2NoLzE5ODAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(1980)037%3C1722:NPOCDM%3E2.0.CO;2}} @article{bechtold_et_al_2008, Abstract = {Advances in simulating atmospheric variability with the ECMWF model are presented that stem from revisions of the convection and diffusion parametrizations. The revisions concern in particular the introduction of a variable convective adjustment time-scale, a convective entrainment rate proportional to the environmental relative humidity, as well as free tropospheric diffusion coefficients for heat and momentum based on Monin--Obukhov functional dependencies.The forecasting system is evaluated against analyses and observations using high-resolution medium-range deterministic and ensemble forecasts, monthly and seasonal integrations, and decadal integrations with coupled atmosphere-ocean models. The results show a significantly higher and more realistic level of model activity in terms of the amplitude of tropical and extratropical mesoscale, synoptic and planetary perturbations. Importantly, with the higher variability and reduced bias not only the probabilistic scores are improved, but also the midlatitude deterministic scores in the short and medium ranges. Furthermore, for the first time the model is able to represent a realistic spectrum of convectively coupled equatorial Kelvin and Rossby waves, and maintains a realistic amplitude of the Madden--Julian oscillation (MJO) during monthly forecasts. However, the propagation speed of the MJO is slower than observed. The higher tropical tropospheric wave activity also results in better stratospheric temperatures and winds through the deposition of momentum.The partitioning between convective and resolved precipitation is unaffected by the model changes with roughly 62% of the total global precipitation being of the convective type. Finally, the changes in convection and diffusion parametrizations resulted in a larger spread of the ensemble forecasts, which allowed the amplitude of the initial perturbations in the ensemble prediction system to decrease by 30%. Copyright {\copyright} 2008 Royal Meteorological Society}, Author = {Bechtold, Peter and K{\"o}hler, Martin and Jung, Thomas and Doblas-Reyes, Francisco and Leutbecher, Martin and Rodwell, Mark J. and Vitart, Frederic and Balsamo, Gianpaolo}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAobfkIMjAwOC5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARZce9OEjEwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJlY2h0b2xkABAACAAA0ed4sgAAABEACAAA04TgrAAAAAEAGAAobfkAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQmVjaHRvbGQ6ADIwMDgucGRmAA4AEgAIADIAMAAwADgALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-06-14 23:11:58 +0000}, Date-Modified = {2016-06-14 23:11:58 +0000}, Doi = {10.1002/qj.289}, @@ -2188,12 +2207,12 @@ @article{bechtold_et_al_2008 Url = {http://dx.doi.org/10.1002/qj.289}, Volume = {134}, Year = {2008}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAobfkIMjAwOC5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARZce9OEjEwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJlY2h0b2xkABAACAAA0ed4sgAAABEACAAA04TgrAAAAAEAGAAobfkAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQmVjaHRvbGQ6ADIwMDgucGRmAA4AEgAIADIAMAAwADgALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://dx.doi.org/10.1002/qj.289}} @article{han_and_pan_2011, Annote = {doi: 10.1175/WAF-D-10-05038.1}, Author = {Han, Jongil and Pan, Hua-Lu}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMTEucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMTEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADC1cfTGvlvAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0xtNzwAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDExLnBkZgAADgASAAgAMgAwADEAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAxMS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Booktitle = {Weather and Forecasting}, Da = {2011/08/01}, Date = {2011/08/01}, @@ -2214,22 +2233,22 @@ @article{han_and_pan_2011 Volume = {26}, Year = {2011}, Year1 = {2011}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMTEucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMTEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADC1cfTGvlvAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0xtNzwAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDExLnBkZgAADgASAAgAMgAwADEAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAxMS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/WAF-D-10-05038.1}} @article{pan_and_wu_1995, Author = {Pan, H. -L. and W.-S. Wu}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvUGFuLzE5OTUucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAwtTNCDE5OTUucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCtU/TGvMJAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANQYW4AABAACAAA0ed4sgAAABEACAAA0xtHaQAAAAEAGADC1M0AKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAUGFuOgAxOTk1LnBkZgAADgASAAgAMQA5ADkANQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9QYW4vMTk5NS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Date-Added = {2016-06-14 23:06:41 +0000}, Date-Modified = {2016-06-14 23:06:41 +0000}, Journal = {NMC Office Note, No. 409}, Pages = {40pp}, Title = {Implementing a Mass Flux Convection Parameterization Package for the NMC Medium-Range Forecast Model}, - Year = {1995}} + Year = {1995}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvUGFuLzE5OTUucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAwtTNCDE5OTUucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCtU/TGvMJAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANQYW4AABAACAAA0ed4sgAAABEACAAA0xtHaQAAAAEAGADC1M0AKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAUGFuOgAxOTk1LnBkZgAADgASAAgAMQA5ADkANQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9QYW4vMTk5NS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}} @article{grell_1993, Annote = {doi: 10.1175/1520-0493(1993)121<0764:PEOAUB>2.0.CO;2}, Author = {Grell, Georg A.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JlbGwvMTk5My5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoie0IMTk5My5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMK4dtMa9LMAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyZWxsAAAQAAgAANHneLIAAAARAAgAANMbSRMAAAABABgAKIntAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyZWxsOgAxOTkzLnBkZgAADgASAAgAMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmVsbC8xOTkzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Booktitle = {Monthly Weather Review}, Da = {1993/03/01}, Date = {1993/03/01}, @@ -2250,11 +2269,11 @@ @article{grell_1993 Volume = {121}, Year = {1993}, Year1 = {1993}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JlbGwvMTk5My5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoie0IMTk5My5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMK4dtMa9LMAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyZWxsAAAQAAgAANHneLIAAAARAAgAANMbSRMAAAABABgAKIntAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyZWxsOgAxOTkzLnBkZgAADgASAAgAMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmVsbC8xOTkzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0493(1993)121%3C0764:PEOAUB%3E2.0.CO;2}} @article{arakawa_and_schubert_1974, Author = {Arakawa, A and Schubert, WH}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQXJha2F3YS8xOTc0LnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAChtVQgxOTc0LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKG1ctM8h9AAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHQXJha2F3YQAAEAAIAADR53iyAAAAEQAIAAC0z4RkAAAAAQAYAChtVQAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBBcmFrYXdhOgAxOTc0LnBkZgAADgASAAgAMQA5ADcANAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9BcmFrYXdhLzE5NzQucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Date-Added = {2016-06-14 23:04:30 +0000}, Date-Modified = {2018-07-18 19:00:17 +0000}, Isi = {A1974S778800004}, @@ -2267,6 +2286,7 @@ @article{arakawa_and_schubert_1974 Title = {Interaction of a cumulus cloud ensemble with the large-scale environment, Part I}, Volume = {31}, Year = {1974}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQXJha2F3YS8xOTc0LnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAChtVQgxOTc0LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKG1ctM8h9AAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHQXJha2F3YQAAEAAIAADR53iyAAAAEQAIAAC0z4RkAAAAAQAYAChtVQAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBBcmFrYXdhOgAxOTc0LnBkZgAADgASAAgAMQA5ADcANAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9BcmFrYXdhLzE5NzQucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1974S778800004}} @article{harshvardhan_et_al_1989, @@ -2500,7 +2520,6 @@ @article{akmaev_1991 @article{siebesma_et_al_2007, Abstract = {A better conceptual understanding and more realistic parameterizations of convective boundary layers in climate and weather prediction models have been major challenges in meteorological research. In particular, parameterizations of the dry convective boundary layer, in spite of the absence of water phase-changes and its consequent simplicity as compared to moist convection, typically suffer from problems in attempting to represent realistically the boundary layer growth and what is often referred to as countergradient fluxes. The eddy-diffusivity (ED) approach has been relatively successful in representing some characteristics of neutral boundary layers and surface layers in general. The mass-flux (MF) approach, on the other hand, has been used for the parameterization of shallow and deep moist convection. In this paper, a new approach that relies on a combination of the ED and MF parameterizations (EDMF) is proposed for the dry convective boundary layer. It is shown that the EDMF approach follows naturally from a decomposition of the turbulent fluxes into 1) a part that includes strong organized updrafts, and 2) a remaining turbulent field. At the basis of the EDMF approach is the concept that nonlocal subgrid transport due to the strong updrafts is taken into account by the MF approach, while the remaining transport is taken into account by an ED closure. Large-eddy simulation (LES) results of the dry convective boundary layer are used to support the theoretical framework of this new approach and to determine the parameters of the EDMF model. The performance of the new formulation is evaluated against LES results, and it is shown that the EDMF closure is able to reproduce the main properties of dry convective boundary layers in a realistic manner. Furthermore, it will be shown that this approach has strong advantages over the more traditional countergradient approach, especially in the entrainment layer. As a result, this EDMF approach opens the way to parameterize the clear and cumulus-topped boundary layer in a simple and unified way.}, Author = {Siebesma, A. Pier and Soares, Pedro M. M. and Teixeira, Joao}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqYEwIMjAwNy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACphyMc7+4hQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAACFNpZWJlc21hABAACAAA0ed4sgAAABEACAAAxzxd+AAAAAEAGAAqYEwAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAU2llYmVzbWE6ADIwMDcucGRmAA4AEgAIADIAMAAwADcALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {DOI 10.1175/JAS3888.1}, @@ -2514,12 +2533,12 @@ @article{siebesma_et_al_2007 Title = {A combined eddy-diffusivity mass-flux approach for the convective boundary layer}, Volume = {64}, Year = {2007}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqYEwIMjAwNy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACphyMc7+4hQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAACFNpZWJlc21hABAACAAA0ed4sgAAABEACAAAxzxd+AAAAAEAGAAqYEwAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAU2llYmVzbWE6ADIwMDcucGRmAA4AEgAIADIAMAAwADcALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/000245742600011}} @article{soares_et_al_2004, Abstract = {Recently, a new consistent way of parametrizing simultaneously local and non-local turbulent transport for the convective atmospheric boundary layer has been proposed and tested for the clear boundary layer. This approach assumes that in the convective boundary layer the subgrid-scale fluxes result from two different mixing scales: small eddies, that are parametrized by an eddy-diffusivity approach, and thermals, which are represented by a mass-flux contribution. Since the interaction between the cloud layer and the underlying sub-cloud layer predominantly takes place through strong updraughts, this approach offers an interesting avenue of establishing a unified description of the turbulent transport in the cumulus-topped boundary layer. This paper explores the possibility of such a new approach for the cumulus-topped boundary layer. In the sub-cloud and cloud layers, the mass-flux term represents the effect of strong updraughts. These are modelled by a simple entraining parcel, which determines the mean properties of the strong updraughts, the boundary-layer height, the lifting condensation level and cloud top. The residual smaller-scale turbulent transport is parametrized with an eddy-diffusivity approach that uses a turbulent kinetic energy closure. The new scheme is implemented and tested in the research model MesoNH. Copyright {\copyright} 2004 Royal Meteorological Society}, Author = {Soares, P. M. M. and Miranda, P. M. A. and Siebesma, A. P. and Teixeira, J.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBCLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmTxEBxgAAAAABxgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWIC2CDIwMDQucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYf6DSsqNwAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAAZTb2FyZXMAEAAIAADR53iyAAAAEQAIAADSswXgAAAAAQAYAFiAtgAobJYAKGyLAChnewAbXgcAAphcAAIAXE1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBTb2FyZXM6ADIwMDQucGRmAA4AEgAIADIAMAAwADQALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAElVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmAAATAAEvAAAVAAIADf//AAAACAANABoAJABpAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjM=}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {10.1256/qj.03.223}, @@ -2533,11 +2552,11 @@ @article{soares_et_al_2004 Url = {http://dx.doi.org/10.1256/qj.03.223}, Volume = {130}, Year = {2004}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBCLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmTxEBxgAAAAABxgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWIC2CDIwMDQucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYf6DSsqNwAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAAZTb2FyZXMAEAAIAADR53iyAAAAEQAIAADSswXgAAAAAQAYAFiAtgAobJYAKGyLAChnewAbXgcAAphcAAIAXE1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBTb2FyZXM6ADIwMDQucGRmAA4AEgAIADIAMAAwADQALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAElVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmAAATAAEvAAAVAAIADf//AAAACAANABoAJABpAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjM=}, Bdsk-Url-1 = {http://dx.doi.org/10.1256/qj.03.223}} @article{troen_and_mahrt_1986, Author = {Troen, IB and Mahrt, L.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvVHJvZW4vMTk4Ni5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAABNeegIMTk4Ni5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE13kNKUWwUAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVRyb2VuAAAQAAgAANHneLIAAAARAAgAANKUvXUAAAABABgATXnoAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFRyb2VuOgAxOTg2LnBkZgAADgASAAgAMQA5ADgANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Ucm9lbi8xOTg2LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {10.1007/BF00122760}, @@ -2551,13 +2570,13 @@ @article{troen_and_mahrt_1986 Url = {http://dx.doi.org/10.1007/BF00122760}, Volume = {37}, Year = {1986}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvVHJvZW4vMTk4Ni5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAABNeegIMTk4Ni5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE13kNKUWwUAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVRyb2VuAAAQAAgAANHneLIAAAARAAgAANKUvXUAAAABABgATXnoAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFRyb2VuOgAxOTg2LnBkZgAADgASAAgAMQA5ADgANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Ucm9lbi8xOTg2LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1007/BF00122760}} @article{macvean_and_mason_1990, Abstract = {Abstract In a recent paper, Kuo and Schubert demonstrated the lack of observational support for the relevance of the criterion for cloud-top entrainment instability proposed by Randall and by Deardorff. Here we derive a new criterion, based on a model of the instability as resulting from the energy released close to cloud top, by Mixing between saturated boundary-layer air and unsaturated air from above the capping inversion. The condition is derived by considering the net conversion from potential to kinetic energy in a system consisting of two layers of fluid straddling cloud-top, when a small amount of mixing occurs between these layers. This contrasts with previous analyses, which only considered the change in buoyancy of the cloud layer when unsaturated air is mixed into it. In its most general form, this new criterion depends on the ratio of the depths of the layers involved in the mixing. It is argued that, for a self-sustaining instability, there must be a net release of kinetic energy on the same depth and time scales as the entrainment process itself. There are two plausible ways in which this requirement may be satisfied. Either one takes the depths of the layers involved in the mixing to each be comparable to the vertical scale of the entrainment process, which is typically of order tens of meters or less, or alternatively, one must allow for the efficiency with which energy released by mixing through a much deeper lower layer becomes available to initiate further entrainment. In both cases the same criterion for instability results. This criterion is much more restrictive than that proposed by Randall and by Deardorff; furthermore, the observational data is then consistent with the predictions of the current theory. Further analysis provides estimates of the turbulent fluxes associated with cloud-top entrainment instability. This analysis effectively constitutes an energetically consistent turbulence closure for models of boundary layers with cloud. The implications for such numerical models are discussed. Comparisons are also made with other possible criteria for cloud-top entrainment instability which have recently been suggested.}, Annote = {doi: 10.1175/1520-0469(1990)047<1012:CTEITS>2.0.CO;2}, Author = {MacVean, M. K. and Mason, P. J.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTWFjVmVhbi8xOTkwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAFx8zwgxOTkwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXHyn0rkkRQAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHTWFjVmVhbgAAEAAIAADR53iyAAAAEQAIAADSuYa1AAAAAQAYAFx8zwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBNYWNWZWFuOgAxOTkwLnBkZgAADgASAAgAMQA5ADkAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9NYWNWZWFuLzE5OTAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {1990/04/01}, Date-Added = {2016-05-20 17:16:05 +0000}, @@ -2576,11 +2595,11 @@ @article{macvean_and_mason_1990 Url = {http://dx.doi.org/10.1175/1520-0469(1990)047<1012:CTEITS>2.0.CO;2}, Volume = {47}, Year = {1990}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTWFjVmVhbi8xOTkwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAFx8zwgxOTkwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXHyn0rkkRQAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHTWFjVmVhbgAAEAAIAADR53iyAAAAEQAIAADSuYa1AAAAAQAYAFx8zwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBNYWNWZWFuOgAxOTkwLnBkZgAADgASAAgAMQA5ADkAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9NYWNWZWFuLzE5OTAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(1990)047%3C1012:CTEITS%3E2.0.CO;2}} @article{louis_1979, Author = {Louis, JF}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG91aXMvMTk3OS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAonogIMTk3OS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiej8FuU4pQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUxvdWlzAAAQAAgAANHneLIAAAARAAgAAMFutfoAAAABABgAKJ6IAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvdWlzOgAxOTc5LnBkZgAADgASAAgAMQA5ADcAOQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Mb3Vpcy8xOTc5LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Date-Added = {2016-05-20 17:15:52 +0000}, Date-Modified = {2016-05-20 17:15:52 +0000}, Isi = {A1979HT69700004}, @@ -2593,12 +2612,12 @@ @article{louis_1979 Title = {A PARAMETRIC MODEL OF VERTICAL EDDY FLUXES IN THE ATMOSPHERE}, Volume = {17}, Year = {1979}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG91aXMvMTk3OS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAonogIMTk3OS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiej8FuU4pQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUxvdWlzAAAQAAgAANHneLIAAAARAAgAAMFutfoAAAABABgAKJ6IAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvdWlzOgAxOTc5LnBkZgAADgASAAgAMQA5ADcAOQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Mb3Vpcy8xOTc5LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1979HT69700004}} @article{lock_et_al_2000, Abstract = {A new boundary layer turbulent mixing scheme has been developed for use in the UKMO weather forecasting and climate prediction models. This includes a representation of nonlocal mixing (driven by both surface fluxes and cloud-top processes) in unstable layers, either coupled to or decoupled from the surface, and an explicit entrainment parameterization. The scheme is formulated in moist conserved variables so that it can treat both dry and cloudy layers. Details of the scheme and examples of its performance in single-column model tests are presented.}, Author = {Lock, AP and Brown, AR and Bush, MR and Martin, GM and Smith, RNB}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAACibewgyMDAwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKJuLywPrPAAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAETG9jawAQAAgAANHneLIAAAARAAgAAMsETawAAAABABgAKJt7AChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvY2s6ADIwMDAucGRmAA4AEgAIADIAMAAwADAALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Date-Added = {2016-05-20 17:15:36 +0000}, Date-Modified = {2016-05-20 17:15:36 +0000}, Isi = {000089461100008}, @@ -2611,13 +2630,13 @@ @article{lock_et_al_2000 Title = {A new boundary layer mixing scheme. {P}art {I}: Scheme description and single-column model tests}, Volume = {128}, Year = {2000}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAACibewgyMDAwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKJuLywPrPAAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAETG9jawAQAAgAANHneLIAAAARAAgAAMsETawAAAABABgAKJt7AChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvY2s6ADIwMDAucGRmAA4AEgAIADIAMAAwADAALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/000089461100008}} @article{hong_and_pan_1996, Abstract = {Abstract In this paper, the incorporation of a simple atmospheric boundary layer diffusion scheme into the NCEP Medium-Range Forecast Model is described. A boundary layer diffusion package based on the Troen and Mahrt nonlocal diffusion concept has been tested for possible operational implementation. The results from this approach are compared with those from the local diffusion approach, which is the current operational scheme, and verified against FIFE observations during 9?10 August 1987. The comparisons between local and nonlocal approaches are extended to the forecast for a heavy rain case of 15?17 May 1995. The sensitivity of both the boundary layer development and the precipitation forecast to the tuning parameters in the nonlocal diffusion scheme is also investigated. Special attention is given to the interaction of boundary layer processes with precipitation physics. Some results of parallel runs during August 1995 are also presented.}, Annote = {doi: 10.1175/1520-0493(1996)124<2322:NBLVDI>2.0.CO;2}, Author = {Hong, Song-You and Pan, Hua-Lu}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAE18FggxOTk2LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATXvY0pRb8QAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAESG9uZwAQAAgAANHneLIAAAARAAgAANKUvmEAAAABABgATXwWAChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEhvbmc6ADE5OTYucGRmAA4AEgAIADEAOQA5ADYALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Booktitle = {Monthly Weather Review}, Da = {1996/10/01}, Date = {1996/10/01}, @@ -2638,13 +2657,13 @@ @article{hong_and_pan_1996 Volume = {124}, Year = {1996}, Year1 = {1996}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAE18FggxOTk2LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATXvY0pRb8QAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAESG9uZwAQAAgAANHneLIAAAARAAgAANKUvmEAAAABABgATXwWAChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEhvbmc6ADE5OTYucGRmAA4AEgAIADEAOQA5ADYALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0493(1996)124%3C2322:NBLVDI%3E2.0.CO;2}} @article{han_and_pan_2006, Abstract = {Abstract A parameterization of the convection-induced pressure gradient force (PGF) in convective momentum transport (CMT) is tested for hurricane intensity forecasting using NCEP's operational Global Forecast System (GFS) and its nested Regional Spectral Model (RSM). In the parameterization the PGF is assumed to be proportional to the product of the cloud mass flux and vertical wind shear. Compared to control forecasts using the present operational GFS and RSM where the PGF effect in CMT is taken into account empirically, the new PGF parameterization helps increase hurricane intensity by reducing the vertical momentum exchange, giving rise to a closer comparison to the observations. In addition, the new PGF parameterization forecasts not only show more realistically organized precipitation patterns with enhanced hurricane intensity but also reduce the forecast track error. Nevertheless, the model forecasts with the new PGF parameterization still largely underpredict the observed intensity. One of the many possible reasons for the large underprediction may be the absence of hurricane initialization in the models.}, Annote = {doi: 10.1175/MWR3090.1}, Author = {Han, Jongil and Pan, Hua-Lu}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMDYucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMDYucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABazFjStCvVAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0rSORQAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDA2LnBkZgAADgASAAgAMgAwADAANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAwNi5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Booktitle = {Monthly Weather Review}, Da = {2006/02/01}, Date-Added = {2016-05-20 17:11:17 +0000}, @@ -2663,11 +2682,11 @@ @article{han_and_pan_2006 Url = {http://dx.doi.org/10.1175/MWR3090.1}, Volume = {134}, Year = {2006}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMDYucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMDYucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABazFjStCvVAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0rSORQAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDA2LnBkZgAADgASAAgAMgAwADAANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAwNi5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/MWR3090.1}} @article{businger_et_al_1971, Author = {Businger, JA and Wyngaard, JC and Izumi, Y and Bradley, EF}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAodUUIMTk3MS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACh1cbTPIxwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJ1c2luZ2VyABAACAAA0ed4sgAAABEACAAAtM+FjAAAAAEAGAAodUUAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQnVzaW5nZXI6ADE5NzEucGRmAA4AEgAIADEAOQA3ADEALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-05-20 17:10:50 +0000}, Date-Modified = {2018-07-18 18:58:08 +0000}, Isi = {A1971I822800004}, @@ -2680,6 +2699,7 @@ @article{businger_et_al_1971 Title = {Flux-profile relationships in the atmospheric surface layer}, Volume = {28}, Year = {1971}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAodUUIMTk3MS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACh1cbTPIxwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJ1c2luZ2VyABAACAAA0ed4sgAAABEACAAAtM+FjAAAAAEAGAAodUUAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQnVzaW5nZXI6ADE5NzEucGRmAA4AEgAIADEAOQA3ADEALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1971I822800004}} @article{xu_and_randall_1996, @@ -2870,18 +2890,17 @@ @article{kim_and_arakawa_1995 @techreport{hou_et_al_2002, Author = {Y. Hou and S. Moorthi and K. Campana}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAiLi4vLi4vemhhbmctbGliL2hvdV9ldF9hbF8yMDAyLnBkZk8RAdwAAAAAAdwAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAAM/T1mZIKwAAAFKkjRJob3VfZXRfYWxfMjAwMi5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUqai02OGCgAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAJemhhbmctbGliAAAQAAgAAM/UKsYAAAARAAgAANNj2moAAAABABgAUqSNAE1lSgAj19QACTbFAAk2xAACZvkAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBtYW56aGFuZzoARG9jdW1lbnRzOgBNYW4uWmhhbmc6AGdtdGItZG9jOgB6aGFuZy1saWI6AGhvdV9ldF9hbF8yMDAyLnBkZgAADgAmABIAaABvAHUAXwBlAHQAXwBhAGwAXwAyADAAMAAyAC4AcABkAGYADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBIVXNlcnMvbWFuemhhbmcvRG9jdW1lbnRzL01hbi5aaGFuZy9nbXRiLWRvYy96aGFuZy1saWIvaG91X2V0X2FsXzIwMDIucGRmABMAAS8AABUAAgAP//8AAAAIAA0AGgAkAEkAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACKQ==}, Date-Added = {2016-05-19 19:52:22 +0000}, Date-Modified = {2016-05-20 15:14:59 +0000}, Institution = {NCEP}, Number = {441}, Title = {Parameterization of Solar Radiation Transfer}, Type = {office note}, - Year = {2002}} + Year = {2002}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAiLi4vLi4vemhhbmctbGliL2hvdV9ldF9hbF8yMDAyLnBkZk8RAdwAAAAAAdwAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAAM/T1mZIKwAAAFKkjRJob3VfZXRfYWxfMjAwMi5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUqai02OGCgAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAJemhhbmctbGliAAAQAAgAAM/UKsYAAAARAAgAANNj2moAAAABABgAUqSNAE1lSgAj19QACTbFAAk2xAACZvkAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBtYW56aGFuZzoARG9jdW1lbnRzOgBNYW4uWmhhbmc6AGdtdGItZG9jOgB6aGFuZy1saWI6AGhvdV9ldF9hbF8yMDAyLnBkZgAADgAmABIAaABvAHUAXwBlAHQAXwBhAGwAXwAyADAAMAAyAC4AcABkAGYADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBIVXNlcnMvbWFuemhhbmcvRG9jdW1lbnRzL01hbi5aaGFuZy9nbXRiLWRvYy96aGFuZy1saWIvaG91X2V0X2FsXzIwMDIucGRmABMAAS8AABUAAgAP//8AAAAIAA0AGgAkAEkAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACKQ==}} @article{hu_and_stamnes_1993, Author = {Y.X. Hu and K. Stamnes}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAnLi4vLi4vemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmTxEB8AAAAAAB8AACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAz9PWZkgrAAAAUqSNF2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSpJHTY3R+AAAAAAAAAAAAAgACAAAJIAAAAAAAAAAAAAAAAAAAAAl6aGFuZy1saWIAABAACAAAz9QqxgAAABEACAAA02PI3gAAAAEAGABSpI0ATWVKACPX1AAJNsUACTbEAAJm+QACAGBNYWNpbnRvc2ggSEQ6VXNlcnM6AG1hbnpoYW5nOgBEb2N1bWVudHM6AE1hbi5aaGFuZzoAZ210Yi1kb2M6AHpoYW5nLWxpYjoAaHVfYW5kX3N0YW1uZXNfMTk5My5wZGYADgAwABcAaAB1AF8AYQBuAGQAXwBzAHQAYQBtAG4AZQBzAF8AMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIATVVzZXJzL21hbnpoYW5nL0RvY3VtZW50cy9NYW4uWmhhbmcvZ210Yi1kb2MvemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAATAAEvAAAVAAIAD///AAAACAANABoAJABOAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAkI=}, Date-Added = {2016-05-19 19:31:56 +0000}, Date-Modified = {2016-05-20 15:13:12 +0000}, Journal = {J. Climate}, @@ -2889,276 +2908,303 @@ @article{hu_and_stamnes_1993 Pages = {728-742}, Title = {An accurate parameterization of the radiative properties of water clouds suitable for use in climate models}, Volume = {6}, - Year = {1993}} + Year = {1993}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAnLi4vLi4vemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmTxEB8AAAAAAB8AACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAz9PWZkgrAAAAUqSNF2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSpJHTY3R+AAAAAAAAAAAAAgACAAAJIAAAAAAAAAAAAAAAAAAAAAl6aGFuZy1saWIAABAACAAAz9QqxgAAABEACAAA02PI3gAAAAEAGABSpI0ATWVKACPX1AAJNsUACTbEAAJm+QACAGBNYWNpbnRvc2ggSEQ6VXNlcnM6AG1hbnpoYW5nOgBEb2N1bWVudHM6AE1hbi5aaGFuZzoAZ210Yi1kb2M6AHpoYW5nLWxpYjoAaHVfYW5kX3N0YW1uZXNfMTk5My5wZGYADgAwABcAaAB1AF8AYQBuAGQAXwBzAHQAYQBtAG4AZQBzAF8AMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIATVVzZXJzL21hbnpoYW5nL0RvY3VtZW50cy9NYW4uWmhhbmcvZ210Yi1kb2MvemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAATAAEvAAAVAAIAD///AAAACAANABoAJABOAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAkI=}} @article{alexander_et_al_2010, - author = {Alexander, M. J. and Geller, M. and McLandress, C. and Polavarapu, S. and Preusse, P. and Sassi, F. and Sato, K. and Eckermann, S. and Ern, M. and Hertzog, A. and Kawatani, Y. and Pulido, M. and Shaw, T. A. and Sigmond, M. and Vincent, R. and Watanabe, S.}, - title = {Recent developments in gravity-wave effects in climate models and the global distribution of gravity-wave momentum flux from observations and models}, - journal = {Quarterly Journal of the Royal Meteorological Society}, - volume = {136}, - number = {650}, - pages = {1103-1124}, - keywords = {atmosphere, gravity wave, momentum flux, drag, force, wind tendency, climate, global model}, - doi = {10.1002/qj.637}, - url = {https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/qj.637}, - eprint = {https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.637}, - year = {2010}} + Author = {Alexander, M. J. and Geller, M. and McLandress, C. and Polavarapu, S. and Preusse, P. and Sassi, F. and Sato, K. and Eckermann, S. and Ern, M. and Hertzog, A. and Kawatani, Y. and Pulido, M. and Shaw, T. A. and Sigmond, M. and Vincent, R. and Watanabe, S.}, + Doi = {10.1002/qj.637}, + Eprint = {https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.637}, + Journal = {Quarterly Journal of the Royal Meteorological Society}, + Keywords = {atmosphere, gravity wave, momentum flux, drag, force, wind tendency, climate, global model}, + Number = {650}, + Pages = {1103-1124}, + Title = {Recent developments in gravity-wave effects in climate models and the global distribution of gravity-wave momentum flux from observations and models}, + Url = {https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/qj.637}, + Volume = {136}, + Year = {2010}, + Bdsk-Url-1 = {https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/qj.637}, + Bdsk-Url-2 = {https://doi.org/10.1002/qj.637}} @article{plougonven_and_zhang_2014, - author = {Plougonven, R. and Zhang, F.}, - title = {Internal gravity waves from atmospheric jets and fronts}, - journal = {Reviews of Geophysics}, - volume = {52}, - number = {1}, - pages = {33-76}, - keywords = {gravity waves, stratosphere, atmosphere, jets, fronts, weather}, - doi = {10.1002/2012RG000419}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2012RG000419}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2012RG000419}, - year = {2014}} + Author = {Plougonven, R. and Zhang, F.}, + Doi = {10.1002/2012RG000419}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2012RG000419}, + Journal = {Reviews of Geophysics}, + Keywords = {gravity waves, stratosphere, atmosphere, jets, fronts, weather}, + Number = {1}, + Pages = {33-76}, + Title = {Internal gravity waves from atmospheric jets and fronts}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2012RG000419}, + Volume = {52}, + Year = {2014}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2012RG000419}, + Bdsk-Url-2 = {https://doi.org/10.1002/2012RG000419}} @article{weinstock_1984, - author = {Weinstock, J.}, - title = {Simplified derivation of an algorithm for nonlinear gravity waves}, - journal = {Journal of Geophysical Research: Space Physics}, - volume = {89}, - number = {A1}, - pages = {345-350}, - doi = {10.1029/JA089iA01p00345}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/JA089iA01p00345}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/JA089iA01p00345}, - year = {1984}} + Author = {Weinstock, J.}, + Doi = {10.1029/JA089iA01p00345}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/JA089iA01p00345}, + Journal = {Journal of Geophysical Research: Space Physics}, + Number = {A1}, + Pages = {345-350}, + Title = {Simplified derivation of an algorithm for nonlinear gravity waves}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/JA089iA01p00345}, + Volume = {89}, + Year = {1984}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/JA089iA01p00345}, + Bdsk-Url-2 = {https://doi.org/10.1029/JA089iA01p00345}} @article{holton_1983, - author = {Holton, James R.}, - title = {The Influence of Gravity Wave Breaking on the General Circulation of the Middle Atmosphere}, - journal = {Journal of the Atmospheric Sciences}, - volume = {40}, - number = {10}, - pages = {2497-2507}, - year = {1983}, - doi = {10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, - URL = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, - eprint = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}} + Author = {Holton, James R.}, + Doi = {10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, + Eprint = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {10}, + Pages = {2497-2507}, + Title = {The Influence of Gravity Wave Breaking on the General Circulation of the Middle Atmosphere}, + Url = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, + Volume = {40}, + Year = {1983}, + Bdsk-Url-1 = {https://doi.org/10.1175/1520-0469(1983)040%3C2497:TIOGWB%3E2.0.CO;2}} @article{geller_et_al_2013, - author = {Geller, M. A. and Alexander, M. Joan and Love, P. T. and Bacmeister, J. and Ern, M. and Hertzog, A. and Manzini, E. and Preusse, P. and Sato, K. and Scaife, A. A. and Zhou, T.}, - title = {A Comparison between Gravity Wave Momentum Fluxes in Observations and Climate Models}, - journal = {Journal of Climate}, - volume = {26}, - number = {17}, - pages = {6383-6405}, - year = {2013}, - doi = {10.1175/JCLI-D-12-00545.1}, - URL = {https://doi.org/10.1175/JCLI-D-12-00545.1}, - eprint = {https://doi.org/10.1175/JCLI-D-12-00545.1}} + Author = {Geller, M. A. and Alexander, M. Joan and Love, P. T. and Bacmeister, J. and Ern, M. and Hertzog, A. and Manzini, E. and Preusse, P. and Sato, K. and Scaife, A. A. and Zhou, T.}, + Doi = {10.1175/JCLI-D-12-00545.1}, + Eprint = {https://doi.org/10.1175/JCLI-D-12-00545.1}, + Journal = {Journal of Climate}, + Number = {17}, + Pages = {6383-6405}, + Title = {A Comparison between Gravity Wave Momentum Fluxes in Observations and Climate Models}, + Url = {https://doi.org/10.1175/JCLI-D-12-00545.1}, + Volume = {26}, + Year = {2013}, + Bdsk-Url-1 = {https://doi.org/10.1175/JCLI-D-12-00545.1}} @article{garcia_et_al_2017, - author = {Garcia, R. R. and Smith, A. K. and Kinnison, D. E. and Cámara, Á. and Murphy, D. J.}, - title = {Modification of the Gravity Wave Parameterization in the Whole Atmosphere Community Climate Model: Motivation and Results}, - journal = {Journal of the Atmospheric Sciences}, - volume = {74}, - number = {1}, - pages = {275-291}, - year = {2017}, - doi = {10.1175/JAS-D-16-0104.1}, - URL = {https://doi.org/10.1175/JAS-D-16-0104.1}, - eprint = {https://doi.org/10.1175/JAS-D-16-0104.1}} + Author = {Garcia, R. R. and Smith, A. K. and Kinnison, D. E. and C{\'a}mara, {\'A}. and Murphy, D. J.}, + Doi = {10.1175/JAS-D-16-0104.1}, + Eprint = {https://doi.org/10.1175/JAS-D-16-0104.1}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {1}, + Pages = {275-291}, + Title = {Modification of the Gravity Wave Parameterization in the Whole Atmosphere Community Climate Model: Motivation and Results}, + Url = {https://doi.org/10.1175/JAS-D-16-0104.1}, + Volume = {74}, + Year = {2017}, + Bdsk-Url-1 = {https://doi.org/10.1175/JAS-D-16-0104.1}} @inproceedings{yudin_et_al_2016, - title={Gravity wave physics in the NOAA Environmental Modeling System}, - author={Yudin, V.A. and Akmaev, R.A. and Fuller-Rowell, T.J. and Alpert, J.C.}, - booktitle={International SPARC Gravity Wave Symposium}, - volume={48}, - number={1}, - pages={012024}, - year={2016}, - organization={}} + Author = {Yudin, V.A. and Akmaev, R.A. and Fuller-Rowell, T.J. and Alpert, J.C.}, + Booktitle = {International SPARC Gravity Wave Symposium}, + Number = {1}, + Pages = {012024}, + Title = {Gravity wave physics in the NOAA Environmental Modeling System}, + Volume = {48}, + Year = {2016}} @inproceedings{alpert_et_al_2018, - title={Integrating Unified Gravity Wave Physics Research into the Next Generation Global Prediction System for NCEP Research to Operations}, - author={Alpert, Jordan C and Yudin, Valery and Fuller-Rowell, Tim and Akmaev, Rashid A}, - booktitle={98th American Meteorological Society Annual Meeting}, - year={2018}, - organization={AMS}} + Author = {Alpert, Jordan C and Yudin, Valery and Fuller-Rowell, Tim and Akmaev, Rashid A}, + Booktitle = {98th American Meteorological Society Annual Meeting}, + Organization = {AMS}, + Title = {Integrating Unified Gravity Wave Physics Research into the Next Generation Global Prediction System for NCEP Research to Operations}, + Year = {2018}} @article{eckermann_2011, - author = {Eckermann, Stephen D.}, - title = {Explicitly Stochastic Parameterization of Nonorographic Gravity Wave Drag}, - journal = {Journal of the Atmospheric Sciences}, - volume = {68}, - number = {8}, - pages = {1749-1765}, - year = {2011}, - doi = {10.1175/2011JAS3684.1}, - URL = {https://doi.org/10.1175/2011JAS3684.1}, - eprint = {https://doi.org/10.1175/2011JAS3684.1}} + Author = {Eckermann, Stephen D.}, + Doi = {10.1175/2011JAS3684.1}, + Eprint = {https://doi.org/10.1175/2011JAS3684.1}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {8}, + Pages = {1749-1765}, + Title = {Explicitly Stochastic Parameterization of Nonorographic Gravity Wave Drag}, + Url = {https://doi.org/10.1175/2011JAS3684.1}, + Volume = {68}, + Year = {2011}, + Bdsk-Url-1 = {https://doi.org/10.1175/2011JAS3684.1}} @article{lott_et_al_2012, - author = {Lott, F. and Guez, L. and Maury, P.}, - title = {A stochastic parameterization of non-orographic gravity waves: Formalism and impact on the equatorial stratosphere}, - journal = {Geophysical Research Letters}, - volume = {39}, - number = {6}, - pages = {}, - keywords = {Quasi-Biennial Oscillation, Rossby-gravity waves, gravity waves, stochastic parameterization, stratospheric dynamics}, - doi = {10.1029/2012GL051001}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2012GL051001}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2012GL051001}, - year = {2012}} + Author = {Lott, F. and Guez, L. and Maury, P.}, + Doi = {10.1029/2012GL051001}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2012GL051001}, + Journal = {Geophysical Research Letters}, + Keywords = {Quasi-Biennial Oscillation, Rossby-gravity waves, gravity waves, stochastic parameterization, stratospheric dynamics}, + Number = {6}, + Title = {A stochastic parameterization of non-orographic gravity waves: Formalism and impact on the equatorial stratosphere}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2012GL051001}, + Volume = {39}, + Year = {2012}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2012GL051001}, + Bdsk-Url-2 = {https://doi.org/10.1029/2012GL051001}} @conference{yudin_et_al_2018, - author = {Yudin, V. A and Akmaev, R. A. and Alpert, J. C. and Fuller-Rowell T. J., and Karol S. I.}, - Booktitle = {25th Conference on Numerical Weather Prediction}, - Date-Added = {2018-06-04 10:50:44 -0600}, - Date-Modified = {2018-06-04 10:54:39 -0600}, - Editor = {Am. Meteorol. Soc.}, - Title = {Gravity Wave Physics and Dynamics in the FV3-based Atmosphere Models Extended into the Mesosphere}, - Year = {2018}} + Author = {Yudin, V. A and Akmaev, R. A. and Alpert, J. C. and Fuller-Rowell T. J., and Karol S. I.}, + Booktitle = {25th Conference on Numerical Weather Prediction}, + Date-Added = {2018-06-04 10:50:44 -0600}, + Date-Modified = {2018-06-04 10:54:39 -0600}, + Editor = {Am. Meteorol. Soc.}, + Title = {Gravity Wave Physics and Dynamics in the FV3-based Atmosphere Models Extended into the Mesosphere}, + Year = {2018}} @article{hines_1997, - title = "Doppler-spread parameterization of gravity-wave momentum deposition in the middle atmosphere. Part 2: Broad and quasi monochromatic spectra, and implementation", - journal = "Journal of Atmospheric and Solar-Terrestrial Physics", - volume = "59", - number = "4", - pages = "387 - 400", - year = "1997", - issn = "1364-6826", - doi = "https://doi.org/10.1016/S1364-6826(96)00080-6", - url = "http://www.sciencedirect.com/science/article/pii/S1364682696000806", - author = "Colin O. Hines"} + Author = {Colin O. Hines}, + Doi = {https://doi.org/10.1016/S1364-6826(96)00080-6}, + Issn = {1364-6826}, + Journal = {Journal of Atmospheric and Solar-Terrestrial Physics}, + Number = {4}, + Pages = {387 - 400}, + Title = {Doppler-spread parameterization of gravity-wave momentum deposition in the middle atmosphere. Part 2: Broad and quasi monochromatic spectra, and implementation}, + Url = {http://www.sciencedirect.com/science/article/pii/S1364682696000806}, + Volume = {59}, + Year = {1997}, + Bdsk-Url-1 = {http://www.sciencedirect.com/science/article/pii/S1364682696000806}, + Bdsk-Url-2 = {https://doi.org/10.1016/S1364-6826(96)00080-6}} @article{alexander_and_dunkerton_1999, - author = {Alexander, M. J. and Dunkerton, T. J.}, - title = {A Spectral Parameterization of Mean-Flow Forcing due to Breaking Gravity Waves}, - journal = {Journal of the Atmospheric Sciences}, - volume = {56}, - number = {24}, - pages = {4167-4182}, - year = {1999}, - doi = {10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, - URL = {https://doi.org/10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, - eprint = {https://doi.org/10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}} + Author = {Alexander, M. J. and Dunkerton, T. J.}, + Doi = {10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, + Eprint = {https://doi.org/10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {24}, + Pages = {4167-4182}, + Title = {A Spectral Parameterization of Mean-Flow Forcing due to Breaking Gravity Waves}, + Url = {https://doi.org/10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, + Volume = {56}, + Year = {1999}, + Bdsk-Url-1 = {https://doi.org/10.1175/1520-0469(1999)056%3C4167:ASPOMF%3E2.0.CO;2}} @article{scinocca_2003, - author = {Scinocca, John F.}, - title = {An Accurate Spectral Nonorographic Gravity Wave Drag Parameterization for General Circulation Models}, - journal = {Journal of the Atmospheric Sciences}, - volume = {60}, - number = {4}, - pages = {667-682}, - year = {2003}, - doi = {10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, - URL = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, - eprint = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}} + Author = {Scinocca, John F.}, + Doi = {10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, + Eprint = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {4}, + Pages = {667-682}, + Title = {An Accurate Spectral Nonorographic Gravity Wave Drag Parameterization for General Circulation Models}, + Url = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, + Volume = {60}, + Year = {2003}, + Bdsk-Url-1 = {https://doi.org/10.1175/1520-0469(2003)060%3C0667:AASNGW%3E2.0.CO;2}} @article{shaw_and_shepherd_2009, - author = {Shaw, Tiffany A. and Shepherd, Theodore G.}, - title = {A Theoretical Framework for Energy and Momentum Consistency in Subgrid-Scale Parameterization for Climate Models}, - journal = {Journal of the Atmospheric Sciences}, - volume = {66}, - number = {10}, - pages = {3095-3114}, - year = {2009}, - doi = {10.1175/2009JAS3051.1}, - URL = {https://doi.org/10.1175/2009JAS3051.1}, - eprint = {https://doi.org/10.1175/2009JAS3051.1}} - -@Article{molod_et_al_2015, - AUTHOR = {Molod, A. and Takacs, L. and Suarez, M. and Bacmeister, J.}, - TITLE = {Development of the GEOS-5 atmospheric general circulation model: evolution from MERRA to MERRA2}, - JOURNAL = {Geoscientific Model Development}, - VOLUME = {8}, - YEAR = {2015}, - NUMBER = {5}, - PAGES = {1339--1356}, - URL = {https://www.geosci-model-dev.net/8/1339/2015/}, - DOI = {10.5194/gmd-8-1339-2015}} + Author = {Shaw, Tiffany A. and Shepherd, Theodore G.}, + Doi = {10.1175/2009JAS3051.1}, + Eprint = {https://doi.org/10.1175/2009JAS3051.1}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {10}, + Pages = {3095-3114}, + Title = {A Theoretical Framework for Energy and Momentum Consistency in Subgrid-Scale Parameterization for Climate Models}, + Url = {https://doi.org/10.1175/2009JAS3051.1}, + Volume = {66}, + Year = {2009}, + Bdsk-Url-1 = {https://doi.org/10.1175/2009JAS3051.1}} + +@article{molod_et_al_2015, + Author = {Molod, A. and Takacs, L. and Suarez, M. and Bacmeister, J.}, + Doi = {10.5194/gmd-8-1339-2015}, + Journal = {Geoscientific Model Development}, + Number = {5}, + Pages = {1339--1356}, + Title = {Development of the GEOS-5 atmospheric general circulation model: evolution from MERRA to MERRA2}, + Url = {https://www.geosci-model-dev.net/8/1339/2015/}, + Volume = {8}, + Year = {2015}, + Bdsk-Url-1 = {https://www.geosci-model-dev.net/8/1339/2015/}, + Bdsk-Url-2 = {https://doi.org/10.5194/gmd-8-1339-2015}} @article{richter_et_al_2010, - author = {Richter, Jadwiga H. and Sassi, Fabrizio and Garcia, Rolando R.}, - title = {Toward a Physically Based Gravity Wave Source Parameterization in a General Circulation Model}, - journal = {Journal of the Atmospheric Sciences}, - volume = {67}, - number = {1}, - pages = {136-156}, - year = {2010}, - doi = {10.1175/2009JAS3112.1}, - URL = {https://doi.org/10.1175/2009JAS3112.1}, - eprint = {https://doi.org/10.1175/2009JAS3112.1}} + Author = {Richter, Jadwiga H. and Sassi, Fabrizio and Garcia, Rolando R.}, + Doi = {10.1175/2009JAS3112.1}, + Eprint = {https://doi.org/10.1175/2009JAS3112.1}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {1}, + Pages = {136-156}, + Title = {Toward a Physically Based Gravity Wave Source Parameterization in a General Circulation Model}, + Url = {https://doi.org/10.1175/2009JAS3112.1}, + Volume = {67}, + Year = {2010}, + Bdsk-Url-1 = {https://doi.org/10.1175/2009JAS3112.1}} @article{richter_et_al_2014, - author = {Richter, Jadwiga H. and Solomon, Abraham and Bacmeister, Julio T.}, - title = {Effects of vertical resolution and nonorographic gravity wave drag on the simulated climate in the Community Atmosphere Model, version 5}, - journal = {Journal of Advances in Modeling Earth Systems}, - volume = {6}, - number = {2}, - pages = {357-383}, - keywords = {climate modeling, vertical resolution, modeling, climate, global circulation model, general circulation model}, - doi = {10.1002/2013MS000303}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2013MS000303}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2013MS000303}, - year = {2014}} + Author = {Richter, Jadwiga H. and Solomon, Abraham and Bacmeister, Julio T.}, + Doi = {10.1002/2013MS000303}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2013MS000303}, + Journal = {Journal of Advances in Modeling Earth Systems}, + Keywords = {climate modeling, vertical resolution, modeling, climate, global circulation model, general circulation model}, + Number = {2}, + Pages = {357-383}, + Title = {Effects of vertical resolution and nonorographic gravity wave drag on the simulated climate in the Community Atmosphere Model, version 5}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2013MS000303}, + Volume = {6}, + Year = {2014}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2013MS000303}, + Bdsk-Url-2 = {https://doi.org/10.1002/2013MS000303}} @article{gelaro_et_al_2017, - author = {Gelaro, et al.}, - title = {The Modern-Era Retrospective Analysis for Research and Applications, Version 2 (MERRA-2)}, - journal = {Journal of Climate}, - volume = {30}, - number = {14}, - pages = {5419-5454}, - year = {2017}, - doi = {10.1175/JCLI-D-16-0758.1}, - URL = {https://doi.org/10.1175/JCLI-D-16-0758.1}, - eprint = {https://doi.org/10.1175/JCLI-D-16-0758.1}} + Author = {Gelaro, et al.}, + Doi = {10.1175/JCLI-D-16-0758.1}, + Eprint = {https://doi.org/10.1175/JCLI-D-16-0758.1}, + Journal = {Journal of Climate}, + Number = {14}, + Pages = {5419-5454}, + Title = {The Modern-Era Retrospective Analysis for Research and Applications, Version 2 (MERRA-2)}, + Url = {https://doi.org/10.1175/JCLI-D-16-0758.1}, + Volume = {30}, + Year = {2017}, + Bdsk-Url-1 = {https://doi.org/10.1175/JCLI-D-16-0758.1}} @article{garcia_et_al_2007, - author = {Garcia, R. R. and Marsh, D. R. and Kinnison, D. E. and Boville, B. A. and Sassi, F.}, - title = {Simulation of secular trends in the middle atmosphere, 1950–2003}, - journal = {Journal of Geophysical Research: Atmospheres}, - volume = {112}, - number = {D9}, - pages = {}, - keywords = {global change, ozone depletion, water vapor trends, temperature trends}, - doi = {10.1029/2006JD007485}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2006JD007485}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2006JD007485}, - year = {2007}} + Author = {Garcia, R. R. and Marsh, D. R. and Kinnison, D. E. and Boville, B. A. and Sassi, F.}, + Doi = {10.1029/2006JD007485}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2006JD007485}, + Journal = {Journal of Geophysical Research: Atmospheres}, + Keywords = {global change, ozone depletion, water vapor trends, temperature trends}, + Number = {D9}, + Title = {Simulation of secular trends in the middle atmosphere, 1950--2003}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2006JD007485}, + Volume = {112}, + Year = {2007}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2006JD007485}, + Bdsk-Url-2 = {https://doi.org/10.1029/2006JD007485}} @article{eckermann_et_al_2009, - title = "High-altitude data assimilation system experiments for the northern summer mesosphere season of 2007", - journal = "Journal of Atmospheric and Solar-Terrestrial Physics", - volume = "71", - number = "3", - pages = "531 - 551", - year = "2009", - note = "Global Perspectives on the Aeronomy of the Summer Mesopause Region", - issn = "1364-6826", - doi = "https://doi.org/10.1016/j.jastp.2008.09.036", - url = "http://www.sciencedirect.com/science/article/pii/S1364682608002575", - author = "Stephen D. Eckermann and Karl W. Hoppel and Lawrence Coy and John P. McCormack and David E. Siskind and Kim Nielsen and Andrew Kochenash and Michael H. Stevens and Christoph R. Englert and Werner Singer and Mark Hervig", - keywords = "Data assimilation, Polar mesospheric cloud, Tide, Planetary wave, Mesosphere",} + Author = {Stephen D. Eckermann and Karl W. Hoppel and Lawrence Coy and John P. McCormack and David E. Siskind and Kim Nielsen and Andrew Kochenash and Michael H. Stevens and Christoph R. Englert and Werner Singer and Mark Hervig}, + Doi = {https://doi.org/10.1016/j.jastp.2008.09.036}, + Issn = {1364-6826}, + Journal = {Journal of Atmospheric and Solar-Terrestrial Physics}, + Keywords = {Data assimilation, Polar mesospheric cloud, Tide, Planetary wave, Mesosphere}, + Note = {Global Perspectives on the Aeronomy of the Summer Mesopause Region}, + Number = {3}, + Pages = {531 - 551}, + Title = {High-altitude data assimilation system experiments for the northern summer mesosphere season of 2007}, + Url = {http://www.sciencedirect.com/science/article/pii/S1364682608002575}, + Volume = {71}, + Year = {2009}, + Bdsk-Url-1 = {http://www.sciencedirect.com/science/article/pii/S1364682608002575}, + Bdsk-Url-2 = {https://doi.org/10.1016/j.jastp.2008.09.036}} @inproceedings{alpert_et_al_2019, - title={Atmospheric Gravity Wave Sources Correlated with Resolved-scale GW Activity and Sub-grid Scale Parameterization in the FV3gfs Model}, - author={Alpert, Jordan C and Yudin, Valery A and Strobach, Edward}, - booktitle={AGU Fall Meeting 2019}, - year={2019}, - organization={AGU}} - -@Article{ern_et_al_2018, - AUTHOR = {Ern, M. and Trinh, Q. T. and Preusse, P. and Gille, J. C. and Mlynczak, M. G. and Russell III, J. M. and Riese, M.}, - TITLE = {GRACILE: a comprehensive climatology of atmospheric gravity wave parameters based on satellite limb soundings}, - JOURNAL = {Earth System Science Data}, - VOLUME = {10}, - YEAR = {2018}, - NUMBER = {2}, - PAGES = {857--892}, - URL = {https://www.earth-syst-sci-data.net/10/857/2018/}, - DOI = {10.5194/essd-10-857-2018}} + Author = {Alpert, Jordan C and Yudin, Valery A and Strobach, Edward}, + Booktitle = {AGU Fall Meeting 2019}, + Organization = {AGU}, + Title = {Atmospheric Gravity Wave Sources Correlated with Resolved-scale GW Activity and Sub-grid Scale Parameterization in the FV3gfs Model}, + Year = {2019}} + +@article{ern_et_al_2018, + Author = {Ern, M. and Trinh, Q. T. and Preusse, P. and Gille, J. C. and Mlynczak, M. G. and Russell III, J. M. and Riese, M.}, + Doi = {10.5194/essd-10-857-2018}, + Journal = {Earth System Science Data}, + Number = {2}, + Pages = {857--892}, + Title = {GRACILE: a comprehensive climatology of atmospheric gravity wave parameters based on satellite limb soundings}, + Url = {https://www.earth-syst-sci-data.net/10/857/2018/}, + Volume = {10}, + Year = {2018}, + Bdsk-Url-1 = {https://www.earth-syst-sci-data.net/10/857/2018/}, + Bdsk-Url-2 = {https://doi.org/10.5194/essd-10-857-2018}} @inproceedings{yudin_et_al_2019, - title={Longitudinal Variability of Wave Dynamics in Weather Models Extended into the Mesosphere and Thermosphere}, - author={Yudin V.A. , S. I. Karol, R.A. Akmaev, T. Fuller-Rowell, D. Kleist, A. Kubaryk, and C. Thompson}, - booktitle={Space Weather Workshop}, - year={2019},} + Author = {Yudin V.A. , S. I. Karol, R.A. Akmaev, T. Fuller-Rowell, D. Kleist, A. Kubaryk, and C. Thompson}, + Booktitle = {Space Weather Workshop}, + Title = {Longitudinal Variability of Wave Dynamics in Weather Models Extended into the Mesosphere and Thermosphere}, + Year = {2019}} diff --git a/physics/docs/pdftxt/HWRF_FAMP.txt b/physics/docs/pdftxt/HWRF_FAMP.txt new file mode 100644 index 000000000..4fb555d84 --- /dev/null +++ b/physics/docs/pdftxt/HWRF_FAMP.txt @@ -0,0 +1,91 @@ +/** +\page HWRF_famp HWRF Ferrier-Aligo (FA) Microphysics Scheme +\section des_famp Description + +The Ferrier-Aligo (FA) microphysics (Aligo et al. 2018 \cite aligo_et_al_2018) is a single +moment scheme predicting mass mixing ratios of rain water (\f$q_r\f$), cloud water (\f$q_c\f$), +cloud ice (\f$q_i\f$), and snow-graupel (\f$q_s\f$). The FA scheme is currently used operationally +in the North American Mesoscale Forecast System (NAM; including the parent 12-km domain, the 3-km +NAM nests, and the 1.5km fire weather nest), the Hurricane Weather Research and Forecasting Model (HWRF), +the Hurricanes in a Multi-scale Ocean-coupled Non-hydrostatic Model (HMON), and the High-Resolution +Window (HiResW) Non-dydrostatic Multiscale Model on the B grid (NMMB). The FA scheme advects each +species separately in the NAM nests, and advects the total condensate in the 12-km parent NAM,HiResW NMMB, +HWRF, and HMON. + +Unique to the FA scheme is the calculation of a diagnostic array called the "rime factor" (RF), which +represents the degree of riming onto snow-graupel, and takes into account the temperature of the ice particle, +the impact velocity of the cloud droplet on the ice particle, and the size of the cloud droplet. For all +practical purposes, one can categorize precipitation ice as snow, graupel, or hail, similar to the ice +species predicted in other microphysical schemes based on the value of the RF. For example, an RF = 1 +represents unrimed snow; lightly rimed snow occurs when 1 < RF < 2; heavily rimed snow when 2< RF \f$\leq\f$ 5; +graupel when 5 < RF < 10; and frozen drops or hail when RF \f$geqslant\f$ 10. In reality, the RF knows +no arbitrary cutoff between different ice categories, and the categorizations above are somewhat subjective. +Figure 1 is a schematic illustration of the FA scheme processes and each process is described in Table 1. + +\image html FA_MP_schematic.png "Figure 1: Schematic illustration of FA scheme processes with a description of each process in Table 1." width=10cm + +Table 1. List of microphysical processes and their description. All processes are in units of \f$kg kg^{-1}\f$. +\tableofcontents +| Microphysical Source/Sinks | Description | +|----------------------------------|--------------------------------------------------------| +| PIHOM | Homogeneous freezing of cloud water to ice. | +| PIDEP | Net ice deposition (> 0) or sublimation (< 0). | +| PINIT | Initiation (nucleation) of cloud ice. | +| PIACW | Cloud water collection by precipitation ice. | +| PIACWI | Cloud water riming onto precipitation ice at < 0 | +| PIACR | Freezing of supercooled rain to precipitation ice. | +| PIMLT | Melting of precipitation ice to form rain. | +| PICND | Condensation onto wet, melting ice. | +| PIEVP | Evaporation from wet, melting ice. | +| PCOND | Net cloud water condensation (> 0) or evaporation (< 0)| +| PRAUT | Droplet self-collection (Autoconversion) to form rain. | +| PRACW | Cloud water collection (Accretion) by rain. | +| PREVP | Rain evaporation. | +| PIACWR | Accreted cloud water shed to form rain at > 0 | +\tableofcontents + +Owing to operational computation constraints, and unique to the FA scheme, the sedimentation process +does not use finite differencing of precipitation fluxes in the vertical in order to circumvent the +requirement that small time steps be used in order to maintain numerical stability, particularly since +the vertical resolution often increases dramatically near the ground. The algorithm is instead based upon +a partitioning of precipitation already present in the grid box at the beginning of the time step and the +precipitation entering the grid box from above at the end of the time step. A more detailed description +of the sedimentation algorithm can be found in Aligo et al. (2018, appendix D). + +An algorithm was developed in FA to improve stratiform rainfall by allowing the rain intercept parameter, +\f$N_{or}\f$, to vary with height and the mean drop diameter to be fixed below melting layers. This is +different from other single-moment microphysics schemes (WSM6 and Lin) that assume a constant value for +\f$N_{or}\f$. The algorithm in the FA scheme, simular to what is done in the Thompson scheme \cite Thompson_2008, +assumes that a snow-graupel particle about to enter the melting layer from above has the same mean mass +as a drop formed from melting below the melting layer. The mean drop diameter calculated below the melting layer +acts as the lower limit for the mean drop sizes as the rain descends to lower levels. This algorithm is only +active if 1) the snow-graupel density above the melting level (i.e.\f$T_c<0^{o}C\f$) is \f$<225kg m^{-3}\f$ +(which corresponds to an RF=10), 2) the rain content does not exceed \f$1gm^{-3}\f$, and 3) there is vertical +continuity of the rain at lower levels with the rain that formed from melting ice. + +The FA scheme also uses a drizzle parameterization in order to minimize the spatial extent of light (<20dBZ) +reflectivity echoes that developed at the top of moist boundary layers, over the Southeastern U.S., within +warm conveyor belts, and over ocean areas covered by stratocumulus in the NMMB. The drizzle parameterization +uses a variable \f$N_{or}\f$ following Westbrook et al. (2010) \cite westbrook_et_al_2010, and approach +conceptually similar to that described in Thompson et al.(2008) \cite Thompson_2008 for drizzle. Figure 2a +shows an example of drizzle forming in a single low-level liquid cloud layer above \f$0^oC\f$, in which the +smaller, more numerous drizzle drops produce lower radar reflectivities, compared to rain, with \f$N_{or}=8\times10^6m\f$, +for example. For multiple cloud layers, drizzle from low clouds must be completely disconnected from rain formed +aloft from melting ice, such that a rain-free layer must seperate any stratiform rain layer aloft from drizzle formed +within liquid clouds at lower levels.Supercooled drizzle is also allowed to form from warm-rain processes below \f$0^oC\f$. +The quantity \f$N_{or}\f$ is modified only when the rainwater content is \f$< 0.5 gm^{-3}\f$, such that \f$N_{or}\f$ is +assumed to vary (red line in Fig.2b) with rain content (\f$\rho_\alpha\times q_r\f$) as + +\image html FA_NOR_EQ.png " " width=10cm + +\image html FA_DRI.png " Figure 2. (a) Schematic illustration of the drizzle parameterization for a single cloud layer in which drizzle forms from a low-level liquid water cloud at > 0C only when it is completely disconnected from rain formed from melting ice aloft. (b) The scatterplot from Westbrook at al.(2010) shows retrieved rain rate (R,mm/h) vs the mornalized rain intercept paramter (Nl in 1/m^4, where Nl=Nor for exponential distributions) based on lidar observations of drizzle. The different values of Nor described in (1) are overlaid on the figure with the red line showing the variation of Nor as a funciton of rain rate for rain contents between 0.02 and 0.5 g/m^3. " width=10cm + + +\section intra_famp Intraphysics Communication +\ref arg_table_mp_fer_hires_run + +\section gen_famp General Algorithm +\ref gen_al_famp + + +*/ diff --git a/physics/module_MP_FER_HIRES.F90 b/physics/module_MP_FER_HIRES.F90 index 02a09481b..f45ffa04f 100644 --- a/physics/module_MP_FER_HIRES.F90 +++ b/physics/module_MP_FER_HIRES.F90 @@ -1,9 +1,9 @@ !>\file module_MP_FER_HIRES.F90 !! "Modified" fer_hires microphysics - 11 July 2016 version !! -! (1) Ice nucleation: Fletcher (1962) replaces Meyers et al. (1992) -! (2) Cloud ice is a simple function of the number concentration from (1), and it -! is no longer a fractional function of the large ice. Thus, the FLARGE & +!! (1) Ice nucleation: Fletcher (1962) replaces Meyers et al. (1992) +!! (2) Cloud ice is a simple function of the number concentration from (1), and it +!! is no longer a fractional function of the large ice. Thus, the FLARGE & ! FSMALL parameters are no longer used. ! (3) T_ICE_init=-12 deg C provides a slight delay in the initial onset of ice. ! (4) NLImax is a function of rime factor (RF) and temperature. @@ -242,37 +242,41 @@ MODULE MODULE_MP_FER_HIRES !! version, and QRIMEF is only in the advected version. The innards !! are all the same. SUBROUTINE FER_HIRES (DT,RHgrd, & - & dz8w,rho_phy,p_phy,pi_phy,th_phy,t_phy, & + & prsi,p_phy,t_phy, & & q,qt, & - & LOWLYR,SR, & + & LOWLYR,SR,TRAIN_PHY, & & F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY, & & QC,QR,QS, & & RAINNC,RAINNCV, & & threads, & - & ims,ime, jms,jme, lm, & + & ims,ime, lm, & & d_ss, & & refl_10cm,DX1 ) !----------------------------------------------------------------------- IMPLICIT NONE !----------------------------------------------------------------------- - INTEGER,INTENT(IN) :: D_SS,IMS,IME,JMS,JME,LM,DX1 + INTEGER,INTENT(IN) :: D_SS,IMS,IME,LM,DX1 REAL, INTENT(IN) :: DT,RHgrd INTEGER, INTENT(IN) :: THREADS - REAL, INTENT(IN), DIMENSION(ims:ime, jms:jme, lm):: & - & dz8w,p_phy,pi_phy,rho_phy - REAL, INTENT(INOUT), DIMENSION(ims:ime, jms:jme, lm):: & - & th_phy,t_phy,q,qt - REAL, INTENT(INOUT), DIMENSION(ims:ime,jms:jme, lm ) :: & + REAL, INTENT(IN), DIMENSION(ims:ime, lm+1):: & + & prsi + REAL, INTENT(IN), DIMENSION(ims:ime, lm):: & + & p_phy + REAL, INTENT(INOUT), DIMENSION(ims:ime, lm):: & + & q,qt,t_phy + REAL, INTENT(INOUT), DIMENSION(ims:ime, lm ):: & !Aligo Oct 23,2019: dry mixing ratio for cloud species & qc,qr,qs - REAL, INTENT(INOUT), DIMENSION(ims:ime, jms:jme,lm) :: & + REAL, INTENT(INOUT), DIMENSION(ims:ime, lm) :: & & F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY - REAL, INTENT(OUT), DIMENSION(ims:ime, jms:jme,lm) :: & + REAL, INTENT(OUT), DIMENSION(ims:ime, lm) :: & & refl_10cm - REAL, INTENT(INOUT), DIMENSION(ims:ime,jms:jme) :: & + REAL, INTENT(INOUT), DIMENSION(ims:ime) :: & & RAINNC,RAINNCV - REAL, INTENT(OUT), DIMENSION(ims:ime,jms:jme):: SR + REAL, INTENT(OUT), DIMENSION(ims:ime):: SR + REAL, INTENT(OUT), DIMENSION( ims:ime, lm ) :: & + & TRAIN_PHY ! - INTEGER, DIMENSION( ims:ime, jms:jme ),INTENT(INOUT) :: LOWLYR + INTEGER, DIMENSION( ims:ime ),INTENT(INOUT) :: LOWLYR !----------------------------------------------------------------------- ! LOCAL VARS @@ -282,24 +286,22 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & ! the microphysics scheme. Instead, they will be used by Eta precip ! assimilation. - REAL, DIMENSION( ims:ime, jms:jme,lm ) :: & - & TLATGS_PHY,TRAIN_PHY - REAL, DIMENSION(ims:ime,jms:jme):: APREC,PREC,ACPREC + REAL, DIMENSION(ims:ime):: APREC,PREC,ACPREC - INTEGER :: I,J,K,KK + INTEGER :: I,K,KK REAL :: wc !------------------------------------------------------------------------ ! For subroutine EGCP01COLUMN_hr !----------------------------------------------------------------------- INTEGER :: LSFC,I_index,J_index,L - INTEGER,DIMENSION(ims:ime,jms:jme) :: LMH + INTEGER,DIMENSION(ims:ime) :: LMH REAL :: TC,QI,QRdum,QW,Fice,Frain,DUM,ASNOW,ARAIN REAL,DIMENSION(lm) :: P_col,Q_col,T_col,WC_col, & RimeF_col,QI_col,QR_col,QW_col, THICK_col,DPCOL,pcond1d, & pidep1d,piacw1d,piacwi1d,piacwr1d,piacr1d,picnd1d,pievp1d, & pimlt1d,praut1d,pracw1d,prevp1d,pisub1d,pevap1d,DBZ_col, & NR_col,NS_col,vsnow1d,vrain11d,vrain21d,vci1d,NSmICE1d, & - INDEXS1d,INDEXR1d,RFlag1d,RHC_col + INDEXS1d,INDEXR1d,RFlag1d,RHC_col ! !----------------------------------------------------------------------- !********************************************************************** @@ -309,7 +311,7 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & ! MZ: HWRF start !---------- !2015-03-30, recalculate some constants which may depend on phy time step - CALL MY_GROWTH_RATES_NMM_hr (DT) + CALL MY_GROWTH_RATES_NMM_hr (DT) !--- CIACW is used in calculating riming rates ! The assumed effective collection efficiency of cloud water rimed onto @@ -331,93 +333,79 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & ! BRAUT=DT*1.1E10*BETA6/NCW - !write(*,*)'dt=',dt - !write(*,*)'pi=',pi - !write(*,*)'c1=',c1 - !write(*,*)'ciacw=',ciacw - !write(*,*)'ciacr=',ciacr - !write(*,*)'cracw=',cracw - !write(*,*)'araut=',araut - !write(*,*)'braut=',braut !! END OF adding, 2015-03-30 !----------- ! MZ: HWRF end ! - DO j = jms,jme DO i = ims,ime - ACPREC(i,j)=0. - APREC (i,j)=0. - PREC (i,j)=0. - SR (i,j)=0. + ACPREC(i)=0. + APREC (i)=0. + PREC (i)=0. + SR (i)=0. ENDDO + DO k = 1,lm DO i = ims,ime - TLATGS_PHY (i,j,k)=0. - TRAIN_PHY (i,j,k)=0. + TRAIN_PHY (i,k)=0. ENDDO ENDDO - ENDDO !----------------------------------------------------------------------- !-- Start of original driver for EGCP01COLUMN_hr !----------------------------------------------------------------------- ! - DO J=JMS,JME - DO I=IMS,IME - LSFC=LM-LOWLYR(I,J)+1 ! "L" of surface - DO K=1,LM - DPCOL(K)=RHO_PHY(I,J,K)*GRAV*dz8w(I,J,K) - ENDDO + DO I=IMS,IME + LSFC=LM-LOWLYR(I)+1 ! "L" of surface + DO K=1,LM + DPCOL(K)=prsi(I,K)-prsi(I,K+1) + ENDDO ! !--- Initialize column data (1D arrays) ! - L=LM + L=LM !-- qt = CWM, total condensate - IF (qt(I,J,L) .LE. EPSQ) qt(I,J,L)=EPSQ - F_ice_phy(I,J,L)=1. - F_rain_phy(I,J,L)=0. - F_RimeF_phy(I,J,L)=1. + IF (qt(I,L) .LE. EPSQ) qt(I,L)=EPSQ + F_ice_phy(I,L)=1. + F_rain_phy(I,L)=0. + F_RimeF_phy(I,L)=1. do L=LM,1,-1 -! -!--- Pressure (Pa) = (Psfc-Ptop)*(ETA/ETA_sfc)+Ptop -! - P_col(L)=P_phy(I,J,L) + P_col(L)=P_phy(I,L) ! !--- Layer thickness = RHO*DZ = -DP/G = (Psfc-Ptop)*D_ETA/(G*ETA_sfc) ! THICK_col(L)=DPCOL(L)*RGRAV - T_col(L)=T_phy(I,J,L) + T_col(L)=T_phy(I,L) TC=T_col(L)-T0C - Q_col(L)=max(EPSQ, q(I,J,L)) - IF (qt(I,J,L) .LE. EPSQ1) THEN + Q_col(L)=max(EPSQ, q(I,L)) + IF (qt(I,L) .LE. EPSQ1) THEN WC_col(L)=0. IF (TC .LT. T_ICE) THEN - F_ice_phy(I,J,L)=1. + F_ice_phy(I,L)=1. ELSE - F_ice_phy(I,J,L)=0. + F_ice_phy(I,L)=0. ENDIF - F_rain_phy(I,J,L)=0. - F_RimeF_phy(I,J,L)=1. + F_rain_phy(I,L)=0. + F_RimeF_phy(I,L)=1. ELSE - WC_col(L)=qt(I,J,L) + WC_col(L)=qt(I,L) !-- Debug 20120111 ! TC==TC will fail if NaN, preventing unnecessary error messages IF (WC_col(L)>QTwarn .AND. P_col(L)1 g/kg condensate in stratosphere; I,J,L,TC,P,QT=', & - I,J,L,TC,.01*P_col(L),1000.*WC_col(L) + WRITE(0,*) 'WARN4: >1 g/kg condensate in stratosphere; I,L,TC,P,QT=', & + I,L,TC,.01*P_col(L),1000.*WC_col(L) QTwarn=MAX(WC_col(L),10.*QTwarn) Pwarn=MIN(P_col(L),0.5*Pwarn) ENDIF !-- TC/=TC will pass if TC is NaN IF (WARN5 .AND. TC/=TC) THEN - WRITE(0,*) 'WARN5: NaN temperature; I,J,L,P=',I,J,L,.01*P_col(L) + WRITE(0,*) 'WARN5: NaN temperature; I,L,P=',I,L,.01*P_col(L) WARN5=.FALSE. ENDIF ENDIF - IF (T_ICE<=-100.) F_ice_phy(I,J,L)=0. + IF (T_ICE<=-100.) F_ice_phy(I,L)=0. ! ! ! !--- Determine composition of condensate in terms of ! ! cloud water, ice, & rain @@ -426,8 +414,8 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & QI=0. QRdum=0. QW=0. - Fice=F_ice_phy(I,J,L) - Frain=F_rain_phy(I,J,L) + Fice=F_ice_phy(I,L) + Frain=F_rain_phy(I,L) ! IF (Fice .GE. 1.) THEN QI=WC @@ -447,8 +435,8 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & QW=QW-QRdum ENDIF ENDIF - IF (QI .LE. 0.) F_RimeF_phy(I,J,L)=1. - RimeF_col(L)=F_RimeF_phy(I,J,L) ! (real) + IF (QI .LE. 0.) F_RimeF_phy(I,L)=1. + RimeF_col(L)=F_RimeF_phy(I,L) ! (real) QI_col(L)=QI QR_col(L)=QRdum QW_col(L)=QW @@ -469,8 +457,8 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !--- Perform the microphysical calculations in this column ! I_index=I - J_index=J - CALL EGCP01COLUMN_hr ( ARAIN, ASNOW, DT, RHC_col, & + J_index=1 + CALL EGCP01COLUMN_hr ( ARAIN, ASNOW, DT, RHC_col, & & I_index, J_index, LSFC, & & P_col, QI_col, QR_col, Q_col, QW_col, RimeF_col, T_col, & & THICK_col, WC_col,LM,pcond1d,pidep1d, & @@ -483,11 +471,10 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !--- Update storage arrays ! do L=LM,1,-1 - TRAIN_phy(I,J,L)=(T_col(L)-T_phy(I,J,L))/DT - TLATGS_phy(I,J,L)=T_col(L)-T_phy(I,J,L) - T_phy(I,J,L)=T_col(L) - q(I,J,L)=Q_col(L) - qt(I,J,L)=WC_col(L) + TRAIN_phy(I,L)=(T_col(L)-T_phy(I,L))/DT + T_phy(I,L)=T_col(L) + q(I,L)=Q_col(L) + qt(I,L)=WC_col(L) !---convert 1D source/sink terms to one 4D array !---d_ss is the total number of source/sink terms in the 4D mprates array !---if d_ss=1, only 1 source/sink term is used @@ -496,20 +483,20 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !--- REAL*4 array storage ! IF (QI_col(L) .LE. EPSQ) THEN - F_ice_phy(I,J,L)=0. - IF (T_col(L) .LT. T_ICEK) F_ice_phy(I,J,L)=1. - F_RimeF_phy(I,J,L)=1. + F_ice_phy(I,L)=0. + IF (T_col(L) .LT. T_ICEK) F_ice_phy(I,L)=1. + F_RimeF_phy(I,L)=1. ELSE - F_ice_phy(I,J,L)=MAX( 0., MIN(1., QI_col(L)/WC_col(L)) ) - F_RimeF_phy(I,J,L)=MAX(1., RimeF_col(L)) + F_ice_phy(I,L)=MAX( 0., MIN(1., QI_col(L)/WC_col(L)) ) + F_RimeF_phy(I,L)=MAX(1., RimeF_col(L)) ENDIF IF (QR_col(L) .LE. EPSQ) THEN DUM=0 ELSE DUM=QR_col(L)/(QR_col(L)+QW_col(L)) ENDIF - F_rain_phy(I,J,L)=DUM - REFL_10CM(I,J,L)=DBZ_col(L) !jul28 + F_rain_phy(I,L)=DUM + REFL_10CM(I,L)=DBZ_col(L) !jul28 ENDDO ! !--- Update accumulated precipitation statistics @@ -517,63 +504,57 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !--- Surface precipitation statistics; SR is fraction of surface ! precipitation (if >0) associated with snow ! - APREC(I,J)=(ARAIN+ASNOW)*RRHOL ! Accumulated surface precip (depth in m) !<--- Ying - PREC(I,J)=PREC(I,J)+APREC(I,J) - ACPREC(I,J)=ACPREC(I,J)+APREC(I,J) - IF(APREC(I,J) .LT. 1.E-8) THEN - SR(I,J)=0. + APREC(I)=(ARAIN+ASNOW)*RRHOL ! Accumulated surface precip (depth in m) !<--- Ying + PREC(I)=PREC(I)+APREC(I) + ACPREC(I)=ACPREC(I)+APREC(I) + IF(APREC(I) .LT. 1.E-8) THEN + SR(I)=0. ELSE - SR(I,J)=RRHOL*ASNOW/APREC(I,J) + SR(I)=RRHOL*ASNOW/APREC(I) ENDIF ! !####################################################################### !####################################################################### ! enddo ! End "I" loop - enddo ! End "J" loop ! !----------------------------------------------------------------------- !-- End of original driver for EGCP01COLUMN_hr !----------------------------------------------------------------------- ! - DO j = jms,jme do k = lm, 1, -1 DO i = ims,ime - th_phy(i,j,k) = t_phy(i,j,k)/pi_phy(i,j,k) - WC=qt(I,J,K) - QS(I,J,K)=0. - QR(I,J,K)=0. - QC(I,J,K)=0. -! - IF(F_ICE_PHY(I,J,K)>=1.)THEN - QS(I,J,K)=WC - ELSEIF(F_ICE_PHY(I,J,K)<=0.)THEN - QC(I,J,K)=WC + WC=qt(I,K) + QS(I,K)=0. + QR(I,K)=0. + QC(I,K)=0. +! + IF(F_ICE_PHY(I,K)>=1.)THEN + QS(I,K)=WC + ELSEIF(F_ICE_PHY(I,K)<=0.)THEN + QC(I,K)=WC ELSE - QS(I,J,K)=F_ICE_PHY(I,J,K)*WC - QC(I,J,K)=WC-QS(I,J,K) + QS(I,K)=F_ICE_PHY(I,K)*WC + QC(I,K)=WC-QS(I,K) ENDIF ! - IF(QC(I,J,K)>0..AND.F_RAIN_PHY(I,J,K)>0.)THEN - IF(F_RAIN_PHY(I,J,K).GE.1.)THEN - QR(I,J,K)=QC(I,J,K) - QC(I,J,K)=0. + IF(QC(I,K)>0..AND.F_RAIN_PHY(I,K)>0.)THEN + IF(F_RAIN_PHY(I,K).GE.1.)THEN + QR(I,K)=QC(I,K) + QC(I,K)=0. ELSE - QR(I,J,K)=F_RAIN_PHY(I,J,K)*QC(I,J,K) - QC(I,J,K)=QC(I,J,K)-QR(I,J,K) + QR(I,K)=F_RAIN_PHY(I,K)*QC(I,K) + QC(I,K)=QC(I,K)-QR(I,K) ENDIF ENDIF ENDDO !- i ENDDO !- k - ENDDO !- j ! !- Update rain (convert from m to kg/m**2, which is also equivalent to mm depth) ! - DO j=jms,jme DO i=ims,ime - RAINNC(i,j)=APREC(i,j)*1000.+RAINNC(i,j) - RAINNCV(i,j)=APREC(i,j)*1000. - ENDDO + RAINNC(i)=APREC(i)*1000.+RAINNC(i) + RAINNCV(i)=APREC(i)*1000. ENDDO ! !----------------------------------------------------------------------- @@ -639,16 +620,38 @@ END SUBROUTINE FER_HIRES !!\param qi_col vertical column of model ice mixing ratio (kg/kg) !!\param qr_col vertical column of model rain ratio (kg/kg) !!\param q_col vertical column of model water vapor specific humidity (kg/kg) -!!\param qw_col -!!\param rimef_col -!!\param t_col -!!\param thick_col -!!\param wc_col -!!\param lm -!!\param pcond1d -!!\param pidep1d -!!\param piacw1d -!!\param piacwi1d +!!\param qw_col vertical column of model cloud water mixing ratio (kg/kg) +!!\param rimef_col vertical column of rime factor for ice in model (ratio, defined below) +!!\param t_col vertical column of model temperature (deg K) +!!\param thick_col vertical column of model mass thickness (density*height increment) +!!\param wc_col vertical column of model mixing ratio of total condensate (kg/kg) +!!\param lm vertical dimension +!!\param pcond1d net cloud water condensation (>0) or evaporation (<0) (kg/kg) +!!\param pidep1d net ice deposition (>0) or sublimation (<0) (kg/kg) +!!\param piacw1d cloud water collection by precipitation ice (kg/kg) +!!\param piacwi1d cloud water riming onto precipitation ice at <0 (kg/kg) +!!\param piacwr1d accreted cloud water shed to form rain at >0 (kg/kg) +!!\param piacr1d freezing of supercooled rain to precipitation ice (kg/kg) +!!\param picnd1d condensation onto wet, melting ice (kg/kg) +!!\param pievp1d evaporation from wet, melting ice (kg/kg) +!!\param pimlt1d melting of precipitation ice to form rain (kg/kg) +!!\param praut1d droplet self_collection (autoconversion) to form rain (kg/kg) +!!\param pracw1d cloud water collection (accretion) by rain (kg/kg) +!!\param prevp1d rain evaporation (kg/kg) +!!\param pisub1d +!!\param pevap1d +!!\param DBZ_col vertical column of radar reflectivity (dBZ) +!!\param NR_col vertical column of rain number concentration (m^-3) +!!\param NS_col vertical column of snow number concentration (m^-3) +!!\param vsnow1d fall speed of rimed snow w/ air resistance correction +!!\param vrain11d fall speed of rain into grid from above (m/s) +!!\param vrain21d fall speed of rain out of grid box to the level below (m/s) +!!\param vci1d Fall speed of 50-micron ice crystals w/ air resistance correction +!!\param NSmICE1d number concentration of small ice crystals at current level +!!\param INDEXS1d +!!\param INDEXR1d +!!\param RFlag1d +!!\param DX1 SUBROUTINE EGCP01COLUMN_hr ( ARAIN, ASNOW, DTPH, RHC_col, & & I_index, J_index, LSFC, & & P_col, QI_col, QR_col, Q_col, QW_col, RimeF_col, T_col, & diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index 95e521141..19cfa117a 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -1,5 +1,5 @@ !>\file mp_fer_hires.F90 -!! This file contains +!! This file contains the Ferrier-Aligo microphysics scheme driver. ! module mp_fer_hires @@ -113,7 +113,7 @@ subroutine mp_fer_hires_init(ncol, nlev, dtp, imp_physics, & end subroutine mp_fer_hires_init -!>\defgroup hafs_famp HAFS Ferrier-Aligo Cloud Microphysics Scheme +!>\defgroup hafs_famp HWRF Ferrier-Aligo Microphysics Scheme !> This is the CCPP-compliant FER_HIRES driver module. !> \section arg_table_mp_fer_hires_run Argument Table !! \htmlinclude mp_fer_hires_run.html @@ -124,9 +124,8 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ,T,Q,CWM & ,TRAIN,SR & ,F_ICE,F_RAIN,F_RIMEF & - ,QC,QR,QI,QG & ! wet mixing ratio - !,qc_m,qi_m,qr_m & - ,PREC &!,ACPREC -MZ:not used + ,QC,QR,QI,QG & + ,PREC & ,mpirank, mpiroot, threads & ,refl_10cm & ,RHGRD,dx & @@ -171,7 +170,6 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & real(kind_phys), intent(inout) :: qg(1:ncol,1:nlev) ! QRIMEF real(kind_phys), intent(inout) :: prec(1:ncol) -! real(kind_phys) :: acprec(1:ncol) !MZ: change to local real(kind_phys), intent(inout) :: refl_10cm(1:ncol,1:nlev) real(kind_phys), intent(in ) :: rhgrd real(kind_phys), intent(in ) :: dx(1:ncol) @@ -185,27 +183,19 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & integer :: I,J,K,N integer :: lowlyr(1:ncol) integer :: dx1 - !real(kind_phys) :: mprates(1:ncol,1:nlev,d_ss) - real(kind_phys) :: DTPHS,PCPCOL,RDTPHS,TNEW + real(kind_phys) :: PCPCOL real(kind_phys) :: ql(1:nlev),tl(1:nlev) real(kind_phys) :: rainnc(1:ncol),rainncv(1:ncol) real(kind_phys) :: snownc(1:ncol),snowncv(1:ncol) real(kind_phys) :: graupelncv(1:ncol) - real(kind_phys) :: dz(1:ncol,1:nlev) - real(kind_phys) :: pi_phy(1:ncol,1:nlev) - real(kind_phys) :: rr(1:ncol,1:nlev) - real(kind_phys) :: th_phy(1:ncol,1:nlev) - real(kind_phys) :: R_G, CAPPA + real(kind_phys) :: train_phy(1:ncol,1:nlev) ! Dimension - integer :: ims, ime, jms, jme, lm + integer :: ims, ime, lm !----------------------------------------------------------------------- !*********************************************************************** !----------------------------------------------------------------------- - R_G=1./G - CAPPA=R_D/CP - ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 @@ -217,18 +207,9 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & return end if - -!ZM NTSD=ITIMESTEP -!ZM presume nphs=1 DTPHS=NPHS*DT - DTPHS=DT - RDTPHS=1./DTPHS -!ZM AVRAIN=AVRAIN+1. - ! Set internal dimensions ims = 1 ime = ncol - jms = 1 - jme = 1 lm = nlev ! Use the dx of the 1st i point to set an integer value of dx to be used for @@ -266,18 +247,8 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !*** FILL THE SINGLE-COLUMN INPUT !----------------------------------------------------------------------- ! - DO K=LM,1,-1 ! We are moving down from the top in the flipped arrays + DO K=LM,1,-1 !mz* We are moving down from the top in the flipped arrays -! -! TL(K)=T(I,K) -! QL(K)=AMAX1(Q(I,K),EPSQ) -! - RR(I,K)=P_PHY(I,K)/(R_D*T(I,K)*(P608*AMAX1(Q(I,K),EPSQ)+1.)) - PI_PHY(I,K)=(P_PHY(I,K)*1.E-5)**CAPPA - TH_PHY(I,K)=T(I,K)/PI_PHY(I,K) - DZ(I,K)=(PRSI(I,K)-PRSI(I,K+1))*R_G/RR(I,K) - -! !*** CALL MICROPHYSICS !MZ* in HWRF @@ -289,7 +260,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & IF (T(I,K) < T_ICEK) F_ICE(I,K)=1. ELSE F_ICE(I,K)=MAX( 0., MIN(1., QI(I,K)/cwm(I,K) ) ) - F_RIMEF(I,K)=QG(I,K)/QI(I,K) + F_RIMEF(I,K)=QG(I,K)!/QI(I,K) ENDIF IF (QR(I,K) <= EPSQ) THEN F_RAIN(I,K)=0. @@ -297,38 +268,30 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & F_RAIN(I,K)=QR(I,K)/(QR(I,K)+QC(I,K)) ENDIF - end do - enddo - -!--------------------------------------------------------------------- -!*** Update the rime factor array after 3d advection -!--------------------------------------------------------------------- -!MZ* in namphysics -! DO K=1,LM -! DO I=IMS,IME -! IF (QG(I,K)>EPSQ .AND. QI(I,K)>EPSQ) THEN -! F_RIMEF(I,K)=MIN(50.,MAX(1.,QG(I,K)/QI(I,K))) -! ELSE -! F_RIMEF(I,K)=1. -! ENDIF -! ENDDO -! ENDDO + ENDDO + ENDDO +!--------------------------------------------------------------------- +!aligo + cwm(i,k) = cwm(i,k)/(1.0_kind_phys-q(i,k)) + qr(i,k) = qr(i,k)/(1.0_kind_phys-q(i,k)) + qi(i,k) = qi(i,k)/(1.0_kind_phys-q(i,k)) + qc(i,k) = qc(i,k)/(1.0_kind_phys-q(i,k)) +!aligo !--------------------------------------------------------------------- CALL FER_HIRES( & - DT=dtphs,RHgrd=RHGRD & - ,DZ8W=dz,RHO_PHY=rr,P_PHY=p_phy,PI_PHY=pi_phy & - ,TH_PHY=th_phy,T_PHY=t & + DT=DT,RHgrd=RHGRD & + ,PRSI=prsi,P_PHY=p_phy,T_PHY=t & ,Q=Q,QT=cwm & - ,LOWLYR=LOWLYR,SR=SR & + ,LOWLYR=LOWLYR,SR=SR,TRAIN_PHY=train_phy & ,F_ICE_PHY=F_ICE,F_RAIN_PHY=F_RAIN & ,F_RIMEF_PHY=F_RIMEF & ,QC=QC,QR=QR,QS=QI & ,RAINNC=rainnc,RAINNCV=rainncv & ,threads=threads & - ,IMS=IMS,IME=IME,JMS=JMS,JME=JME,LM=LM & + ,IMS=IMS,IME=IME,LM=LM & ,D_SS=d_ss & ,refl_10cm=refl_10cm,DX1=DX1) @@ -336,17 +299,15 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !....................................................................... !MZ* -!Aligo Oct-23-2019 +!Aligo Oct-23-2019 ! - Convert dry qc,qr,qi back to wet mixing ratio -! DO K = 1, LM -! DO I= IMS, IME -! qc_m(i,k) = qc(i,k)/(1.0_kind_phys+q(i,k)) -! qi_m(i,k) = qi(i,k)/(1.0_kind_phys+q(i,k)) -! qr_m(i,k) = qr(i,k)/(1.0_kind_phys+q(i,k)) -! ENDDO -! ENDDO - - + DO K = 1, LM + DO I= IMS, IME + qc(i,k) = qc(i,k)/(1.0_kind_phys+q(i,k)) + qi(i,k) = qi(i,k)/(1.0_kind_phys+q(i,k)) + qr(i,k) = qr(i,k)/(1.0_kind_phys+q(i,k)) + ENDDO + ENDDO !----------------------------------------------------------- DO K=1,LM @@ -366,9 +327,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !*** UPDATE TEMPERATURE, SPECIFIC HUMIDITY, CLOUD WATER, AND HEATING. !----------------------------------------------------------------------- ! - TNEW=TH_PHY(I,K)*PI_PHY(I,K) - TRAIN(I,K)=TRAIN(I,K)+(TNEW-T(I,K))*RDTPHS - T(I,K)=TNEW + TRAIN(I,K)=TRAIN(I,K)+TRAIN_PHY(I,K) ENDDO ENDDO diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 96c3dd664..0d3f75c71 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -868,22 +868,24 @@ end subroutine progcld1 !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops !!\param mbot (IX,3), vertical indices for low, mid, hi cloud bases !!\param de_lgth (IX), clouds decorrelation length (km) -!>\section gen_progcld2 progcld2 General Algorithm +!>\section gen_progcld2 progcld2 General Algorithm for the F-A MP scheme !> @{ subroutine progcld2 & - & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: - & xlat,xlon,slmsk,dz,delp, f_ice,f_rain,r_rime,flgmin, & - & IX, NLAY, NLP1, lmfshal, lmfdeep2, & + & ( plyr,plvl,tlyr,qlyr,qstl,rhly,tvly,clw, & ! --- inputs: + & xlat,xlon,slmsk,dz,delp, & + & ntrac, ntcw, ntiw, ntrw, & + & IX, NLAY, NLP1, & + & lmfshal, lmfdeep2, & & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! ! ! ! subprogram: progcld2 computes cloud related quantities using ! -! ferrier's prognostic cloud microphysics scheme. ! +! Thompson/WSM6 cloud microphysics scheme. ! ! ! ! abstract: this program computes cloud fractions from cloud ! -! condensates, calculates liquid/ice cloud droplet effective radius, ! +! condensates, ! ! and computes the low, mid, high, total and boundary layer cloud ! ! fractions and the vertical indices of low, mid, and high cloud ! ! top and base. the three vertical cloud domains are set up in the ! @@ -908,11 +910,6 @@ subroutine progcld2 & ! qlyr (IX,NLAY) : layer specific humidity in gm/gm ! ! qstl (IX,NLAY) : layer saturate humidity in gm/gm ! ! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) ! -! clw (IX,NLAY) : layer cloud condensate amount ! -! f_ice (IX,NLAY) : fraction of layer cloud ice (ferrier micro-phys) ! -! f_rain(IX,NLAY) : fraction of layer rain water (ferrier micro-phys) ! -! r_rime(IX,NLAY) : mass ratio of total ice to unrimed ice (>=1) ! -! flgmin(IX) : minimim large ice fraction ! ! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2! ! range, otherwise see in-line comment ! ! xlon (IX) : grid longitude in radians (not used) ! @@ -921,6 +918,8 @@ subroutine progcld2 & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! lmfshal : logical - true for mass flux shallow convection ! +! lmfdeep2 : logical - true for mass flux deep convection ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -929,9 +928,9 @@ subroutine progcld2 & ! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! ! clouds(:,:,4) - layer cloud ice water path (g/m**2) ! ! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! -! clouds(:,:,6) - layer rain drop water path (g/m**2) ! +! clouds(:,:,6) - layer rain drop water path not assigned ! ! clouds(:,:,7) - mean eff radius for rain drop (micron) ! -! *** clouds(:,:,8) - layer snow flake water path (g/m**2) ! +! *** clouds(:,:,8) - layer snow flake water path not assigned ! ! clouds(:,:,9) - mean eff radius for snow flake (micron) ! ! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) ! ! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! @@ -939,7 +938,7 @@ subroutine progcld2 & ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! ! ! -! external module variables: ! +! module variables: ! ! ivflip : control flag of vertical index direction ! ! =0: index from toa to surface ! ! =1: index from surface to toa ! @@ -951,28 +950,24 @@ subroutine progcld2 & ! lcnorm : control flag for in-cld condensate ! ! =t: normalize cloud condensate ! ! =f: not normalize cloud condensate ! -! lnoprec : precip effect in radiation flag (ferrier scheme) ! -! =t: snow/rain has no impact on radiation ! -! =f: snow/rain has impact on radiation ! ! ! ! ==================== end of description ===================== ! ! implicit none -! --- constants - ! --- inputs integer, intent(in) :: IX, NLAY, NLP1 + integer, intent(in) :: ntrac, ntcw, ntiw, ntrw logical, intent(in) :: lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, tvly, qlyr, qstl, rhly, clw, f_ice, f_rain, r_rime, & - & dz, delp + & tlyr, qlyr, qstl, rhly, tvly, delp, dz + + real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk - real (kind=kind_phys), dimension(:), intent(in) :: flgmin ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds @@ -984,15 +979,14 @@ subroutine progcld2 & ! --- local variables: real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, & - & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clw2, & - & qcwat, qcice, qrain, fcice, frain, rrime, rsden, clwf + & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix) real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 - integer :: i, k, id + integer :: i, k, id, nf ! --- constant values ! real (kind=kind_phys), parameter :: xrc3 = 200. @@ -1001,9 +995,15 @@ subroutine progcld2 & ! !===> ... begin here ! + do nf=1,nf_clds + do k=1,nlay + do i=1,ix + clouds(i,k,nf) = 0.0 + enddo + enddo + enddo ! clouds(:,:,:) = 0.0 -!> - Assign water/ice/rain/snow cloud properties for Ferrier scheme. do k = 1, NLAY do i = 1, IX cldtot(i,k) = 0.0 @@ -1012,39 +1012,23 @@ subroutine progcld2 & cip (i,k) = 0.0 crp (i,k) = 0.0 csp (i,k) = 0.0 - rew (i,k) = reliq_def ! default liq radius to 10 micron - rei (i,k) = reice_def ! default ice radius to 50 micron + rew (i,k) = reliq_def + rei (i,k) = reice_def rer (i,k) = rrain_def ! default rain radius to 1000 micron - res (i,k) = rsnow_def ! default snow radius to 250 micron - fcice (i,k) = max(0.0, min(1.0, f_ice(i,k))) - frain (i,k) = max(0.0, min(1.0, f_rain(i,k))) - rrime (i,k) = max(1.0, r_rime(i,k)) - tem2d (i,k) = tlyr(i,k) - con_t0c + res (i,k) = rsnow_def + clwf(i,k) = 0.0 enddo enddo ! - if ( lcrick ) then - do i = 1, IX - clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2) - clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1) - enddo - do k = 2, NLAY-1 - do i = 1, IX - clwf(i,K) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1) - enddo - enddo - else - do k = 1, NLAY + + do k = 1, NLAY do i = 1, IX - clwf(i,k) = clw(i,k) + clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) enddo - enddo - endif - -!> - Compute SFC/low/middle/high cloud top pressure for each cloud -!! domain for given latitude. -! - ptopc(k,i): top pressure of each cld domain (k=1-4 are sfc,l,m, -!! h; i=1,2 are low-lat (<45 degree) and pole regions) + enddo +!> - Find top pressure for each cloud domain for given latitude. +!! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; +!! i=1,2 are low-lat (<45 degree) and pole regions) do i =1, IX rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range @@ -1059,76 +1043,61 @@ subroutine progcld2 & enddo enddo -!> - Seperate cloud condensate into liquid, ice, and rain types, and -!! save the liquid+ice condensate in array clw2 for later calculation -!! of cloud fraction. +!> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . do k = 1, NLAY - do i = 1, IX - if (tem2d(i,k) > -40.0) then - qcice(i,k) = clwf(i,k) * fcice(i,k) - tem1 = clwf(i,k) - qcice(i,k) - qrain(i,k) = tem1 * frain(i,k) - qcwat(i,k) = tem1 - qrain(i,k) - clw2 (i,k) = qcwat(i,k) + qcice(i,k) - else - qcice(i,k) = clwf(i,k) - qrain(i,k) = 0.0 - qcwat(i,k) = 0.0 - clw2 (i,k) = clwf(i,k) - endif - enddo + do i = 1, IX + cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k)) + cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k)) + crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) + csp(i,k) = 0.0 + enddo enddo -!> - Call module_microphysics::rsipath2(), in Ferrier's scheme, to -!! compute layer's cloud liquid, ice, rain, and snow water condensate -!! path and the partical effective radius for liquid droplet, rain drop, -!! and snow flake. - call rsipath2 & -! --- inputs: - & ( plyr, plvl, tlyr, qlyr, qcwat, qcice, qrain, rrime, & - & IX, NLAY, ivflip, flgmin, & -! --- outputs: - & cwp, cip, crp, csp, rew, rer, res, rsden & - & ) +!> - Compute cloud ice effective radii + + do k = 1, NLAY + do i = 1, IX + tem2 = tlyr(i,k) - con_ttp + if (cip(i,k) > 0.0) then + tem3 = gord * cip(i,k) * plyr(i,k) / (delp(i,k)*tvly(i,k)) - do k = 1, NLAY - do i = 1, IX - tem2d(i,k) = (con_g * plyr(i,k)) & - & / (con_rd* delp(i,k)) + if (tem2 < -50.0) then + rei(i,k) = (1250.0/9.917) * tem3 ** 0.109 + elseif (tem2 < -40.0) then + rei(i,k) = (1250.0/9.337) * tem3 ** 0.08 + elseif (tem2 < -30.0) then + rei(i,k) = (1250.0/9.208) * tem3 ** 0.055 + else + rei(i,k) = (1250.0/9.387) * tem3 ** 0.031 + endif + rei(i,k) = max(10.0, min(rei(i,k), 150.0)) + endif enddo - enddo + enddo + !> - Calculate layer cloud fraction. - clwmin = 0.0e-6 + clwmin = 0.0 if (.not. lmfshal) then do k = 1, NLAY do i = 1, IX -! clwt = 1.0e-7 * (plyr(i,k)*0.001) -! clwt = 1.0e-6 * (plyr(i,k)*0.001) - clwt = 2.0e-6 * (plyr(i,k)*0.001) -! clwt = 5.0e-6 * (plyr(i,k)*0.001) -! clwt = 5.0e-6 + clwt = 1.0e-6 * (plyr(i,k)*0.001) +! clwt = 2.0e-6 * (plyr(i,k)*0.001) + + if (clwf(i,k) > clwt) then - if (clw2(i,k) > clwt) then onemrh= max( 1.e-10, 1.0-rhly(i,k) ) clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) -! tem1 = min(max(sqrt(onemrh*qstl(i,k)),0.0001),1.0) -! tem1 = 100.0 / tem1 - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) tem1 = 2000.0 / tem1 -! tem1 = 2400.0 / tem1 -!cnt tem1 = 2500.0 / tem1 -! tem1 = min(max(sqrt(onemrh*qstl(i,k)),0.0001),1.0) -! tem1 = 2000.0 / tem1 + ! tem1 = 1000.0 / tem1 -! tem1 = 100.0 / tem1 - value = max( min( tem1*(clw2(i,k)-clwm), 50.0 ), 0.0 ) + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhly(i,k)) ) cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) @@ -1138,21 +1107,21 @@ subroutine progcld2 & else do k = 1, NLAY do i = 1, IX -! clwt = 1.0e-6 * (plyr(i,k)*0.001) - clwt = 2.0e-6 * (plyr(i,k)*0.001) + clwt = 1.0e-6 * (plyr(i,k)*0.001) +! clwt = 2.0e-6 * (plyr(i,k)*0.001) - if (clw2(i,k) > clwt) then + if (clwf(i,k) > clwt) then onemrh= max( 1.e-10, 1.0-rhly(i,k) ) clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) ! - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan if (lmfdeep2) then tem1 = xrc3 / tem1 else tem1 = 100.0 / tem1 endif ! - value = max( min( tem1*(clw2(i,k)-clwm), 50.0 ), 0.0 ) + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhly(i,k)) ) cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) @@ -1173,16 +1142,6 @@ subroutine progcld2 & enddo enddo -!> - When lnoprec = .true. snow/rain has no impact on radiation. - if ( lnoprec ) then - do k = 1, NLAY - do i = 1, IX - crp(i,k) = 0.0 - csp(i,k) = 0.0 - enddo - enddo - endif -! if ( lcnorm ) then do k = 1, NLAY do i = 1, IX @@ -1197,38 +1156,6 @@ subroutine progcld2 & enddo endif -!> - Calculate effective ice cloud droplet radius following Heymsfield and McFarquhar (1996) -!! \cite heymsfield_and_mcfarquhar_1996 . - - do k = 1, NLAY - do i = 1, IX - tem1 = tlyr(i,k) - con_ttp - tem2 = cip(i,k) - - if (tem2 > 0.0) then - tem3 = tem2d(i,k) * tem2 / tvly(i,k) - - if (tem1 < -50.0) then - rei(i,k) = (1250.0/9.917) * tem3 ** 0.109 - elseif (tem1 < -40.0) then - rei(i,k) = (1250.0/9.337) * tem3 ** 0.08 - elseif (tem1 < -30.0) then - rei(i,k) = (1250.0/9.208) * tem3 ** 0.055 - else - rei(i,k) = (1250.0/9.387) * tem3 ** 0.031 - endif - -! if (lprnt .and. k == l) print *,' reiL=',rei(i,k),' icec=', & -! & icec,' cip=',cip(i,k),' tem=',tem,' delt=',delt - - rei(i,k) = max(10.0, min(rei(i,k), 300.0)) -! rei(i,k) = max(20.0, min(rei(i,k), 300.0)) -!!!! rei(i,k) = max(30.0, min(rei(i,k), 300.0)) -! rei(i,k) = max(50.0, min(rei(i,k), 300.0)) -! rei(i,k) = max(100.0, min(rei(i,k), 300.0)) - endif - enddo - enddo ! do k = 1, NLAY do i = 1, IX @@ -1237,10 +1164,9 @@ subroutine progcld2 & clouds(i,k,3) = rew(i,k) clouds(i,k,4) = cip(i,k) clouds(i,k,5) = rei(i,k) - clouds(i,k,6) = crp(i,k) + clouds(i,k,6) = crp(i,k) ! added for Thompson clouds(i,k,7) = rer(i,k) -! clouds(i,k,8) = csp(i,k) !ncar scheme - clouds(i,k,8) = csp(i,k) * rsden(i,k) !fu's scheme + clouds(i,k,8) = csp(i,k) ! added for Thompson clouds(i,k,9) = res(i,k) enddo enddo @@ -1254,9 +1180,11 @@ subroutine progcld2 & enddo endif -!> - Call gethml(), to compute low, mid, high, total, and boundary -!! layer cloud fractions and clouds top/bottom layer indices for low, -!! mid, and high clouds. +!> - Call gethml() to compute low,mid,high,total, and boundary layer +!! cloud fractions and clouds top/bottom layer indices for low, mid, +!! and high clouds. +! --- compute low, mid, high, total, and boundary layer cloud fractions +! and clouds top/bottom layer indices for low, mid, and high clouds. ! The three cloud domain boundaries are defined by ptopc. The cloud ! overlapping method is defined by control flag 'iovr', which may ! be different for lw and sw radiation programs. @@ -1274,6 +1202,8 @@ subroutine progcld2 & return !................................... end subroutine progcld2 +!................................... + !> @} !----------------------------------- From f9f34e6862d75d8b3cc6d0fc6776f1e1ddeef716 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Wed, 1 Apr 2020 13:46:23 +0000 Subject: [PATCH 082/404] updates to old sfc pert team - does not compile --- physics/GFS_MP_generic.meta | 4 +- physics/GFS_debug.F90 | 2 +- physics/GFS_rrtmg_pre.F90 | 13 +++--- physics/GFS_surface_generic.F90 | 74 ++++++++++++++----------------- physics/GFS_surface_generic.meta | 75 ++++++++++---------------------- physics/radiation_surface.f | 6 +-- physics/rrtmg_sw_pre.F90 | 14 +++++- physics/sfc_drv.f | 6 +-- physics/sfc_drv.meta | 4 +- 9 files changed, 87 insertions(+), 111 deletions(-) diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index ddf8cb813..933ba96fe 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -715,8 +715,8 @@ intent = inout optional = F [do_sppt] - standard_name = flag_for_stochastic_surface_physics_perturbations - long_name = flag for stochastic surface physics perturbations + standard_name = flag_for_stochastic_physics_perturbations + long_name = flag for stochastic physics perturbations units = flag dimensions = () type = logical diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 6bf39d491..326a4ff57 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -474,7 +474,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Coupling%skebu_wts', Coupling%skebu_wts ) call print_var(mpirank,omprank, blkno, 'Coupling%skebv_wts', Coupling%skebv_wts ) end if - if (Model%do_sfcperts) then + if (Model%lndp_type .NE. 0) then call print_var(mpirank,omprank, blkno, 'Coupling%sfc_wts' , Coupling%sfc_wts ) end if if (Model%do_ca) then diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 381930d49..494dc24b8 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -790,12 +790,15 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! perturbation size ! --- turn vegetation fraction pattern into percentile pattern alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then - do i=1,im - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + if (Model%lndp_type==1) then + do k =1,Model%n_var_lndp + if (Model%lndp_var_list(k) == 'alb') then + do i=1,im + call cdfnor(Coupling%sfc_wts(i,k),alb1d(i)) + !lndp_alb = Model%lndp_prt_list(k) + enddo + endif enddo - endif endif ! mg, sfc-perts diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index ac366ae54..e303b010f 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -28,14 +28,15 @@ end subroutine GFS_surface_generic_pre_finalize subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, stype, vtype, slope, & prsik_1, prslk_1, tsfc, phil, con_g, & sigmaf, soiltyp, vegtype, slopetyp, work3, tsurf, zlvl, do_sppt, dtdtr, & - drain_cpl, dsnow_cpl, rain_cpl, snow_cpl, do_sfcperts, nsfcpert, sfc_wts, & - pertz0, pertzt, pertshc, pertlai, pertvegf, z01d, zt1d, bexp1d, xlai1d, vegf1d, & + drain_cpl, dsnow_cpl, rain_cpl, snow_cpl, lndp_type, n_var_lndp, sfc_wts, & + lndp_var_list, lndp_prt_list, & + z01d, zt1d, bexp1d, xlai1d, vegf1d, & cplflx, flag_cice, islmsk_cice, slimskin_cpl, tisfc, tsfco, fice, hice, & wind, u1, v1, cnvwind, smcwlt2, smcref2, errmsg, errflg) - use surface_perturbation, only: cdfnor + use surface_perturbation, only: cdfnor - implicit none + implicit none ! Interface variables integer, intent(in) :: im, levs, isot, ivegsrc @@ -57,14 +58,11 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, real(kind=kind_phys), dimension(im), intent(out) :: dsnow_cpl real(kind=kind_phys), dimension(im), intent(in) :: rain_cpl real(kind=kind_phys), dimension(im), intent(in) :: snow_cpl - logical, intent(in) :: do_sfcperts - integer, intent(in) :: nsfcpert + integer, intent(in) :: lndp_type + integer, intent(in) :: n_var_lndp + character(len=3), dimension(n_var_lndp), intent(in) :: lndp_var_list + real(kind=kind_phys), dimension(n_var_lndp), intent(in) :: lndp_prt_list real(kind=kind_phys), dimension(im,nsfcpert), intent(in) :: sfc_wts - real(kind=kind_phys), dimension(:), intent(in) :: pertz0 - real(kind=kind_phys), dimension(:), intent(in) :: pertzt - real(kind=kind_phys), dimension(:), intent(in) :: pertshc - real(kind=kind_phys), dimension(:), intent(in) :: pertlai - real(kind=kind_phys), dimension(:), intent(in) :: pertvegf real(kind=kind_phys), dimension(im), intent(out) :: z01d real(kind=kind_phys), dimension(im), intent(out) :: zt1d real(kind=kind_phys), dimension(im), intent(out) :: bexp1d @@ -90,9 +88,9 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, integer, intent(out) :: errflg ! Local variables - integer :: i + integer :: i, k real(kind=kind_phys) :: onebg - real(kind=kind_phys) :: cdfz + real(kind=kind_phys) :: cdfz, lndp_vgf ! Set constants onebg = 1.0/con_g @@ -108,34 +106,28 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, ! Scale random patterns for surface perturbations with perturbation size ! Turn vegetation fraction pattern into percentile pattern - if (do_sfcperts) then - if (pertz0(1) > 0.) then - z01d(:) = pertz0(1) * sfc_wts(:,1) -! if (me == 0) print*,'sfc_wts(:,1) min and max',minval(sfc_wts(:,1)),maxval(sfc_wts(:,1)) -! if (me == 0) print*,'z01d min and max ',minval(z01d),maxval(z01d) - endif - if (pertzt(1) > 0.) then - zt1d(:) = pertzt(1) * sfc_wts(:,2) - endif - if (pertshc(1) > 0.) then - bexp1d(:) = pertshc(1) * sfc_wts(:,3) - endif - if (pertlai(1) > 0.) then - xlai1d(:) = pertlai(1) * sfc_wts(:,4) - endif -! --- do the albedo percentile calculation in GFS_radiation_driver instead --- ! -! if (pertalb(1) > 0.) then -! do i=1,im -! call cdfnor(sfc_wts(i,5),cdfz) -! alb1d(i) = cdfz -! enddo -! endif - if (pertvegf(1) > 0.) then - do i=1,im - call cdfnor(sfc_wts(i,6),cdfz) - vegf1d(i) = cdfz - enddo - endif + lndp_vgf=-999. + + if (lndp_type==1) then + do k =1,n_var_lndp + select case(lndp_var_list(k)) + case ('rz0') + z01d(:) = lndp_prt_list(k)* sfc_wts(:,k) + case ('rzt') + zt1d(:) = lndp_prt_list(k)* sfc_wts(:,k) + case ('shc') + bexp1d(:) = lndp_prt_list(k) * sfc_wts(:,k) + case ('lai') + xlai1d(:) = lndp_prt_list(k)* sfc_wts(:,k) + case ('vgf') + ! note that the pertrubed vegfrac is being used in sfc_drv, but not sfc_diff + do i=1,im + call cdfnor(sfc_wts(i,k),cdfz) + vegf1d(i) = cdfz + enddo + lndp_vgf = Model%lndp_prt_list(k) + end select + enddo endif ! End of stochastic physics / surface perturbation diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index 250f7a2bd..cb90b0c8b 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -183,8 +183,8 @@ intent = inout optional = F [do_sppt] - standard_name = flag_for_stochastic_surface_physics_perturbations - long_name = flag for stochastic surface physics perturbations + standard_name = flag_for_stochastic_physics_perturbations + long_name = flag for stochastic physics perturbations units = flag dimensions = () type = logical @@ -235,17 +235,17 @@ kind = kind_phys intent = in optional = F -[do_sfcperts] - standard_name = flag_for_stochastic_surface_perturbations - long_name = flag for stochastic surface perturbations option - units = flag +[lndp_type] + standard_name = index_for_stochastic_land_surface_perturbation_type + long_name = index for stochastic land surface perturbations type + units = index dimensions = () - type = logical + type = integer intent = in optional = F -[nsfcpert] - standard_name = number_of_surface_perturbations - long_name = number of surface perturbations +[n_var_lndp] + standard_name = number_of_land_surface_variables_perturbed + long_name = number of land surface perturbations units = count dimensions = () type = integer @@ -260,51 +260,20 @@ kind = kind_phys intent = in optional = F -[pertz0] - standard_name = magnitude_of_perturbation_of_momentum_roughness_length - long_name = magnitude of perturbation of momentum roughness length - units = frac - dimensions = (5) - type = real - kind = kind_phys - intent = in - optional = F -[pertzt] - standard_name = magnitude_of_perturbation_of_heat_to_momentum_roughness_length_ratio - long_name = magnitude of perturbation of heat to momentum roughness length r. - units = frac - dimensions = (5) - type = real - kind = kind_phys - intent = in - optional = F -[pertshc] - standard_name = magnitude_of_perturbation_of_soil_type_b_parameter - long_name = magnitude of perturbation of soil type b parameter - units = frac - dimensions = (5) +[lndp_prt_list] + standard_name =magnitude_of_perturbations_for_landperts + long_name = magnitude of perturbations for landperts + units = variable + dimensions = (max_n_var_lndp) type = real kind = kind_phys - intent = in - optional = F -[pertlai] - standard_name = magnitude_of_perturbation_of_leaf_area_index - long_name = magnitude of perturbation of leaf area index - units = frac - dimensions = (5) - type = real - kind = kind_phys - intent = in - optional = F -[pertvegf] - standard_name = magnitude_of_perturbation_of_vegetation_fraction - long_name = magnitude of perturbation of vegetation fraction - units = frac - dimensions = (5) - type = real - kind = kind_phys - intent = in - optional = F +[lndp_var_list] + standard_name = variables_to_be_perturbed_for_landperts + long_name = variables to be perturbed for landperts + units = none + dimensions = (max_n_var_lndp) + type = character + kind = len=3 [z01d] standard_name = perturbation_of_momentum_roughness_length long_name = perturbation of momentum roughness length diff --git a/physics/radiation_surface.f b/physics/radiation_surface.f index a2cbf55ac..f0cbdd18a 100644 --- a/physics/radiation_surface.f +++ b/physics/radiation_surface.f @@ -390,7 +390,7 @@ subroutine setalb & & slmsk, snowf, zorlf, coszf, tsknf, tairf, hprif, & & alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, & & sncovr, snoalb, albPpert ! sfc-perts, mgehne - real (kind=kind_phys), dimension(5), intent(in) :: pertalb ! sfc-perts, mgehne + real (kind=kind_phys), intent(in) :: pertalb ! sfc-perts, mgehne ! --- outputs real (kind=kind_phys), dimension(IMAX,NF_ALBD), intent(out) :: & @@ -628,12 +628,12 @@ subroutine setalb & ! sfc-perts, mgehne *** !> - Call ppebet () to perturb all 4 elements of surface albedo sfcalb(:,1:4). - if (pertalb(1)>0.0) then + if (pertalb>0.0) then do i = 1, imax do kk=1, 4 ! compute beta distribution parameters for all 4 albedos m = sfcalb(i,kk) - s = pertalb(1)*m*(1.-m) + s = pertalb*m*(1.-m) alpha = m*m*(1.-m)/(s*s)-m beta = alpha*(1.-m)/m ! compute beta distribution value corresponding diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index 8eeb16430..763b204c0 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -44,6 +44,8 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & integer :: i real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb + real(kind=kind_phys) :: lndp_alb + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -63,6 +65,16 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & endif enddo +! set albedo pert, if requested. + lndp_alb = -999. + if (Model%lndp_type==1) then + do i =1,Model%n_var_lndp + if (Model%lndp_var_list(i) == 'alb') then + lndp_alb = Model%lndp_prt_list(i) + endif + enddo + endif + !> - Call module_radiation_surface::setalb() to setup surface albedo. !! for SW radiation. @@ -72,7 +84,7 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & Sfcprop%tisfc, IM, & - alb1d, Model%pertalb, & ! mg, sfc-perts + alb1d, lndp_alb, & ! mg, sfc-perts sfcalb) ! --- outputs !> -# Approximate mean surface albedo from vis- and nir- diffuse values. diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 75afaa6ff..d28a9644e 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -207,7 +207,7 @@ subroutine lsm_noah_run & integer, intent(in) :: im, km, isot, ivegsrc real (kind=kind_phys), intent(in) :: grav, cp, hvap, rd, eps, & & epsm1, rvrdm1 - real (kind=kind_phys), dimension(5), intent(in) :: pertvegf + real (kind=kind_phys), intent(in) :: pertvegf integer, dimension(im), intent(in) :: soiltyp, vegtype, slopetyp @@ -422,10 +422,10 @@ subroutine lsm_noah_run & !! 0.5 and the perturbations go to zero as vegetation fraction approaches its upper !! or lower bound. vegfp = vegfpert(i) ! sfc-perts, mgehne - if (pertvegf(1)>0.0) then + if (pertvegf>0.0) then ! compute beta distribution parameters for vegetation fraction mv = shdfac - sv = pertvegf(1)*mv*(1.-mv) + sv = pertvegf*mv*(1.-mv) alphav = mv*mv*(1.0-mv)/(sv*sv)-mv betav = alphav*(1.0-mv)/mv ! compute beta distribution value corresponding diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index 7728ee375..0505c23ae 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -435,11 +435,11 @@ kind = kind_phys intent = in optional = F -[pertvegf] +[lndp_vgf] standard_name = magnitude_of_perturbation_of_vegetation_fraction long_name = magnitude of perturbation of vegetation fraction units = frac - dimensions = (5) + dimensions = () type = real kind = kind_phys intent = in From 90dfcc16763f6a3f6dd63a46fb4ce434f9946b2d Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Wed, 1 Apr 2020 13:46:23 +0000 Subject: [PATCH 083/404] updates to old sfc pert team - does not compile --- physics/GFS_stochastics.meta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index 9232c8d6a..70a9764ae 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -18,8 +18,8 @@ intent = in optional = F [do_sppt] - standard_name = flag_for_stochastic_surface_physics_perturbations - long_name = flag for stochastic surface physics perturbations + standard_name = flag_for_stochastic_physics_perturbations + long_name = flag for stochastic physics perturbations units = flag dimensions = () type = logical From 1f096f3a0379e087f454bf504c2a3e8b61c01453 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Wed, 8 Apr 2020 20:57:21 +0000 Subject: [PATCH 084/404] Phil's ccpp changes --- physics/GFS_surface_generic.F90 | 7 ++++--- physics/GFS_surface_generic.meta | 9 +++++++++ physics/sfc_drv.meta | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index e303b010f..4d41d7f62 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -30,7 +30,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, sigmaf, soiltyp, vegtype, slopetyp, work3, tsurf, zlvl, do_sppt, dtdtr, & drain_cpl, dsnow_cpl, rain_cpl, snow_cpl, lndp_type, n_var_lndp, sfc_wts, & lndp_var_list, lndp_prt_list, & - z01d, zt1d, bexp1d, xlai1d, vegf1d, & + z01d, zt1d, bexp1d, xlai1d, vegf1d, lndp_vgf, & cplflx, flag_cice, islmsk_cice, slimskin_cpl, tisfc, tsfco, fice, hice, & wind, u1, v1, cnvwind, smcwlt2, smcref2, errmsg, errflg) @@ -68,6 +68,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, real(kind=kind_phys), dimension(im), intent(out) :: bexp1d real(kind=kind_phys), dimension(im), intent(out) :: xlai1d real(kind=kind_phys), dimension(im), intent(out) :: vegf1d + real(kind=kind_phys), intent(out) :: lndp_vgf logical, intent(in) :: cplflx real(kind=kind_phys), dimension(im), intent(in) :: slimskin_cpl @@ -90,7 +91,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, ! Local variables integer :: i, k real(kind=kind_phys) :: onebg - real(kind=kind_phys) :: cdfz, lndp_vgf + real(kind=kind_phys) :: cdfz ! Set constants onebg = 1.0/con_g @@ -125,7 +126,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, call cdfnor(sfc_wts(i,k),cdfz) vegf1d(i) = cdfz enddo - lndp_vgf = Model%lndp_prt_list(k) + lndp_vgf = lndp_prt_list(k) end select enddo endif diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index cb90b0c8b..b716ac0f4 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -319,6 +319,15 @@ kind = kind_phys intent = out optional = F +[lndp_vgf] + standard_name = magnitude_of_perturbation_of_vegetation_fraction + long_name = magnitude of perturbation of vegetation fraction + units = frac + dimensions = () + type = real + kind = kind_phys + intent = out + optional = F [cplflx] standard_name = flag_for_flux_coupling long_name = flag controlling cplflx collection (default off) diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index 0505c23ae..7db9221bb 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -435,7 +435,7 @@ kind = kind_phys intent = in optional = F -[lndp_vgf] +[pertvegf] standard_name = magnitude_of_perturbation_of_vegetation_fraction long_name = magnitude of perturbation of vegetation fraction units = frac From 680c365dbe4b660425b24198d743f4a7d6fa09e7 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 16 Apr 2020 16:00:50 -0600 Subject: [PATCH 085/404] Remove code that does not belong to CCPP, minor formatting changes and updates to new tendency code --- physics/GFS_SCNV_generic.F90 | 12 +- physics/cu_gf_driver.F90 | 4 +- physics/model_tend_post.F90 | 87 --------- physics/model_tend_post.meta | 248 ------------------------- physics/model_tend_pre.F90 | 105 ----------- physics/model_tend_pre.meta | 279 ----------------------------- physics/module_MYNNPBL_wrapper.F90 | 40 ++--- physics/moninedmf.f | 3 +- physics/ozphys_2015.f | 1 - physics/satmedmfvdif.F | 1 - physics/total_tend.F90 | 93 ---------- physics/total_tend.meta | 215 ---------------------- 12 files changed, 30 insertions(+), 1058 deletions(-) delete mode 100644 physics/model_tend_post.F90 delete mode 100644 physics/model_tend_post.meta delete mode 100644 physics/model_tend_pre.F90 delete mode 100644 physics/model_tend_pre.meta delete mode 100644 physics/total_tend.F90 delete mode 100644 physics/total_tend.meta diff --git a/physics/GFS_SCNV_generic.F90 b/physics/GFS_SCNV_generic.F90 index 82b0818fd..2b74c1837 100644 --- a/physics/GFS_SCNV_generic.F90 +++ b/physics/GFS_SCNV_generic.F90 @@ -35,7 +35,7 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, errmsg = '' errflg = 0 - save_fields: if (ldiag3d .and. flag_for_scnv_generic_tend) then + if (ldiag3d .and. flag_for_scnv_generic_tend) then do k=1,levs do i=1,im save_u(i,k) = gu0(i,k) @@ -50,7 +50,7 @@ subroutine GFS_SCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, gu0, gv0, gt0, enddo enddo endif - endif save_fields + endif end subroutine GFS_SCNV_generic_pre_run @@ -114,7 +114,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl errmsg = '' errflg = 0 - update_cnvw_cnvc: if (imfshalcnv==imfshalcnv_sas .or. imfshalcnv==imfshalcnv_samf) then + if (imfshalcnv==imfshalcnv_sas .or. imfshalcnv==imfshalcnv_samf) then do i=1,im rainc(i) = rainc(i) + frain * rain1(i) enddo @@ -133,9 +133,9 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl enddo enddo endif - endif update_cnvw_cnvc + endif - diagtend: if (lssav .and. flag_for_scnv_generic_tend) then + if (lssav .and. flag_for_scnv_generic_tend) then if (ldiag3d) then do k=1,levs do i=1,im @@ -152,7 +152,7 @@ subroutine GFS_SCNV_generic_post_run (im, levs, nn, lssav, ldiag3d, qdiag3d, cpl enddo endif endif - endif diagtend + endif ! if (cplchm) then do k=1,levs diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index ed3c73824..927b452cd 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -867,7 +867,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & ! Diagnostic tendency updates ! if(ldiag3d) then - if(.not.flag_for_scnv_generic_tend) then + if(ishallow_g3.eq.1 .and. .not.flag_for_scnv_generic_tend) then do k=kts,ktf do i=its,itf du3dt_SCNV(i,k) = du3dt_SCNV(i,k) + outus(i,k) * dt @@ -879,7 +879,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & enddo enddo endif - if(.not.flag_for_dcnv_generic_tend) then + if((ideep.eq.1. .or. imid_gf.eq.1) .and. .not.flag_for_dcnv_generic_tend) then do k=kts,ktf do i=its,itf du3dt_DCNV(i,k) = du3dt_DCNV(i,k) + (outu(i,k)+outum(i,k)) * dt diff --git a/physics/model_tend_post.F90 b/physics/model_tend_post.F90 deleted file mode 100644 index 0ff43f9eb..000000000 --- a/physics/model_tend_post.F90 +++ /dev/null @@ -1,87 +0,0 @@ -!>\file model_tend_post.F90 -!! Calculates tendencies from all processes outside of CPPP - -module model_tend_post - -contains - - subroutine model_tend_post_init() - end subroutine model_tend_post_init - - subroutine model_tend_post_finalize() - end subroutine model_tend_post_finalize - - !> \section arg_table_model_tend_post_run Argument Table - !! \htmlinclude model_tend_post_run.html - !! - subroutine model_tend_post_run(kdt, & - gt0,gu0,gv0, gq0_water_vapor, & - t_start,u_start,v_start,q_start, & - t_end, u_end, v_end, q_end, & - dt3dt_ccpp, du3dt_ccpp, dv3dt_ccpp, dq3dt_ccpp, & - dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total, & - im, levs, ntrac, index_for_water_vapor, & - lssav, ldiag3d, qdiag3d, errmsg,errflg) - use machine, only: kind_phys - implicit none - - real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, gu0, gv0, gq0_water_vapor - real(kind=kind_phys), dimension(:,:), intent(in) :: t_start, u_start, v_start - real(kind=kind_phys), dimension(:,:), intent(in) :: q_start - real(kind=kind_phys), dimension(:,:), intent(inout) :: t_end, u_end, v_end - real(kind=kind_phys), dimension(:,:), intent(inout) :: q_end - real(kind=kind_phys), dimension(:,:), intent(inout) :: & - dt3dt_ccpp,du3dt_ccpp,dv3dt_ccpp,dq3dt_ccpp, & - dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total - - integer, intent(in) :: im, levs, ntrac, kdt - integer, intent(in) :: index_for_water_vapor - - logical, intent(in) :: lssav, qdiag3d, ldiag3d - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - real(kind=kind_phys) :: dt, change - integer :: i,k - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - diag_enabled: if(lssav .and. ldiag3d) then - do k=1,levs - do i=1,im - t_end(i,k) = gt0(i,k) - u_end(i,k) = gu0(i,k) - v_end(i,k) = gv0(i,k) - if(qdiag3d) then - q_end(i,k) = gq0_water_vapor(i,k) - endif - if(t_end(i,k)>1e-3 .and. t_start(i,k)>1e-3) then - change=t_end(i,k)-t_start(i,k) - dt3dt_ccpp(i,k) = dt3dt_ccpp(i,k) + change - !dt3dt_total(i,k) = dt3dt_total(i,k) + change - - change=u_end(i,k)-u_start(i,k) - du3dt_ccpp(i,k) = du3dt_ccpp(i,k) + change - !du3dt_total(i,k) = du3dt_total(i,k) + change - - change=v_end(i,k)-v_start(i,k) - dv3dt_ccpp(i,k) = dv3dt_ccpp(i,k) + change - !dv3dt_total(i,k) = dv3dt_total(i,k) + change - - if(qdiag3d) then - change=q_end(i,k)-q_start(i,k) - dq3dt_ccpp(i,k) = dq3dt_ccpp(i,k) + change - !dq3dt_total(i,k) = dq3dt_total(i,k) + change - endif - endif - enddo - enddo - - endif diag_enabled - - end subroutine model_tend_post_run - -end module model_tend_post diff --git a/physics/model_tend_post.meta b/physics/model_tend_post.meta deleted file mode 100644 index 8a730059f..000000000 --- a/physics/model_tend_post.meta +++ /dev/null @@ -1,248 +0,0 @@ -[ccpp-arg-table] - name = model_tend_post_init - type = scheme -[ccpp-arg-table] - name = model_tend_post_finalize - type = scheme -[ccpp-arg-table] - name = model_tend_post_run - type = scheme -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in - optional = F -[gt0] - standard_name = air_temperature_updated_by_physics - long_name = temperature updated by physics - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gu0] - standard_name = x_wind_updated_by_physics - long_name = zonal wind updated by physics - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gv0] - standard_name = y_wind_updated_by_physics - long_name = meridional wind updated by physics - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gq0_water_vapor] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity updated by physics - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[t_start] - standard_name = temperature_at_start_of_ccpp - long_name = temperature at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[u_start] - standard_name = x_wind_at_start_of_ccpp - long_name = x wind at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[v_start] - standard_name = y_wind_at_start_of_ccpp - long_name = y wind at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[q_start] - standard_name = water_vapor_specific_humidity_at_start_of_ccpp - long_name = water vapor specific humidity at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[t_end] - standard_name = temperature_at_end_of_ccpp - long_name = temperature at end of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[u_end] - standard_name = x_wind_at_end_of_ccpp - long_name = x wind at end of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[v_end] - standard_name = y_wind_at_end_of_ccpp - long_name = y wind at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[q_end] - standard_name = water_vapor_specific_humidity_at_end_of_ccpp - long_name = water vapor specific humidity at end of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dt3dt_ccpp] - standard_name = cumulative_change_in_temperature_from_ccpp - long_name = cumulative change in temperature from CCPP - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[du3dt_ccpp] - standard_name = cumulative_change_in_x_wind_from_ccpp - long_name = cumulative change in x wind from CCPP - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dv3dt_ccpp] - standard_name = cumulative_change_in_y_wind_from_ccpp - long_name = cumulative change in y wind from CCPP - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_ccpp] - standard_name = cumulative_change_in_water_vapor_specific_humidity_from_CCPP - long_name = cumulative change in water vapor specific humidity from CCPP - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dt3dt_total] - standard_name = cumulative_change_in_temperature - long_name = cumulative change in temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[du3dt_total] - standard_name = cumulative_change_in_x_wind - long_name = cumulative change in x wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dv3dt_total] - standard_name = cumulative_change_in_y_wind - long_name = cumulative change in y wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_total] - standard_name = cumulative_change_in_water_vapor_specific_humidity - long_name = cumulative change in water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in -[levs] - standard_name = vertical_dimension - long_name = vertical layer dimension - units = count - dimensions = () - type = integer - intent = in -[ntrac] - standard_name = number_of_tracers - long_name = number of tracers - units = count - dimensions = () - type = integer - intent = in -[index_for_water_vapor] - standard_name = index_for_water_vapor - long_name = tracer index for water vapor (specific humidity) - units = index - dimensions = () - type = integer - intent = in -[lssav] - standard_name = flag_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in -[ldiag3d] - standard_name = flag_diagnostics_3D - long_name = flag for 3d diagnostic fields - units = flag - dimensions = () - type = logical - intent = in -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - - - - - - - diff --git a/physics/model_tend_pre.F90 b/physics/model_tend_pre.F90 deleted file mode 100644 index f88b4d789..000000000 --- a/physics/model_tend_pre.F90 +++ /dev/null @@ -1,105 +0,0 @@ -!>\file model_tend_pre.F90 -!! Calculates tendencies from all processes outside of CPPP - -module model_tend_pre - -contains - -!> \section arg_table_model_tend_pre_init Argument Table -!! -subroutine model_tend_pre_init() -end subroutine model_tend_pre_init - -!> \section arg_table_model_tend_pre_finalize Argument Table -!! -subroutine model_tend_pre_finalize() -end subroutine model_tend_pre_finalize - -!> \section arg_table_model_tend_pre_run Argument Table -!! \htmlinclude model_tend_pre_run.html -!! - -subroutine model_tend_pre_run(dtp, kdt, & - tgrs,ugrs,vgrs,qvgrs, & - gt0,gu0,gv0, gq0_water_vapor, & - t_start,u_start,v_start,q_start, & - dt3dt_model,du3dt_model,dv3dt_model,dq3dt_model, & - dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total, & - t_end,u_end,v_end,q_end, & - im, levs, ntrac, & - lssav, ldiag3d, qdiag3d, errmsg,errflg) - use machine, only: kind_phys - implicit none - - real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, ugrs, vgrs, qvgrs - real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, gu0, gv0, gq0_water_vapor - real(kind=kind_phys), dimension(:,:), intent(out) :: t_start, u_start, v_start - real(kind=kind_phys), dimension(:,:), intent(out) :: q_start - real(kind=kind_phys), dimension(:,:), intent(out) :: t_end, u_end, v_end - real(kind=kind_phys), dimension(:,:), intent(out) :: q_end - real(kind=kind_phys), dimension(:,:), intent(inout) :: & - dt3dt_model,du3dt_model,dv3dt_model,dq3dt_model, & - dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total - - integer, intent(in) :: im, levs, ntrac, kdt - - logical, intent(in) :: lssav, qdiag3d, ldiag3d - - real(kind=kind_phys) :: dtp, change - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - logical :: logical - integer :: i, k - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - print *,'in model_tend_pre_run' - - logical = .false. - - if(Lssav .and. ldiag3d) then - do k=1,levs - do i=1,im - ! t_start(i,k) = gt0(i,k) - ! u_start(i,k) = gu0(i,k) - ! v_start(i,k) = gv0(i,k) - ! if(qdiag3d) then - ! q_start(i,k) = gq0_water_vapor(i,k) - ! endif - t_start(i,k) = tgrs(i,k) - u_start(i,k) = ugrs(i,k) - v_start(i,k) = vgrs(i,k) - if(qdiag3d) then - q_start(i,k) = qvgrs(i,k) - endif - if(t_start(i,k)>1e-3 .and. t_end(i,k)>1e-3) then - if(t_end(i,k)/=t_start(i,k)) then - logical=.true. - change=t_start(i,k)-t_end(i,k) - dt3dt_model(i,k) = dt3dt_model(i,k) + change - !dt3dt_total(i,k) = dt3dt_total(i,k) + change - - change=u_start(i,k)-u_end(i,k) - du3dt_model(i,k) = du3dt_model(i,k) + change - !du3dt_total(i,k) = du3dt_total(i,k) + change - - change=v_start(i,k)-v_end(i,k) - dv3dt_model(i,k) = dv3dt_model(i,k) + change - !dv3dt_total(i,k) = dv3dt_total(i,k) + change - - if(qdiag3d) then - change=q_start(i,k)-q_end(i,k) - dq3dt_model(i,k) = dq3dt_model(i,k) + change - !dq3dt_total(i,k) = dq3dt_total(i,k) + change - endif - endif - endif - enddo - enddo - endif -end subroutine model_tend_pre_run - -end module model_tend_pre diff --git a/physics/model_tend_pre.meta b/physics/model_tend_pre.meta deleted file mode 100644 index 7ec047161..000000000 --- a/physics/model_tend_pre.meta +++ /dev/null @@ -1,279 +0,0 @@ -[ccpp-arg-table] - name = model_tend_pre_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = model_tend_pre_finalize - type = scheme - -######################################################################## -[ccpp-arg-table] - name = model_tend_pre_run - type = scheme -[dtp] - standard_name = time_step_for_physics - long_name = physics timestep - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in - optional = F -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[ugrs] - standard_name = x_wind - long_name = zonal wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[vgrs] - standard_name = y_wind - long_name = meridional wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[qvgrs] - standard_name = water_vapor_specific_humidity - long_name = water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gt0] - standard_name = air_temperature_updated_by_physics - long_name = temperature updated by physics - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gu0] - standard_name = x_wind_updated_by_physics - long_name = zonal wind updated by physics - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gv0] - standard_name = y_wind_updated_by_physics - long_name = meridional wind updated by physics - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gq0_water_vapor] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity updated by physics - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[t_start] - standard_name = temperature_at_start_of_ccpp - long_name = temperature at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out -[u_start] - standard_name = x_wind_at_start_of_ccpp - long_name = x wind at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out -[v_start] - standard_name = y_wind_at_start_of_ccpp - long_name = y wind at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out -[q_start] - standard_name = water_vapor_specific_humidity_at_start_of_ccpp - long_name = water vapor specific humidity at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out -[dt3dt_model] - standard_name = cumulative_change_in_temperature_from_model - long_name = cumulative change in temperature from model - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[du3dt_model] - standard_name = cumulative_change_in_x_wind_from_model - long_name = cumulative change in x wind from model - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dv3dt_model] - standard_name = cumulative_change_in_y_wind_from_model - long_name = cumulative change in y wind from model - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_model] - standard_name = cumulative_change_in_water_vapor_specific_humidity_from_model - long_name = cumulative change in water vapor specific humidity from model - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dt3dt_total] - standard_name = cumulative_change_in_temperature - long_name = cumulative change in temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[du3dt_total] - standard_name = cumulative_change_in_x_wind - long_name = cumulative change in x wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dv3dt_total] - standard_name = cumulative_change_in_y_wind - long_name = cumulative change in y wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_total] - standard_name = cumulative_change_in_water_vapor_specific_humidity - long_name = cumulative change in water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[t_end] - standard_name = temperature_at_end_of_ccpp - long_name = temperature at end of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[u_end] - standard_name = x_wind_at_end_of_ccpp - long_name = x wind at end of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[v_end] - standard_name = y_wind_at_end_of_ccpp - long_name = y wind at start of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[q_end] - standard_name = water_vapor_specific_humidity_at_end_of_ccpp - long_name = water vapor specific humidity at end of ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in -[levs] - standard_name = vertical_dimension - long_name = vertical layer dimension - units = count - dimensions = () - type = integer - intent = in -[ntrac] - standard_name = number_of_tracers - long_name = number of tracers - units = count - dimensions = () - type = integer - intent = in -[lssav] - standard_name = flag_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in -[ldiag3d] - standard_name = flag_diagnostics_3D - long_name = flag for 3d diagnostic fields - units = flag - dimensions = () - type = logical - intent = in -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 471c99f50..2065c2844 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -287,7 +287,7 @@ SUBROUTINE mynnedmf_wrapper_run( & endif ! Assign variables for each microphysics scheme - init_if_imp_physics: if (imp_physics == imp_physics_wsm6) then + if (imp_physics == imp_physics_wsm6) then ! WSM6 FLAG_QI = .true. FLAG_QNI= .false. @@ -316,7 +316,7 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo elseif (imp_physics == imp_physics_thompson) then ! Thompson - tmp_init_if_aer: if(ltaerosol) then + if(ltaerosol) then FLAG_QI = .true. FLAG_QNI= .true. FLAG_QC = .true. @@ -368,7 +368,7 @@ SUBROUTINE mynnedmf_wrapper_run( & qnifa(i,k) = 0. enddo enddo - endif tmp_init_if_aer + endif elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP FLAG_QI = .true. @@ -422,7 +422,7 @@ SUBROUTINE mynnedmf_wrapper_run( & qnifa(i,k) = 0. enddo enddo - endif init_if_imp_physics + endif if (lprnt)write(0,*)"prepping MYNN-EDMF variables..." @@ -438,7 +438,7 @@ SUBROUTINE mynnedmf_wrapper_run( & pattern_spp_pbl(i,k)=0.0 enddo enddo - big_init_i_loop: do i=1,im + do i=1,im if (slmsk(i)==1. .or. slmsk(i)==2.) then !sea/land/ice mask (=0/1/2) in FV3 xland(i)=1.0 !but land/water = (1/2) in SFCLAY_mynn else @@ -481,9 +481,9 @@ SUBROUTINE mynnedmf_wrapper_run( & ! qsfc(i)=qss(i) ! ps(i)=pgr(i) ! wspd(i)=wind(i) - enddo big_init_i_loop + enddo - lprnt_before: if (lprnt) then + if (lprnt) then print* write(0,*)"===CALLING mynn_bl_driver; input:" print*,"bl_mynn_tkebudget=",bl_mynn_tkebudget," bl_mynn_tkeadvect=",bl_mynn_tkeadvect @@ -520,7 +520,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !print*,"exch_h:",exch_h(1,1),exch_h(1,2),exch_h(1,levs) ! - intent(out) !print*,"exch_m:",exch_m(1,1),exch_m(1,2),exch_m(1,levs) ! - intent(out) print*,"max cf_bl:",maxval(cldfra_bl(1,:)) - endif lprnt_before + endif CALL mynn_bl_driver( & @@ -623,7 +623,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !enddo !DO moist/scalar/tracer tendencies: - if_imp_physics: if (imp_physics == imp_physics_wsm6) then + if (imp_physics == imp_physics_wsm6) then ! WSM6 do k=1,levs do i=1,im @@ -651,8 +651,8 @@ SUBROUTINE mynnedmf_wrapper_run( & !enddo elseif (imp_physics == imp_physics_thompson) then ! Thompson-Aerosol - thmp_if_ltaerosol: if(ltaerosol) then - thmp_aer_tend: do k=1,levs + if(ltaerosol) then + do k=1,levs do i=1,im dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) @@ -663,7 +663,7 @@ SUBROUTINE mynnedmf_wrapper_run( & dqdt_water_aer_num_conc(i,k) = RQNWFABLTEN(i,k) dqdt_ice_aer_num_conc(i,k) = RQNIFABLTEN(i,k) enddo - enddo thmp_aer_tend + enddo if(lssav .and. ldiag3d .and. qdiag3d) then do k=1,levs do i=1,im @@ -685,7 +685,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !enddo else !Thompson (2008) - thmp_noaer_tend: do k=1,levs + do k=1,levs do i=1,im dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) @@ -693,7 +693,7 @@ SUBROUTINE mynnedmf_wrapper_run( & dqdt_ice_num_conc(i,k) = RQNIBLTEN(i,k) !dqdt_ozone(i,k) = 0.0 enddo - enddo thmp_noaer_tend + enddo if(lssav .and. ldiag3d .and. qdiag3d) then do k=1,levs do i=1,im @@ -710,10 +710,10 @@ SUBROUTINE mynnedmf_wrapper_run( & ! !dqdt_ozone(i,k) = 0.0 ! enddo !enddo - endif thmp_if_ltaerosol !end thompson choice + endif !end thompson choice elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP - gfdl_mp_tend: do k=1,levs + do k=1,levs do i=1,im dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) @@ -723,7 +723,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_graupel(i,k) = 0.0 !dqdt_ozone(i,k) = 0.0 enddo - enddo gfdl_mp_tend + enddo if(lssav .and. ldiag3d .and. qdiag3d) then do k=1,levs do i=1,im @@ -759,9 +759,9 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo enddo endif - endif if_imp_physics + endif - lprnt_after: if (lprnt) then + if (lprnt) then print* print*,"===Finished with mynn_bl_driver; output:" print*,"T:",t3d(1,1),t3d(1,2),t3d(1,levs) @@ -800,7 +800,7 @@ SUBROUTINE mynnedmf_wrapper_run( & print*,"ktop_shallow:",ktop_shallow(1)," maxmf:",maxmf(1) print*,"nup:",nupdraft(1) print* - endif lprnt_after +s endif END SUBROUTINE mynnedmf_wrapper_run diff --git a/physics/moninedmf.f b/physics/moninedmf.f index bfe8d512f..50400ee04 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -87,7 +87,8 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & & tau(im,km), rtg(im,km,ntrac) - real(kind=kind_phys), intent(inout), dimension(ix,km) :: & + ! Only allocated if ldiag3d or qdiag3d are true + real(kind=kind_phys), intent(inout), dimension(:,:) :: & & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL real(kind=kind_phys), intent(in) :: & & u1(ix,km), v1(ix,km), & diff --git a/physics/ozphys_2015.f b/physics/ozphys_2015.f index 766cfdd62..a42c74bfc 100644 --- a/physics/ozphys_2015.f +++ b/physics/ozphys_2015.f @@ -167,7 +167,6 @@ subroutine ozphys_2015_run ( & if (ldiag3d .and. qdiag3d) then ! ozone change diagnostics do i=1,im ozp1(i,l) = ozp1(i,l) + (prod(i,1)-prod(i,2)*prod(i,6))*dt -!!ccpp ozp(i,l,2) = ozp(i,l,2) + (ozo(i,l) - ozib(i)) ozp2(i,l) = ozp2(i,l) + (oz(i,l) - ozib(i)) ozp3(i,l) = ozp3(i,l) + prod(i,3)*(tin(i,l)-prod(i,5))*dt ozp4(i,l) = ozp4(i,l) + prod(i,4) diff --git a/physics/satmedmfvdif.F b/physics/satmedmfvdif.F index 64d2c4517..f17aaa35c 100644 --- a/physics/satmedmfvdif.F +++ b/physics/satmedmfvdif.F @@ -1509,7 +1509,6 @@ subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & endif enddo enddo - ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> -# Save PBL height for diagnostic purpose diff --git a/physics/total_tend.F90 b/physics/total_tend.F90 deleted file mode 100644 index 24d5c92ef..000000000 --- a/physics/total_tend.F90 +++ /dev/null @@ -1,93 +0,0 @@ -!>\file total_tend.F90 -!! Calculates tendencies from all processes outside of CPPP - -module total_tend - -contains - -!> \section arg_table_total_tend_init Argument Table -!! -subroutine total_tend_init() -end subroutine total_tend_init - -!> \section arg_table_total_tend_finalize Argument Table -!! -subroutine total_tend_finalize() -end subroutine total_tend_finalize - -!> \section arg_table_total_tend_run Argument Table -!! \htmlinclude total_tend_run.html -!! -subroutine total_tend_run(dtp, kdt, & - tgrs,ugrs,vgrs,qvgrs, t_start,u_start,v_start,q_start, & - dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total, & - gt0,gu0,gv0, gq0_water_vapor, & - im, levs, ntrac, & - lssav, ldiag3d, qdiag3d, errmsg,errflg) - use machine, only: kind_phys - implicit none - - real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, gu0, gv0, gq0_water_vapor - real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, ugrs, vgrs, qvgrs - real(kind=kind_phys), dimension(:,:), intent(out) :: t_start, u_start, v_start - real(kind=kind_phys), dimension(:,:), intent(out) :: q_start - real(kind=kind_phys), dimension(:,:), intent(inout) :: & - dt3dt_total,du3dt_total,dv3dt_total,dq3dt_total - - integer, intent(in) :: im, levs, ntrac, kdt - - logical, intent(in) :: lssav, qdiag3d, ldiag3d - - real(kind=kind_phys) :: dtp - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - integer :: i, k, good - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - good=0 - - if(Lssav .and. ldiag3d) then - do k=1,levs - do i=1,im - if(t_start(i,k)>1e-3 .and. gt0(i,k)>1e-3) then - good=good+1 - dt3dt_total(i,k) = dt3dt_total(i,k) + (gt0(i,k)-t_start(i,k)) - du3dt_total(i,k) = du3dt_total(i,k) + (gu0(i,k)-u_start(i,k)) - dv3dt_total(i,k) = dv3dt_total(i,k) + (gv0(i,k)-v_start(i,k)) - if(qdiag3d) then - dq3dt_total(i,k) = dq3dt_total(i,k) + (gq0_water_vapor(i,k)-q_start(i,k)) - endif - endif - t_start(i,k)=gt0(i,k) - u_start(i,k)=gu0(i,k) - v_start(i,k)=gv0(i,k) - if(qdiag3d) then - q_start(i,k)=gq0_water_vapor(i,k) - endif - ! Alternative is to use the state in: - ! if(t_start(i,k)>1e-3 .and. tgrs(i,k)>1e-3) then - ! good=good+1 - ! dt3dt_total(i,k) = dt3dt_total(i,k) + (tgrs(i,k)-t_start(i,k)) - ! du3dt_total(i,k) = du3dt_total(i,k) + (ugrs(i,k)-u_start(i,k)) - ! dv3dt_total(i,k) = dv3dt_total(i,k) + (vgrs(i,k)-v_start(i,k)) - ! if(qdiag3d) then - ! dq3dt_total(i,k) = dq3dt_total(i,k) + (qvgrs(i,k)-q_start(i,k)) - ! endif - ! endif - ! t_start(i,k)=tgrs(i,k) - ! u_start(i,k)=ugrs(i,k) - ! v_start(i,k)=vgrs(i,k) - ! if(qdiag3d) then - ! q_start(i,k)=qvgrs(i,k) - ! endif - enddo - enddo - endif -end subroutine total_tend_run - -end module total_tend diff --git a/physics/total_tend.meta b/physics/total_tend.meta deleted file mode 100644 index 82e49a081..000000000 --- a/physics/total_tend.meta +++ /dev/null @@ -1,215 +0,0 @@ -[ccpp-arg-table] - name = total_tend_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = total_tend_finalize - type = scheme - -######################################################################## -[ccpp-arg-table] - name = total_tend_run - type = scheme -[dtp] - standard_name = time_step_for_physics - long_name = physics timestep - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in - optional = F -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[ugrs] - standard_name = x_wind - long_name = zonal wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[vgrs] - standard_name = y_wind - long_name = meridional wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[qvgrs] - standard_name = water_vapor_specific_humidity - long_name = water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[t_start] - standard_name = temperature_at_total_check_point - long_name = temperature when model total is calculated in ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[u_start] - standard_name = x_wind_at_total_check_point - long_name = x when model total is calculated in ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[v_start] - standard_name = y_wind_at_total_check_point - long_name = y when model total is calculated in ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[q_start] - standard_name = water_vapor_specific_humidity_at_total_check_point - long_name = water vapor specific humidity when model total is calculated in ccpp - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dt3dt_total] - standard_name = cumulative_change_in_temperature - long_name = cumulative change in temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[du3dt_total] - standard_name = cumulative_change_in_x_wind - long_name = cumulative change in x wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dv3dt_total] - standard_name = cumulative_change_in_y_wind - long_name = cumulative change in y wind - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[dq3dt_total] - standard_name = cumulative_change_in_water_vapor_specific_humidity - long_name = cumulative change in water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout -[gt0] - standard_name = air_temperature_updated_by_physics - long_name = temperature updated by physics - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gu0] - standard_name = x_wind_updated_by_physics - long_name = zonal wind updated by physics - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gv0] - standard_name = y_wind_updated_by_physics - long_name = meridional wind updated by physics - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[gq0_water_vapor] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity updated by physics - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in -[levs] - standard_name = vertical_dimension - long_name = vertical layer dimension - units = count - dimensions = () - type = integer - intent = in -[ntrac] - standard_name = number_of_tracers - long_name = number of tracers - units = count - dimensions = () - type = integer - intent = in -[lssav] - standard_name = flag_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in -[ldiag3d] - standard_name = flag_diagnostics_3D - long_name = flag for 3d diagnostic fields - units = flag - dimensions = () - type = logical - intent = in -[qdiag3d] - standard_name = flag_tracer_diagnostics_3D - long_name = flag for 3d tracer diagnostic fields - units = flag - dimensions = () - type = logical - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out From 78b9a67324b2a561caeabce1bf059d4a1fe19498 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Thu, 16 Apr 2020 22:13:33 +0000 Subject: [PATCH 086/404] minor bug fix --- physics/GFS_surface_generic.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index 4d41d7f62..3b18b261d 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -62,7 +62,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, integer, intent(in) :: n_var_lndp character(len=3), dimension(n_var_lndp), intent(in) :: lndp_var_list real(kind=kind_phys), dimension(n_var_lndp), intent(in) :: lndp_prt_list - real(kind=kind_phys), dimension(im,nsfcpert), intent(in) :: sfc_wts + real(kind=kind_phys), dimension(im,n_var_lndp), intent(in) :: sfc_wts real(kind=kind_phys), dimension(im), intent(out) :: z01d real(kind=kind_phys), dimension(im), intent(out) :: zt1d real(kind=kind_phys), dimension(im), intent(out) :: bexp1d From 5e990730cbd83250e5fd6cc1853a38557a18aec7 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 16 Apr 2020 17:10:05 -0600 Subject: [PATCH 087/404] Update standard names as per code review --- physics/GFS_DCNV_generic.meta | 2 +- physics/GFS_GWD_generic.meta | 4 ++-- physics/GFS_PBL_generic.meta | 2 +- physics/GFS_SCNV_generic.meta | 12 ++++++------ physics/GFS_suite_interstitial.meta | 2 +- physics/cires_ugwp.meta | 2 +- physics/cu_gf_driver.meta | 12 ++++++------ physics/moninedmf.meta | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index 983d6ad94..1e4a59a77 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -562,7 +562,7 @@ intent = inout optional = F [flag_for_dcnv_generic_tend] - standard_name = true_if_GFS_DCNV_generic_should_calculate_tendencies + standard_name = flag_for_generic_deep_convection_tendency long_name = true if GFS_DCNV_generic should calculate tendencies units = flag dimensions = () diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 13a0d7b49..b31393546 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -178,7 +178,7 @@ intent = in optional = F [flag_for_gwd_generic_tend] - standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies + standard_name = flag_for_generic_gravity_wave_drag_tendency long_name = true if GFS_GWD_generic should calculate tendencies units = flag dimensions = () @@ -327,7 +327,7 @@ intent = inout optional = F [flag_for_gwd_generic_tend] - standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies + standard_name = flag_for_generic_gravity_wave_drag_tendency long_name = true if GFS_GWD_generic should calculate tendencies units = flag dimensions = () diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 54c661125..57a1163a2 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -682,7 +682,7 @@ intent = in optional = F [flag_for_pbl_generic_tend] - standard_name = true_if_GFS_PBL_generic_should_calculate_tendencies + standard_name = flag_for_generic_planetary_boundary_layer_tendency long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index f1312bfc6..702fe6df0 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -104,7 +104,7 @@ intent = inout optional = F [flag_for_scnv_generic_tend] - standard_name = true_if_GFS_SCNV_generic_should_calculate_tendencies + standard_name = flag_for_generic_shallow_convection_tendency long_name = true if GFS_SCNV_generic should calculate tendencies units = flag dimensions = () @@ -277,7 +277,7 @@ intent = inout optional = F [du3dt] - standard_name = cumulative_change_in_x_wind_due_to_shal_convection + standard_name = cumulative_change_in_x_wind_due_to_shallow_convection long_name = cumulative change in x wind due to shallow convection units = m s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -285,7 +285,7 @@ kind = kind_phys intent = inout [dv3dt] - standard_name = cumulative_change_in_y_wind_due_to_shal_convection + standard_name = cumulative_change_in_y_wind_due_to_shallow_convection long_name = cumulative change in y wind due to shallow convection units = m s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -293,7 +293,7 @@ kind = kind_phys intent = inout [dt3dt] - standard_name = cumulative_change_in_temperature_due_to_shal_convection + standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shal conv. units = K dimensions = (horizontal_dimension,vertical_dimension) @@ -302,7 +302,7 @@ intent = inout optional = F [dq3dt] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shal_convection + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection long_name = cumulative change in water vapor specific humidity due to shal conv. units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -424,7 +424,7 @@ intent = inout optional = F [flag_for_scnv_generic_tend] - standard_name = true_if_GFS_SCNV_generic_should_calculate_tendencies + standard_name = flag_for_generic_shallow_convection_tendency long_name = true if GFS_SCNV_generic should calculate tendencies units = flag dimensions = () diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 86e21f0a9..c48f93c68 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -677,7 +677,7 @@ intent = inout optional = F [dt3dt_scnv] - standard_name = cumulative_change_in_temperature_due_to_shal_convection + standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shal conv. units = K dimensions = (horizontal_dimension,vertical_dimension) diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 6720bd7c7..5d5e0dd1a 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -912,7 +912,7 @@ type = logical intent = in [flag_for_gwd_generic_tend] - standard_name = true_if_GFS_GWD_generic_should_calculate_tendencies + standard_name = flag_for_generic_gravity_wave_drag_tendency long_name = true if GFS_GWD_generic should calculate tendencies units = flag dimensions = () diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index e896c7fa6..99e6ca650 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -359,21 +359,21 @@ intent = in optional = F [flag_for_scnv_generic_tend] - standard_name = true_if_GFS_SCNV_generic_should_calculate_tendencies + standard_name = flag_for_generic_shallow_convection_tendency long_name = true if GFS_SCNV_generic should calculate tendencies units = flag dimensions = () type = logical intent = in [flag_for_dcnv_generic_tend] - standard_name = true_if_GFS_DCNV_generic_should_calculate_tendencies + standard_name = flag_for_generic_deep_convection_tendency long_name = true if GFS_DCNV_generic should calculate tendencies units = flag dimensions = () type = logical intent = in [du3dt_SCNV] - standard_name = cumulative_change_in_x_wind_due_to_shal_convection + standard_name = cumulative_change_in_x_wind_due_to_shallow_convection long_name = cumulative change in x wind due to shallow convection units = m s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -381,7 +381,7 @@ kind = kind_phys intent = inout [dv3dt_SCNV] - standard_name = cumulative_change_in_y_wind_due_to_shal_convection + standard_name = cumulative_change_in_y_wind_due_to_shallow_convection long_name = cumulative change in y wind due to shallow convection units = m s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -389,7 +389,7 @@ kind = kind_phys intent = inout [dt3dt_SCNV] - standard_name = cumulative_change_in_temperature_due_to_shal_convection + standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shallow convection units = K dimensions = (horizontal_dimension,vertical_dimension) @@ -397,7 +397,7 @@ kind = kind_phys intent = inout [dq3dt_SCNV] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shal_convection + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection long_name = cumulative change in water vapor specific humidity due to shallow convection units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 6a923d36b..706ac9a0f 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -576,7 +576,7 @@ kind = kind_phys intent = inout [flag_for_pbl_generic_tend] - standard_name = true_if_GFS_PBL_generic_should_calculate_tendencies + standard_name = flag_for_generic_planetary_boundary_layer_tendency long_name = true if GFS_PBL_generic should calculate tendencies units = flag dimensions = () From 8d9b7991a94ead20595b4d8cb0627aab9df2daad Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 17 Apr 2020 14:40:19 +0000 Subject: [PATCH 088/404] Updating MYNN-EDMF part I: ccpp-physics part --- physics/GFS_debug.F90 | 2 +- physics/module_MYNNPBL_wrapper.F90 | 127 +- physics/module_MYNNPBL_wrapper.meta | 71 +- physics/module_SGSCloud_RadPre.F90 | 40 +- physics/module_SGSCloud_RadPre.meta | 13 +- physics/module_bl_mynn.F90 | 1656 +++++++++++++++++---------- 6 files changed, 1206 insertions(+), 703 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 3bb50d9ef..b99529cc5 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -356,7 +356,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Diag%edmf_qc ', Diag%edmf_qc) call print_var(mpirank,omprank, blkno, 'Diag%nupdraft ', Diag%nupdraft) call print_var(mpirank,omprank, blkno, 'Diag%maxMF ', Diag%maxMF) - call print_var(mpirank,omprank, blkno, 'Diag%ktop_shallow', Diag%ktop_shallow) + call print_var(mpirank,omprank, blkno, 'Diag%ktop_plume ', Diag%ktop_plume) call print_var(mpirank,omprank, blkno, 'Diag%exch_h ', Diag%exch_h) call print_var(mpirank,omprank, blkno, 'Diag%exch_m ', Diag%exch_m) end if diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 36c9e55de..320585f15 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -24,7 +24,7 @@ end subroutine mynnedmf_wrapper_finalize #endif SUBROUTINE mynnedmf_wrapper_run( & & ix,im,levs, & - & flag_init,flag_restart, & + & flag_init,flag_restart,cycling, & & lssav, ldiag3d, lsidea, & & delt,dtf,dx,zorl, & & phii,u,v,omega,t3d, & @@ -46,10 +46,11 @@ SUBROUTINE mynnedmf_wrapper_run( & & qke,qke_adv,Tsq,Qsq,Cov, & & el_pbl,sh3d,exch_h,exch_m, & & Pblh,kpbl, & - & qc_bl,cldfra_bl, & + & qc_bl,qi_bl,cldfra_bl, & & edmf_a,edmf_w,edmf_qt, & & edmf_thl,edmf_ent,edmf_qc, & - & nupdraft,maxMF,ktop_shallow, & + & sub_thl,sub_sqv,det_thl,det_sqv,& + & nupdraft,maxMF,ktop_plume, & & RTHRATEN, & & dudt, dvdt, dtdt, & & dqdt_water_vapor, dqdt_liquid_cloud, & @@ -62,6 +63,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & bl_mynn_cloudpdf, bl_mynn_mixlength, & & bl_mynn_edmf, bl_mynn_edmf_mom, bl_mynn_edmf_tke, & & bl_mynn_edmf_part, bl_mynn_cloudmix, bl_mynn_mixqt,& + & bl_mynn_output, & & icloud_bl, do_mynnsfclay, & & imp_physics, imp_physics_gfdl, & & imp_physics_thompson, imp_physics_wsm6, & @@ -157,7 +159,7 @@ SUBROUTINE mynnedmf_wrapper_run( & LOGICAL, INTENT(IN) :: lssav, ldiag3d, lsidea ! NAMELIST OPTIONS (INPUT): LOGICAL, INTENT(IN) :: bl_mynn_tkeadvect, ltaerosol, & - lprnt, do_mynnsfclay + lprnt, do_mynnsfclay, cycling INTEGER, INTENT(IN) :: & & bl_mynn_cloudpdf, & & bl_mynn_mixlength, & @@ -169,6 +171,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & bl_mynn_cloudmix, & & bl_mynn_mixqt, & & bl_mynn_tkebudget, & + & bl_mynn_output, & & grav_settling, & & imp_physics, imp_physics_wsm6, & & imp_physics_thompson, imp_physics_gfdl @@ -206,10 +209,12 @@ SUBROUTINE mynnedmf_wrapper_run( & & dqdt_ozone, dqdt_water_aer_num_conc, dqdt_ice_aer_num_conc real(kind=kind_phys), dimension(im,levs), intent(inout) :: & & qke, qke_adv, EL_PBL, Sh3D, & - & qc_bl, cldfra_bl - real(kind=kind_phys), dimension(im,levs), intent(inout) :: & + & qc_bl, qi_bl, cldfra_bl +!These 10 arrays are only allocated when bl_mynn_output > 0 + real(kind=kind_phys), dimension(:,:), intent(inout) :: & & edmf_a,edmf_w,edmf_qt, & - & edmf_thl,edmf_ent,edmf_qc + & edmf_thl,edmf_ent,edmf_qc, & + & sub_thl,sub_sqv,det_thl,det_sqv real(kind=kind_phys), dimension(im,levs), intent(in) :: & & u,v,omega,t3d, & & exner,prsl, & @@ -230,8 +235,8 @@ SUBROUTINE mynnedmf_wrapper_run( & real(kind=kind_phys), dimension(im, levs), intent(in) :: htrsw, htrlw !LOCAL real(kind=kind_phys), dimension(im,levs) :: & - & qvsh,qc,qi,qnc,qni,ozone,qnwfa,qnifa, & - & dz, w, p, rho, th, qv, tke_pbl, & + & sqv,sqc,sqi,qnc,qni,ozone,qnwfa,qnifa, & + & dz, w, p, rho, th, qv, & & RUBLTEN, RVBLTEN, RTHBLTEN, RQVBLTEN, & & RQCBLTEN, RQNCBLTEN, RQIBLTEN, RQNIBLTEN, & & RQNWFABLTEN, RQNIFABLTEN, & @@ -256,7 +261,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & dtsfci_diag,dqsfci_diag,dtsfc_diag,dqsfc_diag, & & maxMF integer, dimension(im), intent(inout) :: & - & kpbl,nupdraft,ktop_shallow + & kpbl,nupdraft,ktop_plume !LOCAL real, dimension(im) :: & @@ -302,9 +307,9 @@ SUBROUTINE mynnedmf_wrapper_run( & p_qni= 0 do k=1,levs do i=1,im - qvsh(i,k) = qgrs_water_vapor(i,k) - qc(i,k) = qgrs_liquid_cloud(i,k) - qi(i,k) = qgrs_ice_cloud(i,k) + sqv(i,k) = qgrs_water_vapor(i,k) + sqc(i,k) = qgrs_liquid_cloud(i,k) + sqi(i,k) = qgrs_ice_cloud(i,k) ozone(i,k) = qgrs_ozone(i,k) qnc(i,k) = 0. qni(i,k) = 0. @@ -330,9 +335,9 @@ SUBROUTINE mynnedmf_wrapper_run( & p_qni= 0 do k=1,levs do i=1,im - qvsh(i,k) = qgrs_water_vapor(i,k) - qc(i,k) = qgrs_liquid_cloud(i,k) - qi(i,k) = qgrs_ice_cloud(i,k) + sqv(i,k) = qgrs_water_vapor(i,k) + sqc(i,k) = qgrs_liquid_cloud(i,k) + sqi(i,k) = qgrs_ice_cloud(i,k) qnc(i,k) = qgrs_cloud_droplet_num_conc(i,k) qni(i,k) = qgrs_cloud_ice_num_conc(i,k) ozone(i,k) = qgrs_ozone(i,k) @@ -356,9 +361,9 @@ SUBROUTINE mynnedmf_wrapper_run( & p_qni= 0 do k=1,levs do i=1,im - qvsh(i,k) = qgrs_water_vapor(i,k) - qc(i,k) = qgrs_liquid_cloud(i,k) - qi(i,k) = qgrs_ice_cloud(i,k) + sqv(i,k) = qgrs_water_vapor(i,k) + sqc(i,k) = qgrs_liquid_cloud(i,k) + sqi(i,k) = qgrs_ice_cloud(i,k) qnc(i,k) = 0. qni(i,k) = qgrs_cloud_ice_num_conc(i,k) ozone(i,k) = qgrs_ozone(i,k) @@ -384,9 +389,9 @@ SUBROUTINE mynnedmf_wrapper_run( & p_qni= 0 do k=1,levs do i=1,im - qvsh(i,k) = qgrs_water_vapor(i,k) - qc(i,k) = qgrs_liquid_cloud(i,k) - qi(i,k) = qgrs_ice_cloud(i,k) + sqv(i,k) = qgrs_water_vapor(i,k) + sqc(i,k) = qgrs_liquid_cloud(i,k) + sqi(i,k) = qgrs_ice_cloud(i,k) qnc(i,k) = 0. qni(i,k) = 0. qnwfa(i,k) = 0. @@ -411,9 +416,9 @@ SUBROUTINE mynnedmf_wrapper_run( & p_qni= 0 do k=1,levs do i=1,im - qvsh(i,k) = qgrs_water_vapor(i,k) - qc(i,k) = qgrs_liquid_cloud(i,k) - qi(i,k) = 0. + sqv(i,k) = qgrs_water_vapor(i,k) + sqc(i,k) = qgrs_liquid_cloud(i,k) + sqi(i,k) = 0. qnc(i,k) = 0. qni(i,k) = 0. qnwfa(i,k) = 0. @@ -428,9 +433,10 @@ SUBROUTINE mynnedmf_wrapper_run( & do i=1,im dz(i,k)=(phii(i,k+1) - phii(i,k))*g_inv th(i,k)=t3d(i,k)/exner(i,k) - qv(i,k)=qvsh(i,k)/(1.0 - qvsh(i,k)) - qc(i,k)=qc(i,k)/(1.0 - qvsh(i,k)) - qi(i,k)=qi(i,k)/(1.0 - qvsh(i,k)) + ! keep as specific humidity + ! qv(i,k)=qvsh(i,k)/(1.0 - qvsh(i,k)) + ! qc(i,k)=qc(i,k)/(1.0 - qvsh(i,k)) + ! qi(i,k)=qi(i,k)/(1.0 - qvsh(i,k)) rho(i,k)=prsl(i,k)/(r_d*t3d(i,k)) w(i,k) = -omega(i,k)/(rho(i,k)*g) pattern_spp_pbl(i,k)=0.0 @@ -498,9 +504,9 @@ SUBROUTINE mynnedmf_wrapper_run( & print*,"dz:",dz(1,1),dz(1,2),dz(1,levs) print*,"u:",u(1,1),u(1,2),u(1,levs) print*,"v:",v(1,1),v(1,2),v(1,levs) - print*,"qv:",qv(1,1),qv(1,2),qv(1,levs) - print*,"qc:",qc(1,1),qc(1,2),qc(1,levs) - print*,"qi:",qi(1,1),qi(1,2),qi(1,levs) + print*,"sqv:",sqv(1,1),sqv(1,2),sqv(1,levs) + print*,"sqc:",sqc(1,1),sqc(1,2),sqc(1,levs) + print*,"sqi:",sqi(1,1),sqi(1,2),sqi(1,levs) print*,"rmol:",rmol(1)," ust:",ust(1) print*," dx=",dx(1),"initflag=",initflag print*,"Tsurf:",tsurf(1)," Thetasurf:",ts(1) @@ -511,7 +517,7 @@ SUBROUTINE mynnedmf_wrapper_run( & print*,"im=",im," levs=",levs print*,"PBLH=",pblh(1)," KPBL=",KPBL(1)," xland=",xland(1) print*,"vdfg=",vdfg(1)," ch=",ch(1) - print*,"TKE:",TKE_PBL(1,1),TKE_PBL(1,2),TKE_PBL(1,levs) + !print*,"TKE:",TKE_PBL(1,1),TKE_PBL(1,2),TKE_PBL(1,levs) print*,"qke:",qke(1,1),qke(1,2),qke(1,levs) print*,"el_pbl:",el_pbl(1,1),el_pbl(1,2),el_pbl(1,levs) print*,"Sh3d:",Sh3d(1,1),sh3d(1,2),sh3d(1,levs) @@ -523,17 +529,17 @@ SUBROUTINE mynnedmf_wrapper_run( & CALL mynn_bl_driver( & & initflag=initflag,restart=flag_restart, & + & cycling=cycling, & & grav_settling=grav_settling, & & delt=delt,dz=dz,dx=dx,znt=znt, & - & u=u,v=v,w=w,th=th,qv=qv,qc=qc, & - & qi=qi,qni=qni,qnc=qnc, & - & qnwfa=qnwfa,qnifa=qnifa, & + & u=u,v=v,w=w,th=th,sqv3D=sqv,sqc3D=sqc, & + & sqi3D=sqi,qni=qni,qnc=qnc, & + & qnwfa=qnwfa,qnifa=qnifa,ozone=ozone, & & p=prsl,exner=exner,rho=rho,T3D=t3d, & & xland=xland,ts=ts,qsfc=qsfc,qcg=qcg,ps=ps, & & ust=ust,ch=ch,hfx=hfx,qfx=qfx,rmol=rmol, & & wspd=wspd,uoce=uoce,voce=voce,vdfg=vdfg, & !input - & qke=QKE,TKE_PBL=TKE_PBL, & - & sh3d=Sh3d, & !output + & qke=QKE,sh3d=Sh3d, & !output & qke_adv=qke_adv,bl_mynn_tkeadvect=bl_mynn_tkeadvect,& #if (WRF_CHEM == 1) & chem3d=chem,vd3d=vd,nchem=nchem,kdvel=kdvel, & @@ -544,7 +550,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & RQVBLTEN=RQVBLTEN,RQCBLTEN=rqcblten, & & RQIBLTEN=rqiblten,RQNCBLTEN=rqncblten, & !output & RQNIBLTEN=rqniblten,RQNWFABLTEN=RQNWFABLTEN, & !output - & RQNIFABLTEN=RQNIFABLTEN, & !output + & RQNIFABLTEN=RQNIFABLTEN,dozone=dqdt_ozone, & !output & EXCH_H=exch_h,EXCH_M=exch_m, & !output & pblh=pblh,KPBL=KPBL & !output & ,el_pbl=el_pbl & !output @@ -555,17 +561,20 @@ SUBROUTINE mynnedmf_wrapper_run( & & ,bl_mynn_cloudpdf=bl_mynn_cloudpdf & !input parameter & ,bl_mynn_mixlength=bl_mynn_mixlength & !input parameter & ,icloud_bl=icloud_bl & !input parameter - & ,qc_bl=qc_bl,cldfra_bl=cldfra_bl & !output + & ,qc_bl=qc_bl,qi_bl=qi_bl,cldfra_bl=cldfra_bl & !output & ,levflag=levflag,bl_mynn_edmf=bl_mynn_edmf & !input parameter & ,bl_mynn_edmf_mom=bl_mynn_edmf_mom & !input parameter & ,bl_mynn_edmf_tke=bl_mynn_edmf_tke & !input parameter & ,bl_mynn_mixscalars=bl_mynn_mixscalars & !input parameter + & ,bl_mynn_output=bl_mynn_output & !input parameter & ,bl_mynn_cloudmix=bl_mynn_cloudmix & !input parameter & ,bl_mynn_mixqt=bl_mynn_mixqt & !input parameter & ,edmf_a=edmf_a,edmf_w=edmf_w,edmf_qt=edmf_qt & !output & ,edmf_thl=edmf_thl,edmf_ent=edmf_ent,edmf_qc=edmf_qc &!output + & ,sub_thl3D=sub_thl,sub_sqv3D=sub_sqv & + & ,det_thl3D=det_thl,det_sqv3D=det_sqv & & ,nupdraft=nupdraft,maxMF=maxMF & !output - & ,ktop_shallow=ktop_shallow & !output + & ,ktop_plume=ktop_plume & !output & ,spp_pbl=spp_pbl,pattern_spp_pbl=pattern_spp_pbl & !input & ,RTHRATEN=RTHRATEN & !input & ,FLAG_QI=flag_qi,FLAG_QNI=flag_qni & !input @@ -605,9 +614,9 @@ SUBROUTINE mynnedmf_wrapper_run( & ! WSM6 do k=1,levs do i=1,im - dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) - dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) - dqdt_ice_cloud(i,k) = RQIBLTEN(i,k)/(1.0 + qv(i,k)) + dqdt_water_vapor(i,k) = RQVBLTEN(i,k) !/(1.0 + qv(i,k)) + dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k) !/(1.0 + qv(i,k)) + dqdt_ice_cloud(i,k) = RQIBLTEN(i,k) !/(1.0 + qv(i,k)) !dqdt_ozone(i,k) = 0.0 enddo enddo @@ -625,10 +634,10 @@ SUBROUTINE mynnedmf_wrapper_run( & if(ltaerosol) then do k=1,levs do i=1,im - dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) - dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) + dqdt_water_vapor(i,k) = RQVBLTEN(i,k) !/(1.0 + qv(i,k)) + dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k) !/(1.0 + qv(i,k)) dqdt_cloud_droplet_num_conc(i,k) = RQNCBLTEN(i,k) - dqdt_ice_cloud(i,k) = RQIBLTEN(i,k)/(1.0 + qv(i,k)) + dqdt_ice_cloud(i,k) = RQIBLTEN(i,k) !/(1.0 + qv(i,k)) dqdt_ice_num_conc(i,k) = RQNIBLTEN(i,k) !dqdt_ozone(i,k) = 0.0 dqdt_water_aer_num_conc(i,k) = RQNWFABLTEN(i,k) @@ -651,9 +660,9 @@ SUBROUTINE mynnedmf_wrapper_run( & !Thompson (2008) do k=1,levs do i=1,im - dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) - dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) - dqdt_ice_cloud(i,k) = RQIBLTEN(i,k)/(1.0 + qv(i,k)) + dqdt_water_vapor(i,k) = RQVBLTEN(i,k) !/(1.0 + qv(i,k)) + dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k) !/(1.0 + qv(i,k)) + dqdt_ice_cloud(i,k) = RQIBLTEN(i,k) !/(1.0 + qv(i,k)) dqdt_ice_num_conc(i,k) = RQNIBLTEN(i,k) !dqdt_ozone(i,k) = 0.0 enddo @@ -672,9 +681,9 @@ SUBROUTINE mynnedmf_wrapper_run( & ! GFDL MP do k=1,levs do i=1,im - dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) - dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) - dqdt_ice_cloud(i,k) = RQIBLTEN(i,k)/(1.0 + qv(i,k)) + dqdt_water_vapor(i,k) = RQVBLTEN(i,k) !/(1.0 + qv(i,k)) + dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k) !/(1.0 + qv(i,k)) + dqdt_ice_cloud(i,k) = RQIBLTEN(i,k) !/(1.0 + qv(i,k)) !dqdt_rain(i,k) = 0.0 !dqdt_snow(i,k) = 0.0 !dqdt_graupel(i,k) = 0.0 @@ -693,8 +702,8 @@ SUBROUTINE mynnedmf_wrapper_run( & ! print*,"In MYNN wrapper. Unknown microphysics scheme, imp_physics=",imp_physics do k=1,levs do i=1,im - dqdt_water_vapor(i,k) = RQVBLTEN(i,k)/(1.0 + qv(i,k)) - dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k)/(1.0 + qv(i,k)) + dqdt_water_vapor(i,k) = RQVBLTEN(i,k) !/(1.0 + qv(i,k)) + dqdt_liquid_cloud(i,k) = RQCBLTEN(i,k) !/(1.0 + qv(i,k)) dqdt_ice_cloud(i,k) = 0.0 !dqdt_rain(i,k) = 0.0 !dqdt_snow(i,k) = 0.0 @@ -736,9 +745,9 @@ SUBROUTINE mynnedmf_wrapper_run( & print*,"dz:",dz(1,1),dz(1,2),dz(1,levs) print*,"u:",u(1,1),u(1,2),u(1,levs) print*,"v:",v(1,1),v(1,2),v(1,levs) - print*,"qv:",qv(1,1),qv(1,2),qv(1,levs) - print*,"qc:",qc(1,1),qc(1,2),qc(1,levs) - print*,"qi:",qi(1,1),qi(1,2),qi(1,levs) + print*,"sqv:",sqv(1,1),sqv(1,2),sqv(1,levs) + print*,"sqc:",sqc(1,1),sqc(1,2),sqc(1,levs) + print*,"sqi:",sqi(1,1),sqi(1,2),sqi(1,levs) print*,"rmol:",rmol(1)," ust:",ust(1) print*,"dx(1)=",dx(1),"initflag=",initflag print*,"Tsurf:",tsurf(1)," Thetasurf:",ts(1) @@ -749,7 +758,7 @@ SUBROUTINE mynnedmf_wrapper_run( & print*,"im=",im," levs=",levs print*,"PBLH=",pblh(1)," KPBL=",KPBL(1)," xland=",xland(1) print*,"vdfg=",vdfg(1)," ch=",ch(1) - print*,"TKE:",TKE_PBL(1,1),TKE_PBL(1,2),TKE_PBL(1,levs) + !print*,"TKE:",TKE_PBL(1,1),TKE_PBL(1,2),TKE_PBL(1,levs) print*,"qke:",qke(1,1),qke(1,2),qke(1,levs) print*,"el_pbl:",el_pbl(1,1),el_pbl(1,2),el_pbl(1,levs) print*,"Sh3d:",Sh3d(1,1),sh3d(1,2),sh3d(1,levs) @@ -761,7 +770,7 @@ SUBROUTINE mynnedmf_wrapper_run( & print*,"dudt:",dudt(1,1),dudt(1,2),dudt(1,levs) print*,"dvdt:",dvdt(1,1),dvdt(1,2),dvdt(1,levs) print*,"dqdt:",dqdt_water_vapor(1,1),dqdt_water_vapor(1,2),dqdt_water_vapor(1,levs) - print*,"ktop_shallow:",ktop_shallow(1)," maxmf:",maxmf(1) + print*,"ktop_plume:",ktop_plume(1)," maxmf:",maxmf(1) print*,"nup:",nupdraft(1) print* endif diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 61a9ccb70..2e267b059 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -41,6 +41,14 @@ type = logical intent = in optional = F +[cycling] + standard_name = flag_for_cycling + long_name = flag for cycling or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F [lssav] standard_name = flag_diagnostics long_name = logical flag for storing diagnostics @@ -488,8 +496,17 @@ intent = inout optional = F [QC_BL] - standard_name = subgrid_cloud_mixing_ratio_pbl - long_name = subgrid cloud cloud mixing ratio from PBL scheme + standard_name = subgrid_cloud_water_mixing_ratio_pbl + long_name = subgrid cloud water mixing ratio from PBL scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[QI_BL] + standard_name = subgrid_cloud_ice_mixing_ratio_pbl + long_name = subgrid cloud ice mixing ratio from PBL scheme units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -559,6 +576,42 @@ kind = kind_phys intent = inout optional = F +[sub_thl] + standard_name = theta_subsidence_tendency + long_name = updraft theta subsidence tendency + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sub_sqv] + standard_name = water_vapor_subsidence_tendency + long_name = updraft water vapor subsidence tendency + units = kg kg-1 s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[det_thl] + standard_name = theta_detrainment_tendency + long_name = updraft theta detrainment tendency + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[det_sqv] + standard_name = water_vapor_detrainment_tendency + long_name = updraft water vapor detrainment tendency + units = kg kg-1 s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [nupdraft] standard_name = number_of_plumes long_name = number of plumes per grid column @@ -576,9 +629,9 @@ kind = kind_phys intent = out optional = F -[ktop_shallow] - standard_name = k_level_of_highest_reaching_plume - long_name = k-level of highest reaching plume +[ktop_plume] + standard_name = k_level_of_highest_plume + long_name = k-level of highest plume units = count dimensions = (horizontal_dimension) type = integer @@ -852,6 +905,14 @@ type = integer intent = in optional = F +[bl_mynn_output] + standard_name = mynn_output_flag + long_name = flag initialize and output extra 3D variables + units = flag + dimensions = () + type = integer + intent = in + optional = F [icloud_bl] standard_name = couple_sgs_clouds_to_radiation_flag long_name = flag for coupling sgs clouds to radiation diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index 544fe1004..e78941d81 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -40,7 +40,7 @@ subroutine sgscloud_radpre_run( & qci_conv, & imfdeepcnv, imfdeepcnv_gf, & qc_save, qi_save, & - qc_bl,cldfra_bl, & + qc_bl,qi_bl,cldfra_bl, & delp,clouds1,clouds2,clouds3, & clouds4,clouds5,slmsk, & nlay, plyr, xlat, dz,de_lgth, & @@ -67,7 +67,7 @@ subroutine sgscloud_radpre_run( & real(kind=kind_phys), dimension(im,levs), intent(inout) :: & & clouds1,clouds2,clouds3,clouds4,clouds5 real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc_save, qi_save - real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_bl, cldfra_bl + real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_bl, qi_bl, cldfra_bl real(kind=kind_phys), dimension(im), intent(in) :: slmsk, xlat, de_lgth real(kind=kind_phys), dimension(im,nlay), intent(in) :: plyr, dz real(kind=kind_phys), dimension(im,5), intent(inout) :: cldsa @@ -104,7 +104,8 @@ subroutine sgscloud_radpre_run( & end do end do - ! add boundary layer clouds + ! add boundary layer clouds - Note: now the temperature-dependent sorting of + ! ice and water subgrid-scale clouds is done inside the MYNN-EDMF if (do_mynnedmf) then do k = 1, levs do i = 1, im @@ -116,33 +117,30 @@ subroutine sgscloud_radpre_run( & ! clouds1(i,k) = cldfra_bl(i,k) !endif - if (qc(i,k) < 1.e-6 .and. qi(i,k) < 1.e-8 .and. cldfra_bl(i,k)>0.001) then - !Partition the BL clouds into water & ice according to a linear - !approximation of Hobbs et al. (1974). This allows us to only use - !one 3D array for both cloud water & ice. - !Wice = 1. - MIN(1., MAX(0., (t(i,k)-254.)/15.)) - !Wh2o = 1. - Wice - !clouds1(i,k)=MAX(clouds1(i,k),CLDFRA_BL(i,k)) - !clouds1(i,k)=MAX(0.0,MIN(1.0,clouds1(i,k))) - qc(i,k) = qc_bl(i,k)*(min(1., max(0., (T3D(i,k)-244.)/25.)))*cldfra_bl(i,k) - qi(i,k) = qc_bl(i,k)*(1. - min(1., max(0., (T3D(i,k)-244.)/25.)))*cldfra_bl(i,k) + if (qc(i,k) < 1.e-6 .and. cldfra_bl(i,k)>0.001) then + qc(i,k) = qc_bl(i,k)*cldfra_bl(i,k) + if (nint(slmsk(i)) == 1) then !land + if(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) + else + !eff radius cloud water (microns), from Miles et al. + if(qc(i,k)>1.E-8)clouds3(i,k)=9.6 + endif + !calculate the liquid water path using additional BL clouds + clouds2(i,k) = max(0.0, qc(i,k) * gfac * delp(i,k)) + endif + if (qi(i,k) < 1.e-8 .and. cldfra_bl(i,k)>0.001) then + qi(i,k) = qi_bl(i,k)*cldfra_bl(i,k) Tc = T3D(i,k) - 273.15 !iwc = qi(i,k)*1.0e6*rho(i,k) - if (nint(slmsk(i)) == 1) then !land - if(qc(i,k)>1.e-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) else - !eff radius cloud water (microns), from Miles et al. - if(qc(i,k)>1.E-8)clouds3(i,k)=9.6 - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 8b) !IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(139.7 + 1.76*Tc + 13.49*LOG(iwc), 20.) endif - !calculate water and ice paths for additional BL clouds - clouds2(i,k) = max(0.0, qc(i,k) * gfac * delp(i,k)) + !calculate the ice water path using additional BL clouds clouds4(i,k) = max(0.0, qi(i,k) * gfac * delp(i,k)) endif diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 507f4ba91..f8da4b262 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -140,8 +140,17 @@ intent = inout optional = F [QC_BL] - standard_name = subgrid_cloud_mixing_ratio_pbl - long_name = subgrid cloud cloud mixing ratio from PBL scheme + standard_name = subgrid_cloud_water_mixing_ratio_pbl + long_name = subgrid cloud water mixing ratio from PBL scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[QI_BL] + standard_name = subgrid_cloud_ice_mixing_ratio_pbl + long_name = subgrid cloud ice mixing ratio from PBL scheme units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index e472a2873..4c1468797 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -1,118 +1,131 @@ !>\file module_bl_mynn.F90 !! This file contains the entity of MYNN-EDMF PBL scheme. - !WRF:MODEL_LAYER:PHYSICS ! +! translated from NN f77 to F90 and put into WRF by Mariusz Pagowski +! NOAA/GSD & CIRA/CSU, Feb 2008 +! changes to original code: +! 1. code is 1D (in z) +! 2. no advection of TKE, covariances and variances +! 3. Cranck-Nicholson replaced with the implicit scheme +! 4. removed terrain dependent grid since input in WRF in actual +! distances in z[m] +! 5. cosmetic changes to adhere to WRF standard (remove common blocks, +! intent etc) +!------------------------------------------------------------------- +!Modifications implemented by Joseph Olson and Jaymes Kenyon NOAA/GSD/MDB - CU/CIRES +! +! Departures from original MYNN (Nakanish & Niino 2009) +! 1. Addition of BouLac mixing length in the free atmosphere. +! 2. Changed the turbulent mixing length to be integrated from the +! surface to the top of the BL + a transition layer depth. +! v3.4.1: Option to use Kitamura/Canuto modification which removes +! the critical Richardson number and negative TKE (default). +! Hybrid PBL height diagnostic, which blends a theta-v-based +! definition in neutral/convective BL and a TKE-based definition +! in stable conditions. +! TKE budget output option (bl_mynn_tkebudget) +! v3.5.0: TKE advection option (bl_mynn_tkeadvect) +! v3.5.1: Fog deposition related changes. +! v3.6.0: Removed fog deposition from the calculation of tendencies +! Added mixing of qc, qi, qni +! Added output for wstar, delta, TKE_PBL, & KPBL for correct +! coupling to shcu schemes +! v3.8.0: Added subgrid scale cloud output for coupling to radiation +! schemes (activated by setting icloud_bl =1 in phys namelist). +! Added WRF_DEBUG prints (at level 3000) +! Added Tripoli and Cotton (1981) correction. +! Added namelist option bl_mynn_cloudmix to test effect of mixing +! cloud species (default = 1: on). +! Added mass-flux option (bl_mynn_edmf, = 1 for DMP mass-flux, 0: off). +! Related options: +! bl_mynn_edmf_mom = 1 : activate momentum transport in MF scheme +! bl_mynn_edmf_tke = 1 : activate TKE transport in MF scheme +! Added mixing length option (bl_mynn_mixlength, see notes below) +! Added more sophisticated saturation checks, following Thompson scheme +! Added new cloud PDF option (bl_mynn_cloudpdf = 2) from Chaboureau +! and Bechtold (2002, JAS, with mods) +! Added capability to mix chemical species when env variable +! WRF_CHEM = 1, thanks to Wayne Angevine. +! Added scale-aware mixing length, following Junshi Ito's work +! Ito et al. (2015, BLM). +! v3.9.0 Improvement to the mass-flux scheme (dynamic number of plumes, +! better plume/cloud depth, significant speed up, better cloud +! fraction). +! Added Stochastic Parameter Perturbation (SPP) implementation. +! Many miscellaneous tweaks to the mixing lengths and stratus +! component of the subgrid clouds. +! v.4.0 Removed or added alternatives to WRF-specific functions/modules +! for the sake of portability to other models. +! the sake of portability to other models. +! Further refinement of mass-flux scheme from SCM experiments with +! Wayne Angevine: switch to linear entrainment and back to +! Simpson and Wiggert-type w-equation. +! Addition of TKE production due to radiation cooling at top of +! clouds (proto-version); not activated by default. +! Some code rewrites to move if-thens out of loops in an attempt to +! improve computational efficiency. +! New tridiagonal solver, which is supposedly 14% faster and more +! conservative. Impact seems very small. +! Many miscellaneous tweaks to the mixing lengths and stratus +! component of the subgrid-scale (SGS) clouds. +! v4.1 Big improvements in downward SW radiation due to revision of subgrid clouds +! - better cloud fraction and subgrid scale mixing ratios. +! - may experience a small cool bias during the daytime now that high +! SW-down bias is greatly reduced... +! Some tweaks to increase the turbulent mixing during the daytime for +! bl_mynn_mixlength option 2 to alleviate cool bias (very small impact). +! Improved ensemble spread from changes to SPP in MYNN +! - now perturbing eddy diffusivity and eddy viscosity directly +! - now perturbing background rh (in SGS cloud calc only) +! - now perturbing entrainment rates in mass-flux scheme +! Added IF checks (within IFDEFS) to protect mixchem code from being used +! when HRRR smoke is used (no impact on regular non-wrf chem use) +! Important bug fix for wrf chem when transporting chemical species in MF scheme +! Removed 2nd mass-flux scheme (no only bl_mynn_edmf = 1, no option 2) +! Removed unused stochastic code for mass-flux scheme +! Changed mass-flux scheme to be integrated on interface levels instead of +! mass levels - impact is small +! Added option to mix 2nd moments in MYNN as opposed to the scalar_pblmix option. +! - activated with bl_mynn_mixscalars = 1; this sets scalar_pblmix = 0 +! - added tridagonal solver used in scalar_pblmix option to duplicate tendencies +! - this alone changes the interface call considerably from v4.0. +! Slight revision to TKE production due to radiation cooling at top of clouds +! Added the non-Guassian buoyancy flux function of Bechtold and Siebesma (1998, JAS). +! - improves TKE in SGS clouds +! Added heating due to dissipation of TKE (small impact, maybe + 0.1 C daytime PBL temp) +! Misc changes made for FV3/MPAS compatibility +! v4.2 A series of small tweaks to help reduce a cold bias in the PBL: +! - slight increase in diffusion in convective conditions +! - relaxed criteria for mass-flux activation/strength +! - added capability to cycle TKE for continuity in hourly updating HRRR +! - added effects of compensational environmental subsidence in mass-flux scheme, +! which resulted in tweaks to detrainment rates. +! Bug fix for diagnostic-decay of SGS clouds - noticed by Greg Thompson. This has +! a very small, but primarily positive, impact on SW-down biases. +! Tweak to calculation of KPBL - urged by Laura Fowler - to make more intuitive. +! Tweak to temperature range of blending for saturation check (water to ice). This +! slightly reduces excessive SGS clouds in polar region. No impact warm clouds. +! Added namelist option bl_mynn_output (0 or 1) to suppress or activate the +! allocation and output of 10 3D variables. Most people will want this +! set to 0 (default) to save memory and disk space. +! Added new array qi_bl as opposed to using qc_bl for both SGS qc and qi. This +! gives us more control of the magnitudes which can be confounded by using +! a single array. As a results, many subroutines needed to be modified, +! especially mym_condensation. +! Added the blending of the stratus component of the SGS clouds to the mass-flux +! clouds to account for situations where stratus and cumulus may exist in the +! grid cell. +! Misc small-impact bugfixes: +! 1) dz was incorrectly indexed in mym_condensation +! 2) configurations with icloud_bl = 0 were using uninitialized arrays +! +! Many of these changes are now documented in Olson et al. (2019, +! NOAA Technical Memorandum) +! +! For more explanation of some configuration options, see "JOE's mods" below: +!------------------------------------------------------------------- -!>\defgroup gsd_mynn_edmf GSD MYNN-EDMF PBL Scheme Module -!! The MYNN-EDMF scheme (Olson et al. 2019 \cite olson_et_al_2019) represents the local -!! mixing using an eddy-diffusivity approach tied to turbulent kinetic energy (TKE). -!! The nonlocal mixing, important for convective boundary layers, is represented using -!! a mass-flux approach. The scheme can be run with either a 2.5 or 3.0 closure and includes -!! a partial-condensation scheme, commonly referred to as a cloud PDF or statistical-cloud -!! scheme, to represent the effects of subgrid-scale (SGS) clouds on buoyancy. -!! This module was originally translated from Nakanishi and Niino (2009) \cite NAKANISHI_2009 -!! and put into the WRF model by Mariusz Pagowski NOAA/GSD and CIRA/CSU in 2008. It was -!! extensively modified by Joseph Olson and Jaymes Kenyon of NOAA/GSD and CU/CIRES. -!! -!! Changes to original code introduced by M. Pagowski in 2008: -!! -# Code is 1D (in z) -!! -# No advection of TKE, covariances and variances -!! -# Cranck-Nicholson replaced with the implicit scheme -!! -# Removed terrain dependent grid since input in WRF in actual distances in z[m] -!! -# Cosmetic changes to adhere to WRF standard (remove common blocks, intent etc) -!! -!! Further modifications implemented by J. Olson and J. Kenyon: -!! -!! Departures from original MYNN (Nakanish and Niino (2009) \cite NAKANISHI_2009) -!! -# Added the of BouLac mixing length in the free atmosphere. -!! -# Changed the turbulent mixing length to be integrated from the -!! surface to the top of the BL plus a transition layer depth. -!! -!! Changes made in various versions of the WRF model: -!!\version v3.4.1: -!! - Option to use Kitamura/Canuto modification which removes -!! the critical Richardson number and negative TKE (default) -!! - Hybrid PBL height diagnostic, which blends a theta-v-based -!! definition in neutral/convective BL and a TKE-based definition -!! in stable conditions. -!! - TKE budget output option (bl_mynn_tkebudget) -!!\version v3.5.0: -!! - TKE advection option (bl_mynn_tkeadvect) -!!\version v3.5.1: -!! - Fog deposition related changes -!!\version v3.6.0: -!! - Removed fog deposition from the calculation of tendencies -!! - Added mixing of qc, qi, qni -!! - Added output for wstar, delta, TKE_PBL, & KPBL for correct -!! coupling to shcu schemes -!!\version v3.8.0: -!! - Added subgrid scale cloud output for coupling to radiation -!! schemes (activated by setting icloud_bl =1 in phys namelist) -!! - Added WRF_DEBUG prints (at level 3000) -!! - Added Tripoli and Cotton (1981) \cite Tripoli_1981 correction -!! - Added namelist option bl_mynn_cloudmix to test effect of mixing cloud species (default = 1: on) -!! - Added mass-flux option (bl_mynn_edmf, = 1 for DMP mass-flux, 0: off). Related options: -!! - bl_mynn_edmf_mom = 1 : activate momentum transport in MF scheme -!! - bl_mynn_edmf_tke = 1 : activate TKE transport in MF scheme -!! - Added mixing length option (bl_mynn_mixlength, see notes below) -!! - Added more sophisticated saturation checks, following Thompson scheme -!! - Added new cloud PDF option (bl_mynn_cloudpdf = 2) from Chaboureau -!! and Bechtold (2002) \cite Chaboureau_2002 with modifications -!! - Added capability to mix chemical species when env variable -!! WRF_CHEM = 1, thanks to Wayne Angevine -!! - Added scale-aware mixing length, following Junshi Ito's work -!! Ito et al. (2015, BLM) \cite Ito_2015 -!!\version v3.9.0: -!! - Improvement to the mass-flux scheme (dynamic number of plumes, -!! better plume/cloud depth, significant speed up, better cloud fraction) -!! - Added Stochastic Parameter Perturbation (SPP) implementation -!! - Many miscellaneous tweaks to the mixing lengths and stratus -!! component of the subgrid clouds -!!\version v4.0: -!! - Removed or added alternatives to WRF-specific functions/modules -!! for the sake of portability to other models -!! - Further refinement of mass-flux scheme from SCM experiments with -!! Wayne Angevine: switch to linear entrainment and back to -!! Simpson and Wiggert-type w-equation -!! - Addition of TKE production due to radiation cooling at top of -!! clouds (proto-version); not activated by default -!! - Some code rewrites to move if-thens out of loops in an attempt to -!! improve computational efficiency -!! - New tridiagonal solver, which is supposedly 14% faster and more -!! conservative. Impact seems very small -!! - Many miscellaneous tweaks to the mixing lengths and stratus -!! component of the subgrid-scale (SGS) clouds -!!\version v4.1: -!! - Big improvements in downward SW radiation due to revision of subgrid clouds -!! - better cloud fraction and subgrid scale mixing ratios -!! - may experience a small cool bias during the daytime now that high -!! SW-down bias is greatly reduced -!! - Some tweaks to increase the turbulent mixing during the daytime for -!! bl_mynn_mixlength option 2 to alleviate cool bias (very small impact) -!! - Improved ensemble spread from changes to Stochastic Parameter Perturbation (SPP) in MYNN -!! - now perturbing eddy diffusivity and eddy viscosity directly -!! - now perturbing background rh (in SGS cloud calc only) -!! - now perturbing entrainment rates in mass-flux scheme -!! - Added IF checks (within IFDEFS) to protect mixchem code from being used -!! when HRRR smoke is used (no impact when WRF-CHEM is not used) -!! - Important bug fix for WRF-CHEM when transporting chemical species in MF scheme -!! - Removed 2nd mass-flux scheme (no only bl_mynn_edmf = 1, no option 2) -!! - Removed unused stochastic code for mass-flux scheme -!! - Changed mass-flux scheme to be integrated on interface levels instead of -!! mass levels - impact is small -!! - Added option to mix second moments in MYNN as opposed to the scalar_pblmix option. -!! - activated with bl_mynn_mixscalars = 1; this sets scalar_pblmix = 0 -!! - added tridagonal solver used in scalar_pblmix option to duplicate tendencies -!! - this alone changes the interface call considerably from v4.0 -!! - Slight revision to TKE production due to radiation cooling at top of clouds -!! - Added the non-Guassian buoyancy flux function of Bechtold and Siebesma (1998) \cite Bechtold_1998 -!! - improves TKE in SGS clouds -!! - Added heating due to dissipation of TKE (small impact, maybe + 0.1 C daytime PBL temp) -!! - Miscellaneous changes made for FV3/MPAS compatibility -!! -!!Many of these changes are now documented in Olson et al. (2019, -!! NOAA Technical Memorandum) MODULE module_bl_mynn !================================================================== @@ -219,7 +232,8 @@ MODULE module_bl_mynn REAL, PARAMETER :: rr2=0.7071068, rrp=0.3989423 ! 'parameters' for Poisson distribution (EDMF scheme) - REAL, PARAMETER :: zero = 0.0, half = 0.5, one = 1.0, two = 2.0 + REAL, PARAMETER :: zero = 0.0, half = 0.5, one = 1.0, two = 2.0, & + onethird = 1./3., twothirds = 2./3. !>Use Canuto/Kitamura mod (remove Ric and negative TKE) (1:yes, 0:no) !!For more info, see Canuto et al. (2008 JAS) and Kitamura (Journal of the @@ -245,7 +259,10 @@ MODULE module_bl_mynn !>Option to activate heating due to dissipation of TKE (to activate, set to 1.0) REAL, PARAMETER :: dheat_opt = 1. - !>option to print out more stuff for debugging purposes + !Option to activate environmental subsidence in mass-flux scheme + LOGICAL, PARAMETER :: env_subs = .true. + + !option to print out more stuff for debugging purposes LOGICAL, PARAMETER :: debug_code = .false. ! JAYMES- @@ -450,12 +467,14 @@ SUBROUTINE mym_initialize ( & & Qke, Tsq, Qsq, Cov, Psig_bl, cldfra_bl1D, & & bl_mynn_mixlength, & & edmf_w1,edmf_a1,edmf_qc1,bl_mynn_edmf, & + & INITIALIZE_QKE, & & spp_pbl,rstoch_col) ! !------------------------------------------------------------------- INTEGER, INTENT(IN) :: kts,kte INTEGER, INTENT(IN) :: bl_mynn_mixlength,bl_mynn_edmf + LOGICAL, INTENT(IN) :: INITIALIZE_QKE ! REAL, INTENT(IN) :: ust, rmo, pmz, phh, flt, flq REAL, INTENT(IN) :: ust, rmo, Psig_bl REAL, DIMENSION(kts:kte), INTENT(in) :: dz @@ -493,7 +512,15 @@ SUBROUTINE mym_initialize ( & ! ** Preliminary setting ** el (kts) = 0.0 - qke(kts) = ust**2 * ( b1*pmz )**(2.0/3.0) + IF (INITIALIZE_QKE) THEN + !qke(kts) = ust**2 * ( b1*pmz )**(2.0/3.0) + qke(kts) = 1.5 * ust**2 * ( b1*pmz )**(2.0/3.0) + DO k = kts+1,kte + !qke(k) = 0.0 + !linearly taper off towards top of pbl + qke(k)=qke(kts)*MAX((ust*700. - zw(k))/(MAX(ust,0.01)*700.), 0.01) + ENDDO + ENDIF ! phm = phh*b2 / ( b1*pmz )**(1.0/3.0) tsq(kts) = phm*( flt/ust )**2 @@ -503,7 +530,7 @@ SUBROUTINE mym_initialize ( & DO k = kts+1,kte vkz = vk*zw(k) el (k) = vkz/( 1.0 + vkz/100.0 ) - qke(k) = 0.0 +! qke(k) = 0.0 ! tsq(k) = 0.0 qsq(k) = 0.0 @@ -512,7 +539,7 @@ SUBROUTINE mym_initialize ( & ! ! ** Initialization with an iterative manner ** ! ** lmax is the iteration count. This is arbitrary. ** - lmax = 5 + lmax = 5 ! DO l = 1,lmax ! @@ -522,7 +549,7 @@ SUBROUTINE mym_initialize ( & & dz, zw, & & rmo, flt, flq, & & vt, vq, & - & qke, & + & u, v, qke, & & dtv, & & el, & & zi,theta, & @@ -540,34 +567,38 @@ SUBROUTINE mym_initialize ( & ! ! ** Strictly, vkz*h(i,j) -> vk*( 0.5*dz(1)*h(i,j)+z0 ) ** vkz = vk*0.5*dz(kts) -! - elv = 0.5*( el(kts+1)+el(kts) ) / vkz - qke(kts) = ust**2 * ( b1*pmz*elv )**(2.0/3.0) -! + elv = 0.5*( el(kts+1)+el(kts) ) / vkz + IF (INITIALIZE_QKE)THEN + !qke(kts) = ust**2 * ( b1*pmz*elv )**(2.0/3.0) + qke(kts) = 1.0 * MAX(ust,0.02)**2 * ( b1*pmz*elv )**(2.0/3.0) + ENDIF + phm = phh*b2 / ( b1*pmz/elv**2 )**(1.0/3.0) tsq(kts) = phm*( flt/ust )**2 qsq(kts) = phm*( flq/ust )**2 cov(kts) = phm*( flt/ust )*( flq/ust ) -! + DO k = kts+1,kte-1 b1l = b1*0.25*( el(k+1)+el(k) ) - tmpq=MAX(b1l*( pdk(k+1)+pdk(k) ),qkemin) + !tmpq=MAX(b1l*( pdk(k+1)+pdk(k) ),qkemin) + !add MIN to limit unreasonable QKE + tmpq=MIN(MAX(b1l*( pdk(k+1)+pdk(k) ),qkemin),125.) ! PRINT *,'tmpqqqqq',tmpq,pdk(k+1),pdk(k) - qke(k) = tmpq**(2.0/3.0) + IF (INITIALIZE_QKE)THEN + qke(k) = tmpq**twothirds + ENDIF -! IF ( qke(k) .LE. 0.0 ) THEN b2l = 0.0 ELSE b2l = b2*( b1l/b1 ) / SQRT( qke(k) ) END IF -! + tsq(k) = b2l*( pdt(k+1)+pdt(k) ) qsq(k) = b2l*( pdq(k+1)+pdq(k) ) cov(k) = b2l*( pdc(k+1)+pdc(k) ) END DO -! END DO !! qke(kts)=qke(kts+1) @@ -575,7 +606,10 @@ SUBROUTINE mym_initialize ( & !! qsq(kts)=qsq(kts+1) !! cov(kts)=cov(kts+1) - qke(kte)=qke(kte-1) + IF (INITIALIZE_QKE)THEN + qke(kts)=0.5*(qke(kts)+qke(kts+1)) + qke(kte)=qke(kte-1) + ENDIF tsq(kte)=tsq(kte-1) qsq(kte)=qsq(kte-1) cov(kte)=cov(kte-1) @@ -760,7 +794,7 @@ SUBROUTINE mym_length ( & & dz, zw, & & rmo, flt, flq, & & vt, vq, & - & qke, & + & u1, v1, qke, & & dtv, & & el, & & zi,theta, & @@ -780,7 +814,7 @@ SUBROUTINE mym_length ( & REAL, DIMENSION(kts:kte), INTENT(in) :: dz REAL, DIMENSION(kts:kte+1), INTENT(in) :: zw REAL, INTENT(in) :: rmo,flt,flq,Psig_bl - REAL, DIMENSION(kts:kte), INTENT(IN) :: qke,vt,vq,cldfra_bl1D,& + REAL, DIMENSION(kts:kte), INTENT(IN) :: u1,v1,qke,vt,vq,cldfra_bl1D,& edmf_w1,edmf_a1,edmf_qc1 REAL, DIMENSION(kts:kte), INTENT(out) :: qkw, el REAL, DIMENSION(kts:kte), INTENT(in) :: dtv @@ -819,7 +853,8 @@ SUBROUTINE mym_length ( & INTEGER :: i,j,k REAL :: afk,abk,zwk,zwk1,dzk,qdz,vflx,bv,tau_cloud,elb,els,els1,elf, & - & el_stab,el_unstab,el_mf,el_stab_mf,elb_mf,PBLH_PLUS_ENT,el_les + & el_stab,el_unstab,el_mf,el_stab_mf,elb_mf,PBLH_PLUS_ENT, & + & Uonset,Ugrid,el_les ! tv0 = 0.61*tref ! gtr = 9.81/tref @@ -1003,13 +1038,15 @@ SUBROUTINE mym_length ( & CASE (2) !Experimental mixing length formulation - cns = 3.5 - alp1 = 0.25 + 0.02*MIN(MAX(zi-200.,0.),1000.)/1000. !0.23 - alp2 = 0.6 !0.3 - alp3 = 3.0 !2.0 - alp4 = 20. !10. - alp5 = 0.6 !0.3 !like alp2, but for free atmosphere - alp6 = 50.0 !used for MF mixing length instead of BouLac (x times MF) + Uonset = 2.5 + dz(kts)*0.1 + Ugrid = sqrt(u1(kts)**2 + v1(kts)**2) + cns = 3.5 * (1.0 - MIN(MAX(Ugrid - Uonset, 0.0)/10.0, 1.0)) + alp1 = 0.23 + alp2 = 0.30 + alp3 = 2.0 + alp4 = 20. !10. + alp5 = alp2 !like alp2, but for free atmosphere + alp6 = 50.0 !used for MF mixing length ! Impose limits on the height integration for elt and the transition layer depth !zi2=MAX(zi,minzi) @@ -1025,7 +1062,7 @@ SUBROUTINE mym_length ( & afk = dz(k)/( dz(k)+dz(k-1) ) abk = 1.0 -afk qkw(k) = SQRT(MAX(qke(k)*abk+qke(k-1)*afk,1.0e-3)) - qtke(k) = 0.5*qkw(k) ! q -> TKE + qtke(k) = 0.5*qkw(k) ! qkw -> TKE END DO elt = 1.0e-5 @@ -1046,7 +1083,7 @@ SUBROUTINE mym_length ( & elt = MAX(alp1*elt/vsc, 10.) vflx = ( vt(kts)+1.0 )*flt +( vq(kts)+tv0 )*flq - vsc = ( gtr*elt*MAX( vflx, 0.0 ) )**(1.0/3.0) + vsc = ( gtr*elt*MAX( vflx, 0.0 ) )**onethird ! ** Strictly, el(i,j,1) is not zero. ** el(kts) = 0.0 @@ -1061,7 +1098,7 @@ SUBROUTINE mym_length ( & bv = SQRT( gtr*dtv(k) ) !elb_mf = alp2*qkw(k) / bv & elb_mf = MAX(alp2*qkw(k), & -! &MAX(1.-2.0*cldavg,0.0)**0.5*alp6*edmf_a1(k)*edmf_w1(k)) / bv & +! &MAX(1.-0.5*cldavg,0.0)**0.5 * alp6*edmf_a1(k)*edmf_w1(k)) / bv & & alp6*edmf_a1(k)*edmf_w1(k)) / bv & & *( 1.0 + alp3*SQRT( vsc/( bv*elt ) ) ) elb = MIN(alp5*qkw(k)/bv, zwk) @@ -1084,7 +1121,7 @@ SUBROUTINE mym_length ( & ! velocity scale), except that elt is relpaced ! by zi, and zero is replaced by 1.0e-4 to ! prevent division by zero. - tau_cloud = MIN(MAX(0.5*zi/((gtr*zi*MAX(flt,1.0e-4))**(1.0/3.0)),50.),150.) + tau_cloud = MIN(MAX(0.5*zi/((gtr*zi*MAX(flt,1.0e-4))**onethird),50.),150.) !minimize influence of surface heat flux on tau far away from the PBLH. wt=.5*TANH((zwk - (zi2+h1))/h2) + .5 tau_cloud = tau_cloud*(1.-wt) + 50.*wt @@ -1598,7 +1635,7 @@ SUBROUTINE mym_turbulence ( & & dz, zw, & & rmo, flt, flq, & & vt, vq, & - & qke, & + & u, v, qke, & & dtv, & & el, & & zi,theta, & @@ -1996,7 +2033,7 @@ END SUBROUTINE mym_turbulence ! ================================================================== ! SUBROUTINE mym_predict: ! -!! Input variables: see subroutine mym_initialize and turbulence +! Input variables: see subroutine mym_initialize and turbulence ! qke(nx,nz,ny) : qke at (n)th time level ! tsq, ...cov : ditto ! @@ -2361,11 +2398,12 @@ END SUBROUTINE mym_predict !! use of the namelist parameter \p bl_mynn_cloudpdf . SUBROUTINE mym_condensation (kts,kte, & & dx, dz, zw, & - & thl, qw, & + & thl, qw, qv, qc, qi, & & p,exner, & & tsq, qsq, cov, & & Sh, el, bl_mynn_cloudpdf,& - & qc_bl1D, cldfra_bl1D, & + & qc_bl1D, qi_bl1D, & + & cldfra_bl1D, & & PBLH1,HFX1, & & Vt, Vq, th, sgm, rmo, & & spp_pbl,rstoch_col ) @@ -2382,18 +2420,20 @@ SUBROUTINE mym_condensation (kts,kte, & REAL, INTENT(IN) :: dx,PBLH1,HFX1,rmo REAL, DIMENSION(kts:kte), INTENT(IN) :: dz REAL, DIMENSION(kts:kte+1), INTENT(IN) :: zw - REAL, DIMENSION(kts:kte), INTENT(IN) :: p,exner, thl, qw, & + REAL, DIMENSION(kts:kte), INTENT(IN) :: p,exner,thl,qw,qv,qc,qi, & &tsq, qsq, cov, th REAL, DIMENSION(kts:kte), INTENT(INOUT) :: vt,vq,sgm - REAL, DIMENSION(kts:kte) :: qmq,alp,a,bet,b,ql,q1,cld,RH - REAL, DIMENSION(kts:kte), INTENT(OUT) :: qc_bl1D,cldfra_bl1D + REAL, DIMENSION(kts:kte) :: qmq,alp,a,bet,b,ql,q1,RH + REAL, DIMENSION(kts:kte), INTENT(OUT) :: qc_bl1D,qi_bl1D, & + cldfra_bl1D DOUBLE PRECISION :: t3sq, r3sq, c3sq REAL :: qsl,esat,qsat,tlk,qsat_tl,dqsl,cld0,q1k,eq1,qll,& &q2p,pt,rac,qt,t,xl,rsl,cpm,cdhdz,Fng,qww,alpha,beta,bb,& - &ls_min,ls,wt,cld_factor,fac_damp + &ls_min,ls,wt,cld_factor,fac_damp,liq_frac,ql_ice,ql_water,& + &low_weight INTEGER :: i,j,k REAL :: erf @@ -2403,12 +2443,8 @@ SUBROUTINE mym_condensation (kts,kte, & REAL, DIMENSION(kts:kte), INTENT(IN) :: Sh,el !JOE: variables for BL clouds - REAL::zagl,cld9,damp,edown,RHcrit,RHmean,RHsum,RHnum,Hshcu,PBLH2,ql_limit - REAL, PARAMETER :: Hfac = 3.0 !cloud depth factor for HFX (m^3/W) - REAL, PARAMETER :: HFXmin = 50.0 !min W/m^2 for BL clouds - REAL :: RH_00L, RH_00O, phi_dz, lfac - REAL, PARAMETER :: cdz = 2.0 - REAL, PARAMETER :: mdz = 1.5 + REAL::zagl,damp,PBLH2,ql_limit + REAL :: lfac !JAYMES: variables for tropopause-height estimation REAL :: theta1, theta2, ht1, ht2 @@ -2463,14 +2499,10 @@ SUBROUTINE mym_condensation (kts,kte, & qsl=ep_2*esat/max(1.e-4,(p(k)-ep_3*esat)) !dqw/dT: Clausius-Clapeyron dqsl = qsl*ep_2*ev/( rd*t**2 ) - !RH (0 to 1.0) - RH(k)=MAX(MIN(1.0,qw(k)/MAX(1.E-8,qsl)),0.001) alp(k) = 1.0/( 1.0+dqsl*xlvcp ) bet(k) = dqsl*exner(k) - !NOTE: negative bl_mynn_cloudpdf will zero-out the stratus subgrid clouds - ! at the end of this subroutine. !Sommeria and Deardorff (1977) scheme, as implemented !in Nakanishi and Niino (2009), Appendix B t3sq = MAX( tsq(k), 0.0 ) @@ -2480,13 +2512,38 @@ SUBROUTINE mym_condensation (kts,kte, & r3sq = r3sq +bet(k)**2*t3sq -2.0*bet(k)*c3sq !DEFICIT/EXCESS WATER CONTENT qmq(k) = qw(k) -qsl - !ORIGINAL STANDARD DEVIATION: limit e-6 produces ~10% more BL clouds - !than e-10 + !ORIGINAL STANDARD DEVIATION sgm(k) = SQRT( MAX( r3sq, 1.0d-10 )) !NORMALIZED DEPARTURE FROM SATURATION q1(k) = qmq(k) / sgm(k) !CLOUD FRACTION. rr2 = 1/SQRT(2) = 0.707 - cld(k) = 0.5*( 1.0+erf( q1(k)*rr2 ) ) + cldfra_bl1D(k) = 0.5*( 1.0+erf( q1(k)*rr2 ) ) + + eq1 = rrp*EXP( -0.5*q1k*q1k ) + qll = MAX( cldfra_bl1D(k)*q1k + eq1, 0.0 ) + !ESTIMATED LIQUID WATER CONTENT (UNNORMALIZED) + ql(k) = alp(k)*sgm(k)*qll + !LIMIT SPECIES TO TEMPERATURE RANGES + liq_frac = min(1.0, max(0.0,(t-240.0)/29.0)) + qc_bl1D(k) = liq_frac*ql(k) + qi_bl1D(k) = (1.0 - liq_frac)*ql(k) + + if(cldfra_bl1D(k)>0.01 .and. qc_bl1D(k)<1.E-6)qc_bl1D(k)=1.E-6 + if(cldfra_bl1D(k)>0.01 .and. qi_bl1D(k)<1.E-8)qi_bl1D(k)=1.E-8 + + !Now estimate the buiyancy flux functions + q2p = xlvcp/exner(k) + pt = thl(k) +q2p*ql(k) ! potential temp + + !qt is a THETA-V CONVERSION FOR TOTAL WATER (i.e., THETA-V = qt*THETA) + qt = 1.0 +p608*qw(k) -(1.+p608)*(qc_bl1D(k)+qi_bl1D(k))*cldfra_bl1D(k) + rac = alp(k)*( cldfra_bl1D(K)-qll*eq1 )*( q2p*qt-(1.+p608)*pt ) + + !BUOYANCY FACTORS: wherever vt and vq are used, there is a + !"+1" and "+tv0", respectively, so these are subtracted out here. + !vt is unitless and vq has units of K. + vt(k) = qt-1.0 -rac*bet(k) + vq(k) = p608*pt-tv0 +rac END DO @@ -2501,8 +2558,6 @@ SUBROUTINE mym_condensation (kts,kte, & qsl=ep_2*esat/max(1.e-4,(p(k)-ep_3*esat)) !dqw/dT: Clausius-Clapeyron dqsl = qsl*ep_2*ev/( rd*t**2 ) - !RH (0 to 1.0) - RH(k)=MAX(MIN(1.0,qw(k)/MAX(1.E-8,qsl)),0.001) alp(k) = 1.0/( 1.0+dqsl*xlvcp ) bet(k) = dqsl*exner(k) @@ -2510,7 +2565,7 @@ SUBROUTINE mym_condensation (kts,kte, & if (k .eq. kts) then dzk = 0.5*dz(k) else - dzk = 0.5*( dz(k) + dz(k-1) ) + dzk = dz(k) end if dth = 0.5*(thl(k+1)+thl(k)) - 0.5*(thl(k)+thl(MAX(k-1,kts))) dqw = 0.5*(qw(k+1) + qw(k)) - 0.5*(qw(k) + qw(MAX(k-1,kts))) @@ -2519,12 +2574,44 @@ SUBROUTINE mym_condensation (kts,kte, & (dqw/dzk - bet(k)*(dth/dzk ))**2 , 1.0e-10) ) qmq(k) = qw(k) -qsl q1(k) = qmq(k) / sgm(k) - cld(k) = 0.5*( 1.0+erf( q1(k)*rr2 ) ) + cldfra_bl1D(K) = 0.5*( 1.0+erf( q1(k)*rr2 ) ) + + !now compute estimated lwc for PBL scheme's use + !qll IS THE NORMALIZED LIQUID WATER CONTENT (Sommeria and + !Deardorff (1977, eq 29a). rrp = 1/(sqrt(2*pi)) = 0.3989 + q1k = q1(k) + eq1 = rrp*EXP( -0.5*q1k*q1k ) + qll = MAX( cldfra_bl1D(K)*q1k + eq1, 0.0 ) + !ESTIMATED LIQUID WATER CONTENT (UNNORMALIZED) + ql (k) = alp(k)*sgm(k)*qll + liq_frac = min(1.0, max(0.0,(t-240.0)/29.0)) + qc_bl1D(k) = liq_frac*ql(k) + qi_bl1D(k) = (1.0 - liq_frac)*ql(k) + + if(cldfra_bl1D(k)>0.01 .and. qc_bl1D(k)<1.E-6)qc_bl1D(k)=1.E-6 + if(cldfra_bl1D(k)>0.01 .and. qi_bl1D(k)<1.E-8)qi_bl1D(k)=1.E-8 + + !Now estimate the buiyancy flux functions + q2p = xlvcp/exner(k) + pt = thl(k) +q2p*ql(k) ! potential temp + + !qt is a THETA-V CONVERSION FOR TOTAL WATER (i.e., THETA-V = qt*THETA) + qt = 1.0 +p608*qw(k) -(1.+p608)*(qc_bl1D(k)+qi_bl1D(k))*cldfra_bl1D(k) + rac = alp(k)*( cldfra_bl1D(K)-qll*eq1 )*( q2p*qt-(1.+p608)*pt ) + + !BUOYANCY FACTORS: wherever vt and vq are used, there is a + !"+1" and "+tv0", respectively, so these are subtracted out here. + !vt is unitless and vq has units of K. + vt(k) = qt-1.0 -rac*bet(k) + vq(k) = p608*pt-tv0 +rac + END DO CASE (2, -2) - !Diagnostic statistical scheme of Chaboureau and Bechtold (2002), JAS - !JAYMES- this added 27 Apr 2015 + !Diagnostic statistical scheme of Chaboureau and Bechtold (2002), JAS + !JAYMES- this added 27 Apr 2015 + PBLH2=MAX(10.,PBLH1) + zagl = 0. DO k = kts,kte-1 t = th(k)*exner(k) !SATURATED VAPOR PRESSURE @@ -2541,48 +2628,38 @@ SUBROUTINE mym_condensation (kts,kte, & bet(k) = dqsl*exner(k) xl = xl_blend(t) ! obtain latent heat - tlk = thl(k)*(p(k)/p1000mb)**rcp ! recover liquid temp (tl) from thl - qsat_tl = qsat_blend(tlk,p(k)) ! get saturation water vapor mixing ratio ! at tl and p - rsl = xl*qsat_tl / (r_v*tlk**2) ! slope of C-C curve at t = tl ! CB02, Eqn. 4 - cpm = cp + qw(k)*cpv ! CB02, sec. 2, para. 1 - a(k) = 1./(1. + xl*rsl/cpm) ! CB02 variable "a" - !SPP qw_pert = qw(k) + qw(k)*0.5*rstoch_col(k)*real(spp_pbl) - !qmq(k) = a(k) * (qw(k) - qsat_tl) ! saturation deficit/excess; ! the numerator of Q1 qmq(k) = a(k) * (qw_pert - qsat_tl) - b(k) = a(k)*rsl ! CB02 variable "b" - dtl = 0.5*(thl(k+1)*(p(k+1)/p1000mb)**rcp + tlk) & & - 0.5*(tlk + thl(MAX(k-1,kts))*(p(MAX(k-1,kts))/p1000mb)**rcp) - dqw = 0.5*(qw(k+1) + qw(k)) - 0.5*(qw(k) + qw(MAX(k-1,kts))) if (k .eq. kts) then dzk = 0.5*dz(k) else - dzk = 0.5*( dz(k) + dz(k-1) ) + dzk = dz(k) end if cdhdz = dtl/dzk + (g/cpm)*(1.+qw(k)) ! expression below Eq. 9 ! in CB02 - zagl = zagl + dz(k) !Use analog to surface layer length scale to make the cloud mixing length scale !become less than z in stable conditions. - els = zagl ! /(1.0 + 1.0*MIN( 0.5*dz(1)*MAX(rmo,0.0), 1. )) + els = zagl !save for more testing: /(1.0 + 1.0*MIN( 0.5*dz(1)*MAX(rmo,0.0), 1. )) - ls_min = 300. + MIN(3.*MAX(HFX1,0.),300.) + !ls_min = 300. + MIN(3.*MAX(HFX1,0.),300.) + ls_min = 300. + MIN(2.*MAX(HFX1,0.),150.) ls_min = MIN(MAX(els,25.),ls_min) ! Let this be the minimum possible length scale: if (zagl > PBLH1+2000.) ls_min = MAX(ls_min + 0.5*(PBLH1+2000.-zagl),300.) ! 25 m < ls_min(=zagl) < 300 m @@ -2590,7 +2667,6 @@ SUBROUTINE mym_condensation (kts,kte, & ! lfac(750 m) = 4.4 ! lfac(3 km) = 5.0 ! lfac(13 km) = 6.0 - ls = MAX(MIN(lfac*el(k),600.),ls_min) ! Bounded: ls_min < ls < 600 m ! Note: CB02 use 900 m as a constant free-atmosphere length scale. @@ -2606,118 +2682,80 @@ SUBROUTINE mym_condensation (kts,kte, & ! based on tests q1(k) = qmq(k) / sgm(k) ! Q1, the normalized saturation - - cld(k) = MAX(0., MIN(1., 0.5+0.36*ATAN(1.55*q1(k)))) ! Eq. 7 in CB02 - - END DO - - END SELECT - - zagl = 0. - RHsum=0. - RHnum=0. - RHmean=0.1 !initialize with small value for small PBLH cases - damp =0 - PBLH2=MAX(10.,PBLH1) - - SELECT CASE(bl_mynn_cloudpdf) - - CASE (-1 : 1) ! ORIGINAL MYNN PARTIAL-CONDENSATION SCHEME - ! OR KUWANO ET AL. - DO k = kts,kte-1 - t = th(k)*exner(k) - q1k = q1(k) - zagl = zagl + dz(k) - !q1=0. - !cld(k)=0. - - !COMPUTE MEAN RH IN PBL (NOT PRESSURE WEIGHTED). - IF (zagl < PBLH2 .AND. PBLH2 > 400.) THEN - RHsum=RHsum+RH(k) - RHnum=RHnum+1.0 - RHmean=RHsum/RHnum - ENDIF - - RHcrit = 1. - 0.35*(1.0 - (MAX(250.- MAX(HFX1,HFXmin),0.0)/200.)**2) - if (HFX1 > HFXmin) then - cld9=MIN(MAX(0., (rh(k)-RHcrit)/(1.1-RHcrit)), 1.)**2 - else - cld9=0.0 - endif - - edown=PBLH2*.1 - !Vary BL cloud depth (Hshcu) by mean RH in PBL and HFX - !(somewhat following results from Zhang and Klein (2013, JAS)) - Hshcu=200. + (RHmean+0.5)**1.5*MAX(HFX1,0.)*Hfac - if (zagl < PBLH2-edown) then - damp=MIN(1.0,exp(-ABS(((PBLH2-edown)-zagl)/edown))) - elseif(zagl >= PBLH2-edown .AND. zagl < PBLH2+Hshcu)then - damp=1. - elseif (zagl >= PBLH2+Hshcu)then - damp=MIN(1.0,exp(-ABS((zagl-(PBLH2+Hshcu))/500.))) - endif - cldfra_bl1D(k)=cld9*damp - !cldfra_bl1D(k)=cld(k) ! JAYMES: use this form to retain the Sommeria-Deardorff value - - !use alternate cloud fraction to estimate qc for use in BL clouds-radiation - eq1 = rrp*EXP( -0.5*q1k*q1k ) - qll = MAX( cldfra_bl1D(k)*q1k + eq1, 0.0 ) - !ESTIMATED LIQUID WATER CONTENT (UNNORMALIZED) - ql (k) = alp(k)*sgm(k)*qll - if(cldfra_bl1D(k)>0.01 .and. ql(k)<1.E-6)ql(k)=1.E-6 - qc_bl1D(k)=ql(k)*damp - !qc_bl1D(k)=ql(k) ! JAYMES: use this form to retain the Sommeria-Deardorff value - - !now recompute estimated lwc for PBL scheme's use - !qll IS THE NORMALIZED LIQUID WATER CONTENT (Sommeria and - !Deardorff (1977, eq 29a). rrp = 1/(sqrt(2*pi)) = 0.3989 - eq1 = rrp*EXP( -0.5*q1k*q1k ) - qll = MAX( cld(k)*q1k + eq1, 0.0 ) - !ESTIMATED LIQUID WATER CONTENT (UNNORMALIZED) - ql (k) = alp(k)*sgm(k)*qll - - q2p = xlvcp/exner(k) - pt = thl(k) +q2p*ql(k) ! potential temp - - !qt is a THETA-V CONVERSION FOR TOTAL WATER (i.e., THETA-V = qt*THETA) - qt = 1.0 +p608*qw(k) -(1.+p608)*ql(k) - rac = alp(k)*( cld(k)-qll*eq1 )*( q2p*qt-(1.+p608)*pt ) - - !BUOYANCY FACTORS: wherever vt and vq are used, there is a - !"+1" and "+tv0", respectively, so these are subtracted out here. - !vt is unitless and vq has units of K. - vt(k) = qt-1.0 -rac*bet(k) - vq(k) = p608*pt-tv0 +rac + cldfra_bl1D(K) = MAX(0., MIN(1., 0.5+0.36*ATAN(1.55*q1(k)))) ! Eq. 7 in CB02 END DO - CASE ( 2, -2) + ! JAYMES- this option added 8 May 2015 ! The cloud water formulations are taken from CB02, Eq. 8. ! "fng" represents the non-Gaussian contribution to the liquid ! water flux; these formulations are from Cuijpers and Bechtold ! (1995), Eq. 7. CB95 also draws from Bechtold et al. 1995, ! hereafter BCMT95 + zagl = 0. DO k = kts,kte-1 t = th(k)*exner(k) q1k = q1(k) zagl = zagl + dz(k) - IF (q1k < 0.) THEN - ql (k) = sgm(k)*EXP(1.2*q1k-1) - ELSE IF (q1k > 2.) THEN - ql (k) = sgm(k)*q1k - ELSE - ql (k) = sgm(k)*(EXP(-1.) + 0.66*q1k + 0.086*q1k**2) + + !CLOUD WATER AND ICE + IF (q1k < 0.) THEN !unstaurated + ql_water = sgm(k)*EXP(1.2*q1k-1) +! ql_ice = sgm(k)*EXP(0.9*q1k-2.6) + !Reduce ice mixing ratios in the upper troposphere + low_weight = MIN(MAX(p(k)-40000.0, 0.0),40000.0)/40000.0 + ql_ice = low_weight * sgm(k)*EXP(1.1*q1k-1.6) & !low-lev + + (1.-low_weight) * sgm(k)*EXP(1.1*q1k-2.8)!upper-lev + ELSE IF (q1k > 2.) THEN !supersaturated + ql_water = sgm(k)*q1k + ql_ice = MIN(80.*qv(k),0.1)*sgm(k)*q1k + ELSE !slightly saturated (0 > q1 < 2) + ql_water = sgm(k)*(EXP(-1.) + 0.66*q1k + 0.086*q1k**2) + ql_ice = MIN(80.*qv(k),0.1)*sgm(k)*(EXP(-1.) + 0.66*q1k + 0.086*q1k**2) ENDIF - + + !In saturated grid cells, use average of current estimate and prev time step + IF ( qc(k) > 1.e-7 ) ql_water = 0.5 * ( ql_water + qc(k) ) + IF ( qi(k) > 1.e-9 ) ql_ice = 0.5 * ( ql_ice + qi(k) ) + + IF (cldfra_bl1D(K) < 0.005) THEN + ql_ice = 0.0 + ql_water = 0.0 + ENDIF + + !PHASE PARTITIONING: Make some inferences about the relative amounts of subgrid cloud water vs. ice + !based on collocated explicit clouds. Otherise, use a simple temperature-dependent partitioning. + IF ( qc(k) + qi(k) > 0.0 ) THEN ! explicit condensate exists, so attempt to retain its phase partitioning + IF ( qi(k) == 0.0 ) THEN ! explicit contains no ice; assume subgrid liquid + liq_frac = 1.0 + ELSE IF ( qc(k) == 0.0 ) THEN ! explicit contains no liquid; assume subgrid ice + liq_frac = 0.0 + ELSE IF ( (qc(k) >= 1.E-10) .AND. (qi(k) >= 1.E-10) ) THEN ! explicit contains mixed phase of workably + ! large amounts; assume subgrid follows + ! same partioning + liq_frac = qc(k) / ( qc(k) + qi(k) ) + ELSE + liq_frac = MIN(1.0, MAX(0.0, (t-238.)/31.)) ! explicit contains mixed phase, but at least one + ! species is very small, so make a temperature- + ! depedent guess + ENDIF + ELSE ! no explicit condensate, so make a temperature-dependent guess + liq_frac = MIN(1.0, MAX(0.0, (t-238.)/31.)) + ENDIF + + qc_bl1D(k) = liq_frac*ql_water ! apply liq_frac to ql_water and ql_ice + qi_bl1D(k) = (1.0-liq_frac)*ql_ice + !Above tropopause: eliminate subgrid clouds from CB scheme if (k .ge. k_tropo-1) then - cld(k) = 0. - ql(k) = 0. + cldfra_bl1D(K) = 0. + qc_bl1D(k) = 0. + qi_bl1D(k) = 0. endif !Buoyancy-flux-related calculations follow... ! "Fng" represents the non-Gaussian transport factor - ! (non-dimensional) from from Bechtold et al. 1995 + ! (non-dimensional) from Bechtold et al. 1995 ! (hereafter BCMT95), section 3(c). Their suggested ! forms for Fng (from their Eq. 20) are: !IF (q1k < -2.) THEN @@ -2751,33 +2789,21 @@ SUBROUTINE mym_condensation (kts,kte, & qww = 1.+0.61*qw(k) alpha = 0.61*th(k) beta = (th(k)/t)*(xl/cp) - 1.61*th(k) - - vt(k) = qww - MIN(cld(k),0.99)*beta*bb*Fng - 1. - vq(k) = alpha + MIN(cld(k),0.99)*beta*a(k)*Fng - tv0 + vt(k) = qww - MIN(cldfra_bl1D(K),0.5)*beta*bb*Fng - 1. + vq(k) = alpha + MIN(cldfra_bl1D(K),0.5)*beta*a(k)*Fng - tv0 ! vt and vq correspond to beta-theta and beta-q, respectively, ! in NN09, Eq. B8. They also correspond to the bracketed ! expressions in BCMT95, Eq. 15, since (s*ql/sigma^2) = cldfra*Fng ! The "-1" and "-tv0" terms are included for consistency with ! the legacy vt and vq formulations (above). - !OLD-- - ! increase the cloud fraction estimate below PBLH+1km - !if (zagl .lt. PBLH2+1000.) then - ! cld_factor = 1.0 + MAX(0.0, ( RH(k) - 0.83 ) / 0.18 ) - ! cld(k) = MIN( 1., cld_factor*cld(k) ) - !end if - !NEW-- ! dampen the amplification factor (cld_factor) with height in order ! to limit excessively large cloud fractions aloft fac_damp = 1. -MIN(MAX( zagl-(PBLH2+1000.),0.0)/ & MAX((zw(k_tropo)-(PBLH2+1000.)),500.), 1.) !cld_factor = 1.0 + fac_damp*MAX(0.0, ( RH(k) - 0.5 ) / 0.51 )**3.3 - cld_factor = 1.0 + fac_damp*MAX(0.0, ( RH(k) - 0.75 ) / 0.26 )**1.9 - cld(k) = MIN( 1., cld_factor*cld(k) ) - - ! return a cloud condensate and cloud fraction for icloud_bl option: - cldfra_bl1D(k) = cld(k) - qc_bl1D(k) = ql(k) + cld_factor = 1.0 + fac_damp*MAX(0.0, ( RH(k) - 0.75 ) / 0.26 )**1.9 + cldfra_bl1D(K) = MIN( 1., cld_factor*cldfra_bl1D(K) ) END DO @@ -2786,16 +2812,17 @@ SUBROUTINE mym_condensation (kts,kte, & !FOR TESTING PURPOSES ONLY, ISOLATE ON THE MASS-CLOUDS. IF (bl_mynn_cloudpdf .LT. 0) THEN DO k = kts,kte-1 - cldfra_bl1D(k) = 0.0 - qc_bl1D(k) = 0.0 + cldfra_bl1D(k) = 0.0 + qc_bl1D(k) = 0.0 + qi_bl1D(k) = 0.0 END DO ENDIF ! - cld(kte) = cld(kte-1) ql(kte) = ql(kte-1) vt(kte) = vt(kte-1) vq(kte) = vq(kte-1) qc_bl1D(kte)=0. + qi_bl1D(kte)=0. cldfra_bl1D(kte)=0. RETURN @@ -2817,23 +2844,26 @@ SUBROUTINE mynn_tendencies(kts,kte, & &u,v,th,tk,qv,qc,qi,qnc,qni, & &p,exner, & &thl,sqv,sqc,sqi,sqw, & - &qnwfa,qnifa, & + &qnwfa,qnifa,ozone, & &ust,flt,flq,flqv,flqc,wspd,qcg, & &uoce,voce, & &tsq,qsq,cov, & &tcd,qcd, & &dfm,dfh,dfq, & &Du,Dv,Dth,Dqv,Dqc,Dqi,Dqnc,Dqni, & - &Dqnwfa,Dqnifa, & + &Dqnwfa,Dqnifa,Dozone, & &vdfg1,diss_heat, & &s_aw,s_awthl,s_awqt,s_awqv,s_awqc, & &s_awu,s_awv, & &s_awqnc,s_awqni, & &s_awqnwfa,s_awqnifa, & + &sub_thl,sub_sqv, & + &sub_u,sub_v, & + &det_thl,det_sqv,det_sqc, & + &det_u,det_v, & &FLAG_QC,FLAG_QI,FLAG_QNC,FLAG_QNI, & &FLAG_QNWFA,FLAG_QNIFA, & &cldfra_bl1d, & - &ztop_shallow,ktop_shallow, & &bl_mynn_cloudmix, & &bl_mynn_mixqt, & &bl_mynn_edmf, & @@ -2863,17 +2893,19 @@ SUBROUTINE mynn_tendencies(kts,kte, & ! flt - surface flux of thl ! flq - surface flux of qw +! mass-flux plumes REAL, DIMENSION(kts:kte+1), INTENT(in) :: s_aw,s_awthl,s_awqt,& &s_awqnc,s_awqni,s_awqv,s_awqc,s_awu,s_awv,s_awqnwfa,s_awqnifa +! tendencies from mass-flux environmental subsidence and detrainment + REAL, DIMENSION(kts:kte), INTENT(in) :: sub_thl,sub_sqv, & + &sub_u,sub_v,det_thl,det_sqv,det_sqc,det_u,det_v REAL, DIMENSION(kts:kte), INTENT(in) :: u,v,th,tk,qv,qc,qi,qni,qnc,& &rho,p,exner,dfq,dz,tsq,qsq,cov,tcd,qcd,cldfra_bl1d,diss_heat REAL, DIMENSION(kts:kte), INTENT(inout) :: thl,sqw,sqv,sqc,sqi,& - &qnwfa,qnifa,dfm,dfh + &qnwfa,qnifa,ozone,dfm,dfh REAL, DIMENSION(kts:kte), INTENT(inout) :: du,dv,dth,dqv,dqc,dqi,& - &dqni,dqnc,dqnwfa,dqnifa - REAL, INTENT(IN) :: delt,ust,flt,flq,flqv,flqc,wspd,uoce,voce,qcg,& - ztop_shallow - INTEGER, INTENT(IN) :: ktop_shallow + &dqni,dqnc,dqnwfa,dqnifa,dozone + REAL, INTENT(IN) :: delt,ust,flt,flq,flqv,flqc,wspd,uoce,voce,qcg ! REAL, INTENT(IN) :: delt,ust,flt,flq,qcg,& ! &gradu_top,gradv_top,gradth_top,gradqv_top @@ -2882,7 +2914,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & REAL, DIMENSION(kts:kte) :: dtz,vt,vq,dfhc,dfmc !Kh for clouds (Pr < 2) REAL, DIMENSION(kts:kte) :: sqv2,sqc2,sqi2,sqw2,qni2,qnc2, & !AFTER MIXING - qnwfa2,qnifa2 + qnwfa2,qnifa2,ozone2 REAL, DIMENSION(kts:kte) :: zfac,plumeKh REAL, DIMENSION(kts:kte) :: a,b,c,d,x REAL, DIMENSION(kts:kte+1) :: rhoz, & !rho on model interface @@ -2940,7 +2972,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & a(1)=0. b(1)=1. + dtz(k)*(dfm(k+1)+ust**2/wspd) - 0.5*dtz(k)*s_aw(k+1)*onoff c(1)=-dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff - d(1)=u(k) + dtz(k)*uoce*ust**2/wspd - dtz(k)*s_awu(k+1)*onoff + d(1)=u(k) + dtz(k)*uoce*ust**2/wspd - dtz(k)*s_awu(k+1)*onoff + & + sub_u(k)*delt + det_u(k)*delt !JOE - tend test ! a(k)=0. @@ -2953,7 +2986,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & a(k)= - dtz(k)*dfm(k) + 0.5*dtz(k)*s_aw(k)*onoff b(k)=1. + dtz(k)*(dfm(k)+dfm(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*onoff c(k)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff - d(k)=u(k) + dtz(k)*(s_awu(k)-s_awu(k+1))*onoff + d(k)=u(k) + dtz(k)*(s_awu(k)-s_awu(k+1))*onoff + & + sub_u(k)*delt + det_u(k)*delt ENDDO !! no flux at the top @@ -2992,7 +3026,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & b(1)=1. + dtz(k)*(dfm(k+1)+ust**2/wspd) - 0.5*dtz(k)*s_aw(k+1)*onoff c(1)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff !! d(1)=v(k) - d(1)=v(k) + dtz(k)*voce*ust**2/wspd - dtz(k)*s_awv(k+1)*onoff + d(1)=v(k) + dtz(k)*voce*ust**2/wspd - dtz(k)*s_awv(k+1)*onoff + & + sub_v(k)*delt + det_v(k)*delt !JOE - tend test ! a(k)=0. @@ -3005,7 +3040,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & a(k)= - dtz(k)*dfm(k) + 0.5*dtz(k)*s_aw(k)*onoff b(k)=1. + dtz(k)*(dfm(k)+dfm(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*onoff c(k)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff - d(k)=v(k) + dtz(k)*(s_awv(k)-s_awv(k+1))*onoff + d(k)=v(k) + dtz(k)*(s_awv(k)-s_awv(k+1))*onoff + & + sub_v(k)*delt + det_v(k)*delt ENDDO !! no flux at the top @@ -3040,18 +3076,37 @@ SUBROUTINE mynn_tendencies(kts,kte, & !!============================================ k=kts - a(k)=0. - b(k)=1.+dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - d(k)=thl(k) + dtz(k)*flt + tcd(k)*delt & - & -dtz(k)*s_awthl(kts+1) + diss_heat(k)*delt*dheat_opt +! a(k)=0. +! b(k)=1.+dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! d(k)=thl(k) + dtz(k)*flt + tcd(k)*delt & +! & -dtz(k)*s_awthl(kts+1) + diss_heat(k)*delt*dheat_opt + & +! & sub_thl(k)*delt + det_thl(k)*delt +! +! DO k=kts+1,kte-1 +! a(k)= -dtz(k)*dfh(k) + 0.5*dtz(k)*s_aw(k) +! b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) +! c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! d(k)=thl(k) + tcd(k)*delt + dtz(k)*(s_awthl(k)-s_awthl(k+1)) & +! & + diss_heat(k)*delt*dheat_opt + & +! & sub_thl(k)*delt + det_thl(k)*delt +! ENDDO + +!rho-weighted: + a(k)= -dtz(k)*khdz(k)/rho(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + d(k)=thl(k) + dtz(k)*flt + tcd(k)*delt - dtz(k)*s_awthl(k+1) + & + & diss_heat(k)*delt*dheat_opt + sub_thl(k)*delt + det_thl(k)*delt DO k=kts+1,kte-1 - a(k)= -dtz(k)*dfh(k) + 0.5*dtz(k)*s_aw(k) - b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) - c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - d(k)=thl(k) + tcd(k)*delt + dtz(k)*(s_awthl(k)-s_awthl(k+1)) & - & + diss_heat(k)*delt*dheat_opt + a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) + c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + d(k)=thl(k) + tcd(k)*delt + dtz(k)*(s_awthl(k)-s_awthl(k+1)) + & + & + diss_heat(k)*delt*dheat_opt + & + & sub_thl(k)*delt + det_thl(k)*delt ENDDO !! no flux at the top @@ -3074,7 +3129,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & d(kte)=thl(kte) ! CALL tridiag(kte,a,b,c,d) - CALL tridiag2(kte,a,b,c,d,x) +! CALL tridiag2(kte,a,b,c,d,x) + CALL tridiag3(kte,a,b,c,d,x) DO k=kts,kte !thl(k)=d(k-kts+1) @@ -3091,19 +3147,30 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(k)=0. - b(k)=1.+dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - - !rhs= qcd(k) !+ (gfluxp - gfluxm)/dz(k)& +! a(k)=0. +! b(k)=1.+dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! !rhs= qcd(k) !+ (gfluxp - gfluxm)/dz(k)& +! d(k)=sqw(k) + dtz(k)*flq + qcd(k)*delt - dtz(k)*s_awqt(k+1) +! +! DO k=kts+1,kte-1 +! a(k)= -dtz(k)*dfh(k) + 0.5*dtz(k)*s_aw(k) +! b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) +! c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! d(k)=sqw(k) + qcd(k)*delt + dtz(k)*(s_awqt(k)-s_awqt(k+1)) +! ENDDO - d(k)=sqw(k) + dtz(k)*flq + qcd(k)*delt - dtz(k)*s_awqt(k+1) +!rho-weighted: + a(k)= -dtz(k)*khdz(k)/rho(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + d(k)=sqw(k) + dtz(k)*flq + qcd(k)*delt - dtz(k)*s_awqt(k+1) DO k=kts+1,kte-1 - a(k)= -dtz(k)*dfh(k) + 0.5*dtz(k)*s_aw(k) - b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) - c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - + a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) + c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=sqw(k) + qcd(k)*delt + dtz(k)*(s_awqt(k)-s_awqt(k+1)) ENDDO @@ -3125,7 +3192,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & d(kte)=sqw(kte) ! CALL tridiag(kte,a,b,c,d) - CALL tridiag2(kte,a,b,c,d,sqw2) +! CALL tridiag2(kte,a,b,c,d,sqw2) + CALL tridiag3(kte,a,b,c,d,sqw2) ! DO k=kts,kte ! sqw2(k)=d(k-kts+1) @@ -3143,18 +3211,34 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(k)=0. - b(k)=1.+dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! a(k)=0. +! b(k)=1.+dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! d(k)=sqc(k) + dtz(k)*flqc + qcd(k)*delt - & +! dtz(k)*s_awqc(k+1) + det_sqc(k)*delt +! +! DO k=kts+1,kte-1 +! a(k)= -dtz(k)*dfh(k) + 0.5*dtz(k)*s_aw(k) +! b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) +! c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! d(k)=sqc(k) + qcd(k)*delt + dtz(k)*(s_awqc(k)-s_awqc(k+1)) + & +! det_sqc(k)*delt +! ENDDO - d(k)=sqc(k) + dtz(k)*flqc + qcd(k)*delt -dtz(k)*s_awqc(k+1) +!rho-weighted: + a(k)= -dtz(k)*khdz(k)/rho(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + d(k)=sqc(k) + dtz(k)*flqc + qcd(k)*delt - dtz(k)*s_awqc(k+1) + & + & det_sqc(k)*delt DO k=kts+1,kte-1 - a(k)= -dtz(k)*dfh(k) + 0.5*dtz(k)*s_aw(k) - b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) - c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - - d(k)=sqc(k) + qcd(k)*delt + dtz(k)*(s_awqc(k)-s_awqc(k+1)) + a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) + c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + d(k)=sqc(k) + qcd(k)*delt + dtz(k)*(s_awqc(k)-s_awqc(k+1)) + & + & det_sqc(k)*delt ENDDO ! prescribed value @@ -3164,7 +3248,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & d(kte)=sqc(kte) ! CALL tridiag(kte,a,b,c,d) - CALL tridiag2(kte,a,b,c,d,sqc2) +! CALL tridiag2(kte,a,b,c,d,sqc2) + CALL tridiag3(kte,a,b,c,d,sqc2) ! DO k=kts,kte ! sqc2(k)=d(k-kts+1) @@ -3183,16 +3268,34 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(k)=0. - b(k)=1.+dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - d(k)=sqv(k) + dtz(k)*flqv + qcd(k)*delt - dtz(k)*s_awqv(k+1) +! a(k)=0. +! b(k)=1.+dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! d(k)=sqv(k) + dtz(k)*flqv + qcd(k)*delt - dtz(k)*s_awqv(k+1) + & +! & sub_sqv(k)*delt + det_sqv(k)*delt +! +! DO k=kts+1,kte-1 +! a(k)= -dtz(k)*dfh(k) + 0.5*dtz(k)*s_aw(k) +! b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) +! c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) +! d(k)=sqv(k) + qcd(k)*delt + dtz(k)*(s_awqv(k)-s_awqv(k+1)) + & +! & sub_sqv(k)*delt + det_sqv(k)*delt +! ENDDO + +!rho-weighted: + a(k)= -dtz(k)*khdz(k)/rho(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + d(k)=sqv(k) + dtz(k)*flqv + qcd(k)*delt - dtz(k)*s_awqv(k+1) + & + & sub_sqv(k)*delt + det_sqv(k)*delt DO k=kts+1,kte-1 - a(k)= -dtz(k)*dfh(k) + 0.5*dtz(k)*s_aw(k) - b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) - c(k)= -dtz(k)*dfh(k+1) - 0.5*dtz(k)*s_aw(k+1) - d(k)=sqv(k) + qcd(k)*delt + dtz(k)*(s_awqv(k)-s_awqv(k+1)) + a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) + c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + d(k)=sqv(k) + qcd(k)*delt + dtz(k)*(s_awqv(k)-s_awqv(k+1)) + & + & sub_sqv(k)*delt + det_sqv(k)*delt ENDDO ! no flux at the top @@ -3215,7 +3318,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & d(kte)=sqv(kte) ! CALL tridiag(kte,a,b,c,d) - CALL tridiag2(kte,a,b,c,d,sqv2) +! CALL tridiag2(kte,a,b,c,d,sqv2) + CALL tridiag3(kte,a,b,c,d,sqv2) ! DO k=kts,kte ! sqv2(k)=d(k-kts+1) @@ -3231,16 +3335,29 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(k)=0. - b(k)=1.+dtz(k)*dfh(k+1) - c(k)= -dtz(k)*dfh(k+1) - d(k)=sqi(k) !+ qcd(k)*delt !should we have qcd for ice? +! a(k)=0. +! b(k)=1.+dtz(k)*dfh(k+1) +! c(k)= -dtz(k)*dfh(k+1) +! d(k)=sqi(k) !+ qcd(k)*delt !should we have qcd for ice? +! +! DO k=kts+1,kte-1 +! a(k)= -dtz(k)*dfh(k) +! b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) +! c(k)= -dtz(k)*dfh(k+1) +! d(k)=sqi(k) !+ qcd(k)*delt +! ENDDO + +!rho-weighted: + a(k)= -dtz(k)*khdz(k)/rho(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) + c(k)= -dtz(k)*khdz(k+1)/rho(k) + d(k)=sqi(k) DO k=kts+1,kte-1 - a(k)= -dtz(k)*dfh(k) - b(k)=1.+dtz(k)*(dfh(k)+dfh(k+1)) - c(k)= -dtz(k)*dfh(k+1) - d(k)=sqi(k) !+ qcd(k)*delt + a(k)= -dtz(k)*khdz(k)/rho(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + c(k)= -dtz(k)*khdz(k+1)/rho(k) + d(k)=sqi(k) ENDDO !! no flux at the top @@ -3263,7 +3380,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & d(kte)=sqi(kte) ! CALL tridiag(kte,a,b,c,d) - CALL tridiag2(kte,a,b,c,d,sqi2) +! CALL tridiag2(kte,a,b,c,d,sqi2) + CALL tridiag3(kte,a,b,c,d,sqi2) ! DO k=kts,kte ! sqi2(k)=d(k-kts+1) @@ -3437,6 +3555,39 @@ SUBROUTINE mynn_tendencies(kts,kte, & qnifa2=qnifa ENDIF +!============================================ +! Ozone - local mixing only +!============================================ + + k=kts + +!rho-weighted: + a(k)= -dtz(k)*khdz(k)/rho(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) + c(k)= -dtz(k)*khdz(k+1)/rho(k) + d(k)=ozone(k) + + DO k=kts+1,kte-1 + a(k)= -dtz(k)*khdz(k)/rho(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + c(k)= -dtz(k)*khdz(k+1)/rho(k) + d(k)=ozone(k) + ENDDO + +! prescribed value + a(kte)=0. + b(kte)=1. + c(kte)=0. + d(kte)=ozone(kte) + +! CALL tridiag(kte,a,b,c,d) +! CALL tridiag2(kte,a,b,c,d,x) + CALL tridiag3(kte,a,b,c,d,x) + + DO k=kts,kte + !ozone2(k)=d(k-kts+1) + dozone(k)=(x(k)-ozone(k))/delt + ENDDO !!============================================ !! Compute tendencies and convert to mixing ratios for WRF. @@ -3476,7 +3627,8 @@ SUBROUTINE mynn_tendencies(kts,kte, & ! WATER VAPOR TENDENCY !===================== DO k=kts,kte - Dqv(k)=(sqv2(k)/(1.-sqv2(k)) - qv(k))/delt + !Dqv(k)=(sqv2(k)/(1.-sqv2(k)) - qv(k))/delt !mixing ratio + Dqv(k)=(sqv2(k) - sqv(k))/delt !spec humidity !IF(-Dqv(k) > qv(k)) Dqv(k)=-qv(k) ENDDO @@ -3489,10 +3641,11 @@ SUBROUTINE mynn_tendencies(kts,kte, & !print*,"FLAG_QC:",FLAG_QC IF (FLAG_QC) THEN DO k=kts,kte - Dqc(k)=(sqc2(k)/(1.-sqv2(k)) - qc(k))/delt - IF(Dqc(k)*delt + qc(k) < 0.) THEN + !Dqc(k)=(sqc2(k)/(1.-sqv2(k)) - qc(k))/delt !mixing ratio + Dqc(k)=(sqc2(k) - sqc(k))/delt !spec humidity + IF(Dqc(k)*delt + sqc(k) < 0.) THEN !print*,' neg qc:',qsl,sqw2(k),sqi2(k),sqc2(k),qc(k),tk(k) - Dqc(k)=-qc(k)/delt + Dqc(k)=-sqc(k)/delt ENDIF ENDDO ELSE @@ -3521,10 +3674,11 @@ SUBROUTINE mynn_tendencies(kts,kte, & !=================== IF (FLAG_QI) THEN DO k=kts,kte - Dqi(k)=(sqi2(k)/(1.-sqv2(k)) - qi(k))/delt - IF(Dqi(k)*delt + qi(k) < 0.) THEN + !Dqi(k)=(sqi2(k)/(1.-sqv2(k)) - qi(k))/delt !mixing ratio + Dqi(k)=(sqi2(k) - sqi(k))/delt !spec humidity + IF(Dqi(k)*delt + sqi(k) < 0.) THEN ! !print*,' neg qi;',qsl,sqw2(k),sqi2(k),sqc2(k),qi(k),tk(k) - Dqi(k)=-qi(k)/delt + Dqi(k)=-sqi(k)/delt ENDIF ENDDO ELSE @@ -3566,16 +3720,16 @@ SUBROUTINE mynn_tendencies(kts,kte, & & - th(k))/delt !Use form from Tripoli and Cotton (1981) with their !suggested min temperature to improve accuracy: - !Dth(k)=(thl(k)*(1.+ xlvcp/MAX(tk(k),TKmin)*sqc2(k) & - ! & + xlscp/MAX(tk(k),TKmin)*sqi2(k)) & + !Dth(k)=(thl(k)*(1.+ xlvcp/MAX(tk(k),TKmin)*sqc(k) & + ! & + xlscp/MAX(tk(k),TKmin)*sqi(k)) & ! & - th(k))/delt ENDDO ELSE DO k=kts,kte - Dth(k)=(thl(k)+xlvcp/exner(k)*sqc2(k) - th(k))/delt + Dth(k)=(thl(k)+xlvcp/exner(k)*sqc(k) - th(k))/delt !Use form from Tripoli and Cotton (1981) with their !suggested min temperature to improve accuracy. - !Dth(k)=(thl(k)*(1.+ xlvcp/MAX(tk(k),TKmin)*sqc2(k)) & + !Dth(k)=(thl(k)*(1.+ xlvcp/MAX(tk(k),TKmin)*sqc(k)) & !& - th(k))/delt ENDDO ENDIF @@ -3845,16 +3999,18 @@ end subroutine tridiag3 !!\section gen_mynn_bl_driver GSD mynn_bl_driver General Algorithm !> @{ SUBROUTINE mynn_bl_driver( & - &initflag,restart,grav_settling, & + &initflag,restart,cycling, & + &grav_settling, & &delt,dz,dx,znt, & - &u,v,w,th,qv,qc,qi,qnc,qni, & - &qnwfa,qnifa, & + &u,v,w,th,sqv3D,sqc3D,sqi3D, & + &qnc,qni, & + &qnwfa,qnifa,ozone, & &p,exner,rho,T3D, & &xland,ts,qsfc,qcg,ps, & &ust,ch,hfx,qfx,rmol,wspd, & &uoce,voce, & !ocean current &vdfg, & !Katata-added for fog dep - &Qke,tke_pbl, & + &Qke, & !TKE_PBL, & &qke_adv,bl_mynn_tkeadvect, & !ACF for QKE advection #if (WRF_CHEM == 1) chem3d, vd3d, nchem, & ! WA 7/29/15 For WRF-Chem @@ -3864,7 +4020,7 @@ SUBROUTINE mynn_bl_driver( & &RUBLTEN,RVBLTEN,RTHBLTEN, & &RQVBLTEN,RQCBLTEN,RQIBLTEN, & &RQNCBLTEN,RQNIBLTEN, & - &RQNWFABLTEN,RQNIFABLTEN, & + &RQNWFABLTEN,RQNIFABLTEN,DOZONE, & &exch_h,exch_m, & &Pblh,kpbl, & &el_pbl, & @@ -3873,14 +4029,17 @@ SUBROUTINE mynn_bl_driver( & &bl_mynn_tkebudget, & &bl_mynn_cloudpdf,Sh3D, & &bl_mynn_mixlength, & - &icloud_bl,qc_bl,cldfra_bl, & + &icloud_bl,qc_bl,qi_bl,cldfra_bl,& &levflag,bl_mynn_edmf, & &bl_mynn_edmf_mom,bl_mynn_edmf_tke, & &bl_mynn_mixscalars, & + &bl_mynn_output, & &bl_mynn_cloudmix,bl_mynn_mixqt, & &edmf_a,edmf_w,edmf_qt, & &edmf_thl,edmf_ent,edmf_qc, & - &nupdraft,maxMF,ktop_shallow, & + &sub_thl3D,sub_sqv3D, & + &det_thl3D,det_sqv3D, & + &nupdraft,maxMF,ktop_plume, & &spp_pbl,pattern_spp_pbl, & &RTHRATEN, & &FLAG_QC,FLAG_QI,FLAG_QNC, & @@ -3892,26 +4051,27 @@ SUBROUTINE mynn_bl_driver( & !------------------------------------------------------------------- INTEGER, INTENT(in) :: initflag - LOGICAL, INTENT(IN) :: restart !INPUT NAMELIST OPTIONS: + LOGICAL, INTENT(in) :: restart,cycling INTEGER, INTENT(in) :: levflag INTEGER, INTENT(in) :: grav_settling INTEGER, INTENT(in) :: bl_mynn_tkebudget INTEGER, INTENT(in) :: bl_mynn_cloudpdf INTEGER, INTENT(in) :: bl_mynn_mixlength INTEGER, INTENT(in) :: bl_mynn_edmf - LOGICAL, INTENT(IN) :: bl_mynn_tkeadvect + LOGICAL, INTENT(in) :: bl_mynn_tkeadvect INTEGER, INTENT(in) :: bl_mynn_edmf_mom INTEGER, INTENT(in) :: bl_mynn_edmf_tke INTEGER, INTENT(in) :: bl_mynn_mixscalars + INTEGER, INTENT(in) :: bl_mynn_output INTEGER, INTENT(in) :: bl_mynn_cloudmix INTEGER, INTENT(in) :: bl_mynn_mixqt INTEGER, INTENT(in) :: icloud_bl - LOGICAL, INTENT(IN) :: FLAG_QI,FLAG_QNI,FLAG_QC,FLAG_QNC,& + LOGICAL, INTENT(in) :: FLAG_QI,FLAG_QNI,FLAG_QC,FLAG_QNC,& FLAG_QNWFA,FLAG_QNIFA - INTEGER,INTENT(IN) :: & + INTEGER,INTENT(in) :: & & IDS,IDE,JDS,JDE,KDS,KDE & &,IMS,IME,JMS,JME,KMS,KME & &,ITS,ITE,JTS,JTE,KTS,KTE @@ -3936,21 +4096,23 @@ SUBROUTINE mynn_bl_driver( & REAL, DIMENSION(IMS:IME,JMS:JME), INTENT(in) :: dx !END FV3 REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME), INTENT(in) :: dz,& - &u,v,w,th,qv,p,exner,rho,T3D + &u,v,w,th,sqv3D,p,exner,rho,T3D REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME), OPTIONAL, INTENT(in)::& - &qc,qi,qni,qnc,qnwfa,qnifa + &sqc3D,sqi3D,qni,qnc,qnwfa,qnifa + REAL, DIMENSION(IMS:IME,KMS:KME), OPTIONAL, INTENT(in):: ozone REAL, DIMENSION(IMS:IME,JMS:JME), INTENT(in) :: xland,ust,& - &ch,rmol,ts,qsfc,qcg,ps,hfx,qfx, wspd,uoce,voce, vdfg,znt + &ch,rmol,ts,qsfc,qcg,ps,hfx,qfx,wspd,uoce,voce,vdfg,znt REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME), INTENT(inout) :: & &Qke,Tsq,Qsq,Cov, & - &tke_pbl, & !JOE-added for coupling (TKE_PBL = QKE/2) + !&tke_pbl, & !JOE-added for coupling (TKE_PBL = QKE/2) &qke_adv !ACF for QKE advection REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME), INTENT(inout) :: & &RUBLTEN,RVBLTEN,RTHBLTEN,RQVBLTEN,RQCBLTEN,& &RQIBLTEN,RQNIBLTEN,RQNCBLTEN, & &RQNWFABLTEN,RQNIFABLTEN + REAL, DIMENSION(IMS:IME,KMS:KME), INTENT(inout) :: DOZONE REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME), INTENT(in) :: & &RTHRATEN @@ -3958,8 +4120,10 @@ SUBROUTINE mynn_bl_driver( & REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME), INTENT(out) :: & &exch_h,exch_m - REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME), OPTIONAL, INTENT(inout) :: & - & edmf_a,edmf_w,edmf_qt,edmf_thl,edmf_ent,edmf_qc + !These 10 arrays are only allocated when bl_mynn_output > 0 + REAL, DIMENSION(:,:), OPTIONAL, INTENT(inout) :: & + & edmf_a,edmf_w,edmf_qt,edmf_thl,edmf_ent,edmf_qc, & + & sub_thl3D,sub_sqv3D,det_thl3D,det_sqv3D REAL, DIMENSION(IMS:IME,JMS:JME), INTENT(inout) :: & &Pblh,wstar,delta !JOE-added for GRIMS @@ -3968,7 +4132,7 @@ SUBROUTINE mynn_bl_driver( & &Psig_bl,Psig_shcu INTEGER,DIMENSION(IMS:IME,JMS:JME),INTENT(INOUT) :: & - &KPBL,nupdraft,ktop_shallow + &KPBL,nupdraft,ktop_plume REAL, DIMENSION(IMS:IME,JMS:JME), INTENT(OUT) :: & &maxmf @@ -3985,9 +4149,9 @@ SUBROUTINE mynn_bl_driver( & REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME) :: Sh3D REAL, DIMENSION(IMS:IME,KMS:KME,JMS:JME), INTENT(inout) :: & - &qc_bl,cldfra_bl - REAL, DIMENSION(KTS:KTE) :: qc_bl1D,cldfra_bl1D,& - qc_bl1D_old,cldfra_bl1D_old + &qc_bl,qi_bl,cldfra_bl + REAL, DIMENSION(KTS:KTE) :: qc_bl1D,qi_bl1D,cldfra_bl1D,& + qc_bl1D_old,qi_bl1D_old,cldfra_bl1D_old ! WA 7/29/15 Mix chemical arrays #if (WRF_CHEM == 1) @@ -4003,25 +4167,28 @@ SUBROUTINE mynn_bl_driver( & !local vars INTEGER :: ITF,JTF,KTF, IMD,JMD INTEGER :: i,j,k - REAL, DIMENSION(KTS:KTE) :: thl,thvl,tl,sqv,sqc,sqi,sqw,& + REAL, DIMENSION(KTS:KTE) :: thl,thvl,tl,qv1,qc1,qi1,sqw,& &El, Dfm, Dfh, Dfq, Tcd, Qcd, Pdk, Pdt, Pdq, Pdc, & &Vt, Vq, sgm, thlsg REAL, DIMENSION(KTS:KTE) :: thetav,sh,u1,v1,w1,p1,ex1,dz1,th1,tk1,rho1,& - & qke1,tsq1,qsq1,cov1,qv1,qi1,qc1,du1,dv1,dth1,dqv1,dqc1,dqi1, & - & k_m1,k_h1,qni1,dqni1,qnc1,dqnc1,qnwfa1,qnifa1,dqnwfa1,dqnifa1 + & qke1,tsq1,qsq1,cov1,sqv,sqi,sqc,du1,dv1,dth1,dqv1,dqc1,dqi1,ozone1, & + & k_m1,k_h1,qni1,dqni1,qnc1,dqnc1,qnwfa1,qnifa1,dqnwfa1,dqnifa1,dozone1 !JOE: mass-flux variables REAL, DIMENSION(KTS:KTE) :: dth1mf,dqv1mf,dqc1mf,du1mf,dv1mf REAL, DIMENSION(KTS:KTE) :: edmf_a1,edmf_w1,edmf_qt1,edmf_thl1,& edmf_ent1,edmf_qc1 + REAL, DIMENSION(KTS:KTE) :: sub_thl,sub_sqv,sub_u,sub_v, & + det_thl,det_sqv,det_sqc,det_u,det_v REAL,DIMENSION(KTS:KTE+1) :: s_aw1,s_awthl1,s_awqt1,& s_awqv1,s_awqc1,s_awu1,s_awv1,s_awqke1,& s_awqnc1,s_awqni1,s_awqnwfa1,s_awqnifa1 REAL, DIMENSION(KTS:KTE+1) :: zw - REAL :: cpm,sqcg,flt,flq,flqv,flqc,pmz,phh,exnerg,zet,& - &afk,abk,ts_decay,th_sfc,ztop_shallow,sqc9,sqi9 + REAL :: cpm,sqcg,flt,flq,flqv,flqc,pmz,phh,exnerg,zet,& + & afk,abk,ts_decay, qc_bl2, qi_bl2, & + & th_sfc,ztop_plume,sqc9,sqi9 !JOE-add GRIMS parameters & variables real,parameter :: d1 = 0.02, d2 = 0.05, d3 = 0.001 @@ -4040,7 +4207,9 @@ SUBROUTINE mynn_bl_driver( & logical :: cloudflg !JOE-end top down -! INTEGER, SAVE :: levflag +!for WRF INTEGER, SAVE :: levflag + + LOGICAL :: INITIALIZE_QKE ! Stochastic fields INTEGER, INTENT(IN) ::spp_pbl @@ -4073,13 +4242,19 @@ SUBROUTINE mynn_bl_driver( & ! setup random seed !call init_random_seed - edmf_a(its:ite,kts:kte,jts:jte)=0. - edmf_w(its:ite,kts:kte,jts:jte)=0. - edmf_qt(its:ite,kts:kte,jts:jte)=0. - edmf_thl(its:ite,kts:kte,jts:jte)=0. - edmf_ent(its:ite,kts:kte,jts:jte)=0. - edmf_qc(its:ite,kts:kte,jts:jte)=0. - ktop_shallow(its:ite,jts:jte)=0 !int + IF (bl_mynn_output > 0) THEN !research mode + edmf_a(its:ite,kts:kte)=0. + edmf_w(its:ite,kts:kte)=0. + edmf_qt(its:ite,kts:kte)=0. + edmf_thl(its:ite,kts:kte)=0. + edmf_ent(its:ite,kts:kte)=0. + edmf_qc(its:ite,kts:kte)=0. + sub_thl3D(its:ite,kts:kte)=0. + sub_sqv3D(its:ite,kts:kte)=0. + det_thl3D(its:ite,kts:kte)=0. + det_sqv3D(its:ite,kts:kte)=0. + ENDIF + ktop_plume(its:ite,jts:jte)=0 !int nupdraft(its:ite,jts:jte)=0 !int maxmf(its:ite,jts:jte)=0. ENDIF @@ -4091,8 +4266,22 @@ SUBROUTINE mynn_bl_driver( & !! several arrays are initialized and k-oriented (vertical) subroutines are called !! at every i and j point, corresponding to the x- and y- directions, respectively. IF (initflag > 0) THEN + + !Test to see if we want to initialize qke + IF ( (restart .or. cycling)) THEN + IF (MAXVAL(QKE(its:ite,kts,jts:jte)) < 0.0002) THEN + INITIALIZE_QKE = .TRUE. + !print*,"QKE is too small, must initialize" + ELSE + INITIALIZE_QKE = .FALSE. + !print*,"Using background QKE, will not initialize" + ENDIF + ELSE ! not cycling or restarting: + INITIALIZE_QKE = .TRUE. + !print*,"not restart nor cycling, must initialize QKE" + ENDIF - if (.not.restart) THEN + if (.not.restart .or. .not.cycling) THEN Sh3D(its:ite,kts:kte,jts:jte)=0. el_pbl(its:ite,kts:kte,jts:jte)=0. tsq(its:ite,kts:kte,jts:jte)=0. @@ -4108,7 +4297,9 @@ SUBROUTINE mynn_bl_driver( & dqnc1(kts:kte)=0.0 dqnwfa1(kts:kte)=0.0 dqnifa1(kts:kte)=0.0 + dozone1(kts:kte)=0.0 qc_bl1D(kts:kte)=0.0 + qi_bl1D(kts:kte)=0.0 cldfra_bl1D(kts:kte)=0.0 qc_bl1D_old(kts:kte)=0.0 cldfra_bl1D_old(kts:kte)=0.0 @@ -4152,11 +4343,16 @@ SUBROUTINE mynn_bl_driver( & th1(k)=th(i,k,j) tk1(k)=T3D(i,k,j) rho1(k)=rho(i,k,j) - sqc(k)=qc(i,k,j)/(1.+qv(i,k,j)) - sqv(k)=qv(i,k,j)/(1.+qv(i,k,j)) + sqc(k)=sqc3D(i,k,j) !/(1.+qv(i,k,j)) + sqv(k)=sqv3D(i,k,j) !/(1.+qv(i,k,j)) thetav(k)=th(i,k,j)*(1.+0.61*sqv(k)) - IF (PRESENT(qi) .AND. FLAG_QI ) THEN - sqi(k)=qi(i,k,j)/(1.+qv(i,k,j)) + IF (icloud_bl > 0) THEN + CLDFRA_BL1D(k)=CLDFRA_BL(i,k,j) + QC_BL1D(k)=QC_BL(i,k,j) + QI_BL1D(k)=QI_BL(i,k,j) + ENDIF + IF (PRESENT(sqi3D) .AND. FLAG_QI ) THEN + sqi(k)=sqi3D(i,k,j) !/(1.+qv(i,k,j)) sqw(k)=sqv(k)+sqc(k)+sqi(k) thl(k)=th(i,k,j)- xlvcp/exner(i,k,j)*sqc(k) & & - xlscp/exner(i,k,j)*sqi(k) @@ -4165,9 +4361,9 @@ SUBROUTINE mynn_bl_driver( & !thl(k)=th(i,k,j)*(1.- xlvcp/MAX(tk1(k),TKmin)*sqc(k) & ! & - xlscp/MAX(tk1(k),TKmin)*sqi(k)) !COMPUTE THL USING SGS CLOUDS FOR PBLH DIAG - IF(sqc(k)<1e-6 .and. sqi(k)<1e-8 .and. CLDFRA_BL(i,k,j)>0.001)THEN - sqc9=QC_BL(i,k,j)*(MIN(1., MAX(0., (tk1(k)-254.)/15.)))*CLDFRA_BL(i,k,j) - sqi9=QC_BL(i,k,j)*(1. - MIN(1., MAX(0., (tk1(k)-254.)/15.)))*CLDFRA_BL(i,k,j) + IF(sqc(k)<1e-6 .and. sqi(k)<1e-8 .and. CLDFRA_BL1D(k)>0.001)THEN + sqc9=QC_BL1D(k)*CLDFRA_BL1D(k) + sqi9=QI_BL1D(k)*CLDFRA_BL1D(k) ELSE sqc9=sqc(k) sqi9=sqi(k) @@ -4182,9 +4378,9 @@ SUBROUTINE mynn_bl_driver( & !suggested min temperature to improve accuracy. !thl(k)=th(i,k,j)*(1.- xlvcp/MAX(tk1(k),TKmin)*sqc(k)) !COMPUTE THL USING SGS CLOUDS FOR PBLH DIAG - IF(sqc(k)<1e-6 .and. CLDFRA_BL(i,k,j)>0.001)THEN - sqc9=QC_BL(i,k,j)*(MIN(1., MAX(0., (tk1(k)-254.)/15.)))*CLDFRA_BL(i,k,j) - sqi9=QC_BL(i,k,j)*(1. - MIN(1., MAX(0., (tk1(k)-254.)/15.)))*CLDFRA_BL(i,k,j) + IF(sqc(k)<1e-6 .and. CLDFRA_BL1D(k)>0.001)THEN + sqc9=QC_BL1D(k)*CLDFRA_BL1D(k) + sqi9=0.0 ELSE sqc9=sqc(k) sqi9=0.0 @@ -4199,11 +4395,14 @@ SUBROUTINE mynn_bl_driver( & ELSE zw(k)=zw(k-1)+dz(i,k-1,j) ENDIF - if (restart) then - qke1(k) = qke(i,k,j) - else - qke1(k)=0.1-MIN(zw(k)*0.001, 0.0) !for initial PBLH calc only - end if + IF (INITIALIZE_QKE) THEN + !Initialize tke for initial PBLH calc only - using + !simple PBLH form of Koracin and Berkowicz (1988, BLM) + !to linearly taper off tke towards top of PBL. + qke1(k)=5.*ust(i,j) * MAX((ust(i,j)*700. - zw(k))/(MAX(ust(i,j),0.01)*700.), 0.01) + ELSE + qke1(k)=qke(i,k,j) + ENDIF el(k)=el_pbl(i,k,j) sh(k)=Sh3D(i,k,j) tsq1(k)=tsq(i,k,j) @@ -4247,6 +4446,7 @@ SUBROUTINE mynn_bl_driver( & &Psig_bl(i,j), cldfra_bl1D, & &bl_mynn_mixlength, & &edmf_w1,edmf_a1,edmf_qc1,bl_mynn_edmf,& + &INITIALIZE_QKE, & &spp_pbl,rstoch_col ) IF (.not.restart) THEN @@ -4295,6 +4495,14 @@ SUBROUTINE mynn_bl_driver( & IF ( bl_mynn_tkebudget == 1) THEN dqke(i,k,j)=qke(i,k,j) END IF + IF (icloud_bl > 0) THEN + CLDFRA_BL1D(k)=CLDFRA_BL(i,k,j) + QC_BL1D(k)=QC_BL(i,k,j) + QI_BL1D(k)=QI_BL(i,k,j) + cldfra_bl1D_old(k)=cldfra_bl(i,k,j) + qc_bl1D_old(k)=qc_bl(i,k,j) + qi_bl1D_old(k)=qi_bl(i,k,j) + ENDIF dz1(k)= dz(i,k,j) u1(k) = u(i,k,j) v1(k) = v(i,k,j) @@ -4302,21 +4510,20 @@ SUBROUTINE mynn_bl_driver( & th1(k)= th(i,k,j) tk1(k)=T3D(i,k,j) rho1(k)=rho(i,k,j) - qv1(k)= qv(i,k,j) - qc1(k)= qc(i,k,j) - sqv(k)= qv(i,k,j)/(1.+qv(i,k,j)) - sqc(k)= qc(i,k,j)/(1.+qv(i,k,j)) - IF(icloud_bl > 0)cldfra_bl1D_old(k)=cldfra_bl(i,k,j) - IF(icloud_bl > 0)qc_bl1D_old(k)=qc_bl(i,k,j) + qv1(k)= sqv3D(i,k,j)/(1.-sqv3D(i,k,j)) + qc1(k)= sqc3D(i,k,j)/(1.-sqv3D(i,k,j)) + sqv(k)= sqv3D(i,k,j) !/(1.+qv(i,k,j)) + sqc(k)= sqc3D(i,k,j) !/(1.+qv(i,k,j)) dqc1(k)=0.0 dqi1(k)=0.0 dqni1(k)=0.0 dqnc1(k)=0.0 dqnwfa1(k)=0.0 dqnifa1(k)=0.0 - IF(PRESENT(qi) .AND. FLAG_QI)THEN - qi1(k)= qi(i,k,j) - sqi(k)= qi(i,k,j)/(1.+qv(i,k,j)) + dozone1(k)=0.0 + IF(PRESENT(sqi3D) .AND. FLAG_QI)THEN + qi1(k)= sqi3D(i,k,j)/(1.-sqv3D(i,k,j)) + sqi(k)= sqi3D(i,k,j) !/(1.+qv(i,k,j)) sqw(k)= sqv(k)+sqc(k)+sqi(k) thl(k)= th(i,k,j) - xlvcp/exner(i,k,j)*sqc(k) & & - xlscp/exner(i,k,j)*sqi(k) @@ -4325,9 +4532,9 @@ SUBROUTINE mynn_bl_driver( & !thl(k)=th(i,k,j)*(1.- xlvcp/MAX(tk1(k),TKmin)*sqc(k) & ! & - xlscp/MAX(tk1(k),TKmin)*sqi(k)) !COMPUTE THL USING SGS CLOUDS FOR PBLH DIAG - IF(sqc(k)<1e-6 .and. sqi(k)<1e-8 .and. CLDFRA_BL(i,k,j)>0.001)THEN - sqc9=QC_BL(i,k,j)*(MIN(1., MAX(0., (tk1(k)-254.)/15.)))*CLDFRA_BL(i,k,j) - sqi9=QC_BL(i,k,j)*(1. - MIN(1., MAX(0., (tk1(k)-254.)/15.)))*CLDFRA_BL(i,k,j) + IF(sqc(k)<1e-6 .and. sqi(k)<1e-8 .and. CLDFRA_BL1D(k)>0.001)THEN + sqc9=QC_BL1D(k)*CLDFRA_BL1D(k) + sqi9=QI_BL1D(k)*CLDFRA_BL1D(k) ELSE sqc9=sqc(k) sqi9=sqi(k) @@ -4343,16 +4550,16 @@ SUBROUTINE mynn_bl_driver( & !suggested min temperature to improve accuracy. !thl(k)=th(i,k,j)*(1.- xlvcp/MAX(tk1(k),TKmin)*sqc(k)) !COMPUTE THL USING SGS CLOUDS FOR PBLH DIAG - IF(sqc(k)<1e-6 .and. CLDFRA_BL(i,k,j)>0.001)THEN - sqc9=QC_BL(i,k,j)*(MIN(1., MAX(0., (tk1(k)-254.)/15.)))*CLDFRA_BL(i,k,j) - sqi9=QC_BL(i,k,j)*(1. - MIN(1., MAX(0., (tk1(k)-254.)/15.)))*CLDFRA_BL(i,k,j) + IF(sqc(k)<1e-6 .and. CLDFRA_BL1D(k)>0.001)THEN + sqc9=QC_BL1D(k)*CLDFRA_BL1D(k) + sqi9=QI_BL1D(k)*CLDFRA_BL1D(k) ELSE sqc9=sqc(k) sqi9=0.0 ENDIF thlsg(k)=th(i,k,j)- xlvcp/exner(i,k,j)*sqc9 & - & - xlscp/exner(i,k,j)*sqi9 - ENDIF + & - xlscp/exner(i,k,j)*sqi9 + ENDIF thetav(k)=th(i,k,j)*(1.+0.608*sqv(k)) thvl(k)=thlsg(k)*(1.+0.61*sqv(k)) @@ -4376,6 +4583,11 @@ SUBROUTINE mynn_bl_driver( & ELSE qnifa1(k)=0.0 ENDIF + IF (PRESENT(ozone)) THEN + ozone1(k)=ozone(i,k) + ELSE + ozone1(k)=0.0 + ENDIF p1(k) = p(i,k,j) ex1(k)= exner(i,k,j) el(k) = el_pbl(i,k,j) @@ -4407,6 +4619,15 @@ SUBROUTINE mynn_bl_driver( & s_awqni1(k)=0. s_awqnwfa1(k)=0. s_awqnifa1(k)=0. + sub_thl(k)=0. + sub_sqv(k)=0. + sub_u(k)=0. + sub_v(k)=0. + det_thl(k)=0. + det_sqv(k)=0. + det_sqc(k)=0. + det_u(k)=0. + det_v(k)=0. #if (WRF_CHEM == 1) IF (bl_mynn_mixchem == 1) THEN @@ -4480,7 +4701,7 @@ SUBROUTINE mynn_bl_driver( & ENDIF sqcg= 0.0 !JOE, it was: qcg(i,j)/(1.+qcg(i,j)) - cpm=cp*(1.+0.84*qv(i,kts,j)) + cpm=cp*(1.+0.84*qv1(kts)) exnerg=(ps(i,j)/p1000mb)**rcp !----------------------------------------------------- @@ -4531,10 +4752,10 @@ SUBROUTINE mynn_bl_driver( & !! selected by use of the namelist parameter \p bl_mynn_cloudpdf. CALL mym_condensation ( kts,kte, & - &dx(i,j),dz1,zw,thl,sqw,p1,ex1, & - &tsq1, qsq1, cov1, & + &dx(i,j),dz1,zw,thl,sqw,sqv,sqc,sqi,& + &p1,ex1,tsq1,qsq1,cov1, & &Sh,el,bl_mynn_cloudpdf, & - &qc_bl1D,cldfra_bl1D, & + &qc_bl1D,qi_bl1D,cldfra_bl1D, & &PBLH(i,j),HFX(i,j), & &Vt, Vq, th1, sgm, rmol(i,j), & &spp_pbl, rstoch_col ) @@ -4591,11 +4812,17 @@ SUBROUTINE mynn_bl_driver( & radflux=radflux*cp/g*(p1(kk)-p1(kk+1)) ! converts temp/s to W/m^2 if (radflux < 0.0 ) radsum=abs(radflux)+radsum ENDDO - radsum=MIN(radsum,60.0) + + !More strict limits over land to reduce stable-layer mixouts + if ((xland(i,j)-1.5).GE.0)THEN ! WATER + radsum=MIN(radsum,120.0) + bfx0 = max(radsum/rho1(k)/cp,0.) + else ! LAND + radsum=MIN(0.25*radsum,30.0)!practically turn off over land + bfx0 = max(radsum/rho1(k)/cp - max(sflux,0.0),0.) + endif !entrainment from PBL top thermals - bfx0 = max(radsum/rho1(k)/cp - max(sflux,0.0),0.) - !bfx0 = max(radsum/rho1(k)/cp,0.) wm3 = g/thetav(k)*bfx0*MIN(pblh(i,j),1500.) ! this is wstar3(i) wm2 = wm2 + wm3**h2 bfxpbl = - ent_eff * bfx0 @@ -4631,12 +4858,9 @@ SUBROUTINE mynn_bl_driver( & TKEprodTD(kts:kte)=0.0 ENDIF !end top-down check -!> - Call dmp_mf() to calculate the nonlocal turbulent transport from -!! the dynamic multiplume mass-flux scheme as well as the shallow-cumulus -!! component of the subgrid clouds. - IF (bl_mynn_edmf == 1) THEN + IF (bl_mynn_edmf > 0) THEN !PRINT*,"Calling DMP Mass-Flux: i= ",i," j=",j - CALL DMP_mf( & + CALL DMP_mf( & &kts,kte,delt,zw,dz1,p1, & &bl_mynn_edmf_mom, & &bl_mynn_edmf_tke, & @@ -4659,16 +4883,21 @@ SUBROUTINE mynn_bl_driver( & & s_awu1,s_awv1,s_awqke1, & & s_awqnc1,s_awqni1, & & s_awqnwfa1,s_awqnifa1, & + & sub_thl,sub_sqv, & + & sub_u,sub_v, & + & det_thl,det_sqv,det_sqc, & + & det_u,det_v, & #if (WRF_CHEM == 1) & nchem,chem1,s_awchem1, & #endif & qc_bl1D,cldfra_bl1D, & + & qc_bl1D_old,cldfra_bl1D_old, & & FLAG_QC,FLAG_QI, & & FLAG_QNC,FLAG_QNI, & & FLAG_QNWFA,FLAG_QNIFA, & & Psig_shcu(i,j), & - & nupdraft(i,j),ktop_shallow(i,j), & - & maxmf(i,j),ztop_shallow, & + & nupdraft(i,j),ktop_plume(i,j), & + & maxmf(i,j),ztop_plume, & & spp_pbl,rstoch_col & ) @@ -4707,7 +4936,7 @@ SUBROUTINE mynn_bl_driver( & DO k=kts,kte-1 ! Set max dissipative heating rate close to 0.1 K per hour (=0.000027...) - diss_heat(k) = MIN(MAX(0.5*(qke1(k)**1.5)/(b1*MAX(0.5*(el(k)+el(k+1)),1.))/cp, 0.0),0.00002) + diss_heat(k) = MIN(MAX(twothirds*(qke1(k)**1.5)/(b1*MAX(0.5*(el(k)+el(k+1)),1.))/cp, 0.0),0.00003) ENDDO diss_heat(kte) = 0. @@ -4719,7 +4948,7 @@ SUBROUTINE mynn_bl_driver( & &u1, v1, th1, tk1, qv1, & &qc1, qi1, qnc1, qni1, & &p1, ex1, thl, sqv, sqc, sqi, sqw,& - &qnwfa1, qnifa1, & + &qnwfa1, qnifa1, ozone1, & &ust(i,j),flt,flq,flqv,flqc, & &wspd(i,j),qcg(i,j), & &uoce(i,j),voce(i,j), & @@ -4728,17 +4957,20 @@ SUBROUTINE mynn_bl_driver( & &dfm, dfh, dfq, & &Du1, Dv1, Dth1, Dqv1, & &Dqc1, Dqi1, Dqnc1, Dqni1, & - &Dqnwfa1, Dqnifa1, & + &Dqnwfa1, Dqnifa1, Dozone1, & &vdfg(i,j), diss_heat, & ! mass flux components &s_aw1,s_awthl1,s_awqt1, & &s_awqv1,s_awqc1,s_awu1,s_awv1, & &s_awqnc1,s_awqni1, & &s_awqnwfa1,s_awqnifa1, & + &sub_thl,sub_sqv, & + &sub_u,sub_v, & + &det_thl,det_sqv,det_sqc, & + &det_u,det_v, & &FLAG_QC,FLAG_QI,FLAG_QNC, & &FLAG_QNI,FLAG_QNWFA,FLAG_QNIFA, & &cldfra_bl1d, & - &ztop_shallow,ktop_shallow(i,j), & &bl_mynn_cloudmix, & &bl_mynn_mixqt, & &bl_mynn_edmf, & @@ -4781,11 +5013,11 @@ SUBROUTINE mynn_bl_driver( & RTHBLTEN(i,k,j)=dth1(k) RQVBLTEN(i,k,j)=dqv1(k) IF(bl_mynn_cloudmix > 0)THEN - IF (PRESENT(qc) .AND. FLAG_QC) RQCBLTEN(i,k,j)=dqc1(k) - IF (PRESENT(qi) .AND. FLAG_QI) RQIBLTEN(i,k,j)=dqi1(k) + IF (PRESENT(sqc3D) .AND. FLAG_QC) RQCBLTEN(i,k,j)=dqc1(k) + IF (PRESENT(sqi3D) .AND. FLAG_QI) RQIBLTEN(i,k,j)=dqi1(k) ELSE - IF (PRESENT(qc) .AND. FLAG_QC) RQCBLTEN(i,k,j)=0. - IF (PRESENT(qi) .AND. FLAG_QI) RQIBLTEN(i,k,j)=0. + IF (PRESENT(sqc3D) .AND. FLAG_QC) RQCBLTEN(i,k,j)=0. + IF (PRESENT(sqi3D) .AND. FLAG_QI) RQIBLTEN(i,k,j)=0. ENDIF IF(bl_mynn_cloudmix > 0 .AND. bl_mynn_mixscalars > 0)THEN IF (PRESENT(qnc) .AND. FLAG_QNC) RQNCBLTEN(i,k,j)=dqnc1(k) @@ -4798,37 +5030,34 @@ SUBROUTINE mynn_bl_driver( & IF (PRESENT(qnwfa) .AND. FLAG_QNWFA) RQNWFABLTEN(i,k,j)=0. IF (PRESENT(qnifa) .AND. FLAG_QNIFA) RQNIFABLTEN(i,k,j)=0. ENDIF + DOZONE(i,k)=DOZONE1(k) IF(icloud_bl > 0)THEN - !make BL clouds scale aware - may already be done in mym_condensation - qc_bl(i,k,j)=qc_bl1D(k) !*Psig_shcu(i,j) - cldfra_bl(i,k,j)=cldfra_bl1D(k) !*Psig_shcu(i,j) - !DIAGNOSTIC-DECAY FOR SUBGRID-SCALE CLOUDS -!> - Compute the temporal decay of diagnostic subgrid cloud. This allows the diagnostic -!! sugrid clouds to persist for an eddy turnover time scale. - IF (CLDFRA_BL(i,k,j) < cldfra_bl1D_old(k)) THEN + IF (CLDFRA_BL1D(k) < cldfra_bl1D_old(k)) THEN !DECAY TIMESCALE FOR CALM CONDITION IS THE EDDY TURNOVER - !TIMESCALE, BUT FOR - !WINDY CONDITIONS, IT IS THE ADVECTIVE TIMESCALE. USE THE - !MINIMUM OF THE TWO. + !TIMESCALE, BUT FOR WINDY CONDITIONS, IT IS THE ADVECTIVE + !TIMESCALE. USE THE MINIMUM OF THE TWO. ts_decay = MIN( 1800., 3.*dx(i,j)/MAX(SQRT(u1(k)**2 + v1(k)**2),1.0) ) cldfra_bl(i,k,j)= MAX(cldfra_bl1D(k),cldfra_bl1D_old(k)-(0.25*delt/ts_decay)) - IF (cldfra_bl(i,k,j) < 0.005) THEN - CLDFRA_BL(i,k,j)= 0. - QC_BL(i,k,j) = 0. + ! qc_bl2 and qi_bl2 are decay rates + qc_bl2 = MAX(qc_bl1D(k),qc_bl1D_old(k)) + qc_bl2 = MAX(qc_bl2,1.0E-5) + qi_bl2 = MAX(qi_bl1D(k),qi_bl1D_old(k)) + qi_bl2 = MAX(qi_bl2,1.0E-6) + qc_bl(i,k,j) = MAX(qc_bl1D(k),qc_bl1D_old(k)-(MIN(qc_bl2,1.0E-4) * delt/ts_decay)) + qi_bl(i,k,j) = MAX(qi_bl1D(k),qi_bl1D_old(k)-(MIN(qi_bl2,1.0E-5) * delt/ts_decay)) + IF (cldfra_bl(i,k,j) < 0.005 .OR. & + (qc_bl(i,k,j) + qi_bl(i,k,j)) < 1E-9) THEN + CLDFRA_BL(i,k,j)= 0. + QC_BL(i,k,j) = 0. + QI_BL(i,k,j) = 0. ENDIF + ELSE + qc_bl(i,k,j)=qc_bl1D(k) + qi_bl(i,k,j)=qi_bl1D(k) + cldfra_bl(i,k,j)=cldfra_bl1D(k) ENDIF - - !Reapply checks on cldfra_bl and qc_bl to avoid FPEs in radiation driver - ! when these two quantities are multiplied by eachother (they may have changed - ! in the MF scheme: - !IF (icloud_bl > 0) THEN - IF ( zw(k) < 3000.0 ) THEN - IF (QC_BL(i,k,j) < 5E-6 .AND. CLDFRA_BL(i,k,j) > 0.005) QC_BL(i,k,j)= 5E-6 - ELSE - IF (QC_BL(i,k,j) < 1E-8 .AND. CLDFRA_BL(i,k,j) > 0.005) QC_BL(i,k,j)= 1E-8 - ENDIF ENDIF el_pbl(i,k,j)=el(k) @@ -4838,26 +5067,37 @@ SUBROUTINE mynn_bl_driver( & cov(i,k,j)=cov1(k) sh3d(i,k,j)=sh(k) - IF ( bl_mynn_tkebudget == 1) THEN + ENDDO !end-k + + IF ( bl_mynn_tkebudget == 1) THEN + DO k = kts,kte dqke(i,k,j) = (qke1(k)-dqke(i,k,j))*0.5 !qke->tke qWT(i,k,j) = qWT1(k)*delt qSHEAR(i,k,j)= qSHEAR1(k)*delt qBUOY(i,k,j) = qBUOY1(k)*delt qDISS(i,k,j) = qDISS1(k)*delt - ENDIF + ENDDO + ENDIF - !update updraft properties - IF (bl_mynn_edmf > 0) THEN - edmf_a(i,k,j)=edmf_a1(k) - edmf_w(i,k,j)=edmf_w1(k) - edmf_qt(i,k,j)=edmf_qt1(k) - edmf_thl(i,k,j)=edmf_thl1(k) - edmf_ent(i,k,j)=edmf_ent1(k) - edmf_qc(i,k,j)=edmf_qc1(k) - ENDIF + !update updraft properties + IF (bl_mynn_output > 0) THEN !research mode == 1 + DO k = kts,kte + edmf_a(i,k)=edmf_a1(k) + edmf_w(i,k)=edmf_w1(k) + edmf_qt(i,k)=edmf_qt1(k) + edmf_thl(i,k)=edmf_thl1(k) + edmf_ent(i,k)=edmf_ent1(k) + edmf_qc(i,k)=edmf_qc1(k) + sub_thl3D(i,k)=sub_thl(k) + sub_sqv3D(i,k)=sub_sqv(k) + det_thl3D(i,k)=det_thl(k) + det_sqv3D(i,k)=det_sqv(k) + ENDDO + ENDIF - !*** Begin debug prints - IF ( debug_code ) THEN + !*** Begin debug prints + IF ( debug_code ) THEN + DO k = kts,kte IF ( sh(k) < 0. .OR. sh(k)> 200.)print*,& "SUSPICIOUS VALUES AT: i,j,k=",i,j,k," sh=",sh(k) IF ( qke(i,k,j) < -1. .OR. qke(i,k,j)> 200.)print*,& @@ -4881,30 +5121,27 @@ SUBROUTINE mynn_bl_driver( & PRINT*,"SUSPICIOUS VALUES: CLDFRA_BL=",cldfra_bl(i,k,j)," qc_bl=",QC_BL(i,k,j) ENDIF ENDIF - ENDIF - !*** End debug prints - ENDDO + + !IF (I==IMD .AND. J==JMD) THEN + ! PRINT*,"MYNN DRIVER END: k=",k," sh=",sh(k) + ! PRINT*," sqw=",sqw(k)," thl=",thl(k)," exch_m=",exch_m(i,k,j) + ! PRINT*," xland=",xland(i,j)," rmol=",rmol(i,j)," ust=",ust(i,j) + ! PRINT*," qke=",qke(i,k,j)," el=",el_pbl(i,k,j)," tsq=",tsq(i,k,j) + ! PRINT*," PBLH=",PBLH(i,j)," u=",u(i,k,j)," v=",v(i,k,j) + ! PRINT*," vq=",vq(k)," vt=",vt(k)," vdfg=",vdfg(i,j) + !ENDIF + ENDDO !end-k + ENDIF + !*** End debug prints !JOE-add tke_pbl for coupling w/shallow-cu schemes (TKE_PBL = QKE/2.) ! TKE_PBL is defined on interfaces, while QKE is at middle of layer. - tke_pbl(i,kts,j) = 0.5*MAX(qke(i,kts,j),1.0e-10) - DO k = kts+1,kte - afk = dz1(k)/( dz1(k)+dz1(k-1) ) - abk = 1.0 -afk - tke_pbl(i,k,j) = 0.5*MAX(qke(i,k,j)*abk+qke(i,k-1,j)*afk,1.0e-3) - ENDDO - -!*** Begin debugging -! IF(I==IMD .AND. J==JMD)THEN -! k=kdebug -! PRINT*,"MYNN DRIVER END: k=",1," sh=",sh(k) -! PRINT*," sqw=",sqw(k)," thl=",thl(k)," k_m=",k_m(i,k,j) -! PRINT*," xland=",xland(i,j)," rmol=",rmol(i,j)," ust=",ust(i,j) -! PRINT*," qke=",qke(i,k,j)," el=",el_pbl(i,k,j)," tsq=",tsq(i,k,j) -! PRINT*," PBLH=",PBLH(i,j)," u=",u(i,k,j)," v=",v(i,k,j) -! PRINT*," vq=",vq(k)," vt=",vt(k)," vdfg=",vdfg(i,j) -! ENDIF -!*** End debugging + !tke_pbl(i,kts,j) = 0.5*MAX(qke(i,kts,j),1.0e-10) + !DO k = kts+1,kte + ! afk = dz1(k)/( dz1(k)+dz1(k-1) ) + ! abk = 1.0 -afk + ! tke_pbl(i,k,j) = 0.5*MAX(qke(i,k,j)*abk+qke(i,k-1,j)*afk,1.0e-3) + !ENDDO ENDDO ENDDO @@ -4927,9 +5164,10 @@ END SUBROUTINE mynn_bl_driver !>\ingroup gsd_mynn_edmf SUBROUTINE mynn_bl_init_driver( & &RUBLTEN,RVBLTEN,RTHBLTEN,RQVBLTEN, & - &RQCBLTEN,RQIBLTEN & !,RQNIBLTEN,RQNCBLTEN & - &,QKE,TKE_PBL,EXCH_H & -! &,icloud_bl,qc_bl,cldfra_bl & !JOE-subgrid bl clouds + &RQCBLTEN,RQIBLTEN & !,RQNIBLTEN,RQNCBLTEN & + &,QKE, & + &EXCH_H & + !&,icloud_bl,qc_bl,cldfra_bl & &,RESTART,ALLOWED_TO_READ,LEVEL & &,IDS,IDE,JDS,JDE,KDS,KDE & &,IMS,IME,JMS,JME,KMS,KME & @@ -4947,7 +5185,7 @@ SUBROUTINE mynn_bl_init_driver( & REAL,DIMENSION(IMS:IME,KMS:KME,JMS:JME),INTENT(INOUT) :: & &RUBLTEN,RVBLTEN,RTHBLTEN,RQVBLTEN, & &RQCBLTEN,RQIBLTEN,& !RQNIBLTEN,RQNCBLTEN & - &QKE,TKE_PBL,EXCH_H + &QKE,EXCH_H ! REAL,DIMENSION(IMS:IME,KMS:KME,JMS:JME),INTENT(INOUT) :: & ! &qc_bl,cldfra_bl @@ -4971,7 +5209,6 @@ SUBROUTINE mynn_bl_init_driver( & !if( p_qnc >= param_first_scalar ) RQNCBLTEN(i,k,j)=0. !if( p_qni >= param_first_scalar ) RQNIBLTEN(i,k,j)=0. !QKE(i,k,j)=0. - TKE_PBL(i,k,j)=0. EXCH_H(i,k,j)=0. ! if(icloud_bl > 0) qc_bl(i,k,j)=0. ! if(icloud_bl > 0) cldfra_bl(i,k,j)=0. @@ -5036,15 +5273,13 @@ SUBROUTINE GET_PBLH(KTS,KTE,zi,thetav1D,qke1D,zw1D,dz1D,landsea,kzi) REAL, DIMENSION(KTS:KTE+1), INTENT(IN) :: zw1D !LOCAL VARS REAL :: PBLH_TKE,qtke,qtkem1,wt,maxqke,TKEeps,minthv - REAL :: delt_thv !< delta theta-v; dependent on land/sea point - REAL, PARAMETER :: sbl_lim = 200. !< upper limit of stable BL height (m). - REAL, PARAMETER :: sbl_damp = 400. !< transition length for blending (m). - INTEGER :: I,J,K,kthv,ktke,kzi,kzi2 + REAL :: delt_thv !delta theta-v; dependent on land/sea point + REAL, PARAMETER :: sbl_lim = 200. !upper limit of stable BL height (m). + REAL, PARAMETER :: sbl_damp = 400. !transition length for blending (m). + INTEGER :: I,J,K,kthv,ktke,kzi - !ADD KPBL (kzi) - !KZI2 is the TKE-based part of the hybrid KPBL + !Initialize KPBL (kzi) kzi = 2 - kzi2= 2 !> - FIND MIN THETAV IN THE LOWEST 200 M AGL k = kts+1 @@ -5076,11 +5311,9 @@ SUBROUTINE GET_PBLH(KTS,KTE,zi,thetav1D,qke1D,zw1D,dz1D,landsea,kzi) ! DO WHILE (zi .EQ. 0.) DO k=kts+1,kte-1 IF (thetav1D(k) .GE. (minthv + delt_thv))THEN - !kzi = MAX(k-1,1) zi = zw1D(k) - dz1D(k-1)* & & MIN((thetav1D(k)-(minthv + delt_thv))/ & & MAX(thetav1D(k)-thetav1D(k-1),1E-6),1.0) - kzi= MAX(k-1,1) + NINT((zi-zw1D(k-1))/dz1D(k-1)) ENDIF !k = k+1 IF (k .EQ. kte-1) zi = zw1D(kts+1) !EXIT SAFEGUARD @@ -5107,12 +5340,10 @@ SUBROUTINE GET_PBLH(KTS,KTE,zi,thetav1D,qke1D,zw1D,dz1D,landsea,kzi) qtke =MAX(Qke1D(k)/2.,0.) ! maximum TKE qtkem1=MAX(Qke1D(k-1)/2.,0.) IF (qtke .LE. TKEeps) THEN - !kzi2 = MAX(k-1,1) PBLH_TKE = zw1D(k) - dz1D(k-1)* & & MIN((TKEeps-qtke)/MAX(qtkem1-qtke, 1E-6), 1.0) !IN CASE OF NEAR ZERO TKE, SET PBLH = LOWEST LEVEL. PBLH_TKE = MAX(PBLH_TKE,zw1D(kts+1)) - kzi2 = MAX(k-1,1) + NINT((PBLH_TKE-zw1D(k-1))/dz1D(k-1)) !print *,"PBLH_TKE:",i,j,PBLH_TKE, Qke1D(k)/2., zw1D(kts+1) ENDIF !k = k+1 @@ -5137,8 +5368,13 @@ SUBROUTINE GET_PBLH(KTS,KTE,zi,thetav1D,qke1D,zw1D,dz1D,landsea,kzi) zi=PBLH_TKE*(1.-wt) + zi*wt ENDIF - !ADD KPBL (kzi) for coupling to some Cu schemes - kzi = MAX(INT(kzi2*(1.-wt) + kzi*wt),1) + !Compute KPBL (kzi) + DO k=kts+1,kte-1 + IF ( zw1D(k) >= zi) THEN + kzi = k-1 + exit + ENDIF + ENDDO #ifdef HARDCODE_VERTICAL # undef kts @@ -5188,11 +5424,16 @@ SUBROUTINE DMP_mf( & & s_awu,s_awv,s_awqke, & & s_awqnc,s_awqni, & & s_awqnwfa,s_awqnifa, & + & sub_thl,sub_sqv, & + & sub_u,sub_v, & + & det_thl,det_sqv,det_sqc, & + & det_u,det_v, & #if (WRF_CHEM == 1) & nchem,chem,s_awchem, & #endif ! in/outputs - subgrid scale clouds - & qc_bl1d,cldfra_bl1d, & + & qc_bl1d,cldfra_bl1d, & + & qc_bl1D_old,cldfra_bl1D_old, & ! inputs - flags for moist arrays & F_QC,F_QI, & F_QNC,F_QNI, & @@ -5244,7 +5485,8 @@ SUBROUTINE DMP_mf( & s_awv, & s_awqke, s_aw2 - REAL,DIMENSION(KTS:KTE), INTENT(INOUT) :: qc_bl1d,cldfra_bl1d + REAL,DIMENSION(KTS:KTE), INTENT(INOUT) :: qc_bl1d,cldfra_bl1d, & + qc_bl1d_old,cldfra_bl1d_old INTEGER, PARAMETER :: NUP=10, debug_mf=0 @@ -5260,7 +5502,7 @@ SUBROUTINE DMP_mf( & ! internal variables INTEGER :: K,I,k50 REAL :: fltv,wstar,qstar,thstar,sigmaW,sigmaQT,sigmaTH,z0, & - pwmin,pwmax,wmin,wmax,wlv,wtv,Psig_w,maxw,maxqc,wpbl + pwmin,pwmax,wmin,wmax,wlv,Psig_w,maxw,maxqc,wpbl REAL :: B,QTn,THLn,THVn,QCn,Un,Vn,QKEn,QNCn,QNIn,QNWFAn,QNIFAn, & Wn2,Wn,EntEXP,EntW,BCOEFF,THVkm1,THVk,Pk @@ -5304,24 +5546,41 @@ SUBROUTINE DMP_mf( & ! VARIABLES FOR CHABOUREAU-BECHTOLD CLOUD FRACTION REAL,DIMENSION(KTS:KTE), INTENT(INOUT) :: vt, vq, sgm REAL :: sigq,xl,tlk,qsat_tl,rsl,cpm,a,qmq,mf_cf,Q1,diffqt,& - Fng,qww,alpha,beta,bb,f,pt,t,q2p,b9,satvp,rhgrid + Fng,qww,alpha,beta,bb,f,pt,t,q2p,b9,satvp,rhgrid, & + Ac_mf,Ac_strat,qc_mf ! Variables for plume interpolation/saturation check REAL,DIMENSION(KTS:KTE) :: exneri,dzi - REAL :: THp, QTp, QCp, esat, qsl + REAL :: THp, QTp, QCp, QCs, esat, qsl ! WA TEST 11/9/15 for consistent reduction of updraft params - REAL :: csigma,acfac,EntThrottle + REAL :: csigma,acfac !JOE- plume overshoot INTEGER :: overshoot - REAL :: bvf, Frz + REAL :: bvf, Frz, dzp !Flux limiter: not let mass-flux of heat between k=1&2 exceed (fluxportion)*(surface heat flux). !This limiter makes adjustments to the entire column. REAL :: adjustment, flx1 REAL, PARAMETER :: fluxportion=0.75 ! set liberally, so has minimal impact. 0.5 starts to have a noticeable impact ! over land (decrease maxMF by 10-20%), but no impact over water. + + !Subsidence + REAL,DIMENSION(KTS:KTE) :: sub_thl,sub_sqv,sub_u,sub_v, & !tendencies due to subsidence + det_thl,det_sqv,det_sqc,det_u,det_v, & !tendencied due to detrainment + envm_a,envm_w,envm_thl,envm_sqv,envm_sqc, & + envm_u,envm_v !environmental variables defined at middle of layer + REAL,DIMENSION(KTS:KTE+1) :: envi_a,envi_w !environmental variables defined at model interface + REAL :: temp,sublim,qc_ent,qv_ent,qt_ent,thl_ent,detrate, & + detrateUV,oow,exc_fac,aratio,detturb,qc_grid + REAL, PARAMETER :: Cdet = 1./45. + !parameter "Csub" determines the propotion of upward vertical velocity that contributes to + !environmenatal subsidence. Some portion is expected to be compensated by downdrafts instead of + !gentle environmental subsidence. 1.0 assumes all upward vertical velocity in the mass-flux scheme + !is compensated by "gentle" environmental subsidence. + REAL, PARAMETER :: Csub=0.25 + ! check the inputs ! print *,'dt',dt ! print *,'dz',dz @@ -5385,7 +5644,16 @@ SUBROUTINE DMP_mf( & s_awchem(kts:kte+1,1:nchem) = 0.0 ENDIF #endif - +! Initialize explicit tendencies for subsidence & detrainment + sub_thl = 0. + sub_sqv = 0. + sub_u = 0. + sub_v = 0. + det_thl = 0. + det_sqv = 0. + det_sqc = 0. + det_u = 0. + det_v = 0. ! Taper off MF scheme when significant resolved-scale motions ! are present This function needs to be asymetric... @@ -5411,8 +5679,8 @@ SUBROUTINE DMP_mf( & !k = k + 1 ENDDO !print*," maxw before manipulation=", maxw - maxw = MAX(0.,maxw - 0.5) ! do nothing for small w, but - Psig_w = MAX(0.0, 1.0 - maxw/0.5) ! linearly taper off for w > 0.5 m/s + maxw = MAX(0.,maxw - 1.0) ! do nothing for small w (< 1 m/s), but + Psig_w = MAX(0.0, 1.0 - maxw) ! linearly taper off for w > 1.0 m/s Psig_w = MIN(Psig_w, Psig_shcu) !print*," maxw=", maxw," Psig_w=",Psig_w," Psig_shcu=",Psig_shcu @@ -5431,7 +5699,7 @@ SUBROUTINE DMP_mf( & ELSE hux = -0.005 ! LAND ! dT/dz must be < - 0.5 K per 100 m. ENDIF - DO k=1,MAX(1,k50-1) + DO k=1,MAX(1,k50-1) !use "-1" because k50 used interface heights (zw). IF (k == 1) then IF ((th(k)-ts)/(0.5*dz(k)) < hux) THEN superadiabatic = .true. @@ -5453,23 +5721,25 @@ SUBROUTINE DMP_mf( & ! Some of these criteria may be a little redundant but useful for bullet-proofing. ! (1) largest plume = 1.0 * dx. ! (2) Apply a scale-break, assuming no plumes with diameter larger than PBLH can exist. - ! (3) max plume size beneath clouds deck approx = height of cloud_base. - ! (4) add shear-dependent limit, when plume model breaks down. (taken out) + ! (3) max plume size beneath clouds deck approx = 0.5 * cloud_base. + ! (4) add wspd-dependent limit, when plume model breaks down. (hurricanes) ! (5) land-only limit to reduce plume sizes in weakly forced conditions ! Criteria (1) NUP2 = max(1,min(NUP,INT(dx*dcut/dl))) - ! Criteria (2) and (4) - !wspd_pbl=SQRT(MAX(u(kpbl)**2 + v(kpbl)**2, 0.01)) - maxwidth = 1.2*PBLH !- MIN(15.*MAX(wspd_pbl - 7.5, 0.), 0.3*PBLH) + !Criteria (2) + maxwidth = 1.2*PBLH ! Criteria (3) - maxwidth = MIN(maxwidth,cloud_base) + maxwidth = MIN(maxwidth,0.75*cloud_base) + ! Criteria (4) + wspd_pbl=SQRT(MAX(u(kts)**2 + v(kts)**2, 0.01)) + !Note: area fraction (acfac) is modified below ! Criteria (5) IF((landsea-1.5).LT.0)THEN width_flx = MAX(MIN(1000.*(0.6*tanh((flt - 0.050)/0.03) + .5),1000.), 0.) maxwidth = MIN(maxwidth,width_flx) ENDIF ! Convert maxwidth to number of plumes - NUP2 = MIN(MAX(INT((maxwidth - MOD(maxwidth,100.))/100), 0), NUP2) + NUP2 = MIN(MAX(INT((maxwidth - MOD(maxwidth,100.))/100), 0), NUP2) !Initialize values: ktop = 0 @@ -5499,7 +5769,12 @@ SUBROUTINE DMP_mf( & UPA(1,I) = N*l*l/(dx*dx) * dl ! fractional area of plume n ! Make updraft area (UPA) a function of the buoyancy flux ! acfac = .5*tanh((fltv - 0.03)/0.09) + .5 - acfac = .5*tanh((fltv - 0.02)/0.09) + .5 +! acfac = .5*tanh((fltv - 0.02)/0.09) + .5 + acfac = .5*tanh((fltv - 0.01)/0.09) + .5 + + !add a windspeed-dependent adjustment to acfac that tapers off + !the mass-flux scheme linearly above sfc wind speeds of 20 m/s: + acfac = acfac*(1. - MIN(MAX(wspd_pbl - 20.0, 0.0), 10.0)/10.) UPA(1,I)=UPA(1,I)*acfac An2 = An2 + UPA(1,I) ! total fractional area of all plumes @@ -5520,12 +5795,22 @@ SUBROUTINE DMP_mf( & ELSE csigma = 1.34 ! LAND ENDIF + + IF (env_subs) THEN + exc_fac = 0.0 + ELSE + exc_fac = 0.58 + ENDIF + + !Note: sigmaW is typically about 0.5*wstar sigmaW =1.34*wstar*(z0/pblh)**(1./3.)*(1 - 0.8*z0/pblh) sigmaQT=csigma*qstar*(z0/pblh)**(-1./3.) sigmaTH=csigma*thstar*(z0/pblh)**(-1./3.) - wmin=MIN(sigmaW*pwmin,0.1) - wmax=MIN(sigmaW*pwmax,0.333) + !Note: Given the pwmin & pwmax set above, these max/mins are + ! rarely exceeded. + wmin=MIN(sigmaW*pwmin,0.05) + wmax=MIN(sigmaW*pwmax,0.4) !recompute acfac for plume excess acfac = .5*tanh((fltv - 0.03)/0.07) + .5 @@ -5534,44 +5819,49 @@ SUBROUTINE DMP_mf( & DO I=1,NUP !NUP2 IF(I > NUP2) exit wlv=wmin+(wmax-wmin)/NUP2*(i-1) - wtv=wmin+(wmax-wmin)/NUP2*i !SURFACE UPDRAFT VERTICAL VELOCITY - !UPW(1,I)=0.5*(wlv+wtv) UPW(1,I)=wmin + REAL(i)/REAL(NUP)*(wmax-wmin) !IF (UPW(1,I) > 0.5*ZW(2)/dt) UPW(1,I) = 0.5*ZW(2)/dt - !SURFACE UPDRAFT AREA - !UPA(1,I)=0.5*ERF(wtv/(sqrt(2.)*sigmaW)) - 0.5*ERF(wlv/(sqrt(2.)*sigmaW)) - !UPA(1,I)=0.25*ERF(wtv/(sqrt(2.)*sigmaW)) - 0.25*ERF(wlv/(sqrt(2.)*sigmaW)) !12.0 - UPU(1,I)=(U(KTS)*DZ(KTS+1)+U(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) UPV(1,I)=(V(KTS)*DZ(KTS+1)+V(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) UPQC(1,I)=0 !UPQC(1,I)=(QC(KTS)*DZ(KTS+1)+QC(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) UPQT(1,I)=(QT(KTS)*DZ(KTS+1)+QT(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1))& - & +0.58*UPW(1,I)*sigmaQT/sigmaW + & +exc_fac*UPW(1,I)*sigmaQT/sigmaW UPTHV(1,I)=(THV(KTS)*DZ(KTS+1)+THV(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) & - & +0.58*UPW(1,I)*sigmaTH/sigmaW + & +exc_fac*UPW(1,I)*sigmaTH/sigmaW !was UPTHL(1,I)= UPTHV(1,I)/(1.+svp1*UPQT(1,I)) !assume no saturated parcel at surface UPTHL(1,I)=(THL(KTS)*DZ(KTS+1)+THL(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) & - & +0.58*UPW(1,I)*sigmaTH/sigmaW + & +exc_fac*UPW(1,I)*sigmaTH/sigmaW UPQKE(1,I)=(QKE(KTS)*DZ(KTS+1)+QKE(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) UPQNC(1,I)=(QNC(KTS)*DZ(KTS+1)+QNC(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) UPQNI(1,I)=(QNI(KTS)*DZ(KTS+1)+QNI(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) UPQNWFA(1,I)=(QNWFA(KTS)*DZ(KTS+1)+QNWFA(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) UPQNIFA(1,I)=(QNIFA(KTS)*DZ(KTS+1)+QNIFA(KTS+1)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) + ENDDO + #if (WRF_CHEM == 1) IF (bl_mynn_mixchem == 1) THEN - do ic = 1,nchem - UPCHEM(1,I,ic)= (CHEM(KTS,ic)*DZ(KTS+1)+CHEM(KTS+1,ic)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) - enddo + DO I=1,NUP !NUP2 + IF(I > NUP2) exit + do ic = 1,nchem + UPCHEM(1,I,ic)=(CHEM(KTS,ic)*DZ(KTS+1)+CHEM(KTS+1,ic)*DZ(KTS))/(DZ(KTS)+DZ(KTS+1)) + enddo + ENDDO ENDIF #endif + !Initialize environmental variables which can be modified by detrainment + DO k=kts,kte + envm_thl(k)=THL(k) + envm_sqv(k)=QV(k) + envm_sqc(k)=QC(k) + envm_u(k)=U(k) + envm_v(k)=V(k) ENDDO - EntThrottle = 0.001 !MAX(0.02/MAX((flt*1.25*1004.)-25.,5.),0.0002) !QCn = 0. ! do integration updraft DO I=1,NUP !NUP2 @@ -5581,19 +5871,18 @@ SUBROUTINE DMP_mf( & l = dl*I ! diameter of plume DO k=KTS+1,KTE-1 !w-dependency for entrainment a la Tian and Kuang (2016) - !ENT(k,i) = 0.5/(MIN(MAX(UPW(K-1,I),0.75),1.5)*l) - !ENT(k,i) = 0.35/(MIN(MAX(UPW(K-1,I),0.75),1.5)*l) - ENT(k,i) = 0.33/(MIN(MAX(UPW(K-1,I),0.666),2.0)*l) + !ENT(k,i) = 0.35/(MIN(MAX(UPW(K-1,I),0.75),1.9)*l) + wmin = 0.3 + l*0.0005 !* MAX(pblh-ZW(k+1), 0.0)/pblh + ENT(k,i) = 0.31/(MIN(MAX(UPW(K-1,I),wmin),1.9)*l) !Entrainment from Negggers (2015, JAMES) !ENT(k,i) = 0.02*l**-0.35 - 0.0009 - !JOE - implement minimum background entrainment + !Minimum background entrainment ENT(k,i) = max(ENT(k,i),0.0003) !ENT(k,i) = max(ENT(k,i),0.05/ZW(k)) !not needed for Tian and Kuang !JOE - increase entrainment for plumes extending very high. - IF(ZW(k) >= MIN(pblh+1500., 3500.))THEN - ENT(k,i)=ENT(k,i) + (ZW(k)-MIN(pblh+1500.,3500.))*5.0E-6 + IF(ZW(k) >= MIN(pblh+1500., 4000.))THEN + ENT(k,i)=ENT(k,i) + (ZW(k)-MIN(pblh+1500.,4000.))*5.0E-6 ENDIF - !IF(UPW(K-1,I) > 2.0) ENT(k,i) = ENT(k,i) + EntThrottle*(UPW(K-1,I) - 2.0) !SPP ENT(k,i) = ENT(k,i) * (1.0 - rstoch_col(k)) @@ -5612,6 +5901,12 @@ SUBROUTINE DMP_mf( & QNWFAn=UPQNWFA(k-1,I)*(1.-EntExp) + QNWFA(k)*EntExp QNIFAn=UPQNIFA(k-1,I)*(1.-EntExp) + QNIFA(k)*EntExp + !capture the updated qc, qt & thl modified by entranment alone, + !since they will be modified later if condensation occurs. + qc_ent = QCn + qt_ent = QTn + thl_ent = THLn + ! Exponential Entrainment: !EntExp= exp(-ENT(K,I)*(ZW(k)-ZW(k-1))) !QTn =QT(K) *(1-EntExp)+UPQT(K-1,I)*EntExp @@ -5671,6 +5966,12 @@ SUBROUTINE DMP_mf( & Wn = UPW(K-1,I) - MIN(1.25*(ZW(k)-ZW(k-1))/200., 2.0) ENDIF Wn = MIN(MAX(Wn,0.0), 3.0) + !Check to make sure that the plume made it up at least one level. + !if it failed, then set nup2=0 and exit the mass-flux portion. + IF (k==kts+1 .AND. Wn == 0.) THEN + NUP2=0 + exit + ENDIF IF (debug_mf == 1) THEN IF (Wn .GE. 3.0) THEN @@ -5683,31 +5984,57 @@ SUBROUTINE DMP_mf( & ENDIF !Allow strongly forced plumes to overshoot if KE is sufficient - IF (fltv > 0.05 .AND. Wn <= 0 .AND. overshoot == 0) THEN + !IF (fltv > 0.05 .AND. Wn <= 0 .AND. overshoot == 0) THEN + IF (Wn <= 0.0 .AND. overshoot == 0) THEN overshoot = 1 IF ( THVk-THVkm1 .GT. 0.0 ) THEN bvf = SQRT( gtr*(THVk-THVkm1)/dz(k) ) !vertical Froude number Frz = UPW(K-1,I)/(bvf*dz(k)) - IF ( Frz >= 0.5 ) Wn = MIN(Frz,1.0)*UPW(K-1,I) + !IF ( Frz >= 0.5 ) Wn = MIN(Frz,1.0)*UPW(K-1,I) + dzp = dz(k)*MAX(MIN(Frz,1.0),0.0) ! portion of highest layer the plume penetrates ENDIF - ELSEIF (fltv > 0.05 .AND. overshoot == 1) THEN - !Do not let overshooting parcel go more than 1 layer up - Wn = 0.0 + !ELSEIF (fltv > 0.05 .AND. overshoot == 1) THEN + ELSE + dzp = dz(k) + ! !Do not let overshooting parcel go more than 1 layer up + ! Wn = 0.0 ENDIF !Limit very tall plumes ! Wn2=Wn2*EXP(-MAX(ZW(k)-(pblh+2000.),0.0)/1000.) ! IF(ZW(k) >= pblh+3000.)Wn2=0. - Wn=Wn*EXP(-MAX(ZW(k+1)-MIN(pblh+2000.,3000.),0.0)/1000.) - IF(ZW(k+1) >= MIN(pblh+3000.,4500.))Wn=0. + Wn=Wn*EXP(-MAX(ZW(k+1)-MIN(pblh+2000.,3500.),0.0)/1000.) !JOE- minimize the plume penetratration in stratocu-topped PBL ! IF (fltv < 0.06) THEN ! IF(ZW(k+1) >= pblh-200. .AND. qc(k) > 1e-5 .AND. I > 4) Wn=0. ! ENDIF + !Modify environment variables (representative of the model layer - envm*) + !following the updraft dynamical detrainment of Asai and Kasahara (1967, JAS). + !Reminder: w is limited to be non-negative (above) + aratio = MIN(UPA(K-1,I)/(1.-UPA(K-1,I)), 0.5) !limit should never get hit + detturb = 0.00008 + oow = -0.064/MAX(1.0,(0.5*(Wn+UPW(K-1,I)))) !coef for dynamical detrainment rate + detrate = MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0004) ! dynamical detrainment rate (m^-1) + detrateUV= MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0001) ! dynamical detrainment rate (m^-1) + envm_thl(k)=envm_thl(k) + (0.5*(thl_ent + UPTHL(K-1,I)) - thl(k))*detrate*aratio*dzp + qv_ent = 0.5*(MAX(qt_ent-qc_ent,0.) + MAX(UPQT(K-1,I)-UPQC(K-1,I),0.)) + envm_sqv(k)=envm_sqv(k) + (qv_ent-QV(K))*detrate*aratio*dzp + IF (UPQC(K-1,I) > 1E-8) THEN + IF (QC(K) > 1E-6) THEN + qc_grid = QC(K) + ELSE + qc_grid = cldfra_bl1d(k)*qc_bl1d(K) + ENDIF + envm_sqc(k)=envm_sqc(k) + MAX(UPA(K-1,I)*0.5*(QCn + UPQC(K-1,I)) - qc_grid, 0.0)*detrate*aratio*dzp + ENDIF + envm_u(k) =envm_u(k) + (0.5*(Un + UPU(K-1,I)) - U(K))*detrateUV*aratio*dzp + envm_v(k) =envm_v(k) + (0.5*(Vn + UPV(K-1,I)) - V(K))*detrateUV*aratio*dzp + IF (Wn > 0.) THEN + !Update plume variables at current k index UPW(K,I)=Wn !Wn !sqrt(Wn2) UPTHV(K,I)=THVn UPTHL(K,I)=THLn @@ -5761,12 +6088,13 @@ SUBROUTINE DMP_mf( & IF (ktop == 0) THEN ztop = 0.0 ELSE - ztop=zw(ktop+1) + ztop=zw(ktop) ENDIF IF(nup2 > 0) THEN !Calculate the fluxes for each variable + !All s_aw* variable are == 0 at k=1 DO k=KTS,KTE IF(k > KTOP) exit DO i=1,NUP !NUP2 @@ -5782,16 +6110,23 @@ SUBROUTINE DMP_mf( & IF (tke_opt > 0) THEN s_awqke(k+1)= s_awqke(k+1) + UPA(K,i)*UPW(K,i)*UPQKE(K,i)*Psig_w ENDIF + ENDDO + s_awqv(k+1) = s_awqt(k+1) - s_awqc(k+1) + ENDDO #if (WRF_CHEM == 1) IF (bl_mynn_mixchem == 1) THEN - do ic = 1,nchem - s_awchem(k+1,ic) = s_awchem(k+1,ic) + UPA(K,i)*UPW(K,i)*UPCHEM(K,i,ic)*Psig_w - enddo + DO k=KTS,KTE + IF(k > KTOP) exit + DO i=1,NUP !NUP2 + IF(I > NUP2) exit + do ic = 1,nchem + s_awchem(k+1,ic) = s_awchem(k+1,ic) + UPA(K,i)*UPW(K,i)*UPCHEM(K,i,ic)*Psig_w + enddo + ENDDO + ENDDO ENDIF #endif - ENDDO - s_awqv(k+1) = s_awqt(k+1) - s_awqc(k+1) - ENDDO + IF (scalar_opt > 0) THEN DO k=KTS,KTE IF(k > KTOP) exit @@ -5805,24 +6140,22 @@ SUBROUTINE DMP_mf( & ENDDO ENDIF - !Flux limiter: Check for too large heat flux at top of first model layer - ! Given that the temperature profile is calculated as: - ! d(k)=thl(k) + dtz(k)*flt + tcd(k)*delt & - ! & -dtz(k)*s_awthl(kts+1) + diss_heat(k)*delt*dheat_opt - ! So, s_awthl(kts+1) must be less than flt + !Flux limiter: Check ratio of heat flux at top of first model layer + !and at the surface. Make sure estimated flux out of the top of the + !layer is < fluxportion*surface_heat_flux IF (s_aw(kts+1) /= 0.) THEN - THVk = (THL(kts)*DZ(kts+1)+THL(kts+1)*DZ(kts))/(DZ(kts+1)+DZ(kts)) - flx1 = MAX(s_aw(kts+1)*(s_awthl(kts+1)/s_aw(kts+1) - THVk),0.0) + dzi(kts) = 0.5*(DZ(kts)+DZ(kts+1)) !dz centered at model interface + flx1 = MAX(s_aw(kts+1)*(TH(kts)-TH(kts+1))/dzi(kts),1.0e-5) ELSE flx1 = 0.0 + !print*,"ERROR: s_aw(kts+1) == 0, NUP=",NUP," NUP2=",NUP2,& + ! " superadiabatic=",superadiabatic," KTOP=",KTOP ENDIF - !flx1 = -dt/dz(kts)*s_awthl(kts+1) - !flx1 = (s_awthl(kts+1)-s_awthl(kts))!/(0.5*(dz(k)+dz(k-1))) adjustment=1.0 - !Print*,"Flux limiter in MYNN-EDMF:" - !Print*,"flx1=",flx1," s_awthl(kts+1)=",s_awthl(kts+1)," s_awthl(kts)=",s_awthl(kts) - IF (flx1 > fluxportion*flt .AND. flx1>0.0) THEN - adjustment= fluxportion*flt/flx1 + !Print*,"Flux limiter in MYNN-EDMF, adjustment=",fluxportion*flt/dz(kts)/flx1 + !Print*,"flt/dz=",flt/dz(kts)," flx1=",flx1," s_aw(kts+1)=",s_aw(kts+1) + IF (flx1 > fluxportion*flt/dz(kts) .AND. flx1>0.0) THEN + adjustment= fluxportion*flt/dz(kts)/flx1 s_aw = s_aw*adjustment s_awthl= s_awthl*adjustment s_awqt = s_awqt*adjustment @@ -5849,6 +6182,7 @@ SUBROUTINE DMP_mf( & !Print*,"adjustment=",adjustment," fluxportion=",fluxportion," flt=",flt !Calculate mean updraft properties for output: + !all edmf_* variables at k=1 correspond to the interface at top of first model layer DO k=KTS,KTE-1 IF(k > KTOP) exit DO I=1,NUP !NUP2 @@ -5868,6 +6202,8 @@ SUBROUTINE DMP_mf( & #endif ENDDO + !Note that only edmf_a is multiplied by Psig_w. This takes care of the + !scale-awareness of the subsidence below: IF (edmf_a(k)>0.) THEN edmf_w(k)=edmf_w(k)/edmf_a(k) edmf_qt(k)=edmf_qt(k)/edmf_a(k) @@ -5888,9 +6224,78 @@ SUBROUTINE DMP_mf( & ENDIF ENDDO + !Calculate the effects environmental subsidence. + !All envi_*variables are valid at the interfaces, like the edmf_* variables + IF (env_subs) THEN + DO k=KTS+1,KTE-1 + !First, smooth the profiles of w & a, since sharp vertical gradients + !in plume variables are not likely extended to env variables + !Note1: w is treated as negative further below + !Note2: both w & a will be transformed into env variables further below + envi_w(k) = onethird*(edmf_w(K-1)+edmf_w(K)+edmf_w(K+1)) + envi_a(k) = onethird*(edmf_a(k-1)+edmf_a(k)+edmf_a(k+1))*adjustment + ENDDO + !define env variables at k=1 (top of first model layer) + envi_w(kts) = edmf_w(kts) + envi_a(kts) = edmf_a(kts) + !define env variables at k=kte + envi_w(kte) = 0.0 + envi_a(kte) = edmf_a(kte) + !define env variables at k=kte+1 + envi_w(kte+1) = 0.0 + envi_a(kte+1) = edmf_a(kte) + !Add limiter for very long time steps (i.e. dt > 300 s) + !Note that this is not a robust check - only for violations in + ! the first model level. + IF (envi_w(kts) > 0.9*DZ(kts)/dt) THEN + sublim = 0.9*DZ(kts)/dt/envi_w(kts) + ELSE + sublim = 1.0 + ENDIF + !Transform w & a into env variables + DO k=KTS,KTE + temp=envi_a(k) + envi_a(k)=1.0-temp + envi_w(k)=csub*sublim*envi_w(k)*temp/(1.-temp) + ENDDO + !calculate tendencies from subsidence and detrainment valid at the middle of + !each model layer + dzi(kts) = 0.5*(DZ(kts)+DZ(kts+1)) + sub_thl(kts)=0.5*envi_w(kts)*envi_a(kts)*(thl(kts+1)-thl(kts))/dzi(kts) + sub_sqv(kts)=0.5*envi_w(kts)*envi_a(kts)*(qv(kts+1)-qv(kts))/dzi(kts) + DO k=KTS+1,KTE-1 + dzi(k) = 0.5*(DZ(k)+DZ(k+1)) + sub_thl(k)=0.5*(envi_w(k)+envi_w(k-1))*0.5*(envi_a(k)+envi_a(k-1)) * & + (thl(k+1)-thl(k))/dzi(k) + sub_sqv(k)=0.5*(envi_w(k)+envi_w(k-1))*0.5*(envi_a(k)+envi_a(k-1)) * & + (qv(k+1)-qv(k))/dzi(k) + ENDDO + + DO k=KTS,KTE-1 + det_thl(k)=Cdet*(envm_thl(k)-thl(k))*envi_a(k)*Psig_w + det_sqv(k)=Cdet*(envm_sqv(k)-qv(k))*envi_a(k)*Psig_w + det_sqc(k)=Cdet*(envm_sqc(k)-qc(k))*envi_a(k)*Psig_w + ENDDO + IF (momentum_opt > 1) THEN + sub_u(kts)=0.5*envi_w(kts)*envi_a(kts)*(u(kts+1)-u(kts))/dzi(kts) + sub_v(kts)=0.5*envi_w(kts)*envi_a(kts)*(v(kts+1)-v(kts))/dzi(kts) + DO k=KTS+1,KTE-1 + sub_u(k)=0.5*(envi_w(k)+envi_w(k-1))*0.5*(envi_a(k)+envi_a(k-1)) * & + (u(k+1)-u(k))/dzi(k) + sub_v(k)=0.5*(envi_w(k)+envi_w(k-1))*0.5*(envi_a(k)+envi_a(k-1)) * & + (v(k+1)-v(k))/dzi(k) + ENDDO + + DO k=KTS,KTE-1 + det_u(k) = Cdet*(envm_u(k)-u(k))*envi_a(k)*Psig_w + det_v(k) = Cdet*(envm_v(k)-v(k))*envi_a(k)*Psig_w + ENDDO + ENDIF + ENDIF !end subsidence/env detranment + !First, compute exner, plume theta, and dz centered at interface !Here, k=1 is the top of the first model layer. These values do not - !need to be defined at k=kte (unused level). + !need to be defined at k=kte (unused level). DO K=KTS,KTE-1 exneri(k) = (exner(k)*DZ(k+1)+exner(k+1)*DZ(k))/(DZ(k+1)+DZ(k)) edmf_th(k)= edmf_thl(k) + xlvcp/exneri(k)*edmf_qc(K) @@ -5973,13 +6378,34 @@ SUBROUTINE DMP_mf( & print*," CB: mf_cf=",mf_cf," cldfra_bl=",cldfra_bl1d(k)," edmf_a=",edmf_a(k) ENDIF + ! Update cloud fractions and specific humidities in grid cells + ! where the mass-flux scheme is active. Now, we also use the + ! stratus component of the SGS clouds as well. The stratus cloud + ! fractions (Ac_strat) are reduced slightly to give way to the + ! mass-flux SGS cloud fractions (Ac_mf). IF (cldfra_bl1d(k) < 0.5) THEN IF (mf_cf > 0.5*(edmf_a(k)+edmf_a(k-1))) THEN - cldfra_bl1d(k) = mf_cf - qc_bl1d(k) = QCp*0.5*(edmf_a(k)+edmf_a(k-1))/mf_cf + !cldfra_bl1d(k) = mf_cf + !qc_bl1d(k) = QCp*0.5*(edmf_a(k)+edmf_a(k-1))/mf_cf + Ac_mf = mf_cf + Ac_strat = cldfra_bl1d(k)*(1.0-mf_cf) + cldfra_bl1d(k) = Ac_mf + Ac_strat + !dillute Qc from updraft area to larger cloud area + qc_mf = QCp*0.5*(edmf_a(k)+edmf_a(k-1))/mf_cf + !The mixing ratios from the stratus component are not well + !estimated in shallow-cumulus regimes. Ensure stratus clouds + !have mixing ratio similar to cumulus + QCs = MIN(MAX(qc_bl1d(k), 0.5*qc_mf), 5E-4) + qc_bl1d(k) = (qc_mf*Ac_mf + QCs*Ac_strat)/cldfra_bl1d(k) ELSE - cldfra_bl1d(k)=0.5*(edmf_a(k)+edmf_a(k-1)) - qc_bl1d(k) = QCp + !cldfra_bl1d(k)=0.5*(edmf_a(k)+edmf_a(k-1)) + !qc_bl1d(k) = QCp + Ac_mf = 0.5*(edmf_a(k)+edmf_a(k-1)) + Ac_strat = cldfra_bl1d(k)*(1.0-Ac_mf) + cldfra_bl1d(k)=Ac_mf + Ac_strat + !Ensure stratus clouds have mixing ratio similar to cumulus + QCs = MIN(MAX(qc_bl1d(k), 0.5*qc_mf), 5E-4) + qc_bl1d(k) = (QCp*Ac_mf + QCs*Ac_strat)/cldfra_bl1d(k) ENDIF ENDIF @@ -6001,8 +6427,8 @@ SUBROUTINE DMP_mf( & Fng = MIN(23.9 + EXP(-1.6*(Q1+2.5)), 60.) ENDIF - vt(k) = qww - MIN(0.4,cldfra_bl1D(k))*beta*bb*Fng - 1. - vq(k) = alpha + MIN(0.4,cldfra_bl1D(k))*beta*a*Fng - tv0 + vt(k) = qww - MIN(0.40,Ac_mf)*beta*bb*Fng - 1. + vq(k) = alpha + MIN(0.40,Ac_mf)*beta*a*Fng - tv0 ENDIF ENDDO @@ -6014,8 +6440,8 @@ SUBROUTINE DMP_mf( & maxqc = maxval(edmf_qc(1:ktop)) IF ( maxqc < 1.E-8) maxmf = -1.0*maxmf ENDIF - -! + +! ! debugging ! IF (edmf_w(1) > 4.0) THEN @@ -6093,14 +6519,14 @@ subroutine condensation_edmf(QT,THL,P,zagl,THV,QC) EXN=(P/p1000mb)**rcp !QC=0. !better first guess QC is incoming from lower level, do not set to zero do i=1,NITER - T=EXN*THL + xlv/cp*QC + T=EXN*THL + xlvcp*QC QS=qsat_blend(T,P) QCOLD=QC QC=0.5*QC + 0.5*MAX((QT-QS),0.) if (abs(QC-QCOLD) 0.0) THEN ! PRINT*,"EDMF SAT, p:",p," iterations:",i @@ -6147,7 +6573,7 @@ SUBROUTINE SCALE_AWARE(dx,PBL1,Psig_bl,Psig_shcu) Psig_bl=1.0 Psig_shcu=1.0 - dxdh=MAX(dx,10.)/MIN(PBL1,3000.) + dxdh=MAX(2.5*dx,10.)/MIN(PBL1,3000.) ! Honnert et al. 2011, TKE in PBL *** original form used until 201605 !Psig_bl= ((dxdh**2) + 0.07*(dxdh**0.667))/((dxdh**2) + & ! (3./21.)*(dxdh**0.67) + (3./42.)) @@ -6158,7 +6584,7 @@ SUBROUTINE SCALE_AWARE(dx,PBL1,Psig_bl,Psig_shcu) Psig_bl= ((dxdh**2) + 0.106*(dxdh**0.667))/((dxdh**2) +0.066*(dxdh**0.667) + 0.071) !assume a 500 m cloud depth for shallow-cu clods - dxdh=MAX(dx,10.)/MIN(PBL1+500.,3500.) + dxdh=MAX(2.5*dx,10.)/MIN(PBL1+500.,3500.) ! Honnert et al. 2011, TKE in entrainment layer *** original form used until 201605 !Psig_shcu= ((dxdh**2) + (4./21.)*(dxdh**0.667))/((dxdh**2) + & ! (3./20.)*(dxdh**0.67) + (7./21.)) From 43f107ca315d9c021d2cebdd035e931638a36e53 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 17 Apr 2020 16:58:07 -0600 Subject: [PATCH 089/404] Add new CCPP scheme phys_tend to sum up all physics tendencies --- physics/module_MYNNPBL_wrapper.F90 | 2 +- physics/phys_tend.F90 | 99 ++++++++ physics/phys_tend.meta | 351 +++++++++++++++++++++++++++++ 3 files changed, 451 insertions(+), 1 deletion(-) create mode 100644 physics/phys_tend.F90 create mode 100644 physics/phys_tend.meta diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 2065c2844..942759bda 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -800,7 +800,7 @@ SUBROUTINE mynnedmf_wrapper_run( & print*,"ktop_shallow:",ktop_shallow(1)," maxmf:",maxmf(1) print*,"nup:",nupdraft(1) print* -s endif + endif END SUBROUTINE mynnedmf_wrapper_run diff --git a/physics/phys_tend.F90 b/physics/phys_tend.F90 new file mode 100644 index 000000000..333c22e2a --- /dev/null +++ b/physics/phys_tend.F90 @@ -0,0 +1,99 @@ +module phys_tend + + use machine, only: kind_phys + + implicit none + + private + + public phys_tend_init, phys_tend_run, phys_tend_finalize + +contains + + subroutine phys_tend_init() + end subroutine phys_tend_init + + subroutine phys_tend_finalize() + end subroutine phys_tend_finalize + +!> \section arg_table_phys_tend_run Argument Table +!! \htmlinclude phys_tend_run.html +!! + subroutine phys_tend_run(ldiag3d, qdiag3d, & + du3dt_pbl, du3dt_orogwd, du3dt_deepcnv, du3dt_congwd, & + du3dt_rdamp, du3dt_shalcnv, du3dt_phys, & + dv3dt_pbl, dv3dt_orogwd, dv3dt_deepcnv, dv3dt_congwd, & + dv3dt_rdamp, dv3dt_shalcnv, dv3dt_phys, & + dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_deepcnv, & + dt3dt_shalcnv, dt3dt_mp, dt3dt_orogwd, dt3dt_rdamp, & + dt3dt_congwd, dt3dt_phys, & + dq3dt_pbl, dq3dt_deepcnv, dq3dt_shalcnv, dq3dt_mp, & + dq3dt_o3pbl, dq3dt_o3prodloss, dq3dt_o3mix, & + dq3dt_o3tmp, dq3dt_o3column, dq3dt_phys, dq3dt_o3phys, & + errmsg, errflg) + + ! Interface variables + logical, intent(in) :: ldiag3d, qdiag3d + real(kind=kind_phys), intent(in ) :: du3dt_pbl(:,:) + real(kind=kind_phys), intent(in ) :: du3dt_orogwd(:,:) + real(kind=kind_phys), intent(in ) :: du3dt_deepcnv(:,:) + real(kind=kind_phys), intent(in ) :: du3dt_congwd(:,:) + real(kind=kind_phys), intent(in ) :: du3dt_rdamp(:,:) + real(kind=kind_phys), intent(in ) :: du3dt_shalcnv(:,:) + real(kind=kind_phys), intent( out) :: du3dt_phys(:,:) + real(kind=kind_phys), intent(in ) :: dv3dt_pbl(:,:) + real(kind=kind_phys), intent(in ) :: dv3dt_orogwd(:,:) + real(kind=kind_phys), intent(in ) :: dv3dt_deepcnv(:,:) + real(kind=kind_phys), intent(in ) :: dv3dt_congwd(:,:) + real(kind=kind_phys), intent(in ) :: dv3dt_rdamp(:,:) + real(kind=kind_phys), intent(in ) :: dv3dt_shalcnv(:,:) + real(kind=kind_phys), intent( out) :: dv3dt_phys(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_lw(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_sw(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_pbl(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_deepcnv(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_shalcnv(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_mp(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_orogwd(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_rdamp(:,:) + real(kind=kind_phys), intent(in ) :: dt3dt_congwd(:,:) + real(kind=kind_phys), intent( out) :: dt3dt_phys(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_pbl(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_deepcnv(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_shalcnv(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_mp(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_o3pbl(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_o3prodloss(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_o3mix(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_o3tmp(:,:) + real(kind=kind_phys), intent(in ) :: dq3dt_o3column(:,:) + real(kind=kind_phys), intent( out) :: dq3dt_phys(:,:) + real(kind=kind_phys), intent( out) :: dq3dt_o3phys(:,:) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not.ldiag3d .and. .not.qdiag3d) return + + du3dt_phys = du3dt_pbl + du3dt_orogwd + du3dt_deepcnv + & + du3dt_congwd + du3dt_rdamp + du3dt_shalcnv + + dv3dt_phys = dv3dt_pbl + dv3dt_orogwd + dv3dt_deepcnv + & + dv3dt_congwd + dv3dt_rdamp + dv3dt_shalcnv + + dt3dt_phys = dt3dt_lw + dt3dt_sw + dt3dt_pbl + & + dt3dt_deepcnv + dt3dt_shalcnv + dt3dt_mp + & + dt3dt_orogwd + dt3dt_rdamp + dt3dt_congwd + + dq3dt_phys = dq3dt_pbl + dq3dt_deepcnv + & + dq3dt_shalcnv + dq3dt_mp + + dq3dt_o3phys = dq3dt_o3pbl + dq3dt_o3prodloss & + + dq3dt_o3mix + dq3dt_o3tmp + dq3dt_o3column + + end subroutine phys_tend_run + +end module phys_tend diff --git a/physics/phys_tend.meta b/physics/phys_tend.meta new file mode 100644 index 000000000..48c189c07 --- /dev/null +++ b/physics/phys_tend.meta @@ -0,0 +1,351 @@ +[ccpp-arg-table] + name = phys_tend_run + type = scheme +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[du3dt_pbl] + standard_name = cumulative_change_in_x_wind_due_to_PBL + long_name = cumulative change in x wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[du3dt_orogwd] + standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = cumulative change in x wind due to orographic gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[du3dt_deepcnv] + standard_name = cumulative_change_in_x_wind_due_to_deep_convection + long_name = cumulative change in x wind due to deep convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[du3dt_congwd] + standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag + long_name = cumulative change in x wind due to convective gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[du3dt_rdamp] + standard_name = cumulative_change_in_x_wind_due_to_rayleigh_damping + long_name = cumulative change in x wind due to Rayleigh damping + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[du3dt_shalcnv] + standard_name = cumulative_change_in_x_wind_due_to_shallow_convection + long_name = cumulative change in x wind due to shallow convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[du3dt_phys] + standard_name = cumulative_change_in_x_wind_due_to_physics + long_name = cumulative change in x wind due to physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dv3dt_pbl] + standard_name = cumulative_change_in_y_wind_due_to_PBL + long_name = cumulative change in y wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dv3dt_orogwd] + standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag + long_name = cumulative change in y wind due to orographic gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dv3dt_deepcnv] + standard_name = cumulative_change_in_y_wind_due_to_deep_convection + long_name = cumulative change in y wind due to deep convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dv3dt_congwd] + standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag + long_name = cumulative change in y wind due to convective gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dv3dt_rdamp] + standard_name = cumulative_change_in_y_wind_due_to_rayleigh_damping + long_name = cumulative change in y wind due to Rayleigh damping + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dv3dt_shalcnv] + standard_name = cumulative_change_in_y_wind_due_to_shallow_convection + long_name = cumulative change in y wind due to shallow convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dv3dt_phys] + standard_name = cumulative_change_in_y_wind_due_to_physics + long_name = cumulative change in y wind due to physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dt3dt_lw] + standard_name = cumulative_change_in_temperature_due_to_longwave_radiation + long_name = cumulative change in temperature due to longwave radiation + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_sw] + standard_name = cumulative_change_in_temperature_due_to_shortwave_radiation + long_name = cumulative change in temperature due to shortwave radiation + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_pbl] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_deepcnv] + standard_name = cumulative_change_in_temperature_due_to_deep_convection + long_name = cumulative change in temperature due to deep convection + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_shalcnv] + standard_name = cumulative_change_in_temperature_due_to_shallow_convection + long_name = cumulative change in temperature due to shallow convection + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_mp] + standard_name = cumulative_change_in_temperature_due_to_microphysics + long_name = cumulative change in temperature due to microphysics + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_orogwd] + standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag + long_name = cumulative change in temperature due to orographic gravity wave drag + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_rdamp] + standard_name = cumulative_change_in_temperature_due_to_rayleigh_damping + long_name = cumulative change in temperature due to Rayleigh damping + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_congwd] + standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag + long_name = cumulative change in temperature due to convective gravity wave drag + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dt3dt_phys] + standard_name = cumulative_change_in_temperature_due_to_physics + long_name = cumulative change in temperature due to physics + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dq3dt_pbl] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_deepcnv] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection + long_name = cumulative change in water vapor specific humidity due to deep convection + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_shalcnv] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection + long_name = cumulative change in water vapor specific humidity due to shallow convection + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_mp] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_microphysics + long_name = cumulative change in water vapor specific humidity due to microphysics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_o3pbl] + standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL + long_name = cumulative change in ozone mixing ratio due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_o3prodloss] + standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate + long_name = cumulative change in ozone concentration due to production and loss rate + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_o3mix] + standard_name = cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio + long_name = cumulative change in ozone concentration due to ozone mixing ratio + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_o3tmp] + standard_name = cumulative_change_in_ozone_concentration_due_to_temperature + long_name = cumulative change in ozone concentration due to temperature + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_o3column] + standard_name = cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column + long_name = cumulative change in ozone concentration due to overhead ozone column + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dq3dt_phys] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_physics + long_name = cumulative change in water vapor specific humidity due to physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dq3dt_o3phys] + standard_name = cumulative_change_in_ozone_concentration_due_to_physics + long_name = cumulative change in ozone concentration due to physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F From 0ef2dbac3fcbffc0d5d05d1b0a9b3d0439054f91 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Mon, 20 Apr 2020 18:26:22 +0000 Subject: [PATCH 090/404] tweak update: (1) slightly reduce high RH bias at 700 mb, (2) allow subsidence to impact momentum whenever bl_mynn_edmf_mom > 0 --- physics/module_bl_mynn.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index 4c1468797..2922ee807 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -6016,7 +6016,7 @@ SUBROUTINE DMP_mf( & !Reminder: w is limited to be non-negative (above) aratio = MIN(UPA(K-1,I)/(1.-UPA(K-1,I)), 0.5) !limit should never get hit detturb = 0.00008 - oow = -0.064/MAX(1.0,(0.5*(Wn+UPW(K-1,I)))) !coef for dynamical detrainment rate + oow = -0.060/MAX(1.0,(0.5*(Wn+UPW(K-1,I)))) !coef for dynamical detrainment rate detrate = MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0004) ! dynamical detrainment rate (m^-1) detrateUV= MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0001) ! dynamical detrainment rate (m^-1) envm_thl(k)=envm_thl(k) + (0.5*(thl_ent + UPTHL(K-1,I)) - thl(k))*detrate*aratio*dzp @@ -6276,7 +6276,7 @@ SUBROUTINE DMP_mf( & det_sqv(k)=Cdet*(envm_sqv(k)-qv(k))*envi_a(k)*Psig_w det_sqc(k)=Cdet*(envm_sqc(k)-qc(k))*envi_a(k)*Psig_w ENDDO - IF (momentum_opt > 1) THEN + IF (momentum_opt > 0) THEN sub_u(kts)=0.5*envi_w(kts)*envi_a(kts)*(u(kts+1)-u(kts))/dzi(kts) sub_v(kts)=0.5*envi_w(kts)*envi_a(kts)*(v(kts+1)-v(kts))/dzi(kts) DO k=KTS+1,KTE-1 From f1c24fbd54d66fa78bb776d3770cd97b5dd2ba89 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 20 Apr 2020 23:34:01 +0000 Subject: [PATCH 091/404] after merging with NCAR/ccpp-physics/master and some bug fixes in some physics routines --- physics/GFS_MP_generic.F90 | 121 ++++--- physics/GFS_PBL_generic.F90 | 9 +- physics/GFS_suite_interstitial.F90 | 6 +- physics/GFS_surface_composites.F90 | 81 ++--- physics/GFS_surface_composites.meta | 9 + physics/GFS_surface_generic.F90 | 14 +- physics/GFS_surface_loop_control.F90 | 4 +- physics/gcm_shoc.F90 | 64 ++-- physics/m_micro.F90 | 518 +++++++++++++-------------- physics/micro_mg_utils.F90 | 60 ++-- physics/moninshoc.f | 104 +++--- physics/rascnv.F90 | 392 ++++++++++---------- physics/sfc_cice.f | 8 +- physics/sfc_diff.f | 188 +++++----- physics/sfc_drv.f | 86 ++--- physics/sfc_ocean.F | 42 +-- physics/sfc_ocean.meta | 18 - physics/sfc_sice.f | 23 +- 18 files changed, 874 insertions(+), 873 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index ab68e206a..bcf11db66 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -97,8 +97,8 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt logical, intent(in) :: cal_pre, lssav, ldiag3d, cplflx, cplchm real(kind=kind_phys), intent(in) :: dtf, frain, con_g - real(kind=kind_phys), dimension(im), intent(in) :: rainc, rain1, xlat, xlon, tsfc - real(kind=kind_phys), dimension(im), intent(inout) :: ice, snow, graupel + real(kind=kind_phys), dimension(im), intent(in) :: rain1, xlat, xlon, tsfc + real(kind=kind_phys), dimension(im), intent(inout) :: ice, snow, graupel, rainc real(kind=kind_phys), dimension(im), intent(in) :: rain0, ice0, snow0, graupel0 real(kind=kind_phys), dimension(ix,nrcm), intent(in) :: rann real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, prsl, save_t, save_qv, del @@ -149,7 +149,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt integer :: i, k, ic real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0 - real(kind=kind_phys) :: crain, csnow, onebg, tem, total_precip + real(kind=kind_phys) :: crain, csnow, onebg, tem, total_precip, tem1, tem2 real(kind=kind_phys), dimension(im) :: domr, domzr, domip, doms, t850, work1 ! Initialize CCPP error handling variables @@ -157,7 +157,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt errflg = 0 onebg = one/con_g - + do i = 1, im rain(i) = rainc(i) + frain * rain1(i) ! time-step convective plus explicit enddo @@ -171,7 +171,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt ! physics timestep, while Diag%{rain,rainc} and all totprecip etc ! are on the dynamics timestep. Confusing, but works if frain=1. *DH if (imp_physics == imp_physics_gfdl) then - tprcp = max(0., rain) ! clu: rain -> tprcp + tprcp = max(zero, rain) ! clu: rain -> tprcp !graupel = frain*graupel0 !ice = frain*ice0 !snow = frain*snow0 @@ -180,13 +180,13 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt snow = snow0 ! Do it right from the beginning for Thompson else if (imp_physics == imp_physics_thompson) then - tprcp = max (0.,rainc + frain * rain1) ! time-step convective and explicit precip + tprcp = max (zero, rainc + frain * rain1) ! time-step convective and explicit precip graupel = frain*graupel0 ! time-step graupel ice = frain*ice0 ! time-step ice snow = frain*snow0 ! time-step snow else if (imp_physics == imp_physics_fer_hires) then - tprcp = max (0.,rain) ! time-step convective and explicit precip + tprcp = max (zero, rain) ! time-step convective and explicit precip ice = frain*rain1*sr ! time-step ice end if @@ -200,7 +200,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt !Note (GJF): Precipitation LWE thicknesses are multiplied by the frain factor, and are thus on the dynamics time step, but the conversion as written ! (with dtp in the denominator) assumes the rate is calculated on the physics time step. This only works as expected when dtf=dtp (i.e. when frain=1). if (lsm == lsm_noahmp) then - tem = 1.0 / (dtp*con_p001) !GJF: This conversion was taken from GFS_physics_driver.F90, but should denominator also have the frain factor? + tem = one / (dtp*con_p001) !GJF: This conversion was taken from GFS_physics_driver.F90, but should denominator also have the frain factor? draincprv(:) = tem * raincprv(:) drainncprv(:) = tem * rainncprv(:) dsnowprv(:) = tem * snowprv(:) @@ -221,11 +221,11 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt if (imp_physics /= imp_physics_gfdl .and. imp_physics /= imp_physics_thompson) then do i=1,im - tprcp(i) = max(0.0, rain(i) ) - if(doms(i) > 0.0 .or. domip(i) > 0.0) then - srflag(i) = 1. + tprcp(i) = max(zero, rain(i) ) + if(doms(i) > zero .or. domip(i) > zero) then + srflag(i) = one else - srflag(i) = 0. + srflag(i) = zero end if enddo endif @@ -240,34 +240,6 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt endif - if (lssav) then -! if (Model%me == 0) print *,'in phys drive, kdt=',Model%kdt, & -! 'totprcpb=', Diag%totprcpb(1),'totprcp=',Diag%totprcp(1), & -! 'rain=',Diag%rain(1) - do i=1,im - cnvprcp (i) = cnvprcp (i) + rainc(i) - totprcp (i) = totprcp (i) + rain(i) - totice (i) = totice (i) + ice(i) - totsnw (i) = totsnw (i) + snow(i) - totgrp (i) = totgrp (i) + graupel(i) - - cnvprcpb(i) = cnvprcpb(i) + rainc(i) - totprcpb(i) = totprcpb(i) + rain(i) - toticeb (i) = toticeb (i) + ice(i) - totsnwb (i) = totsnwb (i) + snow(i) - totgrpb (i) = totgrpb (i) + graupel(i) - enddo - - if (ldiag3d) then - do k=1,levs - do i=1,im - dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain -! dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain - enddo - enddo - endif - endif - t850(1:im) = gt0(1:im,1) do k = 1, levs-1 @@ -294,12 +266,12 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt if (lsm /= lsm_ruc) then do i = 1, im !tprcp(i) = max(0.0, rain(i) )! clu: rain -> tprcp ! DH now lines 245-250 - srflag(i) = 0. ! clu: default srflag as 'rain' (i.e. 0) - if (tsfc(i) >= 273.15) then + srflag(i) = zero ! clu: default srflag as 'rain' (i.e. 0) + if (tsfc(i) >= 273.15d0) then crain = rainc(i) - csnow = 0.0 + csnow = zero else - crain = 0.0 + crain = zero csnow = rainc(i) endif ! if (snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow > rain0(i,1)+crain) then @@ -319,30 +291,65 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt endif ! lsm==lsm_ruc elseif( .not. cal_pre) then if (imp_physics == imp_physics_mg) then ! MG microphysics - tem = con_day / (dtp * con_p001) ! mm / day do i=1,im - tprcp(i) = max(0.0, rain(i) ) ! clu: rain -> tprcp - if (rain(i)*tem > rainmin) then - srflag(i) = max(zero, min(one, (rain(i)-rainc(i))*sr(i)/rain(i))) + if (rain(i) > rainmin) then + tem1 = max(zero, (rain(i)-rainc(i))) * sr(i) + tem2 = one / rain(i) + if (t850(i) > 273.16d0) then + srflag(i) = max(zero, min(one, tem1*tem2)) + else + srflag(i) = max(zero, min(one, (tem1+rainc(i))*tem2)) + endif else - srflag(i) = 0.0 + srflag(i) = zero + rain(i) = zero + rainc(i) = zero endif + tprcp(i) = max(zero, rain(i) ) ! clu: rain -> tprcp enddo else do i = 1, im - tprcp(i) = max(0.0, rain(i) ) ! clu: rain -> tprcp - srflag(i) = 0.0 ! clu: default srflag as 'rain' (i.e. 0) - if (t850(i) <= 273.16) then - srflag(i) = 1.0 ! clu: set srflag to 'snow' (i.e. 1) + tprcp(i) = max(zero, rain(i) ) ! clu: rain -> tprcp + srflag(i) = zero ! clu: default srflag as 'rain' (i.e. 0) + if (t850(i) <= 273.16d0) then + srflag(i) = one ! clu: set srflag to 'snow' (i.e. 1) endif enddo endif endif + if (lssav) then +! if (Model%me == 0) print *,'in phys drive, kdt=',kdt, & +! 'totprcpb=', totprcpb(1),'totprcp=',totprcp(1), & +! 'rain=',rain(1) + do i=1,im + cnvprcp (i) = cnvprcp (i) + rainc(i) + totprcp (i) = totprcp (i) + rain(i) + totice (i) = totice (i) + ice(i) + totsnw (i) = totsnw (i) + snow(i) + totgrp (i) = totgrp (i) + graupel(i) + + cnvprcpb(i) = cnvprcpb(i) + rainc(i) + totprcpb(i) = totprcpb(i) + rain(i) + toticeb (i) = toticeb (i) + ice(i) + totsnwb (i) = totsnwb (i) + snow(i) + totgrpb (i) = totgrpb (i) + graupel(i) + enddo + + if (ldiag3d) then + do k=1,levs + do i=1,im + dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain +! dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain + enddo + enddo + endif + endif + if (cplflx .or. cplchm) then do i = 1, im - drain_cpl(i) = rain(i) * (one-srflag(i)) - dsnow_cpl(i) = rain(i) * srflag(i) + dsnow_cpl(i)= max(zero, rain(i) * srflag(i)) + drain_cpl(i)= max(zero, rain(i) - dsnow_cpl(i)) rain_cpl(i) = rain_cpl(i) + drain_cpl(i) snow_cpl(i) = snow_cpl(i) + dsnow_cpl(i) enddo @@ -354,10 +361,10 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt enddo endif - pwat(:) = 0.0 + pwat(:) = zero do k = 1, levs do i=1, im - work1(i) = 0.0 + work1(i) = zero enddo if (ncld > 0) then do ic = ntcw, ntcw+nncl-1 diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index ff59aa465..e8fed5ed8 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -335,8 +335,9 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), parameter :: one = 1.0d0 real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue, same as in GFS_typedefs.F90 real(kind=kind_phys), parameter :: epsln = 1.0d-10 ! same as in GFS_physics_driver.F90 + real(kind=kind_phys), parameter :: qmin = 1.0d-8 integer :: i, k, kk, k1, n - real(kind=kind_phys) :: tem, tem1, rho + real(kind=kind_phys) :: tem, rho ! Initialize CCPP error handling variables errmsg = '' @@ -488,8 +489,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, if (cplchm) then do i = 1, im - tem1 = max(q1(i), 1.e-8) - tem = prsl(i,1) / (rd*t1(i)*(one+fvirt*tem1)) + tem = prsl(i,1) / (rd*t1(i)*(one+fvirt*max(q1(i), qmin))) ushfsfci(i) = -cp * tem * hflx(i) ! upward sensible heat flux enddo ! dkt_cpl has dimensions (1:im,1:levs), but dkt has (1:im,1:levs-1) @@ -508,8 +508,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dtsfci_cpl(i) = dtsfc_cice(i) dqsfci_cpl(i) = dqsfc_cice(i) elseif (icy(i) .or. dry(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point - tem1 = max(q1(i), 1.e-8) - rho = prsl(i,1) / (rd*t1(i)*(one+fvirt*tem1)) + rho = prsl(i,1) / (rd*t1(i)*(one+fvirt*max(q1(i), qmin))) if (wind(i) > zero) then tem = - rho * stress_ocn(i) / wind(i) dusfci_cpl(i) = tem * ugrs1(i) ! U-momentum flux diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 935dd9430..a8d5f5b8b 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -201,7 +201,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl logical, dimension(im) :: invrsn real(kind=kind_phys), dimension(im) :: tx1, tx2 - real(kind=kind_phys), parameter :: qmin = 1.0d-10 + real(kind=kind_phys), parameter :: qmin = 1.0d-10, epsln=1.0d-10 ! Initialize CCPP error handling variables errmsg = '' @@ -246,13 +246,13 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl elseif (icy(i)) then ! ice (and water) tem = one - cice(i) if (flag_cice(i)) then - if (wet(i) .and. adjsfculw_ocn(i) /= huge) then + if (wet(i) .and. abs(adjsfculw_ocn(i)-huge) > epsln) then adjsfculw(i) = ulwsfc_cice(i)*cice(i) + adjsfculw_ocn(i)*tem else adjsfculw(i) = ulwsfc_cice(i) endif else - if (wet(i) .and. adjsfculw_ocn(i) /= huge) then + if (wet(i) .and. abs(adjsfculw_ocn(i)-huge) > epsln) then adjsfculw(i) = adjsfculw_ice(i)*cice(i) + adjsfculw_ocn(i)*tem else adjsfculw(i) = adjsfculw_ice(i) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 7cd552e69..c98650b99 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -39,7 +39,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl ! Interface variables integer, intent(in ) :: im logical, intent(in ) :: frac_grid, cplflx, cplwav2atm - logical, dimension(im), intent(in ) :: flag_cice + logical, dimension(im), intent(inout) :: flag_cice logical, dimension(im), intent(inout) :: dry, icy, lake, ocean, wet real(kind=kind_phys), intent(in ) :: cimin real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, oceanfrac @@ -53,7 +53,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_ocn, weasd_lnd, weasd_ice, ep1d_ice, gflx_ice real(kind=kind_phys), dimension(im), intent( out) :: tice real(kind=kind_phys), intent(in ) :: tgice - integer, dimension(im), intent(in ) :: islmsk + integer, dimension(im), intent(inout) :: islmsk real(kind=kind_phys), dimension(im), intent(in ) :: semis_rad real(kind=kind_phys), dimension(im), intent(inout) :: semis_ocn, semis_lnd, semis_ice real(kind=kind_phys), intent(in ) :: min_lakeice, min_seaice @@ -78,13 +78,16 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl if (cice(i) >= min_seaice) then icy(i) = .true. else - cice(i) = zero + cice(i) = zero + flag_cice(i) = .false. + islmsk = 0 endif else if (cice(i) >= min_lakeice) then icy(i) = .true. else cice(i) = zero + islmsk = 0 endif endif if (cice(i) < one ) then @@ -99,29 +102,35 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl else do i = 1, IM - frland(i) = zero - if (islmsk(i) == 0) then - ! tsfco(i) = Sfcprop%tsfc(i) - wet(i) = .true. - cice(i) = zero - elseif (islmsk(i) == 1) then - ! Sfcprop%tsfcl(i) = Sfcprop%tsfc(i) + if (islmsk(i) == 1) then +! tsfcl(i) = tsfc(i) dry(i) = .true. frland(i) = one cice(i) = zero - else - icy(i) = .true. + else + frland(i) = zero + if (flag_cice(i)) then + if (cice(i) > min_seaice) then + icy(i) = .true. + else + cice(i) = zero + flag_cice(i) = .false. + islmsk(i) = 0 + endif + else + if (cice(i) > min_lakeice) then + icy(i) = .true. + else + cice(i) = zero + islmsk(i) = 0 + endif + endif if (cice(i) < one) then - wet(i) = .true. - ! tsfco(i) = tgice - if (.not. cplflx) tsfco(i) = max(tisfc(i), tgice) - ! if (.not. cplflx .or. lakefrac(i) > zero) tsfco(i) = max(tsfco(i), tisfc(i), tgice) - ! tsfco(i) = max((tsfc(i) - cice(i)*tisfc(i)) & - ! / (one - cice(i)), tgice) + wet(i)=.true. ! some open ocean/lake water exists + if (.not. cplflx) tsfco(i) = max(tsfco(i), tisfc(i), tgice) endif endif enddo - endif if (.not. cplflx .or. .not. frac_grid) then @@ -293,7 +302,7 @@ subroutine GFS_surface_composites_post_run ( cmm, cmm_ocn, cmm_lnd, cmm_ice, chh, chh_ocn, chh_lnd, chh_ice, gflx, gflx_ocn, gflx_lnd, gflx_ice, ep1d, ep1d_ocn, & ep1d_lnd, ep1d_ice, weasd, weasd_ocn, weasd_lnd, weasd_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, & tprcp_lnd, tprcp_ice, evap, evap_ocn, evap_lnd, evap_ice, hflx, hflx_ocn, hflx_lnd, hflx_ice, qss, qss_ocn, qss_lnd, & - qss_ice, tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, errmsg, errflg) + qss_ice, tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, min_seaice, errmsg, errflg) implicit none @@ -314,6 +323,7 @@ subroutine GFS_surface_composites_post_run ( real(kind=kind_phys), dimension(im), intent(in ) :: tice ! interstitial sea ice temperature real(kind=kind_phys), dimension(im), intent(inout) :: hice, cice + real(kind=kind_phys), intent(in ) :: min_seaice character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -452,23 +462,30 @@ subroutine GFS_surface_composites_post_run ( hflx(i) = hflx_ocn(i) qss(i) = qss_ocn(i) tsfc(i) = tsfc_ocn(i) - !hice(i) = zero - !cice(i) = zero - !tisfc(i) = tsfc(i) + hice(i) = zero + cice(i) = zero + tisfc(i) = tsfc(i) else ! islmsk(i) == 2 zorl(i) = zorl_ice(i) cd(i) = cd_ice(i) cdq(i) = cdq_ice(i) rb(i) = rb_ice(i) - stress(i) = cice(i)*stress_ice(i) + (one-cice(i))*stress_ocn(i) ffmm(i) = ffmm_ice(i) ffhh(i) = ffhh_ice(i) uustar(i) = uustar_ice(i) fm10(i) = fm10_ice(i) fh2(i) = fh2_ice(i) + stress(i) = stress_ice(i) !tsurf(i) = tsurf_ice(i) if (.not. flag_cice(i)) then tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) + elseif (wet(i) .and. cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice + txi = cice(i) + txo = one - txi + evap(i) = txi * evap_ice(i) + txo * evap_ocn(i) + hflx(i) = txi * hflx_ice(i) + txo * hflx_ocn(i) + tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_ocn(i) + stress(i) = txi * stress_ice(i) + txo * stress_ocn(i) endif cmm(i) = cmm_ice(i) chh(i) = chh_ice(i) @@ -487,22 +504,6 @@ subroutine GFS_surface_composites_post_run ( zorll(i) = zorl_lnd(i) zorlo(i) = zorl_ocn(i) - if (flag_cice(i) .and. wet(i)) then ! this was already done for lake ice in sfc_sice - txi = cice(i) - txo = one - txi - evap(i) = txi * evap_ice(i) + txo * evap_ocn(i) - hflx(i) = txi * hflx_ice(i) + txo * hflx_ocn(i) - tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_ocn(i) - else - if (islmsk(i) == 2) then - tisfc(i) = tice(i) - else ! over open ocean or land (no ice fraction) - hice(i) = zero - cice(i) = zero - tisfc(i) = tsfc(i) - endif - endif - enddo endif ! if (frac_grid) diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 832d9227e..82e5a4289 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -1650,6 +1650,15 @@ kind = kind_phys intent = inout optional = F +[min_seaice] + standard_name = sea_ice_minimum + long_name = minimum sea ice value + units = ??? + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index ac366ae54..9cdf14d85 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -246,7 +246,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: albdf = 0.06d0 + real(kind=kind_phys), parameter :: albdf = 0.06d0 integer :: i real(kind=kind_phys) :: xcosz_loc, ocalnirdf_cpl, ocalnirbm_cpl, ocalvisdf_cpl, ocalvisbm_cpl @@ -304,12 +304,12 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt ! if (Sfcprop%landfrac(i) < one) then ! Not 100% land if (wet(i)) then ! some open water ! --- compute open water albedo - xcosz_loc = max( 0.0, min( 1.0, xcosz(i) )) - ocalnirdf_cpl = 0.06 - ocalnirbm_cpl = max(albdf, 0.026/(xcosz_loc**1.7+0.065) & - & + 0.15 * (xcosz_loc-0.1) * (xcosz_loc-0.5) & - & * (xcosz_loc-1.0)) - ocalvisdf_cpl = 0.06 + xcosz_loc = max( zero, min( one, xcosz(i) )) + ocalnirdf_cpl = 0.06d0 + ocalnirbm_cpl = max(albdf, 0.026d0/(xcosz_loc**1.7d0+0.065d0) & + & + 0.15d0 * (xcosz_loc-0.1d0) * (xcosz_loc-0.5d0) & + & * (xcosz_loc-one)) + ocalvisdf_cpl = 0.06d0 ocalvisbm_cpl = ocalnirbm_cpl nnirbmi_cpl(i) = adjnirbmd(i) * (one-ocalnirbm_cpl) diff --git a/physics/GFS_surface_loop_control.F90 b/physics/GFS_surface_loop_control.F90 index c701c523e..c7f727d27 100644 --- a/physics/GFS_surface_loop_control.F90 +++ b/physics/GFS_surface_loop_control.F90 @@ -47,7 +47,7 @@ subroutine GFS_surface_loop_control_part1_run (im, iter, wind, flag_guess, errms errflg = 0 do i=1,im - if (iter == 1 .and. wind(i) < 2.0) then + if (iter == 1 .and. wind(i) < 2.0d0) then flag_guess(i) = .true. endif enddo @@ -110,7 +110,7 @@ subroutine GFS_surface_loop_control_part2_run (im, iter, wind, & flag_iter(i) = .false. flag_guess(i) = .false. - if (iter == 1 .and. wind(i) < 2.0) then + if (iter == 1 .and. wind(i) < 2.0d0) then !if (dry(i) .or. (wet(i) .and. .not.icy(i) .and. nstf_name1 > 0)) then if (dry(i) .or. (wet(i) .and. nstf_name1 > 0)) then flag_iter(i) = .true. diff --git a/physics/gcm_shoc.F90 b/physics/gcm_shoc.F90 index b32843bc1..9baa61516 100644 --- a/physics/gcm_shoc.F90 +++ b/physics/gcm_shoc.F90 @@ -46,7 +46,7 @@ subroutine shoc_run (ix, nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: epsq = 1.d-20 + real(kind=kind_phys), parameter :: epsq = 1.0d-20, zero=0.0d0, one=1.0d0 integer :: i, k @@ -69,15 +69,15 @@ subroutine shoc_run (ix, nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, do i=1,nx qc(i,k) = gq0(i,k,ntcw) if (abs(qc(i,k)) < epsq) then - qc(i,k) = 0.0 + qc(i,k) = zero endif - tem = qc(i,k) * max(0.0, MIN(1.0, (tcr-gt0(i,k))*tcrf)) + tem = qc(i,k) * max(zero, MIN(one, (tcr-gt0(i,k))*tcrf)) qi(i,k) = tem ! ice qc(i,k) = qc(i,k) - tem ! water - qrn(i,k) = 0.0 - qsnw(i,k) = 0.0 - ncpl(i,k) = 0 - ncpi(i,k) = 0 + qrn(i,k) = zero + qsnw(i,k) = zero + ncpl(i,k) = zero + ncpi(i,k) = zero enddo enddo else @@ -617,7 +617,7 @@ subroutine tke_shoc() call eddy_length() ! Find turbulent mixing length call check_eddy() ! Make sure it's reasonable - tkef2 = 1.0 - tkef1 + tkef2 = one - tkef1 do k=1,nzm ku = k+1 kd = k @@ -661,7 +661,7 @@ subroutine tke_shoc() !Obtain Brunt-Vaisalla frequency from diagnosed SGS buoyancy flux !Presumably it is more precise than BV freq. calculated in eddy_length()? - buoy_sgs = - (a_prod_bu+a_prod_bu) / (tkh(i,ku)+tkh(i,kd) + 0.0001) ! tkh is eddy thermal diffussivity + buoy_sgs = - (a_prod_bu+a_prod_bu) / (tkh(i,ku)+tkh(i,kd) + 0.0001d0) ! tkh is eddy thermal diffussivity !Compute $c_k$ (variable Cee) for the TKE dissipation term following Deardorff (1980) @@ -849,7 +849,7 @@ subroutine eddy_length() ! Find the in-cloud Brunt-Vaisalla frequency - omn = qcl(i,k) / (wrk+1.e-20) ! Ratio of liquid water to total water + omn = qcl(i,k) / (wrk+1.0d-20) ! Ratio of liquid water to total water ! Latent heat of phase transformation based on relative water phase content ! fac_cond = lcond/cp, fac_fus = lfus/cp @@ -993,7 +993,7 @@ subroutine eddy_length() enddo conv_var = conv_var ** oneb3 - if (conv_var > 0) then ! If convective vertical velocity scale > 0 + if (conv_var > zero) then ! If convective vertical velocity scale > 0 depth = (zl(i,ku)-zl(i,kl)) + adzl(i,kl) @@ -1053,7 +1053,7 @@ subroutine conv_scale() !********************************************************************** conv_vel2(i,k) = conv_vel2(i,k-1) & - + 2.5*adzi(i,k)*bet(i,k)*wthv_sec(i,k) + + 2.5d0*adzi(i,k)*bet(i,k)*wthv_sec(i,k) enddo enddo @@ -1084,7 +1084,7 @@ subroutine check_eddy() do i=1,nx - wrk = 0.1*adzl(i,k) + wrk = 0.1d0*adzl(i,k) ! Minimum 0.1 of local dz smixt(i,k) = max(wrk, min(max_eddy_length_scale,smixt(i,k))) @@ -1092,7 +1092,7 @@ subroutine check_eddy() ! be not larger that that. ! if (sqrt(dx*dy) .le. 1000.) smixt(i,k)=min(sqrt(dx*dy),smixt(i,k)) - if (qcl(i,kb) == 0 .and. qcl(i,k) > 0 .and. brunt(i,k) > 1.0d-4) then + if (qcl(i,kb) == zero .and. qcl(i,k) > zero .and. brunt(i,k) > 1.0d-4) then !If just above the cloud top and atmosphere is stable, set to 0.1 of local dz smixt(i,k) = wrk endif @@ -1211,7 +1211,7 @@ subroutine canuto() omega0 = a4 / (one-a5*buoy_sgs2) omega1 = omega0 / (c+c) - omega2 = omega1*f3+(5./4.)*omega0*f4 + omega2 = omega1*f3+(5.0d0/4.0d0)*omega0*f4 ! Compute the X0, Y0, X1, Y1 terms, see Eq. 5 a-b in C01 (B.5 in Pete's dissertation) @@ -1234,7 +1234,7 @@ subroutine canuto() !aab ! Implemetation of the C01 approach in this subroutine is nearly complete @@ -1362,21 +1362,21 @@ subroutine assumed_pdf() ELSE !aab Skew_w = w3var / (sqrtw2*sqrtw2*sqrtw2) ! Moorthi ! Proportionality coefficients between widths of each vertical velocity ! gaussian and the sqrt of the second moment of w - w2_1 = 0.4 - w2_2 = 0.4 + w2_1 = 0.4d0 + w2_2 = 0.4d0 ! Compute realtive weight of the first PDF "plume" ! See Eq A4 in Pete's dissertaion - Ensure 0.01 < a < 0.99 wrk = one - w2_1 - aterm = max(atmin,min(half*(one-Skew_w*sqrt(one/(4.*wrk*wrk*wrk+Skew_w*Skew_w))),atmax)) + aterm = max(atmin,min(half*(one-Skew_w*sqrt(one/(4.0d0*wrk*wrk*wrk+Skew_w*Skew_w))),atmax)) onema = one - aterm sqrtw2t = sqrt(wrk) @@ -1450,12 +1450,12 @@ subroutine assumed_pdf() ! Skew_qw = skew_facw*Skew_w - IF (tsign > 0.4) THEN + IF (tsign > 0.4d0) THEN Skew_qw = skew_facw*Skew_w - ELSEIF (tsign <= 0.2) THEN + ELSEIF (tsign <= 0.2d0) THEN Skew_qw = zero ELSE - Skew_qw = (skew_facw/0.2) * Skew_w * (tsign-0.2) + Skew_qw = (skew_facw/0.2d0) * Skew_w * (tsign-0.2d0) ENDIF wrk1 = qw1_1 * qw1_1 @@ -1489,7 +1489,7 @@ subroutine assumed_pdf() testvar = aterm*sqrtqw2_1*sqrtthl2_1 + onema*sqrtqw2_2*sqrtthl2_2 - IF (testvar == 0) THEN + IF (testvar == zero) THEN r_qwthl_1 = zero ELSE r_qwthl_1 = max(-one,min(one,(qwthlsec-aterm*(qw1_1-qw_first)*(thl1_1-thl_first) & @@ -1648,8 +1648,7 @@ subroutine assumed_pdf() diag_qn = min(max(zero, aterm*qn1 + onema*qn2), total_water(i,k)) diag_ql = min(max(zero, aterm*ql1 + onema*ql2), diag_qn) - diag_qi = diag_qn - diag_ql - + diag_qi = max(zero, diag_qn - diag_ql) ! Update temperature variable based on diagnosed cloud properties om1 = max(zero, min(one, (tabs(i,k)-tbgmin)*a_bg)) @@ -1658,16 +1657,9 @@ subroutine assumed_pdf() + fac_sub *(diag_qi+qpi(i,k)) & + tkesbdiss(i,k) * (dtn/cp) ! tke dissipative heating -! Update moisture fields - ! Update ncpl and ncpi Anning Cheng 03/11/2016 ! ncpl(i,k) = diag_ql/max(qc(i,k),1.e-10)*ncpl(i,k) - qc(i,k) = diag_ql - qi(i,k) = diag_qi - qwv(i,k) = total_water(i,k) - diag_qn - cld_sgs(i,k) = diag_frac - ! Update ncpl and ncpi Moorthi 12/12/2018 if (ntlnc > 0) then ! liquid and ice number concentrations predicted if (ncpl(i,k) > nmin) then @@ -1682,6 +1674,12 @@ subroutine assumed_pdf() endif endif +! Update moisture fields + qc(i,k) = diag_ql + qi(i,k) = diag_qi + qwv(i,k) = max(zero, total_water(i,k) - diag_qn) + cld_sgs(i,k) = diag_frac + ! Compute the liquid water flux wqls = aterm * ((w1_1-w_first)*ql1) + onema * ((w1_2-w_first)*ql2) wqis = aterm * ((w1_1-w_first)*qi1) + onema * ((w1_2-w_first)*qi2) diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index 83ff8d554..521070af7 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -19,12 +19,12 @@ module m_micro !> \section arg_table_m_micro_init Argument Table !! \htmlinclude m_micro_init.html !! -subroutine m_micro_init(imp_physics, imp_physics_mg, fprcp, gravit, rair, rh2o, cpair, & +subroutine m_micro_init(imp_physics, imp_physics_mg, fprcp, gravit, rair, rh2o, cpair,& eps, tmelt, latvap, latice, mg_dcs, mg_qcvar, mg_ts_auto_ice, & - mg_rhmini, microp_uniform, do_cldice, hetfrz_classnuc, & - mg_precip_frac_method, mg_berg_eff_factor, sed_supersat, & - do_sb_physics, mg_do_hail, mg_do_graupel, mg_nccons, & - mg_nicons, mg_ngcons, mg_ncnst, mg_ninst, mg_ngnst, & + mg_rhmini, microp_uniform, do_cldice, hetfrz_classnuc, & + mg_precip_frac_method, mg_berg_eff_factor, sed_supersat, & + do_sb_physics, mg_do_hail, mg_do_graupel, mg_nccons, & + mg_nicons, mg_ngcons, mg_ncnst, mg_ninst, mg_ngnst, & mg_do_ice_gmao, mg_do_liq_liu, errmsg, errflg) use machine, only: kind_phys @@ -175,16 +175,16 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & !------------------------------------ ! input ! real, parameter :: r_air = 3.47d-3 - real, parameter :: one=1.0, oneb3=one/3.0, onebcp=one/cp, & - & kapa=rgas*onebcp, cpbg=cp/grav, & - & lvbcp=hvap*onebcp, lsbcp=(hvap+hfus)*onebcp,& - & qsmall=1.e-14, rainmin = 1.0e-13, & - & fourb3=4.0/3.0, RL_cub=1.0e-15, nmin=1.0 + real, parameter :: one=1.0d0, oneb3=one/3.0d0, onebcp=one/cp, & + zero=0.0d0, half=0.5d0, onebg=one/grav, & + & kapa=rgas*onebcp, cpbg=cp/grav, & + & lvbcp=hvap*onebcp, lsbcp=(hvap+hfus)*onebcp, & + & qsmall=1.0d-14, rainmin = 1.0d-13, & + & fourb3=4.0d0/3.0d0, RL_cub=1.0d-15, nmin=1.0d0 integer, parameter :: ncolmicro = 1 - integer,intent(in) :: im, ix,lm, kdt, fprcp, pdfflag + integer,intent(in) :: im, ix,lm, kdt, fprcp, pdfflag, iccn logical,intent(in) :: flipv, skip_macro - integer,intent(in) :: iccn real (kind=kind_phys), intent(in):: dt_i, alf_fac, qc_min(2) real (kind=kind_phys), dimension(ix,lm),intent(in) :: & @@ -353,27 +353,28 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & sflx, gflx ! real (kind=kind_phys), parameter :: disp_liu=2., ui_scale=1.0 & -! &, dcrit=20.0e-6 & - real (kind=kind_phys), parameter :: disp_liu=1.0, ui_scale=1.0 & - &, dcrit=1.0e-6 & +! &, dcrit=20.0d-6 & + real (kind=kind_phys), parameter :: disp_liu=1.0d0 & + &, ui_scale=1.0d0 & + &, dcrit=1.0d-6 & ! &, ts_autice=1800.0 & ! &, ts_autice=3600.0 & !time scale - &, ninstr8 = 0.1e6 & - &, ncnstr8 = 100.0e6 + &, ninstr8 = 0.1d6 & + &, ncnstr8 = 100.0d6 real(kind=kind_phys):: k_gw, maxkh, tausurf_gw, overscale, tx1, rh1_r8 real(kind=kind_phys):: t_ice_denom - integer, dimension(1) :: lev_sed_strt ! sedimentation start level - real(kind=kind_phys), parameter :: sig_sed_strt=0.05 ! normalized pressure at sedimentation start + integer, dimension(1) :: lev_sed_strt ! sedimentation start level + real(kind=kind_phys), parameter :: sig_sed_strt=0.05d0 ! normalized pressure at sedimentation start real(kind=kind_phys),dimension(3) :: ccn_diag real(kind=kind_phys),dimension(58) :: cloudparams integer, parameter :: CCN_PARAM=2, IN_PARAM=5 - real(kind=kind_phys), parameter ::fdust_drop=1.0, fsoot_drop=0.1 & - &, sigma_nuc_r8=0.28,SCLMFDFR=0.03 + real(kind=kind_phys), parameter ::fdust_drop=1.0d0, fsoot_drop=0.1d0 & + &, sigma_nuc_r8=0.28d0,SCLMFDFR=0.03d0 ! &, sigma_nuc_r8=0.28,SCLMFDFR=0.1 type (AerProps), dimension (IM,LM) :: AeroProps @@ -438,9 +439,9 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & CNV_UPDF(i,k) = cf_upi(i,ll) CNV_DQLDT(I,K) = CNV_DQLDT_i(I,ll) CLCN(I,k) = CLCN_i(I,ll) - CLLS(I,k) = max(CLLS_io(I,ll)-CLCN_i(I,ll),0.0) - PLO(i,k) = prsl_i(i,ll)*0.01 - zlo(i,k) = phil(i,ll) * (1.0/grav) + CLLS(I,k) = max(CLLS_io(I,ll)-CLCN_i(I,ll),zero) + PLO(i,k) = prsl_i(i,ll)*0.01d0 + zlo(i,k) = phil(i,ll) * onebg temp(i,k) = t_io(i,ll) radheat(i,k) = lwheat_i(i,ll) + swheat_i(i,ll) rhc(i,k) = rhc_i(i,ll) @@ -454,8 +455,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO K=0, LM ll = lm-k DO I = 1,IM - PLE(i,k) = prsi_i(i,ll) *.01 ! interface pressure in hPa - zet(i,k+1) = phii(i,ll) * (1.0/grav) + PLE(i,k) = prsi_i(i,ll) * 0.01d0 ! interface pressure in hPa + zet(i,k+1) = phii(i,ll) * onebg END DO END DO if (.not. skip_macro) then @@ -483,7 +484,6 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & omega(i,k) = omega_i(i,k) ncpl(i,k) = ncpl_io(i,k) ncpi(i,k) = ncpi_io(i,k) - ncpi(i,k) = ncpi_io(i,k) rnw(i,k) = rnw_io(i,k) snw(i,k) = snw_io(i,k) qgl(i,k) = qgl_io(i,k) @@ -499,9 +499,9 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & CNV_UPDF(i,k) = cf_upi(i,k) CNV_DQLDT(I,K) = CNV_DQLDT_i(I,k) CLCN(I,k) = CLCN_i(I,k) - CLLS(I,k) = max(CLLS_io(I,k)-CLCN_i(I,k),0.0) - PLO(i,k) = prsl_i(i,k)*0.01 - zlo(i,k) = phil(i,k) * (1.0/grav) + CLLS(I,k) = max(CLLS_io(I,k)-CLCN_i(I,k),zero) + PLO(i,k) = prsl_i(i,k)*0.01d0 + zlo(i,k) = phil(i,k) * onebg temp(i,k) = t_io(i,k) radheat(i,k) = lwheat_i(i,k) + swheat_i(i,k) rhc(i,k) = rhc_i(i,k) @@ -514,8 +514,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & END DO DO K=0, LM DO I = 1,IM - PLE(i,k) = prsi_i(i,k) *.01 ! interface pressure in hPa - zet(i,k+1) = phii(i,k) * (1.0/grav) + PLE(i,k) = prsi_i(i,k) * 0.01d0 ! interface pressure in hPa + zet(i,k+1) = phii(i,k) * onebg END DO END DO if (.not. skip_macro) then @@ -551,19 +551,19 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & QICN(I,K), CLCN(I,K), NCPL(I,K), & & NCPI(I,K), qc_min) if (rnw(i,k) <= qc_min(1)) then - ncpr(i,k) = 0.0 + ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0d0), nmin) endif if (snw(i,k) <= qc_min(2)) then - ncps(i,k) = 0.0 + ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) endif if (qgl(i,k) <= qc_min(2)) then - ncgl(i,k) = 0.0 + ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) endif enddo @@ -577,8 +577,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO I=1, IM DO K = LM-2, 10, -1 - If ((CNV_DQLDT(I,K) <= 1.0e-9) .and. & - & (CNV_DQLDT(I,K+1) > 1.0e-9)) then + If ((CNV_DQLDT(I,K) <= 1.0d-9) .and. & + & (CNV_DQLDT(I,K+1) > 1.0d-9)) then KCT(I) = K+1 exit end if @@ -657,8 +657,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do l=lm-1,1,-1 do i=1,im - tx1 = 0.5 * (temp(i,l+1) + temp(i,l)) - kh(i,l) = 3.55e-7*tx1**2.5*(rgas*0.01) / ple(i,l) !kh molecule diff only needing refinement + tx1 = half * (temp(i,l+1) + temp(i,l)) + kh(i,l) = 3.55d-7*tx1**2.5d0*(rgas*0.01d0) / ple(i,l) !kh molecule diff only needing refinement enddo end do do i=1,im @@ -667,38 +667,38 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & enddo do L=LM,1,-1 do i=1,im - blk_l(i,l) = 1.0 / ( 1.0/max(0.15*ZPBL(i),0.4*zlo(i,lm-1))& - & + 1.0/(zlo(i,l)*.4) ) - - SC_ICE(i,l) = 1.0 - NCPL(i,l) = MAX( NCPL(i,l), 0.) - NCPI(i,l) = MAX( NCPI(i,l), 0.) - RAD_CF(i,l) = max(0.0, min(CLLS(i,l)+CLCN(i,l), 1.0)) - if (iccn .ne. 1) then - CDNC_NUC(i,l) = 0.0 - INC_NUC(i,l) = 0.0 + blk_l(i,l) = one / ( one/max(0.15d0*ZPBL(i),0.4d0*zlo(i,lm-1))& + & + one/(zlo(i,l)*0.4d0) ) + + SC_ICE(i,l) = one + NCPL(i,l) = MAX( NCPL(i,l), zero) + NCPI(i,l) = MAX( NCPI(i,l), zero) + RAD_CF(i,l) = max(zero, min(CLLS(i,l)+CLCN(i,l), one)) + if (iccn /= 1) then + CDNC_NUC(i,l) = zero + INC_NUC(i,l) = zero endif enddo end do ! T_ICE_ALL = TICE - 40.0 T_ICE_ALL = CLOUDPARAMS(33) + TICE - t_ice_denom = 1.0 / (tice - t_ice_all) + t_ice_denom = one / (tice - t_ice_all) do l=1,lm - rhdfdar8(l) = 1.e-8 - rhu00r8(l) = 0.95 + rhdfdar8(l) = 1.d-8 + rhu00r8(l) = 0.95d0 - ttendr8(l) = 0. - qtendr8(l) = 0. - cwtendr8(l) = 0. + ttendr8(l) = zero + qtendr8(l) = zero + cwtendr8(l) = zero - npccninr8(l) = 0. + npccninr8(l) = zero enddo do k=1,10 do l=1,lm - rndstr8(l,k) = 2.0e-7 + rndstr8(l,k) = 2.0d-7 enddo enddo @@ -730,18 +730,18 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! allocate(AERMASSMIX(IM,LM,15)) - if (iccn == 2) then + if ( iccn == 2) then AERMASSMIX(:,:,1:ntrcaer) = aerfld_i(:,:,1:ntrcaer) else - AERMASSMIX(:,:,1:5) = 1.e-6 - AERMASSMIX(:,:,6:15) = 2.e-14 + AERMASSMIX(:,:,1:5) = 1.0d-6 + AERMASSMIX(:,:,6:15) = 2.0d-14 end if !> - Call aerconversion1() call AerConversion1 (AERMASSMIX, AeroProps) deallocate(AERMASSMIX) use_average_v = .false. - if (USE_AV_V > 0.0) then + if (USE_AV_V > zero) then use_average_v = .true. end if @@ -752,58 +752,58 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & kcldtopcvn = KCT(I) - tausurf_gw = min(0.5*SQRT(TAUOROX(I)*TAUOROX(I) & - & + TAUOROY(I)*TAUOROY(I)), 10.0) + tausurf_gw = min(half*SQRT(TAUOROX(I)*TAUOROX(I) & + & + TAUOROY(I)*TAUOROY(I)), 10.0d0) do k=1,lm - uwind_gw(k) = min(0.5*SQRT( U1(I,k)*U1(I,k) & - & + V1(I,k)*V1(I,k)), 50.0) + uwind_gw(k) = min(half*SQRT( U1(I,k)*U1(I,k) & + & + V1(I,k)*V1(I,k)), 50.0d0) ! tausurf_gw =tausurf_gw + max (tausurf_gw, min(0.5*SQRT(TAUX(I , J)**2+TAUY(I , J)**2), 10.0)*BKGTAU) !adds a minimum value from unresolved sources - pm_gw(k) = 100.0*PLO(I,k) + pm_gw(k) = 100.0d0*PLO(I,k) tm_gw(k) = TEMP(I,k) - nm_gw(k) = 0.0 + nm_gw(k) = zero rho_gw(k) = pm_gw(k) /(RGAS*tm_gw(k)) ter8(k) = TEMP(I,k) - plevr8(k) = 100.*PLO(I,k) + plevr8(k) = 100.0d0*PLO(I,k) ndropr8(k) = NCPL(I,k) qir8(k) = QILS(I,k) + QICN(I,k) qcr8(k) = QLLS(I,k) + QLCN(I,k) qcaux(k) = qcr8(k) - npccninr8(k) = 0.0 - naair8(k) = 0.0 + npccninr8(k) = zero + naair8(k) = zero - npre8(k) = 0.0 + npre8(k) = zero - if (RAD_CF(I,k) > 0.01 .and. qir8(k) > 0.0) then + if (RAD_CF(I,k) > 0.01d0 .and. qir8(k) > zero) then npre8(k) = NPRE_FRAC*NCPI(I,k) else - npre8(k) = 0.0 + npre8(k) = zero endif omegr8(k) = OMEGA(I,k) - lc_turb(k) = max(blk_l(I,k), 50.0) + lc_turb(k) = max(blk_l(I,k), 50.0d0) ! rad_cooling(k) = RADheat(I,k) - if (npre8(k) > 0.0 .and. qir8(k) > 0.0) then - dpre8(k) = ( qir8(k)/(6.0*npre8(k)*900.0*PI))**(1.0/3.0) + if (npre8(k) > zero .and. qir8(k) > zero) then + dpre8(k) = ( qir8(k)/(6.0d0*npre8(k)*900.0d0*PI))**(one/3.0d0) else - dpre8(k) = 1.0e-9 + dpre8(k) = 1.0d-9 endif wparc_ls(k) = -omegr8(k) / (rho_gw(k)*GRAV) & & + cpbg * radheat(i,k) ! & + cpbg * rad_cooling(k) enddo do k=0,lm - pi_gw(k) = 100.0*PLE(I,k) - rhoi_gw(k) = 0.0 - ni_gw(k) = 0.0 - ti_gw(k) = 0.0 + pi_gw(k) = 100.0d0*PLE(I,k) + rhoi_gw(k) = zero + ni_gw(k) = zero + ti_gw(k) = zero enddo @@ -816,37 +816,37 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & ti_gw, nm_gw, q1(i,:)) do k=1,lm - nm_gw(k) = max(nm_gw(k), 0.005) + nm_gw(k) = max(nm_gw(k), 0.005d0) h_gw(k) = k_gw*rho_gw(k)*uwind_gw(k)*nm_gw(k) - if (h_gw(K) > 0.0) then - h_gw(K) = sqrt(2.0*tausurf_gw/h_gw(K)) + if (h_gw(K) > zero) then + h_gw(K) = sqrt(2.0d0*tausurf_gw/h_gw(K)) end if - wparc_gw(k) = k_gw*uwind_gw(k)*h_gw(k)*0.133 + wparc_gw(k) = k_gw*uwind_gw(k)*h_gw(k)*0.133d0 - wparc_cgw(k) = 0.0 + wparc_cgw(k) = zero end do !> - Subgrid variability from convective sources according to Barahona et al. 2014 (in preparation) if (kcldtopcvn > 20) then - ksa1 = 1.0 + ksa1 = one Nct = nm_gw(kcldtopcvn) - Wct = max(CNV_CVW(I,kcldtopcvn), 0.0) + Wct = max(CNV_CVW(I,kcldtopcvn), zero) fcn = maxval(CNV_UPDF(I,kcldtopcvn:LM)) do k=1,kcldtopcvn c2_gw = (nm_gw(k) + Nct) / Nct - wparc_cgw(k) = sqrt(ksa1*fcn*fcn*12.56* & - & 1.806*c2_gw*c2_gw)*Wct*0.133 + wparc_cgw(k) = sqrt(ksa1*fcn*fcn*12.56d0* & + & 1.806d0*c2_gw*c2_gw)*Wct*0.133d0 enddo end if do k=1,lm - dummyW(k) = 0.133*k_gw*uwind_gw(k)/nm_gw(k) + dummyW(k) = 0.133d0*k_gw*uwind_gw(k)/nm_gw(k) enddo do K=1, LM-5, 1 @@ -856,8 +856,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & end do do l=1,min(k,lm-5) - wparc_cgw(l) = 0.0 - wparc_gw(l) = 0.0 + wparc_cgw(l) = zero + wparc_gw(l) = zero enddo @@ -866,25 +866,25 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & kbmin = min(kbmin, LM-1) - 4 do K = 1, LM wparc_turb(k) = KH(I,k) / lc_turb(k) - dummyW(k) = 10.0 + dummyW(k) = 10.0d0 enddo - if (FRLAND(I) < 0.1 .and. ZPBL(I) < 800.0 .and. & - & TEMP(I,LM) < 298.0 .and. TEMP(I,LM) > 274.0 ) then + if (FRLAND(I) < 0.1d0 .and. ZPBL(I) < 800.0d0 .and. & + & TEMP(I,LM) < 298.0d0 .and. TEMP(I,LM) > 274.0d0 ) then do K = 1, LM - dummyW(k) = max(min((ZET(I,k+1)-ZPBL(I))*0.01,10.0),-10.0) - dummyW(k) = 1.0 / (1.0+exp(dummyW(k))) + dummyW(k) = max(min((ZET(I,k+1)-ZPBL(I))*0.01d0,10.0d0),-10.0d0) + dummyW(k) = one / (one+exp(dummyW(k))) enddo maxkh = max(maxval(KH(I,kbmin:LM-1)*nm_gw(kbmin:LM-1)/ & - & 0.17), 0.3) + & 0.17d0), 0.3d0) do K = 1, LM - wparc_turb(k) = (1.0-dummyW(k))*wparc_turb(k) & + wparc_turb(k) = (one-dummyW(k))*wparc_turb(k) & & + dummyW(k)*maxkh enddo end if - wparc_turb(kbmin:LM) = max(wparc_turb(kbmin:LM), 0.2) + wparc_turb(kbmin:LM) = max(wparc_turb(kbmin:LM), 0.2d0) @@ -902,11 +902,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do K = 1, LM - if (plevr8(K) > 70.0) then + if (plevr8(K) > 70.0d0) then - ccn_diag(1) = 0.001 - ccn_diag(2) = 0.004 - ccn_diag(3) = 0.01 + ccn_diag(1) = 0.001d0 + ccn_diag(2) = 0.004d0 + ccn_diag(3) = 0.01d0 if (K > 2 .and. K <= LM-2) then tauxr8 = (ter8(K-1) + ter8(K+1) + ter8(K)) * oneb3 @@ -921,8 +921,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! call init_Aer(AeroAux_b) ! endif - pfrz_inc_r8(k) = 0.0 - rh1_r8 = 0.0 !related to cnv_dql_dt, needed to changed soon + pfrz_inc_r8(k) = zero + rh1_r8 = zero !related to cnv_dql_dt, needed to changed soon ! if (lprnt) write(0,*)' bef aero npccninr8=',npccninr8(k),' k=',k & ! &,' ccn_param=',ccn_param,' in_param=',in_param & @@ -943,7 +943,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! & size(ccn_diag), lprnt) ! if (lprnt) write(0,*)' aft aero npccninr8=',npccninr8(k),' k=',k - if (npccninr8(k) < 1.0e-12) npccninr8(k) = 0.0 + if (npccninr8(k) < 1.0d-12) npccninr8(k) = zero ! CCN01(I,K) = max(ccn_diag(1)*1e-6, 0.0) ! CCN04(I,K) = max(ccn_diag(2)*1e-6, 0.0) @@ -952,63 +952,63 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & else - ccn_diag(:) = 0.0 - smaxliq(K) = 0.0 - swparc(K) = 0.0 - smaxicer8(K) = 0.0 - nheticer8(K) = 0.0 - sc_icer8(K) = 2.0 -! sc_icer8(K) = 1.0 - naair8(K) = 0.0 - npccninr8(K) = 0.0 - nlimicer8(K) = 0.0 - nhet_immr8(K) = 0.0 - dnhet_immr8(K) = 0.0 - nhet_depr8(K) = 0.0 - nhet_dhfr8(K) = 0.0 - dust_immr8(K) = 0.0 - dust_depr8(K) = 0.0 - dust_dhfr8(K) = 0.0 + ccn_diag(:) = zero + smaxliq(K) = zero + swparc(K) = zero + smaxicer8(K) = zero + nheticer8(K) = zero + sc_icer8(K) = 2.0d0 +! sc_icer8(K) = 1.0d0 + naair8(K) = zero + npccninr8(K) = zero + nlimicer8(K) = zero + nhet_immr8(K) = zero + dnhet_immr8(K) = zero + nhet_depr8(K) = zero + nhet_dhfr8(K) = zero + dust_immr8(K) = zero + dust_depr8(K) = zero + dust_dhfr8(K) = zero end if ! SMAXL(I,k) = smaxliq(k) * 100.0 ! SMAXI(I,k) = smaxicer8(k) * 100.0 - NHET_NUC(I,k) = nheticer8(k) * 1e-6 - NLIM_NUC(I,k) = nlimicer8(k) * 1e-6 - SC_ICE(I,k) = min(max(sc_icer8(k),1.0),2.0) + NHET_NUC(I,k) = nheticer8(k) * 1.0d-6 + NLIM_NUC(I,k) = nlimicer8(k) * 1.0d-6 + SC_ICE(I,k) = min(max(sc_icer8(k),one),2.0d0) ! SC_ICE(I,k) = min(max(sc_icer8(k),1.0),1.2) ! if(temp(i,k) < T_ICE_ALL) SC_ICE(i,k) = max(SC_ICE(I,k), 1.2) ! if(temp(i,k) < T_ICE_ALL) SC_ICE(i,k) = max(SC_ICE(I,k), 1.5) ! if(temp(i,k) > T_ICE_ALL) SC_ICE(i,k) = 1.0 ! if(temp(i,k) > TICE) SC_ICE(i,k) = rhc(i,k) ! - if(iccn == 0) then + if (iccn == 0) then if(temp(i,k) < T_ICE_ALL) then ! SC_ICE(i,k) = max(SC_ICE(I,k), 1.2) - SC_ICE(i,k) = max(SC_ICE(I,k), 1.5) + SC_ICE(i,k) = max(SC_ICE(I,k), 1.5d0) elseif(temp(i,k) > TICE) then SC_ICE(i,k) = rhc(i,k) else ! SC_ICE(i,k) = 1.0 ! tx1 = max(SC_ICE(I,k), 1.2) - tx1 = max(SC_ICE(I,k), 1.5) + tx1 = max(SC_ICE(I,k), 1.5d0) SC_ICE(i,k) = ((tice-temp(i,k))*tx1 + (temp(i,k)-t_ice_all)*rhc(i,k)) & - * t_ice_denom + * t_ice_denom endif endif - if (iccn .ne. 1) then + if (iccn /= 1) then CDNC_NUC(I,k) = npccninr8(k) INC_NUC (I,k) = naair8(k) endif - NHET_IMM(I,k) = max(nhet_immr8(k), 0.0) - DNHET_IMM(I,k) = max(dnhet_immr8(k), 0.0) - NHET_DEP(I,k) = nhet_depr8(k) * 1e-6 - NHET_DHF(I,k) = nhet_dhfr8(k) * 1e-6 - DUST_IMM(I,k) = max(dust_immr8(k), 0.0)*1e-6 - DUST_DEP(I,k) = max(dust_depr8(k), 0.0)*1e-6 - DUST_DHF(I,k) = max(dust_dhfr8(k), 0.0)*1e-6 - WSUB (I,k) = wparc_ls(k) + swparc(k)*0.8 + NHET_IMM(I,k) = max(nhet_immr8(k), zero) + DNHET_IMM(I,k) = max(dnhet_immr8(k), zero) + NHET_DEP(I,k) = nhet_depr8(k) * 1.0d-6 + NHET_DHF(I,k) = nhet_dhfr8(k) * 1.0d-6 + DUST_IMM(I,k) = max(dust_immr8(k), zero)*1.0d-6 + DUST_DEP(I,k) = max(dust_depr8(k), zero)*1.0d-6 + DUST_DHF(I,k) = max(dust_dhfr8(k), zero)*1.0d-6 + WSUB (I,k) = wparc_ls(k) + swparc(k)*0.8d0 SIGW_GW (I,k) = wparc_gw(k) * wparc_gw(k) SIGW_CNV (I,k) = wparc_cgw(k) * wparc_cgw(k) SIGW_TURB (I,k) = wparc_turb(k) * wparc_turb(k) @@ -1121,24 +1121,24 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do k=1,lm do i=1,im - if (CNV_MFD(i,k) > 1.0e-6) then - tx1 = 1.0 / CNV_MFD(i,k) + if (CNV_MFD(i,k) > 1.0d-6) then + tx1 = one / CNV_MFD(i,k) CNV_NDROP(i,k) = CNV_NDROP(i,k) * tx1 CNV_NICE(i,k) = CNV_NICE(i,k) * tx1 else - CNV_NDROP(i,k) = 0.0 - CNV_NICE(i,k) = 0.0 + CNV_NDROP(i,k) = zero + CNV_NICE(i,k) = zero endif ! temp(i,k) = th1(i,k) * PK(i,k) - RAD_CF(i,k) = min(CLLS(i,k)+CLCN(i,k), 1.0) + RAD_CF(i,k) = min(CLLS(i,k)+CLCN(i,k), one) ! - if (iccn .ne. 1) then - if (PFRZ(i,k) > 0.0) then + if (iccn /= 1) then + if (PFRZ(i,k) > zero) then INC_NUC(i,k) = INC_NUC(i,k) * PFRZ(i,k) NHET_NUC(i,k) = NHET_NUC(i,k) * PFRZ(i,k) else - INC_NUC(i,k) = 0.0 - NHET_NUC(i,k) = 0.0 + INC_NUC(i,k) = zero + NHET_NUC(i,k) = zero endif endif @@ -1195,21 +1195,21 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & QL_TOT(i,k) = QLCN(i,k) + QLLS(i,k) QI_TOT(i,k) = QICN(i,k) + QILS(i,k) ! Anning if negative, borrow water and ice from vapor 11/23/2016 - if (QL_TOT(i,k) < 0.0) then + if (QL_TOT(i,k) < zero) then Q1(i,k) = Q1(i,k) + QL_TOT(i,k) TEMP(i,k) = TEMP(i,k) - lvbcp*QL_TOT(i,k) - QL_TOT(i,k) = 0.0 + QL_TOT(i,k) = zero endif - if (QI_TOT(i,k) < 0.0) then + if (QI_TOT(i,k) < zero) then Q1(i,k) = Q1(i,k) + QI_TOT(i,k) TEMP(i,k) = TEMP(i,k) - lsbcp*QI_TOT(i,k) - QI_TOT(i,k) = 0.0 + QI_TOT(i,k) = zero endif QTOT = QL_TOT(i,k) + QI_TOT(i,k) - if (QTOT > 0.0) then - FQA(i,k) = min(max(QCNTOT / QTOT, 0.0), 1.0) + if (QTOT > zero) then + FQA(i,k) = min(max(QCNTOT / QTOT, zero), one) else - FQA(i,k) = 0.0 + FQA(i,k) = zero endif enddo enddo @@ -1222,35 +1222,35 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & !! Gettelman (2008) microphysics \cite Morrison_2008 do I=1,IM - LS_SNR(i) = 0.0 - LS_PRC2(i) = 0.0 + LS_SNR(i) = zero + LS_PRC2(i) = zero nbincontactdust = 1 do l=1,10 do k=1,lm - naconr8(k,l) = 0.0 - rndstr8(k,l) = 2.0e-7 + naconr8(k,l) = zero + rndstr8(k,l) = 2.0d-7 enddo enddo do k=1,lm - npccninr8(k) = 0.0 - naair8(k) = 0.0 - omegr8(k) = 0.0 + npccninr8(k) = zero + naair8(k) = zero + omegr8(k) = zero ! tx1 = MIN(CLLS(I,k) + CLCN(I,k), 0.99) - tx1 = MIN(CLLS(I,k) + CLCN(I,k), 1.00) - if (tx1 > 0.0) then - cldfr8(k) = min(max(tx1, 0.00001), 1.0) + tx1 = MIN(CLLS(I,k) + CLCN(I,k), one) + if (tx1 > zero) then + cldfr8(k) = min(max(tx1, 0.00001d0), one) else - cldfr8(k) = 0.0 + cldfr8(k) = zero endif if (temp(i,k) > tice) then liqcldfr8(k) = cldfr8(k) - icecldfr8(k) = 0.0 + icecldfr8(k) = zero elseif (temp(i,k) <= t_ice_all) then - liqcldfr8(k) = 0.0 + liqcldfr8(k) = zero icecldfr8(k) = cldfr8(k) else icecldfr8(k) = cldfr8(k) * (tice - temp(i,k))/(tice-t_ice_all) @@ -1264,23 +1264,23 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & qcr8(k) = QL_TOT(I,k) qir8(k) = QI_TOT(I,k) - ncr8(k) = MAX(NCPL(I,k), 0.0) - nir8(k) = MAX(NCPI(I,k), 0.0) + ncr8(k) = MAX(NCPL(I,k), zero) + nir8(k) = MAX(NCPI(I,k), zero) qrr8(k) = rnw(I,k) qsr8(k) = snw(I,k) qgr8(k) = qgl(I,k) - nrr8(k) = MAX(NCPR(I,k), 0.0) - nsr8(k) = MAX(NCPS(I,k), 0.0) - ngr8(k) = MAX(ncgl(I,k), 0.0) + nrr8(k) = MAX(NCPR(I,k), zero) + nsr8(k) = MAX(NCPS(I,k), zero) + ngr8(k) = MAX(ncgl(I,k), zero) naair8(k) = INC_NUC(I,k) npccninr8(k) = CDNC_NUC(I,k) - if (cldfr8(k) >= 0.001) then + if (cldfr8(k) >= 0.001d0) then nimmr8(k) = min(DNHET_IMM(I,k),ncr8(k)/(cldfr8(k)*DT_MOIST)) else - nimmr8(k) = 0.0 + nimmr8(k) = zero endif @@ -1296,7 +1296,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & nbincontactdust = naux endif naconr8(K, 1:naux) = AeroAux_b%num(1:naux) - rndstr8(K, 1:naux) = AeroAux_b%dpg(1:naux) * 0.5 + rndstr8(K, 1:naux) = AeroAux_b%dpg(1:naux) * half ! The following moved inside of if(fprcp <= 0) then loop ! Get black carbon properties for contact ice nucleation @@ -1305,11 +1305,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! naux = AeroAux_b%nmods ! rnsootr8 (K) = sum(AeroAux_b%dpg(1:naux))/naux - pdelr8(k) = (PLE(I,k) - PLE(I,k-1)) * 100.0 - rpdelr8(k) = 1. / pdelr8(k) - plevr8(k) = 100. * PLO(I,k) + pdelr8(k) = (PLE(I,k) - PLE(I,k-1)) * 100.0d0 + rpdelr8(k) = one / pdelr8(k) + plevr8(k) = 100.0d0 * PLO(I,k) zmr8(k) = ZLO(I,k) - ficer8(k) = qir8(k) / (qcr8(k)+qir8(k) + 1.e-10) + ficer8(k) = qir8(k) / (qcr8(k)+qir8(k) + 1.0d-10) omegr8(k) = WSUB(I,k) ! alphar8(k) = max(alpht_x(i,k)/maxval(alpht_x(i,:))*8.,0.5) ! alphar8(k) = qcvar2 @@ -1317,12 +1317,12 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & END DO do k=1,lm+1 - pintr8(k) = PLE(I,k-1) * 100.0 + pintr8(k) = PLE(I,k-1) * 100.0d0 kkvhr8(k) = KH(I,k-1) END DO lev_sed_strt = 0 - tx1 = 1.0 / pintr8(lm+1) + tx1 = one / pintr8(lm+1) do k=1,lm if (plevr8(k)*tx1 < sig_sed_strt) then lev_sed_strt(1) = k @@ -1402,8 +1402,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! if (lprint) write(0,*)' prectr8=',prectr8(1), & ! & ' precir8=',precir8(1) - LS_PRC2(I) = max(1000.*(prectr8(1)-precir8(1)), 0.0) - LS_SNR(I) = max(1000.*precir8(1), 0.0) + LS_PRC2(I) = max(1000.0d0*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0d0*precir8(1), zero) do k=1,lm @@ -1414,17 +1414,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! &,' qvlatr8=',qvlatr8(k) TEMP(I,k) = TEMP(I,k) + tlatr8(k)*DT_R8*onebcp - NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k) * DT_R8, 0.0) - NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k) * DT_R8, 0.0) + NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k) * DT_R8, zero) + NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k) * DT_R8, zero) rnw(I,k) = qrr8(k) snw(I,k) = qsr8(k) NCPR(I,k) = nrr8(k) NCPS(I,k) = nsr8(k) - CLDREFFL(I,k) = min(max(effcr8(k), 10.), 150.) - CLDREFFI(I,k) = min(max(effir8(k), 20.), 150.) - CLDREFFR(I,k) = max(droutr8(k)*0.5*1.e6, 150.) - CLDREFFS(I,k) = max(0.192*dsoutr8(k)*0.5*1.e6, 250.) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0d0), 150.0d0) + CLDREFFI(I,k) = min(max(effir8(k), 20.0d0), 150.0d0) + CLDREFFR(I,k) = max(droutr8(k)*0.5d0*1.0d6, 150.0d0) + CLDREFFS(I,k) = max(0.192d0*dsoutr8(k)*0.5d0*1.0d6, 250.0d0) enddo ! K loop @@ -1506,8 +1506,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & prer_evap, xlat(i), xlon(i), lprint, iccn, & & lev_sed_strt) ! - LS_PRC2(I) = max(1000.*(prectr8(1)-precir8(1)), 0.0) - LS_SNR(I) = max(1000.*precir8(1), 0.0) + LS_PRC2(I) = max(1000.0d0*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0d0*precir8(1), zero) do k=1,lm QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 @@ -1516,15 +1516,15 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & rnw(I,k) = rnw(I,k) + qrtend(k)*dt_r8 snw(I,k) = snw(I,k) + qstend(k)*dt_r8 - NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k)*DT_R8, 0.0) - NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k)*DT_R8, 0.0) - NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_r8, 0.0) - NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, 0.0) + NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k)*DT_R8, zero) + NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k)*DT_R8, zero) + NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_r8, zero) + NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, zero) - CLDREFFL(I,k) = min(max(effcr8(k), 10.),150.) - CLDREFFI(I,k) = min(max(effir8(k), 20.),150.) - CLDREFFR(I,k) = max(reff_rain(k),150.) - CLDREFFS(I,k) = max(reff_snow(k),250.) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0d0),150.0d0) + CLDREFFI(I,k) = min(max(effir8(k), 20.0d0),150.0d0) + CLDREFFR(I,k) = max(reff_rain(k),150.0d0) + CLDREFFS(I,k) = max(reff_snow(k),250.0d0) enddo ! K loop ! if (lprint) then ! write(0,*)' aft micro_mg_tend temp= ', temp(i,:) @@ -1532,13 +1532,13 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! write(0,*)' aft micro_mg_tend LS_PRC2= ', LS_PRC2(i),' ls_snr=',ls_snr(i) ! endif else - LS_PRC2(I) = 0. - LS_SNR(I) = 0. + LS_PRC2(I) = zero + LS_SNR(I) = zero do k=1,lm - CLDREFFL(I,k) = 10. - CLDREFFI(I,k) = 50. - CLDREFFR(I,k) = 1000. - CLDREFFS(I,k) = 250. + CLDREFFL(I,k) = 10.0d0 + CLDREFFI(I,k) = 50.0d0 + CLDREFFR(I,k) = 1000.0d0 + CLDREFFS(I,k) = 250.0d0 enddo ! K loop endif ! @@ -1643,8 +1643,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & prer_evap, xlat(i), xlon(i), lprint, iccn, & & lev_sed_strt) - LS_PRC2(I) = max(1000.*(prectr8(1)-precir8(1)), 0.0) - LS_SNR(I) = max(1000.*precir8(1), 0.0) + LS_PRC2(I) = max(1000.0d0*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0d0*precir8(1), zero) do k=1,lm QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 @@ -1654,17 +1654,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & snw(I,k) = snw(I,k) + qstend(k)*dt_r8 qgl(I,k) = qgl(I,k) + qgtend(k)*dt_r8 - NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k)*DT_R8, 0.0) - NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k)*DT_R8, 0.0) - NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_r8, 0.0) - NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, 0.0) - NCGL(I,k) = max(NCGL(I,k) + ngtend(k)*dt_r8, 0.0) - - CLDREFFL(I,k) = min(max(effcr8(k), 10.),150.) - CLDREFFI(I,k) = min(max(effir8(k), 20.),150.) - CLDREFFR(I,k) = max(reff_rain(k),150.) - CLDREFFS(I,k) = max(reff_snow(k),250.) - CLDREFFG(I,k) = max(reff_grau(k),250.) + NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k)*DT_R8, zero) + NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k)*DT_R8, zero) + NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_r8, zero) + NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, zero) + NCGL(I,k) = max(NCGL(I,k) + ngtend(k)*dt_r8, zero) + + CLDREFFL(I,k) = min(max(effcr8(k), 10.0d0),150.0d0) + CLDREFFI(I,k) = min(max(effir8(k), 20.0d0),150.0d0) + CLDREFFR(I,k) = max(reff_rain(k),150.0d0) + CLDREFFS(I,k) = max(reff_snow(k),250.0d0) + CLDREFFG(I,k) = max(reff_grau(k),250.0d0) enddo ! K loop ! if (lprint) then ! write(0,*)' aft micro_mg_tend temp= ', temp(i,:) @@ -1672,14 +1672,14 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! write(0,*)' aft micro_mg_tend LS_PRC2= ', LS_PRC2(i),' ls_snr=',ls_snr(i) ! endif else - LS_PRC2(I) = 0. - LS_SNR(I) = 0. + LS_PRC2(I) = zero + LS_SNR(I) = zero do k=1,lm - CLDREFFL(I,k) = 10. - CLDREFFI(I,k) = 50. - CLDREFFR(I,k) = 1000. - CLDREFFS(I,k) = 250. - CLDREFFG(I,k) = 250. + CLDREFFL(I,k) = 10.0d0 + CLDREFFI(I,k) = 50.0d0 + CLDREFFR(I,k) = 1000.0d0 + CLDREFFS(I,k) = 250.0d0 + CLDREFFG(I,k) = 250.0d0 enddo ! K loop endif endif @@ -1705,19 +1705,19 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & QL_TOT(I,K) = QLLS(I,K) + QLCN(I,K) QI_TOT(I,K) = QILS(I,K) + QICN(I,K) if (rnw(i,k) <= qc_min(1)) then - ncpl(i,k) = 0.0 - elseif (ncpl(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpl(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0), nmin) + ncpr(i,k) = zero + elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0d0), nmin) endif if (snw(i,k) <= qc_min(2)) then - ncpl(i,k) = 0.0 + ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) endif if (qgl(i,k) <= qc_min(2)) then - ncgl(i,k) = 0.0 + ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) endif enddo enddo @@ -1745,19 +1745,19 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & QI_TOT(I,K) = QILS(I,K) + QICN(I,K) ! if (rnw(i,k) <= qc_min(1)) then - ncpl(i,k) = 0.0 - elseif (ncpl(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpl(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0), nmin) + ncpr(i,k) = zero + elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0d0), nmin) endif if (snw(i,k) <= qc_min(2)) then - ncpl(i,k) = 0.0 + ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) endif if (qgl(i,k) <= qc_min(2)) then - ncgl(i,k) = 0.0 + ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) endif enddo enddo @@ -1771,8 +1771,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do K= 1, LM do I=1,IM - if (QI_TOT(i,k) <= 0.0) NCPI(i,k) = 0.0 - if (QL_TOT(i,k) <= 0.0) NCPL(i,k) = 0.0 + if (QI_TOT(i,k) <= zero) NCPI(i,k) = zero + if (QL_TOT(i,k) <= zero) NCPL(i,k) = zero end do end do @@ -1804,7 +1804,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO K=1, LM ll = lm-k+1 DO I = 1,IM - CLLS_io(i,k) = max(0.0, min(CLLS(i,ll)+CLCN(i,ll),1.0)) + CLLS_io(i,k) = max(zero, min(CLLS(i,ll)+CLCN(i,ll),one)) enddo enddo else @@ -1835,7 +1835,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (skip_macro) then DO K=1, LM DO I = 1,IM - CLLS_io(i,k) = max(0.0, min(CLLS(i,k)+CLCN(i,k),1.0)) + CLLS_io(i,k) = max(zero, min(CLLS(i,k)+CLCN(i,k),one)) enddo enddo else @@ -1849,12 +1849,12 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO I = 1,IM tx1 = LS_PRC2(i) + LS_SNR(i) - rn_o(i) = tx1 * dt_i * 0.001 + rn_o(i) = tx1 * dt_i * 0.001d0 if (rn_o(i) < rainmin) then - sr_o(i) = 0. + sr_o(i) = zero else - sr_o(i) = LS_SNR(i) / tx1 + sr_o(i) = max(zero, min(one, LS_SNR(i)/tx1)) endif ENDDO @@ -1925,7 +1925,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & real(kind=kind_phys), intent(out) :: nm(pcols,pver) real(kind=kind_phys), parameter :: r=rgas, cpair=cp, g=grav, & - oneocp=1.0/cp, n2min=1.e-8 + oneocp=1.0d0/cp, n2min=1.0d-8 !---------------------------Local storage------------------------------- integer :: ix,kx @@ -1941,15 +1941,15 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & kx = 0 do ix = 1, ncol ti(ix,kx) = t(ix,kx+1) - rhoi(ix,kx) = pi(ix,kx) / (r*(ti(ix,kx)*(1.0+fv*sph(ix,kx+1)))) + rhoi(ix,kx) = pi(ix,kx) / (r*(ti(ix,kx)*(1.0d0+fv*sph(ix,kx+1)))) ni(ix,kx) = sqrt (g*g / (cpair*ti(ix,kx))) end do ! Interior points use centered differences do kx = 1, pver-1 do ix = 1, ncol - ti(ix,kx) = 0.5 * (t(ix,kx) + t(ix,kx+1)) - rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0+0.5*fv*(sph(ix,kx)+sph(ix,kx+1)))) + ti(ix,kx) = 0.5d0 * (t(ix,kx) + t(ix,kx+1)) + rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0d0+0.5d0*fv*(sph(ix,kx)+sph(ix,kx+1)))) dtdp = (t(ix,kx+1)-t(ix,kx)) / (pm(ix,kx+1)-pm(ix,kx)) n2 = g*g/ti(ix,kx) * (oneocp - rhoi(ix,kx)*dtdp) ni(ix,kx) = sqrt (max (n2min, n2)) @@ -1961,7 +1961,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & kx = pver do ix = 1, ncol ti(ix,kx) = t(ix,kx) - rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0+fv*sph(ix,kx))) + rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0d0+fv*sph(ix,kx))) ni(ix,kx) = ni(ix,kx-1) end do @@ -1970,7 +1970,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & !----------------------------------------------------------------------------- do kx=1,pver do ix=1,ncol - nm(ix,kx) = 0.5 * (ni(ix,kx-1) + ni(ix,kx)) + nm(ix,kx) = 0.5d0 * (ni(ix,kx-1) + ni(ix,kx)) end do end do @@ -1993,7 +1993,7 @@ subroutine find_cldtop(ncol, pver, cf, kcldtop) ibot = pver-1 kcldtop = ibot+1 kuppest = 20 - cfcrit = 1e-2 + cfcrit = 1.0d-2 do k = kuppest , ibot diff --git a/physics/micro_mg_utils.F90 b/physics/micro_mg_utils.F90 index 89dd7193e..ec1843317 100644 --- a/physics/micro_mg_utils.F90 +++ b/physics/micro_mg_utils.F90 @@ -480,15 +480,15 @@ elemental subroutine size_dist_param_liq_line(props, qcic, ncic, rho, pgam, lamc if (liq_gmao) then pgam = 0.0005714_r8*1.e-6_r8*ncic*rho + 0.2714_r8 ! Anning modified lamc - if ((ncic > 1.0e-3) .and. (qcic > 1.0e-11)) then + if ((ncic > 1.0e-3_r8) .and. (qcic > 1.0e-11_r8)) then xs = 0.07_r8*(1000._r8*qcic/ncic) ** (-0.14_r8) else - xs = 1.2 + xs = 1.2_r8 end if xs = max(min(xs, 1.7_r8), 1.1_r8) xs = xs*xs*xs - xs = (xs + sqrt(xs+8.0_r8)*sqrt(xs) - 4.)/8.0_r8 + xs = (xs + sqrt(xs+8.0_r8)*sqrt(xs) - 4.0_r8)/8.0_r8 pgam = sqrt(xs) else @@ -549,15 +549,15 @@ subroutine size_dist_param_liq_vect(props, qcic, ncic, rho, pgam, lamc, mgncol) if (liq_gmao) then pgam(i) = 0.0005714_r8*1.e-6_r8*ncic(i)*rho(i) + 0.2714_r8 - if ((ncic(i) > 1.0e-3) .and. (qcic(i) > 1.0e-11)) then + if ((ncic(i) > 1.0e-3_r8) .and. (qcic(i) > 1.0e-11_r8)) then xs = 0.07_r8*(1000._r8*qcic(i)/ncic(i)) **(-0.14_r8) else - xs = 1.2 + xs = 1.2_r8 end if xs = max(min(xs, 1.7_r8), 1.1_r8) xs = xs*xs*xs - xs = (xs + sqrt(xs+8.0_r8)*sqrt(xs) - 4.)/8.0_r8 + xs = (xs + sqrt(xs+8.0_r8)*sqrt(xs) - 4.0_r8)/8.0_r8 pgam(i) = sqrt(xs) else pgam(i) = one - 0.7_r8 * exp(-0.008_r8*1.e-6_r8*ncic(i)*rho(i)) @@ -705,14 +705,14 @@ elemental subroutine size_dist_param_ice_line(props, qic, nic, lam, n0) lam = (props%shape_coef * nic/qic)**(1._r8/props%eff_dim) if (ice_sep) then miu_ice = max(min(0.008_r8*(lam*0.01)**0.87_r8, 10.0_r8), 0.1_r8) - tx1 = 1. + miu_ice - tx2 = 1. / gamma(tx1) - aux = (gamma(tx1+3.)*tx2) ** (1./3.) + tx1 = 1.0_r8 + miu_ice + tx2 = 1.0_r8 / gamma(tx1) + aux = (gamma(tx1+3.0_r8)*tx2) ** (1.0_r8/3.0_r8) lam = lam*aux else - aux = 1. - tx1 = 1.0 - tx2 = 1.0 + aux = 1.0_r8 + tx1 = 1.0_r8 + tx2 = 1.0_r8 end if if (present(n0)) n0 = nic * lam**tx1*tx2 @@ -729,7 +729,7 @@ elemental subroutine size_dist_param_ice_line(props, qic, nic, lam, n0) end if else - lam = 0._r8 + lam = 0.0_r8 end if @@ -762,14 +762,14 @@ subroutine size_dist_param_ice_vect(props, qic, nic, lam, mgncol, n0) lam(i) = (props%shape_coef * nic(i)/qic(i))**(1._r8/props%eff_dim) if (ice_sep) then miu_ice = max(min(0.008_r8*(lam(i)*0.01)**0.87_r8, 10.0_r8), 0.1_r8) - tx1 = 1. + miu_ice - tx2 = 1. / gamma(tx1) - aux = (gamma(tx1+3.)*tx2) ** (1./3.) + tx1 = 1.0_r8 + miu_ice + tx2 = 1.0_r8 / gamma(tx1) + aux = (gamma(tx1+3.0_r8)*tx2) ** (1.0_r8/3.0_r8) lam(i) = lam(i)*aux else - aux = 1. - tx1 = 1.0 - tx2 = 1.0 + aux = 1.0_r8 + tx1 = 1.0_r8 + tx2 = 1.0_r8 end if if (present(n0)) n0(i) = nic(i) * lam(i)**tx1*tx2 @@ -786,7 +786,7 @@ subroutine size_dist_param_ice_vect(props, qic, nic, lam, mgncol, n0) end if else - lam(i) = 0._r8 + lam(i) = 0.0_r8 end if enddo @@ -1094,12 +1094,12 @@ subroutine liu_liq_autoconversion(pgam,qc,nc,qr,rho,relvar, & beta6 = (one+three*xs)*(one+four*xs)*(one+five*xs) & / ((one+xs)*(one+xs+xs)) LW = 1.0e-3_r8 * qc(i) * rho(i) - NW = nc(i) * rho(i) * 1.e-6_r8 + NW = nc(i) * rho(i) * 1.e-6_r8 - xs = min(20.0, 1.03e16*(LW*LW)/(NW*SQRT(NW))) - au(i) = 1.1e10*beta6*LW*LW*LW & + xs = min(20.0_r8, 1.03e16_r8*(LW*LW)/(NW*SQRT(NW))) + au(i) = 1.1e10_r8*beta6*LW*LW*LW & * (one-exp(-(xs**miu_disp))) / NW - au(i) = au(i)*1.0e3/rho(i) + au(i) = au(i)*1.0e3_r8/rho(i) au(i) = au(i) * gamma(two+relvar(i)) & / (gamma(relvar(i))*(relvar(i)*relvar(i))) @@ -2149,7 +2149,7 @@ subroutine graupel_collecting_snow(qsic,qric,umr,ums,rho,lamr,n0r,lams,n0s, & tx5 = tx4 * tx4 * tx3 psacr(i) = cons31 * tx1 * rho(i) * n0r(i) * n0s(i) * tx5 & - * (5.0*tx4+tx3*(tx2+tx2+0.5*tx3)) + * (5.0_r8*tx4+tx3*(tx2+tx2+0.5_r8*tx3)) ! psacr(i) = cons31*(((1.2_r8*umr(i)-0.95_r8*ums(i))**2+ & ! 0.08_r8*ums(i)*umr(i))**0.5_r8*rho(i)* & @@ -2201,7 +2201,7 @@ subroutine graupel_collecting_cld_water(qgic,qcic,ncic,rho,n0g,lamg,bg,agn, & do i=1,mgncol - if (qgic(i) >= 1.e-8 .and. qcic(i) >= qsmall) then + if (qgic(i) >= 1.e-8_r8 .and. qcic(i) >= qsmall) then tx1 = cons*agn(i)*rho(i)*n0g(i) / lamg(i)**(bg+three) @@ -2346,8 +2346,8 @@ subroutine graupel_collecting_rain(qric,qgic,umg,umr,ung,unr,rho,n0r,lamr,n0g,la ! pracg is mixing ratio of rain per sec collected by graupel/hail tx1 = 1.2_r8*umr(i) - 0.95_r8*umg(i) tx1 = sqrt(tx1*tx1+0.08_r8*umg(i)*umr(i)) - tx2 = 1.0 / lamr(i) - tx3 = 1.0 / lamg(i) + tx2 = 1.0_r8 / lamr(i) + tx3 = 1.0_r8 / lamg(i) tx4 = tx2 * tx2 tx5 = tx4 * tx4 * tx3 tx6 = rho(i) * n0r(i) * n0g(i) @@ -2710,10 +2710,10 @@ FUNCTION gamma_incomp(muice, x) real(r8) :: gamma_incomp REAL(r8), intent(in) :: muice, x REAL(r8) :: xog, kg, alfa, auxx - alfa = min(max(muice+1., 1.), 20._r8) + alfa = min(max(muice+1._r8, 1._r8), 20._r8) xog = log(alfa -0.3068_r8) - kg = 1.44818*(alfa**0.5357_r8) + kg = 1.44818_r8*(alfa**0.5357_r8) auxx = max(min(kg*(log(x)-xog), 30._r8), -30._r8) gamma_incomp = max(one/(one+exp(-auxx)), 1.0e-20) diff --git a/physics/moninshoc.f b/physics/moninshoc.f index eb6ccd7e7..5bdf0ceef 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -91,20 +91,21 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, &, ttend, utend, vtend, qtend &, spdk2, rbint, ri, zol1, robn, bvf2 ! - real(kind=kind_phys), parameter :: zolcr=0.2, - & zolcru=-0.5, rimin=-100., sfcfrac=0.1, - & crbcon=0.25, crbmin=0.15, crbmax=0.35, - & qmin=1.e-8, zfmin=1.e-8, qlmin=1.e-12, - & aphi5=5., aphi16=16., f0=1.e-4 - &, dkmin=0.0, dkmax=1000. -! &, dkmin=0.0, dkmax=1000., xkzminv=0.3 - &, prmin=0.25, prmax=4.0, vk=0.4, cfac=6.5 + real(kind=kind_phys), parameter :: one=1.0d0, zero=0.0d0 + &, zolcr=0.2d0, + & zolcru=-0.5d0, rimin=-100.0d0, sfcfrac=0.1d0, + & crbcon=0.25d0, crbmin=0.15d0, crbmax=0.35d0, + & qmin=1.0d-8, zfmin=1.0d-8, qlmin=1.0d-12, + & aphi5=5.0d0, aphi16=16.0d0, f0=1.0d-4 + &, dkmin=zero, dkmax=1000.0d0 +! &, dkmin=zero, dkmax=1000., xkzminv=0.3 + &, prmin=0.25d0, prmax=4.0d0, vk=0.4, cfac=6.5 real(kind=kind_phys) :: gravi, cont, conq, conw, gocp - gravi = 1.0/grav + gravi = one/grav cont = cp/grav conq = hvap/grav - conw = 1.0/grav + conw = one/grav gocp = grav/cp ! Initialize CCPP error handling variables @@ -122,7 +123,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, km1 = km - 1 kmpbl = km / 2 ! - rtg = 0.0 + rtg = zero ! do k=1,km do i=1,im @@ -137,24 +138,24 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! do k = 1,km1 do i=1,im - rdzt(i,k) = 1.0 / (zl(i,k+1) - zl(i,k)) - prnum(i,k) = 1.0 + rdzt(i,k) = one / (zl(i,k+1) - zl(i,k)) + prnum(i,k) = one enddo enddo ! Setup backgrond diffision do i=1,im - prnum(i,km) = 1.0 - tx1(i) = 1.0 / prsi(i,1) + prnum(i,km) = one + tx1(i) = one / prsi(i,1) enddo do k = 1,km1 do i=1,im - xkzo(i,k) = 0.0 - xkzmo(i,k) = 0.0 + xkzo(i,k) = zero + xkzmo(i,k) = zero ! if (k < kinver(i)) then if (k <= kinver(i)) then ! vertical background diffusivity for heat and momentum - tem1 = 1.0 - prsi(i,k+1) * tx1(i) - tem1 = min(1.0, exp(-tem1 * tem1 * 10.0)) + tem1 = one - prsi(i,k+1) * tx1(i) + tem1 = min(one, exp(-tem1 * tem1 * 10.0d0)) xkzo(i,k) = xkzm_h * tem1 xkzmo(i,k) = xkzm_m * tem1 endif @@ -165,9 +166,9 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! do k = 1,kmpbl do i=1,im - if(zi(i,k+1) > 250.) then + if(zi(i,k+1) > 250.0d0) then tem1 = (t1(i,k+1)-t1(i,k)) * rdzt(i,k) - if(tem1 > 1.e-5) then + if(tem1 > 1.0d-5) then xkzo(i,k) = min(xkzo(i,k),xkzminv) endif endif @@ -176,21 +177,21 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! ! do i = 1,im - z0(i) = 0.01 * zorl(i) + z0(i) = 0.01d0 * zorl(i) kpbl(i) = 1 hpbl(i) = zi(i,1) pblflg(i) = .true. sfcflg(i) = .true. - if(rbsoil(i) > 0.) sfcflg(i) = .false. - dusfc(i) = 0. - dvsfc(i) = 0. - dtsfc(i) = 0. - dqsfc(i) = 0. + if(rbsoil(i) > zero) sfcflg(i) = .false. + dusfc(i) = zero + dvsfc(i) = zero + dtsfc(i) = zero + dqsfc(i) = zero enddo ! do k = 1,km do i=1,im - tx1(i) = 0.0 + tx1(i) = zero enddo do kk=1,ncnd do i=1,im @@ -205,7 +206,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! do i = 1,im sflux(i) = heat(i) + evap(i)*fv*theta(i,1) - if(.not.sfcflg(i) .or. sflux(i) <= 0.) pblflg(i)=.false. + if(.not.sfcflg(i) .or. sflux(i) <= zero) pblflg(i)=.false. beta(i) = dt2 / (zi(i,2)-zi(i,1)) enddo ! @@ -220,11 +221,12 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, thermal(i) = thvx(i,1) crb(i) = crbcon else - thermal(i) = tsea(i)*(1.+fv*max(q1(i,1,1),qmin)) - tem = max(1.0, sqrt(u10m(i)*u10m(i) + v10m(i)*v10m(i))) + thermal(i) = tsea(i)*(one+fv*max(q1(i,1,1),qmin)) + tem = max(one, sqrt(u10m(i)*u10m(i) + v10m(i)*v10m(i))) robn = tem / (f0 * z0(i)) - tem1 = 1.e-7 * robn - crb(i) = max(min(0.16 * (tem1 ** (-0.18)), crbmax), crbmin) + tem1 = 1.0d-7 * robn + crb(i) = max(min(0.16d0 * (tem1 ** (-0.18d0)), crbmax), + & crbmin) endif enddo do k = 1, kmpbl @@ -243,9 +245,9 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if(kpbl(i) > 1) then k = kpbl(i) if(rbdn(i) >= crb(i)) then - rbint = 0. + rbint = zero elseif(rbup(i) <= crb(i)) then - rbint = 1. + rbint = one else rbint = (crb(i)-rbdn(i)) / (rbup(i)-rbdn(i)) endif @@ -270,11 +272,11 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if(sfcflg(i)) then ! phim(i) = (1.-aphi16*zol1)**(-1./4.) ! phih(i) = (1.-aphi16*zol1)**(-1./2.) - tem = 1.0 / max(1. - aphi16*zol1, 1.0e-8) + tem = one / max(one - aphi16*zol1, 1.0d-8) phih(i) = sqrt(tem) phim(i) = sqrt(phih(i)) else - phim(i) = 1. + aphi5*zol1 + phim(i) = one + aphi5*zol1 phih(i) = phim(i) endif enddo @@ -292,7 +294,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, do i = 1, im if(.not.flg(i)) then rbdn(i) = rbup(i) - spdk2 = max((u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)), 1.) + spdk2 = max((u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)), one) rbup(i) = (thvx(i,k)-thermal(i)) * phil(i,k) & / (thvx(i,1)*spdk2) kpbl(i) = k @@ -304,9 +306,9 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if (pblflg(i)) then k = kpbl(i) if(rbdn(i) >= crb(i)) then - rbint = 0. + rbint = zero elseif(rbup(i) <= crb(i)) then - rbint = 1. + rbint = one else rbint = (crb(i)-rbdn(i)) / (rbup(i)-rbdn(i)) endif @@ -344,19 +346,19 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, tem = u1(i,k) - u1(i,kp1) tem1 = v1(i,k) - v1(i,kp1) tem = (tem*tem + tem1*tem1) * rdz * rdz - bvf2 = (0.5*grav)*(thvx(i,kp1)-thvx(i,k))*rdz + bvf2 = (0.5d0*grav)*(thvx(i,kp1)-thvx(i,k))*rdz & / (t1(i,k)+t1(i,kp1)) ri = max(bvf2/tem,rimin) - if(ri < 0.) then ! unstable regime - prnum(i,kp1) = 1.0 + if(ri < zero) then ! unstable regime + prnum(i,kp1) = one else - prnum(i,kp1) = min(1.0 + 2.1*ri, prmax) + prnum(i,kp1) = min(one + 2.1d0*ri, prmax) endif elseif (k > 1) then prnum(i,kp1) = prnum(i,1) endif ! -! prnum(i,kp1) = 1.0 +! prnum(i,kp1) = one prnum(i,kp1) = max(prmin, min(prmax, prnum(i,kp1))) tem = tkh(i,kp1) * prnum(i,kp1) dku(i,k) = max(min(tem+xkzmo(i,k), dkmax), xkzmo(i,k)) @@ -367,7 +369,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! compute tridiagonal matrix elements for heat and moisture ! do i=1,im - ad(i,1) = 1. + ad(i,1) = one a1(i,1) = t1(i,1) + beta(i) * heat(i) a2(i,1) = q1(i,1,1) + beta(i) * evap(i) enddo @@ -399,7 +401,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, al(i,k) = -dtodsu*dsdz2 ! ad(i,k) = ad(i,k)-au(i,k) - ad(i,kp1) = 1.-al(i,k) + ad(i,kp1) = one - al(i,k) dsdzt = tem1 * gocp a1(i,k) = a1(i,k) + dtodsd*dsdzt a1(i,kp1) = t1(i,kp1) - dtodsu*dsdzt @@ -458,7 +460,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! compute tridiagonal matrix elements for momentum ! do i=1,im - ad(i,1) = 1.0 + beta(i) * stress(i) / spd1(i) + ad(i,1) = one + beta(i) * stress(i) / spd1(i) a1(i,1) = u1(i,1) a2(i,1) = v1(i,1) enddo @@ -476,7 +478,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, al(i,k) = -dtodsu*dsdz2 ! ad(i,k) = ad(i,k) - au(i,k) - ad(i,kp1) = 1.0 - al(i,k) + ad(i,kp1) = one - al(i,k) a1(i,kp1) = u1(i,kp1) a2(i,kp1) = v1(i,kp1) ! @@ -503,7 +505,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! compute tridiagonal matrix elements for tke ! do i=1,im - ad(i,1) = 1.0 + ad(i,1) = one a1(i,1) = q1(i,1,ntke) enddo ! @@ -520,7 +522,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, al(i,k) = -dtodsu*dsdz2 ! ad(i,k) = ad(i,k) - au(i,k) - ad(i,kp1) = 1.0 - al(i,k) + ad(i,kp1) = one - al(i,k) a1(i,kp1) = q1(i,kp1,ntke) enddo enddo diff --git a/physics/rascnv.F90 b/physics/rascnv.F90 index 49d93e3fb..40d0ecb0d 100644 --- a/physics/rascnv.F90 +++ b/physics/rascnv.F90 @@ -13,34 +13,34 @@ module rascnv integer, parameter :: nrcmax=32 ! Maximum # of random clouds per 1200s integer, parameter :: idnmax=999 - real (kind=kind_phys), parameter :: delt_c=1800.0/3600.0 & + real (kind=kind_phys), parameter :: delt_c=1800.0d0/3600.0d0 & ! Adjustment time scales in hrs for deep and shallow clouds ! &, adjts_d=3.0, adjts_s=0.5 ! &, adjts_d=2.5, adjts_s=0.5 - &, adjts_d=2.0, adjts_s=0.5 + &, adjts_d=2.0d0, adjts_s=0.5d0 ! logical, parameter :: fix_ncld_hr=.true. ! - real (kind=kind_phys), parameter :: ZERO=0.0, HALF=0.5 & - &, pt25=0.25 & - &, ONE=1.0, TWO=2.0, FOUR=4.& - &, twoo3=two/3.0 & - &, FOUR_P2=4.E2, ONE_M10=1.E-10 & - &, ONE_M6=1.E-6, ONE_M5=1.E-5 & - &, ONE_M2=1.E-2, ONE_M1=1.E-1 & - &, oneolog10=one/log(10.0) & - &, facmb = 0.01 & ! conversion factor from Pa to hPa (or mb) - &, cmb2pa = 100.0 ! Conversion from hPa to Pa -! - real(kind=kind_phys), parameter :: frac=0.5, crtmsf=0.0 & - &, rhfacs=0.75, rhfacl=0.75 & - &, face=5.0, delx=10000.0 & - &, ddfac=face*delx*0.001 & - &, max_neg_bouy=0.15 & -! &, max_neg_bouy=pt25 & + real (kind=kind_phys), parameter :: ZERO=0.0d0, HALF=0.5d0 & + &, pt25=0.25d0, ONE=1.0d0 & + &, TWO=2.0d0, FOUR=4.0d0 & + &, twoo3=two/3.0d0 & + &, FOUR_P2=4.0d2, ONE_M10=1.0d-10& + &, ONE_M6=1.0d-6, ONE_M5=1.0d-5 & + &, ONE_M2=1.0d-2, ONE_M1=1.0d-1 & + &, oneolog10=one/log(10.0d0) & + &, facmb = 0.01d0 & ! conversion factor from Pa to hPa (or mb) + &, cmb2pa = 100.0d0 ! Conversion from hPa to Pa +! + real(kind=kind_phys), parameter :: frac=0.5d0, crtmsf=0.0d0 & + &, rhfacs=0.75d0, rhfacl=0.75d0 & + &, face=5.0d0, delx=10000.0d0 & + &, ddfac=face*delx*0.001d0 & + &, max_neg_bouy=0.15d0 & +! &, max_neg_bouy=pt25d0 & &, testmb=0.1, testmbi=one/testmb & - &, dpd=0.5, rknob=1.0, eknob=1.0 + &, dpd=0.5d0, rknob=1.0d0, eknob=1.0d0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! logical, parameter :: do_aw=.true., cumfrc=.true. & @@ -52,17 +52,17 @@ module rascnv ! &, advcld=.true., advups=.false.,advtvd=.false. - real(kind=kind_phys), parameter :: TF=233.16, TCR=273.16 & - &, TCRF=1.0/(TCR-TF), TCL=2.0 + real(kind=kind_phys), parameter :: TF=233.16d0, TCR=273.16d0 & + &, TCRF=one/(TCR-TF), TCL=2.0d0 ! ! For pressure gradient force in momentum mixing ! real (kind=kind_phys), parameter :: pgftop=0.80, pgfbot=0.30 & ! No pressure gradient force in momentum mixing - real (kind=kind_phys), parameter :: pgftop=0.0, pgfbot=0.0 & + real (kind=kind_phys), parameter :: pgftop=0.0d0, pgfbot=0.0d0 & ! real (kind=kind_phys), parameter :: pgftop=0.55, pgfbot=0.55 & - &, pgfgrad=(pgfbot-pgftop)*0.001 & - &, cfmax=0.1 + &, pgfgrad=(pgfbot-pgftop)*0.001d0& + &, cfmax=0.1d0 ! ! For Tilting Angle Specification ! @@ -167,7 +167,7 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & ! ! VTP = 36.34*SQRT(1.2)* (0.001)**0.1364 ! - AFC = -(1.01097E-4*DT)*(3600./DT)**0.57777778 + AFC = -(1.01097d-4*DT)*(3600.0d0/DT)**0.57777778d0 ! grav = con_g ; cp = con_cp ; alhl = con_hvap alhf = con_hfus ; rgas = con_rd @@ -182,12 +182,12 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & rkap = rgas * onebcp ; deg2rad = pi/180.d0 ELOCP = ALHL * onebcp ; ELFOCP = (ALHL+ALHF) * onebcp oneoalhl = one/alhl ; CMPOR = CMB2PA / RGAS - picon = half*pi*onebg ; zfac = 0.28888889E-4 * ONEBG + picon = half*pi*onebg ; zfac = 0.28888889d-4 * ONEBG testmboalhl = testmb/alhl ! - rvi = one/rv ; facw=CVAP-CLIQ - faci = CVAP-CSOL ; hsub=alhl+alhf - tmix = TTP-20.0 ; DEN=one/(TTP-TMIX) + rvi = one/rv ; facw=CVAP-CLIQ + faci = CVAP-CSOL ; hsub=alhl+alhf + tmix = TTP-20.0d0 ; DEN=one/(TTP-TMIX) ! if (me == 0) write(0,*) ' NO DOWNDRAFT FOR CLOUD TYPES' & @@ -365,7 +365,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & integer, dimension(100) :: ic - real(kind=kind_phys), parameter :: clwmin=1.0e-10 + real(kind=kind_phys), parameter :: clwmin=1.0d-10 ! real(kind=kind_phys), allocatable :: ALFINT(:,:), uvi(:,:) & &, trcfac(:,:), rcu(:,:) @@ -487,23 +487,23 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & if (flipv) ll = kp1 -l ! Input variables are bottom to top! SGC = prsl(ipt,ll) * tem sgcs(l,ipt) = sgc - IF (SGC <= 0.050) KRMIN = L -! IF (SGC <= 0.700) KRMAX = L -! IF (SGC <= 0.800) KRMAX = L - IF (SGC <= 0.760) KRMAX = L -! IF (SGC <= 0.930) KFMAX = L - IF (SGC <= 0.970) KFMAX = L ! Commented on 20060202 -! IF (SGC <= 0.700) kblmx = L ! Commented on 20101015 - IF (SGC <= 0.600) kblmx = L ! -! IF (SGC <= 0.650) kblmx = L ! Commented on 20060202 - IF (SGC <= 0.980) kblmn = L ! + IF (SGC <= 0.050d0) KRMIN = L +! IF (SGC <= 0.700d0) KRMAX = L +! IF (SGC <= 0.800d0) KRMAX = L + IF (SGC <= 0.760d0) KRMAX = L +! IF (SGC <= 0.930d0) KFMAX = L + IF (SGC <= 0.970d0) KFMAX = L ! Commented on 20060202 +! IF (SGC <= 0.700d0) kblmx = L ! Commented on 20101015 + IF (SGC <= 0.600d0) kblmx = L ! +! IF (SGC <= 0.650d0) kblmx = L ! Commented on 20060202 + IF (SGC <= 0.980d0) kblmn = L ! ENDDO krmin = max(krmin,2) ! if (fix_ncld_hr) then !!! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1200) + 0.50001 - NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1800) + 0.10001 + NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1800) + 0.10001d0 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1200) + 0.10001 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/900) + 0.50001 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/600) + 0.50001 @@ -513,7 +513,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & facdt = delt_c / dt else NCRND = min(nrcmax, (KRMAX-KRMIN+1)) - facdt = one / 3600.0 + facdt = one / 3600.0d0 endif NCRND = min(nrcm,max(NCRND, 1)) ! @@ -537,7 +537,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & IF (NCRND > 0) THEN DO I=1,NCRND II = mod(i-1,nrcm) + 1 - IRND = (RANNUM(ipt,II)-0.0005)*(KCR-KRMIN+1) + IRND = (RANNUM(ipt,II)-0.0005d0)*(KCR-KRMIN+1) IC(KFX+I) = IRND + KRMIN ENDDO ENDIF @@ -582,7 +582,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & if (ntr > 0) then ! tracers such as O3, dust etc do n=1,ntr uvi(l,n) = ccin(ipt,ll,n+2) - if (abs(uvi(l,n)) < 1.0e-20) uvi(l,n) = zero + if (abs(uvi(l,n)) < 1.0d-20) uvi(l,n) = zero enddo endif enddo @@ -593,7 +593,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & phi_h(LL) = phii(ipt,L) enddo ! - if (ccin(ipt,1,2) <= -999.0) then ! input ice/water are together + if (ccin(ipt,1,2) <= -998.0) then ! input ice/water are together do l=1,k ll = kp1 -l tem = ccin(ipt,ll,1) & @@ -631,7 +631,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & if (ntr > 0) then ! tracers such as O3, dust etc do n=1,ntr uvi(l,n) = ccin(ipt,l,n+2) - if (abs(uvi(l,n)) < 1.0e-20) uvi(l,n) = zero + if (abs(uvi(l,n)) < 1.0d-20) uvi(l,n) = zero enddo endif enddo @@ -641,7 +641,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & phi_h(L) = phii(ipt,L) ENDDO ! - if (ccin(ipt,1,2) <= -999.0) then ! input ice/water are together + if (ccin(ipt,1,2) <= -998.0) then ! input ice/water are together do l=1,k tem = ccin(ipt,l,1) & & * MAX(ZERO, MIN(ONE, (TCR-toi(L))*TCRF)) @@ -688,7 +688,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd=',dtvd(:,1) - if (abs(dtvd(2,1)) > 1.0e-10) then + if (abs(dtvd(2,1)) > 1.0d-10) then tem1 = dtvd(1,1) / dtvd(2,1) tem2 = abs(tem1) alfint(l,1) = one - half*(tem1 + tem2)/(one + tem2) ! for h @@ -702,7 +702,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd2=',dtvd(:,2) - if (abs(dtvd(2,2)) > 1.0e-10) then + if (abs(dtvd(2,2)) > 1.0d-10) then tem1 = dtvd(1,2) / dtvd(2,2) tem2 = abs(tem1) alfint(l,2) = one - half*(tem1 + tem2)/(one + tem2) ! for q @@ -713,7 +713,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd3=',dtvd(:,3) - if (abs(dtvd(2,3)) > 1.0e-10) then + if (abs(dtvd(2,3)) > 1.0d-10) then tem1 = dtvd(1,3) / dtvd(2,3) tem2 = abs(tem1) alfint(l,3) = one - half*(tem1 + tem2)/(one + tem2) ! for ql @@ -724,7 +724,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd4=',dtvd(:,4) - if (abs(dtvd(2,4)) > 1.0e-10) then + if (abs(dtvd(2,4)) > 1.0d-10) then tem1 = dtvd(1,4) / dtvd(2,4) tem2 = abs(tem1) alfint(l,4) = one - half*(tem1 + tem2)/(one + tem2) ! for qi @@ -741,7 +741,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvdn=',dtvd(:,1),' n=',n,' l=',l - if (abs(dtvd(2,1)) > 1.0e-10) then + if (abs(dtvd(2,1)) > 1.0d-10) then tem1 = dtvd(1,1) / dtvd(2,1) tem2 = abs(tem1) alfint(l,n+4) = one - half*(tem1 + tem2)/(one + tem2) ! for tracers @@ -850,7 +850,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & FLXD(L) = zero enddo ! - TLA = -10.0 + TLA = -10.0d0 ! qiid = qii(ib) ! cloud top level ice before convection qlid = qli(ib) ! cloud top level water before convection @@ -906,7 +906,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! CNV_DQLDT(ipt,ib) = CNV_DQLDT(ipt,ib) ! & + max(0.,(QLI(ib)+QII(ib)-qiid-qlid))/dt CNV_DQLDT(ipt,ib) = CNV_DQLDT(ipt,ib) + flx(ib)* & - & max(0.,(QLI(ib)+QII(ib)-qiid-qlid))/dt + & max(zero,(QLI(ib)+QII(ib)-qiid-qlid))/dt ! & max(0.,(QLI(ib)+QII(ib)))/dt/3. if(flx(ib)<0) write(*,*)"AAA666", flx(ib),QLI(ib),QII(ib) & & ,ipt,ib @@ -930,7 +930,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! ENDDO ! End of the NC loop! ! - RAINC(ipt) = rain * 0.001 ! Output rain is in meters + RAINC(ipt) = rain * 0.001d0 ! Output rain is in meters ktop(ipt) = kp1 kbot(ipt) = 0 @@ -944,9 +944,9 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! clw(i) = max(clw(i), zero) ! cli(i) = max(cli(i), zero) - if (sgcs(l,ipt) < 0.93 .and. abs(tcu(l)) > one_m10) then -! if (sgcs(l,ipt) < 0.90 .and. tcu(l) .ne. 0.0) then -! if (sgcs(l,ipt) < 0.85 .and. tcu(l) .ne. 0.0) then + if (sgcs(l,ipt) < 0.93d0 .and. abs(tcu(l)) > one_m10) then +! if (sgcs(l,ipt) < 0.90d0 .and. tcu(l) .ne. 0.0) then +! if (sgcs(l,ipt) < 0.85d0 .and. tcu(l) .ne. 0.0) then kcnv(ipt) = 1 endif ! New test for convective clouds ! added in 08/21/96 @@ -972,18 +972,18 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & QLCN(ipt,ll) = max(qli(l)-ccin(ipt,ll,2), zero) QICN(ipt,ll) = max(qii(l)-ccin(ipt,ll,1), zero) CNV_FICE(ipt,ll) = QICN(ipt,ll) & - & / max(1.e-10,QLCN(ipt,ll)+QICN(ipt,ll)) + & / max(1.d-10,QLCN(ipt,ll)+QICN(ipt,ll)) else QLCN(ipt,ll) = qli(l) QICN(ipt,ll) = qii(l) - CNV_FICE(ipt,ll) = qii(l)/max(1.e-10,qii(l)+qli(l)) + CNV_FICE(ipt,ll) = qii(l)/max(1.d-10,qii(l)+qli(l)) endif - cf_upi(ipt,ll) = max(zero,min(0.02*log(one+ & - & 500*ud_mf(ipt,ll)/dt), cfmax)) + cf_upi(ipt,ll) = max(zero,min(0.02d0*log(one+ & + & 500.0d0*ud_mf(ipt,ll)/dt), cfmax)) ! & 500*ud_mf(ipt,ll)/dt), 0.60)) CLCN(ipt,ll) = cf_upi(ipt,ll) !downdraft is below updraft w_upi(ipt,ll) = ud_mf(ipt,ll)*toi(l)*rgas / & - & (dt*max(cf_upi(ipt,ll),1.e-12)*prsl(ipt,ll)) + & (dt*max(cf_upi(ipt,ll),1.d-12)*prsl(ipt,ll)) endif if (ntr > 0) then @@ -1023,21 +1023,21 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & QLCN(ipt,l) = max(qli(l)-ccin(ipt,l,2), zero) QICN(ipt,l) = max(qii(l)-ccin(ipt,l,1), zero) CNV_FICE(ipt,l) = QICN(ipt,l) & - & / max(1.e-10,QLCN(ipt,l)+QICN(ipt,l)) + & / max(1.d-10,QLCN(ipt,l)+QICN(ipt,l)) else QLCN(ipt,l) = qli(l) QICN(ipt,l) = qii(l) - CNV_FICE(ipt,l) = qii(l)/max(1.e-10,qii(l)+qli(l)) + CNV_FICE(ipt,l) = qii(l)/max(1.d-10,qii(l)+qli(l)) endif !! CNV_PRC3(ipt,l) = PCU(l)/dt ! CNV_PRC3(ipt,l) = zero ! if(PCU(l) < zero) write(*,*)"AAA777",PCU(l),ipt,l - cf_upi(ipt,l) = max(zero,min(0.02*log(one+ & - & 500*ud_mf(ipt,l)/dt), cfmax)) + cf_upi(ipt,l) = max(zero,min(0.02d0*log(one+ & + & 500.d0*ud_mf(ipt,l)/dt), cfmax)) ! & 500*ud_mf(ipt,l)/dt), 0.60)) CLCN(ipt,l) = cf_upi(ipt,l) !downdraft is below updraft w_upi(ipt,l) = ud_mf(ipt,l)*toi(l)*rgas / & - & (dt*max(cf_upi(ipt,l),1.e-12)*prsl(ipt,l)) + & (dt*max(cf_upi(ipt,l),1.d-12)*prsl(ipt,l)) endif if (ntr > 0) then @@ -1140,33 +1140,33 @@ SUBROUTINE CLOUD( & ! IMPLICIT NONE ! - real (kind=kind_phys), parameter :: RHMAX=1.0 & ! MAX RELATIVE HUMIDITY - &, QUAD_LAM=1.0 & ! MASK FOR QUADRATIC LAMBDA - &, RHRAM=0.05 & ! PBL RELATIVE HUMIDITY RAMP -! &, RHRAM=0.15 !& ! PBL RELATIVE HUMIDITY RAMP - &, HCRITD=4000.0 & ! Critical Moist Static Energy for Deep clouds - &, HCRITS=2000.0 & ! Critical Moist Static Energy for Shallow clouds - &, pcrit_lcl=250.0 & ! Critical pressure difference between boundary layer top - ! layer top and lifting condensation level (hPa) -! &, hpert_fac=1.01 !& ! Perturbation on hbl when ctei=.true. -! &, hpert_fac=1.005 !& ! Perturbation on hbl when ctei=.true. + real (kind=kind_phys), parameter :: RHMAX=1.0d0 & ! MAX RELATIVE HUMIDITY + &, QUAD_LAM=1.0d0 & ! MASK FOR QUADRATIC LAMBDA + &, RHRAM=0.05d0 & ! PBL RELATIVE HUMIDITY RAMP +! &, RHRAM=0.15d0 !& ! PBL RELATIVE HUMIDITY RAMP + &, HCRITD=4000.0d0 & ! Critical Moist Static Energy for Deep clouds + &, HCRITS=2000.0d0 & ! Critical Moist Static Energy for Shallow clouds + &, pcrit_lcl=250.0d0 & ! Critical pressure difference between boundary layer top + ! layer top and lifting condensation level (hPa) +! &, hpert_fac=1.01d0 !& ! Perturbation on hbl when ctei=.true. +! &, hpert_fac=1.005d0 !& ! Perturbation on hbl when ctei=.true. &, qudfac=quad_lam*half & - &, shalfac=3.0 & + &, shalfac=3.0d0 & ! &, qudfac=quad_lam*pt25, shalfac=3.0 !& ! Yogesh's - &, c0ifac=0.07 & ! following Han et al, 2016 MWR - &, dpnegcr = 150.0 -! &, dpnegcr = 100.0 -! &, dpnegcr = 200.0 -! - real(kind=kind_phys), parameter :: ERRMIN=0.0001 & - &, ERRMI2=0.1*ERRMIN & -! &, rainmin=1.0e-9 !& - &, rainmin=1.0e-8 & - &, oneopt9=1.0/0.09 & - &, oneopt4=1.0/0.04 - real(kind=kind_phys), parameter :: almax=1.0e-2 & - &, almin1=0.0, almin2=0.0 - real(kind=kind_phys), parameter :: bldmax = 300.0, bldmin=25.0 + &, c0ifac=0.07d0 & ! following Han et al, 2016 MWR + &, dpnegcr = 150.0d0 +! &, dpnegcr = 100.0d0 +! &, dpnegcr = 200.0d0 +! + real(kind=kind_phys), parameter :: ERRMIN=0.0001d0 & + &, ERRMI2=0.1d0*ERRMIN & +! &, rainmin=1.0d-9 !& + &, rainmin=1.0d-8 & + &, oneopt9=1.0d0/0.09d0 & + &, oneopt4=1.0d0/0.04d0 + real(kind=kind_phys), parameter :: almax=1.0d-2 & + &, almin1=0.0d0, almin2=0.0d0 + real(kind=kind_phys), parameter :: bldmax=300.0d0, bldmin=25.0d0 ! ! INPUT ARGUMENTS @@ -1371,8 +1371,14 @@ SUBROUTINE CLOUD( & ! To determine KBL internally -- If KBL is defined externally ! the following two loop should be skipped ! - hcrit = hcritd - if (sgcs(kd) > 0.65) hcrit = hcrits + if (sgcs(kd) < 0.5d0) then + hcrit = hcritd + elseif (sgcs(kd) > 0.65d0) then + hcrit = hcrits + else + hcrit = (hcrits*(sgcs(kd)-0.5d0) + hcritd*(0.65d0-sgcs(kd)))& + & * (one/0.15d0) + endif IF (CALKBL) THEN KTEM = MAX(KD+1, KBLMX) hmin = hol(k) @@ -1455,7 +1461,7 @@ SUBROUTINE CLOUD( & ii = max(kbl,kd1) kbl = max(klcl,kd1) - tem = min(50.0,max(10.0,(prl(kmaxp1)-prl(kd))*0.10)) + tem = min(50.0d0,max(10.0d0,(prl(kmaxp1)-prl(kd))*0.10d0)) if (prl(kmaxp1) - prl(ii) > tem .and. ii > kbl) kbl = ii @@ -1515,7 +1521,7 @@ SUBROUTINE CLOUD( & ! shal_fac = one ! if (prl(kbl)-prl(kd) < 300.0 .and. kmax == k) shal_fac = shalfac - if (prl(kbl)-prl(kd) < 350.0 .and. kmax == k) shal_fac = shalfac + if (prl(kbl)-prl(kd) < 350.0d0 .and. kmax == k) shal_fac = shalfac DO L=Kmax,KD,-1 IF (L >= KBL) THEN ETA(L) = (PRL(Kmaxp1)-PRL(L)) * PRISM @@ -1577,7 +1583,7 @@ SUBROUTINE CLOUD( & endif enddo ! - if (lcon == kd .or. kbl <= kd .or. prl(kbl)-prsm(lcon) > 150.0) & + if (lcon == kd .or. kbl <= kd .or. prl(kbl)-prsm(lcon) > 150.0d0) & & return ! TX1 = RHFACS - QBL / TX1 ! Average RH @@ -1587,9 +1593,9 @@ SUBROUTINE CLOUD( & IF (.NOT. cnvflg) RETURN ! - RHC = MAX(ZERO, MIN(ONE, EXP(-20.0*TX1) )) + RHC = MAX(ZERO, MIN(ONE, EXP(-20.0d0*TX1) )) ! - wcbase = 0.1 + wcbase = 0.1d0 if (ntrc > 0) then DO N=1,NTRC RBL(N) = ROI(Kmax,N) * ETA(Kmax) @@ -1602,9 +1608,9 @@ SUBROUTINE CLOUD( & ! ! if (ntk > 0 .and. do_aw) then if (ntk > 0) then - if (rbl(ntk) > 0.0) then - wcbase = min(2.0, max(wcbase, sqrt(twoo3*rbl(ntk)))) -! wcbase = min(1.0, max(wcbase, sqrt(twoo3*rbl(ntk)))) + if (rbl(ntk) > zero) then + wcbase = min(two, max(wcbase, sqrt(twoo3*rbl(ntk)))) +! wcbase = min(one, max(wcbase, sqrt(twoo3*rbl(ntk)))) endif endif @@ -1665,7 +1671,7 @@ SUBROUTINE CLOUD( & QLL(KD ) = ALHF * GAF(KD) * QIL(KD) + ONE ! st1 = qil(kd) - st2 = c0i * st1 * exp(c0ifac*min(tol(kd)-t0c,0.0)) + st2 = c0i * st1 * exp(c0ifac*min(tol(kd)-t0c,zero)) tem = c0 * (one-st1) tem2 = st2*qi0 + tem*qw0 ! @@ -1687,7 +1693,7 @@ SUBROUTINE CLOUD( & AKC(L) = one / AKT(L) ! st1 = half * (qil(l)+qil(lp1)) - st2 = c0i * st1 * exp(c0ifac*min(tol(lp1)-t0c,0.0)) + st2 = c0i * st1 * exp(c0ifac*min(tol(lp1)-t0c,zero)) tem = c0 * (one-st1) tem2 = st2*qi0 + tem*qw0 ! @@ -1746,13 +1752,13 @@ SUBROUTINE CLOUD( & HSU = HSU - ALM * TX3 ! CLP = ZERO - ALM = -100.0 + ALM = -100.0d0 HOS = HOL(KD) QOS = QOL(KD) QIS = CIL(KD) QLS = CLL(KD) - cnvflg = HBL > HSU .and. abs(tx1) > 1.0e-4 + cnvflg = HBL > HSU .and. abs(tx1) > 1.0d-4 !*********************************************************************** @@ -1769,7 +1775,7 @@ SUBROUTINE CLOUD( & if (tx2 == zero) then alm = - st2 / tx1 - if (alm > almax) alm = -100.0 + if (alm > almax) alm = -100.0d0 else x00 = tx2 + tx2 epp = tx1 * tx1 - (x00+x00)*st2 @@ -1778,8 +1784,8 @@ SUBROUTINE CLOUD( & tem = sqrt(epp) tem1 = (-tx1-tem)*x00 tem2 = (-tx1+tem)*x00 - if (tem1 > almax) tem1 = -100.0 - if (tem2 > almax) tem2 = -100.0 + if (tem1 > almax) tem1 = -100.0d0 + if (tem2 > almax) tem2 = -100.0d0 alm = max(tem1,tem2) endif @@ -1850,12 +1856,12 @@ SUBROUTINE CLOUD( & ACR = zero TEM = PRL(KD1) - (PRL(KD1)-PRL(KD)) * CLP * HALF tx1 = PRL(KBL) - TEM - tx2 = min(900.0, max(tx1,100.0)) - tem1 = log(tx2*0.01) * oneolog10 + tx2 = min(900.0d0, max(tx1,100.0d0)) + tem1 = log(tx2*0.01d0) * oneolog10 tem2 = one - tem1 if ( kdt == 1 ) then -! rel_fac = (dt * facdt) / (tem1*12.0 + tem2*3.0) - rel_fac = (dt * facdt) / (tem1*6.0 + tem2*adjts_s) +! rel_fac = (dt * facdt) / (tem1*12.0d0 + tem2*3.0) + rel_fac = (dt * facdt) / (tem1*6.0d0 + tem2*adjts_s) else rel_fac = (dt * facdt) / (tem1*adjts_d + tem2*adjts_s) endif @@ -1864,7 +1870,7 @@ SUBROUTINE CLOUD( & rel_fac = max(zero, min(half,rel_fac)) IF (CRTFUN) THEN - iwk = tem*0.02-0.999999999 + iwk = tem*0.02d0 - 0.999999999d0 iwk = MAX(1, MIN(iwk, 16)) ACR = tx1 * (AC(iwk) + tem * AD(iwk)) * CCWF ENDIF @@ -2037,7 +2043,7 @@ SUBROUTINE CLOUD( & ! CALCUP = .FALSE. - TEM = max(0.05, MIN(CD*200.0, MAX_NEG_BOUY)) + TEM = max(0.05d0, MIN(CD*200.0d0, MAX_NEG_BOUY)) IF (.not. cnvflg .and. WFN > ACR .and. & & dpneg < dpnegcr .and. AKM <= TEM) CALCUP = .TRUE. @@ -2080,7 +2086,7 @@ SUBROUTINE CLOUD( & ENDIF PL = (PRL(KD1) + PRL(KD))*HALF - IF (TRAIN > 1.0E-4 .AND. PL <= dpd*prl(kp1)) DDFT = .TRUE. + IF (TRAIN > 1.0d-4 .AND. PL <= dpd*prl(kp1)) DDFT = .TRUE. ENDIF ! IF (DDFT) THEN ! Downdraft scheme based on (Cheng and Arakawa, 1997) @@ -2395,7 +2401,7 @@ SUBROUTINE CLOUD( & ! sigf(kd) = max(zero, min(one, tx1 * tx1)) ! endif if (do_aw) then - tx1 = (0.2 / max(alm, 1.0e-5)) + tx1 = (0.2d0 / max(alm, 1.0d-5)) tx2 = one - min(one, pi * tx1 * tx1 / area) tx2 = tx2 * tx2 @@ -2519,8 +2525,8 @@ SUBROUTINE CLOUD( & endif enddo tem = tem + amb * dof * sigf(kbl) - tem = tem * (3600.0/dt) - tem1 = sqrt(max(one, min(100.0,(6.25E10/max(area,one))))) ! 20110530 + tem = tem * (3600.0d0/dt) + tem1 = sqrt(max(one, min(100.0d0,(6.25d10/max(area,one))))) ! 20110530 clfrac = max(ZERO, min(half, rknob*clf(tem)*tem1)) cldfrd = clfrac @@ -2567,7 +2573,7 @@ SUBROUTINE CLOUD( & tem4 = zero if (tx1 > zero) & - & TEM4 = POTEVAP * (one - EXP( tx4*TX1**0.57777778 ) ) + & TEM4 = POTEVAP * (one - EXP( tx4*TX1**0.57777778d0 ) ) ACTEVAP = MIN(TX1, TEM4*CLFRAC) @@ -2575,7 +2581,7 @@ SUBROUTINE CLOUD( & ! tem4 = zero if (tx2 > zero) & - & TEM4 = POTEVAP * (one - EXP( tx4*TX2**0.57777778 ) ) + & TEM4 = POTEVAP * (one - EXP( tx4*TX2**0.57777778d0 ) ) TEM4 = min(MIN(TX2, TEM4*CLDFRD), potevap-actevap) if (tx2 < rainmin*dt) tem4 = min(tx2, potevap-actevap) ! @@ -2644,7 +2650,7 @@ SUBROUTINE CLOUD( & ! following Liu et al. [JGR,2001] Eq 1 if (FSCAV_(N) > zero) then - DELZKM = ( PHIL(KD) - PHIH(KD1) ) *(onebg*0.001) + DELZKM = ( PHIL(KD) - PHIH(KD1) ) *(onebg*0.001d0) FNOSCAV = exp(- FSCAV_(N) * DELZKM) else FNOSCAV = one @@ -2654,7 +2660,7 @@ SUBROUTINE CLOUD( & & * FNOSCAV DO L=KD1,K if (FSCAV_(N) > zero) then - DELZKM = ( PHIL(KD) - PHIH(L+1) ) *(onebg*0.001) + DELZKM = ( PHIL(KD) - PHIH(L+1) ) *(onebg*0.001d0) FNOSCAV = exp(- FSCAV_(N) * DELZKM) endif lm1 = l - 1 @@ -2773,7 +2779,7 @@ SUBROUTINE DDRFT( & &, IT, KM1, KTEM, KK, KK1, LM1, LL, LP1 & &, IDW, IDH, IDN(K), idnm, itr ! - parameter (ERRMIN=0.0001, ERRMI2=0.1*ERRMIN) + parameter (ERRMIN=0.0001d0, ERRMI2=0.1d0*ERRMIN) ! parameter (ERRMIN=0.00001, ERRMI2=0.1*ERRMIN) ! ! real (kind=kind_phys), parameter :: PIINV=one/PI, pio2=half*pi @@ -2783,8 +2789,9 @@ SUBROUTINE DDRFT( & ! parameter (ONPG=1.0+0.5, GMF=1.0/ONPG, RPART=0.5) ! PARAMETER (AA1=1.0, BB1=1.5, CC1=1.1, DD1=0.85, F3=CC1, F5=2.5) ! PARAMETER (AA1=2.0, BB1=1.5, CC1=1.1, DD1=0.85, F3=CC1, F5=2.5) - PARAMETER (AA1=1.0, BB1=1.0, CC1=1.0, DD1=1.0, F3=CC1, F5=1.0) - parameter (QRMIN=1.0E-6, WC2MIN=0.01, GMF1=GMF/AA1, GMF5=GMF/F5) + PARAMETER (AA1=1.0d0, BB1=1.0d0, CC1=1.0d0, DD1=1.0d0, & + & F3=CC1, F5=1.0d0) + parameter (QRMIN=1.0d-6, WC2MIN=0.01d0, GMF1=GMF/AA1, GMF5=GMF/F5) ! parameter (QRMIN=1.0E-6, WC2MIN=1.00, GMF1=GMF/AA1, GMF5=GMF/F5) parameter (WCMIN=sqrt(wc2min)) ! parameter (sialf=0.5) @@ -2793,11 +2800,12 @@ SUBROUTINE DDRFT( & &, itrmin=15, itrmnd=12, numtla=2 ! uncentering for vvel in dd - real(kind=kind_phys), parameter :: ddunc1=0.25, ddunc2=one-ddunc1 & + real(kind=kind_phys), parameter :: ddunc1=0.25d0 & + &, ddunc2=one-ddunc1 & ! &, ddunc1=0.4, ddunc2=one-ddunc1 & ! &, ddunc1=0.3, ddunc2=one-ddunc1 & - &, VTPEXP=-0.3636 & - &, VTP=36.34*SQRT(1.2)*(0.001)**0.1364 + &, VTPEXP=-0.3636d0 & + &, VTP=36.34d0*SQRT(1.2d0)*(0.001d0)**0.1364d0 ! ! real(kind=kind_phys) EM(K*K), ELM(K) real(kind=kind_phys) ELM(K), AA(KD:K,KD:KP1), QW(KD:K,KD:K) & @@ -2822,7 +2830,7 @@ SUBROUTINE DDRFT( & CLDFRD = zero RNTP = zero DOF = zero - ERRQ = 10.0 + ERRQ = 10.0d0 RNB = zero RNT = zero TX2 = PRL(KBL) @@ -2853,7 +2861,7 @@ SUBROUTINE DDRFT( & ENDDO if (kk /= kbl) then do l=kk,kbl - buy(l) = 0.9 * buy(l-1) + buy(l) = 0.9d0 * buy(l-1) enddo endif ! @@ -2861,24 +2869,24 @@ SUBROUTINE DDRFT( & qrpi(l) = buy(l) enddo do l=kd1,kb1 - buy(l) = 0.25 * (qrpi(l-1)+qrpi(l)+qrpi(l)+qrpi(l+1)) + buy(l) = 0.25d0 * (qrpi(l-1)+qrpi(l)+qrpi(l)+qrpi(l+1)) enddo ! ! CALL ANGRAD(TX1, ALM, STLA, CTL2, AL2, PI, TLA, TX2, WFN, TX3) - tx1 = 1000.0 + tx1 - prl(kp1) + tx1 = 1000.0d0 + tx1 - prl(kp1) ! CALL ANGRAD(TX1, ALM, AL2, TLA, TX2, WFN, TX3) CALL ANGRAD(TX1, ALM, AL2, TLA) ! ! Following Ucla approach for rain profile ! - F2 = (BB1+BB1)*ONEBG/(PI*0.2) + F2 = (BB1+BB1)*ONEBG/(PI*0.2d0) ! WCMIN = SQRT(WC2MIN) ! WCBASE = WCMIN ! ! del_tla = TLA * 0.2 ! del_tla = TLA * 0.25 - del_tla = TLA * 0.3 + del_tla = TLA * 0.3d0 TLA = TLA - DEL_TLA ! DO L=KD,K @@ -2939,15 +2947,15 @@ SUBROUTINE DDRFT( & do ntla=1,numtla ! numtla is the the maximimu number of tilting angle tries ! ------ ! if (errq < 1.0 .or. tla > 45.0) cycle - if (errq < 0.1 .or. tla > 45.0) cycle + if (errq < 0.1d0 .or. tla > 45.0d0) cycle ! tla = tla + del_tla STLA = SIN(TLA*deg2rad) ! sine of tilting angle CTL2 = one - STLA * STLA ! cosine square of tilting angle ! - STLA = F2 * STLA * AL2 - CTL2 = DD1 * CTL2 - CTL3 = 0.1364 * CTL2 + STLA = F2 * STLA * AL2 + CTL2 = DD1 * CTL2 + CTL3 = 0.1364d0 * CTL2 ! DO L=KD,K RNF(L) = zero @@ -3010,7 +3018,7 @@ SUBROUTINE DDRFT( & VRW(1) = F3*WVL(KD) - CTL2*VT(1) BUD(KD) = STLA * TX6 * QRB(KD) * half RNF(KD) = BUD(KD) - DOF = 1.1364 * BUD(KD) * QRPI(KD) + DOF = 1.1364d0 * BUD(KD) * QRPI(KD) DOFW = -BUD(KD) * STLT(KD) ! RNT = TRW(1) * VRW(1) @@ -3044,7 +3052,7 @@ SUBROUTINE DDRFT( & ! QA(2) = DOF WA(2) = DOFW - DOF = 1.1364 * BUD(L) * QRPI(L) + DOF = 1.1364d0 * BUD(L) * QRPI(L) DOFW = -BUD(L) * STLT(L) ! RNF(LL) = RNF(LL) + QQQ * ST1 @@ -3115,7 +3123,7 @@ SUBROUTINE DDRFT( & QA(2) = DOF WA(2) = DOFW - DOF = 1.1364 * BUD(L) * QRPI(L) + DOF = 1.1364d0 * BUD(L) * QRPI(L) DOFW = -BUD(L) * STLT(L) ! RNF(LL) = RNF(LL) + ST1 @@ -3250,7 +3258,7 @@ SUBROUTINE DDRFT( & ENDDO ! ! tem = 0.5 - if (tx2 > one .and. abs(errq-tx2) > 0.1) then + if (tx2 > one .and. abs(errq-tx2) > 0.1d0) then tem = half !! elseif (tx2 < 0.1) then !! tem = 1.2 @@ -3273,17 +3281,17 @@ SUBROUTINE DDRFT( & ENDIF ELSE TEM = ERRQ - TX2 -! IF (TEM < ZERO .AND. ERRQ > 0.1) THEN - IF (TEM < ZERO .AND. ERRQ > 0.5) THEN +! IF (TEM < ZERO .AND. ERRQ > 0.1d0) THEN + IF (TEM < ZERO .AND. ERRQ > 0.5d0) THEN ! IF (TEM < ZERO .and. & -! & (ntla < numtla .or. ERRQ > 0.5)) THEN +! & (ntla < numtla .or. ERRQ > 0.5d0)) THEN SKPUP = .TRUE. ! No convergence ! - ERRQ = 10.0 ! No rain profile! + ERRQ = 10.0d0 ! No rain profile! !!!! ELSEIF (ABS(TEM) < ERRMI2 .OR. TX2 < ERRMIN) THEN ELSEIF (TX2 < ERRMIN) THEN SKPUP = .TRUE. ! Converges ! ERRQ = zero ! Rain profile exists! - elseif (tem < zero .and. errq < 0.1) then + elseif (tem < zero .and. errq < 0.1d0) then skpup = .true. ! if (ntla == numtla .or. tem > -0.003) then errq = zero @@ -3301,7 +3309,7 @@ SUBROUTINE DDRFT( & ! ENDDO ! End of the ITR Loop!! ! - IF (ERRQ < 0.1) THEN + IF (ERRQ < 0.1d0) THEN DDFT = .TRUE. RNB = - RNB ! do l=kd1,kb1-1 @@ -3322,7 +3330,7 @@ SUBROUTINE DDRFT( & TX1 = TX1 + RNF(L) ENDDO TX1 = TRAIN / (TX1+RNT+RNB) - IF (ABS(TX1-one) < 0.2) THEN + IF (ABS(TX1-one) < 0.2d0) THEN RNT = MAX(RNT*TX1,ZERO) RNB = RNB * TX1 DO L=KD,KB1 @@ -3332,7 +3340,7 @@ SUBROUTINE DDRFT( & ELSE DDFT = .FALSE. - ERRQ = 10.0 + ERRQ = 10.0d0 ENDIF ENDIF ! @@ -3356,7 +3364,7 @@ SUBROUTINE DDRFT( & WCB(L) = zero ENDDO ! - ERRQ = 10.0 + ERRQ = 10.0d0 ! At this point stlt contains inverse of updraft vertical velocity 1/Wu. KK = MAX(KB1,KD1) @@ -3402,9 +3410,9 @@ SUBROUTINE DDRFT( & IF (RNT > zero) THEN if (TX1 > zero) THEN QRP(KD) = (RPART*RNT / (ROR(KD)*TX1*GMS(KD))) & - & ** (one/1.1364) + & ** (one/1.1364d0) else - tx1 = RPART*RNT / (ROR(KD)*GMS(KD)*QRP(KD)**1.1364) + tx1 = RPART*RNT / (ROR(KD)*GMS(KD)*QRP(KD)**1.1364d0) endif RNTP = (one - RPART) * RNT BUY(KD) = - ROR(KD) * TX1 * QRP(KD) @@ -3465,7 +3473,7 @@ SUBROUTINE DDRFT( & VRW(1) = half * (GAM(L-1) + GAM(L)) VRW(2) = one / (VRW(1) + VRW(1)) ! - TX4 = (QRT(L-1)+QRB(L-1))*(ONEBG*FAC*500.00*EKNOB) + TX4 = (QRT(L-1)+QRB(L-1))*(ONEBG*FAC*500.0d0*EKNOB) ! DOFW = one / (WA(3) * (one + NU*WA(2))) ! 1.0 / TVbar! ! @@ -3473,7 +3481,7 @@ SUBROUTINE DDRFT( & HOD(L) = HOD(L-1) QOD(L) = QOD(L-1) ! - ERRQ = 10.0 + ERRQ = 10.0d0 ! IF (L <= KBL) THEN @@ -3498,7 +3506,7 @@ SUBROUTINE DDRFT( & IF (L == KD1) THEN IF (RNT > zero) THEN TEM = MAX(QRP(L-1),QRP(L)) - WVL(L) = TX1 * TEM * QRB(L-1)*(FACG*5.0) + WVL(L) = TX1 * TEM * QRB(L-1)*(FACG*5.0d0) ENDIF WVL(L) = MAX(ONE_M2, WVL(L)) TRW(1) = TRW(1) * half @@ -3626,9 +3634,9 @@ SUBROUTINE DDRFT( & ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) TEM2 = ROR(L) * QRP(L) CALL QRABF(TEM2,QRAF,QRBF) - TEM6 = TX5 * (1.6 + 124.9 * QRAF) * QRBF * TX4 + TEM6 = TX5 * (1.6d0 + 124.9d0 * QRAF) * QRBF * TX4 ! - CE = TEM6 * ST2 / ((5.4E5*ST2 + 2.55E6)*(ETD(L)+DDZ)) + CE = TEM6 * ST2 / ((5.4d5*ST2 + 2.55d6)*(ETD(L)+DDZ)) ! TEM2 = - ((one+TEM1)*(QHS+CE) + TEM1*QOD(L)) TEM3 = (one + TEM1) * QHS * (QOD(L)+CE) @@ -3639,7 +3647,7 @@ SUBROUTINE DDRFT( & ! second iteration ! ! ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) - CE = TEM6 * ST2 / ((5.4E5*ST2 + 2.55E6)*(ETD(L)+DDZ)) + CE = TEM6 * ST2 / ((5.4d5*ST2 + 2.55d6)*(ETD(L)+DDZ)) ! CEE = CE * (ETD(L)+DDZ) ! @@ -3660,7 +3668,7 @@ SUBROUTINE DDRFT( & QRP(L) = MAX(TEM,ZERO) ELSEIF (TX5 > zero) THEN QRP(L) = (MAX(ZERO,QA(1)/(ROR(L)*TX5*GMS(L)))) & - & ** (one/1.1364) + & ** (one/1.1364d0) ELSE QRP(L) = zero ENDIF @@ -3687,7 +3695,7 @@ SUBROUTINE DDRFT( & ! WVL(L) = 0.5*tem1 ! WVL(L) = 0.1*tem1 ! WVL(L) = 0.0 - WVL(L) = 1.0e-10 + WVL(L) = 1.0d-10 else WVL(L) = half*(WVL(L)+TEM1) endif @@ -3701,7 +3709,7 @@ SUBROUTINE DDRFT( & ! IF (ITR >= MIN(ITRMIN,ITRMD/2)) THEN IF (ITR >= MIN(ITRMND,ITRMD/2)) THEN - IF (ETD(L-1) == zero .AND. ERRQ > 0.2) THEN + IF (ETD(L-1) == zero .AND. ERRQ > 0.2d0) THEN ROR(L) = BUD(KD) ETD(L) = zero WVL(L) = zero @@ -3713,7 +3721,7 @@ SUBROUTINE DDRFT( & TX5 = TX9 else TX5 = (STLT(KB1) * QRT(KB1) & - & + STLT(KBL) * QRB(KB1)) * (0.5*FAC) + & + STLT(KBL) * QRB(KB1)) * (0.5d0*FAC) endif EVP(L-1) = zero @@ -3722,14 +3730,14 @@ SUBROUTINE DDRFT( & ! IF (QA(1) > 0.0) THEN QRP(L) = (QA(1) / (ROR(L)*TX5*GMS(L))) & - & ** (one/1.1364) + & ** (one/1.1364d0) ! endif BUY(L) = - ROR(L) * TX5 * QRP(L) WCB(L-1) = zero ENDIF ! DEL_ETA = ETD(L) - ETD(L-1) - IF(DEL_ETA < zero .AND. ERRQ > 0.1) THEN + IF(DEL_ETA < zero .AND. ERRQ > 0.1d0) THEN ROR(L) = BUD(KD) ETD(L) = zero WVL(L) = zero @@ -3756,9 +3764,9 @@ SUBROUTINE DDRFT( & ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) TEM2 = ROR(L) * QRP(L-1) CALL QRABF(TEM2,QRAF,QRBF) - TEM6 = TX5 * (1.6 + 124.9 * QRAF) * QRBF * TX4 + TEM6 = TX5 * (1.6d0 + 124.9d0 * QRAF) * QRBF * TX4 ! - CE = TEM6*ST2/((5.4E5*ST2 + 2.55E6)*(ETD(L)+DDZ)) + CE = TEM6*ST2/((5.4d5*ST2 + 2.55d6)*(ETD(L)+DDZ)) ! TEM2 = - ((one+TEM1)*(QHS+CE) + TEM1*QOD(L)) @@ -3769,7 +3777,7 @@ SUBROUTINE DDRFT( & ! second iteration ! ! ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) - CE = TEM6*ST2/((5.4E5*ST2 + 2.55E6)*(ETD(L)+DDZ)) + CE = TEM6*ST2/((5.4d5*ST2 + 2.55d6)*(ETD(L)+DDZ)) ! CEE = CE * (ETD(L)+DDZ) ! @@ -3822,7 +3830,7 @@ SUBROUTINE DDRFT( & ! ENDDO ! End of the iteration loop for a given L! IF (L <= K) THEN - IF (ETD(L-1) == zero .AND. ERRQ > 0.1 .and. l <= kbl) THEN + IF (ETD(L-1) == zero .AND. ERRQ > 0.1d0 .and. l <= kbl) THEN !!! & .AND. ERRQ > ERRMIN*10.0 .and. l <= kbl) THEN ! & .AND. ERRQ > ERRMIN*10.0) THEN ROR(L) = BUD(KD) @@ -3845,7 +3853,7 @@ SUBROUTINE DDRFT( & ! IF (QA(1) > 0.0) THEN QRP(L) = (QA(1) / (ROR(L)*TX5*GMS(L))) & - & ** (one/1.1364) + & ** (one/1.1364d0) ! ENDIF ETD(L) = zero WVL(L) = zero @@ -3876,7 +3884,7 @@ SUBROUTINE DDRFT( & ! not converge) , no downdraft is assumed ! ! IF (ERRQ > ERRMIN*100.0 .AND. IDN(idnm) == 99) & - IF (ERRQ > 0.1 .AND. IDN(idnm) == idnmax) DDFT = .FALSE. + IF (ERRQ > 0.1d0 .AND. IDN(idnm) == idnmax) DDFT = .FALSE. ! DOF = zero IF (.NOT. DDFT) RETURN @@ -3980,7 +3988,7 @@ SUBROUTINE QSATCN(TT,P,Q,DQDT) real(kind=kind_phys) es, d, hlorv, W ! ! es = 10.0 * fpvs(tt) ! fpvs is in centibars! - es = min(p, 0.01 * fpvs(tt)) ! fpvs is in Pascals! + es = min(p, 0.01d0 * fpvs(tt)) ! fpvs is in Pascals! ! D = one / max(p+epsm1*es,ONE_M10) D = one / (p+epsm1*es) ! @@ -4001,7 +4009,7 @@ SUBROUTINE ANGRAD(PRES, ALM, AL2, TLA) ! integer i ! - IF (TLA < 0.0) THEN + IF (TLA < 0.0d0) THEN IF (PRES <= PLAC(1)) THEN TLA = TLAC(1) ELSEIF (PRES <= PLAC(2)) THEN @@ -4038,8 +4046,8 @@ SUBROUTINE ANGRAD(PRES, ALM, AL2, TLA) TEM = REFR(6) ENDIF ! - tem = 2.0E-4 / tem - al2 = min(4.0*tem, max(alm, tem)) + tem = 2.0d-4 / tem + al2 = min(4.0d0*tem, max(alm, tem)) ! RETURN end subroutine angrad @@ -4051,18 +4059,18 @@ SUBROUTINE SETQRP integer jx ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! XMIN = 1.0E-6 - XMIN = 0.0 - XMAX = 5.0 + XMIN = 0.0d0 + XMAX = 5.0d0 XINC = (XMAX-XMIN)/(NQRP-1) C2XQRP = one / XINC C1XQRP = one - XMIN*C2XQRP - TEM1 = 0.001 ** 0.2046 - TEM2 = 0.001 ** 0.525 + TEM1 = 0.001d0 ** 0.2046d0 + TEM2 = 0.001d0 ** 0.525d0 DO JX=1,NQRP X = XMIN + (JX-1)*XINC - TBQRP(JX) = X ** 0.1364 - TBQRA(JX) = TEM1 * X ** 0.2046 - TBQRB(JX) = TEM2 * X ** 0.525 + TBQRP(JX) = X ** 0.1364d0 + TBQRA(JX) = TEM1 * X ** 0.2046d0 + TBQRB(JX) = TEM2 * X ** 0.525d0 ENDDO ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RETURN @@ -4087,12 +4095,12 @@ end subroutine qrabf SUBROUTINE SETVTP implicit none - real(kind=kind_phys), parameter :: vtpexp=-0.3636, one=1.0 + real(kind=kind_phys), parameter :: vtpexp=-0.3636d0, one=1.0d0 real(kind=kind_phys) xinc,x,xmax,xmin integer jx ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XMIN = 0.05 - XMAX = 1.5 + XMIN = 0.05d0 + XMAX = 1.5d0 XINC = (XMAX-XMIN)/(NVTP-1) C2XVTP = one / XINC C1XVTP = one - XMIN*C2XVTP @@ -4139,10 +4147,10 @@ real(kind=kind_phys) FUNCTION CLF(PRATE) implicit none real(kind=kind_phys) PRATE ! - real (kind=kind_phys), parameter :: ccf1=0.30, ccf2=0.09 & - &, ccf3=0.04, ccf4=0.01 & - &, pr1=1.0, pr2=5.0 & - &, pr3=20.0 + real (kind=kind_phys), parameter :: ccf1=0.30d0, ccf2=0.09d0 & + &, ccf3=0.04d0, ccf4=0.01d0 & + &, pr1=1.0d0, pr2=5.0d0 & + &, pr3=20.0d0 ! if (prate < pr1) then clf = ccf1 diff --git a/physics/sfc_cice.f b/physics/sfc_cice.f index d0aaee476..9cb2b5f21 100644 --- a/physics/sfc_cice.f +++ b/physics/sfc_cice.f @@ -127,21 +127,21 @@ subroutine sfc_cice_run & ! if (.not. cplflx) return ! - cpinv = 1.0/cp - hvapi = 1.0/hvap + cpinv = 1.0d0/cp + hvapi = 1.0d0/hvap elocp = hvap/cp ! do i = 1, im if (flag_cice(i) .and. flag_iter(i)) then rho = prsl1(i) & - & / (rd * t1(i) * (1.0 + rvrdm1*max(q1(i), 1.0e-8))) + & / (rd * t1(i) * (1.0d0 + rvrdm1*max(q1(i), 1.0d-8))) cmm(i) = wind(i) * cm(i) chh(i) = wind(i) * ch(i) * rho qsurf(i) = q1(i) + dqsfc(i) / (hvap*chh(i)) - tem = 1.0 / rho + tem = 1.0d0 / rho hflx(i) = dtsfc(i) * tem * cpinv evap(i) = dqsfc(i) * tem * hvapi stress(i) = sqrt(dusfc(i)*dusfc(i) + dvsfc(i)*dvsfc(i)) * tem diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 60d5ceeea..f15e20d53 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -14,7 +14,7 @@ module sfc_diff private - real (kind=kind_phys), parameter :: ca=.4 ! ca - von karman constant + real (kind=kind_phys), parameter :: ca=0.4d0 ! ca - von karman constant contains @@ -128,9 +128,11 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) real(kind=kind_phys) :: tvs, z0, z0max, ztmax ! real(kind=kind_phys), parameter :: - & charnock=.014, z0s_max=.317e-2 &! a limiting value at high winds over sea - &, vis=1.4e-5, rnu=1.51e-5, visi=1.0/vis & - &, log01=log(0.01), log05=log(0.05), log07=log(0.07) + & one=1.0d0, zero=0.0d0, half=0.5d0, qmin=1.0d-8 + &, charnock=.014d0, z0s_max=.317d-2 &! a limiting value at high winds over sea + &, zmin=1.0d-6 & + &, vis=1.4d-5, rnu=1.51d-5, visi=one/vis & + &, log01=log(0.01d0), log05=log(0.05d0), log07=log(0.07d0) ! parameter (charnock=.014,ca=.4)!c ca is the von karman constant ! parameter (alpha=5.,a0=-3.975,a1=12.32,b1=-7.755,b2=6.041) @@ -161,7 +163,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) do i=1,im if(flag_iter(i)) then - virtfac = 1.0 + rvrdm1 * max(q1(i),1.e-8) + virtfac = one + rvrdm1 * max(q1(i),qmin) thv1 = t1(i) * prslki(i) * virtfac ! compute stability dependent exchange coefficients @@ -169,15 +171,16 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! if (dry(i)) then ! Some land #ifdef GSD_SURFACE_FLUXES_BUGFIX - tvs = 0.5 * (tsurf_lnd(i)+tskin_lnd(i))/prsik1(i) * virtfac + tvs = half * (tsurf_lnd(i)+tskin_lnd(i))/prsik1(i) + & * virtfac #else - tvs = 0.5 * (tsurf_lnd(i)+tskin_lnd(i)) * virtfac + tvs = half * (tsurf_lnd(i)+tskin_lnd(i)) * virtfac #endif - z0max = max(1.0e-6, min(0.01 * z0rl_lnd(i), z1(i))) + z0max = max(zmin, min(0.01d0 * z0rl_lnd(i), z1(i))) !** xubin's new z0 over land - tem1 = 1.0 - shdmax(i) + tem1 = one - shdmax(i) tem2 = tem1 * tem1 - tem1 = 1.0 - tem2 + tem1 = one - tem2 if( ivegsrc == 1 ) then @@ -187,10 +190,10 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0max = exp( tem2*log01 + tem1*log05 ) elseif (vegtype(i) == 7) then ! z0max = exp( tem2*log01 + tem1*log01 ) - z0max = 0.01 + z0max = 0.01d0 elseif (vegtype(i) == 16) then ! z0max = exp( tem2*log01 + tem1*log01 ) - z0max = 0.01 + z0max = 0.01d0 else z0max = exp( tem2*log01 + tem1*log(z0max) ) endif @@ -203,35 +206,35 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0max = exp( tem2*log01 + tem1*log05 ) elseif (vegtype(i) == 9) then ! z0max = exp( tem2*log01 + tem1*log01 ) - z0max = 0.01 + z0max = 0.01d0 elseif (vegtype(i) == 11) then ! z0max = exp( tem2*log01 + tem1*log01 ) - z0max = 0.01 + z0max = 0.01d0 else z0max = exp( tem2*log01 + tem1*log(z0max) ) endif endif ! mg, sfc-perts: add surface perturbations to z0max over land - if (z0pert(i) /= 0.0 ) then - z0max = z0max * (10.**z0pert(i)) + if (z0pert(i) /= zero ) then + z0max = z0max * (10.0d0**z0pert(i)) endif - z0max = max(z0max, 1.0e-6) + z0max = max(z0max, zmin) ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil - czilc = 0.8 + czilc = 0.8d0 - tem1 = 1.0 - sigmaf(i) + tem1 = one - sigmaf(i) ztmax = z0max*exp( - tem1*tem1 - & * czilc*ca*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) + & * czilc*ca*sqrt(ustar_lnd(i)*(0.01d0/1.5d-05))) ! mg, sfc-perts: add surface perturbations to ztmax/z0max ratio over land - if (ztpert(i) /= 0.0) then - ztmax = ztmax * (10.**ztpert(i)) + if (ztpert(i) /= zero) then + ztmax = ztmax * (10.0d0**ztpert(i)) endif - ztmax = max(ztmax, 1.0e-6) + ztmax = max(ztmax, zmin) ! call stability ! --- inputs: @@ -243,12 +246,12 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) endif ! Dry points if (icy(i)) then ! Some ice - tvs = 0.5 * (tsurf_ice(i)+tskin_ice(i)) * virtfac - z0max = max(1.0e-6, min(0.01 * z0rl_ice(i), z1(i))) + tvs = half * (tsurf_ice(i)+tskin_ice(i)) * virtfac + z0max = max(zmin, min(0.01d0 * z0rl_ice(i), z1(i))) !** xubin's new z0 over land and sea ice - tem1 = 1.0 - shdmax(i) + tem1 = one - shdmax(i) tem2 = tem1 * tem1 - tem1 = 1.0 - tem2 + tem1 = one - tem2 if( ivegsrc == 1 ) then @@ -257,16 +260,16 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0max = exp( tem2*log01 + tem1*log(z0max) ) endif - z0max = max(z0max, 1.0e-6) + z0max = max(z0max, zmin) ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height ! dependance of czil - czilc = 0.8 + czilc = 0.8d0 - tem1 = 1.0 - sigmaf(i) + tem1 = one - sigmaf(i) ztmax = z0max*exp( - tem1*tem1 - & * czilc*ca*sqrt(ustar_ice(i)*(0.01/1.5e-05))) - ztmax = max(ztmax, 1.0e-6) + & * czilc*ca*sqrt(ustar_ice(i)*(0.01d0/1.5d-05))) + ztmax = max(ztmax, zmin) ! call stability ! --- inputs: @@ -281,9 +284,9 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! the stuff now put into "stability" if (wet(i)) then ! Some open ocean - tvs = 0.5 * (tsurf_ocn(i)+tskin_ocn(i)) * virtfac - z0 = 0.01 * z0rl_ocn(i) - z0max = max(1.0e-6, min(z0,z1(i))) + tvs = half * (tsurf_ocn(i)+tskin_ocn(i)) * virtfac + z0 = 0.01d0 * z0rl_ocn(i) + z0max = max(zmin, min(z0,z1(i))) ustar_ocn(i) = sqrt(grav * z0 / charnock) wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i)) @@ -291,7 +294,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! ztmax = z0max - restar = max(ustar_ocn(i)*z0max*visi, 0.000001) + restar = max(ustar_ocn(i)*z0max*visi, 0.000001d0) ! restar = log(restar) ! restar = min(restar,5.) @@ -300,8 +303,8 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! rat = rat / (1. + (bb2 + cc2*restar) * restar)) ! rat taken from zeng, zhao and dickinson 1997 - rat = min(7.0, 2.67 * sqrt(sqrt(restar)) - 2.57) - ztmax = max(z0max * exp(-rat), 1.0e-6) + rat = min(7.0d0, 2.67d0 * sqrt(sqrt(restar)) - 2.57d0) + ztmax = max(z0max * exp(-rat), zmin) ! if (sfc_z0_type == 6) then call znot_t_v6(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) @@ -335,19 +338,19 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! z0 = arnu / (ustar(i) * ff ** pp) if (redrag) then - z0rl_ocn(i) = 100.0 * max(min(z0, z0s_max), 1.e-7) + z0rl_ocn(i) = 100.0d0 * max(min(z0, z0s_max), 1.d-7) else - z0rl_ocn(i) = 100.0 * max(min(z0,.1), 1.e-7) + z0rl_ocn(i) = 100.0d0 * max(min(z0,.1d0), 1.d-7) endif elseif (sfc_z0_type == 6) then ! wang call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m - z0rl_ocn(i) = 100.0 * z0 ! cm + z0rl_ocn(i) = 100.0d0 * z0 ! cm elseif (sfc_z0_type == 7) then ! wang call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m - z0rl_ocn(i) = 100.0 * z0 ! cm + z0rl_ocn(i) = 100.0d0 * z0 ! cm else - z0rl_ocn(i) = 1.0e-4 + z0rl_ocn(i) = 1.0d-4 endif endif @@ -378,11 +381,12 @@ subroutine stability & & rb, fm, fh, fm10, fh2, cm, ch, stress, ustar ! --- locals: - real(kind=kind_phys), parameter :: alpha=5., a0=-3.975 & - &, a1=12.32, alpha4=4.0*alpha - &, b1=-7.755, b2=6.041, alpha2=alpha+alpha, beta=1.0 - &, a0p=-7.941, a1p=24.75, b1p=-8.705, b2p=7.899 - &, ztmin1=-999.0 + real(kind=kind_phys), parameter :: alpha=5.0d0, a0=-3.975d0 & + &, a1=12.32d0, alpha4=4.0d0*alpha & + &, b1=-7.755d0, b2=6.041d0, alpha2=alpha+alpha & + &, beta=1.0d0 & + &, a0p=-7.941d0, a1p=24.75d0, b1p=-8.705d0, b2p=7.899d0& + &, ztmin1=-999.0d0, zero=0.0d0, one=1.0d0 real(kind=kind_phys) aa, aa0, bb, bb0, dtv, adtv, & hl1, hl12, pm, ph, pm10, ph2, @@ -391,51 +395,51 @@ subroutine stability & & hl110, hlt, hltinf, olinf, & tem1, tem2, ztmax1 - z1i = 1.0 / z1 + z1i = one / z1 tem1 = z0max/z1 - if (abs(1.0-tem1) > 1.0e-6) then - ztmax1 = - beta*log(tem1)/(alpha2*(1.-tem1)) + if (abs(one-tem1) > 1.0d-6) then + ztmax1 = - beta*log(tem1)/(alpha2*(one-tem1)) else - ztmax1 = 99.0 + ztmax1 = 99.0d0 endif - if( z0max < 0.05 .and. snwdph < 10.0 ) ztmax1 = 99.0 + if( z0max < 0.05d0 .and. snwdph < 10.0d0 ) ztmax1 = 99.0d0 ! compute stability indices (rb and hlinf) dtv = thv1 - tvs - adtv = max(abs(dtv),0.001) + adtv = max(abs(dtv),0.001d0) dtv = sign(1.,dtv) * adtv #ifdef GSD_SURFACE_FLUXES_BUGFIX - rb = max(-5000.0, grav * dtv * z1 + rb = max(-5000.0d0, grav * dtv * z1 & / (thv1 * wind * wind)) #else - rb = max(-5000.0, (grav+grav) * dtv * z1 + rb = max(-5000.0d0, (grav+grav) * dtv * z1 & / ((thv1 + tvs) * wind * wind)) #endif - tem1 = 1.0 / z0max - tem2 = 1.0 / ztmax + tem1 = one / z0max + tem2 = one / ztmax fm = log((z0max+z1) * tem1) fh = log((ztmax+z1) * tem2) - fm10 = log((z0max+10.) * tem1) - fh2 = log((ztmax+2.) * tem2) + fm10 = log((z0max+10.0d0) * tem1) + fh2 = log((ztmax+2.0d0) * tem2) hlinf = rb * fm * fm / fh hlinf = min(max(hlinf,ztmin1),ztmax1) ! ! stable case ! - if (dtv >= 0.0) then + if (dtv >= zero) then hl1 = hlinf - if(hlinf > .25) then + if(hlinf > 0.25d0) then tem1 = hlinf * z1i hl0inf = z0max * tem1 hltinf = ztmax * tem1 - aa = sqrt(1. + alpha4 * hlinf) - aa0 = sqrt(1. + alpha4 * hl0inf) + aa = sqrt(one + alpha4 * hlinf) + aa0 = sqrt(one + alpha4 * hl0inf) bb = aa - bb0 = sqrt(1. + alpha4 * hltinf) - pm = aa0 - aa + log( (aa + 1.)/(aa0 + 1.) ) - ph = bb0 - bb + log( (bb + 1.)/(bb0 + 1.) ) + bb0 = sqrt(one + alpha4 * hltinf) + pm = aa0 - aa + log( (aa + one)/(aa0 + one) ) + ph = bb0 - bb + log( (bb + one)/(bb0 + one) ) fms = fm - pm fhs = fh - ph hl1 = fms * fms * rb / fhs @@ -447,27 +451,27 @@ subroutine stability & tem1 = hl1 * z1i hl0 = z0max * tem1 hlt = ztmax * tem1 - aa = sqrt(1. + alpha4 * hl1) - aa0 = sqrt(1. + alpha4 * hl0) + aa = sqrt(one + alpha4 * hl1) + aa0 = sqrt(one + alpha4 * hl0) bb = aa - bb0 = sqrt(1. + alpha4 * hlt) - pm = aa0 - aa + log( (1.0+aa)/(1.0+aa0) ) - ph = bb0 - bb + log( (1.0+bb)/(1.0+bb0) ) - hl110 = hl1 * 10. * z1i + bb0 = sqrt(one + alpha4 * hlt) + pm = aa0 - aa + log( (one+aa)/(one+aa0) ) + ph = bb0 - bb + log( (one+bb)/(one+bb0) ) + hl110 = hl1 * 10.0d0 * z1i hl110 = min(max(hl110, ztmin1), ztmax1) - aa = sqrt(1. + alpha4 * hl110) - pm10 = aa0 - aa + log( (1.0+aa)/(1.0+aa0) ) + aa = sqrt(one + alpha4 * hl110) + pm10 = aa0 - aa + log( (one+aa)/(one+aa0) ) hl12 = (hl1+hl1) * z1i hl12 = min(max(hl12,ztmin1),ztmax1) -! aa = sqrt(1. + alpha4 * hl12) - bb = sqrt(1. + alpha4 * hl12) - ph2 = bb0 - bb + log( (1.0+bb)/(1.0+bb0) ) +! aa = sqrt(one + alpha4 * hl12) + bb = sqrt(one + alpha4 * hl12) + ph2 = bb0 - bb + log( (one+bb)/(one+bb0) ) ! ! unstable case - check for unphysical obukhov length ! else ! dtv < 0 case olinf = z1 / hlinf - tem1 = 50.0 * z0max + tem1 = 50.0d0 * z0max if(abs(olinf) <= tem1) then hlinf = -z1 / tem1 hlinf = min(max(hlinf,ztmin1),ztmax1) @@ -475,30 +479,30 @@ subroutine stability & ! ! get pm and ph ! - if (hlinf >= -0.5) then + if (hlinf >= -0.5d0) then hl1 = hlinf - pm = (a0 + a1*hl1) * hl1 / (1.+ (b1+b2*hl1) *hl1) - ph = (a0p + a1p*hl1) * hl1 / (1.+ (b1p+b2p*hl1)*hl1) - hl110 = hl1 * 10. * z1i + pm = (a0 + a1*hl1) * hl1 / (one+ (b1+b2*hl1) *hl1) + ph = (a0p + a1p*hl1) * hl1 / (one+ (b1p+b2p*hl1)*hl1) + hl110 = hl1 * 10.0d0 * z1i hl110 = min(max(hl110, ztmin1), ztmax1) - pm10 = (a0 + a1*hl110) * hl110 / (1.+(b1+b2*hl110)*hl110) + pm10 = (a0 + a1*hl110) * hl110/(one+(b1+b2*hl110)*hl110) hl12 = (hl1+hl1) * z1i hl12 = min(max(hl12, ztmin1), ztmax1) - ph2 = (a0p + a1p*hl12) * hl12 / (1.+(b1p+b2p*hl12)*hl12) + ph2 = (a0p + a1p*hl12) * hl12/(one+(b1p+b2p*hl12)*hl12) else ! hlinf < 0.05 hl1 = -hlinf - tem1 = 1.0 / sqrt(hl1) - pm = log(hl1) + 2. * sqrt(tem1) - .8776 - ph = log(hl1) + .5 * tem1 + 1.386 + tem1 = one / sqrt(hl1) + pm = log(hl1) + 2.0d0 * sqrt(tem1) - .8776d0 + ph = log(hl1) + 0.5d0 * tem1 + 1.386d0 ! pm = log(hl1) + 2.0 * hl1 ** (-.25) - .8776 ! ph = log(hl1) + 0.5 * hl1 ** (-.5) + 1.386 - hl110 = hl1 * 10. * z1i + hl110 = hl1 * 10.0d0 * z1i hl110 = min(max(hl110, ztmin1), ztmax1) - pm10 = log(hl110) + 2.0 / sqrt(sqrt(hl110)) - .8776 + pm10 = log(hl110) + 2.0d0 / sqrt(sqrt(hl110)) - 0.8776d0 ! pm10 = log(hl110) + 2. * hl110 ** (-.25) - .8776 hl12 = (hl1+hl1) * z1i hl12 = min(max(hl12, ztmin1), ztmax1) - ph2 = log(hl12) + 0.5 / sqrt(hl12) + 1.386 + ph2 = log(hl12) + 0.5d0 / sqrt(hl12) + 1.386d0 ! ph2 = log(hl12) + .5 * hl12 ** (-.5) + 1.386 endif @@ -512,7 +516,7 @@ subroutine stability & fh2 = fh2 - ph2 cm = ca * ca / (fm * fm) ch = ca * ca / (fm * fh) - tem1 = 0.00001/z1 + tem1 = 0.00001d0/z1 cm = max(cm, tem1) ch = max(ch, tem1) stress = cm * wind * wind diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 75afaa6ff..9f2170e80 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -194,14 +194,16 @@ subroutine lsm_noah_run & implicit none ! --- constant parameters: - real(kind=kind_phys), parameter :: rhoh2o = 1000.0 - real(kind=kind_phys), parameter :: a2 = 17.2693882 - real(kind=kind_phys), parameter :: a3 = 273.16 - real(kind=kind_phys), parameter :: a4 = 35.86 + real(kind=kind_phys), parameter :: one = 1.0d0, zero = 0.0d0 + real(kind=kind_phys), parameter :: rhoh2o = 1000.0d0 + real(kind=kind_phys), parameter :: a2 = 17.2693882d0 + real(kind=kind_phys), parameter :: a3 = 273.16d0 + real(kind=kind_phys), parameter :: a4 = 35.86d0 real(kind=kind_phys), parameter :: a23m4 = a2*(a3-a4) + real(kind=kind_phys), parameter :: qmin = 1.0d-8 real(kind=kind_phys), save :: zsoil_noah(4) - data zsoil_noah / -0.1, -0.4, -1.0, -2.0 / + data zsoil_noah / -0.1d0, -0.4d0, -1.0d0, -2.0d0 / ! --- input: integer, intent(in) :: im, km, isot, ivegsrc @@ -266,9 +268,9 @@ subroutine lsm_noah_run & ! !===> ... begin here ! - cpinv = 1.0/cp - hvapi = 1.0/hvap - elocp = hvap/cp + cpinv = one/cp + hvapi = one/hvap + elocp = hvap/cp !> - Initialize CCPP error handling variables @@ -298,19 +300,19 @@ subroutine lsm_noah_run & do i = 1, im if (flag_iter(i) .and. land(i)) then - ep(i) = 0.0 - evap (i) = 0.0 - hflx (i) = 0.0 - gflux(i) = 0.0 - drain(i) = 0.0 - canopy(i) = max(canopy(i), 0.0) - - evbs (i) = 0.0 - evcw (i) = 0.0 - trans(i) = 0.0 - sbsno(i) = 0.0 - snowc(i) = 0.0 - snohf(i) = 0.0 + ep(i) = zero + evap (i) = zero + hflx (i) = zero + gflux(i) = zero + drain(i) = zero + canopy(i) = max(canopy(i), zero) + + evbs (i) = zero + evcw (i) = zero + trans(i) = zero + sbsno(i) = zero + snowc(i) = zero + snohf(i) = zero endif ! flag_iter & land enddo @@ -318,12 +320,12 @@ subroutine lsm_noah_run & do i = 1, im if (flag_iter(i) .and. land(i)) then - q0(i) = max(q1(i), 1.e-8) !* q1=specific humidity at level 1 (kg/kg) + q0(i) = max(q1(i), qmin) !* q1=specific humidity at level 1 (kg/kg) theta1(i) = t1(i) * prslki(i) !* adiabatic temp at level 1 (k) - rho(i) = prsl1(i) / (rd*t1(i)*(1.0+rvrdm1*q0(i))) + rho(i) = prsl1(i) / (rd*t1(i)*(one+rvrdm1*q0(i))) qs1(i) = fpvs( t1(i) ) !* qs1=sat. humidity at level 1 (kg/kg) - qs1(i) = max(eps*qs1(i) / (prsl1(i)+epsm1*qs1(i)), 1.e-8) + qs1(i) = max(eps*qs1(i) / (prsl1(i)+epsm1*qs1(i)), qmin) q0 (i) = min(qs1(i), q0(i)) endif ! flag_iter & land enddo @@ -422,12 +424,12 @@ subroutine lsm_noah_run & !! 0.5 and the perturbations go to zero as vegetation fraction approaches its upper !! or lower bound. vegfp = vegfpert(i) ! sfc-perts, mgehne - if (pertvegf(1)>0.0) then + if (pertvegf(1) > zero) then ! compute beta distribution parameters for vegetation fraction mv = shdfac sv = pertvegf(1)*mv*(1.-mv) - alphav = mv*mv*(1.0-mv)/(sv*sv)-mv - betav = alphav*(1.0-mv)/mv + alphav = mv*mv*(one-mv)/(sv*sv)-mv + betav = alphav*(one-mv)/mv ! compute beta distribution value corresponding ! to the given percentile albPpert to use as new albedo call ppfbet(vegfp,alphav,betav,iflag,vegftmp) @@ -439,7 +441,7 @@ subroutine lsm_noah_run & shdmax1d = shdmax(i) snoalb1d = snoalb(i) - ptu = 0.0 + ptu = zero alb = sfalb(i) tbot = tg3(i) @@ -456,7 +458,7 @@ subroutine lsm_noah_run & ! cm - surface exchange coefficient for momentum (\f$m s^{-1}\f$) -> cmx ! z0 - surface roughness (\f$m\f$) -> zorl(\f$cm\f$) - cmc = canopy(i) * 0.001 ! convert from mm to m + cmc = canopy(i) * 0.001d0 ! convert from mm to m tsea = tsurf(i) ! clu_q2m_iter do k = 1, km @@ -465,10 +467,10 @@ subroutine lsm_noah_run & slsoil(k) = slc(i,k) enddo - snowh = snwdph(i) * 0.001 ! convert from mm to m - sneqv = weasd(i) * 0.001 ! convert from mm to m - if (sneqv /= 0.0 .and. snowh == 0.0) then - snowh = 10.0 * sneqv + snowh = snwdph(i) * 0.001d0 ! convert from mm to m + sneqv = weasd(i) * 0.001d0 ! convert from mm to m + if (sneqv /= zero .and. snowh == zero) then + snowh = 10.0d0 * sneqv endif chx = ch(i) * wind(i) ! compute conductance @@ -477,7 +479,7 @@ subroutine lsm_noah_run & cmm(i) = cmx ! ---- ... outside sflx, roughness uses cm as unit - z0 = zorl(i)/100. + z0 = zorl(i) * 0.01d0 ! ---- mgehne, sfc-perts ! - Apply perturbation of soil type b parameter and leave area index. bexpp = bexppert(i) ! sfc perts, mgehne @@ -522,7 +524,7 @@ subroutine lsm_noah_run & trans(i) = ett sbsno(i) = esnow snowc(i) = sncovr - stm(i) = soilm * 1000.0 ! unit conversion (from m to kg m-2) + stm(i) = soilm * 1000.0d0 ! unit conversion (from m to kg m-2) snohf(i) = flx1 + flx2 + flx3 smcwlt2(i) = smcwlt @@ -539,17 +541,17 @@ subroutine lsm_noah_run & wet1(i) = smsoil(1) / smcmax !Sarah Lu added 09/09/2010 (for GOCART) ! --- ... unit conversion (from m s-1 to mm s-1 and kg m-2 s-1) - runoff(i) = runoff1 * 1000.0 - drain (i) = runoff2 * 1000.0 + runoff(i) = runoff1 * 1000.0d0 + drain (i) = runoff2 * 1000.0d0 ! --- ... unit conversion (from m to mm) - canopy(i) = cmc * 1000.0 - snwdph(i) = snowh * 1000.0 - weasd(i) = sneqv * 1000.0 + canopy(i) = cmc * 1000.0d0 + snwdph(i) = snowh * 1000.0d0 + weasd(i) = sneqv * 1000.0d0 sncovr1(i) = sncovr ! ---- ... outside sflx, roughness uses cm as unit (update after snow's ! effect) - zorl(i) = z0*100. + zorl(i) = z0*100.0d0 !> - Do not return the following output fields to parent model: !!\n ec - canopy water evaporation (m s-1) @@ -606,7 +608,7 @@ subroutine lsm_noah_run & !! flux (\a evap). do i = 1, im if (flag_iter(i) .and. land(i)) then - tem = 1.0 / rho(i) + tem = one / rho(i) hflx(i) = hflx(i) * tem * cpinv evap(i) = evap(i) * tem * hvapi endif ! flag_iter & land diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index 9635f30b8..ba0aec030 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -23,7 +23,7 @@ end subroutine sfc_ocean_finalize subroutine sfc_ocean_run & !................................... ! --- inputs: - & ( im, cp, rd, eps, epsm1, hvap, rvrdm1, ps, t1, q1, & + & ( im, rd, eps, epsm1, rvrdm1, ps, t1, q1, & & tskin, cm, ch, prsl1, prslki, wet, wind, & & flag_iter, & ! --- outputs: @@ -90,10 +90,12 @@ subroutine sfc_ocean_run & ! implicit none +! --- constant parameters: + real (kind=kind_phys), parameter :: one = 1.0d0, zero = 0.0d0 & + &, qmin = 1.0d-8 ! --- inputs: integer, intent(in) :: im - real (kind=kind_phys), intent(in) :: cp, rd, eps, epsm1, hvap, & - & rvrdm1 + real (kind=kind_phys), intent(in) :: rd, eps, epsm1, rvrdm1 real (kind=kind_phys), dimension(im), intent(in) :: ps, & & t1, q1, tskin, cm, ch, prsl1, prslki, wind @@ -109,17 +111,11 @@ subroutine sfc_ocean_run & ! --- locals: - real (kind=kind_phys) :: q0, qss, rch, rho, tem, cpinv, & - & hvapi, elocp + real (kind=kind_phys) :: q0, qss, rch, rho, tem integer :: i - logical :: flag(im) -! !===> ... begin here - cpinv = 1.0/cp - hvapi = 1.0/hvap - elocp = hvap/cp ! ! -- ... initialize CCPP error handling variables errmsg = '' @@ -127,40 +123,32 @@ subroutine sfc_ocean_run & ! ! --- ... flag for open water do i = 1, im - flag(i) = (wet(i) .and. flag_iter(i)) ! --- ... initialize variables. all units are supposedly m.k.s. unless specified ! ps is in pascals, wind is wind speed, ! rho is density, qss is sat. hum. at surface - if ( flag(i) ) then - q0 = max( q1(i), 1.0e-8 ) - rho = prsl1(i) / (rd*t1(i)*(1.0 + rvrdm1*q0)) + if (wet(i) .and. flag_iter(i)) then + q0 = max( q1(i), qmin ) + rho = prsl1(i) / (rd*t1(i)*(one + rvrdm1*q0)) qss = fpvs( tskin(i) ) qss = eps*qss / (ps(i) + epsm1*qss) - evap(i) = 0.0 - hflx(i) = 0.0 - ep(i) = 0.0 - gflux(i) = 0.0 - ! --- ... rcp = rho cp ch v - rch = rho * cp * ch(i) * wind(i) + tem = ch(i) * wind(i) cmm(i) = cm(i) * wind(i) - chh(i) = rho * ch(i) * wind(i) + chh(i) = rho * tem ! --- ... sensible and latent heat flux over open water - hflx(i) = rch * (tskin(i) - t1(i) * prslki(i)) + hflx(i) = tem * (tskin(i) - t1(i) * prslki(i)) - evap(i) = elocp*rch * (qss - q0) - qsurf(i) = qss + evap(i) = tem * (qss - q0) - tem = 1.0 / rho - hflx(i) = hflx(i) * tem * cpinv - evap(i) = evap(i) * tem * hvapi + ep(i) = evap(i) + qsurf(i) = qss endif enddo ! diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index d60c1ce2c..096454f7a 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -19,15 +19,6 @@ type = integer intent = in optional = F -[cp] - standard_name = specific_heat_of_dry_air_at_constant_pressure - long_name = specific heat of dry air at constant pressure - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F [rd] standard_name = gas_constant_dry_air long_name = ideal gas constant for dry air @@ -55,15 +46,6 @@ kind = kind_phys intent = in optional = F -[hvap] - standard_name = latent_heat_of_vaporization_of_water_at_0C - long_name = latent heat of evaporation/sublimation - units = J kg-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F [rvrdm1] standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index 750a6d795..db483ee75 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -146,6 +146,7 @@ subroutine sfc_sice_run & real(kind=kind_phys), parameter :: timin = 173.0d0 !< minimum temperature allowed for snow/ice real(kind=kind_phys), parameter :: albfw = 0.06d0 !< albedo for lead real(kind=kind_phys), parameter :: dsi = one/0.33d0 + real(kind=kind_phys), parameter :: qmin = 1.0d-8 ! --- inputs: integer, intent(in) :: im, km, ipr @@ -231,7 +232,7 @@ subroutine sfc_sice_run & if (flag(i)) then if (srflag(i) > zero) then ep(i) = ep(i)*(one-srflag(i)) - weasd(i) = weasd(i) + 1.e3*tprcp(i)*srflag(i) + weasd(i) = weasd(i) + 1.0d3*tprcp(i)*srflag(i) tprcp(i) = tprcp(i)*(one-srflag(i)) endif endif @@ -260,7 +261,7 @@ subroutine sfc_sice_run & ! dlwflx has been given a negative sign for downward longwave ! sfcnsw is the net shortwave flux (direction: dn-up) - q0 = max(q1(i), 1.0e-8) + q0 = max(q1(i), qmin) ! tsurf(i) = tskin(i) #ifdef GSD_SURFACE_FLUXES_BUGFIX theta1(i) = t1(i) / prslk1(i) ! potential temperature in middle of lowest atm. layer @@ -269,7 +270,7 @@ subroutine sfc_sice_run & #endif rho(i) = prsl1(i) / (rd*t1(i)*(one+rvrdm1*q0)) qs1 = fpvs(t1(i)) - qs1 = max(eps*qs1 / (prsl1(i) + epsm1*qs1), 1.e-8) + qs1 = max(eps*qs1 / (prsl1(i) + epsm1*qs1), qmin) q0 = min(qs1, q0) if (fice(i) < cimin) then @@ -279,7 +280,7 @@ subroutine sfc_sice_run & tskin(i)= tgice print *,'fix ice fraction: reset it to:', fice(i) endif - ffw(i) = 1.0 - fice(i) + ffw(i) = one - fice(i) qssi = fpvs(tice(i)) qssi = eps*qssi / (ps(i) + epsm1*qssi) @@ -309,7 +310,7 @@ subroutine sfc_sice_run & ! evap(i) = fice(i)*evapi(i) + ffw(i)*evapw(i) snetw(i) = sfcdsw(i) * (one - albfw) - snetw(i) = min(3.0*sfcnsw(i)/(one+2.0d0*ffw(i)), snetw(i)) + snetw(i) = min(3.0d0*sfcnsw(i)/(one+2.0d0*ffw(i)), snetw(i)) !> - Calculate net solar incoming at top \a sneti. sneti(i) = (sfcnsw(i) - ffw(i)*snetw(i)) / fice(i) @@ -416,10 +417,10 @@ subroutine sfc_sice_run & ! --- ... convert snow depth back to mm of water equivalent - weasd(i) = snowd(i) * 1000.0 + weasd(i) = snowd(i) * 1000.0d0 snwdph(i) = weasd(i) * dsi ! snow depth in mm - tem = 1.0 / rho(i) + tem = one / rho(i) hflx(i) = hflx(i) * tem * cpinv evap(i) = evap(i) * tem * hvapi endif @@ -530,7 +531,7 @@ subroutine ice3lay real (kind=kind_phys), parameter :: didw = di/dw real (kind=kind_phys), parameter :: dsdi = ds/di real (kind=kind_phys), parameter :: ci = 2054.0d0 !< heat capacity of fresh ice (j/kg/k) - real (kind=kind_phys), parameter :: li = 3.34e5 !< latent heat of fusion (j/kg-ice) + real (kind=kind_phys), parameter :: li = 3.34d5 !< latent heat of fusion (j/kg-ice) real (kind=kind_phys), parameter :: si = 1.0d0 !< salinity of sea ice real (kind=kind_phys), parameter :: mu = 0.054d0 !< relates freezing temp to salinity real (kind=kind_phys), parameter :: tfi = -mu*si !< sea ice freezing temp = -mu*salinity @@ -573,9 +574,9 @@ subroutine ice3lay ! !===> ... begin here ! - dt2 = 2.0d0 * delt - dt4 = 4.0d0 * delt - dt6 = 6.0d0 * delt + dt2 = delt + delt + dt4 = dt2 + dt2 + dt6 = dt2 + dt4 dt2i = one / dt2 do i = 1, im From c316f79bfb86630513d460a898ca59d897406f90 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Tue, 21 Apr 2020 01:40:22 +0000 Subject: [PATCH 092/404] removing some unneeded do loops in sfc_drv.f - results reproduce --- physics/sfc_drv.f | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 9f2170e80..f52b6d829 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -313,13 +313,9 @@ subroutine lsm_noah_run & sbsno(i) = zero snowc(i) = zero snohf(i) = zero - endif ! flag_iter & land - enddo !> - initialize variables wind, q, and rh at level 1. - do i = 1, im - if (flag_iter(i) .and. land(i)) then q0(i) = max(q1(i), qmin) !* q1=specific humidity at level 1 (kg/kg) theta1(i) = t1(i) * prslki(i) !* adiabatic temp at level 1 (k) @@ -327,19 +323,10 @@ subroutine lsm_noah_run & qs1(i) = fpvs( t1(i) ) !* qs1=sat. humidity at level 1 (kg/kg) qs1(i) = max(eps*qs1(i) / (prsl1(i)+epsm1*qs1(i)), qmin) q0 (i) = min(qs1(i), q0(i)) - endif ! flag_iter & land - enddo - do i = 1, im - if (flag_iter(i) .and. land(i)) then do k = 1, km zsoil(i,k) = zsoil_noah(k) enddo - endif ! flag_iter & land - enddo - - do i = 1, im - if (flag_iter(i) .and. land(i)) then !> - Prepare variables to run Noah LSM: !! - 1. configuration information (c): @@ -592,25 +579,20 @@ subroutine lsm_noah_run & !!\n nroot - number of root layers, a function of veg type, determined !! in subroutine redprm. - endif ! end if flag_iter and flag - enddo ! end do_i_loop +! endif ! end if flag_iter and flag +! enddo ! end do_i_loop !> - Compute specific humidity at surface (\a qsurf). - do i = 1, im - if (flag_iter(i) .and. land(i)) then rch(i) = rho(i) * cp * ch(i) * wind(i) qsurf(i) = q1(i) + evap(i) / (elocp * rch(i)) - endif ! flag_iter & land - enddo !> - Compute surface upward sensible heat flux (\a hflx) and evaporation !! flux (\a evap). - do i = 1, im - if (flag_iter(i) .and. land(i)) then tem = one / rho(i) hflx(i) = hflx(i) * tem * cpinv evap(i) = evap(i) * tem * hvapi + endif ! flag_iter & land enddo From 8056b688022d6cf1fb2b607722561c31976ebd2f Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Tue, 21 Apr 2020 14:28:01 +0000 Subject: [PATCH 093/404] Bug fix: (1) ambiguous conditional for defining Fng, (2) alleviate excessive detrainment problem for coarse vertical resolution. --- physics/module_bl_mynn.F90 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index 2922ee807..20a169c3a 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -2770,9 +2770,9 @@ SUBROUTINE mym_condensation (kts,kte, & Q1(k)=MAX(Q1(k),-5.0) IF (Q1(k) .GE. 1.0) THEN Fng = 1.0 - ELSEIF (Q1(k) .GE. -1.7 .AND. Q1(k) < 1.0) THEN + ELSEIF (Q1(k) .GE. -1.7 .AND. Q1(k) .LT. 1.0) THEN Fng = EXP(-0.4*(Q1(k)-1.0)) - ELSEIF (Q1(k) .GE. -2.5 .AND. Q1(k) .LE. -1.7) THEN + ELSEIF (Q1(k) .GE. -2.5 .AND. Q1(k) .LT. -1.7) THEN Fng = 3.0 + EXP(-3.8*(Q1(k)+1.7)) ELSE Fng = MIN(23.9 + EXP(-1.6*(Q1(k)+2.5)), 60.) @@ -6017,21 +6017,21 @@ SUBROUTINE DMP_mf( & aratio = MIN(UPA(K-1,I)/(1.-UPA(K-1,I)), 0.5) !limit should never get hit detturb = 0.00008 oow = -0.060/MAX(1.0,(0.5*(Wn+UPW(K-1,I)))) !coef for dynamical detrainment rate - detrate = MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0004) ! dynamical detrainment rate (m^-1) + detrate = MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0003) ! dynamical detrainment rate (m^-1) detrateUV= MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0001) ! dynamical detrainment rate (m^-1) - envm_thl(k)=envm_thl(k) + (0.5*(thl_ent + UPTHL(K-1,I)) - thl(k))*detrate*aratio*dzp + envm_thl(k)=envm_thl(k) + (0.5*(thl_ent + UPTHL(K-1,I)) - thl(k))*detrate*aratio*MIN(dzp,300.) qv_ent = 0.5*(MAX(qt_ent-qc_ent,0.) + MAX(UPQT(K-1,I)-UPQC(K-1,I),0.)) - envm_sqv(k)=envm_sqv(k) + (qv_ent-QV(K))*detrate*aratio*dzp + envm_sqv(k)=envm_sqv(k) + (qv_ent-QV(K))*detrate*aratio*MIN(dzp,300.) IF (UPQC(K-1,I) > 1E-8) THEN IF (QC(K) > 1E-6) THEN qc_grid = QC(K) ELSE qc_grid = cldfra_bl1d(k)*qc_bl1d(K) ENDIF - envm_sqc(k)=envm_sqc(k) + MAX(UPA(K-1,I)*0.5*(QCn + UPQC(K-1,I)) - qc_grid, 0.0)*detrate*aratio*dzp + envm_sqc(k)=envm_sqc(k) + MAX(UPA(K-1,I)*0.5*(QCn + UPQC(K-1,I)) - qc_grid, 0.0)*detrate*aratio*MIN(dzp,300.) ENDIF - envm_u(k) =envm_u(k) + (0.5*(Un + UPU(K-1,I)) - U(K))*detrateUV*aratio*dzp - envm_v(k) =envm_v(k) + (0.5*(Vn + UPV(K-1,I)) - V(K))*detrateUV*aratio*dzp + envm_u(k) =envm_u(k) + (0.5*(Un + UPU(K-1,I)) - U(K))*detrateUV*aratio*MIN(dzp,300.) + envm_v(k) =envm_v(k) + (0.5*(Vn + UPV(K-1,I)) - V(K))*detrateUV*aratio*MIN(dzp,300.) IF (Wn > 0.) THEN !Update plume variables at current k index @@ -6419,9 +6419,9 @@ SUBROUTINE DMP_mf( & Q1=MAX(Q1,-5.0) IF (Q1 .GE. 1.0) THEN Fng = 1.0 - ELSEIF (Q1 .GE. -1.7 .AND. Q1 < 1.0) THEN + ELSEIF (Q1 .GE. -1.7 .AND. Q1 .LT. 1.0) THEN Fng = EXP(-0.4*(Q1-1.0)) - ELSEIF (Q1 .GE. -2.5 .AND. Q1 .LE. -1.7) THEN + ELSEIF (Q1 .GE. -2.5 .AND. Q1 .LT. -1.7) THEN Fng = 3.0 + EXP(-3.8*(Q1+1.7)) ELSE Fng = MIN(23.9 + EXP(-1.6*(Q1+2.5)), 60.) From 5953c522b25ebc8a4424fbb54c4df21b4f38834d Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 22 Apr 2020 01:32:06 +0000 Subject: [PATCH 094/404] updating precision of constants in several physics routines --- physics/GFS_MP_generic.F90 | 16 +-- physics/GFS_suite_interstitial.F90 | 77 +++++----- physics/GFS_surface_composites.F90 | 10 +- physics/GFS_surface_generic.F90 | 39 +++-- physics/m_micro.F90 | 223 +++++++++++++++-------------- physics/micro_mg3_0.F90 | 19 ++- physics/moninshoc.f | 40 +++--- physics/sfc_drv.f | 42 +++--- physics/sfc_ocean.F | 4 +- physics/sfc_sice.f | 76 +++++----- 10 files changed, 277 insertions(+), 269 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index bcf11db66..ffbe6ab9b 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -140,15 +140,15 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt integer, intent(out) :: errflg ! DH* TODO: CLEANUP, all of these should be coming in through the argument list - real(kind=kind_phys), parameter :: con_p001= 0.001d0 - real(kind=kind_phys), parameter :: con_day = 86400.0d0 - real(kind=kind_phys), parameter :: rainmin = 1.0d-13 - real(kind=kind_phys), parameter :: p850 = 85000.0d0 + real(kind=kind_phys), parameter :: con_p001= 0.001_kind_phys + real(kind=kind_phys), parameter :: con_day = 86400.0_kind_phys + real(kind=kind_phys), parameter :: rainmin = 1.0e-13_kind_phys + real(kind=kind_phys), parameter :: p850 = 85000.0_kind_phys ! *DH integer :: i, k, ic - real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0 + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys real(kind=kind_phys) :: crain, csnow, onebg, tem, total_precip, tem1, tem2 real(kind=kind_phys), dimension(im) :: domr, domzr, domip, doms, t850, work1 @@ -267,7 +267,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt do i = 1, im !tprcp(i) = max(0.0, rain(i) )! clu: rain -> tprcp ! DH now lines 245-250 srflag(i) = zero ! clu: default srflag as 'rain' (i.e. 0) - if (tsfc(i) >= 273.15d0) then + if (tsfc(i) >= 273.15_kind_phys) then crain = rainc(i) csnow = zero else @@ -295,7 +295,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt if (rain(i) > rainmin) then tem1 = max(zero, (rain(i)-rainc(i))) * sr(i) tem2 = one / rain(i) - if (t850(i) > 273.16d0) then + if (t850(i) > 273.16_kind_phys) then srflag(i) = max(zero, min(one, tem1*tem2)) else srflag(i) = max(zero, min(one, (tem1+rainc(i))*tem2)) @@ -311,7 +311,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt do i = 1, im tprcp(i) = max(zero, rain(i) ) ! clu: rain -> tprcp srflag(i) = zero ! clu: default srflag as 'rain' (i.e. 0) - if (t850(i) <= 273.16d0) then + if (t850(i) <= 273.16_kind_phys) then srflag(i) = one ! clu: set srflag to 'snow' (i.e. 1) endif enddo diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index a8d5f5b8b..f6c4c5c7a 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -100,6 +100,7 @@ subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, dtf, dtp, slmsk, area, real(kind=kind_phys), intent(out), dimension(im) :: work1, work2, psurf real(kind=kind_phys), intent(out), dimension(im,levs) :: dudt, dvdt, dtdt, dtdtc real(kind=kind_phys), intent(out), dimension(im,levs,ntrac) :: dqdt + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -114,23 +115,23 @@ subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, dtf, dtp, slmsk, area, islmsk(i) = nint(slmsk(i)) work1(i) = (log(area(i)) - dxmin) * dxinv - work1(i) = max(0.0, min(1.0,work1(i))) - work2(i) = 1.0 - work1(i) + work1(i) = max(zero, min(one, work1(i))) + work2(i) = one - work1(i) psurf(i) = pgr(i) end do do k=1,levs do i=1,im - dudt(i,k) = 0. - dvdt(i,k) = 0. - dtdt(i,k) = 0. - dtdtc(i,k) = 0. + dudt(i,k) = zero + dvdt(i,k) = zero + dtdt(i,k) = zero + dtdtc(i,k) = zero enddo enddo do n=1,ntrac do k=1,levs do i=1,im - dqdt(i,k,n) = 0. + dqdt(i,k,n) = zero enddo enddo enddo @@ -143,7 +144,6 @@ end module GFS_suite_interstitial_1 module GFS_suite_interstitial_2 use machine, only: kind_phys - real(kind=kind_phys), parameter :: one = 1.0d0 contains @@ -195,13 +195,14 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl integer, intent(out) :: errflg ! local variables - real(kind=kind_phys), parameter :: czmin = 0.0001 ! cos(89.994) + real(kind=kind_phys), parameter :: czmin = 0.0001_kind_phys ! cos(89.994) integer :: i, k real(kind=kind_phys) :: tem1, tem2, tem, hocp logical, dimension(im) :: invrsn real(kind=kind_phys), dimension(im) :: tx1, tx2 - real(kind=kind_phys), parameter :: qmin = 1.0d-10, epsln=1.0d-10 + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys + real(kind=kind_phys), parameter :: qmin = 1.0e-10_kind_phys, epsln=1.0e-10_kind_phys ! Initialize CCPP error handling variables errmsg = '' @@ -218,7 +219,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl do i = 1, im if ( xcosz(i) >= czmin ) then ! zenth angle > 89.994 deg tem1 = adjsfcdsw(i) / xcosz(i) - if ( tem1 >= 120.0 ) then + if ( tem1 >= 120.0_kind_phys ) then suntim(i) = suntim(i) + dtf endif endif @@ -295,9 +296,9 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl do i=1, im invrsn(i) = .false. - tx1(i) = 0.0 - tx2(i) = 10.0 - ctei_r(i) = 10.0 + tx1(i) = zero + tx2(i) = 10.0_kind_phys + ctei_r(i) = 10.0_kind_phys enddo if ((((imfshalcnv == 0 .and. shal_cnv) .or. old_monin) .and. mstrat) & @@ -305,13 +306,13 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl ctei_rml(:) = ctei_rm(1)*work1(:) + ctei_rm(2)*work2(:) do k=1,levs/2 do i=1,im - if (prsi(i,1)-prsi(i,k+1) < 0.35*prsi(i,1) & + if (prsi(i,1)-prsi(i,k+1) < 0.35_kind_phys*prsi(i,1) & .and. (.not. invrsn(i))) then tem = (tgrs(i,k+1) - tgrs(i,k)) & / (prsl(i,k) - prsl(i,k+1)) - if (((tem > 0.00010) .and. (tx1(i) < 0.0)) .or. & - ((tem-abs(tx1(i)) > 0.0) .and. (tx2(i) < 0.0))) then + if (((tem > 0.0001_kind_phys) .and. (tx1(i) < zero)) .or. & + ((tem-abs(tx1(i)) > zero) .and. (tx2(i) < zero))) then invrsn(i) = .true. if (qgrs_water_vapor(i,k) > qgrs_water_vapor(i,k+1)) then @@ -321,10 +322,10 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl tem1 = tem1 / prslk(i,k+1) - tem2 / prslk(i,k) ! --- ... (cp/l)(deltathetae)/(deltatwater) > ctei_rm -> conditon for CTEI - ctei_r(i) = (1.0/hocp)*tem1/(qgrs_water_vapor(i,k+1)-qgrs_water_vapor(i,k) & + ctei_r(i) = (one/hocp)*tem1/(qgrs_water_vapor(i,k+1)-qgrs_water_vapor(i,k) & + qgrs_cloud_water(i,k+1)-qgrs_cloud_water(i,k)) else - ctei_r(i) = 10 + ctei_r(i) = 10.0_kind_phys endif if ( ctei_rml(i) > ctei_r(i) ) then @@ -505,8 +506,9 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & !real(kind=kind_phys),parameter :: slope_mg = 0.02, slope_upmg = 0.04, & ! turnrhcrit = 0.900, turnrhcrit_upper = 0.150 ! in the following inverse of slope_mg and slope_upmg are specified - real(kind=kind_phys),parameter :: slope_mg = 50.0_kind_phys, & - slope_upmg = 25.0_kind_phys + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys + real(kind=kind_phys), parameter :: slope_mg = 50.0_kind_phys, & + slope_upmg = 25.0_kind_phys ! Initialize CCPP error handling variables errmsg = '' @@ -558,10 +560,10 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & endif ! end if_ras or cfscnv or samf if (ntcw > 0) then - if (imp_physics == imp_physics_mg .and. rhcpbl < 0.5) then ! compute rhc for GMAO macro physics cloud pdf + if (imp_physics == imp_physics_mg .and. rhcpbl < 0.5_kind_phys) then ! compute rhc for GMAO macro physics cloud pdf do i=1,im - tx1(i) = 1.0 / prsi(i,1) - tx2(i) = 1.0 - rhcmax*work1(i)-rhcbot*work2(i) + tx1(i) = one / prsi(i,1) + tx2(i) = one - rhcmax*work1(i)-rhcbot*work2(i) kk = min(kinver(i), max(2,kpbl(i))) tx3(i) = prsi(i,kk)*tx1(i) @@ -570,18 +572,18 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & do k = 1, levs do i = 1, im tem = prsl(i,k) * tx1(i) - tem1 = min(max((tem-tx3(i))*slope_mg, -20.0), 20.0) + tem1 = min(max((tem-tx3(i))*slope_mg, -20.0_kind_phys), 20.0_kind_phys) ! Using rhcpbl and rhctop from the namelist instead of 0.3 and 0.2 ! and rhcbot represents pbl top critical relative humidity - tem2 = min(max((tx4(i)-tem)*slope_upmg, -20.0), 20.0) ! Anning + tem2 = min(max((tx4(i)-tem)*slope_upmg, -20.0_kind_phys), 20.0_kind_phys) ! Anning if (islmsk(i) > 0) then - tem1 = 1.0 / (1.0+exp(tem1+tem1)) + tem1 = one / (one+exp(tem1+tem1)) else - tem1 = 2.0 / (1.0+exp(tem1+tem1)) + tem1 = 2.0_kind_phys / (one+exp(tem1+tem1)) endif - tem2 = 1.0 / (1.0+exp(tem2)) + tem2 = one / (one+exp(tem2)) - rhc(i,k) = min(rhcmax, max(0.7, 1.0-tx2(i)*tem1*tem2)) + rhc(i,k) = min(rhcmax, max(0.7_kind_phys, one-tx2(i)*tem1*tem2)) enddo enddo else @@ -589,12 +591,12 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & do i=1,im kk = max(10,kpbl(i)) if (k < kk) then - tem = rhcbot - (rhcbot-rhcpbl) * (1.0-prslk(i,k)) / (1.0-prslk(i,kk)) + tem = rhcbot - (rhcbot-rhcpbl) * (one-prslk(i,k)) / (one-prslk(i,kk)) else tem = rhcpbl - (rhcpbl-rhctop) * (prslk(i,kk)-prslk(i,k)) / prslk(i,kk) endif tem = rhcmax * work1(i) + tem * work2(i) - rhc(i,k) = max(0.0, min(1.0,tem)) + rhc(i,k) = max(zero, min(one,tem)) enddo enddo endif @@ -641,7 +643,7 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & ! prautco_l(i) = Model%prautco(1)*work1(i) + Model%prautco(2)*work2(i) ! enddo !*GF - rhc(:,:) = 1.0 + rhc(:,:) = one endif ! end if_ntcw end subroutine GFS_suite_interstitial_3_run @@ -688,6 +690,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to ! dqdti may not be allocated real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -745,16 +748,16 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to do k=1,levs do i=1,im gq0(i,k,ntlnc) = gq0(i,k,ntlnc) & - + max(0.0, (clw(i,k,2)-save_qc(i,k))) / liqm + + max(zero, (clw(i,k,2)-save_qc(i,k))) / liqm gq0(i,k,ntinc) = gq0(i,k,ntinc) & - + max(0.0, (clw(i,k,1)-save_qi(i,k))) / icem + + max(zero, (clw(i,k,1)-save_qi(i,k))) / icem enddo enddo else do k=1,levs do i=1,im gq0(i,k,ntinc) = gq0(i,k,ntinc) & - + max(0.0, (clw(i,k,1)-save_qi(i,k))) / icem + + max(zero, (clw(i,k,1)-save_qi(i,k))) / icem enddo enddo endif @@ -779,7 +782,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to if (cplchm) then do k=1,levs do i=1,im - dqdti(i,k) = dqdti(i,k) * (1.0 / dtf) + dqdti(i,k) = dqdti(i,k) * (one / dtf) enddo enddo endif diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index c98650b99..e12543328 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -11,7 +11,7 @@ module GFS_surface_composites_pre public GFS_surface_composites_pre_init, GFS_surface_composites_pre_finalize, GFS_surface_composites_pre_run - real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0, epsln = 1.0d-10 + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys, epsln = 1.0e-10_kind_phys contains @@ -158,7 +158,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl ! snowd_ocn(i) = snowd(i) weasd_ocn(i) = zero snowd_ocn(i) = zero - semis_ocn(i) = 0.984d0 + semis_ocn(i) = 0.984_kind_phys endif if (dry(i)) then ! Land uustar_lnd(i) = uustar(i) @@ -178,7 +178,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl snowd_ice(i) = snowd(i) ep1d_ice(i) = zero gflx_ice(i) = zero - semis_ice(i) = 0.95d0 + semis_ice(i) = 0.95_kind_phys endif enddo @@ -278,7 +278,7 @@ module GFS_surface_composites_post public GFS_surface_composites_post_init, GFS_surface_composites_post_finalize, GFS_surface_composites_post_run - real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0 + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys contains @@ -357,7 +357,7 @@ subroutine GFS_surface_composites_post_run ( uustar(i) = txl*uustar_lnd(i) + txi*uustar_ice(i) + txo*uustar_ocn(i) fm10(i) = txl*fm10_lnd(i) + txi*fm10_ice(i) + txo*fm10_ocn(i) fh2(i) = txl*fh2_lnd(i) + txi*fh2_ice(i) + txo*fh2_ocn(i) - !tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_ocn(i) + !tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_ocn(i) !tsurf(i) = txl*tsurf_lnd(i) + txi*tsurf_ice(i) + txo*tsurf_ocn(i) ! not used again! Moorthi cmm(i) = txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_ocn(i) chh(i) = txl*chh_lnd(i) + txi*chh_ice(i) + txo*chh_ocn(i) diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index 9cdf14d85..116b3e29f 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -11,8 +11,7 @@ module GFS_surface_generic_pre public GFS_surface_generic_pre_init, GFS_surface_generic_pre_finalize, GFS_surface_generic_pre_run - real(kind=kind_phys), parameter :: one = 1.0d0 - real(kind=kind_phys), parameter :: zero = 0.0d0 + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys contains @@ -103,24 +102,24 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, ! Set initial quantities for stochastic physics deltas if (do_sppt) then - dtdtr = 0.0 + dtdtr = zero endif ! Scale random patterns for surface perturbations with perturbation size ! Turn vegetation fraction pattern into percentile pattern if (do_sfcperts) then - if (pertz0(1) > 0.) then + if (pertz0(1) > zero) then z01d(:) = pertz0(1) * sfc_wts(:,1) ! if (me == 0) print*,'sfc_wts(:,1) min and max',minval(sfc_wts(:,1)),maxval(sfc_wts(:,1)) ! if (me == 0) print*,'z01d min and max ',minval(z01d),maxval(z01d) endif - if (pertzt(1) > 0.) then + if (pertzt(1) > zero) then zt1d(:) = pertzt(1) * sfc_wts(:,2) endif - if (pertshc(1) > 0.) then + if (pertshc(1) > zero) then bexp1d(:) = pertshc(1) * sfc_wts(:,3) endif - if (pertlai(1) > 0.) then + if (pertlai(1) > zero) then xlai1d(:) = pertlai(1) * sfc_wts(:,4) endif ! --- do the albedo percentile calculation in GFS_radiation_driver instead --- ! @@ -130,7 +129,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, ! alb1d(i) = cdfz ! enddo ! endif - if (pertvegf(1) > 0.) then + if (pertvegf(1) > zero) then do i=1,im call cdfnor(sfc_wts(i,6),cdfz) vegf1d(i) = cdfz @@ -141,7 +140,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, ! End of stochastic physics / surface perturbation do i=1,im - sigmaf(i) = max(vfrac(i),0.01 ) + sigmaf(i) = max(vfrac(i), 0.01_kind_phys) if (islmsk(i) == 2) then if (isot == 1) then soiltyp(i) = 16 @@ -155,9 +154,9 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, endif slopetyp(i) = 9 else - soiltyp(i) = int( stype(i)+0.5 ) - vegtype(i) = int( vtype(i)+0.5 ) - slopetyp(i) = int( slope(i)+0.5 ) !! clu: slope -> slopetyp + soiltyp(i) = int( stype(i)+0.5_kind_phys ) + vegtype(i) = int( vtype(i)+0.5_kind_phys ) + slopetyp(i) = int( slope(i)+0.5_kind_phys ) !! clu: slope -> slopetyp if (soiltyp(i) < 1) soiltyp(i) = 14 if (vegtype(i) < 1) vegtype(i) = 17 if (slopetyp(i) < 1) slopetyp(i) = 1 @@ -171,7 +170,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, smcref2(i) = zero wind(i) = max(sqrt(u1(i)*u1(i) + v1(i)*v1(i)) & - + max(zero, min(cnvwind(i), 30.0)), one) + + max(zero, min(cnvwind(i), 30.0_kind_phys)), one) !wind(i) = max(sqrt(Statein%ugrs(i,1)*Statein%ugrs(i,1) + & ! Statein%vgrs(i,1)*Statein%vgrs(i,1)) & ! + max(zero, min(Tbd%phy_f2d(i,Model%num_p2d), 30.0)), one) @@ -201,7 +200,7 @@ module GFS_surface_generic_post public GFS_surface_generic_post_init, GFS_surface_generic_post_finalize, GFS_surface_generic_post_run - real(kind=kind_phys), parameter :: zero = 0.0, one = 1.0d0 + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys contains @@ -246,7 +245,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: albdf = 0.06d0 + real(kind=kind_phys), parameter :: albdf = 0.06_kind_phys integer :: i real(kind=kind_phys) :: xcosz_loc, ocalnirdf_cpl, ocalnirbm_cpl, ocalvisdf_cpl, ocalvisbm_cpl @@ -305,11 +304,11 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt if (wet(i)) then ! some open water ! --- compute open water albedo xcosz_loc = max( zero, min( one, xcosz(i) )) - ocalnirdf_cpl = 0.06d0 - ocalnirbm_cpl = max(albdf, 0.026d0/(xcosz_loc**1.7d0+0.065d0) & - & + 0.15d0 * (xcosz_loc-0.1d0) * (xcosz_loc-0.5d0) & + ocalnirdf_cpl = 0.06_kind_phys + ocalnirbm_cpl = max(albdf, 0.026_kind_phys/(xcosz_loc**1.7_kind_phys+0.065_kind_phys) & + & + 0.15_kind_phys * (xcosz_loc-0.1_kind_phys) * (xcosz_loc-0.5_kind_phys) & & * (xcosz_loc-one)) - ocalvisdf_cpl = 0.06d0 + ocalvisdf_cpl = 0.06_kind_phys ocalvisbm_cpl = ocalnirbm_cpl nnirbmi_cpl(i) = adjnirbmd(i) * (one-ocalnirbm_cpl) @@ -323,7 +322,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt nvisdfi_cpl(i) = adjvisdfd(i) - adjvisdfu(i) endif nswsfci_cpl(i) = nnirbmi_cpl(i) + nnirdfi_cpl(i) & - + nvisbmi_cpl(i) + nvisdfi_cpl(i) + + nvisbmi_cpl(i) + nvisdfi_cpl(i) nswsfc_cpl(i) = nswsfc_cpl(i) + nswsfci_cpl(i)*dtf nnirbm_cpl(i) = nnirbm_cpl(i) + nnirbmi_cpl(i)*dtf nnirdf_cpl(i) = nnirdf_cpl(i) + nnirdfi_cpl(i)*dtf diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index 521070af7..ba7963e7d 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -175,12 +175,13 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & !------------------------------------ ! input ! real, parameter :: r_air = 3.47d-3 - real, parameter :: one=1.0d0, oneb3=one/3.0d0, onebcp=one/cp, & - zero=0.0d0, half=0.5d0, onebg=one/grav, & - & kapa=rgas*onebcp, cpbg=cp/grav, & - & lvbcp=hvap*onebcp, lsbcp=(hvap+hfus)*onebcp, & - & qsmall=1.0d-14, rainmin = 1.0d-13, & - & fourb3=4.0d0/3.0d0, RL_cub=1.0d-15, nmin=1.0d0 + real, parameter :: one=1.0_kind_phys, oneb3=one/3.0_kind_phys, onebcp=one/cp, & + zero=0.0_kind_phys, half=0.5_kind_phys, onebg=one/grav, & + & kapa=rgas*onebcp, cpbg=cp/grav, & + & lvbcp=hvap*onebcp, lsbcp=(hvap+hfus)*onebcp, & + & qsmall=1.0e-14_kind_phys, rainmin = 1.0e-13_kind_phys, & + & fourb3=4.0_kind_phys/3.0_kind_phys, RL_cub=1.0e-15_kind_phys, & + & nmin=1.0_kind_phys integer, parameter :: ncolmicro = 1 integer,intent(in) :: im, ix,lm, kdt, fprcp, pdfflag, iccn @@ -354,27 +355,27 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! real (kind=kind_phys), parameter :: disp_liu=2., ui_scale=1.0 & ! &, dcrit=20.0d-6 & - real (kind=kind_phys), parameter :: disp_liu=1.0d0 & - &, ui_scale=1.0d0 & - &, dcrit=1.0d-6 & + real (kind=kind_phys), parameter :: disp_liu=1.0_kind_phys & + &, ui_scale=1.0_kind_phys & + &, dcrit=1.0e-6_kind_phys & ! &, ts_autice=1800.0 & ! &, ts_autice=3600.0 & !time scale - &, ninstr8 = 0.1d6 & - &, ncnstr8 = 100.0d6 + &, ninstr8 = 0.1e6_kind_phys & + &, ncnstr8 = 100.0e6_kind_phys real(kind=kind_phys):: k_gw, maxkh, tausurf_gw, overscale, tx1, rh1_r8 real(kind=kind_phys):: t_ice_denom - integer, dimension(1) :: lev_sed_strt ! sedimentation start level - real(kind=kind_phys), parameter :: sig_sed_strt=0.05d0 ! normalized pressure at sedimentation start + integer, dimension(1) :: lev_sed_strt ! sedimentation start level + real(kind=kind_phys), parameter :: sig_sed_strt=0.05_kind_phys ! normalized pressure at sedimentation start real(kind=kind_phys),dimension(3) :: ccn_diag real(kind=kind_phys),dimension(58) :: cloudparams integer, parameter :: CCN_PARAM=2, IN_PARAM=5 - real(kind=kind_phys), parameter ::fdust_drop=1.0d0, fsoot_drop=0.1d0 & - &, sigma_nuc_r8=0.28d0,SCLMFDFR=0.03d0 + real(kind=kind_phys), parameter ::fdust_drop=1.0_kind_phys, fsoot_drop=0.1_kind_phys & + &, sigma_nuc_r8=0.28_kind_phys,SCLMFDFR=0.03_kind_phys ! &, sigma_nuc_r8=0.28,SCLMFDFR=0.1 type (AerProps), dimension (IM,LM) :: AeroProps @@ -440,7 +441,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & CNV_DQLDT(I,K) = CNV_DQLDT_i(I,ll) CLCN(I,k) = CLCN_i(I,ll) CLLS(I,k) = max(CLLS_io(I,ll)-CLCN_i(I,ll),zero) - PLO(i,k) = prsl_i(i,ll)*0.01d0 + PLO(i,k) = prsl_i(i,ll)*0.01_kind_phys zlo(i,k) = phil(i,ll) * onebg temp(i,k) = t_io(i,ll) radheat(i,k) = lwheat_i(i,ll) + swheat_i(i,ll) @@ -455,7 +456,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO K=0, LM ll = lm-k DO I = 1,IM - PLE(i,k) = prsi_i(i,ll) * 0.01d0 ! interface pressure in hPa + PLE(i,k) = prsi_i(i,ll) * 0.01_kind_phys ! interface pressure in hPa zet(i,k+1) = phii(i,ll) * onebg END DO END DO @@ -500,7 +501,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & CNV_DQLDT(I,K) = CNV_DQLDT_i(I,k) CLCN(I,k) = CLCN_i(I,k) CLLS(I,k) = max(CLLS_io(I,k)-CLCN_i(I,k),zero) - PLO(i,k) = prsl_i(i,k)*0.01d0 + PLO(i,k) = prsl_i(i,k)*0.01_kind_phys zlo(i,k) = phil(i,k) * onebg temp(i,k) = t_io(i,k) radheat(i,k) = lwheat_i(i,k) + swheat_i(i,k) @@ -514,7 +515,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & END DO DO K=0, LM DO I = 1,IM - PLE(i,k) = prsi_i(i,k) * 0.01d0 ! interface pressure in hPa + PLE(i,k) = prsi_i(i,k) * 0.01_kind_phys ! interface pressure in hPa zet(i,k+1) = phii(i,k) * onebg END DO END DO @@ -553,17 +554,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0d0), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kind_phys), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) endif enddo @@ -577,8 +578,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO I=1, IM DO K = LM-2, 10, -1 - If ((CNV_DQLDT(I,K) <= 1.0d-9) .and. & - & (CNV_DQLDT(I,K+1) > 1.0d-9)) then + If ((CNV_DQLDT(I,K) <= 1.0e-9_kind_phys) .and. & + & (CNV_DQLDT(I,K+1) > 1.0e-9_kind_phys)) then KCT(I) = K+1 exit end if @@ -658,7 +659,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do l=lm-1,1,-1 do i=1,im tx1 = half * (temp(i,l+1) + temp(i,l)) - kh(i,l) = 3.55d-7*tx1**2.5d0*(rgas*0.01d0) / ple(i,l) !kh molecule diff only needing refinement + kh(i,l) = 3.55e-7_kind_phys*tx1**2.5_kind_phys*(rgas*0.01_kind_phys) / ple(i,l) !kh molecule diff only needing refinement enddo end do do i=1,im @@ -667,8 +668,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & enddo do L=LM,1,-1 do i=1,im - blk_l(i,l) = one / ( one/max(0.15d0*ZPBL(i),0.4d0*zlo(i,lm-1))& - & + one/(zlo(i,l)*0.4d0) ) + blk_l(i,l) = one / ( one/max(0.15_kind_phys*ZPBL(i),0.4_kind_phys*zlo(i,lm-1))& + & + one/(zlo(i,l)*0.4_kind_phys) ) SC_ICE(i,l) = one NCPL(i,l) = MAX( NCPL(i,l), zero) @@ -687,8 +688,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do l=1,lm - rhdfdar8(l) = 1.d-8 - rhu00r8(l) = 0.95d0 + rhdfdar8(l) = 1.e-8_kind_phys + rhu00r8(l) = 0.95_kind_phys ttendr8(l) = zero qtendr8(l) = zero @@ -733,8 +734,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if ( iccn == 2) then AERMASSMIX(:,:,1:ntrcaer) = aerfld_i(:,:,1:ntrcaer) else - AERMASSMIX(:,:,1:5) = 1.0d-6 - AERMASSMIX(:,:,6:15) = 2.0d-14 + AERMASSMIX(:,:,1:5) = 1.0e-6_kind_phys + AERMASSMIX(:,:,6:15) = 2.0e-14_kind_phys end if !> - Call aerconversion1() call AerConversion1 (AERMASSMIX, AeroProps) @@ -753,23 +754,23 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & kcldtopcvn = KCT(I) tausurf_gw = min(half*SQRT(TAUOROX(I)*TAUOROX(I) & - & + TAUOROY(I)*TAUOROY(I)), 10.0d0) + & + TAUOROY(I)*TAUOROY(I)), 10.0_kind_phys) do k=1,lm uwind_gw(k) = min(half*SQRT( U1(I,k)*U1(I,k) & - & + V1(I,k)*V1(I,k)), 50.0d0) + & + V1(I,k)*V1(I,k)), 50.0_kind_phys) ! tausurf_gw =tausurf_gw + max (tausurf_gw, min(0.5*SQRT(TAUX(I , J)**2+TAUY(I , J)**2), 10.0)*BKGTAU) !adds a minimum value from unresolved sources - pm_gw(k) = 100.0d0*PLO(I,k) + pm_gw(k) = 100.0_kind_phys*PLO(I,k) tm_gw(k) = TEMP(I,k) nm_gw(k) = zero rho_gw(k) = pm_gw(k) /(RGAS*tm_gw(k)) ter8(k) = TEMP(I,k) - plevr8(k) = 100.0d0*PLO(I,k) + plevr8(k) = 100.0_kind_phys*PLO(I,k) ndropr8(k) = NCPL(I,k) qir8(k) = QILS(I,k) + QICN(I,k) qcr8(k) = QLLS(I,k) + QLCN(I,k) @@ -780,27 +781,27 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & npre8(k) = zero - if (RAD_CF(I,k) > 0.01d0 .and. qir8(k) > zero) then + if (RAD_CF(I,k) > 0.01_kind_phys .and. qir8(k) > zero) then npre8(k) = NPRE_FRAC*NCPI(I,k) else npre8(k) = zero endif omegr8(k) = OMEGA(I,k) - lc_turb(k) = max(blk_l(I,k), 50.0d0) + lc_turb(k) = max(blk_l(I,k), 50.0_kind_phys) ! rad_cooling(k) = RADheat(I,k) if (npre8(k) > zero .and. qir8(k) > zero) then - dpre8(k) = ( qir8(k)/(6.0d0*npre8(k)*900.0d0*PI))**(one/3.0d0) + dpre8(k) = ( qir8(k)/(6.0_kind_phys*npre8(k)*900.0_kind_phys*PI))**(one/3.0_kind_phys) else - dpre8(k) = 1.0d-9 + dpre8(k) = 1.0e-9_kind_phys endif wparc_ls(k) = -omegr8(k) / (rho_gw(k)*GRAV) & & + cpbg * radheat(i,k) ! & + cpbg * rad_cooling(k) enddo do k=0,lm - pi_gw(k) = 100.0d0*PLE(I,k) + pi_gw(k) = 100.0_kind_phys*PLE(I,k) rhoi_gw(k) = zero ni_gw(k) = zero ti_gw(k) = zero @@ -816,13 +817,13 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & ti_gw, nm_gw, q1(i,:)) do k=1,lm - nm_gw(k) = max(nm_gw(k), 0.005d0) + nm_gw(k) = max(nm_gw(k), 0.005_kind_phys) h_gw(k) = k_gw*rho_gw(k)*uwind_gw(k)*nm_gw(k) if (h_gw(K) > zero) then - h_gw(K) = sqrt(2.0d0*tausurf_gw/h_gw(K)) + h_gw(K) = sqrt(2.0_kind_phys*tausurf_gw/h_gw(K)) end if - wparc_gw(k) = k_gw*uwind_gw(k)*h_gw(k)*0.133d0 + wparc_gw(k) = k_gw*uwind_gw(k)*h_gw(k)*0.133_kind_phys wparc_cgw(k) = zero end do @@ -839,14 +840,14 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do k=1,kcldtopcvn c2_gw = (nm_gw(k) + Nct) / Nct - wparc_cgw(k) = sqrt(ksa1*fcn*fcn*12.56d0* & - & 1.806d0*c2_gw*c2_gw)*Wct*0.133d0 + wparc_cgw(k) = sqrt(ksa1*fcn*fcn*12.56_kind_phys* & + & 1.806_kind_phys*c2_gw*c2_gw)*Wct*0.133_kind_phys enddo end if do k=1,lm - dummyW(k) = 0.133d0*k_gw*uwind_gw(k)/nm_gw(k) + dummyW(k) = 0.133_kind_phys*k_gw*uwind_gw(k)/nm_gw(k) enddo do K=1, LM-5, 1 @@ -866,17 +867,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & kbmin = min(kbmin, LM-1) - 4 do K = 1, LM wparc_turb(k) = KH(I,k) / lc_turb(k) - dummyW(k) = 10.0d0 + dummyW(k) = 10.0_kind_phys enddo - if (FRLAND(I) < 0.1d0 .and. ZPBL(I) < 800.0d0 .and. & - & TEMP(I,LM) < 298.0d0 .and. TEMP(I,LM) > 274.0d0 ) then + if (FRLAND(I) < 0.1_kind_phys .and. ZPBL(I) < 800.0_kind_phys .and. & + & TEMP(I,LM) < 298.0_kind_phys .and. TEMP(I,LM) > 274.0_kind_phys) then do K = 1, LM - dummyW(k) = max(min((ZET(I,k+1)-ZPBL(I))*0.01d0,10.0d0),-10.0d0) + dummyW(k) = max(min((ZET(I,k+1)-ZPBL(I))*0.01_kind_phys, 10.0_kind_phys),-10.0_kind_phys) dummyW(k) = one / (one+exp(dummyW(k))) enddo maxkh = max(maxval(KH(I,kbmin:LM-1)*nm_gw(kbmin:LM-1)/ & - & 0.17d0), 0.3d0) + & 0.17_kind_phys), 0.3_kind_phys) do K = 1, LM wparc_turb(k) = (one-dummyW(k))*wparc_turb(k) & & + dummyW(k)*maxkh @@ -884,7 +885,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & end if - wparc_turb(kbmin:LM) = max(wparc_turb(kbmin:LM), 0.2d0) + wparc_turb(kbmin:LM) = max(wparc_turb(kbmin:LM), 0.2_kind_phys) @@ -902,11 +903,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do K = 1, LM - if (plevr8(K) > 70.0d0) then + if (plevr8(K) > 70.0_kind_phys) then - ccn_diag(1) = 0.001d0 - ccn_diag(2) = 0.004d0 - ccn_diag(3) = 0.01d0 + ccn_diag(1) = 0.001_kind_phys + ccn_diag(2) = 0.004_kind_phys + ccn_diag(3) = 0.01_kind_phys if (K > 2 .and. K <= LM-2) then tauxr8 = (ter8(K-1) + ter8(K+1) + ter8(K)) * oneb3 @@ -957,7 +958,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & swparc(K) = zero smaxicer8(K) = zero nheticer8(K) = zero - sc_icer8(K) = 2.0d0 + sc_icer8(K) = 2.0_kind_phys ! sc_icer8(K) = 1.0d0 naair8(K) = zero npccninr8(K) = zero @@ -974,9 +975,9 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! SMAXL(I,k) = smaxliq(k) * 100.0 ! SMAXI(I,k) = smaxicer8(k) * 100.0 - NHET_NUC(I,k) = nheticer8(k) * 1.0d-6 - NLIM_NUC(I,k) = nlimicer8(k) * 1.0d-6 - SC_ICE(I,k) = min(max(sc_icer8(k),one),2.0d0) + NHET_NUC(I,k) = nheticer8(k) * 1.0e-6_kind_phys + NLIM_NUC(I,k) = nlimicer8(k) * 1.0e-6_kind_phys + SC_ICE(I,k) = min(max(sc_icer8(k),one),2.0_kind_phys) ! SC_ICE(I,k) = min(max(sc_icer8(k),1.0),1.2) ! if(temp(i,k) < T_ICE_ALL) SC_ICE(i,k) = max(SC_ICE(I,k), 1.2) ! if(temp(i,k) < T_ICE_ALL) SC_ICE(i,k) = max(SC_ICE(I,k), 1.5) @@ -986,13 +987,13 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (iccn == 0) then if(temp(i,k) < T_ICE_ALL) then ! SC_ICE(i,k) = max(SC_ICE(I,k), 1.2) - SC_ICE(i,k) = max(SC_ICE(I,k), 1.5d0) + SC_ICE(i,k) = max(SC_ICE(I,k), 1.5_kind_phys) elseif(temp(i,k) > TICE) then SC_ICE(i,k) = rhc(i,k) else ! SC_ICE(i,k) = 1.0 ! tx1 = max(SC_ICE(I,k), 1.2) - tx1 = max(SC_ICE(I,k), 1.5d0) + tx1 = max(SC_ICE(I,k), 1.5_kind_phys) SC_ICE(i,k) = ((tice-temp(i,k))*tx1 + (temp(i,k)-t_ice_all)*rhc(i,k)) & * t_ice_denom endif @@ -1003,12 +1004,12 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & endif NHET_IMM(I,k) = max(nhet_immr8(k), zero) DNHET_IMM(I,k) = max(dnhet_immr8(k), zero) - NHET_DEP(I,k) = nhet_depr8(k) * 1.0d-6 - NHET_DHF(I,k) = nhet_dhfr8(k) * 1.0d-6 - DUST_IMM(I,k) = max(dust_immr8(k), zero)*1.0d-6 - DUST_DEP(I,k) = max(dust_depr8(k), zero)*1.0d-6 - DUST_DHF(I,k) = max(dust_dhfr8(k), zero)*1.0d-6 - WSUB (I,k) = wparc_ls(k) + swparc(k)*0.8d0 + NHET_DEP(I,k) = nhet_depr8(k) * 1.0e-6_kind_phys + NHET_DHF(I,k) = nhet_dhfr8(k) * 1.0e-6_kind_phys + DUST_IMM(I,k) = max(dust_immr8(k), zero)*1.0e-6_kind_phys + DUST_DEP(I,k) = max(dust_depr8(k), zero)*1.0e-6_kind_phys + DUST_DHF(I,k) = max(dust_dhfr8(k), zero)*1.0e-6_kind_phys + WSUB (I,k) = wparc_ls(k) + swparc(k)*0.8_kind_phys SIGW_GW (I,k) = wparc_gw(k) * wparc_gw(k) SIGW_CNV (I,k) = wparc_cgw(k) * wparc_cgw(k) SIGW_TURB (I,k) = wparc_turb(k) * wparc_turb(k) @@ -1121,7 +1122,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do k=1,lm do i=1,im - if (CNV_MFD(i,k) > 1.0d-6) then + if (CNV_MFD(i,k) > 1.0e-6_kind_phys) then tx1 = one / CNV_MFD(i,k) CNV_NDROP(i,k) = CNV_NDROP(i,k) * tx1 CNV_NICE(i,k) = CNV_NICE(i,k) * tx1 @@ -1230,7 +1231,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do l=1,10 do k=1,lm naconr8(k,l) = zero - rndstr8(k,l) = 2.0d-7 + rndstr8(k,l) = 2.0e-7_kind_phys enddo enddo do k=1,lm @@ -1241,7 +1242,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! tx1 = MIN(CLLS(I,k) + CLCN(I,k), 0.99) tx1 = MIN(CLLS(I,k) + CLCN(I,k), one) if (tx1 > zero) then - cldfr8(k) = min(max(tx1, 0.00001d0), one) + cldfr8(k) = min(max(tx1, 0.00001_kind_phys), one) else cldfr8(k) = zero endif @@ -1277,7 +1278,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & naair8(k) = INC_NUC(I,k) npccninr8(k) = CDNC_NUC(I,k) - if (cldfr8(k) >= 0.001d0) then + if (cldfr8(k) >= 0.001_kind_phys) then nimmr8(k) = min(DNHET_IMM(I,k),ncr8(k)/(cldfr8(k)*DT_MOIST)) else nimmr8(k) = zero @@ -1305,11 +1306,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! naux = AeroAux_b%nmods ! rnsootr8 (K) = sum(AeroAux_b%dpg(1:naux))/naux - pdelr8(k) = (PLE(I,k) - PLE(I,k-1)) * 100.0d0 + pdelr8(k) = (PLE(I,k) - PLE(I,k-1)) * 100.0_kind_phys rpdelr8(k) = one / pdelr8(k) - plevr8(k) = 100.0d0 * PLO(I,k) + plevr8(k) = 100.0_kind_phys * PLO(I,k) zmr8(k) = ZLO(I,k) - ficer8(k) = qir8(k) / (qcr8(k)+qir8(k) + 1.0d-10) + ficer8(k) = qir8(k) / (qcr8(k)+qir8(k) + 1.0e-10_kind_phys) omegr8(k) = WSUB(I,k) ! alphar8(k) = max(alpht_x(i,k)/maxval(alpht_x(i,:))*8.,0.5) ! alphar8(k) = qcvar2 @@ -1317,7 +1318,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & END DO do k=1,lm+1 - pintr8(k) = PLE(I,k-1) * 100.0d0 + pintr8(k) = PLE(I,k-1) * 100.0_kind_phys kkvhr8(k) = KH(I,k-1) END DO @@ -1402,8 +1403,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! if (lprint) write(0,*)' prectr8=',prectr8(1), & ! & ' precir8=',precir8(1) - LS_PRC2(I) = max(1000.0d0*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0d0*precir8(1), zero) + LS_PRC2(I) = max(1000.0_kind_phys*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_kind_phys*precir8(1), zero) do k=1,lm @@ -1421,10 +1422,10 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & NCPR(I,k) = nrr8(k) NCPS(I,k) = nsr8(k) - CLDREFFL(I,k) = min(max(effcr8(k), 10.0d0), 150.0d0) - CLDREFFI(I,k) = min(max(effir8(k), 20.0d0), 150.0d0) - CLDREFFR(I,k) = max(droutr8(k)*0.5d0*1.0d6, 150.0d0) - CLDREFFS(I,k) = max(0.192d0*dsoutr8(k)*0.5d0*1.0d6, 250.0d0) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kind_phys), 150.0_kind_phys) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_kind_phys), 150.0_kind_phys) + CLDREFFR(I,k) = max(droutr8(k)*0.5_kind_phys*1.0e6_kind_phys, 150.0_kind_phys) + CLDREFFS(I,k) = max(0.192_kind_phys*dsoutr8(k)*0.5_kind_phys*1.0e6_kind_phys, 250.0_kind_phys) enddo ! K loop @@ -1506,8 +1507,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & prer_evap, xlat(i), xlon(i), lprint, iccn, & & lev_sed_strt) ! - LS_PRC2(I) = max(1000.0d0*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0d0*precir8(1), zero) + LS_PRC2(I) = max(1000.0_kind_phys*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_kind_phys*precir8(1), zero) do k=1,lm QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 @@ -1521,10 +1522,10 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_r8, zero) NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, zero) - CLDREFFL(I,k) = min(max(effcr8(k), 10.0d0),150.0d0) - CLDREFFI(I,k) = min(max(effir8(k), 20.0d0),150.0d0) - CLDREFFR(I,k) = max(reff_rain(k),150.0d0) - CLDREFFS(I,k) = max(reff_snow(k),250.0d0) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kind_phys), 150.0_kind_phys) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_kind_phys), 150.0_kind_phys) + CLDREFFR(I,k) = max(reff_rain(k), 150.0_kind_phys) + CLDREFFS(I,k) = max(reff_snow(k), 250.0_kind_phys) enddo ! K loop ! if (lprint) then ! write(0,*)' aft micro_mg_tend temp= ', temp(i,:) @@ -1535,10 +1536,10 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & LS_PRC2(I) = zero LS_SNR(I) = zero do k=1,lm - CLDREFFL(I,k) = 10.0d0 - CLDREFFI(I,k) = 50.0d0 - CLDREFFR(I,k) = 1000.0d0 - CLDREFFS(I,k) = 250.0d0 + CLDREFFL(I,k) = 10.0_kind_phys + CLDREFFI(I,k) = 50.0_kind_phys + CLDREFFR(I,k) = 1000.0_kind_phys + CLDREFFS(I,k) = 250.0_kind_phys enddo ! K loop endif ! @@ -1643,8 +1644,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & prer_evap, xlat(i), xlon(i), lprint, iccn, & & lev_sed_strt) - LS_PRC2(I) = max(1000.0d0*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0d0*precir8(1), zero) + LS_PRC2(I) = max(1000.0_kind_phys*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_kind_phys*precir8(1), zero) do k=1,lm QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 @@ -1660,11 +1661,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, zero) NCGL(I,k) = max(NCGL(I,k) + ngtend(k)*dt_r8, zero) - CLDREFFL(I,k) = min(max(effcr8(k), 10.0d0),150.0d0) - CLDREFFI(I,k) = min(max(effir8(k), 20.0d0),150.0d0) - CLDREFFR(I,k) = max(reff_rain(k),150.0d0) - CLDREFFS(I,k) = max(reff_snow(k),250.0d0) - CLDREFFG(I,k) = max(reff_grau(k),250.0d0) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kind_phys), 150.0_kind_phys) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_kind_phys), 150.0_kind_phys) + CLDREFFR(I,k) = max(reff_rain(k),150.0_kind_phys) + CLDREFFS(I,k) = max(reff_snow(k),250.0_kind_phys) + CLDREFFG(I,k) = max(reff_grau(k),250.0_kind_phys) enddo ! K loop ! if (lprint) then ! write(0,*)' aft micro_mg_tend temp= ', temp(i,:) @@ -1675,11 +1676,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & LS_PRC2(I) = zero LS_SNR(I) = zero do k=1,lm - CLDREFFL(I,k) = 10.0d0 - CLDREFFI(I,k) = 50.0d0 - CLDREFFR(I,k) = 1000.0d0 - CLDREFFS(I,k) = 250.0d0 - CLDREFFG(I,k) = 250.0d0 + CLDREFFL(I,k) = 10.0_kind_phys + CLDREFFI(I,k) = 50.0_kind_phys + CLDREFFR(I,k) = 1000.0_kind_phys + CLDREFFS(I,k) = 250.0_kind_phys + CLDREFFG(I,k) = 250.0_kind_phys enddo ! K loop endif endif @@ -1707,17 +1708,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0d0), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kind_phys), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) endif enddo enddo @@ -1747,17 +1748,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0d0), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kind_phys), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0d0), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) endif enddo enddo @@ -1849,7 +1850,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO I = 1,IM tx1 = LS_PRC2(i) + LS_SNR(i) - rn_o(i) = tx1 * dt_i * 0.001d0 + rn_o(i) = tx1 * dt_i * 0.001_kind_phys if (rn_o(i) < rainmin) then sr_o(i) = zero diff --git a/physics/micro_mg3_0.F90 b/physics/micro_mg3_0.F90 index 6164cf544..636293b86 100644 --- a/physics/micro_mg3_0.F90 +++ b/physics/micro_mg3_0.F90 @@ -324,7 +324,7 @@ subroutine micro_mg_init( & !----------------------------------------------------------------------- - dcs = micro_mg_dcs * 1.0e-6 + dcs = micro_mg_dcs * 1.0e-6_r8 ts_au_min = ts_auto(1) ts_au = ts_auto(2) qcvar = mg_qcvar @@ -613,7 +613,6 @@ subroutine micro_mg_tend ( & integer, intent(in) :: iccn !< flag for IN and CCN forcing for Morrison-Gettelman microphysics - ! used for scavenging ! Inputs for aerosol activation real(r8), intent(inout) :: naai(mgncol,nlev) !< ice nucleation number (from microp_aero_ts) (1/kg) @@ -1091,7 +1090,7 @@ subroutine micro_mg_tend ( & ! logical, parameter :: do_ice_gmao=.true., do_liq_liu=.false. ! real(r8), parameter :: qimax=0.010, qimin=0.001, qiinv=one/(qimax-qimin), & ! real(r8), parameter :: qimax=0.010, qimin=0.001, qiinv=one/(qimax-qimin), & - real(r8), parameter :: qimax=0.010, qimin=0.005, qiinv=one/(qimax-qimin) + real(r8), parameter :: qimax=0.010_r8, qimin=0.005_r8, qiinv=one/(qimax-qimin) ! ts_au_min=180.0 !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc @@ -3194,9 +3193,9 @@ subroutine micro_mg_tend ( & !++ag Add graupel dumg(i,k) = (qg(i,k)+qgtend(i,k)*deltat) * tx1 ! Moorthi testing - if (dumg(i,k) > 0.01) then - tx2 = dumg(i,k) - 0.01 - dumg(i,k) = 0.01 + if (dumg(i,k) > 0.01_r8) then + tx2 = dumg(i,k) - 0.01_r8 + dumg(i,k) = 0.01_r8 dums(i,k) = dums(i,k) + tx2 qstend(i,k) = (dums(i,k)*precip_frac(i,k) - qs(i,k)) * oneodt qgtend(i,k) = (dumg(i,k)*precip_frac(i,k) - qg(i,k)) * oneodt @@ -3798,9 +3797,9 @@ subroutine micro_mg_tend ( & !++ag dumg(i,k) = max(qg(i,k)+qgtend(i,k)*deltat, zero) ! Moorthi testing - if (dumg(i,k) > 0.01) then - tx2 = dumg(i,k) - 0.01 - dumg(i,k) = 0.01 + if (dumg(i,k) > 0.01_r8) then + tx2 = dumg(i,k) - 0.01_r8 + dumg(i,k) = 0.01_r8 dums(i,k) = dums(i,k) + tx2 qstend(i,k) = (dums(i,k) - qs(i,k)) * oneodt qgtend(i,k) = (dumg(i,k) - qg(i,k)) * oneodt @@ -4049,7 +4048,7 @@ subroutine micro_mg_tend ( & ! qvn = epsqs*esn/(p(i,k)-omeps*esn) - if (qtmp > qvn .and. qvn > 0 .and. allow_sed_supersat) then + if (qtmp > qvn .and. qvn > zero .and. allow_sed_supersat) then ! expression below is approximate since there may be ice deposition dum = (qtmp-qvn)/(one+xxlv_squared*qvn/(cpp*rv*ttmp*ttmp)) * oneodt ! add to output cme diff --git a/physics/moninshoc.f b/physics/moninshoc.f index 5bdf0ceef..4afe19dec 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -71,6 +71,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! ! locals ! + integer, parameter :: r8 = kind_phys integer i,is,k,kk,km1,kmpbl,kp1, ntloc ! logical pblflg(im), sfcflg(im), flg(im) @@ -91,15 +92,16 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, &, ttend, utend, vtend, qtend &, spdk2, rbint, ri, zol1, robn, bvf2 ! - real(kind=kind_phys), parameter :: one=1.0d0, zero=0.0d0 - &, zolcr=0.2d0, - & zolcru=-0.5d0, rimin=-100.0d0, sfcfrac=0.1d0, - & crbcon=0.25d0, crbmin=0.15d0, crbmax=0.35d0, - & qmin=1.0d-8, zfmin=1.0d-8, qlmin=1.0d-12, - & aphi5=5.0d0, aphi16=16.0d0, f0=1.0d-4 - &, dkmin=zero, dkmax=1000.0d0 -! &, dkmin=zero, dkmax=1000., xkzminv=0.3 - &, prmin=0.25d0, prmax=4.0d0, vk=0.4, cfac=6.5 + real(kind=kind_phys), parameter :: one=1.0_r8, zero=0.0_r8 + &, zolcr=0.2_r8, + & zolcru=-0.5_r8, rimin=-100.0_r8, sfcfrac=0.1_r8, + & crbcon=0.25_r8, crbmin=0.15_r8, crbmax=0.35_r8, + & qmin=1.0e-8_r8, zfmin=1.0d-8, qlmin=1.0e-12_r8, + & aphi5=5.0_r8, aphi16=16.0_r8, f0=1.0e-4_r8 + &, dkmin=zero, dkmax=1000.0_r8 +! &, dkmin=zero, dkmax=1000., xkzminv=0.3 + &, prmin=0.25_r8, prmax=4.0_r8, vk=0.4_r8, + & cfac=6.5_r8 real(kind=kind_phys) :: gravi, cont, conq, conw, gocp gravi = one/grav @@ -155,7 +157,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if (k <= kinver(i)) then ! vertical background diffusivity for heat and momentum tem1 = one - prsi(i,k+1) * tx1(i) - tem1 = min(one, exp(-tem1 * tem1 * 10.0d0)) + tem1 = min(one, exp(-tem1 * tem1 * 10.0_r8)) xkzo(i,k) = xkzm_h * tem1 xkzmo(i,k) = xkzm_m * tem1 endif @@ -166,9 +168,9 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! do k = 1,kmpbl do i=1,im - if(zi(i,k+1) > 250.0d0) then + if(zi(i,k+1) > 250.0_r8) then tem1 = (t1(i,k+1)-t1(i,k)) * rdzt(i,k) - if(tem1 > 1.0d-5) then + if(tem1 > 1.0e-5_r8) then xkzo(i,k) = min(xkzo(i,k),xkzminv) endif endif @@ -177,7 +179,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! ! do i = 1,im - z0(i) = 0.01d0 * zorl(i) + z0(i) = 0.01_r8 * zorl(i) kpbl(i) = 1 hpbl(i) = zi(i,1) pblflg(i) = .true. @@ -224,9 +226,9 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, thermal(i) = tsea(i)*(one+fv*max(q1(i,1,1),qmin)) tem = max(one, sqrt(u10m(i)*u10m(i) + v10m(i)*v10m(i))) robn = tem / (f0 * z0(i)) - tem1 = 1.0d-7 * robn - crb(i) = max(min(0.16d0 * (tem1 ** (-0.18d0)), crbmax), - & crbmin) + tem1 = 1.0e-7_r8 * robn + crb(i) = max(min(0.16_r8 * (tem1 ** (-0.18_r8)), crbmax), + & crbmin) endif enddo do k = 1, kmpbl @@ -272,7 +274,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if(sfcflg(i)) then ! phim(i) = (1.-aphi16*zol1)**(-1./4.) ! phih(i) = (1.-aphi16*zol1)**(-1./2.) - tem = one / max(one - aphi16*zol1, 1.0d-8) + tem = one / max(one - aphi16*zol1, 1.0e-8_r8) phih(i) = sqrt(tem) phim(i) = sqrt(phih(i)) else @@ -346,13 +348,13 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, tem = u1(i,k) - u1(i,kp1) tem1 = v1(i,k) - v1(i,kp1) tem = (tem*tem + tem1*tem1) * rdz * rdz - bvf2 = (0.5d0*grav)*(thvx(i,kp1)-thvx(i,k))*rdz + bvf2 = (0.5_r8*grav)*(thvx(i,kp1)-thvx(i,k))*rdz & / (t1(i,k)+t1(i,kp1)) ri = max(bvf2/tem,rimin) if(ri < zero) then ! unstable regime prnum(i,kp1) = one else - prnum(i,kp1) = min(one + 2.1d0*ri, prmax) + prnum(i,kp1) = min(one + 2.1_r8*ri, prmax) endif elseif (k > 1) then prnum(i,kp1) = prnum(i,1) diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index f52b6d829..5d8e19643 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -194,16 +194,18 @@ subroutine lsm_noah_run & implicit none ! --- constant parameters: - real(kind=kind_phys), parameter :: one = 1.0d0, zero = 0.0d0 - real(kind=kind_phys), parameter :: rhoh2o = 1000.0d0 - real(kind=kind_phys), parameter :: a2 = 17.2693882d0 - real(kind=kind_phys), parameter :: a3 = 273.16d0 - real(kind=kind_phys), parameter :: a4 = 35.86d0 + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys + real(kind=kind_phys), parameter :: one = 1.0_kind_phys + real(kind=kind_phys), parameter :: rhoh2o = 1000.0_kind_phys + real(kind=kind_phys), parameter :: a2 = 17.2693882_kind_phys + real(kind=kind_phys), parameter :: a3 = 273.16_kind_phys + real(kind=kind_phys), parameter :: a4 = 35.86_kind_phys real(kind=kind_phys), parameter :: a23m4 = a2*(a3-a4) - real(kind=kind_phys), parameter :: qmin = 1.0d-8 + real(kind=kind_phys), parameter :: qmin = 1.0e-8_kind_phys real(kind=kind_phys), save :: zsoil_noah(4) - data zsoil_noah / -0.1d0, -0.4d0, -1.0d0, -2.0d0 / + data zsoil_noah / -0.1_kind_phys, -0.4_kind_phys, & + & -1.0_kind_phys, -2.0_kind_phys / ! --- input: integer, intent(in) :: im, km, isot, ivegsrc @@ -445,8 +447,8 @@ subroutine lsm_noah_run & ! cm - surface exchange coefficient for momentum (\f$m s^{-1}\f$) -> cmx ! z0 - surface roughness (\f$m\f$) -> zorl(\f$cm\f$) - cmc = canopy(i) * 0.001d0 ! convert from mm to m - tsea = tsurf(i) ! clu_q2m_iter + cmc = canopy(i) * 0.001_kind_phys ! convert from mm to m + tsea = tsurf(i) ! clu_q2m_iter do k = 1, km stsoil(k) = stc(i,k) @@ -454,10 +456,10 @@ subroutine lsm_noah_run & slsoil(k) = slc(i,k) enddo - snowh = snwdph(i) * 0.001d0 ! convert from mm to m - sneqv = weasd(i) * 0.001d0 ! convert from mm to m + snowh = snwdph(i) * 0.001_kind_phys ! convert from mm to m + sneqv = weasd(i) * 0.001_kind_phys ! convert from mm to m if (sneqv /= zero .and. snowh == zero) then - snowh = 10.0d0 * sneqv + snowh = 10.0_kind_phys * sneqv endif chx = ch(i) * wind(i) ! compute conductance @@ -466,7 +468,7 @@ subroutine lsm_noah_run & cmm(i) = cmx ! ---- ... outside sflx, roughness uses cm as unit - z0 = zorl(i) * 0.01d0 + z0 = zorl(i) * 0.01_kind_phys ! ---- mgehne, sfc-perts ! - Apply perturbation of soil type b parameter and leave area index. bexpp = bexppert(i) ! sfc perts, mgehne @@ -511,7 +513,7 @@ subroutine lsm_noah_run & trans(i) = ett sbsno(i) = esnow snowc(i) = sncovr - stm(i) = soilm * 1000.0d0 ! unit conversion (from m to kg m-2) + stm(i) = soilm * 1000.0_kind_phys ! unit conversion (from m to kg m-2) snohf(i) = flx1 + flx2 + flx3 smcwlt2(i) = smcwlt @@ -528,17 +530,17 @@ subroutine lsm_noah_run & wet1(i) = smsoil(1) / smcmax !Sarah Lu added 09/09/2010 (for GOCART) ! --- ... unit conversion (from m s-1 to mm s-1 and kg m-2 s-1) - runoff(i) = runoff1 * 1000.0d0 - drain (i) = runoff2 * 1000.0d0 + runoff(i) = runoff1 * 1000.0_kind_phys + drain (i) = runoff2 * 1000.0_kind_phys ! --- ... unit conversion (from m to mm) - canopy(i) = cmc * 1000.0d0 - snwdph(i) = snowh * 1000.0d0 - weasd(i) = sneqv * 1000.0d0 + canopy(i) = cmc * 1000.0_kind_phys + snwdph(i) = snowh * 1000.0_kind_phys + weasd(i) = sneqv * 1000.0_kind_phys sncovr1(i) = sncovr ! ---- ... outside sflx, roughness uses cm as unit (update after snow's ! effect) - zorl(i) = z0*100.0d0 + zorl(i) = z0*100.0_kind_phys !> - Do not return the following output fields to parent model: !!\n ec - canopy water evaporation (m s-1) diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index ba0aec030..d937ddf49 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -91,8 +91,8 @@ subroutine sfc_ocean_run & implicit none ! --- constant parameters: - real (kind=kind_phys), parameter :: one = 1.0d0, zero = 0.0d0 & - &, qmin = 1.0d-8 + real (kind=kind_phys), parameter :: one = 1.0_kind_phys, zero = 0.0_kind_phys & + &, qmin = 1.0e-8_kind_phys ! --- inputs: integer, intent(in) :: im real (kind=kind_phys), intent(in) :: rd, eps, epsm1, rvrdm1 diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index db483ee75..8648e631b 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -138,15 +138,15 @@ subroutine sfc_sice_run & implicit none ! ! - Define constant parameters - integer, parameter :: kmi = 2 !< 2-layer of ice - real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0 - real(kind=kind_phys), parameter :: himax = 8.0d0 !< maximum ice thickness allowed - real(kind=kind_phys), parameter :: himin = 0.1d0 !< minimum ice thickness required - real(kind=kind_phys), parameter :: hsmax = 2.0d0 !< maximum snow depth allowed - real(kind=kind_phys), parameter :: timin = 173.0d0 !< minimum temperature allowed for snow/ice - real(kind=kind_phys), parameter :: albfw = 0.06d0 !< albedo for lead - real(kind=kind_phys), parameter :: dsi = one/0.33d0 - real(kind=kind_phys), parameter :: qmin = 1.0d-8 + integer, parameter :: kmi = 2 !< 2-layer of ice + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys + real(kind=kind_phys), parameter :: himax = 8.0_kind_phys !< maximum ice thickness allowed + real(kind=kind_phys), parameter :: himin = 0.1_kind_phys !< minimum ice thickness required + real(kind=kind_phys), parameter :: hsmax = 2.0_kind_phys !< maximum snow depth allowed + real(kind=kind_phys), parameter :: timin = 173.0_kind_phys !< minimum temperature allowed for snow/ice + real(kind=kind_phys), parameter :: albfw = 0.06_kind_phys !< albedo for lead + real(kind=kind_phys), parameter :: dsi = one/0.33_kind_phys + real(kind=kind_phys), parameter :: qmin = 1.0e-8_kind_phys ! --- inputs: integer, intent(in) :: im, km, ipr @@ -232,7 +232,7 @@ subroutine sfc_sice_run & if (flag(i)) then if (srflag(i) > zero) then ep(i) = ep(i)*(one-srflag(i)) - weasd(i) = weasd(i) + 1.0d3*tprcp(i)*srflag(i) + weasd(i) = weasd(i) + 1000.0_kind_phys*tprcp(i)*srflag(i) tprcp(i) = tprcp(i)*(one-srflag(i)) endif endif @@ -289,7 +289,7 @@ subroutine sfc_sice_run & !> - Convert snow depth in water equivalent from mm to m unit. - snowd(i) = weasd(i) * 0.001d0 + snowd(i) = weasd(i) * 0.001_kind_phys ! flagsnw(i) = .false. ! --- ... when snow depth is less than 1 mm, a patchy snow is assumed and @@ -310,7 +310,8 @@ subroutine sfc_sice_run & ! evap(i) = fice(i)*evapi(i) + ffw(i)*evapw(i) snetw(i) = sfcdsw(i) * (one - albfw) - snetw(i) = min(3.0d0*sfcnsw(i)/(one+2.0d0*ffw(i)), snetw(i)) + snetw(i) = min(3.0_kind_phys*sfcnsw(i) & + & / (one+2.0_kind_phys*ffw(i)), snetw(i)) !> - Calculate net solar incoming at top \a sneti. sneti(i) = (sfcnsw(i) - ffw(i)*snetw(i)) / fice(i) @@ -327,7 +328,7 @@ subroutine sfc_sice_run & & + rch(i)*(tice(i) - theta1(i)) #endif !> - Calculate heat flux derivative at surface \a hfd. - hfd(i) = 4.0d0*sfcemis(i)*sbc*tice(i)*t12 & + hfd(i) = 4.0_kind_phys*sfcemis(i)*sbc*tice(i)*t12 & & + (one + elocp*eps*hvap*qs1/(rd*t12)) * rch(i) t12 = tgice * tgice @@ -340,14 +341,14 @@ subroutine sfc_sice_run & !> - Assigin heat flux from ocean \a focn and snowfall rate as constants, which !! should be from ocean model and other physics. - focn(i) = 2.0d0 ! heat flux from ocean - should be from ocn model + focn(i) = 2.0_kind_phys ! heat flux from ocean - should be from ocn model snof(i) = zero ! snowfall rate - snow accumulates in gbphys !> - Initialize snow depth \a snowd. hice(i) = max( min( hice(i), himax ), himin ) snowd(i) = min( snowd(i), hsmax ) - if (snowd(i) > (2.0d0*hice(i))) then + if (snowd(i) > (2.0_kind_phys*hice(i))) then print *, 'warning: too much snow :',snowd(i) snowd(i) = hice(i) + hice(i) print *,'fix: decrease snow depth to:',snowd(i) @@ -417,7 +418,7 @@ subroutine sfc_sice_run & ! --- ... convert snow depth back to mm of water equivalent - weasd(i) = snowd(i) * 1000.0d0 + weasd(i) = snowd(i) * 1000.0_kind_phys snwdph(i) = weasd(i) * dsi ! snow depth in mm tem = one / rho(i) @@ -520,28 +521,28 @@ subroutine ice3lay ! ! --- constant parameters: (properties of ice, snow, and seawater) - real (kind=kind_phys), parameter :: ds = 330.0d0 !< snow (ov sea ice) density (kg/m^3) - real (kind=kind_phys), parameter :: dw =1000.0d0 !< fresh water density (kg/m^3) + real (kind=kind_phys), parameter :: ds = 330.0_kind_phys !< snow (ov sea ice) density (kg/m^3) + real (kind=kind_phys), parameter :: dw =1000.0_kind_phys !< fresh water density (kg/m^3) real (kind=kind_phys), parameter :: dsdw = ds/dw real (kind=kind_phys), parameter :: dwds = dw/ds - real (kind=kind_phys), parameter :: ks = 0.31d0 !< conductivity of snow (w/mk) - real (kind=kind_phys), parameter :: i0 = 0.3d0 !< ice surface penetrating solar fraction - real (kind=kind_phys), parameter :: ki = 2.03d0 !< conductivity of ice (w/mk) - real (kind=kind_phys), parameter :: di = 917.0d0 !< density of ice (kg/m^3) + real (kind=kind_phys), parameter :: ks = 0.31_kind_phys !< conductivity of snow (w/mk) + real (kind=kind_phys), parameter :: i0 = 0.3_kind_phys !< ice surface penetrating solar fraction + real (kind=kind_phys), parameter :: ki = 2.03_kind_phys !< conductivity of ice (w/mk) + real (kind=kind_phys), parameter :: di = 917.0_kind_phys !< density of ice (kg/m^3) real (kind=kind_phys), parameter :: didw = di/dw real (kind=kind_phys), parameter :: dsdi = ds/di - real (kind=kind_phys), parameter :: ci = 2054.0d0 !< heat capacity of fresh ice (j/kg/k) - real (kind=kind_phys), parameter :: li = 3.34d5 !< latent heat of fusion (j/kg-ice) - real (kind=kind_phys), parameter :: si = 1.0d0 !< salinity of sea ice - real (kind=kind_phys), parameter :: mu = 0.054d0 !< relates freezing temp to salinity - real (kind=kind_phys), parameter :: tfi = -mu*si !< sea ice freezing temp = -mu*salinity - real (kind=kind_phys), parameter :: tfw = -1.8d0 !< tfw - seawater freezing temp (c) - real (kind=kind_phys), parameter :: tfi0 = tfi-0.0001d0 + real (kind=kind_phys), parameter :: ci = 2054.0_kind_phys !< heat capacity of fresh ice (j/kg/k) + real (kind=kind_phys), parameter :: li = 3.34e5_kind_phys !< latent heat of fusion (j/kg-ice) + real (kind=kind_phys), parameter :: si = 1.0_kind_phys !< salinity of sea ice + real (kind=kind_phys), parameter :: mu = 0.054_kind_phys !< relates freezing temp to salinity + real (kind=kind_phys), parameter :: tfi = -mu*si !< sea ice freezing temp = -mu*salinity + real (kind=kind_phys), parameter :: tfw = -1.8_kind_phys !< tfw - seawater freezing temp (c) + real (kind=kind_phys), parameter :: tfi0 = tfi-0.0001_kind_phys real (kind=kind_phys), parameter :: dici = di*ci real (kind=kind_phys), parameter :: dili = di*li real (kind=kind_phys), parameter :: dsli = ds*li - real (kind=kind_phys), parameter :: ki4 = ki*4.0d0 - real (kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0 + real (kind=kind_phys), parameter :: ki4 = ki*4.0_kind_phys + real (kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys ! --- inputs: integer, intent(in) :: im, kmi, ipr @@ -631,7 +632,7 @@ subroutine ice3lay !> - Calculate the new upper ice temperature following \a eq.(21) !! in Winton (2000) \cite winton_2000. - stsice(i,1) = -(sqrt(b1*b1 - 4.0d0*a1*c1) + b1)/(a1+a1) + stsice(i,1) = -(sqrt(b1*b1-4.0_kind_phys*a1*c1) + b1)/(a1+a1) tice(i) = (k12*stsice(i,1) - ai) / (k12 + bi) !> - If the surface temperature is greater than the freezing temperature @@ -644,7 +645,8 @@ subroutine ice3lay if (tice(i) > tsf) then a1 = a10 + k12 b1 = b10 - k12*tsf - stsice(i,1) = -(sqrt(b1*b1 - 4.0d0*a1*c1) + b1)/(a1+a1) + stsice(i,1) = -(sqrt(b1*b1-4.0_kind_phys*a1*c1) + b1) & + & / (a1+a1) tice(i) = tsf tmelt = (k12*(stsice(i,1)-tsf) - (ai+bi*tsf)) * delt else @@ -664,8 +666,8 @@ subroutine ice3lay !> - Calculation of ice and snow mass changes. - h1 = 0.5d0 * hice(i) - h2 = 0.5d0 * hice(i) + h1 = 0.5_kind_phys * hice(i) + h2 = 0.5_kind_phys * hice(i) !> - Calculate the top layer thickness. @@ -697,7 +699,7 @@ subroutine ice3lay hice(i) = h1 + h2 if (hice(i) > zero) then - if (h1 > 0.5d0*hice(i)) then + if (h1 > 0.5_kind_phys*hice(i)) then f1 = one - (h2+h2) / hice(i) stsice(i,2) = f1 * (stsice(i,1) + li*tfi/(ci*stsice(i,1)))& & + (one - f1)*stsice(i,2) @@ -711,7 +713,7 @@ subroutine ice3lay stsice(i,1) = f1 * (stsice(i,1) + li*tfi/(ci*stsice(i,1)))& & + (one - f1)*stsice(i,2) stsice(i,1) = (stsice(i,1) - sqrt(stsice(i,1)*stsice(i,1) & - & - 4.0d0*tfi*li/ci)) * 0.5d0 + & - 4.0_kind_phys*tfi*li/ci)) * 0.5_kind_phys endif k12 = ki4*ks / (ks*hice(i) + ki4*snowd(i)) From e19953d0da2ccd4b65bc4ac68a2cc09807805474 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 22 Apr 2020 17:45:31 +0000 Subject: [PATCH 095/404] adding _kind_phys to constants in some physics routines --- physics/rascnv.F90 | 401 +++++++++++++++++++++++---------------------- 1 file changed, 201 insertions(+), 200 deletions(-) diff --git a/physics/rascnv.F90 b/physics/rascnv.F90 index 40d0ecb0d..c6601a5cb 100644 --- a/physics/rascnv.F90 +++ b/physics/rascnv.F90 @@ -10,37 +10,38 @@ module rascnv private logical :: is_initialized = .False. ! + integer, parameter :: r8 = kind_phys integer, parameter :: nrcmax=32 ! Maximum # of random clouds per 1200s integer, parameter :: idnmax=999 - real (kind=kind_phys), parameter :: delt_c=1800.0d0/3600.0d0 & + real (kind=kind_phys), parameter :: delt_c=1800.0_r8/3600.0_r8 & ! Adjustment time scales in hrs for deep and shallow clouds ! &, adjts_d=3.0, adjts_s=0.5 ! &, adjts_d=2.5, adjts_s=0.5 - &, adjts_d=2.0d0, adjts_s=0.5d0 + &, adjts_d=2.0_r8, adjts_s=0.5_r8 ! logical, parameter :: fix_ncld_hr=.true. ! - real (kind=kind_phys), parameter :: ZERO=0.0d0, HALF=0.5d0 & - &, pt25=0.25d0, ONE=1.0d0 & - &, TWO=2.0d0, FOUR=4.0d0 & - &, twoo3=two/3.0d0 & - &, FOUR_P2=4.0d2, ONE_M10=1.0d-10& - &, ONE_M6=1.0d-6, ONE_M5=1.0d-5 & - &, ONE_M2=1.0d-2, ONE_M1=1.0d-1 & - &, oneolog10=one/log(10.0d0) & - &, facmb = 0.01d0 & ! conversion factor from Pa to hPa (or mb) - &, cmb2pa = 100.0d0 ! Conversion from hPa to Pa -! - real(kind=kind_phys), parameter :: frac=0.5d0, crtmsf=0.0d0 & - &, rhfacs=0.75d0, rhfacl=0.75d0 & - &, face=5.0d0, delx=10000.0d0 & - &, ddfac=face*delx*0.001d0 & - &, max_neg_bouy=0.15d0 & -! &, max_neg_bouy=pt25d0 & - &, testmb=0.1, testmbi=one/testmb & - &, dpd=0.5d0, rknob=1.0d0, eknob=1.0d0 + real (kind=kind_phys), parameter :: ZERO=0.0_r8, HALF=0.5_r8 & + &, pt25=0.25_r8, ONE=1.0_r8 & + &, TWO=2.0_r8, FOUR=4.0_r8 & + &, twoo3=two/3.0_r8 & + &, FOUR_P2=4.0e2_r8, ONE_M10=1.0e-10_r8& + &, ONE_M6=1.0e-6_r8, ONE_M5=1.0e-5_r8 & + &, ONE_M2=1.0e-2_r8, ONE_M1=1.0e-1_r8 & + &, oneolog10=one/log(10.0_r8) & + &, facmb = 0.01_r8 & ! conversion factor from Pa to hPa (or mb) + &, cmb2pa = 100.0_r8 ! Conversion from hPa to Pa +! + real(kind=kind_phys), parameter :: frac=0.5_r8, crtmsf=0.0_r8 & + &, rhfacs=0.75_r8, rhfacl=0.75_r8 & + &, face=5.0_r8, delx=10000.0_r8& + &, ddfac=face*delx*0.001_r8 & + &, max_neg_bouy=0.15_r8 & +! &, max_neg_bouy=pt25_r8 & + &, testmb=0.1_r8, testmbi=one/testmb & + &, dpd=0.5_r8, rknob=1.0_r8, eknob=1.0_r8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! logical, parameter :: do_aw=.true., cumfrc=.true. & @@ -52,17 +53,17 @@ module rascnv ! &, advcld=.true., advups=.false.,advtvd=.false. - real(kind=kind_phys), parameter :: TF=233.16d0, TCR=273.16d0 & - &, TCRF=one/(TCR-TF), TCL=2.0d0 + real(kind=kind_phys), parameter :: TF=233.16_r8, TCR=273.16_r8 & + &, TCRF=one/(TCR-TF), TCL=2.0_r8 ! ! For pressure gradient force in momentum mixing -! real (kind=kind_phys), parameter :: pgftop=0.80, pgfbot=0.30 & +! real (kind=kind_phys), parameter :: pgftop=0.80, pgfbot=0.30 & ! No pressure gradient force in momentum mixing - real (kind=kind_phys), parameter :: pgftop=0.0d0, pgfbot=0.0d0 & -! real (kind=kind_phys), parameter :: pgftop=0.55, pgfbot=0.55 & - &, pgfgrad=(pgfbot-pgftop)*0.001d0& - &, cfmax=0.1d0 + real (kind=kind_phys), parameter :: pgftop=0.0_r8, pgfbot=0.0_r8 & +! real (kind=kind_phys), parameter :: pgftop=0.55, pgfbot=0.55 & + &, pgfgrad=(pgfbot-pgftop)*0.001_r8& + &, cfmax=0.1_r8 ! ! For Tilting Angle Specification ! @@ -120,7 +121,7 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! - real(kind=kind_phys), parameter :: actp=1.7, facm=1.00 + real(kind=kind_phys), parameter :: actp=1.7_r8, facm=1.00_r8 ! real(kind=kind_phys) PH(15), A(15) ! @@ -167,7 +168,7 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & ! ! VTP = 36.34*SQRT(1.2)* (0.001)**0.1364 ! - AFC = -(1.01097d-4*DT)*(3600.0d0/DT)**0.57777778d0 + AFC = -(1.01097e-4_r8*DT)*(3600.0_r8/DT)**0.57777778_r8 ! grav = con_g ; cp = con_cp ; alhl = con_hvap alhf = con_hfus ; rgas = con_rd @@ -179,15 +180,15 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & pi = four*atan(one) ; PIINV = one/PI ONEBG = ONE / GRAV ; GRAVCON = cmb2pa * ONEBG onebcp = one / cp ; GRAVFAC = GRAV / CMB2PA - rkap = rgas * onebcp ; deg2rad = pi/180.d0 + rkap = rgas * onebcp ; deg2rad = pi/180.0_r8 ELOCP = ALHL * onebcp ; ELFOCP = (ALHL+ALHF) * onebcp oneoalhl = one/alhl ; CMPOR = CMB2PA / RGAS - picon = half*pi*onebg ; zfac = 0.28888889d-4 * ONEBG + picon = half*pi*onebg ; zfac = 0.28888889e-4_r8 * ONEBG testmboalhl = testmb/alhl ! - rvi = one/rv ; facw=CVAP-CLIQ - faci = CVAP-CSOL ; hsub=alhl+alhf - tmix = TTP-20.0d0 ; DEN=one/(TTP-TMIX) + rvi = one/rv ; facw=CVAP-CLIQ + faci = CVAP-CSOL ; hsub=alhl+alhf + tmix = TTP-20.0_r8 ; DEN=one/(TTP-TMIX) ! if (me == 0) write(0,*) ' NO DOWNDRAFT FOR CLOUD TYPES' & @@ -365,7 +366,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & integer, dimension(100) :: ic - real(kind=kind_phys), parameter :: clwmin=1.0d-10 + real(kind=kind_phys), parameter :: clwmin=1.0e-10_r8 ! real(kind=kind_phys), allocatable :: ALFINT(:,:), uvi(:,:) & &, trcfac(:,:), rcu(:,:) @@ -392,8 +393,8 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & fscav_(i) = fscav(i) enddo endif - trcmin = -99999.0 - if (ntk-2 > 0) trcmin(ntk-2) = 1.0d-4 + trcmin = -99999.0_r8 + if (ntk-2 > 0) trcmin(ntk-2) = 1.0e-4_r8 !> - Initialize CCPP error handling variables @@ -487,23 +488,23 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & if (flipv) ll = kp1 -l ! Input variables are bottom to top! SGC = prsl(ipt,ll) * tem sgcs(l,ipt) = sgc - IF (SGC <= 0.050d0) KRMIN = L -! IF (SGC <= 0.700d0) KRMAX = L -! IF (SGC <= 0.800d0) KRMAX = L - IF (SGC <= 0.760d0) KRMAX = L -! IF (SGC <= 0.930d0) KFMAX = L - IF (SGC <= 0.970d0) KFMAX = L ! Commented on 20060202 -! IF (SGC <= 0.700d0) kblmx = L ! Commented on 20101015 - IF (SGC <= 0.600d0) kblmx = L ! -! IF (SGC <= 0.650d0) kblmx = L ! Commented on 20060202 - IF (SGC <= 0.980d0) kblmn = L ! + IF (SGC <= 0.050_r8) KRMIN = L +! IF (SGC <= 0.700_r8) KRMAX = L +! IF (SGC <= 0.800_r8) KRMAX = L + IF (SGC <= 0.760_r8) KRMAX = L +! IF (SGC <= 0.930_r8) KFMAX = L + IF (SGC <= 0.970_r8) KFMAX = L ! Commented on 20060202 +! IF (SGC <= 0.700_r8) kblmx = L ! Commented on 20101015 + IF (SGC <= 0.600_r8) kblmx = L ! +! IF (SGC <= 0.650_r8) kblmx = L ! Commented on 20060202 + IF (SGC <= 0.980_r8) kblmn = L ! ENDDO krmin = max(krmin,2) ! if (fix_ncld_hr) then !!! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1200) + 0.50001 - NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1800) + 0.10001d0 + NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1800) + 0.10001_r8 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1200) + 0.10001 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/900) + 0.50001 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/600) + 0.50001 @@ -513,7 +514,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & facdt = delt_c / dt else NCRND = min(nrcmax, (KRMAX-KRMIN+1)) - facdt = one / 3600.0d0 + facdt = one / 3600.0_r8 endif NCRND = min(nrcm,max(NCRND, 1)) ! @@ -537,7 +538,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & IF (NCRND > 0) THEN DO I=1,NCRND II = mod(i-1,nrcm) + 1 - IRND = (RANNUM(ipt,II)-0.0005d0)*(KCR-KRMIN+1) + IRND = (RANNUM(ipt,II)-0.0005_r8)*(KCR-KRMIN+1) IC(KFX+I) = IRND + KRMIN ENDDO ENDIF @@ -582,7 +583,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & if (ntr > 0) then ! tracers such as O3, dust etc do n=1,ntr uvi(l,n) = ccin(ipt,ll,n+2) - if (abs(uvi(l,n)) < 1.0d-20) uvi(l,n) = zero + if (abs(uvi(l,n)) < 1.0e-20_r8) uvi(l,n) = zero enddo endif enddo @@ -593,7 +594,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & phi_h(LL) = phii(ipt,L) enddo ! - if (ccin(ipt,1,2) <= -998.0) then ! input ice/water are together + if (ccin(ipt,1,2) <= -998.0_r8) then ! input ice/water are together do l=1,k ll = kp1 -l tem = ccin(ipt,ll,1) & @@ -631,7 +632,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & if (ntr > 0) then ! tracers such as O3, dust etc do n=1,ntr uvi(l,n) = ccin(ipt,l,n+2) - if (abs(uvi(l,n)) < 1.0d-20) uvi(l,n) = zero + if (abs(uvi(l,n)) < 1.0e-20_r8) uvi(l,n) = zero enddo endif enddo @@ -641,7 +642,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & phi_h(L) = phii(ipt,L) ENDDO ! - if (ccin(ipt,1,2) <= -998.0) then ! input ice/water are together + if (ccin(ipt,1,2) <= -998.0_r8) then ! input ice/water are together do l=1,k tem = ccin(ipt,l,1) & & * MAX(ZERO, MIN(ONE, (TCR-toi(L))*TCRF)) @@ -688,7 +689,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd=',dtvd(:,1) - if (abs(dtvd(2,1)) > 1.0d-10) then + if (abs(dtvd(2,1)) > 1.0e-10_r8) then tem1 = dtvd(1,1) / dtvd(2,1) tem2 = abs(tem1) alfint(l,1) = one - half*(tem1 + tem2)/(one + tem2) ! for h @@ -702,7 +703,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd2=',dtvd(:,2) - if (abs(dtvd(2,2)) > 1.0d-10) then + if (abs(dtvd(2,2)) > 1.0e-10_r8) then tem1 = dtvd(1,2) / dtvd(2,2) tem2 = abs(tem1) alfint(l,2) = one - half*(tem1 + tem2)/(one + tem2) ! for q @@ -713,7 +714,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd3=',dtvd(:,3) - if (abs(dtvd(2,3)) > 1.0d-10) then + if (abs(dtvd(2,3)) > 1.0e-10_r8) then tem1 = dtvd(1,3) / dtvd(2,3) tem2 = abs(tem1) alfint(l,3) = one - half*(tem1 + tem2)/(one + tem2) ! for ql @@ -724,7 +725,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd4=',dtvd(:,4) - if (abs(dtvd(2,4)) > 1.0d-10) then + if (abs(dtvd(2,4)) > 1.0e-10_r8) then tem1 = dtvd(1,4) / dtvd(2,4) tem2 = abs(tem1) alfint(l,4) = one - half*(tem1 + tem2)/(one + tem2) ! for qi @@ -741,7 +742,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvdn=',dtvd(:,1),' n=',n,' l=',l - if (abs(dtvd(2,1)) > 1.0d-10) then + if (abs(dtvd(2,1)) > 1.0e-10_r8) then tem1 = dtvd(1,1) / dtvd(2,1) tem2 = abs(tem1) alfint(l,n+4) = one - half*(tem1 + tem2)/(one + tem2) ! for tracers @@ -850,7 +851,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & FLXD(L) = zero enddo ! - TLA = -10.0d0 + TLA = -10.0_r8 ! qiid = qii(ib) ! cloud top level ice before convection qlid = qli(ib) ! cloud top level water before convection @@ -930,7 +931,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! ENDDO ! End of the NC loop! ! - RAINC(ipt) = rain * 0.001d0 ! Output rain is in meters + RAINC(ipt) = rain * 0.001_r8 ! Output rain is in meters ktop(ipt) = kp1 kbot(ipt) = 0 @@ -944,9 +945,9 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! clw(i) = max(clw(i), zero) ! cli(i) = max(cli(i), zero) - if (sgcs(l,ipt) < 0.93d0 .and. abs(tcu(l)) > one_m10) then -! if (sgcs(l,ipt) < 0.90d0 .and. tcu(l) .ne. 0.0) then -! if (sgcs(l,ipt) < 0.85d0 .and. tcu(l) .ne. 0.0) then + if (sgcs(l,ipt) < 0.93_r8 .and. abs(tcu(l)) > one_m10) then +! if (sgcs(l,ipt) < 0.90_r8 .and. tcu(l) .ne. zero) then +! if (sgcs(l,ipt) < 0.85_r8 .and. tcu(l) .ne. zero) then kcnv(ipt) = 1 endif ! New test for convective clouds ! added in 08/21/96 @@ -972,18 +973,18 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & QLCN(ipt,ll) = max(qli(l)-ccin(ipt,ll,2), zero) QICN(ipt,ll) = max(qii(l)-ccin(ipt,ll,1), zero) CNV_FICE(ipt,ll) = QICN(ipt,ll) & - & / max(1.d-10,QLCN(ipt,ll)+QICN(ipt,ll)) + & / max(1.0e-10_r8,QLCN(ipt,ll)+QICN(ipt,ll)) else QLCN(ipt,ll) = qli(l) QICN(ipt,ll) = qii(l) - CNV_FICE(ipt,ll) = qii(l)/max(1.d-10,qii(l)+qli(l)) + CNV_FICE(ipt,ll) = qii(l)/max(1.0e-10_r8,qii(l)+qli(l)) endif - cf_upi(ipt,ll) = max(zero,min(0.02d0*log(one+ & - & 500.0d0*ud_mf(ipt,ll)/dt), cfmax)) + cf_upi(ipt,ll) = max(zero,min(0.02_r8*log(one+ & + & 500.0_r8*ud_mf(ipt,ll)/dt), cfmax)) ! & 500*ud_mf(ipt,ll)/dt), 0.60)) CLCN(ipt,ll) = cf_upi(ipt,ll) !downdraft is below updraft w_upi(ipt,ll) = ud_mf(ipt,ll)*toi(l)*rgas / & - & (dt*max(cf_upi(ipt,ll),1.d-12)*prsl(ipt,ll)) + & (dt*max(cf_upi(ipt,ll),1.0e-12_r8)*prsl(ipt,ll)) endif if (ntr > 0) then @@ -1023,21 +1024,21 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & QLCN(ipt,l) = max(qli(l)-ccin(ipt,l,2), zero) QICN(ipt,l) = max(qii(l)-ccin(ipt,l,1), zero) CNV_FICE(ipt,l) = QICN(ipt,l) & - & / max(1.d-10,QLCN(ipt,l)+QICN(ipt,l)) + & / max(1.0e-10_r8,QLCN(ipt,l)+QICN(ipt,l)) else QLCN(ipt,l) = qli(l) QICN(ipt,l) = qii(l) - CNV_FICE(ipt,l) = qii(l)/max(1.d-10,qii(l)+qli(l)) + CNV_FICE(ipt,l) = qii(l)/max(1.0e-10_r8,qii(l)+qli(l)) endif !! CNV_PRC3(ipt,l) = PCU(l)/dt ! CNV_PRC3(ipt,l) = zero ! if(PCU(l) < zero) write(*,*)"AAA777",PCU(l),ipt,l - cf_upi(ipt,l) = max(zero,min(0.02d0*log(one+ & - & 500.d0*ud_mf(ipt,l)/dt), cfmax)) + cf_upi(ipt,l) = max(zero,min(0.02_r8*log(one+ & + & 500.0_r8*ud_mf(ipt,l)/dt), cfmax)) ! & 500*ud_mf(ipt,l)/dt), 0.60)) CLCN(ipt,l) = cf_upi(ipt,l) !downdraft is below updraft w_upi(ipt,l) = ud_mf(ipt,l)*toi(l)*rgas / & - & (dt*max(cf_upi(ipt,l),1.d-12)*prsl(ipt,l)) + & (dt*max(cf_upi(ipt,l),1.0e-12_r8)*prsl(ipt,l)) endif if (ntr > 0) then @@ -1140,33 +1141,33 @@ SUBROUTINE CLOUD( & ! IMPLICIT NONE ! - real (kind=kind_phys), parameter :: RHMAX=1.0d0 & ! MAX RELATIVE HUMIDITY - &, QUAD_LAM=1.0d0 & ! MASK FOR QUADRATIC LAMBDA - &, RHRAM=0.05d0 & ! PBL RELATIVE HUMIDITY RAMP -! &, RHRAM=0.15d0 !& ! PBL RELATIVE HUMIDITY RAMP - &, HCRITD=4000.0d0 & ! Critical Moist Static Energy for Deep clouds - &, HCRITS=2000.0d0 & ! Critical Moist Static Energy for Shallow clouds - &, pcrit_lcl=250.0d0 & ! Critical pressure difference between boundary layer top + real (kind=kind_phys), parameter :: RHMAX=1.0_r8 & ! MAX RELATIVE HUMIDITY + &, QUAD_LAM=1.0_r8 & ! MASK FOR QUADRATIC LAMBDA + &, RHRAM=0.05_r8 & ! PBL RELATIVE HUMIDITY RAMP +! &, RHRAM=0.15_r8 !& ! PBL RELATIVE HUMIDITY RAMP + &, HCRITD=4000.0_r8 & ! Critical Moist Static Energy for Deep clouds + &, HCRITS=2000.0_r8 & ! Critical Moist Static Energy for Shallow clouds + &, pcrit_lcl=250.0_r8 & ! Critical pressure difference between boundary layer top ! layer top and lifting condensation level (hPa) -! &, hpert_fac=1.01d0 !& ! Perturbation on hbl when ctei=.true. -! &, hpert_fac=1.005d0 !& ! Perturbation on hbl when ctei=.true. - &, qudfac=quad_lam*half & - &, shalfac=3.0d0 & -! &, qudfac=quad_lam*pt25, shalfac=3.0 !& ! Yogesh's - &, c0ifac=0.07d0 & ! following Han et al, 2016 MWR - &, dpnegcr = 150.0d0 -! &, dpnegcr = 100.0d0 -! &, dpnegcr = 200.0d0 -! - real(kind=kind_phys), parameter :: ERRMIN=0.0001d0 & - &, ERRMI2=0.1d0*ERRMIN & -! &, rainmin=1.0d-9 !& - &, rainmin=1.0d-8 & - &, oneopt9=1.0d0/0.09d0 & - &, oneopt4=1.0d0/0.04d0 - real(kind=kind_phys), parameter :: almax=1.0d-2 & - &, almin1=0.0d0, almin2=0.0d0 - real(kind=kind_phys), parameter :: bldmax=300.0d0, bldmin=25.0d0 +! &, hpert_fac=1.01_r8 !& ! Perturbation on hbl when ctei=.true. +! &, hpert_fac=1.005_r8 !& ! Perturbation on hbl when ctei=.true. + &, qudfac=quad_lam*half & + &, shalfac=3.0_r8 & +! &, qudfac=quad_lam*pt25, shalfac=3.0_r8 !& ! Yogesh's + &, c0ifac=0.07_r8 & ! following Han et al, 2016 MWR + &, dpnegcr = 150.0_r8 +! &, dpnegcr = 100.0_r8 +! &, dpnegcr = 200.0_r8 +! + real(kind=kind_phys), parameter :: ERRMIN=0.0001_r8 & + &, ERRMI2=0.1_r8*ERRMIN & +! &, rainmin=1.0e-9_r8 !& + &, rainmin=1.0e-8_r8 & + &, oneopt9=one/0.09_r8 & + &, oneopt4=one/0.04_r8 + real(kind=kind_phys), parameter :: almax=1.0e-2_r8 & + &, almin1=0.0_r8, almin2=0.0_r8 + real(kind=kind_phys), parameter :: bldmax=300.0_r8, bldmin=25.0_r8 ! ! INPUT ARGUMENTS @@ -1371,13 +1372,13 @@ SUBROUTINE CLOUD( & ! To determine KBL internally -- If KBL is defined externally ! the following two loop should be skipped ! - if (sgcs(kd) < 0.5d0) then + if (sgcs(kd) < 0.5_r8) then hcrit = hcritd - elseif (sgcs(kd) > 0.65d0) then + elseif (sgcs(kd) > 0.65_r8) then hcrit = hcrits else - hcrit = (hcrits*(sgcs(kd)-0.5d0) + hcritd*(0.65d0-sgcs(kd)))& - & * (one/0.15d0) + hcrit = (hcrits*(sgcs(kd)-0.5_r8) + hcritd*(0.65_r8-sgcs(kd)))& + & * (one/0.15_r8) endif IF (CALKBL) THEN KTEM = MAX(KD+1, KBLMX) @@ -1461,7 +1462,7 @@ SUBROUTINE CLOUD( & ii = max(kbl,kd1) kbl = max(klcl,kd1) - tem = min(50.0d0,max(10.0d0,(prl(kmaxp1)-prl(kd))*0.10d0)) + tem = min(50.0_r8,max(10.0_r8,(prl(kmaxp1)-prl(kd))*0.10_r8)) if (prl(kmaxp1) - prl(ii) > tem .and. ii > kbl) kbl = ii @@ -1521,7 +1522,7 @@ SUBROUTINE CLOUD( & ! shal_fac = one ! if (prl(kbl)-prl(kd) < 300.0 .and. kmax == k) shal_fac = shalfac - if (prl(kbl)-prl(kd) < 350.0d0 .and. kmax == k) shal_fac = shalfac + if (prl(kbl)-prl(kd) < 350.0_r8 .and. kmax == k) shal_fac = shalfac DO L=Kmax,KD,-1 IF (L >= KBL) THEN ETA(L) = (PRL(Kmaxp1)-PRL(L)) * PRISM @@ -1583,7 +1584,7 @@ SUBROUTINE CLOUD( & endif enddo ! - if (lcon == kd .or. kbl <= kd .or. prl(kbl)-prsm(lcon) > 150.0d0) & + if (lcon == kd .or. kbl <= kd .or. prl(kbl)-prsm(lcon) > 150.0_r8) & & return ! TX1 = RHFACS - QBL / TX1 ! Average RH @@ -1593,9 +1594,9 @@ SUBROUTINE CLOUD( & IF (.NOT. cnvflg) RETURN ! - RHC = MAX(ZERO, MIN(ONE, EXP(-20.0d0*TX1) )) + RHC = MAX(ZERO, MIN(ONE, EXP(-20.0_r8*TX1) )) ! - wcbase = 0.1d0 + wcbase = 0.1_r8 if (ntrc > 0) then DO N=1,NTRC RBL(N) = ROI(Kmax,N) * ETA(Kmax) @@ -1752,13 +1753,13 @@ SUBROUTINE CLOUD( & HSU = HSU - ALM * TX3 ! CLP = ZERO - ALM = -100.0d0 + ALM = -100.0_r8 HOS = HOL(KD) QOS = QOL(KD) QIS = CIL(KD) QLS = CLL(KD) - cnvflg = HBL > HSU .and. abs(tx1) > 1.0d-4 + cnvflg = HBL > HSU .and. abs(tx1) > 1.0e-4_r8 !*********************************************************************** @@ -1775,7 +1776,7 @@ SUBROUTINE CLOUD( & if (tx2 == zero) then alm = - st2 / tx1 - if (alm > almax) alm = -100.0d0 + if (alm > almax) alm = -100.0_r8 else x00 = tx2 + tx2 epp = tx1 * tx1 - (x00+x00)*st2 @@ -1784,8 +1785,8 @@ SUBROUTINE CLOUD( & tem = sqrt(epp) tem1 = (-tx1-tem)*x00 tem2 = (-tx1+tem)*x00 - if (tem1 > almax) tem1 = -100.0d0 - if (tem2 > almax) tem2 = -100.0d0 + if (tem1 > almax) tem1 = -100.0_r8 + if (tem2 > almax) tem2 = -100.0_r8 alm = max(tem1,tem2) endif @@ -1856,12 +1857,12 @@ SUBROUTINE CLOUD( & ACR = zero TEM = PRL(KD1) - (PRL(KD1)-PRL(KD)) * CLP * HALF tx1 = PRL(KBL) - TEM - tx2 = min(900.0d0, max(tx1,100.0d0)) - tem1 = log(tx2*0.01d0) * oneolog10 + tx2 = min(900.0_r8, max(tx1,100.0_r8)) + tem1 = log(tx2*0.01_r8) * oneolog10 tem2 = one - tem1 if ( kdt == 1 ) then -! rel_fac = (dt * facdt) / (tem1*12.0d0 + tem2*3.0) - rel_fac = (dt * facdt) / (tem1*6.0d0 + tem2*adjts_s) +! rel_fac = (dt * facdt) / (tem1*12.0_r8 + tem2*3.0) + rel_fac = (dt * facdt) / (tem1*6.0_r8 + tem2*adjts_s) else rel_fac = (dt * facdt) / (tem1*adjts_d + tem2*adjts_s) endif @@ -1870,7 +1871,7 @@ SUBROUTINE CLOUD( & rel_fac = max(zero, min(half,rel_fac)) IF (CRTFUN) THEN - iwk = tem*0.02d0 - 0.999999999d0 + iwk = tem*0.02_r8 - 0.999999999_r8 iwk = MAX(1, MIN(iwk, 16)) ACR = tx1 * (AC(iwk) + tem * AD(iwk)) * CCWF ENDIF @@ -2043,7 +2044,7 @@ SUBROUTINE CLOUD( & ! CALCUP = .FALSE. - TEM = max(0.05d0, MIN(CD*200.0d0, MAX_NEG_BOUY)) + TEM = max(0.05_r8, MIN(CD*200.0_r8, MAX_NEG_BOUY)) IF (.not. cnvflg .and. WFN > ACR .and. & & dpneg < dpnegcr .and. AKM <= TEM) CALCUP = .TRUE. @@ -2086,7 +2087,7 @@ SUBROUTINE CLOUD( & ENDIF PL = (PRL(KD1) + PRL(KD))*HALF - IF (TRAIN > 1.0d-4 .AND. PL <= dpd*prl(kp1)) DDFT = .TRUE. + IF (TRAIN > 1.0e-4_r8 .AND. PL <= dpd*prl(kp1)) DDFT = .TRUE. ENDIF ! IF (DDFT) THEN ! Downdraft scheme based on (Cheng and Arakawa, 1997) @@ -2401,7 +2402,7 @@ SUBROUTINE CLOUD( & ! sigf(kd) = max(zero, min(one, tx1 * tx1)) ! endif if (do_aw) then - tx1 = (0.2d0 / max(alm, 1.0d-5)) + tx1 = (0.2_r8 / max(alm, 1.0e-5_r8)) tx2 = one - min(one, pi * tx1 * tx1 / area) tx2 = tx2 * tx2 @@ -2525,8 +2526,8 @@ SUBROUTINE CLOUD( & endif enddo tem = tem + amb * dof * sigf(kbl) - tem = tem * (3600.0d0/dt) - tem1 = sqrt(max(one, min(100.0d0,(6.25d10/max(area,one))))) ! 20110530 + tem = tem * (3600.0_r8/dt) + tem1 = sqrt(max(one, min(100.0_r8,(6.25e10_r8/max(area,one))))) ! 20110530 clfrac = max(ZERO, min(half, rknob*clf(tem)*tem1)) cldfrd = clfrac @@ -2573,7 +2574,7 @@ SUBROUTINE CLOUD( & tem4 = zero if (tx1 > zero) & - & TEM4 = POTEVAP * (one - EXP( tx4*TX1**0.57777778d0 ) ) + & TEM4 = POTEVAP * (one - EXP( tx4*TX1**0.57777778_r8 )) ACTEVAP = MIN(TX1, TEM4*CLFRAC) @@ -2581,7 +2582,7 @@ SUBROUTINE CLOUD( & ! tem4 = zero if (tx2 > zero) & - & TEM4 = POTEVAP * (one - EXP( tx4*TX2**0.57777778d0 ) ) + & TEM4 = POTEVAP * (one - EXP( tx4*TX2**0.57777778_r8 )) TEM4 = min(MIN(TX2, TEM4*CLDFRD), potevap-actevap) if (tx2 < rainmin*dt) tem4 = min(tx2, potevap-actevap) ! @@ -2650,7 +2651,7 @@ SUBROUTINE CLOUD( & ! following Liu et al. [JGR,2001] Eq 1 if (FSCAV_(N) > zero) then - DELZKM = ( PHIL(KD) - PHIH(KD1) ) *(onebg*0.001d0) + DELZKM = ( PHIL(KD) - PHIH(KD1) ) *(onebg*0.001_r8) FNOSCAV = exp(- FSCAV_(N) * DELZKM) else FNOSCAV = one @@ -2660,7 +2661,7 @@ SUBROUTINE CLOUD( & & * FNOSCAV DO L=KD1,K if (FSCAV_(N) > zero) then - DELZKM = ( PHIL(KD) - PHIH(L+1) ) *(onebg*0.001d0) + DELZKM = ( PHIL(KD) - PHIH(L+1) ) *(onebg*0.001_r8) FNOSCAV = exp(- FSCAV_(N) * DELZKM) endif lm1 = l - 1 @@ -2779,7 +2780,7 @@ SUBROUTINE DDRFT( & &, IT, KM1, KTEM, KK, KK1, LM1, LL, LP1 & &, IDW, IDH, IDN(K), idnm, itr ! - parameter (ERRMIN=0.0001d0, ERRMI2=0.1d0*ERRMIN) + parameter (ERRMIN=0.0001_r8, ERRMI2=0.1_r8*ERRMIN) ! parameter (ERRMIN=0.00001, ERRMI2=0.1*ERRMIN) ! ! real (kind=kind_phys), parameter :: PIINV=one/PI, pio2=half*pi @@ -2789,9 +2790,9 @@ SUBROUTINE DDRFT( & ! parameter (ONPG=1.0+0.5, GMF=1.0/ONPG, RPART=0.5) ! PARAMETER (AA1=1.0, BB1=1.5, CC1=1.1, DD1=0.85, F3=CC1, F5=2.5) ! PARAMETER (AA1=2.0, BB1=1.5, CC1=1.1, DD1=0.85, F3=CC1, F5=2.5) - PARAMETER (AA1=1.0d0, BB1=1.0d0, CC1=1.0d0, DD1=1.0d0, & - & F3=CC1, F5=1.0d0) - parameter (QRMIN=1.0d-6, WC2MIN=0.01d0, GMF1=GMF/AA1, GMF5=GMF/F5) + PARAMETER (AA1=1.0_r8, BB1=1.0_r8, CC1=1.0_r8, DD1=1.0_r8, & + & F3=CC1, F5=1.0_r8) + parameter (QRMIN=1.0e-6_r8, WC2MIN=0.01_r8, GMF1=GMF/AA1, GMF5=GMF/F5) ! parameter (QRMIN=1.0E-6, WC2MIN=1.00, GMF1=GMF/AA1, GMF5=GMF/F5) parameter (WCMIN=sqrt(wc2min)) ! parameter (sialf=0.5) @@ -2800,12 +2801,12 @@ SUBROUTINE DDRFT( & &, itrmin=15, itrmnd=12, numtla=2 ! uncentering for vvel in dd - real(kind=kind_phys), parameter :: ddunc1=0.25d0 & + real(kind=kind_phys), parameter :: ddunc1=0.25_r8 & &, ddunc2=one-ddunc1 & ! &, ddunc1=0.4, ddunc2=one-ddunc1 & ! &, ddunc1=0.3, ddunc2=one-ddunc1 & - &, VTPEXP=-0.3636d0 & - &, VTP=36.34d0*SQRT(1.2d0)*(0.001d0)**0.1364d0 + &, VTPEXP=-0.3636_r8 & + &, VTP=36.34_r8*SQRT(1.2_r8)*(0.001_r8)**0.1364_r8 ! ! real(kind=kind_phys) EM(K*K), ELM(K) real(kind=kind_phys) ELM(K), AA(KD:K,KD:KP1), QW(KD:K,KD:K) & @@ -2830,7 +2831,7 @@ SUBROUTINE DDRFT( & CLDFRD = zero RNTP = zero DOF = zero - ERRQ = 10.0d0 + ERRQ = 10.0_r8 RNB = zero RNT = zero TX2 = PRL(KBL) @@ -2861,7 +2862,7 @@ SUBROUTINE DDRFT( & ENDDO if (kk /= kbl) then do l=kk,kbl - buy(l) = 0.9d0 * buy(l-1) + buy(l) = 0.9_r8 * buy(l-1) enddo endif ! @@ -2869,24 +2870,24 @@ SUBROUTINE DDRFT( & qrpi(l) = buy(l) enddo do l=kd1,kb1 - buy(l) = 0.25d0 * (qrpi(l-1)+qrpi(l)+qrpi(l)+qrpi(l+1)) + buy(l) = 0.25_r8 * (qrpi(l-1)+qrpi(l)+qrpi(l)+qrpi(l+1)) enddo ! ! CALL ANGRAD(TX1, ALM, STLA, CTL2, AL2, PI, TLA, TX2, WFN, TX3) - tx1 = 1000.0d0 + tx1 - prl(kp1) + tx1 = 1000.0_r8 + tx1 - prl(kp1) ! CALL ANGRAD(TX1, ALM, AL2, TLA, TX2, WFN, TX3) CALL ANGRAD(TX1, ALM, AL2, TLA) ! ! Following Ucla approach for rain profile ! - F2 = (BB1+BB1)*ONEBG/(PI*0.2d0) + F2 = (BB1+BB1)*ONEBG/(PI*0.2_r8) ! WCMIN = SQRT(WC2MIN) ! WCBASE = WCMIN ! ! del_tla = TLA * 0.2 ! del_tla = TLA * 0.25 - del_tla = TLA * 0.3d0 + del_tla = TLA * 0.3_r8 TLA = TLA - DEL_TLA ! DO L=KD,K @@ -2947,15 +2948,15 @@ SUBROUTINE DDRFT( & do ntla=1,numtla ! numtla is the the maximimu number of tilting angle tries ! ------ ! if (errq < 1.0 .or. tla > 45.0) cycle - if (errq < 0.1d0 .or. tla > 45.0d0) cycle + if (errq < 0.1_r8 .or. tla > 45.0_r8) cycle ! tla = tla + del_tla STLA = SIN(TLA*deg2rad) ! sine of tilting angle CTL2 = one - STLA * STLA ! cosine square of tilting angle ! - STLA = F2 * STLA * AL2 - CTL2 = DD1 * CTL2 - CTL3 = 0.1364d0 * CTL2 + STLA = F2 * STLA * AL2 + CTL2 = DD1 * CTL2 + CTL3 = 0.1364_r8 * CTL2 ! DO L=KD,K RNF(L) = zero @@ -3018,8 +3019,8 @@ SUBROUTINE DDRFT( & VRW(1) = F3*WVL(KD) - CTL2*VT(1) BUD(KD) = STLA * TX6 * QRB(KD) * half RNF(KD) = BUD(KD) - DOF = 1.1364d0 * BUD(KD) * QRPI(KD) - DOFW = -BUD(KD) * STLT(KD) + DOF = 1.1364_r8 * BUD(KD) * QRPI(KD) + DOFW = -BUD(KD) * STLT(KD) ! RNT = TRW(1) * VRW(1) TX2 = zero @@ -3052,8 +3053,8 @@ SUBROUTINE DDRFT( & ! QA(2) = DOF WA(2) = DOFW - DOF = 1.1364d0 * BUD(L) * QRPI(L) - DOFW = -BUD(L) * STLT(L) + DOF = 1.1364_r8 * BUD(L) * QRPI(L) + DOFW = -BUD(L) * STLT(L) ! RNF(LL) = RNF(LL) + QQQ * ST1 RNF(L) = QQQ * QRT(L) @@ -3123,8 +3124,8 @@ SUBROUTINE DDRFT( & QA(2) = DOF WA(2) = DOFW - DOF = 1.1364d0 * BUD(L) * QRPI(L) - DOFW = -BUD(L) * STLT(L) + DOF = 1.1364_r8 * BUD(L) * QRPI(L) + DOFW = -BUD(L) * STLT(L) ! RNF(LL) = RNF(LL) + ST1 ! @@ -3258,7 +3259,7 @@ SUBROUTINE DDRFT( & ENDDO ! ! tem = 0.5 - if (tx2 > one .and. abs(errq-tx2) > 0.1d0) then + if (tx2 > one .and. abs(errq-tx2) > 0.1_r8) then tem = half !! elseif (tx2 < 0.1) then !! tem = 1.2 @@ -3281,17 +3282,17 @@ SUBROUTINE DDRFT( & ENDIF ELSE TEM = ERRQ - TX2 -! IF (TEM < ZERO .AND. ERRQ > 0.1d0) THEN - IF (TEM < ZERO .AND. ERRQ > 0.5d0) THEN +! IF (TEM < ZERO .AND. ERRQ > 0.1_r8) THEN + IF (TEM < ZERO .AND. ERRQ > 0.5_r8) THEN ! IF (TEM < ZERO .and. & -! & (ntla < numtla .or. ERRQ > 0.5d0)) THEN +! & (ntla < numtla .or. ERRQ > 0.5_r8)) THEN SKPUP = .TRUE. ! No convergence ! - ERRQ = 10.0d0 ! No rain profile! + ERRQ = 10.0_r8 ! No rain profile! !!!! ELSEIF (ABS(TEM) < ERRMI2 .OR. TX2 < ERRMIN) THEN ELSEIF (TX2 < ERRMIN) THEN SKPUP = .TRUE. ! Converges ! ERRQ = zero ! Rain profile exists! - elseif (tem < zero .and. errq < 0.1d0) then + elseif (tem < zero .and. errq < 0.1_r8) then skpup = .true. ! if (ntla == numtla .or. tem > -0.003) then errq = zero @@ -3309,7 +3310,7 @@ SUBROUTINE DDRFT( & ! ENDDO ! End of the ITR Loop!! ! - IF (ERRQ < 0.1d0) THEN + IF (ERRQ < 0.1_r8) THEN DDFT = .TRUE. RNB = - RNB ! do l=kd1,kb1-1 @@ -3330,7 +3331,7 @@ SUBROUTINE DDRFT( & TX1 = TX1 + RNF(L) ENDDO TX1 = TRAIN / (TX1+RNT+RNB) - IF (ABS(TX1-one) < 0.2d0) THEN + IF (ABS(TX1-one) < 0.2_r8) THEN RNT = MAX(RNT*TX1,ZERO) RNB = RNB * TX1 DO L=KD,KB1 @@ -3340,7 +3341,7 @@ SUBROUTINE DDRFT( & ELSE DDFT = .FALSE. - ERRQ = 10.0d0 + ERRQ = 10.0_r8 ENDIF ENDIF ! @@ -3364,7 +3365,7 @@ SUBROUTINE DDRFT( & WCB(L) = zero ENDDO ! - ERRQ = 10.0d0 + ERRQ = 10.0_r8 ! At this point stlt contains inverse of updraft vertical velocity 1/Wu. KK = MAX(KB1,KD1) @@ -3410,9 +3411,9 @@ SUBROUTINE DDRFT( & IF (RNT > zero) THEN if (TX1 > zero) THEN QRP(KD) = (RPART*RNT / (ROR(KD)*TX1*GMS(KD))) & - & ** (one/1.1364d0) + & ** (one/1.1364_r8) else - tx1 = RPART*RNT / (ROR(KD)*GMS(KD)*QRP(KD)**1.1364d0) + tx1 = RPART*RNT / (ROR(KD)*GMS(KD)*QRP(KD)**1.1364_r8) endif RNTP = (one - RPART) * RNT BUY(KD) = - ROR(KD) * TX1 * QRP(KD) @@ -3473,7 +3474,7 @@ SUBROUTINE DDRFT( & VRW(1) = half * (GAM(L-1) + GAM(L)) VRW(2) = one / (VRW(1) + VRW(1)) ! - TX4 = (QRT(L-1)+QRB(L-1))*(ONEBG*FAC*500.0d0*EKNOB) + TX4 = (QRT(L-1)+QRB(L-1))*(ONEBG*FAC*500.0_r8*EKNOB) ! DOFW = one / (WA(3) * (one + NU*WA(2))) ! 1.0 / TVbar! ! @@ -3481,7 +3482,7 @@ SUBROUTINE DDRFT( & HOD(L) = HOD(L-1) QOD(L) = QOD(L-1) ! - ERRQ = 10.0d0 + ERRQ = 10.0_r8 ! IF (L <= KBL) THEN @@ -3506,7 +3507,7 @@ SUBROUTINE DDRFT( & IF (L == KD1) THEN IF (RNT > zero) THEN TEM = MAX(QRP(L-1),QRP(L)) - WVL(L) = TX1 * TEM * QRB(L-1)*(FACG*5.0d0) + WVL(L) = TX1 * TEM * QRB(L-1)*(FACG*5.0_r8) ENDIF WVL(L) = MAX(ONE_M2, WVL(L)) TRW(1) = TRW(1) * half @@ -3634,9 +3635,9 @@ SUBROUTINE DDRFT( & ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) TEM2 = ROR(L) * QRP(L) CALL QRABF(TEM2,QRAF,QRBF) - TEM6 = TX5 * (1.6d0 + 124.9d0 * QRAF) * QRBF * TX4 + TEM6 = TX5 * (1.6_r8 + 124.9_r8 * QRAF) * QRBF * TX4 ! - CE = TEM6 * ST2 / ((5.4d5*ST2 + 2.55d6)*(ETD(L)+DDZ)) + CE = TEM6 * ST2 / ((5.4e5_r8*ST2 + 2.55e6_r8)*(ETD(L)+DDZ)) ! TEM2 = - ((one+TEM1)*(QHS+CE) + TEM1*QOD(L)) TEM3 = (one + TEM1) * QHS * (QOD(L)+CE) @@ -3647,7 +3648,7 @@ SUBROUTINE DDRFT( & ! second iteration ! ! ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) - CE = TEM6 * ST2 / ((5.4d5*ST2 + 2.55d6)*(ETD(L)+DDZ)) + CE = TEM6 * ST2 / ((5.4e5_r8*ST2 + 2.55e6_r8)*(ETD(L)+DDZ)) ! CEE = CE * (ETD(L)+DDZ) ! @@ -3668,7 +3669,7 @@ SUBROUTINE DDRFT( & QRP(L) = MAX(TEM,ZERO) ELSEIF (TX5 > zero) THEN QRP(L) = (MAX(ZERO,QA(1)/(ROR(L)*TX5*GMS(L)))) & - & ** (one/1.1364d0) + & ** (one/1.1364_r8) ELSE QRP(L) = zero ENDIF @@ -3695,7 +3696,7 @@ SUBROUTINE DDRFT( & ! WVL(L) = 0.5*tem1 ! WVL(L) = 0.1*tem1 ! WVL(L) = 0.0 - WVL(L) = 1.0d-10 + WVL(L) = 1.0e-10_r8 else WVL(L) = half*(WVL(L)+TEM1) endif @@ -3709,7 +3710,7 @@ SUBROUTINE DDRFT( & ! IF (ITR >= MIN(ITRMIN,ITRMD/2)) THEN IF (ITR >= MIN(ITRMND,ITRMD/2)) THEN - IF (ETD(L-1) == zero .AND. ERRQ > 0.2d0) THEN + IF (ETD(L-1) == zero .AND. ERRQ > 0.2_r8) THEN ROR(L) = BUD(KD) ETD(L) = zero WVL(L) = zero @@ -3721,7 +3722,7 @@ SUBROUTINE DDRFT( & TX5 = TX9 else TX5 = (STLT(KB1) * QRT(KB1) & - & + STLT(KBL) * QRB(KB1)) * (0.5d0*FAC) + & + STLT(KBL) * QRB(KB1)) * (0.5_r8*FAC) endif EVP(L-1) = zero @@ -3730,14 +3731,14 @@ SUBROUTINE DDRFT( & ! IF (QA(1) > 0.0) THEN QRP(L) = (QA(1) / (ROR(L)*TX5*GMS(L))) & - & ** (one/1.1364d0) + & ** (one/1.1364_r8) ! endif BUY(L) = - ROR(L) * TX5 * QRP(L) WCB(L-1) = zero ENDIF ! DEL_ETA = ETD(L) - ETD(L-1) - IF(DEL_ETA < zero .AND. ERRQ > 0.1d0) THEN + IF(DEL_ETA < zero .AND. ERRQ > 0.1_r8) THEN ROR(L) = BUD(KD) ETD(L) = zero WVL(L) = zero @@ -3764,9 +3765,9 @@ SUBROUTINE DDRFT( & ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) TEM2 = ROR(L) * QRP(L-1) CALL QRABF(TEM2,QRAF,QRBF) - TEM6 = TX5 * (1.6d0 + 124.9d0 * QRAF) * QRBF * TX4 + TEM6 = TX5 * (1.6_r8 + 124.9_r8 * QRAF) * QRBF * TX4 ! - CE = TEM6*ST2/((5.4d5*ST2 + 2.55d6)*(ETD(L)+DDZ)) + CE = TEM6*ST2/((5.4e5_r8*ST2 + 2.55e6_r8)*(ETD(L)+DDZ)) ! TEM2 = - ((one+TEM1)*(QHS+CE) + TEM1*QOD(L)) @@ -3777,7 +3778,7 @@ SUBROUTINE DDRFT( & ! second iteration ! ! ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) - CE = TEM6*ST2/((5.4d5*ST2 + 2.55d6)*(ETD(L)+DDZ)) + CE = TEM6*ST2/((5.4e5_r8*ST2 + 2.55e6_r8)*(ETD(L)+DDZ)) ! CEE = CE * (ETD(L)+DDZ) ! @@ -3830,7 +3831,7 @@ SUBROUTINE DDRFT( & ! ENDDO ! End of the iteration loop for a given L! IF (L <= K) THEN - IF (ETD(L-1) == zero .AND. ERRQ > 0.1d0 .and. l <= kbl) THEN + IF (ETD(L-1) == zero .AND. ERRQ > 0.1_r8 .and. l <= kbl) THEN !!! & .AND. ERRQ > ERRMIN*10.0 .and. l <= kbl) THEN ! & .AND. ERRQ > ERRMIN*10.0) THEN ROR(L) = BUD(KD) @@ -3853,7 +3854,7 @@ SUBROUTINE DDRFT( & ! IF (QA(1) > 0.0) THEN QRP(L) = (QA(1) / (ROR(L)*TX5*GMS(L))) & - & ** (one/1.1364d0) + & ** (one/1.1364_r8) ! ENDIF ETD(L) = zero WVL(L) = zero @@ -3884,7 +3885,7 @@ SUBROUTINE DDRFT( & ! not converge) , no downdraft is assumed ! ! IF (ERRQ > ERRMIN*100.0 .AND. IDN(idnm) == 99) & - IF (ERRQ > 0.1d0 .AND. IDN(idnm) == idnmax) DDFT = .FALSE. + IF (ERRQ > 0.1_r8 .AND. IDN(idnm) == idnmax) DDFT = .FALSE. ! DOF = zero IF (.NOT. DDFT) RETURN @@ -3988,7 +3989,7 @@ SUBROUTINE QSATCN(TT,P,Q,DQDT) real(kind=kind_phys) es, d, hlorv, W ! ! es = 10.0 * fpvs(tt) ! fpvs is in centibars! - es = min(p, 0.01d0 * fpvs(tt)) ! fpvs is in Pascals! + es = min(p, 0.01_r8 * fpvs(tt)) ! fpvs is in Pascals! ! D = one / max(p+epsm1*es,ONE_M10) D = one / (p+epsm1*es) ! @@ -4009,7 +4010,7 @@ SUBROUTINE ANGRAD(PRES, ALM, AL2, TLA) ! integer i ! - IF (TLA < 0.0d0) THEN + IF (TLA < 0.0_r8) THEN IF (PRES <= PLAC(1)) THEN TLA = TLAC(1) ELSEIF (PRES <= PLAC(2)) THEN @@ -4046,8 +4047,8 @@ SUBROUTINE ANGRAD(PRES, ALM, AL2, TLA) TEM = REFR(6) ENDIF ! - tem = 2.0d-4 / tem - al2 = min(4.0d0*tem, max(alm, tem)) + tem = 2.0e-4_r8 / tem + al2 = min(4.0_r8*tem, max(alm, tem)) ! RETURN end subroutine angrad @@ -4059,18 +4060,18 @@ SUBROUTINE SETQRP integer jx ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! XMIN = 1.0E-6 - XMIN = 0.0d0 - XMAX = 5.0d0 + XMIN = 0.0_r8 + XMAX = 5.0_r8 XINC = (XMAX-XMIN)/(NQRP-1) C2XQRP = one / XINC C1XQRP = one - XMIN*C2XQRP - TEM1 = 0.001d0 ** 0.2046d0 - TEM2 = 0.001d0 ** 0.525d0 + TEM1 = 0.001_r8 ** 0.2046_r8 + TEM2 = 0.001_r8 ** 0.525_r8 DO JX=1,NQRP X = XMIN + (JX-1)*XINC - TBQRP(JX) = X ** 0.1364d0 - TBQRA(JX) = TEM1 * X ** 0.2046d0 - TBQRB(JX) = TEM2 * X ** 0.525d0 + TBQRP(JX) = X ** 0.1364_r8 + TBQRA(JX) = TEM1 * X ** 0.2046_r8 + TBQRB(JX) = TEM2 * X ** 0.525_r8 ENDDO ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RETURN @@ -4095,12 +4096,12 @@ end subroutine qrabf SUBROUTINE SETVTP implicit none - real(kind=kind_phys), parameter :: vtpexp=-0.3636d0, one=1.0d0 + real(kind=kind_phys), parameter :: vtpexp=-0.3636_r8, one=1.0_r8 real(kind=kind_phys) xinc,x,xmax,xmin integer jx ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XMIN = 0.05d0 - XMAX = 1.5d0 + XMIN = 0.05_r8 + XMAX = 1.5_r8 XINC = (XMAX-XMIN)/(NVTP-1) C2XVTP = one / XINC C1XVTP = one - XMIN*C2XVTP @@ -4147,10 +4148,10 @@ real(kind=kind_phys) FUNCTION CLF(PRATE) implicit none real(kind=kind_phys) PRATE ! - real (kind=kind_phys), parameter :: ccf1=0.30d0, ccf2=0.09d0 & - &, ccf3=0.04d0, ccf4=0.01d0 & - &, pr1=1.0d0, pr2=5.0d0 & - &, pr3=20.0d0 + real (kind=kind_phys), parameter :: ccf1=0.30_r8, ccf2=0.09_r8 & + &, ccf3=0.04_r8, ccf4=0.01_r8 & + &, pr1=1.0_r8, pr2=5.0_r8 & + &, pr3=20.0_r8 ! if (prate < pr1) then clf = ccf1 From d7bcc47963c3bb4fa7483ad29345b5a5208d4ab2 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Wed, 22 Apr 2020 18:45:33 +0000 Subject: [PATCH 096/404] Bug fixes for uninitialized variables... --- physics/module_bl_mynn.F90 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index 20a169c3a..73a101a3f 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -6017,7 +6017,7 @@ SUBROUTINE DMP_mf( & aratio = MIN(UPA(K-1,I)/(1.-UPA(K-1,I)), 0.5) !limit should never get hit detturb = 0.00008 oow = -0.060/MAX(1.0,(0.5*(Wn+UPW(K-1,I)))) !coef for dynamical detrainment rate - detrate = MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0003) ! dynamical detrainment rate (m^-1) + detrate = MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0002) ! dynamical detrainment rate (m^-1) detrateUV= MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0001) ! dynamical detrainment rate (m^-1) envm_thl(k)=envm_thl(k) + (0.5*(thl_ent + UPTHL(K-1,I)) - thl(k))*detrate*aratio*MIN(dzp,300.) qv_ent = 0.5*(MAX(qt_ent-qc_ent,0.) + MAX(UPQT(K-1,I)-UPQC(K-1,I),0.)) @@ -6403,10 +6403,13 @@ SUBROUTINE DMP_mf( & Ac_mf = 0.5*(edmf_a(k)+edmf_a(k-1)) Ac_strat = cldfra_bl1d(k)*(1.0-Ac_mf) cldfra_bl1d(k)=Ac_mf + Ac_strat + qc_mf = QCp !Ensure stratus clouds have mixing ratio similar to cumulus QCs = MIN(MAX(qc_bl1d(k), 0.5*qc_mf), 5E-4) qc_bl1d(k) = (QCp*Ac_mf + QCs*Ac_strat)/cldfra_bl1d(k) ENDIF + ELSE + Ac_mf = mf_cf ENDIF !Now recalculate the terms for the buoyancy flux for mass-flux clouds: From 5263dfa3a0d17fa62eaf1780ed171b8d355048d6 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 23 Apr 2020 14:05:56 -0600 Subject: [PATCH 097/404] Updated rte-rrtmgp submodule. Modified impacted interfaces in physics/ --- physics/rrtmgp_lw_gas_optics.F90 | 15 +++++++++--- physics/rrtmgp_sw_gas_optics.F90 | 39 +++++++++++++++++++++++++------- physics/rte-rrtmgp | 2 +- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 408cc48f5..c446bd70c 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -66,7 +66,8 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp temp_ref ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] real(kind_phys), dimension(:,:), allocatable :: & band_lims, & ! Beginning and ending wavenumber [cm -1] for each band - totplnk ! Integrated Planck function by band + totplnk, & ! Integrated Planck function by band + optimal_angle_fit real(kind_phys), dimension(:,:,:), allocatable :: & vmr_ref, & ! volume mixing ratios for reference atmosphere kminor_lower, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to @@ -97,7 +98,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ntemps, npress, ngpts, nabsorbers, nextrabsorbers, nminorabsorbers,& nmixingfracs, nlayers, nbnds, npairs, ninternalSourcetemps, & nminor_absorber_intervals_lower, nminor_absorber_intervals_upper, & - ncontributors_lower, ncontributors_upper + ncontributors_lower, ncontributors_upper,nfit_coeffs ! Local variables integer :: ncid, dimID, varID, status, iGas, ierr @@ -142,6 +143,8 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_lower) status = nf90_inq_dimid(ncid, 'contributors_upper', dimid) status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_upper) + status = nf90_inq_dimid(ncid, 'fit_coeffs', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nfit_coeffs) status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_lower', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_lower) status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_upper', dimid) @@ -170,6 +173,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(kminor_start_lower(nminor_absorber_intervals_lower)) allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(optimal_angle_fit(nfit_coeffs,nbnds)) allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) @@ -223,6 +227,8 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_get_var( ncid, varID, kminor_upper) status = nf90_inq_varid(ncid, 'vmr_ref', varID) status = nf90_get_var( ncid, varID, vmr_ref) + status = nf90_inq_varid(ncid, 'optimal_angle_fit',varID) + status = nf90_get_var( ncid, varID, optimal_angle_fit) status = nf90_inq_varid(ncid, 'kmajor', varID) status = nf90_get_var( ncid, varID, kmajor) status = nf90_inq_varid(ncid, 'kminor_start_lower', varID) @@ -257,6 +263,8 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! endif ! Initialize gas concentrations and gas optics class + print*,'nfit_coeffs: ',nfit_coeffs + print*,'optimal_angle_fit: ',optimal_angle_fit call check_error_msg('lw_gas_optics_init',gas_concentrations%init(active_gases_array)) call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & @@ -264,7 +272,8 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, minor_limits_gpt_upper, & minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & - kminor_start_lower, kminor_start_upper, totplnk, planck_frac, rayl_lower, rayl_upper)) + kminor_start_lower, kminor_start_upper, totplnk, planck_frac, rayl_lower, rayl_upper, & + optimal_angle_fit)) end subroutine rrtmgp_lw_gas_optics_init diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 7945f43fe..cb081c6d4 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -60,14 +60,18 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp real(kind_phys) :: & press_ref_trop, & ! Reference pressure separating the lower and upper atmosphere [Pa] temp_ref_p, & ! Standard spectroscopic reference pressure [Pa] - temp_ref_t ! Standard spectroscopic reference temperature [K] + temp_ref_t, & ! Standard spectroscopic reference temperature [K] + tsi_default, & ! + mg_default, & ! + sb_default ! real(kind_phys), dimension(:), allocatable :: & press_ref, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] temp_ref, & ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] - solar_source ! Stored solar source function from original RRTM + solar_quiet, & ! + solar_facular, & ! + solar_sunspot ! real(kind_phys), dimension(:,:), allocatable :: & band_lims ! Beginning and ending wavenumber [cm -1] for each band - real(kind_phys), dimension(:,:,:), allocatable :: & vmr_ref, & ! Volume mixing ratios for reference atmosphere kminor_lower, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to @@ -172,7 +176,9 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) allocate(rayl_upper(ngpts, nmixingfracs, ntemps)) allocate(rayl_lower(ngpts, nmixingfracs, ntemps)) - allocate(solar_source(ngpts)) + allocate(solar_quiet(ngpts)) + allocate(solar_facular(ngpts)) + allocate(solar_sunspot(ngpts)) allocate(temp1(nminor_absorber_intervals_lower)) allocate(temp2(nminor_absorber_intervals_upper)) allocate(temp3(nminor_absorber_intervals_lower)) @@ -211,7 +217,13 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_P', varID) status = nf90_get_var( ncid, varID, temp_ref_p) status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_T', varID) - status = nf90_get_var( ncid, varID, temp_ref_t) + status = nf90_get_var( ncid, varID, temp_ref_t) + status = nf90_inq_varid(ncid, 'tsi_default', varID) + status = nf90_get_var( ncid, varID, tsi_default) + status = nf90_inq_varid(ncid, 'mg_default', varID) + status = nf90_get_var( ncid, varID, mg_default) + status = nf90_inq_varid(ncid, 'sb_default', varID) + status = nf90_get_var( ncid, varID, sb_default) status = nf90_inq_varid(ncid, 'press_ref_trop', varID) status = nf90_get_var( ncid, varID, press_ref_trop) status = nf90_inq_varid(ncid, 'kminor_lower', varID) @@ -226,8 +238,12 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp status = nf90_get_var( ncid, varID, kminor_start_lower) status = nf90_inq_varid(ncid, 'kminor_start_upper', varID) status = nf90_get_var( ncid, varID, kminor_start_upper) - status = nf90_inq_varid(ncid, 'solar_source', varID) - status = nf90_get_var( ncid, varID, solar_source) + status = nf90_inq_varid(ncid, 'solar_source_quiet', varID) + status = nf90_get_var( ncid, varID, solar_quiet) + status = nf90_inq_varid(ncid, 'solar_source_facular', varID) + status = nf90_get_var( ncid, varID, solar_facular) + status = nf90_inq_varid(ncid, 'solar_source_sunspot', varID) + status = nf90_get_var( ncid, varID, solar_sunspot) status = nf90_inq_varid(ncid, 'rayl_lower', varID) status = nf90_get_var( ncid, varID, rayl_lower) status = nf90_inq_varid(ncid, 'rayl_upper', varID) @@ -257,6 +273,12 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Initialize gas concentrations and gas optics class + print*,'tsi_default: ',tsi_default + print*,'mg_default: ',mg_default + print*,'sv_default: ',sb_default + print*,'solar_quiet: ',solar_quiet + print*,'solar_facular: ',solar_facular + print*,'solar_sunspot: ',solar_sunspot call check_error_msg('sw_gas_optics_init',gas_concentrations%init(active_gases_array)) call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & @@ -264,7 +286,8 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower,minor_limits_gpt_upper, & minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & - kminor_start_lower, kminor_start_upper, solar_source, rayl_lower, rayl_upper)) + kminor_start_lower, kminor_start_upper, solar_quiet, solar_facular, solar_sunspot, & + tsi_default, mg_default, sb_default, rayl_lower, rayl_upper)) end subroutine rrtmgp_sw_gas_optics_init diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 7dfff2025..bab7d03c1 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 7dfff2025cae02c84b12df2402a39d77065f0e62 +Subproject commit bab7d03c1bc10e43b7077832aa36cb84c4598c08 From a6e95dbb89bd49b403c444fa8e5ce0eb67d17af7 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Thu, 23 Apr 2020 20:53:11 +0000 Subject: [PATCH 098/404] Changing "_ocn"to "_wat" so the variable can be used for lake as well. --- physics/GFS_PBL_generic.F90 | 10 +- physics/GFS_PBL_generic.meta | 6 +- physics/GFS_suite_interstitial.F90 | 18 +-- physics/GFS_suite_interstitial.meta | 2 +- physics/GFS_surface_composites.F90 | 188 ++++++++++++++-------------- physics/GFS_surface_composites.meta | 62 ++++----- physics/GFS_surface_generic.F90 | 12 +- physics/GFS_surface_generic.meta | 4 +- physics/dcyc2.f | 30 ++--- physics/dcyc2.meta | 6 +- physics/module_MYJSFC_wrapper.F90 | 60 ++++----- physics/module_MYJSFC_wrapper.meta | 20 +-- physics/sfc_diff.f | 78 ++++++------ physics/sfc_diff.meta | 26 ++-- physics/sfc_drv_ruc.F90 | 12 +- physics/sfc_drv_ruc.meta | 2 +- physics/sfc_nst.f | 26 ++-- physics/sfc_nst.meta | 8 +- 18 files changed, 285 insertions(+), 285 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index ff59aa465..c8746d378 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -287,7 +287,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dqsfc_cpl, dusfci_cpl, dvsfci_cpl, dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, & dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag, dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt, & dq3dt_ozone, rd, cp,fvirt, hvap, t1, q1, prsl, hflx, ushfsfci, oceanfrac, fice, dusfc_cice, dvsfc_cice, dtsfc_cice, & - dqsfc_cice, wet, dry, icy, wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1, dkt_cpl, dkt, errmsg, errflg) + dqsfc_cice, wet, dry, icy, wind, stress_wat, hflx_wat, evap_wat, ugrs1, vgrs1, dkt_cpl, dkt, errmsg, errflg) use machine, only : kind_phys use GFS_PBL_generic_common, only : set_aerosol_tracer_index @@ -307,7 +307,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), dimension(:), intent(in) :: t1, q1, hflx, oceanfrac, fice real(kind=kind_phys), dimension(:,:), intent(in) :: prsl real(kind=kind_phys), dimension(:), intent(in) :: dusfc_cice, dvsfc_cice, dtsfc_cice, dqsfc_cice, & - wind, stress_ocn, hflx_ocn, evap_ocn, ugrs1, vgrs1 + wind, stress_wat, hflx_wat, evap_wat, ugrs1, vgrs1 real(kind=kind_phys), dimension(im, levs, nvdiff), intent(in) :: dvdftra real(kind=kind_phys), dimension(im), intent(in) :: dusfc1, dvsfc1, dtsfc1, dqsfc1, xmu real(kind=kind_phys), dimension(im, levs), intent(in) :: dudt, dvdt, dtdt, htrsw, htrlw @@ -511,15 +511,15 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, tem1 = max(q1(i), 1.e-8) rho = prsl(i,1) / (rd*t1(i)*(one+fvirt*tem1)) if (wind(i) > zero) then - tem = - rho * stress_ocn(i) / wind(i) + tem = - rho * stress_wat(i) / wind(i) dusfci_cpl(i) = tem * ugrs1(i) ! U-momentum flux dvsfci_cpl(i) = tem * vgrs1(i) ! V-momentum flux else dusfci_cpl(i) = zero dvsfci_cpl(i) = zero endif - dtsfci_cpl(i) = cp * rho * hflx_ocn(i) ! sensible heat flux over open ocean - dqsfci_cpl(i) = hvap * rho * evap_ocn(i) ! latent heat flux over open ocean + dtsfci_cpl(i) = cp * rho * hflx_wat(i) ! sensible heat flux over open ocean + dqsfci_cpl(i) = hvap * rho * evap_wat(i) ! latent heat flux over open ocean else ! use results from PBL scheme for 100% open ocean dusfci_cpl(i) = dusfc1(i) dvsfci_cpl(i) = dvsfc1(i) diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 5f4362103..1f71de460 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -1157,7 +1157,7 @@ kind = kind_phys intent = in optional = F -[stress_ocn] +[stress_wat] standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 @@ -1166,7 +1166,7 @@ kind = kind_phys intent = in optional = F -[hflx_ocn] +[hflx_wat] standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 @@ -1175,7 +1175,7 @@ kind = kind_phys intent = in optional = F -[evap_ocn] +[evap_wat] standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 935dd9430..2f14f0fec 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -160,7 +160,7 @@ end subroutine GFS_suite_interstitial_2_finalize subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplflx, flag_cice, shal_cnv, old_monin, mstrat, & do_shoc, frac_grid, imfshalcnv, dtf, xcosz, adjsfcdsw, adjsfcdlw, cice, pgr, ulwsfc_cice, lwhd, htrsw, htrlw, xmu, ctei_rm, & work1, work2, prsi, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, cp, hvap, prslk, suntim, adjsfculw, adjsfculw_lnd, & - adjsfculw_ice, adjsfculw_ocn, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & + adjsfculw_ice, adjsfculw_wat, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & ctei_rml, ctei_r, kinver, dry, icy, wet, frland, huge, errmsg, errflg) implicit none @@ -181,7 +181,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl integer, intent(inout), dimension(im) :: kinver real(kind=kind_phys), intent(inout), dimension(im) :: suntim, dlwsfc, ulwsfc, psmean, ctei_rml, ctei_r - real(kind=kind_phys), intent(in ), dimension(im) :: adjsfculw_lnd, adjsfculw_ice, adjsfculw_ocn + real(kind=kind_phys), intent(in ), dimension(im) :: adjsfculw_lnd, adjsfculw_ice, adjsfculw_wat real(kind=kind_phys), intent( out), dimension(im) :: adjsfculw ! These arrays are only allocated if ldiag3d is .true. @@ -232,11 +232,11 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl if (flag_cice(i)) then adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & + ulwsfc_cice(i) * tem & - + adjsfculw_ocn(i) * (one - frland(i) - tem) + + adjsfculw_wat(i) * (one - frland(i) - tem) else adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & + adjsfculw_ice(i) * tem & - + adjsfculw_ocn(i) * (one - frland(i) - tem) + + adjsfculw_wat(i) * (one - frland(i) - tem) endif enddo else @@ -246,20 +246,20 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl elseif (icy(i)) then ! ice (and water) tem = one - cice(i) if (flag_cice(i)) then - if (wet(i) .and. adjsfculw_ocn(i) /= huge) then - adjsfculw(i) = ulwsfc_cice(i)*cice(i) + adjsfculw_ocn(i)*tem + if (wet(i) .and. adjsfculw_wat(i) /= huge) then + adjsfculw(i) = ulwsfc_cice(i)*cice(i) + adjsfculw_wat(i)*tem else adjsfculw(i) = ulwsfc_cice(i) endif else - if (wet(i) .and. adjsfculw_ocn(i) /= huge) then - adjsfculw(i) = adjsfculw_ice(i)*cice(i) + adjsfculw_ocn(i)*tem + if (wet(i) .and. adjsfculw_wat(i) /= huge) then + adjsfculw(i) = adjsfculw_ice(i)*cice(i) + adjsfculw_wat(i)*tem else adjsfculw(i) = adjsfculw_ice(i) endif endif else ! all water - adjsfculw(i) = adjsfculw_ocn(i) + adjsfculw(i) = adjsfculw_wat(i) endif enddo endif diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 5c206ef30..08f8b2af0 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -604,7 +604,7 @@ kind = kind_phys intent = in optional = F -[adjsfculw_ocn] +[adjsfculw_wat] standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) units = W m-2 diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 7cd552e69..c0057e8b7 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -26,12 +26,12 @@ end subroutine GFS_surface_composites_pre_finalize !! subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cplwav2atm, & landfrac, lakefrac, oceanfrac, & - frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorl_ocn, & - zorl_lnd, zorl_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, & - tprcp_lnd, tprcp_ice, uustar, uustar_lnd, uustar_ice, weasd, weasd_ocn, & - weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, & - tsfc_ice, tisfc, tice, tsurf, tsurf_ocn, tsurf_lnd, tsurf_ice, gflx_ice, & - tgice, islmsk, semis_rad, semis_ocn, semis_lnd, semis_ice, & + frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorl_wat, & + zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & + tprcp_lnd, tprcp_ice, uustar, uustar_lnd, uustar_ice, weasd, weasd_wat, & + weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, tsfc_lnd, & + tsfc_ice, tisfc, tice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, gflx_ice, & + tgice, islmsk, semis_rad, semis_wat, semis_lnd, semis_ice, & min_lakeice, min_seaice, errmsg, errflg) implicit none @@ -48,14 +48,14 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, tsfc, tsfco, tsfcl, tisfc, tsurf - real(kind=kind_phys), dimension(im), intent(inout) :: snowd_ocn, snowd_lnd, snowd_ice, tprcp_ocn, & - tprcp_lnd, tprcp_ice, zorl_ocn, zorl_lnd, zorl_ice, tsfc_ocn, tsfc_lnd, tsfc_ice, tsurf_ocn, & - tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_ocn, weasd_lnd, weasd_ice, ep1d_ice, gflx_ice + real(kind=kind_phys), dimension(im), intent(inout) :: snowd_wat, snowd_lnd, snowd_ice, tprcp_wat, & + tprcp_lnd, tprcp_ice, zorl_wat, zorl_lnd, zorl_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat, & + tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, gflx_ice real(kind=kind_phys), dimension(im), intent( out) :: tice real(kind=kind_phys), intent(in ) :: tgice integer, dimension(im), intent(in ) :: islmsk real(kind=kind_phys), dimension(im), intent(in ) :: semis_rad - real(kind=kind_phys), dimension(im), intent(inout) :: semis_ocn, semis_lnd, semis_ice + real(kind=kind_phys), dimension(im), intent(inout) :: semis_wat, semis_lnd, semis_ice real(kind=kind_phys), intent(in ) :: min_lakeice, min_seaice ! CCPP error handling @@ -138,18 +138,18 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl endif do i=1,im - tprcp_ocn(i) = tprcp(i) + tprcp_wat(i) = tprcp(i) tprcp_lnd(i) = tprcp(i) tprcp_ice(i) = tprcp(i) if (wet(i)) then ! Water - zorl_ocn(i) = zorlo(i) - tsfc_ocn(i) = tsfco(i) - tsurf_ocn(i) = tsfco(i) -! weasd_ocn(i) = weasd(i) -! snowd_ocn(i) = snowd(i) - weasd_ocn(i) = zero - snowd_ocn(i) = zero - semis_ocn(i) = 0.984d0 + zorl_wat(i) = zorlo(i) + tsfc_wat(i) = tsfco(i) + tsurf_wat(i) = tsfco(i) +! weasd_wat(i) = weasd(i) +! snowd_wat(i) = snowd(i) + weasd_wat(i) = zero + snowd_wat(i) = zero + semis_wat(i) = 0.984d0 endif if (dry(i)) then ! Land uustar_lnd(i) = uustar(i) @@ -204,8 +204,8 @@ end subroutine GFS_surface_composites_inter_finalize !> \section arg_table_GFS_surface_composites_inter_run Argument Table !! \htmlinclude GFS_surface_composites_inter_run.html !! - subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_ocn, semis_lnd, semis_ice, adjsfcdlw, & - gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_ocn, & + subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis_lnd, semis_ice, adjsfcdlw, & + gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat, & adjsfcusw, adjsfcdsw, adjsfcnsw, errmsg, errflg) implicit none @@ -213,9 +213,9 @@ subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_ocn, semis ! Interface variables integer, intent(in ) :: im logical, dimension(im), intent(in ) :: dry, icy, wet - real(kind=kind_phys), dimension(im), intent(in ) :: semis_ocn, semis_lnd, semis_ice, adjsfcdlw, & + real(kind=kind_phys), dimension(im), intent(in ) :: semis_wat, semis_lnd, semis_ice, adjsfcdlw, & adjsfcdsw, adjsfcnsw - real(kind=kind_phys), dimension(im), intent(inout) :: gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_ocn + real(kind=kind_phys), dimension(im), intent(inout) :: gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat real(kind=kind_phys), dimension(im), intent(out) :: adjsfcusw ! CCPP error handling @@ -250,7 +250,7 @@ subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_ocn, semis do i=1,im if (dry(i)) gabsbdlw_lnd(i) = semis_lnd(i) * adjsfcdlw(i) if (icy(i)) gabsbdlw_ice(i) = semis_ice(i) * adjsfcdlw(i) - if (wet(i)) gabsbdlw_ocn(i) = semis_ocn(i) * adjsfcdlw(i) + if (wet(i)) gabsbdlw_wat(i) = semis_wat(i) * adjsfcdlw(i) adjsfcusw(i) = adjsfcdsw(i) - adjsfcnsw(i) enddo @@ -286,14 +286,14 @@ end subroutine GFS_surface_composites_post_finalize #endif subroutine GFS_surface_composites_post_run ( & im, cplflx, cplwav2atm, frac_grid, flag_cice, islmsk, dry, wet, icy, landfrac, lakefrac, oceanfrac, & - zorl, zorlo, zorll, zorl_ocn, zorl_lnd, zorl_ice, & - cd, cd_ocn, cd_lnd, cd_ice, cdq, cdq_ocn, cdq_lnd, cdq_ice, rb, rb_ocn, rb_lnd, rb_ice, stress, stress_ocn, stress_lnd, & - stress_ice, ffmm, ffmm_ocn, ffmm_lnd, ffmm_ice, ffhh, ffhh_ocn, ffhh_lnd, ffhh_ice, uustar, uustar_ocn, uustar_lnd, & - uustar_ice, fm10, fm10_ocn, fm10_lnd, fm10_ice, fh2, fh2_ocn, fh2_lnd, fh2_ice, tsurf, tsurf_ocn, tsurf_lnd, tsurf_ice, & - cmm, cmm_ocn, cmm_lnd, cmm_ice, chh, chh_ocn, chh_lnd, chh_ice, gflx, gflx_ocn, gflx_lnd, gflx_ice, ep1d, ep1d_ocn, & - ep1d_lnd, ep1d_ice, weasd, weasd_ocn, weasd_lnd, weasd_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, & - tprcp_lnd, tprcp_ice, evap, evap_ocn, evap_lnd, evap_ice, hflx, hflx_ocn, hflx_lnd, hflx_ice, qss, qss_ocn, qss_lnd, & - qss_ice, tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, errmsg, errflg) + zorl, zorlo, zorll, zorl_wat, zorl_lnd, zorl_ice, & + cd, cd_wat, cd_lnd, cd_ice, cdq, cdq_wat, cdq_lnd, cdq_ice, rb, rb_wat, rb_lnd, rb_ice, stress, stress_wat, stress_lnd, & + stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, & + uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & + cmm, cmm_wat, cmm_lnd, cmm_ice, chh, chh_wat, chh_lnd, chh_ice, gflx, gflx_wat, gflx_lnd, gflx_ice, ep1d, ep1d_wat, & + ep1d_lnd, ep1d_ice, weasd, weasd_wat, weasd_lnd, weasd_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & + tprcp_lnd, tprcp_ice, evap, evap_wat, evap_lnd, evap_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, qss, qss_wat, qss_lnd, & + qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, errmsg, errflg) implicit none @@ -302,12 +302,12 @@ subroutine GFS_surface_composites_post_run ( logical, dimension(im), intent(in) :: flag_cice, dry, wet, icy integer, dimension(im), intent(in) :: islmsk real(kind=kind_phys), dimension(im), intent(in) :: landfrac, lakefrac, oceanfrac, & - zorl_ocn, zorl_lnd, zorl_ice, cd_ocn, cd_lnd, cd_ice, cdq_ocn, cdq_lnd, cdq_ice, rb_ocn, rb_lnd, rb_ice, stress_ocn, & - stress_lnd, stress_ice, ffmm_ocn, ffmm_lnd, ffmm_ice, ffhh_ocn, ffhh_lnd, ffhh_ice, uustar_ocn, uustar_lnd, uustar_ice, & - fm10_ocn, fm10_lnd, fm10_ice, fh2_ocn, fh2_lnd, fh2_ice, tsurf_ocn, tsurf_lnd, tsurf_ice, cmm_ocn, cmm_lnd, cmm_ice, & - chh_ocn, chh_lnd, chh_ice, gflx_ocn, gflx_lnd, gflx_ice, ep1d_ocn, ep1d_lnd, ep1d_ice, weasd_ocn, weasd_lnd, weasd_ice, & - snowd_ocn, snowd_lnd, snowd_ice,tprcp_ocn, tprcp_lnd, tprcp_ice, evap_ocn, evap_lnd, evap_ice, hflx_ocn, hflx_lnd, & - hflx_ice, qss_ocn, qss_lnd, qss_ice, tsfc_ocn, tsfc_lnd, tsfc_ice + zorl_wat, zorl_lnd, zorl_ice, cd_wat, cd_lnd, cd_ice, cdq_wat, cdq_lnd, cdq_ice, rb_wat, rb_lnd, rb_ice, stress_wat, & + stress_lnd, stress_ice, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh_wat, ffhh_lnd, ffhh_ice, uustar_wat, uustar_lnd, uustar_ice, & + fm10_wat, fm10_lnd, fm10_ice, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, cmm_wat, cmm_lnd, cmm_ice, & + chh_wat, chh_lnd, chh_ice, gflx_wat, gflx_lnd, gflx_ice, ep1d_wat, ep1d_lnd, ep1d_ice, weasd_wat, weasd_lnd, weasd_ice, & + snowd_wat, snowd_lnd, snowd_ice,tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, & + hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, tsfc_lnd, tsfc_ice real(kind=kind_phys), dimension(im), intent(inout) :: zorl, zorlo, zorll, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & fh2, tsurf, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc @@ -337,27 +337,27 @@ subroutine GFS_surface_composites_post_run ( txi = cice(i)*(one - txl) ! txi = ice fraction wrt whole cell txo = max(zero, one - txl - txi) - zorl(i) = txl*zorl_lnd(i) + txi*zorl_ice(i) + txo*zorl_ocn(i) - cd(i) = txl*cd_lnd(i) + txi*cd_ice(i) + txo*cd_ocn(i) - cdq(i) = txl*cdq_lnd(i) + txi*cdq_ice(i) + txo*cdq_ocn(i) - rb(i) = txl*rb_lnd(i) + txi*rb_ice(i) + txo*rb_ocn(i) - stress(i) = txl*stress_lnd(i) + txi*stress_ice(i) + txo*stress_ocn(i) - ffmm(i) = txl*ffmm_lnd(i) + txi*ffmm_ice(i) + txo*ffmm_ocn(i) - ffhh(i) = txl*ffhh_lnd(i) + txi*ffhh_ice(i) + txo*ffhh_ocn(i) - uustar(i) = txl*uustar_lnd(i) + txi*uustar_ice(i) + txo*uustar_ocn(i) - fm10(i) = txl*fm10_lnd(i) + txi*fm10_ice(i) + txo*fm10_ocn(i) - fh2(i) = txl*fh2_lnd(i) + txi*fh2_ice(i) + txo*fh2_ocn(i) - !tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_ocn(i) - !tsurf(i) = txl*tsurf_lnd(i) + txi*tsurf_ice(i) + txo*tsurf_ocn(i) ! not used again! Moorthi - cmm(i) = txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_ocn(i) - chh(i) = txl*chh_lnd(i) + txi*chh_ice(i) + txo*chh_ocn(i) - !gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_ocn(i) - ep1d(i) = txl*ep1d_lnd(i) + txi*ep1d_ice(i) + txo*ep1d_ocn(i) - !weasd(i) = txl*weasd_lnd(i) + txi*weasd_ice(i) + txo*weasd_ocn(i) - !snowd(i) = txl*snowd_lnd(i) + txi*snowd_ice(i) + txo*snowd_ocn(i) + zorl(i) = txl*zorl_lnd(i) + txi*zorl_ice(i) + txo*zorl_wat(i) + cd(i) = txl*cd_lnd(i) + txi*cd_ice(i) + txo*cd_wat(i) + cdq(i) = txl*cdq_lnd(i) + txi*cdq_ice(i) + txo*cdq_wat(i) + rb(i) = txl*rb_lnd(i) + txi*rb_ice(i) + txo*rb_wat(i) + stress(i) = txl*stress_lnd(i) + txi*stress_ice(i) + txo*stress_wat(i) + ffmm(i) = txl*ffmm_lnd(i) + txi*ffmm_ice(i) + txo*ffmm_wat(i) + ffhh(i) = txl*ffhh_lnd(i) + txi*ffhh_ice(i) + txo*ffhh_wat(i) + uustar(i) = txl*uustar_lnd(i) + txi*uustar_ice(i) + txo*uustar_wat(i) + fm10(i) = txl*fm10_lnd(i) + txi*fm10_ice(i) + txo*fm10_wat(i) + fh2(i) = txl*fh2_lnd(i) + txi*fh2_ice(i) + txo*fh2_wat(i) + !tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_wat(i) + !tsurf(i) = txl*tsurf_lnd(i) + txi*tsurf_ice(i) + txo*tsurf_wat(i) ! not used again! Moorthi + cmm(i) = txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_wat(i) + chh(i) = txl*chh_lnd(i) + txi*chh_ice(i) + txo*chh_wat(i) + !gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_wat(i) + ep1d(i) = txl*ep1d_lnd(i) + txi*ep1d_ice(i) + txo*ep1d_wat(i) + !weasd(i) = txl*weasd_lnd(i) + txi*weasd_ice(i) + txo*weasd_wat(i) + !snowd(i) = txl*snowd_lnd(i) + txi*snowd_ice(i) + txo*snowd_wat(i) weasd(i) = txl*weasd_lnd(i) + txi*weasd_ice(i) snowd(i) = txl*snowd_lnd(i) + txi*snowd_ice(i) - !tprcp(i) = txl*tprcp_lnd(i) + txi*tprcp_ice(i) + txo*tprcp_ocn(i) + !tprcp(i) = txl*tprcp_lnd(i) + txi*tprcp_ice(i) + txo*tprcp_wat(i) if (.not. flag_cice(i) .and. islmsk(i) == 2) then tem = one - txl @@ -366,24 +366,24 @@ subroutine GFS_surface_composites_post_run ( qss(i) = txl*qss_lnd(i) + tem*qss_ice(i) gflx(i) = txl*gflx_lnd(i) + tem*gflx_ice(i) else - evap(i) = txl*evap_lnd(i) + txi*evap_ice(i) + txo*evap_ocn(i) - hflx(i) = txl*hflx_lnd(i) + txi*hflx_ice(i) + txo*hflx_ocn(i) - qss(i) = txl*qss_lnd(i) + txi*qss_ice(i) + txo*qss_ocn(i) - gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_ocn(i) + evap(i) = txl*evap_lnd(i) + txi*evap_ice(i) + txo*evap_wat(i) + hflx(i) = txl*hflx_lnd(i) + txi*hflx_ice(i) + txo*hflx_wat(i) + qss(i) = txl*qss_lnd(i) + txi*qss_ice(i) + txo*qss_wat(i) + gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_wat(i) endif - tsfc(i) = txl*tsfc_lnd(i) + txi*tice(i) + txo*tsfc_ocn(i) + tsfc(i) = txl*tsfc_lnd(i) + txi*tice(i) + txo*tsfc_wat(i) zorll(i) = zorl_lnd(i) - zorlo(i) = zorl_ocn(i) + zorlo(i) = zorl_wat(i) if (dry(i)) tsfcl(i) = tsfc_lnd(i) ! over land - if (wet(i)) tsfco(i) = tsfc_ocn(i) ! over lake or ocean when uncoupled + if (wet(i)) tsfco(i) = tsfc_wat(i) ! over lake or ocean when uncoupled ! for coupled model ocean will replace this ! if (icy(i)) tisfc(i) = tsfc_ice(i) ! over ice when uncoupled ! if (icy(i)) tisfc(i) = tice(i) ! over ice when uncoupled ! if (wet(i) .and. .not. cplflx) then -! tsfco(i) = tsfc_ocn(i) ! over lake or ocean when uncoupled +! tsfco(i) = tsfc_wat(i) ! over lake or ocean when uncoupled ! tisfc(i) = tsfc_ice(i) ! over ice when uncoupled ! endif @@ -429,29 +429,29 @@ subroutine GFS_surface_composites_post_run ( !cice(i) = zero !tisfc(i) = tsfc(i) elseif (islmsk(i) == 0) then - zorl(i) = zorl_ocn(i) - cd(i) = cd_ocn(i) - cdq(i) = cdq_ocn(i) - rb(i) = rb_ocn(i) - stress(i) = stress_ocn(i) - ffmm(i) = ffmm_ocn(i) - ffhh(i) = ffhh_ocn(i) - uustar(i) = uustar_ocn(i) - fm10(i) = fm10_ocn(i) - fh2(i) = fh2_ocn(i) - !tsurf(i) = tsurf_ocn(i) - tsfco(i) = tsfc_ocn(i) ! over lake (and ocean when uncoupled) - cmm(i) = cmm_ocn(i) - chh(i) = chh_ocn(i) - gflx(i) = gflx_ocn(i) - ep1d(i) = ep1d_ocn(i) - weasd(i) = weasd_ocn(i) - snowd(i) = snowd_ocn(i) - !tprcp(i) = tprcp_ocn(i) - evap(i) = evap_ocn(i) - hflx(i) = hflx_ocn(i) - qss(i) = qss_ocn(i) - tsfc(i) = tsfc_ocn(i) + zorl(i) = zorl_wat(i) + cd(i) = cd_wat(i) + cdq(i) = cdq_wat(i) + rb(i) = rb_wat(i) + stress(i) = stress_wat(i) + ffmm(i) = ffmm_wat(i) + ffhh(i) = ffhh_wat(i) + uustar(i) = uustar_wat(i) + fm10(i) = fm10_wat(i) + fh2(i) = fh2_wat(i) + !tsurf(i) = tsurf_wat(i) + tsfco(i) = tsfc_wat(i) ! over lake (and ocean when uncoupled) + cmm(i) = cmm_wat(i) + chh(i) = chh_wat(i) + gflx(i) = gflx_wat(i) + ep1d(i) = ep1d_wat(i) + weasd(i) = weasd_wat(i) + snowd(i) = snowd_wat(i) + !tprcp(i) = tprcp_wat(i) + evap(i) = evap_wat(i) + hflx(i) = hflx_wat(i) + qss(i) = qss_wat(i) + tsfc(i) = tsfc_wat(i) !hice(i) = zero !cice(i) = zero !tisfc(i) = tsfc(i) @@ -460,7 +460,7 @@ subroutine GFS_surface_composites_post_run ( cd(i) = cd_ice(i) cdq(i) = cdq_ice(i) rb(i) = rb_ice(i) - stress(i) = cice(i)*stress_ice(i) + (one-cice(i))*stress_ocn(i) + stress(i) = cice(i)*stress_ice(i) + (one-cice(i))*stress_wat(i) ffmm(i) = ffmm_ice(i) ffhh(i) = ffhh_ice(i) uustar(i) = uustar_ice(i) @@ -476,7 +476,7 @@ subroutine GFS_surface_composites_post_run ( ep1d(i) = ep1d_ice(i) weasd(i) = weasd_ice(i) snowd(i) = snowd_ice(i) - !tprcp(i) = cice(i)*tprcp_ice(i) + (one-cice(i))*tprcp_ocn(i) + !tprcp(i) = cice(i)*tprcp_ice(i) + (one-cice(i))*tprcp_wat(i) qss(i) = qss_ice(i) evap(i) = evap_ice(i) hflx(i) = hflx_ice(i) @@ -485,14 +485,14 @@ subroutine GFS_surface_composites_post_run ( endif zorll(i) = zorl_lnd(i) - zorlo(i) = zorl_ocn(i) + zorlo(i) = zorl_wat(i) if (flag_cice(i) .and. wet(i)) then ! this was already done for lake ice in sfc_sice txi = cice(i) txo = one - txi - evap(i) = txi * evap_ice(i) + txo * evap_ocn(i) - hflx(i) = txi * hflx_ice(i) + txo * hflx_ocn(i) - tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_ocn(i) + evap(i) = txi * evap_ice(i) + txo * evap_wat(i) + hflx(i) = txi * hflx_ice(i) + txo * hflx_wat(i) + tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_wat(i) else if (islmsk(i) == 2) then tisfc(i) = tice(i) diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 832d9227e..b643220df 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -162,7 +162,7 @@ kind = kind_phys intent = inout optional = F -[zorl_ocn] +[zorl_wat] standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) units = cm @@ -198,7 +198,7 @@ kind = kind_phys intent = in optional = F -[snowd_ocn] +[snowd_wat] standard_name = surface_snow_thickness_water_equivalent_over_ocean long_name = water equivalent snow depth over ocean units = mm @@ -234,7 +234,7 @@ kind = kind_phys intent = in optional = F -[tprcp_ocn] +[tprcp_wat] standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean long_name = total precipitation amount in each time step over ocean units = m @@ -297,7 +297,7 @@ kind = kind_phys intent = in optional = F -[weasd_ocn] +[weasd_wat] standard_name = water_equivalent_accumulated_snow_depth_over_ocean long_name = water equiv of acc snow depth over ocean units = mm @@ -360,7 +360,7 @@ kind = kind_phys intent = inout optional = F -[tsfc_ocn] +[tsfc_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K @@ -414,7 +414,7 @@ kind = kind_phys intent = inout optional = F -[tsurf_ocn] +[tsurf_wat] standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K @@ -476,7 +476,7 @@ kind = kind_phys intent = in optional = F -[semis_ocn] +[semis_wat] standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac @@ -575,7 +575,7 @@ type = logical intent = in optional = F -[semis_ocn] +[semis_wat] standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac @@ -629,7 +629,7 @@ kind = kind_phys intent = inout optional = F -[gabsbdlw_ocn] +[gabsbdlw_wat] standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean long_name = total sky surface downward longwave flux absorbed by the ground over ocean units = W m-2 @@ -813,7 +813,7 @@ kind = kind_phys intent = inout optional = F -[zorl_ocn] +[zorl_wat] standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) units = cm @@ -849,7 +849,7 @@ kind = kind_phys intent = inout optional = F -[cd_ocn] +[cd_wat] standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none @@ -885,7 +885,7 @@ kind = kind_phys intent = inout optional = F -[cdq_ocn] +[cdq_wat] standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none @@ -921,7 +921,7 @@ kind = kind_phys intent = inout optional = F -[rb_ocn] +[rb_wat] standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean long_name = bulk Richardson number at the surface over ocean units = none @@ -957,7 +957,7 @@ kind = kind_phys intent = inout optional = F -[stress_ocn] +[stress_wat] standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 @@ -993,7 +993,7 @@ kind = kind_phys intent = inout optional = F -[ffmm_ocn] +[ffmm_wat] standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity function for momentum over ocean units = none @@ -1029,7 +1029,7 @@ kind = kind_phys intent = inout optional = F -[ffhh_ocn] +[ffhh_wat] standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean long_name = Monin-Obukhov similarity function for heat over ocean units = none @@ -1065,7 +1065,7 @@ kind = kind_phys intent = inout optional = F -[uustar_ocn] +[uustar_wat] standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 @@ -1101,7 +1101,7 @@ kind = kind_phys intent = inout optional = F -[fm10_ocn] +[fm10_wat] standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean units = none @@ -1137,7 +1137,7 @@ kind = kind_phys intent = inout optional = F -[fh2_ocn] +[fh2_wat] standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean units = none @@ -1173,7 +1173,7 @@ kind = kind_phys intent = inout optional = F -[tsurf_ocn] +[tsurf_wat] standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K @@ -1209,7 +1209,7 @@ kind = kind_phys intent = inout optional = F -[cmm_ocn] +[cmm_wat] standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 @@ -1245,7 +1245,7 @@ kind = kind_phys intent = inout optional = F -[chh_ocn] +[chh_wat] standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 @@ -1281,7 +1281,7 @@ kind = kind_phys intent = inout optional = F -[gflx_ocn] +[gflx_wat] standard_name = upward_heat_flux_in_soil_over_ocean long_name = soil heat flux over ocean units = W m-2 @@ -1317,7 +1317,7 @@ kind = kind_phys intent = inout optional = F -[ep1d_ocn] +[ep1d_wat] standard_name = surface_upward_potential_latent_heat_flux_over_ocean long_name = surface upward potential latent heat flux over ocean units = W m-2 @@ -1353,7 +1353,7 @@ kind = kind_phys intent = inout optional = F -[weasd_ocn] +[weasd_wat] standard_name = water_equivalent_accumulated_snow_depth_over_ocean long_name = water equiv of acc snow depth over ocean units = mm @@ -1389,7 +1389,7 @@ kind = kind_phys intent = inout optional = F -[snowd_ocn] +[snowd_wat] standard_name = surface_snow_thickness_water_equivalent_over_ocean long_name = water equivalent snow depth over ocean units = mm @@ -1425,7 +1425,7 @@ kind = kind_phys intent = inout optional = F -[tprcp_ocn] +[tprcp_wat] standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean long_name = total precipitation amount in each time step over ocean units = m @@ -1461,7 +1461,7 @@ kind = kind_phys intent = inout optional = F -[evap_ocn] +[evap_wat] standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 @@ -1497,7 +1497,7 @@ kind = kind_phys intent = inout optional = F -[hflx_ocn] +[hflx_wat] standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 @@ -1533,7 +1533,7 @@ kind = kind_phys intent = inout optional = F -[qss_ocn] +[qss_wat] standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 @@ -1587,7 +1587,7 @@ kind = kind_phys intent = inout optional = F -[tsfc_ocn] +[tsfc_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index ac366ae54..fbfb5b4da 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -215,8 +215,8 @@ end subroutine GFS_surface_generic_post_finalize !! \htmlinclude GFS_surface_generic_post_run.html !! subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dtf, ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1,& - adjsfcdlw, adjsfcdsw, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_ocn, adjnirbmu, adjnirdfu, & - adjvisbmu, adjvisdfu,t2m, q2m, u10m, v10m, tsfc, tsfc_ocn, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, & + adjsfcdlw, adjsfcdsw, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_wat, adjnirbmu, adjnirdfu, & + adjvisbmu, adjvisdfu,t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, & epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, & dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, & v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, & @@ -231,8 +231,8 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), dimension(im), intent(in) :: ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, adjsfcdlw, adjsfcdsw, & - adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_ocn, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & - t2m, q2m, u10m, v10m, tsfc, tsfc_ocn, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf + adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_wat, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & + t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf real(kind=kind_phys), dimension(im), intent(inout) :: epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, & dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, & @@ -287,13 +287,13 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt dvisdf_cpl (i) = dvisdf_cpl(i) + adjvisdfd(i)*dtf nlwsfci_cpl (i) = adjsfcdlw(i) - adjsfculw(i) if (wet(i)) then - nlwsfci_cpl(i) = adjsfcdlw(i) - adjsfculw_ocn(i) + nlwsfci_cpl(i) = adjsfcdlw(i) - adjsfculw_wat(i) endif nlwsfc_cpl (i) = nlwsfc_cpl(i) + nlwsfci_cpl(i)*dtf t2mi_cpl (i) = t2m(i) q2mi_cpl (i) = q2m(i) tsfci_cpl (i) = tsfc(i) -! tsfci_cpl (i) = tsfc_ocn(i) +! tsfci_cpl (i) = tsfc_wat(i) psurfi_cpl (i) = pgr(i) enddo diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index 250f7a2bd..01e427b2e 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -669,7 +669,7 @@ kind = kind_phys intent = in optional = F -[adjsfculw_ocn] +[adjsfculw_wat] standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) units = W m-2 @@ -759,7 +759,7 @@ kind = kind_phys intent = in optional = F -[tsfc_ocn] +[tsfc_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K diff --git a/physics/dcyc2.f b/physics/dcyc2.f index c7a1ddd59..7f052cbf3 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -47,8 +47,8 @@ end subroutine dcyc2t3_finalize ! call dcyc2t3 ! ! inputs: ! ! ( solhr,slag,sdec,cdec,sinlat,coslat, ! -! xlon,coszen,tsfc_lnd,tsfc_ice,tsfc_ocn, ! -! tf,tsflw,sfcemis_lnd,sfcemis_ice,sfcemis_ocn, ! +! xlon,coszen,tsfc_lnd,tsfc_ice,tsfc_wat, ! +! tf,tsflw,sfcemis_lnd,sfcemis_ice,sfcemis_wat, ! ! sfcdsw,sfcnsw,sfcdlw,swh,swhc,hlw,hlwc, ! ! sfcnirbmu,sfcnirdfu,sfcvisbmu,sfcvisdfu, ! ! sfcnirbmd,sfcnirdfd,sfcvisbmd,sfcvisdfd, ! @@ -58,7 +58,7 @@ end subroutine dcyc2t3_finalize ! dtdt,dtdtc, ! ! outputs: ! ! adjsfcdsw,adjsfcnsw,adjsfcdlw, ! -! adjsfculw_lnd,adjsfculw_ice,adjsfculw_ocn,xmu,xcosz, ! +! adjsfculw_lnd,adjsfculw_ice,adjsfculw_wat,xmu,xcosz, ! ! adjnirbmu,adjnirdfu,adjvisbmu,adjvisdfu, ! ! adjdnnbmd,adjdnndfd,adjdnvbmd,adjdnvdfd) ! ! ! @@ -74,11 +74,11 @@ end subroutine dcyc2t3_finalize ! coszen (im) - real, avg of cosz over daytime sw call interval ! ! tsfc_lnd (im) - real, bottom surface temperature over land (k) ! ! tsfc_ice (im) - real, bottom surface temperature over ice (k) ! -! tsfc_ocn (im) - real, bottom surface temperature over ocean (k) ! +! tsfc_wat (im) - real, bottom surface temperature over ocean (k) ! ! tf (im) - real, surface air (layer 1) temperature (k) ! ! sfcemis_lnd(im) - real, surface emissivity (fraction) o. land (k) ! ! sfcemis_ice(im) - real, surface emissivity (fraction) o. ice (k) ! -! sfcemis_ocn(im) - real, surface emissivity (fraction) o. ocean (k)! +! sfcemis_wat(im) - real, surface emissivity (fraction) o. ocean (k)! ! tsflw (im) - real, sfc air (layer 1) temp in k saved in lw call ! ! sfcdsw (im) - real, total sky sfc downward sw flux ( w/m**2 ) ! ! sfcnsw (im) - real, total sky sfc net sw into ground (w/m**2) ! @@ -115,7 +115,7 @@ end subroutine dcyc2t3_finalize ! adjsfcdlw(im)- real, time step adjusted sfc dn lw flux (w/m**2) ! ! adjsfculw_lnd(im)- real, sfc upw. lw flux at current time (w/m**2)! ! adjsfculw_ice(im)- real, sfc upw. lw flux at current time (w/m**2)! -! adjsfculw_ocn(im)- real, sfc upw. lw flux at current time (w/m**2)! +! adjsfculw_wat(im)- real, sfc upw. lw flux at current time (w/m**2)! ! adjnirbmu(im)- real, t adj sfc nir-beam sw upward flux (w/m2) ! ! adjnirdfu(im)- real, t adj sfc nir-diff sw upward flux (w/m2) ! ! adjvisbmu(im)- real, t adj sfc uv+vis-beam sw upward flux (w/m2) ! @@ -179,8 +179,8 @@ end subroutine dcyc2t3_finalize subroutine dcyc2t3_run & ! --- inputs: & ( solhr,slag,sdec,cdec,sinlat,coslat, & - & xlon,coszen,tsfc_lnd,tsfc_ice,tsfc_ocn,tf,tsflw, & - & sfcemis_lnd, sfcemis_ice, sfcemis_ocn, & + & xlon,coszen,tsfc_lnd,tsfc_ice,tsfc_wat,tf,tsflw, & + & sfcemis_lnd, sfcemis_ice, sfcemis_wat, & & sfcdsw,sfcnsw,sfcdlw,swh,swhc,hlw,hlwc, & & sfcnirbmu,sfcnirdfu,sfcvisbmu,sfcvisdfu, & & sfcnirbmd,sfcnirdfd,sfcvisbmd,sfcvisdfd, & @@ -191,7 +191,7 @@ subroutine dcyc2t3_run & & dtdt,dtdtc, & ! --- outputs: & adjsfcdsw,adjsfcnsw,adjsfcdlw, & - & adjsfculw_lnd,adjsfculw_ice,adjsfculw_ocn,xmu,xcosz, & + & adjsfculw_lnd,adjsfculw_ice,adjsfculw_wat,xmu,xcosz, & & adjnirbmu,adjnirdfu,adjvisbmu,adjvisdfu, & & adjnirbmd,adjnirdfd,adjvisbmd,adjvisdfd, & & errmsg,errflg & @@ -225,8 +225,8 @@ subroutine dcyc2t3_run & & sfcdsw, sfcnsw real(kind=kind_phys), dimension(im), intent(in) :: & - & tsfc_lnd, tsfc_ice, tsfc_ocn, & - & sfcemis_lnd, sfcemis_ice, sfcemis_ocn + & tsfc_lnd, tsfc_ice, tsfc_wat, & + & sfcemis_lnd, sfcemis_ice, sfcemis_wat real(kind=kind_phys), dimension(im), intent(in) :: & & sfcnirbmu, sfcnirdfu, sfcvisbmu, sfcvisdfu, & @@ -246,7 +246,7 @@ subroutine dcyc2t3_run & & adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd real(kind=kind_phys), dimension(im), intent(out) :: & - & adjsfculw_lnd, adjsfculw_ice, adjsfculw_ocn + & adjsfculw_lnd, adjsfculw_ice, adjsfculw_wat character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -321,9 +321,9 @@ subroutine dcyc2t3_run & & + (one - sfcemis_ice(i)) * adjsfcdlw(i) endif if (wet(i)) then - tem2 = tsfc_ocn(i) * tsfc_ocn(i) - adjsfculw_ocn(i) = sfcemis_ocn(i) * con_sbc * tem2 * tem2 - & + (one - sfcemis_ocn(i)) * adjsfcdlw(i) + tem2 = tsfc_wat(i) * tsfc_wat(i) + adjsfculw_wat(i) = sfcemis_wat(i) * con_sbc * tem2 * tem2 + & + (one - sfcemis_wat(i)) * adjsfcdlw(i) endif ! if (lprnt .and. i == ipr) write(0,*)' in dcyc3: dry==',dry(i) ! &,' wet=',wet(i),' icy=',icy(i),' tsfc3=',tsfc3(i,:) diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 244ebc6bd..352c8386a 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -92,7 +92,7 @@ kind = kind_phys intent = in optional = F -[tsfc_ocn] +[tsfc_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K @@ -146,7 +146,7 @@ kind = kind_phys intent = in optional = F -[sfcemis_ocn] +[sfcemis_wat] standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac @@ -419,7 +419,7 @@ kind = kind_phys intent = out optional = F -[adjsfculw_ocn] +[adjsfculw_wat] standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) units = W m-2 diff --git a/physics/module_MYJSFC_wrapper.F90 b/physics/module_MYJSFC_wrapper.F90 index 1406a99be..8a093cddf 100644 --- a/physics/module_MYJSFC_wrapper.F90 +++ b/physics/module_MYJSFC_wrapper.F90 @@ -37,16 +37,16 @@ SUBROUTINE myjsfc_wrapper_run( & & pblh, slmsk, zorl, ustar, rib, & & cm,ch,stress,ffm,ffh,fm10,fh2, & & landfrac,lakefrac,oceanfrac,fice, & - & z0rl_ocn, z0rl_lnd, z0rl_ice, & ! intent(inout) - & ustar_ocn, ustar_lnd, ustar_ice, & ! intent(inout) - & cm_ocn, cm_lnd, cm_ice, & ! intent(inout) - & ch_ocn, ch_lnd, ch_ice, & ! intent(inout) - & rb_ocn, rb_lnd, rb_ice, & ! intent(inout) - & stress_ocn,stress_lnd,stress_ice, & ! intent(inout) - & fm_ocn, fm_lnd, fm_ice, & ! intent(inout) - & fh_ocn, fh_lnd, fh_ice, & ! intent(inout) - & fm10_ocn, fm10_lnd, fm10_ice, & ! intent(inout) - & fh2_ocn, fh2_lnd, fh2_ice, & ! intent(inout) + & z0rl_wat, z0rl_lnd, z0rl_ice, & ! intent(inout) + & ustar_wat, ustar_lnd, ustar_ice, & ! intent(inout) + & cm_wat, cm_lnd, cm_ice, & ! intent(inout) + & ch_wat, ch_lnd, ch_ice, & ! intent(inout) + & rb_wat, rb_lnd, rb_ice, & ! intent(inout) + & stress_wat,stress_lnd,stress_ice, & ! intent(inout) + & fm_wat, fm_lnd, fm_ice, & ! intent(inout) + & fh_wat, fh_lnd, fh_ice, & ! intent(inout) + & fm10_wat, fm10_lnd, fm10_ice, & ! intent(inout) + & fh2_wat, fh2_lnd, fh2_ice, & ! intent(inout) & wind, con_cp, con_g, con_rd, & & me, lprnt, errmsg, errflg ) ! intent(inout) ! @@ -107,16 +107,16 @@ SUBROUTINE myjsfc_wrapper_run( & real(kind=kind_phys), dimension(im), intent(inout) :: & & landfrac, lakefrac, oceanfrac, fice real(kind=kind_phys), dimension(im), intent(inout) :: & - & z0rl_ocn, z0rl_lnd, z0rl_ice, & - & ustar_ocn, ustar_lnd, ustar_ice, & - & cm_ocn, cm_lnd, cm_ice, & - & ch_ocn, ch_lnd, ch_ice, & - & rb_ocn, rb_lnd, rb_ice, & - & stress_ocn,stress_lnd,stress_ice, & - & fm_ocn, fm_lnd, fm_ice, & - & fh_ocn, fh_lnd, fh_ice, & - & fm10_ocn, fm10_lnd, fm10_ice, & - & fh2_ocn, fh2_lnd, fh2_ice, & + & z0rl_wat, z0rl_lnd, z0rl_ice, & + & ustar_wat, ustar_lnd, ustar_ice, & + & cm_wat, cm_lnd, cm_ice, & + & ch_wat, ch_lnd, ch_ice, & + & rb_wat, rb_lnd, rb_ice, & + & stress_wat,stress_lnd,stress_ice, & + & fm_wat, fm_lnd, fm_ice, & + & fh_wat, fh_lnd, fh_ice, & + & fm10_wat, fm10_lnd, fm10_ice, & + & fh2_wat, fh2_lnd, fh2_ice, & & wind @@ -404,16 +404,16 @@ SUBROUTINE myjsfc_wrapper_run( & do i = 1, im if(flag_iter(i))then - z0rl_ocn(i) = zorl(i) - cm_ocn(i) = cm(i) - ch_ocn(i) = ch(i) - rb_ocn(i) = rib(i) - stress_ocn(i) = stress(i) - fm_ocn(i) = ffm(i) - fh_ocn(i) = ffh(i) - ustar_ocn(i) = ustar(i) - fm10_ocn(i) = fm10(i) - fh2_ocn(i) = fh2(i) + z0rl_wat(i) = zorl(i) + cm_wat(i) = cm(i) + ch_wat(i) = ch(i) + rb_wat(i) = rib(i) + stress_wat(i) = stress(i) + fm_wat(i) = ffm(i) + fh_wat(i) = ffh(i) + ustar_wat(i) = ustar(i) + fm10_wat(i) = fm10(i) + fh2_wat(i) = fh2(i) z0rl_lnd(i) = zorl(i) cm_lnd(i) = cm(i) diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index 8100d0b05..67294e6fc 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -473,7 +473,7 @@ kind = kind_phys intent = in optional = F -[z0rl_ocn] +[z0rl_wat] standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (interstitial) units = cm @@ -500,7 +500,7 @@ kind = kind_phys intent = inout optional = F -[ustar_ocn] +[ustar_wat] standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 @@ -527,7 +527,7 @@ kind = kind_phys intent = inout optional = F -[cm_ocn] +[cm_wat] standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none @@ -554,7 +554,7 @@ kind = kind_phys intent = inout optional = F -[ch_ocn] +[ch_wat] standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none @@ -581,7 +581,7 @@ kind = kind_phys intent = inout optional = F -[rb_ocn] +[rb_wat] standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean long_name = bulk Richardson number at the surface over ocean units = none @@ -608,7 +608,7 @@ kind = kind_phys intent = inout optional = F -[stress_ocn] +[stress_wat] standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 @@ -635,7 +635,7 @@ kind = kind_phys intent = inout optional = F -[fm_ocn] +[fm_wat] standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity funct for momentum over ocean units = none @@ -662,7 +662,7 @@ kind = kind_phys intent = inout optional = F -[fh_ocn] +[fh_wat] standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean long_name = Monin-Obukhov similarity function for heat over ocean units = none @@ -689,7 +689,7 @@ kind = kind_phys intent = inout optional = F -[fm10_ocn] +[fm10_wat] standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean long_name = Monin-Obukhov parameter for momentum at 10m over ocean units = none @@ -716,7 +716,7 @@ kind = kind_phys intent = inout optional = F -[fh2_ocn] +[fh2_wat] standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean long_name = Monin-Obukhov parameter for heat at 2m over ocean units = none diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 60d5ceeea..38d84f94d 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -68,19 +68,19 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) & flag_iter,redrag, & !intent(in) & u10m,v10m,sfc_z0_type, & !hafs,z0 type !intent(in) & wet,dry,icy, & !intent(in) - & tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) - & tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) - & snwdph_ocn,snwdph_lnd,snwdph_ice, & !intent(in) - & z0rl_ocn, z0rl_lnd, z0rl_ice, & !intent(inout) - & ustar_ocn, ustar_lnd, ustar_ice, & !intent(inout) - & cm_ocn, cm_lnd, cm_ice, & !intent(inout) - & ch_ocn, ch_lnd, ch_ice, & !intent(inout) - & rb_ocn, rb_lnd, rb_ice, & !intent(inout) - & stress_ocn,stress_lnd,stress_ice, & !intent(inout) - & fm_ocn, fm_lnd, fm_ice, & !intent(inout) - & fh_ocn, fh_lnd, fh_ice, & !intent(inout) - & fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) - & fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) + & tskin_wat, tskin_lnd, tskin_ice, & !intent(in) + & tsurf_wat, tsurf_lnd, tsurf_ice, & !intent(in) + & snwdph_wat,snwdph_lnd,snwdph_ice, & !intent(in) + & z0rl_wat, z0rl_lnd, z0rl_ice, & !intent(inout) + & ustar_wat, ustar_lnd, ustar_ice, & !intent(inout) + & cm_wat, cm_lnd, cm_ice, & !intent(inout) + & ch_wat, ch_lnd, ch_ice, & !intent(inout) + & rb_wat, rb_lnd, rb_ice, & !intent(inout) + & stress_wat,stress_lnd,stress_ice, & !intent(inout) + & fm_wat, fm_lnd, fm_ice, & !intent(inout) + & fh_wat, fh_lnd, fh_ice, & !intent(inout) + & fm10_wat, fm10_lnd, fm10_ice, & !intent(inout) + & fh2_wat, fh2_lnd, fh2_ice, & !intent(inout) & errmsg, errflg) !intent(out) ! implicit none @@ -100,21 +100,21 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) & wind,sigmaf,shdmax, & & z0pert,ztpert ! mg, sfc-perts real(kind=kind_phys), dimension(im), intent(in) :: & - & tskin_ocn, tskin_lnd, tskin_ice, & - & tsurf_ocn, tsurf_lnd, tsurf_ice, & - & snwdph_ocn,snwdph_lnd,snwdph_ice + & tskin_wat, tskin_lnd, tskin_ice, & + & tsurf_wat, tsurf_lnd, tsurf_ice, & + & snwdph_wat,snwdph_lnd,snwdph_ice real(kind=kind_phys), dimension(im), intent(inout) :: & - & z0rl_ocn, z0rl_lnd, z0rl_ice, & - & ustar_ocn, ustar_lnd, ustar_ice, & - & cm_ocn, cm_lnd, cm_ice, & - & ch_ocn, ch_lnd, ch_ice, & - & rb_ocn, rb_lnd, rb_ice, & - & stress_ocn,stress_lnd,stress_ice, & - & fm_ocn, fm_lnd, fm_ice, & - & fh_ocn, fh_lnd, fh_ice, & - & fm10_ocn, fm10_lnd, fm10_ice, & - & fh2_ocn, fh2_lnd, fh2_ice + & z0rl_wat, z0rl_lnd, z0rl_ice, & + & ustar_wat, ustar_lnd, ustar_ice, & + & cm_wat, cm_lnd, cm_ice, & + & ch_wat, ch_lnd, ch_ice, & + & rb_wat, rb_lnd, rb_ice, & + & stress_wat,stress_lnd,stress_ice, & + & fm_wat, fm_lnd, fm_ice, & + & fh_wat, fh_lnd, fh_ice, & + & fm10_wat, fm10_lnd, fm10_ice, & + & fh2_wat, fh2_lnd, fh2_ice character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! @@ -281,17 +281,17 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! the stuff now put into "stability" if (wet(i)) then ! Some open ocean - tvs = 0.5 * (tsurf_ocn(i)+tskin_ocn(i)) * virtfac - z0 = 0.01 * z0rl_ocn(i) + tvs = 0.5 * (tsurf_wat(i)+tskin_wat(i)) * virtfac + z0 = 0.01 * z0rl_wat(i) z0max = max(1.0e-6, min(z0,z1(i))) - ustar_ocn(i) = sqrt(grav * z0 / charnock) + ustar_wat(i) = sqrt(grav * z0 / charnock) wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i)) !** test xubin's new z0 ! ztmax = z0max - restar = max(ustar_ocn(i)*z0max*visi, 0.000001) + restar = max(ustar_wat(i)*z0max*visi, 0.000001) ! restar = log(restar) ! restar = min(restar,5.) @@ -314,17 +314,17 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! call stability ! --- inputs: - & (z1(i), snwdph_ocn(i), thv1, wind(i), + & (z1(i), snwdph_wat(i), thv1, wind(i), & z0max, ztmax, tvs, grav, ! --- outputs: - & rb_ocn(i), fm_ocn(i), fh_ocn(i), fm10_ocn(i), fh2_ocn(i), - & cm_ocn(i), ch_ocn(i), stress_ocn(i), ustar_ocn(i)) + & rb_wat(i), fm_wat(i), fh_wat(i), fm10_wat(i), fh2_wat(i), + & cm_wat(i), ch_wat(i), stress_wat(i), ustar_wat(i)) ! ! update z0 over ocean ! if (sfc_z0_type >= 0) then if (sfc_z0_type == 0) then - z0 = (charnock / grav) * ustar_ocn(i) * ustar_ocn(i) + z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) ! mbek -- toga-coare flux algorithm ! z0 = (charnock / grav) * ustar(i)*ustar(i) + arnu/ustar(i) @@ -335,19 +335,19 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! z0 = arnu / (ustar(i) * ff ** pp) if (redrag) then - z0rl_ocn(i) = 100.0 * max(min(z0, z0s_max), 1.e-7) + z0rl_wat(i) = 100.0 * max(min(z0, z0s_max), 1.e-7) else - z0rl_ocn(i) = 100.0 * max(min(z0,.1), 1.e-7) + z0rl_wat(i) = 100.0 * max(min(z0,.1), 1.e-7) endif elseif (sfc_z0_type == 6) then ! wang call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m - z0rl_ocn(i) = 100.0 * z0 ! cm + z0rl_wat(i) = 100.0 * z0 ! cm elseif (sfc_z0_type == 7) then ! wang call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m - z0rl_ocn(i) = 100.0 * z0 ! cm + z0rl_wat(i) = 100.0 * z0 ! cm else - z0rl_ocn(i) = 1.0e-4 + z0rl_wat(i) = 1.0e-4 endif endif diff --git a/physics/sfc_diff.meta b/physics/sfc_diff.meta index 232b0050f..ab99dcb06 100644 --- a/physics/sfc_diff.meta +++ b/physics/sfc_diff.meta @@ -244,7 +244,7 @@ type = logical intent = in optional = F -[tskin_ocn] +[tskin_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K @@ -271,7 +271,7 @@ kind = kind_phys intent = in optional = F -[tsurf_ocn] +[tsurf_wat] standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K @@ -298,7 +298,7 @@ kind = kind_phys intent = in optional = F -[snwdph_ocn] +[snwdph_wat] standard_name = surface_snow_thickness_water_equivalent_over_ocean long_name = water equivalent snow depth over ocean units = mm @@ -325,7 +325,7 @@ kind = kind_phys intent = in optional = F -[z0rl_ocn] +[z0rl_wat] standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) units = cm @@ -352,7 +352,7 @@ kind = kind_phys intent = inout optional = F -[ustar_ocn] +[ustar_wat] standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 @@ -379,7 +379,7 @@ kind = kind_phys intent = inout optional = F -[cm_ocn] +[cm_wat] standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none @@ -406,7 +406,7 @@ kind = kind_phys intent = inout optional = F -[ch_ocn] +[ch_wat] standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none @@ -433,7 +433,7 @@ kind = kind_phys intent = inout optional = F -[rb_ocn] +[rb_wat] standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean long_name = bulk Richardson number at the surface over ocean units = none @@ -460,7 +460,7 @@ kind = kind_phys intent = inout optional = F -[stress_ocn] +[stress_wat] standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 @@ -487,7 +487,7 @@ kind = kind_phys intent = inout optional = F -[fm_ocn] +[fm_wat] standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity function for momentum over ocean units = none @@ -514,7 +514,7 @@ kind = kind_phys intent = inout optional = F -[fh_ocn] +[fh_wat] standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean long_name = Monin-Obukhov similarity function for heat over ocean units = none @@ -541,7 +541,7 @@ kind = kind_phys intent = inout optional = F -[fm10_ocn] +[fm10_wat] standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean units = none @@ -568,7 +568,7 @@ kind = kind_phys intent = inout optional = F -[fh2_ocn] +[fh2_wat] standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean units = none diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 3b4b8a118..0177f6d09 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -147,7 +147,7 @@ subroutine lsm_ruc_run & ! inputs & imp_physics, imp_physics_gfdl, imp_physics_thompson, & & smcwlt2, smcref2, do_mynnsfclay, & & con_cp, con_rv, con_rd, con_g, con_pi, con_hvap, con_fvirt,& ! constants - & weasd, snwdph, tskin, tskin_ocn, & ! in/outs + & weasd, snwdph, tskin, tskin_wat, & ! in/outs & rainnc, rainc, ice, snow, graupel, & ! in & srflag, smois, tslb, sh2o, keepfr, smfrkeep, & ! in/outs, on RUC levels & canopy, trans, tsurf, tsnow, zorl, & @@ -196,7 +196,7 @@ subroutine lsm_ruc_run & ! inputs real (kind=kind_phys), dimension(lsoil_ruc) :: dzs real (kind=kind_phys), dimension(lsoil_ruc), intent(inout ) :: zs real (kind=kind_phys), dimension(im), intent(inout) :: weasd, & - & snwdph, tskin, tskin_ocn, & + & snwdph, tskin, tskin_wat, & & srflag, canopy, trans, tsurf, zorl, tsnow, & & sfcqc, sfcqv, sfcdew, fice, tice, sfalb, smcwlt2, smcref2 ! --- in @@ -314,7 +314,7 @@ subroutine lsm_ruc_run & ! inputs call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in isot, soiltyp, vegtype, fice, & ! in - land, tskin, tskin_ocn, tg3, & ! in + land, tskin, tskin_wat, tg3, & ! in smc, slc, stc, & ! in smcref2, smcwlt2, & ! inout lsm_ruc, lsm, & ! in @@ -1040,7 +1040,7 @@ end subroutine lsm_ruc_run !! This subroutine contains RUC LSM initialization. subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in isot, soiltyp, vegtype, fice, & ! in - land, tsurf, tsurf_ocn, & ! in + land, tsurf, tsurf_wat, & ! in tg3, smc, slc, stc, & ! in smcref2, smcwlt2, & ! inout lsm_ruc, lsm, & ! in @@ -1057,7 +1057,7 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in integer, intent(in ) :: lsoil_ruc integer, intent(in ) :: lsoil logical, dimension(im), intent(in ) :: land - real (kind=kind_phys), dimension(im), intent(in ) :: tsurf, tsurf_ocn + real (kind=kind_phys), dimension(im), intent(in ) :: tsurf, tsurf_wat real (kind=kind_phys), dimension(im), intent(inout) :: smcref2 real (kind=kind_phys), dimension(im), intent(inout) :: smcwlt2 real (kind=kind_phys), dimension(im), intent(in ) :: tg3 @@ -1216,7 +1216,7 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in ! land only version if (land(i)) then tsk(i,j) = tsurf(i) - sst(i,j) = tsurf_ocn(i) + sst(i,j) = tsurf_wat(i) tbot(i,j)= tg3(i) ivgtyp(i,j)=vegtype(i) isltyp(i,j)=soiltyp(i) diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 6eaadfbb4..aa0ad3d0c 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -782,7 +782,7 @@ kind = kind_phys intent = inout optional = F -[tskin_ocn] +[tskin_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 3d0507ad9..9875ee389 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -675,7 +675,7 @@ end subroutine sfc_nst_pre_finalize !> \section NSST_general_pre_algorithm General Algorithm !! @{ subroutine sfc_nst_pre_run - & (im, wet, tsfc_ocn, tsurf_ocn, tseal, xt, xz, dt_cool, + & (im, wet, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, & z_c, tref, cplflx, oceanfrac, errmsg, errflg) use machine , only : kind_phys @@ -686,12 +686,12 @@ subroutine sfc_nst_pre_run integer, intent(in) :: im logical, dimension(im), intent(in) :: wet real (kind=kind_phys), dimension(im), intent(in) :: - & tsfc_ocn, xt, xz, dt_cool, z_c, oceanfrac + & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac logical, intent(in) :: cplflx ! --- input/outputs: real (kind=kind_phys), dimension(im), intent(inout) :: - & tsurf_ocn, tseal, tref + & tsurf_wat, tseal, tref ! --- outputs: character(len=*), intent(out) :: errmsg @@ -714,9 +714,9 @@ subroutine sfc_nst_pre_run ! tem = (oro(i)-oro_uf(i)) * rlapse ! DH* 20190927 simplyfing this code because tem is zero !tem = zero - !tseal(i) = tsfc_ocn(i) + tem - tseal(i) = tsfc_ocn(i) - !tsurf_ocn(i) = tsurf_ocn(i) + tem + !tseal(i) = tsfc_wat(i) + tem + tseal(i) = tsfc_wat(i) + !tsurf_wat(i) = tsurf_wat(i) + tem ! *DH endif enddo @@ -736,7 +736,7 @@ subroutine sfc_nst_pre_run endif tseal(i) = tref(i) + dt_warm - dt_cool(i) ! - (Sfcprop%oro(i)-Sfcprop%oro_uf(i))*rlapse - tsurf_ocn(i) = tseal(i) + tsurf_wat(i) = tseal(i) endif enddo endif @@ -779,7 +779,7 @@ end subroutine sfc_nst_post_finalize subroutine sfc_nst_post_run & & ( im, rlapse, tgice, wet, icy, oro, oro_uf, nstf_name1, & & nstf_name4, nstf_name5, xt, xz, dt_cool, z_c, tref, xlon, & - & tsurf_ocn, tsfc_ocn, dtzm, errmsg, errflg & + & tsurf_wat, tsfc_wat, dtzm, errmsg, errflg & & ) use machine , only : kind_phys @@ -797,8 +797,8 @@ subroutine sfc_nst_post_run & & dt_cool, z_c, tref, xlon ! --- input/outputs: - real (kind=kind_phys), dimension(im), intent(inout) :: tsurf_ocn, & - & tsfc_ocn + real (kind=kind_phys), dimension(im), intent(inout) :: tsurf_wat, & + & tsfc_wat ! --- outputs: real (kind=kind_phys), dimension(size(xlon,1)), intent(out) :: & @@ -821,7 +821,7 @@ subroutine sfc_nst_post_run & ! do i = 1, im ! if (wet(i) .and. .not. icy(i)) then -! tsurf_ocn(i) = tsurf_ocn(i) - (oro(i)-oro_uf(i)) * rlapse +! tsurf_wat(i) = tsurf_wat(i) - (oro(i)-oro_uf(i)) * rlapse ! endif ! enddo @@ -838,8 +838,8 @@ subroutine sfc_nst_post_run & ! if (wet(i) .and. .not.icy(i)) then ! if (wet(i) .and. (Model%frac_grid .or. .not. icy(i))) then if (wet(i)) then - tsfc_ocn(i) = max(tgice, tref(i) + dtzm(i)) -! tsfc_ocn(i) = max(271.2, tref(i) + dtzm(i)) - & + tsfc_wat(i) = max(tgice, tref(i) + dtzm(i)) +! tsfc_wat(i) = max(271.2, tref(i) + dtzm(i)) - & ! (oro(i)-oro_uf(i))*rlapse endif enddo diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index ac75aa05d..ff3566ac0 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -679,7 +679,7 @@ type = logical intent = in optional = F -[tsfc_ocn] +[tsfc_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K @@ -688,7 +688,7 @@ kind = kind_phys intent = in optional = F -[tsurf_ocn] +[tsurf_wat] standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K @@ -938,7 +938,7 @@ kind = kind_phys intent = in optional = F -[tsurf_ocn] +[tsurf_wat] standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K @@ -947,7 +947,7 @@ kind = kind_phys intent = inout optional = F -[tsfc_ocn] +[tsfc_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K From 424d7b67364b15bc2f4b7a5ab296f16a58e0f1ed Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Fri, 24 Apr 2020 01:46:03 +0000 Subject: [PATCH 099/404] Introducing tiice(:,;,2) as the 2-layer internal ice temperature --- physics/sfc_sice.f | 22 +++++++++++----------- physics/sfc_sice.meta | 14 +++++++------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index 750a6d795..7447e5248 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -40,12 +40,12 @@ end subroutine sfc_sice_finalize !> \section detailed_sice_run GFS Sea Ice Driver Detailed Algorithm !> @{ subroutine sfc_sice_run & - & ( im, km, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav, & ! --- inputs: + & ( im, kice, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav, & ! --- inputs: & t0c, rd, ps, t1, q1, delt, & & sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, & & cm, ch, prsl1, prslki, prsik1, prslk1, islimsk, wind, & & flag_iter, lprnt, ipr, cimin, & - & hice, fice, tice, weasd, tskin, tprcp, stc, ep, & ! --- input/outputs: + & hice, fice, tice, weasd, tskin, tprcp, tiice, ep, & ! --- input/outputs: & snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx, & ! & cplflx, cplchm, flag_cice, islmsk_cice, & & errmsg, errflg @@ -58,12 +58,12 @@ subroutine sfc_sice_run & ! ! ! call sfc_sice ! ! inputs: ! -! ( im, km, ps, t1, q1, delt, ! +! ( im, kice, ps, t1, q1, delt, ! ! sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, ! ! cm, ch, prsl1, prslki, prsik1, prslk1, islimsk, wind, ! ! flag_iter, ! ! input/outputs: ! -! hice, fice, tice, weasd, tskin, tprcp, stc, ep, ! +! hice, fice, tice, weasd, tskin, tprcp, tiice, ep, ! ! outputs: ! ! snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx ) ! ! ! @@ -90,7 +90,7 @@ subroutine sfc_sice_run & ! ==================== defination of variables ==================== ! ! ! ! inputs: size ! -! im, km - integer, horiz dimension and num of soil layers 1 ! +! im, kice - integer, horiz dimension and num of ice layers 1 ! ! ps - real, surface pressure im ! ! t1 - real, surface layer mean temperature ( k ) im ! ! q1 - real, surface layer mean specific humidity im ! @@ -117,7 +117,7 @@ subroutine sfc_sice_run & ! weasd - real, water equivalent accumulated snow depth (mm)im ! ! tskin - real, ground surface skin temperature ( k ) im ! ! tprcp - real, total precipitation im ! -! stc - real, soil temp (k) im,km ! +! tiice - real, temperature of ice internal (k) im,kice ! ! ep - real, potential evaporation im ! ! ! ! outputs: ! @@ -148,7 +148,7 @@ subroutine sfc_sice_run & real(kind=kind_phys), parameter :: dsi = one/0.33d0 ! --- inputs: - integer, intent(in) :: im, km, ipr + integer, intent(in) :: im, kice, ipr logical, intent(in) :: lprnt logical, intent(in) :: cplflx logical, intent(in) :: cplchm @@ -170,7 +170,7 @@ subroutine sfc_sice_run & real (kind=kind_phys), dimension(im), intent(inout) :: hice, & & fice, tice, weasd, tskin, tprcp, ep - real (kind=kind_phys), dimension(im,km), intent(inout) :: stc + real (kind=kind_phys), dimension(im,kice), intent(inout) :: tiice ! --- outputs: real (kind=kind_phys), dimension(im), intent(inout) :: snwdph, & @@ -236,12 +236,12 @@ subroutine sfc_sice_run & endif endif enddo -!> - Update/read sea ice temperature from soil temperature and initialize variables. +! --- ... update sea ice temperature do k = 1, kmi do i = 1, im if (flag(i)) then - stsice(i,k) = stc(i,k) + stsice(i,k) = tiice(i,k) endif enddo enddo @@ -391,7 +391,7 @@ subroutine sfc_sice_run & do k = 1, kmi do i = 1, im if (flag(i)) then - stc(i,k) = min(stsice(i,k), t0c) + tiice(i,k) = min(stsice(i,k), t0c) endif enddo enddo diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index c9641ffaa..dc08e0170 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -9,9 +9,9 @@ type = integer intent = in optional = F -[km] - standard_name = soil_vertical_dimension - long_name = vertical loop extent for soil levels, start at 1 +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 units = count dimensions = () type = integer @@ -346,11 +346,11 @@ kind = kind_phys intent = inout optional = F -[stc] - standard_name = soil_temperature - long_name = soil temp +[tiice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_dimension,ice_vertical_dimension) type = real kind = kind_phys intent = inout From f08797d54a49a651d078b34dc4c53666bdfeb065 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Fri, 24 Apr 2020 19:42:38 +0000 Subject: [PATCH 100/404] Introduce internal ice temperature. It is output only in the fracrtional grid case. --- physics/GFS_surface_composites.F90 | 14 ++++++++---- physics/GFS_surface_composites.meta | 34 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index c0057e8b7..a2f15acce 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -285,7 +285,7 @@ end subroutine GFS_surface_composites_post_finalize !! #endif subroutine GFS_surface_composites_post_run ( & - im, cplflx, cplwav2atm, frac_grid, flag_cice, islmsk, dry, wet, icy, landfrac, lakefrac, oceanfrac, & + im, kice, km, cplflx, cplwav2atm, frac_grid, flag_cice, islmsk, dry, wet, icy, landfrac, lakefrac, oceanfrac, & zorl, zorlo, zorll, zorl_wat, zorl_lnd, zorl_ice, & cd, cd_wat, cd_lnd, cd_ice, cdq, cdq_wat, cdq_lnd, cdq_ice, rb, rb_wat, rb_lnd, rb_ice, stress, stress_wat, stress_lnd, & stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, & @@ -293,11 +293,11 @@ subroutine GFS_surface_composites_post_run ( cmm, cmm_wat, cmm_lnd, cmm_ice, chh, chh_wat, chh_lnd, chh_ice, gflx, gflx_wat, gflx_lnd, gflx_ice, ep1d, ep1d_wat, & ep1d_lnd, ep1d_ice, weasd, weasd_wat, weasd_lnd, weasd_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & tprcp_lnd, tprcp_ice, evap, evap_wat, evap_lnd, evap_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, qss, qss_wat, qss_lnd, & - qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, errmsg, errflg) + qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, tiice, stc, errmsg, errflg) implicit none - integer, intent(in) :: im + integer, intent(in) :: im, kice, km logical, intent(in) :: cplflx, frac_grid, cplwav2atm logical, dimension(im), intent(in) :: flag_cice, dry, wet, icy integer, dimension(im), intent(in) :: islmsk @@ -315,11 +315,14 @@ subroutine GFS_surface_composites_post_run ( real(kind=kind_phys), dimension(im), intent(in ) :: tice ! interstitial sea ice temperature real(kind=kind_phys), dimension(im), intent(inout) :: hice, cice + real(kind=kind_phys), dimension(im, kice), intent(in ) :: tiice + real(kind=kind_phys), dimension(im, km), intent(inout) :: stc + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables - integer :: i + integer :: i, k real(kind=kind_phys) :: txl, txi, txo, tem ! Initialize CCPP error handling variables @@ -482,6 +485,9 @@ subroutine GFS_surface_composites_post_run ( hflx(i) = hflx_ice(i) qss(i) = qss_ice(i) tsfc(i) = tsfc_ice(i) + do k=1,kice ! store tiice in stc to reduce output in the nonfrac grid case + stc(i,k)=tiice(i,k) + end do endif zorll(i) = zorl_lnd(i) diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index b643220df..31ca88d3d 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -695,6 +695,22 @@ type = integer intent = in optional = F +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer + intent = in + optional = F +[km] + standard_name = soil_vertical_dimension + long_name = soil vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F [cplflx] standard_name = flag_for_flux_coupling long_name = flag controlling cplflx collection (default off) @@ -1650,6 +1666,24 @@ kind = kind_phys intent = inout optional = F +[tiice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,ice_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From f22b39c7dcfd582c9b610857a88942a4627e1d92 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Sun, 26 Apr 2020 04:10:17 +0000 Subject: [PATCH 101/404] Updating tiice in gcycle.F90 --- physics/gcycle.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/physics/gcycle.F90 b/physics/gcycle.F90 index 8c5dd041a..bc1bb032c 100644 --- a/physics/gcycle.F90 +++ b/physics/gcycle.F90 @@ -239,6 +239,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) Sfcprop(nb)%smc (ix,ls) = SMCFC1 (len + (ls-1)*npts) Sfcprop(nb)%stc (ix,ls) = STCFC1 (len + (ls-1)*npts) Sfcprop(nb)%slc (ix,ls) = SLCFC1 (len + (ls-1)*npts) + if (ls<=Model%kice) Sfcprop(nb)%tiice (ix,ls) = STCFC1 (len + (ls-1)*npts) enddo ENDDO !-----END BLOCK SIZE LOOP------------------------------ ENDDO !-----END BLOCK LOOP------------------------------- From f85730de98a126e7552b4bdc9d31ceb9c3ae067d Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 27 Apr 2020 10:58:03 +0000 Subject: [PATCH 102/404] updating to fix a potential snow bug --- physics/GFS_surface_composites.F90 | 36 +++++++++++++++++++----------- physics/sfc_cice.f | 22 ++++++++++++------ physics/sfc_cice.meta | 36 ++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 20 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index e12543328..22f5654a1 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -435,9 +435,10 @@ subroutine GFS_surface_composites_post_run ( hflx(i) = hflx_lnd(i) qss(i) = qss_lnd(i) tsfc(i) = tsfc_lnd(i) - !hice(i) = zero - !cice(i) = zero - !tisfc(i) = tsfc(i) + hice(i) = zero + cice(i) = zero + tisfc(i) = tsfc(i) + tsfco(i) = tsfc(i) elseif (islmsk(i) == 0) then zorl(i) = zorl_ocn(i) cd(i) = cd_ocn(i) @@ -465,6 +466,7 @@ subroutine GFS_surface_composites_post_run ( hice(i) = zero cice(i) = zero tisfc(i) = tsfc(i) + tsfcl(i) = tsfc(i) else ! islmsk(i) == 2 zorl(i) = zorl_ice(i) cd(i) = cd_ice(i) @@ -477,16 +479,6 @@ subroutine GFS_surface_composites_post_run ( fh2(i) = fh2_ice(i) stress(i) = stress_ice(i) !tsurf(i) = tsurf_ice(i) - if (.not. flag_cice(i)) then - tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) - elseif (wet(i) .and. cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice - txi = cice(i) - txo = one - txi - evap(i) = txi * evap_ice(i) + txo * evap_ocn(i) - hflx(i) = txi * hflx_ice(i) + txo * hflx_ocn(i) - tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_ocn(i) - stress(i) = txi * stress_ice(i) + txo * stress_ocn(i) - endif cmm(i) = cmm_ice(i) chh(i) = chh_ice(i) gflx(i) = gflx_ice(i) @@ -499,6 +491,24 @@ subroutine GFS_surface_composites_post_run ( hflx(i) = hflx_ice(i) qss(i) = qss_ice(i) tsfc(i) = tsfc_ice(i) + tsfcl(i) = tsfc(i) + if (.not. flag_cice(i)) then + tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) + elseif (wet(i) .and. cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice + txi = cice(i) + txo = one - txi + evap(i) = txi * evap_ice(i) + txo * evap_ocn(i) + hflx(i) = txi * hflx_ice(i) + txo * hflx_ocn(i) + tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_ocn(i) + stress(i) = txi * stress_ice(i) + txo * stress_ocn(i) + qss(i) = txi * qss_ice(i) + txo * qss_ocn(i) + ep1d(i) = txi * ep1d_ice(i) + txo * ep1d_ocn(i) + endif + if (wet(i)) then + tsfco(i) = tsfc_ocn(i) + else + tsfco(i) = tsfc(i) + endif endif zorll(i) = zorl_lnd(i) diff --git a/physics/sfc_cice.f b/physics/sfc_cice.f index 9cb2b5f21..5fb61a7cc 100644 --- a/physics/sfc_cice.f +++ b/physics/sfc_cice.f @@ -44,9 +44,9 @@ subroutine sfc_cice_run & & ( im, cplflx, hvap, cp, rvrdm1, rd, & & t1, q1, cm, ch, prsl1, & & wind, flag_cice, flag_iter, dqsfc, dtsfc, & - & dusfc, dvsfc, & + & dusfc, dvsfc, snowd, & ! --- outputs: - & qsurf, cmm, chh, evap, hflx, stress, & + & qsurf, cmm, chh, evap, hflx, stress, weasd, snwdph, ep, & & errmsg, errflg & ) @@ -94,6 +94,8 @@ subroutine sfc_cice_run & use machine , only : kind_phys implicit none + real(kind=kind_phys), parameter :: one = 1.0_kind_phys + real(kind=kind_phys), parameter :: dsi = one/0.33_kind_phys real (kind=kind_phys), intent(in) :: hvap, cp, rvrdm1, rd ! --- inputs: @@ -103,12 +105,14 @@ subroutine sfc_cice_run & ! real (kind=kind_phys), dimension(im), intent(in) :: u1, v1, & real (kind=kind_phys), dimension(im), intent(in) :: & & t1, q1, cm, ch, prsl1, wind, dqsfc, dtsfc, dusfc, dvsfc + &, snowd logical, intent(in) :: flag_cice(im), flag_iter(im) ! --- outputs: - real (kind=kind_phys), dimension(im), intent(out) :: qsurf, & + real (kind=kind_phys), dimension(im), intent(inout) :: qsurf, & & cmm, chh, evap, hflx, stress + &, weasd, snwdph, ep ! character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -127,24 +131,28 @@ subroutine sfc_cice_run & ! if (.not. cplflx) return ! - cpinv = 1.0d0/cp - hvapi = 1.0d0/hvap + cpinv = one / cp + hvapi = one / hvap elocp = hvap/cp ! do i = 1, im if (flag_cice(i) .and. flag_iter(i)) then rho = prsl1(i) & - & / (rd * t1(i) * (1.0d0 + rvrdm1*max(q1(i), 1.0d-8))) + & / (rd * t1(i) * (one + rvrdm1*max(q1(i), 1.0e-8_kind_phys))) cmm(i) = wind(i) * cm(i) chh(i) = wind(i) * ch(i) * rho qsurf(i) = q1(i) + dqsfc(i) / (hvap*chh(i)) - tem = 1.0d0 / rho + tem = one / rho hflx(i) = dtsfc(i) * tem * cpinv evap(i) = dqsfc(i) * tem * hvapi stress(i) = sqrt(dusfc(i)*dusfc(i) + dvsfc(i)*dvsfc(i)) * tem + + weasd(i) = snowd(i) * 1000.0_kind_phys + snwdph(i) = weasd(i) * dsi ! snow depth in mm + ep(i) = evap(i) endif enddo diff --git a/physics/sfc_cice.meta b/physics/sfc_cice.meta index a1c57d4d9..3d26baf7a 100644 --- a/physics/sfc_cice.meta +++ b/physics/sfc_cice.meta @@ -159,6 +159,15 @@ kind = kind_phys intent = in optional = F +[snowd] + standard_name = surface_snow_thickness_for_coupling + long_name = sfc snow depth in meters over sea ice for coupling + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [qsurf] standard_name = surface_specific_humidity_over_ice long_name = surface air saturation specific humidity over ice @@ -213,6 +222,33 @@ kind = kind_phys intent = inout optional = F +[weasd] + standard_name = water_equivalent_accumulated_snow_depth_over_ice + long_name = water equiv of acc snow depth over ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[snwdph] + standard_name = surface_snow_thickness_water_equivalent_over_ice + long_name = water equivalent snow depth over ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ep] + standard_name = surface_upward_potential_latent_heat_flux_over_ice + long_name = surface upward potential latent heat flux over ice + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 02414491112c736f75081f26ad508c70925d265a Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 27 Apr 2020 11:09:44 +0000 Subject: [PATCH 103/404] fixing some comment lines --- physics/sfc_cice.f | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/physics/sfc_cice.f b/physics/sfc_cice.f index 5fb61a7cc..2bda3a0c3 100644 --- a/physics/sfc_cice.f +++ b/physics/sfc_cice.f @@ -61,9 +61,9 @@ subroutine sfc_cice_run & ! ( im, cplflx, hvap, cp, rvrdm1, rd, ! ! t1, q1, cm, ch, prsl1, ! ! wind, flag_cice, flag_iter, dqsfc, dtsfc, ! -! dusfc, dvsfc, ! +! dusfc, dvsfc, snowd, ! ! outputs: ! -! qsurf, cmm, chh, evap, hflx, stress) ! +! qsurf, cmm, chh, evap, hflx, stress, weasd, snwdph, ep) ! ! ! ! ==================== defination of variables ==================== ! ! ! @@ -81,6 +81,7 @@ subroutine sfc_cice_run & ! dtsfc - real, sensible heat flux ! dusfc - real, zonal momentum stress ! dvsfc - real, meridional momentum stress +! snowd - real, snow depth from cice ! outputs: ! qsurf - real, specific humidity at sfc ! cmm - real, ? @@ -88,6 +89,9 @@ subroutine sfc_cice_run & ! evap - real, evaperation from latent heat ! hflx - real, sensible heat ! stress - real, surface stress +! weasd - real, water equivalent accumulated snow depth (mm) +! snwdph - real, water equivalent snow depth (mm) +! ep - real, potential evaporation ! ==================== end of description ===================== ! ! ! From 4694c008851cceb7ef1977b48d00067f49fca69d Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 27 Apr 2020 14:20:19 +0000 Subject: [PATCH 104/404] some minor change with same result --- physics/GFS_surface_composites.F90 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 22f5654a1..ae9724844 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -86,13 +86,14 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl if (cice(i) >= min_lakeice) then icy(i) = .true. else - cice(i) = zero - islmsk = 0 + cice(i) = zero + islmsk(i) = 0 endif endif if (cice(i) < one ) then wet(i)=.true. ! some open ocean/lake water exists - if (.not. cplflx) tsfco(i) = max(tsfco(i), tisfc(i), tgice) + if (.not. cplflx .or. oceanfrac(i) == zero) & + tsfco(i) = max(tsfco(i), tisfc(i), tgice) end if else cice(i) = zero From 066c357aaf6c1b80811a18012a4b3d4203d63d67 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Apr 2020 12:20:11 -0600 Subject: [PATCH 105/404] Updated GP suite heating rates. --- physics/GFS_rrtmgp_lw_post.F90 | 11 +++++------ physics/GFS_rrtmgp_lw_post.meta | 18 ++++++++++++++++++ physics/GFS_rrtmgp_sw_post.F90 | 10 ++++++---- physics/GFS_rrtmgp_sw_post.meta | 18 ++++++++++++++++++ physics/rrtmgp_lw_gas_optics.F90 | 2 -- physics/rrtmgp_sw_gas_optics.F90 | 6 ------ 6 files changed, 47 insertions(+), 18 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 103d88274..8f5bb3611 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -33,7 +33,7 @@ end subroutine GFS_rrtmgp_lw_post_init subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statein, im, & p_lev, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky,& raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, & - flxprf_lw, errmsg, errflg) + flxprf_lw, hlwc, hlw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -65,9 +65,6 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei real(kind_phys), dimension(im,Model%levs), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtaulw ! approx 10.mu band layer cloud optical depth - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: & - hlwc, & ! Longwave all-sky heating-rate (K/sec) - hlw0 ! Longwave clear-sky heating-rate (K/sec) ! Outputs (mandatory) character(len=*), intent(out) :: & @@ -80,7 +77,8 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei Radtend ! Fortran DDT: FV3-GFS radiation tendencies type(GFS_diag_type), intent(inout) :: & Diag ! Fortran DDT: FV3-GFS diagnotics data - + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs), intent(inout) :: & + hlwc ! Longwave all-sky heating-rate (K/sec) ! Outputs (optional) type(proflw_type), dimension(size(Grid%xlon,1), Model%levs+1), optional, intent(inout) :: & flxprf_lw ! 2D radiative fluxes, components: @@ -88,7 +86,8 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei ! dnfxc - total sky dnward flux (W/m2) ! upfx0 - clear sky upward flux (W/m2) ! dnfx0 - clear sky dnward flux (W/m2) - + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(inout),optional :: & + hlw0 ! Longwave clear-sky heating-rate (K/sec) ! Local variables integer :: i, j, k, iSFC, iTOA, itop, ibtc logical :: l_fluxeslw2d, top_at_1 diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index dbe96120d..274bc1129 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -180,6 +180,24 @@ type = proflw_type intent = inout optional = T +[hlwc] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levels + long_name = longwave total sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = inout + optional = F +[hlw0] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels + long_name = longwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = inout + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 4e9f8a33f..086bceb4c 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -30,7 +30,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein nCol, p_lev, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, & sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, & fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, mtopa, cld_frac, cldtausw, flxprf_sw,& - errmsg, errflg) + hswc, hsw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -76,11 +76,10 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein real(kind_phys), dimension(nCol,Model%levs), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtausw ! approx .55mu band layer cloud optical depth - real(kind_phys),dimension(nCol, Model%levs) :: & - hswc, & ! All-sky heating rate (K/s) - hsw0 ! Clear-sky heating rate (K/s) ! Outputs (mandatory) + real(kind_phys),dimension(nCol, Model%levs), intent(inout) :: & + hswc ! All-sky heating rate (K/s) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & @@ -101,6 +100,9 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein ! nirdf - downward nir diffused flux (W/m2) ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) + real(kind_phys),dimension(nCol, Model%levs),intent(inout),optional :: & + hsw0 ! Clear-sky heating rate (K/s) + ! Local variables integer :: i, j, k, iSFC, iTOA, itop, ibtc real(kind_phys) :: tem0d, tem1, tem2 diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index a817d9332..96155580b 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -239,6 +239,24 @@ type = profsw_type intent = inout optional = T +[hswc] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels + long_name = shortwave total sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = inout + optional = F +[hsw0] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels + long_name = shortwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = inout + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index c446bd70c..418420dd6 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -263,8 +263,6 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! endif ! Initialize gas concentrations and gas optics class - print*,'nfit_coeffs: ',nfit_coeffs - print*,'optimal_angle_fit: ',optimal_angle_fit call check_error_msg('lw_gas_optics_init',gas_concentrations%init(active_gases_array)) call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index cb081c6d4..63b499432 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -273,12 +273,6 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Initialize gas concentrations and gas optics class - print*,'tsi_default: ',tsi_default - print*,'mg_default: ',mg_default - print*,'sv_default: ',sb_default - print*,'solar_quiet: ',solar_quiet - print*,'solar_facular: ',solar_facular - print*,'solar_sunspot: ',solar_sunspot call check_error_msg('sw_gas_optics_init',gas_concentrations%init(active_gases_array)) call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & From e216116dbccb9b456a3c3eaf33d7bc5cca890725 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Tue, 28 Apr 2020 13:28:43 +0000 Subject: [PATCH 106/404] update consistent with ipd --- physics/sfc_cice.f | 1 + 1 file changed, 1 insertion(+) diff --git a/physics/sfc_cice.f b/physics/sfc_cice.f index 2bda3a0c3..d2d0ae631 100644 --- a/physics/sfc_cice.f +++ b/physics/sfc_cice.f @@ -155,6 +155,7 @@ subroutine sfc_cice_run & stress(i) = sqrt(dusfc(i)*dusfc(i) + dvsfc(i)*dvsfc(i)) * tem weasd(i) = snowd(i) * 1000.0_kind_phys + snwdph(i) = weasd(i) ! snow depth in mm snwdph(i) = weasd(i) * dsi ! snow depth in mm ep(i) = evap(i) endif From 531d5577436abfd49801d5b4ade9f1ec9a8907d9 Mon Sep 17 00:00:00 2001 From: Xiaqiong Zhou Date: Tue, 28 Apr 2020 14:56:47 +0000 Subject: [PATCH 107/404] Fixes to run the CCPP multi_gases option with 32 bit --- physics/multi_gases.F90 | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/physics/multi_gases.F90 b/physics/multi_gases.F90 index c660b7dfb..4f7c53aa4 100644 --- a/physics/multi_gases.F90 +++ b/physics/multi_gases.F90 @@ -77,8 +77,8 @@ subroutine multi_gases_init(ngas, nwat, ri, cpi, is_master) ! vicv(0): cv0/cv_air !-------------------------------------------- integer, intent(in):: ngas, nwat - real, intent(in):: ri(0:ngas) - real, intent(in):: cpi(0:ngas) + real(kind=kind_dyn), intent(in):: ri(0:ngas) + real(kind=kind_dyn), intent(in):: cpi(0:ngas) logical, intent(in):: is_master ! Local: integer n @@ -121,11 +121,11 @@ subroutine multi_gases_init(ngas, nwat, ri, cpi, is_master) enddo if( is_master ) then - write(*,*) ' multi_gases_init with ind_gas=',ind_gas - write(*,*) ' multi_gases_init with num_gas=',num_gas - write(*,*) ' multi_gases_init with vir =',vir - write(*,*) ' multi_gases_init with vicp=',vicp - write(*,*) ' multi_gases_init with vicv=',vicv + write(*,*) ' ccpp multi_gases_init with ind_gas=',ind_gas + write(*,*) ' ccpp multi_gases_init with num_gas=',num_gas + write(*,*) ' ccpp multi_gases_init with vir =',vir + write(*,*) ' ccpp multi_gases_init with vicp=',vicp + write(*,*) ' ccpp multi_gases_init with vicv=',vicv endif return @@ -149,7 +149,7 @@ pure real function virq(q) ! !OUTPUT PARAMETERS ! Ouput: variable gas 1+zvir/(1-qc) !-------------------------------------------- - real, intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: q(num_gas) ! Local: integer :: n @@ -169,7 +169,7 @@ pure real function virq_nodq(q) ! !OUTPUT PARAMETERS ! Ouput: variable gas 1+zvir without dividing by 1-qv or 1-qv-qc !-------------------------------------------- - real, intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: q(num_gas) ! Local: integer :: n @@ -188,8 +188,8 @@ pure real function virq_max(q, qmin) ! !OUTPUT PARAMETERS ! Ouput: variable gas 1+zvir using max(qmin,q(sphum)) !-------------------------------------------- - real, intent(in) :: q(num_gas) - real, intent(in) :: qmin + real(kind=kind_dyn), intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: qmin ! Local: integer :: n @@ -210,8 +210,8 @@ pure real function virq_qpz(q, qpz) ! !OUTPUT PARAMETERS ! Ouput: variable gas 1+zvir/(1.-qpz): qpz in place of qv+qc from q !-------------------------------------------- - real, intent(in) :: q(num_gas) - real, intent(in) :: qpz + real(kind=kind_dyn), intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: qpz ! Local: integer :: n @@ -232,7 +232,7 @@ pure real function virqd(q) ! !OUTPUT PARAMETERS ! Ouput: variable gas 1+zvir/(1-(qv+qc)) (dry) !-------------------------------------------- - real, intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: q(num_gas) ! Local: integer :: n @@ -252,7 +252,7 @@ pure real function vicpqd(q) ! !OUTPUT PARAMETERS ! Ouput: variable gas cp (dry) !-------------------------------------------- - real, intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: q(num_gas) ! Local: integer :: n @@ -272,8 +272,8 @@ pure real function vicpqd_qpz(q, qpz) ! !OUTPUT PARAMETERS ! Ouput: variable gas cp (dry) with qpz in place of qv+qc from q !-------------------------------------------- - real, intent(in) :: q(num_gas) - real, intent(in) :: qpz + real(kind=kind_dyn), intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: qpz ! Local: integer :: n @@ -293,7 +293,7 @@ pure real function vicvqd(q) ! !OUTPUT PARAMETERS ! Ouput: variable gas cv (dry) !-------------------------------------------- - real, intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: q(num_gas) ! Local: integer :: n @@ -313,8 +313,8 @@ pure real function vicvqd_qpz(q,qpz) ! !OUTPUT PARAMETERS ! Ouput: variable gas cv (dry) with qpz in place of qv+qc from q !-------------------------------------------- - real, intent(in) :: q(num_gas) - real, intent(in) :: qpz + real(kind=kind_dyn), intent(in) :: q(num_gas) + real(kind=kind_dyn), intent(in) :: qpz ! Local: integer :: n From d0c9248747a48f4634f8af5e0fba7993b2e124e5 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Tue, 28 Apr 2020 16:31:11 +0000 Subject: [PATCH 108/404] bug fix for restart applications --- physics/module_bl_mynn.F90 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index 73a101a3f..6be141d9c 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -4265,7 +4265,7 @@ SUBROUTINE mynn_bl_driver( & !! If true, a three-dimensional initialization loop is entered. Within this loop, !! several arrays are initialized and k-oriented (vertical) subroutines are called !! at every i and j point, corresponding to the x- and y- directions, respectively. - IF (initflag > 0) THEN + IF (initflag > 0 .and. .not.restart) THEN !Test to see if we want to initialize qke IF ( (restart .or. cycling)) THEN @@ -4290,6 +4290,10 @@ SUBROUTINE mynn_bl_driver( & cldfra_bl(its:ite,kts:kte,jts:jte)=0. qc_bl(its:ite,kts:kte,jts:jte)=0. qke(its:ite,kts:kte,jts:jte)=0. + else + qc_bl1D(kts:kte)=0.0 + qi_bl1D(kts:kte)=0.0 + cldfra_bl1D(kts:kte)=0.0 end if dqc1(kts:kte)=0.0 dqi1(kts:kte)=0.0 @@ -4298,9 +4302,6 @@ SUBROUTINE mynn_bl_driver( & dqnwfa1(kts:kte)=0.0 dqnifa1(kts:kte)=0.0 dozone1(kts:kte)=0.0 - qc_bl1D(kts:kte)=0.0 - qi_bl1D(kts:kte)=0.0 - cldfra_bl1D(kts:kte)=0.0 qc_bl1D_old(kts:kte)=0.0 cldfra_bl1D_old(kts:kte)=0.0 edmf_a1(kts:kte)=0.0 @@ -5575,6 +5576,7 @@ SUBROUTINE DMP_mf( & REAL :: temp,sublim,qc_ent,qv_ent,qt_ent,thl_ent,detrate, & detrateUV,oow,exc_fac,aratio,detturb,qc_grid REAL, PARAMETER :: Cdet = 1./45. + REAL, PARAMETER :: dzpmax = 300. !limit dz used in detrainment - can be excessing in thick layers !parameter "Csub" determines the propotion of upward vertical velocity that contributes to !environmenatal subsidence. Some portion is expected to be compensated by downdrafts instead of !gentle environmental subsidence. 1.0 assumes all upward vertical velocity in the mass-flux scheme @@ -6019,19 +6021,19 @@ SUBROUTINE DMP_mf( & oow = -0.060/MAX(1.0,(0.5*(Wn+UPW(K-1,I)))) !coef for dynamical detrainment rate detrate = MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0002) ! dynamical detrainment rate (m^-1) detrateUV= MIN(MAX(oow*(Wn-UPW(K-1,I))/dz(k), detturb), .0001) ! dynamical detrainment rate (m^-1) - envm_thl(k)=envm_thl(k) + (0.5*(thl_ent + UPTHL(K-1,I)) - thl(k))*detrate*aratio*MIN(dzp,300.) + envm_thl(k)=envm_thl(k) + (0.5*(thl_ent + UPTHL(K-1,I)) - thl(k))*detrate*aratio*MIN(dzp,dzpmax) qv_ent = 0.5*(MAX(qt_ent-qc_ent,0.) + MAX(UPQT(K-1,I)-UPQC(K-1,I),0.)) - envm_sqv(k)=envm_sqv(k) + (qv_ent-QV(K))*detrate*aratio*MIN(dzp,300.) + envm_sqv(k)=envm_sqv(k) + (qv_ent-QV(K))*detrate*aratio*MIN(dzp,dzpmax) IF (UPQC(K-1,I) > 1E-8) THEN IF (QC(K) > 1E-6) THEN qc_grid = QC(K) ELSE qc_grid = cldfra_bl1d(k)*qc_bl1d(K) ENDIF - envm_sqc(k)=envm_sqc(k) + MAX(UPA(K-1,I)*0.5*(QCn + UPQC(K-1,I)) - qc_grid, 0.0)*detrate*aratio*MIN(dzp,300.) + envm_sqc(k)=envm_sqc(k) + MAX(UPA(K-1,I)*0.5*(QCn + UPQC(K-1,I)) - qc_grid, 0.0)*detrate*aratio*MIN(dzp,dzpmax) ENDIF - envm_u(k) =envm_u(k) + (0.5*(Un + UPU(K-1,I)) - U(K))*detrateUV*aratio*MIN(dzp,300.) - envm_v(k) =envm_v(k) + (0.5*(Vn + UPV(K-1,I)) - V(K))*detrateUV*aratio*MIN(dzp,300.) + envm_u(k) =envm_u(k) + (0.5*(Un + UPU(K-1,I)) - U(K))*detrateUV*aratio*MIN(dzp,dzpmax) + envm_v(k) =envm_v(k) + (0.5*(Vn + UPV(K-1,I)) - V(K))*detrateUV*aratio*MIN(dzp,dzpmax) IF (Wn > 0.) THEN !Update plume variables at current k index @@ -6362,6 +6364,7 @@ SUBROUTINE DMP_mf( & else f = 1.0 endif + sigq = 9.E-3 * 0.5*(edmf_a(k)+edmf_a(k-1)) * & & 0.5*(edmf_w(k)+edmf_w(k-1)) * f ! convective component of sigma (CB2005) !sigq = MAX(sigq, 1.0E-4) @@ -6373,7 +6376,7 @@ SUBROUTINE DMP_mf( & IF ( debug_code ) THEN print*,"In MYNN, StEM edmf" print*," CB: env qt=",qt(k)," qsat=",qsat_tl - print*," satdef=",QTp - qsat_tl + print*," k=",k," satdef=",QTp - qsat_tl," sgm=",sgm(k) print*," CB: sigq=",sigq," qmq=",qmq," tlk=",tlk print*," CB: mf_cf=",mf_cf," cldfra_bl=",cldfra_bl1d(k)," edmf_a=",edmf_a(k) ENDIF From cdac822b69ce9691a0380e39b384383f0d718300 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 29 Apr 2020 13:09:25 +0000 Subject: [PATCH 109/404] testing an alternate option in ccpp --- physics/sfc_cice.f | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/physics/sfc_cice.f b/physics/sfc_cice.f index d2d0ae631..f845f6091 100644 --- a/physics/sfc_cice.f +++ b/physics/sfc_cice.f @@ -154,9 +154,12 @@ subroutine sfc_cice_run & evap(i) = dqsfc(i) * tem * hvapi stress(i) = sqrt(dusfc(i)*dusfc(i) + dvsfc(i)*dvsfc(i)) * tem - weasd(i) = snowd(i) * 1000.0_kind_phys - snwdph(i) = weasd(i) ! snow depth in mm - snwdph(i) = weasd(i) * dsi ! snow depth in mm + snwdph(i) = snowd(i) * 1000.0_kind_phys + weasd(i) = snwdph(i) * 0.33_kind_phys + +! weasd(i) = snowd(i) * 1000.0_kind_phys +! snwdph(i) = weasd(i) * dsi ! snow depth in mm + ep(i) = evap(i) endif enddo From d61ecbe02a64c872212644cd472de77ee73605e2 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Thu, 30 Apr 2020 02:00:14 +0000 Subject: [PATCH 110/404] some additional updates to the code --- physics/GFS_MP_generic.F90 | 13 +- physics/dcyc2.f | 6 +- physics/gcm_shoc.F90 | 163 +++++++++++----------- physics/get_prs_fv3.F90 | 7 +- physics/m_micro.F90 | 272 +++++++++++++++++++------------------ physics/sfc_sice.f | 14 +- 6 files changed, 239 insertions(+), 236 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index ffbe6ab9b..4baf24e8c 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -259,7 +259,9 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt !! and determine explicit rain/snow by snow/ice/graupel coming out directly from MP !! and convective rainfall from the cumulus scheme if the surface temperature is below !! \f$0^oC\f$. + if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_thompson) then + ! determine convective rain/snow by surface temperature ! determine large-scale rain/snow by rain/snow coming out directly from MP @@ -305,15 +307,12 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt rain(i) = zero rainc(i) = zero endif - tprcp(i) = max(zero, rain(i) ) ! clu: rain -> tprcp + tprcp(i) = max(zero, rain(i)) enddo - else + else ! not GFDL or MG or Thompson microphysics do i = 1, im - tprcp(i) = max(zero, rain(i) ) ! clu: rain -> tprcp - srflag(i) = zero ! clu: default srflag as 'rain' (i.e. 0) - if (t850(i) <= 273.16_kind_phys) then - srflag(i) = one ! clu: set srflag to 'snow' (i.e. 1) - endif + tprcp(i) = max(zero, rain(i)) + srflag(i) = sr(i) enddo endif endif diff --git a/physics/dcyc2.f b/physics/dcyc2.f index c7a1ddd59..6174f7641 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -286,10 +286,10 @@ subroutine dcyc2t3_run & istsun(i) = zero enddo do it=1,nstl - cns = solang + (float(it)-0.5)*anginc + slag + cns = solang + (float(it)-0.5_kind_phys)*anginc + slag do i = 1, IM coszn = sdec*sinlat(i) + cdec*coslat(i)*cos(cns+xlon(i)) - xcosz(i) = xcosz(i) + max(0.0, coszn) + xcosz(i) = xcosz(i) + max(zero, coszn) if (coszn > czlimt) istsun(i) = istsun(i) + 1 enddo enddo @@ -334,7 +334,7 @@ subroutine dcyc2t3_run & if ( xcosz(i) > f_eps .and. coszen(i) > f_eps ) then xmu(i) = xcosz(i) / coszen(i) else - xmu(i) = 0.0 + xmu(i) = zero endif !> - adjust \a sfc net and downward SW fluxes for zenith angle changes. diff --git a/physics/gcm_shoc.F90 b/physics/gcm_shoc.F90 index 9baa61516..8e415fe75 100644 --- a/physics/gcm_shoc.F90 +++ b/physics/gcm_shoc.F90 @@ -10,6 +10,7 @@ module shoc private public shoc_run, shoc_init, shoc_finalize + integer, parameter :: r8 = kind_phys contains @@ -46,7 +47,7 @@ subroutine shoc_run (ix, nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: epsq = 1.0d-20, zero=0.0d0, one=1.0d0 + real(kind=kind_phys), parameter :: epsq = 1.0e-20_r8, zero=0.0_r8, one=1.0_r8 integer :: i, k @@ -220,34 +221,34 @@ subroutine shoc_work (ix, nx, nzm, nz, dtn, & real, intent(in) :: prnum (nx,nzm) ! turbulent Prandtl number real, intent(inout) :: wthv_sec (ix,nzm) ! Buoyancy flux, K*m/s - real, parameter :: zero=0.0d0, one=1.0d0, half=0.5d0, two=2.0d0, eps=0.622d0, & - three=3.0d0, oneb3=one/three, twoby3=two/three, fourb3=twoby3+twoby3 - real, parameter :: sqrt2 = sqrt(two), twoby15 = two / 15.d0, & - nmin = 1.0d0, RI_cub = 6.4d-14, RL_cub = 1.0d-15, & - skew_facw=1.2d0, skew_fact=0.d0, & - tkhmax=300.d0, qcmin=1.0d-9 - real :: lsub, fac_cond, fac_fus, cpolv, fac_sub, ggri, kapa, gocp, & + real, parameter :: zero=0.0_r8, one=1.0_r8, half=0.5_r8, two=2.0_r8, eps=0.622_r8, & + three=3.0_r8, oneb3=one/three, twoby3=two/three, fourb3=twoby3+twoby3 + real, parameter :: sqrt2 = sqrt(two), twoby15 = two / 15.0_r8, & + nmin = 1.0_r8, RI_cub = 6.4e-14_r8, RL_cub = 1.0e-15_r8, & + skew_facw=1.2_r8, skew_fact=0.0_r8, & + tkhmax=300.0_r8, qcmin=1.0e-9_r8 + real :: lsub, fac_cond, fac_fus, cpolv, fac_sub, ggri, kapa, gocp, & rog, sqrtpii, epsterm, onebeps, onebrvcp ! SHOC tunable parameters - real, parameter :: lambda = 0.04d0 -! real, parameter :: min_tke = 1.0d-6 ! Minumum TKE value, m**2/s**2 - real, parameter :: min_tke = 1.0d-4 ! Minumum TKE value, m**2/s**2 -! real, parameter :: max_tke = 100.0d0 ! Maximum TKE value, m**2/s**2 - real, parameter :: max_tke = 40.0d0 ! Maximum TKE value, m**2/s**2 + real, parameter :: lambda = 0.04_r8 +! real, parameter :: min_tke = 1.0e-6_r8 ! Minumum TKE value, m**2/s**2 + real, parameter :: min_tke = 1.0e-4_r8 ! Minumum TKE value, m**2/s**2 +! real, parameter :: max_tke = 100.0_r8 ! Maximum TKE value, m**2/s**2 + real, parameter :: max_tke = 40.0_r8 ! Maximum TKE value, m**2/s**2 ! Maximum turbulent eddy length scale, m -! real, parameter :: max_eddy_length_scale = 2000.0d0 - real, parameter :: max_eddy_length_scale = 1000.0d0 +! real, parameter :: max_eddy_length_scale = 2000.0_r8 + real, parameter :: max_eddy_length_scale = 1000.0_r8 ! Maximum "return-to-isotropy" time scale, s - real, parameter :: max_eddy_dissipation_time_scale = 2000.d0 - real, parameter :: Pr = 1.0d0 ! Prandtl number + real, parameter :: max_eddy_dissipation_time_scale = 2000.0_r8 + real, parameter :: Pr = 1.0_r8 ! Prandtl number ! Constants for the TKE dissipation term based on Deardorff (1980) - real, parameter :: pt19=0.19d0, pt51=0.51d0, pt01=0.01d0, atmin=0.01d0, atmax=one-atmin - real, parameter :: Cs = 0.15d0, epsln=1.0d-6 -! real, parameter :: Ck = 0.2d0 ! Coeff in the eddy diffusivity - TKE relationship, see Eq. 7 in BK13 - real, parameter :: Ck = 0.1d0 ! Coeff in the eddy diffusivity - TKE relationship, see Eq. 7 in BK13 + real, parameter :: pt19=0.19_r8, pt51=0.51_r8, pt01=0.01_r8, atmin=0.01_r8, atmax=one-atmin + real, parameter :: Cs = 0.15_r8, epsln=1.0e-6_r8 +! real, parameter :: Ck = 0.2_r8 ! Coeff in the eddy diffusivity - TKE relationship, see Eq. 7 in BK13 + real, parameter :: Ck = 0.1_r8 ! Coeff in the eddy diffusivity - TKE relationship, see Eq. 7 in BK13 ! real, parameter :: Ce = Ck**3/(0.7*Cs**4) ! real, parameter :: Ce = Ck**3/(0.7*Cs**4) * 2.2 @@ -260,29 +261,29 @@ subroutine shoc_work (ix, nx, nzm, nz, dtn, & real, parameter :: Ce = Ck**3/Cs**4, Ces = Ce ! real, parameter :: Ce = Ck**3/Cs**4, Ces = Ce*3.0/0.7 -! real, parameter :: vonk=0.35 ! Von Karman constant - real, parameter :: vonk=0.4d0 ! Von Karman constant Moorthi - as in GFS - real, parameter :: tscale=400.0d0 ! time scale set based off of similarity results of BK13, s - real, parameter :: w_tol_sqd = 4.0d-04 ! Min vlaue of second moment of w -! real, parameter :: w_tol_sqd = 1.0e-04 ! Min vlaue of second moment of w - real, parameter :: w_thresh = 0.0d0, thresh = 0.0d0 - real, parameter :: w3_tol = 1.0d-20 ! Min vlaue of third moment of w +! real, parameter :: vonk=0.35 ! Von Karman constant + real, parameter :: vonk=0.4_r8 ! Von Karman constant Moorthi - as in GFS + real, parameter :: tscale=400.0_r8 ! time scale set based off of similarity results of BK13, s + real, parameter :: w_tol_sqd = 4.0e-04_r8 ! Min vlaue of second moment of w +! real, parameter :: w_tol_sqd = 1.0e-04_r8 ! Min vlaue of second moment of w + real, parameter :: w_thresh = 0.0_r8, thresh = 0.0_r8 + real, parameter :: w3_tol = 1.0e-20_r8 ! Min vlaue of third moment of w ! These parameters are a tie-in with a microphysical scheme ! Double check their values for the Zhao-Carr scheme. - real, parameter :: tbgmin = 233.16d0 ! Minimum temperature for cloud water., K (ZC) -! real, parameter :: tbgmin = 258.16d0 ! Minimum temperature for cloud water., K (ZC) -! real, parameter :: tbgmin = 253.16d0 ! Minimum temperature for cloud water., K - real, parameter :: tbgmax = 273.16d0 ! Maximum temperature for cloud ice, K + real, parameter :: tbgmin = 233.16_r8 ! Minimum temperature for cloud water., K (ZC) +! real, parameter :: tbgmin = 258.16_r8 ! Minimum temperature for cloud water., K (ZC) +! real, parameter :: tbgmin = 253.16_r8 ! Minimum temperature for cloud water., K + real, parameter :: tbgmax = 273.16_r8 ! Maximum temperature for cloud ice, K real, parameter :: a_bg = one/(tbgmax-tbgmin) ! ! Parameters to tune the second order moments- No tuning is performed currently -! real, parameter :: thl2tune = 2.0d0, qw2tune = 2.0d0, qwthl2tune = 2.0d0, & - real, parameter :: thl2tune = 1.0d0, qw2tune = 1.0d0, qwthl2tune = 1.0d0, & -! thl_tol = 1.0d-4, rt_tol = 1.0d-8, basetemp = 300.0d0 - thl_tol = 1.0d-2, rt_tol = 1.0d-4 +! real, parameter :: thl2tune = 2.0_r8, qw2tune = 2.0_r8, qwthl2tune = 2.0_r8, & + real, parameter :: thl2tune = 1.0_r8, qw2tune = 1.0_r8, qwthl2tune = 1.0_r8, & +! thl_tol = 1.0e-4_r8, rt_tol = 1.0e-8_r8, basetemp = 300.0_r8 + thl_tol = 1.0e-2_r8, rt_tol = 1.0e-4_r8 integer, parameter :: nitr=6 @@ -454,7 +455,7 @@ subroutine shoc_work (ix, nx, nzm, nz, dtn, & ! total_water(i,k) = qcl(i,k) + qci(i,k) + qv(i,k) - prespot = (100000.0d0*wrk) ** kapa ! Exner function + prespot = (100000.0_r8*wrk) ** kapa ! Exner function bet(i,k) = ggr/(tabs(i,k)*prespot) ! Moorthi thv(i,k) = thv(i,k)*prespot ! Moorthi ! @@ -636,8 +637,8 @@ subroutine tke_shoc() if (dis_opt > 0) then do i=1,nx - wrk = (zl(i,k)-zi(i,1)) / adzl(i,1) + 1.5d0 - cek(i) = (one + two / max((wrk*wrk - 3.3d0), 0.5d0)) * cefac + wrk = (zl(i,k)-zi(i,1)) / adzl(i,1) + 1.5_r8 + cek(i) = (one + two / max((wrk*wrk - 3.3_r8), 0.5_r8)) * cefac enddo else if (k == 1) then @@ -661,7 +662,7 @@ subroutine tke_shoc() !Obtain Brunt-Vaisalla frequency from diagnosed SGS buoyancy flux !Presumably it is more precise than BV freq. calculated in eddy_length()? - buoy_sgs = - (a_prod_bu+a_prod_bu) / (tkh(i,ku)+tkh(i,kd) + 0.0001d0) ! tkh is eddy thermal diffussivity + buoy_sgs = - (a_prod_bu+a_prod_bu) / (tkh(i,ku)+tkh(i,kd) + 0.0001_r8) ! tkh is eddy thermal diffussivity !Compute $c_k$ (variable Cee) for the TKE dissipation term following Deardorff (1980) @@ -669,7 +670,7 @@ subroutine tke_shoc() if (buoy_sgs <= zero) then smix = grd else - smix = min(grd,max(0.1d0*grd, 0.76d0*sqrt(tke(i,k)/(buoy_sgs+1.0d-10)))) + smix = min(grd,max(0.1_r8*grd, 0.76_r8*sqrt(tke(i,k)/(buoy_sgs+1.0e-10_r8)))) endif ratio = smix/grd @@ -811,9 +812,9 @@ subroutine eddy_length() ! Calculate the measure of PBL depth, Eq. 11 in BK13 (Is this really PBL depth?) do i=1,nx if (denom(i) > zero .and. numer(i) > zero) then - l_inf(i) = min(0.1d0 * (numer(i)/denom(i)), 100.0d0) + l_inf(i) = min(0.1_r8 * (numer(i)/denom(i)), 100.0_r8) else - l_inf(i) = 100.0d0 + l_inf(i) = 100.0_r8 endif enddo @@ -849,7 +850,7 @@ subroutine eddy_length() ! Find the in-cloud Brunt-Vaisalla frequency - omn = qcl(i,k) / (wrk+1.0d-20) ! Ratio of liquid water to total water + omn = qcl(i,k) / (wrk+1.0e-20_r8) ! Ratio of liquid water to total water ! Latent heat of phase transformation based on relative water phase content ! fac_cond = lcond/cp, fac_fus = lfus/cp @@ -868,7 +869,7 @@ subroutine eddy_length() ! liquid/ice moist static energy static energy divided by cp? bbb = (one + epsv*qsatt-wrk-qpl(i,k)-qpi(i,k) & - + 1.61d0*tabs(i,k)*dqsat) / (one+lstarn*dqsat) + + 1.61_r8*tabs(i,k)*dqsat) / (one+lstarn*dqsat) ! Calculate Brunt-Vaisalla frequency using centered differences in the vertical @@ -918,7 +919,7 @@ subroutine eddy_length() wrk1 = one / (tscale*tkes*vonk*zl(i,k)) wrk2 = one / (tscale*tkes*l_inf(i)) wrk1 = wrk1 + wrk2 + pt01 * brunt2(i,k) / tke(i,k) - wrk1 = sqrt(one / max(wrk1,1.0d-8)) * (one/0.3d0) + wrk1 = sqrt(one / max(wrk1,1.0e-8_r8)) * (one/0.3_r8) ! smixt(i,k) = min(max_eddy_length_scale, 2.8284*sqrt(wrk1)/0.3) smixt(i,k) = min(max_eddy_length_scale, wrk1) @@ -989,7 +990,7 @@ subroutine eddy_length() ! The calculation below finds the integral in the Eq. 10 in BK13 for the current cloud conv_var = zero do kk=kl,ku - conv_var = conv_var+ 2.5d0*adzi(i,kk)*bet(i,kk)*wthv_sec(i,kk) + conv_var = conv_var+ 2.5_r8*adzi(i,kk)*bet(i,kk)*wthv_sec(i,kk) enddo conv_var = conv_var ** oneb3 @@ -1006,7 +1007,7 @@ subroutine eddy_length() wrk = conv_var/(depth*depth*sqrt(tke(i,kk))) & + pt01*brunt2(i,kk)/tke(i,kk) - smixt(i,kk) = min(max_eddy_length_scale, (one/0.3d0)*sqrt(one/wrk)) + smixt(i,kk) = min(max_eddy_length_scale, (one/0.3_r8)*sqrt(one/wrk)) enddo @@ -1053,7 +1054,7 @@ subroutine conv_scale() !********************************************************************** conv_vel2(i,k) = conv_vel2(i,k-1) & - + 2.5d0*adzi(i,k)*bet(i,k)*wthv_sec(i,k) + + 2.5_r8*adzi(i,k)*bet(i,k)*wthv_sec(i,k) enddo enddo @@ -1084,7 +1085,7 @@ subroutine check_eddy() do i=1,nx - wrk = 0.1d0*adzl(i,k) + wrk = 0.1_r8*adzl(i,k) ! Minimum 0.1 of local dz smixt(i,k) = max(wrk, min(max_eddy_length_scale,smixt(i,k))) @@ -1092,7 +1093,7 @@ subroutine check_eddy() ! be not larger that that. ! if (sqrt(dx*dy) .le. 1000.) smixt(i,k)=min(sqrt(dx*dy),smixt(i,k)) - if (qcl(i,kb) == zero .and. qcl(i,k) > zero .and. brunt(i,k) > 1.0d-4) then + if (qcl(i,kb) == zero .and. qcl(i,k) > zero .and. brunt(i,k) > 1.0e-4_r8) then !If just above the cloud top and atmosphere is stable, set to 0.1 of local dz smixt(i,k) = wrk endif @@ -1118,10 +1119,10 @@ subroutine canuto() ! cond, wrk, wrk1, wrk2, wrk3, avew ! ! See Eq. 7 in C01 (B.7 in Pete's dissertation) - real, parameter :: c=7.0d0, a0=0.52d0/(c*c*(c-2.0d0)), a1=0.87d0/(c*c), & - a2=0.5d0/c, a3=0.6d0/(c*(c-2.0d0)), a4=2.4d0/(3.0d0*c+5.0d0), & - a5=0.6d0/(c*(3.0d0*c+5.0d0)) -!Moorthi a5=0.6d0/(c*(3.0d0+5.0d0*c)) + real, parameter :: c=7.0_r8, a0=0.52_r8/(c*c*(c-2.0_r8)), a1=0.87_r8/(c*c), & + a2=0.5_r8/c, a3=0.6_r8/(c*(c-2.0_r8)), a4=2.4_r8/(3.0_r8*c+5.0_r8), & + a5=0.6_r8/(c*(3.0_r8*c+5.0_r8)) +!Moorthi a5=0.6_r8/(c*(3.0_r8+5.0_r8*c)) ! do k=1,nzm do k=2,nzm @@ -1211,7 +1212,7 @@ subroutine canuto() omega0 = a4 / (one-a5*buoy_sgs2) omega1 = omega0 / (c+c) - omega2 = omega1*f3+(5.0d0/4.0d0)*omega0*f4 + omega2 = omega1*f3+(5.0_r8/4.0_r8)*omega0*f4 ! Compute the X0, Y0, X1, Y1 terms, see Eq. 5 a-b in C01 (B.5 in Pete's dissertation) @@ -1234,7 +1235,7 @@ subroutine canuto() !aab ! Implemetation of the C01 approach in this subroutine is nearly complete @@ -1288,7 +1289,7 @@ subroutine assumed_pdf() diag_qi = zero pval = prsl(i,k) - pfac = pval * 1.0d-5 + pfac = pval * 1.0e-5_r8 pkap = pfac ** kapa ! Read in liquid/ice static energy, total water mixing ratio, @@ -1362,21 +1363,21 @@ subroutine assumed_pdf() ELSE !aab Skew_w = w3var / (sqrtw2*sqrtw2*sqrtw2) ! Moorthi ! Proportionality coefficients between widths of each vertical velocity ! gaussian and the sqrt of the second moment of w - w2_1 = 0.4d0 - w2_2 = 0.4d0 + w2_1 = 0.4_r8 + w2_2 = 0.4_r8 ! Compute realtive weight of the first PDF "plume" ! See Eq A4 in Pete's dissertaion - Ensure 0.01 < a < 0.99 wrk = one - w2_1 - aterm = max(atmin,min(half*(one-Skew_w*sqrt(one/(4.0d0*wrk*wrk*wrk+Skew_w*Skew_w))),atmax)) + aterm = max(atmin,min(half*(one-Skew_w*sqrt(one/(4.0_r8*wrk*wrk*wrk+Skew_w*Skew_w))),atmax)) onema = one - aterm sqrtw2t = sqrt(wrk) @@ -1415,8 +1416,8 @@ subroutine assumed_pdf() ! wrk4 = - aterm*wrk1*thl1_1 - onema*wrk2*thl1_2 wrk = three * (thl1_2-thl1_1) if (wrk /= zero) then - thl2_1 = thlsec * min(100.0d0,max(zero,(thl1_2*wrk3-wrk4)/(aterm*wrk))) ! A.10 - thl2_2 = thlsec * min(100.0d0,max(zero,(-thl1_1*wrk3+wrk4)/(onema*wrk))) ! A.11 + thl2_1 = thlsec * min(100.0_r8,max(zero,(thl1_2*wrk3-wrk4)/(aterm*wrk))) ! A.10 + thl2_2 = thlsec * min(100.0_r8,max(zero,(-thl1_1*wrk3+wrk4)/(onema*wrk))) ! A.11 else thl2_1 = zero thl2_2 = zero @@ -1450,12 +1451,12 @@ subroutine assumed_pdf() ! Skew_qw = skew_facw*Skew_w - IF (tsign > 0.4d0) THEN + IF (tsign > 0.4_r8) THEN Skew_qw = skew_facw*Skew_w - ELSEIF (tsign <= 0.2d0) THEN + ELSEIF (tsign <= 0.2_r8) THEN Skew_qw = zero ELSE - Skew_qw = (skew_facw/0.2d0) * Skew_w * (tsign-0.2d0) + Skew_qw = (skew_facw/0.2_r8) * Skew_w * (tsign-0.2_r8) ENDIF wrk1 = qw1_1 * qw1_1 @@ -1465,8 +1466,8 @@ subroutine assumed_pdf() wrk = three * (qw1_2-qw1_1) if (wrk /= zero) then - qw2_1 = qwsec * min(100.0d0,max(zero,( qw1_2*wrk3-wrk4)/(aterm*wrk))) ! A.10 - qw2_2 = qwsec * min(100.0d0,max(zero,(-qw1_1*wrk3+wrk4)/(onema*wrk))) ! A.11 + qw2_1 = qwsec * min(100.0_r8,max(zero,( qw1_2*wrk3-wrk4)/(aterm*wrk))) ! A.10 + qw2_2 = qwsec * min(100.0_r8,max(zero,(-qw1_1*wrk3+wrk4)/(onema*wrk))) ! A.11 else qw2_1 = zero qw2_2 = zero @@ -1512,18 +1513,18 @@ subroutine assumed_pdf() IF (Tl1_1 >= tbgmax) THEN lstarn1 = lcond esval = min(fpvsl(Tl1_1), pval) - qs1 = eps * esval / (pval-0.378d0*esval) + qs1 = eps * esval / (pval-0.378_r8*esval) ELSE IF (Tl1_1 <= tbgmin) THEN lstarn1 = lsub esval = min(fpvsi(Tl1_1), pval) - qs1 = epss * esval / (pval-0.378d0*esval) + qs1 = epss * esval / (pval-0.378_r8*esval) ELSE om1 = max(zero, min(one, a_bg*(Tl1_1-tbgmin))) lstarn1 = lcond + (one-om1)*lfus esval = min(fpvsl(Tl1_1), pval) esval2 = min(fpvsi(Tl1_1), pval) - qs1 = om1 * eps * esval / (pval-0.378d0*esval) & - + (one-om1) * epss * esval2 / (pval-0.378d0*esval2) + qs1 = om1 * eps * esval / (pval-0.378_r8*esval) & + + (one-om1) * epss * esval2 / (pval-0.378_r8*esval2) ENDIF ! beta1 = (rgas/rv)*(lstarn1/(rgas*Tl1_1))*(lstarn1/(cp*Tl1_1)) @@ -1542,18 +1543,18 @@ subroutine assumed_pdf() IF (Tl1_2 >= tbgmax) THEN lstarn2 = lcond esval = min(fpvsl(Tl1_2), pval) - qs2 = eps * esval / (pval-0.378d0*esval) + qs2 = eps * esval / (pval-0.378_r8*esval) ELSE IF (Tl1_2 <= tbgmin) THEN lstarn2 = lsub esval = min(fpvsi(Tl1_2), pval) - qs2 = epss * esval / (pval-0.378d0*esval) + qs2 = epss * esval / (pval-0.378_r8*esval) ELSE om2 = max(zero, min(one, a_bg*(Tl1_2-tbgmin))) lstarn2 = lcond + (one-om2)*lfus esval = min(fpvsl(Tl1_2), pval) esval2 = min(fpvsi(Tl1_2), pval) - qs2 = om2 * eps * esval / (pval-0.378d0*esval) & - + (one-om2) * epss * esval2 / (pval-0.378d0*esval2) + qs2 = om2 * eps * esval / (pval-0.378_r8*esval) & + + (one-om2) * epss * esval2 / (pval-0.378_r8*esval2) ENDIF ! beta2 = (rgas/rv)*(lstarn2/(rgas*Tl1_2))*(lstarn2/(cp*Tl1_2)) ! A.18 @@ -1663,14 +1664,14 @@ subroutine assumed_pdf() ! Update ncpl and ncpi Moorthi 12/12/2018 if (ntlnc > 0) then ! liquid and ice number concentrations predicted if (ncpl(i,k) > nmin) then - ncpl(i,k) = diag_ql/max(qc(i,k),1.0d-10)*ncpl(i,k) + ncpl(i,k) = diag_ql/max(qc(i,k),1.0e-10_r8)*ncpl(i,k) else - ncpl(i,k) = max(diag_ql/(fourb3*pi*RL_cub*997.0d0), nmin) + ncpl(i,k) = max(diag_ql/(fourb3*pi*RL_cub*997.0_r8), nmin) endif if (ncpi(i,k) > nmin) then - ncpi(i,k) = diag_qi/max(qi(i,k),1.0d-10)*ncpi(i,k) + ncpi(i,k) = diag_qi/max(qi(i,k),1.0e-10_r8)*ncpi(i,k) else - ncpi(i,k) = max(diag_qi/(fourb3*pi*RI_cub*500.0d0), nmin) + ncpi(i,k) = max(diag_qi/(fourb3*pi*RI_cub*500.0_r8), nmin) endif endif diff --git a/physics/get_prs_fv3.F90 b/physics/get_prs_fv3.F90 index dd5871896..352a61895 100644 --- a/physics/get_prs_fv3.F90 +++ b/physics/get_prs_fv3.F90 @@ -8,7 +8,7 @@ module get_prs_fv3 !--- local variables real(kind=kind_phys), parameter :: zero = 0.0_kind_phys - real(kind=kind_phys), parameter :: half = 0.5_kind_phys + real(kind=kind_phys), parameter :: one = 1.0_kind_phys contains @@ -50,7 +50,7 @@ subroutine get_prs_fv3_run(ix, levs, phii, prsi, tgrs, qgrs1, del, del_gz, errms do i=1,ix del(i,k) = prsi(i,k) - prsi(i,k+1) del_gz(i,k) = (phii(i,k+1) - phii(i,k)) / & - (tgrs(i,k)*(1.+con_fvirt*max(zero,qgrs1(i,k)))) + (tgrs(i,k)*(one + con_fvirt*max(zero,qgrs1(i,k)))) enddo enddo @@ -78,6 +78,7 @@ module get_phi_fv3 !--- local variables real(kind=kind_phys), parameter :: zero = 0.0_kind_phys real(kind=kind_phys), parameter :: half = 0.5_kind_phys + real(kind=kind_phys), parameter :: one = 1.0_kind_phys contains @@ -118,7 +119,7 @@ subroutine get_phi_fv3_run(ix, levs, gt0, gq01, del_gz, phii, phil, errmsg, errf do k=1,levs do i=1,ix del_gz(i,k) = del_gz(i,k)*gt0(i,k) * & - & (1.+con_fvirt*max(zero,gq01(i,k))) + & (one + con_fvirt*max(zero,gq01(i,k))) phii(i,k+1) = phii(i,k) + del_gz(i,k) phil(i,k) = half*(phii(i,k) + phii(i,k+1)) enddo diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index ba7963e7d..aa2e70549 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -175,13 +175,14 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & !------------------------------------ ! input ! real, parameter :: r_air = 3.47d-3 - real, parameter :: one=1.0_kind_phys, oneb3=one/3.0_kind_phys, onebcp=one/cp, & - zero=0.0_kind_phys, half=0.5_kind_phys, onebg=one/grav, & - & kapa=rgas*onebcp, cpbg=cp/grav, & - & lvbcp=hvap*onebcp, lsbcp=(hvap+hfus)*onebcp, & - & qsmall=1.0e-14_kind_phys, rainmin = 1.0e-13_kind_phys, & - & fourb3=4.0_kind_phys/3.0_kind_phys, RL_cub=1.0e-15_kind_phys, & - & nmin=1.0_kind_phys + integer, parameter :: r8 = kind_phys + real, parameter :: one=1.0_r8, oneb3=one/3.0_r8, onebcp=one/cp, & + zero=0.0_r8, half=0.5_r8, onebg=one/grav, & + & kapa=rgas*onebcp, cpbg=cp/grav, & + & lvbcp=hvap*onebcp, lsbcp=(hvap+hfus)*onebcp, & + & qsmall=1.0e-14_r8, rainmin = 1.0e-13_r8, & + & fourb3=4.0_r8/3.0_r8, RL_cub=1.0e-15_r8, & + & nmin=1.0_r8 integer, parameter :: ncolmicro = 1 integer,intent(in) :: im, ix,lm, kdt, fprcp, pdfflag, iccn @@ -355,27 +356,27 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! real (kind=kind_phys), parameter :: disp_liu=2., ui_scale=1.0 & ! &, dcrit=20.0d-6 & - real (kind=kind_phys), parameter :: disp_liu=1.0_kind_phys & - &, ui_scale=1.0_kind_phys & - &, dcrit=1.0e-6_kind_phys & + real (kind=kind_phys), parameter :: disp_liu=1.0_r8 & + &, ui_scale=1.0_r8 & + &, dcrit=1.0e-6_r8 & ! &, ts_autice=1800.0 & ! &, ts_autice=3600.0 & !time scale - &, ninstr8 = 0.1e6_kind_phys & - &, ncnstr8 = 100.0e6_kind_phys + &, ninstr8 = 0.1e6_r8 & + &, ncnstr8 = 100.0e6_r8 real(kind=kind_phys):: k_gw, maxkh, tausurf_gw, overscale, tx1, rh1_r8 real(kind=kind_phys):: t_ice_denom integer, dimension(1) :: lev_sed_strt ! sedimentation start level - real(kind=kind_phys), parameter :: sig_sed_strt=0.05_kind_phys ! normalized pressure at sedimentation start + real(kind=kind_phys), parameter :: sig_sed_strt=0.05_r8 ! normalized pressure at sedimentation start real(kind=kind_phys),dimension(3) :: ccn_diag real(kind=kind_phys),dimension(58) :: cloudparams integer, parameter :: CCN_PARAM=2, IN_PARAM=5 - real(kind=kind_phys), parameter ::fdust_drop=1.0_kind_phys, fsoot_drop=0.1_kind_phys & - &, sigma_nuc_r8=0.28_kind_phys,SCLMFDFR=0.03_kind_phys + real(kind=kind_phys), parameter ::fdust_drop=1.0_r8, fsoot_drop=0.1_r8 & + &, sigma_nuc_r8=0.28_r8,SCLMFDFR=0.03_r8 ! &, sigma_nuc_r8=0.28,SCLMFDFR=0.1 type (AerProps), dimension (IM,LM) :: AeroProps @@ -390,22 +391,22 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & !================== Start Stratiform cloud processes========================================== !set up initial values - data USE_AV_V/1./, BKGTAU/0.015/, LCCIRRUS/500./, NPRE_FRAC/1./, & - & TMAXLL/296./, fracover/1./, LTS_LOW/12./, LTS_UP/24./, & - & MIN_EXP/0.5/ - - data cloudparams/ & - & 10.0, 4.0 , 4.0 , 1.0 , 2.e-3, 8.e-4, 2.0 , 1.0 , -1.0 & - &, 0.0 , 1.3 , 1.0e-9, 3.3e-4, 20.0 , 4.8 , 4.8 , 230.0 , 1.0 & - &, 1.0 , 230.0, 14400., 50.0 , 0.01 , 0.1 , 200.0, 0.0 , 0.0 & - &, 0.5 , 0.5 , 2000.0, 0.8 , 0.5 , -40.0, 1.0 , 4.0 , 0.0 & - &, 0.0 , 0.0 , 1.0e-3, 8.0e-4, 1.0 , 0.95 , 1.0 , 0.0 , 900.0& -! &, 0.0 , 0.0 , 1.0e-3, 8.0e-4, 1.0 , 0.95 , 1.0 , 0.0 , 880.0& -! &, 0.0 , 0.0 , 1.0e-3, 8.0e-4, 1.0 , 0.95 , 1.0 , 0.0 , 980.0& - &, 1.0 , 1.0 , 1.0 , 0.0 , 0.0 , 1.e-5, 2.e-5, 2.1e-5, 4.e-5& -! &, 3e-5, 0.1 , 4.0 , 250./ ! Annings version - &, 3e-5, 0.1 , 4.0 , 150./ ! Annings version -! &, 3e-5, 0.1 , 1.0 , 150./ + data USE_AV_V/1.0_r8/, BKGTAU/0.015_r8/, LCCIRRUS/500.0_r8/, NPRE_FRAC/1.0_r8/, & + & TMAXLL/296.0_r8/, fracover/1.0_r8/, LTS_LOW/12.0_r8/, LTS_UP/24.0_r8/, & + & MIN_EXP/0.5_r8/ + + data cloudparams/ & + & 10.0_r8, 4.0_r8 , 4.0_r8 , 1.0_r8 , 2.e-3_r8, 8.e-4_r8, 2.0_r8 , 1.0_r8 , -1.0_r8 & + &, 0.0_r8 , 1.3_r8 , 1.0e-9_r8, 3.3e-4_r8, 20.0_r8 , 4.8_r8 , 4.8_r8 , 230.0_r8 , 1.0_r8 & + &, 1.0_r8 , 230.0_r8, 14400._r8, 50.0_r8 , 0.01_r8 , 0.1_r8 , 200.0_r8, 0.0_r8 , 0.0_r8 & + &, 0.5_r8 , 0.5_r8 , 2000.0_r8, 0.8_r8 , 0.5_r8 , -40.0_r8, 1.0_r8 , 4.0_r8 , 0.0_r8 & + &, 0.0_r8 , 0.0_r8 , 1.0e-3_r8, 8.0e-4_r8, 1.0_r8 , 0.95_r8 , 1.0_r8 , 0.0_r8 , 900.0_r8& +! &, 0.0_r8 , 0.0_r8 , 1.0e-3_r8, 8.0e-4_r8, 1.0_r8 , 0.95_r8 , 1.0_r8 , 0.0_r8 , 880.0_r8& +! &, 0.0_r8 , 0.0_r8 , 1.0e-3_r8, 8.0e-4_r8, 1.0_r8 , 0.95_r8 , 1.0_r8 , 0.0_r8 , 980.0_r8& + &, 1.0_r8 , 1.0_r8 , 1.0_r8 , 0.0_r8 , 0.0_r8 , 1.e-5_r8, 2.e-5_r8, 2.1e-5_r8, 4.e-5_r8& +! &, 3e-5_r8, 0.1_r8 , 4.0_r8 , 250.0_r8/ ! Annings version + &, 3e-5_r8, 0.1_r8 , 4.0_r8 , 150.0_r8/ ! Annings version +! &, 3e-5_r8, 0.1_r8 , 1.0_r8 , 150.0_r8/ ! Initialize CCPP error handling variables errmsg = '' @@ -441,7 +442,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & CNV_DQLDT(I,K) = CNV_DQLDT_i(I,ll) CLCN(I,k) = CLCN_i(I,ll) CLLS(I,k) = max(CLLS_io(I,ll)-CLCN_i(I,ll),zero) - PLO(i,k) = prsl_i(i,ll)*0.01_kind_phys + PLO(i,k) = prsl_i(i,ll)*0.01_r8 zlo(i,k) = phil(i,ll) * onebg temp(i,k) = t_io(i,ll) radheat(i,k) = lwheat_i(i,ll) + swheat_i(i,ll) @@ -456,7 +457,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO K=0, LM ll = lm-k DO I = 1,IM - PLE(i,k) = prsi_i(i,ll) * 0.01_kind_phys ! interface pressure in hPa + PLE(i,k) = prsi_i(i,ll) * 0.01_r8 ! interface pressure in hPa zet(i,k+1) = phii(i,ll) * onebg END DO END DO @@ -501,7 +502,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & CNV_DQLDT(I,K) = CNV_DQLDT_i(I,k) CLCN(I,k) = CLCN_i(I,k) CLLS(I,k) = max(CLLS_io(I,k)-CLCN_i(I,k),zero) - PLO(i,k) = prsl_i(i,k)*0.01_kind_phys + PLO(i,k) = prsl_i(i,k)*0.01_r8 zlo(i,k) = phil(i,k) * onebg temp(i,k) = t_io(i,k) radheat(i,k) = lwheat_i(i,k) + swheat_i(i,k) @@ -515,7 +516,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & END DO DO K=0, LM DO I = 1,IM - PLE(i,k) = prsi_i(i,k) * 0.01_kind_phys ! interface pressure in hPa + PLE(i,k) = prsi_i(i,k) * 0.01_r8 ! interface pressure in hPa zet(i,k+1) = phii(i,k) * onebg END DO END DO @@ -554,17 +555,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kind_phys), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_r8), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) endif enddo @@ -578,8 +579,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO I=1, IM DO K = LM-2, 10, -1 - If ((CNV_DQLDT(I,K) <= 1.0e-9_kind_phys) .and. & - & (CNV_DQLDT(I,K+1) > 1.0e-9_kind_phys)) then + If ((CNV_DQLDT(I,K) <= 1.0e-9_r8) .and. & + & (CNV_DQLDT(I,K+1) > 1.0e-9_r8)) then KCT(I) = K+1 exit end if @@ -659,7 +660,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do l=lm-1,1,-1 do i=1,im tx1 = half * (temp(i,l+1) + temp(i,l)) - kh(i,l) = 3.55e-7_kind_phys*tx1**2.5_kind_phys*(rgas*0.01_kind_phys) / ple(i,l) !kh molecule diff only needing refinement + kh(i,l) = 3.55e-7_r8*tx1**2.5_r8*(rgas*0.01_r8) / ple(i,l) !kh molecule diff only needing refinement enddo end do do i=1,im @@ -668,8 +669,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & enddo do L=LM,1,-1 do i=1,im - blk_l(i,l) = one / ( one/max(0.15_kind_phys*ZPBL(i),0.4_kind_phys*zlo(i,lm-1))& - & + one/(zlo(i,l)*0.4_kind_phys) ) + blk_l(i,l) = one / ( one/max(0.15_r8*ZPBL(i),0.4_r8*zlo(i,lm-1))& + & + one/(zlo(i,l)*0.4_r8) ) SC_ICE(i,l) = one NCPL(i,l) = MAX( NCPL(i,l), zero) @@ -688,8 +689,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do l=1,lm - rhdfdar8(l) = 1.e-8_kind_phys - rhu00r8(l) = 0.95_kind_phys + rhdfdar8(l) = 1.e-8_r8 + rhu00r8(l) = 0.95_r8 ttendr8(l) = zero qtendr8(l) = zero @@ -699,7 +700,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & enddo do k=1,10 do l=1,lm - rndstr8(l,k) = 2.0d-7 + rndstr8(l,k) = 2.0e-7_r8 enddo enddo @@ -734,8 +735,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if ( iccn == 2) then AERMASSMIX(:,:,1:ntrcaer) = aerfld_i(:,:,1:ntrcaer) else - AERMASSMIX(:,:,1:5) = 1.0e-6_kind_phys - AERMASSMIX(:,:,6:15) = 2.0e-14_kind_phys + AERMASSMIX(:,:,1:5) = 1.0e-6_r8 + AERMASSMIX(:,:,6:15) = 2.0e-14_r8 end if !> - Call aerconversion1() call AerConversion1 (AERMASSMIX, AeroProps) @@ -754,23 +755,23 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & kcldtopcvn = KCT(I) tausurf_gw = min(half*SQRT(TAUOROX(I)*TAUOROX(I) & - & + TAUOROY(I)*TAUOROY(I)), 10.0_kind_phys) + & + TAUOROY(I)*TAUOROY(I)), 10.0_r8) do k=1,lm uwind_gw(k) = min(half*SQRT( U1(I,k)*U1(I,k) & - & + V1(I,k)*V1(I,k)), 50.0_kind_phys) + & + V1(I,k)*V1(I,k)), 50.0_r8) ! tausurf_gw =tausurf_gw + max (tausurf_gw, min(0.5*SQRT(TAUX(I , J)**2+TAUY(I , J)**2), 10.0)*BKGTAU) !adds a minimum value from unresolved sources - pm_gw(k) = 100.0_kind_phys*PLO(I,k) + pm_gw(k) = 100.0_r8*PLO(I,k) tm_gw(k) = TEMP(I,k) nm_gw(k) = zero rho_gw(k) = pm_gw(k) /(RGAS*tm_gw(k)) ter8(k) = TEMP(I,k) - plevr8(k) = 100.0_kind_phys*PLO(I,k) + plevr8(k) = 100.0_r8*PLO(I,k) ndropr8(k) = NCPL(I,k) qir8(k) = QILS(I,k) + QICN(I,k) qcr8(k) = QLLS(I,k) + QLCN(I,k) @@ -781,27 +782,27 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & npre8(k) = zero - if (RAD_CF(I,k) > 0.01_kind_phys .and. qir8(k) > zero) then + if (RAD_CF(I,k) > 0.01_r8 .and. qir8(k) > zero) then npre8(k) = NPRE_FRAC*NCPI(I,k) else npre8(k) = zero endif omegr8(k) = OMEGA(I,k) - lc_turb(k) = max(blk_l(I,k), 50.0_kind_phys) + lc_turb(k) = max(blk_l(I,k), 50.0_r8) ! rad_cooling(k) = RADheat(I,k) if (npre8(k) > zero .and. qir8(k) > zero) then - dpre8(k) = ( qir8(k)/(6.0_kind_phys*npre8(k)*900.0_kind_phys*PI))**(one/3.0_kind_phys) + dpre8(k) = ( qir8(k)/(6.0_r8*npre8(k)*900.0_r8*PI))**(one/3.0_r8) else - dpre8(k) = 1.0e-9_kind_phys + dpre8(k) = 1.0e-9_r8 endif wparc_ls(k) = -omegr8(k) / (rho_gw(k)*GRAV) & & + cpbg * radheat(i,k) ! & + cpbg * rad_cooling(k) enddo do k=0,lm - pi_gw(k) = 100.0_kind_phys*PLE(I,k) + pi_gw(k) = 100.0_r8*PLE(I,k) rhoi_gw(k) = zero ni_gw(k) = zero ti_gw(k) = zero @@ -817,13 +818,13 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & ti_gw, nm_gw, q1(i,:)) do k=1,lm - nm_gw(k) = max(nm_gw(k), 0.005_kind_phys) + nm_gw(k) = max(nm_gw(k), 0.005_r8) h_gw(k) = k_gw*rho_gw(k)*uwind_gw(k)*nm_gw(k) if (h_gw(K) > zero) then - h_gw(K) = sqrt(2.0_kind_phys*tausurf_gw/h_gw(K)) + h_gw(K) = sqrt(2.0_r8*tausurf_gw/h_gw(K)) end if - wparc_gw(k) = k_gw*uwind_gw(k)*h_gw(k)*0.133_kind_phys + wparc_gw(k) = k_gw*uwind_gw(k)*h_gw(k)*0.133_r8 wparc_cgw(k) = zero end do @@ -840,14 +841,14 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do k=1,kcldtopcvn c2_gw = (nm_gw(k) + Nct) / Nct - wparc_cgw(k) = sqrt(ksa1*fcn*fcn*12.56_kind_phys* & - & 1.806_kind_phys*c2_gw*c2_gw)*Wct*0.133_kind_phys + wparc_cgw(k) = sqrt(ksa1*fcn*fcn*12.56_r8* & + & 1.806_r8*c2_gw*c2_gw)*Wct*0.133_r8 enddo end if do k=1,lm - dummyW(k) = 0.133_kind_phys*k_gw*uwind_gw(k)/nm_gw(k) + dummyW(k) = 0.133_r8*k_gw*uwind_gw(k)/nm_gw(k) enddo do K=1, LM-5, 1 @@ -867,17 +868,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & kbmin = min(kbmin, LM-1) - 4 do K = 1, LM wparc_turb(k) = KH(I,k) / lc_turb(k) - dummyW(k) = 10.0_kind_phys + dummyW(k) = 10.0_r8 enddo - if (FRLAND(I) < 0.1_kind_phys .and. ZPBL(I) < 800.0_kind_phys .and. & - & TEMP(I,LM) < 298.0_kind_phys .and. TEMP(I,LM) > 274.0_kind_phys) then + if (FRLAND(I) < 0.1_r8 .and. ZPBL(I) < 800.0_r8 .and. & + & TEMP(I,LM) < 298.0_r8 .and. TEMP(I,LM) > 274.0_r8) then do K = 1, LM - dummyW(k) = max(min((ZET(I,k+1)-ZPBL(I))*0.01_kind_phys, 10.0_kind_phys),-10.0_kind_phys) + dummyW(k) = max(min((ZET(I,k+1)-ZPBL(I))*0.01_r8, 10.0_r8),-10.0_r8) dummyW(k) = one / (one+exp(dummyW(k))) enddo maxkh = max(maxval(KH(I,kbmin:LM-1)*nm_gw(kbmin:LM-1)/ & - & 0.17_kind_phys), 0.3_kind_phys) + & 0.17_r8), 0.3_r8) do K = 1, LM wparc_turb(k) = (one-dummyW(k))*wparc_turb(k) & & + dummyW(k)*maxkh @@ -885,7 +886,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & end if - wparc_turb(kbmin:LM) = max(wparc_turb(kbmin:LM), 0.2_kind_phys) + wparc_turb(kbmin:LM) = max(wparc_turb(kbmin:LM), 0.2_r8) @@ -903,11 +904,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do K = 1, LM - if (plevr8(K) > 70.0_kind_phys) then + if (plevr8(K) > 70.0_r8) then - ccn_diag(1) = 0.001_kind_phys - ccn_diag(2) = 0.004_kind_phys - ccn_diag(3) = 0.01_kind_phys + ccn_diag(1) = 0.001_r8 + ccn_diag(2) = 0.004_r8 + ccn_diag(3) = 0.01_r8 if (K > 2 .and. K <= LM-2) then tauxr8 = (ter8(K-1) + ter8(K+1) + ter8(K)) * oneb3 @@ -944,7 +945,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! & size(ccn_diag), lprnt) ! if (lprnt) write(0,*)' aft aero npccninr8=',npccninr8(k),' k=',k - if (npccninr8(k) < 1.0d-12) npccninr8(k) = zero + if (npccninr8(k) < 1.0e-12_r8) npccninr8(k) = zero ! CCN01(I,K) = max(ccn_diag(1)*1e-6, 0.0) ! CCN04(I,K) = max(ccn_diag(2)*1e-6, 0.0) @@ -958,7 +959,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & swparc(K) = zero smaxicer8(K) = zero nheticer8(K) = zero - sc_icer8(K) = 2.0_kind_phys + sc_icer8(K) = 2.0_r8 ! sc_icer8(K) = 1.0d0 naair8(K) = zero npccninr8(K) = zero @@ -975,9 +976,9 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! SMAXL(I,k) = smaxliq(k) * 100.0 ! SMAXI(I,k) = smaxicer8(k) * 100.0 - NHET_NUC(I,k) = nheticer8(k) * 1.0e-6_kind_phys - NLIM_NUC(I,k) = nlimicer8(k) * 1.0e-6_kind_phys - SC_ICE(I,k) = min(max(sc_icer8(k),one),2.0_kind_phys) + NHET_NUC(I,k) = nheticer8(k) * 1.0e-6_r8 + NLIM_NUC(I,k) = nlimicer8(k) * 1.0e-6_r8 + SC_ICE(I,k) = min(max(sc_icer8(k),one),2.0_r8) ! SC_ICE(I,k) = min(max(sc_icer8(k),1.0),1.2) ! if(temp(i,k) < T_ICE_ALL) SC_ICE(i,k) = max(SC_ICE(I,k), 1.2) ! if(temp(i,k) < T_ICE_ALL) SC_ICE(i,k) = max(SC_ICE(I,k), 1.5) @@ -987,13 +988,13 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (iccn == 0) then if(temp(i,k) < T_ICE_ALL) then ! SC_ICE(i,k) = max(SC_ICE(I,k), 1.2) - SC_ICE(i,k) = max(SC_ICE(I,k), 1.5_kind_phys) + SC_ICE(i,k) = max(SC_ICE(I,k), 1.5_r8) elseif(temp(i,k) > TICE) then SC_ICE(i,k) = rhc(i,k) else ! SC_ICE(i,k) = 1.0 ! tx1 = max(SC_ICE(I,k), 1.2) - tx1 = max(SC_ICE(I,k), 1.5_kind_phys) + tx1 = max(SC_ICE(I,k), 1.5_r8) SC_ICE(i,k) = ((tice-temp(i,k))*tx1 + (temp(i,k)-t_ice_all)*rhc(i,k)) & * t_ice_denom endif @@ -1004,12 +1005,12 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & endif NHET_IMM(I,k) = max(nhet_immr8(k), zero) DNHET_IMM(I,k) = max(dnhet_immr8(k), zero) - NHET_DEP(I,k) = nhet_depr8(k) * 1.0e-6_kind_phys - NHET_DHF(I,k) = nhet_dhfr8(k) * 1.0e-6_kind_phys - DUST_IMM(I,k) = max(dust_immr8(k), zero)*1.0e-6_kind_phys - DUST_DEP(I,k) = max(dust_depr8(k), zero)*1.0e-6_kind_phys - DUST_DHF(I,k) = max(dust_dhfr8(k), zero)*1.0e-6_kind_phys - WSUB (I,k) = wparc_ls(k) + swparc(k)*0.8_kind_phys + NHET_DEP(I,k) = nhet_depr8(k) * 1.0e-6_r8 + NHET_DHF(I,k) = nhet_dhfr8(k) * 1.0e-6_r8 + DUST_IMM(I,k) = max(dust_immr8(k), zero)*1.0e-6_r8 + DUST_DEP(I,k) = max(dust_depr8(k), zero)*1.0e-6_r8 + DUST_DHF(I,k) = max(dust_dhfr8(k), zero)*1.0e-6_r8 + WSUB (I,k) = wparc_ls(k) + swparc(k)*0.8_r8 SIGW_GW (I,k) = wparc_gw(k) * wparc_gw(k) SIGW_CNV (I,k) = wparc_cgw(k) * wparc_cgw(k) SIGW_TURB (I,k) = wparc_turb(k) * wparc_turb(k) @@ -1122,7 +1123,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do k=1,lm do i=1,im - if (CNV_MFD(i,k) > 1.0e-6_kind_phys) then + if (CNV_MFD(i,k) > 1.0e-6_r8) then tx1 = one / CNV_MFD(i,k) CNV_NDROP(i,k) = CNV_NDROP(i,k) * tx1 CNV_NICE(i,k) = CNV_NICE(i,k) * tx1 @@ -1231,7 +1232,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do l=1,10 do k=1,lm naconr8(k,l) = zero - rndstr8(k,l) = 2.0e-7_kind_phys + rndstr8(k,l) = 2.0e-7_r8 enddo enddo do k=1,lm @@ -1242,7 +1243,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! tx1 = MIN(CLLS(I,k) + CLCN(I,k), 0.99) tx1 = MIN(CLLS(I,k) + CLCN(I,k), one) if (tx1 > zero) then - cldfr8(k) = min(max(tx1, 0.00001_kind_phys), one) + cldfr8(k) = min(max(tx1, 0.00001_r8), one) else cldfr8(k) = zero endif @@ -1278,7 +1279,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & naair8(k) = INC_NUC(I,k) npccninr8(k) = CDNC_NUC(I,k) - if (cldfr8(k) >= 0.001_kind_phys) then + if (cldfr8(k) >= 0.001_r8) then nimmr8(k) = min(DNHET_IMM(I,k),ncr8(k)/(cldfr8(k)*DT_MOIST)) else nimmr8(k) = zero @@ -1306,11 +1307,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! naux = AeroAux_b%nmods ! rnsootr8 (K) = sum(AeroAux_b%dpg(1:naux))/naux - pdelr8(k) = (PLE(I,k) - PLE(I,k-1)) * 100.0_kind_phys + pdelr8(k) = (PLE(I,k) - PLE(I,k-1)) * 100.0_r8 rpdelr8(k) = one / pdelr8(k) - plevr8(k) = 100.0_kind_phys * PLO(I,k) + plevr8(k) = 100.0_r8 * PLO(I,k) zmr8(k) = ZLO(I,k) - ficer8(k) = qir8(k) / (qcr8(k)+qir8(k) + 1.0e-10_kind_phys) + ficer8(k) = qir8(k) / (qcr8(k)+qir8(k) + 1.0e-10_r8) omegr8(k) = WSUB(I,k) ! alphar8(k) = max(alpht_x(i,k)/maxval(alpht_x(i,:))*8.,0.5) ! alphar8(k) = qcvar2 @@ -1318,7 +1319,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & END DO do k=1,lm+1 - pintr8(k) = PLE(I,k-1) * 100.0_kind_phys + pintr8(k) = PLE(I,k-1) * 100.0_r8 kkvhr8(k) = KH(I,k-1) END DO @@ -1403,8 +1404,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! if (lprint) write(0,*)' prectr8=',prectr8(1), & ! & ' precir8=',precir8(1) - LS_PRC2(I) = max(1000.0_kind_phys*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0_kind_phys*precir8(1), zero) + LS_PRC2(I) = max(1000.0_r8*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_r8*precir8(1), zero) do k=1,lm @@ -1422,10 +1423,10 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & NCPR(I,k) = nrr8(k) NCPS(I,k) = nsr8(k) - CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kind_phys), 150.0_kind_phys) - CLDREFFI(I,k) = min(max(effir8(k), 20.0_kind_phys), 150.0_kind_phys) - CLDREFFR(I,k) = max(droutr8(k)*0.5_kind_phys*1.0e6_kind_phys, 150.0_kind_phys) - CLDREFFS(I,k) = max(0.192_kind_phys*dsoutr8(k)*0.5_kind_phys*1.0e6_kind_phys, 250.0_kind_phys) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_r8), 150.0_r8) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_r8), 150.0_r8) + CLDREFFR(I,k) = max(droutr8(k)*0.5_r8*1.0e6_r8, 150.0_r8) + CLDREFFS(I,k) = max(0.192_r8*dsoutr8(k)*0.5_r8*1.0e6_r8, 250.0_r8) enddo ! K loop @@ -1507,8 +1508,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & prer_evap, xlat(i), xlon(i), lprint, iccn, & & lev_sed_strt) ! - LS_PRC2(I) = max(1000.0_kind_phys*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0_kind_phys*precir8(1), zero) + LS_PRC2(I) = max(1000.0_r8*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_r8*precir8(1), zero) do k=1,lm QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 @@ -1522,10 +1523,10 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_r8, zero) NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, zero) - CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kind_phys), 150.0_kind_phys) - CLDREFFI(I,k) = min(max(effir8(k), 20.0_kind_phys), 150.0_kind_phys) - CLDREFFR(I,k) = max(reff_rain(k), 150.0_kind_phys) - CLDREFFS(I,k) = max(reff_snow(k), 250.0_kind_phys) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_r8), 150.0_r8) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_r8), 150.0_r8) + CLDREFFR(I,k) = max(reff_rain(k), 150.0_r8) + CLDREFFS(I,k) = max(reff_snow(k), 250.0_r8) enddo ! K loop ! if (lprint) then ! write(0,*)' aft micro_mg_tend temp= ', temp(i,:) @@ -1536,10 +1537,10 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & LS_PRC2(I) = zero LS_SNR(I) = zero do k=1,lm - CLDREFFL(I,k) = 10.0_kind_phys - CLDREFFI(I,k) = 50.0_kind_phys - CLDREFFR(I,k) = 1000.0_kind_phys - CLDREFFS(I,k) = 250.0_kind_phys + CLDREFFL(I,k) = 10.0_r8 + CLDREFFI(I,k) = 50.0_r8 + CLDREFFR(I,k) = 1000.0_r8 + CLDREFFS(I,k) = 250.0_r8 enddo ! K loop endif ! @@ -1644,8 +1645,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & prer_evap, xlat(i), xlon(i), lprint, iccn, & & lev_sed_strt) - LS_PRC2(I) = max(1000.0_kind_phys*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0_kind_phys*precir8(1), zero) + LS_PRC2(I) = max(1000.0_r8*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_r8*precir8(1), zero) do k=1,lm QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 @@ -1661,11 +1662,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, zero) NCGL(I,k) = max(NCGL(I,k) + ngtend(k)*dt_r8, zero) - CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kind_phys), 150.0_kind_phys) - CLDREFFI(I,k) = min(max(effir8(k), 20.0_kind_phys), 150.0_kind_phys) - CLDREFFR(I,k) = max(reff_rain(k),150.0_kind_phys) - CLDREFFS(I,k) = max(reff_snow(k),250.0_kind_phys) - CLDREFFG(I,k) = max(reff_grau(k),250.0_kind_phys) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_r8), 150.0_r8) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_r8), 150.0_r8) + CLDREFFR(I,k) = max(reff_rain(k), 150.0_r8) + CLDREFFS(I,k) = max(reff_snow(k), 250.0_r8) + CLDREFFG(I,k) = max(reff_grau(k), 250.0_r8) enddo ! K loop ! if (lprint) then ! write(0,*)' aft micro_mg_tend temp= ', temp(i,:) @@ -1676,11 +1677,11 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & LS_PRC2(I) = zero LS_SNR(I) = zero do k=1,lm - CLDREFFL(I,k) = 10.0_kind_phys - CLDREFFI(I,k) = 50.0_kind_phys - CLDREFFR(I,k) = 1000.0_kind_phys - CLDREFFS(I,k) = 250.0_kind_phys - CLDREFFG(I,k) = 250.0_kind_phys + CLDREFFL(I,k) = 10.0_r8 + CLDREFFI(I,k) = 50.0_r8 + CLDREFFR(I,k) = 1000.0_r8 + CLDREFFS(I,k) = 250.0_r8 + CLDREFFG(I,k) = 250.0_r8 enddo ! K loop endif endif @@ -1708,17 +1709,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kind_phys), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_r8), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) endif enddo enddo @@ -1748,17 +1749,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kind_phys), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_r8), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kind_phys), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) endif enddo enddo @@ -1850,7 +1851,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DO I = 1,IM tx1 = LS_PRC2(i) + LS_SNR(i) - rn_o(i) = tx1 * dt_i * 0.001_kind_phys + rn_o(i) = tx1 * dt_i * 0.001_r8 if (rn_o(i) < rainmin) then sr_o(i) = zero @@ -1903,6 +1904,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & use physcons, grav => con_g, cp => con_cp, rgas => con_rd, & fv => con_fvirt implicit none + integer, parameter :: r8 = kind_phys !----------------------------------------------------------------------- ! Compute profiles of background state quantities for the multiple ! gravity wave drag parameterization. @@ -1926,7 +1928,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & real(kind=kind_phys), intent(out) :: nm(pcols,pver) real(kind=kind_phys), parameter :: r=rgas, cpair=cp, g=grav, & - oneocp=1.0d0/cp, n2min=1.0d-8 + oneocp=1.0_r8/cp, n2min=1.0e-8_r8 !---------------------------Local storage------------------------------- integer :: ix,kx @@ -1942,15 +1944,15 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & kx = 0 do ix = 1, ncol ti(ix,kx) = t(ix,kx+1) - rhoi(ix,kx) = pi(ix,kx) / (r*(ti(ix,kx)*(1.0d0+fv*sph(ix,kx+1)))) + rhoi(ix,kx) = pi(ix,kx) / (r*(ti(ix,kx)*(1.0_r8+fv*sph(ix,kx+1)))) ni(ix,kx) = sqrt (g*g / (cpair*ti(ix,kx))) end do ! Interior points use centered differences do kx = 1, pver-1 do ix = 1, ncol - ti(ix,kx) = 0.5d0 * (t(ix,kx) + t(ix,kx+1)) - rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0d0+0.5d0*fv*(sph(ix,kx)+sph(ix,kx+1)))) + ti(ix,kx) = 0.5_r8 * (t(ix,kx) + t(ix,kx+1)) + rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0_r8+0.5_r8*fv*(sph(ix,kx)+sph(ix,kx+1)))) dtdp = (t(ix,kx+1)-t(ix,kx)) / (pm(ix,kx+1)-pm(ix,kx)) n2 = g*g/ti(ix,kx) * (oneocp - rhoi(ix,kx)*dtdp) ni(ix,kx) = sqrt (max (n2min, n2)) @@ -1962,7 +1964,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & kx = pver do ix = 1, ncol ti(ix,kx) = t(ix,kx) - rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0d0+fv*sph(ix,kx))) + rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0_r8+fv*sph(ix,kx))) ni(ix,kx) = ni(ix,kx-1) end do @@ -1971,7 +1973,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & !----------------------------------------------------------------------------- do kx=1,pver do ix=1,ncol - nm(ix,kx) = 0.5d0 * (ni(ix,kx-1) + ni(ix,kx)) + nm(ix,kx) = 0.5_r8 * (ni(ix,kx-1) + ni(ix,kx)) end do end do diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index 8648e631b..bbd03a186 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -182,14 +182,14 @@ subroutine sfc_sice_run & ! --- locals: real (kind=kind_phys), dimension(im) :: ffw, evapi, evapw, & - & sneti, snetw, hfd, hfi, & + & sneti, hfd, hfi, & ! & hflxi, hflxw, sneti, snetw, qssi, qssw, hfd, hfi, hfw, & & focn, snof, rch, rho, & & snowd, theta1 real (kind=kind_phys) :: t12, t14, tem, stsice(im,kmi) &, hflxi, hflxw, q0, qs1, qssi, qssw - real (kind=kind_phys) :: cpinv, hvapi, elocp + real (kind=kind_phys) :: cpinv, hvapi, elocp, snetw integer :: i, k integer, dimension(im) :: islmsk_local @@ -309,11 +309,11 @@ subroutine sfc_sice_run & evapw(i) = elocp * rch(i) * (qssw - q0) ! evap(i) = fice(i)*evapi(i) + ffw(i)*evapw(i) - snetw(i) = sfcdsw(i) * (one - albfw) - snetw(i) = min(3.0_kind_phys*sfcnsw(i) & - & / (one+2.0_kind_phys*ffw(i)), snetw(i)) + snetw = sfcdsw(i) * (one - albfw) + snetw = min(3.0_kind_phys*sfcnsw(i) & + & / (one+2.0_kind_phys*ffw(i)), snetw) !> - Calculate net solar incoming at top \a sneti. - sneti(i) = (sfcnsw(i) - ffw(i)*snetw(i)) / fice(i) + sneti(i) = (sfcnsw(i) - ffw(i)*snetw) / fice(i) t12 = tice(i) * tice(i) t14 = t12 * t12 @@ -337,7 +337,7 @@ subroutine sfc_sice_run & ! --- ... hfw = net heat flux @ water surface (within ice) ! hfw(i) = -dlwflx(i) + sfcemis(i)*sbc*t14 + evapw(i) & -! & + rch(i)*(tgice - theta1(i)) - snetw(i) +! & + rch(i)*(tgice - theta1(i)) - snetw !> - Assigin heat flux from ocean \a focn and snowfall rate as constants, which !! should be from ocean model and other physics. From cb2d558dcc2fbd984a82569edcfe04b749bebeb8 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 30 Apr 2020 09:48:20 -0600 Subject: [PATCH 111/404] fix unitialized parameter and dimensions in FA --- physics/GFS_rrtmg_pre.F90 | 8 ++++++-- physics/module_MP_FER_HIRES.F90 | 8 +++++++- physics/mp_fer_hires.F90 | 4 ++++ physics/radiation_clouds.f | 9 ++++----- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 8acb24a50..af2cb0093 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -566,7 +566,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water - ccnd(i,k,4) = tracer1(i,k,ntsw) + tracer1(i,k,ntgl) ! snow + grapuel + if (Model%imp_physics == 15 ) then + ccnd(i,k,4) = 0.0 + else + ccnd(i,k,4) = tracer1(i,k,ntsw) + tracer1(i,k,ntgl) ! snow + grapuel + endif enddo enddo endif @@ -859,7 +863,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input call progcld5 (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,tracer1, & ! --- inputs Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & +!mz ntsw-1,ntgl-1, & im, lmk, lmp, Model%icloud,Model%uni_cld, & Model%lmfshal,Model%lmfdeep2, & cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & diff --git a/physics/module_MP_FER_HIRES.F90 b/physics/module_MP_FER_HIRES.F90 index f45ffa04f..c758f7951 100644 --- a/physics/module_MP_FER_HIRES.F90 +++ b/physics/module_MP_FER_HIRES.F90 @@ -289,7 +289,7 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & REAL, DIMENSION(ims:ime):: APREC,PREC,ACPREC INTEGER :: I,K,KK - REAL :: wc + REAL :: wc, RDIS, BETA6 !------------------------------------------------------------------------ ! For subroutine EGCP01COLUMN_hr !----------------------------------------------------------------------- @@ -331,6 +331,12 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & ! !-- See comments in subroutine etanewhr_init starting with variable RDIS= ! +!-- Relative dispersion == standard deviation of droplet spectrum / mean radius +! (see pp 1542-1543, Liu & Daum, JAS, 2004) + RDIS=0.5 !-- relative dispersion of droplet spectrum + BETA6=( (1.+3.*RDIS*RDIS)*(1.+4.*RDIS*RDIS)*(1.+5.*RDIS*RDIS)/ & + & ((1.+RDIS*RDIS)*(1.+2.*RDIS*RDIS) ) ) + BRAUT=DT*1.1E10*BETA6/NCW !! END OF adding, 2015-03-30 diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index 19cfa117a..4935d8aa6 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -274,10 +274,14 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !--------------------------------------------------------------------- !aligo + DO K = 1, LM + DO I= IMS, IME cwm(i,k) = cwm(i,k)/(1.0_kind_phys-q(i,k)) qr(i,k) = qr(i,k)/(1.0_kind_phys-q(i,k)) qi(i,k) = qi(i,k)/(1.0_kind_phys-q(i,k)) qc(i,k) = qc(i,k)/(1.0_kind_phys-q(i,k)) + ENDDO + ENDDO !aligo !--------------------------------------------------------------------- diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 0d3f75c71..65f483821 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -2275,7 +2275,7 @@ end subroutine progcld4o subroutine progcld5 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, & - & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & + & ntrac,ntcw,ntiw,ntrw, & & IX, NLAY, NLP1, icloud, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & @@ -2364,7 +2364,7 @@ subroutine progcld5 & ! --- inputs integer, intent(in) :: IX, NLAY, NLP1, ICLOUD - integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl + integer, intent(in) :: ntrac, ntcw, ntiw, ntrw logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 @@ -2452,7 +2452,7 @@ subroutine progcld5 & do k = 1, NLAY do i = 1, IX - clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) + clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) enddo enddo !> - Find top pressure for each cloud domain for given latitude. @@ -2479,8 +2479,7 @@ subroutine progcld5 & cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k)) cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k)) crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) - csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * & - & gfac * delp(i,k)) + csp(i,k) = 0.0 enddo enddo From c0c684c5fa13e466c202f0aaa6ceddc008f756e4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Apr 2020 10:52:56 -0600 Subject: [PATCH 112/404] Change nf90 mode from WRITE to NOWRITE. --- physics/rrtmgp_lw_cloud_optics.F90 | 2 +- physics/rrtmgp_lw_gas_optics.F90 | 2 +- physics/rrtmgp_sw_cloud_optics.F90 | 2 +- physics/rrtmgp_sw_gas_optics.F90 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 1738f895d..acff26bb6 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -105,7 +105,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! On master processor only... ! if (mpirank .eq. mpiroot) then ! Open file - status = nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid) + status = nf90_open(trim(lw_cloud_props_file), NF90_NOWRITE, ncid) ! Read dimensions status = nf90_inq_dimid(ncid, 'nband', dimid) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 418420dd6..787db6bb4 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -116,7 +116,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! On master processor only... ! if (mpirank .eq. mpiroot) then ! Open file - status = nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid) + status = nf90_open(trim(lw_gas_props_file), NF90_NOWRITE, ncid) ! Read dimensions for k-distribution fields status = nf90_inq_dimid(ncid, 'temperature', dimid) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 79e439030..dfc80a859 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -105,7 +105,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! On master processor only... ! if (mpirank .eq. mpiroot) then ! Open file - status = nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid) + status = nf90_open(trim(sw_cloud_props_file), NF90_NOWRITE, ncid) ! Read dimensions status = nf90_inq_dimid(ncid, 'nband', dimid) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 63b499432..efe611e0c 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -117,7 +117,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Read dimensions for k-distribution fields (only on master processor(0)) ! if (mpirank .eq. mpiroot) then ! Open file - status = nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid) + status = nf90_open(trim(sw_gas_props_file), NF90_NOWRITE, ncid) ! Read dimensions for k-distribution fields status = nf90_inq_dimid(ncid, 'temperature', dimid) From b084396e1fe3947f26b3903029ff28253620e996 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 30 Apr 2020 12:20:25 -0600 Subject: [PATCH 113/404] fix unitialized parameters in samfdeepcnv --- physics/samfdeepcnv.f | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index f64a0b332..d067d7187 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -201,7 +201,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c physical parameters ! parameter(asolfac=0.89) !HWRF ! parameter(grav=grav) -! parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) +! parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) ! parameter(c0s=.002,c1=.002,d0=.01) ! parameter(d0=.01) parameter(d0=.001) @@ -215,7 +215,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! as Nccn=100 for sea and Nccn=1000 for land ! parameter(cm=1.0) -! parameter(fact1=(cvap-cliq)/rv,fact2=hvap/rv-fact1*t0c) +! parameter(fact1=(cvap-cliq)/rv,fact2=hvap/rv-fact1*t0c) parameter(clamd=0.03,tkemx=0.65,tkemn=0.05) parameter(dtke=tkemx-tkemn) parameter(dbeta=0.1) @@ -276,13 +276,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & errflg = 0 - if(.not. hwrf_samfdeep) then elocp = hvap/cp el2orc = hvap*hvap/(rv*cp) fact1 = (cvap-cliq)/rv fact2 = hvap/rv-fact1*t0c ! + if(.not. hwrf_samfdeep) then c----------------------------------------------------------------------- !> ## Determine whether to perform aerosol transport do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) From 4909bb67e854814097957415dcbafc7ecc052817 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Apr 2020 13:32:51 -0600 Subject: [PATCH 114/404] Fixed bug in pre radiation routine. --- physics/GFS_rrtmgp_pre.F90 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 1344f269c..775627010 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -482,7 +482,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ ! Local variables real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate - integer :: i,k + integer :: i,k,ncndl real(kind_phys), parameter :: xrc3 = 100. real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, & effr_i, effr_r, effr_s, cldcov @@ -497,6 +497,10 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ ! call module_radiation_clouds::progcld3() ! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 ! ####################################################################################### + + ! Note, snow and groupel are treated the same by radiation scheme. + ncndl = min(Model%ncnd,4) + cld_condensate = 0.0_kind_phys if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water/ice @@ -719,7 +723,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ t_lay, & ! IN - Temperature at layer centers (K) tv_lay, & ! IN - Virtual temperature at layer centers (K) cld_condensate, & ! IN - Cloud condensate amount (Model%ncnd types) () - Model%ncnd, & ! IN - Number of cloud condensate types () + ncndl, & ! IN - Number of cloud condensate types () Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () From c4ae36821dce3abb1dd6c32eb843da4df88c506b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Apr 2020 13:42:43 -0600 Subject: [PATCH 115/404] Omission from previous commit --- physics/GFS_rrtmgp_pre.F90 | 52 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 775627010..b6be512f4 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -717,32 +717,32 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) de_lgth) ! OUT - clouds decorrelation length (km) else - call progclduni( & - p_lay/100., & ! IN - Pressure at model layer centers (mb) - p_lev/100., & ! IN - Pressure at model interfaces (mb) - t_lay, & ! IN - Temperature at layer centers (K) - tv_lay, & ! IN - Virtual temperature at layer centers (K) - cld_condensate, & ! IN - Cloud condensate amount (Model%ncnd types) () - ncndl, & ! IN - Number of cloud condensate types () - Grid%xlat, & ! IN - Latitude (radians) - Grid%xlon, & ! IN - Longitude (radians) - Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (km) - deltaP/100., & ! IN - Layer thickness (hPa) - NCOL, & ! IN - Number of horizontal gridpoints - MODEL%LEVS, & ! IN - Number of model layers - MODEL%LEVS+1, & ! IN - Number of model levels - cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) - effr_l, & ! IN - Liquid-water effective radius (microns) - effr_i, & ! IN - Ice-water effective radius (microns) - effr_r, & ! IN - Rain-water effective radius (microns) - effr_s, & ! IN - Snow-water effective radius (microns) - Model%effr_in, & ! IN - Logical, if .true. use input effective radii - clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) - cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) - mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) - mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) - de_lgth) ! OUT - clouds decorrelation length (km) + call progclduni( & + p_lay/100., & ! IN - Pressure at model layer centers (mb) + p_lev/100., & ! IN - Pressure at model interfaces (mb) + t_lay, & ! IN - Temperature at layer centers (K) + tv_lay, & ! IN - Virtual temperature at layer centers (K) + cld_condensate(:,:,1:ncndl), & ! IN - Cloud condensate amount (ncndl types) () + ncndl, & ! IN - Number of cloud condensate types () + Grid%xlat, & ! IN - Latitude (radians) + Grid%xlon, & ! IN - Longitude (radians) + Sfcprop%slmsk, & ! IN - Land/Sea mask () + deltaZ, & ! IN - Layer thickness (km) + deltaP/100., & ! IN - Layer thickness (hPa) + NCOL, & ! IN - Number of horizontal gridpoints + MODEL%LEVS, & ! IN - Number of model layers + MODEL%LEVS+1, & ! IN - Number of model levels + cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) + effr_l, & ! IN - Liquid-water effective radius (microns) + effr_i, & ! IN - Ice-water effective radius (microns) + effr_r, & ! IN - Rain-water effective radius (microns) + effr_s, & ! IN - Snow-water effective radius (microns) + Model%effr_in, & ! IN - Logical, if .true. use input effective radii + clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) + cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) + mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) + mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) + de_lgth) ! OUT - clouds decorrelation length (km) endif ! *) Thompson / WSM6 cloud micrphysics scheme elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then From fd8d3b4f1242e43584981d27b5c832eac7c23346 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Apr 2020 14:20:57 -0600 Subject: [PATCH 116/404] Fix bug in sw cloud-optics band ordering. --- physics/rrtmgp_sw_cloud_optics.F90 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index dfc80a859..ec44c7f8d 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -350,9 +350,12 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & cld_frac(idxday(1:nday),:), tau_cld, ssa_cld, asy_cld) endif - sw_optical_props_cloudsByBand%tau(:,:,:) = tau_cld - sw_optical_props_cloudsByBand%ssa(:,:,:) = ssa_cld - sw_optical_props_cloudsByBand%g(:,:,:) = asy_cld + sw_optical_props_cloudsByBand%tau(:,:,1) = tau_cld(:,:,sw_gas_props%get_nband()) + sw_optical_props_cloudsByBand%ssa(:,:,1) = ssa_cld(:,:,sw_gas_props%get_nband()) + sw_optical_props_cloudsByBand%g(:,:,1) = asy_cld(:,:,sw_gas_props%get_nband()) + sw_optical_props_cloudsByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_cld(:,:,1:sw_gas_props%get_nband()-1) endif ! All-sky SW optical depth ~0.55microns From d35fad0f27a7cd3b38e49351ba9d1d3f8e10bbff Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 30 Apr 2020 15:42:18 -0600 Subject: [PATCH 117/404] bug fix in HWRF RRTMG --- physics/radlw_main.F90 | 11 +++++++---- physics/radsw_main.F90 | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index 4ee7ca22b..f5278ed33 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -670,7 +670,7 @@ subroutine rrtmg_lw_run & real (kind=kind_phys), dimension(nlay,nbands) :: htrb real (kind=kind_phys), dimension(nbands,nlay) :: taucld, tauaer - real (kind=kind_phys), dimension(nbands,1,nlay) :: taucld3 + real (kind=kind_phys), dimension(nbands,npts,nlay) :: taucld3 real (kind=kind_phys), dimension(ngptlw,nlay) :: fracs, tautot real (kind=kind_phys), dimension(nlay,ngptlw) :: fracs_r !mz rtrnmc_mcica @@ -1175,7 +1175,7 @@ subroutine rrtmg_lw_run & call cldprop & ! --- inputs: & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & - & nlay, nlp1, ipseed(iplon), dz, delgth, & + & nlay, nlp1, ipseed(iplon), dz, delgth,iovrlw, & ! --- outputs: & cldfmc, taucld & & ) @@ -1668,7 +1668,7 @@ end subroutine rlwinit !> @{ subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & nlay, nlp1, ipseed, dz, de_lgth, & + & nlay, nlp1, ipseed, dz, de_lgth, iovrlw, & & cldfmc, taucld & ! --- outputs & ) @@ -1768,7 +1768,7 @@ subroutine cldprop & use module_radlw_cldprlw ! --- inputs: - integer, intent(in) :: nlay, nlp1, ipseed + integer, intent(in) :: nlay, nlp1, ipseed, iovrlw real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cfrac real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & @@ -1946,6 +1946,8 @@ subroutine cldprop & ! --- ... call sub-column cloud generator +!mz* + if (iovrlw .ne. 4) then call mcica_subcol & ! --- inputs: & ( cldf, nlay, ipseed, dz, de_lgth, & @@ -1962,6 +1964,7 @@ subroutine cldprop & endif enddo enddo + endif !iovrlw endif ! end if_isubclw_block diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index 924d750b1..321414976 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -720,9 +720,9 @@ subroutine rrtmg_sw_run & ! --- locals: !mz* HWRF -- input of mcica_subcol_sw - real(kind=kind_phys),dimension(1,nlay) :: hgt + real(kind=kind_phys),dimension(npts,nlay) :: hgt real(kind=kind_phys) :: dzsum - real(kind=kind_phys),dimension( nbdsw, 1, nlay ) :: taucld3, & + real(kind=kind_phys),dimension( nbdsw, npts, nlay ) :: taucld3, & ssacld3, & asmcld3, & fsfcld3 From 3826fd9ea16756ee768ed3a8809cd3ad3e82c507 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Fri, 1 May 2020 22:13:16 +0000 Subject: [PATCH 118/404] Updated GSL orographic drag suite to enable use of custom orographic statistics static files --- physics/GFS_GWD_generic.F90 | 27 +++++++++++++++-- physics/GFS_GWD_generic.meta | 45 ++++++++++++++++++++++++++++ physics/drag_suite.F90 | 57 +++++++++++++++++++++--------------- physics/drag_suite.meta | 36 +++++++++++++++++++++++ 4 files changed, 139 insertions(+), 26 deletions(-) diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index 963269329..7d3f86b00 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -17,7 +17,8 @@ end subroutine GFS_GWD_generic_pre_init !! @{ subroutine GFS_GWD_generic_pre_run( & & im, levs, nmtvr, mntvar, & - & oc, oa4, clx, theta, & + & var, oc, oa4, clx, theta, & + & varss, ocss, oa4ss, clxss, & & sigma, gamma, elvmax, lssav, ldiag3d, & & dudt, dvdt, dtdt, du3dt, dv3dt, dt3dt, dtf, & & flag_for_gwd_generic_tend, errmsg, errflg) @@ -29,7 +30,8 @@ subroutine GFS_GWD_generic_pre_run( & real(kind=kind_phys), intent(in) :: mntvar(im,nmtvr) real(kind=kind_phys), intent(out) :: & - & oc(im), oa4(im,4), clx(im,4), & + & var(im), oc(im), oa4(im,4), clx(im,4), & + & varss(im), ocss(im), oa4ss(im,4), clxss(im,4), & & theta(im), sigma(im), gamma(im), elvmax(im) logical, intent(in) :: lssav, ldiag3d, flag_for_gwd_generic_tend @@ -81,6 +83,27 @@ subroutine GFS_GWD_generic_pre_run( & clx(:,2) = 0.0 clx(:,3) = 0.0 clx(:,4) = 0.0 + elseif (nmtvr == 24) then ! GSD_drag_suite + var(:) = mntvar(:,1) + oc(:) = mntvar(:,2) + oa4(:,1) = mntvar(:,3) + oa4(:,2) = mntvar(:,4) + oa4(:,3) = mntvar(:,5) + oa4(:,4) = mntvar(:,6) + clx(:,1) = mntvar(:,7) + clx(:,2) = mntvar(:,8) + clx(:,3) = mntvar(:,9) + clx(:,4) = mntvar(:,10) + varss(:) = mntvar(:,15) + ocss(:) = mntvar(:,16) + oa4ss(:,1) = mntvar(:,17) + oa4ss(:,2) = mntvar(:,18) + oa4ss(:,3) = mntvar(:,19) + oa4ss(:,4) = mntvar(:,20) + clxss(:,1) = mntvar(:,21) + clxss(:,2) = mntvar(:,22) + clxss(:,3) = mntvar(:,23) + clxss(:,4) = mntvar(:,24) else oc = 0 oa4 = 0 diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index b31393546..78f2e742d 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -39,6 +39,15 @@ kind = kind_phys intent = in optional = F +[var] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [oc] standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid orography @@ -66,6 +75,42 @@ kind = kind_phys intent = out optional = F +[varss] + standard_name = standard_deviation_of_subgrid_orography_small_scale + long_name = standard deviation of subgrid orography small scale + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ocss] + standard_name = convexity_of_subgrid_orography_small_scale + long_name = convexity of subgrid orography small scale + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[oa4ss] + standard_name = asymmetry_of_subgrid_orography_small_scale + long_name = asymmetry of subgrid orography small scale + units = none + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = out + optional = F +[clxss] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale + long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale + units = frac + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = out + optional = F [theta] standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with_respect to east of maximum subgrid orographic variations diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 080bee156..0eb1f3b5f 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -196,8 +196,8 @@ end subroutine drag_suite_init subroutine drag_suite_run( & & IM,IX,KM,dvdt,dudt,dtdt,U1,V1,T1,Q1,KPBL, & & PRSI,DEL,PRSL,PRSLK,PHII,PHIL,DELTIM,KDT, & - & VAR,oc1,oa4,ol4, & -! & varss,oc1ss,oa4ss,ol4ss, & + & var,oc1,oa4,ol4, & + & varss,oc1ss,oa4ss,ol4ss, & & THETA,SIGMA,GAMMA,ELVMAX, & & dtaux2d_ls,dtauy2d_ls,dtaux2d_bl,dtauy2d_bl, & & dtaux2d_ss,dtauy2d_ss,dtaux2d_fd,dtauy2d_fd, & @@ -307,9 +307,10 @@ subroutine drag_suite_run( & real(kind=kind_phys) :: rcl, cdmb real(kind=kind_phys) :: g_inv - real(kind=kind_phys), intent(out) :: & + real(kind=kind_phys), intent(inout) :: & & dudt(im,km),dvdt(im,km), & - & dtdt(im,km), rdxzb(im) + & dtdt(im,km) + real(kind=kind_phys), intent(out) :: rdxzb(im) real(kind=kind_phys), intent(in) :: & & u1(im,km),v1(im,km), & & t1(im,km),q1(im,km), & @@ -320,8 +321,7 @@ subroutine drag_suite_run( & real(kind=kind_phys), intent(in) :: var(im),oc1(im), & & oa4(im,4),ol4(im,4), & & dx(im) - !real(kind=kind_phys), intent(in) :: varss(im),oc1ss(im), & - real(kind=kind_phys) :: varss(im),oc1ss(im), & + real(kind=kind_phys), intent(in) :: varss(im),oc1ss(im), & & oa4ss(im,4),ol4ss(im,4) real(kind=kind_phys), intent(in) :: THETA(im),SIGMA(im), & & GAMMA(im),ELVMAX(im) @@ -474,7 +474,16 @@ subroutine drag_suite_run( & errmsg = '' errflg = 0 -if (me==master) print *,"Running drag suite" + +! Temporary line +!if (me==master) then +! print *, "Ahoj svete!: In drag suite -- cdmbgwd =", cdmbgwd(:) +! print *, "imx =", imx, " dx =", dx(1) +! print * +!end if + + +! if (me==master) print *,"Running drag suite" !-------------------------------------------------------------------- ! SCALE-ADPTIVE PARAMETER FROM GFS GWD SCHEME !-------------------------------------------------------------------- @@ -527,14 +536,14 @@ subroutine drag_suite_run( & enddo !temporary use of large-scale data: - do i=1,im - varss(i)=var(i) - oc1ss(i)=oc1(i) - do j=1,4 - oa4ss(i,j)=oa4(i,j) - ol4ss(i,j)=ol4(i,j) - enddo - enddo +! do i=1,im +! varss(i)=var(i) +! oc1ss(i)=oc1(i) +! do j=1,4 +! oa4ss(i,j)=oa4(i,j) +! ol4ss(i,j)=ol4(i,j) +! enddo +! enddo ! !--- calculate scale-aware tapering factors !NOTE: if dx(1) is not representative of most/all dx, this needs to change... @@ -548,7 +557,7 @@ subroutine drag_suite_run( & (dxmax_ls-dxmin_ls)) + 1. ) end if end if -if (me==master) print *,"in Drag Suite, dx(1:2):",dx(1),dx(2) +! if (me==master) print *,"in Drag Suite, dx(1:2):",dx(1),dx(2) if ( dx(1) .ge. dxmax_ss ) then ss_taper = 1. else @@ -558,7 +567,7 @@ subroutine drag_suite_run( & ss_taper = dxmax_ss * (1. - dxmin_ss/dx(1))/(dxmax_ss-dxmin_ss) end if end if -if (me==master) print *,"in Drag Suite, ss_taper:",ss_taper +! if (me==master) print *,"in Drag Suite, ss_taper:",ss_taper !--- calculate length of grid for flow-blocking drag ! @@ -907,7 +916,7 @@ subroutine drag_suite_run( & vtendwave=0. ! IF ( (gwd_opt_ss .EQ. 1).and.(ss_taper.GT.1.E-02) ) THEN - if (me==master) print *,"in Drag Suite: Running small-scale gravity wave drag" + ! if (me==master) print *,"in Drag Suite: Running small-scale gravity wave drag" ! ! declaring potential temperature ! @@ -943,11 +952,11 @@ subroutine drag_suite_run( & enddo if((xland(i)-1.5).le.0. .and. 2.*varss(i).le.hpbl(i))then if(br1(i).gt.0. .and. thvx(i,kpbl2)-thvx(i,kts) > 0.)then -!WRF cleff_ss = sqrt(dxy(i)**2 + dxyp(i)**2) + cleff_ss = sqrt(dxy(i)**2 + dxyp(i)**2) ! WRF ! cleff_ss = 3. * max(dx(i),cleff_ss) ! cleff_ss = 10. * max(dxmax_ss,cleff_ss) -!WRF cleff_ss = 0.1 * max(dxmax_ss,cleff_ss) - cleff_ss = 0.1 * 12000. + cleff_ss = 0.1 * max(dxmax_ss,cleff_ss) ! WRF +! cleff_ss = 0.1 * 12000. coefm_ss(i) = (1. + olss(i)) ** (oass(i)+1.) xlinv(i) = coefm_ss(i) / cleff_ss !govrth(i)=g/(0.5*(thvx(i,kpbl(i))+thvx(i,kts))) @@ -1024,7 +1033,7 @@ subroutine drag_suite_run( & ! Topographic Form Drag from Beljaars et al. (2004, QJRMS, equ. 16): !================================================================ IF ( (gwd_opt_fd .EQ. 1).and.(ss_taper.GT.1.E-02) ) THEN - if (me==master) print *,"in Drag Suite: Running form drag" + ! if (me==master) print *,"in Drag Suite: Running form drag" utendform=0. vtendform=0. @@ -1080,7 +1089,7 @@ subroutine drag_suite_run( & !======================================================= ! More for the large-scale gwd component IF ( (gwd_opt_ls .EQ. 1).and.(ls_taper.GT.1.E-02) ) THEN - if (me==master) print *,"in Drag Suite: Running large-scale gravity wave drag" + ! if (me==master) print *,"in Drag Suite: Running large-scale gravity wave drag" ! ! now compute vertical structure of the stress. do k = kts,kpblmax @@ -1148,7 +1157,7 @@ subroutine drag_suite_run( & !COMPUTE BLOCKING COMPONENT !=============================================================== IF ( (gwd_opt_bl .EQ. 1) .and. (ls_taper .GT. 1.E-02) ) THEN - if (me==master) print *,"in Drag Suite: Running blocking drag" + ! if (me==master) print *,"in Drag Suite: Running blocking drag" do i = its,im if(.not.ldrag(i)) then diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index dfb6f64b8..b174f0fdb 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -208,6 +208,42 @@ kind = kind_phys intent = in optional = F +[varss] + standard_name = standard_deviation_of_subgrid_orography_small_scale + long_name = standard deviation of subgrid orography small scale + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[oc1ss] + standard_name = convexity_of_subgrid_orography_small_scale + long_name = convexity of subgrid orography small scale + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[oa4ss] + standard_name = asymmetry_of_subgrid_orography_small_scale + long_name = asymmetry of subgrid orography small scale + units = none + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[ol4ss] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale + long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale + units = frac + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F [theta] standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with respect to east of maximum subgrid orographic variations From f245b7a614906d6bf4ec5822335362618f3b7ac4 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Sat, 2 May 2020 23:38:19 +0000 Subject: [PATCH 119/404] some updates for several routines --- physics/GFS_rrtmg_pre.F90 | 2 +- physics/GFS_surface_composites.F90 | 14 ++-- physics/GFS_surface_generic.F90 | 4 - physics/moninshoc.f | 62 +++++++------- physics/tridi.f | 28 ++++--- physics/ugwp_driver_v0.F | 129 +++++++++++++++-------------- 6 files changed, 125 insertions(+), 114 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 01649793b..e2dad0f4d 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -473,7 +473,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input !check print *,' in grrad : calling setaer ' call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, & ! --- inputs - tracer1, Tbd%aer_nm, & + tracer1, Tbd%aer_nm, & Grid%xlon, Grid%xlat, IM, LMK, LMP, & Model%lsswr,Model%lslwr, & faersw,faerlw,aerodp) ! --- outputs diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index ae9724844..86eb28419 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -80,7 +80,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl else cice(i) = zero flag_cice(i) = .false. - islmsk = 0 + islmsk(i) = 0 endif else if (cice(i) >= min_lakeice) then @@ -91,10 +91,10 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl endif endif if (cice(i) < one ) then - wet(i)=.true. ! some open ocean/lake water exists - if (.not. cplflx .or. oceanfrac(i) == zero) & - tsfco(i) = max(tsfco(i), tisfc(i), tgice) - end if + wet(i) = .true. ! some open ocean/lake water exists + if ((.not. cplflx .or. oceanfrac(i) == zero) .and. icy(i)) & + tsfco(i) = max(tisfc(i), tgice) + endif else cice(i) = zero endif @@ -127,8 +127,8 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl endif endif if (cice(i) < one) then - wet(i)=.true. ! some open ocean/lake water exists - if (.not. cplflx) tsfco(i) = max(tsfco(i), tisfc(i), tgice) + wet(i) = .true. ! some open ocean/lake water exists + if (.not. cplflx .and. icy(i)) tsfco(i) = max(tisfc(i), tgice) endif endif enddo diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index 116b3e29f..ddcb8d72e 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -341,13 +341,9 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt snowca(i) = snowca(i) + snowc(i) * dtf snohfa(i) = snohfa(i) + snohf(i) * dtf ep(i) = ep(i) + ep1d(i) * dtf - enddo - endif ! --- ... total runoff is composed of drainage into water table and ! runoff at the surface and is accumulated in unit of meters - if (lssav) then - do i=1,im runoff(i) = runoff(i) + (drain(i)+runof(i)) * dtf srunoff(i) = srunoff(i) + runof(i) * dtf enddo diff --git a/physics/moninshoc.f b/physics/moninshoc.f index 4afe19dec..14aaf1660 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -102,13 +102,13 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! &, dkmin=zero, dkmax=1000., xkzminv=0.3 &, prmin=0.25_r8, prmax=4.0_r8, vk=0.4_r8, & cfac=6.5_r8 - real(kind=kind_phys) :: gravi, cont, conq, conw, gocp + real(kind=kind_phys) :: gravi, cont, conq, gocp, go2 - gravi = one/grav - cont = cp/grav - conq = hvap/grav - conw = one/grav - gocp = grav/cp + gravi = one / grav + cont = cp * gravi + conq = hvap * gravi + gocp = grav / cp + go2 = grav * 0.5_r8 ! Initialize CCPP error handling variables errmsg = '' @@ -121,7 +121,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if (ix < im) stop ! dt2 = delt - rdt = 1. / dt2 + rdt = one / dt2 km1 = km - 1 kmpbl = km / 2 ! @@ -202,13 +202,13 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, enddo do i = 1,im theta(i,k) = t1(i,k) * psk(i) / prslk(i,k) - thvx(i,k) = theta(i,k)*(1.+fv*max(q1(i,k,1),qmin)-tx1(i)) + thvx(i,k) = theta(i,k)*(one+fv*max(q1(i,k,1),qmin)-tx1(i)) enddo enddo ! do i = 1,im sflux(i) = heat(i) + evap(i)*fv*theta(i,1) - if(.not.sfcflg(i) .or. sflux(i) <= zero) pblflg(i)=.false. + if (.not.sfcflg(i) .or. sflux(i) <= zero) pblflg(i)=.false. beta(i) = dt2 / (zi(i,2)-zi(i,1)) enddo ! @@ -219,7 +219,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, flg(i) = .false. rbup(i) = rbsoil(i) ! - if(pblflg(i)) then + if (pblflg(i)) then thermal(i) = thvx(i,1) crb(i) = crbcon else @@ -233,9 +233,9 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, enddo do k = 1, kmpbl do i = 1, im - if(.not.flg(i)) then + if (.not.flg(i)) then rbdn(i) = rbup(i) - spdk2 = max((u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)), 1.) + spdk2 = max((u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)), one) rbup(i) = (thvx(i,k)-thermal(i))*phil(i,k) & / (thvx(i,1)*spdk2) kpbl(i) = k @@ -246,7 +246,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, do i = 1,im if(kpbl(i) > 1) then k = kpbl(i) - if(rbdn(i) >= crb(i)) then + if (rbdn(i) >= crb(i)) then rbint = zero elseif(rbup(i) <= crb(i)) then rbint = one @@ -265,13 +265,13 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! do i=1,im zol(i) = max(rbsoil(i)*fm(i)*fm(i)/fh(i),rimin) - if(sfcflg(i)) then + if (sfcflg(i)) then zol(i) = min(zol(i),-zfmin) else zol(i) = max(zol(i),zfmin) endif zol1 = zol(i)*sfcfrac*hpbl(i)/zl(i,1) - if(sfcflg(i)) then + if (sfcflg(i)) then ! phim(i) = (1.-aphi16*zol1)**(-1./4.) ! phih(i) = (1.-aphi16*zol1)**(-1./2.) tem = one / max(one - aphi16*zol1, 1.0e-8_r8) @@ -294,7 +294,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, enddo do k = 2, kmpbl do i = 1, im - if(.not.flg(i)) then + if (.not.flg(i)) then rbdn(i) = rbup(i) spdk2 = max((u1(i,k)*u1(i,k)+v1(i,k)*v1(i,k)), one) rbup(i) = (thvx(i,k)-thermal(i)) * phil(i,k) @@ -348,8 +348,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, tem = u1(i,k) - u1(i,kp1) tem1 = v1(i,k) - v1(i,kp1) tem = (tem*tem + tem1*tem1) * rdz * rdz - bvf2 = (0.5_r8*grav)*(thvx(i,kp1)-thvx(i,k))*rdz - & / (t1(i,k)+t1(i,kp1)) + bvf2 = go2*(thvx(i,kp1)-thvx(i,k))*rdz / (t1(i,k)+t1(i,kp1)) ri = max(bvf2/tem,rimin) if(ri < zero) then ! unstable regime prnum(i,kp1) = one @@ -427,7 +426,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, enddo endif ! -! solve tridiagonal problem for heat and moisture +! solve tridiagonal problem for heat, moisture and tracers ! call tridin(im,km,ntloc,al,ad,au,a1,a2,au,a1,a2) @@ -435,14 +434,18 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! recover tendencies of heat and moisture ! do k = 1,km - do i = 1,im - ttend = (a1(i,k)-t1(i,k)) * rdt - qtend = (a2(i,k)-q1(i,k,1)) * rdt - tau(i,k) = tau(i,k) + ttend - rtg(i,k,1) = rtg(i,k,1) + qtend - dtsfc(i) = dtsfc(i) + cont*del(i,k)*ttend - dqsfc(i) = dqsfc(i) + conq*del(i,k)*qtend - enddo + do i = 1,im + ttend = (a1(i,k)-t1(i,k)) * rdt + qtend = (a2(i,k)-q1(i,k,1)) * rdt + tau(i,k) = tau(i,k) + ttend + rtg(i,k,1) = rtg(i,k,1) + qtend + dtsfc(i) = dtsfc(i) + del(i,k)*ttend + dqsfc(i) = dqsfc(i) + del(i,k)*qtend + enddo + enddo + do i = 1,im + dtsfc(i) = dtsfc(i) * cont + dqsfc(i) = dqsfc(i) * conq enddo if(ntrac > 1) then is = 0 @@ -497,8 +500,9 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, vtend = (a2(i,k)-v1(i,k))*rdt du(i,k) = du(i,k) + utend dv(i,k) = dv(i,k) + vtend - dusfc(i) = dusfc(i) + conw*del(i,k)*utend - dvsfc(i) = dvsfc(i) + conw*del(i,k)*vtend + tem = del(i,k) * gravi + dusfc(i) = dusfc(i) + tem * utend + dvsfc(i) = dvsfc(i) + tem * vtend enddo enddo ! diff --git a/physics/tridi.f b/physics/tridi.f index bd44bcc86..c8e77403b 100644 --- a/physics/tridi.f +++ b/physics/tridi.f @@ -9,6 +9,7 @@ subroutine tridi1(l,n,cl,cm,cu,r1,au,a1) ! use machine , only : kind_phys implicit none + integer, parameter :: one = 1.0_kind_phys integer k,n,l,i real(kind=kind_phys) fk ! @@ -16,19 +17,19 @@ subroutine tridi1(l,n,cl,cm,cu,r1,au,a1) & au(l,n-1),a1(l,n) ! do i=1,l - fk = 1./cm(i,1) + fk = one / cm(i,1) au(i,1) = fk*cu(i,1) a1(i,1) = fk*r1(i,1) enddo do k=2,n-1 do i=1,l - fk = 1./(cm(i,k)-cl(i,k)*au(i,k-1)) + fk = one / (cm(i,k)-cl(i,k)*au(i,k-1)) au(i,k) = fk*cu(i,k) a1(i,k) = fk*(r1(i,k)-cl(i,k)*a1(i,k-1)) enddo enddo do i=1,l - fk = 1./(cm(i,n)-cl(i,n)*au(i,n-1)) + fk = one / (cm(i,n)-cl(i,n)*au(i,n-1)) a1(i,n) = fk*(r1(i,n)-cl(i,n)*a1(i,n-1)) enddo do k=n-1,1,-1 @@ -48,6 +49,7 @@ subroutine tridi2(l,n,cl,cm,cu,r1,r2,au,a1,a2) cc use machine , only : kind_phys implicit none + integer, parameter :: one = 1.0_kind_phys integer k,n,l,i real(kind=kind_phys) fk cc @@ -55,21 +57,21 @@ subroutine tridi2(l,n,cl,cm,cu,r1,r2,au,a1,a2) & au(l,n-1),a1(l,n),a2(l,n) c---------------------------------------------------------------------- do i=1,l - fk = 1./cm(i,1) + fk = one / cm(i,1) au(i,1) = fk*cu(i,1) a1(i,1) = fk*r1(i,1) a2(i,1) = fk*r2(i,1) enddo do k=2,n-1 do i=1,l - fk = 1./(cm(i,k)-cl(i,k)*au(i,k-1)) + fk = one / (cm(i,k)-cl(i,k)*au(i,k-1)) au(i,k) = fk*cu(i,k) a1(i,k) = fk*(r1(i,k)-cl(i,k)*a1(i,k-1)) a2(i,k) = fk*(r2(i,k)-cl(i,k)*a2(i,k-1)) enddo enddo do i=1,l - fk = 1./(cm(i,n)-cl(i,n)*au(i,n-1)) + fk = one / (cm(i,n)-cl(i,n)*au(i,n-1)) a1(i,n) = fk*(r1(i,n)-cl(i,n)*a1(i,n-1)) a2(i,n) = fk*(r2(i,n)-cl(i,n)*a2(i,n-1)) enddo @@ -93,6 +95,7 @@ subroutine tridin(l,n,nt,cl,cm,cu,r1,r2,au,a1,a2) cc use machine , only : kind_phys implicit none + integer, parameter :: one = 1.0_kind_phys integer is,k,kk,n,nt,l,i real(kind=kind_phys) fk(l) cc @@ -102,7 +105,7 @@ subroutine tridin(l,n,nt,cl,cm,cu,r1,r2,au,a1,a2) & fkk(l,2:n-1) c----------------------------------------------------------------------- do i=1,l - fk(i) = 1./cm(i,1) + fk(i) = one / cm(i,1) au(i,1) = fk(i)*cu(i,1) a1(i,1) = fk(i)*r1(i,1) enddo @@ -114,7 +117,7 @@ subroutine tridin(l,n,nt,cl,cm,cu,r1,r2,au,a1,a2) enddo do k=2,n-1 do i=1,l - fkk(i,k) = 1./(cm(i,k)-cl(i,k)*au(i,k-1)) + fkk(i,k) = one / (cm(i,k)-cl(i,k)*au(i,k-1)) au(i,k) = fkk(i,k)*cu(i,k) a1(i,k) = fkk(i,k)*(r1(i,k)-cl(i,k)*a1(i,k-1)) enddo @@ -128,7 +131,7 @@ subroutine tridin(l,n,nt,cl,cm,cu,r1,r2,au,a1,a2) enddo enddo do i=1,l - fk(i) = 1./(cm(i,n)-cl(i,n)*au(i,n-1)) + fk(i) = one / (cm(i,n)-cl(i,n)*au(i,n-1)) a1(i,n) = fk(i)*(r1(i,n)-cl(i,n)*a1(i,n-1)) enddo do k = 1, nt @@ -163,6 +166,7 @@ subroutine tridit(l,n,nt,cl,cm,cu,rt,au,at) !! use machine , only : kind_phys implicit none + integer, parameter :: one = 1.0_kind_phys integer is,k,kk,n,nt,l,i real(kind=kind_phys) fk(l) !! @@ -172,7 +176,7 @@ subroutine tridit(l,n,nt,cl,cm,cu,rt,au,at) & fkk(l,2:n-1) !----------------------------------------------------------------------- do i=1,l - fk(i) = 1./cm(i,1) + fk(i) = one / cm(i,1) au(i,1) = fk(i)*cu(i,1) enddo do k = 1, nt @@ -183,7 +187,7 @@ subroutine tridit(l,n,nt,cl,cm,cu,rt,au,at) enddo do k=2,n-1 do i=1,l - fkk(i,k) = 1./(cm(i,k)-cl(i,k)*au(i,k-1)) + fkk(i,k) = one / (cm(i,k)-cl(i,k)*au(i,k-1)) au(i,k) = fkk(i,k)*cu(i,k) enddo enddo @@ -196,7 +200,7 @@ subroutine tridit(l,n,nt,cl,cm,cu,rt,au,at) enddo enddo do i=1,l - fk(i) = 1./(cm(i,n)-cl(i,n)*au(i,n-1)) + fk(i) = one / (cm(i,n)-cl(i,n)*au(i,n-1)) enddo do k = 1, nt is = (k-1) * n diff --git a/physics/ugwp_driver_v0.F b/physics/ugwp_driver_v0.F index 4edd84a7a..819c995a4 100644 --- a/physics/ugwp_driver_v0.F +++ b/physics/ugwp_driver_v0.F @@ -6,8 +6,8 @@ module sso_coorde ! pgd4=4 (4 timse taub, control pgwd=1) ! use machine, only: kind_phys - real(kind=kind_phys),parameter :: pgwd = 1._kind_phys - real(kind=kind_phys),parameter :: pgwd4 = 1._kind_phys + real(kind=kind_phys),parameter :: pgwd = 1.0_kind_phys + real(kind=kind_phys),parameter :: pgwd4 = 1.0_kind_phys end module sso_coorde ! ! @@ -37,6 +37,8 @@ subroutine cires_ugwp_driver_v0(me, master, implicit none !input + integer, parameter :: r8 = kind_phys + integer, intent(in) :: me, master integer, intent(in) :: im, levs, kdt, imx, nmtvr, ntke, ipr @@ -86,8 +88,9 @@ subroutine cires_ugwp_driver_v0(me, master, ! ! switches that activate impact of OGWs and NGWs along with eddy diffusion ! - real(kind=kind_phys), parameter :: pogw=1.0, pngw=1.0, pked=1.0 - &, ompked=1.0-pked + real(kind=kind_phys), parameter :: pogw=1.0_r8, pngw=1.0_r8 + &, pked=1.0_r8, zero=0.0_r8 + &, ompked=1.0_r8-pked ! ! switches for GW-effects: pogw=1 (OGWs) pngw=1 (NGWs) pked=1 (eddy mixing) ! @@ -102,7 +105,7 @@ subroutine cires_ugwp_driver_v0(me, master, endif do i=1,im - zlwb(i) = 0. + zlwb(i) = zero enddo ! ! 1) ORO stationary GWs @@ -128,13 +131,13 @@ subroutine cires_ugwp_driver_v0(me, master, else ! calling old GFS gravity wave drag as is do k=1,levs do i=1,im - pdvdt(i,k) = 0.0 - pdudt(i,k) = 0.0 - pdtdt(i,k) = 0.0 - pkdis(i,k) = 0.0 + pdvdt(i,k) = zero + pdudt(i,k) = zero + pdtdt(i,k) = zero + pkdis(i,k) = zero enddo enddo - if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then + if (cdmbgwd(1) > zero.or. cdmbgwd(2) > zero)_r8 then call gwdps(im, im, im, levs, Pdvdt, Pdudt, Pdtdt & &, ugrs, vgrs, tgrs, qgrs & &, kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt& @@ -144,11 +147,11 @@ subroutine cires_ugwp_driver_v0(me, master, &, nmtvr, cdmbgwd(1:2), me, lprnt, ipr, rdxzb) endif - tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 - du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 + tau_mtb = zero ; tau_ogw = zero ; tau_tofd = zero + du3dt_mtb = zero ; du3dt_ogw = zero ; du3dt_tms= zero endif ! - if (cdmbgwd(3) > 0.0) then + if (cdmbgwd(3) > zero) then ! 2) non-stationary GWs with GEOS-5/MERRA GW-forcing ! ---------------------------------------------- !-------- @@ -158,11 +161,11 @@ subroutine cires_ugwp_driver_v0(me, master, ! call slat_geos5(im, xlatd, tau_ngw) ! - if (abs(1.0-cdmbgwd(3)) > 1.0e-6) then - if (cdmbgwd(4) > 0.0) then + if (abs(1.0_r8-cdmbgwd(3)) > 1.0e-6_r8) then + if (cdmbgwd(4) > zero) then do i=1,im - turb_fac(i) = 0.0 - tem(i) = 0.0 + turb_fac(i) = zero + tem(i) = zero enddo if (ntke > 0) then do k=1,(levs+levs)/3 @@ -178,7 +181,7 @@ subroutine cires_ugwp_driver_v0(me, master, rfac = 86400000 / dtp do i=1,im tx1 = cdmbgwd(4)*min(10.0, max(turb_fac(i),rain(i)*rfac)) - tau_ngw(i) = tau_ngw(i) * max(0.1, min(5.0, tx1)) + tau_ngw(i) = tau_ngw(i) * max(0.1_r8, min(5.0_r8, tx1)) enddo endif do i=1,im @@ -217,10 +220,10 @@ subroutine cires_ugwp_driver_v0(me, master, enddo endif - if (pogw == 0.0) then + if (pogw == zero) then ! zmtb = 0.; zogw =0. - tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 - du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 + tau_mtb = zero ; tau_ogw = zero ; tau_tofd = zero + du3dt_mtb = zero ; du3dt_ogw = zero ; du3dt_tms= zero endif return @@ -234,7 +237,7 @@ subroutine cires_ugwp_driver_v0(me, master, !------------------------------------------------------------------------------ do k=1,levs do i=1,im - ed_dudt(i,k) = 0.0 ; ed_dvdt(i,k) = 0.0 ; ed_dtdt(i,k) = 0.0 + ed_dudt(i,k) = zero ; ed_dvdt(i,k) = zero ; ed_dtdt(i,k) = zero enddo enddo @@ -300,6 +303,7 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, use sso_coorde, only : pgwd, pgwd4 !---------------------------------------- implicit none + integer, parameter :: r8 = kind_phys character(len=8) :: strsolver='PSS-1986' ! current operational solver or 'WAM-2017' integer, intent(in) :: im, km, imx, kdt integer, intent(in) :: me, master @@ -345,9 +349,9 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, ! cleff = 2.5*0.5e-5 * sqrt(192./768.) => Lh_eff = 1004. km ! 6*dx = 240 km 8*dx = 320. ~ 3-5 more effective !--------------------------------------------------------------------- - real(kind=kind_phys) :: gammin = 0.00999999 - real(kind=kind_phys), parameter :: nhilmax = 25. - real(kind=kind_phys), parameter :: sso_min = 3000. + real(kind=kind_phys) :: gammin = 0.00999999_r8 + real(kind=kind_phys), parameter :: nhilmax = 25.0_r8 + real(kind=kind_phys), parameter :: sso_min = 3000.0_r8 logical, parameter :: do_adjoro = .true. ! real(kind=kind_phys) :: shilmin, sgrmax, sgrmin @@ -421,7 +425,7 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, dsmax = sqrt(sgrmax) ; dsmin = sqrt(sgrmin) dxres = pi2*arad/float(IMX) - hdxres = 0.5*dxres + hdxres = 0.5_r8*dxres ! shilmin = sgrmin/nhilmax ! not used - Moorthi ! gammin = min(sso_min/dsmax, 1.) ! Moorthi - with this results are not reproducible @@ -1272,6 +1276,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! nov 2017 nh/rotational gw-modes for nh-fv3gfs ! --------------------------------------------------------------------------------- ! + use machine, only : kind_phys use ugwp_common , only : rgrav, grav, cpd, rd, rv &, omega2, rcpd2, pi, pi2, fv @@ -1290,6 +1295,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, implicit none !23456 + integer, parameter :: r8 = kind_phys integer, intent(in) :: klev ! vertical level integer, intent(in) :: klon ! horiz tiles @@ -1316,8 +1322,9 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, real, intent(out) :: pdvdt(klon,klev) ! meridional momentum tendency real, intent(out) :: pdtdt(klon,klev) ! gw-heating (u*ax+v*ay)/cp real, intent(out) :: dked(klon,klev) ! gw-eddy diffusion - real, parameter :: minvel = 0.5 ! - real, parameter :: epsln = 1.0d-12 ! + real, parameter :: minvel = 0.5_r8 ! + real, parameter :: epsln = 1.0e-12_r8 ! + real, parameter :: zero = 0.0_r8, one = 1.0_r8, half = 0.5_r8 !vay-2018 @@ -1379,7 +1386,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! real :: rcpd, grav2cpd real, parameter :: rcpdl = cpd/grav ! 1/[g/cp] == cp/g &, grav2cpd = grav/rcpdl ! g*(g/cp)= g^2/cp - &, cpdi = 1.0d0/cpd + &, cpdi = one/cpd real :: expdis, fdis ! real :: fmode, expdis, fdis @@ -1391,10 +1398,10 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! do k=1,klev do j=1,klon - pdvdt(j,k) = 0.0 - pdudt(j,k) = 0.0 - pdtdt(j,k) = 0.0 - dked(j,k) = 0.0 + pdvdt(j,k) = zero + pdudt(j,k) = zero + pdtdt(j,k) = zero + dked(j,k) = zero phil(j,k) = philg(j,k) * rgrav enddo enddo @@ -1422,9 +1429,9 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, do iazi=1, nazd do jk=1,klev do jl=1,klon - zpu(jl,jk,iazi) = 0.0 -! zcrt(jl,jk,iazi) = 0.0 -! zdfl(jl,jk,iazi) = 0.0 + zpu(jl,jk,iazi) = zero +! zcrt(jl,jk,iazi) = zero +! zdfl(jl,jk,iazi) = zero enddo enddo enddo @@ -1440,23 +1447,23 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! --------------------------------------------- do jk=max(ilaunch,2),klev do jl=1,klon - tvc1 = tm1(jl,jk) * (1. +fv*qm1(jl,jk)) - tvm1 = tm1(jl,jk-1) * (1. +fv*qm1(jl,jk-1)) + tvc1 = tm1(jl,jk) * (one +fv*qm1(jl,jk)) + tvm1 = tm1(jl,jk-1) * (one +fv*qm1(jl,jk-1)) ! zthm1(jl,jk) = 0.5 *(tvc1+tvm1) - zthm1 = 2.0 / (tvc1+tvm1) - zuhm1(jl,jk) = 0.5 *(um1(jl,jk-1)+um1(jl,jk)) - zvhm1(jl,jk) = 0.5 *(vm1(jl,jk-1)+vm1(jl,jk)) + zthm1 = 2.0_r8 / (tvc1+tvm1) + zuhm1(jl,jk) = half *(um1(jl,jk-1)+um1(jl,jk)) + zvhm1(jl,jk) = half *(vm1(jl,jk-1)+vm1(jl,jk)) ! zrhohm1(jl,jk) = prsi(jl,jk)*rdi/zthm1(jl,jk) ! rho = p/(RTv) zrhohm1(jl,jk) = prsi(jl,jk)*rdi*zthm1 ! rho = p/(RTv) zdelp = phil(jl,jk)-phil(jl,jk-1) !>0 ...... dz-meters v_zmet(jl,jk) = zdelp + zdelp delpi(jl,jk) = grav / (prsi(jl,jk-1) - prsi(jl,jk)) vueff(jl,jk) = - & 2.e-5*exp( (phil(jl,jk)+phil(jl,jk-1))*rhp2)+dked_min + & 2.e-5_r8*exp( (phil(jl,jk)+phil(jl,jk-1))*rhp2)+dked_min ! ! zbn2(jl,jk) = grav2cpd/zthm1(jl,jk) zbn2(jl,jk) = grav2cpd*zthm1 - & * (1.0+rcpdl*(tm1(jl,jk)-tm1(jl,jk-1))/zdelp) + & * (one+rcpdl*(tm1(jl,jk)-tm1(jl,jk-1))/zdelp) zbn2(jl,jk) = max(min(zbn2(jl,jk), gssec), bv2min) zbvfhm1(jl,jk) = sqrt(zbn2(jl,jk)) ! bn = sqrt(bn2) enddo @@ -1605,8 +1612,8 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! copy zflux into all other azimuths ! -------------------------------- -! zact(:,:,:) = 1.0 ; zacc(:,:,:) = 1.0 - zact(:,:,:) = 1.0 +! zact(:,:,:) = one ; zacc(:,:,:) = one + zact(:,:,:) = one do iazi=2, nazd do inc=1,nwav do jl=1,klon @@ -1674,9 +1681,9 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, do inc=1, nwav zcin = zci(inc) if (abs(zcin) > epsln) then - zcinc = 1.0 / zcin + zcinc = one / zcin else - zcinc = 1.0 + zcinc = one endif do jl=1,klon !======================================================================= @@ -1688,12 +1695,12 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, v_wdp = v_kxw*v_cdp wdop2 = v_wdp* v_wdp cdf2 = v_cdp*v_cdp - c2f2(jL) - if (cdf2 > 0) then + if (cdf2 > zero) then kzw2 = (zBn2(jL,jk)-wdop2)/Cdf2 - v_kxw2 else - kzw2 = 0.0 + kzw2 = zero endif - if ( kzw2 > 0 ) then + if ( kzw2 > zero ) then v_kzw = sqrt(kzw2) ! !linsatdis: kzw2, kzw3, kdsat, c2f2, cdf2, cdf1 @@ -1706,10 +1713,10 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, v_kzi = abs(v_kzw*v_kzw*vueff(jl,jk)/v_wdp*v_kzw) expdis = exp(-v_kzi*v_zmet(jl,jk)) else - v_kzi = 0. - expdis = 1.0 - v_kzw = 0. - v_cdp = 0. ! no effects of reflected waves + v_kzi = zero + expdis = one + v_kzw = zero + v_cdp = zero ! no effects of reflected waves endif ! fmode = zflux(jl,inc,iazi) @@ -1725,7 +1732,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! flux_tot - sat.flux ! zdep = zact(jl,inc,iazi)* (fdis-zfluxs) - if(zdep > 0.0 ) then + if(zdep > zero ) then ! subs on sat-limit zflux(jl,inc,iazi) = zfluxs zflux_z(jl,inc,jk) = zfluxs @@ -1739,7 +1746,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! ! integrate over spectral modes zpu(y, z, azimuth) zact(jl,inc,iazi)*zflux(jl,inc,iazi)*[d("zcinc")] ! - zdfdz_v(:,jk,iazi) = 0.0 + zdfdz_v(:,jk,iazi) = zero do inc=1, nwav zcinc = zdci(inc) ! dc-integration @@ -1779,8 +1786,8 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, ! do jk=1,klev+1 do jl=1,klon - taux(jl,jk) = 0.0 - tauy(jl,jk) = 0.0 + taux(jl,jk) = zero + tauy(jl,jk) = zero enddo enddo @@ -1842,10 +1849,10 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, if (kdt == 1 .and. mpi_id == master) then print *, 'vgw done ' ! - print *, maxval(pdudt)*86400., minval(pdudt)*86400, 'vgw ax' - print *, maxval(pdvdt)*86400., minval(pdvdt)*86400, 'vgw ay' + print *, maxval(pdudt)*86400, minval(pdudt)*86400, 'vgw ax' + print *, maxval(pdvdt)*86400, minval(pdvdt)*86400, 'vgw ay' print *, maxval(dked)*1., minval(dked)*1, 'vgw keddy m2/sec' - print *, maxval(pdtdt)*86400., minval(pdtdt)*86400,'vgw eps' + print *, maxval(pdtdt)*86400, minval(pdtdt)*86400,'vgw eps' ! ! print *, ' ugwp -heating rates ' endif From e1463756cd229b110eeccfb9876ce66621c7dfba Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 4 May 2020 18:38:48 +0000 Subject: [PATCH 120/404] removed tisfcin_cpl and tseain_cpl as they are not needed --- physics/GFS_debug.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 6bf39d491..4b62f0f9f 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -414,8 +414,8 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Coupling%dtsfcin_cpl ', Coupling%dtsfcin_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%dqsfcin_cpl ', Coupling%dqsfcin_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%ulwsfcin_cpl', Coupling%ulwsfcin_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%tseain_cpl ', Coupling%tseain_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%tisfcin_cpl ', Coupling%tisfcin_cpl ) +! call print_var(mpirank,omprank, blkno, 'Coupling%tseain_cpl ', Coupling%tseain_cpl ) +! call print_var(mpirank,omprank, blkno, 'Coupling%tisfcin_cpl ', Coupling%tisfcin_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%ficein_cpl ', Coupling%ficein_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%hicein_cpl ', Coupling%hicein_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%hsnoin_cpl ', Coupling%hsnoin_cpl ) From 513cb29b7572d3246b6cf44e7c857ddfdb23c13f Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Tue, 5 May 2020 01:02:55 +0000 Subject: [PATCH 121/404] minor update to surface_composites --- physics/GFS_surface_composites.F90 | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index e334c2468..7ad60a473 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -496,15 +496,24 @@ subroutine GFS_surface_composites_post_run ( tsfcl(i) = tsfc(i) if (.not. flag_cice(i)) then tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) - elseif (wet(i) .and. cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice - txi = cice(i) - txo = one - txi - evap(i) = txi * evap_ice(i) + txo * evap_ocn(i) - hflx(i) = txi * hflx_ice(i) + txo * hflx_ocn(i) - tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_ocn(i) - stress(i) = txi * stress_ice(i) + txo * stress_ocn(i) - qss(i) = txi * qss_ice(i) + txo * qss_ocn(i) - ep1d(i) = txi * ep1d_ice(i) + txo * ep1d_ocn(i) + elseif (wet(i)) then + if (cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice + txi = cice(i) + txo = one - txi + evap(i) = txi * evap_ice(i) + txo * evap_ocn(i) + hflx(i) = txi * hflx_ice(i) + txo * hflx_ocn(i) + tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_ocn(i) + stress(i) = txi * stress_ice(i) + txo * stress_ocn(i) + qss(i) = txi * qss_ice(i) + txo * qss_ocn(i) + ep1d(i) = txi * ep1d_ice(i) + txo * ep1d_ocn(i) + else + evap(i) = evap_ocn(i) + hflx(i) = hflx_ocn(i) + tsfc(i) = tsfc_ocn(i) + stress(i) = stress_ocn(i) + qss(i) = qss_ocn(i) + ep1d(i) = ep1d_ocn(i) + endif endif if (wet(i)) then tsfco(i) = tsfc_ocn(i) From 379c2f35bbb8e8b92b60beaaa54798cd3650dc64 Mon Sep 17 00:00:00 2001 From: Man Zhang Date: Thu, 27 Feb 2020 11:27:38 -0700 Subject: [PATCH 122/404] scientific documentation update for UFS public release, add two additional xml files for GFSv15p2 and GFSv16beta --- physics/cires_ugwp.F90 | 2 +- physics/docs/library.bib | 501 ++++++++++-------- physics/docs/pdftxt/GFS_UGWPv0.txt | 117 ++++ physics/docs/pdftxt/GFSv15p2_suite.txt | 133 +++++ physics/docs/pdftxt/GFSv16beta_suite.txt | 176 ++++++ .../docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt | 101 ++++ .../suite_FV3_GFS_v15p2_no_nsst.xml.txt | 100 ++++ .../docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt | 101 ++++ .../suite_FV3_GFS_v16beta_no_nsst.xml.txt | 98 ++++ physics/docs/pdftxt/suite_input.nml.txt | 107 +++- physics/docs/ufs_doxyfile | 464 ++++++++++++++++ physics/sfc_nst.f | 9 +- physics/sfc_ocean.F | 16 +- 13 files changed, 1667 insertions(+), 258 deletions(-) create mode 100644 physics/docs/pdftxt/GFS_UGWPv0.txt create mode 100644 physics/docs/pdftxt/GFSv15p2_suite.txt create mode 100644 physics/docs/pdftxt/GFSv16beta_suite.txt create mode 100644 physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt create mode 100644 physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt create mode 100644 physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt create mode 100644 physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt create mode 100644 physics/docs/ufs_doxyfile diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index e0abc58ff..ac12764cc 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -146,7 +146,7 @@ end subroutine cires_ugwp_finalize !! \htmlinclude cires_ugwp_run.html !! -! subroutines original +!>\section gen_cires_ugwp CIRES UGWP General Algorithm subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr, & oro, oro_uf, hprime, nmtvr, oc, theta, sigma, gamma, elvmax, clx, oa4, & do_tofd, ldiag_ugwp, cdmbgwd, xlat, xlat_d, sinlat, coslat, area, & diff --git a/physics/docs/library.bib b/physics/docs/library.bib index 7384e08a0..cfc3e3304 100644 --- a/physics/docs/library.bib +++ b/physics/docs/library.bib @@ -1,7 +1,7 @@ %% This BibTeX bibliography file was created using BibDesk. -%% https://bibdesk.sourceforge.io/ +%% http://bibdesk.sourceforge.net/ -%% Created for Grant Firl at 2019-10-25 16:36:06 -0600 +%% Created for Man Zhang at 2020-02-24 10:07:00 -0700 %% Saved with string encoding Unicode (UTF-8) @@ -2016,11 +2016,11 @@ @url{Li_2015 Url = {http://cpo.noaa.gov/sites/cpo/MAPP/workshops/rtf_technical_ws/presentations/21_Xu_Li.pdf}, Bdsk-Url-1 = {http://cpo.noaa.gov/sites/cpo/MAPP/workshops/rtf_technical_ws/presentations/21_Xu_Li.pdf}} -@url{li_and_derber_2009, +@webpage{li_and_derber_2009, Author = {Xu Li and John Derber}, - Date-Modified = {2018-07-17 20:46:44 +0000}, + Date-Modified = {2020-02-24 17:06:35 +0000}, Title = {Near Sea Surface Temperatures (NSST) Analysis in NCEP GFS}, - Url = {https://www.jcsda.noaa.gov/documents/meetings/wkshp2008/4/JCSDA_2008_Li.pdf}, + Url = {http://data.jcsda.org/Workshops/6th-workshop-onDA/Session-4/JCSDA_2008_Li.pdf}, Bdsk-Url-1 = {https://www.jcsda.noaa.gov/documents/meetings/wkshp2008/4/JCSDA_2008_Li.pdf}} @article{Fairall_et_al_1996, @@ -2892,273 +2892,308 @@ @article{hu_and_stamnes_1993 Year = {1993}} @article{alexander_et_al_2010, - author = {Alexander, M. J. and Geller, M. and McLandress, C. and Polavarapu, S. and Preusse, P. and Sassi, F. and Sato, K. and Eckermann, S. and Ern, M. and Hertzog, A. and Kawatani, Y. and Pulido, M. and Shaw, T. A. and Sigmond, M. and Vincent, R. and Watanabe, S.}, - title = {Recent developments in gravity-wave effects in climate models and the global distribution of gravity-wave momentum flux from observations and models}, - journal = {Quarterly Journal of the Royal Meteorological Society}, - volume = {136}, - number = {650}, - pages = {1103-1124}, - keywords = {atmosphere, gravity wave, momentum flux, drag, force, wind tendency, climate, global model}, - doi = {10.1002/qj.637}, - url = {https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/qj.637}, - eprint = {https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.637}, - year = {2010}} + Author = {Alexander, M. J. and Geller, M. and McLandress, C. and Polavarapu, S. and Preusse, P. and Sassi, F. and Sato, K. and Eckermann, S. and Ern, M. and Hertzog, A. and Kawatani, Y. and Pulido, M. and Shaw, T. A. and Sigmond, M. and Vincent, R. and Watanabe, S.}, + Doi = {10.1002/qj.637}, + Eprint = {https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.637}, + Journal = {Quarterly Journal of the Royal Meteorological Society}, + Keywords = {atmosphere, gravity wave, momentum flux, drag, force, wind tendency, climate, global model}, + Number = {650}, + Pages = {1103-1124}, + Title = {Recent developments in gravity-wave effects in climate models and the global distribution of gravity-wave momentum flux from observations and models}, + Url = {https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/qj.637}, + Volume = {136}, + Year = {2010}, + Bdsk-Url-1 = {https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/qj.637}, + Bdsk-Url-2 = {http://dx.doi.org/10.1002/qj.637}} @article{plougonven_and_zhang_2014, - author = {Plougonven, R. and Zhang, F.}, - title = {Internal gravity waves from atmospheric jets and fronts}, - journal = {Reviews of Geophysics}, - volume = {52}, - number = {1}, - pages = {33-76}, - keywords = {gravity waves, stratosphere, atmosphere, jets, fronts, weather}, - doi = {10.1002/2012RG000419}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2012RG000419}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2012RG000419}, - year = {2014}} + Author = {Plougonven, R. and Zhang, F.}, + Doi = {10.1002/2012RG000419}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2012RG000419}, + Journal = {Reviews of Geophysics}, + Keywords = {gravity waves, stratosphere, atmosphere, jets, fronts, weather}, + Number = {1}, + Pages = {33-76}, + Title = {Internal gravity waves from atmospheric jets and fronts}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2012RG000419}, + Volume = {52}, + Year = {2014}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2012RG000419}, + Bdsk-Url-2 = {http://dx.doi.org/10.1002/2012RG000419}} @article{weinstock_1984, - author = {Weinstock, J.}, - title = {Simplified derivation of an algorithm for nonlinear gravity waves}, - journal = {Journal of Geophysical Research: Space Physics}, - volume = {89}, - number = {A1}, - pages = {345-350}, - doi = {10.1029/JA089iA01p00345}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/JA089iA01p00345}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/JA089iA01p00345}, - year = {1984}} + Author = {Weinstock, J.}, + Doi = {10.1029/JA089iA01p00345}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/JA089iA01p00345}, + Journal = {Journal of Geophysical Research: Space Physics}, + Number = {A1}, + Pages = {345-350}, + Title = {Simplified derivation of an algorithm for nonlinear gravity waves}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/JA089iA01p00345}, + Volume = {89}, + Year = {1984}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/JA089iA01p00345}, + Bdsk-Url-2 = {http://dx.doi.org/10.1029/JA089iA01p00345}} @article{holton_1983, - author = {Holton, James R.}, - title = {The Influence of Gravity Wave Breaking on the General Circulation of the Middle Atmosphere}, - journal = {Journal of the Atmospheric Sciences}, - volume = {40}, - number = {10}, - pages = {2497-2507}, - year = {1983}, - doi = {10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, - URL = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, - eprint = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}} + Author = {Holton, James R.}, + Doi = {10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, + Eprint = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {10}, + Pages = {2497-2507}, + Title = {The Influence of Gravity Wave Breaking on the General Circulation of the Middle Atmosphere}, + Url = {https://doi.org/10.1175/1520-0469(1983)040<2497:TIOGWB>2.0.CO;2}, + Volume = {40}, + Year = {1983}, + Bdsk-Url-1 = {https://doi.org/10.1175/1520-0469(1983)040%3C2497:TIOGWB%3E2.0.CO;2}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(1983)040%3C2497:TIOGWB%3E2.0.CO;2}} @article{geller_et_al_2013, - author = {Geller, M. A. and Alexander, M. Joan and Love, P. T. and Bacmeister, J. and Ern, M. and Hertzog, A. and Manzini, E. and Preusse, P. and Sato, K. and Scaife, A. A. and Zhou, T.}, - title = {A Comparison between Gravity Wave Momentum Fluxes in Observations and Climate Models}, - journal = {Journal of Climate}, - volume = {26}, - number = {17}, - pages = {6383-6405}, - year = {2013}, - doi = {10.1175/JCLI-D-12-00545.1}, - URL = {https://doi.org/10.1175/JCLI-D-12-00545.1}, - eprint = {https://doi.org/10.1175/JCLI-D-12-00545.1}} + Author = {Geller, M. A. and Alexander, M. Joan and Love, P. T. and Bacmeister, J. and Ern, M. and Hertzog, A. and Manzini, E. and Preusse, P. and Sato, K. and Scaife, A. A. and Zhou, T.}, + Doi = {10.1175/JCLI-D-12-00545.1}, + Eprint = {https://doi.org/10.1175/JCLI-D-12-00545.1}, + Journal = {Journal of Climate}, + Number = {17}, + Pages = {6383-6405}, + Title = {A Comparison between Gravity Wave Momentum Fluxes in Observations and Climate Models}, + Url = {https://doi.org/10.1175/JCLI-D-12-00545.1}, + Volume = {26}, + Year = {2013}, + Bdsk-Url-1 = {https://doi.org/10.1175/JCLI-D-12-00545.1}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/JCLI-D-12-00545.1}} @article{garcia_et_al_2017, - author = {Garcia, R. R. and Smith, A. K. and Kinnison, D. E. and Cámara, Á. and Murphy, D. J.}, - title = {Modification of the Gravity Wave Parameterization in the Whole Atmosphere Community Climate Model: Motivation and Results}, - journal = {Journal of the Atmospheric Sciences}, - volume = {74}, - number = {1}, - pages = {275-291}, - year = {2017}, - doi = {10.1175/JAS-D-16-0104.1}, - URL = {https://doi.org/10.1175/JAS-D-16-0104.1}, - eprint = {https://doi.org/10.1175/JAS-D-16-0104.1}} + Author = {Garcia, R. R. and Smith, A. K. and Kinnison, D. E. and C{\'a}mara, {\'A}. and Murphy, D. J.}, + Doi = {10.1175/JAS-D-16-0104.1}, + Eprint = {https://doi.org/10.1175/JAS-D-16-0104.1}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {1}, + Pages = {275-291}, + Title = {Modification of the Gravity Wave Parameterization in the Whole Atmosphere Community Climate Model: Motivation and Results}, + Url = {https://doi.org/10.1175/JAS-D-16-0104.1}, + Volume = {74}, + Year = {2017}, + Bdsk-Url-1 = {https://doi.org/10.1175/JAS-D-16-0104.1}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/JAS-D-16-0104.1}} @inproceedings{yudin_et_al_2016, - title={Gravity wave physics in the NOAA Environmental Modeling System}, - author={Yudin, V.A. and Akmaev, R.A. and Fuller-Rowell, T.J. and Alpert, J.C.}, - booktitle={International SPARC Gravity Wave Symposium}, - volume={48}, - number={1}, - pages={012024}, - year={2016}, - organization={}} + Author = {Yudin, V.A. and Akmaev, R.A. and Fuller-Rowell, T.J. and Alpert, J.C.}, + Booktitle = {International SPARC Gravity Wave Symposium}, + Number = {1}, + Pages = {012024}, + Title = {Gravity wave physics in the NOAA Environmental Modeling System}, + Volume = {48}, + Year = {2016}} @inproceedings{alpert_et_al_2018, - title={Integrating Unified Gravity Wave Physics Research into the Next Generation Global Prediction System for NCEP Research to Operations}, - author={Alpert, Jordan C and Yudin, Valery and Fuller-Rowell, Tim and Akmaev, Rashid A}, - booktitle={98th American Meteorological Society Annual Meeting}, - year={2018}, - organization={AMS}} + Author = {Alpert, Jordan C and Yudin, Valery and Fuller-Rowell, Tim and Akmaev, Rashid A}, + Booktitle = {98th American Meteorological Society Annual Meeting}, + Organization = {AMS}, + Title = {Integrating Unified Gravity Wave Physics Research into the Next Generation Global Prediction System for NCEP Research to Operations}, + Year = {2018}} @article{eckermann_2011, - author = {Eckermann, Stephen D.}, - title = {Explicitly Stochastic Parameterization of Nonorographic Gravity Wave Drag}, - journal = {Journal of the Atmospheric Sciences}, - volume = {68}, - number = {8}, - pages = {1749-1765}, - year = {2011}, - doi = {10.1175/2011JAS3684.1}, - URL = {https://doi.org/10.1175/2011JAS3684.1}, - eprint = {https://doi.org/10.1175/2011JAS3684.1}} + Author = {Eckermann, Stephen D.}, + Doi = {10.1175/2011JAS3684.1}, + Eprint = {https://doi.org/10.1175/2011JAS3684.1}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {8}, + Pages = {1749-1765}, + Title = {Explicitly Stochastic Parameterization of Nonorographic Gravity Wave Drag}, + Url = {https://doi.org/10.1175/2011JAS3684.1}, + Volume = {68}, + Year = {2011}, + Bdsk-Url-1 = {https://doi.org/10.1175/2011JAS3684.1}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/2011JAS3684.1}} @article{lott_et_al_2012, - author = {Lott, F. and Guez, L. and Maury, P.}, - title = {A stochastic parameterization of non-orographic gravity waves: Formalism and impact on the equatorial stratosphere}, - journal = {Geophysical Research Letters}, - volume = {39}, - number = {6}, - pages = {}, - keywords = {Quasi-Biennial Oscillation, Rossby-gravity waves, gravity waves, stochastic parameterization, stratospheric dynamics}, - doi = {10.1029/2012GL051001}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2012GL051001}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2012GL051001}, - year = {2012}} + Author = {Lott, F. and Guez, L. and Maury, P.}, + Doi = {10.1029/2012GL051001}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2012GL051001}, + Journal = {Geophysical Research Letters}, + Keywords = {Quasi-Biennial Oscillation, Rossby-gravity waves, gravity waves, stochastic parameterization, stratospheric dynamics}, + Number = {6}, + Title = {A stochastic parameterization of non-orographic gravity waves: Formalism and impact on the equatorial stratosphere}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2012GL051001}, + Volume = {39}, + Year = {2012}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2012GL051001}, + Bdsk-Url-2 = {http://dx.doi.org/10.1029/2012GL051001}} @conference{yudin_et_al_2018, - author = {Yudin, V. A and Akmaev, R. A. and Alpert, J. C. and Fuller-Rowell T. J., and Karol S. I.}, - Booktitle = {25th Conference on Numerical Weather Prediction}, - Date-Added = {2018-06-04 10:50:44 -0600}, - Date-Modified = {2018-06-04 10:54:39 -0600}, - Editor = {Am. Meteorol. Soc.}, - Title = {Gravity Wave Physics and Dynamics in the FV3-based Atmosphere Models Extended into the Mesosphere}, - Year = {2018}} + Author = {Yudin, V. A and Akmaev, R. A. and Alpert, J. C. and Fuller-Rowell T. J., and Karol S. I.}, + Booktitle = {25th Conference on Numerical Weather Prediction}, + Date-Added = {2018-06-04 10:50:44 -0600}, + Date-Modified = {2018-06-04 10:54:39 -0600}, + Editor = {Am. Meteorol. Soc.}, + Title = {Gravity Wave Physics and Dynamics in the FV3-based Atmosphere Models Extended into the Mesosphere}, + Year = {2018}} @article{hines_1997, - title = "Doppler-spread parameterization of gravity-wave momentum deposition in the middle atmosphere. Part 2: Broad and quasi monochromatic spectra, and implementation", - journal = "Journal of Atmospheric and Solar-Terrestrial Physics", - volume = "59", - number = "4", - pages = "387 - 400", - year = "1997", - issn = "1364-6826", - doi = "https://doi.org/10.1016/S1364-6826(96)00080-6", - url = "http://www.sciencedirect.com/science/article/pii/S1364682696000806", - author = "Colin O. Hines"} + Author = {Colin O. Hines}, + Doi = {https://doi.org/10.1016/S1364-6826(96)00080-6}, + Issn = {1364-6826}, + Journal = {Journal of Atmospheric and Solar-Terrestrial Physics}, + Number = {4}, + Pages = {387 - 400}, + Title = {Doppler-spread parameterization of gravity-wave momentum deposition in the middle atmosphere. Part 2: Broad and quasi monochromatic spectra, and implementation}, + Url = {http://www.sciencedirect.com/science/article/pii/S1364682696000806}, + Volume = {59}, + Year = {1997}, + Bdsk-Url-1 = {http://www.sciencedirect.com/science/article/pii/S1364682696000806}, + Bdsk-Url-2 = {https://doi.org/10.1016/S1364-6826(96)00080-6}} @article{alexander_and_dunkerton_1999, - author = {Alexander, M. J. and Dunkerton, T. J.}, - title = {A Spectral Parameterization of Mean-Flow Forcing due to Breaking Gravity Waves}, - journal = {Journal of the Atmospheric Sciences}, - volume = {56}, - number = {24}, - pages = {4167-4182}, - year = {1999}, - doi = {10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, - URL = {https://doi.org/10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, - eprint = {https://doi.org/10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}} + Author = {Alexander, M. J. and Dunkerton, T. J.}, + Doi = {10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, + Eprint = {https://doi.org/10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {24}, + Pages = {4167-4182}, + Title = {A Spectral Parameterization of Mean-Flow Forcing due to Breaking Gravity Waves}, + Url = {https://doi.org/10.1175/1520-0469(1999)056<4167:ASPOMF>2.0.CO;2}, + Volume = {56}, + Year = {1999}, + Bdsk-Url-1 = {https://doi.org/10.1175/1520-0469(1999)056%3C4167:ASPOMF%3E2.0.CO;2}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(1999)056%3C4167:ASPOMF%3E2.0.CO;2}} @article{scinocca_2003, - author = {Scinocca, John F.}, - title = {An Accurate Spectral Nonorographic Gravity Wave Drag Parameterization for General Circulation Models}, - journal = {Journal of the Atmospheric Sciences}, - volume = {60}, - number = {4}, - pages = {667-682}, - year = {2003}, - doi = {10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, - URL = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, - eprint = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}} + Author = {Scinocca, John F.}, + Doi = {10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, + Eprint = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {4}, + Pages = {667-682}, + Title = {An Accurate Spectral Nonorographic Gravity Wave Drag Parameterization for General Circulation Models}, + Url = {https://doi.org/10.1175/1520-0469(2003)060<0667:AASNGW>2.0.CO;2}, + Volume = {60}, + Year = {2003}, + Bdsk-Url-1 = {https://doi.org/10.1175/1520-0469(2003)060%3C0667:AASNGW%3E2.0.CO;2}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/1520-0469(2003)060%3C0667:AASNGW%3E2.0.CO;2}} @article{shaw_and_shepherd_2009, - author = {Shaw, Tiffany A. and Shepherd, Theodore G.}, - title = {A Theoretical Framework for Energy and Momentum Consistency in Subgrid-Scale Parameterization for Climate Models}, - journal = {Journal of the Atmospheric Sciences}, - volume = {66}, - number = {10}, - pages = {3095-3114}, - year = {2009}, - doi = {10.1175/2009JAS3051.1}, - URL = {https://doi.org/10.1175/2009JAS3051.1}, - eprint = {https://doi.org/10.1175/2009JAS3051.1}} - -@Article{molod_et_al_2015, - AUTHOR = {Molod, A. and Takacs, L. and Suarez, M. and Bacmeister, J.}, - TITLE = {Development of the GEOS-5 atmospheric general circulation model: evolution from MERRA to MERRA2}, - JOURNAL = {Geoscientific Model Development}, - VOLUME = {8}, - YEAR = {2015}, - NUMBER = {5}, - PAGES = {1339--1356}, - URL = {https://www.geosci-model-dev.net/8/1339/2015/}, - DOI = {10.5194/gmd-8-1339-2015}} + Author = {Shaw, Tiffany A. and Shepherd, Theodore G.}, + Doi = {10.1175/2009JAS3051.1}, + Eprint = {https://doi.org/10.1175/2009JAS3051.1}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {10}, + Pages = {3095-3114}, + Title = {A Theoretical Framework for Energy and Momentum Consistency in Subgrid-Scale Parameterization for Climate Models}, + Url = {https://doi.org/10.1175/2009JAS3051.1}, + Volume = {66}, + Year = {2009}, + Bdsk-Url-1 = {https://doi.org/10.1175/2009JAS3051.1}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/2009JAS3051.1}} + +@article{molod_et_al_2015, + Author = {Molod, A. and Takacs, L. and Suarez, M. and Bacmeister, J.}, + Doi = {10.5194/gmd-8-1339-2015}, + Journal = {Geoscientific Model Development}, + Number = {5}, + Pages = {1339--1356}, + Title = {Development of the GEOS-5 atmospheric general circulation model: evolution from MERRA to MERRA2}, + Url = {https://www.geosci-model-dev.net/8/1339/2015/}, + Volume = {8}, + Year = {2015}, + Bdsk-Url-1 = {https://www.geosci-model-dev.net/8/1339/2015/}, + Bdsk-Url-2 = {http://dx.doi.org/10.5194/gmd-8-1339-2015}} @article{richter_et_al_2010, - author = {Richter, Jadwiga H. and Sassi, Fabrizio and Garcia, Rolando R.}, - title = {Toward a Physically Based Gravity Wave Source Parameterization in a General Circulation Model}, - journal = {Journal of the Atmospheric Sciences}, - volume = {67}, - number = {1}, - pages = {136-156}, - year = {2010}, - doi = {10.1175/2009JAS3112.1}, - URL = {https://doi.org/10.1175/2009JAS3112.1}, - eprint = {https://doi.org/10.1175/2009JAS3112.1}} + Author = {Richter, Jadwiga H. and Sassi, Fabrizio and Garcia, Rolando R.}, + Doi = {10.1175/2009JAS3112.1}, + Eprint = {https://doi.org/10.1175/2009JAS3112.1}, + Journal = {Journal of the Atmospheric Sciences}, + Number = {1}, + Pages = {136-156}, + Title = {Toward a Physically Based Gravity Wave Source Parameterization in a General Circulation Model}, + Url = {https://doi.org/10.1175/2009JAS3112.1}, + Volume = {67}, + Year = {2010}, + Bdsk-Url-1 = {https://doi.org/10.1175/2009JAS3112.1}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/2009JAS3112.1}} @article{richter_et_al_2014, - author = {Richter, Jadwiga H. and Solomon, Abraham and Bacmeister, Julio T.}, - title = {Effects of vertical resolution and nonorographic gravity wave drag on the simulated climate in the Community Atmosphere Model, version 5}, - journal = {Journal of Advances in Modeling Earth Systems}, - volume = {6}, - number = {2}, - pages = {357-383}, - keywords = {climate modeling, vertical resolution, modeling, climate, global circulation model, general circulation model}, - doi = {10.1002/2013MS000303}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2013MS000303}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2013MS000303}, - year = {2014}} + Author = {Richter, Jadwiga H. and Solomon, Abraham and Bacmeister, Julio T.}, + Doi = {10.1002/2013MS000303}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2013MS000303}, + Journal = {Journal of Advances in Modeling Earth Systems}, + Keywords = {climate modeling, vertical resolution, modeling, climate, global circulation model, general circulation model}, + Number = {2}, + Pages = {357-383}, + Title = {Effects of vertical resolution and nonorographic gravity wave drag on the simulated climate in the Community Atmosphere Model, version 5}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2013MS000303}, + Volume = {6}, + Year = {2014}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2013MS000303}, + Bdsk-Url-2 = {http://dx.doi.org/10.1002/2013MS000303}} @article{gelaro_et_al_2017, - author = {Gelaro, et al.}, - title = {The Modern-Era Retrospective Analysis for Research and Applications, Version 2 (MERRA-2)}, - journal = {Journal of Climate}, - volume = {30}, - number = {14}, - pages = {5419-5454}, - year = {2017}, - doi = {10.1175/JCLI-D-16-0758.1}, - URL = {https://doi.org/10.1175/JCLI-D-16-0758.1}, - eprint = {https://doi.org/10.1175/JCLI-D-16-0758.1}} + Author = {Gelaro, et al.}, + Doi = {10.1175/JCLI-D-16-0758.1}, + Eprint = {https://doi.org/10.1175/JCLI-D-16-0758.1}, + Journal = {Journal of Climate}, + Number = {14}, + Pages = {5419-5454}, + Title = {The Modern-Era Retrospective Analysis for Research and Applications, Version 2 (MERRA-2)}, + Url = {https://doi.org/10.1175/JCLI-D-16-0758.1}, + Volume = {30}, + Year = {2017}, + Bdsk-Url-1 = {https://doi.org/10.1175/JCLI-D-16-0758.1}, + Bdsk-Url-2 = {http://dx.doi.org/10.1175/JCLI-D-16-0758.1}} @article{garcia_et_al_2007, - author = {Garcia, R. R. and Marsh, D. R. and Kinnison, D. E. and Boville, B. A. and Sassi, F.}, - title = {Simulation of secular trends in the middle atmosphere, 1950–2003}, - journal = {Journal of Geophysical Research: Atmospheres}, - volume = {112}, - number = {D9}, - pages = {}, - keywords = {global change, ozone depletion, water vapor trends, temperature trends}, - doi = {10.1029/2006JD007485}, - url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2006JD007485}, - eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2006JD007485}, - year = {2007}} + Author = {Garcia, R. R. and Marsh, D. R. and Kinnison, D. E. and Boville, B. A. and Sassi, F.}, + Doi = {10.1029/2006JD007485}, + Eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2006JD007485}, + Journal = {Journal of Geophysical Research: Atmospheres}, + Keywords = {global change, ozone depletion, water vapor trends, temperature trends}, + Number = {D9}, + Title = {Simulation of secular trends in the middle atmosphere, 1950--2003}, + Url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2006JD007485}, + Volume = {112}, + Year = {2007}, + Bdsk-Url-1 = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2006JD007485}, + Bdsk-Url-2 = {http://dx.doi.org/10.1029/2006JD007485}} @article{eckermann_et_al_2009, - title = "High-altitude data assimilation system experiments for the northern summer mesosphere season of 2007", - journal = "Journal of Atmospheric and Solar-Terrestrial Physics", - volume = "71", - number = "3", - pages = "531 - 551", - year = "2009", - note = "Global Perspectives on the Aeronomy of the Summer Mesopause Region", - issn = "1364-6826", - doi = "https://doi.org/10.1016/j.jastp.2008.09.036", - url = "http://www.sciencedirect.com/science/article/pii/S1364682608002575", - author = "Stephen D. Eckermann and Karl W. Hoppel and Lawrence Coy and John P. McCormack and David E. Siskind and Kim Nielsen and Andrew Kochenash and Michael H. Stevens and Christoph R. Englert and Werner Singer and Mark Hervig", - keywords = "Data assimilation, Polar mesospheric cloud, Tide, Planetary wave, Mesosphere",} + Author = {Stephen D. Eckermann and Karl W. Hoppel and Lawrence Coy and John P. McCormack and David E. Siskind and Kim Nielsen and Andrew Kochenash and Michael H. Stevens and Christoph R. Englert and Werner Singer and Mark Hervig}, + Doi = {https://doi.org/10.1016/j.jastp.2008.09.036}, + Issn = {1364-6826}, + Journal = {Journal of Atmospheric and Solar-Terrestrial Physics}, + Keywords = {Data assimilation, Polar mesospheric cloud, Tide, Planetary wave, Mesosphere}, + Note = {Global Perspectives on the Aeronomy of the Summer Mesopause Region}, + Number = {3}, + Pages = {531 - 551}, + Title = {High-altitude data assimilation system experiments for the northern summer mesosphere season of 2007}, + Url = {http://www.sciencedirect.com/science/article/pii/S1364682608002575}, + Volume = {71}, + Year = {2009}, + Bdsk-Url-1 = {http://www.sciencedirect.com/science/article/pii/S1364682608002575}, + Bdsk-Url-2 = {https://doi.org/10.1016/j.jastp.2008.09.036}} @inproceedings{alpert_et_al_2019, - title={Atmospheric Gravity Wave Sources Correlated with Resolved-scale GW Activity and Sub-grid Scale Parameterization in the FV3gfs Model}, - author={Alpert, Jordan C and Yudin, Valery A and Strobach, Edward}, - booktitle={AGU Fall Meeting 2019}, - year={2019}, - organization={AGU}} - -@Article{ern_et_al_2018, - AUTHOR = {Ern, M. and Trinh, Q. T. and Preusse, P. and Gille, J. C. and Mlynczak, M. G. and Russell III, J. M. and Riese, M.}, - TITLE = {GRACILE: a comprehensive climatology of atmospheric gravity wave parameters based on satellite limb soundings}, - JOURNAL = {Earth System Science Data}, - VOLUME = {10}, - YEAR = {2018}, - NUMBER = {2}, - PAGES = {857--892}, - URL = {https://www.earth-syst-sci-data.net/10/857/2018/}, - DOI = {10.5194/essd-10-857-2018}} + Author = {Alpert, Jordan C and Yudin, Valery A and Strobach, Edward}, + Booktitle = {AGU Fall Meeting 2019}, + Organization = {AGU}, + Title = {Atmospheric Gravity Wave Sources Correlated with Resolved-scale GW Activity and Sub-grid Scale Parameterization in the FV3gfs Model}, + Year = {2019}} + +@article{ern_et_al_2018, + Author = {Ern, M. and Trinh, Q. T. and Preusse, P. and Gille, J. C. and Mlynczak, M. G. and Russell III, J. M. and Riese, M.}, + Doi = {10.5194/essd-10-857-2018}, + Journal = {Earth System Science Data}, + Number = {2}, + Pages = {857--892}, + Title = {GRACILE: a comprehensive climatology of atmospheric gravity wave parameters based on satellite limb soundings}, + Url = {https://www.earth-syst-sci-data.net/10/857/2018/}, + Volume = {10}, + Year = {2018}, + Bdsk-Url-1 = {https://www.earth-syst-sci-data.net/10/857/2018/}, + Bdsk-Url-2 = {http://dx.doi.org/10.5194/essd-10-857-2018}} @inproceedings{yudin_et_al_2019, - title={Longitudinal Variability of Wave Dynamics in Weather Models Extended into the Mesosphere and Thermosphere}, - author={Yudin V.A. , S. I. Karol, R.A. Akmaev, T. Fuller-Rowell, D. Kleist, A. Kubaryk, and C. Thompson}, - booktitle={Space Weather Workshop}, - year={2019},} + Author = {Yudin V.A. , S. I. Karol, R.A. Akmaev, T. Fuller-Rowell, D. Kleist, A. Kubaryk, and C. Thompson}, + Booktitle = {Space Weather Workshop}, + Title = {Longitudinal Variability of Wave Dynamics in Weather Models Extended into the Mesosphere and Thermosphere}, + Year = {2019}} diff --git a/physics/docs/pdftxt/GFS_UGWPv0.txt b/physics/docs/pdftxt/GFS_UGWPv0.txt new file mode 100644 index 000000000..e6ea3b6f4 --- /dev/null +++ b/physics/docs/pdftxt/GFS_UGWPv0.txt @@ -0,0 +1,117 @@ +/** +\page GFS_UGWP_v0 CIRES Unified Gravity Wave Physics Scheme - Version 0 +\section des_UGWP Description + +Gravity waves (GWs) are generated by a variety of sources in the atmosphere +including orographic GWs (OGWs; quasi-stationary waves) and non-orographic +GWs (NGWs; non-stationary oscillations). When the Version 0 of the Unified +Gravity Wave Physics (UGWP v0) is invoked, the subgrid OGWs and NGWs are +parameterized. For the subgrid-scale parameterization of OGWs, the UGWP +invokes a separate scheme, the \subpage GFS_GWDPS, which is used in the operational +Global Forecast System (GFS) version 15. + +The NGW physics scheme parameterizes the effects of non-stationary waves +unresolved by dynamical cores. These non-stationary oscillations with periods +bounded by Coriolis and Brunt-Väisälä frequencies and typical horizontal +scales from tens to several hundreds of kilometers, are forced by the +imbalance of convective and frontal/jet dynamics in the troposphere and +lower stratosphere (Fritts 1984 \cite fritts_1984; Alexander et al. +2010 \cite alexander_et_al_2010; Plougonven and Zhang 2014 \cite plougonven_and_zhang_2014). +The NGWs propagate upwards and the amplitudes exponentially grow with +altitude until instability and breaking of waves occur. Convective and +dynamical instability induced by GWs with large amplitudes can trigger +production of small-scale turbulence and self-destruction of waves. +The latter process in the theory of atmospheric GWs is frequently referred +as the wave saturation (Lindzen 1981 \cite lindzen_1981; Weinstock +1984 \cite weinstock_1984; Fritts 1984 \cite fritts_1984). Herein, +“saturation” or "breaking" refers to any processes that act to reduce +wave amplitudes due to instabilities and/or interactions arising from +large-amplitude perturbations limiting the exponential growth of GWs +with height. Background dissipation processes such as molecular diffusion +and radiative cooling, in contrast, act independently of GW amplitudes. +In the middle atmosphere, impacts of NGW saturation (or breaking) and +dissipation on the large-scale circulation, mixing, and transport have +been acknowledged in the physics of global weather and climate models +after pioneering studies by Lindzen 1981 \cite lindzen_1981 and Holton +1983 \cite holton_1983. Comprehensive reviews on the physics of NGWs +and OGWs in climate and weather models have been discussted in Alexander +et al. 2010 \cite alexander_et_al_2010, Geller et al. +2013 \cite geller_et_al_2013, and Garcia et al. 2017 \cite garcia_et_al_2017. +They are formulated using different aspects of the nonlinear and linear +propagation, instability, breaking and dissipation of waves along with +different specifications of GW sources (Garcia et al. 2007 \cite garcia_et_al_2007; +Richter et al 2010 \cite richter_et_al_2010; Eckermann et al. +2009 \cite eckermann_et_al_2009; Eckermann 2011 \cite eckermann_2011; +Lott et al. 2012 \cite lott_et_al_2012). + +Several studies have demonstrated the importance of NGW physics to improve +model predictions in the stratosphere and upper atmosphere (Alexander et al. + 2010 \cite alexander_et_al_2010; Geller et al. 2013). In order to describe +the effects of unresolved GWs in global forecast models, the representation of +subgrid OGWs and NGWs has been implemented in the self-consistent manner using the +UGWP framework. + +The concept of UGWP was first proposed and implemented in the Unified +Forecast System (UFS)with model top at different levels by scientists from +the University of Colorado Cooperative Institute for Research in the +Environmental Sciences (CIRES) at NOAA's Space Weather Prediction Center (SWPC) +and from NOAA's Environmental Modeling Center (EMC) (Alpert et al. +2019 \cite alpert_et_al_2019; Yudin et al. 2016 \cite yudin_et_al_2016; +Yudin et al. 2018 \cite yudin_et_al_2018). The UGWP considers identical +GW propagation solvers for OGWs and NGWs with different approaches for +specification of subgrid wave sources. The current set of the input and +control paramters for UGWP version 0 (UGWP v0) enables options for GW +effects, including momentum deposition (also called GW drag), heat +deposition, and mixing by eddy viscosity, conductivity and diffusion; +however, note that the eddy mixing effects induced by instability of GWs +are not activated in this version. + +Namelist paramters control the number of directional azimuths in which +waves can propagate, number of waves in a single direction, and the level +above the surface at which NGWs can be launched. Among the input parameters, +the GW efficiency factors reflect intermittency of wave excitation. +They should vary with horizontal resolution, reflecting the capability of +the dynamical core to resolve mesoscale wave activity with the enhancement +of model resolution. + +Prescribed distributions for vertical momentum flux (VMF) of NGWs have been employed +in global numerical weather prediction and reanalysis models to ease tuning of GW +schemes to the climatology of the middle atmosphere dynamics in the absence of +the global wind data above about 35 km (Eckermann et al. 2009 \cite eckermann_et_al_2009; +Molod et al. 2015 \cite molod_et_al_2015). These distributions of VMF +qualitatively describe the general features of the latitudinal and seasonal + variations of the global GW activity in the lower stratosphere, observed from the +ground and space (Ern et al. 2018 \cite ern_et_al_2018). Subgrid GW sources can also be +parameterized to respond to year-to-year variations of solar input and +anthropogenic emissions (Richter et al 2010 \cite richter_et_al_2010; +2014 \cite richter_et_al_2014). + +Note that in UGWP v0, the momentum and heat deposition due to GW breaking +and dissipation have been tested in the multi-year simulations and +medium-range forecasts using a configuration of the UFS weather model +using 127 levels with model top at approximately 80 km. + +Along with the GW heat and momentum depositions, GW eddy mixing is an +important element of the Whole Atmosphere Model (WAM) physics, as shown +in WAM simulations with the spectral dynamics (Yudin et al. 2018 \cite yudin_et_al_2018). +The impact of eddy mixing effects in the middle and upper atmosphere, +which is not included in this version, need to be tested, evaluated, and +orchestrated with the representation of the subgrid turbulent diffusion and +the numerical dissipation. + +The representation of subgrid GWs is particularly important for WAMs that +extend into the thermosphere (top lid at ~600 km). In the mesosphere and +thermosphere, the background attenuation of subgrid waves due to molecular +and turbulent diffusion, radiative damping and ion drag will be the +additional mechanism of NGW and OGW dissipation along with convective +and dynamical instability of waves described by the linear +(Lindzen 1981 \cite lindzen_1981) and nonlinear +(Weinstock 1984 \cite weinstock_1984; Hines 1997 \cite hines_1997) saturation theories. + +\section intra_UGWPv0 Intraphysics Communication +\ref arg_table_cires_ugwp_run + +\section gen_al_ugwpv0 General Algorithm +\ref gen_cires_ugwp + +*/ diff --git a/physics/docs/pdftxt/GFSv15p2_suite.txt b/physics/docs/pdftxt/GFSv15p2_suite.txt new file mode 100644 index 000000000..7d9f9d348 --- /dev/null +++ b/physics/docs/pdftxt/GFSv15p2_suite.txt @@ -0,0 +1,133 @@ +/** +\page GFS_v15p2_page GFS_v15p2 Suite + +\section gfs1_suite_overview Overview + +Suite GFS_v15p2 has the parameterizations used in the GFS v15 implemented operationally +in June 2019. + +The GFS_v15p2 physics suite uses the parameterizations in the following order: + - \ref GFS_RRTMG + - \ref GFS_SFCLYR + - \ref GFS_NSST + - \ref GFS_NOAH + - \ref GFS_SFCSICE + - \ref GFS_HEDMF + - \ref GFS_UGWP_v0 + - \ref GFS_RAYLEIGH + - \ref GFS_OZPHYS + - \ref GFS_H2OPHYS + - \ref GFS_SAMFdeep + - \ref GFS_SAMFshal + - \ref GFDL_cloud + - \ref GFS_CALPRECIPTYPE + +\section sdf_gfsv15p2 Suite Definition File +- For NEMSIO initialization data: \ref suite_FV3_GFS_v15p2_xml +- For GRIB2 initialization data: \ref suite_FV3_GFS_v15p2_no_nsst_xml + +\section gfs15p2_nml_opt_des Namelist + +- \b &gfs_physics_nml +\n \c fhzero = 6 +\n \c h2o_phys = .true. +\n \c ldiag3d = .false. +\n \c fhcyc = 24 +\n \c use_ufo = .true. +\n \c pre_rad = .false. +\n \c ncld = 5 +\n \c imp_physics = 11 +\n \c pdfcld = .false. +\n \c fhswr = 3600. +\n \c fhlwr = 3600. +\n \c ialb = 1 +\n \c iems = 1 +\n \c iaer = 111 +\n \c ico2 = 2 +\n \c isubc_sw = 2 +\n \c isubc_lw = 2 +\n \c isol = 2 +\n \c lwhtr = .true. +\n \c swhtr = .true. +\n \c cnvgwd = .true. +\n \c shal_cnv = .true. +\n \c cal_pre = .false. +\n \c redrag = .true. +\n \c dspheat = .true. +\n \c hybedmf = .true. +\n \c random_clds = .false. +\n \c trans_trac = .true. +\n \c cnvcld = .true. +\n \c imfshalcnv = 2 +\n \c imfdeepcnv = 2 +\n \c cdmbgwd = 3.5,0.25 [1.0,1.2] [0.2,2.5] [0.125,3.0] ! [C768] [C384] [C192] [C96]L64 +\n \c prslrd0 = 0. +\n \c ivegsrc = 1 +\n \c isot = 1 +\n \c debug = .false. +\n \c oz_phys = .F. +\n \c oz_phys_2015 = .T. +\n \c nstf_name = @[NSTF_NAME] +\n \c nst_anl = .true. +\n \c psautco = 0.0008,0.0005 +\n \c prautco = 0.00015,0.00015 +\n \c lgfdlmprad = .true. +\n \c effr_in = .true. +\n \c do_sppt = .false. +\n \c do_shum = .false. +\n \c do_skeb = .false. +\n \c do_sfcperts = .false. + +- \b &gfdl_cloud_microphysics_nml +\n \c sedi_transport = .true. +\n \c do_sedi_heat = .false. +\n \c rad_snow = .true. +\n \c rad_graupel = .true. +\n \c rad_rain = .true. +\n \c const_vi = .F. +\n \c const_vs = .F. +\n \c const_vg = .F. +\n \c const_vr = .F. +\n \c vi_max = 1. +\n \c vs_max = 2. +\n \c vg_max = 12. +\n \c vr_max = 12. +\n \c qi_lim = 1. +\n \c prog_ccn = .false. +\n \c do_qa = .true. +\n \c fast_sat_adj = .true. +\n \c tau_l2v = 225. +\n \c tau_v2l = 150. +\n \c tau_g2v = 900. +\n \c rthresh = 10.e-6 +\n \c dw_land = 0.16 +\n \c dw_ocean = 0.10 +\n \c ql_gen = 1.0e-3 +\n \c ql_mlt = 1.0e-3 +\n \c qi0_crt = 8.0E-5 +\n \c qs0_crt = 1.0e-3 +\n \c tau_i2s = 1000. +\n \c c_psaci = 0.05 +\n \c c_pgacs = 0.01 +\n \c rh_inc = 0.30 +\n \c rh_inr = 0.30 +\n \c rh_ins = 0.30 +\n \c ccn_l = 300. +\n \c ccn_o = 100. +\n \c c_paut = 0.5 +\n \c c_cracw = 0.8 +\n \c use_ppm = .false. +\n \c use_ccn = .true. +\n \c mono_prof = .true. +\n \c z_slope_liq = .true. +\n \c z_slope_ice = .true. +\n \c de_ice = .false. +\n \c fix_negative = .true. +\n \c icloud_f = 1 +\n \c mp_time = 150. + +\note nstf_name = \f$2,0,0,0,0[2,1,0,0,0]^1 [0,0,0,0,0]^2\f$ +- \f$^1\f$ This should be used when spinning up NSST fields in the absence of NSST data in initial conditions (see documentation for CHGRES) +- \f$^2\f$ This should be used when not using NSST at all (paired with \ref suite_FV3_GFS_v15p2_no_nsst_xml to turned off NSST option) + +*/ diff --git a/physics/docs/pdftxt/GFSv16beta_suite.txt b/physics/docs/pdftxt/GFSv16beta_suite.txt new file mode 100644 index 000000000..abba846f1 --- /dev/null +++ b/physics/docs/pdftxt/GFSv16beta_suite.txt @@ -0,0 +1,176 @@ +/** +\page GFS_v16beta_page GFS_v16beta Suite + +\section gfsv16beta_suite_overview Overview + +Version 16 of the Global Forecast System (GFS) will be implemented operationally by the NOAA +National Centers for Environmental Prediction (NCEP) in 2021. GFS_v16beta is a prototype of +the GFS_v16 suite. The main difference between the GFS_v15p2 and GFS_v16beta suites is the +replacement of the K-based EDMF PBL scheme with a moist TKE based one. + + +The GFS_v16beta physics suite uses the parameterizations in the following order: + - \ref GFS_RRTMG + - \ref GFS_SFCLYR + - \ref GFS_NSST + - \ref GFS_NOAH + - \ref GFS_SFCSICE + - \ref GFS_SATMEDMFVDIFQ + - \ref GFS_UGWP_v0 + - \ref GFS_RAYLEIGH + - \ref GFS_OZPHYS + - \ref GFS_H2OPHYS + - \ref GFS_SAMFdeep + - \ref GFS_SAMFshal + - \ref GFDL_cloud + - \ref GFS_CALPRECIPTYPE + +\section sdf_gfsv16b Suite Definition File +- For NEMSIO initialization data: \ref suite_FV3_GFS_v16beta_xml +- For GRIB2 initialization data: \ref suite_FV3_GFS_v16beta_no_nsst_xml + +\section gfs16beta_nml_opt_des Namelist + +- \b &gfs_physics_nml +\n \c fhzero = 6 +\n \c h2o_phys = .true. +\n \c ldiag3d = .false. +\n \c fhcyc = 24 +\n \c use_ufo = .true. +\n \c pre_rad = .false. +\n \c ncld = 5 +\n \c imp_physics = 11 +\n \c pdfcld = .false. +\n \c fhswr = 3600. +\n \c fhlwr = 3600. +\n \c ialb = 1 +\n \c iems = 1 +\n \c iaer = 5111 +\n \c icliq_sw = 2 +\n \c iovr_lw = 3 +\n \c iovr_sw = 3 +\n \c ico2 = 2 +\n \c isubc_sw = 2 +\n \c isubc_lw = 2 +\n \c isol = 2 +\n \c lwhtr = .true. +\n \c swhtr = .true. +\n \c cnvgwd = .true. +\n \c shal_cnv = .true. +\n \c cal_pre = .false. +\n \c redrag = .true. +\n \c dspheat = .true. +\n \c hybedmf = .false. +\n \c satmedmf = .true. +\n \c isatmedmf = 1 +\n \c lheatstrg = .true. +\n \c random_clds = .false. +\n \c trans_trac = .true. +\n \c cnvcld = .true. +\n \c imfshalcnv = 2 +\n \c imfdeepcnv = 2 +\n \c cdmbgwd = 4.0,0.15,1.0,1.0 [1.1,0.72,1.0,1.0] [0.23,1.5,1.0,1.0] [0.14,1.8,1.0,1.0] ! [C768] [C384] [C192] [C96]L64 +\n \c prslrd0 = 0. +\n \c ivegsrc = 1 +\n \c isot = 1 +\n \c lsoil = 4 +\n \c lsm = 1 +\n \c iopt_dveg = 1 +\n \c iopt_crs = 1 +\n \c iopt_btr = 1 +\n \c iopt_run = 1 +\n \c iopt_sfc = 1 +\n \c iopt_frz = 1 +\n \c iopt_inf = 1 +\n \c iopt_rad = 1 +\n \c iopt_alb = 2 +\n \c iopt_snf = 4 +\n \c iopt_tbot = 2 +\n \c iopt_stc = 1 +\n \c debug = .false. +\n \c oz_phys = .F. +\n \c oz_phys_2015 = .T. +\n \c nstf_name = @[NSTF_NAME] +\n \c nst_anl = .true. +\n \c psautco = 0.0008,0.0005 +\n \c prautco = 0.00015,0.00015 +\n \c lgfdlmprad = .true. +\n \c effr_in = .true. +\n \c ldiag_ugwp = .false. +\n \c do_ugwp = .false. +\n \c do_tofd = .true. +\n \c do_sppt = .false. +\n \c do_shum = .false. +\n \c do_skeb = .false. +\n \c do_sfcperts = .false. + + +- \b &gfdl_cloud_microphysics_nml +\n \c sedi_transport = .true. +\n \c do_sedi_heat = .false. +\n \c rad_snow = .true. +\n \c rad_graupel = .true. +\n \c rad_rain = .true. +\n \c const_vi = .F. +\n \c const_vs = .F. +\n \c const_vg = .F. +\n \c const_vr = .F. +\n \c vi_max = 1. +\n \c vs_max = 2. +\n \c vg_max = 12. +\n \c vr_max = 12. +\n \c qi_lim = 1. +\n \c prog_ccn = .false. +\n \c do_qa = .true. +\n \c fast_sat_adj = .true. +\n \c tau_l2v = 225. +\n \c tau_v2l = 150. +\n \c tau_g2v = 900. +\n \c rthresh = 10.e-6 +\n \c dw_land = 0.16 +\n \c dw_ocean = 0.10 +\n \c ql_gen = 1.0e-3 +\n \c ql_mlt = 1.0e-3 +\n \c qi0_crt = 8.0E-5 +\n \c qs0_crt = 1.0e-3 +\n \c tau_i2s = 1000. +\n \c c_psaci = 0.05 +\n \c c_pgacs = 0.01 +\n \c rh_inc = 0.30 +\n \c rh_inr = 0.30 +\n \c rh_ins = 0.30 +\n \c ccn_l = 300. +\n \c ccn_o = 100. +\n \c c_paut = 0.5 +\n \c c_cracw = 0.8 +\n \c use_ppm = .false. +\n \c use_ccn = .true. +\n \c mono_prof = .true. +\n \c z_slope_liq = .true. +\n \c z_slope_ice = .true. +\n \c de_ice = .false. +\n \c fix_negative = .true. +\n \c icloud_f = 1 +\n \c mp_time = 150. +\n \c reiflag = 2 + + +- \b &cires_ugwp_nml +\n \c knob_ugwp_solver = 2 +\n \c knob_ugwp_source = 1,1,0,0 +\n \c knob_ugwp_wvspec = 1,25,25,25 +\n \c knob_ugwp_azdir = 2,4,4,4 +\n \c knob_ugwp_stoch = 0,0,0,0 +\n \c knob_ugwp_effac = 1,1,1,1 +\n \c knob_ugwp_doaxyz = 1 +\n \c knob_ugwp_doheat = 1 +\n \c knob_ugwp_dokdis = 1 +\n \c knob_ugwp_ndx4lh = 1 +\n \c knob_ugwp_version = 0 +\n \c launch_level = 27 + +\note nstf_name = \f$2,0,0,0,0[2,1,0,0,0]^1 [0,0,0,0,0]^2\f$ +- \f$^1\f$ This should be used when spinning up NSST fields in the absence of NSST data in initial conditions (see documentation for CHGRES) +- \f$^2\f$ This should be used when not using NSST at all (paired with \ref suite_FV3_GFS_v16beta_no_nsst_xml to turned off NSST option) + +*/ diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt new file mode 100644 index 000000000..f12b0c366 --- /dev/null +++ b/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt @@ -0,0 +1,101 @@ +/** +\page suite_FV3_GFS_v15p2_xml suite_FV3_GFS_v15p2.xml + +\code + + + + + + + fv_sat_adj + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + dcyc2t3_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + hedmf + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + GFS_DCNV_generic_pre + get_phi_fv3 + GFS_suite_interstitial_3 + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + +\endcode + +*/ diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt new file mode 100644 index 000000000..cd29eecdb --- /dev/null +++ b/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt @@ -0,0 +1,100 @@ +/** +\page suite_FV3_GFS_v15p2_no_nsst_xml suite_FV3_GFS_v15p2_no_nsst.xml + +\code + + + + + + + fv_sat_adj + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_ocean + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + dcyc2t3_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + hedmf + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_DCNV_generic_pre + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + +\endcode + +*/ + diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt new file mode 100644 index 000000000..722224988 --- /dev/null +++ b/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt @@ -0,0 +1,101 @@ +/** +\page suite_FV3_GFS_v16beta_xml suite_FV3_GFS_v16beta.xml + +\code + + + + + + + fv_sat_adj + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + dcyc2t3_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + satmedmfvdifq + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + GFS_DCNV_generic_pre + get_phi_fv3 + GFS_suite_interstitial_3 + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + +\endcode + +*/ diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt new file mode 100644 index 000000000..adeb4352a --- /dev/null +++ b/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt @@ -0,0 +1,98 @@ +/** +\page suite_FV3_GFS_v16beta_no_nsst_xml suite_FV3_GFS_v16beta_no_nsst.xml + +\code + + + + + + + fv_sat_adj + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_ocean + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + dcyc2t3_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + satmedmfvdifq + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_DCNV_generic_pre + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + +\endcode +*/ diff --git a/physics/docs/pdftxt/suite_input.nml.txt b/physics/docs/pdftxt/suite_input.nml.txt index fcb55d84f..688eb5d07 100644 --- a/physics/docs/pdftxt/suite_input.nml.txt +++ b/physics/docs/pdftxt/suite_input.nml.txt @@ -389,42 +389,61 @@ and how stochastic perturbations are used in the Noah Land Surface Model. skebint compns_stochy_mod 0 \b &gfdl_cloud_microphysics_nml sedi_transport gfdl_cloud_microphys_mod logical flag for turning on horizontal momentum transport during sedimentation .true. +do_sedi_w gfdl_cloud_microphys_mod \a .true. to turn on vertical motion transport during sedimentation. (not supported in GFS physics) .false. do_sedi_heat gfdl_cloud_microphys_mod logical flag for turning on horizontal heat transport during sedimentation .true. rad_snow gfdl_cloud_microphys_mod logical flag for considering snow in cloud fraction calculation .true. rad_graupel gfdl_cloud_microphys_mod logical flag for considering graupel in cloud fraction calculation .true. rad_rain gfdl_cloud_microphys_mod logical flag for considering rain in cloud fraction calculation .true. +cld_min gfdl_cloud_microphys_mod minimum cloud fraction. If total cloud condensate exceeds 1.0e-6 kg/kg, cloud fraction cannot be less than \p cld_min 0.05 const_vi gfdl_cloud_microphys_mod logical flag for using constant cloud ice fall speed .false. const_vs gfdl_cloud_microphys_mod logical flag for using constant snow fall speed .false. const_vg gfdl_cloud_microphys_mod logical flag for using constant graupel fall speed .false. const_vr gfdl_cloud_microphys_mod logical flag for using constant rain fall speed .false. +vi_fac gfdl_cloud_microphys_mod tunable factor for cloud ice fall or the constant cloud ice fall speed when \p const_vi is .true. 1. +vr_fac gfdl_cloud_microphys_mod tunable factor for rain fall or the constant rain fall speed when \p const_vr is .true. 1. +vs_fac gfdl_cloud_microphys_mod tunable factor for snow fall or the constant snow fall speed when \p const_vs is .true. 1. +vg_fac gfdl_cloud_microphys_mod tunable factor for graupel fall or the constant graupel fall speed when \p const_vg is .true. 1. vi_max gfdl_cloud_microphys_mod maximum fall speed for cloud ice 0.5 vs_max gfdl_cloud_microphys_mod maximum fall speed for snow 5.0 vg_max gfdl_cloud_microphys_mod maximum fall speed for graupel 8.0 vr_max gfdl_cloud_microphys_mod maximum fall speed for rain 12.0 qi_lim gfdl_cloud_microphys_mod cloud ice limiter to prevent large ice built up in cloud ice freezing and deposition 1. prog_ccn gfdl_cloud_microphys_mod logical flag for activating prognostic CCN (not supported in GFS Physics) .false. -do_qa gfdl_cloud_microphys_mod logical flag for activating inline cloud fraction diagnosis in fast saturation adjustment .true. -fast_sat_adj gfdl_cloud_microphys_mod logical flag for adjusting cloud water evaporation/freezing, cloud ice deposition when fast saturation adjustment is activated .true. +do_qa gfdl_cloud_microphys_mod \a .true. to activate inline cloud fraction diagnosis in fast saturation adjustment. \a .false. to activate inline cloud fraction diagnosis in major cloud microphysics .true. +fast_sat_adj gfdl_cloud_microphys_mod logical flag for adjusting cloud water evaporation (cloud water -> water vapor), cloud water freezing (cloud water -> cloud ice), cloud ice deposition (water vapor -> cloud ice) when fast saturation adjustment is activated (\b do_sat_adj = .true. in \b fv_core_nml block) .true. tau_l2v gfdl_cloud_microphys_mod time scale for evaporation of cloud water to water vapor. Increasing(decreasing) \p tau_l2v can decrease(boost) deposition of cloud water to water vapor 300. tau_v2l gfdl_cloud_microphys_mod time scale for condensation of water vapor to cloud water. Increasing(decreasing) \p tau_v2l can decrease(boost) condensation of water vapor to cloud water 150. tau_g2v gfdl_cloud_microphys_mod time scale for sublimation of graupel to water vapor. Increasing(decreasing) \p tau_g2v can decrease(boost) sublimation of graupel to water vapor 900. +tau_g2r gfdl_cloud_microphys_mod time scale for graupel melting. Increasing(decreasing) \p tau_g2r can decrease(boost) melting of graupel to rain (graupel-> rain) 600. +tau_v2g gfdl_cloud_microphys_mod time scale for deposition of water vapor to graupel. Increasing(decreasing) \p tau_v2g can decrease(boost) deposition of water vapor to graupel (water vapor -> graupel) 21600. +tau_l2r gfdl_cloud_microphys_mod time scale for autoconversion of cloud water to rain. Increasing(decreasing) \p tau_l2r can decrese(boost) autoconversion of cloud water to rain (cloud water -> rain) 900. +tau_r2g gfdl_cloud_microphys_mod time scale for freezing of rain to graupel. Increasing(decreasing) \p tau_r2g can decrease(boost) freezing of rain to graupel (rain->graupel) 900. +tau_i2s gfdl_cloud_microphys_mod time scale for autoconversion of cloud ice to snow. Increasing(decreasing) \p tau_i2s can decrease(boost) autoconversion of cloud ice to snow (cloud ice -> snow) 1000. +tau_imlt gfdl_cloud_microphys_mod time scale for cloud ice melting. Increasing(decreasing) \p tau_imlt can decrease(boost) melting of cloud ice to cloud water or rain (cloud ice -> cloud water or rain) 600. +tau_smlt gfdl_cloud_microphys_mod time scale for snow melting. Increasing(decreasing) \p tau_smlt can decrease(boost) melting of snow to cloud water or rain (snow-> cloud water or rain) 900. rthresh gfdl_cloud_microphys_mod critical cloud water radius for autoconversion (cloud water -> rain). Increasing(decreasing) of \p rthresh makes the autoconversion harder(easier) 10.0e-6 dw_land gfdl_cloud_microphys_mod base value for subgrid deviation/variability over land 0.20 dw_ocean gfdl_cloud_microphys_mod base value for subgrid deviation/variability over ocean 0.10 ql_gen gfdl_cloud_microphys_mod maximum value for cloud water generated from condensation of water vapor (water vapor-> cloud water) 1.0e-3 -ql_mlt gfdl_cloud_microphys_mod maximum value of cloud water allowed from melted cloud ice (cloud ice -> cloud water or rain) 2.0e-3 -qi0_crt gfdl_cloud_microphys_mod threshold of cloud ice to snow autoconversion (cloud ice -> snow) 1.0e-4 -qs0_crt gfdl_cloud_microphys_mod threshold of snow to graupel autoconversion (snow -> graupel) 1.0e-3 -tau_i2s gfdl_cloud_microphys_mod time scale for autoconversion of cloud ice to snow 1000. -c_psaci gfdl_cloud_microphys_mod accretion efficiency of cloud ice to snow 0.02 -c_pgacs gfdl_cloud_microphys_mod accretion efficiency of snow to graupel 2.0e-3 +qi_gen gfdl_cloud_microphys_mod maximum value of cloud ice generated from deposition of water vapor (water vapor->cloud ice) or freezing(cloud water -> cloud ice). Increasing(decreasing) \p qi_gen can increas(decrease) cloud ice 1.82e-6 +ql_mlt gfdl_cloud_microphys_mod maximum value of cloud water allowed from melted cloud ice (cloud ice -> cloud water or rain). Exceedance of which will become rain. Increasing(decreasing) \p ql_mlt can increase(decrease) cloud water and decrease(increase) rain 2.0e-3 +qs_mlt gfdl_cloud_microphys_mod maximum value of cloud water allowed from melted snow (snow -> cloud water or rain). Exceedance of which will become rain. Increasing(decreasing) \p qs_mlt can increas(decrease) cloud water and decrease (increase) rain 1.0e-6 +ql0_max gfdl_cloud_microphys_mod threshold of cloud water to rain autoconversion (cloud water -> rain). Increasing(decreasing) \p ql0_max can increase(decrease) rain and decrease(increase) cloud water 2.0e-3 +qi0_max gfdl_cloud_microphys_mod maximum value of cloud ice generated from other sources like convection. Exceedance of which will become snow. Increasing(decreasing) \p qi0_max can increase(decrease) cloud ice and decrease(increase) snow 1.0e-4 +qi0_crt gfdl_cloud_microphys_mod threshold of cloud ice to snow autoconversion (cloud ice -> snow). Increasing(decreasing) \p qi0_crt can increase(decrease) cloud ice and decrease(increase) snow 1.0e-4 +qs0_crt gfdl_cloud_microphys_mod threshold of snow to graupel autoconversion (snow -> graupel). Increasing(decreasing) \p qs0_crt can increase(decrease) snow and decrease(increase) graupel 1.0e-3 +qc_crt gfdl_cloud_microphys_mod minimum value of cloud condensate to allow partial cloudiness. Partial cloud can only exist when total cloud condensate exceeds \p qc_crt 5.0e-8 +c_psaci gfdl_cloud_microphys_mod accretion efficiency of cloud ice to snow (cloud ice -> snow). Increasing(decreasing) of \p c_psaci can boost(decrease) the accretion of cloud ice to snow 0.02 +c_pgacs gfdl_cloud_microphys_mod accretion efficiency of snow to graupel (snow -> graupel). Increasing(decreasing) of \p c_pgacs can boost(decrease) the accretion of snow to graupel 2.0e-3 rh_inc gfdl_cloud_microphys_mod relative humidity increment for complete evaporation of cloud water and cloud ice 0.25 rh_inr gfdl_cloud_microphys_mod relative humidity increment for sublimation of snow 0.25 rh_ins gfdl_cloud_microphys_mod relative humidity increment for minimum evaporation of rain 0.25 -ccn_l gfdl_cloud_microphys_mod base CCN over land \f$cm^{-3}\f$ 270. -ccn_o gfdl_cloud_microphys_mod base CCN over ocean \f$cm^{-3}\f$ 90. -c_paut gfdl_cloud_microphys_mod autoconversion efficiency of cloud water to rain 0.55 -c_cracw gfdl_cloud_microphys_mod accretion efficiency of cloud water to rain 0.9 +rthresh gfdl_cloud_microphys_mod critical cloud water radius for autoconversion(cloud water->rain). Increasing(decreasing) of \p rthresh makes the autoconversion harder(easier) 1.0e-5 +ccn_l gfdl_cloud_microphys_mod base CCN over land. Increasing(decreasing) \p ccn_l can on the one hand boost(decrease) the autoconversion of cloud water to rain, on the other hand make the autoconversion harder(easier). The unit is \f$cm^{-3}\f$ 270. +ccn_o gfdl_cloud_microphys_mod base CCN over ocean. Increasing(decreasing) \p ccn_o can on the one hand boost(decrease) the autoconversion of cloud water to rain, on the other hand make the autoconversion harder(easier). The unit is \f$cm^{-3}\f$ 90. +c_paut gfdl_cloud_microphys_mod autoconversion efficiency of cloud water to rain (cloud water -> rain). Increasing(decreasing) of \p c_paut can boost(decrease) the autoconversion of cloud water to rain 0.55 +c_cracw gfdl_cloud_microphys_mod accretion efficiency of cloud water to rain (cloud water -> rain). Increasing(decreasing) of \p c_cracw can boost(decrease) the accretion of cloud water to rain 0.9 +sat_adj0 gfdl_cloud_microphys_mod adjust factor for condensation of water vapor to cloud water (water vapor->cloud water) and deposition of water vapor to cloud ice 0.9 use_ppm gfdl_cloud_microphys_mod \e true to use PPM fall scheme; \e false to use time-implicit monotonic fall scheme .false. use_ccn gfdl_cloud_microphys_mod \e true to compute prescribed CCN. It should be .true. when \p prog_ccn = .false. .false. mono_prof gfdl_cloud_microphys_mod \e true to turn on terminal fall with monotonic PPM scheme. This is used together with \p use_ppm=.true. .true. @@ -433,6 +452,68 @@ and how stochastic perturbations are used in the Noah Land Surface Model. de_ice gfdl_cloud_microphys_mod \e true to convert excessive cloud ice to snow to prevent ice over-built from other sources like convection scheme (not supported in GFS physics) .false. fix_negative gfdl_cloud_microphys_mod \e true to fix negative water species using nearby points .false. icloud_f gfdl_cloud_microphys_mod flag (0,1,or 2) for cloud fraction diagnostic scheme 0 -mp_time gfdl_cloud_microphys_mod time step of GFDL cloud microphysics 150. +irain_f gfdl_cloud_microphys_mod flag (0 or 1) for cloud water autoconversion to rain scheme. 0: with subgrid variability; 1: no subgrid variability 0 +mp_time gfdl_cloud_microphys_mod time step of GFDL cloud microphysics (MP). If \p mp_time isn't divisible by physics time step or is larger than physics time step, the actual MP time step becomes \p dt/NINT[dt/MIN(dt,mp_time)] 150. +alin gfdl_cloud_microphys_mod parameter \a a in Lin et al.(1983). Constant in empirical formula for \f$U_R\f$. Increasing(decreasing) \p alin can boost(decrease) accretion of cloud water by rain and rain evaporation 842. +clin gfdl_cloud_microphys_mod parameter \a c in Lin et al.(1983). Constant in empirical formula for \f$U_S\f$. Increasing(decreasing) \p clin can boost(decrease) accretion of cloud water by snow, accretion of cloud ice by snow, snow sublimation and deposition, and snow melting 4.8 +t_min gfdl_cloud_microphys_mod temperature threshold for instant deposition. Deposit all water vapor to cloud ice when temperature is lower than \p t_min 178. +t_sub gfdl_cloud_microphys_mod temperature threshold for sublimation. Cloud ice, snow or graupel stops(starts) sublimation when temperature is lower(higher) then \p t_sub 184. +mp_print gfdl_cloud_microphys_mod \a .true. to turn on GFDL cloud microphysics debugging print out. (not supported in GFS physics) .false. +\b &cires_ugwp_nml +knob_ugwp_version cires_ugwp_module parameter selects a version of the UGWP implementation in FV3GFS-127L \n +

+ 0 +knob_ugwp_doaxyz cires_ugwp_module parameter controls application of the momentum deposition for NGW-schemes \n +
    +
  • 0: the momentum tendencies due to NGWs are calculated, but tendencies do not change the horizontal winds +
  • 1: default value; it changes the horizontal momentum tendencies and horizontal winds +
+ 1 +knob_ugwp_doheat cires_ugwp_module parameter controls application of the heat deposition for NGW-schemes \n +
    +
  • 0: the temperature tendencies due to NGWs are calculated but tendencies do not change the temperature state +
  • 1: default value; it changes the temperature tendencies and kinetic temperature +
+ 1 +knob_ugwp_dokdis cires_ugwp_module parameter controls application of the eddy diffusion due to instability of NGWs \n +
    +
  • 0: the eddy diffusion tendencies due to NGWs are calculated but tendencies do not change the model state vector +
  • 1: it computes eddy diffusion coefficient due to instability of NGWs; in UGWP v0, eddy viscosity, heat conductivity and tracer diffusion are not activated +
+ 0 +knob_ugwp_solver cires_ugwp_module parameter controls the selection of UGWP-solvers(wave propagation, dissipation and wave breaking) for NGWs \n +
    +
  • 1: represents the discrete multi-wave solver with background dissipation and linear wave saturation +
  • 2: represents the spectral deterministic solver with background dissipation and spectral saturation +
  • 3: represents the discrete multi-wave solver with the background dissipation, extension of Alexander sand Dunkerton (1999) +
  • 4: represents the spectral solver with background dissipation, extension of Doppler Spread Theory of Hines (1997) +
+ 1 +knob_ugwp_ndx4lh cires_ugwp_module parameter controls the selection of the horizontal wavenumber(wavelength) for NGW schemes \n +
    +
  • 1: selects the \f$4xdx\f$ sub-grid wavelength, where dx is the horizontal resolution of the model configuration (C96-400km; C768-52km) +
+ 2 +knob_ugwp_wvspec cires_ugwp_module four-dimensional array defines number of waves in each arimuthal propagation (as defined by knob_ugwp_azdir) for GWs excited due to the following four sources: \n + (1) sub-grid orography (\b knob_ugwp_wvspec[1]=1), \n + (2) convective (\b knob_ugwp_wvspec[2]=25), \n + (3) frontal (\b knob_ugwp_wvspec[3]=25) activity, \n + (4) \b knob_ugwp_wvspec[4] represents number of wave excited by dynamical imbalances that may mimic both convective and front-jet mechanisms of GW triggering. \n + In UGWP v0, first two elements of the array, \b knob_ugwp_wvspec(1:2), control number of waves for stationary (OGW) and nonstationary waves (NGWs). + 1,32,32,32 +knob_ugwp_azdir cires_ugwp_module four-dimensional array that defines number of azimuths for propagation of GWs triggered by four types of physics-based sources (orography, convection, front-jets, and dynamical imbalance). In UGWP v0, first two elements of the array, \b knob_ugwp_azdir(1:2), control number of azimuths for OGW and NGWs respectively. + 2,4,4,4 +knob_ugwp_stoch cires_ugwp_module four-dimensional array that control stochastic selection of GWs triggered by four types of physics-based sources. \n + Default values:0,0,0,0 - reflect determinstic selection of GW parameters without stochastic selection + 0,0,0,0 +knob_ugwp_effac cires_ugwp_module four-dimensional array that control efficiency of GWs triggerd by four types of physics-based sources. \n + Default values: 1.,1.,1.,1. - reflect that calculated GW-tendencies will be applied for the model state. + 1.,1.,1.,1. +launch_level cires_ugwp_module parameter has been introduced by EMC during implementation. It defines the interface model level from the surface at which NGWs are launched. \n + Default value for FV3GFS-64L, launch_level=25 and for FV3GFS-128L, launch_level=52. + 55 */ diff --git a/physics/docs/ufs_doxyfile b/physics/docs/ufs_doxyfile new file mode 100644 index 000000000..1b77aafb6 --- /dev/null +++ b/physics/docs/ufs_doxyfile @@ -0,0 +1,464 @@ +# Doxyfile 1.8.11 +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "CCPP Scientific Documentation" +PROJECT_NUMBER = "" +PROJECT_BRIEF = "v4.0" +PROJECT_LOGO = img/dtc_logo.png +OUTPUT_DIRECTORY = doc +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = NO +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = YES +TAB_SIZE = 4 +ALIASES = +TCL_SUBST = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = YES +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = .f=FortranFree \ + .F=FortranFree \ + .F90=FortranFree \ + .f90=FortranFree +MARKDOWN_SUPPORT = YES +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = YES +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = YES +LOOKUP_CACHE_SIZE = 0 +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_PACKAGE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = YES +EXTRACT_ANON_NSPACES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = YES + +CASE_SENSE_NAMES = NO + +HIDE_SCOPE_NAMES = NO + +HIDE_COMPOUND_REFERENCE= NO + +SHOW_INCLUDE_FILES = NO + +SHOW_GROUPED_MEMB_INC = NO + +FORCE_LOCAL_INCLUDES = NO + +INLINE_INFO = YES + +SORT_MEMBER_DOCS = NO + +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = YES +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = ccpp_dox_layout.xml +CITE_BIB_FILES = library.bib +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = NO +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO +WARN_FORMAT = +WARN_LOGFILE = +INPUT = pdftxt/mainpage.txt \ + pdftxt/all_shemes_list.txt \ + pdftxt/GFSv15p2_suite.txt \ + pdftxt/suite_FV3_GFS_v15p2.xml.txt \ + pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt \ + pdftxt/GFSv16beta_suite.txt \ + pdftxt/suite_FV3_GFS_v16beta.xml.txt \ + pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt \ + pdftxt/GSD_adv_suite.txt \ + pdftxt/CPT_adv_suite.txt \ + pdftxt/GFS_RRTMG.txt \ + pdftxt/GFS_SFCLYR.txt \ + pdftxt/GFS_NSST.txt \ + pdftxt/GFS_NOAH.txt \ + pdftxt/GFS_SFCSICE.txt \ + pdftxt/GFS_HEDMF.txt \ + pdftxt/GFS_SATMEDMFVDIFQ.txt \ +## pdftxt/GFS_NoahMP.txt \ + pdftxt/GFS_UGWPv0.txt \ + pdftxt/GFS_GWDPS.txt \ + pdftxt/GFS_OZPHYS.txt \ + pdftxt/GFS_H2OPHYS.txt \ + pdftxt/GFS_RAYLEIGH.txt \ + pdftxt/GFS_SAMF.txt \ + pdftxt/GFS_SAMFdeep.txt \ + pdftxt/GFS_SAMFshal.txt \ + pdftxt/GFDL_cloud.txt \ + pdftxt/GFS_CALPRECIPTYPE.txt \ +### pdftxt/rad_cld.txt \ + pdftxt/CPT_CSAW.txt \ + pdftxt/CPT_MG3.txt \ + pdftxt/GSD_MYNN_EDMF.txt \ + pdftxt/GSD_CU_GF_deep.txt \ + pdftxt/GSD_RUCLSM.txt \ + pdftxt/GSD_THOMPSON.txt \ +### pdftxt/GFSphys_namelist.txt \ +### pdftxt/GFS_STOCHY_PHYS.txt \ + pdftxt/suite_input.nml.txt \ +### in-core MP + ../gfdl_fv_sat_adj.F90 \ +### time_vary + ../GFS_time_vary_pre.fv3.F90 \ + ../GFS_rad_time_vary.fv3.F90 \ + ../GFS_phys_time_vary.fv3.F90 \ + ../ozne_def.f \ + ../ozinterp.f90 \ + ../h2o_def.f \ + ../h2ointerp.f90 \ + ../aerclm_def.F \ + ../aerinterp.F90 \ + ../iccn_def.F \ + ../iccninterp.F90 \ + ../sfcsub.F \ + ../gcycle.F90 \ +### Radiation +### ../GFS_rrtmg_pre.F90 \ +### ../rrtmg_sw_pre.F90 \ + ../radsw_main.f \ +### ../rrtmg_sw_post.F90 \ +### ../rrtmg_lw_pre.F90 \ + ../radlw_main.f \ +### ../rrtmg_lw_post.F90 \ + ../radiation_aerosols.f \ + ../radiation_astronomy.f \ + ../radiation_clouds.f \ + ../radiation_gases.f \ + ../radiation_surface.f \ + ../radlw_param.f \ + ../radlw_datatb.f \ + ../radsw_param.f \ + ../radsw_datatb.f \ + ../dcyc2.f \ +### Land Surface + ../sfc_diff.f \ + ../sfc_nst.f \ + ../sfc_ocean.F \ + ../module_nst_model.f90 \ + ../module_nst_parameters.f90 \ + ../module_nst_water_prop.f90 \ + ../sfc_drv.f \ + ../sflx.f \ + ../namelist_soilveg.f \ + ../set_soilveg.f \ +### Sea Ice Surface + ../sfc_sice.f \ +### PBL + ../moninedmf.f \ + ../mfpbl.f \ + ../tridi.f \ +### satmedmf +## ../satmedmfvdif.F \ + ../satmedmfvdifq.F \ + ../mfpbltq.f \ + ../mfscuq.f \ + ../tridi.f \ +### Orographic Gravity Wave + ../GFS_GWD_generic.F90 \ + ../cires_ugwp.F90 \ + ../gwdps.f \ + ../ugwp_driver_v0.F \ + ../cires_ugwp_triggers.F90 \ + ../cires_ugwp_module.F90 \ + ../cires_ugwp_utils.F90 \ + ../cires_ugwp_solvers.F90 \ +### ../cires_ugwp_post.F90 \ +### ../cires_ugwp_initialize.F90 \ + ../cires_vert_wmsdis.F90 \ + ../cires_vert_orodis.F90 \ + ../cires_vert_lsatdis.F90 \ +### Rayleigh Dampling + ../rayleigh_damp.f \ +### Prognostic Ozone + ../ozphys_2015.f \ +### ../ozphys.f \ +### stratospheric h2o + ../h2ophys.f \ +### Deep Convection + ../samfdeepcnv.f \ +### Convective Gravity Wave +### ../gwdc.f \ +### Shallow Convection + ../samfshalcnv.f \ + ../cnvc90.f \ +### Microphysics +### ../gscond.f \ +### ../precpd.f \ + ../module_bfmicrophysics.f \ +### GFDL cloud MP + ../gfdl_cloud_microphys.F90 \ + ../module_gfdl_cloud_microphys.F90 \ +### + ../GFS_MP_generic.F90 \ + ../calpreciptype.f90 \ +### stochy + ../GFS_stochastics.F90 \ +### ../surface_perturbation.F90 \ +### ../../stochastic_physics/stochastic_physics.F90 \ +### CPT + ../m_micro.F90 \ +### ../micro_mg2_0.F90 \ + ../micro_mg3_0.F90 \ + ../micro_mg_utils.F90 \ + ../cldmacro.F \ + ../aer_cloud.F \ + ../cldwat2m_micro.F \ + ../wv_saturation.F \ + ../cs_conv_aw_adj.F90 \ + ../cs_conv.F90 \ +### GSD + ../cu_gf_driver.F90 \ + ../cu_gf_deep.F90 \ + ../cu_gf_sh.F90 \ + ../module_MYNNrad_pre.F90 \ + ../module_MYNNrad_post.F90 \ + ../module_MYNNPBL_wrapper.F90 \ + ../module_bl_mynn.F90 \ +### ../module_MYNNSFC_wrapper.F90 \ +### ../module_sf_mynn.F90 \ + ../sfc_drv_ruc.F90 \ + ../module_sf_ruclsm.F90 \ + ../namelist_soilveg_ruc.F90 \ + ../set_soilveg_ruc.F90 \ + ../module_soil_pre.F90 \ + ../mp_thompson_pre.F90 \ + ../module_mp_thompson_make_number_concentrations.F90 \ + ../mp_thompson.F90 \ + ../module_mp_thompson.F90 \ + ../module_mp_radar.F90 \ + ../mp_thompson_post.F90 \ +### utils + ../funcphys.f90 \ + ../physparam.f \ + ../physcons.F90 \ + ../radcons.f90 \ + ../mersenne_twister.f +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.f \ + *.F \ + *.F90 \ + *.f90 \ + *.nml \ + *.txt +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = ./ +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = img +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#CLANG_ASSISTED_PARSING = NO +#CLANG_OPTIONS = +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = ccpp_dox_extra_style.css +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_SECTIONS = NO +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = YES +GENERATE_TREEVIEW = YES +ENUM_VALUES_PER_LINE = 4 +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = YES +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2 +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = YES +PAPER_TYPE = a4 +EXTRA_PACKAGES = amsmath +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = YES +LATEX_SOURCE_CODE = NO + +LATEX_BIB_STYLE = plainnat + +LATEX_TIMESTAMP = NO + +GENERATE_RTF = NO + +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_SUBDIR = +MAN_LINKS = NO +GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO +GENERATE_AUTOGEN_DEF = NO +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +ENABLE_PREPROCESSING = NO +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = CCPP \ + MULTI_GASES \ + 0 +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +PERL_PATH = /usr/bin/perl +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +DIA_PATH = +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = YES +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = YES +UML_LOOK = YES +UML_LIMIT_NUM_FIELDS = 10 +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = YES +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = svg +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 200 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = YES +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 3d0507ad9..b2fcb0948 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -29,19 +29,16 @@ end subroutine sfc_nst_finalize !! \section NSST_general_algorithm GFS Near-Surface Sea Temperature Scheme General Algorithm !> @{ subroutine sfc_nst_run & -! --- inputs: - & ( im, hvap, cp, hfus, jcal, eps, epsm1, rvrdm1, rd, rhw0, & + & ( im, hvap, cp, hfus, jcal, eps, epsm1, rvrdm1, rd, rhw0, & ! --- inputs: & pi, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & & prsl1, prslki, prsik1, prslk1, wet, xlon, sinlat, & & stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & & wind, flag_iter, flag_guess, nstf_name1, nstf_name4, & & nstf_name5, lprnt, ipr, & -! --- input/output: - & tskin, tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt_cool, & + & tskin, tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt_cool, & ! --- input/output: & z_c, c_0, c_d, w_0, w_d, d_conv, ifd, qrain, & -! --- outputs: - & qsurf, gflux, cmm, chh, evap, hflx, ep, errmsg, errflg & + & qsurf, gflux, cmm, chh, evap, hflx, ep, errmsg, errflg & ! --- outputs: & ) ! ! ===================================================================== ! diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index 9635f30b8..508fb3b67 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -1,3 +1,9 @@ +!>\file sfc_ocean.F +!! This file contains an alternative GFS near-surface sea temperature +!! scheme when the model is initialized from GRIB2 data. + +!> This module contains the CCPP-compliant GFS near-surface sea temperature +!! scheme when the model is initialized from GRIB2 data. module sfc_ocean implicit none private @@ -15,19 +21,19 @@ end subroutine sfc_ocean_init subroutine sfc_ocean_finalize() end subroutine sfc_ocean_finalize +!>\defgroup gfs_ocean_main GFS Ocean scheme Module +!! This subroutine calculates thermodynamical properties over +!! open water. #if 0 !! \section arg_table_sfc_ocean_run Argument Table !! \htmlinclude sfc_ocean_run.html !! #endif subroutine sfc_ocean_run & -!................................... -! --- inputs: - & ( im, cp, rd, eps, epsm1, hvap, rvrdm1, ps, t1, q1, & + & ( im, cp, rd, eps, epsm1, hvap, rvrdm1, ps, t1, q1, & ! --- inputs & tskin, cm, ch, prsl1, prslki, wet, wind, & & flag_iter, & -! --- outputs: - & qsurf, cmm, chh, gflux, evap, hflx, ep, & + & qsurf, cmm, chh, gflux, evap, hflx, ep, & ! --- outputs & errmsg, errflg & & ) From f48b283ebabc42f1ea05d0ec59c51c6b01c24e6c Mon Sep 17 00:00:00 2001 From: Man Zhang Date: Mon, 2 Mar 2020 13:19:54 -0700 Subject: [PATCH 123/404] add two new suites: GFSv15p2_no_nsst and GFSv16beta_no_nsst and GFS ocean scientific documentation --- physics/cires_ugwp.F90 | 5 +- .../docs/{ufs_doxyfile => ccppv4_doxyfile} | 3 + physics/docs/library.bib | 50 +++--- physics/docs/pdftxt/GFS_OCEAN.txt | 16 ++ .../docs/pdftxt/GFSv15p2_no_nsst_suite.txt | 127 +++++++++++++ physics/docs/pdftxt/GFSv15p2_suite.txt | 10 +- .../docs/pdftxt/GFSv16beta_no_nsst_suite.txt | 167 ++++++++++++++++++ physics/docs/pdftxt/GFSv16beta_suite.txt | 10 +- physics/docs/pdftxt/all_shemes_list.txt | 1 + physics/docs/pdftxt/mainpage.txt | 17 +- physics/docs/pdftxt/suite_input.nml.txt | 8 +- physics/sfc_ocean.F | 4 +- 12 files changed, 368 insertions(+), 50 deletions(-) rename physics/docs/{ufs_doxyfile => ccppv4_doxyfile} (98%) create mode 100644 physics/docs/pdftxt/GFS_OCEAN.txt create mode 100644 physics/docs/pdftxt/GFSv15p2_no_nsst_suite.txt create mode 100644 physics/docs/pdftxt/GFSv16beta_no_nsst_suite.txt diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index ac12764cc..89cea0595 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -146,7 +146,8 @@ end subroutine cires_ugwp_finalize !! \htmlinclude cires_ugwp_run.html !! -!>\section gen_cires_ugwp CIRES UGWP General Algorithm +!> \section gen_cires_ugwp CIRES UGWP Scheme General Algorithm +!! @{ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr, & oro, oro_uf, hprime, nmtvr, oc, theta, sigma, gamma, elvmax, clx, oa4, & do_tofd, ldiag_ugwp, cdmbgwd, xlat, xlat_d, sinlat, coslat, area, & @@ -367,4 +368,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr end subroutine cires_ugwp_run +!! @} +!>@} end module cires_ugwp diff --git a/physics/docs/ufs_doxyfile b/physics/docs/ccppv4_doxyfile similarity index 98% rename from physics/docs/ufs_doxyfile rename to physics/docs/ccppv4_doxyfile index 1b77aafb6..e80b27eb9 100644 --- a/physics/docs/ufs_doxyfile +++ b/physics/docs/ccppv4_doxyfile @@ -103,9 +103,11 @@ WARN_LOGFILE = INPUT = pdftxt/mainpage.txt \ pdftxt/all_shemes_list.txt \ pdftxt/GFSv15p2_suite.txt \ + pdftxt/GFSv15p2_no_nsst_suite.txt \ pdftxt/suite_FV3_GFS_v15p2.xml.txt \ pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt \ pdftxt/GFSv16beta_suite.txt \ + pdftxt/GFSv16beta_no_nsst_suite.txt \ pdftxt/suite_FV3_GFS_v16beta.xml.txt \ pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt \ pdftxt/GSD_adv_suite.txt \ @@ -113,6 +115,7 @@ INPUT = pdftxt/mainpage.txt \ pdftxt/GFS_RRTMG.txt \ pdftxt/GFS_SFCLYR.txt \ pdftxt/GFS_NSST.txt \ + pdftxt/GFS_OCEAN.txt \ pdftxt/GFS_NOAH.txt \ pdftxt/GFS_SFCSICE.txt \ pdftxt/GFS_HEDMF.txt \ diff --git a/physics/docs/library.bib b/physics/docs/library.bib index cfc3e3304..dd2b2042e 100644 --- a/physics/docs/library.bib +++ b/physics/docs/library.bib @@ -1,7 +1,7 @@ %% This BibTeX bibliography file was created using BibDesk. %% http://bibdesk.sourceforge.net/ -%% Created for Man Zhang at 2020-02-24 10:07:00 -0700 +%% Created for Man Zhang at 2020-03-02 13:10:25 -0700 %% Saved with string encoding Unicode (UTF-8) @@ -1859,12 +1859,12 @@ @article{zeng_and_dickinson_1998 @conference{zheng_et_al_2009, Address = {Omaha, Nebraska}, Author = {W. Zheng and H. Wei and J. Meng and M. Ek and K. Mitchell and J. Derber and X. Zeng and Z. Wang}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBWLi4vLi4vLi4vLi4vLi4vRGVza3RvcC9OT0FIX0xTTS9JbXByb3ZlbWVudF9vZl9MYW5kX1N1cmZhY2VfU2tpbl9UZW1wZXJhdHVyZV9pbl9OQy5wZGZPEQIgAAAAAAIgAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADT4djXSCsAAANl5rUfSW1wcm92ZW1lbnRfb2ZfTGFuZCMzNjVGRjBGLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2X/D9aQ780AAAAAAAAAAAAFAAMAAAkgAAAAAAAAAAAAAAAAAAAACE5PQUhfTFNNABAACAAA0+ItNwAAABEACAAA1pFSPQAAAAEAEANl5rUAD8YgAA/GDwAGL94AAgBRTWFjaW50b3NoIEhEOlVzZXJzOgBtYW4uemhhbmc6AERlc2t0b3A6AE5PQUhfTFNNOgBJbXByb3ZlbWVudF9vZl9MYW5kIzM2NUZGMEYucGRmAAAOAG4ANgBJAG0AcAByAG8AdgBlAG0AZQBuAHQAXwBvAGYAXwBMAGEAbgBkAF8AUwB1AHIAZgBhAGMAZQBfAFMAawBpAG4AXwBUAGUAbQBwAGUAcgBhAHQAdQByAGUAXwBpAG4AXwBOAEMALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAFdVc2Vycy9tYW4uemhhbmcvRGVza3RvcC9OT0FIX0xTTS9JbXByb3ZlbWVudF9vZl9MYW5kX1N1cmZhY2VfU2tpbl9UZW1wZXJhdHVyZV9pbl9OQy5wZGYAABMAAS8AABUAAgAQ//8AAAAIAA0AGgAkAH0AAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACoQ==}, Date-Added = {2018-01-26 22:19:06 +0000}, Date-Modified = {2018-01-29 23:51:37 +0000}, Organization = {The 23rd Conference on Weather Analysis and Forecasting (WAF)/19th Conference on Numerical Weather Prediction(NWP)}, Title = {Improvement of land surface skin temperature in NCEP Operational NWP models and its impact on satellite Data Assimilation}, - Year = {2009}} + Year = {2009}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBWLi4vLi4vLi4vLi4vLi4vRGVza3RvcC9OT0FIX0xTTS9JbXByb3ZlbWVudF9vZl9MYW5kX1N1cmZhY2VfU2tpbl9UZW1wZXJhdHVyZV9pbl9OQy5wZGZPEQIgAAAAAAIgAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADT4djXSCsAAANl5rUfSW1wcm92ZW1lbnRfb2ZfTGFuZCMzNjVGRjBGLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2X/D9aQ780AAAAAAAAAAAAFAAMAAAkgAAAAAAAAAAAAAAAAAAAACE5PQUhfTFNNABAACAAA0+ItNwAAABEACAAA1pFSPQAAAAEAEANl5rUAD8YgAA/GDwAGL94AAgBRTWFjaW50b3NoIEhEOlVzZXJzOgBtYW4uemhhbmc6AERlc2t0b3A6AE5PQUhfTFNNOgBJbXByb3ZlbWVudF9vZl9MYW5kIzM2NUZGMEYucGRmAAAOAG4ANgBJAG0AcAByAG8AdgBlAG0AZQBuAHQAXwBvAGYAXwBMAGEAbgBkAF8AUwB1AHIAZgBhAGMAZQBfAFMAawBpAG4AXwBUAGUAbQBwAGUAcgBhAHQAdQByAGUAXwBpAG4AXwBOAEMALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAFdVc2Vycy9tYW4uemhhbmcvRGVza3RvcC9OT0FIX0xTTS9JbXByb3ZlbWVudF9vZl9MYW5kX1N1cmZhY2VfU2tpbl9UZW1wZXJhdHVyZV9pbl9OQy5wZGYAABMAAS8AABUAAgAQ//8AAAAIAA0AGgAkAH0AAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACoQ==}} @article{chen_et_al_1997, Author = {F. Chen and Z. Janjic and K. Mitchell}, @@ -2103,7 +2103,6 @@ @article{iacono_et_al_2008 @article{grant_2001, Abstract = {A closure for the fluxes of mass, heat, and moisture at cloud base in the cumulus-capped boundary layer is developed. The cloud-base mass flux is obtained from a simplifed turbulence kinetic energy (TKE) budget for the sub-cloud layer, in which cumulus convection is assumed to be associated with a transport of TKE from the sub-cloud layer to the cloud layer.The heat and moisture fluxes are obtained from a jump model based on the virtual-potential-temperature equation. A key part of this parametrization is the parametrization of the virtual-temperature flux at the top of the transition zone between the sub-cloud and cloud layers.It is argued that pressure fluctuations must be responsible for the transport of TKE from the cloud layer to the sub-cloud layer.}, Author = {A. L. M. Grant}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JhbnQvMjAwMS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoiV4IMjAwMS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARgJuNOHLk4AAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyYW50AAAQAAgAANHneLIAAAARAAgAANOHgq4AAAABABgAKIleAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyYW50OgAyMDAxLnBkZgAADgASAAgAMgAwADAAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmFudC8yMDAxLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Date-Added = {2016-06-15 22:11:22 +0000}, Date-Modified = {2018-07-06 19:02:34 +0000}, Doi = {10.1002/qj.49712757209}, @@ -2117,13 +2116,13 @@ @article{grant_2001 Url = {http://dx.doi.org/10.1002/qj.49712757209}, Volume = {127}, Year = {2001}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JhbnQvMjAwMS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoiV4IMjAwMS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARgJuNOHLk4AAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyYW50AAAQAAgAANHneLIAAAARAAgAANOHgq4AAAABABgAKIleAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyYW50OgAyMDAxLnBkZgAADgASAAgAMgAwADAAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmFudC8yMDAxLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1002/qj.49712757209}} @article{zhang_and_wu_2003, Abstract = {Abstract This study uses a 2D cloud-resolving model to investigate the vertical transport of horizontal momentum and to understand the role of a convection-generated perturbation pressure field in the momentum transport by convective systems during part of the Tropical Ocean and Global Atmosphere Coupled Ocean?Atmosphere Response Experiment (TOGA COARE) Intensive Observation Period. It shows that convective updrafts transport a significant amount of momentum vertically. This transport is downgradient in the easterly wind regime, but upgradient during a westerly wind burst. The differences in convective momentum transport between easterly and westerly wind regimes are examined. The perturbation pressure gradient accounts for an important part of the apparent momentum source. In general it is opposite in sign to the product of cloud mass flux and the vertical wind shear, with smaller magnitude. Examination of the dynamic forcing to the pressure field demonstrates that the linear forcing representing the interaction between the convective updrafts and the large-scale wind shear is the dominant term, while the nonlinear forcing is of secondary importance. Thus, parameterization schemes taking into account the linear interaction between the convective updrafts and the large-scale wind shear can capture the essential features of the perturbation pressure field. The parameterization scheme for momentum transport by Zhang and Cho is evaluated using the model simulation data. The parameterized pressure gradient force using the scheme is in excellent agreement with the simulated one. The parameterized apparent momentum source is also in good agreement with the model simulation. Other parameterization methods for the pressure gradient are also discussed.}, Annote = {doi: 10.1175/1520-0469(2003)060<1120:CMTAPP>2.0.CO;2}, Author = {Zhang, Guang J. and Wu, Xiaoqing}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvWmhhbmcvMjAwMy5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqjuYIMjAwMy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFrUP9K0L8MAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVpoYW5nAAAQAAgAANHneLIAAAARAAgAANK0kjMAAAABABgAKo7mAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFpoYW5nOgAyMDAzLnBkZgAADgASAAgAMgAwADAAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9aaGFuZy8yMDAzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {2003/05/01}, Date-Added = {2016-06-14 23:39:50 +0000}, @@ -2142,13 +2141,13 @@ @article{zhang_and_wu_2003 Url = {http://dx.doi.org/10.1175/1520-0469(2003)060<1120:CMTAPP>2.0.CO;2}, Volume = {60}, Year = {2003}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvWmhhbmcvMjAwMy5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqjuYIMjAwMy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFrUP9K0L8MAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVpoYW5nAAAQAAgAANHneLIAAAARAAgAANK0kjMAAAABABgAKo7mAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFpoYW5nOgAyMDAzLnBkZgAADgASAAgAMgAwADAAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9aaGFuZy8yMDAzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(2003)060%3C1120:CMTAPP%3E2.0.CO;2}} @article{fritsch_and_chappell_1980, Abstract = {Abstract A parameterization formulation for incorporating the effects of midlatitude deep convection into mesoscale-numerical models is presented. The formulation is based on the hypothesis that the buoyant energy available to a parcel, in combination with a prescribed period of time for the convection to remove that energy, can be used to regulate the amount of convection in a mesoscale numerical model grid element. Individual clouds are represented as entraining moist updraft and downdraft plumes. The fraction of updraft condensate evaporated in moist downdrafts is determined from an empirical relationship between the vertical shear of the horizontal wind and precipitation efficiency. Vertical transports of horizontal momentum and warming by compensating subsidence are included in the parameterization. Since updraft and downdraft areas are sometimes a substantial fraction of mesoscale model grid-element areas, grid-point temperatures (adjusted for convection) are an area-weighted mean of updraft, downdraft and environmental temperatures.}, Annote = {doi: 10.1175/1520-0469(1980)037<1722:NPOCDM>2.0.CO;2}, Author = {Fritsch, J. M. and Chappell, C. F.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvRnJpdHNjaC8xOTgwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAARCuMwgxOTgwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEKs103xvpgAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHRnJpdHNjaAAAEAAIAADR53iyAAAAEQAIAADTfMQGAAAAAQAYARCuMwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBGcml0c2NoOgAxOTgwLnBkZgAADgASAAgAMQA5ADgAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Gcml0c2NoLzE5ODAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {1980/08/01}, Date = {1980/08/01}, @@ -2169,12 +2168,12 @@ @article{fritsch_and_chappell_1980 Volume = {37}, Year = {1980}, Year1 = {1980}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvRnJpdHNjaC8xOTgwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAARCuMwgxOTgwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEKs103xvpgAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHRnJpdHNjaAAAEAAIAADR53iyAAAAEQAIAADTfMQGAAAAAQAYARCuMwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBGcml0c2NoOgAxOTgwLnBkZgAADgASAAgAMQA5ADgAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Gcml0c2NoLzE5ODAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(1980)037%3C1722:NPOCDM%3E2.0.CO;2}} @article{bechtold_et_al_2008, Abstract = {Advances in simulating atmospheric variability with the ECMWF model are presented that stem from revisions of the convection and diffusion parametrizations. The revisions concern in particular the introduction of a variable convective adjustment time-scale, a convective entrainment rate proportional to the environmental relative humidity, as well as free tropospheric diffusion coefficients for heat and momentum based on Monin--Obukhov functional dependencies.The forecasting system is evaluated against analyses and observations using high-resolution medium-range deterministic and ensemble forecasts, monthly and seasonal integrations, and decadal integrations with coupled atmosphere-ocean models. The results show a significantly higher and more realistic level of model activity in terms of the amplitude of tropical and extratropical mesoscale, synoptic and planetary perturbations. Importantly, with the higher variability and reduced bias not only the probabilistic scores are improved, but also the midlatitude deterministic scores in the short and medium ranges. Furthermore, for the first time the model is able to represent a realistic spectrum of convectively coupled equatorial Kelvin and Rossby waves, and maintains a realistic amplitude of the Madden--Julian oscillation (MJO) during monthly forecasts. However, the propagation speed of the MJO is slower than observed. The higher tropical tropospheric wave activity also results in better stratospheric temperatures and winds through the deposition of momentum.The partitioning between convective and resolved precipitation is unaffected by the model changes with roughly 62% of the total global precipitation being of the convective type. Finally, the changes in convection and diffusion parametrizations resulted in a larger spread of the ensemble forecasts, which allowed the amplitude of the initial perturbations in the ensemble prediction system to decrease by 30%. Copyright {\copyright} 2008 Royal Meteorological Society}, Author = {Bechtold, Peter and K{\"o}hler, Martin and Jung, Thomas and Doblas-Reyes, Francisco and Leutbecher, Martin and Rodwell, Mark J. and Vitart, Frederic and Balsamo, Gianpaolo}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAobfkIMjAwOC5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARZce9OEjEwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJlY2h0b2xkABAACAAA0ed4sgAAABEACAAA04TgrAAAAAEAGAAobfkAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQmVjaHRvbGQ6ADIwMDgucGRmAA4AEgAIADIAMAAwADgALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-06-14 23:11:58 +0000}, Date-Modified = {2016-06-14 23:11:58 +0000}, Doi = {10.1002/qj.289}, @@ -2188,12 +2187,12 @@ @article{bechtold_et_al_2008 Url = {http://dx.doi.org/10.1002/qj.289}, Volume = {134}, Year = {2008}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAobfkIMjAwOC5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARZce9OEjEwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJlY2h0b2xkABAACAAA0ed4sgAAABEACAAA04TgrAAAAAEAGAAobfkAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQmVjaHRvbGQ6ADIwMDgucGRmAA4AEgAIADIAMAAwADgALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQmVjaHRvbGQvMjAwOC5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://dx.doi.org/10.1002/qj.289}} @article{han_and_pan_2011, Annote = {doi: 10.1175/WAF-D-10-05038.1}, Author = {Han, Jongil and Pan, Hua-Lu}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMTEucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMTEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADC1cfTGvlvAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0xtNzwAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDExLnBkZgAADgASAAgAMgAwADEAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAxMS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Booktitle = {Weather and Forecasting}, Da = {2011/08/01}, Date = {2011/08/01}, @@ -2214,22 +2213,22 @@ @article{han_and_pan_2011 Volume = {26}, Year = {2011}, Year1 = {2011}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMTEucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMTEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADC1cfTGvlvAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0xtNzwAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDExLnBkZgAADgASAAgAMgAwADEAMQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAxMS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/WAF-D-10-05038.1}} @article{pan_and_wu_1995, Author = {Pan, H. -L. and W.-S. Wu}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvUGFuLzE5OTUucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAwtTNCDE5OTUucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCtU/TGvMJAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANQYW4AABAACAAA0ed4sgAAABEACAAA0xtHaQAAAAEAGADC1M0AKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAUGFuOgAxOTk1LnBkZgAADgASAAgAMQA5ADkANQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9QYW4vMTk5NS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Date-Added = {2016-06-14 23:06:41 +0000}, Date-Modified = {2016-06-14 23:06:41 +0000}, Journal = {NMC Office Note, No. 409}, Pages = {40pp}, Title = {Implementing a Mass Flux Convection Parameterization Package for the NMC Medium-Range Forecast Model}, - Year = {1995}} + Year = {1995}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvUGFuLzE5OTUucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAwtTNCDE5OTUucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCtU/TGvMJAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANQYW4AABAACAAA0ed4sgAAABEACAAA0xtHaQAAAAEAGADC1M0AKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAUGFuOgAxOTk1LnBkZgAADgASAAgAMQA5ADkANQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9QYW4vMTk5NS5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}} @article{grell_1993, Annote = {doi: 10.1175/1520-0493(1993)121<0764:PEOAUB>2.0.CO;2}, Author = {Grell, Georg A.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JlbGwvMTk5My5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoie0IMTk5My5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMK4dtMa9LMAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyZWxsAAAQAAgAANHneLIAAAARAAgAANMbSRMAAAABABgAKIntAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyZWxsOgAxOTkzLnBkZgAADgASAAgAMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmVsbC8xOTkzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Booktitle = {Monthly Weather Review}, Da = {1993/03/01}, Date = {1993/03/01}, @@ -2250,11 +2249,11 @@ @article{grell_1993 Volume = {121}, Year = {1993}, Year1 = {1993}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvR3JlbGwvMTk5My5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAoie0IMTk5My5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMK4dtMa9LMAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUdyZWxsAAAQAAgAANHneLIAAAARAAgAANMbSRMAAAABABgAKIntAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEdyZWxsOgAxOTkzLnBkZgAADgASAAgAMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9HcmVsbC8xOTkzLnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0493(1993)121%3C0764:PEOAUB%3E2.0.CO;2}} @article{arakawa_and_schubert_1974, Author = {Arakawa, A and Schubert, WH}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQXJha2F3YS8xOTc0LnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAChtVQgxOTc0LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKG1ctM8h9AAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHQXJha2F3YQAAEAAIAADR53iyAAAAEQAIAAC0z4RkAAAAAQAYAChtVQAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBBcmFrYXdhOgAxOTc0LnBkZgAADgASAAgAMQA5ADcANAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9BcmFrYXdhLzE5NzQucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Date-Added = {2016-06-14 23:04:30 +0000}, Date-Modified = {2018-07-18 19:00:17 +0000}, Isi = {A1974S778800004}, @@ -2267,6 +2266,7 @@ @article{arakawa_and_schubert_1974 Title = {Interaction of a cumulus cloud ensemble with the large-scale environment, Part I}, Volume = {31}, Year = {1974}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQXJha2F3YS8xOTc0LnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAChtVQgxOTc0LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKG1ctM8h9AAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHQXJha2F3YQAAEAAIAADR53iyAAAAEQAIAAC0z4RkAAAAAQAYAChtVQAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBBcmFrYXdhOgAxOTc0LnBkZgAADgASAAgAMQA5ADcANAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9BcmFrYXdhLzE5NzQucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1974S778800004}} @article{harshvardhan_et_al_1989, @@ -2500,7 +2500,6 @@ @article{akmaev_1991 @article{siebesma_et_al_2007, Abstract = {A better conceptual understanding and more realistic parameterizations of convective boundary layers in climate and weather prediction models have been major challenges in meteorological research. In particular, parameterizations of the dry convective boundary layer, in spite of the absence of water phase-changes and its consequent simplicity as compared to moist convection, typically suffer from problems in attempting to represent realistically the boundary layer growth and what is often referred to as countergradient fluxes. The eddy-diffusivity (ED) approach has been relatively successful in representing some characteristics of neutral boundary layers and surface layers in general. The mass-flux (MF) approach, on the other hand, has been used for the parameterization of shallow and deep moist convection. In this paper, a new approach that relies on a combination of the ED and MF parameterizations (EDMF) is proposed for the dry convective boundary layer. It is shown that the EDMF approach follows naturally from a decomposition of the turbulent fluxes into 1) a part that includes strong organized updrafts, and 2) a remaining turbulent field. At the basis of the EDMF approach is the concept that nonlocal subgrid transport due to the strong updrafts is taken into account by the MF approach, while the remaining transport is taken into account by an ED closure. Large-eddy simulation (LES) results of the dry convective boundary layer are used to support the theoretical framework of this new approach and to determine the parameters of the EDMF model. The performance of the new formulation is evaluated against LES results, and it is shown that the EDMF closure is able to reproduce the main properties of dry convective boundary layers in a realistic manner. Furthermore, it will be shown that this approach has strong advantages over the more traditional countergradient approach, especially in the entrainment layer. As a result, this EDMF approach opens the way to parameterize the clear and cumulus-topped boundary layer in a simple and unified way.}, Author = {Siebesma, A. Pier and Soares, Pedro M. M. and Teixeira, Joao}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqYEwIMjAwNy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACphyMc7+4hQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAACFNpZWJlc21hABAACAAA0ed4sgAAABEACAAAxzxd+AAAAAEAGAAqYEwAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAU2llYmVzbWE6ADIwMDcucGRmAA4AEgAIADIAMAAwADcALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {DOI 10.1175/JAS3888.1}, @@ -2514,12 +2513,12 @@ @article{siebesma_et_al_2007 Title = {A combined eddy-diffusivity mass-flux approach for the convective boundary layer}, Volume = {64}, Year = {2007}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAqYEwIMjAwNy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACphyMc7+4hQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAACFNpZWJlc21hABAACAAA0ed4sgAAABEACAAAxzxd+AAAAAEAGAAqYEwAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAU2llYmVzbWE6ADIwMDcucGRmAA4AEgAIADIAMAAwADcALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU2llYmVzbWEvMjAwNy5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/000245742600011}} @article{soares_et_al_2004, Abstract = {Recently, a new consistent way of parametrizing simultaneously local and non-local turbulent transport for the convective atmospheric boundary layer has been proposed and tested for the clear boundary layer. This approach assumes that in the convective boundary layer the subgrid-scale fluxes result from two different mixing scales: small eddies, that are parametrized by an eddy-diffusivity approach, and thermals, which are represented by a mass-flux contribution. Since the interaction between the cloud layer and the underlying sub-cloud layer predominantly takes place through strong updraughts, this approach offers an interesting avenue of establishing a unified description of the turbulent transport in the cumulus-topped boundary layer. This paper explores the possibility of such a new approach for the cumulus-topped boundary layer. In the sub-cloud and cloud layers, the mass-flux term represents the effect of strong updraughts. These are modelled by a simple entraining parcel, which determines the mean properties of the strong updraughts, the boundary-layer height, the lifting condensation level and cloud top. The residual smaller-scale turbulent transport is parametrized with an eddy-diffusivity approach that uses a turbulent kinetic energy closure. The new scheme is implemented and tested in the research model MesoNH. Copyright {\copyright} 2004 Royal Meteorological Society}, Author = {Soares, P. M. M. and Miranda, P. M. A. and Siebesma, A. P. and Teixeira, J.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBCLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmTxEBxgAAAAABxgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWIC2CDIwMDQucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYf6DSsqNwAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAAZTb2FyZXMAEAAIAADR53iyAAAAEQAIAADSswXgAAAAAQAYAFiAtgAobJYAKGyLAChnewAbXgcAAphcAAIAXE1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBTb2FyZXM6ADIwMDQucGRmAA4AEgAIADIAMAAwADQALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAElVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmAAATAAEvAAAVAAIADf//AAAACAANABoAJABpAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjM=}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {10.1256/qj.03.223}, @@ -2533,11 +2532,11 @@ @article{soares_et_al_2004 Url = {http://dx.doi.org/10.1256/qj.03.223}, Volume = {130}, Year = {2004}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBCLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmTxEBxgAAAAABxgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWIC2CDIwMDQucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYf6DSsqNwAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAAZTb2FyZXMAEAAIAADR53iyAAAAEQAIAADSswXgAAAAAQAYAFiAtgAobJYAKGyLAChnewAbXgcAAphcAAIAXE1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBTb2FyZXM6ADIwMDQucGRmAA4AEgAIADIAMAAwADQALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAElVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvU29hcmVzLzIwMDQucGRmAAATAAEvAAAVAAIADf//AAAACAANABoAJABpAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjM=}, Bdsk-Url-1 = {http://dx.doi.org/10.1256/qj.03.223}} @article{troen_and_mahrt_1986, Author = {Troen, IB and Mahrt, L.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvVHJvZW4vMTk4Ni5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAABNeegIMTk4Ni5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE13kNKUWwUAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVRyb2VuAAAQAAgAANHneLIAAAARAAgAANKUvXUAAAABABgATXnoAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFRyb2VuOgAxOTg2LnBkZgAADgASAAgAMQA5ADgANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Ucm9lbi8xOTg2LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Date-Added = {2016-05-20 17:17:49 +0000}, Date-Modified = {2016-05-20 17:17:49 +0000}, Doi = {10.1007/BF00122760}, @@ -2551,13 +2550,13 @@ @article{troen_and_mahrt_1986 Url = {http://dx.doi.org/10.1007/BF00122760}, Volume = {37}, Year = {1986}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvVHJvZW4vMTk4Ni5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAABNeegIMTk4Ni5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE13kNKUWwUAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAABVRyb2VuAAAQAAgAANHneLIAAAARAAgAANKUvXUAAAABABgATXnoAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AFRyb2VuOgAxOTg2LnBkZgAADgASAAgAMQA5ADgANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Ucm9lbi8xOTg2LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://dx.doi.org/10.1007/BF00122760}} @article{macvean_and_mason_1990, Abstract = {Abstract In a recent paper, Kuo and Schubert demonstrated the lack of observational support for the relevance of the criterion for cloud-top entrainment instability proposed by Randall and by Deardorff. Here we derive a new criterion, based on a model of the instability as resulting from the energy released close to cloud top, by Mixing between saturated boundary-layer air and unsaturated air from above the capping inversion. The condition is derived by considering the net conversion from potential to kinetic energy in a system consisting of two layers of fluid straddling cloud-top, when a small amount of mixing occurs between these layers. This contrasts with previous analyses, which only considered the change in buoyancy of the cloud layer when unsaturated air is mixed into it. In its most general form, this new criterion depends on the ratio of the depths of the layers involved in the mixing. It is argued that, for a self-sustaining instability, there must be a net release of kinetic energy on the same depth and time scales as the entrainment process itself. There are two plausible ways in which this requirement may be satisfied. Either one takes the depths of the layers involved in the mixing to each be comparable to the vertical scale of the entrainment process, which is typically of order tens of meters or less, or alternatively, one must allow for the efficiency with which energy released by mixing through a much deeper lower layer becomes available to initiate further entrainment. In both cases the same criterion for instability results. This criterion is much more restrictive than that proposed by Randall and by Deardorff; furthermore, the observational data is then consistent with the predictions of the current theory. Further analysis provides estimates of the turbulent fluxes associated with cloud-top entrainment instability. This analysis effectively constitutes an energetically consistent turbulence closure for models of boundary layers with cloud. The implications for such numerical models are discussed. Comparisons are also made with other possible criteria for cloud-top entrainment instability which have recently been suggested.}, Annote = {doi: 10.1175/1520-0469(1990)047<1012:CTEITS>2.0.CO;2}, Author = {MacVean, M. K. and Mason, P. J.}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTWFjVmVhbi8xOTkwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAFx8zwgxOTkwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXHyn0rkkRQAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHTWFjVmVhbgAAEAAIAADR53iyAAAAEQAIAADSuYa1AAAAAQAYAFx8zwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBNYWNWZWFuOgAxOTkwLnBkZgAADgASAAgAMQA5ADkAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9NYWNWZWFuLzE5OTAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Booktitle = {Journal of the Atmospheric Sciences}, Da = {1990/04/01}, Date-Added = {2016-05-20 17:16:05 +0000}, @@ -2576,11 +2575,11 @@ @article{macvean_and_mason_1990 Url = {http://dx.doi.org/10.1175/1520-0469(1990)047<1012:CTEITS>2.0.CO;2}, Volume = {47}, Year = {1990}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBDLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTWFjVmVhbi8xOTkwLnBkZk8RAcoAAAAAAcoAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAFx8zwgxOTkwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXHyn0rkkRQAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAHTWFjVmVhbgAAEAAIAADR53iyAAAAEQAIAADSuYa1AAAAAQAYAFx8zwAobJYAKGyLAChnewAbXgcAAphcAAIAXU1hY2ludG9zaCBIRDpVc2VyczoAZ3JhbnRmOgBDbG91ZFN0YXRpb246AGZpcmxfbGlicmFyeToAZmlybF9saWJyYXJ5X2ZpbGVzOgBNYWNWZWFuOgAxOTkwLnBkZgAADgASAAgAMQA5ADkAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9NYWNWZWFuLzE5OTAucGRmABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGoAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOA==}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0469(1990)047%3C1012:CTEITS%3E2.0.CO;2}} @article{louis_1979, Author = {Louis, JF}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG91aXMvMTk3OS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAonogIMTk3OS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiej8FuU4pQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUxvdWlzAAAQAAgAANHneLIAAAARAAgAAMFutfoAAAABABgAKJ6IAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvdWlzOgAxOTc5LnBkZgAADgASAAgAMQA5ADcAOQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Mb3Vpcy8xOTc5LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Date-Added = {2016-05-20 17:15:52 +0000}, Date-Modified = {2016-05-20 17:15:52 +0000}, Isi = {A1979HT69700004}, @@ -2593,12 +2592,12 @@ @article{louis_1979 Title = {A PARAMETRIC MODEL OF VERTICAL EDDY FLUXES IN THE ATMOSPHERE}, Volume = {17}, Year = {1979}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBBLi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG91aXMvMTk3OS5wZGZPEQHEAAAAAAHEAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAonogIMTk3OS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACiej8FuU4pQREYgQ0FSTwACAAUAAAkgAAAAAAAAAAAAAAAAAAAABUxvdWlzAAAQAAgAANHneLIAAAARAAgAAMFutfoAAAABABgAKJ6IAChslgAobIsAKGd7ABteBwACmFwAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvdWlzOgAxOTc5LnBkZgAADgASAAgAMQA5ADcAOQAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIASFVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9Mb3Vpcy8xOTc5LnBkZgATAAEvAAAVAAIADf//AAAACAANABoAJABoAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAjA=}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1979HT69700004}} @article{lock_et_al_2000, Abstract = {A new boundary layer turbulent mixing scheme has been developed for use in the UKMO weather forecasting and climate prediction models. This includes a representation of nonlocal mixing (driven by both surface fluxes and cloud-top processes) in unstable layers, either coupled to or decoupled from the surface, and an explicit entrainment parameterization. The scheme is formulated in moist conserved variables so that it can treat both dry and cloudy layers. Details of the scheme and examples of its performance in single-column model tests are presented.}, Author = {Lock, AP and Brown, AR and Bush, MR and Martin, GM and Smith, RNB}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAACibewgyMDAwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKJuLywPrPAAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAETG9jawAQAAgAANHneLIAAAARAAgAAMsETawAAAABABgAKJt7AChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvY2s6ADIwMDAucGRmAA4AEgAIADIAMAAwADAALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Date-Added = {2016-05-20 17:15:36 +0000}, Date-Modified = {2016-05-20 17:15:36 +0000}, Isi = {000089461100008}, @@ -2611,13 +2610,13 @@ @article{lock_et_al_2000 Title = {A new boundary layer mixing scheme. {P}art {I}: Scheme description and single-column model tests}, Volume = {128}, Year = {2000}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAACibewgyMDAwLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKJuLywPrPAAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAETG9jawAQAAgAANHneLIAAAARAAgAAMsETawAAAABABgAKJt7AChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AExvY2s6ADIwMDAucGRmAA4AEgAIADIAMAAwADAALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvTG9jay8yMDAwLnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/000089461100008}} @article{hong_and_pan_1996, Abstract = {Abstract In this paper, the incorporation of a simple atmospheric boundary layer diffusion scheme into the NCEP Medium-Range Forecast Model is described. A boundary layer diffusion package based on the Troen and Mahrt nonlocal diffusion concept has been tested for possible operational implementation. The results from this approach are compared with those from the local diffusion approach, which is the current operational scheme, and verified against FIFE observations during 9?10 August 1987. The comparisons between local and nonlocal approaches are extended to the forecast for a heavy rain case of 15?17 May 1995. The sensitivity of both the boundary layer development and the precipitation forecast to the tuning parameters in the nonlocal diffusion scheme is also investigated. Special attention is given to the interaction of boundary layer processes with precipitation physics. Some results of parallel runs during August 1995 are also presented.}, Annote = {doi: 10.1175/1520-0493(1996)124<2322:NBLVDI>2.0.CO;2}, Author = {Hong, Song-You and Pan, Hua-Lu}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAE18FggxOTk2LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATXvY0pRb8QAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAESG9uZwAQAAgAANHneLIAAAARAAgAANKUvmEAAAABABgATXwWAChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEhvbmc6ADE5OTYucGRmAA4AEgAIADEAOQA5ADYALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Booktitle = {Monthly Weather Review}, Da = {1996/10/01}, Date = {1996/10/01}, @@ -2638,13 +2637,13 @@ @article{hong_and_pan_1996 Volume = {124}, Year = {1996}, Year1 = {1996}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBALi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZk8RAcAAAAAAAcAAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAANHnJFJIKwAAAE18FggxOTk2LnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATXvY0pRb8QAAAAAAAAAAAAIABQAACSAAAAAAAAAAAAAAAAAAAAAESG9uZwAQAAgAANHneLIAAAARAAgAANKUvmEAAAABABgATXwWAChslgAobIsAKGd7ABteBwACmFwAAgBaTWFjaW50b3NoIEhEOlVzZXJzOgBncmFudGY6AENsb3VkU3RhdGlvbjoAZmlybF9saWJyYXJ5OgBmaXJsX2xpYnJhcnlfZmlsZXM6AEhvbmc6ADE5OTYucGRmAA4AEgAIADEAOQA5ADYALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEdVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSG9uZy8xOTk2LnBkZgAAEwABLwAAFQACAA3//wAAAAgADQAaACQAZwAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIr}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/1520-0493(1996)124%3C2322:NBLVDI%3E2.0.CO;2}} @article{han_and_pan_2006, Abstract = {Abstract A parameterization of the convection-induced pressure gradient force (PGF) in convective momentum transport (CMT) is tested for hurricane intensity forecasting using NCEP's operational Global Forecast System (GFS) and its nested Regional Spectral Model (RSM). In the parameterization the PGF is assumed to be proportional to the product of the cloud mass flux and vertical wind shear. Compared to control forecasts using the present operational GFS and RSM where the PGF effect in CMT is taken into account empirically, the new PGF parameterization helps increase hurricane intensity by reducing the vertical momentum exchange, giving rise to a closer comparison to the observations. In addition, the new PGF parameterization forecasts not only show more realistically organized precipitation patterns with enhanced hurricane intensity but also reduce the forecast track error. Nevertheless, the model forecasts with the new PGF parameterization still largely underpredict the observed intensity. One of the many possible reasons for the large underprediction may be the absence of hurricane initialization in the models.}, Annote = {doi: 10.1175/MWR3090.1}, Author = {Han, Jongil and Pan, Hua-Lu}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMDYucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMDYucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABazFjStCvVAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0rSORQAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDA2LnBkZgAADgASAAgAMgAwADAANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAwNi5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Booktitle = {Monthly Weather Review}, Da = {2006/02/01}, Date-Added = {2016-05-20 17:11:17 +0000}, @@ -2663,11 +2662,11 @@ @article{han_and_pan_2006 Url = {http://dx.doi.org/10.1175/MWR3090.1}, Volume = {134}, Year = {2006}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxA/Li4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvSGFuLzIwMDYucGRmTxEBvgAAAAABvgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAA0eckUkgrAAAAWsT5CDIwMDYucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABazFjStCvVAAAAAAAAAAAAAgAFAAAJIAAAAAAAAAAAAAAAAAAAAANIYW4AABAACAAA0ed4sgAAABEACAAA0rSORQAAAAEAGABaxPkAKGyWAChsiwAoZ3sAG14HAAKYXAACAFlNYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoASGFuOgAyMDA2LnBkZgAADgASAAgAMgAwADAANgAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIARlVzZXJzL2dyYW50Zi9DbG91ZFN0YXRpb24vZmlybF9saWJyYXJ5L2ZpcmxfbGlicmFyeV9maWxlcy9IYW4vMjAwNi5wZGYAEwABLwAAFQACAA3//wAAAAgADQAaACQAZgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAIo}, Bdsk-Url-1 = {http://dx.doi.org/10.1175/MWR3090.1}} @article{businger_et_al_1971, Author = {Businger, JA and Wyngaard, JC and Izumi, Y and Bradley, EF}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAodUUIMTk3MS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACh1cbTPIxwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJ1c2luZ2VyABAACAAA0ed4sgAAABEACAAAtM+FjAAAAAEAGAAodUUAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQnVzaW5nZXI6ADE5NzEucGRmAA4AEgAIADEAOQA3ADEALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Date-Added = {2016-05-20 17:10:50 +0000}, Date-Modified = {2018-07-18 18:58:08 +0000}, Isi = {A1971I822800004}, @@ -2680,6 +2679,7 @@ @article{businger_et_al_1971 Title = {Flux-profile relationships in the atmospheric surface layer}, Volume = {28}, Year = {1971}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBELi4vLi4vQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGZPEQHMAAAAAAHMAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAADR5yRSSCsAAAAodUUIMTk3MS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACh1cbTPIxwAAAAAAAAAAAACAAUAAAkgAAAAAAAAAAAAAAAAAAAACEJ1c2luZ2VyABAACAAA0ed4sgAAABEACAAAtM+FjAAAAAEAGAAodUUAKGyWAChsiwAoZ3sAG14HAAKYXAACAF5NYWNpbnRvc2ggSEQ6VXNlcnM6AGdyYW50ZjoAQ2xvdWRTdGF0aW9uOgBmaXJsX2xpYnJhcnk6AGZpcmxfbGlicmFyeV9maWxlczoAQnVzaW5nZXI6ADE5NzEucGRmAA4AEgAIADEAOQA3ADEALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAEtVc2Vycy9ncmFudGYvQ2xvdWRTdGF0aW9uL2ZpcmxfbGlicmFyeS9maXJsX2xpYnJhcnlfZmlsZXMvQnVzaW5nZXIvMTk3MS5wZGYAABMAAS8AABUAAgAN//8AAAAIAA0AGgAkAGsAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACOw==}, Bdsk-Url-1 = {http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/A1971I822800004}} @article{xu_and_randall_1996, @@ -2870,18 +2870,17 @@ @article{kim_and_arakawa_1995 @techreport{hou_et_al_2002, Author = {Y. Hou and S. Moorthi and K. Campana}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAiLi4vLi4vemhhbmctbGliL2hvdV9ldF9hbF8yMDAyLnBkZk8RAdwAAAAAAdwAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAAM/T1mZIKwAAAFKkjRJob3VfZXRfYWxfMjAwMi5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUqai02OGCgAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAJemhhbmctbGliAAAQAAgAAM/UKsYAAAARAAgAANNj2moAAAABABgAUqSNAE1lSgAj19QACTbFAAk2xAACZvkAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBtYW56aGFuZzoARG9jdW1lbnRzOgBNYW4uWmhhbmc6AGdtdGItZG9jOgB6aGFuZy1saWI6AGhvdV9ldF9hbF8yMDAyLnBkZgAADgAmABIAaABvAHUAXwBlAHQAXwBhAGwAXwAyADAAMAAyAC4AcABkAGYADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBIVXNlcnMvbWFuemhhbmcvRG9jdW1lbnRzL01hbi5aaGFuZy9nbXRiLWRvYy96aGFuZy1saWIvaG91X2V0X2FsXzIwMDIucGRmABMAAS8AABUAAgAP//8AAAAIAA0AGgAkAEkAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACKQ==}, Date-Added = {2016-05-19 19:52:22 +0000}, Date-Modified = {2016-05-20 15:14:59 +0000}, Institution = {NCEP}, Number = {441}, Title = {Parameterization of Solar Radiation Transfer}, Type = {office note}, - Year = {2002}} + Year = {2002}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAiLi4vLi4vemhhbmctbGliL2hvdV9ldF9hbF8yMDAyLnBkZk8RAdwAAAAAAdwAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAAM/T1mZIKwAAAFKkjRJob3VfZXRfYWxfMjAwMi5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUqai02OGCgAAAAAAAAAAAAIAAgAACSAAAAAAAAAAAAAAAAAAAAAJemhhbmctbGliAAAQAAgAAM/UKsYAAAARAAgAANNj2moAAAABABgAUqSNAE1lSgAj19QACTbFAAk2xAACZvkAAgBbTWFjaW50b3NoIEhEOlVzZXJzOgBtYW56aGFuZzoARG9jdW1lbnRzOgBNYW4uWmhhbmc6AGdtdGItZG9jOgB6aGFuZy1saWI6AGhvdV9ldF9hbF8yMDAyLnBkZgAADgAmABIAaABvAHUAXwBlAHQAXwBhAGwAXwAyADAAMAAyAC4AcABkAGYADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgBIVXNlcnMvbWFuemhhbmcvRG9jdW1lbnRzL01hbi5aaGFuZy9nbXRiLWRvYy96aGFuZy1saWIvaG91X2V0X2FsXzIwMDIucGRmABMAAS8AABUAAgAP//8AAAAIAA0AGgAkAEkAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAACKQ==}} @article{hu_and_stamnes_1993, Author = {Y.X. Hu and K. Stamnes}, - Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAnLi4vLi4vemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmTxEB8AAAAAAB8AACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAz9PWZkgrAAAAUqSNF2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSpJHTY3R+AAAAAAAAAAAAAgACAAAJIAAAAAAAAAAAAAAAAAAAAAl6aGFuZy1saWIAABAACAAAz9QqxgAAABEACAAA02PI3gAAAAEAGABSpI0ATWVKACPX1AAJNsUACTbEAAJm+QACAGBNYWNpbnRvc2ggSEQ6VXNlcnM6AG1hbnpoYW5nOgBEb2N1bWVudHM6AE1hbi5aaGFuZzoAZ210Yi1kb2M6AHpoYW5nLWxpYjoAaHVfYW5kX3N0YW1uZXNfMTk5My5wZGYADgAwABcAaAB1AF8AYQBuAGQAXwBzAHQAYQBtAG4AZQBzAF8AMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIATVVzZXJzL21hbnpoYW5nL0RvY3VtZW50cy9NYW4uWmhhbmcvZ210Yi1kb2MvemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAATAAEvAAAVAAIAD///AAAACAANABoAJABOAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAkI=}, Date-Added = {2016-05-19 19:31:56 +0000}, Date-Modified = {2016-05-20 15:13:12 +0000}, Journal = {J. Climate}, @@ -2889,7 +2888,8 @@ @article{hu_and_stamnes_1993 Pages = {728-742}, Title = {An accurate parameterization of the radiative properties of water clouds suitable for use in climate models}, Volume = {6}, - Year = {1993}} + Year = {1993}, + Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAnLi4vLi4vemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmTxEB8AAAAAAB8AACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAz9PWZkgrAAAAUqSNF2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSpJHTY3R+AAAAAAAAAAAAAgACAAAJIAAAAAAAAAAAAAAAAAAAAAl6aGFuZy1saWIAABAACAAAz9QqxgAAABEACAAA02PI3gAAAAEAGABSpI0ATWVKACPX1AAJNsUACTbEAAJm+QACAGBNYWNpbnRvc2ggSEQ6VXNlcnM6AG1hbnpoYW5nOgBEb2N1bWVudHM6AE1hbi5aaGFuZzoAZ210Yi1kb2M6AHpoYW5nLWxpYjoAaHVfYW5kX3N0YW1uZXNfMTk5My5wZGYADgAwABcAaAB1AF8AYQBuAGQAXwBzAHQAYQBtAG4AZQBzAF8AMQA5ADkAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIATVVzZXJzL21hbnpoYW5nL0RvY3VtZW50cy9NYW4uWmhhbmcvZ210Yi1kb2MvemhhbmctbGliL2h1X2FuZF9zdGFtbmVzXzE5OTMucGRmAAATAAEvAAAVAAIAD///AAAACAANABoAJABOAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAkI=}} @article{alexander_et_al_2010, Author = {Alexander, M. J. and Geller, M. and McLandress, C. and Polavarapu, S. and Preusse, P. and Sassi, F. and Sato, K. and Eckermann, S. and Ern, M. and Hertzog, A. and Kawatani, Y. and Pulido, M. and Shaw, T. A. and Sigmond, M. and Vincent, R. and Watanabe, S.}, diff --git a/physics/docs/pdftxt/GFS_OCEAN.txt b/physics/docs/pdftxt/GFS_OCEAN.txt new file mode 100644 index 000000000..813adf71c --- /dev/null +++ b/physics/docs/pdftxt/GFS_OCEAN.txt @@ -0,0 +1,16 @@ +/** +\page GFS_OCEAN GFS Simple Ocean Scheme +\section des_sfcocean Description + +The Sea Surface Temperature (SST) is a required filed in Numerical Weather Prediciton (NWP) systems because it +functions as the lower foundary condition for the calculation of air-sea heat fluxes. When the GFS Simple Ocean +Scheme is evoked, the SST is kept constant throughout the forecast. + +\section intra_sfcocean Intraphysics Communication +\ref arg_table_sfc_ocean_run + + + + + +*/ diff --git a/physics/docs/pdftxt/GFSv15p2_no_nsst_suite.txt b/physics/docs/pdftxt/GFSv15p2_no_nsst_suite.txt new file mode 100644 index 000000000..982afc860 --- /dev/null +++ b/physics/docs/pdftxt/GFSv15p2_no_nsst_suite.txt @@ -0,0 +1,127 @@ +/** +\page GFS_v15p2_no_nsst_page GFS_v15p2_no_nsst Suite + +\section gfsv15_no_nsst_suite_overview Overview + +Suite GFS_v15p2_no_nsst is a companion suite of GFS_v15p2 with GRIB2 data initialization. + +The GFS_v15p2_no_nsst physics suite uses the parameterizations in the following order: + - \ref GFS_RRTMG + - \ref GFS_SFCLYR + - \ref GFS_OCEAN + - \ref GFS_NOAH + - \ref GFS_SFCSICE + - \ref GFS_HEDMF + - \ref GFS_UGWP_v0 + - \ref GFS_RAYLEIGH + - \ref GFS_OZPHYS + - \ref GFS_H2OPHYS + - \ref GFS_SAMFdeep + - \ref GFS_SAMFshal + - \ref GFDL_cloud + - \ref GFS_CALPRECIPTYPE + +\section sdf_gfsv15p2_no_nsst Suite Definition File +- For GRIB2 initialization data: \subpage suite_FV3_GFS_v15p2_no_nsst_xml + +\section gfs15p2nonsst_nml_opt_des Namelist + +- \b &gfs_physics_nml +\n \c fhzero = 6 +\n \c h2o_phys = .true. +\n \c ldiag3d = .false. +\n \c fhcyc = 24 +\n \c use_ufo = .true. +\n \c pre_rad = .false. +\n \c ncld = 5 +\n \c imp_physics = 11 +\n \c pdfcld = .false. +\n \c fhswr = 3600. +\n \c fhlwr = 3600. +\n \c ialb = 1 +\n \c iems = 1 +\n \c iaer = 111 +\n \c ico2 = 2 +\n \c isubc_sw = 2 +\n \c isubc_lw = 2 +\n \c isol = 2 +\n \c lwhtr = .true. +\n \c swhtr = .true. +\n \c cnvgwd = .true. +\n \c shal_cnv = .true. +\n \c cal_pre = .false. +\n \c redrag = .true. +\n \c dspheat = .true. +\n \c hybedmf = .true. +\n \c random_clds = .false. +\n \c trans_trac = .true. +\n \c cnvcld = .true. +\n \c imfshalcnv = 2 +\n \c imfdeepcnv = 2 +\n \c cdmbgwd = 3.5,0.25 [1.0,1.2] [0.2,2.5] [0.125,3.0] ! [C768] [C384] [C192] [C96]L64 +\n \c prslrd0 = 0. +\n \c ivegsrc = 1 +\n \c isot = 1 +\n \c debug = .false. +\n \c oz_phys = .F. +\n \c oz_phys_2015 = .T. +\n \c nstf_name = 0,0,0,0,0 +\n \c nst_anl = .true. +\n \c psautco = 0.0008,0.0005 +\n \c prautco = 0.00015,0.00015 +\n \c lgfdlmprad = .true. +\n \c effr_in = .true. +\n \c do_sppt = .false. +\n \c do_shum = .false. +\n \c do_skeb = .false. +\n \c do_sfcperts = .false. + +- \b &gfdl_cloud_microphysics_nml +\n \c sedi_transport = .true. +\n \c do_sedi_heat = .false. +\n \c rad_snow = .true. +\n \c rad_graupel = .true. +\n \c rad_rain = .true. +\n \c const_vi = .F. +\n \c const_vs = .F. +\n \c const_vg = .F. +\n \c const_vr = .F. +\n \c vi_max = 1. +\n \c vs_max = 2. +\n \c vg_max = 12. +\n \c vr_max = 12. +\n \c qi_lim = 1. +\n \c prog_ccn = .false. +\n \c do_qa = .true. +\n \c fast_sat_adj = .true. +\n \c tau_l2v = 225. +\n \c tau_v2l = 150. +\n \c tau_g2v = 900. +\n \c rthresh = 10.e-6 +\n \c dw_land = 0.16 +\n \c dw_ocean = 0.10 +\n \c ql_gen = 1.0e-3 +\n \c ql_mlt = 1.0e-3 +\n \c qi0_crt = 8.0E-5 +\n \c qs0_crt = 1.0e-3 +\n \c tau_i2s = 1000. +\n \c c_psaci = 0.05 +\n \c c_pgacs = 0.01 +\n \c rh_inc = 0.30 +\n \c rh_inr = 0.30 +\n \c rh_ins = 0.30 +\n \c ccn_l = 300. +\n \c ccn_o = 100. +\n \c c_paut = 0.5 +\n \c c_cracw = 0.8 +\n \c use_ppm = .false. +\n \c use_ccn = .true. +\n \c mono_prof = .true. +\n \c z_slope_liq = .true. +\n \c z_slope_ice = .true. +\n \c de_ice = .false. +\n \c fix_negative = .true. +\n \c icloud_f = 1 +\n \c mp_time = 150. + +*/ diff --git a/physics/docs/pdftxt/GFSv15p2_suite.txt b/physics/docs/pdftxt/GFSv15p2_suite.txt index 7d9f9d348..944fd49f1 100644 --- a/physics/docs/pdftxt/GFSv15p2_suite.txt +++ b/physics/docs/pdftxt/GFSv15p2_suite.txt @@ -10,6 +10,7 @@ The GFS_v15p2 physics suite uses the parameterizations in the following order: - \ref GFS_RRTMG - \ref GFS_SFCLYR - \ref GFS_NSST + - \ref GFS_OCEAN - \ref GFS_NOAH - \ref GFS_SFCSICE - \ref GFS_HEDMF @@ -23,8 +24,7 @@ The GFS_v15p2 physics suite uses the parameterizations in the following order: - \ref GFS_CALPRECIPTYPE \section sdf_gfsv15p2 Suite Definition File -- For NEMSIO initialization data: \ref suite_FV3_GFS_v15p2_xml -- For GRIB2 initialization data: \ref suite_FV3_GFS_v15p2_no_nsst_xml +- For NEMSIO initialization data: \subpage suite_FV3_GFS_v15p2_xml \section gfs15p2_nml_opt_des Namelist @@ -126,8 +126,8 @@ The GFS_v15p2 physics suite uses the parameterizations in the following order: \n \c icloud_f = 1 \n \c mp_time = 150. -\note nstf_name = \f$2,0,0,0,0[2,1,0,0,0]^1 [0,0,0,0,0]^2\f$ -- \f$^1\f$ This should be used when spinning up NSST fields in the absence of NSST data in initial conditions (see documentation for CHGRES) -- \f$^2\f$ This should be used when not using NSST at all (paired with \ref suite_FV3_GFS_v15p2_no_nsst_xml to turned off NSST option) +\note nstf_name = \f$[2,0,0,0,0]^1 [2,1,0,0,0]^2 \f$ +- \f$^1\f$ NSST is on and coupled with spin up off +- \f$^2\f$ NSST is on and coupled with spin up on */ diff --git a/physics/docs/pdftxt/GFSv16beta_no_nsst_suite.txt b/physics/docs/pdftxt/GFSv16beta_no_nsst_suite.txt new file mode 100644 index 000000000..3e5205199 --- /dev/null +++ b/physics/docs/pdftxt/GFSv16beta_no_nsst_suite.txt @@ -0,0 +1,167 @@ +/** +\page GFS_v16beta_no_nsst_page GFS_v16beta_no_nsst Suite + +\section gfsv16beta_no_nsst_suite_overview Overview + +Suite GFS_v16beta_no_nsst is a companion suite of GFS_v16beta with GRIB2 data initialization. + +The GFS_v16beta_no_nsst physics suite uses the parameterizations in the following order: + - \ref GFS_RRTMG + - \ref GFS_SFCLYR + - \ref GFS_OCEAN + - \ref GFS_NOAH + - \ref GFS_SFCSICE + - \ref GFS_SATMEDMFVDIFQ + - \ref GFS_UGWP_v0 + - \ref GFS_RAYLEIGH + - \ref GFS_OZPHYS + - \ref GFS_H2OPHYS + - \ref GFS_SAMFdeep + - \ref GFS_SAMFshal + - \ref GFDL_cloud + - \ref GFS_CALPRECIPTYPE + +\section sdf_gfsv16bnonsst Suite Definition File +- For GRIB2 initialization data: \subpage suite_FV3_GFS_v16beta_no_nsst_xml + +\section gfs16betanonsst_nml_opt_des Namelist + +- \b &gfs_physics_nml +\n \c fhzero = 6 +\n \c h2o_phys = .true. +\n \c ldiag3d = .false. +\n \c fhcyc = 24 +\n \c use_ufo = .true. +\n \c pre_rad = .false. +\n \c ncld = 5 +\n \c imp_physics = 11 +\n \c pdfcld = .false. +\n \c fhswr = 3600. +\n \c fhlwr = 3600. +\n \c ialb = 1 +\n \c iems = 1 +\n \c iaer = 5111 +\n \c icliq_sw = 2 +\n \c iovr_lw = 3 +\n \c iovr_sw = 3 +\n \c ico2 = 2 +\n \c isubc_sw = 2 +\n \c isubc_lw = 2 +\n \c isol = 2 +\n \c lwhtr = .true. +\n \c swhtr = .true. +\n \c cnvgwd = .true. +\n \c shal_cnv = .true. +\n \c cal_pre = .false. +\n \c redrag = .true. +\n \c dspheat = .true. +\n \c hybedmf = .false. +\n \c satmedmf = .true. +\n \c isatmedmf = 1 +\n \c lheatstrg = .true. +\n \c random_clds = .false. +\n \c trans_trac = .true. +\n \c cnvcld = .true. +\n \c imfshalcnv = 2 +\n \c imfdeepcnv = 2 +\n \c cdmbgwd = 4.0,0.15,1.0,1.0 [1.1,0.72,1.0,1.0] [0.23,1.5,1.0,1.0] [0.14,1.8,1.0,1.0] ! [C768] [C384] [C192] [C96]L64 +\n \c prslrd0 = 0. +\n \c ivegsrc = 1 +\n \c isot = 1 +\n \c lsoil = 4 +\n \c lsm = 1 +\n \c iopt_dveg = 1 +\n \c iopt_crs = 1 +\n \c iopt_btr = 1 +\n \c iopt_run = 1 +\n \c iopt_sfc = 1 +\n \c iopt_frz = 1 +\n \c iopt_inf = 1 +\n \c iopt_rad = 1 +\n \c iopt_alb = 2 +\n \c iopt_snf = 4 +\n \c iopt_tbot = 2 +\n \c iopt_stc = 1 +\n \c debug = .false. +\n \c oz_phys = .F. +\n \c oz_phys_2015 = .T. +\n \c nstf_name = 0,0,0,0,0 +\n \c nst_anl = .true. +\n \c psautco = 0.0008,0.0005 +\n \c prautco = 0.00015,0.00015 +\n \c lgfdlmprad = .true. +\n \c effr_in = .true. +\n \c ldiag_ugwp = .false. +\n \c do_ugwp = .false. +\n \c do_tofd = .true. +\n \c do_sppt = .false. +\n \c do_shum = .false. +\n \c do_skeb = .false. +\n \c do_sfcperts = .false. + + +- \b &gfdl_cloud_microphysics_nml +\n \c sedi_transport = .true. +\n \c do_sedi_heat = .false. +\n \c rad_snow = .true. +\n \c rad_graupel = .true. +\n \c rad_rain = .true. +\n \c const_vi = .F. +\n \c const_vs = .F. +\n \c const_vg = .F. +\n \c const_vr = .F. +\n \c vi_max = 1. +\n \c vs_max = 2. +\n \c vg_max = 12. +\n \c vr_max = 12. +\n \c qi_lim = 1. +\n \c prog_ccn = .false. +\n \c do_qa = .true. +\n \c fast_sat_adj = .true. +\n \c tau_l2v = 225. +\n \c tau_v2l = 150. +\n \c tau_g2v = 900. +\n \c rthresh = 10.e-6 +\n \c dw_land = 0.16 +\n \c dw_ocean = 0.10 +\n \c ql_gen = 1.0e-3 +\n \c ql_mlt = 1.0e-3 +\n \c qi0_crt = 8.0E-5 +\n \c qs0_crt = 1.0e-3 +\n \c tau_i2s = 1000. +\n \c c_psaci = 0.05 +\n \c c_pgacs = 0.01 +\n \c rh_inc = 0.30 +\n \c rh_inr = 0.30 +\n \c rh_ins = 0.30 +\n \c ccn_l = 300. +\n \c ccn_o = 100. +\n \c c_paut = 0.5 +\n \c c_cracw = 0.8 +\n \c use_ppm = .false. +\n \c use_ccn = .true. +\n \c mono_prof = .true. +\n \c z_slope_liq = .true. +\n \c z_slope_ice = .true. +\n \c de_ice = .false. +\n \c fix_negative = .true. +\n \c icloud_f = 1 +\n \c mp_time = 150. +\n \c reiflag = 2 + + +- \b &cires_ugwp_nml +\n \c knob_ugwp_solver = 2 +\n \c knob_ugwp_source = 1,1,0,0 +\n \c knob_ugwp_wvspec = 1,25,25,25 +\n \c knob_ugwp_azdir = 2,4,4,4 +\n \c knob_ugwp_stoch = 0,0,0,0 +\n \c knob_ugwp_effac = 1,1,1,1 +\n \c knob_ugwp_doaxyz = 1 +\n \c knob_ugwp_doheat = 1 +\n \c knob_ugwp_dokdis = 1 +\n \c knob_ugwp_ndx4lh = 1 +\n \c knob_ugwp_version = 0 +\n \c launch_level = 27 + +*/ diff --git a/physics/docs/pdftxt/GFSv16beta_suite.txt b/physics/docs/pdftxt/GFSv16beta_suite.txt index abba846f1..8389d0c40 100644 --- a/physics/docs/pdftxt/GFSv16beta_suite.txt +++ b/physics/docs/pdftxt/GFSv16beta_suite.txt @@ -13,6 +13,7 @@ The GFS_v16beta physics suite uses the parameterizations in the following order: - \ref GFS_RRTMG - \ref GFS_SFCLYR - \ref GFS_NSST + - \ref GFS_OCEAN - \ref GFS_NOAH - \ref GFS_SFCSICE - \ref GFS_SATMEDMFVDIFQ @@ -26,8 +27,7 @@ The GFS_v16beta physics suite uses the parameterizations in the following order: - \ref GFS_CALPRECIPTYPE \section sdf_gfsv16b Suite Definition File -- For NEMSIO initialization data: \ref suite_FV3_GFS_v16beta_xml -- For GRIB2 initialization data: \ref suite_FV3_GFS_v16beta_no_nsst_xml +- For NEMSIO initialization data: \subpage suite_FV3_GFS_v16beta_xml \section gfs16beta_nml_opt_des Namelist @@ -169,8 +169,8 @@ The GFS_v16beta physics suite uses the parameterizations in the following order: \n \c knob_ugwp_version = 0 \n \c launch_level = 27 -\note nstf_name = \f$2,0,0,0,0[2,1,0,0,0]^1 [0,0,0,0,0]^2\f$ -- \f$^1\f$ This should be used when spinning up NSST fields in the absence of NSST data in initial conditions (see documentation for CHGRES) -- \f$^2\f$ This should be used when not using NSST at all (paired with \ref suite_FV3_GFS_v16beta_no_nsst_xml to turned off NSST option) +\note nstf_name = \f$[2,0,0,0,0]^1 [2,1,0,0,0]^2\f$ +- \f$^1\f$ NSST is on and coupled with spin up off +- \f$^2\f$ NSST is on and coupled with spin up on */ diff --git a/physics/docs/pdftxt/all_shemes_list.txt b/physics/docs/pdftxt/all_shemes_list.txt index 7e5e3298e..b85acff37 100644 --- a/physics/docs/pdftxt/all_shemes_list.txt +++ b/physics/docs/pdftxt/all_shemes_list.txt @@ -51,6 +51,7 @@ parameterizations in suites. - \b Surface \b Layer \b and \b Simplified \b Ocean \b and \b Sea \b Ice \b Representation - \subpage GFS_SFCLYR - \subpage GFS_NSST + - \subpage GFS_OCEAN - \subpage GFS_SFCSICE - \b Others diff --git a/physics/docs/pdftxt/mainpage.txt b/physics/docs/pdftxt/mainpage.txt index 2ac121f3c..bdac1ef17 100644 --- a/physics/docs/pdftxt/mainpage.txt +++ b/physics/docs/pdftxt/mainpage.txt @@ -7,16 +7,19 @@ Community Physics Package (CCPP) v3.0 public release. The CCPP-Physics is envisioned to contain parameterizations used by NOAA operational models for weather through seasonal prediction timescales, as well as developmental schemes under consideration for upcoming operational implementations. This version contains all parameterizations of the current operational GFS, -plus additional developmental schemes. The CCPP can currently be used with the Single Column Model (SCM) developed -by the Global Model Test Bed (GMTB) of the Developmental Testbed Center, as well as with the atmospheric component -of NOAA's Unified Forecast System (UFS-Atmosphere), which employs the the non-hydrostatic -Finite-Volume Cubed-Sphere (FV3) dynamic core. +plus additional developmental schemes. There are four suites supported for use with the Single Column Model (SCM) +developed by the Development Testbed Center (GFS_v15p2, GFS_v16beta, GSD_v1, and csawmg), and four suites +supported for use with the atmospheric component of the UFS (i.e., GFS_v15p2, GFS_v15p2_no_nsst, GFS_v16beta and +GFS_v16beta_no_nsst). The variants labelled as \a no_nsst are a simplification that uses constant sea surface +temperature (SST). This simplification is needed when the UFS is initialized with files in GRIdded Binary Edition 2 (GRIB2) +format instead of files in NOAA Environmental Modeling System (NEMS) Input/Output (NEMSIO) format because the +fields necessary to predict (SST) are not available in the GRIB2 files. In this website you will find documentation on various aspects of each parameterization, including a high-level overview of its function, the input/output argument list, and a description of the algorithm. -The latest CCPP public release is Version 3.0 (June 2019), and more details on it may be found on the -
CCPP website hosted by the Global Model Test -Bed (GMTB) of the Developmental Testbed Center (DTC). +The latest CCPP public release is Version 4.0 (March 2020), and more details on it may be found on the + CCPP website hosted by +the Developmental Testbed Center (DTC). */ diff --git a/physics/docs/pdftxt/suite_input.nml.txt b/physics/docs/pdftxt/suite_input.nml.txt index 688eb5d07..4f7ddaae8 100644 --- a/physics/docs/pdftxt/suite_input.nml.txt +++ b/physics/docs/pdftxt/suite_input.nml.txt @@ -221,14 +221,14 @@ and how stochastic perturbations are used in the Noah Land Surface Model. debug gfs_control_type flag for debug printout .false. nstf_name(5) gfs_control_type NSST related paramters:\n
    -
  • nstf_name(1): 0=NSSTM off, 1= NSSTM on but uncoupled, 2= NSSTM on and coupled -
  • nstf_name(2): 1=NSSTM spin up on, 0=NSSTM spin up off -
  • nstf_name(3): 1=NSST analysis on, 0=NSSTM analysis off +
  • nstf_name(1): 0=NSST off, 1= NSST on but uncoupled, 2= NSST on and coupled +
  • nstf_name(2): 1=NSST spin up on, 0=NSST spin up off +
  • nstf_name(3): 1=NSST analysis on, 0=NSST analysis off
  • nstf_name(4): zsea1 in mm
  • nstf_name(5): zesa2 in mm
/0,0,1,0,5/ -nst_anl gfs_control_type flag for NSSTM analysis in gcycle/sfcsub .false. +nst_anl gfs_control_type flag for NSST analysis in gcycle/sfcsub .false. effr_in gfs_control_type logical flag for using input cloud effective radii calculation .false. aero_in gfs_control_type logical flag for using aerosols in Morrison-Gettelman microphysics .false. iau_delthrs gfs_control_type incremental analysis update (IAU) time interval in hours 6 diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index 508fb3b67..e21ddb3a7 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -21,14 +21,12 @@ end subroutine sfc_ocean_init subroutine sfc_ocean_finalize() end subroutine sfc_ocean_finalize -!>\defgroup gfs_ocean_main GFS Ocean scheme Module +!>\defgroup gfs_ocean_main GFS Simple Ocean Scheme Module !! This subroutine calculates thermodynamical properties over !! open water. -#if 0 !! \section arg_table_sfc_ocean_run Argument Table !! \htmlinclude sfc_ocean_run.html !! -#endif subroutine sfc_ocean_run & & ( im, cp, rd, eps, epsm1, hvap, rvrdm1, ps, t1, q1, & ! --- inputs & tskin, cm, ch, prsl1, prslki, wet, wind, & From e63c34fb94ae161a73bd0793aefcc68546f19e38 Mon Sep 17 00:00:00 2001 From: mzhangw Date: Mon, 2 Mar 2020 15:46:27 -0700 Subject: [PATCH 124/404] CCPP V4.0 scidoc update (#402) * scientific documentation update for UFS public release, add two additional xml files for GFSv15p2 and GFSv16beta * add two new suites: GFSv15p2_no_nsst and GFSv16beta_no_nsst and GFS ocean scientific documentation --- physics/cires_ugwp.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index 89cea0595..504b24a77 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -145,7 +145,6 @@ end subroutine cires_ugwp_finalize !> \section arg_table_cires_ugwp_run Argument Table !! \htmlinclude cires_ugwp_run.html !! - !> \section gen_cires_ugwp CIRES UGWP Scheme General Algorithm !! @{ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr, & @@ -367,7 +366,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr gw_dudt = gw_dudt*(1.-pked) + ed_dudt*pked end subroutine cires_ugwp_run - !! @} !>@} end module cires_ugwp From ab540e5a532b5a891382e39dc21f1105d8f53e57 Mon Sep 17 00:00:00 2001 From: Man Zhang Date: Mon, 9 Mar 2020 15:04:58 -0600 Subject: [PATCH 125/404] add no_nsst suites in all_schemes page per ligia email --- physics/docs/pdftxt/all_shemes_list.txt | 31 ++++++++++++++++--------- physics/docs/pdftxt/mainpage.txt | 4 ++-- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/physics/docs/pdftxt/all_shemes_list.txt b/physics/docs/pdftxt/all_shemes_list.txt index b85acff37..c1f3bf1d8 100644 --- a/physics/docs/pdftxt/all_shemes_list.txt +++ b/physics/docs/pdftxt/all_shemes_list.txt @@ -83,25 +83,34 @@ to the parameterization. \section allsuite_overview Physics Suites -The CCPP v3 includes the suite used in the GFS v15 implemented operationally in June 2019 (suite GFS_v15). Additionally, it includes three -developmental suites which are undergoing testing for possible future implementation in the UFS. Suite GFS_v15plus is identical to suite -GFS_v15 except for a replacement in the PBL parameterization (Han et al. 2019 \cite Han_2019 ). Suite csawmg differs from GFS_v15 as it +The CCPP includes the suite GFS_v15p2, which has the same parameterizations used in the GFS v15 implemented operationally in June 2019, and suite +GFS_v16beta, i.e., the beta version of the suite planned for GFS v16 to be implemented operationally in 2021. Suite GFS_v16beta is identical to +Suite GFS_v15p2 except for an update in the PBL parameterization (Han et al. 2019 \cite Han_2019 ) and RRTMG. Additionally, CCPP v4 includes two +developmental suites which are undergoing testing to inform future implementations of the UFS. Suite csawmg differs from GFS_v15p2 as it contains different convection and microphysics schemes made available through a NOAA Climate Process Team (CPT) with components developed at multiple research centers and universities, including Colorado State, Utah, NASA, NCAR, and EMC. Suite GSD_v0 differs from GFS_v15 as it uses the convection, microphysics, and boundary layer schemes employed in the Rapid Refresh (RAP) and High-Resolution Rapid Refresh (HRRR \cite Benjamin_2016 ) operational models and was assembled by NOAA/GSD. An assessment of an earlier version of these suites can be found in the UFS portal -and in the GMTB website . +and in the DTC website . Two variant suites labelled as \a no_nsst are simplification of GFS_v15p2 and GFS_v16beta. +This simplification is needed when the UFS is initialized with files in GRIdded Binary Edition 2 (GRIB2) format instead of files in NOAA Environmental Modeling +System (NEMS) Input/Output (NEMSIO) format because the fields necesary to predict (SST) are not available in the GRIB2 files. Table 1. Physics suite options included in this documentation. \tableofcontents -| Phys suites | GFS_v15 | GFS_v15plus | csawmg | GSD_v0 | -|------------------|----------------------|----------------------|---------------------|----------------------| -| Deep Cu | \ref GFS_SAMFdeep | \ref GFS_SAMFdeep | \ref CSAW_scheme | \ref GSD_CU_GF | -| Shallow Cu | \ref GFS_SAMFshal | \ref GFS_SAMFshal | \ref GFS_SAMFshal | \ref GSD_MYNNEDMF and \ref cu_gf_sh_group | -| Microphysics | \ref GFDL_cloud | \ref GFDL_cloud | \ref CPT_MG3 | \ref GSD_THOMPSON | -| PBL/TURB | \ref GFS_HEDMF | \ref GFS_SATMEDMF | \ref GFS_HEDMF | \ref GSD_MYNNEDMF | -| Land | \ref GFS_NOAH | \ref GFS_NOAH | \ref GFS_NOAH | \ref GSD_RUCLSM | +| Physics suites | GFS_v15p2 | GFS_v16beta | csawmg | GSD_v1 | GFS_v15p2_no_nsst | GFS_v16beta_no_nsst | +|------------------|----------------------|--------------------------|---------------------|---------------------------------------------|-------------------------|---------------------------| +| Deep Cu | \ref GFS_SAMFdeep | \ref GFS_SAMFdeep | \ref CSAW_scheme | \ref GSD_CU_GF | \ref GFS_SAMFdeep | \ref GFS_SAMFdeep | +| Shallow Cu | \ref GFS_SAMFshal | \ref GFS_SAMFshal | \ref GFS_SAMFshal | \ref GSD_MYNNEDMF and \ref cu_gf_sh_group | \ref GFS_SAMFshal | \ref GFS_SAMFshal | +| Microphysics | \ref GFDL_cloud | \ref GFDL_cloud | \ref CPT_MG3 | \ref GSD_THOMPSON | \ref GFDL_cloud | \ref GFDL_cloud | +| PBL/TURB | \ref GFS_HEDMF | \ref GFS_SATMEDMFVDIFQ | \ref GFS_HEDMF | \ref GSD_MYNNEDMF | \ref GFS_HEDMF | \ref GFS_SATMEDMFVDIFQ | +| Radiation | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | \ref GFS_RRTMG | +| Surface Layer | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | \ref GFS_SFCLYR | +| Land | \ref GFS_NOAH | \ref GFS_NOAH | \ref GFS_NOAH | \ref GSD_RUCLSM | \ref GFS_NOAH | \ref GFS_NOAH | +| Gravity Wave Drag| \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | \ref GFS_UGWP_v0 | +| Ocean | \ref GFS_NSST | \ref GFS_NSST | \ref GFS_NSST | \ref GFS_NSST | \ref GFS_OCEAN | \ref GFS_OCEAN | +| Ozone | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | \ref GFS_OZPHYS | +| Water Vapor | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \ref GFS_H2OPHYS | \tableofcontents diff --git a/physics/docs/pdftxt/mainpage.txt b/physics/docs/pdftxt/mainpage.txt index bdac1ef17..a670441f5 100644 --- a/physics/docs/pdftxt/mainpage.txt +++ b/physics/docs/pdftxt/mainpage.txt @@ -10,8 +10,8 @@ operational implementations. This version contains all parameterizations of the plus additional developmental schemes. There are four suites supported for use with the Single Column Model (SCM) developed by the Development Testbed Center (GFS_v15p2, GFS_v16beta, GSD_v1, and csawmg), and four suites supported for use with the atmospheric component of the UFS (i.e., GFS_v15p2, GFS_v15p2_no_nsst, GFS_v16beta and -GFS_v16beta_no_nsst). The variants labelled as \a no_nsst are a simplification that uses constant sea surface -temperature (SST). This simplification is needed when the UFS is initialized with files in GRIdded Binary Edition 2 (GRIB2) +GFS_v16beta_no_nsst). The variants labelled as \a no_nsst are simplification of GFS_v15p2 and GFS_v16beta +. This simplification is needed when the UFS is initialized with files in GRIdded Binary Edition 2 (GRIB2) format instead of files in NOAA Environmental Modeling System (NEMS) Input/Output (NEMSIO) format because the fields necessary to predict (SST) are not available in the GRIB2 files. From 01a91cba31543aad261f6d75c700cac9a1e3bae9 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Fri, 27 Mar 2020 11:52:29 -0600 Subject: [PATCH 126/404] update ocean scheme description per Ligias request --- physics/docs/pdftxt/GFS_OCEAN.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/physics/docs/pdftxt/GFS_OCEAN.txt b/physics/docs/pdftxt/GFS_OCEAN.txt index 813adf71c..b384aec84 100644 --- a/physics/docs/pdftxt/GFS_OCEAN.txt +++ b/physics/docs/pdftxt/GFS_OCEAN.txt @@ -2,9 +2,10 @@ \page GFS_OCEAN GFS Simple Ocean Scheme \section des_sfcocean Description -The Sea Surface Temperature (SST) is a required filed in Numerical Weather Prediciton (NWP) systems because it -functions as the lower foundary condition for the calculation of air-sea heat fluxes. When the GFS Simple Ocean -Scheme is evoked, the SST is kept constant throughout the forecast. +The Sea Surface Temperature (SST) is a required field in Numerical Weather Prediciton (NWP) systems because it +functions as the lower boundary condition for the calculation of air-sea heat fluxes. The GFS Simple Ocean Scheme +does not change the SST. Therefore, the SST stays constant throughout the forecast unless it is updated by other processes. +In some models, such as the UFS atmosphere, the SST can change if forcing towards the climatology is turned on. \section intra_sfcocean Intraphysics Communication \ref arg_table_sfc_ocean_run From 5a254ffb0aa2fd26df641d3963ee7d1fa38a0379 Mon Sep 17 00:00:00 2001 From: Man Zhang Date: Fri, 27 Mar 2020 14:52:16 -0600 Subject: [PATCH 127/404] fix doxygen compile warnings --- physics/docs/pdftxt/suite_input.nml.txt | 2 +- physics/m_micro.F90 | 9 --------- physics/mp_thompson.F90 | 4 ---- physics/sfc_drv_ruc.F90 | 2 -- 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/physics/docs/pdftxt/suite_input.nml.txt b/physics/docs/pdftxt/suite_input.nml.txt index 4f7ddaae8..95b77c22f 100644 --- a/physics/docs/pdftxt/suite_input.nml.txt +++ b/physics/docs/pdftxt/suite_input.nml.txt @@ -454,7 +454,7 @@ and how stochastic perturbations are used in the Noah Land Surface Model. icloud_f gfdl_cloud_microphys_mod flag (0,1,or 2) for cloud fraction diagnostic scheme 0 irain_f gfdl_cloud_microphys_mod flag (0 or 1) for cloud water autoconversion to rain scheme. 0: with subgrid variability; 1: no subgrid variability 0 mp_time gfdl_cloud_microphys_mod time step of GFDL cloud microphysics (MP). If \p mp_time isn't divisible by physics time step or is larger than physics time step, the actual MP time step becomes \p dt/NINT[dt/MIN(dt,mp_time)] 150. -alin gfdl_cloud_microphys_mod parameter \a a in Lin et al.(1983). Constant in empirical formula for \f$U_R\f$. Increasing(decreasing) \p alin can boost(decrease) accretion of cloud water by rain and rain evaporation 842. +alin gfdl_cloud_microphys_mod parameter \a a in Lin et al.(1983). Constant in empirical formula for \f$U_R\f$. Increasing(decreasing) \p alin can boost(decrease) accretion of cloud water by rain and rain evaporation 842. clin gfdl_cloud_microphys_mod parameter \a c in Lin et al.(1983). Constant in empirical formula for \f$U_S\f$. Increasing(decreasing) \p clin can boost(decrease) accretion of cloud water by snow, accretion of cloud ice by snow, snow sublimation and deposition, and snow melting 4.8 t_min gfdl_cloud_microphys_mod temperature threshold for instant deposition. Deposit all water vapor to cloud ice when temperature is lower than \p t_min 178. t_sub gfdl_cloud_microphys_mod temperature threshold for sublimation. Cloud ice, snow or graupel stops(starts) sublimation when temperature is lower(higher) then \p t_sub 184. diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index 83ff8d554..65adffab5 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -106,17 +106,8 @@ end subroutine m_micro_finalize !> \defgroup mg2mg3 Morrison-Gettelman MP scheme Module !! This module contains the the entity of MG2 and MG3 schemes. !> @{ -!> \defgroup mg_driver Morrison-Gettelman MP Driver Module -!! \brief This subroutine is the Morrison-Gettelman MP driver, which computes -!! grid-scale condensation and evaporation of cloud condensate. - -#if 0 - !> \section arg_table_m_micro_run Argument Table !! \htmlinclude m_micro_run.html -!! -#endif -!>\ingroup mg_driver !>\section detail_m_micro_run MG m_micro_run Detailed Algorithm !> @{ subroutine m_micro_run( im, ix, lm, flipv, dt_i & diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index 22b8124c1..e3b760738 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -21,11 +21,9 @@ module mp_thompson contains !> This subroutine is a wrapper around the actual mp_gt_driver(). -#if 0 !! \section arg_table_mp_thompson_init Argument Table !! \htmlinclude mp_thompson_init.html !! -#endif subroutine mp_thompson_init(ncol, nlev, is_aerosol_aware, & nwfa2d, nifa2d, nwfa, nifa, & mpicomm, mpirank, mpiroot, & @@ -129,11 +127,9 @@ subroutine mp_thompson_init(ncol, nlev, is_aerosol_aware, & end subroutine mp_thompson_init -#if 0 !> \section arg_table_mp_thompson_run Argument Table !! \htmlinclude mp_thompson_run.html !! -#endif !>\ingroup aathompson !>\section gen_thompson_hrrr Thompson MP General Algorithm !>@{ diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 3b4b8a118..a7436cb8f 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -130,11 +130,9 @@ end subroutine lsm_ruc_finalize !> \defgroup lsm_ruc_group GSD RUC LSM Model !! This module contains the RUC Land Surface Model developed by NOAA/GSD !! (Smirnova et al. 2016 \cite Smirnova_2016). -#if 0 !> \section arg_table_lsm_ruc_run Argument Table !! \htmlinclude lsm_ruc_run.html !! -#endif !>\section gen_lsmruc GSD RUC LSM General Algorithm ! DH* TODO - make order of arguments the same as in the metadata table subroutine lsm_ruc_run & ! inputs From e9909192b9a81709562536b7d806b87dacbd23d8 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Fri, 27 Mar 2020 15:15:53 -0600 Subject: [PATCH 128/404] fix m_micro prebuild error --- physics/m_micro.F90 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index 65adffab5..fceadce09 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -103,11 +103,13 @@ end subroutine m_micro_init subroutine m_micro_finalize end subroutine m_micro_finalize -!> \defgroup mg2mg3 Morrison-Gettelman MP scheme Module -!! This module contains the the entity of MG2 and MG3 schemes. -!> @{ +!> \defgroup mg_driver Morrison-Gettelman MP Driver Module +!! \brief This subroutine is the Morrison-Gettelman MP driver, which computes +!! grid-scale condensation and evaporation of cloud condensate. +!! !> \section arg_table_m_micro_run Argument Table -!! \htmlinclude m_micro_run.html +!> \htmlinclude m_micro_run.html +!! !>\section detail_m_micro_run MG m_micro_run Detailed Algorithm !> @{ subroutine m_micro_run( im, ix, lm, flipv, dt_i & @@ -2003,6 +2005,5 @@ subroutine find_cldtop(ncol, pver, cf, kcldtop) end subroutine find_cldtop -!> @} end module m_micro From cec1ad95f14f02e4fb6c7da2ab1684e9111024ff Mon Sep 17 00:00:00 2001 From: Man Zhang Date: Fri, 27 Mar 2020 15:28:28 -0600 Subject: [PATCH 129/404] fix doc of m_micro --- physics/m_micro.F90 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index fceadce09..c81348e43 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -14,8 +14,7 @@ module m_micro contains -!>\ingroup mg_driver -!! This subroutine is the MG initialization. +!> This subroutine is the MG initialization. !> \section arg_table_m_micro_init Argument Table !! \htmlinclude m_micro_init.html !! @@ -103,7 +102,7 @@ end subroutine m_micro_init subroutine m_micro_finalize end subroutine m_micro_finalize -!> \defgroup mg_driver Morrison-Gettelman MP Driver Module +!> \defgroup mg2mg3 Morrison-Gettelman MP Driver Module !! \brief This subroutine is the Morrison-Gettelman MP driver, which computes !! grid-scale condensation and evaporation of cloud condensate. !! @@ -1884,7 +1883,7 @@ end subroutine m_micro_run !DONIF Calculate the Brunt_Vaisala frequency !=============================================================================== -!>\ingroup mg_driver +!>\ingroup mg2mg3 !> This subroutine computes profiles of background state quantities for !! the multiple gravity wave drag parameterization. !!\section gw_prof_gen MG gw_prof General Algorithm @@ -1971,7 +1970,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & end subroutine gw_prof !> @} -!>\ingroup mg_driver +!>\ingroup mg2mg3 !! This subroutine is to find cloud top based on cloud fraction. subroutine find_cldtop(ncol, pver, cf, kcldtop) implicit none From 540035a92ba73b6e572acd8c02e98da85283bdaf Mon Sep 17 00:00:00 2001 From: mzhangw Date: Mon, 30 Mar 2020 13:44:06 -0600 Subject: [PATCH 130/404] Update physics/docs/pdftxt/mainpage.txt Co-Authored-By: ligiabernardet --- physics/docs/pdftxt/mainpage.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/docs/pdftxt/mainpage.txt b/physics/docs/pdftxt/mainpage.txt index a670441f5..2abaeca7c 100644 --- a/physics/docs/pdftxt/mainpage.txt +++ b/physics/docs/pdftxt/mainpage.txt @@ -10,7 +10,7 @@ operational implementations. This version contains all parameterizations of the plus additional developmental schemes. There are four suites supported for use with the Single Column Model (SCM) developed by the Development Testbed Center (GFS_v15p2, GFS_v16beta, GSD_v1, and csawmg), and four suites supported for use with the atmospheric component of the UFS (i.e., GFS_v15p2, GFS_v15p2_no_nsst, GFS_v16beta and -GFS_v16beta_no_nsst). The variants labelled as \a no_nsst are simplification of GFS_v15p2 and GFS_v16beta +GFS_v16beta_no_nsst). The variants labelled as \a no_nsst are a simplification of GFS_v15p2 and GFS_v16beta suites . This simplification is needed when the UFS is initialized with files in GRIdded Binary Edition 2 (GRIB2) format instead of files in NOAA Environmental Modeling System (NEMS) Input/Output (NEMSIO) format because the fields necessary to predict (SST) are not available in the GRIB2 files. From 7dea01c47de30b7df77b8396065929dad56ffe7e Mon Sep 17 00:00:00 2001 From: Man Zhang Date: Mon, 30 Mar 2020 13:49:48 -0600 Subject: [PATCH 131/404] minor fix --- physics/docs/pdftxt/all_shemes_list.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/docs/pdftxt/all_shemes_list.txt b/physics/docs/pdftxt/all_shemes_list.txt index c1f3bf1d8..79fd01611 100644 --- a/physics/docs/pdftxt/all_shemes_list.txt +++ b/physics/docs/pdftxt/all_shemes_list.txt @@ -85,7 +85,7 @@ to the parameterization. The CCPP includes the suite GFS_v15p2, which has the same parameterizations used in the GFS v15 implemented operationally in June 2019, and suite GFS_v16beta, i.e., the beta version of the suite planned for GFS v16 to be implemented operationally in 2021. Suite GFS_v16beta is identical to -Suite GFS_v15p2 except for an update in the PBL parameterization (Han et al. 2019 \cite Han_2019 ) and RRTMG. Additionally, CCPP v4 includes two +Suite GFS_v15p2 except for an update in the PBL parameterization (Han et al. 2019 \cite Han_2019 ). Additionally, CCPP v4 includes two developmental suites which are undergoing testing to inform future implementations of the UFS. Suite csawmg differs from GFS_v15p2 as it contains different convection and microphysics schemes made available through a NOAA Climate Process Team (CPT) with components developed at multiple research centers and universities, including Colorado State, Utah, NASA, NCAR, and EMC. Suite GSD_v0 differs from GFS_v15 as it From c494cc728d3fedb157bc46b9907c4f24f560d992 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 6 May 2020 09:47:33 -0600 Subject: [PATCH 132/404] Update version from 3.0.0 to 4.0.0 --- CMakeLists.txt | 2 +- physics/docs/pdftxt/UGWPv0.txt | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 physics/docs/pdftxt/UGWPv0.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bd357d46..cd0d1c6d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ endif (NOT PROJECT) cmake_minimum_required(VERSION 3.0) project(ccppphys - VERSION 3.0.0 + VERSION 4.0.0 LANGUAGES C CXX Fortran) # Use rpaths on MacOSX diff --git a/physics/docs/pdftxt/UGWPv0.txt b/physics/docs/pdftxt/UGWPv0.txt deleted file mode 100644 index da7009b79..000000000 --- a/physics/docs/pdftxt/UGWPv0.txt +++ /dev/null @@ -1,21 +0,0 @@ -/** -\page UGWPv0 Unified Gravity Wave Physics Version 0 -\section des_UGWP Description - -Gravity waves (GWs) are generated by a variety of sources in the atmosphere including orographic GWs (OGWs; quasi-stationary waves) and non-orographic GWs (NGWs; non-stationary oscillations). The subgrid scale parameterization scheme for OGWs can be found in Section \ref GFS_GWDPS. This scheme represents the operational version of the subgrid scale orography effects in Version 15 of Global Forecast System (GFS). - -The NGW physics scheme parameterizes the effects of non-stationary subgrid-scale waves in the global atmosphere models extended into the stratosphere, mesosphere, and thermosphere. These non-stationary oscillations with periods bounded by Coriolis and Brunt-Väisälä frequencies and typical horizontal scales from tens to several hundreds of kilometers are forced by the imbalance of convective and frontal/jet dynamics in the troposphere and lower stratosphere (Fritts 1984 \cite fritts_1984; Alexander et al. 2010 \cite alexander_et_al_2010; Plougonven and Zhang 2014 \cite plougonven_and_zhang_2014). The NGWs propagate upwards and the amplitudes exponentially grow with altitude until instability and breaking of waves occur. Convective and dynamical instability induced by GWs with large amplitudes can trigger production of small-scale turbulence and self-destruction of waves. The latter process in the theory of atmospheric GWs is frequently referred as the wave saturation (Lindzen 1981 \cite lindzen_1981; Weinstock 1984 \cite weinstock_1984; Fritts 1984 \cite fritts_1984). Herein, “saturation” or "breaking" refers to any processes that act to reduce wave amplitudes due to instabilities and/or interactions arising from large-amplitude perturbations limiting the exponential growth of GWs with height. Background dissipation processes such as molecular diffusion and radiative cooling, in contrast, act independently of GW amplitudes. In the middle atmosphere, impacts of NGW saturation (or breaking) and dissipation on the large-scale circulation, mixing, and transport have been acknowledged in the physics of global weather and climate models after pioneering studies by Lindzen 1981 \cite lindzen_1981 and Holton 1983 \cite holton_1983. Comprehensive reviews on the physics of NGWs and OGWs in the climate research and weather forecasting highlighted the variety of parameterization schemes for NGWs (Alexander et al. 2010 \cite alexander_et_al_2010; Geller et al. 2013 \cite geller_et_al_2013; Garcia et al. 2017 \cite garcia_et_al_2017). They are formulated using different aspects of the nonlinear and linear propagation, instability, breaking and dissipation of waves along with different specifications of GW sources (Garcia et al. 2007 \cite garcia_et_al_2007; Richter et al 2010 \cite richter_et_al_2010; Eckermann et al. 2009 \cite eckermann_et_al_2009; Eckermann 2011 \cite eckermann_2011; Lott et al. 2012 \cite lott_et_al_2012). - -The current operational GFS physics parameterizes effects of stationary OGWs and convective GWs, neglecting the impacts of non-stationary subgrid scale GW physics. This leads to well-known shortcomings in the global model predictions in the stratosphere and upper atmosphere (Alexander et al. 2010 \cite alexander_et_al_2010; Geller et al. 2013). In order to describe the effects of unresolved GWs by dynamical cores in global forecast models, subgrid scales physics of stationary and non-stationary GWs needs to be implemented in the self-consistent manner under the Unified Gravity Wave Physics (UGWP) framework. - -The concept of UGWP and the related programming architecture implemented in FV3GFS was first proposed by CU-CIRES, NOAA Space Weather Prediction Center (SWPC) and Environmental Modeling Center (EMC) for the Unified Forecast System (UFS) with variable positions of the model top lids (Alpert et al. 2019 \cite alpert_et_al_2019; Yudin et al. 2016 \cite yudin_et_al_2016; Yudin et al. 2018 \cite yudin_et_al_2018). As above, the UGWP considers identical GW propagation solvers for OGWs and NGWs with different approaches for specification of subgrid wave sources. The current set of the input and control parameters for UGWP version 0 (UGWP-v0) can select different options for GW effects including momentum deposition (also called GW drag), heat deposition, and mixing by eddy viscosity, conductivity and diffusion. The input GW parameters can control the number of directional azimuths in which waves can propagate, number of waves in single direction, and the interface model layer from the surface at which NGWs can be launched. Among the input parameters, the GW efficiency factors reflect intermittency of wave excitation. They can vary with horizontal resolutions, reflecting capability of the FV3 dynamical core to resolve mesoscale wave activity with the enhancement of model resolution. The prescribed distributions for vertical momentum flux (VMF) of NGWs have been employed in the global forecast models of NWP centers and reanalysis projects to ease tuning of GW schemes to the climatology of the middle atmosphere dynamics in the absence of the global wind data above about 35 km (Eckermann et al. 2009 \cite eckermann_et_al_2009; Molod et al. 2015 \cite molod_et_al_2015). These distributions of VMF qualitatively describe the general features of the latitudinal and seasonal variations of the global GW activity in the lower stratosphere, observed from the ground and space (Ern et al. 2018 \cite ern_et_al_2018). For the long-term climate projections, global models seek to establish communication between model physics and dynamics. This provides variable in time and space excitation of subgrid GWs under year-to-year variations of solar input and anthropogenic emissions (Richter et al 2010 \cite richter_et_al_2010; 2014 \cite richter_et_al_2014). - -Note that in the first release of UGWP (UGWP-v0), the momentum and heat deposition due to GW breaking and dissipation have been tested in the multi-year simulations and medium-range forecasts using FV3GFS-L127 configuration with top lid at about 80 km. In addition, the eddy mixing effects induced by instability of GWs are not activated in this version. Along with the GW heat and momentum depositions, GW eddy mixing is an important element of the Whole Atmosphere Model (WAM) physics, as shown in WAM simulations with the spectral dynamics (Yudin et al. 2018 \cite yudin_et_al_2018). The additional impact of eddy mixing effects in the middle and upper atmosphere need to be further tested, evaluated, and orchestrated with the subgrid turbulent diffusion of the GFS physics (work in progress). In UFS, the WAM with FV3 dynamics (FV3-WAM) will represent the global atmosphere model configuration extended into the thermosphere (top lid at ~600 km). In the mesosphere and thermosphere, the background attenuation of subgrid waves due to molecular and turbulent diffusion, radiative damping and ion drag will be the additional mechanism of NGW and OGW dissipation along with convective and dynamical instability of waves described by the linear (Lindzen 1981 \cite lindzen_1981) and nonlinear (Weinstock 1984 \cite weinstock_1984; Hines 1997 \cite hines_1997) saturation theories. - -\section intra_UGWPv0 Intraphysics Communication -\ref arg_table_cires_ugwp_run - -\section gen_al_ugwpv0 General Algorithm -\ref cires_ugwp_run - -*/ From 5229075e2bb1f2e45818890c7386b923bca7ff42 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 6 May 2020 09:47:51 -0600 Subject: [PATCH 133/404] Fix merge conflicts and apply missing updates for scientific documentation --- physics/docs/pdftxt/CPT_adv_suite.txt | 68 ++++--- physics/docs/pdftxt/GFS_OZPHYS.txt | 2 +- physics/docs/pdftxt/GSD_adv_suite.txt | 231 +++++++++++++++--------- physics/docs/pdftxt/all_shemes_list.txt | 15 +- physics/docs/pdftxt/mainpage.txt | 9 +- physics/docs/pdftxt/suite_input.nml.txt | 60 ++++-- 6 files changed, 253 insertions(+), 132 deletions(-) diff --git a/physics/docs/pdftxt/CPT_adv_suite.txt b/physics/docs/pdftxt/CPT_adv_suite.txt index 132d8bd11..ce51b6a30 100644 --- a/physics/docs/pdftxt/CPT_adv_suite.txt +++ b/physics/docs/pdftxt/CPT_adv_suite.txt @@ -3,31 +3,28 @@ \section csawmg_suite_overview Overview -The advanced csawmg physics suite uses the parameterizations in the following order: +The csawmg physics suite uses the parameterizations in the following order: - \ref GFS_RRTMG - \ref GFS_SFCLYR - \ref GFS_NSST - \ref GFS_NOAH - \ref GFS_SFCSICE - \ref GFS_HEDMF - - \ref GFS_GWDPS + - \ref GFS_UGWP_v0 - \ref GFS_RAYLEIGH - \ref GFS_OZPHYS - \ref GFS_H2OPHYS - \ref CSAW_scheme - - \ref GFS_GWDC - \ref GFS_SAMFshal - \ref CPT_MG3 - \ref mod_cs_conv_aw_adj - \ref GFS_CALPRECIPTYPE \section sdf_cpt_suite Suite Definition File - -The advanced csawmg physics suite uses the parameterizations in the following order, as defined in \c SCM_csawmg : \code - + @@ -56,9 +53,10 @@ The advanced csawmg physics suite uses the parameterizations in the following or GFS_suite_stateout_reset get_prs_fv3 GFS_suite_interstitial_1 - dcyc2t3 GFS_surface_generic_pre GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter GFS_suite_interstitial_2 @@ -83,8 +81,9 @@ The advanced csawmg physics suite uses the parameterizations in the following or hedmf GFS_PBL_generic_post GFS_GWD_generic_pre - gwdps - gwdps_post + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post rayleigh_damp GFS_suite_stateout_update ozphys_2015 @@ -96,12 +95,8 @@ The advanced csawmg physics suite uses the parameterizations in the following or cs_conv cs_conv_post GFS_DCNV_generic_post - gwdc_pre - gwdc - gwdc_post GFS_SCNV_generic_pre samfshalcnv - samfshalcnv_post GFS_SCNV_generic_post GFS_suite_interstitial_4 cnvc90 @@ -111,21 +106,20 @@ The advanced csawmg physics suite uses the parameterizations in the following or m_micro_post cs_conv_aw_adj GFS_MP_generic_post - sfc_sice_post maximum_hourly_diagnostics - \endcode -\section cpt_nml_option Namelist Option +\section cpt_nml_option Namelist \code &gfs_physics_nml fhzero = 6. ldiag3d = .true. fhcyc = 24. + nst_anl = .true. use_ufo = .true. pre_rad = .false. crtrh = 0.93,0.90,0.95 @@ -147,25 +141,40 @@ The advanced csawmg physics suite uses the parameterizations in the following or shal_cnv = .true. cal_pre = .false. redrag = .true. - dspheat = .true. + dspheat = .false. hybedmf = .true. satmedmf = .false. - lheatstrg = .true. + lheatstrg = .false. random_clds = .true. trans_trac = .true. - cnvcld = .true. + cnvcld = .false. imfshalcnv = 2 imfdeepcnv = -1 cdmbgwd = 3.5,0.25 prslrd0 = 0. ivegsrc = 1 isot = 1 + lsm = 1 + iopt_dveg = 2 + iopt_crs = 1 + iopt_btr = 1 + iopt_run = 1 + iopt_sfc = 1 + iopt_frz = 1 + iopt_inf = 1 + iopt_rad = 1 + iopt_alb = 2 + iopt_snf = 4 + iopt_tbot = 2 + iopt_stc = 1 oz_phys = .false. oz_phys_2015 = .true. debug = .false. + ras = .false. cscnv = .true. do_shoc = .false. + shoc_parm = 7000.0,1.0,2.0,0.7,-999.0 do_aw = .true. shoc_cld = .false. h2o_phys = .true. @@ -173,8 +182,6 @@ The advanced csawmg physics suite uses the parameterizations in the following or xkzm_h = 0.5 xkzm_m = 0.5 xkzm_s = 1.0 - nstf_name = 2,1,1,0,5 - nst_anl = .true. ccwf = 1.0,1.0 dlqf = 0.25,0.05 mg_dcs = 200.0 @@ -190,12 +197,13 @@ The advanced csawmg physics suite uses the parameterizations in the following or mg_do_ice_gmao = .false. mg_do_liq_liu = .true. cs_parm = 8.0,4.0,1.0e3,3.5e3,20.0,1.0,0.0,1.0,0.6,0.0 - shoc_parm = 7000.0,1.0,2.0,0.7,-999.0 ctei_rm = 0.60,0.23 max_lon = 8000 max_lat = 4000 rhcmax = 0.9999999 effr_in = .true. + + nstf_name = 2,1,1,0,5 ltaerosol = .false. lradar = .false. cplflx = .false. @@ -203,6 +211,22 @@ The advanced csawmg physics suite uses the parameterizations in the following or iaufhrs = 30 iau_inc_files = "''" / + +&cires_ugwp_nml + knob_ugwp_solver = 2 + knob_ugwp_source = 1,1,0,0 + knob_ugwp_wvspec = 1,25,25,25 + knob_ugwp_azdir = 2,4,4,4 + knob_ugwp_stoch = 0,0,0,0 + knob_ugwp_effac = 1,1,1,1 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_version = 0 + launch_level = 25 +/ +/ \endcode diff --git a/physics/docs/pdftxt/GFS_OZPHYS.txt b/physics/docs/pdftxt/GFS_OZPHYS.txt index fadaf95a5..3a2ddc173 100644 --- a/physics/docs/pdftxt/GFS_OZPHYS.txt +++ b/physics/docs/pdftxt/GFS_OZPHYS.txt @@ -1,5 +1,5 @@ /** -\page GFS_OZPHYS GFS Ozone Photochemistry Scheme +\page GFS_OZPHYS GFS Ozone Photochemistry (2015) Scheme \section des_ozone Description In recent years, the leading NWP centers have extended the vertical range of their NWP and DA systems from the surface up through the stratosphere (~10-50 km altitude) and lower mesosphere (~50-65 km). Some diff --git a/physics/docs/pdftxt/GSD_adv_suite.txt b/physics/docs/pdftxt/GSD_adv_suite.txt index fb662bc22..3ee38f32f 100644 --- a/physics/docs/pdftxt/GSD_adv_suite.txt +++ b/physics/docs/pdftxt/GSD_adv_suite.txt @@ -1,47 +1,38 @@ /** -\page GSD_v0_page GSD_v0 Suite +\page GSD_v1_page GSD_v1 Suite \section gsd_suite_overview Overview -The original Rapid Update Cycle (RUC), implemented in 1994, was designed to provide accurate short-range (0 to 12-hr) -numerical forecast guidance for weather-sensitive users, including those in the U.S. aviation community. -The RUC started to run every hour starting in 1998. Significant weather forecasting problems that occur in the 0- to -12-hr range include severe weather in all seasons (for example, tornadoes, severe thunderstorms, crippling snow, and -ice storms) and hazards to aviation (for example, clear air turbulence, icing, and downbursts). The RUC soon became a -key model for short-range convectiion forecasts and for the pre-convective environments. +Suite GSD_v1 contains the parameterizations used in the NOAA operational Rapid Refresh (RAP) +and High-Resolution Rapid Refresh (HRRR) models. These models runs at 13- and 3- km resolution, +respectively. -The RAP, which replaced the RUC in 2012, runs hourly at the National Centers for Environmental Prediction (NCEP), providing -high frequency updates of current conditions and short-range forecasts over North America at 13km resolution. A CONUS-nested -version at 3-km resolution called the High Resolution Rapid Refresh (HRRR), was implemented in the fall of 2014. Additional Model Information Links: - https://rapidrefresh.noaa.gov - https://rapidrefresh.noaa.gov/hrrr/ -The advanced GSD RAP/HRRR physics suite uses the parameterizations in the following order: +The GSD_v1 physics suite uses the parameterizations in the following order: - \ref GFS_RRTMG - \ref GFS_SFCLYR - \ref GFS_NSST - \ref GSD_RUCLSM - \ref GSD_MYNNEDMF - - \ref GFS_GWDPS + - \ref GFS_UGWP_v0 - \ref GFS_RAYLEIGH - \ref GFS_OZPHYS - \ref GFS_H2OPHYS - \ref GSD_CU_GF - \ref cu_gf_deep_group - \ref cu_gf_sh_group - - \ref GFS_GWDC - \ref GSD_THOMPSON - \ref GFS_CALPRECIPTYPE \section sdf_gsdsuite Suite Definition File - -The GSD RAP/HRRR physics suite uses the parameterizations in the following order, as defined in \c SCM_GSD_v0: \code - + @@ -72,9 +63,10 @@ The GSD RAP/HRRR physics suite uses the parameterizations in the following order GFS_suite_stateout_reset get_prs_fv3 GFS_suite_interstitial_1 - dcyc2t3 GFS_surface_generic_pre GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter GFS_suite_interstitial_2 @@ -85,6 +77,9 @@ The GSD RAP/HRRR physics suite uses the parameterizations in the following order sfc_nst sfc_nst_post lsm_ruc + lsm_ruc_sfc_sice_pre + sfc_sice + lsm_ruc_sfc_sice_post GFS_surface_loop_control_part2 @@ -96,8 +91,9 @@ The GSD RAP/HRRR physics suite uses the parameterizations in the following order GFS_surface_generic_post mynnedmf_wrapper GFS_GWD_generic_pre - gwdps - gwdps_post + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post rayleigh_damp GFS_suite_stateout_update ozphys_2015 @@ -108,9 +104,6 @@ The GSD RAP/HRRR physics suite uses the parameterizations in the following order cu_gf_driver_pre cu_gf_driver GFS_DCNV_generic_post - gwdc_pre - gwdc - gwdc_post GFS_SCNV_generic_pre GFS_SCNV_generic_post GFS_suite_interstitial_4 @@ -126,73 +119,149 @@ The GSD RAP/HRRR physics suite uses the parameterizations in the following order - \endcode -\section gsd_nml_option Namelist Option +\section gsd_nml_option Namelist \code &gfs_physics_nml - fhzero = 6. - h2o_phys = .true. - ldiag3d = .true. - fhcyc = 0. - nst_anl = .true. - use_ufo = .true. - pre_rad = .false. - ncld = 5 - imp_physics = 8 - ltaerosol = .true. - lradar = .true. - ttendlim = -999. - pdfcld = .false. - fhswr = 3600. - fhlwr = 3600. - ialb = 1 - iems = 1 - iaer = 111 - ico2 = 2 - isubc_sw = 2 - isubc_lw = 2 - isol = 2 - lwhtr = .true. - swhtr = .true. - cnvgwd = .true. - shal_cnv = .true. - cal_pre = .false. - redrag = .true. - dspheat = .true. - hybedmf = .false. - satmedmf = .false. - lheatstrg = .false. - do_mynnedmf = .true. - do_mynnsfclay = .false. - random_clds = .false. - trans_trac = .true. - cnvcld = .true. - imfshalcnv = 3 - imfdeepcnv = 3 - cdmbgwd = 3.5,0.25 - prslrd0 = 0. - ivegsrc = 1 - isot = 1 - debug = .false. - oz_phys = .false. - oz_phys_2015 = .true. - nstf_name = 2,1,1,0,5 - cplflx = .false. - iau_delthrs = 6 - iaufhrs = 30 - iau_inc_files = "''" - do_sppt = .false. - do_shum = .false. - do_skeb = .false. - do_sfcperts = .false. - lsm = 2 - lsoil_lsm = 9 + fhzero = 6. + h2o_phys = .true. + ldiag3d = .true. + fhcyc = 0. + nst_anl = .true. + use_ufo = .true. + pre_rad = .false. + ncld = 5 + imp_physics = 8 + ltaerosol = .true. + lradar = .true. + ttendlim = 0.004 + pdfcld = .false. + fhswr = 3600. + fhlwr = 3600. + ialb = 1 + iems = 1 + iaer = 111 + ico2 = 2 + isubc_sw = 2 + isubc_lw = 2 + isol = 2 + lwhtr = .true. + swhtr = .true. + cnvgwd = .true. + shal_cnv = .true. + cal_pre = .false. + redrag = .true. + dspheat = .true. + hybedmf = .false. + satmedmf = .false. + lheatstrg = .false. + do_mynnedmf = .true. + do_mynnsfclay = .false. + random_clds = .false. + trans_trac = .true. + cnvcld = .true. + imfshalcnv = 3 + imfdeepcnv = 3 + cdmbgwd = 3.5,0.25 + prslrd0 = 0. + ivegsrc = 1 + isot = 1 + debug = .false. + oz_phys = .false. + oz_phys_2015 = .true. + nstf_name = 2,1,1,0,5 + cplflx = .false. + iau_delthrs = 6 + iaufhrs = 30 + iau_inc_files = "''" + do_sppt = .false. + do_shum = .false. + do_skeb = .false. + do_sfcperts = .false. + lsm = 3 + lsoil_lsm = 9 + iopt_dveg = 2 + iopt_crs = 1 + iopt_btr = 1 + iopt_run = 1 + iopt_sfc = 1 + iopt_frz = 1 + iopt_inf = 1 + iopt_rad = 1 + iopt_alb = 2 + iopt_snf = 4 + iopt_tbot = 2 + iopt_stc = 1 icloud_bl = 1 bl_mynn_tkeadvect = .true. bl_mynn_edmf = 1 bl_mynn_edmf_mom = 1 + gwd_opt = 1 +/ + +&gfdl_cloud_microphysics_nml + sedi_transport = .true. + do_sedi_heat = .false. + rad_snow = .true. + rad_graupel = .true. + rad_rain = .true. + const_vi = .F. + const_vs = .F. + const_vg = .F. + const_vr = .F. + vi_max = 1. + vs_max = 2. + vg_max = 12. + vr_max = 12. + qi_lim = 1. + prog_ccn = .false. + do_qa = .false. + fast_sat_adj = .false. + tau_l2v = 225. + tau_v2l = 150. + tau_g2v = 900. + rthresh = 10.e-6 + dw_land = 0.16 + dw_ocean = 0.10 + ql_gen = 1.0e-3 + ql_mlt = 1.0e-3 + qi0_crt = 8.0E-5 + qs0_crt = 1.0e-3 + tau_i2s = 1000. + c_psaci = 0.05 + c_pgacs = 0.01 + rh_inc = 0.30 + rh_inr = 0.30 + rh_ins = 0.30 + ccn_l = 300. + ccn_o = 100. + c_paut = 0.5 + c_cracw = 0.8 + use_ppm = .false. + use_ccn = .true. + mono_prof = .true. + z_slope_liq = .true. + z_slope_ice = .true. + de_ice = .false. + fix_negative = .true. + icloud_f = 1 + mp_time = 150. +/ + +&cires_ugwp_nml + knob_ugwp_solver = 2 + knob_ugwp_source = 1,1,0,0 + knob_ugwp_wvspec = 1,25,25,25 + knob_ugwp_azdir = 2,4,4,4 + knob_ugwp_stoch = 0,0,0,0 + knob_ugwp_effac = 1,1,1,1 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_version = 0 + launch_level = 25 / \endcode diff --git a/physics/docs/pdftxt/all_shemes_list.txt b/physics/docs/pdftxt/all_shemes_list.txt index 79fd01611..4d7d08e90 100644 --- a/physics/docs/pdftxt/all_shemes_list.txt +++ b/physics/docs/pdftxt/all_shemes_list.txt @@ -1,11 +1,10 @@ /** \page allscheme_page Parameterizations and Suites Overview -\section allscheme_overview Physics Parameterizations +\section allscheme_overview Physical Parameterizations -In the CCPP-Physics v3.0 release, each parameterization is in its own modern Fortran module, - which facilitates model development and -code maintenance. While some individual parameterization can be invoked for the GMTB SCM, most users will assemble the +In the CCPP, each parameterization is in its own modern Fortran module, which facilitates model development and +code maintenance. While some individual parameterization can be invoked for the SCM, most users will assemble the parameterizations in suites. - \b Radiation @@ -38,15 +37,13 @@ parameterizations in suites. - \b Ozone \b Photochemical \b Production \b and \b Loss - \subpage GFS_OZPHYS - - \ref GFS_ozphys_2015 - \b Water \b Vapor \b Photochemical \b Production \b and \b Loss - \subpage GFS_H2OPHYS - \b Gravity \b Wave \b Drag - - \subpage GFS_GWDPS - - \subpage GFS_GWDC - - \subpage UGWPv0 + - \subpage GFS_UGWP_v0 + - \subpage GFS_GWDPS - \b Surface \b Layer \b and \b Simplified \b Ocean \b and \b Sea \b Ice \b Representation - \subpage GFS_SFCLYR @@ -88,7 +85,7 @@ GFS_v16beta, i.e., the beta version of the suite planned for GFS v16 to be imple Suite GFS_v15p2 except for an update in the PBL parameterization (Han et al. 2019 \cite Han_2019 ). Additionally, CCPP v4 includes two developmental suites which are undergoing testing to inform future implementations of the UFS. Suite csawmg differs from GFS_v15p2 as it contains different convection and microphysics schemes made available through a NOAA Climate Process Team (CPT) with components developed -at multiple research centers and universities, including Colorado State, Utah, NASA, NCAR, and EMC. Suite GSD_v0 differs from GFS_v15 as it +at multiple research centers and universities, including Colorado State, Utah, NASA, NCAR, and EMC. Suite GSD_v1 differs from GFS_v15p2 as it uses the convection, microphysics, and boundary layer schemes employed in the Rapid Refresh (RAP) and High-Resolution Rapid Refresh (HRRR \cite Benjamin_2016 ) operational models and was assembled by NOAA/GSD. An assessment of an earlier version of these suites can be found in the UFS portal diff --git a/physics/docs/pdftxt/mainpage.txt b/physics/docs/pdftxt/mainpage.txt index 2abaeca7c..fdf7d1294 100644 --- a/physics/docs/pdftxt/mainpage.txt +++ b/physics/docs/pdftxt/mainpage.txt @@ -1,11 +1,12 @@ /** \mainpage Introduction -Welcome to the scientific documentation for the parameterizations available in the Common -Community Physics Package (CCPP) v3.0 public release. +Welcome to the scientific documentation for the parameterizations and suites available in the Common +Community Physics Package (CCPP) v4. -The CCPP-Physics is envisioned to contain parameterizations used by NOAA operational models for weather through -seasonal prediction timescales, as well as developmental schemes under consideration for upcoming +The CCPP-Physics is envisioned to contain parameterizations used in NOAA's Unified Forecast System (UFS) +applications for weather through seasonal prediction timescales, encompassing operational schemes as well as +developmental schemes under consideration for upcoming operational implementations. This version contains all parameterizations of the current operational GFS, plus additional developmental schemes. There are four suites supported for use with the Single Column Model (SCM) developed by the Development Testbed Center (GFS_v15p2, GFS_v16beta, GSD_v1, and csawmg), and four suites diff --git a/physics/docs/pdftxt/suite_input.nml.txt b/physics/docs/pdftxt/suite_input.nml.txt index 95b77c22f..2565c58eb 100644 --- a/physics/docs/pdftxt/suite_input.nml.txt +++ b/physics/docs/pdftxt/suite_input.nml.txt @@ -1,20 +1,24 @@ /** -\page GFSsuite_nml Namelist Options Description +\page CCPPsuite_nml_desp Namelist Options Description -At runtime, the SCM and the UFS Atmosphere access runtime configurations from file \c input.nml. This file contains -various namelists that control aspects of the I/O, dynamics, physics etc. Most physics-related options are grouped into -two namelists:\b &gfs_physics_nml and \b &gfdl_cloud_microphysics_nml, with additional specifications for stochastic physics in +The SCM and the UFS Atmosphere access runtime configurations from file \c input.nml. This file contains +various namelists records that control aspects of the I/O, dynamics, physics etc. Most physics-related options are in +reords \b &gfs_physics_nml and \b &cires_ugwp_nml. When using the GFDL microphysics scheme, variables in namelist +\b &gfdl_cloud_microphysics_nml are also used. Additional specifications for stochastic physics are in namelists \b &stochy_nam and \b &nam_sfcperts. - Namelist \b &gfdl_cloud_microphysics_nml is only relevant when the GFDL microphysics is used, and its variables are defined in module_gfdl_cloud_microphys.F90. +- Namelist \b &cires_ugwp_nml specifies options for the use of CIRES Unified Gravity Wave Physics Version 0. + - Namelist \b &gfs_physics_nml pertains to all of the suites used, but some of the variables are only relevant for specific parameterizations. Its variables are defined in file GFS_typedefs.F90 in the host model. - Namelist \b &stochy_nam specifies options for the use of SPPT, SKEB and SHUM, while namelist \b &nam_sfcperts specifies whether and how stochastic perturbations are used in the Noah Land Surface Model. +
NML Description
option DDT in Host Model Description Default Value @@ -117,13 +121,19 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
  • =2 future development (not yet)
  • 0 -
    iaer gfs_control_type aerosol flag "abc" (volcanic, LW, SW): \n +
    iaer gfs_control_type 4-digit aerosol flag (dabc for aermdl, volcanic, LW, SW): \n
      -
    • a: stratospheric volcanic aerosols -
    • b: tropospheric aerosols for LW -
    • c: tropospheric aerosols for SW \n - 0: aerosol effect is not included; \n - 1: aerosol effect is included +
    • d:tropospheric aerosol model scheme flag \n + =0 or none, opac-climatology aerosol scheme \n + =1 use gocart climatology aerosol scheme \n + =2 use gocart prognostic aerosol scheme \n + =5 opac-clim new spectral mapping +
    • a:=0 use background stratospheric aerosol \n + =1 include stratospheric volcanic aerosol +
    • b:=0 no tropospheric aerosol in LW radiation \n + =1 include tropospheric aerosol in LW +
    • c:=0 no tropospheric aerosol in SW radiation \n + =1 include tropospheric aerosol in SW
    1
    ico2 gfs_control_type \f$CO_2\f$ data source control flag:\n @@ -159,7 +169,7 @@ and how stochastic perturbations are used in the Noah Land Surface Model. 0
    lwhtr gfs_control_type logical flag for output of longwave heating rate .true.
    swhtr gfs_control_type logical flag for output of shortwave heating rate .true. -
    cnvgwd gfs_control_type logical flag for convective gravity wave drag scheme .false. +
    cnvgwd gfs_control_type logical flag for convective gravity wave drag scheme dependent on maxval(cdmbgwd(3:4) == 0.0) .false.
    shal_cnv gfs_control_type logical flag for calling shallow convection .false.
    lmfshal gfs_control_type flag for mass-flux shallow convection scheme in the cloud fraction calculation shal_cnv .and. (imfshalcnv > 0)
    lmfdeep2 gfs_control_type flag for mass-flux deep convection scheme in the cloud fraction calculation imfdeepcnv == 2 .or. 3 .or.4 @@ -168,6 +178,12 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
    dspheat gfs_control_type logical flag for using TKE dissipative heating to temperature tendency in hybrid EDMF and TKE-EDMF schemes .false.
    hybedmf gfs_control_type logical flag for calling hybrid EDMF PBL scheme .false.
    satmedmf gfs_control_type logical flag for calling TKE EDMF PBL scheme .false. +
    isatmedmf gfs_control_type flag for scale-aware TKE-based moist EDMF scheme \n +
      +
    • 0: initial version of satmedmf (Nov.2018) +
    • 1: updated version of satmedmf (as of May 2019) +
    +
    0
    do_mynnedmf gfs_control_type flag to activate MYNN-EDMF scheme .false.
    random_clds gfs_control_type logical flag for whether clouds are random .false.
    trans_trac gfs_control_type logical flag for convective transport of tracers .false. @@ -187,6 +203,7 @@ and how stochastic perturbations are used in the Noah Land Surface Model. 1
    imfdeepcnv gfs_control_type flag for mass-flux deep convective scheme:\n
      +
    • -1: Chikira-Sugiyama deep convection (with \b cscnv = .T.)
    • 1: July 2010 version of SAS convective scheme (operational version as of 2016)
    • 2: scale- & aerosol-aware mass-flux deep convective scheme (2017)
    • 3: scale- & aerosol-aware Grell-Freitas scheme (GSD) @@ -194,12 +211,18 @@ and how stochastic perturbations are used in the Noah Land Surface Model.
    1
    lgfdlmprad gfs_control_type flag for GFDL mp scheme and radiation consistency .false. -
    cdmbgwd(2) gfs_control_type multiplication factors for mountain blocking and orographic gravity wave drag 2.0,0.25 +
    cdmbgwd(4) gfs_control_type multiplication factors for mountain blocking(1), orographic gravity wave drag(2) +
      +
    • [1]: GWDPS mountain blocking +
    • [2]: GWDPS orographic gravity wave drag +
    • [3]: the modulation total momentum flux of NGWs by intensities of the total precipitation +
    • [4]: TKE for future tests and applications +
    +
    2.0,0.25,1.0,1.0
    prslrd0 gfs_control_type pressure level above which to apply Rayleigh damping 0.0d0
    lsm gfs_control_type flag for land surface model to use \n
      -
    • 0: OSU LSM -
    • 1: NOAH LSM +
    • 1: Noah LSM
    • 2: RUC LSM
    1 @@ -342,7 +365,14 @@ and how stochastic perturbations are used in the Noah Land Surface Model. 1
    lsoil_lsm gfs_control_type number of soil layers internal to land surface model -1 -
    \b Stochastic \b Physics \b Specific \b Parameters +
    ldiag_ugwp GFS_control_type flag for CIRES UGWP diagnostics .false. +
    do_ugwp GFS_control_type flag for CIRES UGWP revised OGW +
      +
    • .T.: revised gwdps_v0 +
    • .F.: GFS operational orographic gwdps +
    +
    .false. +
    do_tofd GFS_control_type flag for turbulent orographic form drag .false.
    do_sppt gfs_control_type flag for stochastic SPPT option .false.
    do_shum gfs_control_type flag for stochastic SHUM option .false.
    do_skeb gfs_control_type flag for stochastic SKEB option .false. From 6c1eec4f354d305bc8088ac883e9f133785a6514 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 6 May 2020 10:19:41 -0600 Subject: [PATCH 134/404] Remove dcyc2t3_post from physics/dcyc2.meta and scientific documentation --- physics/dcyc2.meta | 67 ------------------- physics/docs/pdftxt/CPT_adv_suite.txt | 1 - physics/docs/pdftxt/GFSv14_suite.txt | 1 - physics/docs/pdftxt/GFSv15_suite.txt | 1 - physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt | 1 - physics/docs/pdftxt/GSD_adv_suite.txt | 1 - .../docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt | 1 - .../suite_FV3_GFS_v15p2_no_nsst.xml.txt | 1 - .../docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt | 1 - .../suite_FV3_GFS_v16beta_no_nsst.xml.txt | 1 - 10 files changed, 76 deletions(-) diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 244ebc6bd..9a5687bf5 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -535,70 +535,3 @@ type = integer intent = out optional = F - -######################################################################## -[ccpp-arg-table] - name = dcyc2t3_post_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = dcyc2t3_post_finalize - type = scheme - -######################################################################## -[ccpp-arg-table] - name = dcyc2t3_post_run - type = scheme -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[adjsfcdsw] - standard_name = surface_downwelling_shortwave_flux - long_name = surface downwelling shortwave flux at current time - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[adjsfcnsw] - standard_name = surface_net_downwelling_shortwave_flux - long_name = surface net downwelling shortwave flux at current time - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[adjsfcusw] - standard_name = surface_upwelling_shortwave_flux - long_name = surface upwelling shortwave flux at current time - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F diff --git a/physics/docs/pdftxt/CPT_adv_suite.txt b/physics/docs/pdftxt/CPT_adv_suite.txt index ce51b6a30..26d514d51 100644 --- a/physics/docs/pdftxt/CPT_adv_suite.txt +++ b/physics/docs/pdftxt/CPT_adv_suite.txt @@ -73,7 +73,6 @@ The csawmg physics suite uses the parameterizations in the following order: GFS_surface_composites_post - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post diff --git a/physics/docs/pdftxt/GFSv14_suite.txt b/physics/docs/pdftxt/GFSv14_suite.txt index 23f611a25..d1dcb038c 100644 --- a/physics/docs/pdftxt/GFSv14_suite.txt +++ b/physics/docs/pdftxt/GFSv14_suite.txt @@ -75,7 +75,6 @@ The GFS v14 suite uses the parameterizations in the following order, as defined - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post diff --git a/physics/docs/pdftxt/GFSv15_suite.txt b/physics/docs/pdftxt/GFSv15_suite.txt index 6b5fddcf8..abf446224 100644 --- a/physics/docs/pdftxt/GFSv15_suite.txt +++ b/physics/docs/pdftxt/GFSv15_suite.txt @@ -85,7 +85,6 @@ The GFS v15 suite uses the parameterizations in the following order, as defined GFS_surface_composites_post - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post diff --git a/physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt b/physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt index 56a1f97f5..6215fe361 100644 --- a/physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt +++ b/physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt @@ -76,7 +76,6 @@ The GFS v15plus suite uses the parameterizations in the following order, as defi GFS_surface_composites_post - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post diff --git a/physics/docs/pdftxt/GSD_adv_suite.txt b/physics/docs/pdftxt/GSD_adv_suite.txt index 3ee38f32f..39c5ebd20 100644 --- a/physics/docs/pdftxt/GSD_adv_suite.txt +++ b/physics/docs/pdftxt/GSD_adv_suite.txt @@ -85,7 +85,6 @@ The GSD_v1 physics suite uses the parameterizations in the following order: GFS_surface_composites_post - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt index f12b0c366..4074ddfc7 100644 --- a/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt +++ b/physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt @@ -58,7 +58,6 @@ GFS_surface_composites_post - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt index cd29eecdb..7a60f5e1c 100644 --- a/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt +++ b/physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt @@ -56,7 +56,6 @@ GFS_surface_composites_post - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt index 722224988..4abafe01a 100644 --- a/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt +++ b/physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt @@ -58,7 +58,6 @@ GFS_surface_composites_post - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post diff --git a/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt b/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt index adeb4352a..e783be1f9 100644 --- a/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt +++ b/physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt @@ -56,7 +56,6 @@ GFS_surface_composites_post - dcyc2t3_post sfc_diag sfc_diag_post GFS_surface_generic_post From ef386967e9cab4a672be603f52a51704f538d226 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Fri, 8 May 2020 10:59:14 -0600 Subject: [PATCH 135/404] add force_read_ferhires capability in FA --- physics/module_MP_FER_HIRES.F90 | 148 ++++++++++++++++++++++---------- physics/mp_fer_hires.F90 | 28 ++++-- physics/mp_fer_hires.meta | 18 ++++ 3 files changed, 145 insertions(+), 49 deletions(-) diff --git a/physics/module_MP_FER_HIRES.F90 b/physics/module_MP_FER_HIRES.F90 index c758f7951..776898f93 100644 --- a/physics/module_MP_FER_HIRES.F90 +++ b/physics/module_MP_FER_HIRES.F90 @@ -148,23 +148,23 @@ MODULE MODULE_MP_FER_HIRES INTEGER, PRIVATE,PARAMETER :: MY_T1=1, MY_T2=35 REAL,PRIVATE,DIMENSION(MY_T1:MY_T2),SAVE :: MY_GROWTH_NMM ! - REAL, PRIVATE,PARAMETER :: DMImin=.05e-3, DMImax=1.e-3, & + REAL, PRIVATE,PARAMETER :: DMImin=.05e-3, DMImax=1.e-3, & & DelDMI=1.e-6,XMImin=1.e6*DMImin REAL, PUBLIC,PARAMETER :: XMImax=1.e6*DMImax, XMIexp=.0536 INTEGER, PUBLIC,PARAMETER :: MDImin=XMImin, MDImax=XMImax - REAL, PRIVATE,DIMENSION(MDImin:MDImax) :: & + REAL, ALLOCATABLE, DIMENSION(:) :: & & ACCRI,VSNOWI,VENTI1,VENTI2 REAL, PUBLIC,DIMENSION(MDImin:MDImax) :: SDENS !-- For RRTM ! - REAL, PRIVATE,PARAMETER :: DMRmin=.05e-3, DMRmax=1.0e-3, & + REAL, PRIVATE,PARAMETER :: DMRmin=.05e-3, DMRmax=1.0e-3, & & DelDMR=1.e-6, XMRmin=1.e6*DMRmin, XMRmax=1.e6*DMRmax INTEGER, PUBLIC,PARAMETER :: MDRmin=XMRmin, MDRmax=XMRmax ! - REAL, PRIVATE,DIMENSION(MDRmin:MDRmax):: & + REAL, ALLOCATABLE, DIMENSION(:):: & & ACCRR,MASSR,RRATE,VRAIN,VENTR1,VENTR2 ! INTEGER, PRIVATE,PARAMETER :: Nrime=40 - REAL, DIMENSION(2:9,0:Nrime),PRIVATE,SAVE :: VEL_RF + REAL, ALLOCATABLE, DIMENSION(:,:) :: VEL_RF ! INTEGER,PARAMETER :: NX=7501 REAL, PARAMETER :: XMIN=180.0,XMAX=330.0 @@ -226,7 +226,7 @@ MODULE MODULE_MP_FER_HIRES !HWRF & ,NCW=300.E6 !- 100.e6 (maritime), 500.e6 (continental) !--- Other public variables passed to other routines: - REAL, PUBLIC,DIMENSION(MDImin:MDImax) :: MASSI + REAL, ALLOCATABLE ,DIMENSION(:) :: MASSI ! CONTAINS @@ -449,8 +449,9 @@ SUBROUTINE FER_HIRES (DT,RHgrd, & !GFDL => New. Added RHC_col to allow for height- and grid-dependent values for !GFDL the relative humidity threshold for condensation ("RHgrd") !6/11/2010 mod - Use lower RHgrd_out threshold for < 850 hPa +!mz 05/06/2020 - 10km !------------------------------------------------------------ - IF(DX1 .GE. 10 .AND. P_col(L) \section arg_table_mp_fer_hires_finalize Argument Table !! - subroutine mp_fer_hires_finalize () + subroutine mp_fer_hires_finalize (errmsg,errflg) + implicit none + + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not.is_initialized) return + + call ferhires_finalize() + + is_initialized = .false. + + end subroutine mp_fer_hires_finalize end module mp_fer_hires diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index a7a33378a..1782aecf6 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -130,6 +130,24 @@ [ccpp-arg-table] name = mp_fer_hires_finalize type = scheme + +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F ######################################################################## [ccpp-arg-table] name = mp_fer_hires_run From 328a76bff6b97c374915b6ef7f49d027f79bcf7f Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 8 May 2020 11:47:55 -0600 Subject: [PATCH 136/404] Moved rte-rrtmgp cloud-sampling extension into ccpp-physics. Added new cloud-overlap scheme, not complete. --- physics/GFS_rrtmgp_pre.F90 | 38 ++-- physics/GFS_rrtmgp_pre.meta | 9 + physics/GFS_rrtmgp_sw_pre.F90 | 4 +- physics/GFS_rrtmgp_sw_pre.meta | 9 - physics/mo_cloud_sampling.F90 | 308 ++++++++++++++++++++++++++ physics/rrtmgp_sw_cloud_sampling.F90 | 13 +- physics/rrtmgp_sw_cloud_sampling.meta | 9 + 7 files changed, 360 insertions(+), 30 deletions(-) create mode 100644 physics/mo_cloud_sampling.F90 diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index b6be512f4..374d1e2e5 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -189,7 +189,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, sec_diff_byband, raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, cld_frac, cld_lwp,& ! OUT cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! OUT tv_lay, relhum, tracer, cldsa, mtopa, mbota, de_lgth, gas_concentrations, & ! OUT - errmsg, errflg) + overlap_param, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -244,7 +244,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys), dimension(ncol,Model%levs),intent(out) :: & tv_lay, & ! Virtual temperatue at model-layers relhum ! Relative-humidity at model-layers - real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(out) :: & + real(kind_phys), dimension(ncol, Model%levs, Model%ntrac),intent(out) :: & tracer ! Array containing trace gases integer,dimension(ncol,3),intent(out) :: & mbota, & ! Vertical indices for cloud tops @@ -253,6 +253,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cldsa ! Fraction of clouds for low, middle, high, total and BL real(kind_phys), dimension(ncol), intent(out) :: & de_lgth ! Decorrelation length + real(kind_phys), dimension(nCol,Model%levs), intent(out) :: & + overlap_param ! Cloud-overlap parameter real(kind_phys), dimension(lw_gas_props%get_nband(),ncol),intent(out) :: & sec_diff_byband @@ -419,6 +421,14 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, call cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, p_lev, & tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, clouds, cldsa, mbota, mtopa, de_lgth) + ! Cloud-overlap parameter (only needed for iovr = 3) + overlap_param(:,1) = 0._kind_phys + do iCol=1,nCol + do iLay=Model%levs,2,-1 + overlap_param(iCol,iLay) = exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) + enddo + enddo + ! Copy output cloud fields cld_frac = clouds(:,:,1) cld_lwp = clouds(:,:,2) @@ -455,7 +465,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Sfcprop ! DDT: FV3-GFS surface fields integer, intent(in) :: & ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & + real(kind_phys), dimension(ncol, Model%levs, Model%ntrac),intent(in) :: & tracer ! Cloud condensate amount in layer by type () real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & p_lay, & ! Pressure @ model layer centers (Pa) @@ -481,8 +491,8 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ cldsa ! Fraction of clouds for low, mid, hi, tot, bl (NCOL,5) ! Local variables - real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate - integer :: i,k,ncndl + real(kind_phys), dimension(ncol, Model%levs, min(4,Model%ncnd)) :: cld_condensate + integer :: i,k,l,ncndl real(kind_phys), parameter :: xrc3 = 100. real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, & effr_i, effr_r, effr_s, cldcov @@ -519,8 +529,15 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ cld_condensate(1:NCOL,1:Model%levs,4) = tracer(1:NCOL,1:Model%levs,Model%ntsw) + & ! -snow + grapuel tracer(1:NCOL,1:Model%levs,Model%ntgl) endif - where(cld_condensate < epsq) cld_condensate = 0.0 - + + do l=1,ncndl + do k=1,Model%levs + do i=1,NCOL + if (cld_condensate(i,k,l) < epsq) cld_condensate(i,k,l) = 0.0 + enddo + enddo + enddo + ! For GFDL microphysics scheme... if (Model%imp_physics == 11 ) then if (.not. Model%lgfdlmprad) then @@ -587,11 +604,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ cld_condensate(1:NCOL,1:Model%levs,1) = cld_condensate(1:NCOL,1:Model%levs,1) + cnv_w(1:NCOL,1:Model%levs) endif - ! For MG prognostic cloud scheme, add in convective cloud water to liquid-and-ice-cloud condensate - if (Model%imp_physics == 10) then - cld_condensate(1:NCOL,1:Model%levs,1) = cld_condensate(1:NCOL,1:Model%levs,1) + cnv_w(1:NCOL,1:Model%levs) + cld_condensate(1:NCOL,1:Model%levs,2) - endif - ! ####################################################################################### ! MICROPHYSICS ! ####################################################################################### @@ -722,7 +734,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ p_lev/100., & ! IN - Pressure at model interfaces (mb) t_lay, & ! IN - Temperature at layer centers (K) tv_lay, & ! IN - Virtual temperature at layer centers (K) - cld_condensate(:,:,1:ncndl), & ! IN - Cloud condensate amount (ncndl types) () + cld_condensate, & ! IN - Cloud condensate amount (ncndl types) () ncndl, & ! IN - Number of cloud condensate types () Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index c80098709..f9c882fa7 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -334,6 +334,15 @@ kind = kind_phys intent = out optional = F +[overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F [cldsa] standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 6987c3e4a..c9b5a1b87 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -36,7 +36,7 @@ end subroutine GFS_rrtmgp_sw_pre_init !! \htmlinclude GFS_rrtmgp_sw_pre.html !! subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, sfc_alb_nir_dir, & + tv_lay, relhum, sw_gas_props, nday, idxday, alb1d, sfc_alb_nir_dir, & sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, & errmsg, errflg) @@ -55,8 +55,6 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ p_lay, & ! Layer pressure tv_lay, & ! Layer virtual-temperature relhum ! Layer relative-humidity - real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & - tracer real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & p_lev ! Pressure @ layer interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 73df740e1..d7e32510f 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -93,15 +93,6 @@ kind = kind_phys intent = in optional = F -[tracer] - standard_name = chemical_tracers - long_name = chemical tracers - units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in - optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme diff --git a/physics/mo_cloud_sampling.F90 b/physics/mo_cloud_sampling.F90 new file mode 100644 index 000000000..b814d461f --- /dev/null +++ b/physics/mo_cloud_sampling.F90 @@ -0,0 +1,308 @@ +! This code is part of RRTM for GCM Applications - Parallel (RRTMGP) +! +! Contacts: Robert Pincus and Eli Mlawer +! email: rrtmgp@aer.com +! +! Copyright 2015-2019, Atmospheric and Environmental Research and +! Regents of the University of Colorado. All right reserved. +! +! Use and duplication is permitted under the terms of the +! BSD 3-clause license, see http://opensource.org/licenses/BSD-3-Clause +! ------------------------------------------------------------------------------------------------- +! +! This module provides a simple implementation of sampling for the +! Monte Carlo Independent Pixel Approximation (McICA, doi:10.1029/2002jd003322) +! Cloud optical properties, defined by band and assumed homogenous within each cell (column/layer), +! are randomly sampled to preserve the mean cloud fraction and one of several possible overlap assumptions +! Users supply random numbers with order ngpt,nlay,ncol +! These are only accessed if cloud_fraction(icol,ilay) > 0 so many values don't need to be filled in +! +! ------------------------------------------------------------------------------------------------- +module mo_cloud_sampling + use mo_rte_kind, only: wp, wl + use mo_optical_props, only: ty_optical_props_arry, & + ty_optical_props_1scl, & + ty_optical_props_2str, & + ty_optical_props_nstr + implicit none + private + public :: draw_samples, sampled_mask_max_ran, sampled_mask_exp_ran +contains + ! ------------------------------------------------------------------------------------------------- + ! + ! Apply a T/F sampled cloud mask to cloud optical properties defined by band to produce + ! McICA-sampled cloud optical properties + ! + function draw_samples(cloud_mask,clouds,clouds_sampled) result(error_msg) + logical, dimension(:,:,:), intent(in ) :: cloud_mask ! Dimensions ncol,nlay,ngpt + class(ty_optical_props_arry), intent(in ) :: clouds ! Defined by band + class(ty_optical_props_arry), intent(inout) :: clouds_sampled ! Defined by g-point + character(len=128) :: error_msg + ! ------------------------ + integer :: ncol,nlay,nbnd,ngpt + integer :: imom + ! ------------------------ + ! + ! Error checking + ! + error_msg = "" + if(.not. clouds%is_initialized()) then + error_msg = "draw_samples: cloud optical properties are not initialized" + return + end if + if(.not. clouds_sampled%is_initialized()) then + error_msg = "draw_samples: sampled cloud optical properties are not initialized" + return + end if + + ! + ! Variables clouds and clouds_sampled have to be of the same type (have the same set of fields) + ! nstr isn't supported + ! 2str is checked at assignment + ! + select type(clouds) + type is (ty_optical_props_1scl) + select type(clouds_sampled) + type is (ty_optical_props_2str) + error_msg = "draw_samples: by-band and sampled cloud properties need to be the same variable type" + return + type is (ty_optical_props_nstr) + error_msg = "draw_samples: by-band and sampled cloud properties need to be the same variable type" + return + end select + type is (ty_optical_props_nstr) + error_msg = "draw_samples: sampling isn't implemented yet for ty_optical_props_nstr" + return + end select + + ! + ! Spectral discretization + ! + if(.not. clouds%bands_are_equal(clouds_sampled)) then + error_msg = "draw_samples: by-band and sampled cloud properties spectral structure is different" + return + end if + + ! + ! Array extents + ! + ncol = clouds%get_ncol() + nlay = clouds%get_nlay() + nbnd = clouds%get_nband() + ngpt = clouds_sampled%get_ngpt() + if (any([size(cloud_mask,1), size(cloud_mask,2), size(cloud_mask,3)] /= [ncol,nlay,ngpt])) then + error_msg = "draw_samples: cloud mask and cloud optical properties have different ncol and/or nlay" + return + end if + if (any([clouds_sampled%get_ncol(), clouds_sampled%get_nlay()] /= [ncol,nlay])) then + error_msg = "draw_samples: sampled/unsampled cloud optical properties have different ncol and/or nlay" + return + end if + ! ------------------------ + ! + ! Finally - sample fields according to the cloud mask + ! + ! Optical depth assignment works for 1scl, 2str (also nstr) + call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%tau,clouds_sampled%tau) + ! + ! For 2-stream + ! + select type(clouds) + type is (ty_optical_props_2str) + select type(clouds_sampled) + type is (ty_optical_props_2str) + call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%ssa,clouds_sampled%ssa) + call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%g, clouds_sampled%g ) + class default + error_msg = "draw_samples: by-band and sampled cloud properties need to be the same variable type" + end select + end select + end function draw_samples + ! ------------------------------------------------------------------------------------------------- + ! + ! Generate a McICA-sampled cloud mask for maximum-random overlap + ! + function sampled_mask_max_ran(randoms,cloud_frac,cloud_mask) result(error_msg) + real(wp), dimension(:,:,:), intent(in ) :: randoms !ngpt,nlay,ncol + real(wp), dimension(:,:), intent(in ) :: cloud_frac ! ncol,nlay + logical, dimension(:,:,:), intent(out) :: cloud_mask ! ncol,nlay,ngpt + character(len=128) :: error_msg + ! ------------------------ + integer :: ncol, nlay, ngpt, icol, ilay, igpt + integer :: cloud_lay_fst, cloud_lay_lst + real(wp), dimension(size(randoms,1)) :: local_rands + logical, dimension(size(randoms,2)) :: cloud_mask_layer + ! ------------------------ + ! + ! Error checking + ! + error_msg = "" + ncol = size(randoms, 3) + nlay = size(randoms, 2) + ngpt = size(randoms, 1) + if(any([ncol,nlay] /= [size(cloud_frac, 1),size(cloud_frac, 2)])) then + error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" + return + end if + if(any([ncol,nlay,ngpt] /= [size(cloud_mask, 1),size(cloud_mask, 2), size(cloud_mask,3)])) then + error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" + return + end if + if(any(cloud_frac > 1._wp) .or. any(cloud_frac < 0._wp)) then + error_msg = "sampled_mask_max_ran: cloud fraction values out of range [0,1]" + return + end if + ! + ! We chould check the random numbers but that would be computationally heavy + ! + ! ------------------------ + ! + ! Construct the cloud mask for each column + ! + do icol = 1, ncol + cloud_mask_layer(1:nlay) = cloud_frac(icol,1:nlay) > 0._wp + if(.not. any(cloud_mask_layer)) then + cloud_mask(icol,1:nlay,1:ngpt) = .false. + cycle + end if + cloud_lay_fst = findloc(cloud_mask_layer, .true., dim=1) + cloud_lay_lst = findloc(cloud_mask_layer, .true., dim=1, back = .true.) + cloud_mask(icol,1:cloud_lay_fst,1:ngpt) = .false. + + ilay = cloud_lay_fst + local_rands(1:ngpt) = randoms(1:ngpt,cloud_lay_fst,icol) + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + do ilay = cloud_lay_fst+1, cloud_lay_lst + if(cloud_mask_layer(ilay)) then + ! + ! Max-random overlap: + ! new random deviates if the adjacent layer isn't cloudy + ! same random deviates if the adjacent layer is cloudy + ! + if(.not. cloud_mask_layer(ilay-1)) local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + else + cloud_mask(icol,ilay,1:ngpt) = .false. + end if + end do + + cloud_mask(icol,cloud_lay_lst+1:nlay, 1:ngpt) = .false. + end do + + end function sampled_mask_max_ran + ! ------------------------------------------------------------------------------------------------- + ! + ! Generate a McICA-sampled cloud mask for exponential-random overlap + ! The overlap parameter alpha is defined between pairs of layers + ! for layer i, alpha(i) describes the overlap betwen cloud_frac(i) and cloud_frac(i+1) + ! By skipping layers with 0 cloud fraction the code forces alpha(i) = 0 for cloud_frac(i) = 0. + ! + function sampled_mask_exp_ran(randoms,cloud_frac,overlap_param,cloud_mask) result(error_msg) + real(wp), dimension(:,:,:), intent(in ) :: randoms ! ngpt,nlay,ncol + real(wp), dimension(:,:), intent(in ) :: cloud_frac ! ncol,nlay + real(wp), dimension(:,:), intent(in ) :: overlap_param ! ncol,nlay-1 + logical, dimension(:,:,:), intent(out) :: cloud_mask ! ncol,nlay,ngpt + character(len=128) :: error_msg + ! ------------------------ + integer :: ncol, nlay, ngpt, icol, ilay, igpt + integer :: cloud_lay_fst, cloud_lay_lst + real(wp) :: rho ! correlation coefficient + real(wp), dimension(size(randoms,1)) :: local_rands + logical, dimension(size(randoms,2)) :: cloud_mask_layer + ! ------------------------ + ! + ! Error checking + ! + error_msg = "" + ncol = size(randoms, 3) + nlay = size(randoms, 2) + ngpt = size(randoms, 1) + if(any([ncol,nlay] /= [size(cloud_frac, 1),size(cloud_frac, 2)])) then + error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" + return + end if + if(any([ncol,nlay-1] /= [size(overlap_param, 1),size(overlap_param, 2)])) then + error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and overlap_param(ncol,nlay-1) are inconsistent" + return + end if + if(any([ncol,nlay,ngpt] /= [size(cloud_mask, 1),size(cloud_mask, 2), size(cloud_mask,3)])) then + error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" + return + end if + + if(any(cloud_frac > 1._wp) .or. any(cloud_frac < 0._wp)) then + error_msg = "sampled_mask_max_ran: cloud fraction values out of range [0,1]" + return + end if + if(any(overlap_param > 1._wp) .or. any(overlap_param < -1._wp)) then + error_msg = "sampled_mask_max_ran: overlap_param values out of range [-1,1]" + return + end if + ! + ! We chould check the random numbers but that would be computationally heavy + ! + ! ------------------------ + ! Construct the cloud mask for each column + ! + do icol = 1, ncol + cloud_mask_layer(1:nlay) = cloud_frac(icol,1:nlay) > 0._wp + if(.not. any(cloud_mask_layer)) then + cloud_mask(icol,1:nlay,1:ngpt) = .false. + cycle + end if + cloud_lay_fst = findloc(cloud_mask_layer, .true., dim=1) + cloud_lay_lst = findloc(cloud_mask_layer, .true., dim=1, back = .true.) + cloud_mask(icol,1:cloud_lay_fst,1:ngpt) = .false. + + ilay = cloud_lay_fst + local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + do ilay = cloud_lay_fst+1, cloud_lay_lst + if(cloud_mask_layer(ilay)) then + ! + ! Exponential-random overlap: + ! new random deviates if the adjacent layer isn't cloudy + ! correlated deviates if the adjacent layer is cloudy + ! + if(cloud_mask_layer(ilay-1)) then + ! + ! Create random deviates correlated between this layer and the previous layer + ! (have to remove mean value before enforcing correlation) + ! + rho = overlap_param(icol,ilay-1) + local_rands(1:ngpt) = rho*(local_rands(1:ngpt) -0.5_wp) + & + sqrt(1._wp-rho*rho)*(randoms(1:ngpt,ilay,icol)-0.5_wp) + 0.5_wp + else + local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) + end if + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + end if + end do + + cloud_mask(icol,cloud_lay_lst+1:nlay, 1:ngpt) = .false. + end do + + end function sampled_mask_exp_ran + ! ------------------------------------------------------------------------------------------------- + ! + ! Apply a true/false cloud mask to a homogeneous field + ! This could be a kernel + ! + subroutine apply_cloud_mask(ncol,nlay,nbnd,ngpt,band_lims_gpt,cloud_mask,input_field,sampled_field) + integer, intent(in ) :: ncol,nlay,nbnd,ngpt + integer, dimension(2,nbnd), intent(in ) :: band_lims_gpt + logical, dimension(ncol,nlay,ngpt), intent(in ) :: cloud_mask + real(wp), dimension(ncol,nlay,nbnd), intent(in ) :: input_field + real(wp), dimension(ncol,nlay,ngpt), intent(out) :: sampled_field + + integer :: icol,ilay,ibnd,igpt + + do ibnd = 1, nbnd + do igpt = band_lims_gpt(1,ibnd), band_lims_gpt(2,ibnd) + do ilay = 1, nlay + sampled_field(1:ncol,ilay,igpt) = merge(input_field(1:ncol,ilay,ibnd), 0._wp, cloud_mask(1:ncol,ilay,igpt)) + end do + end do + end do + end subroutine apply_cloud_mask +end module mo_cloud_sampling diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 0c839afb2..64d015ff6 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -38,7 +38,7 @@ end subroutine rrtmgp_sw_cloud_sampling_init !! \htmlinclude rrtmgp_sw_cloud_sampling.html !! subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & - icseed_sw, cld_frac, sw_gas_props, sw_optical_props_cloudsByBand, & + icseed_sw, cld_frac, overlap_param, sw_gas_props, sw_optical_props_cloudsByBand, & sw_optical_props_clouds, errmsg, errflg) ! Inputs @@ -58,6 +58,8 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! random numbers. when isubcsw /=2, it will not be used. real(kind_phys), dimension(ncol,nLev),intent(in) :: & cld_frac ! Total cloud fraction by layer + real(kind_phys), dimension(ncol,nLev), intent(in) :: & + overlap_param ! Overlap parameter type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: K-distribution data type(ty_optical_props_2str),intent(in) :: & @@ -72,7 +74,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd sw_optical_props_clouds ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) ! Local variables - integer :: iCol + integer :: iCol,iLay integer,dimension(ncol) :: ipseed_sw type(random_stat) :: rng_stat real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D @@ -110,12 +112,13 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd call random_number(rng1D,rng_stat) rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - + print*,'overlap_param: ',overlap_param ! Call McICA select case ( iovrsw ) - ! Maximumn-random - case(1) + case(1) ! Maximum-random call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + case(3) ! Exponential-random + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_exp_ran(rng3D,cld_frac,overlap_param(:,1:nLev-1),cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 3ad9073d5..eed1101b8 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -87,6 +87,15 @@ kind = kind_phys intent = in optional = F +[overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme From 23e967501acc99bbd27d8f3578b9c60a0746e695 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 8 May 2020 14:37:58 -0600 Subject: [PATCH 137/404] Found bug in SW (snow) cloud-optics. --- physics/rrtmg_sw_cloud_optics.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/physics/rrtmg_sw_cloud_optics.F90 b/physics/rrtmg_sw_cloud_optics.F90 index 7ff57039e..f576033d5 100644 --- a/physics/rrtmg_sw_cloud_optics.F90 +++ b/physics/rrtmg_sw_cloud_optics.F90 @@ -8,7 +8,9 @@ module mo_rrtmg_sw_cloud_optics integer,parameter :: & nBandsSW_RRTMG = 14 real(kind_phys),parameter :: & - a0r = 3.07e-3 + a0r = 3.07e-3, & + a0s = 0.0, &! + a1s = 1.5 ! real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & b0r = (/0.466, 0.437, 0.416, 0.391, 0.374, 0.352, 0.183, & 0.048, 0.012, 0.000, 0.000, 0.000, 0.000, 0.496/) @@ -2025,8 +2027,6 @@ module mo_rrtmg_sw_cloud_optics 9.727157e-03/), & ! shape = (/46,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(5) :: & abari = (/ 3.448e-03,3.448e-03,3.448e-03,3.448e-03,3.448e-03 /), & bbari = (/ 2.431e+00,2.431e+00,2.431e+00,2.431e+00,2.431e+00 /), & @@ -2116,7 +2116,7 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld ! ########################################################################### ! Snow optical depth (No band dependence) if (cld_swp(iCol,iLay) .gt. 0. .and. cld_ref_snow(iCol,iLay) .gt. 10._kind_phys) then - tau_snow = cld_swp(iCol,iLay) + tau_snow = cld_swp(iCol,iLay)*1.09087*(a0s + a1s/(1.0315*cld_ref_snow(iCol,iLay))) ! fu's formula else tau_snow = 0._kind_phys endif From bbf56bb0c530bab0a1171dd32cf6be98c5854149 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Sun, 10 May 2020 01:13:12 +0000 Subject: [PATCH 138/404] merged with ccpp-physics, updated some code, tested coupled model with nsst model --- physics/GFS_PBL_generic.F90 | 53 +++++++------- physics/GFS_debug.F90 | 10 +-- physics/GFS_surface_composites.F90 | 6 +- physics/module_nst_model.f90 | 2 +- physics/sfc_nst.f | 112 ++++++++++++++++------------- physics/tridi.f | 22 +++--- 6 files changed, 109 insertions(+), 96 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 6d15a2f60..35d581749 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -92,6 +92,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, implicit none + integer, parameter :: r8 = kind_phys integer, intent(in) :: im, levs, nvdiff, ntrac integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc integer, intent(in) :: ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef,ntchs, ntchm @@ -115,9 +116,11 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + real (kind=kind_phys), parameter :: zero = 0.0_r8, one=1.0_r8 + ! Parameters for canopy heat storage parametrization - real (kind=kind_phys), parameter :: z0min=0.2, z0max=1.0 - real (kind=kind_phys), parameter :: u10min=2.5, u10max=7.5 + real (kind=kind_phys), parameter :: z0min=0.2_r8, z0max=one + real (kind=kind_phys), parameter :: u10min=2.5_r8, u10max=7.5_r8 ! Local variables integer :: i, k, kk, k1, n @@ -283,20 +286,20 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, do i=1,im hflxq(i) = hflx(i) evapq(i) = evap(i) - hffac(i) = 1.0 - hefac(i) = 1.0 + hffac(i) = one + hefac(i) = one enddo if (lheatstrg) then do i=1,im - tem = 0.01 * zorl(i) ! change unit from cm to m + tem = 0.01_r8 * zorl(i) ! change unit from cm to m tem1 = (tem - z0min) / (z0max - z0min) - hffac(i) = z0fac * min(max(tem1, 0.0), 1.0) - tem = sqrt(u10m(i)**2+v10m(i)**2) + hffac(i) = z0fac * min(max(tem1, zero), one) + tem = sqrt(u10m(i)*u10m(i) + v10m(i)*v10m(i)) tem1 = (tem - u10min) / (u10max - u10min) - tem2 = 1.0 - min(max(tem1, 0.0), 1.0) + tem2 = one - min(max(tem1, zero), one) hffac(i) = tem2 * hffac(i) - hefac(i) = 1. + e0fac * hffac(i) - hffac(i) = 1. + hffac(i) + hefac(i) = one + e0fac * hffac(i) + hffac(i) = one + hffac(i) hflxq(i) = hflx(i) / hffac(i) evapq(i) = evap(i) / hefac(i) enddo @@ -339,6 +342,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, implicit none + integer, parameter :: r8 = kind_phys integer, intent(in) :: im, levs, nvdiff, ntrac, ntchs, ntchm integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef logical, intent(in) :: trans_aero @@ -364,14 +368,14 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! use assumed-shape arrays. Note that Intel 18 and GNU 6.2.0-8.1.0 tolerate explicit-shape arrays ! as long as these do not get used when not allocated. real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, dq3dt, dq3dt_ozone - real(kind=kind_phys), dimension(:), intent(inout) :: dusfc_cpl, dvsfc_cpl, dtsfc_cpl, dqsfc_cpl, dusfci_cpl, dvsfci_cpl, & + real(kind=kind_phys), dimension(:), intent(inout) :: dusfc_cpl, dvsfc_cpl, dtsfc_cpl, dqsfc_cpl, dusfci_cpl, dvsfci_cpl, & dtsfci_cpl, dqsfci_cpl, dusfc_diag, dvsfc_diag, dtsfc_diag, dqsfc_diag, dusfci_diag, dvsfci_diag, dtsfci_diag, dqsfci_diag logical, dimension(:),intent(in) :: wet, dry, icy real(kind=kind_phys), dimension(:), intent(out) :: ushfsfci real(kind=kind_phys), dimension(:,:), intent(inout) :: dkt_cpl - real(kind=kind_phys), dimension(:,:), intent(in) :: dkt + real(kind=kind_phys), dimension(:,:), intent(in) :: dkt ! From canopy heat storage - reduction factors in latent/sensible heat flux due to surface roughness real(kind=kind_phys), dimension(im), intent(in) :: hffac, hefac @@ -379,11 +383,10 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: zero = 0.0d0 - real(kind=kind_phys), parameter :: one = 1.0d0 + real(kind=kind_phys), parameter :: zero = 0.0_r8, one = 1.0_r8 real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue, same as in GFS_typedefs.F90 - real(kind=kind_phys), parameter :: epsln = 1.0d-10 ! same as in GFS_physics_driver.F90 - real(kind=kind_phys), parameter :: qmin = 1.0d-8 + real(kind=kind_phys), parameter :: epsln = 1.0e-10_r8 ! same as in GFS_physics_driver.F90 + real(kind=kind_phys), parameter :: qmin = 1.0e-8_r8 integer :: i, k, kk, k1, n real(kind=kind_phys) :: tem, rho @@ -438,12 +441,12 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! Ferrier-Aligo do k=1,levs do i=1,im - dqdt(i,k,ntqv) = dvdftra(i,k,1) - dqdt(i,k,ntcw) = dvdftra(i,k,2) - dqdt(i,k,ntiw) = dvdftra(i,k,3) - dqdt(i,k,ntrw) = dvdftra(i,k,4) + dqdt(i,k,ntqv) = dvdftra(i,k,1) + dqdt(i,k,ntcw) = dvdftra(i,k,2) + dqdt(i,k,ntiw) = dvdftra(i,k,3) + dqdt(i,k,ntrw) = dvdftra(i,k,4) dqdt(i,k,nqrimef) = dvdftra(i,k,5) - dqdt(i,k,ntoz) = dvdftra(i,k,6) + dqdt(i,k,ntoz) = dvdftra(i,k,6) enddo enddo @@ -592,14 +595,14 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, !-------------------------------------------------------lssav if loop ---------- if (lssav) then do i=1,im - dusfc_diag (i) = dusfc_diag(i) + dusfc1(i)*dtf - dvsfc_diag (i) = dvsfc_diag(i) + dvsfc1(i)*dtf - dtsfc_diag (i) = dtsfc_diag(i) + dtsfc1(i)*hffac(i)*dtf - dqsfc_diag (i) = dqsfc_diag(i) + dqsfc1(i)*hefac(i)*dtf + dusfc_diag (i) = dusfc_diag(i) + dusfc1(i) * dtf + dvsfc_diag (i) = dvsfc_diag(i) + dvsfc1(i) * dtf dusfci_diag(i) = dusfc1(i) dvsfci_diag(i) = dvsfc1(i) dtsfci_diag(i) = dtsfc1(i)*hffac(i) dqsfci_diag(i) = dqsfc1(i)*hefac(i) + dtsfc_diag (i) = dtsfc_diag(i) + dtsfci_diag(i) * dtf + dqsfc_diag (i) = dqsfc_diag(i) + dqsfci_diag(i) * dtf enddo if (ldiag3d) then diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 4b62f0f9f..ac4641a4b 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -402,9 +402,9 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Coupling%rain_cpl', Coupling%rain_cpl) call print_var(mpirank,omprank, blkno, 'Coupling%snow_cpl', Coupling%snow_cpl) end if - if (Model%cplwav2atm) then - call print_var(mpirank,omprank, blkno, 'Coupling%zorlwav_cpl' , Coupling%zorlwav_cpl ) - end if +! if (Model%cplwav2atm) then +! call print_var(mpirank,omprank, blkno, 'Coupling%zorlwav_cpl' , Coupling%zorlwav_cpl ) +! end if if (Model%cplflx) then call print_var(mpirank,omprank, blkno, 'Coupling%oro_cpl' , Coupling%oro_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%slmsk_cpl' , Coupling%slmsk_cpl ) @@ -416,8 +416,8 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Coupling%ulwsfcin_cpl', Coupling%ulwsfcin_cpl ) ! call print_var(mpirank,omprank, blkno, 'Coupling%tseain_cpl ', Coupling%tseain_cpl ) ! call print_var(mpirank,omprank, blkno, 'Coupling%tisfcin_cpl ', Coupling%tisfcin_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%ficein_cpl ', Coupling%ficein_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%hicein_cpl ', Coupling%hicein_cpl ) +! call print_var(mpirank,omprank, blkno, 'Coupling%ficein_cpl ', Coupling%ficein_cpl ) +! call print_var(mpirank,omprank, blkno, 'Coupling%hicein_cpl ', Coupling%hicein_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%hsnoin_cpl ', Coupling%hsnoin_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%dusfc_cpl ', Coupling%dusfc_cpl ) call print_var(mpirank,omprank, blkno, 'Coupling%dvsfc_cpl ', Coupling%dvsfc_cpl ) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 7ad60a473..3e2248652 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -453,7 +453,6 @@ subroutine GFS_surface_composites_post_run ( fh2(i) = fh2_ocn(i) !tsurf(i) = tsurf_ocn(i) tsfco(i) = tsfc_ocn(i) ! over lake (and ocean when uncoupled) - if( cplflx ) tsfcl(i) = tsfc_ocn(i) ! for restart repro comparisons cmm(i) = cmm_ocn(i) chh(i) = chh_ocn(i) gflx(i) = gflx_ocn(i) @@ -492,8 +491,6 @@ subroutine GFS_surface_composites_post_run ( evap(i) = evap_ice(i) hflx(i) = hflx_ice(i) qss(i) = qss_ice(i) - tsfc(i) = tsfc_ice(i) - tsfcl(i) = tsfc(i) if (.not. flag_cice(i)) then tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) elseif (wet(i)) then @@ -506,6 +503,7 @@ subroutine GFS_surface_composites_post_run ( stress(i) = txi * stress_ice(i) + txo * stress_ocn(i) qss(i) = txi * qss_ice(i) + txo * qss_ocn(i) ep1d(i) = txi * ep1d_ice(i) + txo * ep1d_ocn(i) + zorl(i) = txi * zorl_ice(i) + txo * zorl_ocn(i) else evap(i) = evap_ocn(i) hflx(i) = hflx_ocn(i) @@ -513,6 +511,7 @@ subroutine GFS_surface_composites_post_run ( stress(i) = stress_ocn(i) qss(i) = qss_ocn(i) ep1d(i) = ep1d_ocn(i) + zorl(i) = zorl_ocn(i) endif endif if (wet(i)) then @@ -520,6 +519,7 @@ subroutine GFS_surface_composites_post_run ( else tsfco(i) = tsfc(i) endif + tsfcl(i) = tsfc(i) endif zorll(i) = zorl_lnd(i) diff --git a/physics/module_nst_model.f90 b/physics/module_nst_model.f90 index 53bfb6be3..1e4d1a704 100644 --- a/physics/module_nst_model.f90 +++ b/physics/module_nst_model.f90 @@ -889,7 +889,7 @@ subroutine cool_skin(ustar_a,f_nsol,f_sol_0,evap,sss,alpha,beta,rho_w,rho_a,ts,q zcsq = z_c * z_c a_c = a2 + a3/zcsq - (a3/(a4*z_c)+a3/zcsq) * exp(-z_c/a4) - if ( hb > 0.0 ) then + if ( hb > 0.0 .and. zcsq > 0.0 .and. alpha > 0.0) then bc1 = zcsq * (q_ts+cc3*hl_ts) bc2 = zcsq * f_sol_0*a_c - 4.0*(cc1*tcw)**3*(hb/alpha)**0.25/(cc2**0.75*zcsq) zc_ts = bc1/bc2 diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 3d0507ad9..8c7343519 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -164,7 +164,7 @@ subroutine sfc_nst_run & ! ===================================================================== ! use machine , only : kind_phys use funcphys, only : fpvs - use date_def, only: idate + use date_def, only : idate use module_nst_water_prop, only: get_dtzm_point use module_nst_parameters, only : t0k,cp_w,omg_m,omg_sh, & & sigma_r,solar_time_6am,ri_c,z_w_max,delz,wd_max, & @@ -178,11 +178,14 @@ subroutine sfc_nst_run & & dtl_reset ! implicit none + + integer, parameter :: r8 = kind_phys ! ! --- constant parameters: - real (kind=kind_phys), parameter :: f24 = 24.0 ! hours/day - real (kind=kind_phys), parameter :: f1440 = 1440.0 ! minutes/day - real (kind=kind_phys), parameter :: czmin = 0.0001 ! cos(89.994) + real (kind=kind_phys), parameter :: f24 = 24.0_r8 ! hours/day + real (kind=kind_phys), parameter :: f1440 = 1440.0_r8 ! minutes/day + real (kind=kind_phys), parameter :: czmin = 0.0001_r8 ! cos(89.994) + real (kind=kind_phys), parameter :: zero = 0.0_r8, one = 1.0_r8 ! --- inputs: @@ -252,11 +255,11 @@ subroutine sfc_nst_run & errmsg = '' errflg = 0 - cpinv = 1.0/cp - hvapi = 1.0/hvap + cpinv = one/cp + hvapi = one/hvap elocp = hvap/cp - sss = 34.0 ! temporarily, when sea surface salinity data is not ready + sss = 34.0_r8 ! temporarily, when sea surface salinity data is not ready ! ! flag for open water and where the iteration is on ! @@ -297,21 +300,21 @@ subroutine sfc_nst_run & nswsfc(i) = sfcnsw(i) ! net solar radiation at the air-sea surface (positive downward) wndmag(i) = sqrt(u1(i)*u1(i) + v1(i)*v1(i)) - q0(i) = max(q1(i), 1.0e-8) + q0(i) = max(q1(i), 1.0e-8_r8) #ifdef GSD_SURFACE_FLUXES_BUGFIX theta1(i) = t1(i) / prslk1(i) ! potential temperature at the middle of lowest model layer #else theta1(i) = t1(i) * prslki(i) #endif - tv1(i) = t1(i) * (1.0 + rvrdm1*q0(i)) + tv1(i) = t1(i) * (one + rvrdm1*q0(i)) rho_a(i) = prsl1(i) / (rd*tv1(i)) qss(i) = fpvs(tsurf(i)) ! pa qss(i) = eps*qss(i) / (ps(i) + epsm1*qss(i)) ! pa ! - evap(i) = 0.0 - hflx(i) = 0.0 - gflux(i) = 0.0 - ep(i) = 0.0 + evap(i) = zero + hflx(i) = zero + gflux(i) = zero + ep(i) = zero ! --- ... rcp = rho cp ch v @@ -337,8 +340,8 @@ subroutine sfc_nst_run & ! run nst model: dtm + slm ! - zsea1 = 0.001*real(nstf_name4) - zsea2 = 0.001*real(nstf_name5) + zsea1 = 0.001_r8*real(nstf_name4) + zsea2 = 0.001_r8*real(nstf_name5) !> - Call module_nst_water_prop::density() to compute sea water density. !> - Call module_nst_water_prop::rhocoef() to compute thermal expansion @@ -350,20 +353,20 @@ subroutine sfc_nst_run & ulwflx(i) = sfcemis(i) * sbc * t12 * t12 alon = xlon(i)*rad2deg grav = grv(sinlat(i)) - soltim = mod(alon/15.0 + solhr, 24.0)*3600.0 + soltim = mod(alon/15.0_r8 + solhr, 24.0_r8)*3600.0_r8 call density(tsea,sss,rho_w) ! sea water density call rhocoef(tsea,sss,rho_w,alpha,beta) ! alpha & beta ! !> - Calculate sensible heat flux (\a qrain) due to rainfall. ! - le = (2.501-.00237*tsea)*1e6 - dwat = 2.11e-5*(t1(i)/t0k)**1.94 ! water vapor diffusivity - dtmp = (1.+3.309e-3*(t1(i)-t0k)-1.44e-6*(t1(i)-t0k)* - & (t1(i)-t0k))*0.02411/(rho_a(i)*cp) ! heat diffusivity + le = (2.501_r8-0.00237_r8*tsea)*1e6_r8 + dwat = 2.11e-5_r8*(t1(i)/t0k)**1.94_r8 ! water vapor diffusivity + dtmp = (one+3.309e-3_r8*(t1(i)-t0k)-1.44e-6_r8*(t1(i)-t0k) + & * (t1(i)-t0k))*0.02411_r8/(rho_a(i)*cp) ! heat diffusivity wetc = 622.0*le*qss(i)/(rd*t1(i)*t1(i)) - alfac = 1/(1+(wetc*le*dwat)/(cp*dtmp)) ! wet bulb factor - qrain(i) = (1000.*rain(i)/rho_w)*alfac*cp_w* - & (tsea-t1(i)+(1000.*qss(i)-1000.*q0(i))*le/cp) + alfac = one / (one + (wetc*le*dwat)/(cp*dtmp)) ! wet bulb factor + tem = (1.0e3_r8 * rain(i) / rho_w) * alfac * cp_w + qrain(i) = tem * (tsea-t1(i)+1.0e3_r8*(qss(i)-q0(i))*le/cp) !> - Calculate input non solar heat flux as upward = positive to models here @@ -379,10 +382,10 @@ subroutine sfc_nst_run & ! ! sensitivities of heat flux components to ts ! - rnl_ts = 4.0*sfcemis(i)*sbc*tsea*tsea*tsea ! d(rnl)/d(ts) + rnl_ts = 4.0_r8*sfcemis(i)*sbc*tsea*tsea*tsea ! d(rnl)/d(ts) hs_ts = rch(i) hl_ts = rch(i)*elocp*eps*hvap*qss(i)/(rd*t12) - rf_ts = (1000.*rain(i)/rho_w)*alfac*cp_w*(1.0+rch(i)*hl_ts) + rf_ts = tem * (one+rch(i)*hl_ts) q_ts = rnl_ts + hs_ts + hl_ts + omg_sh*rf_ts ! !> - Call cool_skin(), which is the sub-layer cooling parameterization @@ -393,7 +396,7 @@ subroutine sfc_nst_run & &, rho_w,rho_a(i),tsea,q_ts,hl_ts,grav,le &, dt_cool(i),z_c(i),c_0(i),c_d(i)) - tem = 1.0 / wndmag(i) + tem = one / wndmag(i) cosa = u1(i)*tem sina = v1(i)*tem taux = max(stress(i),tau_min)*cosa @@ -402,20 +405,20 @@ subroutine sfc_nst_run & ! ! Run DTM-1p system. ! - if ( (soltim > solar_time_6am .and. ifd(i) == 0.0) ) then + if ( (soltim > solar_time_6am .and. ifd(i) == zero) ) then else - ifd(i) = 1.0 + ifd(i) = one ! ! calculate fcl thickness with current forcing and previous time's profile ! ! if (lprnt .and. i == ipr) print *,' beg xz=',xz(i) !> - Call convdepth() to calculate depth for convective adjustments. - if ( f_nsol > 0.0 .and. xt(i) > 0.0 ) then + if ( f_nsol > zero .and. xt(i) > zero ) then call convdepth(kdt,timestep,nswsfc(i),f_nsol,sss,sep,rho_w &, alpha,beta,xt(i),xs(i),xz(i),d_conv(i)) else - d_conv(i) = 0.0 + d_conv(i) = zero endif ! if (lprnt .and. i == ipr) print *,' beg xz1=',xz(i) @@ -443,7 +446,7 @@ subroutine sfc_nst_run & ! if (lprnt .and. i == ipr) print *,' beg xz2=',xz(i) ! apply mda - if ( xt(i) > 0.0 ) then + if ( xt(i) > zero ) then !> - If \a dtl heat content \a xt > 0.0, call dtm_1p_mda() to apply !! minimum depth adjustment (mda). call dtm_1p_mda(xt(i),xtts(i),xz(i),xzts(i)) @@ -458,7 +461,7 @@ subroutine sfc_nst_run & endif ! apply fca - if ( d_conv(i) > 0.0 ) then + if ( d_conv(i) > zero ) then !> - If thickness of free convection layer > 0.0, call dtm_1p_fca() !! to apply free convection adjustment. !> - If \a dtl thickness >= module_nst_parameters::z_w_max(), call dtl_reset() @@ -483,7 +486,7 @@ subroutine sfc_nst_run & !> - Call cal_ttop() to calculate the diurnal warming amount at the top layer with !! thickness of \a dz. - if ( q_warm > 0.0 ) then + if ( q_warm > zero ) then call cal_ttop(kdt,timestep,q_warm,rho_w,dz, & xt(i),xz(i),ttop0) @@ -492,7 +495,7 @@ subroutine sfc_nst_run & ! &' f_nsol=',f_nsol,' rho_w=',rho_w,' dz=',dz,' xt=',xt(i), ! &' xz=',xz(i),' qrain=',qrain(i) - ttop = ((xt(i)+xt(i))/xz(i))*(1.0-dz/((xz(i)+xz(i)))) + ttop = ((xt(i)+xt(i))/xz(i))*(one-dz/((xz(i)+xz(i)))) ! if (lprnt .and. i == ipr) print *,' beg xz4a=',xz(i) ! &,' ttop=',ttop,' ttop0=',ttop0,' xt=',xt(i),' dz=',dz @@ -543,7 +546,7 @@ subroutine sfc_nst_run & ! endif ! if ( xt(i) > 0.0 ) then ! reset dtl at midnight and when solar zenith angle > 89.994 degree - if ( abs(soltim) < 2.0*timestep ) then + if ( abs(soltim) < 2.0_r8*timestep ) then call dtl_reset & (xt(i),xs(i),xu(i),xv(i),xz(i),xzts(i),xtts(i)) endif @@ -556,17 +559,17 @@ subroutine sfc_nst_run & !> - Call get_dtzm_point() to computes \a dtz and \a tsurf. call get_dtzm_point(xt(i),xz(i),dt_cool(i),z_c(i), & zsea1,zsea2,dtz) - tsurf(i) = max(271.2, tref(i) + dtz ) + tsurf(i) = max(271.2_r8, tref(i) + dtz ) ! if (lprnt .and. i == ipr) print *,' tsurf=',tsurf(i),' tref=', ! &tref(i),' xz=',xz(i),' dt_cool=',dt_cool(i) !> - Call cal_w() to calculate \a w_0 and \a w_d. - if ( xt(i) > 0.0 ) then + if ( xt(i) > zero ) then call cal_w(kdt,xz(i),xt(i),xzts(i),xtts(i),w_0(i),w_d(i)) else - w_0(i) = 0.0 - w_d(i) = 0.0 + w_0(i) = zero + w_d(i) = zero endif ! if ( xt(i) > 0.0 ) then @@ -634,7 +637,7 @@ subroutine sfc_nst_run & ! do i=1,im if ( flag(i) ) then - tem = 1.0 / rho_a(i) + tem = one / rho_a(i) hflx(i) = hflx(i) * tem * cpinv evap(i) = evap(i) * tem * hvapi endif @@ -682,6 +685,8 @@ subroutine sfc_nst_pre_run implicit none + integer, parameter :: r8 = kind_phys + ! --- inputs: integer, intent(in) :: im logical, dimension(im), intent(in) :: wet @@ -699,10 +704,10 @@ subroutine sfc_nst_pre_run ! --- locals integer :: i - real(kind=kind_phys), parameter :: zero = 0.0d0, - & one = 1.0d0, - & half = 0.5d0, - & omz1 = 10.0d0 + real(kind=kind_phys), parameter :: zero = 0.0_r8, + & one = 1.0_r8, + & half = 0.5_r8, + & omz1 = 10.0_r8 real(kind=kind_phys) :: tem1, tem2, dt_warm ! Initialize CCPP error handling variables @@ -725,7 +730,11 @@ subroutine sfc_nst_pre_run tem1 = half / omz1 do i=1,im if (wet(i) .and. oceanfrac(i) > zero) then - tem2 = one / xz(i) + if (abs(xz(i)) > zero) then + tem2 = one / xz(i) + else + tem2 = zero + endif dt_warm = (xt(i)+xt(i)) * tem2 if ( xz(i) > omz1) then tref(i) = tseal(i) - (one-half*omz1*tem2) * dt_warm & @@ -735,7 +744,7 @@ subroutine sfc_nst_pre_run & - z_c(i)*dt_cool(i))*tem1 endif tseal(i) = tref(i) + dt_warm - dt_cool(i) -! - (Sfcprop%oro(i)-Sfcprop%oro_uf(i))*rlapse +! - (Sfcprop%oro(i)-Sfcprop%oro_uf(i))*rlapse tsurf_ocn(i) = tseal(i) endif enddo @@ -787,6 +796,8 @@ subroutine sfc_nst_post_run & implicit none + integer, parameter :: r8 = kind_phys + ! --- inputs: integer, intent(in) :: im logical, dimension(im), intent(in) :: wet, icy @@ -827,12 +838,11 @@ subroutine sfc_nst_post_run & ! --- ... run nsst model ... --- - dtzm = 0.0 + dtzm = 0.0_r8 if (nstf_name1 > 1) then - zsea1 = 0.001*real(nstf_name4) - zsea2 = 0.001*real(nstf_name5) - call get_dtzm_2d (xt, xz, dt_cool, & - & z_c, wet, zsea1, zsea2, & + zsea1 = 0.001_r8*real(nstf_name4) + zsea2 = 0.001_r8*real(nstf_name5) + call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & & im, 1, dtzm) do i = 1, im ! if (wet(i) .and. .not.icy(i)) then diff --git a/physics/tridi.f b/physics/tridi.f index c8e77403b..0103b388f 100644 --- a/physics/tridi.f +++ b/physics/tridi.f @@ -41,21 +41,21 @@ subroutine tridi1(l,n,cl,cm,cu,r1,au,a1) return end subroutine tridi1 -c----------------------------------------------------------------------- +!----------------------------------------------------------------------- !>\ingroup satmedmf !>\ingroup satmedmfvdifq !> This subroutine .. subroutine tridi2(l,n,cl,cm,cu,r1,r2,au,a1,a2) -cc +! use machine , only : kind_phys implicit none integer, parameter :: one = 1.0_kind_phys integer k,n,l,i real(kind=kind_phys) fk -cc +! real(kind=kind_phys) cl(l,2:n),cm(l,n),cu(l,n-1),r1(l,n),r2(l,n), & & au(l,n-1),a1(l,n),a2(l,n) -c---------------------------------------------------------------------- +!---------------------------------------------------------------------- do i=1,l fk = one / cm(i,1) au(i,1) = fk*cu(i,1) @@ -81,29 +81,29 @@ subroutine tridi2(l,n,cl,cm,cu,r1,r2,au,a1,a2) a2(i,k) = a2(i,k)-au(i,k)*a2(i,k+1) enddo enddo -c----------------------------------------------------------------------- +!----------------------------------------------------------------------- return end subroutine tridi2 -c----------------------------------------------------------------------- +!----------------------------------------------------------------------- !>\ingroup satmedmf !>\ingroup satmedmfvdifq !> Routine to solve the tridiagonal system to calculate u- and !! v-momentum at \f$ t + \Delta t \f$; part of two-part process to !! calculate time tendencies due to vertical diffusion. subroutine tridin(l,n,nt,cl,cm,cu,r1,r2,au,a1,a2) -cc +! use machine , only : kind_phys implicit none integer, parameter :: one = 1.0_kind_phys integer is,k,kk,n,nt,l,i real(kind=kind_phys) fk(l) -cc +! real(kind=kind_phys) cl(l,2:n), cm(l,n), cu(l,n-1), & & r1(l,n), r2(l,n*nt), & & au(l,n-1), a1(l,n), a2(l,n*nt), & & fkk(l,2:n-1) -c----------------------------------------------------------------------- +!----------------------------------------------------------------------- do i=1,l fk(i) = one / cm(i,1) au(i,1) = fk(i)*cu(i,1) @@ -153,11 +153,11 @@ subroutine tridin(l,n,nt,cl,cm,cu,r1,r2,au,a1,a2) enddo enddo enddo -c----------------------------------------------------------------------- +!----------------------------------------------------------------------- return end subroutine tridin -c----------------------------------------------------------------------- +!----------------------------------------------------------------------- !>\ingroup satmedmf !>\ingroup satmedmfvdifq !! This subroutine solves tridiagonal problem for TKE. From 3cdcdaab7261ffb212e0c36b6eeff34880429cb4 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 11 May 2020 01:19:18 +0000 Subject: [PATCH 139/404] change 633.0 to 622.0_r8 --- physics/sfc_nst.f | 2 +- physics/sfc_ocean.F | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 8c7343519..857506686 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -363,7 +363,7 @@ subroutine sfc_nst_run & dwat = 2.11e-5_r8*(t1(i)/t0k)**1.94_r8 ! water vapor diffusivity dtmp = (one+3.309e-3_r8*(t1(i)-t0k)-1.44e-6_r8*(t1(i)-t0k) & * (t1(i)-t0k))*0.02411_r8/(rho_a(i)*cp) ! heat diffusivity - wetc = 622.0*le*qss(i)/(rd*t1(i)*t1(i)) + wetc = 622.0_r8*le*qss(i)/(rd*t1(i)*t1(i)) alfac = one / (one + (wetc*le*dwat)/(cp*dtmp)) ! wet bulb factor tem = (1.0e3_r8 * rain(i) / rho_w) * alfac * cp_w qrain(i) = tem * (tsea-t1(i)+1.0e3_r8*(qss(i)-q0(i))*le/cp) diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index d937ddf49..bdd7ea6b0 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -149,6 +149,7 @@ subroutine sfc_ocean_run & ep(i) = evap(i) qsurf(i) = qss + gflux(i) = zero endif enddo ! From e340e62c6c6186cc4e5384459ee23f8bd2da659a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 11 May 2020 07:32:57 -0600 Subject: [PATCH 140/404] physics/m_micro.F90: correct syntax for \htmlinclude statement --- physics/m_micro.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index c81348e43..8b2b4c99f 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -107,7 +107,7 @@ end subroutine m_micro_finalize !! grid-scale condensation and evaporation of cloud condensate. !! !> \section arg_table_m_micro_run Argument Table -!> \htmlinclude m_micro_run.html +!! \htmlinclude m_micro_run.html !! !>\section detail_m_micro_run MG m_micro_run Detailed Algorithm !> @{ From 156594cdd64ef18daf510f6745f676c25f9d37f4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 11 May 2020 10:24:04 -0600 Subject: [PATCH 141/404] Added in new overlap assumtion used in GFS_FV3_v16beta physics suite. --- physics/GFS_rrtmgp_pre.F90 | 2 +- physics/mo_cloud_sampling.F90 | 80 +++++++++++++-------------- physics/rrtmgp_lw_cloud_sampling.F90 | 16 ++++-- physics/rrtmgp_lw_cloud_sampling.meta | 9 +++ physics/rrtmgp_sw_cloud_sampling.F90 | 11 ++-- 5 files changed, 67 insertions(+), 51 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 374d1e2e5..eb2a5534c 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -425,7 +425,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, overlap_param(:,1) = 0._kind_phys do iCol=1,nCol do iLay=Model%levs,2,-1 - overlap_param(iCol,iLay) = exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) + overlap_param(iCol,iLay-1) = exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) enddo enddo diff --git a/physics/mo_cloud_sampling.F90 b/physics/mo_cloud_sampling.F90 index b814d461f..d2225a230 100644 --- a/physics/mo_cloud_sampling.F90 +++ b/physics/mo_cloud_sampling.F90 @@ -26,7 +26,7 @@ module mo_cloud_sampling ty_optical_props_nstr implicit none private - public :: draw_samples, sampled_mask_max_ran, sampled_mask_exp_ran + public :: draw_samples, sampled_mask_max_ran, sampled_mask_exp_dcorr contains ! ------------------------------------------------------------------------------------------------- ! @@ -192,13 +192,11 @@ function sampled_mask_max_ran(randoms,cloud_frac,cloud_mask) result(error_msg) end function sampled_mask_max_ran ! ------------------------------------------------------------------------------------------------- ! - ! Generate a McICA-sampled cloud mask for exponential-random overlap + ! Generate a McICA-sampled cloud mask for exponential-decorrelation overlap ! The overlap parameter alpha is defined between pairs of layers - ! for layer i, alpha(i) describes the overlap betwen cloud_frac(i) and cloud_frac(i+1) - ! By skipping layers with 0 cloud fraction the code forces alpha(i) = 0 for cloud_frac(i) = 0. ! - function sampled_mask_exp_ran(randoms,cloud_frac,overlap_param,cloud_mask) result(error_msg) - real(wp), dimension(:,:,:), intent(in ) :: randoms ! ngpt,nlay,ncol + function sampled_mask_exp_dcorr(randoms1,randoms2,cloud_frac,overlap_param,cloud_mask) result(error_msg) + real(wp), dimension(:,:,:), intent(in ) :: randoms1,randoms2 ! ngpt,nlay,ncol real(wp), dimension(:,:), intent(in ) :: cloud_frac ! ncol,nlay real(wp), dimension(:,:), intent(in ) :: overlap_param ! ncol,nlay-1 logical, dimension(:,:,:), intent(out) :: cloud_mask ! ncol,nlay,ngpt @@ -206,27 +204,25 @@ function sampled_mask_exp_ran(randoms,cloud_frac,overlap_param,cloud_mask) resul ! ------------------------ integer :: ncol, nlay, ngpt, icol, ilay, igpt integer :: cloud_lay_fst, cloud_lay_lst - real(wp) :: rho ! correlation coefficient - real(wp), dimension(size(randoms,1)) :: local_rands - logical, dimension(size(randoms,2)) :: cloud_mask_layer + logical, dimension(size(randoms1,2)) :: cloud_mask_layer ! ------------------------ ! ! Error checking ! error_msg = "" - ncol = size(randoms, 3) - nlay = size(randoms, 2) - ngpt = size(randoms, 1) + ncol = size(randoms1, 3) + nlay = size(randoms1, 2) + ngpt = size(randoms1, 1) if(any([ncol,nlay] /= [size(cloud_frac, 1),size(cloud_frac, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" + error_msg = "sampled_mask_max_ran: sizes of randoms1(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" return end if if(any([ncol,nlay-1] /= [size(overlap_param, 1),size(overlap_param, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and overlap_param(ncol,nlay-1) are inconsistent" + error_msg = "sampled_mask_max_ran: sizes of randoms1(ngpt,nlay,ncol) and overlap_param(ncol,nlay-1) are inconsistent" return end if if(any([ncol,nlay,ngpt] /= [size(cloud_mask, 1),size(cloud_mask, 2), size(cloud_mask,3)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" + error_msg = "sampled_mask_max_ran: sizes of randoms1(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" return end if @@ -238,51 +234,51 @@ function sampled_mask_exp_ran(randoms,cloud_frac,overlap_param,cloud_mask) resul error_msg = "sampled_mask_max_ran: overlap_param values out of range [-1,1]" return end if - ! - ! We chould check the random numbers but that would be computationally heavy - ! - ! ------------------------ - ! Construct the cloud mask for each column + ! do icol = 1, ncol + ! Column cloud-mask cloud_mask_layer(1:nlay) = cloud_frac(icol,1:nlay) > 0._wp + + ! Skip column if no clouds if(.not. any(cloud_mask_layer)) then cloud_mask(icol,1:nlay,1:ngpt) = .false. cycle end if + + ! Pull out indices for First/Last cloudy layers cloud_lay_fst = findloc(cloud_mask_layer, .true., dim=1) cloud_lay_lst = findloc(cloud_mask_layer, .true., dim=1, back = .true.) + + ! Set cloud-mask in layers above cloud to false cloud_mask(icol,1:cloud_lay_fst,1:ngpt) = .false. + ! Loop over cloudy-layers + ! + ! First layer + ! ilay = cloud_lay_fst - local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) - cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + cloud_mask(icol,ilay,1:ngpt) = randoms1(1:ngpt,iLay,iCol) > (1._wp - cloud_frac(iCol,iLay)) + ! + ! Subsequent-layers + ! do ilay = cloud_lay_fst+1, cloud_lay_lst - if(cloud_mask_layer(ilay)) then - ! - ! Exponential-random overlap: - ! new random deviates if the adjacent layer isn't cloudy - ! correlated deviates if the adjacent layer is cloudy - ! - if(cloud_mask_layer(ilay-1)) then - ! - ! Create random deviates correlated between this layer and the previous layer - ! (have to remove mean value before enforcing correlation) - ! - rho = overlap_param(icol,ilay-1) - local_rands(1:ngpt) = rho*(local_rands(1:ngpt) -0.5_wp) + & - sqrt(1._wp-rho*rho)*(randoms(1:ngpt,ilay,icol)-0.5_wp) + 0.5_wp - else - local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) - end if - cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) - end if + !if(cloud_mask_layer(ilay) .and. cloud_mask_layer(ilay-1)) then + where(randoms2(1:nGpt,iLay,iCol) .le. overlap_param(iCol,iLay)) + cloud_mask(iCol,iLay,1:nGpt) = randoms1(1:ngpt,iLay-1,iCol) > (1._wp - cloud_frac(iCol,iLay)) + elsewhere + cloud_mask(iCol,iLay,1:nGpt) = randoms1(1:ngpt,iLay,iCol) > (1._wp - cloud_frac(iCol,iLay)) + endwhere + !else + ! cloud_mask(iCol,iLay,1:nGpt) = .false. + !endif end do + ! Set cloud-mask in layer below clouds to false cloud_mask(icol,cloud_lay_lst+1:nlay, 1:ngpt) = .false. end do - end function sampled_mask_exp_ran + end function sampled_mask_exp_dcorr ! ------------------------------------------------------------------------------------------------- ! ! Apply a true/false cloud mask to a homogeneous field diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index e42336923..b95292d48 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -3,7 +3,7 @@ module rrtmgp_lw_cloud_sampling use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubclw, iovrlw use mo_optical_props, only: ty_optical_props_1scl - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use rrtmgp_aux, only: check_error_msg use netcdf @@ -38,7 +38,8 @@ end subroutine rrtmgp_lw_cloud_sampling_init !! \htmlinclude rrtmgp_lw_cloud_sampling_run.html !! subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, cld_frac,& - lw_gas_props, lw_optical_props_cloudsByBand, lw_optical_props_clouds, errmsg, errflg) + overlap_param, lw_gas_props, lw_optical_props_cloudsByBand, lw_optical_props_clouds, & + errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -54,6 +55,8 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! random numbers. when isubclw /=2, it will not be used. real(kind_phys), dimension(ncol,nLev),intent(in) :: & cld_frac ! Total cloud fraction by layer + real(kind_phys), dimension(ncol,nLev), intent(in) :: & + overlap_param ! Overlap parameter type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! RRTMGP DDT: K-distribution data type(ty_optical_props_1scl),intent(in) :: & @@ -71,7 +74,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, integer :: iCol integer,dimension(ncol) :: ipseed_lw type(random_stat) :: rng_stat - real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D + real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 real(kind_phys), dimension(lw_gas_props%get_ngpt()*nLev) :: rng1D logical, dimension(ncol,nLev,lw_gas_props%get_ngpt()) :: cldfracMCICA real(kind_phys), dimension(ncol,nLev) :: cld_frac_noSamp @@ -109,8 +112,13 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Call McICA select case ( iovrlw ) ! Maximumn-random - case(1) + case(1) ! Maximum-random overlap call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + case(3) ! Exponential decorrelation length overlap + ! Generate second RNG + call random_number(rng1D,rng_stat) + rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,overlap_param(:,1:nLev-1),cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 547c6177c..4267cab3e 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -71,6 +71,15 @@ kind = kind_phys intent = in optional = F +[overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 64d015ff6..48afb0303 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -3,7 +3,7 @@ module rrtmgp_sw_cloud_sampling use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubcsw, iovrsw use mo_optical_props, only: ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use rrtmgp_aux, only: check_error_msg use netcdf @@ -77,7 +77,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd integer :: iCol,iLay integer,dimension(ncol) :: ipseed_sw type(random_stat) :: rng_stat - real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D + real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng1D logical, dimension(ncol,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA real(kind_phys), dimension(ncol,nLev) :: cld_frac_noSamp @@ -112,13 +112,16 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd call random_number(rng1D,rng_stat) rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - print*,'overlap_param: ',overlap_param + ! Call McICA select case ( iovrsw ) case(1) ! Maximum-random call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) case(3) ! Exponential-random - call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_exp_ran(rng3D,cld_frac,overlap_param(:,1:nLev-1),cldfracMCICA)) + ! Generate second RNG + call random_number(rng1D,rng_stat) + rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,overlap_param(:,1:nLev-1),cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA From d3a81cd7b12bbf4bb89358911c762de3ca06fb7c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 11 May 2020 11:36:40 -0600 Subject: [PATCH 142/404] Added loop over second RNG call in overlap routine. --- physics/rrtmgp_lw_cloud_sampling.F90 | 7 +++++-- physics/rrtmgp_sw_cloud_sampling.F90 | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index b95292d48..efb383a5d 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -116,8 +116,11 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) case(3) ! Exponential decorrelation length overlap ! Generate second RNG - call random_number(rng1D,rng_stat) - rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + do iCol=1,ncol + call random_setseed(ipseed_lw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + enddo call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,overlap_param(:,1:nLev-1),cldfracMCICA)) end select diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 48afb0303..22718418a 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -119,8 +119,11 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) case(3) ! Exponential-random ! Generate second RNG - call random_number(rng1D,rng_stat) - rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + do iCol=1,ncol + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + enddo call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,overlap_param(:,1:nLev-1),cldfracMCICA)) end select From 0c438491004bdc476769d6e330f9fa4e04c12f2d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 11 May 2020 14:02:16 -0600 Subject: [PATCH 143/404] Added conditional statement to avoid divide by zero. --- physics/GFS_rrtmgp_pre.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index eb2a5534c..2c269f009 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -425,7 +425,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, overlap_param(:,1) = 0._kind_phys do iCol=1,nCol do iLay=Model%levs,2,-1 - overlap_param(iCol,iLay-1) = exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) + if (de_lgth(iCol) .gt. 0) overlap_param(iCol,iLay-1) = exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) enddo enddo From 8f1169b5cd4d19905bebf97fe665f3c1471ea487 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 11 May 2020 15:54:49 -0600 Subject: [PATCH 144/404] physics/gfdl_fv_sat_adj.F90: add compatibility check for six water species --- physics/gfdl_fv_sat_adj.F90 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/physics/gfdl_fv_sat_adj.F90 b/physics/gfdl_fv_sat_adj.F90 index f5c84cd99..025ee1c34 100644 --- a/physics/gfdl_fv_sat_adj.F90 +++ b/physics/gfdl_fv_sat_adj.F90 @@ -150,6 +150,12 @@ subroutine fv_sat_adj_init(do_sat_adj, kmp, nwat, ngas, rilist, cpilist, & return end if + if (.not.nwat==6) then + write(errmsg,'(a)') 'Logic error: fv_sat_adj requires six water species (nwat=6)' + errflg = 1 + return + end if + if (is_initialized) return ! generate es table (dt = 0.1 deg c) From dd70b5558d66952fffba9dc4c2b121198c8c078c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 11 May 2020 15:55:26 -0600 Subject: [PATCH 145/404] Add GitHub workflow for basic checks, add tool to check for ASCII encoding of Fortran source files and metadata files --- .github/workflows/basic_checks.yml | 33 ++++++++++++++++++++++++++++++ tools/check_encoding.py | 25 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/basic_checks.yml create mode 100755 tools/check_encoding.py diff --git a/.github/workflows/basic_checks.yml b/.github/workflows/basic_checks.yml new file mode 100644 index 000000000..219c53bf4 --- /dev/null +++ b/.github/workflows/basic_checks.yml @@ -0,0 +1,33 @@ +name: Basic checks for CCPP physics schemes + +on: [push, pull_request] + +jobs: + build: + + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Init submodules + run: git submodule update --init --recursive + #- name: Update packages + # run: | + # /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + # #brew install autoconf automake coreutils gcc@9 libtool mpich gnu-sed wget + # brew install automake coreutils mpich gnu-sed + - name: Check for ASCII encoding + run: ./tools/check_encoding.py + #run: | + #export CC=gcc-9 + #export FC=gfortran-9 + #export CXX=g++-9 + #mkdir build + #cd build + #cmake -DCMAKE_INSTALL_PREFIX=$PWD/../install .. 2>&1 | tee log.cmake + #make -j8 2>&1 | tee log.make + #cd .. + #ls -l install/bin/ESMF_Info + #ls -l install/bin/wgrib2 + #cat install/share/nceplibs-external.cmake.config diff --git a/tools/check_encoding.py b/tools/check_encoding.py new file mode 100755 index 000000000..cf4f568d4 --- /dev/null +++ b/tools/check_encoding.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +#import chardet +import os +import sys + + +SUFFICES = [ '.f', '.F', '.f90', '.F90', '.meta' ] + +for root, dirs, files in os.walk(os.getcwd()): + print root, dirs, files + for file in files: + suffix = os.path.splitext(file)[1] + print file, suffix + if suffix in SUFFICES: + with open(os.path.join(root, file)) as f: + contents = f.read() + try: + contents.decode('ascii') + except UnicodeDecodeError: + for line in contents.split('\n'): + try: + line.decode('ascii') + except UnicodeDecodeError: + raise Exception('Detected non-ascii characters in file {}, line: "{}"'.format(os.path.join(root, file), line)) From 91a0dd98b06c1acdb4d95fa74d7b7b3f939a26f4 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 11 May 2020 17:05:51 -0600 Subject: [PATCH 146/404] Fix non-ascii encoding in a bunch of files (all comments) --- physics/cires_ugwp.F90 | 4 ++-- physics/drag_suite.F90 | 8 ++++---- physics/gwdps.f | 8 ++++---- physics/micro_mg_utils.F90 | 2 +- physics/samfdeepcnv.f | 2 +- physics/ugwp_driver_v0.F | 15 ++++++++++++++- 6 files changed, 26 insertions(+), 13 deletions(-) diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index 504b24a77..07b235c72 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -6,8 +6,8 @@ !! "Unified": a) all GW effects due to both dissipation/breaking; b) identical GW solvers for all GW sources; c) ability to replace solvers. !! Unified Formalism: !! 1. GW Sources: Stochastic and physics based mechanisms for GW-excitations in the lower atmosphere, calibrated by the high-res analyses/forecasts, and observations (3 types of GW sources: orography, convection, fronts/jets). -!! 2. GW Propagation: Unified solver for “propagation, dissipation and breaking” excited from all type of GW sources. -!! 3. GW Effects: Unified representation of GW impacts on the ‘resolved’ flow for all sources (energy-balanced schemes for momentum, heat and mixing). +!! 2. GW Propagation: Unified solver for "propagation, dissipation and breaking" excited from all type of GW sources. +!! 3. GW Effects: Unified representation of GW impacts on the "resolved" flow for all sources (energy-balanced schemes for momentum, heat and mixing). !! https://www.weather.gov/media/sti/nggps/Presentations%202017/02%20NGGPS_VYUDIN_2017_.pdf module cires_ugwp diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 080bee156..0189785e3 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -90,7 +90,7 @@ end subroutine drag_suite_init !! the GWD scheme has the same physical basis as in Alpert (1987) with the addition !! of enhancement factors for the amplitude, G, and mountain shape details !! in G(Fr) to account for effects from the mountain blocking. A factor, -!! E m’, is an enhancement factor on the stress in the Alpert '87 scheme. +!! E m', is an enhancement factor on the stress in the Alpert '87 scheme. !! The E ranges from no enhancement to an upper limit of 3, E=E(OA)[1-3], !! and is a function of OA, the Orographic Asymmetry defined in KA (1995) as !! @@ -105,9 +105,9 @@ end subroutine drag_suite_init !! !! !! where Nx is the number of grid intervals for the large scale domain being -!! considered. So the term, E(OA)m’/ \f$ \Delta X \f$ in Kim's scheme represents -!! a multiplier on G shown in Alpert's eq (1), where m’ is the number of mountains -!! in a sub-grid scale box. Kim increased the complexity of m’ making it a +!! considered. So the term, E(OA)m'/ \f$ \Delta X \f$ in Kim's scheme represents +!! a multiplier on G shown in Alpert's eq (1), where m' is the number of mountains +!! in a sub-grid scale box. Kim increased the complexity of m' making it a !! function of the fractional area of the sub-grid mountain and the asymmetry !! and convexity statistics which are found from running a gravity wave !! model for a large number of cases: diff --git a/physics/gwdps.f b/physics/gwdps.f index 9454b967d..96ce0205b 100644 --- a/physics/gwdps.f +++ b/physics/gwdps.f @@ -87,7 +87,7 @@ end subroutine gwdps_init !! the GWD scheme has the same physical basis as in Alpert (1987) with the addition !! of enhancement factors for the amplitude, G, and mountain shape details !! in G(Fr) to account for effects from the mountain blocking. A factor, -!! E m’, is an enhancement factor on the stress in the Alpert '87 scheme. +!! E m', is an enhancement factor on the stress in the Alpert '87 scheme. !! The E ranges from no enhancement to an upper limit of 3, E=E(OA)[1-3], !! and is a function of OA, the Orographic Asymmetry defined in Kim and Arakawa (1995) !! \cite kim_and_arakawa_1995 as @@ -103,9 +103,9 @@ end subroutine gwdps_init !! \; (x_{j} \; - \; \bar{x} )^2}{N_{x}} } !!\f] !! where \f$N_{x}\f$ is the number of grid intervals for the large scale domain being -!! considered. So the term, E(OA)m’/ \f$ \Delta X \f$ in Kim's scheme represents -!! a multiplier on G shown in Alpert's eq (1), where m’ is the number of mountains -!! in a sub-grid scale box. Kim increased the complexity of m’ making it a +!! considered. So the term, E(OA)m'/ \f$ \Delta X \f$ in Kim's scheme represents +!! a multiplier on G shown in Alpert's eq (1), where m' is the number of mountains +!! in a sub-grid scale box. Kim increased the complexity of m' making it a !! function of the fractional area of the sub-grid mountain and the asymmetry !! and convexity statistics which are found from running a gravity wave !! model for a large number of cases: diff --git a/physics/micro_mg_utils.F90 b/physics/micro_mg_utils.F90 index 89dd7193e..74da36df4 100644 --- a/physics/micro_mg_utils.F90 +++ b/physics/micro_mg_utils.F90 @@ -2656,7 +2656,7 @@ end subroutine graupel_rime_splintering ! prdg(i) = epsg*(q(i)-qvi(i))/abi ! !! make sure not pushed into ice supersat/subsat -!! put this in main mg3 code…..check for it… +!! put this in main mg3 code ... check for it ... !! formula from reisner 2 scheme !! diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 8bffd0a42..03f5f05ef 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -63,7 +63,7 @@ end subroutine samfdeepcnv_finalize !! + 2) For the "dynamic control", using a reference cloud work function, estimate the change in cloud work function due to the large-scale dynamics. Following the quasi-equilibrium assumption, calculate the cloud base mass flux required to keep the large-scale convective destabilization in balance with the stabilization effect of the convection. !! -# For grid sizes smaller than the threshold value (currently 8 km): !! + 1) compute the cloud base mass flux using the cumulus updraft velocity averaged ove the whole cloud depth. -!! -# For scale awareness, the updraft fraction (sigma) is obtained as a function of cloud base entrainment. Then, the final cloud base mass flux is obtained by the original mass flux multiplied by the (1−sigma) 2 . +!! -# For scale awareness, the updraft fraction (sigma) is obtained as a function of cloud base entrainment. Then, the final cloud base mass flux is obtained by the original mass flux multiplied by the (1-sigma) 2. !! -# For the "feedback control", calculate updated values of the state variables by multiplying the cloud base mass flux and the tendencies calculated per unit cloud base mass flux from the static control. !! !! \section samfdeep_detailed GFS samfdeepcnv Detailed Algorithm diff --git a/physics/ugwp_driver_v0.F b/physics/ugwp_driver_v0.F index 6dd03534a..af19447dc 100644 --- a/physics/ugwp_driver_v0.F +++ b/physics/ugwp_driver_v0.F @@ -264,7 +264,20 @@ end subroutine cires_ugwp_driver_v0 !===================================================================== !>\ingroup cires_ugwp_run !> @{ -!!Note for the sub-grid scale orography scheme in UGWP-v0: Due to degraded forecast scores of simulations with revised schemes for subgrid-scale orography effects in FV3GFS, EMC reinstalled the original gwdps-code with updated efficiency factors for the mountain blocking and OGW drag. The GFS OGW is described in the separate section (\ref GFS_GWDPS) and its “call” moved into UGWP-driver subroutine. This combination of NGW and OGW schemes was tested in the FV3GFS-L127 medium-range forecasts (15-30 days) for C96, C192, C384 and C768 resolutions and work in progress to introduce the optimal choice for the scale-aware representations of the efficiency factors that will reflect the better simulations of GW activity by FV3 dynamical core at higher horizontal resolutions. With the MERRA-2 VMF function for NGWs (\ref slat_geos5_tamp) and operational OGW drag scheme (\ref GFS_GWDPS), FV3GFS simulations can successfully forecast the recent major mid-winter sudden stratospheric warming (SSW) events of 2018-02-12 and 2018-12-31 (10-14 days before the SSW onset; Yudin et al. 2019 \cite yudin_et_al_2019). The first multi-year (2015-2018) FV3GFS simulations with UGWP-v0 also produce the equatorial QBO-like oscillations in the zonal wind and temperature anomalies. +!! Note for the sub-grid scale orography scheme in UGWP-v0: Due to degraded forecast +!! scores of simulations with revised schemes for subgrid-scale orography effects in FV3GFS, +!! EMC reinstalled the original gwdps-code with updated efficiency factors for the mountain +!! blocking and OGW drag. The GFS OGW is described in the separate section (\ref GFS_GWDPS) +!! and its "call" moved into UGWP-driver subroutine. This combination of NGW and OGW schemes +!! was tested in the FV3GFS-L127 medium-range forecasts (15-30 days) for C96, C192, C384 and +!! C768 resolutions and work in progress to introduce the optimal choice for the scale-aware +!! representations of the efficiency factors that will reflect the better simulations of GW +!! activity by FV3 dynamical core at higher horizontal resolutions. With the MERRA-2 VMF +!! function for NGWs (\ref slat_geos5_tamp) and operational OGW drag scheme (\ref GFS_GWDPS), +!! FV3GFS simulations can successfully forecast the recent major mid-winter sudden stratospheric +!! warming (SSW) events of 2018-02-12 and 2018-12-31 (10-14 days before the SSW onset; +!! Yudin et al. 2019 \cite yudin_et_al_2019). The first multi-year (2015-2018) FV3GFS simulations +!! with UGWP-v0 also produce the equatorial QBO-like oscillations in the zonal wind and temperature anomalies. !! SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, & Pdvdt, Pdudt, Pdtdt, Pkdis, U1,V1,T1,Q1,KPBL, From 2fb92e8974de81754a712e8fca599c79dbaf3469 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 12 May 2020 07:22:44 -0600 Subject: [PATCH 147/404] Remove comments from .github/workflows/basic_checks.yml --- .github/workflows/basic_checks.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/basic_checks.yml b/.github/workflows/basic_checks.yml index 219c53bf4..4e40790b5 100644 --- a/.github/workflows/basic_checks.yml +++ b/.github/workflows/basic_checks.yml @@ -19,15 +19,3 @@ jobs: # brew install automake coreutils mpich gnu-sed - name: Check for ASCII encoding run: ./tools/check_encoding.py - #run: | - #export CC=gcc-9 - #export FC=gfortran-9 - #export CXX=g++-9 - #mkdir build - #cd build - #cmake -DCMAKE_INSTALL_PREFIX=$PWD/../install .. 2>&1 | tee log.cmake - #make -j8 2>&1 | tee log.make - #cd .. - #ls -l install/bin/ESMF_Info - #ls -l install/bin/wgrib2 - #cat install/share/nceplibs-external.cmake.config From 4f738694f3c462995ed72390aa932aba773e2a76 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 12 May 2020 07:39:48 -0600 Subject: [PATCH 148/404] Remove debug print statements from tools/check_encoding.py --- tools/check_encoding.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/check_encoding.py b/tools/check_encoding.py index cf4f568d4..1d24d4679 100755 --- a/tools/check_encoding.py +++ b/tools/check_encoding.py @@ -8,10 +8,10 @@ SUFFICES = [ '.f', '.F', '.f90', '.F90', '.meta' ] for root, dirs, files in os.walk(os.getcwd()): - print root, dirs, files + #print root, dirs, files for file in files: suffix = os.path.splitext(file)[1] - print file, suffix + #print file, suffix if suffix in SUFFICES: with open(os.path.join(root, file)) as f: contents = f.read() From bbc6f3356afc33b504811049848af986d07263d9 Mon Sep 17 00:00:00 2001 From: Hannah C Barnes <38660891+hannahcbarnes@users.noreply.github.com> Date: Wed, 13 May 2020 07:26:11 -0600 Subject: [PATCH 149/404] Number concentration bug and code clean up in GFS_suite_interstitial_4 (#26) Correction for a bug in the number concentration update in GFS_suite_interstitial_4, and removal of some variables that are no longer used in the code. --- physics/GFS_suite_interstitial.F90 | 8 ++++---- physics/GFS_suite_interstitial.meta | 16 ---------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index db3966cee..e4026a75d 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -632,7 +632,7 @@ end subroutine GFS_suite_interstitial_4_finalize subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_total, ntrac, ntcw, ntiw, ntclamt, & ntrw, ntsw, ntrnc, ntsnc, ntgl, ntgnc, ntlnc, ntinc, nn, imp_physics, imp_physics_gfdl, imp_physics_thompson, & imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, dtf, save_qc, save_qi, con_pi, & - gq0, clw, prsl, save_tcp, con_rd, nwfa, spechum, dqdti, imfdeepcnv, imfdeepcnv_gf, errmsg, errflg) + gq0, clw, prsl, save_tcp, con_rd, nwfa, spechum, dqdti, errmsg, errflg) use machine, only: kind_phys use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber @@ -643,7 +643,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to integer, intent(in) :: im, levs, tracers_total, ntrac, ntcw, ntiw, ntclamt, ntrw, & ntsw, ntrnc, ntsnc, ntgl, ntgnc, ntlnc, ntinc, nn, imp_physics, imp_physics_gfdl, imp_physics_thompson, & - imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, imfdeepcnv, imfdeepcnv_gf + imp_physics_zhao_carr, imp_physics_zhao_carr_pdf logical, intent(in) :: ltaerosol, cplchm @@ -725,7 +725,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to qv_mp(i,k) = spechum(i,k)/(1.0_kind_phys-spechum(i,k)) if (ntlnc>0) then !> - Convert moist mixing ratio to dry mixing ratio - qc_mp(i,k) = save_qc(i,k)/(1.0_kind_phys-spechum(i,k)) + qc_mp(i,k) = (clw(i,k,2)-save_qc(i,k))/(1.0_kind_phys-spechum(i,k)) !> - Convert number concentration from moist to dry nc_mp(i,k) = gq0(i,k,ntlnc)/(1.0_kind_phys-spechum(i,k)) nc_mp(i,k) = nc_mp(i,k) + max(0.0, make_DropletNumber(qc_mp(i,k) * rho_dryair(i,k), nwfa(i,k)) * (1.0/rho_dryair(i,k))) @@ -734,7 +734,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to endif if (ntinc>0) then !> - Convert moist mixing ratio to dry mixing ratio - qi_mp(i,k) = save_qi(i,k)/(1.0_kind_phys-spechum(i,k)) + qi_mp(i,k) = (clw(i,k,1)-save_qi(i,k))/(1.0_kind_phys-spechum(i,k)) !> - Convert number concentration from moist to dry ni_mp(i,k) = gq0(i,k,ntinc)/(1.0_kind_phys-spechum(i,k)) ni_mp(i,k) = ni_mp(i,k) + max(0.0, make_IceNumber(qi_mp(i,k) * rho_dryair(i,k), save_tcp(i,k)) * (1.0/rho_dryair(i,k))) diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index c48f93c68..27af68a90 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1764,22 +1764,6 @@ kind = kind_phys intent = inout optional = F -[imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme - long_name = flag for mass-flux deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imfdeepcnv_gf] - standard_name = flag_for_gf_deep_convection_scheme - long_name = flag for Grell-Freitas deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 4233a040a54159e129549afe964cb035057481c9 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 13 May 2020 14:13:57 -0600 Subject: [PATCH 150/404] addition of HWRF Noah LSM and GFDL surface layer; for HWRF Noah LSM 1) edit CMakeLists.txt to remove inoperative set_source_file_properties statement 2) edit GFS_surface_generic.F90 to handle ivegsrc=3,4,5 3) edit sfc_drv.f, sfc_drv_ruc.F90, sfc_noahmp_drv.F to check for valid ivegsrc, isot 4) add Noah working routines module_sf_noahlsm.F90 and module_sf_noahlsm_glacial_only.F90 5) add CCPP-compliant sfc_noah_wrfv4 scheme and associated interstitials; for GFDL surface layer 1) add module_sf_exchcoef.f90 for internal subroutines and 2) gfdl_sfc_layer as CCPP-compliant GFDL surface layer scheme --- CMakeLists.txt | 26 - physics/GFS_surface_generic.F90 | 8 +- physics/gfdl_sfc_layer.F90 | 1779 ++++++++ physics/gfdl_sfc_layer.meta | 801 ++++ physics/module_sf_exchcoef.f90 | 733 +++ physics/module_sf_noahlsm.F90 | 4773 ++++++++++++++++++++ physics/module_sf_noahlsm_glacial_only.F90 | 1285 ++++++ physics/sfc_drv.f | 15 +- physics/sfc_drv_ruc.F90 | 11 + physics/sfc_noah_wrfv4.F90 | 261 ++ physics/sfc_noah_wrfv4.meta | 764 ++++ physics/sfc_noah_wrfv4_interstitial.F90 | 758 ++++ physics/sfc_noah_wrfv4_interstitial.meta | 1098 +++++ physics/sfc_noahmp_drv.f | 13 + 14 files changed, 12296 insertions(+), 29 deletions(-) create mode 100644 physics/gfdl_sfc_layer.F90 create mode 100644 physics/gfdl_sfc_layer.meta create mode 100755 physics/module_sf_exchcoef.f90 create mode 100644 physics/module_sf_noahlsm.F90 create mode 100644 physics/module_sf_noahlsm_glacial_only.F90 create mode 100644 physics/sfc_noah_wrfv4.F90 create mode 100644 physics/sfc_noah_wrfv4.meta create mode 100644 physics/sfc_noah_wrfv4_interstitial.F90 create mode 100644 physics/sfc_noah_wrfv4_interstitial.meta diff --git a/CMakeLists.txt b/CMakeLists.txt index b8d3c3e18..e3560f502 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,32 +174,6 @@ if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") # Adjust settings for bit-for-bit reproducibility of NEMSfv3gfs if (PROJECT STREQUAL "CCPP-FV3") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_bfmicrophysics.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sflx.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sfc_diff.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/sfc_diag.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_nst_model.f90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/calpreciptype.f90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/mersenne_twister.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_nst_water_prop.f90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/aer_cloud.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/wv_saturation.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/cldwat2m_micro.F - ${CMAKE_CURRENT_SOURCE_DIR}/physics/surface_perturbation.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f - ${CMAKE_CURRENT_SOURCE_DIR}/physics/cu_gf_deep.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/cu_gf_sh.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_bl_mynn.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNPBL_wrapper.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNSFC_wrapper.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNrad_pre.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNrad_post.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_mp_thompson_make_number_concentrations.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_SF_JSFC.F90 - ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90 - PROPERTIES COMPILE_FLAGS "-r8 -ftz") - # Replace -xHost or -xCORE-AVX2 with -xCORE-AVX-I for certain files set(CMAKE_Fortran_FLAGS_LOPT1 ${CMAKE_Fortran_FLAGS_OPT}) string(REPLACE "-xHOST" "-xCORE-AVX-I" diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index ac366ae54..d6f751cc7 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -148,10 +148,14 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, else soiltyp(i) = 9 endif - if (ivegsrc == 1) then + if (ivegsrc == 0 .or. ivegsrc == 4) then + vegtype(i) = 24 + elseif (ivegsrc == 1) then vegtype(i) = 15 - elseif(ivegsrc == 2) then + elseif (ivegsrc == 2) then vegtype(i) = 13 + elseif (ivegsrc == 3 .or. ivegsrc == 5) then + vegtype(i) = 15 endif slopetyp(i) = 9 else diff --git a/physics/gfdl_sfc_layer.F90 b/physics/gfdl_sfc_layer.F90 new file mode 100644 index 000000000..edd3f0c30 --- /dev/null +++ b/physics/gfdl_sfc_layer.F90 @@ -0,0 +1,1779 @@ +!> \file gfdl_sfc_layer.f +!! This file contains ... + +!> This module contains the CCPP-compliant GFDL surface layer scheme. + module gfdl_sfc_layer + + use machine , only : kind_phys + + implicit none + + public :: gfdl_sfc_layer_init, gfdl_sfc_layer_run, gfdl_sfc_layer_finalize + + private + + contains + +!> \section arg_table_gfdl_sfc_layer_init Argument Table +!! \htmlinclude gfdl_sfc_layer_init.html +!! + subroutine gfdl_sfc_layer_init (icoef_sf, cplwav, cplwav2atm, lcurr_sf, & + pert_cd, ntsflg, errmsg, errflg) + + implicit none + + integer, intent(in) :: icoef_sf, ntsflg + logical, intent(in) :: cplwav, cplwav2atm, lcurr_sf, pert_cd + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + +#if HWRF==1 + write(errmsg,'(*(a))') 'The GFDL surface layer scheme does not support '& + //'use of the HWRF preprocessor flag in gfdl_sfc_layer.F90' + errflg = 1 + return +#endif + + if (icoef_sf < 0 .or. icoef_sf > 8) then + write(errmsg,'(*(a))') 'The value of icoef_sf is outside of the ' & + //'supported range (0-8) in gfdl_sfc_layer.F90' + errflg = 1 + return + end if + + if (cplwav .or. cplwav2atm) then + write(errmsg,'(*(a))') 'The GFDL surface layer scheme is not set up ' & + //'to be coupled to waves in gfdl_sfc_layer.F90' + errflg = 1 + return + end if + + if (lcurr_sf) then + write(errmsg,'(*(a))') 'The GFDL surface layer scheme is not set up ' & + //'to be used with the lcurr_sf option in gfdl_sfc_layer.F90' + errflg = 1 + return + end if + + if (pert_cd) then + write(errmsg,'(*(a))') 'The GFDL surface layer scheme is not set up ' & + //'to be used with the pert_cd option in gfdl_sfc_layer.F90' + errflg = 1 + return + end if + + if (ntsflg > 0) then + !GJF: In order to enable ntsflg > 0, the variable 'tstrc' passed into MFLUX2 should be set + ! to the surface_skin_temperature_over_X_interstitial rather than the average of it and + ! surface_skin_temperature_after_iteration_over_X + write(errmsg,'(*(a))') 'Setting ntsflg > 0 is currently not supported'& + //' in gfdl_sfc_layer.F90' + errflg = 1 + return + end if + + !GJF: Initialization notes: In WRF, the subroutine module_sf_myjsfc/myjsfcinit + ! is called for initialization of the GFDL surface layer scheme from + ! the module_physics_init subroutine. It contains the following + ! initializations which should already have been done by other + ! code in UFS-related host models: + ! IF(.NOT.RESTART)THEN + ! DO J=JTS,JTE + ! DO I=ITS,ITF + ! USTAR(I,J)=0.1 + ! ENDDO + ! ENDDO + ! ENDIF + !also initialize surface roughness length + + end subroutine gfdl_sfc_layer_init + + subroutine gfdl_sfc_layer_finalize () + end subroutine gfdl_sfc_layer_finalize + +!> \section arg_table_gfdl_sfc_layer_run Argument Table +!! \htmlinclude gfdl_sfc_layer_run.html +!! + subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & + lsm_noah, lsm_noahmp, lsm_ruc, lsm_noah_wrfv4, icoef_sf, cplwav, & + cplwav2atm, lcurr_sf, pert_Cd, ntsflg, sfenth, z1, shdmax, ivegsrc, & + vegtype, sigmaf, dt, wet, dry, icy, isltyp, rd, grav, ep1, ep2, smois, & + psfc, prsl1, q1, t1, u1, v1, u10, v10, gsw, glw, tsurf_ocn, tsurf_lnd, & + tsurf_ice, tskin_ocn, tskin_lnd, tskin_ice, ustar_ocn, ustar_lnd, & + ustar_ice, znt_ocn, znt_lnd, znt_ice, cdm_ocn, cdm_lnd, cdm_ice, & + stress_ocn, stress_lnd, stress_ice, rib_ocn, rib_lnd, rib_ice, fm_ocn, & + fm_lnd, fm_ice, fh_ocn, fh_lnd, fh_ice, fh2_ocn, fh2_lnd, fh2_ice, & + ch_ocn, ch_lnd, ch_ice, fm10_ocn, fm10_lnd, fm10_ice, qss_ocn, qss_lnd, & + qss_ice, errmsg, errflg) + + use funcphys, only: fpvs + + !#### GJF: temporarily grab parameters from LSM-specific modules -- should go through CCPP #### + ! (fixing this involves replacing the functionality of set_soilveg and namelist_soilveg) + use namelist_soilveg, only: maxsmc_noah => maxsmc, drysmc_noah => drysmc + use namelist_soilveg_ruc, only: maxsmc_ruc => maxsmc, drysmc_ruc => drysmc + use noahmp_tables, only: maxsmc_noahmp => smcmax_table, drysmc_noahmp => smcdry_table + use module_sf_noahlsm, only: maxsmc_noah_wrfv4 => maxsmc, drysmc_noah_wrfv4 => drysmc + !################################################################################################ + + implicit none + + integer, intent(in) :: im, nsoil, km, ivegsrc + integer, intent(in) :: lsm, lsm_noah, lsm_noahmp, & + lsm_ruc, lsm_noah_wrfv4, icoef_sf,& + ntsflg + logical, intent(in) :: cplwav, cplwav2atm !GJF: this scheme has not been tested with these on + logical, intent(in) :: lcurr_sf !GJF: this scheme has not been tested with this option turned on; the variables scurx and scury need to be input in order to use this + logical, intent(in) :: pert_Cd !GJF: this scheme has not been tested with this option turned on; the variables ens_random_seed and ens_Cdamp need to be input in order to use this + logical, dimension(im), intent(in) :: flag_iter, wet, dry, icy + integer, dimension(im), intent(in) :: isltyp, vegtype + real(kind=kind_phys), intent(in) :: dt, sfenth + real(kind=kind_phys), intent(in) :: rd,grav,ep1,ep2 + real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smois + real(kind=kind_phys), dimension(im), intent(in) :: psfc, prsl1, & + q1, t1, u1, v1, u10, v10, gsw, glw, z1, shdmax, sigmaf, xlat, xlon, & + tsurf_ocn, tsurf_lnd, tsurf_ice + + real(kind=kind_phys), intent(inout), dimension(im) :: tskin_ocn, & + tskin_lnd, tskin_ice, ustar_ocn, ustar_lnd, ustar_ice, & + znt_ocn, znt_lnd, znt_ice, cdm_ocn, cdm_lnd, cdm_ice, & + stress_ocn, stress_lnd, stress_ice, rib_ocn, rib_lnd, rib_ice, & + fm_ocn, fm_lnd, fm_ice, fh_ocn, fh_lnd, fh_ice, fh2_ocn, fh2_lnd, & + fh2_ice, ch_ocn, ch_lnd, ch_ice, fm10_ocn, fm10_lnd, fm10_ice, & + qss_ocn, qss_lnd, qss_ice + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + !local variables + + integer :: i, its, ite, ims, ime + + !GJF: the vonKarman constant should come in through the CCPP and be defined by the host model + real (kind=kind_phys), parameter :: karman = 0.4 + real (kind=kind_phys), parameter :: log01=log(0.01), log05=log(0.05), & + log07=log(0.07) + + !GJF: if the following variables will be used, they should be turned into intent(in) namelist options + integer :: iwavecpl, ens_random_seed, issflx + logical :: diag_wind10m, diag_qss + real(kind=kind_phys) :: ens_Cdamp + + real(kind=kind_phys), dimension(im) :: wetc, pspc, pkmax, tstrc, upc, & + vpc, mznt, slwdc, wspd, wind10, qfx, qgh, zkmax, z1_cm, z0max, ztmax + real(kind=kind_phys), dimension(im) :: u10_lnd, u10_ocn, u10_ice, & + v10_lnd, v10_ocn, v10_ice + + !GJF: the following variables are identified as: + !"SCURX" "Surface Currents(X)" "m s-1" + !"SCURY" "Surface Currents(Y)" "m s-1 + !"CHARN" "Charnock Coeff" " " + !"MSANG" "Wind/Stress Angle" "Radian" + real(kind=kind_phys), dimension(im) :: charn, msang, scurx, scury + + real(kind=kind_phys), dimension(im) :: fxh, fxe, fxmx, fxmy, xxfh, & + xxfh2, tzot + real(kind=kind_phys), dimension(1:30) :: maxsmc, drysmc + real(kind=kind_phys) :: smcmax, smcdry, zhalf, cd10, & + esat, fm_lnd_old, fh_lnd_old, tem1, tem2, czilc, cdlimit + + !#### This block will become unnecessary when maxsmc and drysmc come through the CCPP #### + if (lsm == lsm_noah) then + maxsmc = maxsmc_noah + drysmc = drysmc_noah + else if (lsm == lsm_noahmp) then + maxsmc = maxsmc_noahmp + drysmc = drysmc_noahmp + else if (lsm == lsm_ruc) then + maxsmc = maxsmc_ruc + drysmc = drysmc_ruc + else if (lsm == lsm_noah_wrfv4) then + maxsmc = maxsmc_noah_wrfv4 + drysmc = drysmc_noah_wrfv4 + else + !GJF: These data were from the original GFDL surface layer scheme, but + ! rather than being hard-coded here, they should be shared with the + ! LSM. These data are kept for legacy purposes. Note that these only + ! have nonzero values for 16 soil types vs 19 for other STAS datasets + data maxsmc/0.339, 0.421, 0.434, 0.476, 0.476, 0.439, & + 0.404, 0.464, 0.465, 0.406, 0.468, 0.468, & + 0.439, 1.000, 0.200, 0.421, 0.000, 0.000, & + 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, & + 0.000, 0.000, 0.000, 0.000, 0.000, 0.000/ + data drysmc/0.010, 0.028, 0.047, 0.084, 0.084, 0.066, & + 0.067, 0.120, 0.103, 0.100, 0.126, 0.138, & + 0.066, 0.000, 0.006, 0.028, 0.000, 0.000, & + 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, & + 0.000, 0.000, 0.000, 0.000, 0.000, 0.000/ + end if + !######################################################################## + + !GJF: This code has not been tested with iwavecpl = 1; the variables 'charn' and 'msang' (and others?) need to be input in order to use this + ! if (cplwav .or. cplwav2atm) then + ! iwavecpl = 1 + ! else + ! iwavecpl = 0 + ! end if + iwavecpl = 0 + + !GJF: temporary setting of variables that should be moved to namelist is they are used + ens_random_seed = 0 !used for HWRF ensemble? + ens_Cdamp = 0.0 !used for HWRF ensemble? + + issflx = 0 !GJF: 1 = calculate surface fluxes, 0 = don't + diag_wind10m = .false. !GJF: if one wants 10m wind speeds to come from this scheme, set this to True, + ! put [u,v]10_[lnd/ocn/ice] in the scheme argument list (and metadata), and modify + ! GFS_surface_compsites to receive the individual components and calculate an all-grid value + diag_qss = .false. !GJF: saturation specific humidities are calculated by LSM, sea surface, and sea ice schemes in + ! GFS-based suites + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + its = 1 + ims = 1 + ite = im + ime = im + + do i=its, ite + if (flag_iter(i)) then + !GJF: Perform data preparation that is the same for all surface types + + pspc(i) = psfc(i)*10. ! convert from Pa to cgs + pkmax(i) = prsl1(i)*10. ! convert from Pa to cgs + + upc(i) = u1(i)*100. ! convert from m s-1 to cm s-1 + vpc(i) = v1(i)*100. ! convert from m s-1 to cm s-1 + + !GJF: wind speed at the lowest model layer is calculated in a scheme prior to this (if this scheme + ! is part of a GFS-based suite), but it is recalculated here because this one DOES NOT include + ! a convective wind enhancement component (convective gustiness factor) to follow the original + ! GFDL surface layer scheme; this may not be necessary + wspd(i) = sqrt(u1(i)*u1(i) + v1(i)*v1(i)) + wspd(i) = amax1(wspd(i),1.0) !wspd is in m s-1 + + !Wang: use previous u10 v10 to compute wind10, input to MFLUX2 to compute z0 (for first time step, u10 and v10 may be zero) + wind10(i)=sqrt(u10(i)*u10(i)+v10(i)*v10(i)) !m s-1 + + !Wang: calulate height of the first half level + ! if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then + ! zhalf = -rd*t1(i)*alog(pkmax(i)/pspc(i))/grav !m + ! endif + + !GJF: rather than calculate the height of the first half level, if it is precalculated + ! in a different scheme, pass it in and use it; note that in FV3, calculating via the hypsometric equation + ! occasionally produced values much shallower than those passed in + !zkmax(i) = -rd*t1(i)*alog(pkmax(i)/pspc(i))/grav !m + zkmax(i) = z1(i) + z1_cm(i) = 100.0*z1(i) + + !GJF: this drag coefficient lower limit was suggested by Chunxi Zhang via his module_sf_sfclayrev.f90 + cdlimit = 1.0e-5/zkmax(i) + + !slwdc... GFDL downward net flux in units of cal/(cm**2/min) + !also divide by 10**4 to convert from /m**2 to /cm**2 + slwdc(i)=gsw(i)+glw(i) + slwdc(i)=0.239*60.*slwdc(i)*1.e-4 + + !GJF: these variables should be passed in if these options are used + charn(i) = 0.0 !used with wave coupling (iwavecpl == 1) + msang(i) = 0.0 !used with wave coupling (iwavecpl == 1) + scurx(i) = 0.0 !used with ocean currents? (lcurr_sf == T) + scury(i) = 0.0 !used with ocean currents? (lcurr_sf == T) + + if (diag_qss) then + esat = fpvs(t1(i)) + qgh(i) = ep2*esat/(psfc(i)-esat) + end if + + !GJF: these vars are not needed in a GFS-based suite + !rho1(i)=prsl1(i)/(rd*t1(i)*(1.+ep1*q1(i))) + !cpm(i)=cp*(1.+0.8*q1(i)) + + !GJF: perform data preparation that depends on surface types and call the mflux2 subroutine for each surface type + ! Note that this is different than the original WRF module_sf_gfdl.F where mflux2 is called once for all surface + ! types, with negative roughness lengths denoting open ocean. + if (dry(i)) then + !GJF: from WRF's module_sf_gfdl.F + smcdry=drysmc(isltyp(i)) + smcmax=maxsmc(isltyp(i)) + wetc(i)=(smois(i,1)-smcdry)/(smcmax-smcdry) + wetc(i)=amin1(1.,amax1(wetc(i),0.)) + + !GJF: the lower boundary temperature passed in to MFLUX2 either follows GFS: + tstrc(i) = 0.5*(tskin_lnd(i) + tsurf_lnd(i)) !averaging tskin_lnd and tsurf_lnd as in GFS surface layer breaks ntsflg functionality + !GJF: or WRF module_sf_gfdl.F: + !tstrc(i) = tskin_lnd(i) + + !GJF: Roughness Length Limitation section + ! The WRF version of module_sf_gfdl.F has no checks on the roughness lengths prior to entering MFLUX2. + ! The following limits were placed on roughness lengths from the GFS surface layer scheme at the suggestion + ! of Chunxi Zhang. Using the GFDL surface layer without such checks can lead to instability in the UFS. + + !znt_lnd is in cm, z0max/ztmax are in m at this point + z0max(i) = max(1.0e-6, min(0.01 * znt_lnd(i), zkmax(i))) + + tem1 = 1.0 - shdmax(i) + tem2 = tem1 * tem1 + tem1 = 1.0 - tem2 + + if( ivegsrc == 1 ) then + if (vegtype(i) == 10) then + z0max(i) = exp( tem2*log01 + tem1*log07 ) + elseif (vegtype(i) == 6) then + z0max(i) = exp( tem2*log01 + tem1*log05 ) + elseif (vegtype(i) == 7) then + ! z0max(i) = exp( tem2*log01 + tem1*log01 ) + z0max(i) = 0.01 + elseif (vegtype(i) == 16) then + ! z0max(i) = exp( tem2*log01 + tem1*log01 ) + z0max(i) = 0.01 + else + z0max(i) = exp( tem2*log01 + tem1*log(z0max(i)) ) + endif + elseif (ivegsrc == 2 ) then + if (vegtype(i) == 7) then + z0max(i) = exp( tem2*log01 + tem1*log07 ) + elseif (vegtype(i) == 8) then + z0max(i) = exp( tem2*log01 + tem1*log05 ) + elseif (vegtype(i) == 9) then + ! z0max(i) = exp( tem2*log01 + tem1*log01 ) + z0max(i) = 0.01 + elseif (vegtype(i) == 11) then + ! z0max(i) = exp( tem2*log01 + tem1*log01 ) + z0max(i) = 0.01 + else + z0max(i) = exp( tem2*log01 + tem1*log(z0max(i)) ) + endif + endif + + z0max(i) = max(z0max(i), 1.0e-6) + + ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil + czilc = 0.8 + + tem1 = 1.0 - sigmaf(i) + ztmax(i) = z0max(i)*exp( - tem1*tem1 & + & * czilc*karman*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) + ztmax(i) = max(ztmax(i), 1.0e-6) + + !GJF: from WRF's module_sf_gfdl.F + if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then + !GJF: why not use wspd(i) to save compute? + wind10(i)=sqrt(u1(i)*u1(i)+v1(i)*v1(i))*alog(10.0/z0max(i))/alog(z1(i)/z0max(i)) !m s-1 + end if + wind10(i)=wind10(i)*100.0 !convert from m/s to cm/s + + ztmax(i) = ztmax(i)*100.0 !convert from m to cm + z0max(i) = z0max(i)*100.0 !convert from m to cm + + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_lnd(i), rib_lnd(i), & + xxfh(i), ztmax(i), z0max(i), tstrc(i), & + pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & + dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & + errflg) + if (errflg /= 0) return + + !GJF: this is broken when tstrc is set to an average of two variables + if (ntsflg==1) then + tskin_lnd(i) = tstrc(i) ! gopal's doing + end if + + if (diag_wind10m) then + u10_lnd(i) = u1(i)*(0.01*wind10(i)/wspd(i)) + v10_lnd(i) = v1(i)*(0.01*wind10(i)/wspd(i)) + end if + + !GJF: these variables are not needed in a GFS-based suite, but are found in WRF's module_sf_gfdl.F and kept in comments for legacy + !gz1oz0(i) = alog(zkmax(i)/(0.01*znt_lnd(i))) + !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling + !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling + + fm_lnd(i) = karman/sqrt(cdm_lnd(i)) + fh_lnd(i) = karman*xxfh(i) + + !GJF: Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih + !psim_lnd(i)=gz1oz0(i)-fm_lnd(i) + !psih_lnd(i)=gz1oz0(i)-fh_lnd(i) + + fh2_lnd(i) = karman*xxfh2(i) + ch_lnd(i) = karman*karman/(fm_lnd(i) * fh_lnd(i)) + + !GJF: these bounds on drag coefficients are from Chunxi Zhang's module_sf_sfclayrev.f90 + cdm_lnd(i) = max(cdm_lnd(i), cdlimit) + cdm_lnd(i) = min(cdm_lnd(i), 0.1) + ch_lnd(i) = max(ch_lnd(i), cdlimit) + ch_lnd(i) = min(ch_lnd(i), 0.1) + !GJF: this bound is from WRF's module_sf_gfdl.F (I'm not sure if both are needed or which is more restrictive.) + ch_lnd(i) = min(ch_lnd(i), 0.05/wspd(i)) + + !GJF: from WRF's module_sf_gfdl.F + ustar_lnd(i) = 0.01*sqrt(cdm_lnd(i)* & + (upc(i)*upc(i) + vpc(i)*vpc(i))) + !GJF: from Chunxi Zhang's module_sf_sfclayrev.f90 (I'm not sure it's necessary.) + ustar_lnd(i) = amax1(ustar_lnd(i),0.001) + + stress_lnd(i) = cdm_lnd(i)*wspd(i)*wspd(i) + + !GJF: from WRF's module_sf_gfdl.F + ! convert cd, ch to values at 10m, for output + cd10 = cdm_lnd(i) + if ( wind10(i) .ge. 0.1 ) then + cd10=cdm_lnd(i)* (wspd(i)/(0.01*wind10(i)) )**2 + !tmp9=0.01*abs(tzot(i)) + !ch_out(i)=ch_lnd(i)*(wspd(i)/(0.01*wind10(i)) ) * & + ! (alog(zkmax(i)/tmp9)/alog(10.0/tmp9)) + end if + fm10_lnd(i) = karman/sqrt(cd10) + + !GJF: conductances aren't used in other CCPP schemes, but this limit + ! might be able to replace the limits on drag coefficients above + + !chs_lnd(i)=ch_lnd(i)*wspd (i) !conductance + !chs2_lnd(i)=ustar_lnd(i)*karman/fh2_lnd(i) !2m conductance + + !!!2014-0922 cap CHS over land points + ! chs_lnd(i)=amin1(chs_lnd(i), 0.05) + ! chs2_lnd(i)=amin1(chs2_lnd(i), 0.05) + ! if (chs2_lnd(i) < 0) chs2_lnd(i)=1.0e-6 + + if (diag_qss) then + esat = fpvs(tskin_lnd(i)) + qss_lnd(i) = ep2*esat/(psfc(i)-esat) + end if + + !GJF: not used in CCPP + !flhc_lnd(i)=cpm(i)*rho1(i)*chs_lnd(i) + !flqc_lnd(i)=rho1(i)*chs_lnd(i) + !cqs2_lnd(i)=chs2_lnd(i) + end if !dry + + if (icy(i)) then + !GJF: from WRF's module_sf_gfdl.F + smcdry=drysmc(isltyp(i)) + smcmax=maxsmc(isltyp(i)) + wetc(i)=(smois(i,1)-smcdry)/(smcmax-smcdry) + wetc(i)=amin1(1.,amax1(wetc(i),0.)) + + + !GJF: the lower boundary temperature passed in to MFLUX2 either follows GFS: + tstrc(i) = 0.5*(tskin_ice(i) + tsurf_ice(i)) !averaging tskin_ice and tsurf_ice as in GFS surface layer breaks ntsflg functionality + !GJF: or WRF module_sf_gfdl.F: + !tstrc(i) = tskin_ice(i) + !averaging tskin_ice and tsurf_ice as in GFS surface layer breaks ntsflg functionality + + !GJF: Roughness Length Limitation section + ! The WRF version of module_sf_gfdl.F has no checks on the roughness lengths prior to entering MFLUX2. + ! The following limits were placed on roughness lengths from the GFS surface layer scheme at the suggestion + ! of Chunxi Zhang. Using the GFDL surface layer without such checks can lead to instability in the UFS. + + !znt_ice is in cm, z0max/ztmax are in m at this point + z0max(i) = max(1.0e-6, min(0.01 * znt_ice(i), zkmax(i))) + !** xubin's new z0 over land and sea ice + tem1 = 1.0 - shdmax(i) + tem2 = tem1 * tem1 + tem1 = 1.0 - tem2 + + if( ivegsrc == 1 ) then + z0max(i) = exp( tem2*log01 + tem1*log(z0max(i)) ) + elseif (ivegsrc == 2 ) then + z0max(i) = exp( tem2*log01 + tem1*log(z0max(i)) ) + endif + + z0max(i) = max(z0max(i), 1.0e-6) + + ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height + ! dependance of czil + czilc = 0.8 + + tem1 = 1.0 - sigmaf(i) + ztmax(i) = z0max(i)*exp( - tem1*tem1 & + & * czilc*karman*sqrt(ustar_ice(i)*(0.01/1.5e-05))) + ztmax(i) = max(ztmax(i), 1.0e-6) + + + !GJF: from WRF's module_sf_gfdl.F + if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then + !GJF: why not use wspd(i) to save compute? + wind10(i)=sqrt(u1(i)*u1(i)+v1(i)*v1(i))*alog(10.0/z0max(i))/alog(z1(i)/z0max(i)) + end if + wind10(i)=wind10(i)*100.0 !! m/s to cm/s + + ztmax(i) = ztmax(i)*100.0 !m to cm + z0max(i) = z0max(i)*100.0 !m to cm + + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ice(i), rib_ice(i), & + xxfh(i), ztmax(i), z0max(i), tstrc(i), & + pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & + dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & + errflg) + if (errflg /= 0) return + + !GJF: this is broken when tstrc is set to an average of two variables + if (ntsflg==1) then + tskin_ice(i) = tstrc(i) ! gopal's doing + end if + + if (diag_wind10m) then + u10_ice(i) = u1(i)*(0.01*wind10(i)/wspd(i)) + v10_ice(i) = v1(i)*(0.01*wind10(i)/wspd(i)) + end if + + !GJF: these variables are not needed in a GFS-based suite, but are found in WRF's module_sf_gfdl.F and kept in comments for legacy + !gz1oz0(i) = alog(zkmax(i)/znt_ice(i)) + !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling + !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling + + fm_ice(i) = karman/sqrt(cdm_ice(i)) + fh_ice(i) = karman*xxfh(i) + + !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih + !psim_ice(i)=gz1oz0(i)-fm_ice(i) + !psih_ice(i)=gz1oz0(i)-fh_ice(i) + + fh2_ice(i) = karman*xxfh2(i) + ch_ice(i) = karman*karman/(fm_ice(i) * fh_ice(i)) + + !GJF: these bounds on drag coefficients are from Chunxi Zhang's module_sf_sfclayrev.f90 + cdm_ice(i) = max(cdm_ice(i), cdlimit) + cdm_ice(i) = min(cdm_ice(i), 0.1) + ch_ice(i) = max(ch_ice(i), cdlimit) + ch_ice(i) = min(ch_ice(i), 0.1) + !GJF: this bound is from WRF's module_sf_gfdl.F (I'm not sure if both are needed or which is more restrictive.) + ch_ice(i) = min(ch_ice(i), 0.05/wspd(i)) + + ustar_ice(i) = 0.01*sqrt(cdm_ice(i)* & + (upc(i)*upc(i) + vpc(i)*vpc(i))) + !GJF: from Chunxi Zhang's module_sf_sfclayrev.f90 (I'm not sure it's necessary.) + ustar_ice(i) = amax1(ustar_ice(i),0.001) + + stress_ice(i) = cdm_ice(i)*wspd(i)*wspd(i) + + !GJF: from WRF's module_sf_gfdl.F + !!! convert cd, ch to values at 10m, for output + cd10 = cdm_ice(i) + if ( wind10(i) .ge. 0.1 ) then + cd10=cdm_ice(i)* (wspd(i)/(0.01*wind10(i)) )**2 + !tmp9=0.01*abs(tzot(i)) + !ch_out(i)=ch_ice(i)*(wspd(i)/(0.01*wind10(i)) ) * & + ! (alog(zkmax(i)/tmp9)/alog(10.0/tmp9)) + end if + fm10_ice(i) = karman/sqrt(cd10) + + !GJF: conductances aren't used in other CCPP schemes + !chs_ice(i)=ch_ice(i)*wspd (i) !conductance + !chs2_ice(i)=ustar_ice(i)*karman/fh2_ice(i) !2m conductance + + if (diag_qss) then + esat = fpvs(tskin_ice(i)) + qss_ice(i) = ep2*esat/(psfc(i)-esat) + end if + + !flhc_ice(i)=cpm(i)*rho1(i)*chs_ice(i) + !flqc_ice(i)=rho1(i)*chs_ice(i) + !cqs2_ice(i)=chs2_ice(i) + end if !ice + + if (wet(i)) then + wetc(i) = 1.0 + + !GJF: the lower boundary temperature passed in to MFLUX2 either follows GFS: + tstrc(i) = 0.5*(tskin_ocn(i) + tsurf_ocn(i)) !averaging tskin_ocn and tsurf_ocn as in GFS surface layer breaks ntsflg functionality + !GJF: or WRF module_sf_gfdl.F: + !tstrc(i) = tskin_ocn(i) + + !GJF: from WRF's module_sf_gfdl.F + if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then + wind10(i)=sqrt(u1(i)*u1(i)+v1(i)*v1(i))*alog(10.0/(0.01*znt_ocn(i)))/alog(z1(i)/(0.01*znt_ocn(i))) + end if + wind10(i)=wind10(i)*100.0 !! m/s to cm/s + + !GJF: mflux2 expects negative roughness length for ocean points + znt_ocn(i) = -znt_ocn(i) + + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ocn(i), rib_ocn(i), & + xxfh(i), znt_ocn(i), mznt(i), tstrc(i), & + pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & + scurx(i), scury(i), pert_Cd, ens_random_seed, ens_Cdamp, upc(i), vpc(i), t1(i), q1(i), & + dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & + errflg) + if (errflg /= 0) return + + !GJF: this is broken when tstrc is set to an average of two variables + if (ntsflg==1) then + tskin_ocn(i) = tstrc(i) ! gopal's doing + end if + + znt_ocn(i)= abs(znt_ocn(i)) + mznt(i)= abs(mznt(i)) + + !GJF: these bounds on ocean roughness lengths are from Chunxi Zhang's module_sf_sfclayrev.f90 (in cm) + znt_ocn(i)=min(2.85e-1,max(znt_ocn(i),1.27e-5)) + + if (diag_wind10m) then + u10_ocn(i) = u1(i)*(0.01*wind10(i)/wspd(i)) + v10_ocn(i) = v1(i)*(0.01*wind10(i)/wspd(i)) + end if + + !GJF: these variables are not needed in a GFS-based suite, but are found in WRF's module_sf_gfdl.F and kept in comments for legacy + !gz1oz0(i) = alog(zkmax(i)/znt_ocn(i)) + !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling + !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling + + fm_ocn(i) = karman/sqrt(cdm_ocn(i)) + fh_ocn(i) = karman*xxfh(i) + + !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih + !psim_ocn(i)=gz1oz0(i)-fm_ocn(i) + !psih_ocn(i)=gz1oz0(i)-fh_ocn(i) + + fh2_ocn(i) = karman*xxfh2(i) + ch_ocn(i) = karman*karman/(fm_ocn(i) * fh_ocn(i)) + + !GJF: these bounds on drag coefficients are from Chunxi Zhang's module_sf_sfclayrev.f90 + cdm_ocn(i) = max(cdm_ocn(i), cdlimit) + cdm_ocn(i) = min(cdm_ocn(i), 0.1) + ch_ocn(i) = max(ch_ocn(i), cdlimit) + ch_ocn(i) = min(ch_ocn(i), 0.1) + !GJF: this bound is from WRF's module_sf_gfdl.F (I'm not sure if both are needed or which is more restrictive.) + ch_ocn(i) = min(ch_ocn(i), 0.05/wspd(i)) + + ustar_ocn(i) = 0.01*sqrt(cdm_ocn(i)* & + (upc(i)*upc(i) + vpc(i)*vpc(i))) + !GJF: from Chunxi Zhang's module_sf_sfclayrev.f90 (I'm not sure it's necessary.) + ustar_ocn(i) = amax1(ustar_ocn(i),0.001) + + stress_ocn(i) = cdm_ocn(i)*wspd(i)*wspd(i) + + !GJF: from WRF's module_sf_gfdl.F + !!! convert cd, ch to values at 10m, for output + cd10 = cdm_ocn(i) + if ( wind10(i) .ge. 0.1 ) then + cd10=cdm_ocn(i)* (wspd(i)/(0.01*wind10(i)) )**2 + !tmp9=0.01*abs(tzot(i)) + !ch_out(i)=ch_ocn(i)*(wspd(i)/(0.01*wind10(i)) ) * & + ! (alog(zkmax(i)/tmp9)/alog(10.0/tmp9)) + end if + fm10_ocn(i) = karman/sqrt(cd10) + + !GJF: conductances aren't used in other CCPP schemes + !chs_ocn(i)=ch_ocn(i)*wspd (i) !conductance + !chs2_ocn(i)=ustar_ocn(i)*karman/fh2_ocn(i) !2m conductance + + if (diag_qss) then + esat = fpvs(tskin_ocn(i)) + qss_ocn(i) = ep2*esat/(psfc(i)-esat) + end if + end if !wet + + !flhc_ocn(i)=cpm(i)*rho1(i)*chs_ocn(i) + !flqc_ocn(i)=rho1(i)*chs_ocn(i) + !cqs2_ocn(i)=chs2_ocn(i) + end if !flag_iter + end do + + !GJF: this code has not been updated since GFS suites don't require this; one would need to have different values of hfx, qfx, lh for each surface type + ! if (isfflx.eq.0) then + ! do i=its,ite + ! hfx(i)=0. + ! lh(i)=0. + ! qfx(i)=0. + ! enddo + ! else + ! do i=its,ite + ! if(islmsk == 0) then + ! !water + ! hfx(i)= -10.*cp*fxh(i) + ! else if (islmsk == 1) then + ! hfx(i)= -10.*cp*fxh(i) + ! hfx(i)=amax1(hfx(i),-250.) + ! end if + ! qfx(j)=-10.*fxe(i) + ! qfx(i)=amax1(qfx(i),0.) + ! lh(i)=xlv*qfx(i) + ! enddo + ! endif + + + end subroutine gfdl_sfc_layer_run + +!--------------------------------- +!GJF (2020/04/21): The starting point for the MFLUX2 subroutine here was module_sf_gfdl.F in WRF + SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !mzoc KWON + pspc,pkmax,wetc,slwdc,z1, & + icoef_sf,iwavecpl,lcurr_sf,alpha,gamma,xcur,ycur, & + pert_Cd, ens_random_seed, ens_Cdamp, & + upc,vpc,tpc,rpc,dt,wind10,xxfh2,ntsflg,sfenth, & + tzot, errmsg, errflg) + +!------------------------------------------------------------------------ +! +! MFLUX2 computes surface fluxes of momentum, heat,and moisture +! using monin-obukhov. the roughness length "z0" is prescribed +! over land and over ocean "z0" is computed using charnocks formula. +! the universal functions (from similarity theory approach) are +! those of hicks. This is Bob's doing. +! +!------------------------------------------------------------------------ + + USE module_sf_exchcoef + IMPLICIT NONE + +!----------------------------------------------------------------------- +! user interface variables +!----------------------------------------------------------------------- + !GJF: This subroutine was converted to expect data from a single point instead of a horizontal array to accommodate a fractional landmask + !integer,intent(in) :: ims,ime + !integer,intent(in) :: its,ite + integer, parameter :: ims = 1 + integer, parameter :: ime = 1 + integer, parameter :: its = 1 + integer, parameter :: ite = 1 + integer,intent(in) :: ntsflg + integer,intent(in) :: icoef_sf + integer,intent(in) :: iwavecpl + logical,intent(in) :: lcurr_sf + logical,intent(in) :: pert_Cd + integer,intent(in) :: ens_random_seed + real(kind=kind_phys),intent(in) :: ens_Cdamp + + real(kind=kind_phys), intent (out), dimension (ims :ime ) :: fxh + real(kind=kind_phys), intent (out), dimension (ims :ime ) :: fxe + real(kind=kind_phys), intent (out), dimension (ims :ime ) :: fxmx + real(kind=kind_phys), intent (out), dimension (ims :ime ) :: fxmy + real(kind=kind_phys), intent (inout), dimension (ims :ime ) :: cdm +! real, intent (out), dimension (ims :ime ) :: cdm2 + real(kind=kind_phys), intent (out), dimension (ims :ime ) :: rib + real(kind=kind_phys), intent (out), dimension (ims :ime ) :: xxfh + real(kind=kind_phys), intent (out), dimension (ims :ime ) :: xxfh2 + real(kind=kind_phys), intent (out), dimension (ims :ime ) :: wind10 + + real(kind=kind_phys), intent ( inout), dimension (ims :ime ) :: zoc,mzoc !KWON + real(kind=kind_phys), intent ( inout), dimension (ims :ime ) :: tzot !WANG + real(kind=kind_phys), intent ( inout), dimension (ims :ime ) :: tstrc + + real(kind=kind_phys), intent ( in) :: dt + real(kind=kind_phys), intent ( in) :: sfenth + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: pspc + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: pkmax + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: wetc + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: slwdc + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: alpha, gamma + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: xcur, ycur + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: z1 + + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: upc + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: vpc + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: tpc + real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: rpc + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +!----------------------------------------------------------------------- +! internal variables +!----------------------------------------------------------------------- + + integer, parameter :: icntx = 30 + + integer, dimension(1 :ime) :: ifz + integer, dimension(1 :ime) :: indx + integer, dimension(1 :ime) :: istb + integer, dimension(1 :ime) :: it + integer, dimension(1 :ime) :: iutb + + real(kind=kind_phys), dimension(1 :ime) :: aap + real(kind=kind_phys), dimension(1 :ime) :: bq1 + real(kind=kind_phys), dimension(1 :ime) :: bq1p + real(kind=kind_phys), dimension(1 :ime) :: delsrad + real(kind=kind_phys), dimension(1 :ime) :: ecof + real(kind=kind_phys), dimension(1 :ime) :: ecofp + real(kind=kind_phys), dimension(1 :ime) :: estso + real(kind=kind_phys), dimension(1 :ime) :: estsop + real(kind=kind_phys), dimension(1 :ime) :: fmz1 + real(kind=kind_phys), dimension(1 :ime) :: fmz10 + real(kind=kind_phys), dimension(1 :ime) :: fmz2 + real(kind=kind_phys), dimension(1 :ime) :: fmzo1 + real(kind=kind_phys), dimension(1 :ime) :: foft + real(kind=kind_phys), dimension(1 :ime) :: foftm + real(kind=kind_phys), dimension(1 :ime) :: frac + real(kind=kind_phys), dimension(1 :ime) :: land + real(kind=kind_phys), dimension(1 :ime) :: pssp + real(kind=kind_phys), dimension(1 :ime) :: qf + real(kind=kind_phys), dimension(1 :ime) :: rdiff + real(kind=kind_phys), dimension(1 :ime) :: rho + real(kind=kind_phys), dimension(1 :ime) :: rkmaxp + real(kind=kind_phys), dimension(1 :ime) :: rstso + real(kind=kind_phys), dimension(1 :ime) :: rstsop + real(kind=kind_phys), dimension(1 :ime) :: sf10 + real(kind=kind_phys), dimension(1 :ime) :: sf2 + real(kind=kind_phys), dimension(1 :ime) :: sfm + real(kind=kind_phys), dimension(1 :ime) :: sfzo + real(kind=kind_phys), dimension(1 :ime) :: sgzm + real(kind=kind_phys), dimension(1 :ime) :: slwa + real(kind=kind_phys), dimension(1 :ime) :: szeta + real(kind=kind_phys), dimension(1 :ime) :: szetam + real(kind=kind_phys), dimension(1 :ime) :: t1 + real(kind=kind_phys), dimension(1 :ime) :: t2 + real(kind=kind_phys), dimension(1 :ime) :: tab1 + real(kind=kind_phys), dimension(1 :ime) :: tab2 + real(kind=kind_phys), dimension(1 :ime) :: tempa1 + real(kind=kind_phys), dimension(1 :ime) :: tempa2 + real(kind=kind_phys), dimension(1 :ime) :: theta + real(kind=kind_phys), dimension(1 :ime) :: thetap + real(kind=kind_phys), dimension(1 :ime) :: tsg + real(kind=kind_phys), dimension(1 :ime) :: tsm + real(kind=kind_phys), dimension(1 :ime) :: tsp + real(kind=kind_phys), dimension(1 :ime) :: tss + real(kind=kind_phys), dimension(1 :ime) :: ucom + real(kind=kind_phys), dimension(1 :ime) :: uf10 + real(kind=kind_phys), dimension(1 :ime) :: uf2 + real(kind=kind_phys), dimension(1 :ime) :: ufh + real(kind=kind_phys), dimension(1 :ime) :: ufm + real(kind=kind_phys), dimension(1 :ime) :: ufzo + real(kind=kind_phys), dimension(1 :ime) :: ugzm + real(kind=kind_phys), dimension(1 :ime) :: uzeta + real(kind=kind_phys), dimension(1 :ime) :: uzetam + real(kind=kind_phys), dimension(1 :ime) :: vcom + real(kind=kind_phys), dimension(1 :ime) :: vrtkx + real(kind=kind_phys), dimension(1 :ime) :: vrts + real(kind=kind_phys), dimension(1 :ime) :: wind + real(kind=kind_phys), dimension(1 :ime) :: windp + real(kind=kind_phys), dimension(1 :ime) :: wind10p !WANG, 10m wind previous step + real(kind=kind_phys), dimension(1 :ime) :: uvs1 +! real(kind=kind_phys), dimension(1 :ime) :: xxfh + real(kind=kind_phys), dimension(1 :ime) :: xxfm + real(kind=kind_phys), dimension(1 :ime) :: xxsh + real(kind=kind_phys), dimension(1 :ime) :: z10 + real(kind=kind_phys), dimension(1 :ime) :: z2 + real(kind=kind_phys), dimension(1 :ime) :: zeta + real(kind=kind_phys), dimension(1 :ime) :: zkmax + + real(kind=kind_phys), dimension(1 :ime) :: pss + real(kind=kind_phys), dimension(1 :ime) :: tstar + real(kind=kind_phys), dimension(1 :ime) :: ukmax + real(kind=kind_phys), dimension(1 :ime) :: vkmax + real(kind=kind_phys), dimension(1 :ime) :: tkmax + real(kind=kind_phys), dimension(1 :ime) :: rkmax + real(kind=kind_phys), dimension(1 :ime) :: zot + real(kind=kind_phys), dimension(1 :ime) :: fhzo1 + real(kind=kind_phys), dimension(1 :ime) :: sfh + + real(kind=kind_phys) :: ux13, yo, y,xo,x,ux21,ugzzo,ux11,ux12,uzetao,xnum,alll + real(kind=kind_phys) :: ux1,ugz,x10,uzo,uq,ux2,ux3,xtan,xden,y10,uzet1o,ugz10 + real(kind=kind_phys) :: szet2, zal2,ugz2 + real(kind=kind_phys) :: rovcp,boycon,cmo2,psps1,zog,enrca,rca,cmo1,amask,en,ca,a,c + real(kind=kind_phys) :: sgz,zal10,szet10,fmz,szo,sq,fmzo,rzeta1,zal1g,szetao,rzeta2,zal2g + real(kind=kind_phys) :: hcap,xks,pith,teps,diffot,delten,alevp,psps2,alfus,nstep + real(kind=kind_phys) :: shfx,sigt4,reflect + real(kind=kind_phys) :: cor1,cor2,szetho,zal2gh,cons_p000001,cons_7,vis,ustar,restar,rat + real(kind=kind_phys) :: wndm,ckg + real(kind=kind_phys) :: windmks,znott,znotm + real(kind=kind_phys) :: ubot, vbot + integer:: i,j,ii,iq,nnest,icnt,ngd,ip + +!----------------------------------------------------------------------- +! internal variables +!----------------------------------------------------------------------- + + real(kind=kind_phys), dimension (223) :: tab + real(kind=kind_phys), dimension (223) :: table + real(kind=kind_phys), dimension (101) :: tab11 + real(kind=kind_phys), dimension (41) :: table4 + real(kind=kind_phys), dimension (42) :: tab3 + real(kind=kind_phys), dimension (54) :: table2 + real(kind=kind_phys), dimension (54) :: table3 + real(kind=kind_phys), dimension (74) :: table1 + real(kind=kind_phys), dimension (80) :: tab22 + + character(len=255) :: message + + equivalence (tab(1),tab11(1)) + equivalence (tab(102),tab22(1)) + equivalence (tab(182),tab3(1)) + equivalence (table(1),table1(1)) + equivalence (table(75),table2(1)) + equivalence (table(129),table3(1)) + equivalence (table(183),table4(1)) + + data amask/ -98.0/ +!----------------------------------------------------------------------- +! tables used to obtain the vapor pressures or saturated vapor +! pressure +!----------------------------------------------------------------------- + + data tab11/21*0.01403,0.01719,0.02101,0.02561,0.03117,0.03784, & + &.04584,.05542,.06685,.08049,.09672,.1160,.1388,.1658,.1977,.2353, & + &.2796,.3316,.3925,.4638,.5472,.6444,.7577,.8894,1.042,1.220,1.425, & + &1.662,1.936,2.252,2.615,3.032,3.511,4.060,4.688,5.406,6.225,7.159, & + &8.223,9.432,10.80,12.36,14.13,16.12,18.38,20.92,23.80,27.03,30.67, & + &34.76,39.35,44.49,50.26,56.71,63.93,71.98,80.97,90.98,102.1,114.5, & + &128.3,143.6,160.6,179.4,200.2,223.3,248.8,276.9,307.9,342.1,379.8, & + &421.3,466.9,517.0,572.0,632.3,698.5,770.9,850.2,937.0,1032./ + + data tab22/1146.6,1272.0,1408.1,1556.7,1716.9,1890.3,2077.6,2279.6 & + &,2496.7,2729.8,2980.0,3247.8,3534.1,3839.8,4164.8,4510.5,4876.9, & + &5265.1,5675.2,6107.8,6566.2,7054.7,7575.3,8129.4,8719.2,9346.5, & + &10013.,10722.,11474.,12272.,13119.,14017.,14969.,15977.,17044., & + &18173.,19367.,20630.,21964.,23373.,24861.,26430.,28086.,29831., & + &31671.,33608.,35649.,37796.,40055.,42430.,44927.,47551.,50307., & + &53200.,56236.,59422.,62762.,66264.,69934.,73777.,77802.,82015., & + &86423.,91034.,95855.,100890.,106160.,111660.,117400.,123400., & + &129650.,136170.,142980.,150070.,157460.,165160.,173180.,181530., & + &190220.,199260./ + + data tab3/208670.,218450.,228610.,239180.,250160.,261560.,273400., & + &285700.,298450.,311690.,325420.,339650.,354410.,369710.,385560., & + &401980.,418980.,436590.,454810.,473670.,493170.,513350.,534220., & + &555800.,578090.,601130.,624940.,649530.,674920.,701130.,728190., & + &756110.,784920.,814630.,845280.,876880.,909450.,943020.,977610., & + &1013250.,1049940.,1087740./ + + data table1/20*0.0,.3160e-02,.3820e-02,.4600e-02,.5560e-02,.6670e-02, & + & .8000e-02,.9580e-02,.1143e-01,.1364e-01,.1623e-01,.1928e-01, & + &.2280e-01,.2700e-01,.3190e-01,.3760e-01,.4430e-01,.5200e-01, & + &.6090e-01,.7130e-01,.8340e-01,.9720e-01,.1133e+00,.1317e-00, & + &.1526e-00,.1780e-00,.2050e-00,.2370e-00,.2740e-00,.3160e-00, & + &.3630e-00,.4170e-00,.4790e-00,.5490e-00,.6280e-00,.7180e-00, & + &.8190e-00,.9340e-00,.1064e+01,.1209e+01,.1368e+01,.1560e+01, & + &.1770e+01,.1990e+01,.2260e+01,.2540e+01,.2880e+01,.3230e+01, & + &.3640e+01,.4090e+01,.4590e+01,.5140e+01,.5770e+01,.6450e+01, & + &.7220e+01/ + + data table2/.8050e+01,.8990e+01,.1001e+02,.1112e+02,.1240e+02, & + &.1380e+02,.1530e+02,.1700e+02,.1880e+02,.2080e+02,.2310e+02, & + &.2550e+02,.2810e+02,.3100e+02,.3420e+02,.3770e+02,.4150e+02, & + &.4560e+02,.5010e+02,.5500e+02,.6030e+02,.6620e+02,.7240e+02, & + &.7930e+02,.8680e+02,.9500e+02,.1146e+03,.1254e+03,.1361e+03, & + &.1486e+03,.1602e+03,.1734e+03,.1873e+03,.2020e+03,.2171e+03, & + &.2331e+03,.2502e+03,.2678e+03,.2863e+03,.3057e+03,.3250e+03, & + &.3457e+03,.3664e+03,.3882e+03,.4101e+03,.4326e+03,.4584e+03, & + &.4885e+03,.5206e+03,.5541e+03,.5898e+03,.6273e+03,.6665e+03, & + &.7090e+03/ + + data table3/.7520e+03,.7980e+03,.8470e+03,.8980e+03,.9520e+03, & + &.1008e+04,.1067e+04,.1129e+04,.1194e+04,.1263e+04,.1334e+04, & + &.1409e+04,.1488e+04,.1569e+04,.1656e+04,.1745e+04,.1840e+04, & + &.1937e+04,.2041e+04,.2147e+04,.2259e+04,.2375e+04,.2497e+04, & + &.2624e+04,.2756e+04,.2893e+04,.3036e+04,.3186e+04,.3340e+04, & + &.3502e+04,.3670e+04,.3843e+04,.4025e+04,.4213e+04,.4408e+04, & + &.4611e+04,.4821e+04,.5035e+04,.5270e+04,.5500e+04,.5740e+04, & + &.6000e+04,.6250e+04,.6520e+04,.6810e+04,.7090e+04,.7390e+04, & + &.7700e+04,.8020e+04,.8350e+04,.8690e+04,.9040e+04,.9410e+04, & + &.9780e+04/ + + data table4/.1016e+05,.1057e+05,.1098e+05,.1140e+05,.1184e+05, & + &.1230e+05,.1275e+05,.1324e+05,.1373e+05,.1423e+05,.1476e+05, & + &.1530e+05,.1585e+05,.1642e+05,.1700e+05,.1761e+05,.1822e+05, & + &.1886e+05,.1950e+05,.2018e+05,.2087e+05,.2158e+05,.2229e+05, & + &.2304e+05,.2381e+05,.2459e+05,.2539e+05,.2621e+05,.2706e+05, & + &.2792e+05,.2881e+05,.2971e+05,.3065e+05,.3160e+05,.3257e+05, & + &.3357e+05,.3459e+05,.3564e+05,.3669e+05,.3780e+05,.0000e+00/ +! +! spcify constants needed by MFLUX2 +! +!GJF: should send through argument list, but these have nonstandard units + real,parameter :: cp = 1.00464e7 + real,parameter :: g = 980.6 + real,parameter :: rgas = 2.87e6 + real,parameter :: og = 1./g + integer :: ntstep = 0 + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 +! +#if HWRF==1 + real*8 :: gasdev,ran1 !zhang + real :: rr !zhang + logical,save :: pert_Cd_local !zhang + CHARACTER(len=3) :: env_memb,env_pp + integer,save :: ens_random_seed_local,env_pp_local !zhang + integer :: ensda_physics_pert !zhang + real,save :: ens_Cdamp_local !zhang + data ens_random_seed_local/0/ + data env_pp_local/0/ + if ( ens_random_seed_local .eq. 0 ) then + CALL nl_get_ensda_physics_pert(1,ensda_physics_pert) + ens_random_seed_local=ens_random_seed + env_pp_local=ensda_physics_pert + pert_Cd_local=.false. + ens_Cdamp_local=0.0 +! env_pp=1: do physics perturbations for ensda members, ens_random_seed must be 99 + if ( env_pp_local .eq. 1 ) then + if ( ens_random_seed .ne. 99 ) then + pert_Cd_local=.true. + ens_Cdamp_local=ens_Cdamp + else +! ens_random_seed=99 do physics perturbation for ensemble forecasts, env_pp must be zero + ens_random_seed_local=ens_random_seed + pert_Cd_local=pert_Cd + ens_Cdamp_local=ens_Cdamp + endif + else + ens_random_seed_local=ens_random_seed + pert_Cd_local=pert_Cd + ens_Cdamp_local=ens_Cdamp + endif + print*, "Cd ===", ens_random_seed_local,pert_Cd_local,ens_Cdamp_local,ensda_physics_pert + endif +#endif + +! character*10 routine +! routine = 'mflux2' +! +!------------------------------------------------------------------------ +! set water availability constant "ecof" and land mask "land". +! limit minimum wind speed to 100 cm/s +!------------------------------------------------------------------------ +! constants for 10 m winds (correction for knots +! + cor1 = .120 + cor2 = 720. +! KWON : remove the artificial increase of 10m wind speed over 60kts +! which comes from GFDL hurricane model + cor1 = 0. + cor2 = 0. +! + + do i = its,ite + z10(i) = 1000. + z2 (i) = 200. + pss(i) = pspc(i) + tstar(i) = tstrc(i) + + if ( lcurr_sf .and. zoc(i) .le. 0.0 ) then + ubot = upc(i) - xcur(i) * 100.0 + vbot = vpc(i) - ycur(i) * 100.0 +! ubot = upc(i) +! vbot = vpc(i) + else + ubot = upc(i) + vbot = vpc(i) + endif + uvs1(i)= amax1( SQRT(ubot*ubot + & + vbot*vbot), 100.0) + if ( iwavecpl .eq. 1 .and. zoc(i) .le. 0.0 ) then + ukmax(i) = ( ubot * cos(gamma(i)) - & + vbot * sin(gamma(i)) ) & + * cos(gamma(i)) + vkmax(i) = ( vbot * cos(gamma(i)) - & + ubot * sin(gamma(i)) ) & + * cos(gamma(i)) + + else + ukmax(i) = ubot + vkmax(i) = vbot + endif + +! ukmax(i) = upc(i) +! vkmax(i) = vpc(i) + tkmax(i) = tpc(i) + rkmax(i) = rpc(i) + enddo + + do i = its,ite + windp(i) = SQRT(ukmax(i)*ukmax(i) + vkmax(i)*vkmax(i)) + wind (i) = amax1(windp(i),100.) + +!! use wind10 previous step + wind10p(i) = wind10(i) !! cm/s + wind10p(i) = amax1(wind10p(i),100.) +!! + + if (zoc(i) .LT. amask) zoc(i) = -0.0185*0.001*wind10p(i)*wind10p(i)*og + if (zoc(i) .GT. 0.0) then + ecof(i) = wetc(i) + land(i) = 1.0 + zot (i) = zoc(i) + else + ecof(i) = wetc(i) + land(i) = 0.0 + windmks=wind10p(i)*.01 + if ( iwavecpl .eq. 1 ) then + call znot_wind10m(windmks,znott,znotm,icoef_sf) + !Check if Charnock parameter ratio is received in a proper range. + if ( alpha(i) .ge. 0.2 .and. alpha(i) .le. 5. ) then + znotm = znotm*alpha(i) + endif + zoc(i) = -100.*znotm + zot(i) = -100* znott + else + call znot_wind10m(windmks,znott,znotm,icoef_sf) + zoc(i) = -100.*znotm + zot(i) = -100* znott + endif + endif +!------------------------------------------------------------------------ +! where necessary modify zo values over ocean. +!------------------------------------------------------------------------ +! + mzoc(i) = zoc(i) !FOR SAVE MOMENTUM Zo + tzot(i) = zot(i) !output wang + enddo + +!------------------------------------------------------------------------ +! define constants: +! a and c = constants used in evaluating universal function for +! stable case +! ca = karmen constant +! cm01 = constant part of vertical integral of universal +! function; stable case ( 0.5 < zeta < or = 10.0) +! cm02 = constant part of vertical integral of universal +! function; stable case ( zeta > 10.0) +!------------------------------------------------------------------------ + + en = 2. + c = .76 + a = 5. + ca = .4 + cmo1 = .5*a - 1.648 + cmo2 = 17.193 + .5*a - 10.*c + boycon = .61 + rovcp=rgas/cp + + do i = its,ite + theta(i) = tkmax(i)/((pkmax(i)/pspc(i))**rovcp) + vrtkx(i) = 1.0 + boycon*rkmax(i) + !zkmax(i) = -rgas*tkmax(i)*alog(pkmax(i)/pspc(i))*og + zkmax(i) = z1(i) !use precalculated height of first model layer center + enddo + +!------------------------------------------------------------------------ +! get saturation mixing ratios at surface +!------------------------------------------------------------------------ + + do i = its,ite + tsg (i) = tstar(i) + tab1 (i) = tstar(i) - 153.16 + it (i) = IFIX(tab1(i)) + tab2 (i) = tab1(i) - FLOAT(it(i)) + t1 (i) = tab(min(223,max(1,it(i) + 1))) + t2 (i) = table(min(223,max(1,it(i) + 1))) + estso(i) = t1(i) + tab2(i)*t2(i) + psps1 = (pss(i) - estso(i)) + if(psps1 .EQ. 0.0)then + psps1 = .1 + endif + rstso(i) = 0.622*estso(i)/psps1 + vrts (i) = 1. + boycon*ecof(i)*rstso(i) + enddo + +!------------------------------------------------------------------------ +! check if consideration of virtual temperature changes stability. +! if so, set "dthetav" to near neutral value (1.0e-4). also check +! for very small lapse rates; if ABS(tempa1) <1.0e-4 then +! tempa1=1.0e-4 +!------------------------------------------------------------------------ + + do i = its,ite + tempa1(i) = theta(i)*vrtkx(i) - tstar(i)*vrts(i) + tempa2(i) = tempa1(i)*(theta(i) - tstar(i)) + if (tempa2(i) .LT. 0.) tempa1(i) = 1.0e-4 + tab1(i) = ABS(tempa1(i)) + if (tab1(i) .LT. 1.0e-4) tempa1(i) = 1.0e-4 +!------------------------------------------------------------------------ +! compute bulk richardson number "rib" at each point. if "rib" +! exceeds 95% of critical richardson number "tab1" then "rib = tab1" +!------------------------------------------------------------------------ + + rib (i) = g*zkmax(i)*tempa1(i)/ & + (tkmax(i)*vrtkx(i)*wind(i)*wind(i)) + tab2(i) = ABS(zoc(i)) + tab1(i) = 0.95/(c*(1. - tab2(i)/zkmax(i))) + if (rib(i) .GT. tab1(i)) rib(i) = tab1(i) + enddo + + do i = its,ite + zeta(i) = ca*rib(i)/0.03 + enddo + +!------------------------------------------------------------------------ +! begin looping through points on line, solving wegsteins iteration +! for zeta at each point, and using hicks functions +!------------------------------------------------------------------------ + +!------------------------------------------------------------------------ +! set initial guess of zeta=non - dimensional height "szeta" for +! stable points +!------------------------------------------------------------------------ + + rca = 1./ca + enrca = en*rca +! turn off interfacial layer by zeroing out enrca + enrca = 0.0 + zog = .0185*og + +!------------------------------------------------------------------------ +! stable points +!------------------------------------------------------------------------ + + ip = 0 + do i = its,ite + if (zeta(i) .GE. 0.0) then + ip = ip + 1 + istb(ip) = i + endif + enddo + + if (ip .EQ. 0) go to 170 + do i = 1,ip + szetam(i) = 1.0e+30 + sgzm(i) = 0.0e+00 + szeta(i) = zeta(istb(i)) + ifz(i) = 1 + enddo + +!------------------------------------------------------------------------ +! begin wegstein iteration for "zeta" at stable points using +! hicks(1976) +!------------------------------------------------------------------------ + + do icnt = 1,icntx + do i = 1,ip + if (ifz(i) .EQ. 0) go to 80 + zal1g = ALOG(szeta(i)) + if (szeta(i) .LE. 0.5) then + fmz1(i) = (zal1g + a*szeta(i))*rca + else if (szeta(i) .GT. 0.5 .AND. szeta(i) .LE. 10.) then + rzeta1 = 1./szeta(i) + fmz1(i) = (8.*zal1g + 4.25*rzeta1 - & + 0.5*rzeta1*rzeta1 + cmo1)*rca + else if (szeta(i) .GT. 10.) then + fmz1(i) = (c*szeta(i) + cmo2)*rca + endif + szetao = ABS(zoc(istb(i)))/zkmax(istb(i))*szeta(i) + zal2g = ALOG(szetao) + if (szetao .LE. 0.5) then + fmzo1(i) = (zal2g + a*szetao)*rca + sfzo (i) = 1. + a*szetao + else if (szetao .GT. 0.5 .AND. szetao .LE. 10.) then + rzeta2 = 1./szetao + fmzo1(i) = (8.*zal2g + 4.25*rzeta2 - & + 0.5*rzeta2*rzeta2 + cmo1)*rca + sfzo (i) = 8.0 - 4.25*rzeta2 + rzeta2*rzeta2 + else if (szetao .GT. 10.) then + fmzo1(i) = (c*szetao + cmo2)*rca + sfzo (i) = c*szetao + endif + + +! compute heat & moisture parts of zot.. for calculation of sfh + + szetho = ABS(zot(istb(i)))/zkmax(istb(i))*szeta(i) + zal2gh = ALOG(szetho) + if (szetho .LE. 0.5) then + fhzo1(i) = (zal2gh + a*szetho)*rca + sfzo (i) = 1. + a*szetho + else if (szetho .GT. 0.5 .AND. szetho .LE. 10.) then + rzeta2 = 1./szetho + fhzo1(i) = (8.*zal2gh + 4.25*rzeta2 - & + 0.5*rzeta2*rzeta2 + cmo1)*rca + sfzo (i) = 8.0 - 4.25*rzeta2 + rzeta2*rzeta2 + else if (szetho .GT. 10.) then + fhzo1(i) = (c*szetho + cmo2)*rca + sfzo (i) = c*szetho + endif + +!------------------------------------------------------------------------ +! compute universal function at 10 meters for diagnostic purposes +!------------------------------------------------------------------------ + + szet10 = ABS(z10(istb(i)))/zkmax(istb(i))*szeta(i) + zal10 = ALOG(szet10) + if (szet10 .LE. 0.5) then + fmz10(i) = (zal10 + a*szet10)*rca + else if (szet10 .GT. 0.5 .AND. szet10 .LE. 10.) then + rzeta2 = 1./szet10 + fmz10(i) = (8.*zal10 + 4.25*rzeta2 - & + 0.5*rzeta2*rzeta2 + cmo1)*rca + else if (szet10 .GT. 10.) then + fmz10(i) = (c*szet10 + cmo2)*rca + endif + sf10(i) = fmz10(i) - fmzo1(i) +! compute 2m values for diagnostics in HWRF + szet2 = ABS(z2 (istb(i)))/zkmax(istb(i))*szeta(i) + zal2 = ALOG(szet2 ) + if (szet2 .LE. 0.5) then + fmz2 (i) = (zal2 + a*szet2 )*rca + else if (szet2 .GT. 0.5 .AND. szet2 .LE. 2.) then + rzeta2 = 1./szet2 + fmz2 (i) = (8.*zal2 + 4.25*rzeta2 - & + 0.5*rzeta2*rzeta2 + cmo1)*rca + else if (szet2 .GT. 2.) then + fmz2 (i) = (c*szet2 + cmo2)*rca + endif + sf2 (i) = fmz2 (i) - fmzo1(i) + + sfm(i) = fmz1(i) - fmzo1(i) + sfh(i) = fmz1(i) - fhzo1(i) + sgz = ca*rib(istb(i))*sfm(i)*sfm(i)/ & + (sfh(i) + enrca*sfzo(i)) + fmz = (sgz - szeta(i))/szeta(i) + fmzo = ABS(fmz) + if (fmzo .GE. 5.0e-5) then + sq = (sgz - sgzm(i))/(szeta(i) - szetam(i)) + if(sq .EQ. 1) then + write(errmsg,'(*(a))') 'NCO ERROR DIVIDE BY ZERO IN gfdl_sfc_layer.F90/MFLUX2 (STABLE CASE)'// & + 'sq is 1 ',fmzo,sgz,sgzm(i),szeta(i),szetam(i) + errflg = 1 + return + endif + szetam(i) = szeta(i) + szeta (i) = (sgz - szeta(i)*sq)/(1.0 - sq) + sgzm (i) = sgz + else + ifz(i) = 0 + endif +80 continue + enddo + enddo + + do i = 1,ip + if (ifz(i) .GE. 1) go to 110 + enddo + + go to 130 + +110 continue + + write(errmsg,'(*(a))') 'NON-CONVERGENCE FOR STABLE ZETA IN gfdl_sfc_layer.F90/MFLUX2' + errflg = 1 + return +! call MPI_CLOSE(1,routine) + +!------------------------------------------------------------------------ +! update "zo" for ocean points. "zo"cannot be updated within the +! wegsteins iteration as the scheme (for the near neutral case) +! can become unstable +!------------------------------------------------------------------------ + +130 continue + do i = 1,ip + szo = zoc(istb(i)) + if (szo .LT. 0.0) then + wndm=wind(istb(i))*0.01 + if(wndm.lt.15.0) then + ckg=0.0185*og + else + ckg=(sfenth*(4*0.000308*wndm) + (1.-sfenth)*0.0185 )*og + endif + + szo = - ckg*wind(istb(i))*wind(istb(i))/ & + (sfm(i)*sfm(i)) + cons_p000001 = .000001 + cons_7 = 7. + vis = 1.4E-1 + + ustar = sqrt( -szo / zog) + restar = -ustar * szo / vis + restar = max(restar,cons_p000001) +! Rat taken from Zeng, Zhao and Dickinson 1997 + rat = 2.67 * restar ** .25 - 2.57 + rat = min(rat ,cons_7) !constant + rat=0. + zot(istb(i)) = szo * exp(-rat) + else + zot(istb(i)) = zoc(istb(i)) + endif + +! in hwrf thermal znot is loaded back into the zoc array for next step + zoc(istb(i)) = szo + enddo + + do i = 1,ip + xxfm(istb(i)) = sfm(i) + xxfh(istb(i)) = sfh(i) + xxfh2(istb(i)) = sf2 (i) + xxsh(istb(i)) = sfzo(i) + enddo + +!------------------------------------------------------------------------ +! obtain wind at 10 meters for diagnostic purposes +!------------------------------------------------------------------------ + + do i = 1,ip + wind10(istb(i)) = sf10(i)*uvs1(istb(i))/sfm(i) + wind10(istb(i)) = wind10(istb(i)) * 1.944 + if(wind10(istb(i)) .GT. 6000.0) then + wind10(istb(i))=wind10(istb(i))+wind10(istb(i))*cor1 & + - cor2 + endif +! the above correction done by GFDL in centi-kts!!!-change back + wind10(istb(i)) = wind10(istb(i)) / 1.944 + enddo + +!------------------------------------------------------------------------ +! unstable points +!------------------------------------------------------------------------ + +170 continue + + iq = 0 + do i = its,ite + if (zeta(i) .LT. 0.0) then + iq = iq + 1 + iutb(iq) = i + endif + enddo + + if (iq .EQ. 0) go to 290 + do i = 1,iq + uzeta (i) = zeta(iutb(i)) + ifz (i) = 1 + uzetam(i) = 1.0e+30 + ugzm (i) = 0.0e+00 + enddo + +!------------------------------------------------------------------------ +! begin wegstein iteration for "zeta" at unstable points using +! hicks functions +!------------------------------------------------------------------------ + + do icnt = 1,icntx + do i = 1,iq + if (ifz(i) .EQ. 0) go to 200 + ugzzo = ALOG(zkmax(iutb(i))/ABS(zot(iutb(i)))) + uzetao = ABS(zot(iutb(i)))/zkmax(iutb(i))*uzeta(i) + ux11 = 1. - 16.*uzeta(i) + ux12 = 1. - 16.*uzetao + y = SQRT(ux11) + yo = SQRT(ux12) + ufzo(i) = 1./yo + ux13 = (1. + y)/(1. + yo) + ux21 = ALOG(ux13) + ufh(i) = (ugzzo - 2.*ux21)*rca +! recompute scalers for ufm in terms of mom znot... zoc + ugzzo = ALOG(zkmax(iutb(i))/ABS(zoc(iutb(i)))) + uzetao = ABS(zoc(iutb(i)))/zkmax(iutb(i))*uzeta(i) + ux11 = 1. - 16.*uzeta(i) + ux12 = 1. - 16.*uzetao + y = SQRT(ux11) + yo = SQRT(ux12) + ux13 = (1. + y)/(1. + yo) + ux21 = ALOG(ux13) +! ufzo(i) = 1./yo + x = SQRT(y) + xo = SQRT(yo) + xnum = (x**2 + 1.)*((x + 1.)**2) + xden = (xo**2 + 1.)*((xo + 1.)**2) + xtan = ATAN(x) - ATAN(xo) + ux3 = ALOG(xnum/xden) + ufm(i) = (ugzzo - ux3 + 2.*xtan)*rca + +!------------------------------------------------------------------------ +! obtain ten meter winds for diagnostic purposes +!------------------------------------------------------------------------ + + ugz10 = ALOG(z10(iutb(i))/ABS(zoc(iutb(i)))) + uzet1o = ABS(z10(iutb(i)))/zkmax(iutb(i))*uzeta(i) + uzetao = ABS(zoc(iutb(i)))/zkmax(iutb(i))*uzeta(i) + ux11 = 1. - 16.*uzet1o + ux12 = 1. - 16.*uzetao + y = SQRT(ux11) + y10 = SQRT(ux12) + ux13 = (1. + y)/(1. + y10) + ux21 = ALOG(ux13) + x = SQRT(y) + x10 = SQRT(y10) + xnum = (x**2 + 1.)*((x + 1.)**2) + xden = (x10**2 + 1.)*((x10 + 1.)**2) + xtan = ATAN(x) - ATAN(x10) + ux3 = ALOG(xnum/xden) + uf10(i) = (ugz10 - ux3 + 2.*xtan)*rca + +! obtain 2m values for diagnostics... + + + ugz2 = ALOG(z2 (iutb(i))/ABS(zoc(iutb(i)))) + uzet1o = ABS(z2 (iutb(i)))/zkmax(iutb(i))*uzeta(i) + uzetao = ABS(zoc(iutb(i)))/zkmax(iutb(i))*uzeta(i) + ux11 = 1. - 16.*uzet1o + ux12 = 1. - 16.*uzetao + y = SQRT(ux11) + yo = SQRT(ux12) + ux13 = (1. + y)/(1. + yo) + ux21 = ALOG(ux13) + uf2 (i) = (ugzzo - 2.*ux21)*rca + + + ugz = ca*rib(iutb(i))*ufm(i)*ufm(i)/(ufh(i) + enrca*ufzo(i)) + ux1 = (ugz - uzeta(i))/uzeta(i) + ux2 = ABS(ux1) + if (ux2 .GE. 5.0e-5) then + uq = (ugz - ugzm(i))/(uzeta(i) - uzetam(i)) + uzetam(i) = uzeta(i) + if(uq .EQ. 1) then + write(errmsg,'(*(a))') 'NCO ERROR DIVIDE BY ZERO IN gfdl_sfc_layer.F90/MFLUX2 (UNSTABLE CASE)'// & + 'uq is 1 ',ux2,ugz,ugzm(i),uzeta(i),uzetam(i) + errflg = 1 + return + endif + uzeta (i) = (ugz - uzeta(i)*uq)/(1.0 - uq) + ugzm (i) = ugz + else + ifz(i) = 0 + endif +200 continue + enddo + enddo + + + do i = 1,iq + if (ifz(i) .GE. 1) go to 230 + enddo + + go to 250 + +230 continue + write(errmsg,'(*(a))') 'NON-CONVERGENCE FOR UNSTABLE ZETA IN ROW'// & + 'uq is 1 ',ux2,ugz,ugzm(i),uzeta(i),uzetam(i) + errflg = 1 + return + +! call MPI_CLOSE(1,routine) + +!------------------------------------------------------------------------ +! gather unstable values +!------------------------------------------------------------------------ + +250 continue + +!------------------------------------------------------------------------ +! update "zo" for ocean points. zo cannot be updated within the +! wegsteins iteration as the scheme (for the near neutral case) +! can become unstable. +!------------------------------------------------------------------------ + + do i = 1,iq + uzo = zoc(iutb(i)) + if (zoc(iutb(i)) .LT. 0.0) then + wndm=wind(iutb(i))*0.01 + if(wndm.lt.15.0) then + ckg=0.0185*og + else + ckg=(4*0.000308*wndm)*og + ckg=(sfenth*(4*0.000308*wndm) + (1.-sfenth)*0.0185 )*og + endif + uzo =-ckg*wind(iutb(i))*wind(iutb(i))/(ufm(i)*ufm(i)) + cons_p000001 = .000001 + cons_7 = 7. + vis = 1.4E-1 + + ustar = sqrt( -uzo / zog) + restar = -ustar * uzo / vis + restar = max(restar,cons_p000001) +! Rat taken from Zeng, Zhao and Dickinson 1997 + rat = 2.67 * restar ** .25 - 2.57 + rat = min(rat ,cons_7) !constant + rat=0.0 + zot(iutb(i)) = uzo * exp(-rat) + else + zot(iutb(i)) = zoc(iutb(i)) + endif +! in hwrf thermal znot is loaded back into the zoc array for next step + zoc(iutb(i)) = uzo + enddo + +!------------------------------------------------------------------------ +! obtain wind at ten meters for diagnostic purposes +!------------------------------------------------------------------------ + do i = 1,iq + wind10(iutb(i)) = uf10(i)*uvs1(iutb(i))/ufm(i) + wind10(iutb(i)) = wind10(iutb(i)) * 1.944 + if(wind10(iutb(i)) .GT. 6000.0) then + wind10(iutb(i))=wind10(iutb(i))+wind10(iutb(i))*cor1 & + - cor2 + endif +! the above correction done by GFDL in centi-kts!!!-change back + wind10(iutb(i)) = wind10(iutb(i)) / 1.944 + enddo + + do i = 1,iq + xxfm(iutb(i)) = ufm(i) + xxfh(iutb(i)) = ufh(i) + xxfh2(iutb(i)) = uf2 (i) + xxsh(iutb(i)) = ufzo(i) + enddo + +290 continue + + do i = its,ite + ucom(i) = ukmax(i) + vcom(i) = vkmax(i) + if (windp(i) .EQ. 0.0) then + windp(i) = 100.0 + ucom (i) = 100.0/SQRT(2.0) + vcom (i) = 100.0/SQRT(2.0) + endif + rho(i) = pss(i)/(rgas*(tsg(i) + enrca*(theta(i) - & + tsg(i))*xxsh(i)/(xxfh(i) + enrca*xxsh(i)))) + bq1(i) = wind(i)*rho(i)/(xxfm(i)*(xxfh(i) + enrca*xxsh(i))) + enddo + +! do land sfc temperature prediction if ntsflg=1 +! ntsflg = 1 ! gopal's doing + + if (ntsflg .EQ. 0) go to 370 + alll = 600. + xks = 0.01 + hcap = .5/2.39e-8 + pith = SQRT(4.*ATAN(1.0)) + alfus = alll/2.39e-8 + teps = 0.1 +! slwdc... in units of cal/min ???? +! slwa... in units of ergs/sec/cm*2 +! 1 erg=2.39e-8 cal +!------------------------------------------------------------------------ +! pack land and sea ice points +!------------------------------------------------------------------------ + + ip = 0 + do i = its,ite + if (land(i) .EQ. 1) then + ip = ip + 1 + indx (ip) = i +! slwa is defined as positive down.... + slwa (ip) = slwdc(i)/(2.39e-8*60.) + tss (ip) = tstar(i) + thetap (ip) = theta(i) + rkmaxp (ip) = rkmax(i) + aap (ip) = 5.673e-5 + pssp (ip) = pss(i) + ecofp (ip) = ecof(i) + estsop (ip) = estso(i) + rstsop (ip) = rstso(i) + bq1p (ip) = bq1(i) + bq1p (ip) = amax1(bq1p(ip),0.1e-3) + delsrad(ip) = dt *pith/(hcap*SQRT(3600.*24.*xks)) + endif + enddo + +!------------------------------------------------------------------------ +! initialize variables for first pass of iteration +!------------------------------------------------------------------------ + + do i = 1,ip + ifz (i) = 1 + tsm (i) = tss(i) + rdiff(i) = amin1(0.0,(rkmaxp(i) - rstsop(i))) + +300 format(2X, ' SURFACE EQUILIBRIUM CALCULATION ') + + foftm(i) = tss(i) + delsrad(i)*(slwa(i) - aap(i)*tsm(i)**4 - & + cp*bq1p(i)*(tsm(i) - thetap(i)) + ecofp(i)*alfus*bq1p(i)* & + rdiff(i)) + tsp(i) = foftm(i) + enddo + +!------------------------------------------------------------------------ +! do iteration to determine "tstar" at new time level +!------------------------------------------------------------------------ + + do icnt = 1,icntx + do i = 1,ip + if (ifz(i) .EQ. 0) go to 330 + tab1 (i) = tsp(i) - 153.16 + it (i) = IFIX(tab1(i)) + tab2 (i) = tab1(i) - FLOAT(it(i)) + t1 (i) = tab(min(223,max(1,it(i) + 1))) + t2 (i) = table(min(223,max(1,it(i) + 1))) + estsop(i) = t1(i) + tab2(i)*t2(i) + psps2 = (pssp(i) - estsop(i)) + if(psps2 .EQ. 0.0)then + psps2 = .1 + endif + rstsop(i) = 0.622*estsop(i)/psps2 + rdiff (i) = amin1(0.0,(rkmaxp(i) - rstsop(i))) + + foft(i) = tss(i) + delsrad(i)*(slwa(i) - aap(i)*tsp(i)**4 - & + cp*bq1p(i)*(tsp(i) - thetap(i)) + ecofp(i)*alfus*bq1p(i)* & + rdiff(i)) + + frac(i) = ABS((foft(i) - tsp(i))/tsp(i)) + +!------------------------------------------------------------------------ +! check for convergence of all points use wegstein iteration +!------------------------------------------------------------------------ + + if (frac(i) .GE. teps) then + qf (i) = (foft(i) - foftm(i))/(tsp(i) - tsm(i)) + tsm (i) = tsp(i) + tsp (i) = (foft(i) - tsp(i)*qf(i))/(1. - qf(i)) + foftm(i) = foft(i) + else + ifz(i) = 0 + endif +330 continue + enddo + enddo + +!------------------------------------------------------------------------ +! check for convergence of "t star" prediction +!------------------------------------------------------------------------ + + do i = 1,ip + if (ifz(i) .EQ. 1) then + write(errmsg,'(*(a))') 'NON-CONVERGENCE OF T* PREDICTED (T*,I) = ', & + tsp(i), i + errflg = 1 + return +! call MPI_CLOSE(1,routine) + endif + enddo + + do i = 1,ip + ii = indx(i) + tstrc(ii) = tsp (i) + enddo + +!------------------------------------------------------------------------ +! compute fluxes and momentum drag coef +!------------------------------------------------------------------------ + +370 continue + do i = its,ite +!!! + if ( iwavecpl .eq. 1 .and. zoc(i) .le. 0.0 ) then + windmks = wind10(i) * 0.01 + call znot_wind10m(windmks,znott,znotm,icoef_sf) + !Check if Charnock parameter ratio is received in a proper range. + if ( alpha(i) .ge. 0.2 .and. alpha(i) .le. 5. ) then + znotm = znotm*alpha(i) + endif + zoc(i) = -100.*znotm + zot(i) = -100* znott + endif +!!!! + fxh(i) = bq1(i)*(theta(i) - tsg(i)) + fxe(i) = ecof(i)*bq1(i)*(rkmax(i) - rstso(i)) + if (fxe(i) .GT. 0.0) fxe(i) = 0.0 + fxmx(i) = rho(i)/(xxfm(i)*xxfm(i))*wind(i)*wind(i)*ucom(i)/ & + windp(i) + fxmy(i) = rho(i)/(xxfm(i)*xxfm(i))*wind(i)*wind(i)*vcom(i)/ & + windp(i) + cdm(i) = 1./(xxfm(i)*xxfm(i)) +#if HWRF==1 +! randomly perturb the Cd +!zzz if( pert_Cd_local .and. ens_random_seed_local .gt. 0 ) then + if( pert_Cd_local ) then + ens_random_seed_local=ran1(-ens_random_seed_local)*1000 + rr=2.0*ens_Cdamp_local*ran1(-ens_random_seed_local)-ens_Cdamp_local + cdm(i) = cdm(i) *(1.0+rr) + endif +#endif + + enddo + ntstep = ntstep + 1 + return + end subroutine MFLUX2 + + end module gfdl_sfc_layer diff --git a/physics/gfdl_sfc_layer.meta b/physics/gfdl_sfc_layer.meta new file mode 100644 index 000000000..738216d1a --- /dev/null +++ b/physics/gfdl_sfc_layer.meta @@ -0,0 +1,801 @@ +[ccpp-arg-table] + name = gfdl_sfc_layer_init + type = scheme +[icoef_sf] + standard_name = flag_for_surface_roughness_option_over_ocean + long_name = surface roughness options over ocean + units = flag + dimensions = () + type = integer + intent = in + optional = F +[cplwav] + standard_name = flag_for_wave_coupling + long_name = flag controlling cplwav collection (default off) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[cplwav2atm] + standard_name = flag_for_wave_coupling_to_atm + long_name = flag controlling ocean wave coupling to the atmosphere (default off) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lcurr_sf] + standard_name = flag_for_ocean_currents_in_surface_layer_scheme + long_name = flag for taking ocean currents into account in surface layer scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[pert_cd] + standard_name = flag_for_perturbation_of_surface_drag_coefficient_for_momentum_in_air + long_name = flag for perturbing the surface drag coefficient for momentum in surface layer scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ntsflg] + standard_name = flag_for_updating_skin_temperatuer_in_surface_layer_scheme + long_name = flag for updating skin temperature in the surface layer scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = gfdl_sfc_layer_run + type = scheme +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[nsoil] + standard_name = soil_vertical_dimension + long_name = soil vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[km] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[xlon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[flag_iter] + standard_name = flag_for_iteration + long_name = flag for iteration + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[lsm] + standard_name = flag_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noah] + standard_name = flag_for_noah_land_surface_scheme + long_name = flag for NOAH land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noahmp] + standard_name = flag_for_noahmp_land_surface_scheme + long_name = flag for NOAH MP land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_ruc] + standard_name = flag_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noah_wrfv4] + standard_name = flag_for_noah_wrfv4_land_surface_scheme + long_name = flag for NOAH WRFv4 land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[icoef_sf] + standard_name = flag_for_surface_roughness_option_over_ocean + long_name = surface roughness options over ocean + units = flag + dimensions = () + type = integer + intent = in + optional = F +[cplwav] + standard_name = flag_for_wave_coupling + long_name = flag controlling cplwav collection (default off) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[cplwav2atm] + standard_name = flag_for_wave_coupling_to_atm + long_name = flag controlling ocean wave coupling to the atmosphere (default off) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lcurr_sf] + standard_name = flag_for_ocean_currents_in_surface_layer_scheme + long_name = flag for taking ocean currents into account in surface layer scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[pert_Cd] + standard_name = flag_for_perturbation_of_surface_drag_coefficient_for_momentum_in_air + long_name = flag for perturbing the surface drag coefficient for momentum in surface layer scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ntsflg] + standard_name = flag_for_updating_skin_temperatuer_in_surface_layer_scheme + long_name = flag for updating skin temperature in the surface layer scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[sfenth] + standard_name = enthalpy_flux_factor + long_name = enthalpy flux factor used in surface layer scheme + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[z1] + standard_name = height_above_ground_at_lowest_model_layer + long_name = height above ground at 1st model layer + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[shdmax] + standard_name = maximum_vegetation_area_fraction + long_name = max fractnl cover of green veg + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[ivegsrc] + standard_name = vegetation_type_dataset_choice + long_name = land use dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F +[vegtype] + standard_name = vegetation_type_classification + long_name = vegetation type at each grid cell + units = index + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[sigmaf] + standard_name = bounded_vegetation_area_fraction + long_name = areal fractional cover of green vegetation bounded on the bottom + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[dt] + standard_name = time_step_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[wet] + standard_name = flag_nonzero_wet_surface_fraction + long_name = flag indicating presence of some ocean or lake surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[dry] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[isltyp] + standard_name = soil_type_classification + long_name = soil type at each grid cell + units = index + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[grav] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[ep1] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[ep2] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[smois] + standard_name = volume_fraction_of_soil_moisture + long_name = total soil moisture + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[psfc] + standard_name = surface_air_pressure + long_name = surface pressure + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[prsl1] + standard_name = air_pressure_at_lowest_model_layer + long_name = mean pressure at lowest model layer + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[q1] + standard_name = water_vapor_specific_humidity_at_lowest_model_layer + long_name = water vapor specific humidity at lowest model layer + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[t1] + standard_name = air_temperature_at_lowest_model_layer + long_name = 1st model layer air temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[u1] + standard_name = x_wind_at_lowest_model_layer + long_name = zonal wind at lowest model layer + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[v1] + standard_name = y_wind_at_lowest_model_layer + long_name = meridional wind at lowest model layer + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[u10] + standard_name = x_wind_at_10m + long_name = 10 meter u wind speed + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[v10] + standard_name = y_wind_at_10m + long_name = 10 meter v wind speed + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[gsw] + standard_name = surface_downwelling_shortwave_flux + long_name = surface downwelling shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[glw] + standard_name = surface_downwelling_longwave_flux + long_name = surface downwelling longwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tsurf_ocn] + standard_name = surface_skin_temperature_after_iteration_over_ocean + long_name = surface skin temperature after iteration over ocean + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tsurf_lnd] + standard_name = surface_skin_temperature_after_iteration_over_land + long_name = surface skin temperature after iteration over land + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tsurf_ice] + standard_name = surface_skin_temperature_after_iteration_over_ice + long_name = surface skin temperature after iteration over ice + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tskin_ocn] + standard_name = surface_skin_temperature_over_ocean_interstitial + long_name = surface skin temperature over ocean (temporary use as interstitial) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tskin_lnd] + standard_name = surface_skin_temperature_over_land_interstitial + long_name = surface skin temperature over land (temporary use as interstitial) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tskin_ice] + standard_name = surface_skin_temperature_over_ice_interstitial + long_name = surface skin temperature over ice (temporary use as interstitial) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ustar_ocn] + standard_name = surface_friction_velocity_over_ocean + long_name = surface friction velocity over ocean + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ustar_lnd] + standard_name = surface_friction_velocity_over_land + long_name = surface friction velocity over land + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ustar_ice] + standard_name = surface_friction_velocity_over_ice + long_name = surface friction velocity over ice + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[znt_ocn] + standard_name = surface_roughness_length_over_ocean_interstitial + long_name = surface roughness length over ocean (temporary use as interstitial) + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[znt_lnd] + standard_name = surface_roughness_length_over_land_interstitial + long_name = surface roughness length over land (temporary use as interstitial) + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[znt_ice] + standard_name = surface_roughness_length_over_ice_interstitial + long_name = surface roughness length over ice (temporary use as interstitial) + units = cm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cdm_ocn] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean + long_name = surface exchange coeff for momentum over ocean + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cdm_lnd] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_land + long_name = surface exchange coeff for momentum over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cdm_ice] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice + long_name = surface exchange coeff for momentum over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[stress_ocn] + standard_name = surface_wind_stress_over_ocean + long_name = surface wind stress over ocean + units = m2 s-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[stress_lnd] + standard_name = surface_wind_stress_over_land + long_name = surface wind stress over land + units = m2 s-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[stress_ice] + standard_name = surface_wind_stress_over_ice + long_name = surface wind stress over ice + units = m2 s-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[rib_ocn] + standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean + long_name = bulk Richardson number at the surface over ocean + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[rib_lnd] + standard_name = bulk_richardson_number_at_lowest_model_level_over_land + long_name = bulk Richardson number at the surface over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[rib_ice] + standard_name = bulk_richardson_number_at_lowest_model_level_over_ice + long_name = bulk Richardson number at the surface over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fm_ocn] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean + long_name = Monin-Obukhov similarity function for momentum over ocean + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fm_lnd] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_land + long_name = Monin-Obukhov similarity function for momentum over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fm_ice] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ice + long_name = Monin-Obukhov similarity function for momentum over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fh_ocn] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean + long_name = Monin-Obukhov similarity function for heat over ocean + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fh_lnd] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_land + long_name = Monin-Obukhov similarity function for heat over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fh_ice] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_ice + long_name = Monin-Obukhov similarity function for heat over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fh2_ocn] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean + long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fh2_lnd] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_land + long_name = Monin-Obukhov similarity parameter for heat at 2m over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fh2_ice] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ice + long_name = Monin-Obukhov similarity parameter for heat at 2m over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ch_ocn] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean + long_name = surface exchange coeff heat & moisture over ocean + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ch_lnd] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land + long_name = surface exchange coeff heat & moisture over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ch_ice] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice + long_name = surface exchange coeff heat & moisture over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fm10_ocn] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean + long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fm10_lnd] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_land + long_name = Monin-Obukhov similarity parameter for momentum at 10m over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[fm10_ice] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ice + long_name = Monin-Obukhov similarity parameter for momentum at 10m over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[qss_ocn] + standard_name = surface_specific_humidity_over_ocean + long_name = surface air saturation specific humidity over ocean + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[qss_lnd] + standard_name = surface_specific_humidity_over_land + long_name = surface air saturation specific humidity over land + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[qss_ice] + standard_name = surface_specific_humidity_over_ice + long_name = surface air saturation specific humidity over ice + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/module_sf_exchcoef.f90 b/physics/module_sf_exchcoef.f90 new file mode 100755 index 000000000..0e3dae80c --- /dev/null +++ b/physics/module_sf_exchcoef.f90 @@ -0,0 +1,733 @@ +! This MODULE holds the routines that calculate air-sea exchange coefficients + +MODULE module_sf_exchcoef +CONTAINS + + SUBROUTINE znot_m_v1(uref,znotm) + IMPLICIT NONE + +! uref(m/s) : Reference level wind +! znotm(meter): Roughness scale for momentum +! Author : Biju Thomas on 02/07/2014 +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znotm + REAL :: bs0, bs1, bs2, bs3, bs4, bs5, bs6 + REAL :: cf0, cf1, cf2, cf3, cf4, cf5, cf6 + + + bs0 = -8.367276172397277e-12 + bs1 = 1.7398510865876079e-09 + bs2 = -1.331896578363359e-07 + bs3 = 4.507055294438727e-06 + bs4 = -6.508676881906914e-05 + bs5 = 0.00044745137674732834 + bs6 = -0.0010745704660847233 + + cf0 = 2.1151080765239772e-13 + cf1 = -3.2260663894433345e-11 + cf2 = -3.329705958751961e-10 + cf3 = 1.7648562021709124e-07 + cf4 = 7.107636825694182e-06 + cf5 = -0.0013914681964973246 + cf6 = 0.0406766967657759 + + + IF ( uref .LE. 5.0 ) THEN + znotm = (0.0185 / 9.8*(7.59e-4*uref**2+2.46e-2*uref)**2) + ELSEIF (uref .GT. 5.0 .AND. uref .LT. 10.0) THEN + znotm =.00000235*(uref**2 - 25 ) + 3.805129199617346e-05 + ELSEIF ( uref .GE. 10.0 .AND. uref .LT. 60.0) THEN + znotm = bs6 + bs5*uref + bs4*uref**2 + bs3*uref**3 + bs2*uref**4 + & + bs1*uref**5 + bs0*uref**6 + ELSE + znotm = cf6 + cf5*uref + cf4*uref**2 + cf3*uref**3 + cf2*uref**4 + & + cf1*uref**5 + cf0*uref**6 + + END IF + + END SUBROUTINE znot_m_v1 + + SUBROUTINE znot_m_v0(uref,znotm) + IMPLICIT NONE + +! uref(m/s) : Reference level wind +! znotm(meter): Roughness scale for momentum +! Author : Biju Thomas on 02/07/2014 + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znotm + REAL :: yz, y1, y2, y3, y4 + + yz = 0.0001344 + y1 = 3.015e-05 + y2 = 1.517e-06 + y3 = -3.567e-08 + y4 = 2.046e-10 + + IF ( uref .LT. 12.5 ) THEN + znotm = (0.0185 / 9.8*(7.59e-4*uref**2+2.46e-2*uref)**2) + ELSE IF ( uref .GE. 12.5 .AND. uref .LT. 30.0 ) THEN + znotm = (0.0739793 * uref -0.58)/1000.0 + ELSE + znotm = yz + uref*y1 + uref**2*y2 + uref**3*y3 + uref**4*y4 + END IF + + END SUBROUTINE znot_m_v0 + + + SUBROUTINE znot_t_v1(uref,znott) + IMPLICIT NONE + +! uref(m/s) : Reference level wind +! znott(meter): Roughness scale for temperature/moisture +! Author : Biju Thomas on 02/07/2014 + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znott + REAL :: to0, to1, to2, to3 + REAL :: tr0, tr1, tr2, tr3 + REAL :: tn0, tn1, tn2, tn3, tn4, tn5 + REAL :: ta0, ta1, ta2, ta3, ta4, ta5, ta6 + REAL :: tt0, tt1, tt2, tt3, tt4, tt5, tt6, tt7 + + + tr0 = 6.451939325286488e-08 + tr1 = -7.306388137342143e-07 + tr2 = -1.3709065148333262e-05 + tr3 = 0.00019109962089098182 + + to0 = 1.4379320027061375e-08 + to1 = -2.0674525898850674e-07 + to2 = -6.8950970846611e-06 + to3 = 0.00012199648268521026 + + tn0 = 1.4023940955902878e-10 + tn1 = -1.4752557214976321e-08 + tn2 = 5.90998487691812e-07 + tn3 = -1.0920804077770066e-05 + tn4 = 8.898205876940546e-05 + tn5 = -0.00021123340439418298 + + tt0 = 1.92409564131838e-12 + tt1 = -5.765467086754962e-10 + tt2 = 7.276979099726975e-08 + tt3 = -5.002261599293387e-06 + tt4 = 0.00020220445539973736 + tt5 = -0.0048088230565883 + tt6 = 0.0623468551971189 + tt7 = -0.34019193746967424 + + ta0 = -1.7787470700719361e-10 + ta1 = 4.4691736529848764e-08 + ta2 = -3.0261975348463414e-06 + ta3 = -0.00011680322286017206 + ta4 = 0.024449377821884846 + ta5 = -1.1228628619105638 + ta6 = 17.358026773905973 + + IF ( uref .LE. 7.0 ) THEN + znott = (0.0185 / 9.8*(7.59e-4*uref**2+2.46e-2*uref)**2) + ELSEIF ( uref .GE. 7.0 .AND. uref .LT. 12.5 ) THEN + znott = tr3 + tr2*uref + tr1*uref**2 + tr0*uref**3 + ELSEIF ( uref .GE. 12.5 .AND. uref .LT. 15.0 ) THEN + znott = to3 + to2*uref + to1*uref**2 + to0*uref**3 + ELSEIF ( uref .GE. 15.0 .AND. uref .LT. 30.0) THEN + znott = tn5 + tn4*uref + tn3*uref**2 + tn2*uref**3 + tn1*uref**4 + & + tn0*uref**5 + ELSEIF ( uref .GE. 30.0 .AND. uref .LT. 60.0) THEN + znott = tt7 + tt6*uref + tt5*uref**2 + tt4*uref**3 + tt3*uref**4 + & + tt2*uref**5 + tt1*uref**6 + tt0*uref**7 + ELSE + znott = ta6 + ta5*uref + ta4*uref**2 + ta3*uref**3 + ta2*uref**4 + & + ta1*uref**5 + ta0*uref**6 + END IF + + END SUBROUTINE znot_t_v1 + + SUBROUTINE znot_t_v0(uref,znott) + IMPLICIT NONE + +! uref(m/s) : Reference level wind +! znott(meter): Roughness scale for temperature/moisture +! Author : Biju Thomas on 02/07/2014 + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znott + + IF ( uref .LT. 7.0 ) THEN + znott = (0.0185 / 9.8*(7.59e-4*uref**2+2.46e-2*uref)**2) + ELSE + znott = (0.2375*exp(-0.5250*uref) + 0.0025*exp(-0.0211*uref))*0.01 + END IF + + END SUBROUTINE znot_t_v0 + + + SUBROUTINE znot_t_v2(uu,znott) + IMPLICIT NONE + +! uu in MKS +! znott in m +! Biju Thomas on 02/12/2015 +! + + REAL, INTENT(IN) :: uu + REAL, INTENT(OUT):: znott + REAL :: ta0, ta1, ta2, ta3, ta4, ta5, ta6 + REAL :: tb0, tb1, tb2, tb3, tb4, tb5, tb6 + REAL :: tt0, tt1, tt2, tt3, tt4, tt5, tt6 + + ta0 = 2.51715926619e-09 + ta1 = -1.66917514012e-07 + ta2 = 4.57345863551e-06 + ta3 = -6.64883696932e-05 + ta4 = 0.00054390175125 + ta5 = -0.00239645231325 + ta6 = 0.00453024927761 + + + tb0 = -1.72935914649e-14 + tb1 = 2.50587455802e-12 + tb2 = -7.90109676541e-11 + tb3 = -4.40976353607e-09 + tb4 = 3.68968179733e-07 + tb5 = -9.43728336756e-06 + tb6 = 8.90731312383e-05 + + tt0 = 4.68042680888e-14 + tt1 = -1.98125754931e-11 + tt2 = 3.41357133496e-09 + tt3 = -3.05130605309e-07 + tt4 = 1.48243563819e-05 + tt5 = -0.000367207751936 + tt6 = 0.00357204479347 + + IF ( uu .LE. 7.0 ) THEN + znott = (0.0185 / 9.8*(7.59e-4*uu**2+2.46e-2*uu)**2) + ELSEIF ( uu .GE. 7.0 .AND. uu .LT. 15. ) THEN + znott = ta6 + ta5*uu + ta4*uu**2 + ta3*uu**3 + ta2*uu**4 + & + ta1*uu**5 + ta0*uu**6 + ELSEIF ( uu .GE. 15.0 .AND. uu .LT. 60.0) THEN + znott = tb6 + tb5*uu + tb4*uu**2 + tb3*uu**3 + tb2*uu**4 + & + tb1*uu**5 + tb0*uu**6 + ELSE + znott = tt6 + tt5*uu + tt4*uu**2 + tt3*uu**3 + tt2*uu**4 + & + tt1*uu**5 + tt0*uu**6 + END IF + + END SUBROUTINE znot_t_v2 + + SUBROUTINE znot_m_v6(uref,znotm) + IMPLICIT NONE +! Calculate areodynamical roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Cd-U10 relationship from COARE V3.5 (Edson et al. 2013) +! For high winds, try to fit available observational data +! +! Bin Liu, NOAA/NCEP/EMC 2017 +! +! uref(m/s) : wind speed at 10-m height +! znotm(meter): areodynamical roughness scale over water +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znotm + REAL :: p13, p12, p11, p10 + REAL :: p25, p24, p23, p22, p21, p20 + REAL :: p35, p34, p33, p32, p31, p30 + REAL :: p40 + + p13 = -1.296521881682694e-02 + p12 = 2.855780863283819e-01 + p11 = -1.597898515251717e+00 + p10 = -8.396975715683501e+00 + + p25 = 3.790846746036765e-10 + p24 = 3.281964357650687e-09 + p23 = 1.962282433562894e-07 + p22 = -1.240239171056262e-06 + p21 = 1.739759082358234e-07 + p20 = 2.147264020369413e-05 + + p35 = 1.840430200185075e-07 + p34 = -2.793849676757154e-05 + p33 = 1.735308193700643e-03 + p32 = -6.139315534216305e-02 + p31 = 1.255457892775006e+00 + p30 = -1.663993561652530e+01 + + p40 = 4.579369142033410e-04 + + if (uref >= 0.0 .and. uref <= 6.5 ) then + znotm = exp( p10 + p11*uref + p12*uref**2 + p13*uref**3) + elseif (uref > 6.5 .and. uref <= 15.7) then + znotm = p25*uref**5 + p24*uref**4 + p23*uref**3 + p22*uref**2 + p21*uref + p20 + elseif (uref > 15.7 .and. uref <= 53.0) then + znotm = exp( p35*uref**5 + p34*uref**4 + p33*uref**3 + p32*uref**2 + p31*uref + p30 ) + elseif ( uref > 53.0) then + znotm = p40 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_m_v6 + + SUBROUTINE znot_t_v6(uref,znott) + IMPLICIT NONE +! Calculate scalar roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Ck-U10 relationship from COARE algorithm +! For high winds, try to retain the Ck-U10 relationship of FY2015 HWRF +! +! Bin Liu, NOAA/NCEP/EMC 2017 +! +! uref(m/s) : wind speed at 10-m height +! znott(meter): scalar roughness scale over water +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znott + + REAL :: p00 + REAL :: p15, p14, p13, p12, p11, p10 + REAL :: p25, p24, p23, p22, p21, p20 + REAL :: p35, p34, p33, p32, p31, p30 + REAL :: p45, p44, p43, p42, p41, p40 + REAL :: p56, p55, p54, p53, p52, p51, p50 + REAL :: p60 + + p00 = 1.100000000000000e-04 + + p15 = -9.144581627678278e-10 + p14 = 7.020346616456421e-08 + p13 = -2.155602086883837e-06 + p12 = 3.333848806567684e-05 + p11 = -2.628501274963990e-04 + p10 = 8.634221567969181e-04 + + p25 = -8.654513012535990e-12 + p24 = 1.232380050058077e-09 + p23 = -6.837922749505057e-08 + p22 = 1.871407733439947e-06 + p21 = -2.552246987137160e-05 + p20 = 1.428968311457630e-04 + + p35 = 3.207515102100162e-12 + p34 = -2.945761895342535e-10 + p33 = 8.788972147364181e-09 + p32 = -3.814457439412957e-08 + p31 = -2.448983648874671e-06 + p30 = 3.436721779020359e-05 + + p45 = -3.530687797132211e-11 + p44 = 3.939867958963747e-09 + p43 = -1.227668406985956e-08 + p42 = -1.367469811838390e-05 + p41 = 5.988240863928883e-04 + p40 = -7.746288511324971e-03 + + p56 = -1.187982453329086e-13 + p55 = 4.801984186231693e-11 + p54 = -8.049200462388188e-09 + p53 = 7.169872601310186e-07 + p52 = -3.581694433758150e-05 + p51 = 9.503919224192534e-04 + p50 = -1.036679430885215e-02 + + p60 = 4.751256171799112e-05 + + if (uref >= 0.0 .and. uref < 5.9 ) then + znott = p00 + elseif (uref >= 5.9 .and. uref <= 15.4) then + znott = p15*uref**5 + p14*uref**4 + p13*uref**3 + p12*uref**2 + p11*uref + p10 + elseif (uref > 15.4 .and. uref <= 21.6) then + znott = p25*uref**5 + p24*uref**4 + p23*uref**3 + p22*uref**2 + p21*uref + p20 + elseif (uref > 21.6 .and. uref <= 42.2) then + znott = p35*uref**5 + p34*uref**4 + p33*uref**3 + p32*uref**2 + p31*uref + p30 + elseif ( uref > 42.2 .and. uref <= 53.3) then + znott = p45*uref**5 + p44*uref**4 + p43*uref**3 + p42*uref**2 + p41*uref + p40 + elseif ( uref > 53.3 .and. uref <= 80.0) then + znott = p56*uref**6 + p55*uref**5 + p54*uref**4 + p53*uref**3 + p52*uref**2 + p51*uref + p50 + elseif ( uref > 80.0) then + znott = p60 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_t_v6 + + SUBROUTINE znot_m_v7(uref,znotm) + IMPLICIT NONE +! Calculate areodynamical roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Cd-U10 relationship from COARE V3.5 (Edson et al. 2013) +! For high winds, try to fit available observational data +! Comparing to znot_t_v6, slightly decrease Cd for higher wind speed +! +! Bin Liu, NOAA/NCEP/EMC 2018 +! +! uref(m/s) : wind speed at 10-m height +! znotm(meter): areodynamical roughness scale over water +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znotm + REAL :: p13, p12, p11, p10 + REAL :: p25, p24, p23, p22, p21, p20 + REAL :: p35, p34, p33, p32, p31, p30 + REAL :: p40 + + p13 = -1.296521881682694e-02 + p12 = 2.855780863283819e-01 + p11 = -1.597898515251717e+00 + p10 = -8.396975715683501e+00 + + p25 = 3.790846746036765e-10 + p24 = 3.281964357650687e-09 + p23 = 1.962282433562894e-07 + p22 = -1.240239171056262e-06 + p21 = 1.739759082358234e-07 + p20 = 2.147264020369413e-05 + + p35 = 1.897534489606422e-07 + p34 = -3.019495980684978e-05 + p33 = 1.931392924987349e-03 + p32 = -6.797293095862357e-02 + p31 = 1.346757797103756e+00 + p30 = -1.707846930193362e+01 + + p40 = 3.371427455376717e-04 + + if (uref >= 0.0 .and. uref <= 6.5 ) then + znotm = exp( p10 + p11*uref + p12*uref**2 + p13*uref**3) + elseif (uref > 6.5 .and. uref <= 15.7) then + znotm = p25*uref**5 + p24*uref**4 + p23*uref**3 + p22*uref**2 + p21*uref + p20 + elseif (uref > 15.7 .and. uref <= 53.0) then + znotm = exp( p35*uref**5 + p34*uref**4 + p33*uref**3 + p32*uref**2 + p31*uref + p30 ) + elseif ( uref > 53.0) then + znotm = p40 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_m_v7 + + SUBROUTINE znot_t_v7(uref,znott) + IMPLICIT NONE +! Calculate scalar roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Ck-U10 relationship from COARE algorithm +! For high winds, try to retain the Ck-U10 relationship of FY2015 HWRF +! To be compatible with the slightly decreased Cd for higher wind speed +! +! Bin Liu, NOAA/NCEP/EMC 2018 +! +! uref(m/s) : wind speed at 10-m height +! znott(meter): scalar roughness scale over water +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znott + + REAL :: p00 + REAL :: p15, p14, p13, p12, p11, p10 + REAL :: p25, p24, p23, p22, p21, p20 + REAL :: p35, p34, p33, p32, p31, p30 + REAL :: p45, p44, p43, p42, p41, p40 + REAL :: p56, p55, p54, p53, p52, p51, p50 + REAL :: p60 + + p00 = 1.100000000000000e-04 + + p15 = -9.193764479895316e-10 + p14 = 7.052217518653943e-08 + p13 = -2.163419217747114e-06 + p12 = 3.342963077911962e-05 + p11 = -2.633566691328004e-04 + p10 = 8.644979973037803e-04 + + p25 = -9.402722450219142e-12 + p24 = 1.325396583616614e-09 + p23 = -7.299148051141852e-08 + p22 = 1.982901461144764e-06 + p21 = -2.680293455916390e-05 + p20 = 1.484341646128200e-04 + + p35 = 7.921446674311864e-12 + p34 = -1.019028029546602e-09 + p33 = 5.251986927351103e-08 + p32 = -1.337841892062716e-06 + p31 = 1.659454106237737e-05 + p30 = -7.558911792344770e-05 + + p45 = -2.694370426850801e-10 + p44 = 5.817362913967911e-08 + p43 = -5.000813324746342e-06 + p42 = 2.143803523428029e-04 + p41 = -4.588070983722060e-03 + p40 = 3.924356617245624e-02 + + p56 = -1.663918773476178e-13 + p55 = 6.724854483077447e-11 + p54 = -1.127030176632823e-08 + p53 = 1.003683177025925e-06 + p52 = -5.012618091180904e-05 + p51 = 1.329762020689302e-03 + p50 = -1.450062148367566e-02 + + p60 = 6.840803042788488e-05 + + if (uref >= 0.0 .and. uref < 5.9 ) then + znott = p00 + elseif (uref >= 5.9 .and. uref <= 15.4) then + znott = p15*uref**5 + p14*uref**4 + p13*uref**3 + p12*uref**2 + p11*uref + p10 + elseif (uref > 15.4 .and. uref <= 21.6) then + znott = p25*uref**5 + p24*uref**4 + p23*uref**3 + p22*uref**2 + p21*uref + p20 + elseif (uref > 21.6 .and. uref <= 42.6) then + znott = p35*uref**5 + p34*uref**4 + p33*uref**3 + p32*uref**2 + p31*uref + p30 + elseif ( uref > 42.6 .and. uref <= 53.0) then + znott = p45*uref**5 + p44*uref**4 + p43*uref**3 + p42*uref**2 + p41*uref + p40 + elseif ( uref > 53.0 .and. uref <= 80.0) then + znott = p56*uref**6 + p55*uref**5 + p54*uref**4 + p53*uref**3 + p52*uref**2 + p51*uref + p50 + elseif ( uref > 80.0) then + znott = p60 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_t_v7 + + SUBROUTINE znot_m_v8(uref,znotm) + IMPLICIT NONE +! Calculate areodynamical roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Cd-U10 relationship from COARE V3.5 (Edson et al. 2013) +! For high winds, try to fit available observational data +! Comparing to znot_t_v6, slightly decrease Cd for higher wind speed +! And this is another variation similar to v7 +! +! Bin Liu, NOAA/NCEP/EMC 2018 +! +! uref(m/s) : wind speed at 10-m height +! znotm(meter): areodynamical roughness scale over water +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znotm + REAL :: p13, p12, p11, p10 + REAL :: p25, p24, p23, p22, p21, p20 + REAL :: p35, p34, p33, p32, p31, p30 + REAL :: p40 + + p13 = -1.296521881682694e-02 + p12 = 2.855780863283819e-01 + p11 = -1.597898515251717e+00 + p10 = -8.396975715683501e+00 + + p25 = 3.790846746036765e-10 + p24 = 3.281964357650687e-09 + p23 = 1.962282433562894e-07 + p22 = -1.240239171056262e-06 + p21 = 1.739759082358234e-07 + p20 = 2.147264020369413e-05 + + p35 = 1.897534489606422e-07 + p34 = -3.019495980684978e-05 + p33 = 1.931392924987349e-03 + p32 = -6.797293095862357e-02 + p31 = 1.346757797103756e+00 + p30 = -1.707846930193362e+01 + + p40 = 3.886804744928044e-04 + + if (uref >= 0.0 .and. uref <= 6.5 ) then + znotm = exp( p10 + p11*uref + p12*uref**2 + p13*uref**3) + elseif (uref > 6.5 .and. uref <= 15.7) then + znotm = p25*uref**5 + p24*uref**4 + p23*uref**3 + p22*uref**2 + p21*uref + p20 + elseif (uref > 15.7 .and. uref <= 51.5) then + znotm = exp( p35*uref**5 + p34*uref**4 + p33*uref**3 + p32*uref**2 + p31*uref + p30 ) + elseif ( uref > 51.5) then + znotm = p40 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_m_v8 + + SUBROUTINE znot_t_v8(uref,znott) + IMPLICIT NONE +! Calculate scalar roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Ck-U10 relationship from COARE algorithm +! For high winds, try to retain the Ck-U10 relationship of FY2015 HWRF +! To be compatible with the slightly decreased Cd for higher wind speed +! And this is another variation similar to v7 +! +! Bin Liu, NOAA/NCEP/EMC 2018 +! +! uref(m/s) : wind speed at 10-m height +! znott(meter): scalar roughness scale over water +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znott + + REAL :: p00 + REAL :: p15, p14, p13, p12, p11, p10 + REAL :: p25, p24, p23, p22, p21, p20 + REAL :: p35, p34, p33, p32, p31, p30 + REAL :: p45, p44, p43, p42, p41, p40 + REAL :: p56, p55, p54, p53, p52, p51, p50 + REAL :: p60 + + p00 = 1.100000000000000e-04 + + p15 = -9.193764479895316e-10 + p14 = 7.052217518653943e-08 + p13 = -2.163419217747114e-06 + p12 = 3.342963077911962e-05 + p11 = -2.633566691328004e-04 + p10 = 8.644979973037803e-04 + + p25 = -9.402722450219142e-12 + p24 = 1.325396583616614e-09 + p23 = -7.299148051141852e-08 + p22 = 1.982901461144764e-06 + p21 = -2.680293455916390e-05 + p20 = 1.484341646128200e-04 + + p35 = 7.921446674311864e-12 + p34 = -1.019028029546602e-09 + p33 = 5.251986927351103e-08 + p32 = -1.337841892062716e-06 + p31 = 1.659454106237737e-05 + p30 = -7.558911792344770e-05 + + p45 = -2.706461188613193e-10 + p44 = 5.845859022891930e-08 + p43 = -5.027577045502003e-06 + p42 = 2.156326523752734e-04 + p41 = -4.617267288861201e-03 + p40 = 3.951492707214883e-02 + + p56 = -1.112896580069263e-13 + p55 = 4.450334755105140e-11 + p54 = -7.375373918500171e-09 + p53 = 6.493685149526543e-07 + p52 = -3.206421106713471e-05 + p51 = 8.407596231678149e-04 + p50 = -9.027924333673693e-03 + + p60 = 5.791179079892191e-05 + + if (uref >= 0.0 .and. uref < 5.9 ) then + znott = p00 + elseif (uref >= 5.9 .and. uref <= 15.4) then + znott = p15*uref**5 + p14*uref**4 + p13*uref**3 + p12*uref**2 + p11*uref + p10 + elseif (uref > 15.4 .and. uref <= 21.6) then + znott = p25*uref**5 + p24*uref**4 + p23*uref**3 + p22*uref**2 + p21*uref + p20 + elseif (uref > 21.6 .and. uref <= 42.6) then + znott = p35*uref**5 + p34*uref**4 + p33*uref**3 + p32*uref**2 + p31*uref + p30 + elseif ( uref > 42.6 .and. uref <= 51.5) then + znott = p45*uref**5 + p44*uref**4 + p43*uref**3 + p42*uref**2 + p41*uref + p40 + elseif ( uref > 51.5 .and. uref <= 80.0) then + znott = p56*uref**6 + p55*uref**5 + p54*uref**4 + p53*uref**3 + p52*uref**2 + p51*uref + p50 + elseif ( uref > 80.0) then + znott = p60 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_t_v8 + + SUBROUTINE znot_wind10m(w10m,znott,znotm,icoef_sf) + IMPLICIT NONE + +! w10m(m/s) : 10-m wind speed +! znott(meter): Roughness scale for temperature/moisture, zt +! znotm(meter): Roughness scale for momentum, z0 +! Author : Weiguo Wang on 02/24/2016 +! convert from icoef=0,1,2 to have 10m level cd, ch match obs + REAL, INTENT(IN) :: w10m + INTEGER, INTENT(IN) :: icoef_sf + REAL, INTENT(OUT):: znott, znotm + + real :: zm,zt,windmks, zlev,z10, tmp, zlevt, aaa, zm1,zt1 + zlev=20.0 + zlevt=10.0 + z10=10.0 + windmks=w10m + if (windmks > 85.0) windmks=85.0 + if (windmks < 1.0) windmks=1.0 + if ( icoef_sf .EQ. 1) then + call znot_m_v1(windmks,zm1) + call znot_t_v1(windmks,zt1) + + else if ( icoef_sf .EQ. 0 ) then + call znot_m_v0(windmks,zm1) + call znot_t_v0(windmks,zt1) + + else if( icoef_sf .EQ. 2 ) then + call znot_m_v1(windmks,zm1) + call znot_t_v2(windmks,zt1) + + else if( icoef_sf .EQ. 3 ) then + call znot_m_v1(windmks,zm) + call znot_t_v2(windmks,zt) +!! adjust a little to match obs at 10m, cd is reduced + tmp=0.4*0.4/(alog(zlev/zm))**2 ! cd at zlev + zm1=z10/exp( sqrt(0.4*0.4/(tmp*0.95-0.0002)) ) +!ch + tmp=0.4*0.4/(alog(zlevt/zm)*alog(zlevt/zt)) ! ch at zlev using old formula + zt1=z10/exp( 0.4*0.4/( 0.95*tmp*alog(z10/zm1) ) ) + + else if( icoef_sf .EQ. 4 ) then + + call znot_m_v1(windmks,zm) + call znot_t_v2(windmks,zt) +!! for wind<20, cd similar to icoef=2 at 10m, then reduced + tmp=0.4*0.4/(alog(10.0/zm))**2 ! cd at zlev + aaa=0.75 + if (windmks < 20) then + aaa=0.99 + elseif(windmks < 45.0) then + aaa=0.99+(windmks-20)*(0.75-0.99)/(45.0-20.0) + endif + zm1=z10/exp( sqrt(0.4*0.4/(tmp*aaa)) ) +!ch + tmp=0.4*0.4/(alog(zlevt/zm)*alog(zlevt/zt)) ! ch at zlev using old formula + zt1=z10/exp( 0.4*0.4/( 0.95*tmp*alog(z10/zm1) ) ) + + else if( icoef_sf .EQ. 5 ) then + + call znot_m_v1(windmks,zm) + call znot_t_v2(windmks,zt) +!! for wind<20, cd similar to icoef=2 at 10m, then reduced + tmp=0.4*0.4/(alog(10.0/zm))**2 ! cd at zlev + aaa=0.80 + if (windmks < 20) then + aaa=1.0 + elseif(windmks < 45.0) then + aaa=1.0+(windmks-20)*(0.80-1.0)/(45.0-20.0) + endif + zm1=z10/exp( sqrt(0.4*0.4/(tmp*aaa)) ) +!ch + tmp=0.4*0.4/(alog(zlevt/zm)*alog(zlevt/zt)) ! ch at zlev using old formula + zt1=z10/exp( 0.4*0.4/( 1.0*tmp*alog(z10/zm1) ) ) + + else if( icoef_sf .EQ. 6 ) then + call znot_m_v6(windmks,zm1) + call znot_t_v6(windmks,zt1) + else if( icoef_sf .EQ. 7 ) then + call znot_m_v7(windmks,zm1) + call znot_t_v7(windmks,zt1) + else if( icoef_sf .EQ. 8 ) then + call znot_m_v8(windmks,zm1) + call znot_t_v8(windmks,zt1) + else + write(0,*)'stop, icoef_sf must be one of 0,1,2,3,4,5,6,7,8' + stop + endif + znott=zt1 + znotm=zm1 + + end subroutine znot_wind10m + +END MODULE module_sf_exchcoef + diff --git a/physics/module_sf_noahlsm.F90 b/physics/module_sf_noahlsm.F90 new file mode 100644 index 000000000..9336abf65 --- /dev/null +++ b/physics/module_sf_noahlsm.F90 @@ -0,0 +1,4773 @@ + MODULE module_sf_noahlsm + +!ckay=KIRAN ALAPATY @ US EPA -- November 01, 2015 +! +! Tim Glotfelty@CNSU; AJ Deng@PSU +!modified for use with FASDAS +!Flux Adjusting Surface Data Assimilation System to assimilate +!surface layer and soil layers temperature and moisture using +! surfance reanalsys +!Reference: Alapaty et al., 2008: Development of the flux-adjusting surface +! data assimilation system for mesoscale models. JAMC, 47, 2331-2350 +! + + REAL, PARAMETER :: EMISSI_S = 0.95 + +! VEGETATION PARAMETERS + INTEGER :: LUCATS , BARE + INTEGER :: NATURAL + INTEGER :: LOW_DENSITY_RESIDENTIAL, HIGH_DENSITY_RESIDENTIAL, HIGH_INTENSITY_INDUSTRIAL + integer, PARAMETER :: NLUS=50 + CHARACTER(LEN=256) LUTYPE + INTEGER, DIMENSION(1:NLUS) :: NROTBL + real, dimension(1:NLUS) :: SNUPTBL, RSTBL, RGLTBL, HSTBL, & + SHDTBL, MAXALB, & + EMISSMINTBL, EMISSMAXTBL, & + LAIMINTBL, LAIMAXTBL, & + Z0MINTBL, Z0MAXTBL, & + ALBEDOMINTBL, ALBEDOMAXTBL, & + ZTOPVTBL,ZBOTVTBL + REAL :: TOPT_DATA,CMCMAX_DATA,CFACTR_DATA,RSMAX_DATA + +! SOIL PARAMETERS + INTEGER :: SLCATS + INTEGER, PARAMETER :: NSLTYPE=30 + CHARACTER(LEN=256) SLTYPE + REAL, DIMENSION (1:NSLTYPE) :: BB,DRYSMC,F11, & + MAXSMC, REFSMC,SATPSI,SATDK,SATDW, WLTSMC,QTZ + +! LSM GENERAL PARAMETERS + INTEGER :: SLPCATS + INTEGER, PARAMETER :: NSLOPE=30 + REAL, DIMENSION (1:NSLOPE) :: SLOPE_DATA + REAL :: SBETA_DATA,FXEXP_DATA,CSOIL_DATA,SALP_DATA,REFDK_DATA, & + REFKDT_DATA,FRZK_DATA,ZBOT_DATA, SMLOW_DATA,SMHIGH_DATA, & + CZIL_DATA + REAL :: LVCOEF_DATA + + integer, private :: iloc, jloc +!$omp threadprivate(iloc, jloc) +! + CONTAINS +! + + SUBROUTINE SFLX (IILOC,JJLOC,FFROZP,ISURBAN,DT,ZLVL,NSOIL,SLDPTH, & !C + LOCAL, & !L + LLANDUSE, LSOIL, & !CL + LWDN,SOLDN,SOLNET,SFCPRS,PRCP,SFCTMP,Q2,SFCSPD, & !F + COSZ,PRCPRAIN, SOLARDIRECT, & !F + TH2,Q2SAT,DQSDT2, & !I + VEGTYP,SOILTYP,SLOPETYP,SHDFAC,SHDMIN,SHDMAX, & !I + ALB, SNOALB,TBOT, Z0BRD, Z0, EMISSI, EMBRD, & !S + CMC,T1,STC,SMC,SH2O,SNOWH,SNEQV,ALBEDO,CH,CM, & !H + CP, RD, SIGMA, CPH2O, CPICE, LSUBF, & !physical constants +! ---------------------------------------------------------------------- +! OUTPUTS, DIAGNOSTICS, PARAMETERS BELOW GENERALLY NOT NECESSARY WHEN +! COUPLED WITH E.G. A NWP MODEL (SUCH AS THE NOAA/NWS/NCEP MESOSCALE ETA +! MODEL). OTHER APPLICATIONS MAY REQUIRE DIFFERENT OUTPUT VARIABLES. +! ---------------------------------------------------------------------- + ETA,SHEAT, ETA_KINEMATIC,FDOWN, & !O + EC,EDIR,ET,ETT,ESNOW,DRIP,DEW, & !O + BETA,ETP,SSOIL, & !O + FLX1,FLX2,FLX3, & !O + FLX4,FVB,FBUR,FGSN,UA_PHYS, & !UA + SNOMLT,SNCOVR, & !O + RUNOFF1,RUNOFF2,RUNOFF3, & !O + RC,PC,RSMIN,XLAI,RCS,RCT,RCQ,RCSOIL, & !O + SOILW,SOILM,Q1,SMAV, & !D + RDLAI2D,USEMONALB, & + SNOTIME1, & + RIBB, & + SMCWLT,SMCDRY,SMCREF,SMCMAX,NROOT, & + SFHEAD1RT, & !I + INFXS1RT,ETPND1,OPT_THCND,AOASIS, & !P + XSDA_QFX,HFX_PHY,QFX_PHY,XQNORM, & !fasdas + fasdas,HCPCT_FASDAS, & !fasdas + errflg, errmsg) + +! ---------------------------------------------------------------------- +! SUBROUTINE SFLX - UNIFIED NOAHLSM VERSION 1.0 JULY 2007 +! ---------------------------------------------------------------------- +! SUB-DRIVER FOR "Noah LSM" FAMILY OF PHYSICS SUBROUTINES FOR A +! SOIL/VEG/SNOWPACK LAND-SURFACE MODEL TO UPDATE SOIL MOISTURE, SOIL +! ICE, SOIL TEMPERATURE, SKIN TEMPERATURE, SNOWPACK WATER CONTENT, +! SNOWDEPTH, AND ALL TERMS OF THE SURFACE ENERGY BALANCE AND SURFACE +! WATER BALANCE (EXCLUDING INPUT ATMOSPHERIC FORCINGS OF DOWNWARD +! RADIATION AND PRECIP) +! ---------------------------------------------------------------------- +! SFLX ARGUMENT LIST KEY: +! ---------------------------------------------------------------------- +! C CONFIGURATION INFORMATION +! L LOGICAL +! CL 4-string character bearing logical meaning +! F FORCING DATA +! I OTHER (INPUT) FORCING DATA +! S SURFACE CHARACTERISTICS +! H HISTORY (STATE) VARIABLES +! O OUTPUT VARIABLES +! D DIAGNOSTIC OUTPUT +! P Parameters +! Msic Miscellaneous terms passed from gridded driver +! ---------------------------------------------------------------------- +! 1. CONFIGURATION INFORMATION (C): +! ---------------------------------------------------------------------- +! DT TIMESTEP (SEC) (DT SHOULD NOT EXCEED 3600 SECS, RECOMMEND +! 1800 SECS OR LESS) +! ZLVL HEIGHT (M) ABOVE GROUND OF ATMOSPHERIC FORCING VARIABLES +! NSOIL NUMBER OF SOIL LAYERS (AT LEAST 2, AND NOT GREATER THAN +! PARAMETER NSOLD SET BELOW) +! SLDPTH THE THICKNESS OF EACH SOIL LAYER (M) +! ---------------------------------------------------------------------- +! 2. LOGICAL: +! ---------------------------------------------------------------------- +! LCH Exchange coefficient (Ch) calculation flag (false: using +! ch-routine SFCDIF; true: Ch is brought in) +! LOCAL Flag for local-site simulation (where there is no +! maps for albedo, veg fraction, and roughness +! true: all LSM parameters (inluding albedo, veg fraction and +! roughness length) will be defined by three tables +! LLANDUSE (=USGS, using USGS landuse classification) +! LSOIL (=STAS, using FAO/STATSGO soil texture classification) +! OPT_THCND option for how to treat thermal conductivity +! ---------------------------------------------------------------------- +! 3. FORCING DATA (F): +! ---------------------------------------------------------------------- +! LWDN LW DOWNWARD RADIATION (W M-2; POSITIVE, NOT NET LONGWAVE) +! SOLDN SOLAR DOWNWARD RADIATION (W M-2; POSITIVE, NOT NET SOLAR) +! SOLNET NET DOWNWARD SOLAR RADIATION ((W M-2; POSITIVE) +! SFCPRS PRESSURE AT HEIGHT ZLVL ABOVE GROUND (PASCALS) +! PRCP PRECIP RATE (KG M-2 S-1) (NOTE, THIS IS A RATE) +! SFCTMP AIR TEMPERATURE (K) AT HEIGHT ZLVL ABOVE GROUND +! TH2 AIR POTENTIAL TEMPERATURE (K) AT HEIGHT ZLVL ABOVE GROUND +! Q2 MIXING RATIO AT HEIGHT ZLVL ABOVE GROUND (KG KG-1) +! COSZ Solar zenith angle (not used for now) +! PRCPRAIN Liquid-precipitation rate (KG M-2 S-1) (not used) +! SOLARDIRECT Direct component of downward solar radiation (W M-2) (not used) +! FFROZP FRACTION OF FROZEN PRECIPITATION +! ---------------------------------------------------------------------- +! 4. OTHER FORCING (INPUT) DATA (I): +! ---------------------------------------------------------------------- +! SFCSPD WIND SPEED (M S-1) AT HEIGHT ZLVL ABOVE GROUND +! Q2SAT SAT SPECIFIC HUMIDITY AT HEIGHT ZLVL ABOVE GROUND (KG KG-1) +! DQSDT2 SLOPE OF SAT SPECIFIC HUMIDITY CURVE AT T=SFCTMP +! (KG KG-1 K-1) +! ---------------------------------------------------------------------- +! 5. CANOPY/SOIL CHARACTERISTICS (S): +! ---------------------------------------------------------------------- +! VEGTYP VEGETATION TYPE (INTEGER INDEX) +! SOILTYP SOIL TYPE (INTEGER INDEX) +! SLOPETYP CLASS OF SFC SLOPE (INTEGER INDEX) +! SHDFAC AREAL FRACTIONAL COVERAGE OF GREEN VEGETATION +! (FRACTION= 0.0-1.0) +! SHDMIN MINIMUM AREAL FRACTIONAL COVERAGE OF GREEN VEGETATION +! (FRACTION= 0.0-1.0) <= SHDFAC +! PTU PHOTO THERMAL UNIT (PLANT PHENOLOGY FOR ANNUALS/CROPS) +! (NOT YET USED, BUT PASSED TO REDPRM FOR FUTURE USE IN +! VEG PARMS) +! ALB BACKROUND SNOW-FREE SURFACE ALBEDO (FRACTION), FOR JULIAN +! DAY OF YEAR (USUALLY FROM TEMPORAL INTERPOLATION OF +! MONTHLY MEAN VALUES' CALLING PROG MAY OR MAY NOT +! INCLUDE DIURNAL SUN ANGLE EFFECT) +! SNOALB UPPER BOUND ON MAXIMUM ALBEDO OVER DEEP SNOW (E.G. FROM +! ROBINSON AND KUKLA, 1985, J. CLIM. & APPL. METEOR.) +! TBOT BOTTOM SOIL TEMPERATURE (LOCAL YEARLY-MEAN SFC AIR +! TEMPERATURE) +! Z0BRD Background fixed roughness length (M) +! Z0 Time varying roughness length (M) as function of snow depth +! +! EMBRD Background surface emissivity (between 0 and 1) +! EMISSI Surface emissivity (between 0 and 1) +! ---------------------------------------------------------------------- +! 6. HISTORY (STATE) VARIABLES (H): +! ---------------------------------------------------------------------- +! CMC CANOPY MOISTURE CONTENT (M) +! T1 GROUND/CANOPY/SNOWPACK) EFFECTIVE SKIN TEMPERATURE (K) +! STC(NSOIL) SOIL TEMP (K) +! SMC(NSOIL) TOTAL SOIL MOISTURE CONTENT (VOLUMETRIC FRACTION) +! SH2O(NSOIL) UNFROZEN SOIL MOISTURE CONTENT (VOLUMETRIC FRACTION) +! NOTE: FROZEN SOIL MOISTURE = SMC - SH2O +! SNOWH ACTUAL SNOW DEPTH (M) +! SNEQV LIQUID WATER-EQUIVALENT SNOW DEPTH (M) +! NOTE: SNOW DENSITY = SNEQV/SNOWH +! ALBEDO SURFACE ALBEDO INCLUDING SNOW EFFECT (UNITLESS FRACTION) +! =SNOW-FREE ALBEDO (ALB) WHEN SNEQV=0, OR +! =FCT(MSNOALB,ALB,VEGTYP,SHDFAC,SHDMIN) WHEN SNEQV>0 +! CH SURFACE EXCHANGE COEFFICIENT FOR HEAT AND MOISTURE +! (M S-1); NOTE: CH IS TECHNICALLY A CONDUCTANCE SINCE +! IT HAS BEEN MULTIPLIED BY WIND SPEED. +! CM SURFACE EXCHANGE COEFFICIENT FOR MOMENTUM (M S-1); NOTE: +! CM IS TECHNICALLY A CONDUCTANCE SINCE IT HAS BEEN +! MULTIPLIED BY WIND SPEED. +! 6a: Physical constants +! CP specific heat of dry air at constant pressure +! RD gas constant for dry air +! SIGMA Steffan-Boltzmann constant +! CPH2O specific heat of liquid water +! CPICE specific heat of ice +! LSUBF latent heat of fusion for water +! ---------------------------------------------------------------------- +! 7. OUTPUT (O): +! ---------------------------------------------------------------------- +! OUTPUT VARIABLES NECESSARY FOR A COUPLED NUMERICAL WEATHER PREDICTION +! MODEL, E.G. NOAA/NWS/NCEP MESOSCALE ETA MODEL. FOR THIS APPLICATION, +! THE REMAINING OUTPUT/DIAGNOSTIC/PARAMETER BLOCKS BELOW ARE NOT +! NECESSARY. OTHER APPLICATIONS MAY REQUIRE DIFFERENT OUTPUT VARIABLES. +! ETA ACTUAL LATENT HEAT FLUX (W m-2: NEGATIVE, IF UP FROM +! SURFACE) +! ETA_KINEMATIC atctual latent heat flux in Kg m-2 s-1 +! SHEAT SENSIBLE HEAT FLUX (W M-2: POSITIVE, IF UPWARD FROM +! SURFACE) +! FDOWN Radiation forcing at the surface (W m-2) = SOLDN*(1-alb)+LWDN +! ---------------------------------------------------------------------- +! EC CANOPY WATER EVAPORATION (W m-2) +! EDIR DIRECT SOIL EVAPORATION (W m-2) +! ET(NSOIL) PLANT TRANSPIRATION FROM A PARTICULAR ROOT (SOIL) LAYER +! (W m-2) +! ETT TOTAL PLANT TRANSPIRATION (W m-2) +! ESNOW SUBLIMATION FROM (OR DEPOSITION TO IF <0) SNOWPACK +! (W m-2) +! DRIP THROUGH-FALL OF PRECIP AND/OR DEW IN EXCESS OF CANOPY +! WATER-HOLDING CAPACITY (M) +! DEW DEWFALL (OR FROSTFALL FOR T<273.15) (M) +! ---------------------------------------------------------------------- +! BETA RATIO OF ACTUAL/POTENTIAL EVAP (DIMENSIONLESS) +! ETP POTENTIAL EVAPORATION (W m-2) +! SSOIL SOIL HEAT FLUX (W M-2: NEGATIVE IF DOWNWARD FROM SURFACE) +! ---------------------------------------------------------------------- +! FLX1 PRECIP-SNOW SFC (W M-2) +! FLX2 FREEZING RAIN LATENT HEAT FLUX (W M-2) +! FLX3 PHASE-CHANGE HEAT FLUX FROM SNOWMELT (W M-2) +! ---------------------------------------------------------------------- +! SNOMLT SNOW MELT (M) (WATER EQUIVALENT) +! SNCOVR FRACTIONAL SNOW COVER (UNITLESS FRACTION, 0-1) +! ---------------------------------------------------------------------- +! RUNOFF1 SURFACE RUNOFF (M S-1), NOT INFILTRATING THE SURFACE +! RUNOFF2 SUBSURFACE RUNOFF (M S-1), DRAINAGE OUT BOTTOM OF LAST +! SOIL LAYER (BASEFLOW) +! RUNOFF3 NUMERICAL TRUNCTATION IN EXCESS OF POROSITY (SMCMAX) +! FOR A GIVEN SOIL LAYER AT THE END OF A TIME STEP (M S-1). +! Note: the above RUNOFF2 is actually the sum of RUNOFF2 and RUNOFF3 +! ---------------------------------------------------------------------- +! RC CANOPY RESISTANCE (S M-1) +! PC PLANT COEFFICIENT (UNITLESS FRACTION, 0-1) WHERE PC*ETP +! = ACTUAL TRANSP +! XLAI LEAF AREA INDEX (DIMENSIONLESS) +! RSMIN MINIMUM CANOPY RESISTANCE (S M-1) +! RCS INCOMING SOLAR RC FACTOR (DIMENSIONLESS) +! RCT AIR TEMPERATURE RC FACTOR (DIMENSIONLESS) +! RCQ ATMOS VAPOR PRESSURE DEFICIT RC FACTOR (DIMENSIONLESS) +! RCSOIL SOIL MOISTURE RC FACTOR (DIMENSIONLESS) +! ---------------------------------------------------------------------- +! 8. DIAGNOSTIC OUTPUT (D): +! ---------------------------------------------------------------------- +! SOILW AVAILABLE SOIL MOISTURE IN ROOT ZONE (UNITLESS FRACTION +! BETWEEN SMCWLT AND SMCMAX) +! SOILM TOTAL SOIL COLUMN MOISTURE CONTENT (FROZEN+UNFROZEN) (M) +! Q1 Effective mixing ratio at surface (kg kg-1), used for +! diagnosing the mixing ratio at 2 meter for coupled model +! SMAV Soil Moisture Availability for each layer, as a fraction +! between SMCWLT and SMCMAX. +! Documentation for SNOTIME1 and SNOABL2 ????? +! What categories of arguments do these variables fall into ???? +! Documentation for RIBB ????? +! What category of argument does RIBB fall into ????? +! ---------------------------------------------------------------------- +! 9. PARAMETERS (P): +! ---------------------------------------------------------------------- +! SMCWLT WILTING POINT (VOLUMETRIC) +! SMCDRY DRY SOIL MOISTURE THRESHOLD WHERE DIRECT EVAP FRM TOP +! LAYER ENDS (VOLUMETRIC) +! SMCREF SOIL MOISTURE THRESHOLD WHERE TRANSPIRATION BEGINS TO +! STRESS (VOLUMETRIC) +! SMCMAX POROSITY, I.E. SATURATED VALUE OF SOIL MOISTURE +! (VOLUMETRIC) +! NROOT NUMBER OF ROOT LAYERS, A FUNCTION OF VEG TYPE, DETERMINED +! IN SUBROUTINE REDPRM. +! ---------------------------------------------------------------------- + + + IMPLICIT NONE +! ---------------------------------------------------------------------- + +! DECLARATIONS - LOGICAL AND CHARACTERS +! ---------------------------------------------------------------------- + + INTEGER, INTENT(IN) :: IILOC, JJLOC + LOGICAL, INTENT(IN):: LOCAL + LOGICAL :: FRZGRA, SNOWNG + CHARACTER (LEN=256), INTENT(IN):: LLANDUSE, LSOIL + +! ---------------------------------------------------------------------- +! 1. CONFIGURATION INFORMATION (C): +! ---------------------------------------------------------------------- + INTEGER,INTENT(IN) :: NSOIL,SLOPETYP,SOILTYP,VEGTYP + INTEGER, INTENT(IN) :: ISURBAN + INTEGER,INTENT(OUT):: NROOT + INTEGER KZ, K, iout + +! ---------------------------------------------------------------------- +! 2. LOGICAL: +! ---------------------------------------------------------------------- + LOGICAL, INTENT(IN) :: RDLAI2D + LOGICAL, INTENT(IN) :: USEMONALB + INTEGER, INTENT(IN) :: OPT_THCND + + REAL, INTENT(INOUT):: SFHEAD1RT,INFXS1RT, ETPND1 + + REAL, INTENT(IN) :: SHDMIN,SHDMAX,DT,DQSDT2,LWDN,PRCP,PRCPRAIN, & + Q2,Q2SAT,SFCPRS,SFCSPD,SFCTMP, SNOALB, & + SOLDN,SOLNET,TBOT,TH2,ZLVL, & + FFROZP,AOASIS + REAL, INTENT(IN) :: CP, RD, SIGMA, CPH2O, CPICE, LSUBF + REAL, INTENT(OUT) :: EMBRD + REAL, INTENT(OUT) :: ALBEDO + REAL, INTENT(INOUT):: COSZ, SOLARDIRECT,CH,CM, & + CMC,SNEQV,SNCOVR,SNOWH,T1,XLAI,SHDFAC,Z0BRD, & + EMISSI, ALB + REAL, INTENT(INOUT):: SNOTIME1 + REAL, INTENT(INOUT):: RIBB + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: SLDPTH + REAL, DIMENSION(1:NSOIL), INTENT(OUT):: ET + REAL, DIMENSION(1:NSOIL), INTENT(OUT):: SMAV + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: SH2O, SMC, STC + REAL,DIMENSION(1:NSOIL):: RTDIS, ZSOIL + + REAL,INTENT(OUT) :: ETA_KINEMATIC,BETA,DEW,DRIP,EC,EDIR,ESNOW,ETA, & + ETP,FLX1,FLX2,FLX3,SHEAT,PC,RUNOFF1,RUNOFF2, & + RUNOFF3,RC,RSMIN,RCQ,RCS,RCSOIL,RCT,SSOIL, & + SMCDRY,SMCMAX,SMCREF,SMCWLT,SNOMLT, SOILM, & + SOILW,FDOWN,Q1 + LOGICAL, INTENT(IN) :: UA_PHYS ! UA: flag for UA option + REAL,INTENT(OUT) :: FLX4 ! UA: energy added to sensible heat + REAL,INTENT(OUT) :: FVB ! UA: frac. veg. w/snow beneath + REAL,INTENT(OUT) :: FBUR ! UA: fraction of canopy buried + REAL,INTENT(OUT) :: FGSN ! UA: ground snow cover fraction + REAL :: ZTOPV ! UA: height of canopy top + REAL :: ZBOTV ! UA: height of canopy bottom + REAL :: GAMA ! UA: = EXP(-1.* XLAI) + REAL :: FNET ! UA: + REAL :: ETPN ! UA: + REAL :: RU ! UA: + + REAL :: BEXP,CFACTR,CMCMAX,CSOIL,CZIL,DF1,DF1H,DF1A,DKSAT,DWSAT, & + DSOIL,DTOT,ETT,FRCSNO,FRCSOI,EPSCA,F1,FXEXP,FRZX,HS, & + KDT,LVH2O,PRCP1,PSISAT,QUARTZ,R,RCH,REFKDT,RR,RGL, & + RSMAX, & + RSNOW,SNDENS,SNCOND,SBETA,SN_NEW,SLOPE,SNUP,SALP,SOILWM, & + SOILWW,T1V,T24,T2V,TH2V,TOPT,TFREEZ,TSNOW,ZBOT,Z0,PRCPF, & + ETNS,PTU,LSUBS + REAL :: LVCOEF + REAL :: INTERP_FRACTION + REAL :: LAIMIN, LAIMAX + REAL :: ALBEDOMIN, ALBEDOMAX + REAL :: EMISSMIN, EMISSMAX + REAL :: Z0MIN, Z0MAX + +! ---------------------------------------------------------------------- +! DECLARATIONS - PARAMETERS +! ---------------------------------------------------------------------- + PARAMETER (TFREEZ = 273.15) + PARAMETER (LVH2O = 2.501E+6) + PARAMETER (LSUBS = 2.83E+6) + PARAMETER (R = 287.04) +! +! FASDAS +! + INTEGER, INTENT(IN ) :: fasdas + REAL, INTENT(INOUT) :: XSDA_QFX, XQNORM + REAL, INTENT(INOUT) :: HFX_PHY, QFX_PHY + REAL, INTENT( OUT) :: HCPCT_FASDAS +! +! END FASDAS + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg +! +! ---------------------------------------------------------------------- +! INITIALIZATION +! ---------------------------------------------------------------------- + errmsg = '' + errflg = 0 + + ILOC = IILOC + JLOC = JJLOC + + RUNOFF1 = 0.0 + RUNOFF2 = 0.0 + RUNOFF3 = 0.0 + SNOMLT = 0.0 + + IF ( .NOT. UA_PHYS ) THEN + FLX4 = 0.0 + FVB = 0.0 + FBUR = 0.0 + FGSN = 0.0 + ENDIF + +! ---------------------------------------------------------------------- +! CALCULATE DEPTH (NEGATIVE) BELOW GROUND FROM TOP SKIN SFC TO BOTTOM OF +! EACH SOIL LAYER. NOTE: SIGN OF ZSOIL IS NEGATIVE (DENOTING BELOW +! GROUND) +! ---------------------------------------------------------------------- + ZSOIL (1) = - SLDPTH (1) + DO KZ = 2,NSOIL + ZSOIL (KZ) = - SLDPTH (KZ) + ZSOIL (KZ -1) + END DO +! ---------------------------------------------------------------------- +! NEXT IS CRUCIAL CALL TO SET THE LAND-SURFACE PARAMETERS, INCLUDING +! SOIL-TYPE AND VEG-TYPE DEPENDENT PARAMETERS. +! ---------------------------------------------------------------------- + CALL REDPRM (VEGTYP,SOILTYP,SLOPETYP,CFACTR,CMCMAX,RSMAX,TOPT, & + REFKDT,KDT,SBETA, SHDFAC,RSMIN,RGL,HS,ZBOT,FRZX, & + PSISAT,SLOPE,SNUP,SALP,BEXP,DKSAT,DWSAT, & + SMCMAX,SMCWLT,SMCREF,SMCDRY,F1,QUARTZ,FXEXP, & + RTDIS,SLDPTH,ZSOIL,NROOT,NSOIL,CZIL, & + LAIMIN, LAIMAX, EMISSMIN, EMISSMAX, ALBEDOMIN, & + ALBEDOMAX, Z0MIN, Z0MAX, CSOIL, PTU, LLANDUSE, & + LSOIL,LOCAL,LVCOEF,ZTOPV,ZBOTV,errmsg,errflg) + if(errflg > 0) return + +!urban + IF(VEGTYP==ISURBAN)THEN + SHDFAC=0.05 + RSMIN=400.0 + SMCMAX = 0.45 + SMCREF = 0.42 + SMCWLT = 0.40 + SMCDRY = 0.40 + ENDIF + + IF ( SHDFAC >= SHDMAX ) THEN + EMBRD = EMISSMAX + IF (.NOT. RDLAI2D) THEN + XLAI = LAIMAX + ENDIF + IF (.NOT. USEMONALB) THEN + ALB = ALBEDOMIN + ENDIF + Z0BRD = Z0MAX + ELSE IF ( SHDFAC <= SHDMIN ) THEN + EMBRD = EMISSMIN + IF(.NOT. RDLAI2D) THEN + XLAI = LAIMIN + ENDIF + IF(.NOT. USEMONALB) then + ALB = ALBEDOMAX + ENDIF + Z0BRD = Z0MIN + ELSE + + IF ( SHDMAX > SHDMIN ) THEN + + INTERP_FRACTION = ( SHDFAC - SHDMIN ) / ( SHDMAX - SHDMIN ) + ! Bound INTERP_FRACTION between 0 and 1 + INTERP_FRACTION = MIN ( INTERP_FRACTION, 1.0 ) + INTERP_FRACTION = MAX ( INTERP_FRACTION, 0.0 ) + ! Scale Emissivity and LAI between EMISSMIN and EMISSMAX by INTERP_FRACTION + EMBRD = ( ( 1.0 - INTERP_FRACTION ) * EMISSMIN ) + ( INTERP_FRACTION * EMISSMAX ) + IF (.NOT. RDLAI2D) THEN + XLAI = ( ( 1.0 - INTERP_FRACTION ) * LAIMIN ) + ( INTERP_FRACTION * LAIMAX ) + ENDIF + if (.not. USEMONALB) then + ALB = ( ( 1.0 - INTERP_FRACTION ) * ALBEDOMAX ) + ( INTERP_FRACTION * ALBEDOMIN ) + endif + Z0BRD = ( ( 1.0 - INTERP_FRACTION ) * Z0MIN ) + ( INTERP_FRACTION * Z0MAX ) + + ELSE + + EMBRD = 0.5 * EMISSMIN + 0.5 * EMISSMAX + IF (.NOT. RDLAI2D) THEN + XLAI = 0.5 * LAIMIN + 0.5 * LAIMAX + ENDIF + if (.not. USEMONALB) then + ALB = 0.5 * ALBEDOMIN + 0.5 * ALBEDOMAX + endif + Z0BRD = 0.5 * Z0MIN + 0.5 * Z0MAX + + ENDIF + + ENDIF +! ---------------------------------------------------------------------- +! INITIALIZE PRECIPITATION LOGICALS. +! ---------------------------------------------------------------------- + SNOWNG = .FALSE. + FRZGRA = .FALSE. + +! ---------------------------------------------------------------------- +! IF INPUT SNOWPACK IS NONZERO, THEN COMPUTE SNOW DENSITY "SNDENS" AND +! SNOW THERMAL CONDUCTIVITY "SNCOND" (NOTE THAT CSNOW IS A FUNCTION +! SUBROUTINE) +! ---------------------------------------------------------------------- + IF ( SNEQV <= 1.E-7 ) THEN ! safer IF kmh (2008/03/25) + SNEQV = 0.0 + SNDENS = 0.0 + SNOWH = 0.0 + SNCOND = 1.0 + ELSE + SNDENS = SNEQV / SNOWH + IF(SNDENS > 1.0) THEN + errmsg = 'Physical snow depth is less than snow water equiv.' + errflg = 1 + return + ENDIF + CALL CSNOW (SNCOND,SNDENS) + END IF +! ---------------------------------------------------------------------- +! DETERMINE IF IT'S PRECIPITATING AND WHAT KIND OF PRECIP IT IS. +! IF IT'S PRCPING AND THE AIR TEMP IS COLDER THAN 0 C, IT'S SNOWING! +! IF IT'S PRCPING AND THE AIR TEMP IS WARMER THAN 0 C, BUT THE GRND +! TEMP IS COLDER THAN 0 C, FREEZING RAIN IS PRESUMED TO BE FALLING. +! ---------------------------------------------------------------------- + IF (PRCP > 0.0) THEN +! snow defined when fraction of frozen precip (FFROZP) > 0.5, +! passed in from model microphysics. + IF (FFROZP .GT. 0.5) THEN + SNOWNG = .TRUE. + ELSE + IF (T1 <= TFREEZ) FRZGRA = .TRUE. + END IF + END IF +! ---------------------------------------------------------------------- +! IF EITHER PRCP FLAG IS SET, DETERMINE NEW SNOWFALL (CONVERTING PRCP +! RATE FROM KG M-2 S-1 TO A LIQUID EQUIV SNOW DEPTH IN METERS) AND ADD +! IT TO THE EXISTING SNOWPACK. +! NOTE THAT SINCE ALL PRECIP IS ADDED TO SNOWPACK, NO PRECIP INFILTRATES +! INTO THE SOIL SO THAT PRCP1 IS SET TO ZERO. +! ---------------------------------------------------------------------- + IF ( (SNOWNG) .OR. (FRZGRA) ) THEN + SN_NEW = PRCP * DT * 0.001 + SNEQV = SNEQV + SN_NEW + PRCPF = 0.0 + +! ---------------------------------------------------------------------- +! UPDATE SNOW DENSITY BASED ON NEW SNOWFALL, USING OLD AND NEW SNOW. +! UPDATE SNOW THERMAL CONDUCTIVITY +! ---------------------------------------------------------------------- + CALL SNOW_NEW (SFCTMP,SN_NEW,SNOWH,SNDENS) + CALL CSNOW (SNCOND,SNDENS) + +! ---------------------------------------------------------------------- +! PRECIP IS LIQUID (RAIN), HENCE SAVE IN THE PRECIP VARIABLE THAT +! LATER CAN WHOLELY OR PARTIALLY INFILTRATE THE SOIL (ALONG WITH +! ANY CANOPY "DRIP" ADDED TO THIS LATER) +! ---------------------------------------------------------------------- + ELSE + PRCPF = PRCP + ENDIF +! ---------------------------------------------------------------------- +! DETERMINE SNOWCOVER AND ALBEDO OVER LAND. +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! IF SNOW DEPTH=0, SET SNOW FRACTION=0, ALBEDO=SNOW FREE ALBEDO. +! ---------------------------------------------------------------------- + IF (SNEQV == 0.0) THEN + SNCOVR = 0.0 + ALBEDO = ALB + EMISSI = EMBRD + IF(UA_PHYS) FGSN = 0.0 + IF(UA_PHYS) FVB = 0.0 + IF(UA_PHYS) FBUR = 0.0 + ELSE +! ---------------------------------------------------------------------- +! DETERMINE SNOW FRACTIONAL COVERAGE. +! DETERMINE SURFACE ALBEDO MODIFICATION DUE TO SNOWDEPTH STATE. +! ---------------------------------------------------------------------- + CALL SNFRAC (SNEQV,SNUP,SALP,SNOWH,SNCOVR, & + XLAI,SHDFAC,FVB,GAMA,FBUR, & + FGSN,ZTOPV,ZBOTV,UA_PHYS) + + IF ( UA_PHYS ) then + IF(SFCTMP <= T1) THEN + RU = 0. + ELSE + RU = 100.*SHDFAC*FGSN*MIN((SFCTMP-T1)/5., 1.)*(1.-EXP(-XLAI)) + ENDIF + CH = CH/(1.+RU*CH) + ENDIF + + SNCOVR = MIN(SNCOVR,0.98) + + CALL ALCALC (ALB,SNOALB,EMBRD,SHDFAC,SHDMIN,SNCOVR,T1, & + ALBEDO,EMISSI,DT,SNOWNG,SNOTIME1,LVCOEF) + ENDIF +! ---------------------------------------------------------------------- +! NEXT CALCULATE THE SUBSURFACE HEAT FLUX, WHICH FIRST REQUIRES +! CALCULATION OF THE THERMAL DIFFUSIVITY. TREATMENT OF THE +! LATTER FOLLOWS THAT ON PAGES 148-149 FROM "HEAT TRANSFER IN +! COLD CLIMATES", BY V. J. LUNARDINI (PUBLISHED IN 1981 +! BY VAN NOSTRAND REINHOLD CO.) I.E. TREATMENT OF TWO CONTIGUOUS +! "PLANE PARALLEL" MEDIUMS (NAMELY HERE THE FIRST SOIL LAYER +! AND THE SNOWPACK LAYER, IF ANY). THIS DIFFUSIVITY TREATMENT +! BEHAVES WELL FOR BOTH ZERO AND NONZERO SNOWPACK, INCLUDING THE +! LIMIT OF VERY THIN SNOWPACK. THIS TREATMENT ALSO ELIMINATES +! THE NEED TO IMPOSE AN ARBITRARY UPPER BOUND ON SUBSURFACE +! HEAT FLUX WHEN THE SNOWPACK BECOMES EXTREMELY THIN. +! ---------------------------------------------------------------------- +! FIRST CALCULATE THERMAL DIFFUSIVITY OF TOP SOIL LAYER, USING +! BOTH THE FROZEN AND LIQUID SOIL MOISTURE, FOLLOWING THE +! SOIL THERMAL DIFFUSIVITY FUNCTION OF PETERS-LIDARD ET AL. +! (1998,JAS, VOL 55, 1209-1224), WHICH REQUIRES THE SPECIFYING +! THE QUARTZ CONTENT OF THE GIVEN SOIL CLASS (SEE ROUTINE REDPRM) +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! NEXT ADD SUBSURFACE HEAT FLUX REDUCTION EFFECT FROM THE +! OVERLYING GREEN CANOPY, ADAPTED FROM SECTION 2.1.2 OF +! PETERS-LIDARD ET AL. (1997, JGR, VOL 102(D4)) +! ---------------------------------------------------------------------- + CALL TDFCND (DF1,SMC (1),QUARTZ,SMCMAX,SH2O (1),BEXP, PSISAT, SOILTYP, OPT_THCND) + +!urban + IF ( VEGTYP == ISURBAN ) DF1=3.24 + + DF1 = DF1 * EXP (SBETA * SHDFAC) +! +! kmh 09/03/2006 +! kmh 03/25/2008 change SNCOVR threshold to 0.97 +! + IF ( SNCOVR .GT. 0.97 ) THEN + DF1 = SNCOND + ENDIF +! +! ---------------------------------------------------------------------- +! FINALLY "PLANE PARALLEL" SNOWPACK EFFECT FOLLOWING +! V.J. LINARDINI REFERENCE CITED ABOVE. NOTE THAT DTOT IS +! COMBINED DEPTH OF SNOWDEPTH AND THICKNESS OF FIRST SOIL LAYER +! ---------------------------------------------------------------------- + + DSOIL = - (0.5 * ZSOIL (1)) + IF (SNEQV == 0.) THEN + SSOIL = DF1 * (T1- STC (1) ) / DSOIL + ELSE + DTOT = SNOWH + DSOIL + FRCSNO = SNOWH / DTOT + +! 1. HARMONIC MEAN (SERIES FLOW) +! DF1 = (SNCOND*DF1)/(FRCSOI*SNCOND+FRCSNO*DF1) + FRCSOI = DSOIL / DTOT +! 2. ARITHMETIC MEAN (PARALLEL FLOW) +! DF1 = FRCSNO*SNCOND + FRCSOI*DF1 + DF1H = (SNCOND * DF1)/ (FRCSOI * SNCOND+ FRCSNO * DF1) + +! 3. GEOMETRIC MEAN (INTERMEDIATE BETWEEN HARMONIC AND ARITHMETIC MEAN) +! DF1 = (SNCOND**FRCSNO)*(DF1**FRCSOI) +! weigh DF by snow fraction +! DF1 = DF1H*SNCOVR + DF1A*(1.0-SNCOVR) +! DF1 = DF1H*SNCOVR + DF1*(1.0-SNCOVR) + DF1A = FRCSNO * SNCOND+ FRCSOI * DF1 + +! ---------------------------------------------------------------------- +! CALCULATE SUBSURFACE HEAT FLUX, SSOIL, FROM FINAL THERMAL DIFFUSIVITY +! OF SURFACE MEDIUMS, DF1 ABOVE, AND SKIN TEMPERATURE AND TOP +! MID-LAYER SOIL TEMPERATURE +! ---------------------------------------------------------------------- + DF1 = DF1A * SNCOVR + DF1* (1.0- SNCOVR) + SSOIL = DF1 * (T1- STC (1) ) / DTOT + END IF +! ---------------------------------------------------------------------- +! DETERMINE SURFACE ROUGHNESS OVER SNOWPACK USING SNOW CONDITION FROM +! THE PREVIOUS TIMESTEP. +! ---------------------------------------------------------------------- + IF (SNCOVR > 0. ) THEN + CALL SNOWZ0 (SNCOVR,Z0,Z0BRD,SNOWH,FBUR,FGSN,SHDMAX,UA_PHYS) + ELSE + Z0=Z0BRD + IF(UA_PHYS) CALL SNOWZ0 (SNCOVR,Z0,Z0BRD,SNOWH,FBUR,FGSN, & + SHDMAX,UA_PHYS) + END IF +! ---------------------------------------------------------------------- +! NEXT CALL ROUTINE SFCDIF TO CALCULATE THE SFC EXCHANGE COEF (CH) FOR +! HEAT AND MOISTURE. + +! NOTE !!! +! DO NOT CALL SFCDIF UNTIL AFTER ABOVE CALL TO REDPRM, IN CASE +! ALTERNATIVE VALUES OF ROUGHNESS LENGTH (Z0) AND ZILINTINKEVICH COEF +! (CZIL) ARE SET THERE VIA NAMELIST I/O. + +! NOTE !!! +! ROUTINE SFCDIF RETURNS A CH THAT REPRESENTS THE WIND SPD TIMES THE +! "ORIGINAL" NONDIMENSIONAL "Ch" TYPICAL IN LITERATURE. HENCE THE CH +! RETURNED FROM SFCDIF HAS UNITS OF M/S. THE IMPORTANT COMPANION +! COEFFICIENT OF CH, CARRIED HERE AS "RCH", IS THE CH FROM SFCDIF TIMES +! AIR DENSITY AND PARAMETER "CP". "RCH" IS COMPUTED IN "CALL PENMAN". +! RCH RATHER THAN CH IS THE COEFF USUALLY INVOKED LATER IN EQNS. + +! NOTE !!! +! ---------------------------------------------------------------------- +! SFCDIF ALSO RETURNS THE SURFACE EXCHANGE COEFFICIENT FOR MOMENTUM, CM, +! ALSO KNOWN AS THE SURFACE DRAGE COEFFICIENT. Needed as a state variable +! for iterative/implicit solution of CH in SFCDIF +! ---------------------------------------------------------------------- +! IF(.NOT.LCH) THEN +! T1V = T1 * (1.0+ 0.61 * Q2) +! TH2V = TH2 * (1.0+ 0.61 * Q2) +! CALL SFCDIF_off (ZLVL,Z0,T1V,TH2V,SFCSPD,CZIL,CM,CH) +! ENDIF + +! ---------------------------------------------------------------------- +! CALL PENMAN SUBROUTINE TO CALCULATE POTENTIAL EVAPORATION (ETP), AND +! OTHER PARTIAL PRODUCTS AND SUMS SAVE IN COMMON/RITE FOR LATER +! CALCULATIONS. +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! CALCULATE TOTAL DOWNWARD RADIATION (SOLAR PLUS LONGWAVE) NEEDED IN +! PENMAN EP SUBROUTINE THAT FOLLOWS +! ---------------------------------------------------------------------- +! FDOWN = SOLDN * (1.0- ALBEDO) + LWDN + FDOWN = SOLNET + LWDN +! ---------------------------------------------------------------------- +! CALC VIRTUAL TEMPS AND VIRTUAL POTENTIAL TEMPS NEEDED BY SUBROUTINES +! PENMAN. + T2V = SFCTMP * (1.0+ 0.61 * Q2 ) + + iout=0 + if(iout.eq.1) then + print*,'before penman' + print*,' SFCTMP',SFCTMP,'SFCPRS',SFCPRS,'CH',CH,'T2V',T2V, & + 'TH2',TH2,'PRCP',PRCP,'FDOWN',FDOWN,'T24',T24,'SSOIL',SSOIL, & + 'Q2',Q2,'Q2SAT',Q2SAT,'ETP',ETP,'RCH',RCH, & + 'EPSCA',EPSCA,'RR',RR ,'SNOWNG',SNOWNG,'FRZGRA',FRZGRA, & + 'DQSDT2',DQSDT2,'FLX2',FLX2,'SNOWH',SNOWH,'SNEQV',SNEQV, & + ' DSOIL',DSOIL,' FRCSNO',FRCSNO,' SNCOVR',SNCOVR,' DTOT',DTOT, & + ' ZSOIL (1)',ZSOIL(1),' DF1',DF1,'T1',T1,' STC1',STC(1), & + 'ALBEDO',ALBEDO,'SMC',SMC,'STC',STC,'SH2O',SH2O + endif + + CALL PENMAN (SFCTMP,SFCPRS,CH,T2V,TH2,PRCP,FDOWN,T24,SSOIL, & + Q2,Q2SAT,ETP,RCH,EPSCA,RR,SNOWNG,FRZGRA, & + DQSDT2,FLX2,EMISSI,SNEQV,T1,SNCOVR,AOASIS, & + ALBEDO,SOLDN,FVB,GAMA,STC(1),ETPN,FLX4,UA_PHYS, & + CP,RD,SIGMA,CPH2O,CPICE,LSUBF) +! +! ---------------------------------------------------------------------- +! CALL CANRES TO CALCULATE THE CANOPY RESISTANCE AND CONVERT IT INTO PC +! IF NONZERO GREENNESS FRACTION +! ---------------------------------------------------------------------- + +! ---------------------------------------------------------------------- +! FROZEN GROUND EXTENSION: TOTAL SOIL WATER "SMC" WAS REPLACED +! BY UNFROZEN SOIL WATER "SH2O" IN CALL TO CANRES BELOW +! ---------------------------------------------------------------------- + IF ( (SHDFAC > 0.) .AND. (XLAI > 0.) ) THEN + CALL CANRES (SOLDN,CH,SFCTMP,Q2,SFCPRS,SH2O,ZSOIL,NSOIL, & + SMCWLT,SMCREF,RSMIN,RC,PC,NROOT,Q2SAT,DQSDT2, & + TOPT,RSMAX,RGL,HS,XLAI, & + RCS,RCT,RCQ,RCSOIL,EMISSI,CP,RD,SIGMA) + ELSE + RC = 0.0 + END IF +! ---------------------------------------------------------------------- +! NOW DECIDE MAJOR PATHWAY BRANCH TO TAKE DEPENDING ON WHETHER SNOWPACK +! EXISTS OR NOT: +! ---------------------------------------------------------------------- + ESNOW = 0.0 + IF (SNEQV == 0.0) THEN + CALL NOPAC (ETP,ETA,PRCP,SMC,SMCMAX,SMCWLT, & + SMCREF,SMCDRY,CMC,CMCMAX,NSOIL,DT, & + SHDFAC, & + SBETA,Q2,T1,SFCTMP,T24,TH2,FDOWN,F1,EMISSI, & + SSOIL, & + STC,EPSCA,BEXP,PC,RCH,RR,CFACTR, & + SH2O,SLOPE,KDT,FRZX,PSISAT,ZSOIL, & + DKSAT,DWSAT,TBOT,ZBOT,RUNOFF1,RUNOFF2, & + RUNOFF3,EDIR,EC,ET,ETT,NROOT,RTDIS, & + QUARTZ,FXEXP,CSOIL, & + BETA,DRIP,DEW,FLX1,FLX3,VEGTYP,ISURBAN, & + SFHEAD1RT,INFXS1RT,ETPND1,SOILTYP,OPT_THCND & + ,XSDA_QFX,QFX_PHY,XQNORM,fasdas,HCPCT_FASDAS, & !fasdas + SIGMA,CPH2O) + ETA_KINEMATIC = ETA + ELSE + CALL SNOPAC (ETP,ETA,PRCP,PRCPF,SNOWNG,SMC,SMCMAX,SMCWLT, & + SMCREF,SMCDRY,CMC,CMCMAX,NSOIL,DT, & + SBETA,DF1, & + Q2,T1,SFCTMP,T24,TH2,FDOWN,F1,SSOIL,STC,EPSCA, & + SFCPRS,BEXP,PC,RCH,RR,CFACTR,SNCOVR,SNEQV,SNDENS,& + SNOWH,SH2O,SLOPE,KDT,FRZX,PSISAT, & + ZSOIL,DWSAT,DKSAT,TBOT,ZBOT,SHDFAC,RUNOFF1, & + RUNOFF2,RUNOFF3,EDIR,EC,ET,ETT,NROOT,SNOMLT, & + RTDIS,QUARTZ,FXEXP,CSOIL, & + BETA,DRIP,DEW,FLX1,FLX2,FLX3,ESNOW,ETNS,EMISSI, & + RIBB,SOLDN, & + ISURBAN, & + VEGTYP, & + ETPN,FLX4,UA_PHYS, & + SFHEAD1RT,INFXS1RT,ETPND1,SOILTYP,OPT_THCND & + ,QFX_PHY,fasdas,HCPCT_FASDAS,SIGMA,CPH2O,CPICE, & !fasdas + LSUBF) + ETA_KINEMATIC = ESNOW + ETNS - 1000.0*DEW + END IF + +! Calculate effective mixing ratio at grnd level (skin) +! +! Q1=Q2+ETA*CP/RCH + Q1=Q2+ETA_KINEMATIC*CP/RCH +! +! ---------------------------------------------------------------------- +! DETERMINE SENSIBLE HEAT (H) IN ENERGY UNITS (W M-2) +! ---------------------------------------------------------------------- + + SHEAT = - (CH * CP * SFCPRS)/ (R * T2V) * ( TH2- T1 ) + IF(UA_PHYS) SHEAT = SHEAT + FLX4 +! +! FASDAS +! + IF ( fasdas == 1 ) THEN + HFX_PHY = SHEAT + ENDIF +! +! END FASDAS +! +! ---------------------------------------------------------------------- +! CONVERT EVAP TERMS FROM KINEMATIC (KG M-2 S-1) TO ENERGY UNITS (W M-2) +! ---------------------------------------------------------------------- + EDIR = EDIR * LVH2O + EC = EC * LVH2O + DO K=1,4 + ET(K) = ET(K) * LVH2O + ENDDO + ETT = ETT * LVH2O + + ETPND1=ETPND1 * LVH2O + + ESNOW = ESNOW * LSUBS + ETP = ETP*((1.-SNCOVR)*LVH2O + SNCOVR*LSUBS) + IF(UA_PHYS) ETPN = ETPN*((1.-SNCOVR)*LVH2O + SNCOVR*LSUBS) + IF (ETP .GT. 0.) THEN + ETA = EDIR + EC + ETT + ESNOW + ELSE + ETA = ETP + ENDIF +! ---------------------------------------------------------------------- +! DETERMINE BETA (RATIO OF ACTUAL TO POTENTIAL EVAP) +! ---------------------------------------------------------------------- + IF (ETP == 0.0) THEN + BETA = 0.0 + ELSE + BETA = ETA/ETP + ENDIF + +! ---------------------------------------------------------------------- +! CONVERT THE SIGN OF SOIL HEAT FLUX SO THAT: +! SSOIL>0: WARM THE SURFACE (NIGHT TIME) +! SSOIL<0: COOL THE SURFACE (DAY TIME) +! ---------------------------------------------------------------------- + SSOIL = -1.0* SSOIL + +! ---------------------------------------------------------------------- +! FOR THE CASE OF LAND: +! CONVERT RUNOFF3 (INTERNAL LAYER RUNOFF FROM SUPERSAT) FROM M TO M S-1 +! AND ADD TO SUBSURFACE RUNOFF/DRAINAGE/BASEFLOW. RUNOFF2 IS ALREADY +! A RATE AT THIS POINT +! ---------------------------------------------------------------------- + RUNOFF3 = RUNOFF3/ DT + RUNOFF2 = RUNOFF2+ RUNOFF3 + SOILM = -1.0* SMC (1)* ZSOIL (1) + DO K = 2,NSOIL + SOILM = SOILM + SMC (K)* (ZSOIL (K -1) - ZSOIL (K)) + END DO + SOILWM = -1.0* (SMCMAX - SMCWLT)* ZSOIL (1) + SOILWW = -1.0* (SMC (1) - SMCWLT)* ZSOIL (1) + + DO K = 1,NSOIL + SMAV(K)=(SMC(K) - SMCWLT)/(SMCMAX - SMCWLT) + END DO + + IF (NROOT >= 2) THEN + DO K = 2,NROOT + SOILWM = SOILWM + (SMCMAX - SMCWLT)* (ZSOIL (K -1) - ZSOIL (K)) + SOILWW = SOILWW + (SMC(K) - SMCWLT)* (ZSOIL (K -1) - ZSOIL (K)) + END DO + END IF + IF (SOILWM .LT. 1.E-6) THEN + SOILWM = 0.0 + SOILW = 0.0 + SOILM = 0.0 + ELSE + SOILW = SOILWW / SOILWM + END IF + +! ---------------------------------------------------------------------- + END SUBROUTINE SFLX +! ---------------------------------------------------------------------- + + SUBROUTINE ALCALC (ALB,SNOALB,EMBRD,SHDFAC,SHDMIN,SNCOVR,TSNOW,ALBEDO,EMISSI, & + DT,SNOWNG,SNOTIME1,LVCOEF) + +! ---------------------------------------------------------------------- +! CALCULATE ALBEDO INCLUDING SNOW EFFECT (0 -> 1) +! ALB SNOWFREE ALBEDO +! SNOALB MAXIMUM (DEEP) SNOW ALBEDO +! SHDFAC AREAL FRACTIONAL COVERAGE OF GREEN VEGETATION +! SHDMIN MINIMUM AREAL FRACTIONAL COVERAGE OF GREEN VEGETATION +! SNCOVR FRACTIONAL SNOW COVER +! ALBEDO SURFACE ALBEDO INCLUDING SNOW EFFECT +! TSNOW SNOW SURFACE TEMPERATURE (K) +! ---------------------------------------------------------------------- + IMPLICIT NONE + +! ---------------------------------------------------------------------- +! SNOALB IS ARGUMENT REPRESENTING MAXIMUM ALBEDO OVER DEEP SNOW, +! AS PASSED INTO SFLX, AND ADAPTED FROM THE SATELLITE-BASED MAXIMUM +! SNOW ALBEDO FIELDS PROVIDED BY D. ROBINSON AND G. KUKLA +! (1985, JCAM, VOL 24, 402-411) +! ---------------------------------------------------------------------- + REAL, INTENT(IN) :: ALB, SNOALB, EMBRD, SHDFAC, SHDMIN, SNCOVR, TSNOW + REAL, INTENT(IN) :: DT + LOGICAL, INTENT(IN) :: SNOWNG + REAL, INTENT(INOUT):: SNOTIME1 + REAL, INTENT(OUT) :: ALBEDO, EMISSI + REAL :: SNOALB2 + REAL :: TM,SNOALB1 + REAL, INTENT(IN) :: LVCOEF + REAL, PARAMETER :: SNACCA=0.94,SNACCB=0.58,SNTHWA=0.82,SNTHWB=0.46 +! turn of vegetation effect +! ALBEDO = ALB + (1.0- (SHDFAC - SHDMIN))* SNCOVR * (SNOALB - ALB) +! ALBEDO = (1.0-SNCOVR)*ALB + SNCOVR*SNOALB !this is equivalent to below + ALBEDO = ALB + SNCOVR*(SNOALB-ALB) + EMISSI = EMBRD + SNCOVR*(EMISSI_S - EMBRD) + +! BASE FORMULATION (DICKINSON ET AL., 1986, COGLEY ET AL., 1990) +! IF (TSNOW.LE.263.16) THEN +! ALBEDO=SNOALB +! ELSE +! IF (TSNOW.LT.273.16) THEN +! TM=0.1*(TSNOW-263.16) +! SNOALB1=0.5*((0.9-0.2*(TM**3))+(0.8-0.16*(TM**3))) +! ELSE +! SNOALB1=0.67 +! IF(SNCOVR.GT.0.95) SNOALB1= 0.6 +! SNOALB1 = ALB + SNCOVR*(SNOALB-ALB) +! ENDIF +! ENDIF +! ALBEDO = ALB + SNCOVR*(SNOALB1-ALB) + +! ISBA FORMULATION (VERSEGHY, 1991; BAKER ET AL., 1990) +! SNOALB1 = SNOALB+COEF*(0.85-SNOALB) +! SNOALB2=SNOALB1 +!!m LSTSNW=LSTSNW+1 +! SNOTIME1 = SNOTIME1 + DT +! IF (SNOWNG) THEN +! SNOALB2=SNOALB +!!m LSTSNW=0 +! SNOTIME1 = 0.0 +! ELSE +! IF (TSNOW.LT.273.16) THEN +!! SNOALB2=SNOALB-0.008*LSTSNW*DT/86400 +!!m SNOALB2=SNOALB-0.008*SNOTIME1/86400 +! SNOALB2=(SNOALB2-0.65)*EXP(-0.05*DT/3600)+0.65 +!! SNOALB2=(ALBEDO-0.65)*EXP(-0.01*DT/3600)+0.65 +! ELSE +! SNOALB2=(SNOALB2-0.5)*EXP(-0.0005*DT/3600)+0.5 +!! SNOALB2=(SNOALB-0.5)*EXP(-0.24*LSTSNW*DT/86400)+0.5 +!!m SNOALB2=(SNOALB-0.5)*EXP(-0.24*SNOTIME1/86400)+0.5 +! ENDIF +! ENDIF +! +!! print*,'SNOALB2',SNOALB2,'ALBEDO',ALBEDO,'DT',DT +! ALBEDO = ALB + SNCOVR*(SNOALB2-ALB) +! IF (ALBEDO .GT. SNOALB2) ALBEDO=SNOALB2 +!!m LSTSNW1=LSTSNW +!! SNOTIME = SNOTIME1 + +! formulation by Livneh +! ---------------------------------------------------------------------- +! SNOALB IS CONSIDERED AS THE MAXIMUM SNOW ALBEDO FOR NEW SNOW, AT +! A VALUE OF 85%. SNOW ALBEDO CURVE DEFAULTS ARE FROM BRAS P.263. SHOULD +! NOT BE CHANGED EXCEPT FOR SERIOUS PROBLEMS WITH SNOW MELT. +! TO IMPLEMENT ACCUMULATIN PARAMETERS, SNACCA AND SNACCB, ASSERT THAT IT +! IS INDEED ACCUMULATION SEASON. I.E. THAT SNOW SURFACE TEMP IS BELOW +! ZERO AND THE DATE FALLS BETWEEN OCTOBER AND FEBRUARY +! ---------------------------------------------------------------------- + SNOALB1 = SNOALB+LVCOEF*(0.85-SNOALB) + SNOALB2=SNOALB1 +! ---------------- Initial LSTSNW -------------------------------------- + IF (SNOWNG) THEN + SNOTIME1 = 0. + ELSE + SNOTIME1=SNOTIME1+DT +! IF (TSNOW.LT.273.16) THEN + SNOALB2=SNOALB1*(SNACCA**((SNOTIME1/86400.0)**SNACCB)) +! ELSE +! SNOALB2 =SNOALB1*(SNTHWA**((SNOTIME1/86400.0)**SNTHWB)) +! ENDIF + ENDIF +! + SNOALB2 = MAX ( SNOALB2, ALB ) + ALBEDO = ALB + SNCOVR*(SNOALB2-ALB) + IF (ALBEDO .GT. SNOALB2) ALBEDO=SNOALB2 + +! IF (TSNOW.LT.273.16) THEN +! ALBEDO=SNOALB-0.008*DT/86400 +! ELSE +! ALBEDO=(SNOALB-0.5)*EXP(-0.24*DT/86400)+0.5 +! ENDIF + +! IF (ALBEDO > SNOALB) ALBEDO = SNOALB + +! ---------------------------------------------------------------------- + END SUBROUTINE ALCALC +! ---------------------------------------------------------------------- + + SUBROUTINE CANRES (SOLAR,CH,SFCTMP,Q2,SFCPRS,SMC,ZSOIL,NSOIL, & + SMCWLT,SMCREF,RSMIN,RC,PC,NROOT,Q2SAT,DQSDT2, & + TOPT,RSMAX,RGL,HS,XLAI, & + RCS,RCT,RCQ,RCSOIL,EMISSI,CP,RD,SIGMA) + +! ---------------------------------------------------------------------- +! SUBROUTINE CANRES +! ---------------------------------------------------------------------- +! CALCULATE CANOPY RESISTANCE WHICH DEPENDS ON INCOMING SOLAR RADIATION, +! AIR TEMPERATURE, ATMOSPHERIC WATER VAPOR PRESSURE DEFICIT AT THE +! LOWEST MODEL LEVEL, AND SOIL MOISTURE (PREFERABLY UNFROZEN SOIL +! MOISTURE RATHER THAN TOTAL) +! ---------------------------------------------------------------------- +! SOURCE: JARVIS (1976), NOILHAN AND PLANTON (1989, MWR), JACQUEMIN AND +! NOILHAN (1990, BLM) +! SEE ALSO: CHEN ET AL (1996, JGR, VOL 101(D3), 7251-7268), EQNS 12-14 +! AND TABLE 2 OF SEC. 3.1.2 +! ---------------------------------------------------------------------- +! INPUT: +! SOLAR INCOMING SOLAR RADIATION +! CH SURFACE EXCHANGE COEFFICIENT FOR HEAT AND MOISTURE +! SFCTMP AIR TEMPERATURE AT 1ST LEVEL ABOVE GROUND +! Q2 AIR HUMIDITY AT 1ST LEVEL ABOVE GROUND +! Q2SAT SATURATION AIR HUMIDITY AT 1ST LEVEL ABOVE GROUND +! DQSDT2 SLOPE OF SATURATION HUMIDITY FUNCTION WRT TEMP +! SFCPRS SURFACE PRESSURE +! SMC VOLUMETRIC SOIL MOISTURE +! ZSOIL SOIL DEPTH (NEGATIVE SIGN, AS IT IS BELOW GROUND) +! NSOIL NO. OF SOIL LAYERS +! NROOT NO. OF SOIL LAYERS IN ROOT ZONE (1.LE.NROOT.LE.NSOIL) +! XLAI LEAF AREA INDEX +! SMCWLT WILTING POINT +! SMCREF REFERENCE SOIL MOISTURE (WHERE SOIL WATER DEFICIT STRESS +! SETS IN) +! RSMIN, RSMAX, TOPT, RGL, HS ARE CANOPY STRESS PARAMETERS SET IN +! SURBOUTINE REDPRM +! CP specific heat of dry air at constant pressure +! OUTPUT: +! PC PLANT COEFFICIENT +! RC CANOPY RESISTANCE +! ---------------------------------------------------------------------- + + IMPLICIT NONE + INTEGER, INTENT(IN) :: NROOT,NSOIL + INTEGER K + REAL, INTENT(IN) :: CH,DQSDT2,HS,Q2,Q2SAT,RSMIN,RGL,RSMAX, & + SFCPRS,SFCTMP,SMCREF,SMCWLT, SOLAR,TOPT,XLAI, & + EMISSI, CP, RD, SIGMA + REAL,DIMENSION(1:NSOIL), INTENT(IN) :: SMC,ZSOIL + REAL, INTENT(OUT):: PC,RC,RCQ,RCS,RCSOIL,RCT + REAL :: DELTA,FF,GX,P,RR + REAL, DIMENSION(1:NSOIL) :: PART + REAL, PARAMETER :: SLV = 2.501000E6 + + +! ---------------------------------------------------------------------- +! INITIALIZE CANOPY RESISTANCE MULTIPLIER TERMS. +! ---------------------------------------------------------------------- + RCS = 0.0 + RCT = 0.0 + RCQ = 0.0 + RCSOIL = 0.0 + +! ---------------------------------------------------------------------- +! CONTRIBUTION DUE TO INCOMING SOLAR RADIATION +! ---------------------------------------------------------------------- + RC = 0.0 + FF = 0.55*2.0* SOLAR / (RGL * XLAI) + RCS = (FF + RSMIN / RSMAX) / (1.0+ FF) + +! ---------------------------------------------------------------------- +! CONTRIBUTION DUE TO AIR TEMPERATURE AT FIRST MODEL LEVEL ABOVE GROUND +! RCT EXPRESSION FROM NOILHAN AND PLANTON (1989, MWR). +! ---------------------------------------------------------------------- + RCS = MAX (RCS,0.0001) + RCT = 1.0- 0.0016* ( (TOPT - SFCTMP)**2.0) + +! ---------------------------------------------------------------------- +! CONTRIBUTION DUE TO VAPOR PRESSURE DEFICIT AT FIRST MODEL LEVEL. +! RCQ EXPRESSION FROM SSIB +! ---------------------------------------------------------------------- + RCT = MAX (RCT,0.0001) + RCQ = 1.0/ (1.0+ HS * (Q2SAT - Q2)) + +! ---------------------------------------------------------------------- +! CONTRIBUTION DUE TO SOIL MOISTURE AVAILABILITY. +! DETERMINE CONTRIBUTION FROM EACH SOIL LAYER, THEN ADD THEM UP. +! ---------------------------------------------------------------------- + RCQ = MAX (RCQ,0.01) + GX = (SMC (1) - SMCWLT) / (SMCREF - SMCWLT) + IF (GX > 1.) GX = 1. + IF (GX < 0.) GX = 0. + +! ---------------------------------------------------------------------- +! USE SOIL DEPTH AS WEIGHTING FACTOR +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! USE ROOT DISTRIBUTION AS WEIGHTING FACTOR +! PART(1) = RTDIS(1) * GX +! ---------------------------------------------------------------------- + PART (1) = (ZSOIL (1)/ ZSOIL (NROOT)) * GX + DO K = 2,NROOT + GX = (SMC (K) - SMCWLT) / (SMCREF - SMCWLT) + IF (GX > 1.) GX = 1. + IF (GX < 0.) GX = 0. +! ---------------------------------------------------------------------- +! USE SOIL DEPTH AS WEIGHTING FACTOR +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! USE ROOT DISTRIBUTION AS WEIGHTING FACTOR +! PART(K) = RTDIS(K) * GX +! ---------------------------------------------------------------------- + PART (K) = ( (ZSOIL (K) - ZSOIL (K -1))/ ZSOIL (NROOT)) * GX + END DO + DO K = 1,NROOT + RCSOIL = RCSOIL + PART (K) + END DO + +! ---------------------------------------------------------------------- +! DETERMINE CANOPY RESISTANCE DUE TO ALL FACTORS. CONVERT CANOPY +! RESISTANCE (RC) TO PLANT COEFFICIENT (PC) TO BE USED WITH POTENTIAL +! EVAP IN DETERMINING ACTUAL EVAP. PC IS DETERMINED BY: +! PC * LINERIZED PENMAN POTENTIAL EVAP = +! PENMAN-MONTEITH ACTUAL EVAPORATION (CONTAINING RC TERM). +! ---------------------------------------------------------------------- + RCSOIL = MAX (RCSOIL,0.0001) + + RC = RSMIN / (XLAI * RCS * RCT * RCQ * RCSOIL) +! RR = (4.* SIGMA * RD / CP)* (SFCTMP **4.)/ (SFCPRS * CH) + 1.0 + RR = (4.* EMISSI *SIGMA * RD / CP)* (SFCTMP **4.)/ (SFCPRS * CH) & + + 1.0 + + DELTA = (SLV / CP)* DQSDT2 + + PC = (RR + DELTA)/ (RR * (1. + RC * CH) + DELTA) + +! ---------------------------------------------------------------------- + END SUBROUTINE CANRES +! ---------------------------------------------------------------------- + + SUBROUTINE CSNOW (SNCOND,DSNOW) + +! ---------------------------------------------------------------------- +! SUBROUTINE CSNOW +! FUNCTION CSNOW +! ---------------------------------------------------------------------- +! CALCULATE SNOW TERMAL CONDUCTIVITY +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: DSNOW + REAL, INTENT(OUT):: SNCOND + REAL :: C + REAL, PARAMETER :: UNIT = 0.11631 + +! ---------------------------------------------------------------------- +! SNCOND IN UNITS OF CAL/(CM*HR*C), RETURNED IN W/(M*C) +! CSNOW IN UNITS OF CAL/(CM*HR*C), RETURNED IN W/(M*C) +! BASIC VERSION IS DYACHKOVA EQUATION (1960), FOR RANGE 0.1-0.4 +! ---------------------------------------------------------------------- + C = 0.328*10** (2.25* DSNOW) +! CSNOW=UNIT*C + +! ---------------------------------------------------------------------- +! DE VAUX EQUATION (1933), IN RANGE 0.1-0.6 +! ---------------------------------------------------------------------- +! SNCOND=0.0293*(1.+100.*DSNOW**2) +! CSNOW=0.0293*(1.+100.*DSNOW**2) + +! ---------------------------------------------------------------------- +! E. ANDERSEN FROM FLERCHINGER +! ---------------------------------------------------------------------- +! SNCOND=0.021+2.51*DSNOW**2 +! CSNOW=0.021+2.51*DSNOW**2 + +! SNCOND = UNIT * C +! double snow thermal conductivity + SNCOND = 2.0 * UNIT * C + +! ---------------------------------------------------------------------- + END SUBROUTINE CSNOW +! ---------------------------------------------------------------------- + SUBROUTINE DEVAP (EDIR,ETP1,SMC,ZSOIL,SHDFAC,SMCMAX,BEXP, & + DKSAT,DWSAT,SMCDRY,SMCREF,SMCWLT,FXEXP) + +! ---------------------------------------------------------------------- +! SUBROUTINE DEVAP +! FUNCTION DEVAP +! ---------------------------------------------------------------------- +! CALCULATE DIRECT SOIL EVAPORATION +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: ETP1,SMC,BEXP,DKSAT,DWSAT,FXEXP, & + SHDFAC,SMCDRY,SMCMAX,ZSOIL,SMCREF,SMCWLT + REAL, INTENT(OUT):: EDIR + REAL :: FX, SRATIO + + +! ---------------------------------------------------------------------- +! DIRECT EVAP A FUNCTION OF RELATIVE SOIL MOISTURE AVAILABILITY, LINEAR +! WHEN FXEXP=1. +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! FX > 1 REPRESENTS DEMAND CONTROL +! FX < 1 REPRESENTS FLUX CONTROL +! ---------------------------------------------------------------------- + + SRATIO = (SMC - SMCDRY) / (SMCMAX - SMCDRY) + IF (SRATIO > 0.) THEN + FX = SRATIO**FXEXP + FX = MAX ( MIN ( FX, 1. ) ,0. ) + ELSE + FX = 0. + ENDIF + +! ---------------------------------------------------------------------- +! ALLOW FOR THE DIRECT-EVAP-REDUCING EFFECT OF SHADE +! ---------------------------------------------------------------------- + EDIR = FX * ( 1.0- SHDFAC ) * ETP1 + +! ---------------------------------------------------------------------- + END SUBROUTINE DEVAP + + SUBROUTINE DEVAP_hydro (EDIR,ETP1,SMC,ZSOIL,SHDFAC,SMCMAX,BEXP, & + DKSAT,DWSAT,SMCDRY,SMCREF,SMCWLT,FXEXP, & + SFHEAD1RT,ETPND1,DT) + +! ---------------------------------------------------------------------- +! SUBROUTINE DEVAP +! FUNCTION DEVAP +! ---------------------------------------------------------------------- +! CALCULATE DIRECT SOIL EVAPORATION +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: ETP1,SMC,BEXP,DKSAT,DWSAT,FXEXP, & + SHDFAC,SMCDRY,SMCMAX,ZSOIL,SMCREF,SMCWLT + REAL, INTENT(OUT):: EDIR + REAL :: FX, SRATIO + + REAL, INTENT(INOUT) :: SFHEAD1RT,ETPND1 + REAL, INTENT(IN ) :: DT + REAL :: EDIRTMP + + + +! ---------------------------------------------------------------------- +! DIRECT EVAP A FUNCTION OF RELATIVE SOIL MOISTURE AVAILABILITY, LINEAR +! WHEN FXEXP=1. +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! FX > 1 REPRESENTS DEMAND CONTROL +! FX < 1 REPRESENTS FLUX CONTROL +! ---------------------------------------------------------------------- + + SRATIO = (SMC - SMCDRY) / (SMCMAX - SMCDRY) + IF (SRATIO > 0.) THEN + FX = SRATIO**FXEXP + FX = MAX ( MIN ( FX, 1. ) ,0. ) + ELSE + FX = 0. + ENDIF + +!DJG NDHMS/WRF-Hydro edits... Adjustment for ponded surface water : Reduce ETP1 + EDIRTMP = 0. + ETPND1 = 0. + +!DJG NDHMS/WRF-Hydro edits... Calc Max Potential Dir Evap. (ETP1 units: }=m/s) + +!DJG NDHMS/WRF-Hydro...currently set ponded water evap to 0.0 until further notice...11/5/2012 +!EDIRTMP = ( 1.0- SHDFAC ) * ETP1 + +! Convert all units to (m) +! Convert EDIRTMP from (kg m{-2} s{-1}=m/s) to (m) ... + EDIRTMP = EDIRTMP * DT + +!DJG NDHMS/WRF-Hydro edits... Convert SFHEAD from (mm) to (m) ... + SFHEAD1RT=SFHEAD1RT * 0.001 + + + +!DJG NDHMS/WRF-Hydro edits... Calculate ETPND as reduction in EDIR(TMP)... + IF (EDIRTMP > 0.) THEN + IF ( EDIRTMP > SFHEAD1RT ) THEN + ETPND1 = SFHEAD1RT + SFHEAD1RT=0. + EDIRTMP = EDIRTMP - ETPND1 + ELSE + ETPND1 = EDIRTMP + EDIRTMP = 0. + SFHEAD1RT = SFHEAD1RT - ETPND1 + END IF + END IF + +!DJG NDHMS/WRF-Hydro edits... Convert SFHEAD units back to (mm) + IF ( SFHEAD1RT /= 0.) SFHEAD1RT=SFHEAD1RT * 1000. + +!DJG NDHMS/WRF-Hydro edits...Convert ETPND and EDIRTMP back to (mm/s=kg m{-2} s{-1}) + ETPND1 = ETPND1 / DT + EDIRTMP = EDIRTMP / DT +!DEBUG print *, "After DEVAP...SFCHEAD+ETPND1",SFHEAD1RT+ETPND1*DT + + +! ---------------------------------------------------------------------- +! ALLOW FOR THE DIRECT-EVAP-REDUCING EFFECT OF SHADE +! ---------------------------------------------------------------------- +!DJG NDHMS/WRF-Hydro edits... +! EDIR = FX * ( 1.0- SHDFAC ) * ETP1 + EDIR = FX * EDIRTMP + + + + +! ---------------------------------------------------------------------- + END SUBROUTINE DEVAP_hydro +! ---------------------------------------------------------------------- + + SUBROUTINE EVAPO (ETA1,SMC,NSOIL,CMC,ETP1,DT,ZSOIL, & + SH2O, & + SMCMAX,BEXP,PC,SMCWLT,DKSAT,DWSAT, & + SMCREF,SHDFAC,CMCMAX, & + SMCDRY,CFACTR, & + EDIR,EC,ET,ETT,SFCTMP,Q2,NROOT,RTDIS,FXEXP, & + SFHEAD1RT,ETPND1) + +! ---------------------------------------------------------------------- +! SUBROUTINE EVAPO +! ---------------------------------------------------------------------- +! CALCULATE SOIL MOISTURE FLUX. THE SOIL MOISTURE CONTENT (SMC - A PER +! UNIT VOLUME MEASUREMENT) IS A DEPENDENT VARIABLE THAT IS UPDATED WITH +! PROGNOSTIC EQNS. THE CANOPY MOISTURE CONTENT (CMC) IS ALSO UPDATED. +! FROZEN GROUND VERSION: NEW STATES ADDED: SH2O, AND FROZEN GROUND +! CORRECTION FACTOR, FRZFACT AND PARAMETER SLOPE. +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER, INTENT(IN) :: NSOIL, NROOT + INTEGER :: I,K + REAL, INTENT(IN) :: BEXP, CFACTR,CMC,CMCMAX,DKSAT, & + DT,DWSAT,ETP1,FXEXP,PC,Q2,SFCTMP, & + SHDFAC,SMCDRY,SMCMAX,SMCREF,SMCWLT + REAL, INTENT(OUT) :: EC,EDIR,ETA1,ETT + REAL :: CMC2MS + REAL,DIMENSION(1:NSOIL), INTENT(IN) :: RTDIS, SMC, SH2O, ZSOIL + REAL,DIMENSION(1:NSOIL), INTENT(OUT) :: ET + + REAL, INTENT(INOUT) :: SFHEAD1RT,ETPND1 + +! ---------------------------------------------------------------------- +! EXECUTABLE CODE BEGINS HERE IF THE POTENTIAL EVAPOTRANSPIRATION IS +! GREATER THAN ZERO. +! ---------------------------------------------------------------------- + EDIR = 0. + EC = 0. + ETT = 0. + DO K = 1,NSOIL + ET (K) = 0. + END DO + +! ---------------------------------------------------------------------- +! RETRIEVE DIRECT EVAPORATION FROM SOIL SURFACE. CALL THIS FUNCTION +! ONLY IF VEG COVER NOT COMPLETE. +! FROZEN GROUND VERSION: SH2O STATES REPLACE SMC STATES. +! ---------------------------------------------------------------------- + IF (ETP1 > 0.0) THEN + IF (SHDFAC < 1.) THEN +#ifdef WRF_HYDRO +! CALL DEVAP_hydro (EDIR,ETP1,SMC (1),ZSOIL (1),SHDFAC,SMCMAX, & +! BEXP,DKSAT,DWSAT,SMCDRY,SMCREF,SMCWLT,FXEXP, & +! SFHEAD1RT,ETPND1,DT) +!DJG Reduce ETP1 by EDIR & ETPND1... +! ETP1=ETP1-EDIR-ETPND1 + +! following is the temparay setting ... + CALL DEVAP (EDIR,ETP1,SMC (1),ZSOIL (1),SHDFAC,SMCMAX, & + BEXP,DKSAT,DWSAT,SMCDRY,SMCREF,SMCWLT,FXEXP) +! ETP1=ETP1-EDIR +#else + CALL DEVAP (EDIR,ETP1,SMC (1),ZSOIL (1),SHDFAC,SMCMAX, & + BEXP,DKSAT,DWSAT,SMCDRY,SMCREF,SMCWLT,FXEXP) +#endif + END IF +! ---------------------------------------------------------------------- +! INITIALIZE PLANT TOTAL TRANSPIRATION, RETRIEVE PLANT TRANSPIRATION, +! AND ACCUMULATE IT FOR ALL SOIL LAYERS. +! ---------------------------------------------------------------------- + + IF (SHDFAC > 0.0) THEN + CALL TRANSP (ET,NSOIL,ETP1,SH2O,CMC,ZSOIL,SHDFAC,SMCWLT, & + CMCMAX,PC,CFACTR,SMCREF,SFCTMP,Q2,NROOT,RTDIS) + DO K = 1,NSOIL + ETT = ETT + ET ( K ) + END DO +! ---------------------------------------------------------------------- +! CALCULATE CANOPY EVAPORATION. +! IF STATEMENTS TO AVOID TANGENT LINEAR PROBLEMS NEAR CMC=0.0. +! ---------------------------------------------------------------------- + IF (CMC > 0.0) THEN + EC = SHDFAC * ( ( CMC / CMCMAX ) ** CFACTR ) * ETP1 + ELSE + EC = 0.0 + END IF +! ---------------------------------------------------------------------- +! EC SHOULD BE LIMITED BY THE TOTAL AMOUNT OF AVAILABLE WATER ON THE +! CANOPY. -F.CHEN, 18-OCT-1994 +! ---------------------------------------------------------------------- + CMC2MS = CMC / DT + EC = MIN ( CMC2MS, EC ) + END IF + END IF +! ---------------------------------------------------------------------- +! TOTAL UP EVAP AND TRANSP TYPES TO OBTAIN ACTUAL EVAPOTRANSP +! ---------------------------------------------------------------------- + ETA1 = EDIR + ETT + EC + +! ---------------------------------------------------------------------- + END SUBROUTINE EVAPO +! ---------------------------------------------------------------------- + + SUBROUTINE FAC2MIT(SMCMAX,FLIMIT) + IMPLICIT NONE + REAL, INTENT(IN) :: SMCMAX + REAL, INTENT(OUT) :: FLIMIT + + FLIMIT = 0.90 + + IF ( SMCMAX == 0.395 ) THEN + FLIMIT = 0.59 + ELSE IF ( ( SMCMAX == 0.434 ) .OR. ( SMCMAX == 0.404 ) ) THEN + FLIMIT = 0.85 + ELSE IF ( ( SMCMAX == 0.465 ) .OR. ( SMCMAX == 0.406 ) ) THEN + FLIMIT = 0.86 + ELSE IF ( ( SMCMAX == 0.476 ) .OR. ( SMCMAX == 0.439 ) ) THEN + FLIMIT = 0.74 + ELSE IF ( ( SMCMAX == 0.200 ) .OR. ( SMCMAX == 0.464 ) ) THEN + FLIMIT = 0.80 + ENDIF + +! ---------------------------------------------------------------------- + END SUBROUTINE FAC2MIT +! ---------------------------------------------------------------------- + + SUBROUTINE FRH2O (FREE,TKELV,SMC,SH2O,SMCMAX,BEXP,PSIS) + +! ---------------------------------------------------------------------- +! SUBROUTINE FRH2O +! ---------------------------------------------------------------------- +! CALCULATE AMOUNT OF SUPERCOOLED LIQUID SOIL WATER CONTENT IF +! TEMPERATURE IS BELOW 273.15K (T0). REQUIRES NEWTON-TYPE ITERATION TO +! SOLVE THE NONLINEAR IMPLICIT EQUATION GIVEN IN EQN 17 OF KOREN ET AL +! (1999, JGR, VOL 104(D16), 19569-19585). +! ---------------------------------------------------------------------- +! NEW VERSION (JUNE 2001): MUCH FASTER AND MORE ACCURATE NEWTON +! ITERATION ACHIEVED BY FIRST TAKING LOG OF EQN CITED ABOVE -- LESS THAN +! 4 (TYPICALLY 1 OR 2) ITERATIONS ACHIEVES CONVERGENCE. ALSO, EXPLICIT +! 1-STEP SOLUTION OPTION FOR SPECIAL CASE OF PARAMETER CK=0, WHICH +! REDUCES THE ORIGINAL IMPLICIT EQUATION TO A SIMPLER EXPLICIT FORM, +! KNOWN AS THE "FLERCHINGER EQN". IMPROVED HANDLING OF SOLUTION IN THE +! LIMIT OF FREEZING POINT TEMPERATURE T0. +! ---------------------------------------------------------------------- +! INPUT: + +! TKELV.........TEMPERATURE (Kelvin) +! SMC...........TOTAL SOIL MOISTURE CONTENT (VOLUMETRIC) +! SH2O..........LIQUID SOIL MOISTURE CONTENT (VOLUMETRIC) +! SMCMAX........SATURATION SOIL MOISTURE CONTENT (FROM REDPRM) +! B.............SOIL TYPE "B" PARAMETER (FROM REDPRM) +! PSIS..........SATURATED SOIL MATRIC POTENTIAL (FROM REDPRM) + +! OUTPUT: +! FRH2O.........SUPERCOOLED LIQUID WATER CONTENT +! FREE..........SUPERCOOLED LIQUID WATER CONTENT +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: BEXP,PSIS,SH2O,SMC,SMCMAX,TKELV + REAL, INTENT(OUT) :: FREE + REAL :: BX,DENOM,DF,DSWL,FK,SWL,SWLK + INTEGER :: NLOG,KCOUNT +! PARAMETER(CK = 0.0) + REAL, PARAMETER :: CK = 8.0, BLIM = 5.5, ERROR = 0.005, & + HLICE = 3.335E5, GS = 9.81,DICE = 920.0, & + DH2O = 1000.0, T0 = 273.15 + +! ---------------------------------------------------------------------- +! LIMITS ON PARAMETER B: B < 5.5 (use parameter BLIM) +! SIMULATIONS SHOWED IF B > 5.5 UNFROZEN WATER CONTENT IS +! NON-REALISTICALLY HIGH AT VERY LOW TEMPERATURES. +! ---------------------------------------------------------------------- + BX = BEXP + +! ---------------------------------------------------------------------- +! INITIALIZING ITERATIONS COUNTER AND ITERATIVE SOLUTION FLAG. +! ---------------------------------------------------------------------- + IF (BEXP > BLIM) BX = BLIM + NLOG = 0 + +! ---------------------------------------------------------------------- +! IF TEMPERATURE NOT SIGNIFICANTLY BELOW FREEZING (T0), SH2O = SMC +! ---------------------------------------------------------------------- + KCOUNT = 0 +! FRH2O = SMC + IF (TKELV > (T0- 1.E-3)) THEN + FREE = SMC + ELSE + +! ---------------------------------------------------------------------- +! OPTION 1: ITERATED SOLUTION FOR NONZERO CK +! IN KOREN ET AL, JGR, 1999, EQN 17 +! ---------------------------------------------------------------------- +! INITIAL GUESS FOR SWL (frozen content) +! ---------------------------------------------------------------------- + IF (CK /= 0.0) THEN + SWL = SMC - SH2O +! ---------------------------------------------------------------------- +! KEEP WITHIN BOUNDS. +! ---------------------------------------------------------------------- + IF (SWL > (SMC -0.02)) SWL = SMC -0.02 + +! ---------------------------------------------------------------------- +! START OF ITERATIONS +! ---------------------------------------------------------------------- + IF (SWL < 0.) SWL = 0. + 1001 Continue + IF (.NOT.( (NLOG < 10) .AND. (KCOUNT == 0))) goto 1002 + NLOG = NLOG +1 + DF = ALOG ( ( PSIS * GS / HLICE ) * ( ( 1. + CK * SWL )**2.) * & + ( SMCMAX / (SMC - SWL) )** BX) - ALOG ( - ( & + TKELV - T0)/ TKELV) + DENOM = 2. * CK / ( 1. + CK * SWL ) + BX / ( SMC - SWL ) + SWLK = SWL - DF / DENOM +! ---------------------------------------------------------------------- +! BOUNDS USEFUL FOR MATHEMATICAL SOLUTION. +! ---------------------------------------------------------------------- + IF (SWLK > (SMC -0.02)) SWLK = SMC - 0.02 + IF (SWLK < 0.) SWLK = 0. + +! ---------------------------------------------------------------------- +! MATHEMATICAL SOLUTION BOUNDS APPLIED. +! ---------------------------------------------------------------------- + DSWL = ABS (SWLK - SWL) + +! ---------------------------------------------------------------------- +! IF MORE THAN 10 ITERATIONS, USE EXPLICIT METHOD (CK=0 APPROX.) +! WHEN DSWL LESS OR EQ. ERROR, NO MORE ITERATIONS REQUIRED. +! ---------------------------------------------------------------------- + SWL = SWLK + IF ( DSWL <= ERROR ) THEN + KCOUNT = KCOUNT +1 + END IF +! ---------------------------------------------------------------------- +! END OF ITERATIONS +! ---------------------------------------------------------------------- +! BOUNDS APPLIED WITHIN DO-BLOCK ARE VALID FOR PHYSICAL SOLUTION. +! ---------------------------------------------------------------------- +! FRH2O = SMC - SWL + goto 1001 + 1002 continue + FREE = SMC - SWL + END IF +! ---------------------------------------------------------------------- +! END OPTION 1 +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! OPTION 2: EXPLICIT SOLUTION FOR FLERCHINGER EQ. i.e. CK=0 +! IN KOREN ET AL., JGR, 1999, EQN 17 +! APPLY PHYSICAL BOUNDS TO FLERCHINGER SOLUTION +! ---------------------------------------------------------------------- + IF (KCOUNT == 0) THEN +! PRINT *,'Flerchinger USEd in NEW version. Iterations=',NLOG + FK = ( ( (HLICE / (GS * ( - PSIS)))* & + ( (TKELV - T0)/ TKELV))** ( -1/ BX))* SMCMAX +! FRH2O = MIN (FK, SMC) + IF (FK < 0.02) FK = 0.02 + FREE = MIN (FK, SMC) +! ---------------------------------------------------------------------- +! END OPTION 2 +! ---------------------------------------------------------------------- + END IF + END IF +! ---------------------------------------------------------------------- + END SUBROUTINE FRH2O +! ---------------------------------------------------------------------- + + SUBROUTINE HRT (RHSTS,STC,SMC,SMCMAX,NSOIL,ZSOIL,YY,ZZ1, & + TBOT,ZBOT,PSISAT,SH2O,DT,BEXP,SOILTYP,OPT_THCND, & + F1,DF1,QUARTZ,CSOIL,AI,BI,CI,VEGTYP,ISURBAN & + ,HCPCT_FASDAS ) !fasdas + +! ---------------------------------------------------------------------- +! SUBROUTINE HRT +! ---------------------------------------------------------------------- +! CALCULATE THE RIGHT HAND SIDE OF THE TIME TENDENCY TERM OF THE SOIL +! THERMAL DIFFUSION EQUATION. ALSO TO COMPUTE ( PREPARE ) THE MATRIX +! COEFFICIENTS FOR THE TRI-DIAGONAL MATRIX OF THE IMPLICIT TIME SCHEME. +! ---------------------------------------------------------------------- + IMPLICIT NONE + LOGICAL :: ITAVG + INTEGER, INTENT(IN) :: OPT_THCND + INTEGER, INTENT(IN) :: NSOIL, VEGTYP, SOILTYP + INTEGER, INTENT(IN) :: ISURBAN + INTEGER :: I, K + + REAL, INTENT(IN) :: BEXP, CSOIL, DF1, DT,F1,PSISAT,QUARTZ, & + SMCMAX ,TBOT,YY,ZZ1, ZBOT + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: SMC,STC,ZSOIL + REAL, DIMENSION(1:NSOIL), INTENT(INOUT):: SH2O + REAL, DIMENSION(1:NSOIL), INTENT(OUT) :: RHSTS + REAL, DIMENSION(1:NSOIL), INTENT(OUT) :: AI, BI,CI + REAL :: DDZ, DDZ2, DENOM, DF1N, DF1K, DTSDZ, & + DTSDZ2,HCPCT,QTOT,SSOIL,SICE,TAVG,TBK, & + TBK1,TSNSR,TSURF,CSOIL_LOC + REAL, PARAMETER :: T0 = 273.15, CAIR = 1004.0, CICE = 2.106E6,& + CH2O = 4.2E6 + +! +! FASDAS +! + REAL, INTENT( OUT) :: HCPCT_FASDAS +! +! END FASDAS +! + +!urban + IF( VEGTYP == ISURBAN ) then + CSOIL_LOC=3.0E6 + ELSE + CSOIL_LOC=CSOIL + ENDIF + +! ---------------------------------------------------------------------- +! INITIALIZE LOGICAL FOR SOIL LAYER TEMPERATURE AVERAGING. +! ---------------------------------------------------------------------- + ITAVG = .TRUE. +! ---------------------------------------------------------------------- +! BEGIN SECTION FOR TOP SOIL LAYER +! ---------------------------------------------------------------------- +! CALC THE HEAT CAPACITY OF THE TOP SOIL LAYER +! ---------------------------------------------------------------------- + HCPCT = SH2O (1)* CH2O + (1.0- SMCMAX)* CSOIL_LOC + (SMCMAX - SMC (1))& + * CAIR & + + ( SMC (1) - SH2O (1) )* CICE +! +! FASDAS +! + HCPCT_FASDAS = HCPCT +! +! END FASDAS +! +! ---------------------------------------------------------------------- +! CALC THE MATRIX COEFFICIENTS AI, BI, AND CI FOR THE TOP LAYER +! ---------------------------------------------------------------------- + DDZ = 1.0 / ( -0.5 * ZSOIL (2) ) + AI (1) = 0.0 + CI (1) = (DF1 * DDZ) / (ZSOIL (1) * HCPCT) + +! ---------------------------------------------------------------------- +! CALCULATE THE VERTICAL SOIL TEMP GRADIENT BTWN THE 1ST AND 2ND SOIL +! LAYERS. THEN CALCULATE THE SUBSURFACE HEAT FLUX. USE THE TEMP +! GRADIENT AND SUBSFC HEAT FLUX TO CALC "RIGHT-HAND SIDE TENDENCY +! TERMS", OR "RHSTS", FOR TOP SOIL LAYER. +! ---------------------------------------------------------------------- + BI (1) = - CI (1) + DF1 / (0.5 * ZSOIL (1) * ZSOIL (1)* HCPCT * & + ZZ1) + DTSDZ = (STC (1) - STC (2)) / ( -0.5 * ZSOIL (2)) + SSOIL = DF1 * (STC (1) - YY) / (0.5 * ZSOIL (1) * ZZ1) +! RHSTS(1) = (DF1 * DTSDZ - SSOIL) / (ZSOIL(1) * HCPCT) + DENOM = (ZSOIL (1) * HCPCT) + +! ---------------------------------------------------------------------- +! NEXT CAPTURE THE VERTICAL DIFFERENCE OF THE HEAT FLUX AT TOP AND +! BOTTOM OF FIRST SOIL LAYER FOR USE IN HEAT FLUX CONSTRAINT APPLIED TO +! POTENTIAL SOIL FREEZING/THAWING IN ROUTINE SNKSRC. +! ---------------------------------------------------------------------- +! QTOT = SSOIL - DF1*DTSDZ + RHSTS (1) = (DF1 * DTSDZ - SSOIL) / DENOM + +! ---------------------------------------------------------------------- +! CALCULATE FROZEN WATER CONTENT IN 1ST SOIL LAYER. +! ---------------------------------------------------------------------- + QTOT = -1.0* RHSTS (1)* DENOM + +! ---------------------------------------------------------------------- +! IF TEMPERATURE AVERAGING INVOKED (ITAVG=TRUE; ELSE SKIP): +! SET TEMP "TSURF" AT TOP OF SOIL COLUMN (FOR USE IN FREEZING SOIL +! PHYSICS LATER IN FUNCTION SUBROUTINE SNKSRC). IF SNOWPACK CONTENT IS +! ZERO, THEN TSURF EXPRESSION BELOW GIVES TSURF = SKIN TEMP. IF +! SNOWPACK IS NONZERO (HENCE ARGUMENT ZZ1=1), THEN TSURF EXPRESSION +! BELOW YIELDS SOIL COLUMN TOP TEMPERATURE UNDER SNOWPACK. THEN +! CALCULATE TEMPERATURE AT BOTTOM INTERFACE OF 1ST SOIL LAYER FOR USE +! LATER IN FUNCTION SUBROUTINE SNKSRC +! ---------------------------------------------------------------------- + SICE = SMC (1) - SH2O (1) + IF (ITAVG) THEN + TSURF = (YY + (ZZ1-1) * STC (1)) / ZZ1 +! ---------------------------------------------------------------------- +! IF FROZEN WATER PRESENT OR ANY OF LAYER-1 MID-POINT OR BOUNDING +! INTERFACE TEMPERATURES BELOW FREEZING, THEN CALL SNKSRC TO +! COMPUTE HEAT SOURCE/SINK (AND CHANGE IN FROZEN WATER CONTENT) +! DUE TO POSSIBLE SOIL WATER PHASE CHANGE +! ---------------------------------------------------------------------- + CALL TBND (STC (1),STC (2),ZSOIL,ZBOT,1,NSOIL,TBK) + IF ( (SICE > 0.) .OR. (STC (1) < T0) .OR. & + (TSURF < T0) .OR. (TBK < T0) ) THEN +! TSNSR = SNKSRC (TAVG,SMC(1),SH2O(1), + CALL TMPAVG (TAVG,TSURF,STC (1),TBK,ZSOIL,NSOIL,1) + CALL SNKSRC (TSNSR,TAVG,SMC (1),SH2O (1), & + ZSOIL,NSOIL,SMCMAX,PSISAT,BEXP,DT,1,QTOT) +! RHSTS(1) = RHSTS(1) - TSNSR / ( ZSOIL(1) * HCPCT ) + RHSTS (1) = RHSTS (1) - TSNSR / DENOM + END IF + ELSE +! TSNSR = SNKSRC (STC(1),SMC(1),SH2O(1), + IF ( (SICE > 0.) .OR. (STC (1) < T0) ) THEN + CALL SNKSRC (TSNSR,STC (1),SMC (1),SH2O (1), & + ZSOIL,NSOIL,SMCMAX,PSISAT,BEXP,DT,1,QTOT) +! RHSTS(1) = RHSTS(1) - TSNSR / ( ZSOIL(1) * HCPCT ) + RHSTS (1) = RHSTS (1) - TSNSR / DENOM + END IF +! ---------------------------------------------------------------------- +! THIS ENDS SECTION FOR TOP SOIL LAYER. +! ---------------------------------------------------------------------- + END IF + +! INITIALIZE DDZ2 +! ---------------------------------------------------------------------- + + DDZ2 = 0.0 + DF1K = DF1 + +! ---------------------------------------------------------------------- +! LOOP THRU THE REMAINING SOIL LAYERS, REPEATING THE ABOVE PROCESS +! (EXCEPT SUBSFC OR "GROUND" HEAT FLUX NOT REPEATED IN LOWER LAYERS) +! ---------------------------------------------------------------------- +! CALCULATE HEAT CAPACITY FOR THIS SOIL LAYER. +! ---------------------------------------------------------------------- + DO K = 2,NSOIL + HCPCT = SH2O (K)* CH2O + (1.0- SMCMAX)* CSOIL_LOC + (SMCMAX - SMC ( & + K))* CAIR + ( SMC (K) - SH2O (K) )* CICE +! ---------------------------------------------------------------------- +! THIS SECTION FOR LAYER 2 OR GREATER, BUT NOT LAST LAYER. +! ---------------------------------------------------------------------- +! CALCULATE THERMAL DIFFUSIVITY FOR THIS LAYER. +! ---------------------------------------------------------------------- + IF (K /= NSOIL) THEN + +! ---------------------------------------------------------------------- +! CALC THE VERTICAL SOIL TEMP GRADIENT THRU THIS LAYER +! ---------------------------------------------------------------------- + CALL TDFCND (DF1N,SMC (K),QUARTZ,SMCMAX,SH2O (K),BEXP, PSISAT, SOILTYP, OPT_THCND) + +!urban + IF ( VEGTYP == ISURBAN ) DF1N = 3.24 + + DENOM = 0.5 * ( ZSOIL (K -1) - ZSOIL (K +1) ) + +! ---------------------------------------------------------------------- +! CALC THE MATRIX COEF, CI, AFTER CALC'NG ITS PARTIAL PRODUCT +! ---------------------------------------------------------------------- + DTSDZ2 = ( STC (K) - STC (K +1) ) / DENOM + DDZ2 = 2. / (ZSOIL (K -1) - ZSOIL (K +1)) + +! ---------------------------------------------------------------------- +! IF TEMPERATURE AVERAGING INVOKED (ITAVG=TRUE; ELSE SKIP): CALCULATE +! TEMP AT BOTTOM OF LAYER. +! ---------------------------------------------------------------------- + CI (K) = - DF1N * DDZ2 / ( (ZSOIL (K -1) - ZSOIL (K)) * & + HCPCT) + IF (ITAVG) THEN + CALL TBND (STC (K),STC (K +1),ZSOIL,ZBOT,K,NSOIL,TBK1) + END IF + + ELSE +! ---------------------------------------------------------------------- +! SPECIAL CASE OF BOTTOM SOIL LAYER: CALCULATE THERMAL DIFFUSIVITY FOR +! BOTTOM LAYER. +! ---------------------------------------------------------------------- + +! ---------------------------------------------------------------------- +! CALC THE VERTICAL SOIL TEMP GRADIENT THRU BOTTOM LAYER. +! ---------------------------------------------------------------------- + CALL TDFCND (DF1N,SMC (K),QUARTZ,SMCMAX,SH2O (K),BEXP, PSISAT, SOILTYP, OPT_THCND) + + +!urban + IF ( VEGTYP == ISURBAN ) DF1N = 3.24 + + DENOM = .5 * (ZSOIL (K -1) + ZSOIL (K)) - ZBOT + +! ---------------------------------------------------------------------- +! SET MATRIX COEF, CI TO ZERO IF BOTTOM LAYER. +! ---------------------------------------------------------------------- + DTSDZ2 = (STC (K) - TBOT) / DENOM + +! ---------------------------------------------------------------------- +! IF TEMPERATURE AVERAGING INVOKED (ITAVG=TRUE; ELSE SKIP): CALCULATE +! TEMP AT BOTTOM OF LAST LAYER. +! ---------------------------------------------------------------------- + CI (K) = 0. + IF (ITAVG) THEN + CALL TBND (STC (K),TBOT,ZSOIL,ZBOT,K,NSOIL,TBK1) + END IF +! ---------------------------------------------------------------------- +! THIS ENDS SPECIAL LOOP FOR BOTTOM LAYER. + END IF +! ---------------------------------------------------------------------- +! CALCULATE RHSTS FOR THIS LAYER AFTER CALC'NG A PARTIAL PRODUCT. +! ---------------------------------------------------------------------- + DENOM = ( ZSOIL (K) - ZSOIL (K -1) ) * HCPCT + RHSTS (K) = ( DF1N * DTSDZ2- DF1K * DTSDZ ) / DENOM + QTOT = -1.0* DENOM * RHSTS (K) + + SICE = SMC (K) - SH2O (K) + IF (ITAVG) THEN + CALL TMPAVG (TAVG,TBK,STC (K),TBK1,ZSOIL,NSOIL,K) +! TSNSR = SNKSRC(TAVG,SMC(K),SH2O(K),ZSOIL,NSOIL, + IF ( (SICE > 0.) .OR. (STC (K) < T0) .OR. & + (TBK .lt. T0) .OR. (TBK1 .lt. T0) ) THEN + CALL SNKSRC (TSNSR,TAVG,SMC (K),SH2O (K),ZSOIL,NSOIL, & + SMCMAX,PSISAT,BEXP,DT,K,QTOT) + RHSTS (K) = RHSTS (K) - TSNSR / DENOM + END IF + ELSE +! TSNSR = SNKSRC(STC(K),SMC(K),SH2O(K),ZSOIL,NSOIL, + IF ( (SICE > 0.) .OR. (STC (K) < T0) ) THEN + CALL SNKSRC (TSNSR,STC (K),SMC (K),SH2O (K),ZSOIL,NSOIL, & + SMCMAX,PSISAT,BEXP,DT,K,QTOT) + RHSTS (K) = RHSTS (K) - TSNSR / DENOM + END IF + END IF + +! ---------------------------------------------------------------------- +! CALC MATRIX COEFS, AI, AND BI FOR THIS LAYER. +! ---------------------------------------------------------------------- + AI (K) = - DF1K * DDZ / ( (ZSOIL (K -1) - ZSOIL (K)) * HCPCT) + +! ---------------------------------------------------------------------- +! RESET VALUES OF DF1, DTSDZ, DDZ, AND TBK FOR LOOP TO NEXT SOIL LAYER. +! ---------------------------------------------------------------------- + BI (K) = - (AI (K) + CI (K)) + TBK = TBK1 + DF1K = DF1N + DTSDZ = DTSDZ2 + DDZ = DDZ2 + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE HRT +! ---------------------------------------------------------------------- + + SUBROUTINE HSTEP (STCOUT,STCIN,RHSTS,DT,NSOIL,AI,BI,CI) + +! ---------------------------------------------------------------------- +! SUBROUTINE HSTEP +! ---------------------------------------------------------------------- +! CALCULATE/UPDATE THE SOIL TEMPERATURE FIELD. +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER, INTENT(IN) :: NSOIL + INTEGER :: K + + REAL, DIMENSION(1:NSOIL), INTENT(IN):: STCIN + REAL, DIMENSION(1:NSOIL), INTENT(OUT):: STCOUT + REAL, DIMENSION(1:NSOIL), INTENT(INOUT):: RHSTS + REAL, DIMENSION(1:NSOIL), INTENT(INOUT):: AI,BI,CI + REAL, DIMENSION(1:NSOIL) :: RHSTSin + REAL, DIMENSION(1:NSOIL) :: CIin + REAL :: DT + +! ---------------------------------------------------------------------- +! CREATE FINITE DIFFERENCE VALUES FOR USE IN ROSR12 ROUTINE +! ---------------------------------------------------------------------- + DO K = 1,NSOIL + RHSTS (K) = RHSTS (K) * DT + AI (K) = AI (K) * DT + BI (K) = 1. + BI (K) * DT + CI (K) = CI (K) * DT + END DO +! ---------------------------------------------------------------------- +! COPY VALUES FOR INPUT VARIABLES BEFORE CALL TO ROSR12 +! ---------------------------------------------------------------------- + DO K = 1,NSOIL + RHSTSin (K) = RHSTS (K) + END DO + DO K = 1,NSOIL + CIin (K) = CI (K) + END DO +! ---------------------------------------------------------------------- +! SOLVE THE TRI-DIAGONAL MATRIX EQUATION +! ---------------------------------------------------------------------- + CALL ROSR12 (CI,AI,BI,CIin,RHSTSin,RHSTS,NSOIL) +! ---------------------------------------------------------------------- +! CALC/UPDATE THE SOIL TEMPS USING MATRIX SOLUTION +! ---------------------------------------------------------------------- + DO K = 1,NSOIL + STCOUT (K) = STCIN (K) + CI (K) + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE HSTEP +! ---------------------------------------------------------------------- + + SUBROUTINE NOPAC (ETP,ETA,PRCP,SMC,SMCMAX,SMCWLT, & + SMCREF,SMCDRY,CMC,CMCMAX,NSOIL,DT,SHDFAC, & + SBETA,Q2,T1,SFCTMP,T24,TH2,FDOWN,F1,EMISSI, & + SSOIL, & + STC,EPSCA,BEXP,PC,RCH,RR,CFACTR, & + SH2O,SLOPE,KDT,FRZFACT,PSISAT,ZSOIL, & + DKSAT,DWSAT,TBOT,ZBOT,RUNOFF1,RUNOFF2, & + RUNOFF3,EDIR,EC,ET,ETT,NROOT,RTDIS, & + QUARTZ,FXEXP,CSOIL, & + BETA,DRIP,DEW,FLX1,FLX3,VEGTYP,ISURBAN, & + SFHEAD1RT,INFXS1RT,ETPND1,SOILTYP,OPT_THCND & + ,XSDA_QFX,QFX_PHY,XQNORM,fasdas,HCPCT_FASDAS, & + SIGMA,CPH2O) !fasdas + +! ---------------------------------------------------------------------- +! SUBROUTINE NOPAC +! ---------------------------------------------------------------------- +! CALCULATE SOIL MOISTURE AND HEAT FLUX VALUES AND UPDATE SOIL MOISTURE +! CONTENT AND SOIL HEAT CONTENT VALUES FOR THE CASE WHEN NO SNOW PACK IS +! PRESENT. +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER, INTENT(IN) :: OPT_THCND + INTEGER, INTENT(IN) :: NROOT,NSOIL,VEGTYP,SOILTYP + INTEGER, INTENT(IN) :: ISURBAN + INTEGER :: K + + REAL, INTENT(IN) :: BEXP,CFACTR, CMCMAX,CSOIL,DKSAT,DT,DWSAT, & + EPSCA,ETP,FDOWN,F1,FXEXP,FRZFACT,KDT,PC, & + PRCP,PSISAT,Q2,QUARTZ,RCH,RR,SBETA,SFCTMP,& + SHDFAC,SLOPE,SMCDRY,SMCMAX,SMCREF,SMCWLT, & + T24,TBOT,TH2,ZBOT,EMISSI,SIGMA,CPH2O + REAL, INTENT(INOUT) :: CMC,BETA,T1 + REAL, INTENT(OUT) :: DEW,DRIP,EC,EDIR,ETA,ETT,FLX1,FLX3, & + RUNOFF1,RUNOFF2,RUNOFF3,SSOIL +!DJG NDHMS/WRF-Hydro edit... + REAL, INTENT(INOUT) :: SFHEAD1RT,INFXS1RT,ETPND1 + + REAL, DIMENSION(1:NSOIL),INTENT(IN) :: RTDIS,ZSOIL + REAL, DIMENSION(1:NSOIL),INTENT(OUT) :: ET + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: SMC,SH2O,STC + REAL, DIMENSION(1:NSOIL) :: ET1 + REAL :: EC1,EDIR1,ETT1,DF1,ETA1,ETP1,PRCP1,YY, & + YYNUM,ZZ1 +! +! FASDAS +! + REAL :: XSDA_QFX, QFX_PHY, XQNORM + INTEGER :: fasdas + REAL , DIMENSION(1:NSOIL) :: EFT(NSOIL), wetty(1:NSOIL) + REAL :: EFDIR, EFC, EALL_now + REAL, INTENT( OUT) :: HCPCT_FASDAS +! +! END FASDAS +! +! ---------------------------------------------------------------------- +! EXECUTABLE CODE BEGINS HERE: +! CONVERT ETP Fnd PRCP FROM KG M-2 S-1 TO M S-1 AND INITIALIZE DEW. +! ---------------------------------------------------------------------- + PRCP1 = PRCP * 0.001 + ETP1 = ETP * 0.001 + DEW = 0.0 +! ---------------------------------------------------------------------- +! INITIALIZE EVAP TERMS. +! ---------------------------------------------------------------------- +! +! FASDAS +! + QFX_PHY = 0.0 +! +! END FASDAS +! + EDIR = 0. + EDIR1 = 0. + EC1 = 0. + EC = 0. + DO K = 1,NSOIL + ET(K) = 0. + ET1(K) = 0. +! +! FASDAS +! + wetty(K) = 1.0 +! +! END FASDAS +! + END DO + ETT = 0. + ETT1 = 0. + +!DJG NDHMS/WRF-Hydro edit... + ETPND1 = 0. + + + IF (ETP > 0.0) THEN + CALL EVAPO (ETA1,SMC,NSOIL,CMC,ETP1,DT,ZSOIL, & + SH2O, & + SMCMAX,BEXP,PC,SMCWLT,DKSAT,DWSAT, & + SMCREF,SHDFAC,CMCMAX, & + SMCDRY,CFACTR, & + EDIR1,EC1,ET1,ETT1,SFCTMP,Q2,NROOT,RTDIS,FXEXP, & + SFHEAD1RT,ETPND1 ) +! +! FASDAS +! + IF( fasdas == 1 ) THEN + DO K=1,NSOIL + QFX_PHY = QFX_PHY + ET1(K) ! m/s +! dont add moisture fluxes if soil moisture is = or > smcref + IF(SMC(K).GE.SMCREF.and.XSDA_QFX.gt.0.0) wetty(K)=0.0 + END DO + QFX_PHY = EDIR1+EC1+QFX_PHY ! m/s + EALL_now = QFX_PHY ! m/s + QFX_PHY = QFX_PHY*1000.0 ! Kg/m2/s + + if(EALL_now.ne.0.0) then + EFDIR = (EDIR1/EALL_now)*XSDA_QFX*1.0E-03*XQNORM + EFDIR = EFDIR * wetty(1) + !TWG2015 Bugfix Flip Sign to conform to Net upward Flux + EDIR1 = EDIR1 + EFDIR ! new value + + EFC = (EC1/EALL_now)*XSDA_QFX*1.0E-03*XQNORM + !TWG2015 Bugfix Flip Sign to conform to Net upward Flux + EC1 = EC1 + EFC ! new value + + + DO K=1,NSOIL + EFT(K) = (ET1(K)/EALL_now)*XSDA_QFX*1.0E-03*XQNORM + EFT(K) = EFT(K) * wetty(K) + !TWG2015 Bugfix Flip Sign to conform to Net upward Flux + ET1(K) = ET1(K) + EFT(K) ! new value + END DO + + + END IF ! for non-zero eall_now + ELSE + QFX_PHY = 0.0 + ENDIF +! +! END FASDAS +! + CALL SMFLX (SMC,NSOIL,CMC,DT,PRCP1,ZSOIL, & + SH2O,SLOPE,KDT,FRZFACT, & + SMCMAX,BEXP,SMCWLT,DKSAT,DWSAT, & + SHDFAC,CMCMAX, & + RUNOFF1,RUNOFF2,RUNOFF3, & + EDIR1,EC1,ET1, & + DRIP, SFHEAD1RT,INFXS1RT) + +! ---------------------------------------------------------------------- +! CONVERT MODELED EVAPOTRANSPIRATION FROM M S-1 TO KG M-2 S-1. +! ---------------------------------------------------------------------- + + ETA = ETA1 * 1000.0 + +! ---------------------------------------------------------------------- +! IF ETP < 0, ASSUME DEW FORMS (TRANSFORM ETP1 INTO DEW AND REINITIALIZE +! ETP1 TO ZERO). +! ---------------------------------------------------------------------- + ELSE + DEW = - ETP1 + +! ---------------------------------------------------------------------- +! CONVERT PRCP FROM 'KG M-2 S-1' TO 'M S-1' AND ADD DEW AMOUNT. +! ---------------------------------------------------------------------- + + PRCP1 = PRCP1+ DEW +! +! FASDAS +! + IF( fasdas == 1 ) THEN + DO K=1,NSOIL + QFX_PHY = QFX_PHY + ET1(K) ! m/s +! dont add moisture fluxes if soil moisture is = or > smcref + IF(SMC(K).GE.SMCREF.and.XSDA_QFX.gt.0.0) wetty(K)=0.0 + END DO + QFX_PHY = EDIR1+EC1+QFX_PHY ! m/s + EALL_now = QFX_PHY ! m/s + QFX_PHY = QFX_PHY*1000.0 ! Kg/m2/s + + IF(EALL_now.ne.0.0) then + EFDIR = (EDIR1/EALL_now)*XSDA_QFX*1.0E-03*XQNORM + EFDIR = EFDIR * wetty(1) + !TWG2015 Bugfix Flip Sign to conform to Net Upward Flux + EDIR1 = EDIR1 + EFDIR ! new value + + EFC = (EC1/EALL_now)*XSDA_QFX*1.0E-03*XQNORM + !TWG2015 Bugfix Flip Sign to conform to Net Upward Flux + EC1 = EC1+ EFC ! new value + + DO K=1,NSOIL + EFT(K) = (ET1(K)/EALL_now)*XSDA_QFX*1.0E-03*XQNORM + EFT(K) = EFT(K) * wetty(K) + !TWG2015 Bugfix Flip Sign to conform to Net Upward Flux + ET1(K) = ET1(K) + EFT(K) ! new value + END DO + + END IF ! for non-zero eall_now + ELSE + QFX_PHY = 0.0 + ENDIF +! +! END FASDAS +! + CALL SMFLX (SMC,NSOIL,CMC,DT,PRCP1,ZSOIL, & + SH2O,SLOPE,KDT,FRZFACT, & + SMCMAX,BEXP,SMCWLT,DKSAT,DWSAT, & + SHDFAC,CMCMAX, & + RUNOFF1,RUNOFF2,RUNOFF3, & + EDIR1,EC1,ET1, & + DRIP, SFHEAD1RT,INFXS1RT) + +! ---------------------------------------------------------------------- +! CONVERT MODELED EVAPOTRANSPIRATION FROM 'M S-1' TO 'KG M-2 S-1'. +! ---------------------------------------------------------------------- +! ETA = ETA1 * 1000.0 + END IF + +! ---------------------------------------------------------------------- +! BASED ON ETP AND E VALUES, DETERMINE BETA +! ---------------------------------------------------------------------- + + IF ( ETP <= 0.0 ) THEN + BETA = 0.0 + ETA = ETP + IF ( ETP < 0.0 ) THEN + BETA = 1.0 + END IF + ELSE + BETA = ETA / ETP + END IF + +! ---------------------------------------------------------------------- +! CONVERT MODELED EVAPOTRANSPIRATION COMPONENTS 'M S-1' TO 'KG M-2 S-1'. +! ---------------------------------------------------------------------- + EDIR = EDIR1*1000. + EC = EC1*1000. + DO K = 1,NSOIL + ET(K) = ET1(K)*1000. + END DO + ETT = ETT1*1000. + +! ---------------------------------------------------------------------- +! GET SOIL THERMAL DIFFUXIVITY/CONDUCTIVITY FOR TOP SOIL LYR, +! CALC. ADJUSTED TOP LYR SOIL TEMP AND ADJUSTED SOIL FLUX, THEN +! CALL SHFLX TO COMPUTE/UPDATE SOIL HEAT FLUX AND SOIL TEMPS. +! ---------------------------------------------------------------------- + + CALL TDFCND (DF1,SMC (1),QUARTZ,SMCMAX,SH2O (1),BEXP, PSISAT, SOILTYP, OPT_THCND) + +!urban + IF ( VEGTYP == ISURBAN ) DF1=3.24 +! + +! ---------------------------------------------------------------------- +! VEGETATION GREENNESS FRACTION REDUCTION IN SUBSURFACE HEAT FLUX +! VIA REDUCTION FACTOR, WHICH IS CONVENIENT TO APPLY HERE TO THERMAL +! DIFFUSIVITY THAT IS LATER USED IN HRT TO COMPUTE SUB SFC HEAT FLUX +! (SEE ADDITIONAL COMMENTS ON VEG EFFECT SUB-SFC HEAT FLX IN +! ROUTINE SFLX) +! ---------------------------------------------------------------------- + DF1 = DF1 * EXP (SBETA * SHDFAC) +! ---------------------------------------------------------------------- +! COMPUTE INTERMEDIATE TERMS PASSED TO ROUTINE HRT (VIA ROUTINE +! SHFLX BELOW) FOR USE IN COMPUTING SUBSURFACE HEAT FLUX IN HRT +! ---------------------------------------------------------------------- + YYNUM = FDOWN - EMISSI*SIGMA * T24 + YY = SFCTMP + (YYNUM / RCH + TH2- SFCTMP - BETA * EPSCA) / RR + + ZZ1 = DF1 / ( -0.5 * ZSOIL (1) * RCH * RR ) + 1.0 +!urban + CALL SHFLX (SSOIL,STC,SMC,SMCMAX,NSOIL,T1,DT,YY,ZZ1,ZSOIL, & + TBOT,ZBOT,SMCWLT,PSISAT,SH2O,BEXP,F1,DF1, & + QUARTZ,CSOIL,VEGTYP,ISURBAN,SOILTYP,OPT_THCND & + ,HCPCT_FASDAS ) !fasdas + +! ---------------------------------------------------------------------- +! SET FLX1 AND FLX3 (SNOPACK PHASE CHANGE HEAT FLUXES) TO ZERO SINCE +! THEY ARE NOT USED HERE IN SNOPAC. FLX2 (FREEZING RAIN HEAT FLUX) WAS +! SIMILARLY INITIALIZED IN THE PENMAN ROUTINE. +! ---------------------------------------------------------------------- + FLX1 = CPH2O * PRCP * (T1- SFCTMP) + FLX3 = 0.0 + +! ---------------------------------------------------------------------- + END SUBROUTINE NOPAC +! ---------------------------------------------------------------------- + + SUBROUTINE PENMAN (SFCTMP,SFCPRS,CH,T2V,TH2,PRCP,FDOWN,T24,SSOIL, & + & Q2,Q2SAT,ETP,RCH,EPSCA,RR,SNOWNG,FRZGRA, & + & DQSDT2,FLX2,EMISSI_IN,SNEQV,T1,SNCOVR,AOASIS, & + & ALBEDO,SOLDN,FVB,GAMA,STC1,ETPN,FLX4,UA_PHYS, & + & CP,RD,SIGMA,CPH2O,CPICE,LSUBF) + +! ---------------------------------------------------------------------- +! SUBROUTINE PENMAN +! ---------------------------------------------------------------------- +! CALCULATE POTENTIAL EVAPORATION FOR THE CURRENT POINT. VARIOUS +! PARTIAL SUMS/PRODUCTS ARE ALSO CALCULATED AND PASSED BACK TO THE +! CALLING ROUTINE FOR LATER USE. +! ---------------------------------------------------------------------- + IMPLICIT NONE + LOGICAL, INTENT(IN) :: SNOWNG, FRZGRA + REAL, INTENT(IN) :: CH, DQSDT2,FDOWN,PRCP, & + Q2, Q2SAT,SSOIL, SFCPRS, SFCTMP, & + T2V, TH2,EMISSI_IN,SNEQV,AOASIS, & + CP, RD, SIGMA, CPH2O, CPICE, LSUBF + REAL, INTENT(IN) :: T1 , SNCOVR + REAL, INTENT(IN) :: ALBEDO,SOLDN,FVB,GAMA,STC1 + LOGICAL, INTENT(IN) :: UA_PHYS +! + REAL, INTENT(OUT) :: EPSCA,ETP,FLX2,RCH,RR,T24 + REAL, INTENT(OUT) :: FLX4,ETPN + REAL :: A, DELTA, FNET,RAD,RHO,EMISSI,ELCP1,LVS + REAL :: TOTABS,UCABS,SIGNCK,FNETN,RADN,EPSCAN + + REAL, PARAMETER :: ELCP = 2.4888E+3, LSUBC = 2.501000E+6 + REAL, PARAMETER :: LSUBS = 2.83E+6 + REAL, PARAMETER :: ALGDSN = 0.5, ALVGSN = 0.13 + +! ---------------------------------------------------------------------- +! EXECUTABLE CODE BEGINS HERE: +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! PREPARE PARTIAL QUANTITIES FOR PENMAN EQUATION. +! ---------------------------------------------------------------------- + EMISSI=EMISSI_IN + ELCP1 = (1.0-SNCOVR)*ELCP + SNCOVR*ELCP*LSUBS/LSUBC + LVS = (1.0-SNCOVR)*LSUBC + SNCOVR*LSUBS + + FLX2 = 0.0 +! DELTA = ELCP * DQSDT2 + DELTA = ELCP1 * DQSDT2 + T24 = SFCTMP * SFCTMP * SFCTMP * SFCTMP +! RR = T24 * 6.48E-8 / (SFCPRS * CH) + 1.0 + RR = EMISSI*T24 * 6.48E-8 / (SFCPRS * CH) + 1.0 + RHO = SFCPRS / (RD * T2V) + +! ---------------------------------------------------------------------- +! ADJUST THE PARTIAL SUMS / PRODUCTS WITH THE LATENT HEAT +! EFFECTS CAUSED BY FALLING PRECIPITATION. +! ---------------------------------------------------------------------- + RCH = RHO * CP * CH + IF (.NOT. SNOWNG) THEN + IF (PRCP > 0.0) RR = RR + CPH2O * PRCP / RCH + ELSE + RR = RR + CPICE * PRCP / RCH + END IF + +! ---------------------------------------------------------------------- +! INCLUDE THE LATENT HEAT EFFECTS OF FRZNG RAIN CONVERTING TO ICE ON +! IMPACT IN THE CALCULATION OF FLX2 AND FNET. +! ---------------------------------------------------------------------- +! FNET = FDOWN - SIGMA * T24- SSOIL + FNET = FDOWN - EMISSI*SIGMA * T24- SSOIL + + FLX4 = 0.0 + IF(UA_PHYS) THEN + IF(SNEQV > 0. .AND. FNET > 0. .AND. SOLDN > 0. ) THEN + TOTABS = (1.-ALBEDO)*SOLDN*FVB ! solar radiation absorbed + ! by vegetated fraction + UCABS = MIN(TOTABS,((1.0-ALGDSN)*(1.0-ALVGSN)*SOLDN*GAMA)*FVB) +! print*,'penman',UCABS,TOTABS,SOLDN,GAMA,FVB +! UCABS = MIN(TOTABS,(0.44*SOLDN*GAMA)*FVB) + ! UCABS -> solar radiation + ! absorbed under canopy + FLX4 = MIN(TOTABS - UCABS, MIN(250., 0.5*(1.-ALBEDO)*SOLDN)) + ENDIF + + SIGNCK = (STC1-273.15)*(SFCTMP-273.15) + + IF(FLX4 > 0. .AND. (SIGNCK <= 0. .OR. STC1 < 273.15)) THEN + IF(FNET >= FLX4) THEN + FNETN = FNET - FLX4 + ELSE + FLX4 = FNET + FNETN = 0. + ENDIF + ELSE + FLX4 = 0.0 + FNETN = 0. + ENDIF + ENDIF + + IF (FRZGRA) THEN + FLX2 = - LSUBF * PRCP + FNET = FNET - FLX2 + IF(UA_PHYS) FNETN = FNETN - FLX2 +! ---------------------------------------------------------------------- +! FINISH PENMAN EQUATION CALCULATIONS. +! ---------------------------------------------------------------------- + END IF + RAD = FNET / RCH + TH2- SFCTMP +! A = ELCP * (Q2SAT - Q2) + A = ELCP1 * (Q2SAT - Q2) + EPSCA = (A * RR + RAD * DELTA) / (DELTA + RR) +! Fei-Mike + IF (EPSCA>0.) EPSCA = EPSCA * AOASIS +! ETP = EPSCA * RCH / LSUBC + ETP = EPSCA * RCH / LVS + + IF(UA_PHYS) THEN + RADN = FNETN / RCH + TH2- SFCTMP + EPSCAN = (A * RR + RADN * DELTA) / (DELTA + RR) + ETPN = EPSCAN * RCH / LVS + END IF +! ---------------------------------------------------------------------- + END SUBROUTINE PENMAN +! ---------------------------------------------------------------------- + + SUBROUTINE REDPRM (VEGTYP,SOILTYP,SLOPETYP,CFACTR,CMCMAX,RSMAX, & + TOPT, & + REFKDT,KDT,SBETA, SHDFAC,RSMIN,RGL,HS,ZBOT,FRZX, & + PSISAT,SLOPE,SNUP,SALP,BEXP,DKSAT,DWSAT, & + SMCMAX,SMCWLT,SMCREF,SMCDRY,F1,QUARTZ,FXEXP, & + RTDIS,SLDPTH,ZSOIL, NROOT,NSOIL,CZIL, & + LAIMIN, LAIMAX, EMISSMIN, EMISSMAX, ALBEDOMIN, & + ALBEDOMAX, Z0MIN, Z0MAX, CSOIL, PTU, LLANDUSE, & + LSOIL, LOCAL,LVCOEF,ZTOPV,ZBOTV,errmsg,errflg) + + IMPLICIT NONE +! ---------------------------------------------------------------------- +! Internally set (default valuess) +! all soil and vegetation parameters required for the execusion oF +! the Noah lsm are defined in VEGPARM.TBL, SOILPARM.TB, and GENPARM.TBL. +! ---------------------------------------------------------------------- +! Vegetation parameters: +! ALBBRD: SFC background snow-free albedo +! CMXTBL: MAX CNPY Capacity +! Z0BRD: Background roughness length +! SHDFAC: Green vegetation fraction +! NROOT: Rooting depth +! RSMIN: Mimimum stomatal resistance +! RSMAX: Max. stomatal resistance +! RGL: Parameters used in radiation stress function +! HS: Parameter used in vapor pressure deficit functio +! TOPT: Optimum transpiration air temperature. +! CMCMAX: Maximum canopy water capacity +! CFACTR: Parameter used in the canopy inteception calculation +! SNUP: Threshold snow depth (in water equivalent m) that +! implies 100 percent snow cover +! LAI: Leaf area index +! +! ---------------------------------------------------------------------- +! Soil parameters: +! SMCMAX: MAX soil moisture content (porosity) +! SMCREF: Reference soil moisture (field capacity) +! SMCWLT: Wilting point soil moisture +! SMCWLT: Air dry soil moist content limits +! SSATPSI: SAT (saturation) soil potential +! DKSAT: SAT soil conductivity +! BEXP: B parameter +! SSATDW: SAT soil diffusivity +! F1: Soil thermal diffusivity/conductivity coef. +! QUARTZ: Soil quartz content +! Modified by F. Chen (12/22/97) to use the STATSGO soil map +! Modified By F. Chen (01/22/00) to include PLaya, Lava, and White San +! Modified By F. Chen (08/05/02) to include additional parameters for the Noah +! NOTE: SATDW = BB*SATDK*(SATPSI/MAXSMC) +! F11 = ALOG10(SATPSI) + BB*ALOG10(MAXSMC) + 2.0 +! REFSMC1=MAXSMC*(5.79E-9/SATDK)**(1/(2*BB+3)) 5.79E-9 m/s= 0.5 mm +! REFSMC=REFSMC1+1./3.(MAXSMC-REFSMC1) +! WLTSMC1=MAXSMC*(200./SATPSI)**(-1./BB) (Wetzel and Chang, 198 +! WLTSMC=WLTSMC1-0.5*WLTSMC1 +! Note: the values for playa is set for it to have a thermal conductivit +! as sand and to have a hydrulic conductivity as clay +! +! ---------------------------------------------------------------------- +! Class parameter 'SLOPETYP' was included to estimate linear reservoir +! coefficient 'SLOPE' to the baseflow runoff out of the bottom layer. +! lowest class (slopetyp=0) means highest slope parameter = 1. +! definition of slopetyp from 'zobler' slope type: +! slope class percent slope +! 1 0-8 +! 2 8-30 +! 3 > 30 +! 4 0-30 +! 5 0-8 & > 30 +! 6 8-30 & > 30 +! 7 0-8, 8-30, > 30 +! 9 GLACIAL ICE +! BLANK OCEAN/SEA +! SLOPE_DATA: linear reservoir coefficient +! SBETA_DATA: parameter used to caluculate vegetation effect on soil heat +! FXEXP_DAT: soil evaporation exponent used in DEVAP +! CSOIL_DATA: soil heat capacity [J M-3 K-1] +! SALP_DATA: shape parameter of distribution function of snow cover +! REFDK_DATA and REFKDT_DATA: parameters in the surface runoff parameteriz +! FRZK_DATA: frozen ground parameter +! ZBOT_DATA: depth[M] of lower boundary soil temperature +! CZIL_DATA: calculate roughness length of heat +! SMLOW_DATA and MHIGH_DATA: two soil moisture wilt, soil moisture referen +! parameters +! Set maximum number of soil-, veg-, and slopetyp in data statement. +! ---------------------------------------------------------------------- + INTEGER, PARAMETER :: MAX_SLOPETYP=30,MAX_SOILTYP=30,MAX_VEGTYP=30 + LOGICAL :: LOCAL + CHARACTER (LEN=256), INTENT(IN):: LLANDUSE, LSOIL + +! Veg parameters + INTEGER, INTENT(IN) :: VEGTYP + INTEGER, INTENT(OUT) :: NROOT + REAL, INTENT(INOUT) :: SHDFAC + REAL, INTENT(OUT) :: HS,RSMIN,RGL,SNUP, & + CMCMAX,RSMAX,TOPT, & + EMISSMIN, EMISSMAX, & + LAIMIN, LAIMAX, & + Z0MIN, Z0MAX, & + ALBEDOMIN, ALBEDOMAX, ZTOPV, ZBOTV +! Soil parameters + INTEGER, INTENT(IN) :: SOILTYP + REAL, INTENT(OUT) :: BEXP,DKSAT,DWSAT,F1,QUARTZ,SMCDRY, & + SMCMAX,SMCREF,SMCWLT,PSISAT +! General parameters + INTEGER, INTENT(IN) :: SLOPETYP,NSOIL + INTEGER :: I + + REAL, INTENT(OUT) :: SLOPE,CZIL,SBETA,FXEXP, & + CSOIL,SALP,FRZX,KDT,CFACTR, & + ZBOT,REFKDT,PTU + REAL, INTENT(OUT) :: LVCOEF + REAL,DIMENSION(1:NSOIL),INTENT(IN) :: SLDPTH,ZSOIL + REAL,DIMENSION(1:NSOIL),INTENT(OUT):: RTDIS + REAL :: FRZFACT,FRZK,REFDK + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + CHARACTER*256 :: err_message + errmsg = '' + errflg = 0 + +! SAVE +! ---------------------------------------------------------------------- +! + IF (SOILTYP .gt. SLCATS) THEN + errflg = 1 + errmsg = 'Warning: too many input soil types' + return + END IF + IF (VEGTYP .gt. LUCATS) THEN + errflg = 1 + errmsg = 'Warning: too many input landuse types' + return + END IF + IF (SLOPETYP .gt. SLPCATS) THEN + errflg = 1 + errmsg = 'Warning: too many input slope types' + return + END IF + +! ---------------------------------------------------------------------- +! SET-UP SOIL PARAMETERS +! ---------------------------------------------------------------------- + CSOIL = CSOIL_DATA + BEXP = BB (SOILTYP) + DKSAT = SATDK (SOILTYP) + DWSAT = SATDW (SOILTYP) + F1 = F11 (SOILTYP) + PSISAT = SATPSI (SOILTYP) + QUARTZ = QTZ (SOILTYP) + SMCDRY = DRYSMC (SOILTYP) + SMCMAX = MAXSMC (SOILTYP) + SMCREF = REFSMC (SOILTYP) + SMCWLT = WLTSMC (SOILTYP) +! ---------------------------------------------------------------------- +! Set-up universal parameters (not dependent on SOILTYP, VEGTYP or +! SLOPETYP) +! ---------------------------------------------------------------------- + ZBOT = ZBOT_DATA + SALP = SALP_DATA + SBETA = SBETA_DATA + REFDK = REFDK_DATA + FRZK = FRZK_DATA + FXEXP = FXEXP_DATA + REFKDT = REFKDT_DATA + PTU = 0. ! (not used yet) to satisify intent(out) + KDT = REFKDT * DKSAT / REFDK + CZIL = CZIL_DATA + SLOPE = SLOPE_DATA (SLOPETYP) + LVCOEF = LVCOEF_DATA + +! ---------------------------------------------------------------------- +! TO ADJUST FRZK PARAMETER TO ACTUAL SOIL TYPE: FRZK * FRZFACT +! ---------------------------------------------------------------------- + FRZFACT = (SMCMAX / SMCREF) * (0.412 / 0.468) + FRZX = FRZK * FRZFACT + +! ---------------------------------------------------------------------- +! SET-UP VEGETATION PARAMETERS +! ---------------------------------------------------------------------- + TOPT = TOPT_DATA + CMCMAX = CMCMAX_DATA + CFACTR = CFACTR_DATA + RSMAX = RSMAX_DATA + NROOT = NROTBL (VEGTYP) + SNUP = SNUPTBL (VEGTYP) + RSMIN = RSTBL (VEGTYP) + RGL = RGLTBL (VEGTYP) + HS = HSTBL (VEGTYP) + EMISSMIN = EMISSMINTBL (VEGTYP) + EMISSMAX = EMISSMAXTBL (VEGTYP) + LAIMIN = LAIMINTBL (VEGTYP) + LAIMAX = LAIMAXTBL (VEGTYP) + Z0MIN = Z0MINTBL (VEGTYP) + Z0MAX = Z0MAXTBL (VEGTYP) + ALBEDOMIN = ALBEDOMINTBL (VEGTYP) + ALBEDOMAX = ALBEDOMAXTBL (VEGTYP) + ZTOPV = ZTOPVTBL (VEGTYP) + ZBOTV = ZBOTVTBL (VEGTYP) + + IF (VEGTYP .eq. BARE) SHDFAC = 0.0 + IF (NROOT .gt. NSOIL) THEN + errflg = 1 + WRITE (err_message,*) 'Error: too many root layers ', & + NSOIL,NROOT + errmsg = TRIM(err_message) + return +! ---------------------------------------------------------------------- +! CALCULATE ROOT DISTRIBUTION. PRESENT VERSION ASSUMES UNIFORM +! DISTRIBUTION BASED ON SOIL LAYER DEPTHS. +! ---------------------------------------------------------------------- + END IF + DO I = 1,NROOT + RTDIS (I) = - SLDPTH (I)/ ZSOIL (NROOT) +! ---------------------------------------------------------------------- +! SET-UP SLOPE PARAMETER +! ---------------------------------------------------------------------- + END DO + +! print*,'end of PRMRED' +! print*,'VEGTYP',VEGTYP,'SOILTYP',SOILTYP,'SLOPETYP',SLOPETYP, & +! & 'CFACTR',CFACTR,'CMCMAX',CMCMAX,'RSMAX',RSMAX,'TOPT',TOPT, & +! & 'REFKDT',REFKDT,'KDT',KDT,'SBETA',SBETA, 'SHDFAC',SHDFAC, & +! & 'RSMIN',RSMIN,'RGL',RGL,'HS',HS,'ZBOT',ZBOT,'FRZX',FRZX, & +! & 'PSISAT',PSISAT,'SLOPE',SLOPE,'SNUP',SNUP,'SALP',SALP,'BEXP', & +! & BEXP, & +! & 'DKSAT',DKSAT,'DWSAT',DWSAT, & +! & 'SMCMAX',SMCMAX,'SMCWLT',SMCWLT,'SMCREF',SMCREF,'SMCDRY',SMCDRY, & +! & 'F1',F1,'QUARTZ',QUARTZ,'FXEXP',FXEXP, & +! & 'RTDIS',RTDIS,'SLDPTH',SLDPTH,'ZSOIL',ZSOIL, 'NROOT',NROOT, & +! & 'NSOIL',NSOIL,'Z0',Z0,'CZIL',CZIL,'LAI',LAI, & +! & 'CSOIL',CSOIL,'PTU',PTU, & +! & 'LOCAL', LOCAL + + END SUBROUTINE REDPRM + + SUBROUTINE ROSR12 (P,A,B,C,D,DELTA,NSOIL) + +! ---------------------------------------------------------------------- +! SUBROUTINE ROSR12 +! ---------------------------------------------------------------------- +! INVERT (SOLVE) THE TRI-DIAGONAL MATRIX PROBLEM SHOWN BELOW: +! ### ### ### ### ### ### +! #B(1), C(1), 0 , 0 , 0 , . . . , 0 # # # # # +! #A(2), B(2), C(2), 0 , 0 , . . . , 0 # # # # # +! # 0 , A(3), B(3), C(3), 0 , . . . , 0 # # # # D(3) # +! # 0 , 0 , A(4), B(4), C(4), . . . , 0 # # P(4) # # D(4) # +! # 0 , 0 , 0 , A(5), B(5), . . . , 0 # # P(5) # # D(5) # +! # . . # # . # = # . # +! # . . # # . # # . # +! # . . # # . # # . # +! # 0 , . . . , 0 , A(M-2), B(M-2), C(M-2), 0 # #P(M-2)# #D(M-2)# +! # 0 , . . . , 0 , 0 , A(M-1), B(M-1), C(M-1)# #P(M-1)# #D(M-1)# +! # 0 , . . . , 0 , 0 , 0 , A(M) , B(M) # # P(M) # # D(M) # +! ### ### ### ### ### ### +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER, INTENT(IN) :: NSOIL + INTEGER :: K, KK + + REAL, DIMENSION(1:NSOIL), INTENT(IN):: A, B, D + REAL, DIMENSION(1:NSOIL),INTENT(INOUT):: C,P,DELTA + +! ---------------------------------------------------------------------- +! INITIALIZE EQN COEF C FOR THE LOWEST SOIL LAYER +! ---------------------------------------------------------------------- + C (NSOIL) = 0.0 + P (1) = - C (1) / B (1) +! ---------------------------------------------------------------------- +! SOLVE THE COEFS FOR THE 1ST SOIL LAYER +! ---------------------------------------------------------------------- + +! ---------------------------------------------------------------------- +! SOLVE THE COEFS FOR SOIL LAYERS 2 THRU NSOIL +! ---------------------------------------------------------------------- + DELTA (1) = D (1) / B (1) + DO K = 2,NSOIL + P (K) = - C (K) * ( 1.0 / (B (K) + A (K) * P (K -1)) ) + DELTA (K) = (D (K) - A (K)* DELTA (K -1))* (1.0/ (B (K) + A (K)& + * P (K -1))) + END DO +! ---------------------------------------------------------------------- +! SET P TO DELTA FOR LOWEST SOIL LAYER +! ---------------------------------------------------------------------- + P (NSOIL) = DELTA (NSOIL) + +! ---------------------------------------------------------------------- +! ADJUST P FOR SOIL LAYERS 2 THRU NSOIL +! ---------------------------------------------------------------------- + DO K = 2,NSOIL + KK = NSOIL - K + 1 + P (KK) = P (KK) * P (KK +1) + DELTA (KK) + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE ROSR12 +! ---------------------------------------------------------------------- + + + SUBROUTINE SHFLX (SSOIL,STC,SMC,SMCMAX,NSOIL,T1,DT,YY,ZZ1,ZSOIL, & + TBOT,ZBOT,SMCWLT,PSISAT,SH2O,BEXP,F1,DF1, & + QUARTZ,CSOIL,VEGTYP,ISURBAN,SOILTYP,OPT_THCND & + ,HCPCT_FASDAS ) ! fasdas + +! ---------------------------------------------------------------------- +! SUBROUTINE SHFLX +! ---------------------------------------------------------------------- +! UPDATE THE TEMPERATURE STATE OF THE SOIL COLUMN BASED ON THE THERMAL +! DIFFUSION EQUATION AND UPDATE THE FROZEN SOIL MOISTURE CONTENT BASED +! ON THE TEMPERATURE. +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER, INTENT(IN) :: OPT_THCND + INTEGER, INTENT(IN) :: NSOIL, VEGTYP, ISURBAN, SOILTYP + INTEGER :: I + + REAL, INTENT(IN) :: BEXP,CSOIL,DF1,DT,F1,PSISAT,QUARTZ, & + SMCMAX, SMCWLT, TBOT,YY, ZBOT,ZZ1 + REAL, INTENT(INOUT) :: T1 + REAL, INTENT(OUT) :: SSOIL + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: SMC,ZSOIL + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: SH2O + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: STC + REAL, DIMENSION(1:NSOIL) :: AI, BI, CI, STCF,RHSTS + REAL, PARAMETER :: T0 = 273.15 + +! +! FASDAS +! + REAL, INTENT( OUT) :: HCPCT_FASDAS +! +! END FASDAS +! +! ---------------------------------------------------------------------- +! HRT ROUTINE CALCS THE RIGHT HAND SIDE OF THE SOIL TEMP DIF EQN +! ---------------------------------------------------------------------- + + ! Land case + + CALL HRT (RHSTS,STC,SMC,SMCMAX,NSOIL,ZSOIL,YY,ZZ1,TBOT, & + ZBOT,PSISAT,SH2O,DT,BEXP,SOILTYP,OPT_THCND, & + F1,DF1,QUARTZ,CSOIL,AI,BI,CI,VEGTYP,ISURBAN & + ,HCPCT_FASDAS ) !fasdas + + CALL HSTEP (STCF,STC,RHSTS,DT,NSOIL,AI,BI,CI) + + DO I = 1,NSOIL + STC (I) = STCF (I) + ENDDO + +! ---------------------------------------------------------------------- +! IN THE NO SNOWPACK CASE (VIA ROUTINE NOPAC BRANCH,) UPDATE THE GRND +! (SKIN) TEMPERATURE HERE IN RESPONSE TO THE UPDATED SOIL TEMPERATURE +! PROFILE ABOVE. (NOTE: INSPECTION OF ROUTINE SNOPAC SHOWS THAT T1 +! BELOW IS A DUMMY VARIABLE ONLY, AS SKIN TEMPERATURE IS UPDATED +! DIFFERENTLY IN ROUTINE SNOPAC) +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! CALCULATE SURFACE SOIL HEAT FLUX +! ---------------------------------------------------------------------- + T1 = (YY + (ZZ1- 1.0) * STC (1)) / ZZ1 + SSOIL = DF1 * (STC (1) - T1) / (0.5 * ZSOIL (1)) + +! ---------------------------------------------------------------------- + END SUBROUTINE SHFLX +! ---------------------------------------------------------------------- + + SUBROUTINE SMFLX (SMC,NSOIL,CMC,DT,PRCP1,ZSOIL, & + & SH2O,SLOPE,KDT,FRZFACT, & + & SMCMAX,BEXP,SMCWLT,DKSAT,DWSAT, & + & SHDFAC,CMCMAX, & + & RUNOFF1,RUNOFF2,RUNOFF3, & + & EDIR,EC,ET, & + & DRIP, SFHEAD1RT,INFXS1RT) + +! ---------------------------------------------------------------------- +! SUBROUTINE SMFLX +! ---------------------------------------------------------------------- +! CALCULATE SOIL MOISTURE FLUX. THE SOIL MOISTURE CONTENT (SMC - A PER +! UNIT VOLUME MEASUREMENT) IS A DEPENDENT VARIABLE THAT IS UPDATED WITH +! PROGNOSTIC EQNS. THE CANOPY MOISTURE CONTENT (CMC) IS ALSO UPDATED. +! FROZEN GROUND VERSION: NEW STATES ADDED: SH2O, AND FROZEN GROUND +! CORRECTION FACTOR, FRZFACT AND PARAMETER SLOPE. +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER, INTENT(IN) :: NSOIL + INTEGER :: I,K + + REAL, INTENT(IN) :: BEXP, CMCMAX, DKSAT,DWSAT, DT, EC, EDIR, & + KDT, PRCP1, SHDFAC, SLOPE, SMCMAX, SMCWLT + REAL, INTENT(OUT) :: DRIP, RUNOFF1, RUNOFF2, RUNOFF3 + REAL, INTENT(INOUT) :: CMC + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: ET,ZSOIL + REAL, DIMENSION(1:NSOIL), INTENT(INOUT):: SMC, SH2O + REAL, DIMENSION(1:NSOIL) :: AI, BI, CI, STCF,RHSTS, RHSTT, & + SICE, SH2OA, SH2OFG + REAL :: DUMMY, EXCESS,FRZFACT,PCPDRP,RHSCT,TRHSCT + REAL :: FAC2 + REAL :: FLIMIT + + REAL, INTENT(INOUT) :: SFHEAD1RT,INFXS1RT + +! ---------------------------------------------------------------------- +! EXECUTABLE CODE BEGINS HERE. +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! COMPUTE THE RIGHT HAND SIDE OF THE CANOPY EQN TERM ( RHSCT ) +! ---------------------------------------------------------------------- + DUMMY = 0. + +! ---------------------------------------------------------------------- +! CONVERT RHSCT (A RATE) TO TRHSCT (AN AMOUNT) AND ADD IT TO EXISTING +! CMC. IF RESULTING AMT EXCEEDS MAX CAPACITY, IT BECOMES DRIP AND WILL +! FALL TO THE GRND. +! ---------------------------------------------------------------------- + RHSCT = SHDFAC * PRCP1- EC + DRIP = 0. + TRHSCT = DT * RHSCT + EXCESS = CMC + TRHSCT + +! ---------------------------------------------------------------------- +! PCPDRP IS THE COMBINED PRCP1 AND DRIP (FROM CMC) THAT GOES INTO THE +! SOIL +! ---------------------------------------------------------------------- + IF (EXCESS > CMCMAX) DRIP = EXCESS - CMCMAX + PCPDRP = (1. - SHDFAC) * PRCP1+ DRIP / DT + +! ---------------------------------------------------------------------- +! STORE ICE CONTENT AT EACH SOIL LAYER BEFORE CALLING SRT and SSTEP +! + DO I = 1,NSOIL + SICE (I) = SMC (I) - SH2O (I) + END DO +! ---------------------------------------------------------------------- +! CALL SUBROUTINES SRT AND SSTEP TO SOLVE THE SOIL MOISTURE +! TENDENCY EQUATIONS. +! IF THE INFILTRATING PRECIP RATE IS NONTRIVIAL, +! (WE CONSIDER NONTRIVIAL TO BE A PRECIP TOTAL OVER THE TIME STEP +! EXCEEDING ONE ONE-THOUSANDTH OF THE WATER HOLDING CAPACITY OF +! THE FIRST SOIL LAYER) +! THEN CALL THE SRT/SSTEP SUBROUTINE PAIR TWICE IN THE MANNER OF +! TIME SCHEME "F" (IMPLICIT STATE, AVERAGED COEFFICIENT) +! OF SECTION 2 OF KALNAY AND KANAMITSU (1988, MWR, VOL 116, +! PAGES 1945-1958)TO MINIMIZE 2-DELTA-T OSCILLATIONS IN THE +! SOIL MOISTURE VALUE OF THE TOP SOIL LAYER THAT CAN ARISE BECAUSE +! OF THE EXTREME NONLINEAR DEPENDENCE OF THE SOIL HYDRAULIC +! DIFFUSIVITY COEFFICIENT AND THE HYDRAULIC CONDUCTIVITY ON THE +! SOIL MOISTURE STATE +! OTHERWISE CALL THE SRT/SSTEP SUBROUTINE PAIR ONCE IN THE MANNER OF +! TIME SCHEME "D" (IMPLICIT STATE, EXPLICIT COEFFICIENT) +! OF SECTION 2 OF KALNAY AND KANAMITSU +! PCPDRP IS UNITS OF KG/M**2/S OR MM/S, ZSOIL IS NEGATIVE DEPTH IN M +! ---------------------------------------------------------------------- +! According to Dr. Ken Mitchell's suggestion, add the second contraint +! to remove numerical instability of runoff and soil moisture +! FLIMIT is a limit value for FAC2 + FAC2=0.0 + DO I=1,NSOIL + FAC2=MAX(FAC2,SH2O(I)/SMCMAX) + ENDDO + CALL FAC2MIT(SMCMAX,FLIMIT) + +! ---------------------------------------------------------------------- +! FROZEN GROUND VERSION: +! SMC STATES REPLACED BY SH2O STATES IN SRT SUBR. SH2O & SICE STATES +! INC&UDED IN SSTEP SUBR. FROZEN GROUND CORRECTION FACTOR, FRZFACT +! ADDED. ALL WATER BALANCE CALCULATIONS USING UNFROZEN WATER +! ---------------------------------------------------------------------- + +#ifdef WRF_HYDRO +!DJG NDHMS/WRF-Hydro edit... Add previous ponded water to new precip drip... + PCPDRP = PCPDRP + SFHEAD1RT/1000./DT ! convert SFHEAD1RT to (m/s) +#endif + + + IF ( ( (PCPDRP * DT) > (0.0001*1000.0* (- ZSOIL (1))* SMCMAX) ) & + .OR. (FAC2 > FLIMIT) ) THEN + CALL SRT (RHSTT,EDIR,ET,SH2O,SH2O,NSOIL,PCPDRP,ZSOIL, & + DWSAT,DKSAT,SMCMAX,BEXP,RUNOFF1, & + RUNOFF2,DT,SMCWLT,SLOPE,KDT,FRZFACT,SICE,AI,BI,CI, & + SFHEAD1RT,INFXS1RT) + CALL SSTEP (SH2OFG,SH2O,DUMMY,RHSTT,RHSCT,DT,NSOIL,SMCMAX, & + CMCMAX,RUNOFF3,ZSOIL,SMC,SICE,AI,BI,CI,INFXS1RT) + DO K = 1,NSOIL + SH2OA (K) = (SH2O (K) + SH2OFG (K)) * 0.5 + END DO + CALL SRT (RHSTT,EDIR,ET,SH2O,SH2OA,NSOIL,PCPDRP,ZSOIL, & + DWSAT,DKSAT,SMCMAX,BEXP,RUNOFF1, & + RUNOFF2,DT,SMCWLT,SLOPE,KDT,FRZFACT,SICE,AI,BI,CI, & + SFHEAD1RT,INFXS1RT) + CALL SSTEP (SH2O,SH2O,CMC,RHSTT,RHSCT,DT,NSOIL,SMCMAX, & + CMCMAX,RUNOFF3,ZSOIL,SMC,SICE,AI,BI,CI,INFXS1RT) + + ELSE + CALL SRT (RHSTT,EDIR,ET,SH2O,SH2O,NSOIL,PCPDRP,ZSOIL, & + DWSAT,DKSAT,SMCMAX,BEXP,RUNOFF1, & + RUNOFF2,DT,SMCWLT,SLOPE,KDT,FRZFACT,SICE,AI,BI,CI, & + SFHEAD1RT,INFXS1RT) + CALL SSTEP (SH2O,SH2O,CMC,RHSTT,RHSCT,DT,NSOIL,SMCMAX, & + CMCMAX,RUNOFF3,ZSOIL,SMC,SICE,AI,BI,CI,INFXS1RT) +! RUNOF = RUNOFF + + END IF + +! ---------------------------------------------------------------------- + END SUBROUTINE SMFLX +! ---------------------------------------------------------------------- + + + SUBROUTINE SNFRAC (SNEQV,SNUP,SALP,SNOWH,SNCOVR, & + XLAI,SHDFAC,FVB,GAMA,FBUR, & + FGSN,ZTOPV,ZBOTV,UA_PHYS) + +! ---------------------------------------------------------------------- +! SUBROUTINE SNFRAC +! ---------------------------------------------------------------------- +! CALCULATE SNOW FRACTION (0 -> 1) +! SNEQV SNOW WATER EQUIVALENT (M) +! SNUP THRESHOLD SNEQV DEPTH ABOVE WHICH SNCOVR=1 +! SALP TUNING PARAMETER +! SNCOVR FRACTIONAL SNOW COVER +! ---------------------------------------------------------------------- + IMPLICIT NONE + + REAL, INTENT(IN) :: SNEQV,SNUP,SALP,SNOWH + REAL, INTENT(OUT) :: SNCOVR + REAL :: RSNOW, Z0N + LOGICAL, INTENT(IN) :: UA_PHYS ! UA: flag for UA option + REAL, INTENT(IN) :: ZTOPV ! UA: height of canopy top + REAL, INTENT(IN) :: ZBOTV ! UA: height of canopy bottom + REAL, INTENT(IN) :: SHDFAC ! UA: vegetation fraction + REAL, INTENT(INOUT) :: XLAI ! UA: LAI modified by snow + REAL, INTENT(OUT) :: FVB ! UA: frac. veg. w/snow beneath + REAL, INTENT(OUT) :: GAMA ! UA: = EXP(-1.* XLAI) + REAL, INTENT(OUT) :: FBUR ! UA: fraction of canopy buried + REAL, INTENT(OUT) :: FGSN ! UA: ground snow cover fraction + + REAL :: SNUPGRD = 0.02 ! UA: SWE limit for ground cover + +! ---------------------------------------------------------------------- +! SNUP IS VEG-CLASS DEPENDENT SNOWDEPTH THRESHHOLD (SET IN ROUTINE +! REDPRM) ABOVE WHICH SNOCVR=1. +! ---------------------------------------------------------------------- + IF (SNEQV < SNUP) THEN + RSNOW = SNEQV / SNUP + SNCOVR = 1. - ( EXP ( - SALP * RSNOW) - RSNOW * EXP ( - SALP)) + ELSE + SNCOVR = 1.0 + END IF + +! FORMULATION OF DICKINSON ET AL. 1986 +! Z0N = 0.035 + +! SNCOVR=SNOWH/(SNOWH + 5*Z0N) + +! FORMULATION OF MARSHALL ET AL. 1994 +! SNCOVR=SNEQV/(SNEQV + 2*Z0N) + + IF(UA_PHYS) THEN + +!--------------------------------------------------------------------- +! FGSN: FRACTION OF SOIL COVERED WITH SNOW +!--------------------------------------------------------------------- + IF (SNEQV < SNUPGRD) THEN + FGSN = SNEQV / SNUPGRD + ELSE + FGSN = 1.0 + END IF +!------------------------------------------------------------------ +! FBUR: VERTICAL FRACTION OF VEGETATION COVERED BY SNOW +! GRASS, CROP, AND SHRUB: MULTIPLY 0.4 BY ZTOPV AND ZBOTV BECAUSE +! THEY WILL BE PRESSED DOWN BY THE SNOW. +! FOREST: DON'T NEED TO CHANGE ZTOPV AND ZBOTV. + + IF(ZBOTV > 0. .AND. SNOWH > ZBOTV) THEN + IF(ZBOTV <= 0.5) THEN + FBUR = (SNOWH - 0.4*ZBOTV) / (0.4*(ZTOPV-ZBOTV)) ! short veg. + ELSE + FBUR = (SNOWH - ZBOTV) / (ZTOPV-ZBOTV) ! tall veg. + ENDIF + ELSE + FBUR = 0. + ENDIF + + FBUR = MIN(MAX(FBUR,0.0),1.0) + +! XLAI IS ADJUSTED FOR VERTICAL BURYING BY SNOW + XLAI = XLAI * (1.0 - FBUR) +! ---------------------------------------------------------------------- +! SNOW-COVERED SOIL: (1-SHDFAC)*FGSN +! VEGETATION WITH SNOW ABOVE DUE TO BURIAL FVEG_SN_AB = SHDFAC*FBUR +! SNOW ON THE GROUND THAT CAN BE "SEEN" BY SATELLITE +! (IF XLAI GOES TO ZERO): GAMA*FVB +! Where GAMA = exp(-XLAI) +! ---------------------------------------------------------------------- + +! VEGETATION WITH SNOW BELOW + FVB = SHDFAC * FGSN * (1.0 - FBUR) + +! GAMA IS USED TO DIVIDE FVB INTO TWO PARTS: +! GAMA=1 FOR XLAI=0 AND GAMA=0 FOR XLAI=6 + GAMA = EXP(-1.* XLAI) + ELSE + ! Define intent(out) terms for .NOT. UA_PHYS case + FVB = 0.0 + GAMA = 0.0 + FBUR = 0.0 + FGSN = 0.0 + END IF ! UA_PHYS + +! ---------------------------------------------------------------------- + END SUBROUTINE SNFRAC +! ---------------------------------------------------------------------- + + SUBROUTINE SNKSRC (TSNSR,TAVG,SMC,SH2O,ZSOIL,NSOIL, & + & SMCMAX,PSISAT,BEXP,DT,K,QTOT) +! ---------------------------------------------------------------------- +! SUBROUTINE SNKSRC +! ---------------------------------------------------------------------- +! CALCULATE SINK/SOURCE TERM OF THE TERMAL DIFFUSION EQUATION. (SH2O) IS +! AVAILABLE LIQUED WATER. +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER, INTENT(IN) :: K,NSOIL + REAL, INTENT(IN) :: BEXP, DT, PSISAT, QTOT, SMC, SMCMAX, & + TAVG + REAL, INTENT(INOUT) :: SH2O + + REAL, DIMENSION(1:NSOIL), INTENT(IN):: ZSOIL + + REAL :: DF, DZ, DZH, FREE, TSNSR, & + TDN, TM, TUP, TZ, X0, XDN, XH2O, XUP + + REAL, PARAMETER :: DH2O = 1.0000E3, HLICE = 3.3350E5, & + T0 = 2.7315E2 + + IF (K == 1) THEN + DZ = - ZSOIL (1) + ELSE + DZ = ZSOIL (K -1) - ZSOIL (K) + END IF +! ---------------------------------------------------------------------- +! VIA FUNCTION FRH2O, COMPUTE POTENTIAL OR 'EQUILIBRIUM' UNFROZEN +! SUPERCOOLED FREE WATER FOR GIVEN SOIL TYPE AND SOIL LAYER TEMPERATURE. +! FUNCTION FRH20 INVOKES EQN (17) FROM V. KOREN ET AL (1999, JGR, VOL. +! 104, PG 19573). (ASIDE: LATTER EQN IN JOURNAL IN CENTIGRADE UNITS. +! ROUTINE FRH2O USE FORM OF EQN IN KELVIN UNITS.) +! ---------------------------------------------------------------------- +! FREE = FRH2O(TAVG,SMC,SH2O,SMCMAX,BEXP,PSISAT) + +! ---------------------------------------------------------------------- +! IN NEXT BLOCK OF CODE, INVOKE EQN 18 OF V. KOREN ET AL (1999, JGR, +! VOL. 104, PG 19573.) THAT IS, FIRST ESTIMATE THE NEW AMOUNTOF LIQUID +! WATER, 'XH2O', IMPLIED BY THE SUM OF (1) THE LIQUID WATER AT THE BEGIN +! OF CURRENT TIME STEP, AND (2) THE FREEZE OF THAW CHANGE IN LIQUID +! WATER IMPLIED BY THE HEAT FLUX 'QTOT' PASSED IN FROM ROUTINE HRT. +! SECOND, DETERMINE IF XH2O NEEDS TO BE BOUNDED BY 'FREE' (EQUIL AMT) OR +! IF 'FREE' NEEDS TO BE BOUNDED BY XH2O. +! ---------------------------------------------------------------------- + CALL FRH2O (FREE,TAVG,SMC,SH2O,SMCMAX,BEXP,PSISAT) + +! ---------------------------------------------------------------------- +! FIRST, IF FREEZING AND REMAINING LIQUID LESS THAN LOWER BOUND, THEN +! REDUCE EXTENT OF FREEZING, THEREBY LETTING SOME OR ALL OF HEAT FLUX +! QTOT COOL THE SOIL TEMP LATER IN ROUTINE HRT. +! ---------------------------------------------------------------------- + XH2O = SH2O + QTOT * DT / (DH2O * HLICE * DZ) + IF ( XH2O < SH2O .AND. XH2O < FREE) THEN + IF ( FREE > SH2O ) THEN + XH2O = SH2O + ELSE + XH2O = FREE + END IF + END IF +! ---------------------------------------------------------------------- +! SECOND, IF THAWING AND THE INCREASE IN LIQUID WATER GREATER THAN UPPER +! BOUND, THEN REDUCE EXTENT OF THAW, THEREBY LETTING SOME OR ALL OF HEAT +! FLUX QTOT WARM THE SOIL TEMP LATER IN ROUTINE HRT. +! ---------------------------------------------------------------------- + IF ( XH2O > SH2O .AND. XH2O > FREE ) THEN + IF ( FREE < SH2O ) THEN + XH2O = SH2O + ELSE + XH2O = FREE + END IF + END IF + +! ---------------------------------------------------------------------- +! CALCULATE PHASE-CHANGE HEAT SOURCE/SINK TERM FOR USE IN ROUTINE HRT +! AND UPDATE LIQUID WATER TO REFLCET FINAL FREEZE/THAW INCREMENT. +! ---------------------------------------------------------------------- +! SNKSRC = -DH2O*HLICE*DZ*(XH2O-SH2O)/DT + IF (XH2O < 0.) XH2O = 0. + IF (XH2O > SMC) XH2O = SMC + TSNSR = - DH2O * HLICE * DZ * (XH2O - SH2O)/ DT + SH2O = XH2O + +! ---------------------------------------------------------------------- + END SUBROUTINE SNKSRC +! ---------------------------------------------------------------------- + + SUBROUTINE SNOPAC (ETP,ETA,PRCP,PRCPF,SNOWNG,SMC,SMCMAX,SMCWLT, & + SMCREF,SMCDRY,CMC,CMCMAX,NSOIL,DT, & + SBETA,DF1, & + Q2,T1,SFCTMP,T24,TH2,FDOWN,F1,SSOIL,STC,EPSCA,& + SFCPRS,BEXP,PC,RCH,RR,CFACTR,SNCOVR,ESD,SNDENS,& + SNOWH,SH2O,SLOPE,KDT,FRZFACT,PSISAT, & + ZSOIL,DWSAT,DKSAT,TBOT,ZBOT,SHDFAC,RUNOFF1, & + RUNOFF2,RUNOFF3,EDIR,EC,ET,ETT,NROOT,SNOMLT, & + RTDIS,QUARTZ,FXEXP,CSOIL, & + BETA,DRIP,DEW,FLX1,FLX2,FLX3,ESNOW,ETNS,EMISSI,& + RIBB,SOLDN, & + ISURBAN, & + VEGTYP, & + ETPN,FLX4,UA_PHYS, & + SFHEAD1RT,INFXS1RT,ETPND1,SOILTYP,OPT_THCND & + ,QFX_PHY,fasdas,HCPCT_FASDAS, & !fasdas + SIGMA,CPH2O,CPICE,LSUBF) +! ---------------------------------------------------------------------- +! SUBROUTINE SNOPAC +! ---------------------------------------------------------------------- +! CALCULATE SOIL MOISTURE AND HEAT FLUX VALUES & UPDATE SOIL MOISTURE +! CONTENT AND SOIL HEAT CONTENT VALUES FOR THE CASE WHEN A SNOW PACK IS +! PRESENT. +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER, INTENT(IN) :: OPT_THCND + INTEGER, INTENT(IN) :: NROOT, NSOIL,VEGTYP,SOILTYP + INTEGER, INTENT(IN) :: ISURBAN + INTEGER :: K +! +! kmh 09/03/2006 add IT16 for surface temperature iteration +! + INTEGER :: IT16 + LOGICAL, INTENT(IN) :: SNOWNG + +!DJG NDHMS/WRF-Hydro edit... + REAL, INTENT(INOUT) :: SFHEAD1RT,INFXS1RT,ETPND1 + + REAL, INTENT(IN) :: BEXP,CFACTR, CMCMAX,CSOIL,DF1,DKSAT, & + DT,DWSAT, EPSCA,FDOWN,F1,FXEXP, & + FRZFACT,KDT,PC, PRCP,PSISAT,Q2,QUARTZ, & + RCH,RR,SBETA,SFCPRS, SFCTMP, SHDFAC, & + SLOPE,SMCDRY,SMCMAX,SMCREF,SMCWLT, T24, & + TBOT,TH2,ZBOT,EMISSI,SOLDN,SIGMA,CPH2O, & + CPICE,LSUBF + REAL, INTENT(INOUT) :: CMC, BETA, ESD,FLX2,PRCPF,SNOWH,SNCOVR, & + SNDENS, T1, RIBB, ETP + REAL, INTENT(OUT) :: DEW,DRIP,EC,EDIR, ETNS, ESNOW,ETT, & + FLX1,FLX3, RUNOFF1,RUNOFF2,RUNOFF3, & + SSOIL,SNOMLT + REAL, DIMENSION(1:NSOIL),INTENT(IN) :: RTDIS,ZSOIL + REAL, DIMENSION(1:NSOIL),INTENT(OUT) :: ET + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: SMC,SH2O,STC + REAL, DIMENSION(1:NSOIL) :: ET1 + REAL :: DENOM,DSOIL,DTOT,EC1,EDIR1,ESDFLX,ETA, & + ETT1, ESNOW1, ESNOW2, ETA1,ETP1,ETP2, & + ETP3, ETNS1, ETANRG, ETAX, EX, FLX3X, & + FRCSNO,FRCSOI, PRCP1, QSAT,RSNOW, SEH, & + SNCOND,SSOIL1, T11,T12, T12A, T12AX, & + T12B, T14, YY, ZZ1 +! T12B, T14, YY, ZZ1,EMISSI_S +! +! kmh 01/11/2007 add T15, T16, and DTOT2 for SFC T iteration and snow heat flux +! + REAL :: T15, T16, DTOT2 + REAL, PARAMETER :: ESDMIN = 1.E-6, LSUBC = 2.501000E+6, & + LSUBS = 2.83E+6, TFREEZ = 273.15, & + SNOEXP = 2.0 + LOGICAL, INTENT(IN) :: UA_PHYS ! UA: flag for UA option + REAL, INTENT(INOUT) :: FLX4 ! UA: energy removed by canopy + REAL, INTENT(IN) :: ETPN ! UA: adjusted pot. evap. [mm/s] + REAL :: ETP1N ! UA: adjusted pot. evap. [m/s] + +! +! FASDAS +! + REAL :: QFX_PHY + INTEGER :: fasdas + REAL, INTENT( OUT) :: HCPCT_FASDAS +! +! END FASDAS +! +! ---------------------------------------------------------------------- +! EXECUTABLE CODE BEGINS HERE: +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! INITIALIZE EVAP TERMS. +! ---------------------------------------------------------------------- +! conversions: +! ESNOW [KG M-2 S-1] +! ESDFLX [KG M-2 S-1] .le. ESNOW +! ESNOW1 [M S-1] +! ESNOW2 [M] +! ETP [KG M-2 S-1] +! ETP1 [M S-1] +! ETP2 [M] +! ---------------------------------------------------------------------- + DEW = 0. + EDIR = 0. + EDIR1 = 0. + EC1 = 0. + EC = 0. +! EMISSI_S=0.95 ! For snow + + DO K = 1,NSOIL + ET (K) = 0. + ET1 (K) = 0. + END DO + ETT = 0. + ETT1 = 0. + +!DJG NDHMS/WRF-Hydro edit... + ETPND1 = 0. + + + ETNS = 0. + ETNS1 = 0. + ESNOW = 0. + ESNOW1 = 0. + ESNOW2 = 0. + +! ---------------------------------------------------------------------- +! CONVERT POTENTIAL EVAP (ETP) FROM KG M-2 S-1 TO ETP1 IN M S-1 +! ---------------------------------------------------------------------- + PRCP1 = PRCPF *0.001 +! ---------------------------------------------------------------------- +! IF ETP<0 (DOWNWARD) THEN DEWFALL (=FROSTFALL IN THIS CASE). +! ---------------------------------------------------------------------- + BETA = 1.0 + IF (ETP <= 0.0) THEN + IF ( ( RIBB >= 0.1 ) .AND. ( FDOWN > 150.0 ) ) THEN + ETP=(MIN(ETP*(1.0-RIBB),0.)*SNCOVR/0.980 + ETP*(0.980-SNCOVR))/0.980 + ENDIF + IF(ETP == 0.) BETA = 0.0 + ETP1 = ETP * 0.001 + IF(UA_PHYS) ETP1N = ETPN * 0.001 + DEW = -ETP1 + ESNOW2 = ETP1*DT + ETANRG = ETP*((1.-SNCOVR)*LSUBC + SNCOVR*LSUBS) + ELSE + ETP1 = ETP * 0.001 + IF(UA_PHYS) ETP1N = ETPN * 0.001 + ! LAND CASE + IF (SNCOVR < 1.) THEN + CALL EVAPO (ETNS1,SMC,NSOIL,CMC,ETP1,DT,ZSOIL, & + SH2O, & + SMCMAX,BEXP,PC,SMCWLT,DKSAT,DWSAT, & + SMCREF,SHDFAC,CMCMAX, & + SMCDRY,CFACTR, & + EDIR1,EC1,ET1,ETT1,SFCTMP,Q2,NROOT,RTDIS, & + FXEXP, SFHEAD1RT,ETPND1) +! ---------------------------------------------------------------------------- + EDIR1 = EDIR1* (1. - SNCOVR) + EC1 = EC1* (1. - SNCOVR) + DO K = 1,NSOIL + ET1 (K) = ET1 (K)* (1. - SNCOVR) + END DO + ETT1 = ETT1*(1.-SNCOVR) +! ETNS1 = EDIR1+ EC1+ ETT1 + ETNS1 = ETNS1*(1.-SNCOVR) +! ---------------------------------------------------------------------------- + EDIR = EDIR1*1000. + EC = EC1*1000. + DO K = 1,NSOIL + ET (K) = ET1 (K)*1000. + END DO +! +! FASDAS +! + if( fasdas == 1 ) then + QFX_PHY = EDIR + EC + DO K=1,NSOIL + QFX_PHY = QFX_PHY + ET(K) + END DO + endif +! +! END FASDAS +! + ETT = ETT1*1000. + ETNS = ETNS1*1000. + + +!DJG NDHMS/WRF-Hydro edit... + ETPND1 = ETPND1*1000. + + +! ---------------------------------------------------------------------- + + ENDIF + ESNOW = ETP*SNCOVR + IF(UA_PHYS) ESNOW = ETPN*SNCOVR ! USE ADJUSTED ETP + ESNOW1 = ESNOW*0.001 + ESNOW2 = ESNOW1*DT + ETANRG = ESNOW*LSUBS + ETNS*LSUBC + ENDIF + +! ---------------------------------------------------------------------- +! IF PRECIP IS FALLING, CALCULATE HEAT FLUX FROM SNOW SFC TO NEWLY +! ACCUMULATING PRECIP. NOTE THAT THIS REFLECTS THE FLUX APPROPRIATE FOR +! THE NOT-YET-UPDATED SKIN TEMPERATURE (T1). ASSUMES TEMPERATURE OF THE +! SNOWFALL STRIKING THE GROUND IS =SFCTMP (LOWEST MODEL LEVEL AIR TEMP). +! ---------------------------------------------------------------------- + FLX1 = 0.0 + IF (SNOWNG) THEN + FLX1 = CPICE * PRCP * (T1- SFCTMP) + ELSE + IF (PRCP > 0.0) FLX1 = CPH2O * PRCP * (T1- SFCTMP) +! ---------------------------------------------------------------------- +! CALCULATE AN 'EFFECTIVE SNOW-GRND SFC TEMP' (T12) BASED ON HEAT FLUXES +! BETWEEN THE SNOW PACK AND THE SOIL AND ON NET RADIATION. +! INCLUDE FLX1 (PRECIP-SNOW SFC) AND FLX2 (FREEZING RAIN LATENT HEAT) +! FLUXES. FLX1 FROM ABOVE, FLX2 BROUGHT IN VIA COMMOM BLOCK RITE. +! FLX2 REFLECTS FREEZING RAIN LATENT HEAT FLUX USING T1 CALCULATED IN +! PENMAN. +! ---------------------------------------------------------------------- + END IF + DSOIL = - (0.5 * ZSOIL (1)) + DTOT = SNOWH + DSOIL + DENOM = 1.0+ DF1 / (DTOT * RR * RCH) +! surface emissivity weighted by snow cover fraction +! T12A = ( (FDOWN - FLX1 - FLX2 - & +! & ((SNCOVR*EMISSI_S)+EMISSI*(1.0-SNCOVR))*SIGMA *T24)/RCH & +! & + TH2 - SFCTMP - ETANRG/RCH ) / RR + T12A = ( (FDOWN - FLX1- FLX2- EMISSI * SIGMA * T24)/ RCH & + + TH2- SFCTMP - ETANRG / RCH ) / RR + + T12B = DF1 * STC (1) / (DTOT * RR * RCH) + +! ---------------------------------------------------------------------- +! IF THE 'EFFECTIVE SNOW-GRND SFC TEMP' IS AT OR BELOW FREEZING, NO SNOW +! MELT WILL OCCUR. SET THE SKIN TEMP TO THIS EFFECTIVE TEMP. REDUCE +! (BY SUBLIMINATION ) OR INCREASE (BY FROST) THE DEPTH OF THE SNOWPACK, +! DEPENDING ON SIGN OF ETP. +! UPDATE SOIL HEAT FLUX (SSOIL) USING NEW SKIN TEMPERATURE (T1) +! SINCE NO SNOWMELT, SET ACCUMULATED SNOWMELT TO ZERO, SET 'EFFECTIVE' +! PRECIP FROM SNOWMELT TO ZERO, SET PHASE-CHANGE HEAT FLUX FROM SNOWMELT +! TO ZERO. +! ---------------------------------------------------------------------- +! SUB-FREEZING BLOCK +! ---------------------------------------------------------------------- + T12 = (SFCTMP + T12A + T12B) / DENOM + IF (T12 <= TFREEZ) THEN + T1 = T12 + SSOIL = DF1 * (T1- STC (1)) / DTOT +! ESD = MAX (0.0, ESD- ETP2) + ESD = MAX(0.0, ESD-ESNOW2) + FLX3 = 0.0 + EX = 0.0 + + SNOMLT = 0.0 + IF(UA_PHYS) FLX4 = 0.0 +! ---------------------------------------------------------------------- +! IF THE 'EFFECTIVE SNOW-GRND SFC TEMP' IS ABOVE FREEZING, SNOW MELT +! WILL OCCUR. CALL THE SNOW MELT RATE,EX AND AMT, SNOMLT. REVISE THE +! EFFECTIVE SNOW DEPTH. REVISE THE SKIN TEMP BECAUSE IT WOULD HAVE CHGD +! DUE TO THE LATENT HEAT RELEASED BY THE MELTING. CALC THE LATENT HEAT +! RELEASED, FLX3. SET THE EFFECTIVE PRECIP, PRCP1 TO THE SNOW MELT RATE, +! EX FOR USE IN SMFLX. ADJUSTMENT TO T1 TO ACCOUNT FOR SNOW PATCHES. +! CALCULATE QSAT VALID AT FREEZING POINT. NOTE THAT ESAT (SATURATION +! VAPOR PRESSURE) VALUE OF 6.11E+2 USED HERE IS THAT VALID AT FRZZING +! POINT. NOTE THAT ETP FROM CALL PENMAN IN SFLX IS IGNORED HERE IN +! FAVOR OF BULK ETP OVER 'OPEN WATER' AT FREEZING TEMP. +! UPDATE SOIL HEAT FLUX (S) USING NEW SKIN TEMPERATURE (T1) +! ---------------------------------------------------------------------- +! ABOVE FREEZING BLOCK +! ---------------------------------------------------------------------- + ELSE +! From V3.9 original code (commented) replaced to allow complete melting of small snow amounts +! T1 = TFREEZ * SNCOVR ** SNOEXP + T12 * (1.0- SNCOVR ** SNOEXP) + T1 = TFREEZ * max(0.01,SNCOVR ** SNOEXP) + T12 * (1.0- max(0.01,SNCOVR ** SNOEXP)) + BETA = 1.0 + +! ---------------------------------------------------------------------- +! IF POTENTIAL EVAP (SUBLIMATION) GREATER THAN DEPTH OF SNOWPACK. +! BETA<1 +! SNOWPACK HAS SUBLIMATED AWAY, SET DEPTH TO ZERO. +! ---------------------------------------------------------------------- + SSOIL = DF1 * (T1- STC (1)) / DTOT + IF (ESD-ESNOW2 <= ESDMIN) THEN + ESD = 0.0 + EX = 0.0 + SNOMLT = 0.0 + FLX3 = 0.0 + IF(UA_PHYS) FLX4 = 0.0 +! ---------------------------------------------------------------------- +! SUBLIMATION LESS THAN DEPTH OF SNOWPACK +! SNOWPACK (ESD) REDUCED BY ESNOW2 (DEPTH OF SUBLIMATED SNOW) +! ---------------------------------------------------------------------- + ELSE + ESD = ESD-ESNOW2 + ETP3 = ETP * LSUBC + SEH = RCH * (T1- TH2) + T14 = T1* T1 + T14 = T14* T14 +! FLX3 = FDOWN - FLX1 - FLX2 - & +! ((SNCOVR*EMISSI_S)+EMISSI*(1-SNCOVR))*SIGMA*T14 - & +! SSOIL - SEH - ETANRG + FLX3 = FDOWN - FLX1- FLX2- EMISSI*SIGMA * T14- SSOIL - SEH - ETANRG + IF (FLX3 <= 0.0) FLX3 = 0.0 + + IF(UA_PHYS .AND. FLX4 > 0. .AND. FLX3 > 0.) THEN + IF(FLX3 >= FLX4) THEN + FLX3 = FLX3 - FLX4 + ELSE + FLX4 = FLX3 + FLX3 = 0. + ENDIF + ELSE + FLX4 = 0.0 + ENDIF + +! ---------------------------------------------------------------------- +! SNOWMELT REDUCTION DEPENDING ON SNOW COVER +! ---------------------------------------------------------------------- + EX = FLX3*0.001/ LSUBF + +! ---------------------------------------------------------------------- +! ESDMIN REPRESENTS A SNOWPACK DEPTH THRESHOLD VALUE BELOW WHICH WE +! CHOOSE NOT TO RETAIN ANY SNOWPACK, AND INSTEAD INCLUDE IT IN SNOWMELT. +! ---------------------------------------------------------------------- + SNOMLT = EX * DT + IF (ESD- SNOMLT >= ESDMIN) THEN + ESD = ESD- SNOMLT +! ---------------------------------------------------------------------- +! SNOWMELT EXCEEDS SNOW DEPTH +! ---------------------------------------------------------------------- + ELSE + EX = ESD / DT + FLX3 = EX *1000.0* LSUBF + SNOMLT = ESD + + ESD = 0.0 +! ---------------------------------------------------------------------- +! END OF 'ESD .LE. ETP2' IF-BLOCK +! ---------------------------------------------------------------------- + END IF + END IF + +! ---------------------------------------------------------------------- +! END OF 'T12 .LE. TFREEZ' IF-BLOCK +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! IF NON-GLACIAL LAND, ADD SNOWMELT RATE (EX) TO PRECIP RATE TO BE USED +! IN SUBROUTINE SMFLX (SOIL MOISTURE EVOLUTION) VIA INFILTRATION. +! +! RUNOFF/BASEFLOW LATER NEAR THE END OF SFLX (AFTER RETURN FROM CALL TO +! SUBROUTINE SNOPAC) +! ---------------------------------------------------------------------- + PRCP1 = PRCP1+ EX + +! ---------------------------------------------------------------------- +! SET THE EFFECTIVE POTNL EVAPOTRANSP (ETP1) TO ZERO SINCE THIS IS SNOW +! CASE, SO SURFACE EVAP NOT CALCULATED FROM EDIR, EC, OR ETT IN SMFLX +! (BELOW). +! SMFLX RETURNS UPDATED SOIL MOISTURE VALUES FOR NON-GLACIAL LAND. +! ---------------------------------------------------------------------- + END IF + CALL SMFLX (SMC,NSOIL,CMC,DT,PRCP1,ZSOIL, & + SH2O,SLOPE,KDT,FRZFACT, & + SMCMAX,BEXP,SMCWLT,DKSAT,DWSAT, & + SHDFAC,CMCMAX, & + RUNOFF1,RUNOFF2,RUNOFF3, & + EDIR1,EC1,ET1, & + DRIP, SFHEAD1RT,INFXS1RT) +! ---------------------------------------------------------------------- +! BEFORE CALL SHFLX IN THIS SNOWPACK CASE, SET ZZ1 AND YY ARGUMENTS TO +! SPECIAL VALUES THAT ENSURE THAT GROUND HEAT FLUX CALCULATED IN SHFLX +! MATCHES THAT ALREADY COMPUTER FOR BELOW THE SNOWPACK, THUS THE SFC +! HEAT FLUX TO BE COMPUTED IN SHFLX WILL EFFECTIVELY BE THE FLUX AT THE +! SNOW TOP SURFACE. T11 IS A DUMMY ARGUEMENT SO WE WILL NOT USE THE +! SKIN TEMP VALUE AS REVISED BY SHFLX. +! ---------------------------------------------------------------------- + ZZ1 = 1.0 + YY = STC (1) -0.5* SSOIL * ZSOIL (1)* ZZ1/ DF1 + +! ---------------------------------------------------------------------- +! SHFLX WILL CALC/UPDATE THE SOIL TEMPS. NOTE: THE SUB-SFC HEAT FLUX +! (SSOIL1) AND THE SKIN TEMP (T11) OUTPUT FROM THIS SHFLX CALL ARE NOT +! USED IN ANY SUBSEQUENT CALCULATIONS. RATHER, THEY ARE DUMMY VARIABLES +! HERE IN THE SNOPAC CASE, SINCE THE SKIN TEMP AND SUB-SFC HEAT FLUX ARE +! UPDATED INSTEAD NEAR THE BEGINNING OF THE CALL TO SNOPAC. +! ---------------------------------------------------------------------- + T11 = T1 + CALL SHFLX (SSOIL1,STC,SMC,SMCMAX,NSOIL,T11,DT,YY,ZZ1,ZSOIL, & + TBOT,ZBOT,SMCWLT,PSISAT,SH2O,BEXP,F1,DF1, & + QUARTZ,CSOIL,VEGTYP,ISURBAN,SOILTYP,OPT_THCND & + ,HCPCT_FASDAS ) !fasdas + +! ---------------------------------------------------------------------- +! SNOW DEPTH AND DENSITY ADJUSTMENT BASED ON SNOW COMPACTION. YY IS +! ASSUMED TO BE THE SOIL TEMPERTURE AT THE TOP OF THE SOIL COLUMN. +! ---------------------------------------------------------------------- + ! LAND + IF (ESD > 0.) THEN + CALL SNOWPACK (ESD,DT,SNOWH,SNDENS,T1,YY,SNOMLT,UA_PHYS) + ELSE + ESD = 0. + SNOWH = 0. + SNDENS = 0. + SNCOND = 1. + SNCOVR = 0. + END IF + +! ---------------------------------------------------------------------- + END SUBROUTINE SNOPAC +! ---------------------------------------------------------------------- + + + SUBROUTINE SNOWPACK (ESD,DTSEC,SNOWH,SNDENS,TSNOW,TSOIL,SNOMLT,UA_PHYS) + +! ---------------------------------------------------------------------- +! SUBROUTINE SNOWPACK +! ---------------------------------------------------------------------- +! CALCULATE COMPACTION OF SNOWPACK UNDER CONDITIONS OF INCREASING SNOW +! DENSITY, AS OBTAINED FROM AN APPROXIMATE SOLUTION OF E. ANDERSON'S +! DIFFERENTIAL EQUATION (3.29), NOAA TECHNICAL REPORT NWS 19, BY VICTOR +! KOREN, 03/25/95. +! ---------------------------------------------------------------------- +! ESD WATER EQUIVALENT OF SNOW (M) +! DTSEC TIME STEP (SEC) +! SNOWH SNOW DEPTH (M) +! SNDENS SNOW DENSITY (G/CM3=DIMENSIONLESS FRACTION OF H2O DENSITY) +! TSNOW SNOW SURFACE TEMPERATURE (K) +! TSOIL SOIL SURFACE TEMPERATURE (K) + +! SUBROUTINE WILL RETURN NEW VALUES OF SNOWH AND SNDENS +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER :: IPOL, J + REAL, INTENT(IN) :: ESD, DTSEC,TSNOW,TSOIL + REAL, INTENT(INOUT) :: SNOWH, SNDENS + REAL :: BFAC,DSX,DTHR,DW,SNOWHC,PEXP, & + TAVGC,TSNOWC,TSOILC,ESDC,ESDCX + REAL, PARAMETER :: C1 = 0.01, C2 = 21.0, G = 9.81, & + KN = 4000.0 + LOGICAL, INTENT(IN) :: UA_PHYS ! UA: flag for UA option + REAL, INTENT(IN) :: SNOMLT ! UA: snow melt [m] + REAL :: SNOMLTC ! UA: snow melt [cm] +! ---------------------------------------------------------------------- +! CONVERSION INTO SIMULATION UNITS +! ---------------------------------------------------------------------- + SNOWHC = SNOWH *100. + ESDC = ESD *100. + IF(UA_PHYS) SNOMLTC = SNOMLT *100. + DTHR = DTSEC /3600. + TSNOWC = TSNOW -273.15 + TSOILC = TSOIL -273.15 + +! ---------------------------------------------------------------------- +! CALCULATING OF AVERAGE TEMPERATURE OF SNOW PACK +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! CALCULATING OF SNOW DEPTH AND DENSITY AS A RESULT OF COMPACTION +! SNDENS=DS0*(EXP(BFAC*ESD)-1.)/(BFAC*ESD) +! BFAC=DTHR*C1*EXP(0.08*TAVGC-C2*DS0) +! NOTE: BFAC*ESD IN SNDENS EQN ABOVE HAS TO BE CAREFULLY TREATED +! NUMERICALLY BELOW: +! C1 IS THE FRACTIONAL INCREASE IN DENSITY (1/(CM*HR)) +! C2 IS A CONSTANT (CM3/G) KOJIMA ESTIMATED AS 21 CMS/G +! ---------------------------------------------------------------------- + TAVGC = 0.5* (TSNOWC + TSOILC) + IF (ESDC > 1.E-2) THEN + ESDCX = ESDC + ELSE + ESDCX = 1.E-2 + END IF + +! DSX = SNDENS*((DEXP(BFAC*ESDC)-1.)/(BFAC*ESDC)) +! ---------------------------------------------------------------------- +! THE FUNCTION OF THE FORM (e**x-1)/x EMBEDDED IN ABOVE EXPRESSION +! FOR DSX WAS CAUSING NUMERICAL DIFFICULTIES WHEN THE DENOMINATOR "x" +! (I.E. BFAC*ESDC) BECAME ZERO OR APPROACHED ZERO (DESPITE THE FACT THAT +! THE ANALYTICAL FUNCTION (e**x-1)/x HAS A WELL DEFINED LIMIT AS +! "x" APPROACHES ZERO), HENCE BELOW WE REPLACE THE (e**x-1)/x +! EXPRESSION WITH AN EQUIVALENT, NUMERICALLY WELL-BEHAVED +! POLYNOMIAL EXPANSION. + +! NUMBER OF TERMS OF POLYNOMIAL EXPANSION, AND HENCE ITS ACCURACY, +! IS GOVERNED BY ITERATION LIMIT "IPOL". +! IPOL GREATER THAN 9 ONLY MAKES A DIFFERENCE ON DOUBLE +! PRECISION (RELATIVE ERRORS GIVEN IN PERCENT %). +! IPOL=9, FOR REL.ERROR <~ 1.6 E-6 % (8 SIGNIFICANT DIGITS) +! IPOL=8, FOR REL.ERROR <~ 1.8 E-5 % (7 SIGNIFICANT DIGITS) +! IPOL=7, FOR REL.ERROR <~ 1.8 E-4 % ... +! ---------------------------------------------------------------------- + BFAC = DTHR * C1* EXP (0.08* TAVGC - C2* SNDENS) + IPOL = 4 + PEXP = 0. +! PEXP = (1. + PEXP)*BFAC*ESDC/REAL(J+1) + DO J = IPOL,1, -1 + PEXP = (1. + PEXP)* BFAC * ESDCX / REAL (J +1) + END DO + + PEXP = PEXP + 1. +! ---------------------------------------------------------------------- +! ABOVE LINE ENDS POLYNOMIAL SUBSTITUTION +! ---------------------------------------------------------------------- +! END OF KOREAN FORMULATION + +! BASE FORMULATION (COGLEY ET AL., 1990) +! CONVERT DENSITY FROM G/CM3 TO KG/M3 +! DSM=SNDENS*1000.0 + +! DSX=DSM+DTSEC*0.5*DSM*G*ESD/ +! & (1E7*EXP(-0.02*DSM+KN/(TAVGC+273.16)-14.643)) + +! & CONVERT DENSITY FROM KG/M3 TO G/CM3 +! DSX=DSX/1000.0 + +! END OF COGLEY ET AL. FORMULATION + +! ---------------------------------------------------------------------- +! SET UPPER/LOWER LIMIT ON SNOW DENSITY +! ---------------------------------------------------------------------- + DSX = SNDENS * (PEXP) + IF (DSX > 0.40) DSX = 0.40 + IF (DSX < 0.05) DSX = 0.05 +! ---------------------------------------------------------------------- +! UPDATE OF SNOW DEPTH AND DENSITY DEPENDING ON LIQUID WATER DURING +! SNOWMELT. ASSUMED THAT 13% OF LIQUID WATER CAN BE STORED IN SNOW PER +! DAY DURING SNOWMELT TILL SNOW DENSITY 0.40. +! ---------------------------------------------------------------------- + SNDENS = DSX + IF (TSNOWC >= 0.) THEN + DW = 0.13* DTHR /24. + IF ( UA_PHYS .AND. TSOILC >= 0.) THEN + DW = MIN (DW, 0.13*SNOMLTC/(ESDCX+0.13*SNOMLTC)) + ENDIF + SNDENS = SNDENS * (1. - DW) + DW + IF (SNDENS >= 0.40) SNDENS = 0.40 +! ---------------------------------------------------------------------- +! CALCULATE SNOW DEPTH (CM) FROM SNOW WATER EQUIVALENT AND SNOW DENSITY. +! CHANGE SNOW DEPTH UNITS TO METERS +! ---------------------------------------------------------------------- + END IF + SNOWHC = ESDC / SNDENS + SNOWH = SNOWHC *0.01 + +! ---------------------------------------------------------------------- + END SUBROUTINE SNOWPACK +! ---------------------------------------------------------------------- + + SUBROUTINE SNOWZ0 (SNCOVR,Z0, Z0BRD, SNOWH,FBUR,FGSN,SHDMAX,UA_PHYS) + +! ---------------------------------------------------------------------- +! SUBROUTINE SNOWZ0 +! ---------------------------------------------------------------------- +! CALCULATE TOTAL ROUGHNESS LENGTH OVER SNOW +! SNCOVR FRACTIONAL SNOW COVER +! Z0 ROUGHNESS LENGTH (m) +! Z0S SNOW ROUGHNESS LENGTH:=0.001 (m) +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: SNCOVR, Z0BRD + REAL, INTENT(OUT) :: Z0 + REAL, PARAMETER :: Z0S=0.001 + REAL, INTENT(IN) :: SNOWH + REAL :: BURIAL + REAL :: Z0EFF + LOGICAL, INTENT(IN) :: UA_PHYS ! UA: flag for UA option + REAL, INTENT(IN) :: FBUR ! UA: fraction of canopy buried + REAL, INTENT(IN) :: FGSN ! UA: ground snow cover fraction + REAL, INTENT(IN) :: SHDMAX ! UA: maximum vegetation fraction + REAL, PARAMETER :: Z0G=0.01 ! UA: soil roughness + REAL :: FV,A1,A2 + + IF(UA_PHYS) THEN + + FV = SHDMAX * (1.-FBUR) + A1 = (1.-FV)**2*((1.-FGSN**2)*LOG(Z0G) + (FGSN**2)*LOG(Z0S)) + A2 = (1.-(1.-FV)**2)*LOG(Z0BRD) + Z0 = EXP(A1+A2) + + ELSE + +!m Z0 = (1.- SNCOVR)* Z0BRD + SNCOVR * Z0S + BURIAL = 7.0*Z0BRD - SNOWH + IF(BURIAL.LE.0.0007) THEN + Z0EFF = Z0S + ELSE + Z0EFF = BURIAL/7.0 + ENDIF + + Z0 = (1.- SNCOVR)* Z0BRD + SNCOVR * Z0EFF + + ENDIF +! ---------------------------------------------------------------------- + END SUBROUTINE SNOWZ0 +! ---------------------------------------------------------------------- + + + SUBROUTINE SNOW_NEW (TEMP,NEWSN,SNOWH,SNDENS) + +! ---------------------------------------------------------------------- +! SUBROUTINE SNOW_NEW +! ---------------------------------------------------------------------- +! CALCULATE SNOW DEPTH AND DENSITY TO ACCOUNT FOR THE NEW SNOWFALL. +! NEW VALUES OF SNOW DEPTH & DENSITY RETURNED. + +! TEMP AIR TEMPERATURE (K) +! NEWSN NEW SNOWFALL (M) +! SNOWH SNOW DEPTH (M) +! SNDENS SNOW DENSITY (G/CM3=DIMENSIONLESS FRACTION OF H2O DENSITY) +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: NEWSN, TEMP + REAL, INTENT(INOUT) :: SNDENS, SNOWH + REAL :: DSNEW, HNEWC, SNOWHC,NEWSNC,TEMPC + +! ---------------------------------------------------------------------- +! CONVERSION INTO SIMULATION UNITS +! ---------------------------------------------------------------------- + SNOWHC = SNOWH *100. + NEWSNC = NEWSN *100. + +! ---------------------------------------------------------------------- +! CALCULATING NEW SNOWFALL DENSITY DEPENDING ON TEMPERATURE +! EQUATION FROM GOTTLIB L. 'A GENERAL RUNOFF MODEL FOR SNOWCOVERED +! AND GLACIERIZED BASIN', 6TH NORDIC HYDROLOGICAL CONFERENCE, +! VEMADOLEN, SWEDEN, 1980, 172-177PP. +!----------------------------------------------------------------------- + TEMPC = TEMP -273.15 + IF (TEMPC <= -15.) THEN + DSNEW = 0.05 + ELSE + DSNEW = 0.05+0.0017* (TEMPC +15.)**1.5 + END IF +! ---------------------------------------------------------------------- +! ADJUSTMENT OF SNOW DENSITY DEPENDING ON NEW SNOWFALL +! ---------------------------------------------------------------------- + HNEWC = NEWSNC / DSNEW + IF (SNOWHC + HNEWC .LT. 1.0E-3) THEN + SNDENS = MAX(DSNEW,SNDENS) + ELSE + SNDENS = (SNOWHC * SNDENS + HNEWC * DSNEW)/ (SNOWHC + HNEWC) + ENDIF + SNOWHC = SNOWHC + HNEWC + SNOWH = SNOWHC *0.01 + +! ---------------------------------------------------------------------- + END SUBROUTINE SNOW_NEW +! ---------------------------------------------------------------------- + + SUBROUTINE SRT (RHSTT,EDIR,ET,SH2O,SH2OA,NSOIL,PCPDRP, & + ZSOIL,DWSAT,DKSAT,SMCMAX,BEXP,RUNOFF1, & + RUNOFF2,DT,SMCWLT,SLOPE,KDT,FRZX,SICE,AI,BI,CI, & + SFHEAD1RT,INFXS1RT ) + +! ---------------------------------------------------------------------- +! SUBROUTINE SRT +! ---------------------------------------------------------------------- +! CALCULATE THE RIGHT HAND SIDE OF THE TIME TENDENCY TERM OF THE SOIL +! WATER DIFFUSION EQUATION. ALSO TO COMPUTE ( PREPARE ) THE MATRIX +! COEFFICIENTS FOR THE TRI-DIAGONAL MATRIX OF THE IMPLICIT TIME SCHEME. +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER, INTENT(IN) :: NSOIL + INTEGER :: IALP1, IOHINF, J, JJ, K, KS + +!DJG NDHMS/WRF-Hydro edit... Variables used in OV routing infiltration calcs + REAL, INTENT(INOUT) :: SFHEAD1RT, INFXS1RT + REAL :: SFCWATR,chcksm + + + + REAL, INTENT(IN) :: BEXP, DKSAT, DT, DWSAT, EDIR, FRZX, & + KDT, PCPDRP, SLOPE, SMCMAX, SMCWLT + REAL, INTENT(OUT) :: RUNOFF1, RUNOFF2 + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: ET, SH2O, SH2OA, SICE, & + ZSOIL + REAL, DIMENSION(1:NSOIL), INTENT(OUT) :: RHSTT + REAL, DIMENSION(1:NSOIL), INTENT(OUT) :: AI, BI, CI + REAL, DIMENSION(1:NSOIL) :: DMAX + REAL :: ACRT, DD, DDT, DDZ, DDZ2, DENOM, & + DENOM2,DICE, DSMDZ, DSMDZ2, DT1, & + FCR,INFMAX,MXSMC,MXSMC2,NUMER,PDDUM, & + PX, SICEMAX,SLOPX, SMCAV, SSTT, & + SUM, VAL, WCND, WCND2, WDF, WDF2 + INTEGER, PARAMETER :: CVFRZ = 3 + +! ---------------------------------------------------------------------- +! FROZEN GROUND VERSION: +! REFERENCE FROZEN GROUND PARAMETER, CVFRZ, IS A SHAPE PARAMETER OF +! AREAL DISTRIBUTION FUNCTION OF SOIL ICE CONTENT WHICH EQUALS 1/CV. +! CV IS A COEFFICIENT OF SPATIAL VARIATION OF SOIL ICE CONTENT. BASED +! ON FIELD DATA CV DEPENDS ON AREAL MEAN OF FROZEN DEPTH, AND IT CLOSE +! TO CONSTANT = 0.6 IF AREAL MEAN FROZEN DEPTH IS ABOVE 20 CM. THAT IS +! WHY PARAMETER CVFRZ = 3 (INT{1/0.6*0.6}). +! CURRENT LOGIC DOESN'T ALLOW CVFRZ BE BIGGER THAN 3 +! ---------------------------------------------------------------------- + +! ---------------------------------------------------------------------- +! DETERMINE RAINFALL INFILTRATION RATE AND RUNOFF. INCLUDE THE +! INFILTRATION FORMULE FROM SCHAAKE AND KOREN MODEL. +! MODIFIED BY Q DUAN +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! LET SICEMAX BE THE GREATEST, IF ANY, FROZEN WATER CONTENT WITHIN SOIL +! LAYERS. +! ---------------------------------------------------------------------- + IOHINF = 1 + SICEMAX = 0.0 + DO KS = 1,NSOIL + IF (SICE (KS) > SICEMAX) SICEMAX = SICE (KS) +! ---------------------------------------------------------------------- +! DETERMINE RAINFALL INFILTRATION RATE AND RUNOFF +! ---------------------------------------------------------------------- + END DO + +#ifdef WRF_HYDRO +!DJG NDHMS/WRF-Hydro edit... +!DJG Use previously merged Precip and Sfchead for infil. cap. calc. + SFCWATR = PCPDRP + PDDUM = SFCWATR +!DJG original PDDUM = PCPDRP + RUNOFF1 = 0.0 + INFXS1RT = 0.0 +#else + PDDUM = PCPDRP + RUNOFF1 = 0.0 +#endif + + + +! ---------------------------------------------------------------------- +! MODIFIED BY Q. DUAN, 5/16/94 +! ---------------------------------------------------------------------- +! IF (IOHINF == 1) THEN + +#ifdef WRF_HYDRO +!DJG NDHMS/WRF-Hydro edit... +!DJG IF (PCPDRP /= 0.0) THEN + IF (SFCWATR /= 0.0) THEN +#else + IF (PCPDRP /= 0.0) THEN +#endif + DT1 = DT /86400. + SMCAV = SMCMAX - SMCWLT + +! ---------------------------------------------------------------------- +! FROZEN GROUND VERSION: +! ---------------------------------------------------------------------- + DMAX (1)= - ZSOIL (1)* SMCAV + + DICE = - ZSOIL (1) * SICE (1) + DMAX (1)= DMAX (1)* (1.0- (SH2OA (1) + SICE (1) - SMCWLT)/ & + SMCAV) + + DD = DMAX (1) + +! ---------------------------------------------------------------------- +! FROZEN GROUND VERSION: +! ---------------------------------------------------------------------- + DO KS = 2,NSOIL + + DICE = DICE+ ( ZSOIL (KS -1) - ZSOIL (KS) ) * SICE (KS) + DMAX (KS) = (ZSOIL (KS -1) - ZSOIL (KS))* SMCAV + DMAX (KS) = DMAX (KS)* (1.0- (SH2OA (KS) + SICE (KS) & + - SMCWLT)/ SMCAV) + DD = DD+ DMAX (KS) +! ---------------------------------------------------------------------- +! VAL = (1.-EXP(-KDT*SQRT(DT1))) +! IN BELOW, REMOVE THE SQRT IN ABOVE +! ---------------------------------------------------------------------- + END DO + VAL = (1. - EXP ( - KDT * DT1)) + DDT = DD * VAL +#ifdef WRF_HYDRO +!DJG NDHMS/WRF-Hydro edit... +!DJG PX = PCPDRP * DT + PX = SFCWATR * DT +#else + PX = PCPDRP * DT +#endif + IF (PX < 0.0) PX = 0.0 + + + +! ---------------------------------------------------------------------- +! FROZEN GROUND VERSION: +! REDUCTION OF INFILTRATION BASED ON FROZEN GROUND PARAMETERS +! ---------------------------------------------------------------------- + INFMAX = (PX * (DDT / (PX + DDT)))/ DT + FCR = 1. + IF (DICE > 1.E-2) THEN + ACRT = CVFRZ * FRZX / DICE + SUM = 1. + IALP1 = CVFRZ - 1 + DO J = 1,IALP1 + K = 1 + DO JJ = J +1,IALP1 + K = K * JJ + END DO + SUM = SUM + (ACRT ** ( CVFRZ - J)) / FLOAT (K) + END DO + FCR = 1. - EXP ( - ACRT) * SUM + END IF + +! ---------------------------------------------------------------------- +! CORRECTION OF INFILTRATION LIMITATION: +! IF INFMAX .LE. HYDROLIC CONDUCTIVITY ASSIGN INFMAX THE VALUE OF +! HYDROLIC CONDUCTIVITY +! ---------------------------------------------------------------------- +! MXSMC = MAX ( SH2OA(1), SH2OA(2) ) + INFMAX = INFMAX * FCR + + MXSMC = SH2OA (1) + CALL WDFCND (WDF,WCND,MXSMC,SMCMAX,BEXP,DKSAT,DWSAT, & + SICEMAX) + INFMAX = MAX (INFMAX,WCND) + + INFMAX = MIN (INFMAX,PX/DT) +#ifdef WRF_HYDRO +!DJG NDHMS/WRF-Hydro edit... +!DJG IF (PCPDRP > INFMAX) THEN + IF (SFCWATR > INFMAX) THEN +!DJG RUNOFF1 = PCPDRP - INFMAX + RUNOFF1 = SFCWATR - INFMAX +#else + IF (PCPDRP > INFMAX) THEN + RUNOFF1 = PCPDRP - INFMAX +#endif + INFXS1RT = RUNOFF1*DT*1000. + PDDUM = INFMAX + END IF + +! ---------------------------------------------------------------------- +! TO AVOID SPURIOUS DRAINAGE BEHAVIOR, 'UPSTREAM DIFFERENCING' IN LINE +! BELOW REPLACED WITH NEW APPROACH IN 2ND LINE: +! 'MXSMC = MAX(SH2OA(1), SH2OA(2))' +! ---------------------------------------------------------------------- + END IF + + MXSMC = SH2OA (1) + CALL WDFCND (WDF,WCND,MXSMC,SMCMAX,BEXP,DKSAT,DWSAT, & + SICEMAX) +! ---------------------------------------------------------------------- +! CALC THE MATRIX COEFFICIENTS AI, BI, AND CI FOR THE TOP LAYER +! ---------------------------------------------------------------------- + DDZ = 1. / ( - .5 * ZSOIL (2) ) + AI (1) = 0.0 + BI (1) = WDF * DDZ / ( - ZSOIL (1) ) + +! ---------------------------------------------------------------------- +! CALC RHSTT FOR THE TOP LAYER AFTER CALC'NG THE VERTICAL SOIL MOISTURE +! GRADIENT BTWN THE TOP AND NEXT TO TOP LAYERS. +! ---------------------------------------------------------------------- + CI (1) = - BI (1) + DSMDZ = ( SH2O (1) - SH2O (2) ) / ( - .5 * ZSOIL (2) ) + RHSTT (1) = (WDF * DSMDZ + WCND- PDDUM + EDIR + ET (1))/ ZSOIL (1) + +! ---------------------------------------------------------------------- +! INITIALIZE DDZ2 +! ---------------------------------------------------------------------- + SSTT = WDF * DSMDZ + WCND+ EDIR + ET (1) + +! ---------------------------------------------------------------------- +! LOOP THRU THE REMAINING SOIL LAYERS, REPEATING THE ABV PROCESS +! ---------------------------------------------------------------------- + DDZ2 = 0.0 + DO K = 2,NSOIL + DENOM2 = (ZSOIL (K -1) - ZSOIL (K)) + IF (K /= NSOIL) THEN + +! ---------------------------------------------------------------------- +! AGAIN, TO AVOID SPURIOUS DRAINAGE BEHAVIOR, 'UPSTREAM DIFFERENCING' IN +! LINE BELOW REPLACED WITH NEW APPROACH IN 2ND LINE: +! 'MXSMC2 = MAX (SH2OA(K), SH2OA(K+1))' +! ---------------------------------------------------------------------- + SLOPX = 1. + + MXSMC2 = SH2OA (K) + CALL WDFCND (WDF2,WCND2,MXSMC2,SMCMAX,BEXP,DKSAT,DWSAT, & + SICEMAX) +! ----------------------------------------------------------------------- +! CALC SOME PARTIAL PRODUCTS FOR LATER USE IN CALC'NG RHSTT +! ---------------------------------------------------------------------- + DENOM = (ZSOIL (K -1) - ZSOIL (K +1)) + +! ---------------------------------------------------------------------- +! CALC THE MATRIX COEF, CI, AFTER CALC'NG ITS PARTIAL PRODUCT +! ---------------------------------------------------------------------- + DSMDZ2 = (SH2O (K) - SH2O (K +1)) / (DENOM * 0.5) + DDZ2 = 2.0 / DENOM + CI (K) = - WDF2 * DDZ2 / DENOM2 + + ELSE +! ---------------------------------------------------------------------- +! SLOPE OF BOTTOM LAYER IS INTRODUCED +! ---------------------------------------------------------------------- + +! ---------------------------------------------------------------------- +! RETRIEVE THE SOIL WATER DIFFUSIVITY AND HYDRAULIC CONDUCTIVITY FOR +! THIS LAYER +! ---------------------------------------------------------------------- + SLOPX = SLOPE + CALL WDFCND (WDF2,WCND2,SH2OA (NSOIL),SMCMAX,BEXP,DKSAT,DWSAT, & + SICEMAX) + +! ---------------------------------------------------------------------- +! CALC A PARTIAL PRODUCT FOR LATER USE IN CALC'NG RHSTT +! ---------------------------------------------------------------------- + +! ---------------------------------------------------------------------- +! SET MATRIX COEF CI TO ZERO +! ---------------------------------------------------------------------- + DSMDZ2 = 0.0 + CI (K) = 0.0 +! ---------------------------------------------------------------------- +! CALC RHSTT FOR THIS LAYER AFTER CALC'NG ITS NUMERATOR +! ---------------------------------------------------------------------- + END IF + NUMER = (WDF2 * DSMDZ2) + SLOPX * WCND2- (WDF * DSMDZ) & + - WCND+ ET (K) + +! ---------------------------------------------------------------------- +! CALC MATRIX COEFS, AI, AND BI FOR THIS LAYER +! ---------------------------------------------------------------------- + RHSTT (K) = NUMER / ( - DENOM2) + AI (K) = - WDF * DDZ / DENOM2 + +! ---------------------------------------------------------------------- +! RESET VALUES OF WDF, WCND, DSMDZ, AND DDZ FOR LOOP TO NEXT LYR +! RUNOFF2: SUB-SURFACE OR BASEFLOW RUNOFF +! ---------------------------------------------------------------------- + BI (K) = - ( AI (K) + CI (K) ) + IF (K .eq. NSOIL) THEN + RUNOFF2 = SLOPX * WCND2 + END IF + IF (K .ne. NSOIL) THEN + WDF = WDF2 + WCND = WCND2 + DSMDZ = DSMDZ2 + DDZ = DDZ2 + END IF + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE SRT +! ---------------------------------------------------------------------- + + SUBROUTINE SSTEP (SH2OOUT,SH2OIN,CMC,RHSTT,RHSCT,DT, & + NSOIL,SMCMAX,CMCMAX,RUNOFF3,ZSOIL,SMC,SICE, & + AI,BI,CI, INFXS1RT) + +! ---------------------------------------------------------------------- +! SUBROUTINE SSTEP +! ---------------------------------------------------------------------- +! CALCULATE/UPDATE SOIL MOISTURE CONTENT VALUES AND CANOPY MOISTURE +! CONTENT VALUES. +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER, INTENT(IN) :: NSOIL + INTEGER :: I, K, KK11 + +!!DJG NDHMS/WRF-Hydro edit... + REAL, INTENT(INOUT) :: INFXS1RT + REAL :: AVAIL + + REAL, INTENT(IN) :: CMCMAX, DT, SMCMAX + REAL, INTENT(OUT) :: RUNOFF3 + REAL, INTENT(INOUT) :: CMC + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: SH2OIN, SICE, ZSOIL + REAL, DIMENSION(1:NSOIL), INTENT(OUT) :: SH2OOUT + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: RHSTT, SMC + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: AI, BI, CI + REAL, DIMENSION(1:NSOIL) :: RHSTTin + REAL, DIMENSION(1:NSOIL) :: CIin + REAL :: DDZ, RHSCT, STOT, WPLUS + +! ---------------------------------------------------------------------- +! CREATE 'AMOUNT' VALUES OF VARIABLES TO BE INPUT TO THE +! TRI-DIAGONAL MATRIX ROUTINE. +! ---------------------------------------------------------------------- + DO K = 1,NSOIL + RHSTT (K) = RHSTT (K) * DT + AI (K) = AI (K) * DT + BI (K) = 1. + BI (K) * DT + CI (K) = CI (K) * DT + END DO +! ---------------------------------------------------------------------- +! COPY VALUES FOR INPUT VARIABLES BEFORE CALL TO ROSR12 +! ---------------------------------------------------------------------- + DO K = 1,NSOIL + RHSTTin (K) = RHSTT (K) + END DO + DO K = 1,NSOIL + CIin (K) = CI (K) + END DO +! ---------------------------------------------------------------------- +! CALL ROSR12 TO SOLVE THE TRI-DIAGONAL MATRIX +! ---------------------------------------------------------------------- + CALL ROSR12 (CI,AI,BI,CIin,RHSTTin,RHSTT,NSOIL) +! ---------------------------------------------------------------------- +! SUM THE PREVIOUS SMC VALUE AND THE MATRIX SOLUTION TO GET A +! NEW VALUE. MIN ALLOWABLE VALUE OF SMC WILL BE 0.02. +! RUNOFF3: RUNOFF WITHIN SOIL LAYERS +! ---------------------------------------------------------------------- + WPLUS = 0.0 + RUNOFF3 = 0. + + DDZ = - ZSOIL (1) + DO K = 1,NSOIL + IF (K /= 1) DDZ = ZSOIL (K - 1) - ZSOIL (K) + SH2OOUT (K) = SH2OIN (K) + CI (K) + WPLUS / DDZ + STOT = SH2OOUT (K) + SICE (K) + IF (STOT > SMCMAX) THEN + IF (K .eq. 1) THEN + DDZ = - ZSOIL (1) + ELSE + KK11 = K - 1 + DDZ = - ZSOIL (K) + ZSOIL (KK11) + END IF + WPLUS = (STOT - SMCMAX) * DDZ + ELSE + WPLUS = 0. + END IF + SMC (K) = MAX ( MIN (STOT,SMCMAX),0.02 ) + SH2OOUT (K) = MAX ( (SMC (K) - SICE (K)),0.0) + END DO +#ifdef WRF_HYDRO +!DJG NDHMS/WRF-Hydro edit... +!DJG Modifications to redstribute WPLUS/RUNOFF3 (soil moisture closure error) to soil profile +!DJG beginning at bottom layer (NSOIL) + IF (WPLUS > 0.) THEN + DO K=NSOIL,2,-1 + + IF (K .eq. 2) THEN !Assign soil depths + DDZ = -ZSOIL(1) + ELSE + DDZ = ZSOIL(K-2)-ZSOIL(K-1) + END IF + + AVAIL = (SMCMAX - SMC(K-1)) * DDZ !Det. Avail. Stor. + +! print *, "ZZZZZ", K,DDZ,AVAIL,WPLUS,SMC(K),SMC(K-1),SMCMAX + + IF (WPLUS <= AVAIL) THEN + SMC(K-1) = SMC(K-1) + WPLUS/DDZ + WPLUS = 0. + ELSE + SMC(K-1) = SMCMAX + WPLUS = WPLUS - AVAIL + IF (K-1 .eq. 1) THEN + INFXS1RT = INFXS1RT + WPLUS*1000 + WPLUS = 0. + END IF + END IF + +! SMC (K) = MAX ( MIN (STOT,SMCMAX),0.02 ) + SH2OOUT (K) = MAX ( (SMC (K) - SICE (K)),0.0) + + END DO + END IF +!DJG NDHMS/WRF-Hydro edit...End of modification +#endif + + +! ---------------------------------------------------------------------- +! UPDATE CANOPY WATER CONTENT/INTERCEPTION (CMC). CONVERT RHSCT TO +! AN 'AMOUNT' VALUE AND ADD TO PREVIOUS CMC VALUE TO GET NEW CMC. +! ---------------------------------------------------------------------- + RUNOFF3 = WPLUS + CMC = CMC + DT * RHSCT + IF (CMC < 1.E-20) CMC = 0.0 + CMC = MIN (CMC,CMCMAX) + +! ---------------------------------------------------------------------- + END SUBROUTINE SSTEP +! ---------------------------------------------------------------------- + + SUBROUTINE TBND (TU,TB,ZSOIL,ZBOT,K,NSOIL,TBND1) + +! ---------------------------------------------------------------------- +! SUBROUTINE TBND +! ---------------------------------------------------------------------- +! CALCULATE TEMPERATURE ON THE BOUNDARY OF THE LAYER BY INTERPOLATION OF +! THE MIDDLE LAYER TEMPERATURES +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER, INTENT(IN) :: NSOIL + INTEGER :: K + REAL, INTENT(IN) :: TB, TU, ZBOT + REAL, INTENT(OUT) :: TBND1 + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: ZSOIL + REAL :: ZB, ZUP + REAL, PARAMETER :: T0 = 273.15 + +! ---------------------------------------------------------------------- +! USE SURFACE TEMPERATURE ON THE TOP OF THE FIRST LAYER +! ---------------------------------------------------------------------- + IF (K == 1) THEN + ZUP = 0. + ELSE + ZUP = ZSOIL (K -1) + END IF +! ---------------------------------------------------------------------- +! USE DEPTH OF THE CONSTANT BOTTOM TEMPERATURE WHEN INTERPOLATE +! TEMPERATURE INTO THE LAST LAYER BOUNDARY +! ---------------------------------------------------------------------- + IF (K == NSOIL) THEN + ZB = 2.* ZBOT - ZSOIL (K) + ELSE + ZB = ZSOIL (K +1) + END IF +! ---------------------------------------------------------------------- +! LINEAR INTERPOLATION BETWEEN THE AVERAGE LAYER TEMPERATURES +! ---------------------------------------------------------------------- + + TBND1 = TU + (TB - TU)* (ZUP - ZSOIL (K))/ (ZUP - ZB) +! ---------------------------------------------------------------------- + END SUBROUTINE TBND +! ---------------------------------------------------------------------- + + + SUBROUTINE TDFCND ( DF, SMC, QZ, SMCMAX, SH2O, BEXP, PSISAT, SOILTYP, OPT_THCND) + +! ---------------------------------------------------------------------- +! SUBROUTINE TDFCND +! ---------------------------------------------------------------------- +! CALCULATE THERMAL DIFFUSIVITY AND CONDUCTIVITY OF THE SOIL FOR A GIVEN +! POINT AND TIME. +! ---------------------------------------------------------------------- +! PETERS-LIDARD APPROACH (PETERS-LIDARD et al., 1998) +! June 2001 CHANGES: FROZEN SOIL CONDITION. +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER, INTENT(IN) :: SOILTYP, OPT_THCND + REAL, INTENT(IN) :: QZ, SMC, SMCMAX, SH2O, BEXP, PSISAT + REAL, INTENT(OUT) :: DF + REAL :: AKE, GAMMD, THKDRY, THKICE, THKO, & + THKQTZ,THKSAT,THKS,THKW,SATRATIO,XU, & + XUNFROZ,AKEI,AKEL,PSIF,PF + +! ---------------------------------------------------------------------- +! WE NOW GET QUARTZ AS AN INPUT ARGUMENT (SET IN ROUTINE REDPRM): +! DATA QUARTZ /0.82, 0.10, 0.25, 0.60, 0.52, +! & 0.35, 0.60, 0.40, 0.82/ +! ---------------------------------------------------------------------- +! IF THE SOIL HAS ANY MOISTURE CONTENT COMPUTE A PARTIAL SUM/PRODUCT +! OTHERWISE USE A CONSTANT VALUE WHICH WORKS WELL WITH MOST SOILS +! ---------------------------------------------------------------------- +! THKW ......WATER THERMAL CONDUCTIVITY +! THKQTZ ....THERMAL CONDUCTIVITY FOR QUARTZ +! THKO ......THERMAL CONDUCTIVITY FOR OTHER SOIL COMPONENTS +! THKS ......THERMAL CONDUCTIVITY FOR THE SOLIDS COMBINED(QUARTZ+OTHER) +! THKICE ....ICE THERMAL CONDUCTIVITY +! SMCMAX ....POROSITY (= SMCMAX) +! QZ .........QUARTZ CONTENT (SOIL TYPE DEPENDENT) +! ---------------------------------------------------------------------- +! USE AS IN PETERS-LIDARD, 1998 (MODIF. FROM JOHANSEN, 1975). + +! PABLO GRUNMANN, 08/17/98 +! REFS.: +! FAROUKI, O.T.,1986: THERMAL PROPERTIES OF SOILS. SERIES ON ROCK +! AND SOIL MECHANICS, VOL. 11, TRANS TECH, 136 PP. +! JOHANSEN, O., 1975: THERMAL CONDUCTIVITY OF SOILS. PH.D. THESIS, +! UNIVERSITY OF TRONDHEIM, +! PETERS-LIDARD, C. D., ET AL., 1998: THE EFFECT OF SOIL THERMAL +! CONDUCTIVITY PARAMETERIZATION ON SURFACE ENERGY FLUXES +! AND TEMPERATURES. JOURNAL OF THE ATMOSPHERIC SCIENCES, +! VOL. 55, PP. 1209-1224. +! ---------------------------------------------------------------------- + +IF ( OPT_THCND == 1 .OR. ( OPT_THCND == 2 .AND. (SOILTYP /= 4 .AND. SOILTYP /= 3)) )THEN + +! NEEDS PARAMETERS +! POROSITY(SOIL TYPE): +! POROS = SMCMAX +! SATURATION RATIO: +! PARAMETERS W/(M.K) + SATRATIO = SMC / SMCMAX +! ICE CONDUCTIVITY: + THKICE = 2.2 +! WATER CONDUCTIVITY: + THKW = 0.57 +! THERMAL CONDUCTIVITY OF "OTHER" SOIL COMPONENTS +! IF (QZ .LE. 0.2) THKO = 3.0 + THKO = 2.0 +! QUARTZ' CONDUCTIVITY + THKQTZ = 7.7 +! SOLIDS' CONDUCTIVITY + THKS = (THKQTZ ** QZ)* (THKO ** (1. - QZ)) + +! UNFROZEN FRACTION (FROM 1., i.e., 100%LIQUID, TO 0. (100% FROZEN)) + XUNFROZ = SH2O / SMC +! UNFROZEN VOLUME FOR SATURATION (POROSITY*XUNFROZ) + XU = XUNFROZ * SMCMAX + +! SATURATED THERMAL CONDUCTIVITY + THKSAT = THKS ** (1. - SMCMAX)* THKICE ** (SMCMAX - XU)* THKW ** & + (XU) + +! DRY DENSITY IN KG/M3 + GAMMD = (1. - SMCMAX)*2700. + +! DRY THERMAL CONDUCTIVITY IN W.M-1.K-1 + THKDRY = (0.135* GAMMD+ 64.7)/ (2700. - 0.947* GAMMD) +! FROZEN + AKEI = SATRATIO +! UNFROZEN +! RANGE OF VALIDITY FOR THE KERSTEN NUMBER (AKE) + +! KERSTEN NUMBER (USING "FINE" FORMULA, VALID FOR SOILS CONTAINING AT +! LEAST 5% OF PARTICLES WITH DIAMETER LESS THAN 2.E-6 METERS.) +! (FOR "COARSE" FORMULA, SEE PETERS-LIDARD ET AL., 1998). + + IF ( SATRATIO > 0.1 ) THEN + + AKEL = LOG10 (SATRATIO) + 1.0 + +! USE K = KDRY + ELSE + + AKEL = 0.0 + END IF + AKE = ((SMC-SH2O)*AKEI + SH2O*AKEL)/SMC +! THERMAL CONDUCTIVITY + + + DF = AKE * (THKSAT - THKDRY) + THKDRY + + ELSE + +! use the Mccumber and Pielke approach for silt loam (4), sandy loam (3) + + PSIF = PSISAT*100.*(SMCMAX/(SMC))**BEXP +!--- PSIF should be in [CM] to compute PF + PF=log10(abs(PSIF)) +!--- HK is for McCumber thermal conductivity + IF(PF.LE.5.1) THEN + DF=420.*EXP(-(PF+2.7)) + ELSE + DF=.1744 + END IF + + ENDIF ! for OPT_THCND OPTIONS +! ---------------------------------------------------------------------- + END SUBROUTINE TDFCND +! ---------------------------------------------------------------------- + + SUBROUTINE TMPAVG (TAVG,TUP,TM,TDN,ZSOIL,NSOIL,K) + +! ---------------------------------------------------------------------- +! SUBROUTINE TMPAVG +! ---------------------------------------------------------------------- +! CALCULATE SOIL LAYER AVERAGE TEMPERATURE (TAVG) IN FREEZING/THAWING +! LAYER USING UP, DOWN, AND MIDDLE LAYER TEMPERATURES (TUP, TDN, TM), +! WHERE TUP IS AT TOP BOUNDARY OF LAYER, TDN IS AT BOTTOM BOUNDARY OF +! LAYER. TM IS LAYER PROGNOSTIC STATE TEMPERATURE. +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER K + + INTEGER NSOIL + REAL DZ + REAL DZH + REAL T0 + REAL TAVG + REAL TDN + REAL TM + REAL TUP + REAL X0 + REAL XDN + REAL XUP + + REAL ZSOIL (NSOIL) + +! ---------------------------------------------------------------------- + PARAMETER (T0 = 2.7315E2) + IF (K .eq. 1) THEN + DZ = - ZSOIL (1) + ELSE + DZ = ZSOIL (K -1) - ZSOIL (K) + END IF + + DZH = DZ *0.5 + IF (TUP .lt. T0) THEN + IF (TM .lt. T0) THEN +! ---------------------------------------------------------------------- +! TUP, TM, TDN < T0 +! ---------------------------------------------------------------------- + IF (TDN .lt. T0) THEN + TAVG = (TUP + 2.0* TM + TDN)/ 4.0 +! ---------------------------------------------------------------------- +! TUP & TM < T0, TDN .ge. T0 +! ---------------------------------------------------------------------- + ELSE + X0 = (T0- TM) * DZH / (TDN - TM) + TAVG = 0.5 * (TUP * DZH + TM * (DZH + X0) + T0* ( & + & 2.* DZH - X0)) / DZ + END IF + ELSE +! ---------------------------------------------------------------------- +! TUP < T0, TM .ge. T0, TDN < T0 +! ---------------------------------------------------------------------- + IF (TDN .lt. T0) THEN + XUP = (T0- TUP) * DZH / (TM - TUP) + XDN = DZH - (T0- TM) * DZH / (TDN - TM) + TAVG = 0.5 * (TUP * XUP + T0* (2.* DZ - XUP - XDN) & + & + TDN * XDN) / DZ +! ---------------------------------------------------------------------- +! TUP < T0, TM .ge. T0, TDN .ge. T0 +! ---------------------------------------------------------------------- + ELSE + XUP = (T0- TUP) * DZH / (TM - TUP) + TAVG = 0.5 * (TUP * XUP + T0* (2.* DZ - XUP)) / DZ + END IF + END IF + ELSE + IF (TM .lt. T0) THEN +! ---------------------------------------------------------------------- +! TUP .ge. T0, TM < T0, TDN < T0 +! ---------------------------------------------------------------------- + IF (TDN .lt. T0) THEN + XUP = DZH - (T0- TUP) * DZH / (TM - TUP) + TAVG = 0.5 * (T0* (DZ - XUP) + TM * (DZH + XUP) & + & + TDN * DZH) / DZ +! ---------------------------------------------------------------------- +! TUP .ge. T0, TM < T0, TDN .ge. T0 +! ---------------------------------------------------------------------- + ELSE + XUP = DZH - (T0- TUP) * DZH / (TM - TUP) + XDN = (T0- TM) * DZH / (TDN - TM) + TAVG = 0.5 * (T0* (2.* DZ - XUP - XDN) + TM * & + & (XUP + XDN)) / DZ + END IF + ELSE +! ---------------------------------------------------------------------- +! TUP .ge. T0, TM .ge. T0, TDN < T0 +! ---------------------------------------------------------------------- + IF (TDN .lt. T0) THEN + XDN = DZH - (T0- TM) * DZH / (TDN - TM) + TAVG = (T0* (DZ - XDN) +0.5* (T0+ TDN)* XDN) / DZ +! ---------------------------------------------------------------------- +! TUP .ge. T0, TM .ge. T0, TDN .ge. T0 +! ---------------------------------------------------------------------- + ELSE + TAVG = (TUP + 2.0* TM + TDN) / 4.0 + END IF + END IF + END IF +! ---------------------------------------------------------------------- + END SUBROUTINE TMPAVG +! ---------------------------------------------------------------------- + + SUBROUTINE TRANSP (ET,NSOIL,ETP1,SMC,CMC,ZSOIL,SHDFAC,SMCWLT, & + & CMCMAX,PC,CFACTR,SMCREF,SFCTMP,Q2,NROOT, & + & RTDIS) + +! ---------------------------------------------------------------------- +! SUBROUTINE TRANSP +! ---------------------------------------------------------------------- +! CALCULATE TRANSPIRATION FOR THE VEG CLASS. +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER I + INTEGER K + INTEGER NSOIL + + INTEGER NROOT + REAL CFACTR + REAL CMC + REAL CMCMAX + REAL DENOM + REAL ET (NSOIL) + REAL ETP1 + REAL ETP1A +!.....REAL PART(NSOIL) + REAL GX (NROOT) + REAL PC + REAL Q2 + REAL RTDIS (NSOIL) + REAL RTX + REAL SFCTMP + REAL SGX + REAL SHDFAC + REAL SMC (NSOIL) + REAL SMCREF + REAL SMCWLT + +! ---------------------------------------------------------------------- +! INITIALIZE PLANT TRANSP TO ZERO FOR ALL SOIL LAYERS. +! ---------------------------------------------------------------------- + REAL ZSOIL (NSOIL) + DO K = 1,NSOIL + ET (K) = 0. +! ---------------------------------------------------------------------- +! CALCULATE AN 'ADJUSTED' POTENTIAL TRANSPIRATION +! IF STATEMENT BELOW TO AVOID TANGENT LINEAR PROBLEMS NEAR ZERO +! NOTE: GX AND OTHER TERMS BELOW REDISTRIBUTE TRANSPIRATION BY LAYER, +! ET(K), AS A FUNCTION OF SOIL MOISTURE AVAILABILITY, WHILE PRESERVING +! TOTAL ETP1A. +! ---------------------------------------------------------------------- + END DO + IF (CMC .ne. 0.0) THEN + ETP1A = SHDFAC * PC * ETP1 * (1.0- (CMC / CMCMAX) ** CFACTR) + ELSE + ETP1A = SHDFAC * PC * ETP1 + END IF + SGX = 0.0 + DO I = 1,NROOT + GX (I) = ( SMC (I) - SMCWLT ) / ( SMCREF - SMCWLT ) + GX (I) = MAX ( MIN ( GX (I), 1. ), 0. ) + SGX = SGX + GX (I) + END DO + + SGX = SGX / NROOT + DENOM = 0. + DO I = 1,NROOT + RTX = RTDIS (I) + GX (I) - SGX + GX (I) = GX (I) * MAX ( RTX, 0. ) + DENOM = DENOM + GX (I) + END DO + + IF (DENOM .le. 0.0) DENOM = 1. + DO I = 1,NROOT + ET (I) = ETP1A * GX (I) / DENOM +! ---------------------------------------------------------------------- +! ABOVE CODE ASSUMES A VERTICALLY UNIFORM ROOT DISTRIBUTION +! CODE BELOW TESTS A VARIABLE ROOT DISTRIBUTION +! ---------------------------------------------------------------------- +! ET(1) = ( ZSOIL(1) / ZSOIL(NROOT) ) * GX * ETP1A +! ET(1) = ( ZSOIL(1) / ZSOIL(NROOT) ) * ETP1A +! ---------------------------------------------------------------------- +! USING ROOT DISTRIBUTION AS WEIGHTING FACTOR +! ---------------------------------------------------------------------- +! ET(1) = RTDIS(1) * ETP1A +! ET(1) = ETP1A * PART(1) +! ---------------------------------------------------------------------- +! LOOP DOWN THRU THE SOIL LAYERS REPEATING THE OPERATION ABOVE, +! BUT USING THE THICKNESS OF THE SOIL LAYER (RATHER THAN THE +! ABSOLUTE DEPTH OF EACH LAYER) IN THE FINAL CALCULATION. +! ---------------------------------------------------------------------- +! DO K = 2,NROOT +! GX = ( SMC(K) - SMCWLT ) / ( SMCREF - SMCWLT ) +! GX = MAX ( MIN ( GX, 1. ), 0. ) +! TEST CANOPY RESISTANCE +! GX = 1.0 +! ET(K) = ((ZSOIL(K)-ZSOIL(K-1))/ZSOIL(NROOT))*GX*ETP1A +! ET(K) = ((ZSOIL(K)-ZSOIL(K-1))/ZSOIL(NROOT))*ETP1A +! ---------------------------------------------------------------------- +! USING ROOT DISTRIBUTION AS WEIGHTING FACTOR +! ---------------------------------------------------------------------- +! ET(K) = RTDIS(K) * ETP1A +! ET(K) = ETP1A*PART(K) +! END DO + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE TRANSP +! ---------------------------------------------------------------------- + + SUBROUTINE WDFCND (WDF,WCND,SMC,SMCMAX,BEXP,DKSAT,DWSAT, & + & SICEMAX) + +! ---------------------------------------------------------------------- +! SUBROUTINE WDFCND +! ---------------------------------------------------------------------- +! CALCULATE SOIL WATER DIFFUSIVITY AND SOIL HYDRAULIC CONDUCTIVITY. +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL BEXP + REAL DKSAT + REAL DWSAT + REAL EXPON + REAL FACTR1 + REAL FACTR2 + REAL SICEMAX + REAL SMC + REAL SMCMAX + REAL VKwgt + REAL WCND + +! ---------------------------------------------------------------------- +! CALC THE RATIO OF THE ACTUAL TO THE MAX PSBL SOIL H2O CONTENT +! ---------------------------------------------------------------------- + REAL WDF + FACTR1 = 0.05 / SMCMAX + +! ---------------------------------------------------------------------- +! PREP AN EXPNTL COEF AND CALC THE SOIL WATER DIFFUSIVITY +! ---------------------------------------------------------------------- + FACTR2 = SMC / SMCMAX + FACTR1 = MIN(FACTR1,FACTR2) + EXPON = BEXP + 2.0 + +! ---------------------------------------------------------------------- +! FROZEN SOIL HYDRAULIC DIFFUSIVITY. VERY SENSITIVE TO THE VERTICAL +! GRADIENT OF UNFROZEN WATER. THE LATTER GRADIENT CAN BECOME VERY +! EXTREME IN FREEZING/THAWING SITUATIONS, AND GIVEN THE RELATIVELY +! FEW AND THICK SOIL LAYERS, THIS GRADIENT SUFFERES SERIOUS +! TRUNCTION ERRORS YIELDING ERRONEOUSLY HIGH VERTICAL TRANSPORTS OF +! UNFROZEN WATER IN BOTH DIRECTIONS FROM HUGE HYDRAULIC DIFFUSIVITY. +! THEREFORE, WE FOUND WE HAD TO ARBITRARILY CONSTRAIN WDF +! -- +! VERSION D_10CM: ........ FACTR1 = 0.2/SMCMAX +! WEIGHTED APPROACH...................... PABLO GRUNMANN, 28_SEP_1999. +! ---------------------------------------------------------------------- + WDF = DWSAT * FACTR2 ** EXPON + IF (SICEMAX .gt. 0.0) THEN + VKWGT = 1./ (1. + (500.* SICEMAX)**3.) + WDF = VKWGT * WDF + (1. - VKWGT)* DWSAT * FACTR1** EXPON +! ---------------------------------------------------------------------- +! RESET THE EXPNTL COEF AND CALC THE HYDRAULIC CONDUCTIVITY +! ---------------------------------------------------------------------- + END IF + EXPON = (2.0 * BEXP) + 3.0 + WCND = DKSAT * FACTR2 ** EXPON + +! ---------------------------------------------------------------------- + END SUBROUTINE WDFCND +! ---------------------------------------------------------------------- + + SUBROUTINE SFCDIF_off (ZLM,Z0,THZ0,THLM,SFCSPD,CZIL,AKMS,AKHS) + +! ---------------------------------------------------------------------- +! SUBROUTINE SFCDIF (renamed SFCDIF_off to avoid clash with Eta PBL) +! ---------------------------------------------------------------------- +! CALCULATE SURFACE LAYER EXCHANGE COEFFICIENTS VIA ITERATIVE PROCESS. +! SEE CHEN ET AL (1997, BLM) +! ---------------------------------------------------------------------- + + IMPLICIT NONE + REAL WWST, WWST2, G, VKRM, EXCM, BETA, BTG, ELFC, WOLD, WNEW + REAL PIHF, EPSU2, EPSUST, EPSIT, EPSA, ZTMIN, ZTMAX, HPBL, & + & SQVISC + REAL RIC, RRIC, FHNEU, RFC, RFAC, ZZ, PSLMU, PSLMS, PSLHU, & + & PSLHS + REAL XX, PSPMU, YY, PSPMS, PSPHU, PSPHS, ZLM, Z0, THZ0, THLM + REAL SFCSPD, CZIL, AKMS, AKHS, ZILFC, ZU, ZT, RDZ, CXCH + REAL DTHV, DU2, BTGH, WSTAR2, USTAR, ZSLU, ZSLT, RLOGU, RLOGT + REAL RLMO, ZETALT, ZETALU, ZETAU, ZETAT, XLU4, XLT4, XU4, XT4 +!CC ......REAL ZTFC + + REAL XLU, XLT, XU, XT, PSMZ, SIMM, PSHZ, SIMH, USTARK, RLMN, & + & RLMA + + INTEGER ITRMX, ILECH, ITR + PARAMETER & + & (WWST = 1.2,WWST2 = WWST * WWST,G = 9.8,VKRM = 0.40, & + & EXCM = 0.001 & + & ,BETA = 1./270.,BTG = BETA * G,ELFC = VKRM * BTG & + & ,WOLD =.15,WNEW = 1. - WOLD,ITRMX = 05, & + & PIHF = 3.14159265/2.) + PARAMETER & + & (EPSU2 = 1.E-4,EPSUST = 0.07,EPSIT = 1.E-4,EPSA = 1.E-8 & + & ,ZTMIN = -5.,ZTMAX = 1.,HPBL = 1000.0 & + & ,SQVISC = 258.2) + PARAMETER & + & (RIC = 0.183,RRIC = 1.0/ RIC,FHNEU = 0.8,RFC = 0.191 & + & ,RFAC = RIC / (FHNEU * RFC * RFC)) + +! ---------------------------------------------------------------------- +! NOTE: THE TWO CODE BLOCKS BELOW DEFINE FUNCTIONS +! ---------------------------------------------------------------------- +! LECH'S SURFACE FUNCTIONS +! ---------------------------------------------------------------------- + PSLMU (ZZ)= -0.96* log (1.0-4.5* ZZ) + PSLMS (ZZ)= ZZ * RRIC -2.076* (1. -1./ (ZZ +1.)) + PSLHU (ZZ)= -0.96* log (1.0-4.5* ZZ) + +! ---------------------------------------------------------------------- +! PAULSON'S SURFACE FUNCTIONS +! ---------------------------------------------------------------------- + PSLHS (ZZ)= ZZ * RFAC -2.076* (1. -1./ (ZZ +1.)) + PSPMU (XX)= -2.* log ( (XX +1.)*0.5) - log ( (XX * XX +1.)*0.5) & + & +2.* ATAN (XX) & + &- PIHF + PSPMS (YY)= 5.* YY + PSPHU (XX)= -2.* log ( (XX * XX +1.)*0.5) + +! ---------------------------------------------------------------------- +! THIS ROUTINE SFCDIF CAN HANDLE BOTH OVER OPEN WATER (SEA, OCEAN) AND +! OVER SOLID SURFACE (LAND, SEA-ICE). +! ---------------------------------------------------------------------- + PSPHS (YY)= 5.* YY + +! ---------------------------------------------------------------------- +! ZTFC: RATIO OF ZOH/ZOM LESS OR EQUAL THAN 1 +! C......ZTFC=0.1 +! CZIL: CONSTANT C IN Zilitinkevich, S. S.1995,:NOTE ABOUT ZT +! ---------------------------------------------------------------------- + ILECH = 0 + +! ---------------------------------------------------------------------- + ZILFC = - CZIL * VKRM * SQVISC +! C.......ZT=Z0*ZTFC + ZU = Z0 + RDZ = 1./ ZLM + CXCH = EXCM * RDZ + DTHV = THLM - THZ0 + +! ---------------------------------------------------------------------- +! BELJARS CORRECTION OF USTAR +! ---------------------------------------------------------------------- + DU2 = MAX (SFCSPD * SFCSPD,EPSU2) +!cc If statements to avoid TANGENT LINEAR problems near zero + BTGH = BTG * HPBL + IF (BTGH * AKHS * DTHV .ne. 0.0) THEN + WSTAR2 = WWST2* ABS (BTGH * AKHS * DTHV)** (2./3.) + ELSE + WSTAR2 = 0.0 + END IF + +! ---------------------------------------------------------------------- +! ZILITINKEVITCH APPROACH FOR ZT +! ---------------------------------------------------------------------- + USTAR = MAX (SQRT (AKMS * SQRT (DU2+ WSTAR2)),EPSUST) + +! ---------------------------------------------------------------------- + ZT = EXP (ZILFC * SQRT (USTAR * Z0))* Z0 + ZSLU = ZLM + ZU +! PRINT*,'ZSLT=',ZSLT +! PRINT*,'ZLM=',ZLM +! PRINT*,'ZT=',ZT + + ZSLT = ZLM + ZT + RLOGU = log (ZSLU / ZU) + + RLOGT = log (ZSLT / ZT) +! PRINT*,'RLMO=',RLMO +! PRINT*,'ELFC=',ELFC +! PRINT*,'AKHS=',AKHS +! PRINT*,'DTHV=',DTHV +! PRINT*,'USTAR=',USTAR + + RLMO = ELFC * AKHS * DTHV / USTAR **3 +! ---------------------------------------------------------------------- +! 1./MONIN-OBUKKHOV LENGTH-SCALE +! ---------------------------------------------------------------------- + DO ITR = 1,ITRMX + ZETALT = MAX (ZSLT * RLMO,ZTMIN) + RLMO = ZETALT / ZSLT + ZETALU = ZSLU * RLMO + ZETAU = ZU * RLMO + + ZETAT = ZT * RLMO + IF (ILECH .eq. 0) THEN + IF (RLMO .lt. 0.)THEN + XLU4 = 1. -16.* ZETALU + XLT4 = 1. -16.* ZETALT + XU4 = 1. -16.* ZETAU + + XT4 = 1. -16.* ZETAT + XLU = SQRT (SQRT (XLU4)) + XLT = SQRT (SQRT (XLT4)) + XU = SQRT (SQRT (XU4)) + + XT = SQRT (SQRT (XT4)) +! PRINT*,'-----------1------------' +! PRINT*,'PSMZ=',PSMZ +! PRINT*,'PSPMU(ZETAU)=',PSPMU(ZETAU) +! PRINT*,'XU=',XU +! PRINT*,'------------------------' + PSMZ = PSPMU (XU) + SIMM = PSPMU (XLU) - PSMZ + RLOGU + PSHZ = PSPHU (XT) + SIMH = PSPHU (XLT) - PSHZ + RLOGT + ELSE + ZETALU = MIN (ZETALU,ZTMAX) + ZETALT = MIN (ZETALT,ZTMAX) +! PRINT*,'-----------2------------' +! PRINT*,'PSMZ=',PSMZ +! PRINT*,'PSPMS(ZETAU)=',PSPMS(ZETAU) +! PRINT*,'ZETAU=',ZETAU +! PRINT*,'------------------------' + PSMZ = PSPMS (ZETAU) + SIMM = PSPMS (ZETALU) - PSMZ + RLOGU + PSHZ = PSPHS (ZETAT) + SIMH = PSPHS (ZETALT) - PSHZ + RLOGT + END IF +! ---------------------------------------------------------------------- +! LECH'S FUNCTIONS +! ---------------------------------------------------------------------- + ELSE + IF (RLMO .lt. 0.)THEN +! PRINT*,'-----------3------------' +! PRINT*,'PSMZ=',PSMZ +! PRINT*,'PSLMU(ZETAU)=',PSLMU(ZETAU) +! PRINT*,'ZETAU=',ZETAU +! PRINT*,'------------------------' + PSMZ = PSLMU (ZETAU) + SIMM = PSLMU (ZETALU) - PSMZ + RLOGU + PSHZ = PSLHU (ZETAT) + SIMH = PSLHU (ZETALT) - PSHZ + RLOGT + ELSE + ZETALU = MIN (ZETALU,ZTMAX) + + ZETALT = MIN (ZETALT,ZTMAX) +! PRINT*,'-----------4------------' +! PRINT*,'PSMZ=',PSMZ +! PRINT*,'PSLMS(ZETAU)=',PSLMS(ZETAU) +! PRINT*,'ZETAU=',ZETAU +! PRINT*,'------------------------' + PSMZ = PSLMS (ZETAU) + SIMM = PSLMS (ZETALU) - PSMZ + RLOGU + PSHZ = PSLHS (ZETAT) + SIMH = PSLHS (ZETALT) - PSHZ + RLOGT + END IF +! ---------------------------------------------------------------------- +! BELJAARS CORRECTION FOR USTAR +! ---------------------------------------------------------------------- + END IF + +! ---------------------------------------------------------------------- +! ZILITINKEVITCH FIX FOR ZT +! ---------------------------------------------------------------------- + USTAR = MAX (SQRT (AKMS * SQRT (DU2+ WSTAR2)),EPSUST) + + ZT = EXP (ZILFC * SQRT (USTAR * Z0))* Z0 + ZSLT = ZLM + ZT +!----------------------------------------------------------------------- + RLOGT = log (ZSLT / ZT) + USTARK = USTAR * VKRM + AKMS = MAX (USTARK / SIMM,CXCH) +!----------------------------------------------------------------------- +! IF STATEMENTS TO AVOID TANGENT LINEAR PROBLEMS NEAR ZERO +!----------------------------------------------------------------------- + AKHS = MAX (USTARK / SIMH,CXCH) + IF (BTGH * AKHS * DTHV .ne. 0.0) THEN + WSTAR2 = WWST2* ABS (BTGH * AKHS * DTHV)** (2./3.) + ELSE + WSTAR2 = 0.0 + END IF +!----------------------------------------------------------------------- + RLMN = ELFC * AKHS * DTHV / USTAR **3 +!----------------------------------------------------------------------- +! IF(ABS((RLMN-RLMO)/RLMA).LT.EPSIT) GO TO 110 +!----------------------------------------------------------------------- + RLMA = RLMO * WOLD+ RLMN * WNEW +!----------------------------------------------------------------------- + RLMO = RLMA +! PRINT*,'----------------------------' +! PRINT*,'SFCDIF OUTPUT ! ! ! ! ! ! ! ! ! ! ! !' + +! PRINT*,'ZLM=',ZLM +! PRINT*,'Z0=',Z0 +! PRINT*,'THZ0=',THZ0 +! PRINT*,'THLM=',THLM +! PRINT*,'SFCSPD=',SFCSPD +! PRINT*,'CZIL=',CZIL +! PRINT*,'AKMS=',AKMS +! PRINT*,'AKHS=',AKHS +! PRINT*,'----------------------------' + + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE SFCDIF_off +! ---------------------------------------------------------------------- + +END MODULE module_sf_noahlsm diff --git a/physics/module_sf_noahlsm_glacial_only.F90 b/physics/module_sf_noahlsm_glacial_only.F90 new file mode 100644 index 000000000..602b21e3b --- /dev/null +++ b/physics/module_sf_noahlsm_glacial_only.F90 @@ -0,0 +1,1285 @@ +MODULE module_sf_noahlsm_glacial_only + + USE module_sf_noahlsm, ONLY : EMISSI_S, ROSR12 + USE module_sf_noahlsm, ONLY : LVCOEF_DATA + + PRIVATE :: ALCALC + PRIVATE :: CSNOW + PRIVATE :: HRTICE + PRIVATE :: HSTEP + PRIVATE :: PENMAN + PRIVATE :: SHFLX + PRIVATE :: SNOPAC + PRIVATE :: SNOWPACK + PRIVATE :: SNOWZ0 + PRIVATE :: SNOW_NEW + + integer, private :: iloc, jloc +!$omp threadprivate(iloc, jloc) + +CONTAINS + + SUBROUTINE SFLX_GLACIAL (IILOC,JJLOC,ISICE,FFROZP,DT,ZLVL,NSOIL,SLDPTH, & !C + & LWDN,SOLNET,SFCPRS,PRCP,SFCTMP,Q2, & !F + & TH2,Q2SAT,DQSDT2, & !I + & ALB, SNOALB,TBOT, Z0BRD, Z0, EMISSI, EMBRD, & !S + & T1,STC,SNOWH,SNEQV,ALBEDO,CH, & !H + & CP, RD, SIGMA, CPH2O, CPICE, LSUBF, & +! ---------------------------------------------------------------------- +! OUTPUTS, DIAGNOSTICS, PARAMETERS BELOW GENERALLY NOT NECESSARY WHEN +! COUPLED WITH E.G. A NWP MODEL (SUCH AS THE NOAA/NWS/NCEP MESOSCALE ETA +! MODEL). OTHER APPLICATIONS MAY REQUIRE DIFFERENT OUTPUT VARIABLES. +! ---------------------------------------------------------------------- + & ETA,SHEAT, ETA_KINEMATIC,FDOWN, & !O + & ESNOW,DEW, & !O + & ETP,SSOIL, & !O + & FLX1,FLX2,FLX3, & !O + & SNOMLT,SNCOVR, & !O + & RUNOFF1, & !O + & Q1, & !D + & SNOTIME1, & + & RIBB,errflg, errmsg) +! ---------------------------------------------------------------------- +! SUB-DRIVER FOR "Noah LSM" FAMILY OF PHYSICS SUBROUTINES FOR A +! SOIL/VEG/SNOWPACK LAND-SURFACE MODEL TO UPDATE ICE TEMPERATURE, SKIN +! TEMPERATURE, SNOWPACK WATER CONTENT, SNOWDEPTH, AND ALL TERMS OF THE +! SURFACE ENERGY BALANCE (EXCLUDING INPUT ATMOSPHERIC FORCINGS OF +! DOWNWARD RADIATION AND PRECIP) +! ---------------------------------------------------------------------- +! SFLX ARGUMENT LIST KEY: +! ---------------------------------------------------------------------- +! C CONFIGURATION INFORMATION +! F FORCING DATA +! I OTHER (INPUT) FORCING DATA +! S SURFACE CHARACTERISTICS +! H HISTORY (STATE) VARIABLES +! O OUTPUT VARIABLES +! D DIAGNOSTIC OUTPUT +! ---------------------------------------------------------------------- +! 1. CONFIGURATION INFORMATION (C): +! ---------------------------------------------------------------------- +! DT TIMESTEP (SEC) (DT SHOULD NOT EXCEED 3600 SECS, RECOMMEND +! 1800 SECS OR LESS) +! ZLVL HEIGHT (M) ABOVE GROUND OF ATMOSPHERIC FORCING VARIABLES +! NSOIL NUMBER OF SOIL LAYERS (AT LEAST 2, AND NOT GREATER THAN +! PARAMETER NSOLD SET BELOW) +! SLDPTH THE THICKNESS OF EACH SOIL LAYER (M) +! ---------------------------------------------------------------------- +! 3. FORCING DATA (F): +! ---------------------------------------------------------------------- +! LWDN LW DOWNWARD RADIATION (W M-2; POSITIVE, NOT NET LONGWAVE) +! SOLNET NET DOWNWARD SOLAR RADIATION ((W M-2; POSITIVE) +! SFCPRS PRESSURE AT HEIGHT ZLVL ABOVE GROUND (PASCALS) +! PRCP PRECIP RATE (KG M-2 S-1) (NOTE, THIS IS A RATE) +! SFCTMP AIR TEMPERATURE (K) AT HEIGHT ZLVL ABOVE GROUND +! TH2 AIR POTENTIAL TEMPERATURE (K) AT HEIGHT ZLVL ABOVE GROUND +! Q2 MIXING RATIO AT HEIGHT ZLVL ABOVE GROUND (KG KG-1) +! FFROZP FRACTION OF FROZEN PRECIPITATION +! ---------------------------------------------------------------------- +! 4. OTHER FORCING (INPUT) DATA (I): +! ---------------------------------------------------------------------- +! Q2SAT SAT SPECIFIC HUMIDITY AT HEIGHT ZLVL ABOVE GROUND (KG KG-1) +! DQSDT2 SLOPE OF SAT SPECIFIC HUMIDITY CURVE AT T=SFCTMP +! (KG KG-1 K-1) +! ---------------------------------------------------------------------- +! 5. CANOPY/SOIL CHARACTERISTICS (S): +! ---------------------------------------------------------------------- +! ALB BACKROUND SNOW-FREE SURFACE ALBEDO (FRACTION), FOR JULIAN +! DAY OF YEAR (USUALLY FROM TEMPORAL INTERPOLATION OF +! MONTHLY MEAN VALUES' CALLING PROG MAY OR MAY NOT +! INCLUDE DIURNAL SUN ANGLE EFFECT) +! SNOALB UPPER BOUND ON MAXIMUM ALBEDO OVER DEEP SNOW (E.G. FROM +! ROBINSON AND KUKLA, 1985, J. CLIM. & APPL. METEOR.) +! TBOT BOTTOM SOIL TEMPERATURE (LOCAL YEARLY-MEAN SFC AIR +! TEMPERATURE) +! Z0BRD Background fixed roughness length (M) +! Z0 Time varying roughness length (M) as function of snow depth +! EMBRD Background surface emissivity (between 0 and 1) +! EMISSI Surface emissivity (between 0 and 1) +! ---------------------------------------------------------------------- +! 6. HISTORY (STATE) VARIABLES (H): +! ---------------------------------------------------------------------- +! T1 GROUND/CANOPY/SNOWPACK) EFFECTIVE SKIN TEMPERATURE (K) +! STC(NSOIL) SOIL TEMP (K) +! SNOWH ACTUAL SNOW DEPTH (M) +! SNEQV LIQUID WATER-EQUIVALENT SNOW DEPTH (M) +! NOTE: SNOW DENSITY = SNEQV/SNOWH +! ALBEDO SURFACE ALBEDO INCLUDING SNOW EFFECT (UNITLESS FRACTION) +! =SNOW-FREE ALBEDO (ALB) WHEN SNEQV=0, OR +! =FCT(MSNOALB,ALB,SHDFAC,SHDMIN) WHEN SNEQV>0 +! CH SURFACE EXCHANGE COEFFICIENT FOR HEAT AND MOISTURE +! (M S-1); NOTE: CH IS TECHNICALLY A CONDUCTANCE SINCE +! IT HAS BEEN MULTIPLIED BY WIND SPEED. +! ---------------------------------------------------------------------- +! 7. OUTPUT (O): +! ---------------------------------------------------------------------- +! OUTPUT VARIABLES NECESSARY FOR A COUPLED NUMERICAL WEATHER PREDICTION +! MODEL, E.G. NOAA/NWS/NCEP MESOSCALE ETA MODEL. FOR THIS APPLICATION, +! THE REMAINING OUTPUT/DIAGNOSTIC/PARAMETER BLOCKS BELOW ARE NOT +! NECESSARY. OTHER APPLICATIONS MAY REQUIRE DIFFERENT OUTPUT VARIABLES. +! ETA ACTUAL LATENT HEAT FLUX (W m-2: NEGATIVE, IF UP FROM +! SURFACE) +! ETA_KINEMATIC atctual latent heat flux in Kg m-2 s-1 +! SHEAT SENSIBLE HEAT FLUX (W M-2: NEGATIVE, IF UPWARD FROM +! SURFACE) +! FDOWN Radiation forcing at the surface (W m-2) = SOLDN*(1-alb)+LWDN +! ---------------------------------------------------------------------- +! ESNOW SUBLIMATION FROM (OR DEPOSITION TO IF <0) SNOWPACK +! (W m-2) +! DEW DEWFALL (OR FROSTFALL FOR T<273.15) (M) +! ---------------------------------------------------------------------- +! ETP POTENTIAL EVAPORATION (W m-2) +! SSOIL SOIL HEAT FLUX (W M-2: NEGATIVE IF DOWNWARD FROM SURFACE) +! ---------------------------------------------------------------------- +! FLX1 PRECIP-SNOW SFC (W M-2) +! FLX2 FREEZING RAIN LATENT HEAT FLUX (W M-2) +! FLX3 PHASE-CHANGE HEAT FLUX FROM SNOWMELT (W M-2) +! ---------------------------------------------------------------------- +! SNOMLT SNOW MELT (M) (WATER EQUIVALENT) +! SNCOVR FRACTIONAL SNOW COVER (UNITLESS FRACTION, 0-1) +! ---------------------------------------------------------------------- +! RUNOFF1 SURFACE RUNOFF (M S-1), NOT INFILTRATING THE SURFACE +! ---------------------------------------------------------------------- +! 8. DIAGNOSTIC OUTPUT (D): +! ---------------------------------------------------------------------- +! Q1 Effective mixing ratio at surface (kg kg-1), used for +! diagnosing the mixing ratio at 2 meter for coupled model +! Documentation for SNOTIME1 and SNOABL2 ????? +! What categories of arguments do these variables fall into ???? +! Documentation for RIBB ????? +! What category of argument does RIBB fall into ????? +! ---------------------------------------------------------------------- + + IMPLICIT NONE +! ---------------------------------------------------------------------- + integer, intent(in) :: iiloc, jjloc + INTEGER, INTENT(IN) :: ISICE +! ---------------------------------------------------------------------- + LOGICAL :: FRZGRA, SNOWNG + +! ---------------------------------------------------------------------- +! 1. CONFIGURATION INFORMATION (C): +! ---------------------------------------------------------------------- + INTEGER, INTENT(IN) :: NSOIL + INTEGER :: KZ + +! ---------------------------------------------------------------------- +! 2. LOGICAL: +! ---------------------------------------------------------------------- + + REAL, INTENT(IN) :: DT,DQSDT2,LWDN,PRCP, & + & Q2,Q2SAT,SFCPRS,SFCTMP, SNOALB, & + & SOLNET,TBOT,TH2,ZLVL,FFROZP + REAL, INTENT(IN) :: CP, RD, SIGMA, CPH2O, CPICE, LSUBF + REAL, INTENT(OUT) :: EMBRD, ALBEDO + REAL, INTENT(INOUT):: CH,SNEQV,SNCOVR,SNOWH,T1,Z0BRD,EMISSI,ALB + REAL, INTENT(INOUT):: SNOTIME1 + REAL, INTENT(INOUT):: RIBB + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: SLDPTH + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: STC + REAL, DIMENSION(1:NSOIL) :: ZSOIL + + REAL,INTENT(OUT) :: ETA_KINEMATIC,DEW,ESNOW,ETA, & + & ETP,FLX1,FLX2,FLX3,SHEAT,RUNOFF1, & + & SSOIL,SNOMLT,FDOWN,Q1 + REAL :: DF1,DSOIL,DTOT,FRCSNO,FRCSOI, & + & PRCP1,RCH,RR,RSNOW,SNDENS,SNCOND,SN_NEW, & + & T1V,T24,T2V,TH2V,TSNOW,Z0,PRCPF,RHO + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +! ---------------------------------------------------------------------- +! DECLARATIONS - PARAMETERS +! ---------------------------------------------------------------------- + REAL, PARAMETER :: TFREEZ = 273.15 + REAL, PARAMETER :: LVH2O = 2.501E+6 + REAL, PARAMETER :: LSUBS = 2.83E+6 + REAL, PARAMETER :: R = 287.04 + + errmsg = '' + errflg = 0 + +! ---------------------------------------------------------------------- + iloc = iiloc + jloc = jjloc +! ---------------------------------------------------------------------- + ZSOIL (1) = - SLDPTH (1) + DO KZ = 2,NSOIL + ZSOIL (KZ) = - SLDPTH (KZ) + ZSOIL (KZ -1) + END DO + +! ---------------------------------------------------------------------- +! IF S.W.E. (SNEQV) BELOW THRESHOLD LOWER BOUND (0.10 M FOR GLACIAL +! ICE), THEN SET AT LOWER BOUND +! ---------------------------------------------------------------------- + IF ( SNEQV < 0.10 ) THEN + SNEQV = 0.10 + SNOWH = 0.50 + ENDIF +! ---------------------------------------------------------------------- +! IF INPUT SNOWPACK IS NONZERO, THEN COMPUTE SNOW DENSITY "SNDENS" AND +! SNOW THERMAL CONDUCTIVITY "SNCOND" +! ---------------------------------------------------------------------- + SNDENS = SNEQV / SNOWH + IF(SNDENS > 1.0) THEN + errmsg = 'Physical snow depth is less than snow water equiv.' + errflg = 1 + return + ENDIF + + CALL CSNOW (SNCOND,SNDENS) +! ---------------------------------------------------------------------- +! DETERMINE IF IT'S PRECIPITATING AND WHAT KIND OF PRECIP IT IS. +! IF IT'S PRCPING AND THE AIR TEMP IS COLDER THAN 0 C, IT'S SNOWING! +! IF IT'S PRCPING AND THE AIR TEMP IS WARMER THAN 0 C, BUT THE GRND +! TEMP IS COLDER THAN 0 C, FREEZING RAIN IS PRESUMED TO BE FALLING. +! ---------------------------------------------------------------------- + + SNOWNG = .FALSE. + FRZGRA = .FALSE. + IF (PRCP > 0.0) THEN +! ---------------------------------------------------------------------- +! Snow defined when fraction of frozen precip (FFROZP) > 0.5, +! passed in from model microphysics. +! ---------------------------------------------------------------------- + IF (FFROZP .GT. 0.5) THEN + SNOWNG = .TRUE. + ELSE + IF (T1 <= TFREEZ) FRZGRA = .TRUE. + END IF + END IF +! ---------------------------------------------------------------------- +! IF EITHER PRCP FLAG IS SET, DETERMINE NEW SNOWFALL (CONVERTING PRCP +! RATE FROM KG M-2 S-1 TO A LIQUID EQUIV SNOW DEPTH IN METERS) AND ADD +! IT TO THE EXISTING SNOWPACK. +! NOTE THAT SINCE ALL PRECIP IS ADDED TO SNOWPACK, NO PRECIP INFILTRATES +! INTO THE SOIL SO THAT PRCP1 IS SET TO ZERO. +! ---------------------------------------------------------------------- + IF ( (SNOWNG) .OR. (FRZGRA) ) THEN + SN_NEW = PRCP * DT * 0.001 + SNEQV = SNEQV + SN_NEW + PRCPF = 0.0 + +! ---------------------------------------------------------------------- +! UPDATE SNOW DENSITY BASED ON NEW SNOWFALL, USING OLD AND NEW SNOW. +! UPDATE SNOW THERMAL CONDUCTIVITY +! ---------------------------------------------------------------------- + CALL SNOW_NEW (SFCTMP,SN_NEW,SNOWH,SNDENS) + +! ---------------------------------------------------------------------- +! kmh 09/04/2006 set Snow Density at 0.2 g/cm**3 +! for "cold permanent ice" or new "dry" snow +! if soil temperature less than 268.15 K, treat as typical +! Antarctic/Greenland snow firn +! ---------------------------------------------------------------------- + IF ( SNCOVR .GT. 0.99 ) THEN + IF ( STC(1) .LT. (TFREEZ - 5.) ) SNDENS = 0.2 + IF ( SNOWNG .AND. (T1.LT.273.) .AND. (SFCTMP.LT.273.) ) SNDENS=0.2 + ENDIF + + CALL CSNOW (SNCOND,SNDENS) + +! ---------------------------------------------------------------------- +! PRECIP IS LIQUID (RAIN), HENCE SAVE IN THE PRECIP VARIABLE THAT +! LATER CAN WHOLELY OR PARTIALLY INFILTRATE THE SOIL +! ---------------------------------------------------------------------- + ELSE + PRCPF = PRCP + ENDIF + +! ---------------------------------------------------------------------- +! DETERMINE SNOW FRACTIONAL COVERAGE. +! KWM: Set SNCOVR to 1.0 because SNUP is set small in VEGPARM.TBL, +! and SNEQV is at least 0.1 (as set above) +! ---------------------------------------------------------------------- + SNCOVR = 1.0 + +! ---------------------------------------------------------------------- +! DETERMINE SURFACE ALBEDO MODIFICATION DUE TO SNOWDEPTH STATE. +! ---------------------------------------------------------------------- + + CALL ALCALC (ALB,SNOALB,EMBRD,T1,ALBEDO,EMISSI, & + & DT,SNOWNG,SNOTIME1) + +! ---------------------------------------------------------------------- +! THERMAL CONDUCTIVITY +! ---------------------------------------------------------------------- + DF1 = SNCOND + + DSOIL = - (0.5 * ZSOIL (1)) + DTOT = SNOWH + DSOIL + FRCSNO = SNOWH / DTOT + +! 1. HARMONIC MEAN (SERIES FLOW) +! DF1 = (SNCOND*DF1)/(FRCSOI*SNCOND+FRCSNO*DF1) + FRCSOI = DSOIL / DTOT + +! 3. GEOMETRIC MEAN (INTERMEDIATE BETWEEN HARMONIC AND ARITHMETIC MEAN) +! DF1 = (SNCOND**FRCSNO)*(DF1**FRCSOI) + DF1 = FRCSNO * SNCOND + FRCSOI * DF1 + +! ---------------------------------------------------------------------- +! CALCULATE SUBSURFACE HEAT FLUX, SSOIL, FROM FINAL THERMAL DIFFUSIVITY +! OF SURFACE MEDIUMS, DF1 ABOVE, AND SKIN TEMPERATURE AND TOP +! MID-LAYER SOIL TEMPERATURE +! ---------------------------------------------------------------------- + IF ( DTOT .GT. 2.*DSOIL ) then + DTOT = 2.*DSOIL + ENDIF + SSOIL = DF1 * ( T1 - STC(1) ) / DTOT + +! ---------------------------------------------------------------------- +! DETERMINE SURFACE ROUGHNESS OVER SNOWPACK USING SNOW CONDITION FROM +! THE PREVIOUS TIMESTEP. +! ---------------------------------------------------------------------- + + CALL SNOWZ0 (Z0,Z0BRD,SNOWH) + +! ---------------------------------------------------------------------- +! CALCULATE TOTAL DOWNWARD RADIATION (SOLAR PLUS LONGWAVE) NEEDED IN +! PENMAN EP SUBROUTINE THAT FOLLOWS +! ---------------------------------------------------------------------- + + FDOWN = SOLNET + LWDN + +! ---------------------------------------------------------------------- +! CALC VIRTUAL TEMPS AND VIRTUAL POTENTIAL TEMPS NEEDED BY SUBROUTINES +! PENMAN. +! ---------------------------------------------------------------------- + + T2V = SFCTMP * (1.0+ 0.61 * Q2 ) + RHO = SFCPRS / (RD * T2V) + RCH = RHO * 1004.6 * CH + T24 = SFCTMP * SFCTMP * SFCTMP * SFCTMP + +! ---------------------------------------------------------------------- +! CALL PENMAN SUBROUTINE TO CALCULATE POTENTIAL EVAPORATION (ETP), AND +! OTHER PARTIAL PRODUCTS AND SUMS SAVE IN COMMON/RITE FOR LATER +! CALCULATIONS. +! ---------------------------------------------------------------------- + + ! PENMAN returns ETP, FLX2, and RR + CALL PENMAN (SFCTMP,SFCPRS,CH,TH2,PRCP,FDOWN,T24,SSOIL, & + & Q2,Q2SAT,ETP,RCH,RR,SNOWNG,FRZGRA, & + & DQSDT2,FLX2,EMISSI,T1,SIGMA,CPH2O,CPICE,LSUBF) + + CALL SNOPAC (ETP,ETA,PRCP,PRCPF,SNOWNG,NSOIL,DT,DF1, & + & Q2,T1,SFCTMP,T24,TH2,FDOWN,SSOIL,STC, & + & SFCPRS,RCH,RR,SNEQV,SNDENS,SNOWH,ZSOIL,TBOT, & + & SNOMLT,DEW,FLX1,FLX2,FLX3,ESNOW,EMISSI,RIBB, & + & SIGMA,CPH2O,CPICE,LSUBF) + +! ETA_KINEMATIC = ESNOW + ETA_KINEMATIC = ETP + +! ---------------------------------------------------------------------- +! Effective mixing ratio at grnd level (skin) +! ---------------------------------------------------------------------- + Q1=Q2+ETA_KINEMATIC*CP/RCH + +! ---------------------------------------------------------------------- +! DETERMINE SENSIBLE HEAT (H) IN ENERGY UNITS (W M-2) +! ---------------------------------------------------------------------- + SHEAT = - (CH * CP * SFCPRS)/ (R * T2V) * ( TH2- T1 ) + +! ---------------------------------------------------------------------- +! CONVERT EVAP TERMS FROM KINEMATIC (KG M-2 S-1) TO ENERGY UNITS (W M-2) +! ---------------------------------------------------------------------- + ESNOW = ESNOW * LSUBS + ETP = ETP * LSUBS + IF (ETP .GT. 0.) THEN + ETA = ESNOW + ELSE + ETA = ETP + ENDIF + +! ---------------------------------------------------------------------- +! CONVERT THE SIGN OF SOIL HEAT FLUX SO THAT: +! SSOIL>0: WARM THE SURFACE (NIGHT TIME) +! SSOIL<0: COOL THE SURFACE (DAY TIME) +! ---------------------------------------------------------------------- + SSOIL = -1.0* SSOIL + +! ---------------------------------------------------------------------- +! FOR THE CASE OF GLACIAL-ICE, ADD ANY SNOWMELT DIRECTLY TO SURFACE +! RUNOFF (RUNOFF1) SINCE THERE IS NO SOIL MEDIUM +! ---------------------------------------------------------------------- + RUNOFF1 = SNOMLT / DT + +! ---------------------------------------------------------------------- + END SUBROUTINE SFLX_GLACIAL +! ---------------------------------------------------------------------- + + SUBROUTINE ALCALC (ALB,SNOALB,EMBRD,TSNOW,ALBEDO,EMISSI, & + & DT,SNOWNG,SNOTIME1) + +! ---------------------------------------------------------------------- +! CALCULATE ALBEDO INCLUDING SNOW EFFECT (0 -> 1) +! ALB SNOWFREE ALBEDO +! SNOALB MAXIMUM (DEEP) SNOW ALBEDO +! ALBEDO SURFACE ALBEDO INCLUDING SNOW EFFECT +! TSNOW SNOW SURFACE TEMPERATURE (K) +! ---------------------------------------------------------------------- + IMPLICIT NONE + +! ---------------------------------------------------------------------- +! SNOALB IS ARGUMENT REPRESENTING MAXIMUM ALBEDO OVER DEEP SNOW, +! AS PASSED INTO SFLX, AND ADAPTED FROM THE SATELLITE-BASED MAXIMUM +! SNOW ALBEDO FIELDS PROVIDED BY D. ROBINSON AND G. KUKLA +! (1985, JCAM, VOL 24, 402-411) +! ---------------------------------------------------------------------- + REAL, INTENT(IN) :: ALB, SNOALB, EMBRD, TSNOW + REAL, INTENT(IN) :: DT + LOGICAL, INTENT(IN) :: SNOWNG + REAL, INTENT(INOUT) :: SNOTIME1 + REAL, INTENT(OUT) :: ALBEDO, EMISSI + REAL :: SNOALB2 + REAL :: TM,SNOALB1 + REAL, PARAMETER :: SNACCA=0.94,SNACCB=0.58,SNTHWA=0.82,SNTHWB=0.46 +! turn off vegetation effect +! ALBEDO = ALB + (1.0- (SHDFAC - SHDMIN))* SNCOVR * (SNOALB - ALB) +! ALBEDO = (1.0-SNCOVR)*ALB + SNCOVR*SNOALB !this is equivalent to below + ALBEDO = ALB + (SNOALB-ALB) + EMISSI = EMBRD + (EMISSI_S - EMBRD) + +! BASE FORMULATION (DICKINSON ET AL., 1986, COGLEY ET AL., 1990) +! IF (TSNOW.LE.263.16) THEN +! ALBEDO=SNOALB +! ELSE +! IF (TSNOW.LT.273.16) THEN +! TM=0.1*(TSNOW-263.16) +! SNOALB1=0.5*((0.9-0.2*(TM**3))+(0.8-0.16*(TM**3))) +! ELSE +! SNOALB1=0.67 +! IF(SNCOVR.GT.0.95) SNOALB1= 0.6 +! SNOALB1 = ALB + SNCOVR*(SNOALB-ALB) +! ENDIF +! ENDIF +! ALBEDO = ALB + SNCOVR*(SNOALB1-ALB) + +! ISBA FORMULATION (VERSEGHY, 1991; BAKER ET AL., 1990) +! SNOALB1 = SNOALB+COEF*(0.85-SNOALB) +! SNOALB2=SNOALB1 +!!m LSTSNW=LSTSNW+1 +! SNOTIME1 = SNOTIME1 + DT +! IF (SNOWNG) THEN +! SNOALB2=SNOALB +!!m LSTSNW=0 +! SNOTIME1 = 0.0 +! ELSE +! IF (TSNOW.LT.273.16) THEN +!! SNOALB2=SNOALB-0.008*LSTSNW*DT/86400 +!!m SNOALB2=SNOALB-0.008*SNOTIME1/86400 +! SNOALB2=(SNOALB2-0.65)*EXP(-0.05*DT/3600)+0.65 +!! SNOALB2=(ALBEDO-0.65)*EXP(-0.01*DT/3600)+0.65 +! ELSE +! SNOALB2=(SNOALB2-0.5)*EXP(-0.0005*DT/3600)+0.5 +!! SNOALB2=(SNOALB-0.5)*EXP(-0.24*LSTSNW*DT/86400)+0.5 +!!m SNOALB2=(SNOALB-0.5)*EXP(-0.24*SNOTIME1/86400)+0.5 +! ENDIF +! ENDIF +! +!! print*,'SNOALB2',SNOALB2,'ALBEDO',ALBEDO,'DT',DT +! ALBEDO = ALB + SNCOVR*(SNOALB2-ALB) +! IF (ALBEDO .GT. SNOALB2) ALBEDO=SNOALB2 +!!m LSTSNW1=LSTSNW +!! SNOTIME = SNOTIME1 + +! formulation by Livneh +! ---------------------------------------------------------------------- +! SNOALB IS CONSIDERED AS THE MAXIMUM SNOW ALBEDO FOR NEW SNOW, AT +! A VALUE OF 85%. SNOW ALBEDO CURVE DEFAULTS ARE FROM BRAS P.263. SHOULD +! NOT BE CHANGED EXCEPT FOR SERIOUS PROBLEMS WITH SNOW MELT. +! TO IMPLEMENT ACCUMULATIN PARAMETERS, SNACCA AND SNACCB, ASSERT THAT IT +! IS INDEED ACCUMULATION SEASON. I.E. THAT SNOW SURFACE TEMP IS BELOW +! ZERO AND THE DATE FALLS BETWEEN OCTOBER AND FEBRUARY +! ---------------------------------------------------------------------- + SNOALB1 = SNOALB+LVCOEF_DATA*(0.85-SNOALB) + SNOALB2=SNOALB1 +! ---------------- Initial LSTSNW -------------------------------------- + IF (SNOWNG) THEN + SNOTIME1 = 0. + ELSE + SNOTIME1=SNOTIME1+DT +! IF (TSNOW.LT.273.16) THEN + SNOALB2=SNOALB1*(SNACCA**((SNOTIME1/86400.0)**SNACCB)) +! ELSE +! SNOALB2 =SNOALB1*(SNTHWA**((SNOTIME1/86400.0)**SNTHWB)) +! ENDIF + ENDIF + + SNOALB2 = MAX ( SNOALB2, ALB ) + ALBEDO = ALB + (SNOALB2-ALB) + IF (ALBEDO .GT. SNOALB2) ALBEDO=SNOALB2 + +! IF (TSNOW.LT.273.16) THEN +! ALBEDO=SNOALB-0.008*DT/86400 +! ELSE +! ALBEDO=(SNOALB-0.5)*EXP(-0.24*DT/86400)+0.5 +! ENDIF + +! IF (ALBEDO > SNOALB) ALBEDO = SNOALB + +! ---------------------------------------------------------------------- + END SUBROUTINE ALCALC +! ---------------------------------------------------------------------- + + SUBROUTINE CSNOW (SNCOND,DSNOW) + +! ---------------------------------------------------------------------- +! CALCULATE SNOW TERMAL CONDUCTIVITY +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: DSNOW + REAL, INTENT(OUT) :: SNCOND + REAL :: C + REAL, PARAMETER :: UNIT = 0.11631 + +! ---------------------------------------------------------------------- +! SNCOND IN UNITS OF CAL/(CM*HR*C), RETURNED IN W/(M*C) +! CSNOW IN UNITS OF CAL/(CM*HR*C), RETURNED IN W/(M*C) +! BASIC VERSION IS DYACHKOVA EQUATION (1960), FOR RANGE 0.1-0.4 +! ---------------------------------------------------------------------- + C = 0.328*10** (2.25* DSNOW) +! CSNOW=UNIT*C + +! ---------------------------------------------------------------------- +! DE VAUX EQUATION (1933), IN RANGE 0.1-0.6 +! ---------------------------------------------------------------------- +! SNCOND=0.0293*(1.+100.*DSNOW**2) +! CSNOW=0.0293*(1.+100.*DSNOW**2) + +! ---------------------------------------------------------------------- +! E. ANDERSEN FROM FLERCHINGER +! ---------------------------------------------------------------------- +! SNCOND=0.021+2.51*DSNOW**2 +! CSNOW=0.021+2.51*DSNOW**2 + +! SNCOND = UNIT * C +! double snow thermal conductivity + SNCOND = 2.0 * UNIT * C + +! ---------------------------------------------------------------------- + END SUBROUTINE CSNOW +! ---------------------------------------------------------------------- + + SUBROUTINE HRTICE (RHSTS,STC,TBOT,NSOIL,ZSOIL,YY,ZZ1,DF1,AI,BI,CI) + +! ---------------------------------------------------------------------- +! CALCULATE THE RIGHT HAND SIDE OF THE TIME TENDENCY TERM OF THE SOIL +! THERMAL DIFFUSION EQUATION IN THE CASE OF SEA-ICE (ICE=1) OR GLACIAL +! ICE (ICE=-1). COMPUTE (PREPARE) THE MATRIX COEFFICIENTS FOR THE +! TRI-DIAGONAL MATRIX OF THE IMPLICIT TIME SCHEME. +! +! (NOTE: THIS SUBROUTINE ONLY CALLED FOR SEA-ICE OR GLACIAL ICE, BUT +! NOT FOR NON-GLACIAL LAND (ICE = 0). +! ---------------------------------------------------------------------- + IMPLICIT NONE + + + INTEGER, INTENT(IN) :: NSOIL + REAL, INTENT(IN) :: DF1,YY,ZZ1 + REAL, DIMENSION(1:NSOIL), INTENT(OUT) :: AI, BI,CI + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: STC, ZSOIL + REAL, DIMENSION(1:NSOIL), INTENT(OUT) :: RHSTS + REAL, INTENT(IN) :: TBOT + INTEGER :: K + REAL :: DDZ,DDZ2,DENOM,DTSDZ,DTSDZ2,SSOIL,HCPCT + REAL :: DF1K,DF1N + REAL :: ZMD + REAL, PARAMETER :: ZBOT = -25.0 + +! ---------------------------------------------------------------------- +! SET A NOMINAL UNIVERSAL VALUE OF GLACIAL-ICE SPECIFIC HEAT CAPACITY, +! HCPCT = 2100.0*900.0 = 1.89000E+6 (SOURCE: BOB GRUMBINE, 2005) +! TBOT PASSED IN AS ARGUMENT, VALUE FROM GLOBAL DATA SET + ! + ! A least-squares fit for the four points provided by + ! Keith Hines for the Yen (1981) values for Antarctic + ! snow firn. + ! + HCPCT = 1.E6 * (0.8194 - 0.1309*0.5*ZSOIL(1)) + DF1K = DF1 + +! ---------------------------------------------------------------------- +! THE INPUT ARGUMENT DF1 IS A UNIVERSALLY CONSTANT VALUE OF SEA-ICE +! THERMAL DIFFUSIVITY, SET IN ROUTINE SNOPAC AS DF1 = 2.2. +! ---------------------------------------------------------------------- +! SET ICE PACK DEPTH. USE TBOT AS ICE PACK LOWER BOUNDARY TEMPERATURE +! (THAT OF UNFROZEN SEA WATER AT BOTTOM OF SEA ICE PACK). ASSUME ICE +! PACK IS OF N=NSOIL LAYERS SPANNING A UNIFORM CONSTANT ICE PACK +! THICKNESS AS DEFINED BY ZSOIL(NSOIL) IN ROUTINE SFLX. +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! CALC THE MATRIX COEFFICIENTS AI, BI, AND CI FOR THE TOP LAYER +! ---------------------------------------------------------------------- + DDZ = 1.0 / ( -0.5 * ZSOIL (2) ) + AI (1) = 0.0 + CI (1) = (DF1 * DDZ) / (ZSOIL (1) * HCPCT) + +! ---------------------------------------------------------------------- +! CALC THE VERTICAL SOIL TEMP GRADIENT BTWN THE TOP AND 2ND SOIL LAYERS. +! RECALC/ADJUST THE SOIL HEAT FLUX. USE THE GRADIENT AND FLUX TO CALC +! RHSTS FOR THE TOP SOIL LAYER. +! ---------------------------------------------------------------------- + BI (1) = - CI (1) + DF1/ (0.5 * ZSOIL (1) * ZSOIL (1) * HCPCT * & + & ZZ1) + DTSDZ = ( STC (1) - STC (2) ) / ( -0.5 * ZSOIL (2) ) + SSOIL = DF1 * ( STC (1) - YY ) / ( 0.5 * ZSOIL (1) * ZZ1 ) + +! ---------------------------------------------------------------------- +! INITIALIZE DDZ2 +! ---------------------------------------------------------------------- + RHSTS (1) = ( DF1 * DTSDZ - SSOIL ) / ( ZSOIL (1) * HCPCT ) + +! ---------------------------------------------------------------------- +! LOOP THRU THE REMAINING SOIL LAYERS, REPEATING THE ABOVE PROCESS +! ---------------------------------------------------------------------- + DDZ2 = 0.0 + DF1K = DF1 + DF1N = DF1 + DO K = 2,NSOIL + + ZMD = 0.5 * (ZSOIL(K)+ZSOIL(K-1)) + ! For the land-ice case +! kmh 09/03/2006 use Yen (1981)'s values for Antarctic snow firn +! IF ( K .eq. 2 ) HCPCT = 0.855108E6 +! IF ( K .eq. 3 ) HCPCT = 0.922906E6 +! IF ( K .eq. 4 ) HCPCT = 1.009986E6 + + ! Least squares fit to the four points supplied by Keith Hines + ! from Yen (1981) for Antarctic snow firn. Not optimal, but + ! probably better than just a constant. + HCPCT = 1.E6 * ( 0.8194 - 0.1309*ZMD ) + +! IF ( K .eq. 2 ) DF1N = 0.345356 +! IF ( K .eq. 3 ) DF1N = 0.398777 +! IF ( K .eq. 4 ) DF1N = 0.472653 + + ! Least squares fit to the three points supplied by Keith Hines + ! from Yen (1981) for Antarctic snow firn. Not optimal, but + ! probably better than just a constant. + DF1N = 0.32333 - ( 0.10073 * ZMD ) +! ---------------------------------------------------------------------- +! CALC THE VERTICAL SOIL TEMP GRADIENT THRU THIS LAYER. +! ---------------------------------------------------------------------- + IF (K /= NSOIL) THEN + DENOM = 0.5 * ( ZSOIL (K -1) - ZSOIL (K +1) ) + +! ---------------------------------------------------------------------- +! CALC THE MATRIX COEF, CI, AFTER CALC'NG ITS PARTIAL PRODUCT. +! ---------------------------------------------------------------------- + DTSDZ2 = ( STC (K) - STC (K +1) ) / DENOM + DDZ2 = 2. / (ZSOIL (K -1) - ZSOIL (K +1)) + CI (K) = - DF1N * DDZ2 / ( (ZSOIL (K -1) - ZSOIL (K))*HCPCT) + +! ---------------------------------------------------------------------- +! CALC THE VERTICAL SOIL TEMP GRADIENT THRU THE LOWEST LAYER. +! ---------------------------------------------------------------------- + ELSE + +! ---------------------------------------------------------------------- +! SET MATRIX COEF, CI TO ZERO. +! ---------------------------------------------------------------------- + DTSDZ2 = (STC (K) - TBOT)/ (.5 * (ZSOIL (K -1) + ZSOIL (K)) & + & - ZBOT) + CI (K) = 0. +! ---------------------------------------------------------------------- +! CALC RHSTS FOR THIS LAYER AFTER CALC'NG A PARTIAL PRODUCT. +! ---------------------------------------------------------------------- + END IF + DENOM = ( ZSOIL (K) - ZSOIL (K -1) ) * HCPCT + +! ---------------------------------------------------------------------- +! CALC MATRIX COEFS, AI, AND BI FOR THIS LAYER. +! ---------------------------------------------------------------------- + RHSTS (K) = ( DF1N * DTSDZ2- DF1K * DTSDZ ) / DENOM + AI (K) = - DF1K * DDZ / ( (ZSOIL (K -1) - ZSOIL (K)) * HCPCT) + +! ---------------------------------------------------------------------- +! RESET VALUES OF DTSDZ AND DDZ FOR LOOP TO NEXT SOIL LYR. +! ---------------------------------------------------------------------- + BI (K) = - (AI (K) + CI (K)) + DF1K = DF1N + DTSDZ = DTSDZ2 + DDZ = DDZ2 + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE HRTICE +! ---------------------------------------------------------------------- + + SUBROUTINE HSTEP (STCOUT,STCIN,RHSTS,DT,NSOIL,AI,BI,CI) + +! ---------------------------------------------------------------------- +! CALCULATE/UPDATE THE SOIL TEMPERATURE FIELD. +! ---------------------------------------------------------------------- + IMPLICIT NONE + INTEGER, INTENT(IN) :: NSOIL + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: STCIN + REAL, DIMENSION(1:NSOIL), INTENT(OUT) :: STCOUT + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: RHSTS + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: AI,BI,CI + REAL, DIMENSION(1:NSOIL) :: RHSTSin + REAL, DIMENSION(1:NSOIL) :: CIin + REAL :: DT + INTEGER :: K + +! ---------------------------------------------------------------------- +! CREATE FINITE DIFFERENCE VALUES FOR USE IN ROSR12 ROUTINE +! ---------------------------------------------------------------------- + DO K = 1,NSOIL + RHSTS (K) = RHSTS (K) * DT + AI (K) = AI (K) * DT + BI (K) = 1. + BI (K) * DT + CI (K) = CI (K) * DT + END DO +! ---------------------------------------------------------------------- +! COPY VALUES FOR INPUT VARIABLES BEFORE CALL TO ROSR12 +! ---------------------------------------------------------------------- + DO K = 1,NSOIL + RHSTSin (K) = RHSTS (K) + END DO + DO K = 1,NSOIL + CIin (K) = CI (K) + END DO +! ---------------------------------------------------------------------- +! SOLVE THE TRI-DIAGONAL MATRIX EQUATION +! ---------------------------------------------------------------------- + CALL ROSR12 (CI,AI,BI,CIin,RHSTSin,RHSTS,NSOIL) +! ---------------------------------------------------------------------- +! CALC/UPDATE THE SOIL TEMPS USING MATRIX SOLUTION +! ---------------------------------------------------------------------- + DO K = 1,NSOIL + STCOUT (K) = STCIN (K) + CI (K) + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE HSTEP +! ---------------------------------------------------------------------- + + SUBROUTINE PENMAN (SFCTMP,SFCPRS,CH,TH2,PRCP,FDOWN,T24,SSOIL, & + & Q2,Q2SAT,ETP,RCH,RR,SNOWNG,FRZGRA, & + & DQSDT2,FLX2,EMISSI,T1,SIGMA,CPH2O,CPICE,LSUBF) + +! ---------------------------------------------------------------------- +! CALCULATE POTENTIAL EVAPORATION FOR THE CURRENT POINT. VARIOUS +! PARTIAL SUMS/PRODUCTS ARE ALSO CALCULATED AND PASSED BACK TO THE +! CALLING ROUTINE FOR LATER USE. +! ---------------------------------------------------------------------- + IMPLICIT NONE + LOGICAL, INTENT(IN) :: SNOWNG, FRZGRA + REAL, INTENT(IN) :: CH, DQSDT2,FDOWN,PRCP,Q2,Q2SAT,SSOIL,SFCPRS, & + & SFCTMP,TH2,EMISSI,T1,RCH,T24 + REAL, INTENT(IN) :: SIGMA, CPH2O, CPICE, LSUBF + REAL, INTENT(OUT) :: ETP,FLX2,RR + + REAL :: A, DELTA, FNET,RAD,ELCP1,LVS,EPSCA + + REAL, PARAMETER :: ELCP = 2.4888E+3, LSUBC = 2.501000E+6 + REAL, PARAMETER :: LSUBS = 2.83E+6 + +! ---------------------------------------------------------------------- +! PREPARE PARTIAL QUANTITIES FOR PENMAN EQUATION. +! ---------------------------------------------------------------------- + IF ( T1 > 273.15 ) THEN + ELCP1 = ELCP + LVS = LSUBC + ELSE + ELCP1 = ELCP*LSUBS/LSUBC + LVS = LSUBS + ENDIF + DELTA = ELCP1 * DQSDT2 + A = ELCP1 * (Q2SAT - Q2) + RR = EMISSI*T24 * 6.48E-8 / (SFCPRS * CH) + 1.0 + +! ---------------------------------------------------------------------- +! ADJUST THE PARTIAL SUMS / PRODUCTS WITH THE LATENT HEAT +! EFFECTS CAUSED BY FALLING PRECIPITATION. +! ---------------------------------------------------------------------- + IF (.NOT. SNOWNG) THEN + IF (PRCP > 0.0) RR = RR + CPH2O * PRCP / RCH + ELSE + RR = RR + CPICE * PRCP / RCH + END IF + +! ---------------------------------------------------------------------- +! INCLUDE THE LATENT HEAT EFFECTS OF FREEZING RAIN CONVERTING TO ICE ON +! IMPACT IN THE CALCULATION OF FLX2 AND FNET. +! ---------------------------------------------------------------------- + IF (FRZGRA) THEN + FLX2 = - LSUBF * PRCP + ELSE + FLX2 = 0.0 + ENDIF + FNET = FDOWN - ( EMISSI * SIGMA * T24 ) - SSOIL - FLX2 + +! ---------------------------------------------------------------------- +! FINISH PENMAN EQUATION CALCULATIONS. +! ---------------------------------------------------------------------- + RAD = FNET / RCH + TH2 - SFCTMP + EPSCA = (A * RR + RAD * DELTA) / (DELTA + RR) + ETP = EPSCA * RCH / LVS + +! ---------------------------------------------------------------------- + END SUBROUTINE PENMAN +! ---------------------------------------------------------------------- + + SUBROUTINE SHFLX (STC,NSOIL,DT,YY,ZZ1,ZSOIL,TBOT,DF1) +! ---------------------------------------------------------------------- +! UPDATE THE TEMPERATURE STATE OF THE SOIL COLUMN BASED ON THE THERMAL +! DIFFUSION EQUATION AND UPDATE THE FROZEN SOIL MOISTURE CONTENT BASED +! ON THE TEMPERATURE. +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER, INTENT(IN) :: NSOIL + REAL, INTENT(IN) :: DF1,DT,TBOT,YY, ZZ1 + REAL, DIMENSION(1:NSOIL), INTENT(IN) :: ZSOIL + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: STC + + REAL, DIMENSION(1:NSOIL) :: AI, BI, CI, STCF,RHSTS + INTEGER :: I + REAL, PARAMETER :: T0 = 273.15 + +! ---------------------------------------------------------------------- +! HRT ROUTINE CALCS THE RIGHT HAND SIDE OF THE SOIL TEMP DIF EQN +! ---------------------------------------------------------------------- + + CALL HRTICE (RHSTS,STC,TBOT, NSOIL,ZSOIL,YY,ZZ1,DF1,AI,BI,CI) + + CALL HSTEP (STCF,STC,RHSTS,DT,NSOIL,AI,BI,CI) + + DO I = 1,NSOIL + STC (I) = STCF (I) + END DO +! ---------------------------------------------------------------------- + END SUBROUTINE SHFLX +! ---------------------------------------------------------------------- + + SUBROUTINE SNOPAC (ETP,ETA,PRCP,PRCPF,SNOWNG,NSOIL,DT,DF1, & + & Q2,T1,SFCTMP,T24,TH2,FDOWN,SSOIL,STC, & + & SFCPRS,RCH,RR,SNEQV,SNDENS,SNOWH,ZSOIL,TBOT, & + & SNOMLT,DEW,FLX1,FLX2,FLX3,ESNOW,EMISSI,RIBB, & + & SIGMA,CPH2O,CPICE,LSUBF) + +! ---------------------------------------------------------------------- +! CALCULATE SOIL MOISTURE AND HEAT FLUX VALUES & UPDATE SOIL MOISTURE +! CONTENT AND SOIL HEAT CONTENT VALUES FOR THE CASE WHEN A SNOW PACK IS +! PRESENT. +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER, INTENT(IN) :: NSOIL + LOGICAL, INTENT(IN) :: SNOWNG + REAL, INTENT(IN) :: DF1,DT,FDOWN,PRCP,Q2,RCH,RR,SFCPRS,SFCTMP, & + & T24,TBOT,TH2,EMISSI + REAL, INTENT(IN) :: SIGMA, CPH2O, CPICE, LSUBF + REAL, INTENT(INOUT) :: SNEQV,FLX2,PRCPF,SNOWH,SNDENS,T1,RIBB,ETP + REAL, INTENT(OUT) :: DEW,ESNOW,FLX1,FLX3,SSOIL,SNOMLT + REAL, DIMENSION(1:NSOIL),INTENT(IN) :: ZSOIL + REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: STC + REAL, DIMENSION(1:NSOIL) :: ET1 + INTEGER :: K + REAL :: DENOM,DSOIL,DTOT,ESDFLX,ETA, & + & ESNOW1,ESNOW2,ETA1,ETP1,ETP2, & + & ETP3,ETANRG,EX, & + & FRCSNO,FRCSOI,PRCP1,QSAT,RSNOW,SEH, & + & SNCOND,T12,T12A,T12B,T14,YY,ZZ1 + + REAL, PARAMETER :: ESDMIN = 1.E-6, LSUBC = 2.501000E+6, & + & LSUBS = 2.83E+6, TFREEZ = 273.15, & + & SNOEXP = 2.0 + +! ---------------------------------------------------------------------- +! FOR GLACIAL-ICE, SNOWCOVER FRACTION = 1.0, AND SUBLIMATION IS AT THE +! POTENTIAL RATE. +! ---------------------------------------------------------------------- +! INITIALIZE EVAP TERMS. +! ---------------------------------------------------------------------- +! conversions: +! ESNOW [KG M-2 S-1] +! ESDFLX [KG M-2 S-1] .le. ESNOW +! ESNOW1 [M S-1] +! ESNOW2 [M] +! ETP [KG M-2 S-1] +! ETP1 [M S-1] +! ETP2 [M] +! ---------------------------------------------------------------------- + SNOMLT = 0.0 + DEW = 0. + ESNOW = 0. + ESNOW1 = 0. + ESNOW2 = 0. + +! ---------------------------------------------------------------------- +! CONVERT POTENTIAL EVAP (ETP) FROM KG M-2 S-1 TO ETP1 IN M S-1 +! ---------------------------------------------------------------------- + PRCP1 = PRCPF *0.001 +! ---------------------------------------------------------------------- +! IF ETP<0 (DOWNWARD) THEN DEWFALL (=FROSTFALL IN THIS CASE). +! ---------------------------------------------------------------------- + IF (ETP <= 0.0) THEN + IF ( ( RIBB >= 0.1 ) .AND. ( FDOWN > 150.0 ) ) THEN + ETP=(MIN(ETP*(1.0-RIBB),0.)/0.980 + ETP*(0.980-1.0))/0.980 + ENDIF + ETP1 = ETP * 0.001 + DEW = -ETP1 + ESNOW2 = ETP1*DT + ETANRG = ETP*LSUBS + ELSE + ETP1 = ETP * 0.001 + ESNOW = ETP + ESNOW1 = ESNOW*0.001 + ESNOW2 = ESNOW1*DT + ETANRG = ESNOW*LSUBS + END IF + +! ---------------------------------------------------------------------- +! IF PRECIP IS FALLING, CALCULATE HEAT FLUX FROM SNOW SFC TO NEWLY +! ACCUMULATING PRECIP. NOTE THAT THIS REFLECTS THE FLUX APPROPRIATE FOR +! THE NOT-YET-UPDATED SKIN TEMPERATURE (T1). ASSUMES TEMPERATURE OF THE +! SNOWFALL STRIKING THE GROUND IS =SFCTMP (LOWEST MODEL LEVEL AIR TEMP). +! ---------------------------------------------------------------------- + FLX1 = 0.0 + IF (SNOWNG) THEN + FLX1 = CPICE * PRCP * (T1- SFCTMP) + ELSE + IF (PRCP > 0.0) FLX1 = CPH2O * PRCP * (T1- SFCTMP) + END IF +! ---------------------------------------------------------------------- +! CALCULATE AN 'EFFECTIVE SNOW-GRND SFC TEMP' (T12) BASED ON HEAT FLUXES +! BETWEEN THE SNOW PACK AND THE SOIL AND ON NET RADIATION. +! INCLUDE FLX1 (PRECIP-SNOW SFC) AND FLX2 (FREEZING RAIN LATENT HEAT) +! FLUXES. FLX1 FROM ABOVE, FLX2 BROUGHT IN VIA COMMOM BLOCK RITE. +! FLX2 REFLECTS FREEZING RAIN LATENT HEAT FLUX USING T1 CALCULATED IN +! PENMAN. +! ---------------------------------------------------------------------- + DSOIL = - (0.5 * ZSOIL (1)) + DTOT = SNOWH + DSOIL + DENOM = 1.0+ DF1 / (DTOT * RR * RCH) + T12A = ( (FDOWN - FLX1- FLX2- EMISSI * SIGMA * T24)/ RCH & + + TH2- SFCTMP - ETANRG / RCH ) / RR + T12B = DF1 * STC (1) / (DTOT * RR * RCH) + + T12 = (SFCTMP + T12A + T12B) / DENOM + IF (T12 <= TFREEZ) THEN +! ---------------------------------------------------------------------- +! SUB-FREEZING BLOCK +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! IF THE 'EFFECTIVE SNOW-GRND SFC TEMP' IS AT OR BELOW FREEZING, NO SNOW +! MELT WILL OCCUR. SET THE SKIN TEMP TO THIS EFFECTIVE TEMP. REDUCE +! (BY SUBLIMINATION ) OR INCREASE (BY FROST) THE DEPTH OF THE SNOWPACK, +! DEPENDING ON SIGN OF ETP. +! UPDATE SOIL HEAT FLUX (SSOIL) USING NEW SKIN TEMPERATURE (T1) +! SINCE NO SNOWMELT, SET ACCUMULATED SNOWMELT TO ZERO, SET 'EFFECTIVE' +! PRECIP FROM SNOWMELT TO ZERO, SET PHASE-CHANGE HEAT FLUX FROM SNOWMELT +! TO ZERO. +! ---------------------------------------------------------------------- + T1 = T12 + SSOIL = DF1 * (T1- STC (1)) / DTOT + SNEQV = MAX(0.0, SNEQV-ESNOW2) + FLX3 = 0.0 + EX = 0.0 + SNOMLT = 0.0 + ELSE +! ---------------------------------------------------------------------- +! ABOVE FREEZING BLOCK +! ---------------------------------------------------------------------- +! IF THE 'EFFECTIVE SNOW-GRND SFC TEMP' IS ABOVE FREEZING, SNOW MELT +! WILL OCCUR. CALL THE SNOW MELT RATE,EX AND AMT, SNOMLT. REVISE THE +! EFFECTIVE SNOW DEPTH. REVISE THE SKIN TEMP BECAUSE IT WOULD HAVE CHGD +! DUE TO THE LATENT HEAT RELEASED BY THE MELTING. CALC THE LATENT HEAT +! RELEASED, FLX3. SET THE EFFECTIVE PRECIP, PRCP1 TO THE SNOW MELT RATE, +! EX FOR USE IN SMFLX. ADJUSTMENT TO T1 TO ACCOUNT FOR SNOW PATCHES. +! CALCULATE QSAT VALID AT FREEZING POINT. NOTE THAT ESAT (SATURATION +! VAPOR PRESSURE) VALUE OF 6.11E+2 USED HERE IS THAT VALID AT FRZZING +! POINT. NOTE THAT ETP FROM CALL PENMAN IN SFLX IS IGNORED HERE IN +! FAVOR OF BULK ETP OVER 'OPEN WATER' AT FREEZING TEMP. +! UPDATE SOIL HEAT FLUX (S) USING NEW SKIN TEMPERATURE (T1) +! ---------------------------------------------------------------------- + T1 = TFREEZ + IF ( DTOT .GT. 2.0*DSOIL ) THEN + DTOT = 2.0*DSOIL + ENDIF + SSOIL = DF1 * (T1- STC (1)) / DTOT + IF (SNEQV-ESNOW2 <= ESDMIN) THEN + SNEQV = 0.0 + EX = 0.0 + SNOMLT = 0.0 + FLX3 = 0.0 +! ---------------------------------------------------------------------- +! SUBLIMATION LESS THAN DEPTH OF SNOWPACK +! SNOWPACK (SNEQV) REDUCED BY ESNOW2 (DEPTH OF SUBLIMATED SNOW) +! ---------------------------------------------------------------------- + ELSE + SNEQV = SNEQV-ESNOW2 + ETP3 = ETP * LSUBC + SEH = RCH * (T1- TH2) + T14 = ( T1 * T1 ) * ( T1 * T1 ) + FLX3 = FDOWN - FLX1- FLX2- EMISSI*SIGMA * T14- SSOIL - SEH - ETANRG + IF (FLX3 <= 0.0) FLX3 = 0.0 + EX = FLX3*0.001/ LSUBF + SNOMLT = EX * DT +! ---------------------------------------------------------------------- +! ESDMIN REPRESENTS A SNOWPACK DEPTH THRESHOLD VALUE BELOW WHICH WE +! CHOOSE NOT TO RETAIN ANY SNOWPACK, AND INSTEAD INCLUDE IT IN SNOWMELT. +! ---------------------------------------------------------------------- + IF (SNEQV- SNOMLT >= ESDMIN) THEN + SNEQV = SNEQV- SNOMLT + ELSE +! ---------------------------------------------------------------------- +! SNOWMELT EXCEEDS SNOW DEPTH +! ---------------------------------------------------------------------- + EX = SNEQV / DT + FLX3 = EX *1000.0* LSUBF + SNOMLT = SNEQV + + SNEQV = 0.0 + ENDIF + ENDIF + +! ---------------------------------------------------------------------- +! FOR GLACIAL ICE, THE SNOWMELT WILL BE ADDED TO SUBSURFACE +! RUNOFF/BASEFLOW LATER NEAR THE END OF SFLX (AFTER RETURN FROM CALL TO +! SUBROUTINE SNOPAC) +! ---------------------------------------------------------------------- + + ENDIF + +! ---------------------------------------------------------------------- +! BEFORE CALL SHFLX IN THIS SNOWPACK CASE, SET ZZ1 AND YY ARGUMENTS TO +! SPECIAL VALUES THAT ENSURE THAT GROUND HEAT FLUX CALCULATED IN SHFLX +! MATCHES THAT ALREADY COMPUTED FOR BELOW THE SNOWPACK, THUS THE SFC +! HEAT FLUX TO BE COMPUTED IN SHFLX WILL EFFECTIVELY BE THE FLUX AT THE +! SNOW TOP SURFACE. +! ---------------------------------------------------------------------- + ZZ1 = 1.0 + YY = STC (1) -0.5* SSOIL * ZSOIL (1)* ZZ1/ DF1 + +! ---------------------------------------------------------------------- +! SHFLX WILL CALC/UPDATE THE SOIL TEMPS. +! ---------------------------------------------------------------------- + CALL SHFLX (STC,NSOIL,DT,YY,ZZ1,ZSOIL,TBOT,DF1) + +! ---------------------------------------------------------------------- +! SNOW DEPTH AND DENSITY ADJUSTMENT BASED ON SNOW COMPACTION. YY IS +! ASSUMED TO BE THE SOIL TEMPERTURE AT THE TOP OF THE SOIL COLUMN. +! ---------------------------------------------------------------------- + IF (SNEQV .GE. 0.10) THEN + CALL SNOWPACK (SNEQV,DT,SNOWH,SNDENS,T1,YY) + ELSE + SNEQV = 0.10 + SNOWH = 0.50 +!KWM???? SNDENS = +!KWM???? SNCOND = + ENDIF +! ---------------------------------------------------------------------- + END SUBROUTINE SNOPAC +! ---------------------------------------------------------------------- + + SUBROUTINE SNOWPACK (SNEQV,DTSEC,SNOWH,SNDENS,TSNOW,TSOIL) + +! ---------------------------------------------------------------------- +! CALCULATE COMPACTION OF SNOWPACK UNDER CONDITIONS OF INCREASING SNOW +! DENSITY, AS OBTAINED FROM AN APPROXIMATE SOLUTION OF E. ANDERSON'S +! DIFFERENTIAL EQUATION (3.29), NOAA TECHNICAL REPORT NWS 19, BY VICTOR +! KOREN, 03/25/95. +! ---------------------------------------------------------------------- +! SNEQV WATER EQUIVALENT OF SNOW (M) +! DTSEC TIME STEP (SEC) +! SNOWH SNOW DEPTH (M) +! SNDENS SNOW DENSITY (G/CM3=DIMENSIONLESS FRACTION OF H2O DENSITY) +! TSNOW SNOW SURFACE TEMPERATURE (K) +! TSOIL SOIL SURFACE TEMPERATURE (K) + +! SUBROUTINE WILL RETURN NEW VALUES OF SNOWH AND SNDENS +! ---------------------------------------------------------------------- + IMPLICIT NONE + + INTEGER :: IPOL, J + REAL, INTENT(IN) :: SNEQV, DTSEC,TSNOW,TSOIL + REAL, INTENT(INOUT) :: SNOWH, SNDENS + REAL :: BFAC,DSX,DTHR,DW,SNOWHC,PEXP, & + TAVGC,TSNOWC,TSOILC,ESDC,ESDCX + REAL, PARAMETER :: C1 = 0.01, C2 = 21.0, G = 9.81, & + KN = 4000.0 +! ---------------------------------------------------------------------- +! CONVERSION INTO SIMULATION UNITS +! ---------------------------------------------------------------------- + SNOWHC = SNOWH *100. + ESDC = SNEQV *100. + DTHR = DTSEC /3600. + TSNOWC = TSNOW -273.15 + TSOILC = TSOIL -273.15 + +! ---------------------------------------------------------------------- +! CALCULATING OF AVERAGE TEMPERATURE OF SNOW PACK +! ---------------------------------------------------------------------- +! ---------------------------------------------------------------------- +! CALCULATING OF SNOW DEPTH AND DENSITY AS A RESULT OF COMPACTION +! SNDENS=DS0*(EXP(BFAC*SNEQV)-1.)/(BFAC*SNEQV) +! BFAC=DTHR*C1*EXP(0.08*TAVGC-C2*DS0) +! NOTE: BFAC*SNEQV IN SNDENS EQN ABOVE HAS TO BE CAREFULLY TREATED +! NUMERICALLY BELOW: +! C1 IS THE FRACTIONAL INCREASE IN DENSITY (1/(CM*HR)) +! C2 IS A CONSTANT (CM3/G) KOJIMA ESTIMATED AS 21 CMS/G +! ---------------------------------------------------------------------- + TAVGC = 0.5* (TSNOWC + TSOILC) + IF (ESDC > 1.E-2) THEN + ESDCX = ESDC + ELSE + ESDCX = 1.E-2 + END IF + +! DSX = SNDENS*((DEXP(BFAC*ESDC)-1.)/(BFAC*ESDC)) +! ---------------------------------------------------------------------- +! THE FUNCTION OF THE FORM (e**x-1)/x IMBEDDED IN ABOVE EXPRESSION +! FOR DSX WAS CAUSING NUMERICAL DIFFICULTIES WHEN THE DENOMINATOR "x" +! (I.E. BFAC*ESDC) BECAME ZERO OR APPROACHED ZERO (DESPITE THE FACT THAT +! THE ANALYTICAL FUNCTION (e**x-1)/x HAS A WELL DEFINED LIMIT AS +! "x" APPROACHES ZERO), HENCE BELOW WE REPLACE THE (e**x-1)/x +! EXPRESSION WITH AN EQUIVALENT, NUMERICALLY WELL-BEHAVED +! POLYNOMIAL EXPANSION. + +! NUMBER OF TERMS OF POLYNOMIAL EXPANSION, AND HENCE ITS ACCURACY, +! IS GOVERNED BY ITERATION LIMIT "IPOL". +! IPOL GREATER THAN 9 ONLY MAKES A DIFFERENCE ON DOUBLE +! PRECISION (RELATIVE ERRORS GIVEN IN PERCENT %). +! IPOL=9, FOR REL.ERROR <~ 1.6 E-6 % (8 SIGNIFICANT DIGITS) +! IPOL=8, FOR REL.ERROR <~ 1.8 E-5 % (7 SIGNIFICANT DIGITS) +! IPOL=7, FOR REL.ERROR <~ 1.8 E-4 % ... +! ---------------------------------------------------------------------- + BFAC = DTHR * C1* EXP (0.08* TAVGC - C2* SNDENS) + IPOL = 4 + PEXP = 0. +! PEXP = (1. + PEXP)*BFAC*ESDC/REAL(J+1) + DO J = IPOL,1, -1 + PEXP = (1. + PEXP)* BFAC * ESDCX / REAL (J +1) + END DO + + PEXP = PEXP + 1. +! ---------------------------------------------------------------------- +! ABOVE LINE ENDS POLYNOMIAL SUBSTITUTION +! ---------------------------------------------------------------------- +! END OF KOREAN FORMULATION + +! BASE FORMULATION (COGLEY ET AL., 1990) +! CONVERT DENSITY FROM G/CM3 TO KG/M3 +! DSM=SNDENS*1000.0 + +! DSX=DSM+DTSEC*0.5*DSM*G*SNEQV/ +! & (1E7*EXP(-0.02*DSM+KN/(TAVGC+273.16)-14.643)) + +! & CONVERT DENSITY FROM KG/M3 TO G/CM3 +! DSX=DSX/1000.0 + +! END OF COGLEY ET AL. FORMULATION + +! ---------------------------------------------------------------------- +! SET UPPER/LOWER LIMIT ON SNOW DENSITY +! ---------------------------------------------------------------------- + DSX = SNDENS * (PEXP) + IF (DSX > 0.40) DSX = 0.40 + IF (DSX < 0.05) DSX = 0.05 +! ---------------------------------------------------------------------- +! UPDATE OF SNOW DEPTH AND DENSITY DEPENDING ON LIQUID WATER DURING +! SNOWMELT. ASSUMED THAT 13% OF LIQUID WATER CAN BE STORED IN SNOW PER +! DAY DURING SNOWMELT TILL SNOW DENSITY 0.40. +! ---------------------------------------------------------------------- + SNDENS = DSX + IF (TSNOWC >= 0.) THEN + DW = 0.13* DTHR /24. + SNDENS = SNDENS * (1. - DW) + DW + IF (SNDENS >= 0.40) SNDENS = 0.40 +! ---------------------------------------------------------------------- +! CALCULATE SNOW DEPTH (CM) FROM SNOW WATER EQUIVALENT AND SNOW DENSITY. +! CHANGE SNOW DEPTH UNITS TO METERS +! ---------------------------------------------------------------------- + END IF + SNOWHC = ESDC / SNDENS + SNOWH = SNOWHC * 0.01 + +! ---------------------------------------------------------------------- + END SUBROUTINE SNOWPACK +! ---------------------------------------------------------------------- + + SUBROUTINE SNOWZ0 (Z0, Z0BRD, SNOWH) +! ---------------------------------------------------------------------- +! CALCULATE TOTAL ROUGHNESS LENGTH OVER SNOW +! Z0 ROUGHNESS LENGTH (m) +! Z0S SNOW ROUGHNESS LENGTH:=0.001 (m) +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: Z0BRD + REAL, INTENT(OUT) :: Z0 + REAL, PARAMETER :: Z0S=0.001 + REAL, INTENT(IN) :: SNOWH + REAL :: BURIAL + REAL :: Z0EFF + + BURIAL = 7.0*Z0BRD - SNOWH + IF(BURIAL.LE.0.0007) THEN + Z0EFF = Z0S + ELSE + Z0EFF = BURIAL/7.0 + ENDIF + + Z0 = Z0EFF + +! ---------------------------------------------------------------------- + END SUBROUTINE SNOWZ0 +! ---------------------------------------------------------------------- + + SUBROUTINE SNOW_NEW (TEMP,NEWSN,SNOWH,SNDENS) + +! ---------------------------------------------------------------------- +! CALCULATE SNOW DEPTH AND DENSITY TO ACCOUNT FOR THE NEW SNOWFALL. +! UPDATED VALUES OF SNOW DEPTH AND DENSITY ARE RETURNED. + +! TEMP AIR TEMPERATURE (K) +! NEWSN NEW SNOWFALL (M) +! SNOWH SNOW DEPTH (M) +! SNDENS SNOW DENSITY (G/CM3=DIMENSIONLESS FRACTION OF H2O DENSITY) +! ---------------------------------------------------------------------- + IMPLICIT NONE + REAL, INTENT(IN) :: NEWSN, TEMP + REAL, INTENT(INOUT) :: SNDENS, SNOWH + REAL :: DSNEW, HNEWC, SNOWHC,NEWSNC,TEMPC + +! ---------------------------------------------------------------------- +! CALCULATING NEW SNOWFALL DENSITY DEPENDING ON TEMPERATURE +! EQUATION FROM GOTTLIB L. 'A GENERAL RUNOFF MODEL FOR SNOWCOVERED +! AND GLACIERIZED BASIN', 6TH NORDIC HYDROLOGICAL CONFERENCE, +! VEMADOLEN, SWEDEN, 1980, 172-177PP. +!----------------------------------------------------------------------- + TEMPC = TEMP - 273.15 + IF ( TEMPC <= -15. ) THEN + DSNEW = 0.05 + ELSE + DSNEW = 0.05 + 0.0017 * ( TEMPC + 15. ) ** 1.5 + ENDIF + +! ---------------------------------------------------------------------- +! CONVERSION INTO SIMULATION UNITS +! ---------------------------------------------------------------------- + SNOWHC = SNOWH * 100. + NEWSNC = NEWSN * 100. + +! ---------------------------------------------------------------------- +! ADJUSTMENT OF SNOW DENSITY DEPENDING ON NEW SNOWFALL +! ---------------------------------------------------------------------- + HNEWC = NEWSNC / DSNEW + IF ( SNOWHC + HNEWC < 1.0E-3 ) THEN + SNDENS = MAX ( DSNEW , SNDENS ) + ELSE + SNDENS = ( SNOWHC * SNDENS + HNEWC * DSNEW ) / ( SNOWHC + HNEWC ) + ENDIF + SNOWHC = SNOWHC + HNEWC + SNOWH = SNOWHC * 0.01 + +! ---------------------------------------------------------------------- + END SUBROUTINE SNOW_NEW +! ---------------------------------------------------------------------- + +END MODULE module_sf_noahlsm_glacial_only diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 75afaa6ff..2ec722b4a 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -31,7 +31,20 @@ subroutine lsm_noah_init(me, isot, ivegsrc, nlunit, ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - + + if (ivegsrc > 2) then + errmsg = 'The NOAH LSM expects that the ivegsrc physics '// + & 'namelist parameter is 0, 1, or 2. Exiting...' + errflg = 1 + return + end if + if (isot > 1) then + errmsg = 'The NOAH LSM expects that the isot physics '// + & 'namelist parameter is 0, or 1. Exiting...' + errflg = 1 + return + end if + !--- initialize soil vegetation call set_soilveg(me, isot, ivegsrc, nlunit) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 3b4b8a118..dcef59fd0 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -36,6 +36,17 @@ subroutine lsm_ruc_init (me, isot, ivegsrc, nlunit, & errmsg = '' errflg = 0 + if (ivegsrc /= 1) then + errmsg = 'The RUC LSM expects that the ivegsrc physics namelist parameter is 1. Exiting...' + errflg = 1 + return + end if + if (isot > 1) then + errmsg = 'The RUC LSM expects that the isot physics namelist parameter is 0, or 1. Exiting...' + errflg = 1 + return + end if + !--- initialize soil vegetation call set_soilveg_ruc(me, isot, ivegsrc, nlunit) diff --git a/physics/sfc_noah_wrfv4.F90 b/physics/sfc_noah_wrfv4.F90 new file mode 100644 index 000000000..c435b2d38 --- /dev/null +++ b/physics/sfc_noah_wrfv4.F90 @@ -0,0 +1,261 @@ +!> \file sfc_noah_wrfv4.F90 +!! This file contains the Noah land surface scheme driver for the version of the scheme found in WRF v4.0. + +!> This module contains the CCPP-compliant Noah land surface scheme driver for +!! the version found in WRF v4.0. + module sfc_noah_wrfv4 + + implicit none + + private + + public :: sfc_noah_wrfv4_init, sfc_noah_wrfv4_run, sfc_noah_wrfv4_finalize + + contains + +!> \ingroup NOAH_LSM_WRFv4 +!! \section arg_table_sfc_noah_wrfv4_init Argument Table +!! \htmlinclude sfc_noah_wrfv4_init.html +!! + subroutine sfc_noah_wrfv4_init(lsm, lsm_noah_wrfv4, nsoil, ua_phys, fasdas, restart, errmsg, errflg) + + use machine, only : kind_phys + + implicit none + + integer, intent(in) :: lsm, lsm_noah_wrfv4, nsoil, fasdas + logical, intent(in) :: ua_phys, restart + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (lsm/=lsm_noah_wrfv4) then + write(errmsg,'(*(a))') "Logic error: namelist choice of LSM is different from NOAH WRFv4" + errflg = 1 + return + end if + + if (nsoil < 2) then + write(errmsg,'(*(a))') "The NOAH WRFv4 scheme expects at least 2 soil layers." + errflg = 1 + return + end if + + if (ua_phys) then + write(errmsg,'(*(a))') "The NOAH WRFv4 scheme has not been tested with ua_phys = T" + errflg = 1 + return + end if + + + if (fasdas > 0) then + write(errmsg,'(*(a))') "The NOAH WRFv4 scheme has not been tested with fasdas > 0" + errflg = 1 + return + end if + + if (restart) then + !GJF: for restart functionality, the host model will need to write/read snotime (time_since_last_snowfall (s)) + write(errmsg,'(*(a))') "The NOAH WRFv4 scheme has not been configured for restarts." + errflg = 1 + return + end if + + !GJF: check for rdlai != F? + !GJF: check for usemonalb != T? + + end subroutine sfc_noah_wrfv4_init + + +!! \section arg_table_sfc_noah_wrfv4_finalize Argument Table +!! \htmlinclude sfc_noah_wrfv4_finalize.html +!! + subroutine sfc_noah_wrfv4_finalize(errmsg, errflg) + + implicit none + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + end subroutine sfc_noah_wrfv4_finalize + + +!> \defgroup NOAH_LSM_WRFv4 Noah LSM Model from WRF v4.0 +!! \section arg_table_sfc_noah_wrfv4_run Argument Table +!! \htmlinclude sfc_noah_wrfv4_run.html +!! +!> \section general_noah_wrfv4_drv NOAH LSM WRFv4 General Algorithm +!> @{ + subroutine sfc_noah_wrfv4_run (im, isice, flag_lsm, flag_lsm_glacier, srflag, isurban, rdlai, & + ua_phys, usemonalb, aoasis, fasdas, dt, zlvl, & + nsoil, sthick, lwdn, soldn, solnet, sfcprs, prcp, sfctmp, q1k, & + th1, qs1, dqsdt2, vegtyp, soiltyp, slopetyp, shdfac, shmin, & + shmax, albbrd, snoalb, tbot, z0brd, z0k, emissi, embrd, cmc, t1,& + stc, smc, swc, snowhk, sneqv, chk, cp, rd, sigma, cph2o, cpice, & + lsubf, sheat, eta, ec, edir, ett, esnow, etp, ssoil, & + flx1, flx2, flx3, sncovr, runoff1, runoff2, soilm, qsurf, ribb, & + smcwlt, smcref, smcmax, opt_thcnd, snotime, errmsg, errflg) + + use machine , only : kind_phys + use module_sf_noahlsm, only: sflx, lutype, sltype + use module_sf_noahlsm_glacial_only, only: sflx_glacial + + implicit none + + integer, intent(in) :: im, isice, isurban, nsoil, opt_thcnd, fasdas + logical, intent(in) :: rdlai, ua_phys, usemonalb + !GJF: usemonalb = True if the surface diffused shortwave albedo is EITHER read from input OR + ! provided by a previous scheme (like radiation: as is done in GFS_rrtmgp_sw_pre) + real(kind=kind_phys), intent(in) :: aoasis + + real(kind=kind_phys), intent(in) :: dt, cp, rd, sigma, cph2o, cpice, lsubf + + integer, dimension(im), intent(in) :: vegtyp, soiltyp, slopetyp + logical, dimension(im), intent(in) :: flag_lsm, flag_lsm_glacier + real(kind=kind_phys), dimension(im), intent(in) :: srflag, zlvl, lwdn, soldn, solnet, & + sfcprs, prcp, sfctmp, q1k, th1, qs1, & + dqsdt2, shmin, shmax, snoalb, tbot + real(kind=kind_phys), dimension(nsoil), intent(in) :: sthick + + real(kind=kind_phys), dimension(im), intent(inout) :: shdfac, albbrd, z0brd, z0k, emissi, & + cmc, t1, snowhk, sneqv, chk, flx1, & + flx2, flx3, ribb, snotime + real(kind=kind_phys), dimension(im,nsoil), intent(inout) :: stc, smc, swc + + !variables that are intent(out) in module_sf_noahlsm, but are inout here due to being set within an IF statement + real(kind=kind_phys), dimension(im), intent(inout) :: embrd, sheat, eta, ec, & + edir, ett, esnow, etp, ssoil, sncovr, & + runoff1, runoff2, soilm, qsurf, smcwlt, & + smcref, smcmax + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + !GJF: There is some confusion regarding specific humidities vs mixing ratios in NOAH LSM. + ! Looking at module_sf_noahlsm.F, sometimes the comments say mixing ratio and sometimes + ! specific humidity. The WRF code (module_sf_noahdrv.F) specifically converts from mixing + ! ratio to specific humidity in preparation for calling SFLX, so I am assuming that + ! all inputs/outputs into SFLX should be specific humidities, despite some comments in + ! module_sf_noahdrv.F describing arguments saying "mixing ratios". This applies to many + ! arguments into SFLX (q1k, qs1, dqsdt2, eta, qsurf, etc.). + +! local Variables + integer :: i, k + logical, parameter :: local = .false. !(not actually used in SFLX) described in module_sf_noahlsm as: + ! Flag for local-site simulation (where there is no maps for albedo, veg fraction, and roughness + ! true: all LSM parameters (inluding albedo, veg fraction and roughness length) will be defined by three tables + + real(kind=kind_phys) :: dummy + + !GJF: The following variables are part of the interface to SFLX but not required as diagnostic + ! output or otherwise outside of this subroutine (at least as part of a GFS-based suite). + ! If any of these variables are needed by other schemes or diagnostics, one needs to add it to + ! the host model and CCPP metadata. Alternatively, none of these variables NEED to be allocated + ! and one could also just pass in dummy arguments. + ! + ! The variables descriptions are from module_sf_noahlsm.F: + ! + ! albedok (output from SFLX): surface albedo including snow effect (unitless fraction) + ! =snow-free albedo (alb) when sneqv=0, or + ! =fct(msnoalb,alb,vegtyp,shdfac,shdmin) when sneqv>0 + ! eta_kinematic (output from SFLX), eta is what is passed out instead of eta_kinematic + ! fdown (output from SFLX) : Radiation forcing at the surface (W m-2) = SOLDN*(1-alb)+LWDN + ! et (output from SFLX): plant transpiration from a particular root (soil) layer (W m-2) + ! drip (output from SFLX): through-fall of precip and/or dew in excess of canopy water-holding capacity (m) + ! dew (output from SFLX): dewfall (or frostfall for t<273.15) (m) + ! beta (output from SFLX): ratio of actual/potential evap (dimensionless) + ! snomlt (output from SFLX): snow melt (m) (water equivalent) + ! runoff3 (output from SFLX): numerical trunctation in excess of porosity (smcmax) for a given soil layer at the end of a time step (m s-1). + ! rc (output from SFLX): canopy resistance (s m-1) + ! pc (output from SFLX): plant coefficient (unitless fraction, 0-1) where pc*etp = actual transp + ! rsmin (output from SFLX): minimum canopy resistance (s m-1) + ! xlai (output from SFLX): leaf area index (dimensionless) + ! rcs (output from SFLX): incoming solar rc factor (dimensionless) + ! rct (output from SFLX): air temperature rc factor (dimensionless) + ! rcq (output from SFLX): atmos vapor pressure deficit rc factor (dimensionless) + ! rcsoil (output from SFLX): soil moisture rc factor (dimensionless) + ! soilw (output from SFLX): available soil moisture in root zone (unitless fraction between smcwlt and smcmax) + ! smav (output from SFLX): soil moisture availability for each layer, as a fraction between smcwlt and smcmax. + ! smcdry (output from SFLX): dry soil moisture threshold where direct evap frm top layer ends (volumetric) + ! smcmax (output from SFLX): porosity, i.e. saturated value of soil moisture (volumetric) + ! nroot (output from SFLX): number of root layers, a function of veg type, determined in subroutine redprm. + + integer :: nroot + real(kind=kind_phys) :: albedok, eta_kinematic, fdown, drip, dew, beta, snomlt, & + runoff3, rc, pc, rsmin, xlai, rcs, rct, rcq, & + rcsoil, soilw, smcdry + real (kind=kind_phys), dimension(nsoil) :: et, smav + real(kind=kind_phys) :: sfcheadrt, infxsrt, etpnd1 !don't appear to be used unless WRF_HYDRO preprocessor directive is defined and no documentation + real(kind=kind_phys) :: xsda_qfx, hfx_phy, qfx_phy, xqnorm, hcpct_fasdas !only used if fasdas = 1 + + !variables associated with UA_PHYS (not used for now) + real(kind=kind_phys) :: flx4, fvb, fbur, fgsn + + errmsg = '' + errflg = 0 + + do i=1, im + if (flag_lsm(i)) then + !GJF: Why do LSMs want the dynamics time step instead of the physics time step? + call sflx (i, 1, srflag(i), & + isurban, dt, zlvl(i), nsoil, sthick, & !c + local, & !L + lutype, sltype, & !CL + lwdn(i), soldn(i), solnet(i), sfcprs(i), prcp(i), & !F + sfctmp(i), q1k(i), dummy, dummy, dummy, dummy, & !F + th1(i), qs1(i), dqsdt2(i), & !I + vegtyp(i), soiltyp(i), slopetyp(i), shdfac(i), & !I + shmin(i), shmax(i), & !I + albbrd(i), snoalb(i), tbot(i), z0brd(i), z0k(i), & !S + emissi(i), embrd(i), & !S + cmc(i), t1(i), stc(i,:), smc(i,:), swc(i,:), & !H + snowhk(i), sneqv(i), albedok, chk(i), dummy, & !H + cp, rd, sigma, cph2o, cpice, lsubf, & + eta(i), sheat(i), eta_kinematic, fdown, & !O + ec(i), edir(i), et, ett(i), esnow(i), drip, dew, & !O + beta, etp(i), ssoil(i), flx1(i), flx2(i), flx3(i),& !O + flx4, fvb, fbur, fgsn, ua_phys, & !UA + snomlt, sncovr(i), runoff1(i), runoff2(i),runoff3,& !O + rc, pc, rsmin, xlai, rcs, rct, rcq, rcsoil, & !O + soilw, soilm(i), qsurf(i), smav, & !D + rdlai, usemonalb, snotime(i), ribb(i), & + smcwlt(i), smcdry, smcref(i), smcmax(i), nroot, & + sfcheadrt, infxsrt, etpnd1, opt_thcnd, aoasis, & + xsda_qfx, hfx_phy, qfx_phy, xqnorm, fasdas, & !fasdas + hcpct_fasdas, & !fasdas + errflg, errmsg) + if (errflg > 0) return + else if (flag_lsm_glacier(i)) then + !set values that sflx updates, but sflx_glacial does not + soilm(i) = 0.0 + runoff2(i) = 0.0 + swc(i,:) = 1.0 + smc(i,:) = 1.0 + + call sflx_glacial (i, 1, isice, srflag(i), dt, zlvl(i), & + nsoil, sthick, lwdn(i), solnet(i), sfcprs(i), & + prcp(i), sfctmp(i), q1k(i), th1(i), qs1(i), & + dqsdt2(i), albbrd(i), snoalb(i), tbot(i), & + z0brd(i), z0k(i), emissi(i), embrd(i), t1(i), & + stc(i,:), snowhk(i), sneqv(i), albedok, chk(i), & + cp, rd, sigma, cph2o, cpice, lsubf, & + eta(i), sheat(i), eta_kinematic, fdown, esnow(i), & + dew, etp(i), ssoil(i), flx1(i), flx2(i), flx3(i), & + snomlt, sncovr(i), runoff1(i), qsurf(i), & + snotime(i), ribb(i), errflg, errmsg) + if (errflg > 0) return + end if + end do + + end subroutine sfc_noah_wrfv4_run +!> @} + +end module sfc_noah_wrfv4 diff --git a/physics/sfc_noah_wrfv4.meta b/physics/sfc_noah_wrfv4.meta new file mode 100644 index 000000000..781a21d3b --- /dev/null +++ b/physics/sfc_noah_wrfv4.meta @@ -0,0 +1,764 @@ +[ccpp-arg-table] + name = sfc_noah_wrfv4_init + type = scheme +[lsm] + standard_name = flag_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noah_wrfv4] + standard_name = flag_for_noah_wrfv4_land_surface_scheme + long_name = flag for NOAH WRFv4 land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[nsoil] + standard_name = soil_vertical_dimension + long_name = soil vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[ua_phys] + standard_name = flag_for_noah_lsm_ua_extension + long_name = flag for using University of Arizona(?) extension for NOAH LSM (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fasdas] + standard_name = flag_flux_adjusting_surface_data_assimilation_system + long_name = flag to use the flux adjusting surface data assimilation system for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = integer + intent = in + optional = F +[restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = sfc_noah_wrfv4_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = sfc_noah_wrfv4_run + type = scheme +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[isice] + standard_name = ice_vegetation_category + long_name = index of the permanent snow/ice category in the chosen vegetation dataset + units = index + dimensions = () + type = integer + intent = in + optional = F +[flag_lsm] + standard_name = flag_for_calling_land_surface_model + long_name = flag for calling land surface model + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[flag_lsm_glacier] + standard_name = flag_for_calling_land_surface_model_glacier + long_name = flag for calling land surface model over glacier + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[srflag] + standard_name = flag_for_precipitation_type + long_name = flag for snow or rain precipitation + units = flag + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[isurban] + standard_name = urban_vegetation_category + long_name = index of the urban vegetation category in the chosen vegetation dataset + units = index + dimensions = () + type = integer + intent = in + optional = F +[rdlai] + standard_name = flag_for_reading_leaf_area_index_from_input + long_name = flag for reading leaf area index from initial conditions + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ua_phys] + standard_name = flag_for_noah_lsm_ua_extension + long_name = flag for using University of Arizona(?) extension for NOAH LSM (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[usemonalb] + standard_name = flag_for_reading_surface_diffused_shortwave_albedo_from_input + long_name = flag for reading surface diffused shortwave albedo for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[aoasis] + standard_name = potential_evaporation_multiplicative_factor + long_name = potential evaporation multiplicative factor for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fasdas] + standard_name = flag_flux_adjusting_surface_data_assimilation_system + long_name = flag to use the flux adjusting surface data assimilation system for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = integer + intent = in + optional = F +[dt] + standard_name = time_step_for_dynamics + long_name = dynamics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[zlvl] + standard_name = height_above_ground_at_lowest_model_layer + long_name = height above ground at 1st model layer + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[nsoil] + standard_name = soil_vertical_dimension + long_name = soil vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[sthick] + standard_name = soil_layer_thickness + long_name = soil layer thickness + units = m + dimensions = (soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lwdn] + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_land + long_name = total sky surface downward longwave flux absorbed by the ground over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[soldn] + standard_name = surface_downwelling_shortwave_flux + long_name = total sky surface downward shortwave flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[solnet] + standard_name = surface_net_downwelling_shortwave_flux + long_name = total sky surface net shortwave flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sfcprs] + standard_name = air_pressure_at_lowest_model_layer + long_name = Model layer 1 mean pressure + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[prcp] + standard_name = total_precipitation_rate_on_dynamics_timestep_over_land + long_name = total precipitation rate in each time step over land + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sfctmp] + standard_name = air_temperature_at_lowest_model_layer + long_name = 1st model layer air temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[q1k] + standard_name = bounded_specific_humidity_at_lowest_model_layer_over_land + long_name = specific humidity at lowest model layer over land bounded between a nonzero epsilon and saturation + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[th1] + standard_name = potential_temperature_at_lowest_model_layer + long_name = potential_temperature_at_lowest_model_layer + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[qs1] + standard_name = saturation_specific_humidity_at_lowest_model_layer + long_name = saturation specific humidity at lowest model layer + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[dqsdt2] + standard_name = saturation_specific_humidity_slope + long_name = saturation specific humidity slope at lowest model layer + units = K-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[vegtyp] + standard_name = vegetation_type_classification + long_name = vegetation type at each grid cell + units = index + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[soiltyp] + standard_name = soil_type_classification + long_name = soil type at each grid cell + units = index + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[slopetyp] + standard_name = surface_slope_classification + long_name = surface slope type at each grid cell + units = index + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[shdfac] + standard_name = bounded_vegetation_area_fraction + long_name = areal fractional cover of green vegetation bounded on the bottom + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[shmin] + standard_name = minimum_vegetation_area_fraction + long_name = min fractional coverage of green vegetation + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[shmax] + standard_name = maximum_vegetation_area_fraction + long_name = max fractional coverage of green vegetation + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[albbrd] + standard_name = surface_diffused_shortwave_albedo + long_name = mean surface diffused shortwave albedo + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snoalb] + standard_name = upper_bound_on_max_albedo_over_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tbot] + standard_name = deep_soil_temperature + long_name = bottom soil temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[z0brd] + standard_name = baseline_surface_roughness_length + long_name = baseline surface roughness length for momentum in meter + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[z0k] + standard_name = surface_roughness_length_over_land_interstitial + long_name = surface roughness length over land (temporary use as interstitial) + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[emissi] + standard_name = surface_longwave_emissivity_over_land_interstitial + long_name = surface lw emissivity in fraction over land (temporary use as interstitial) + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[embrd] + standard_name = baseline_surface_longwave_emissivity + long_name = baseline surface lw emissivity in fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cmc] + standard_name = canopy_water_amount_in_m + long_name = canopy water amount in m + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[t1] + standard_name = surface_skin_temperature_after_iteration_over_land + long_name = surface skin temperature after iteration over land + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[smc] + standard_name = volume_fraction_of_soil_moisture + long_name = volumetric fraction of soil moisture + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[swc] + standard_name = volume_fraction_of_unfrozen_soil_moisture + long_name = volume fraction of unfrozen soil moisture + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[snowhk] + standard_name = actual_snow_depth + long_name = actual snow depth + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[sneqv] + standard_name = water_equivalent_accumulated_snow_depth_over_land + long_name = water equiv of acc snow depth over land + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[chk] + standard_name = surface_conductance_for_heat_and_moisture_in_air_over_land + long_name = surface conductance for heat & moisture over land + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[sigma] + standard_name = stefan_boltzmann_constant + long_name = Steffan-Boltzmann constant + units = W m-2 K-4 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[cph2o] + standard_name = specific_heat_of_liquid_water_at_constant_pressure + long_name = specific heat of liquid water at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[cpice] + standard_name = specific_heat_of_ice_at_constant_pressure + long_name = specific heat of ice at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[lsubf] + standard_name = latent_heat_of_fusion_of_water_at_0C + long_name = latent heat of fusion + units = J kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[sheat] + standard_name = instantaneous_surface_upward_sensible_heat_flux + long_name = surface upward sensible heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[eta] + standard_name = instantaneous_surface_upward_latent_heat_flux + long_name = surface upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ec] + standard_name = canopy_upward_latent_heat_flux + long_name = canopy upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[edir] + standard_name = soil_upward_latent_heat_flux + long_name = soil upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ett] + standard_name = transpiration_flux + long_name = total plant transpiration rate + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[esnow] + standard_name = snow_deposition_sublimation_upward_latent_heat_flux + long_name = latent heat flux from snow depo/subl + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[etp] + standard_name = surface_upward_potential_latent_heat_flux_over_land + long_name = surface upward potential latent heat flux over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ssoil] + standard_name = upward_heat_flux_in_soil_over_land + long_name = soil heat flux over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[flx1] + standard_name = latent_heat_flux_from_precipitating_snow + long_name = latent heat flux due to precipitating snow + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[flx2] + standard_name = latent_heat_flux_from_freezing_rain + long_name = latent heat flux due to freezing rain + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[flx3] + standard_name = latent_heat_flux_due_to_snowmelt + long_name = latent heat flux due to snowmelt phase change + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[runoff1] + standard_name = surface_runoff_flux_in_m_sm1 + long_name = surface runoff flux in m s-1 + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[runoff2] + standard_name = subsurface_runoff_flux_in_m_sm1 + long_name = subsurface runoff flux in m s-1 + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[soilm] + standard_name = soil_moisture_content_in_m + long_name = soil moisture in meters + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[qsurf] + standard_name = surface_specific_humidity_over_land + long_name = surface air saturation specific humidity over land + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ribb] + standard_name = bulk_richardson_number_at_lowest_model_level_over_land + long_name = bulk Richardson number at the surface over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[smcwlt] + standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point + long_name = soil water fraction at wilting point + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[smcref] + standard_name = threshold_volume_fraction_of_condensed_water_in_soil + long_name = soil moisture threshold + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[smcmax] + standard_name = soil_porosity + long_name = volumetric soil porosity + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[opt_thcnd] + standard_name = flag_for_thermal_conductivity_option + long_name = choice for thermal conductivity option (see module_sf_noahlsm) + units = index + dimensions = () + type = integer + intent = in + optional = F +[snotime] + standard_name = time_since_last_snowfall + long_name = elapsed time since last snowfall + units = s + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/sfc_noah_wrfv4_interstitial.F90 b/physics/sfc_noah_wrfv4_interstitial.F90 new file mode 100644 index 000000000..b30f8a131 --- /dev/null +++ b/physics/sfc_noah_wrfv4_interstitial.F90 @@ -0,0 +1,758 @@ +!> \file sfc_noah_wrfv4_interstitial.F90 +!! This file contains data preparation for the WRFv4 version of Noah LSM as part of a GFS-based suite. + +!> This module contains the CCPP-compliant data preparation for the WRFv4 version of Noah LSM. + module sfc_noah_wrfv4_pre + + implicit none + + public :: sfc_noah_wrfv4_pre_init, sfc_noah_wrfv4_pre_run, sfc_noah_wrfv4_pre_finalize + + private + + logical :: is_initialized = .false. + + contains + +!> \ingroup NOAH_LSM_WRFv4 +!! \section arg_table_sfc_noah_wrfv4_pre_init Argument Table +!! \htmlinclude sfc_noah_wrfv4_pre_init.html +!! + subroutine sfc_noah_wrfv4_pre_init(lsm, lsm_noah_wrfv4, veg_data_choice, & + soil_data_choice, isurban, isice, iswater, errmsg, errflg) + + use machine, only : kind_phys + + implicit none + + integer, intent(in) :: lsm, lsm_noah_wrfv4, & + veg_data_choice, soil_data_choice + + integer, intent(inout) :: isurban, isice, iswater + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + + character(len=256) :: mminlu, mminsl + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (is_initialized) return + + if (lsm/=lsm_noah_wrfv4) then + write(errmsg,'(*(a))') "Logic error: namelist choice of LSM is different from NOAH WRFv4" + errflg = 1 + return + end if + + select case (veg_data_choice) + case (0) + mminlu = 'USGS' + isurban = 1 + isice = 24 + iswater = 16 + case (1) + mminlu = 'MODIFIED_IGBP_MODIS_NOAH' + isurban = 13 + isice = 15 + iswater = 17 + case (3) + mminlu = 'NLCD40' + isurban = 13 + isice = 15 !or 22? + iswater = 17 !or 21? + case (4) + mminlu = 'USGS-RUC' + isurban = 1 + isice = 24 + iswater = 16 + case (5) + mminlu = 'MODI-RUC' + isurban = 13 + isice = 15 + iswater = 17 + case default + errmsg = 'The value of the ivegsrc physics namelist parameter is incompatible with this version of NOAH LSM' + errflg = 1 + return + end select + + select case (soil_data_choice) + case (1) + mminsl = 'STAS' + case (2) + mminsl = 'STAS-RUC' + case default + errmsg = 'The value of the isot physics namelist parameter is incompatible with this version of NOAH LSM' + errflg = 1 + return + end select + + call soil_veg_gen_parm(trim(mminlu), trim(mminsl), errmsg, errflg) + + is_initialized = .true. + + end subroutine sfc_noah_wrfv4_pre_init + + +!! \section arg_table_sfc_noah_wrfv4_pre_finalize Argument Table +!! \htmlinclude sfc_noah_wrfv4_pre_finalize.html +!! + subroutine sfc_noah_wrfv4_pre_finalize(errmsg, errflg) + + implicit none + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + end subroutine sfc_noah_wrfv4_pre_finalize + + +!> \ingroup NOAH_LSM_WRFv4 Noah LSM from WRFv4 pre-scheme data preparation +!! \section arg_table_sfc_noah_wrfv4_pre_run Argument Table +!! \htmlinclude sfc_noah_wrfv4_pre_run.html +!! +!> \section general_noah_wrfv4_pre NOAH LSM WRFv4 pre-scheme data preparation General Algorithm +!> @{ + subroutine sfc_noah_wrfv4_pre_run (im, nsoil, ialb, isice, land, & + flag_guess, flag_iter, restart, first_time_step, flag_lsm, & + flag_lsm_glacier, dt, rhowater, rd, rvrdm1, eps, epsm1, sfcprs, tprcp, & + sfctmp, q1, prslki, wind, snwdph, cm, ch, weasd, tsfc, vtype, smc, & + stc, slc, snoalb, prcp, q2k, rho1, qs1, th1, dqsdt2, canopy, cmc, & + snowhk, chk, cmm, chh, weasd_save, snwdph_save, tsfc_save, canopy_save,& + smc_save, stc_save, slc_save, ep, evap, hflx, gflux, drain, evbs, evcw,& + trans, sbsno, snowc, snohf, sthick, errmsg, errflg) + + use machine , only : kind_phys + use funcphys, only : fpvs + use module_sf_noahlsm, only: maxalb + + implicit none + + !GJF: Data preparation and output preparation from SFLX follows the GFS physics code (sfc_drv.F) + ! rather than the WRF code (module_sf_noahdrv.F) in order to "fit in" with other GFS physics-based + ! suites. Another version of this scheme (and the associated post) could potentially be + ! created from the WRF version. No attempt was made to test sensitivities to either approach. + ! Note that the version of NOAH LSM expected here is "generic" - there are no urban, fasdas, or + ! or University of Arizona(?) additions. + + integer, intent(in) :: im, nsoil, ialb, isice + logical, intent(in) :: restart, first_time_step + real(kind=kind_phys), intent(in) :: dt, rhowater, rd, rvrdm1, eps, epsm1 + + logical, dimension(im), intent(in) :: flag_guess, flag_iter, land + real(kind=kind_phys), dimension(im), intent(in) :: sfcprs, tprcp, sfctmp, q1, prslki, wind, cm, ch, snwdph + real(kind=kind_phys), dimension(im), intent(in) :: weasd, tsfc, vtype + real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smc, stc, slc + + logical, dimension(im), intent(inout) :: flag_lsm, flag_lsm_glacier + real(kind=kind_phys), dimension(im), intent(inout) :: snoalb, prcp, q2k, rho1, qs1, th1, dqsdt2, canopy, cmc, snowhk, chk, cmm, chh + real(kind=kind_phys), dimension(im), intent(inout) :: weasd_save, snwdph_save, tsfc_save, canopy_save + real(kind=kind_phys), dimension(im,nsoil), intent(inout) :: smc_save, stc_save, slc_save + real(kind=kind_phys), dimension(im), intent(inout) :: ep, evap, hflx, gflux, drain, evbs, evcw, trans, sbsno, snowc, snohf + real(kind=kind_phys), dimension(nsoil), intent(inout) :: sthick + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +! local Variables + integer :: i, k + real(kind=kind_phys) :: sneqv + + REAL, PARAMETER :: A2=17.67,A3=273.15,A4=29.65, & + A23M4=A2*(A3-A4) + real(kind=kind_phys), parameter, dimension(4) :: zsoil = (/ -0.1,-0.4,-1.0,-2.0/) !what if nsoil /= 4? + +!> - Initialize CCPP error handling variables + + errmsg = '' + errflg = 0 + + !from module_sf_noahdrv.F/lsminit + if (.not. restart .and. first_time_step .and. ialb == 0) then + do i = 1, im + snoalb(i) = maxalb(int(0.5 + vtype(i)))*0.01 + end do + end if + + do i=1, im + if (land(i) .and. flag_guess(i)) then + weasd_save(i) = weasd(i) + snwdph_save(i) = snwdph(i) + tsfc_save(i) = tsfc(i) + canopy_save(i) = canopy(i) + + do k=1,nsoil + smc_save(i,k) = smc(i,k) + stc_save(i,k) = stc(i,k) + slc_save(i,k) = slc(i,k) + end do + end if + end do + + sthick(1) = - zsoil(1) + do k = 2, nsoil + sthick(k) = zsoil(k-1) - zsoil(k) + enddo + + flag_lsm(:) = .false. + flag_lsm_glacier(:) = .false. + do i=1, im + if (flag_iter(i) .and. land(i)) then + if (vtype(i) == isice) then + flag_lsm_glacier(i) = .true. + else + flag_lsm(i) = .true. + end if + !GJF: module_sf_noahdrv.F from WRF has hardcoded slopetyp = 1; why? replicate here? + !GJF: shdfac is zeroed out for particular combinations of vegetation table source and vegetation types; replicate here? + + ep(i) = 0.0 + evap (i) = 0.0 + hflx (i) = 0.0 + gflux(i) = 0.0 + drain(i) = 0.0 + + evbs (i) = 0.0 + evcw (i) = 0.0 + trans(i) = 0.0 + sbsno(i) = 0.0 + snowc(i) = 0.0 + snohf(i) = 0.0 + + !GJF: could potentially pass in pre-calculated rates instead of calculating here + prcp(i) = rhowater * tprcp(i) / dt + + !GJF: The GFS version of NOAH prepares the specific humidity in sfc_drv.f as follows: + q2k(i) = max(q1(i), 1.e-8) + rho1(i) = sfcprs(i) / (rd*sfctmp(i)*(1.0+rvrdm1*q2k(i))) + + qs1(i) = fpvs( sfctmp(i) ) + qs1(i) = max(eps*qs1(i) / (sfcprs(i)+epsm1*qs1(i)), 1.e-8) + q2k(i) = min(qs1(i), q2k(i)) + + !GJF: could potentially pass in pre-calcualted potential temperature if other schemes also need it (to avoid redundant calculation) + th1(i) = sfctmp(i) * prslki(i) + + !GJF: module_sf_noahdrv.F from WRF modifies dqsdt2 if the surface has snow. + dqsdt2(i)=qs1(i)*a23m4/(sfctmp(i)-a4)**2 + + !GJF: convert canopy moisture from kg m-2 to m + canopy(i) = max(canopy(i), 0.0) !check for positive values in sfc_drv.f + cmc(i) = canopy(i)/rhowater + + !GJF: snow depth passed in to NOAH is conditionally modified differently in GFS and WRF: + sneqv = weasd(i) * 0.001 + snowhk(i) = snwdph(i) * 0.001 + if ( (sneqv /= 0.0 .and. snowhk(i) == 0.) .or. (snowhk(i) <= sneqv) ) then + snowhk(i) = 5.*sneqv + end if + !GJF: GFS version: + ! if (sneqv(i) /= 0.0 .and. snwdph(i) == 0.0) then + ! snowhk(i) = 10.0 * sneqv(i) + ! endif + + !GJF: calculate conductance from surface exchange coefficient + chk(i) = ch(i) * wind(i) + + chh(i) = chk(i) * rho1(i) + cmm(i) = cm(i) * wind(i) + + +!GJF: If the perturbations of vegetation fraction is desired, one could uncomment this code +! and add appropriate arguments to make this work. This is from the GFS version of NOAH LSM +! in sfc_drv.f. + +!> - Call surface_perturbation::ppfbet() to perturb vegetation fraction that goes into gsflx(). +! perturb vegetation fraction that goes into sflx, use the same +! perturbation strategy as for albedo (percentile matching) +!! Following Gehne et al. (2018) \cite gehne_et_al_2018, a perturbation of vegetation +!! fraction is added to account for the uncertainty. A percentile matching technique +!! is applied to guarantee the perturbed vegetation fraction is bounded between 0 and +!! 1. The standard deviation of the perturbations is 0.25 for vegetation fraction of +!! 0.5 and the perturbations go to zero as vegetation fraction approaches its upper +!! or lower bound. + ! vegfp = vegfpert(i) ! sfc-perts, mgehne + ! if (pertvegf(1)>0.0) then + ! ! compute beta distribution parameters for vegetation fraction + ! mv = shdfac + ! sv = pertvegf(1)*mv*(1.-mv) + ! alphav = mv*mv*(1.0-mv)/(sv*sv)-mv + ! betav = alphav*(1.0-mv)/mv + ! ! compute beta distribution value corresponding + ! ! to the given percentile albPpert to use as new albedo + ! call ppfbet(vegfp,alphav,betav,iflag,vegftmp) + ! shdfac = vegftmp + ! endif +! *** sfc-perts, mgehne + endif + end do + + + end subroutine sfc_noah_wrfv4_pre_run + + subroutine soil_veg_gen_parm( mminlu, mminsl, errmsg, errflg) + !this routine is mostly taken from module_sf_noahdrv.F in WRF + use module_sf_noahlsm, only: shdtbl, nrotbl, rstbl, rgltbl, hstbl, snuptbl, & ! begin land use / vegetation variables + maxalb, laimintbl, laimaxtbl, z0mintbl, z0maxtbl, & + albedomintbl, albedomaxtbl, ztopvtbl,zbotvtbl, & + emissmintbl, emissmaxtbl, topt_data, cmcmax_data, & + cfactr_data, rsmax_data, bare, natural, & + low_density_residential, high_density_residential, & + high_intensity_industrial, lucats, lutype, & !end land use / vegetation variables + bb,drysmc,f11, & ! begin soil variables + maxsmc, refsmc,satpsi,satdk,satdw, wltsmc,qtz,& + slcats, sltype, & ! end soil variables + slope_data, sbeta_data,fxexp_data,csoil_data,salp_data,refdk_data, & ! begin NOAH "general" variables + refkdt_data,frzk_data,zbot_data, smlow_data,smhigh_data, & + czil_data, lvcoef_data, slpcats ! end NOAH "general" variables + implicit none + + character(len=*), intent(in) :: mminlu, mminsl + character(len=*), intent(inout) :: errmsg + integer, intent(inout) :: errflg + + integer :: lumatch, iindex, lc, num_slope, iunit_noah + integer :: ierr + integer , parameter :: open_ok = 0 + logical :: opened + + character*128 :: mess , message + character*256 :: a_string + integer , parameter :: loop_max = 10 + integer :: loop_count, i + +!-----SPECIFY VEGETATION RELATED CHARACTERISTICS : +! ALBBCK: SFC albedo (in percentage) +! Z0: Roughness length (m) +! SHDFAC: Green vegetation fraction (in percentage) +! Note: The ALBEDO, Z0, and SHDFAC values read from the following table +! ALBEDO, amd Z0 are specified in LAND-USE TABLE; and SHDFAC is +! the monthly green vegetation data +! CMXTBL: MAX CNPY Capacity (m) +! NROTBL: Rooting depth (layer) +! RSMIN: Mimimum stomatal resistance (s m-1) +! RSMAX: Max. stomatal resistance (s m-1) +! RGL: Parameters used in radiation stress function +! HS: Parameter used in vapor pressure deficit functio +! TOPT: Optimum transpiration air temperature. (K) +! CMCMAX: Maximum canopy water capacity +! CFACTR: Parameter used in the canopy inteception calculati +! SNUP: Threshold snow depth (in water equivalent m) that +! implies 100% snow cover +! LAI: Leaf area index (dimensionless) +! MAXALB: Upper bound on maximum albedo over deep snow +! +!-----READ IN VEGETAION PROPERTIES FROM VEGPARM.TBL +! + iunit_noah = -1 + do i = 20,99 + inquire ( i , opened = opened ) + if ( .not. opened ) then + iunit_noah = i + exit + endif + enddo + + if ( iunit_noah < 0 ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: '// & + 'can not find unused fortran unit to read.' + return + endif + + open(iunit_noah, file='VEGPARM.TBL',form='formatted',status='old',iostat=ierr) + if(ierr .ne. open_ok ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: failure opening VEGPARM.TBL' + return + end if + + lumatch=0 + + loop_count = 0 + read (iunit_noah,fmt='(a)',end=2002) a_string + find_lutype : do while (lumatch == 0) + read (iunit_noah,*,end=2002)lutype + read (iunit_noah,*)lucats,iindex + if(lutype.eq.mminlu)then + !write( mess , * ) 'landuse type = ' // trim ( lutype ) // ' found', lucats,' categories' + !call wrf_message( mess ) + lumatch=1 + else + loop_count = loop_count+1 + !call wrf_message ( "skipping over lutype = " // trim ( lutype ) ) + find_vegetation_parameter_flag : do + read (iunit_noah,fmt='(a)', end=2002) a_string + if ( a_string(1:21) .eq. 'Vegetation Parameters' ) then + exit find_vegetation_parameter_flag + else if ( loop_count .ge. loop_max ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: too many loops in VEGPARM.TBL' + return + endif + enddo find_vegetation_parameter_flag + endif + enddo find_lutype + +! prevent possible array overwrite, Bill Bovermann, IBM, May 6, 2008 + if ( size(shdtbl) < lucats .or. & + size(nrotbl) < lucats .or. & + size(rstbl) < lucats .or. & + size(rgltbl) < lucats .or. & + size(hstbl) < lucats .or. & + size(snuptbl) < lucats .or. & + size(maxalb) < lucats .or. & + size(laimintbl) < lucats .or. & + size(laimaxtbl) < lucats .or. & + size(z0mintbl) < lucats .or. & + size(z0maxtbl) < lucats .or. & + size(albedomintbl) < lucats .or. & + size(albedomaxtbl) < lucats .or. & + size(ztopvtbl) < lucats .or. & + size(zbotvtbl) < lucats .or. & + size(emissmintbl ) < lucats .or. & + size(emissmaxtbl ) < lucats ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: table sizes too small for value of lucats' + return + endif + + if(lutype.eq.mminlu)then + do lc=1,lucats + read (iunit_noah,*)iindex,shdtbl(lc), & + nrotbl(lc),rstbl(lc),rgltbl(lc),hstbl(lc), & + snuptbl(lc),maxalb(lc), laimintbl(lc), & + laimaxtbl(lc),emissmintbl(lc), & + emissmaxtbl(lc), albedomintbl(lc), & + albedomaxtbl(lc), z0mintbl(lc), z0maxtbl(lc),& + ztopvtbl(lc), zbotvtbl(lc) + enddo + + read (iunit_noah,*) + read (iunit_noah,*)topt_data + read (iunit_noah,*) + read (iunit_noah,*)cmcmax_data + read (iunit_noah,*) + read (iunit_noah,*)cfactr_data + read (iunit_noah,*) + read (iunit_noah,*)rsmax_data + read (iunit_noah,*) + read (iunit_noah,*)bare + read (iunit_noah,*) + read (iunit_noah,*)natural + read (iunit_noah,*) + read (iunit_noah,*) + read (iunit_noah,fmt='(a)') a_string + if ( a_string(1:21) .eq. 'Vegetation Parameters' ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: expected low and high density residential, and high density industrial information in VEGPARM.TBL' + return + endif + read (iunit_noah,*)low_density_residential + read (iunit_noah,*) + read (iunit_noah,*)high_density_residential + read (iunit_noah,*) + read (iunit_noah,*)high_intensity_industrial + endif + +2002 continue + + close (iunit_noah) + if (lumatch == 0) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: land use dataset '//mminlu//' not found in VEGPARM.TBL.' + return + endif + + + !CALL wrf_dm_bcast_string ( LUTYPE , 4 ) + !CALL wrf_dm_bcast_integer ( LUCATS , 1 ) + !CALL wrf_dm_bcast_integer ( IINDEX , 1 ) + !CALL wrf_dm_bcast_integer ( LUMATCH , 1 ) + !CALL wrf_dm_bcast_real ( SHDTBL , NLUS ) + !CALL wrf_dm_bcast_real ( NROTBL , NLUS ) + !CALL wrf_dm_bcast_real ( RSTBL , NLUS ) + !CALL wrf_dm_bcast_real ( RGLTBL , NLUS ) + !CALL wrf_dm_bcast_real ( HSTBL , NLUS ) + !CALL wrf_dm_bcast_real ( SNUPTBL , NLUS ) + !CALL wrf_dm_bcast_real ( LAIMINTBL , NLUS ) + !CALL wrf_dm_bcast_real ( LAIMAXTBL , NLUS ) + !CALL wrf_dm_bcast_real ( Z0MINTBL , NLUS ) + !CALL wrf_dm_bcast_real ( Z0MAXTBL , NLUS ) + !CALL wrf_dm_bcast_real ( EMISSMINTBL , NLUS ) + !CALL wrf_dm_bcast_real ( EMISSMAXTBL , NLUS ) + !CALL wrf_dm_bcast_real ( ALBEDOMINTBL , NLUS ) + !CALL wrf_dm_bcast_real ( ALBEDOMAXTBL , NLUS ) + !CALL wrf_dm_bcast_real ( ZTOPVTBL , NLUS ) + !CALL wrf_dm_bcast_real ( ZBOTVTBL , NLUS ) + !CALL wrf_dm_bcast_real ( MAXALB , NLUS ) + !CALL wrf_dm_bcast_real ( TOPT_DATA , 1 ) + !CALL wrf_dm_bcast_real ( CMCMAX_DATA , 1 ) + !CALL wrf_dm_bcast_real ( CFACTR_DATA , 1 ) + !CALL wrf_dm_bcast_real ( RSMAX_DATA , 1 ) + !CALL wrf_dm_bcast_integer ( BARE , 1 ) + !CALL wrf_dm_bcast_integer ( NATURAL , 1 ) + !CALL wrf_dm_bcast_integer ( LOW_DENSITY_RESIDENTIAL , 1 ) + !CALL wrf_dm_bcast_integer ( HIGH_DENSITY_RESIDENTIAL , 1 ) + !CALL wrf_dm_bcast_integer ( HIGH_INTENSITY_INDUSTRIAL , 1 ) + +! +!-----READ IN SOIL PROPERTIES FROM SOILPARM.TBL +! + + open(iunit_noah, file='SOILPARM.TBL',form='formatted',status='old',iostat=ierr) + if(ierr .ne. open_ok ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: failure opening SOILPARM.TBL' + return + end if + + !write(mess,*) 'input soil texture classification = ', trim ( mminsl ) + !call wrf_message( mess ) + + lumatch=0 + + read (iunit_noah,*) + read (iunit_noah,2000,end=2003)sltype +2000 format (a4) + read (iunit_noah,*)slcats,iindex + if(sltype.eq.mminsl)then + !write( mess , * ) 'soil texture classification = ', trim ( sltype ) , ' found', & + ! slcats,' categories' + !call wrf_message ( mess ) + lumatch=1 + endif +! prevent possible array overwrite, bill bovermann, ibm, may 6, 2008 + if ( size(bb ) < slcats .or. & + size(drysmc) < slcats .or. & + size(f11 ) < slcats .or. & + size(maxsmc) < slcats .or. & + size(refsmc) < slcats .or. & + size(satpsi) < slcats .or. & + size(satdk ) < slcats .or. & + size(satdw ) < slcats .or. & + size(wltsmc) < slcats .or. & + size(qtz ) < slcats ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: table sizes too small for value of slcats' + return + endif + if(sltype.eq.mminsl)then + do lc=1,slcats + read (iunit_noah,*) iindex,bb(lc),drysmc(lc),f11(lc),maxsmc(lc),& + refsmc(lc),satpsi(lc),satdk(lc), satdw(lc), & + wltsmc(lc), qtz(lc) + enddo + endif + +2003 continue + + close (iunit_noah) + + + ! CALL wrf_dm_bcast_integer ( LUMATCH , 1 ) + ! CALL wrf_dm_bcast_string ( SLTYPE , 4 ) + ! CALL wrf_dm_bcast_string ( MMINSL , 4 ) ! since this is reset above, see oct2 ^ + ! CALL wrf_dm_bcast_integer ( SLCATS , 1 ) + ! CALL wrf_dm_bcast_integer ( IINDEX , 1 ) + ! CALL wrf_dm_bcast_real ( BB , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( DRYSMC , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( F11 , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( MAXSMC , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( REFSMC , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( SATPSI , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( SATDK , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( SATDW , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( WLTSMC , NSLTYPE ) + ! CALL wrf_dm_bcast_real ( QTZ , NSLTYPE ) + + if(lumatch.eq.0)then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: soil texture dataset '//mminsl//' not found in SOILPARM.TBL.' + return + endif + +! +!-----READ IN GENERAL PARAMETERS FROM GENPARM.TBL +! + + open(iunit_noah, file='GENPARM.TBL',form='formatted',status='old',iostat=ierr) + if(ierr .ne. open_ok ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: failure opening GENPARM.TBL' + return + end if + + read (iunit_noah,*) + read (iunit_noah,*) + read (iunit_noah,*) num_slope + + slpcats=num_slope +! prevent possible array overwrite, bill bovermann, ibm, may 6, 2008 + if ( size(slope_data) < num_slope ) then + errflg = 1 + errmsg = 'sfc_noah_wrfv4_interstitial: set_soil_veg_parm: num_slope too large for slope_data array' + return + endif + + do lc=1,slpcats + read (iunit_noah,*)slope_data(lc) + enddo + + read (iunit_noah,*) + read (iunit_noah,*)sbeta_data + read (iunit_noah,*) + read (iunit_noah,*)fxexp_data + read (iunit_noah,*) + read (iunit_noah,*)csoil_data + read (iunit_noah,*) + read (iunit_noah,*)salp_data + read (iunit_noah,*) + read (iunit_noah,*)refdk_data + read (iunit_noah,*) + read (iunit_noah,*)refkdt_data + read (iunit_noah,*) + read (iunit_noah,*)frzk_data + read (iunit_noah,*) + read (iunit_noah,*)zbot_data + read (iunit_noah,*) + read (iunit_noah,*)czil_data + read (iunit_noah,*) + read (iunit_noah,*)smlow_data + read (iunit_noah,*) + read (iunit_noah,*)smhigh_data + read (iunit_noah,*) + read (iunit_noah,*)lvcoef_data + close (iunit_noah) + + + ! call wrf_dm_bcast_integer ( num_slope , 1 ) + ! call wrf_dm_bcast_integer ( slpcats , 1 ) + ! call wrf_dm_bcast_real ( slope_data , nslope ) + ! call wrf_dm_bcast_real ( sbeta_data , 1 ) + ! call wrf_dm_bcast_real ( fxexp_data , 1 ) + ! call wrf_dm_bcast_real ( csoil_data , 1 ) + ! call wrf_dm_bcast_real ( salp_data , 1 ) + ! call wrf_dm_bcast_real ( refdk_data , 1 ) + ! call wrf_dm_bcast_real ( refkdt_data , 1 ) + ! call wrf_dm_bcast_real ( frzk_data , 1 ) + ! call wrf_dm_bcast_real ( zbot_data , 1 ) + ! call wrf_dm_bcast_real ( czil_data , 1 ) + ! call wrf_dm_bcast_real ( smlow_data , 1 ) + ! call wrf_dm_bcast_real ( smhigh_data , 1 ) + ! call wrf_dm_bcast_real ( lvcoef_data , 1 ) + + end subroutine soil_veg_gen_parm +!----------------------------- +!> @} + + end module sfc_noah_wrfv4_pre + + module sfc_noah_wrfv4_post + + implicit none + + private + + public :: sfc_noah_wrfv4_post_init, sfc_noah_wrfv4_post_run, sfc_noah_wrfv4_post_finalize + + contains + + subroutine sfc_noah_wrfv4_post_init () + end subroutine sfc_noah_wrfv4_post_init + + subroutine sfc_noah_wrfv4_post_finalize () + end subroutine sfc_noah_wrfv4_post_finalize + +!! \section arg_table_sfc_noah_wrfv4_post_run Argument Table +!! \htmlinclude sfc_noah_wrfv4_post_run.html +!! + subroutine sfc_noah_wrfv4_post_run (im, nsoil, land, flag_guess, flag_lsm, & + rhowater, cp, hvap, cmc, rho1, sheat, eta, flx1, flx2, flx3, sncovr, runoff1,& + runoff2, soilm, snowhk, weasd_save, snwdph_save, tsfc_save, tsurf, & + canopy_save, smc_save, stc_save, slc_save, smcmax, canopy, shflx, & + lhflx, snohf, snowc, runoff, drain, stm, weasd, snwdph, tsfc, smc, stc,& + slc, wet1, errmsg, errflg) + + use machine, only : kind_phys + + implicit none + + integer, intent(in) :: im, nsoil + logical, dimension(im), intent(in) :: land, flag_guess, flag_lsm + real(kind=kind_phys), intent(in) :: rhowater, cp, hvap + real(kind=kind_phys), dimension(im), intent(in) :: cmc, rho1, sheat, eta, & + flx1, flx2, flx3, sncovr, runoff1, runoff2, soilm, snowhk + real(kind=kind_phys), dimension(im), intent(in) :: weasd_save, snwdph_save, tsfc_save, tsurf, canopy_save, smcmax + real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smc_save, stc_save, slc_save + + real(kind=kind_phys), dimension(im), intent(inout) :: canopy, shflx, lhflx, & + snohf, snowc, runoff, drain, stm, wet1 + real(kind=kind_phys), dimension(im), intent(inout) :: weasd, snwdph, tsfc + real(kind=kind_phys), dimension(im, nsoil), intent(inout) :: smc, stc, slc + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + !local variables + integer :: i, k + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + do i=1, im + if (flag_lsm(i)) then + canopy(i) = cmc(i)*rhowater + snwdph(i) = 1000.0*snowhk(i) + + shflx(i) = sheat(i) / (cp*rho1(i)) + lhflx(i) = eta(i) / (hvap*rho1(i)) + + !aggregating several outputs into one like GFS sfc_drv.F + snohf(i) = flx1(i) + flx2(i) + flx3(i) + + snowc(i) = sncovr(i) !GJF: redundant? + + !convert from m s-1 to kg m-2 s-1 by multiplying by rhowater + runoff(i) = runoff1(i) * rhowater + drain(i) = runoff2(i) * rhowater + + stm(i) = soilm(i) * rhowater + + wet1(i) = smc(i,1) / smcmax(i) !Sarah Lu added 09/09/2010 (for GOCART) + end if + end do + + do i=1, im + if (land(i)) then + if (flag_guess(i)) then + weasd(i) = weasd_save(i) + snwdph(i) = snwdph_save(i) + tsfc(i) = tsfc_save(i) + canopy(i) = canopy_save(i) + + do k=1,nsoil + smc(i,k) = smc_save(i,k) + stc(i,k) = stc_save(i,k) + slc(i,k) = slc_save(i,k) + end do + + else + tsfc(i) = tsurf(i) + end if + end if + end do + + end subroutine sfc_noah_wrfv4_post_run + + end module sfc_noah_wrfv4_post diff --git a/physics/sfc_noah_wrfv4_interstitial.meta b/physics/sfc_noah_wrfv4_interstitial.meta new file mode 100644 index 000000000..e993780fd --- /dev/null +++ b/physics/sfc_noah_wrfv4_interstitial.meta @@ -0,0 +1,1098 @@ +[ccpp-arg-table] + name = sfc_noah_wrfv4_pre_init + type = scheme +[lsm] + standard_name = flag_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm_noah_wrfv4] + standard_name = flag_for_noah_wrfv4_land_surface_scheme + long_name = flag for NOAH WRFv4 land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[veg_data_choice] + standard_name = vegetation_type_dataset_choice + long_name = land use dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F +[soil_data_choice] + standard_name = soil_type_dataset_choice + long_name = soil type dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F +[isurban] + standard_name = urban_vegetation_category + long_name = index of the urban vegetation category in the chosen vegetation dataset + units = index + dimensions = () + type = integer + intent = inout + optional = F +[isice] + standard_name = ice_vegetation_category + long_name = index of the permanent snow/ice category in the chosen vegetation dataset + units = index + dimensions = () + type = integer + intent = inout + optional = F +[iswater] + standard_name = water_vegetation_category + long_name = index of the water body vegetation category in the chosen vegetation dataset + units = index + dimensions = () + type = integer + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = sfc_noah_wrfv4_pre_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = sfc_noah_wrfv4_pre_run + type = scheme +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[nsoil] + standard_name = soil_vertical_dimension + long_name = soil vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[ialb] + standard_name = flag_for_using_climatology_albedo + long_name = flag for using climatology alb, based on sfc type + units = flag + dimensions = () + type = integer + intent = in + optional = F +[isice] + standard_name = ice_vegetation_category + long_name = index of the permanent snow/ice category in the chosen vegetation dataset + units = index + dimensions = () + type = integer + intent = in + optional = F +[land] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[flag_guess] + standard_name = flag_for_guess_run + long_name = flag for guess run + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[flag_iter] + standard_name = flag_for_iteration + long_name = flag for iteration + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F +[first_time_step] + standard_name = flag_for_first_time_step + long_name = flag for first time step for time integration loop (cold/warmstart) + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_lsm] + standard_name = flag_for_calling_land_surface_model + long_name = flag for calling land surface model + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = inout + optional = F +[flag_lsm_glacier] + standard_name = flag_for_calling_land_surface_model_glacier + long_name = flag for calling land surface model over glacier + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = inout + optional = F +[dt] + standard_name = time_step_for_dynamics + long_name = dynamics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rhowater] + standard_name = liquid_water_density + long_name = density of liquid water + units = kg m-3 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rvrdm1] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[epsm1] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + long_name = (rd/rv) - 1 + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[sfcprs] + standard_name = air_pressure_at_lowest_model_layer + long_name = Model layer 1 mean pressure + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tprcp] + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land + long_name = total precipitation amount in each time step over land + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sfctmp] + standard_name = air_temperature_at_lowest_model_layer + long_name = 1st model layer air temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[q1] + standard_name = water_vapor_specific_humidity_at_lowest_model_layer + long_name = 1st model layer specific humidity + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[prslki] + standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + long_name = Exner function ratio bt midlayer and interface at 1st layer + units = ratio + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[wind] + standard_name = wind_speed_at_lowest_model_layer + long_name = wind speed at lowest model level + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[snwdph] + standard_name = surface_snow_thickness_water_equivalent_over_land + long_name = water equivalent snow depth over land + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[cm] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_land + long_name = surface exchange coeff for momentum over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[ch] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land + long_name = surface exchange coeff heat & moisture over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[weasd] + standard_name = water_equivalent_accumulated_snow_depth_over_land + long_name = water equiv of acc snow depth over land + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc] + standard_name = surface_skin_temperature_over_land_interstitial + long_name = surface skin temperature over land (temporary use as interstitial) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[vtype] + standard_name = vegetation_type_classification_real + long_name = vegetation type for lsm + units = index + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[smc] + standard_name = volume_fraction_of_soil_moisture + long_name = volumetric fraction of soil moisture + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slc] + standard_name = volume_fraction_of_unfrozen_soil_moisture + long_name = liquid soil moisture + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snoalb] + standard_name = upper_bound_on_max_albedo_over_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[prcp] + standard_name = total_precipitation_rate_on_dynamics_timestep_over_land + long_name = total precipitation rate in each time step over land + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[q2k] + standard_name = bounded_specific_humidity_at_lowest_model_layer_over_land + long_name = specific humidity at lowest model layer over land bounded between a nonzero epsilon and saturation + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[rho1] + standard_name = air_density_at_lowest_model_layer + long_name = air density at lowest model layer + units = kg m-3 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[qs1] + standard_name = saturation_specific_humidity_at_lowest_model_layer + long_name = saturation specific humidity at lowest model layer + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[th1] + standard_name = potential_temperature_at_lowest_model_layer + long_name = potential_temperature_at_lowest_model_layer + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[dqsdt2] + standard_name = saturation_specific_humidity_slope + long_name = saturation specific humidity slope at lowest model layer + units = K-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[canopy] + standard_name = canopy_water_amount + long_name = canopy moisture content + units = kg m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cmc] + standard_name = canopy_water_amount_in_m + long_name = canopy water amount in m + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snowhk] + standard_name = actual_snow_depth + long_name = actual snow depth + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[chk] + standard_name = surface_conductance_for_heat_and_moisture_in_air_over_land + long_name = surface conductance for heat & moisture over land + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[cmm] + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land + long_name = momentum exchange coefficient over land + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[chh] + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land + long_name = thermal exchange coefficient over land + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[weasd_save] + standard_name = water_equivalent_accumulated_snow_depth_over_land_save + long_name = water equiv of acc snow depth over land before entering a physics scheme + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snwdph_save] + standard_name = surface_snow_thickness_water_equivalent_over_land_save + long_name = water equivalent snow depth over land before entering a physics scheme + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tsfc_save] + standard_name = surface_skin_temperature_over_land_interstitial_save + long_name = surface skin temperature over land before entering a physics scheme (temporary use as interstitial) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[canopy_save] + standard_name = canopy_water_amount_save + long_name = canopy water amount before entering a physics scheme + units = kg m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[smc_save] + standard_name = volume_fraction_of_soil_moisture_save + long_name = total soil moisture before entering a physics scheme + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stc_save] + standard_name = soil_temperature_save + long_name = soil temperature before entering a physics scheme + units = K + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[slc_save] + standard_name = volume_fraction_of_unfrozen_soil_moisture_save + long_name = liquid soil moisture before entering a physics scheme + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ep] + standard_name = surface_upward_potential_latent_heat_flux_over_land + long_name = surface upward potential latent heat flux over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[evap] + standard_name = kinematic_surface_upward_latent_heat_flux_over_land + long_name = kinematic surface upward latent heat flux over land + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_land + long_name = kinematic surface upward sensible heat flux over land + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[gflux] + standard_name = upward_heat_flux_in_soil_over_land + long_name = soil heat flux over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[drain] + standard_name = subsurface_runoff_flux + long_name = subsurface runoff flux + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[evbs] + standard_name = soil_upward_latent_heat_flux + long_name = soil upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[evcw] + standard_name = canopy_upward_latent_heat_flux + long_name = canopy upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[trans] + standard_name = transpiration_flux + long_name = total plant transpiration rate + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[sbsno] + standard_name = snow_deposition_sublimation_upward_latent_heat_flux + long_name = latent heat flux from snow depo/subl + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snowc] + standard_name = surface_snow_area_fraction + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snohf] + standard_name = snow_freezing_rain_upward_latent_heat_flux + long_name = latent heat flux due to snow and frz rain + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[sthick] + standard_name = soil_layer_thickness + long_name = soil layer thickness + units = m + dimensions = (soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = sfc_noah_wrfv4_post_run + type = scheme +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[nsoil] + standard_name = soil_vertical_dimension + long_name = soil vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[land] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[flag_guess] + standard_name = flag_for_guess_run + long_name = flag for guess run + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[flag_lsm] + standard_name = flag_for_calling_land_surface_model + long_name = flag for calling land surface model + units = flag + dimensions = (horizontal_loop_extent) + type = logical + intent = in + optional = F +[rhowater] + standard_name = liquid_water_density + long_name = density of liquid water + units = kg m-3 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[hvap] + standard_name = latent_heat_of_vaporization_of_water_at_0C + long_name = latent heat of evaporation/sublimation + units = J kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[cmc] + standard_name = canopy_water_amount_in_m + long_name = canopy water amount in m + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[rho1] + standard_name = air_density_at_lowest_model_layer + long_name = air density at lowest model layer + units = kg m-3 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sheat] + standard_name = instantaneous_surface_upward_sensible_heat_flux + long_name = surface upward sensible heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[eta] + standard_name = instantaneous_surface_upward_latent_heat_flux + long_name = surface upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[flx1] + standard_name = latent_heat_flux_from_precipitating_snow + long_name = latent heat flux due to precipitating snow + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[flx2] + standard_name = latent_heat_flux_from_freezing_rain + long_name = latent heat flux due to freezing rain + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[flx3] + standard_name = latent_heat_flux_due_to_snowmelt + long_name = latent heat flux due to snowmelt phase change + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[runoff1] + standard_name = surface_runoff_flux_in_m_sm1 + long_name = surface runoff flux in m s-1 + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[runoff2] + standard_name = subsurface_runoff_flux_in_m_sm1 + long_name = subsurface runoff flux in m s-1 + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[soilm] + standard_name = soil_moisture_content_in_m + long_name = soil moisture in meters + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[snowhk] + standard_name = actual_snow_depth + long_name = actual snow depth + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[weasd_save] + standard_name = water_equivalent_accumulated_snow_depth_over_land_save + long_name = water equiv of acc snow depth over land before entering a physics scheme + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[snwdph_save] + standard_name = surface_snow_thickness_water_equivalent_over_land_save + long_name = water equivalent snow depth over land before entering a physics scheme + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc_save] + standard_name = surface_skin_temperature_over_land_interstitial_save + long_name = surface skin temperature over land before entering a physics scheme (temporary use as interstitial) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[tsurf] + standard_name = surface_skin_temperature_after_iteration_over_land + long_name = surface skin temperature after iteration over land + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[canopy_save] + standard_name = canopy_water_amount_save + long_name = canopy water amount before entering a physics scheme + units = kg m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[smc_save] + standard_name = volume_fraction_of_soil_moisture_save + long_name = total soil moisture before entering a physics scheme + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[stc_save] + standard_name = soil_temperature_save + long_name = soil temperature before entering a physics scheme + units = K + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slc_save] + standard_name = volume_fraction_of_unfrozen_soil_moisture_save + long_name = liquid soil moisture before entering a physics scheme + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[smcmax] + standard_name = soil_porosity + long_name = volumetric soil porosity + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[canopy] + standard_name = canopy_water_amount + long_name = canopy moisture content + units = kg m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[shflx] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_land + long_name = kinematic surface upward sensible heat flux over land + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[lhflx] + standard_name = kinematic_surface_upward_latent_heat_flux_over_land + long_name = kinematic surface upward latent heat flux over land + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snohf] + standard_name = snow_freezing_rain_upward_latent_heat_flux + long_name = latent heat flux due to snow and frz rain + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snowc] + standard_name = surface_snow_area_fraction + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[runoff] + standard_name = surface_runoff_flux + long_name = surface runoff flux + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[drain] + standard_name = subsurface_runoff_flux + long_name = subsurface runoff flux + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[stm] + standard_name = soil_moisture_content + long_name = soil moisture + units = kg m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[weasd] + standard_name = water_equivalent_accumulated_snow_depth_over_land + long_name = water equiv of acc snow depth over land + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[snwdph] + standard_name = surface_snow_thickness_water_equivalent_over_land + long_name = water equivalent snow depth over land + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[tsfc] + standard_name = surface_skin_temperature_over_land_interstitial + long_name = surface skin temperature over land (temporary use as interstitial) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[smc] + standard_name = volume_fraction_of_soil_moisture + long_name = volumetric fraction of soil moisture + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[slc] + standard_name = volume_fraction_of_unfrozen_soil_moisture + long_name = liquid soil moisture + units = frac + dimensions = (horizontal_loop_extent,soil_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[wet1] + standard_name = normalized_soil_wetness + long_name = normalized soil wetness + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/sfc_noahmp_drv.f b/physics/sfc_noahmp_drv.f index 5ddd5aefc..934d4797c 100644 --- a/physics/sfc_noahmp_drv.f +++ b/physics/sfc_noahmp_drv.f @@ -39,6 +39,19 @@ subroutine noahmpdrv_init(me, isot, ivegsrc, nlunit, errmsg, & errmsg = '' errflg = 0 + if (ivegsrc /= 1) then + errmsg = 'The NOAHMP LSM expects that the ivegsrc physics '// + & 'namelist parameter is 1. Exiting...' + errflg = 1 + return + end if + if (isot /= 1) then + errmsg = 'The NOAHMP LSM expects that the isot physics '// + & 'namelist parameter is 1. Exiting...' + errflg = 1 + return + end if + !--- initialize soil vegetation call set_soilveg(me, isot, ivegsrc, nlunit) From 238c84cb3c789056c701b70d3373e640ed4fa599 Mon Sep 17 00:00:00 2001 From: "Samuel Trahan (NOAA contractor)" <39415369+SamuelTrahanNOAA@users.noreply.github.com> Date: Wed, 13 May 2020 22:20:32 -0400 Subject: [PATCH 151/404] fix bugs found in pbl and ozone 3d diagnostic tendencies (#27) PBL tendencies were missing in two schemes; now fixed. Squashed commit of: * fix bugs found in pbl and ozone 3d diagnostic tendencies * remove debugging prints * implied shape arrays for five variables * more block labels * yet more bug fixes --- physics/GFS_PBL_generic.F90 | 26 +++++++------- physics/moninedmf.f | 2 +- physics/satmedmfvdifq.F | 66 ++++++++++++++++++++++++++++++----- physics/satmedmfvdifq.meta | 69 +++++++++++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+), 22 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 4c641e4bf..bd9df41df 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -373,7 +373,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, errmsg = '' errflg = 0 !GJF: dvdftra is only used if nvdiff != ntrac or (nvdiff == ntrac .and. ) - if (nvdiff == ntrac .and. (hybedmf .or. do_shoc .or. satmedmf)) then + if_nvdiff_ntrac: if (nvdiff == ntrac .and. (hybedmf .or. do_shoc .or. satmedmf)) then dqdt = dvdftra elseif (nvdiff /= ntrac .and. .not. shinhong .and. .not. do_ysu) then ! @@ -385,7 +385,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, enddo endif ! - if (trans_aero) then + if_trans_aero: if (trans_aero) then ! Set kk if chemistry-aerosol tracers are diffused call set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, & imp_physics_thompson, ltaerosol, & @@ -403,9 +403,9 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, enddo enddo enddo - endif + endif if_trans_aero ! - if (imp_physics == imp_physics_wsm6) then + if_imp_physics: if (imp_physics == imp_physics_wsm6) then ! WSM6 do k=1,levs do i=1,im @@ -517,9 +517,9 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, dqdt(i,k,ntoz) = dvdftra(i,k,3) enddo enddo - endif + endif if_imp_physics - endif ! nvdiff == ntrac + endif if_nvdiff_ntrac if (cplchm) then do i = 1, im @@ -534,7 +534,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! --- ... coupling insertion - if (cplflx) then + if_cplflx: if (cplflx) then do i=1,im if (oceanfrac(i) > 0.0) then ! Ocean only, NO LAKES ! if (fice(i) == ceanfrac(i)) then ! use results from CICE @@ -572,10 +572,10 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, !! endif ! Ocean only, NO LAKES enddo - endif + endif if_cplflx !-------------------------------------------------------lssav if loop ---------- - if (lssav) then + if_lssav: if (lssav) then do i=1,im dusfc_diag (i) = dusfc_diag(i) + dusfc1(i)*dtf dvsfc_diag (i) = dvsfc_diag(i) + dvsfc1(i)*dtf @@ -591,7 +591,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, ! & dtf,' kdt=',kdt,' lat=',lat ! endif - if (ldiag3d .and. flag_for_pbl_generic_tend .and. lssav) then + if_diag: if (ldiag3d .and. flag_for_pbl_generic_tend .and. lssav) then if (lsidea) then dt3dt(1:im,:) = dt3dt(1:im,:) + dtdt(1:im,:)*dtf else @@ -615,9 +615,9 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, enddo enddo endif - endif - - endif ! end if_lssav + endif if_diag + + endif if_lssav end subroutine GFS_PBL_generic_post_run diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 50400ee04..6cab9b7ed 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -1068,7 +1068,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo enddo if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. & - & flag_for_pbl_generic_tend) then + & .not. flag_for_pbl_generic_tend) then kk = ntoz is = (kk-1) * km do k = 1, km diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index f5a5f1f78..a514de6ad 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -65,6 +65,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & & prsi,del,prsl,prslk,phii,phil,delt, & & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & & kinver,xkzm_m,xkzm_h,xkzm_s,dspfac,bl_upfr,bl_dnfr, & + & ntoz,du3dt,dv3dt,dt3dt,dq3dt,do3dt,ldiag3d,qdiag3d, & & errmsg,errflg) ! use machine , only : kind_phys @@ -73,9 +74,10 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & implicit none ! !---------------------------------------------------------------------- - integer, intent(in) :: ix, im, km, ntrac, ntcw, ntiw, ntke + integer, intent(in) :: ix, im, km, ntrac, ntcw, ntiw, ntke, ntoz integer, intent(in) :: kinver(im) integer, intent(out) :: kpbl(im) + logical, intent(in) :: ldiag3d,qdiag3d ! real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, & & eps,epsm1 @@ -97,6 +99,10 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & & prsi(ix,km+1), del(ix,km), & & prsl(ix,km), prslk(ix,km), & & phii(ix,km+1), phil(ix,km) + real(kind=kind_phys), intent(inout), dimension(:,:) :: & + & du3dt(:,:), dv3dt(:,:), & + & dt3dt(:,:), dq3dt(:,:), & + & do3dt(:,:) real(kind=kind_phys), intent(out) :: & & dusfc(im), dvsfc(im), & & dtsfc(im), dqsfc(im), & @@ -1303,6 +1309,22 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend enddo enddo + if(ldiag3d) then + do k = 1,km + do i = 1,im + ttend = (f1(i,k)-t1(i,k))*rdt + dt3dt(i,k) = dt3dt(i,k)+dspfac*ttend*delt + enddo + enddo + if(qdiag3d) then + do k = 1,km + do i = 1,im + qtend = (f2(i,k)-q1(i,k,1))*rdt + dq3dt(i,k) = dq3dt(i,k)+dspfac*qtend*delt + enddo + enddo + endif + endif ! if(ntrac1 >= 2) then do kk = 2, ntrac1 @@ -1314,19 +1336,37 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & enddo enddo enddo + if(ldiag3d .and. qdiag3d .and. ntoz>0) then + kk=ntoz + is = (kk-1) * km + do k = 1, km + do i = 1, im + qtend = (f2(i,k+is)-q1(i,k,kk))*rdt + do3dt(i,k) = do3dt(i,k)+qtend*delt + enddo + enddo + endif endif ! ! add tke dissipative heating to temperature tendency ! if(dspheat) then - do k = 1,km1 - do i = 1,im -! tem = min(diss(i,k), dspmax) -! ttend = tem / cp - ttend = diss(i,k) / cp - tdt(i,k) = tdt(i,k) + dspfac * ttend + do k = 1,km1 + do i = 1,im +! tem = min(diss(i,k), dspmax) +! ttend = tem / cp + ttend = diss(i,k) / cp + tdt(i,k) = tdt(i,k) + dspfac * ttend + enddo enddo - enddo + if(ldiag3d) then + do k = 1,km1 + do i = 1,im + ttend = diss(i,k) / cp + dt3dt(i,k) = dt3dt(i,k)+dspfac * ttend*delt + enddo + enddo + endif endif c c compute tridiagonal matrix elements for momentum @@ -1403,6 +1443,16 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & dvsfc(i) = dvsfc(i)+conw*del(i,k)*vtend enddo enddo + if(ldiag3d) then + do k = 1,km + do i = 1,im + utend = (f1(i,k)-u1(i,k))*rdt + vtend = (f2(i,k)-v1(i,k))*rdt + du3dt(i,k) = du3dt(i,k) + utend*delt + dv3dt(i,k) = dv3dt(i,k) + vtend*delt + enddo + enddo + endif ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! pbl height for diagnostic purpose diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index ec679faec..f2c735def 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -578,6 +578,75 @@ kind = kind_phys intent = in optional = F +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[du3dt] + standard_name = cumulative_change_in_x_wind_due_to_PBL + long_name = cumulative change in x wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dv3dt] + standard_name = cumulative_change_in_y_wind_due_to_PBL + long_name = cumulative change in y wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dt3dt] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dq3dt] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[do3dt] + standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL + long_name = cumulative change in ozone mixing ratio due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = inout + optional = F +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 3bdfd889624953ba7c34da57c03d6f2dff2d9881 Mon Sep 17 00:00:00 2001 From: Xiaqiong Zhou Date: Thu, 14 May 2020 13:36:12 +0000 Subject: [PATCH 152/404] Correct x and y dimentions for delz --- physics/gfdl_fv_sat_adj.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/gfdl_fv_sat_adj.meta b/physics/gfdl_fv_sat_adj.meta index 983863a26..18b37a3c5 100644 --- a/physics/gfdl_fv_sat_adj.meta +++ b/physics/gfdl_fv_sat_adj.meta @@ -352,7 +352,7 @@ standard_name = thickness_at_Lagrangian_surface long_name = thickness at Lagrangian_surface units = m - dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_thickness_at_Lagrangian_surface) + dimensions = (starting_x_direction_index:ending_x_direction_index,starting_y_direction_index:ending_y_direction_index,1:vertical_dimension_for_thickness_at_Lagrangian_surface) type = real kind = kind_dyn intent = in From 4c8a5815d235284d4e6d5a7f356e20a9fd0ecac4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 14 May 2020 13:40:21 -0600 Subject: [PATCH 153/404] Major reorganization of GFDLMP-2-RRTMGP interface. --- physics/GFS_cloud_diagnostics.F90 | 566 +++++++++++++++++++++++++++++ physics/GFS_cloud_diagnostics.meta | 123 +++++++ physics/GFS_rrtmgp_gfdlmp_pre.F90 | 288 +++++++++++++++ physics/GFS_rrtmgp_gfdlmp_pre.meta | 248 +++++++++++++ physics/GFS_rrtmgp_pre.F90 | 469 +----------------------- physics/GFS_rrtmgp_pre.meta | 166 +-------- physics/GFS_rrtmgp_setup.F90 | 15 +- physics/rrtmgp_lw_rte.F90 | 18 +- physics/rrtmgp_lw_rte.meta | 9 - 9 files changed, 1266 insertions(+), 636 deletions(-) create mode 100644 physics/GFS_cloud_diagnostics.F90 create mode 100644 physics/GFS_cloud_diagnostics.meta create mode 100644 physics/GFS_rrtmgp_gfdlmp_pre.F90 create mode 100644 physics/GFS_rrtmgp_gfdlmp_pre.meta diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 new file mode 100644 index 000000000..b497e5102 --- /dev/null +++ b/physics/GFS_cloud_diagnostics.F90 @@ -0,0 +1,566 @@ +module GFS_cloud_diagnostics + use machine, only: kind_phys + use physcons, only: con_pi + use physparam, only: iovrlw, iovrsw, ivflip, icldflg + use GFS_typedefs, only: GFS_control_type + + ! Module parameters (imported directly from radiation_cloud.f) + integer, parameter :: & + NF_CLDS = 9, & ! Number of fields in cloud array + NK_CLDS = 3 ! Number of cloud vertical domains + real(kind_phys), parameter :: & + climit = 0.001, & ! Lowest allowable cloud-fraction + ovcst = 1.0 - 1.0e-8 ! Overcast cloud-fraction 0.999999999 + real(kind_phys), parameter, dimension(NK_CLDS+1,2) :: & + ptopc = reshape(source=(/ 1050., 650., 400., 0.0, 1050., 750., 500., 0.0 /), & + shape=(/NK_CLDS+1,2/)) + + ! Version tag and last revision date + character(40), parameter :: VTAGCLD='NCEP-Radiation_clouds v5.1 Nov 2012 ' + + ! Module variables + integer :: & + iovr = 1, & ! Cloud overlap used for diagnostic HML cloud outputs + llyr = 2 ! Upper limit of boundary layer clouds + + + public GFS_cloud_diagnostics_run, GFS_cloud_diagnostics_init,& + GFS_cloud_diagnostics_finalize, hml_cloud_diagnostics_init +contains + ! ###################################################################################### + ! ###################################################################################### + subroutine GFS_cloud_diagnostics_init() + end subroutine GFS_cloud_diagnostics_init + + ! ###################################################################################### + ! ###################################################################################### +!! \section arg_table_GFS_cloud_diagnostics_run +!! \htmlinclude GFS_cloud_diagnostics_run.html +!! + subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, deltaZ, cld_frac, & + mbota, mtopa, cldsa, de_lgth, overlap_param, errmsg, errflg) + implicit none + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT: FV3-GFS model control parameters + integer, intent(in) :: & + nCol, & ! Number of horizontal grid-points + nLev ! Number of vertical-layers + real(kind_phys), dimension(nCol), intent(in) :: & + lat ! Latitude + real(kind_phys), dimension(nCol,nLev), intent(in) :: & + p_lay, & ! Pressure at model-layer + deltaZ, & ! Layer thickness at model-layers + cld_frac ! Total cloud fraction + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + integer,dimension(ncol,3),intent(out) :: & + mbota, & ! Vertical indices for cloud tops + mtopa ! Vertical indices for cloud bases + real(kind_phys), dimension(ncol,5), intent(out) :: & + cldsa ! Fraction of clouds for low, middle, high, total and BL + real(kind_phys), dimension(ncol), intent(out) :: & + de_lgth ! Decorrelation length + real(kind_phys), dimension(nCol,nLev), intent(out) :: & + overlap_param ! Cloud-overlap parameter + + ! Local variables + integer i,id,iCol,iLay,icld + real(kind_phys) :: tem1 + real(kind_phys),dimension(nCol,NK_CLDS+1) :: ptop1 + real(kind_phys),dimension(nCol) :: rlat + real(kind_phys),dimension(nCol,nLev) :: cldcnv + + if (.not. (Model%lsswr .or. Model%lslwr)) return + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! This is set to zero in all of the progcld() routines and passed to gethml(). + cldcnv(:,:) = 0._kind_phys + + do icld = 1, NK_CLDS+1 + tem1 = ptopc(icld,2) - ptopc(icld,1) + do i=1,nCol + rlat(i) = abs(lat(i) / con_pi ) + ptop1(i,icld) = ptopc(icld,1) + tem1*max( 0.0, 4.0*rlat(i)-1.0 ) + enddo + enddo + + ! Estimate clouds decorrelation length in km + ! *this is only a tentative test, need to consider change later* + if ( iovrlw == 3 .and. iovrsw == 3) then + do iCol =1,nCol + de_lgth(iCol) = max( 0.6, 2.78-4.6*rlat(iCol) ) + do iLay=nLev,2,-1 + if (de_lgth(iCol) .gt. 0) then + overlap_param(iCol,iLay-1) = & + exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) + endif + enddo + enddo + endif + + ! Compute low, mid, high, total, and boundary layer cloud fractions + ! and clouds top/bottom layer indices for low, mid, and high clouds. + ! The three cloud domain boundaries are defined by ptopc. The cloud + ! overlapping method is defined by control flag 'iovr', which may + ! be different for lw and sw radiation programs. + call gethml(p_lay, ptop1, cld_frac, cldcnv, deltaZ, de_lgth, nCol, nLev, cldsa, mtopa, mbota) + + end subroutine GFS_cloud_diagnostics_run + + ! ###################################################################################### + ! ###################################################################################### + subroutine GFS_cloud_diagnostics_finalize() + end subroutine GFS_cloud_diagnostics_finalize + + ! ###################################################################################### + ! Initialization routine for High/Mid/Low cloud diagnostics. + ! ###################################################################################### + subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit) + implicit none + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT: FV3-GFS model control parameters + integer, intent(in) :: & + nLev, & ! Number of vertical-layers + mpi_rank + real(kind_phys), dimension(nLev+1), intent(in) :: & + sigmainit + + ! Local variables + integer :: iLay, kl + + ! Cloud overlap used for diagnostic HML cloud outputs + iovr = max(iovrsw,iovrlw) + + if (mpi_rank == 0) print *, VTAGCLD !print out version tag + + if ( icldflg == 0 ) then + print *,' - Diagnostic Cloud Method has been discontinued' + stop ! NoNo + else + if (mpi_rank == 0) then + print *,' - Using Prognostic Cloud Method' + if (Model%imp_physics == Model%imp_physics_zhao_carr) then + print *,' --- Zhao/Carr/Sundqvist microphysics' + elseif (Model%imp_physics == Model%imp_physics_zhao_carr_pdf) then + print *,' --- zhao/carr/sundqvist + pdf cloud' + elseif (Model%imp_physics == Model%imp_physics_gfdl) then + print *,' --- GFDL Lin cloud microphysics' + elseif (Model%imp_physics == Model%imp_physics_thompson) then + print *,' --- Thompson cloud microphysics' + elseif (Model%imp_physics == Model%imp_physics_wsm6) then + print *,' --- WSM6 cloud microphysics' + elseif (Model%imp_physics == Model%imp_physics_mg) then + print *,' --- MG cloud microphysics' + elseif (Model%imp_physics == Model%imp_physics_fer_hires) then + print *,' --- Ferrier-Aligo cloud microphysics' + else + print *,' !!! ERROR in cloud microphysc specification!!!', & + ' imp_physics (NP3D) =',Model%imp_physics + stop + endif + endif + endif + + ! Compute the top of BL cld (llyr), which is the topmost non cld(low) layer for + ! stratiform (at or above lowest 0.1 of the atmosphere). + lab_do_k0 : do iLay = nLev, 2, -1 + kl = iLay + if (sigmainit(iLay) < 0.9e0) exit lab_do_k0 + enddo lab_do_k0 + llyr = kl + + return + end subroutine hml_cloud_diagnostics_initialize + + ! ######################################################################################### + ! ######################################################################################### + subroutine gethml & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & ! --- inputs: + & IX, NLAY, & + & clds, mtop, mbot & ! --- outputs: + & ) + +! =================================================================== ! +! ! +! abstract: compute high, mid, low, total, and boundary cloud fractions ! +! and cloud top/bottom layer indices for model diagnostic output. ! +! the three cloud domain boundaries are defined by ptopc. the cloud ! +! overlapping method is defined by control flag 'iovr', which is also ! +! used by lw and sw radiation programs. ! +! ! +! usage: call gethml ! +! ! +! subprograms called: none ! +! ! +! attributes: ! +! language: fortran 90 ! +! machine: ibm-sp, sgi ! +! ! +! ! +! ==================== definition of variables ==================== ! +! ! +! input variables: ! +! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! +! ptop1 (IX,4) : pressure limits of cloud domain interfaces ! +! (sfc,low,mid,high) in mb (100Pa) ! +! cldtot(IX,NLAY) : total or straiform cloud profile in fraction ! +! cldcnv(IX,NLAY) : convective cloud (for diagnostic scheme only) ! +! dz (ix,nlay) : layer thickness (km) ! +! de_lgth(ix) : clouds vertical de-correlation length (km) ! +! IX : horizontal dimention ! +! NLAY : vertical layer dimensions ! +! ! +! output variables: ! +! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! +! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! +! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! +! ! +! external module variables: (in physparam) ! +! ivflip : control flag of vertical index direction ! +! =0: index from toa to surface ! +! =1: index from surface to toa ! +! ! +! internal module variables: ! +! iovr : control flag for cloud overlap ! +! =0 random overlapping clouds ! +! =1 max/ran overlapping clouds ! +! =2 maximum overlapping ( for mcica only ) ! +! =3 decorr-length ovlp ( for mcica only ) ! +! ! +! ==================== end of description ===================== ! +! + implicit none! + +! --- inputs: + integer, intent(in) :: IX, NLAY + + real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & + & cldtot, cldcnv, dz + real (kind=kind_phys), dimension(:), intent(in) :: de_lgth + +! --- outputs + real (kind=kind_phys), dimension(:,:), intent(out) :: clds + + integer, dimension(:,:), intent(out) :: mtop, mbot + +! --- local variables: + real (kind=kind_phys) :: cl1(IX), cl2(IX), dz1(ix) + real (kind=kind_phys) :: pcur, pnxt, ccur, cnxt, alfa + + integer, dimension(IX):: idom, kbt1, kth1, kbt2, kth2 + integer :: i, k, id, id1, kstr, kend, kinc + +! +!===> ... begin here +! + clds(:,:) = 0.0 + + do i = 1, IX + cl1(i) = 1.0 + cl2(i) = 1.0 + enddo + +! --- total and bl clouds, where cl1, cl2 are fractions of clear-sky view +! layer processed from surface and up + +!> - Calculate total and BL cloud fractions (maximum-random cloud +!! overlapping is operational). + + if ( ivflip == 0 ) then ! input data from toa to sfc + kstr = NLAY + kend = 1 + kinc = -1 + else ! input data from sfc to toa + kstr = 1 + kend = NLAY + kinc = 1 + endif ! end_if_ivflip + + if ( iovr == 0 ) then ! random overlap + + do k = kstr, kend, kinc + do i = 1, IX + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) cl1(i) = cl1(i) * (1.0 - ccur) + enddo + + if (k == llyr) then + do i = 1, IX + clds(i,5) = 1.0 - cl1(i) ! save bl cloud + enddo + endif + enddo + + do i = 1, IX + clds(i,4) = 1.0 - cl1(i) ! save total cloud + enddo + + elseif ( iovr == 1 ) then ! max/ran overlap + + do k = kstr, kend, kinc + do i = 1, IX + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) then ! cloudy layer + cl2(i) = min( cl2(i), (1.0 - ccur) ) + else ! clear layer + cl1(i) = cl1(i) * cl2(i) + cl2(i) = 1.0 + endif + enddo + + if (k == llyr) then + do i = 1, IX + clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud + enddo + endif + enddo + + do i = 1, IX + clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud + enddo + + elseif ( iovr == 2 ) then ! maximum overlap all levels + + cl1(:) = 0.0 + + do k = kstr, kend, kinc + do i = 1, IX + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) cl1(i) = max( cl1(i), ccur ) + enddo + + if (k == llyr) then + do i = 1, IX + clds(i,5) = cl1(i) ! save bl cloud + enddo + endif + enddo + + do i = 1, IX + clds(i,4) = cl1(i) ! save total cloud + enddo + + elseif ( iovr == 3 ) then ! random if clear-layer divided, + ! otherwise de-corrlength method + do i = 1, ix + dz1(i) = - dz(i,kstr) + enddo + + do k = kstr, kend, kinc + do i = 1, ix + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) then ! cloudy layer + alfa = exp( -0.5*((dz1(i)+dz(i,k)))/de_lgth(i) ) + dz1(i) = dz(i,k) + cl2(i) = alfa * min(cl2(i), (1.0 - ccur)) & ! maximum part + & + (1.0 - alfa) * (cl2(i) * (1.0 - ccur)) ! random part + else ! clear layer + cl1(i) = cl1(i) * cl2(i) + cl2(i) = 1.0 + if (k /= kend) dz1(i) = -dz(i,k+kinc) + endif + enddo + + if (k == llyr) then + do i = 1, ix + clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud + enddo + endif + enddo + + do i = 1, ix + clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud + enddo + + endif ! end_if_iovr + +! --- high, mid, low clouds, where cl1, cl2 are cloud fractions +! layer processed from one layer below llyr and up +! --- change! layer processed from surface to top, so low clouds will +! contains both bl and low clouds. + +!> - Calculte high, mid, low cloud fractions and vertical indices of +!! cloud tops/bases. + if ( ivflip == 0 ) then ! input data from toa to sfc + + do i = 1, IX + cl1 (i) = 0.0 + cl2 (i) = 0.0 + kbt1(i) = NLAY + kbt2(i) = NLAY + kth1(i) = 0 + kth2(i) = 0 + idom(i) = 1 + mbot(i,1) = NLAY + mtop(i,1) = NLAY + mbot(i,2) = NLAY - 1 + mtop(i,2) = NLAY - 1 + mbot(i,3) = NLAY - 1 + mtop(i,3) = NLAY - 1 + enddo + +!org do k = llyr-1, 1, -1 + do k = NLAY, 1, -1 + do i = 1, IX + id = idom(i) + id1= id + 1 + + pcur = plyr(i,k) + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + + if (k > 1) then + pnxt = plyr(i,k-1) + cnxt = min( ovcst, max( cldtot(i,k-1), cldcnv(i,k-1) )) + else + pnxt = -1.0 + cnxt = 0.0 + endif + + if (pcur < ptop1(i,id1)) then + id = id + 1 + id1= id1 + 1 + idom(i) = id + endif + + if (ccur >= climit) then + if (kth2(i) == 0) kbt2(i) = k + kth2(i) = kth2(i) + 1 + + if ( iovr == 0 ) then + cl2(i) = cl2(i) + ccur - cl2(i)*ccur + else + cl2(i) = max( cl2(i), ccur ) + endif + + if (cnxt < climit .or. pnxt < ptop1(i,id1)) then + kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i) ) & + & / (cl1(i) + cl2(i)) ) + kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i) ) & + & / (cl1(i) + cl2(i)) ) + cl1 (i) = cl1(i) + cl2(i) - cl1(i)*cl2(i) + + kbt2(i) = k - 1 + kth2(i) = 0 + cl2 (i) = 0.0 + endif ! end_if_cnxt_or_pnxt + endif ! end_if_ccur + + if (pnxt < ptop1(i,id1)) then + clds(i,id) = cl1(i) + mtop(i,id) = min( kbt1(i), kbt1(i)-kth1(i)+1 ) + mbot(i,id) = kbt1(i) + + cl1 (i) = 0.0 + kbt1(i) = k - 1 + kth1(i) = 0 + + if (id1 <= NK_CLDS) then + mbot(i,id1) = kbt1(i) + mtop(i,id1) = kbt1(i) + endif + endif ! end_if_pnxt + + enddo ! end_do_i_loop + enddo ! end_do_k_loop + + else ! input data from sfc to toa + + do i = 1, IX + cl1 (i) = 0.0 + cl2 (i) = 0.0 + kbt1(i) = 1 + kbt2(i) = 1 + kth1(i) = 0 + kth2(i) = 0 + idom(i) = 1 + mbot(i,1) = 1 + mtop(i,1) = 1 + mbot(i,2) = 2 + mtop(i,2) = 2 + mbot(i,3) = 2 + mtop(i,3) = 2 + enddo + +!org do k = llyr+1, NLAY + do k = 1, NLAY + do i = 1, IX + id = idom(i) + id1= id + 1 + + pcur = plyr(i,k) + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + + if (k < NLAY) then + pnxt = plyr(i,k+1) + cnxt = min( ovcst, max( cldtot(i,k+1), cldcnv(i,k+1) )) + else + pnxt = -1.0 + cnxt = 0.0 + endif + + if (pcur < ptop1(i,id1)) then + id = id + 1 + id1= id1 + 1 + idom(i) = id + endif + + if (ccur >= climit) then + if (kth2(i) == 0) kbt2(i) = k + kth2(i) = kth2(i) + 1 + + if ( iovr == 0 ) then + cl2(i) = cl2(i) + ccur - cl2(i)*ccur + else + cl2(i) = max( cl2(i), ccur ) + endif + + if (cnxt < climit .or. pnxt < ptop1(i,id1)) then + kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i)) & + & / (cl1(i) + cl2(i)) ) + kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i)) & + & / (cl1(i) + cl2(i)) ) + cl1 (i) = cl1(i) + cl2(i) - cl1(i)*cl2(i) + + kbt2(i) = k + 1 + kth2(i) = 0 + cl2 (i) = 0.0 + endif ! end_if_cnxt_or_pnxt + endif ! end_if_ccur + + if (pnxt < ptop1(i,id1)) then + clds(i,id) = cl1(i) + mtop(i,id) = max( kbt1(i), kbt1(i)+kth1(i)-1 ) + mbot(i,id) = kbt1(i) + + cl1 (i) = 0.0 + kbt1(i) = min(k+1, nlay) + kth1(i) = 0 + + if (id1 <= NK_CLDS) then + mbot(i,id1) = kbt1(i) + mtop(i,id1) = kbt1(i) + endif + endif ! end_if_pnxt + + enddo ! end_do_i_loop + enddo ! end_do_k_loop + + endif ! end_if_ivflip + +! + return +!................................... + end subroutine gethml + + +end module GFS_cloud_diagnostics \ No newline at end of file diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta new file mode 100644 index 000000000..84ddb03c2 --- /dev/null +++ b/physics/GFS_cloud_diagnostics.meta @@ -0,0 +1,123 @@ +######################################################################## +[ccpp-arg-table] + name = GFS_cloud_diagnostics_run + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[deltaZ] + standard_name = layer_thickness + long_name = layer_thickness + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle, high, total and BL + units = frac + dimensions = (horizontal_dimension,5) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 new file mode 100644 index 000000000..509ebb4e6 --- /dev/null +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -0,0 +1,288 @@ +module GFS_rrtmgp_gfdlmp_pre + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_tbd_type + use physcons, only: con_ttp, & ! Temperature at h2o 3pt (K) + con_rd, & ! Gas constant for dry air (J/KgK) + con_pi, & ! PI + con_g ! Gravity (m/s2) + use physparam, only: lcnorm,lcrick + ! Parameters + real(kind_phys), parameter :: & + reliq_def = 10.0, & ! Default liq radius to 10 micron + reice_def = 50.0, & ! Default ice radius to 50 micron + rrain_def = 1000.0, & ! Default rain radius to 1000 micron + rsnow_def = 250.0, & ! Default snow radius to 250 micron + epsq = 1.0e-12, & ! Tiny value + cllimit = 0.001, & ! Lowest cloud fraction in GFDL MP scheme + gfac=1.0e5/con_g ! + +contains + ! ###################################################################################### + ! ###################################################################################### + subroutine GFS_rrtmgp_gfdlmp_pre_init() + end subroutine GFS_rrtmgp_gfdlmp_pre_init + + ! ###################################################################################### + ! ###################################################################################### +!! \section arg_table_GFS_rrtmgp_gfdlmp_pre_run +!! \htmlinclude GFS_rrtmgp_gfdlmp_pre_run.html +!! + subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lon, lat, p_lay, & + p_lev, t_lay, t_lev, tv_lay, relhum, qs_lay, q_lay, deltaZ, tracer, & + cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & + cld_rerain, errmsg, errflg) + implicit none + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT: FV3-GFS model control parameters + type(GFS_tbd_type), intent(in) :: & + Tbd ! DDT: FV3-GFS data not yet assigned to a defined container + integer, intent(in) :: & + nCol, & ! Number of horizontal grid-points + nLev ! Number of vertical-layers + real(kind_phys), dimension(nCol), intent(in) :: & + slmsk, & ! Land/sea/sea-ice mask + lon, & ! Longitude + lat ! Latitude + real(kind_phys), dimension(nCol,nLev), intent(in) :: & + p_lay, & ! Pressure at model-layer (Pa) + t_lay, & ! Temperature at model layer (K) + tv_lay, & ! Virtual temperature at model-layers (K) + relhum, & ! Relative-humidity at model-layers + qs_lay, & ! Saturation mixing-ratio at model-layers (kg/kg) + q_lay, & ! Water-vapor mixing-ratio at model-layers (kg/kg) + deltaZ ! Layer thickness at model-layers (km) + real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + p_lev, & ! Pressure at model-level interfaces (Pa) + t_lev ! Temperature at model-level interfaces (K) + real(kind_phys), dimension(nCol, nLev, Model%ntrac),intent(in) :: & + tracer ! Cloud condensate amount in layer by type () + + ! Outputs + real(kind_phys), dimension(nCol,nLev),intent(out) :: & + cld_frac, & ! Total cloud fraction + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effecive radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Local variables + real(kind_phys) :: tem1, tem2, tem3, clwt + real(kind_phys), dimension(nCol) :: rlat + real(kind_phys), dimension(nCol, nLev, min(4,Model%ncnd)) :: cld_condensate, clwf + integer :: i,k,l,ncndl,icnd + real(kind_phys), dimension(nCol,nLev) :: deltaP, cldcov + real(kind_phys), dimension(nCol,nLev,9) :: clouds + + if (.not. (Model%lsswr .or. Model%lslwr)) return + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Initialize outputs + cld_lwp(:,:) = 0.0 + cld_reliq(:,:) = 0.0 + cld_iwp(:,:) = 0.0 + cld_reice(:,:) = 0.0 + cld_rwp(:,:) = 0.0 + cld_rerain(:,:) = 0.0 + cld_swp(:,:) = 0.0 + cld_resnow(:,:) = 0.0 + + ! Compute layer pressure thickness (hPa) + deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. + + ! #################################################################################### + ! Pull out cloud information for GFDL MP scheme. + ! #################################################################################### + ! Cloud hydrometeors + cld_condensate(:,:,:) = 0._kind_phys + if (Model%ncnd .eq. 2) then + cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! -liquid water + cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,Model%ntiw) ! -ice water + ncndl = Model%ncnd + endif + if (Model%ncnd .eq. 5) then + cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! -liquid water + cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,Model%ntiw) ! -ice water + cld_condensate(1:nCol,1:nLev,3) = tracer(1:nCol,1:nLev,Model%ntrw) ! -rain water + cld_condensate(1:nCol,1:nLev,4) = tracer(1:nCol,1:nLev,Model%ntsw) + & ! -snow + grapuel + tracer(1:nCol,1:nLev,Model%ntgl) + + ! Since we combine the snow and grapuel, define local variable for number of condensate types. + ncndl = min(4,Model%ncnd) + endif + + ! Cloud-fraction + cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nCol,Model%ntclamt) + + ! Set really tiny suspended particle amounts to clear + do l=1,ncndl + do k=1,nLev + do i=1,nCol + if (cld_condensate(i,k,l) < epsq) cld_condensate(i,k,l) = 0.0 + enddo + enddo + enddo + + ! DJS asks. Do we need lcrick? If not replace clwf with cld_condensate(:,:,1) + if ( lcrick ) then + do icnd=1,ncndl + do i = 1, nCol + clwf(i,1,icnd) = 0.75*cld_condensate(i,1,icnd) + 0.25*cld_condensate(i,2,icnd) + clwf(i,nlev,icnd) = 0.75*cld_condensate(i,nLev,icnd) + 0.25*cld_condensate(i,nLev-1,icnd) + enddo + do k = 2, nLev-1 + do i = 1, nCol + clwf(i,k,icnd) = 0.25*cld_condensate(i,k-1,icnd) + 0.5*cld_condensate(i,k,icnd) + & + 0.25*cld_condensate(i,k+1,icnd) + enddo + enddo + enddo + else + do icnd=1,ncndl + do k = 1, nLev + do i = 1, nCol + clwf(i,k,icnd) = cld_condensate(i,k,icnd) + enddo + enddo + enddo + endif + + ! #################################################################################### + ! A) Compute Liquid/Ice/Rain/Snow(+groupel) cloud condensate paths + ! #################################################################################### + + ! #################################################################################### + ! i) This option uses the mixing-ratios and effective radii for 5 cloud hydrometeor types, + ! Liquid, Ice, Rain, and Snow(+groupel), to determine cloud properties. + ! Formerly progclduni() + ! #################################################################################### + if (Model%lgfdlmprad) then + ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) + do k = 1, nLev + do i = 1, nCol + if (cld_frac(i,k) .ge. cllimit) then + tem1 = gfac * deltaP(i,k) + cld_lwp(i,k) = clwf(i,k,1) * tem1 + cld_iwp(i,k) = clwf(i,k,2) * tem1 + ! Also Rain and Snow(+groupel) if provided + if (ncndl .eq. 4) then + cld_rwp(i,k) = clwf(i,k,3) * tem1 + cld_swp(i,k) = clwf(i,k,4) * tem1 + endif + endif + enddo + enddo + ! #################################################################################### + ! ii) This option uses only a single mixing-ratio and partitions into liquid/ice cloud + ! properties by phase. + ! Formerly progcld4() + ! #################################################################################### + else + ! Compute total-cloud suspended water. + clwf(:,:,1) = sum(clwf,dim=3) + + ! Compute liquid/ice condensate path (g/m2) + do k = 1, nLev + do i = 1, nCol + if (cld_frac(i,k) .ge. cllimit) then + clwt = max(0.0,clwf(i,k,1)) * gfac * deltaP(i,k) + tem2 = min( 1.0, max( 0.0, (con_ttp-t_lay(i,k))*0.05 ) ) + cld_iwp(i,k) = clwt * tem2 + cld_lwp(i,k) = clwt - cld_iwp(i,k) + endif + enddo + enddo + endif + + ! #################################################################################### + ! B) Particle sizes + ! #################################################################################### + + ! #################################################################################### + ! i) Use radii provided from the macrophysics + ! #################################################################################### + if (Model%effr_in) then + do k=1,nLev + do i=1,nCol + cld_reliq(i,k) = Tbd%phy_f3d(i,k,1) + cld_reice(i,k) = max(10.0, min(150.0,Tbd%phy_f3d(i,k,2))) + cld_rerain(i,k) = Tbd%phy_f3d(i,k,3) + cld_resnow(i,k) = Tbd%phy_f3d(i,k,4) + enddo + enddo + ! #################################################################################### + ! ii) Start with default values. Modify liquid sizes over land. Adjust ice sizes following + ! Hemsfield and McFarquhar (1996) https://doi.org/10.1175/1520-0469 + ! #################################################################################### + else + cld_reliq(:,:) = reliq_def + cld_reice(:,:) = reice_def + cld_rerain(:,:) = rrain_def + cld_resnow(:,:) = rsnow_def + + ! Compute effective liquid cloud droplet radius over land. + do i = 1, nCol + if (nint(slmsk(i)) == 1) then + do k = 1, nLev + tem2 = min( 1.0, max( 0.0, (con_ttp-t_lay(i,k))*0.05 ) ) + cld_reliq(i,k) = 5.0 + 5.0 * tem2 + enddo + endif + enddo + + ! Compute effective ice cloud droplet radius. + do k = 1, nLev + do i = 1, nCol + tem2 = t_lay(i,k) - con_ttp + if (cld_iwp(i,k) > 0.0) then + tem3 = (con_g/con_rd)* cld_iwp(i,k) * (p_lay(i,k)/100.) / (deltaP(i,k)*tv_lay(i,k)) + if (tem2 < -50.0) then + cld_reice(i,k) = (1250.0/9.917) * tem3 ** 0.109 + elseif (tem2 < -40.0) then + cld_reice(i,k) = (1250.0/9.337) * tem3 ** 0.08 + elseif (tem2 < -30.0) then + cld_reice(i,k) = (1250.0/9.208) * tem3 ** 0.055 + else + cld_reice(i,k) = (1250.0/9.387) * tem3 ** 0.031 + endif + cld_reice(i,k) = max(10.0, min(cld_reice(i,k), 150.0)) + endif + enddo + enddo + endif + + ! Normalize cloud-condensate by cloud-cover? + if ( lcnorm ) then + do k = 1, nLev + do i = 1, nCol + if (cld_frac(i,k) >= cllimit) then + tem1 = 1.0 / max(0.05, cld_frac(i,k)) + cld_lwp(i,k) = cld_lwp(i,k) * tem1 + cld_iwp(i,k) = cld_iwp(i,k) * tem1 + cld_rwp(i,k) = cld_rwp(i,k) * tem1 + cld_swp(i,k) = cld_swp(i,k) * tem1 + endif + enddo + enddo + endif + + end subroutine GFS_rrtmgp_gfdlmp_pre_run + + ! ######################################################################################### + ! ######################################################################################### + subroutine GFS_rrtmgp_gfdlmp_pre_finalize() + end subroutine GFS_rrtmgp_gfdlmp_pre_finalize + +end module GFS_rrtmgp_gfdlmp_pre \ No newline at end of file diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta new file mode 100644 index 000000000..5b792bc6c --- /dev/null +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -0,0 +1,248 @@ +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_gfdlmp_pre_run + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Tbd] + standard_name = GFS_tbd_type_instance + long_name = instance of derived type GFS_tbd_type + units = DDT + dimensions = () + type = GFS_tbd_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys +[lat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys +[lon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature at vertical layer for radiation calculation + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t_lev] + standard_name = air_temperature_at_interface_for_RRTMGP + long_name = air temperature at vertical interface for radiation calculation + units = K + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qs_lay] + standard_name = saturation_mixing_ratio + long_name = saturation mixing ratio + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[q_lay] + standard_name = water_vapor_mixing_ratio + long_name = water mixing ratio + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[deltaZ] + standard_name = layer_thickness + long_name = layer_thickness + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_lwp] + standard_name = cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_reliq] + standard_name = mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_iwp] + standard_name = cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_reice] + standard_name = mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_swp] + standard_name = cloud_snow_water_path + long_name = layer cloud snow water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_resnow] + standard_name = mean_effective_radius_for_snow_flake + long_name = mean effective radius for snow cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_rwp] + standard_name = cloud_rain_water_path + long_name = layer cloud rain water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_rerain] + standard_name = mean_effective_radius_for_rain_drop + long_name = mean effective radius for rain cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 2c269f009..f3f2f3dc4 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -6,11 +6,9 @@ module GFS_rrtmgp_pre GFS_statein_type, & ! Prognostic state data in from dycore GFS_stateout_type, & ! Prognostic state or tendencies return to dycore GFS_sfcprop_type, & ! Surface fields - GFS_coupling_type, & ! Fields to/from coupling with other components (e.g. land/ice/ocean/etc.) GFS_control_type, & ! Model control parameters GFS_grid_type, & ! Grid and interpolation related data GFS_tbd_type, & ! To-Be-Determined data that doesn't fit in any one container - GFS_radtend_type, & ! Radiation tendencies needed in physics GFS_diag_type ! Fields targetted for diagnostic output use physcons, only: & eps => con_eps, & ! Rd/Rv @@ -85,12 +83,10 @@ module GFS_rrtmgp_pre !! \section arg_table_GFS_rrtmgp_pre_init !! \htmlinclude GFS_rrtmgp_pre_init.html !! - subroutine GFS_rrtmgp_pre_init(Model, Radtend, active_gases_array, errmsg, errflg) + subroutine GFS_rrtmgp_pre_init(Model, active_gases_array, errmsg, errflg) ! Inputs type(GFS_control_type), intent(inout) :: & Model ! DDT: FV3-GFS model control parameters - type(GFS_radtend_type), intent(inout) :: & - Radtend ! DDT: FV3-GFS radiation tendencies ! Outputs character(len=*),dimension(Model%ngases), intent(out) :: & @@ -184,12 +180,10 @@ end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run !! \htmlinclude GFS_rrtmgp_pre_run.html !! - subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN - ncol, lw_gas_props, active_gases_array, & ! IN - sec_diff_byband, raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, cld_frac, cld_lwp,& ! OUT - cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! OUT - tv_lay, relhum, tracer, cldsa, mtopa, mbota, de_lgth, gas_concentrations, & ! OUT - overlap_param, errmsg, errflg) + subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Sfcprop, Tbd, ncol, lw_gas_props, & + active_gases_array, & ! IN + raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, tv_lay, relhum, qs_lay, q_lay, & ! OUT + deltaZ, tracer, gas_concentrations, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -198,10 +192,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Grid ! DDT: FV3-GFS grid and interpolation related data type(GFS_statein_type), intent(in) :: & Statein ! DDT: FV3-GFS prognostic state data in from dycore - type(GFS_coupling_type), intent(in) :: & - Coupling ! DDT: FV3-GFS fields to/from coupling with other components - type(GFS_radtend_type), intent(inout) :: & - Radtend ! DDT: FV3-GFS radiation tendencies type(GFS_sfcprop_type), intent(in) :: & Sfcprop ! DDT: FV3-GFS surface fields type(GFS_tbd_type), intent(in) :: & @@ -232,42 +222,22 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, integer, intent(out) :: & errflg ! Error flag real(kind_phys), dimension(ncol,Model%levs),intent(out) :: & - cld_frac, & ! Total cloud fraction - cld_lwp, & ! Cloud liquid water path - cld_reliq, & ! Cloud liquid effective radius - cld_iwp, & ! Cloud ice water path - cld_reice, & ! Cloud ice effecive radius - cld_swp, & ! Cloud snow water path - cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius - real(kind_phys), dimension(ncol,Model%levs),intent(out) :: & - tv_lay, & ! Virtual temperatue at model-layers - relhum ! Relative-humidity at model-layers + tv_lay, & ! Virtual temperature at model-layers + relhum, & ! Relative-humidity at model-layers + qs_lay, & ! Saturation mixing-ratio at model-layers + q_lay, & ! Water-vapor mixing-ratio at model-layers + deltaZ ! Layer thickness at model-layers real(kind_phys), dimension(ncol, Model%levs, Model%ntrac),intent(out) :: & tracer ! Array containing trace gases - integer,dimension(ncol,3),intent(out) :: & - mbota, & ! Vertical indices for cloud tops - mtopa ! Vertical indices for cloud bases - real(kind_phys), dimension(ncol,5), intent(out) :: & - cldsa ! Fraction of clouds for low, middle, high, total and BL - real(kind_phys), dimension(ncol), intent(out) :: & - de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,Model%levs), intent(out) :: & - overlap_param ! Cloud-overlap parameter - real(kind_phys), dimension(lw_gas_props%get_nband(),ncol),intent(out) :: & - sec_diff_byband ! Local variables integer :: i, j, iCol, iBand, iSFC, iTOA, iLay logical :: top_at_1 - real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o, coldry, tem0, colamt + real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs, tem1, tem2 real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol, Model%levs) :: qs_lay, q_lay, deltaZ, deltaP, o3_lay + real(kind_phys), dimension(ncol, Model%levs) :: o3_lay real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr - real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds - real(kind_phys), dimension(ncol) :: precipitableH2o ! Initialize CCPP error handling variables errmsg = '' @@ -314,12 +284,10 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, t_lev(1:NCOL,2:iTOA) = (t_lay(1:NCOL,2:iTOA)+t_lay(1:NCOL,1:iTOA-1))/2._kind_phys t_lev(1:NCOL,iTOA+1) = t_lay(1:NCOL,iTOA) endif - - ! Compute layer pressure thicknes - deltaP = abs(p_lev(:,2:model%levs+1)-p_lev(:,1:model%levs)) - ! Compute a bunch of thermodynamic fields needed by the macrophysics schemes. Relative humidity, - ! saturation mixing-ratio, vapor mixing-ratio, virtual temperature, layer thickness,... + ! Compute a bunch of thermodynamic fields needed by the cloud microphysics schemes. + ! Relative humidity, saturation mixing-ratio, vapor mixing-ratio, virtual temperature, + ! layer thickness,... do iCol=1,NCOL do iLay=1,Model%levs es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa @@ -370,40 +338,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_h2o), vmr_h2o)) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o3), vmr_o3)) - ! ####################################################################################### - ! Compute diffusivity angle adjustments for each longwave band - ! *NOTE* Legacy RRTMGP code - ! ####################################################################################### - ! Conpute diffusivity angle adjustments. - ! First need to compute precipitable water in each column - tem0 = (1._kind_phys - vmr_h2o)*amd + vmr_h2o*amw - coldry = ( 1.0e-20 * 1.0e3 *avogad)*(deltap*.01) / (100.*grav*tem0*(1._kind_phys + vmr_h2o)) - colamt = max(0._kind_phys, coldry*vmr_h2o) - do iCol=1,nCol - tem1 = 0._kind_phys - tem2 = 0._kind_phys - do iLay=1,Model%levs - tem1 = tem1 + coldry(iCol,iLay)+colamt(iCol,iLay) - tem2 = tem2 + colamt(iCol,iLay) - enddo - precipitableH2o(iCol) = p_lev(iCol,iSFC)*0.01*(10._kind_phys*tem2 / (amdw*tem1*grav)) - enddo - - ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 - ! and 1.80) as a function of total column water vapor. the function - ! has been defined to minimize flux and cooling rate errors in these bands - ! over a wide range of precipitable water values. - do iCol=1,nCol - do iBand = 1, lw_gas_props%get_nband() - if (iBand==1 .or. iBand==4 .or. iBand==10) then - sec_diff_byband(iBand,iCol) = diffusivityB1410 - else - sec_diff_byband(iBand,iCol) = min( diffusivityHigh, max(diffusivityLow, & - a0(iBand)+a1(iBand)*exp(a2(iBand)*precipitableH2o(iCol)))) - endif - enddo - enddo - ! ####################################################################################### ! Radiation time step (output) (Is this really needed?) (Used by some diangostics) ! ####################################################################################### @@ -415,31 +349,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, tsfg(1:NCOL) = Sfcprop%tsfc(1:NCOL) tsfa(1:NCOL) = Sfcprop%tsfc(1:NCOL) - ! ####################################################################################### - ! Cloud microphysics - ! ####################################################################################### - call cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, p_lev, & - tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, clouds, cldsa, mbota, mtopa, de_lgth) - - ! Cloud-overlap parameter (only needed for iovr = 3) - overlap_param(:,1) = 0._kind_phys - do iCol=1,nCol - do iLay=Model%levs,2,-1 - if (de_lgth(iCol) .gt. 0) overlap_param(iCol,iLay-1) = exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) - enddo - enddo - - ! Copy output cloud fields - cld_frac = clouds(:,:,1) - cld_lwp = clouds(:,:,2) - cld_reliq = clouds(:,:,3) - cld_iwp = clouds(:,:,4) - cld_reice = clouds(:,:,5) - cld_rwp = clouds(:,:,6) - cld_rerain = clouds(:,:,7) - cld_swp = clouds(:,:,8) - cld_resnow = clouds(:,:,9) - end subroutine GFS_rrtmgp_pre_run ! ######################################################################################### @@ -448,352 +357,4 @@ end subroutine GFS_rrtmgp_pre_run subroutine GFS_rrtmgp_pre_finalize () end subroutine GFS_rrtmgp_pre_finalize - ! ######################################################################################### - ! Subroutine cloud_microphysics() - ! ######################################################################################### - subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, p_lev,& - tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, clouds, cldsa, mbota, mtopa, de_lgth) - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters - type(GFS_tbd_type), intent(in) :: & - Tbd ! DDT: FV3-GFS data not yet assigned to a defined container - type(GFS_grid_type), intent(in) :: & - Grid ! DDT: FV3-GFS grid and interpolation related data - type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! DDT: FV3-GFS surface fields - integer, intent(in) :: & - ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol, Model%levs, Model%ntrac),intent(in) :: & - tracer ! Cloud condensate amount in layer by type () - real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer centers (Pa) - t_lay, & ! Temperature @ layer centers (K) - tv_lay, & ! Virtual temperature @ layer centers (K) - relhum, & ! Relative humidity @ layer centers(1) - qs_lay, & ! Saturation specific humidity @ layer center (kg/kg) - q_lay, & ! Specific humidity @ layer centers(kg/kg) - deltaZ, & ! Layer thickness (km) - deltaP ! Layer thickness (Pa) - real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer interface (Pa) - - ! Outputs - real(kind_phys), dimension(ncol, Model%levs, NF_CLDS),intent(out) :: & - clouds ! Cloud properties (NCOL,Model%levs,NF_CLDS) - integer,dimension(ncol,3), intent(out) :: & - mbota, & ! Vertical indices for low, mid, hi cloud bases (NCOL,3) - mtopa ! Vertical indices for low, mid, hi cloud tops (NCOL,3) - real(kind_phys), dimension(ncol), intent(out) ::& - de_lgth ! Clouds decorrelation length (km) - real(kind_phys), dimension(ncol, 5), intent(out) :: & - cldsa ! Fraction of clouds for low, mid, hi, tot, bl (NCOL,5) - - ! Local variables - real(kind_phys), dimension(ncol, Model%levs, min(4,Model%ncnd)) :: cld_condensate - integer :: i,k,l,ncndl - real(kind_phys), parameter :: xrc3 = 100. - real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, & - effr_i, effr_r, effr_s, cldcov - - ! ####################################################################################### - ! Obtain cloud information for radiation calculations - ! (clouds,cldsa,mtopa,mbota) - ! for prognostic cloud: - ! - For Zhao/Moorthi's prognostic cloud scheme, - ! call module_radiation_clouds::progcld1() - ! - For Zhao/Moorthi's prognostic cloud+pdfcld, - ! call module_radiation_clouds::progcld3() - ! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 - ! ####################################################################################### - - ! Note, snow and groupel are treated the same by radiation scheme. - ncndl = min(Model%ncnd,4) - - cld_condensate = 0.0_kind_phys - if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist - cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water/ice - elseif (Model%ncnd == 2) then ! MG - cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water - cld_condensate(1:NCOL,1:Model%levs,2) = tracer(1:NCOL,1:Model%levs,Model%ntiw) ! -ice water - elseif (Model%ncnd == 4) then ! MG2 - cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water - cld_condensate(1:NCOL,1:Model%levs,2) = tracer(1:NCOL,1:Model%levs,Model%ntiw) ! -ice water - cld_condensate(1:NCOL,1:Model%levs,3) = tracer(1:NCOL,1:Model%levs,Model%ntrw) ! -rain water - cld_condensate(1:NCOL,1:Model%levs,4) = tracer(1:NCOL,1:Model%levs,Model%ntsw) ! -snow water - elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 - cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water - cld_condensate(1:NCOL,1:Model%levs,2) = tracer(1:NCOL,1:Model%levs,Model%ntiw) ! -ice water - cld_condensate(1:NCOL,1:Model%levs,3) = tracer(1:NCOL,1:Model%levs,Model%ntrw) ! -rain water - cld_condensate(1:NCOL,1:Model%levs,4) = tracer(1:NCOL,1:Model%levs,Model%ntsw) + & ! -snow + grapuel - tracer(1:NCOL,1:Model%levs,Model%ntgl) - endif - - do l=1,ncndl - do k=1,Model%levs - do i=1,NCOL - if (cld_condensate(i,k,l) < epsq) cld_condensate(i,k,l) = 0.0 - enddo - enddo - enddo - - ! For GFDL microphysics scheme... - if (Model%imp_physics == 11 ) then - if (.not. Model%lgfdlmprad) then - cld_condensate(:,:,1) = tracer(:,1:Model%levs,Model%ntcw) - cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntrw) - cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntiw) - cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntsw) - cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntgl) - endif - do k=1,Model%levs - do i=1,NCOL - if (cld_condensate(i,k,1) < EPSQ ) cld_condensate(i,k,1) = 0.0 - enddo - enddo - endif - - if (Model%uni_cld) then - if (Model%effr_in) then - cldcov(:,:) = Tbd%phy_f3d(:,:,Model%indcld) - effr_l(:,:) = Tbd%phy_f3d(:,:,2) - effr_i(:,:) = Tbd%phy_f3d(:,:,3) - effr_r(:,:) = Tbd%phy_f3d(:,:,4) - effr_s(:,:) = Tbd%phy_f3d(:,:,5) - else - do k=1,model%levs - do i=1,ncol - cldcov(i,k) = Tbd%phy_f3d(i,k,Model%indcld) - enddo - enddo - endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) - if (Model%effr_in) then - effr_l(:,:) = Tbd%phy_f3d(:,:,1) - effr_i(:,:) = Tbd%phy_f3d(:,:,2) - effr_r(:,:) = Tbd%phy_f3d(:,:,3) - effr_s(:,:) = Tbd%phy_f3d(:,:,4) - endif - else ! neither of the other two cases - cldcov = 0.0 - endif - - - ! Add suspended convective cloud water to grid-scale cloud water - ! only for cloud fraction & radiation computation it is to enhance - ! cloudiness due to suspended convec cloud water for zhao/moorthi's - ! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes - if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 - delta_q(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,5) - cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,6) - cnv_c (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,7) - elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 - delta_q(1:ncol,1:Model%levs) = 0.0 - cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,Model%num_p3d+1) - cnv_c (1:ncol,1:Model%levs) = 0.0 - else ! all the rest - delta_q(1:ncol,1:Model%levs) = 0.0 - cnv_w (1:ncol,1:Model%levs) = 0.0 - cnv_c (1:ncol,1:Model%levs) = 0.0 - endif - - ! For zhao/moorthi's prognostic cloud scheme, add in convective cloud water to liquid-cloud water - if (Model%imp_physics == 99) then - cld_condensate(1:NCOL,1:Model%levs,1) = cld_condensate(1:NCOL,1:Model%levs,1) + cnv_w(1:NCOL,1:Model%levs) - endif - - ! ####################################################################################### - ! MICROPHYSICS - ! ####################################################################################### - ! *) zhao/moorthi's prognostic cloud scheme or unified cloud and/or with MG microphysics - if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then - if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni( & - p_lay/100., & ! IN - Pressure at model layer centers (mb) - p_lev/100., & ! IN - Pressure at model interfaces (mb) - t_lay, & ! IN - Temperature at layer centers (K) - tv_lay, & ! IN - Virtual temperature at layer centers (K) - cld_condensate, & ! IN - Cloud condensate amount (Model%ncnd types) () - Model%ncnd, & ! IN - Number of cloud condensate types () - Grid%xlat, & ! IN - Latitude (radians) - Grid%xlon, & ! IN - Longitude (radians) - Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (km) - deltaP/100., & ! IN - Layer thickness (hPa) - NCOL, & ! IN - Number of horizontal gridpoints - MODEL%LEVS, & ! IN - Number of model layers - MODEL%LEVS+1, & ! IN - Number of model levels - cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) - effr_l, & ! IN - Liquid-water effective radius (microns) - effr_i, & ! IN - Ice-water effective radius (microns) - effr_r, & ! IN - Rain-water effective radius (microns) - effr_s, & ! IN - Snow-water effective radius (microns) - Model%effr_in, & ! IN - Logical, if .true. use input effective radii - clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) - cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) - mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) - mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) - de_lgth) ! OUT - clouds decorrelation length (km) - else - call progcld1 ( & - p_lay/100., & ! IN - Pressure at model layer centers (mb) - p_lev/100., & ! IN - Pressure at model interfaces (mb) - t_lay, & ! IN - Temperature at layer centers (K) - tv_lay, & ! IN - Virtual temperature at layer centers (K) - q_lay, & ! IN - Specific humidity at layer center (kg/kg) - qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) - relhum, & ! IN - Relative humidity at layer center (1) - cld_condensate(:,:,1),& ! IN - Cloud condensate amount () - ! (Zhao: liq+convective; MG: liq+ice+convective) - Grid%xlat, & ! IN - Latitude (radians) - Grid%xlon, & ! IN - Longitude (radians) - Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (km) - deltaP/100., & ! IN - Layer thickness (hPa) - NCOL, & ! IN - Number of horizontal gridpoints - MODEL%LEVS, & ! IN - Number of model layers - MODEL%LEVS+1, & ! IN - Number of model levels - Model%uni_cld, & ! IN - True for cloud fraction from shoc - Model%lmfshal, & ! IN - True for mass flux shallow convection - Model%lmfdeep2, & ! IN - True for mass flux deep convection - cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) - effr_l, & ! IN - Liquid-water effective radius (microns) - effr_i, & ! IN - Ice-water effective radius (microns) - effr_r, & ! IN - Rain-water effective radius (microns) - effr_s, & ! IN - Snow-water effective radius (microns) - Model%effr_in, & ! IN - Logical, if .true. use input effective radii - clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) - cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) - mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) - mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) - de_lgth) ! OUT - clouds decorrelation length (km) - endif - ! *) zhao/moorthi's prognostic cloud+pdfcld - elseif(Model%imp_physics == 98) then - call progcld3 ( & - p_lay/100., & ! IN - Pressure at model layer centers (mb) - p_lev/100., & ! IN - Pressure at model interfaces (mb) - t_lay, & ! IN - Temperature at layer centers (K) - tv_lay, & ! IN - Virtual temperature at layer centers (K) - q_lay, & ! IN - Specific humidity at layer center (kg/kg) - qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) - relhum, & ! IN - Relative humidity at layer center (1) - cld_condensate(:,:,1),& ! IN - Cloud condensate amount (only h20) () - cnv_w, & ! IN - Layer convective cloud condensate - cnv_c, & ! IN - Layer convective cloud cover - Grid%xlat, & ! IN - Latitude (radians) - Grid%xlon, & ! IN - Longitude (radians) - Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (km) - deltaP/100., & ! IN - Layer thickness (hPa) - NCOL, & ! IN - Number of horizontal gridpoints - MODEL%LEVS, & ! IN - Number of model layers - MODEL%LEVS+1, & ! IN - Number of model levels - delta_q, & ! IN - Total water distribution width - Model%sup, & ! IN - ??? Supersaturation? - Model%kdt, & ! IN - ??? - Model%me, & ! IN - ??? NOT USED IN PROGCLD3() - clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) - cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) - mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) - mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) - de_lgth) ! OUT - clouds decorrelation length (km) - ! *) GFDL cloud scheme - elseif (Model%imp_physics == 11) then - if (.not.Model%lgfdlmprad) then - call progcld4 ( & - p_lay/100., & ! IN - Pressure at model layer centers (mb) - p_lev/100., & ! IN - Pressure at model interfaces (mb) - t_lay, & ! IN - Temperature at layer centers (K) - tv_lay, & ! IN - Virtual temperature at layer centers (K) - q_lay, & ! IN - Specific humidity at layer center (kg/kg) - qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) - relhum, & ! IN - Relative humidity at layer center (1) - cld_condensate(:,:,1),& ! IN - Cloud condensate amount (only h20) () - cnv_w, & ! IN - Layer convective cloud condensate - cnv_c, & ! IN - Layer convective cloud cover - Grid%xlat, & ! IN - Latitude (radians) - Grid%xlon, & ! IN - Longitude (radians) - Sfcprop%slmsk, & ! IN - Land/Sea mask () - cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) - deltaZ, & ! IN - Layer thickness (km) - deltaP/100., & ! IN - Layer thickness (hPa) - NCOL, & ! IN - Number of horizontal gridpoints - MODEL%LEVS, & ! IN - Number of model layers - MODEL%LEVS+1, & ! IN - Number of model levels - clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) - cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) - mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) - mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) - de_lgth) ! OUT - clouds decorrelation length (km) - else - call progclduni( & - p_lay/100., & ! IN - Pressure at model layer centers (mb) - p_lev/100., & ! IN - Pressure at model interfaces (mb) - t_lay, & ! IN - Temperature at layer centers (K) - tv_lay, & ! IN - Virtual temperature at layer centers (K) - cld_condensate, & ! IN - Cloud condensate amount (ncndl types) () - ncndl, & ! IN - Number of cloud condensate types () - Grid%xlat, & ! IN - Latitude (radians) - Grid%xlon, & ! IN - Longitude (radians) - Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (km) - deltaP/100., & ! IN - Layer thickness (hPa) - NCOL, & ! IN - Number of horizontal gridpoints - MODEL%LEVS, & ! IN - Number of model layers - MODEL%LEVS+1, & ! IN - Number of model levels - cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) - effr_l, & ! IN - Liquid-water effective radius (microns) - effr_i, & ! IN - Ice-water effective radius (microns) - effr_r, & ! IN - Rain-water effective radius (microns) - effr_s, & ! IN - Snow-water effective radius (microns) - Model%effr_in, & ! IN - Logical, if .true. use input effective radii - clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) - cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) - mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) - mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) - de_lgth) ! OUT - clouds decorrelation length (km) - endif - ! *) Thompson / WSM6 cloud micrphysics scheme - elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then - - call progcld5 ( & ! IN - p_lay/100., & ! IN - Pressure at model layer centers (mb) - p_lev/100., & ! IN - Pressure at model interfaces (mb) - t_lay, & ! IN - Temperature at layer centers (K) - q_lay, & ! IN - Specific humidity at layer center (kg/kg) - qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) - relhum, & ! IN - Relative humidity at layer center (1) - tracer, & ! IN - Cloud condensate amount in layer by type () - Grid%xlat, & ! IN - Latitude (radians) - Grid%xlon, & ! IN - Longitude (radians) - Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (km) - deltaP/100., & ! IN - Layer thickness (hPa) - Model%ntrac-1, & ! IN - Number of tracers - Model%ntcw-1, & ! IN - Tracer index for cloud condensate (or liquid water) - Model%ntiw-1, & ! IN - Tracer index for ice - Model%ntrw-1, & ! IN - Tracer index for rain - Model%ntsw-1, & ! IN - Tracer index for snow - Model%ntgl-1, & ! IN - Tracer index for groupel - NCOL, & ! IN - Number of horizontal gridpoints - MODEL%LEVS, & ! IN - Number of model layers - MODEL%LEVS+1, & ! IN - Number of model levels - Model%uni_cld, & ! IN - True for cloud fraction from shoc - Model%lmfshal, & ! IN - True for mass flux shallow convection - Model%lmfdeep2, & ! IN - True for mass flux deep convection - cldcov(:,1:Model%levs), & ! IN - Layer cloud fraction (used if uni_cld=.true.) - Tbd%phy_f3d(:,:,1), & ! IN - Liquid-water effective radius (microns) - Tbd%phy_f3d(:,:,2), & ! IN - Ice-water effective radius (microns) - Tbd%phy_f3d(:,:,3), & ! IN - LSnow-water effective radius (microns) - clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) - cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) - mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) - mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) - de_lgth) ! OUT - clouds decorrelation length (km) - endif ! end if_imp_physics - end subroutine cloud_microphysics - ! end module GFS_rrtmgp_pre diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index f9c882fa7..980190b5a 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = inout optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F [active_gases_array] standard_name = list_of_active_gases_used_by_RRTMGP long_name = list of active gases used by RRTMGP @@ -88,22 +80,6 @@ type = GFS_tbd_type intent = in optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = instance of derived type GFS_coupling_type - units = DDT - dimensions = () - type = GFS_coupling_type - intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F [ncol] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -138,15 +114,6 @@ kind = kind_phys intent = out optional = F -[sec_diff_byband] - standard_name = secant_of_diffusivity_angle_each_RRTMGP_LW_band - long_name = secant of diffusivity angle in each RRTMGP LW band - units = none - dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation @@ -219,135 +186,38 @@ kind = kind_phys intent = out optional = F -[tracer] - standard_name = chemical_tracers - long_name = chemical tracers - units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = out - optional = F -[cld_frac] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[cld_lwp] - standard_name = cloud_liquid_water_path - long_name = layer cloud liquid water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[cld_reliq] - standard_name = mean_effective_radius_for_liquid_cloud - long_name = mean effective radius for liquid cloud - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[cld_iwp] - standard_name = cloud_ice_water_path - long_name = layer cloud ice water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[cld_reice] - standard_name = mean_effective_radius_for_ice_cloud - long_name = mean effective radius for ice cloud - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[cld_swp] - standard_name = cloud_snow_water_path - long_name = layer cloud snow water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[cld_resnow] - standard_name = mean_effective_radius_for_snow_flake - long_name = mean effective radius for snow cloud - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[cld_rwp] - standard_name = cloud_rain_water_path - long_name = layer cloud rain water path - units = g m-2 +[qs_lay] + standard_name = saturation_mixing_ratio + long_name = saturation mixing ratio + units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F -[cld_rerain] - standard_name = mean_effective_radius_for_rain_drop - long_name = mean effective radius for rain cloud - units = micron +[q_lay] + standard_name = water_vapor_mixing_ratio + long_name = water mixing ratio + units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_dimension,3) - type = integer - intent = out - optional = F -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_dimension,3) - type = integer - intent = out - optional = F -[de_lgth] - standard_name = cloud_decorrelation_length - long_name = cloud decorrelation length - units = km - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[overlap_param] - standard_name = cloud_overlap_param - long_name = cloud overlap parameter - units = km +[deltaZ] + standard_name = layer_thickness + long_name = layer_thickness + units = m dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out - optional = F -[cldsa] - standard_name = cloud_area_fraction_for_radiation - long_name = fraction of clouds for low, middle, high, total and BL - units = frac - dimensions = (horizontal_dimension,5) + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 45bc4397b..894450773 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -120,10 +120,8 @@ subroutine GFS_rrtmgp_setup_init (Model, si, levr, ictm, isol, ico2, & ' ccnorm=',ccnorm,' norad_precip=',norad_precip endif - ! Hack for using RRTMGP-Sw and RRTMG-LW - if (.not. Model%do_GPsw_Glw) then - call radinit( si, levr, imp_physics, me ) - endif + + call radinit( Model, si, levr, imp_physics, me ) if ( me == 0 ) then print *,' Radiation sub-cloud initial seed =',ipsd0, & @@ -199,7 +197,7 @@ end subroutine GFS_rrtmgp_setup_finalize ! Private functions - subroutine radinit( si, NLAY, imp_physics, me ) + subroutine radinit( Model, si, NLAY, imp_physics, me ) !................................... ! --- inputs: @@ -316,13 +314,14 @@ subroutine radinit( si, NLAY, imp_physics, me ) use module_radiation_aerosols, only : aer_init use module_radiation_gases, only : gas_init use module_radiation_surface, only : sfc_init - use module_radiation_clouds, only : cld_init + use GFS_cloud_diagnostics, only : hml_cloud_diagnostics_initialize implicit none ! --- inputs: integer, intent(in) :: NLAY, me, imp_physics - + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters real (kind=kind_phys), intent(in) :: si(:) ! --- outputs: (none, to module variables) @@ -409,7 +408,7 @@ subroutine radinit( si, NLAY, imp_physics, me ) call aer_init ( NLAY, me ) ! --- ... aerosols initialization routine call gas_init ( me ) ! --- ... co2 and other gases initialization routine call sfc_init ( me ) ! --- ... surface initialization routine - call cld_init ( si, NLAY, imp_physics, me) ! --- ... cloud initialization routine + call hml_cloud_diagnostics_initialize( Model, NLAY, me, si) return !................................... diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 583fa9ee2..d4873799b 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -31,7 +31,7 @@ end subroutine rrtmgp_lw_rte_init !! subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_gas_props, & sfc_emiss_byband, sources, lw_optical_props_clrsky, lw_optical_props_clouds, & - lw_optical_props_aerosol, secdiff, nGauss_angles, fluxlwUP_allsky, fluxlwDOWN_allsky,& + lw_optical_props_aerosol, nGauss_angles, fluxlwUP_allsky, fluxlwDOWN_allsky,& fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlwb, errmsg, errflg) ! Inputs @@ -59,8 +59,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g type(ty_optical_props_1scl),intent(in) :: & lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - real(kind_phys), dimension(lw_gas_props%get_nband(),ncol),intent(in) :: & - secdiff ! Outputs real(kind_phys), dimension(ncol,nLev+1), intent(out) :: & fluxlwUP_allsky, & ! All-sky flux (W/m2) @@ -110,13 +108,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g ! Add aerosol optics to gas optics call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_aerosol%increment(lw_optical_props_clrsky)) - ! Apply diffusivity angle adjustment (RRTMG legacy) - do iCol=1,nCol - do iBand=1,lw_gas_props%get_nband() - lw_optical_props_clrsky%tau(iCol,1:nLev,iBand) = lw_optical_props_clrsky%tau(iCol,1:nLev,iBand)*secdiff(iBand,iCol) - enddo - enddo - ! Call RTE solver call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & lw_optical_props_clrsky, & ! IN - optical-properties @@ -132,13 +123,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g ! ! All-sky fluxes ! - - ! Apply diffusivity angle adjustment (RRTMG legacy) - !do iCol=1,nCol - ! do iBand=1,lw_gas_props%get_nband() - ! lw_optical_props_clouds%tau(iCol,1:nLev,iBand) = lw_optical_props_clouds%tau(iCol,1:nLev,iBand)*secdiff(iBand,iCol) - ! enddo - !enddo ! Add cloud optics to clear-sky optics call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_clouds%increment(lw_optical_props_clrsky)) diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index a8426bc15..a2350b4c2 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -127,15 +127,6 @@ kind = kind_phys intent = in optional = T -[secdiff] - standard_name = secant_of_diffusivity_angle_each_RRTMGP_LW_band - long_name = secant of diffusivity angle in each RRTMGP LW band - units = none - dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [fluxlwUP_allsky] standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile From 187a69c92a501b46556815edea439ba43c463168 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 15 May 2020 10:43:16 -0600 Subject: [PATCH 154/404] Bugfixes for cu_gf_driver, cu_ntiedtke and module_MYNNPBL_wrapper related to lheatstrg --- physics/cu_gf_driver.meta | 8 ++--- physics/cu_ntiedtke.meta | 8 ++--- physics/module_MYNNPBL_wrapper.F90 | 37 +++++++++++++++++---- physics/module_MYNNPBL_wrapper.meta | 51 +++++++++++++++++++++++++++-- 4 files changed, 88 insertions(+), 16 deletions(-) diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index 8d5e3a0c8..d89450273 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -261,8 +261,8 @@ intent = in optional = F [hfx2] - standard_name = kinematic_surface_upward_sensible_heat_flux - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 dimensions = (horizontal_dimension) type = real @@ -270,8 +270,8 @@ intent = in optional = F [qfx2] - standard_name = kinematic_surface_upward_latent_heat_flux - long_name = kinematic surface upward latent heat flux + standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 dimensions = (horizontal_dimension) type = real diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 4208b6e46..6dcc54a15 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -171,8 +171,8 @@ intent = in optional = F [evap] - standard_name = kinematic_surface_upward_latent_heat_flux - long_name = kinematic surface upward latent heat flux + standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 dimensions = (horizontal_dimension) type = real @@ -180,8 +180,8 @@ intent = in optional = F [hfx] - standard_name = kinematic_surface_upward_sensible_heat_flux - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 dimensions = (horizontal_dimension) type = real diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index d62a0f71d..3097d38d5 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -10,7 +10,23 @@ MODULE mynnedmf_wrapper contains - subroutine mynnedmf_wrapper_init () + subroutine mynnedmf_wrapper_init (lheatstrg, errmsg, errflg) + implicit none + + logical, intent(in) :: lheatstrg + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (lheatstrg) then + errmsg = 'Logic error: lheatstrg not implemented for MYNN PBL' + errflg = 1 + return + end if + end subroutine mynnedmf_wrapper_init subroutine mynnedmf_wrapper_finalize () @@ -36,8 +52,8 @@ SUBROUTINE mynnedmf_wrapper_run( & & qgrs_ice_aer_num_conc, & & prsl,exner, & & slmsk,tsurf,qsfc,ps, & - & ust,ch,hflx,qflx,wspd,rb, & - & dtsfc1,dqsfc1, & + & ust,ch,hflx,qflx,hflxq,qflxq, & + & wspd,rb,dtsfc1,dqsfc1, & & dtsfci_diag,dqsfci_diag, & & dtsfc_diag,dqsfc_diag, & & recmol, & @@ -48,7 +64,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & edmf_a,edmf_w,edmf_qt, & & edmf_thl,edmf_ent,edmf_qc, & & sub_thl,sub_sqv,det_thl,det_sqv,& - & nupdraft,maxMF,ktop_shallow, & + & nupdraft,maxMF,ktop_plume, & & dudt, dvdt, dtdt, & & dqdt_water_vapor, dqdt_liquid_cloud, & & dqdt_ice_cloud, dqdt_ozone, & @@ -153,7 +169,7 @@ SUBROUTINE mynnedmf_wrapper_run( & character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - + LOGICAL, INTENT(IN) :: lssav, ldiag3d, lsidea, qdiag3d ! NAMELIST OPTIONS (INPUT): LOGICAL, INTENT(IN) :: bl_mynn_tkeadvect, ltaerosol, & @@ -252,13 +268,16 @@ SUBROUTINE mynnedmf_wrapper_run( & real(kind=kind_phys), dimension(im), intent(in) :: & & dx,zorl,slmsk,tsurf,qsfc,ps, & & hflx,qflx,ust,wspd,rb,recmol + real(kind=kind_phys), dimension(im), intent(out) :: & + & hflxq, evapq + real(kind=kind_phys), dimension(im), intent(inout) :: & & pblh real(kind=kind_phys), dimension(im), intent(out) :: & & ch,dtsfc1,dqsfc1, & & dtsfci_diag,dqsfci_diag,dtsfc_diag,dqsfc_diag, & & maxMF - integer, dimension(im), intent(inout) :: & + integer, dimension(im), intent(inout) :: & & kpbl,nupdraft,ktop_plume !LOCAL @@ -287,6 +306,12 @@ SUBROUTINE mynnedmf_wrapper_run( & !print*,"in MYNN, initflag=",initflag endif + ! Set "kinematic surface upward latent/sensible heat flux reduced by + ! surface roughness" to kinematic surface upward latent/sensible heat flux, + ! because the lheatstrg capability in GFS_PBL_generic_pre is not implemented + hflxq = hflx + qflxq = qflx + ! Assign variables for each microphysics scheme if (imp_physics == imp_physics_wsm6) then ! WSM6 diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 1152d3467..7db6c2621 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -1,3 +1,32 @@ +[ccpp-arg-table] + name = mynnedmf_wrapper_init + type = scheme +[lheatstrg] + standard_name = flag_for_canopy_heat_storage + long_name = flag for canopy heat storage parameterization + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + [ccpp-arg-table] name = mynnedmf_wrapper_run type = scheme @@ -305,7 +334,7 @@ intent = out optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + standard_name = kinematic_surface_upward_sensible_heat_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_dimension) @@ -313,8 +342,17 @@ kind = kind_phys intent = in optional = F +[hflxq] + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward sensible heat flux reduced by surface roughness + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [qflx] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + standard_name = kinematic_surface_upward_latent_heat_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_dimension) @@ -322,6 +360,15 @@ kind = kind_phys intent = in optional = F +[qflxq] + standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward latent heat flux reduced by surface roughness + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [wspd] standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level From 59d06ab27fbda4d690b50936ae49a3c97fa3a0a8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 15 May 2020 10:49:00 -0600 Subject: [PATCH 155/404] Bug fix and some housekeeping. Working for both EMC SDFs. --- physics/GFS_cloud_diagnostics.F90 | 21 ++++++++---- physics/GFS_cloud_diagnostics.meta | 21 ++++++++---- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 16 +++------ physics/GFS_rrtmgp_gfdlmp_pre.meta | 55 +----------------------------- physics/GFS_rrtmgp_pre.F90 | 50 ++++++++++++--------------- physics/GFS_rrtmgp_pre.meta | 35 ------------------- 6 files changed, 57 insertions(+), 141 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index b497e5102..83f43356d 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -1,9 +1,9 @@ module GFS_cloud_diagnostics use machine, only: kind_phys - use physcons, only: con_pi + use physcons, only: con_pi, con_rog use physparam, only: iovrlw, iovrsw, ivflip, icldflg use GFS_typedefs, only: GFS_control_type - + ! Module parameters (imported directly from radiation_cloud.f) integer, parameter :: & NF_CLDS = 9, & ! Number of fields in cloud array @@ -37,8 +37,8 @@ end subroutine GFS_cloud_diagnostics_init !! \section arg_table_GFS_cloud_diagnostics_run !! \htmlinclude GFS_cloud_diagnostics_run.html !! - subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, deltaZ, cld_frac, & - mbota, mtopa, cldsa, de_lgth, overlap_param, errmsg, errflg) + subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_frac, & + p_lev, mbota, mtopa, cldsa, de_lgth, overlap_param, errmsg, errflg) implicit none ! Inputs @@ -51,8 +51,10 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, deltaZ, cld_ lat ! Latitude real(kind_phys), dimension(nCol,nLev), intent(in) :: & p_lay, & ! Pressure at model-layer - deltaZ, & ! Layer thickness at model-layers + tv_lay, & ! Virtual temperature cld_frac ! Total cloud fraction + real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + p_lev ! Pressure at model interfaces ! Outputs character(len=*), intent(out) :: & @@ -74,7 +76,7 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, deltaZ, cld_ real(kind_phys) :: tem1 real(kind_phys),dimension(nCol,NK_CLDS+1) :: ptop1 real(kind_phys),dimension(nCol) :: rlat - real(kind_phys),dimension(nCol,nLev) :: cldcnv + real(kind_phys),dimension(nCol,nLev) :: cldcnv, deltaZ if (.not. (Model%lsswr .or. Model%lslwr)) return @@ -92,6 +94,13 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, deltaZ, cld_ ptop1(i,icld) = ptopc(icld,1) + tem1*max( 0.0, 4.0*rlat(i)-1.0 ) enddo enddo + + ! Compute layer-thickness + do iCol=1,nCol + do iLay=1,nLev + deltaZ(iCol,iLay) = (con_rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + enddo + enddo ! Estimate clouds decorrelation length in km ! *this is only a tentative test, need to consider change later* diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index 84ddb03c2..8967ba386 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -43,15 +43,15 @@ kind = kind_phys intent = in optional = F -[deltaZ] - standard_name = layer_thickness - long_name = layer_thickness - units = m +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in - optional = F + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction @@ -60,7 +60,16 @@ type = real kind = kind_phys intent = in - optional = F + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F [mtopa] standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 509ebb4e6..27e541160 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -27,8 +27,8 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_init !! \section arg_table_GFS_rrtmgp_gfdlmp_pre_run !! \htmlinclude GFS_rrtmgp_gfdlmp_pre_run.html !! - subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lon, lat, p_lay, & - p_lev, t_lay, t_lev, tv_lay, relhum, qs_lay, q_lay, deltaZ, tracer, & + subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, p_lev, & + t_lay, tv_lay, tracer, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & cld_rerain, errmsg, errflg) implicit none @@ -43,19 +43,13 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lon, lat, p_ nLev ! Number of vertical-layers real(kind_phys), dimension(nCol), intent(in) :: & slmsk, & ! Land/sea/sea-ice mask - lon, & ! Longitude lat ! Latitude real(kind_phys), dimension(nCol,nLev), intent(in) :: & p_lay, & ! Pressure at model-layer (Pa) t_lay, & ! Temperature at model layer (K) - tv_lay, & ! Virtual temperature at model-layers (K) - relhum, & ! Relative-humidity at model-layers - qs_lay, & ! Saturation mixing-ratio at model-layers (kg/kg) - q_lay, & ! Water-vapor mixing-ratio at model-layers (kg/kg) - deltaZ ! Layer thickness at model-layers (km) + tv_lay ! Virtual temperature at model-layers (K) real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & - p_lev, & ! Pressure at model-level interfaces (Pa) - t_lev ! Temperature at model-level interfaces (K) + p_lev ! Pressure at model-level interfaces (Pa) real(kind_phys), dimension(nCol, nLev, Model%ntrac),intent(in) :: & tracer ! Cloud condensate amount in layer by type () @@ -124,7 +118,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lon, lat, p_ endif ! Cloud-fraction - cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nCol,Model%ntclamt) + cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) ! Set really tiny suspended particle amounts to clear do l=1,ncndl diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 5b792bc6c..a9f61739e 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -49,15 +49,7 @@ dimensions = (horizontal_dimension) type = real intent = in - kind = kind_phys -[lon] - standard_name = longitude - long_name = longitude - units = radians - dimensions = (horizontal_dimension) - type = real - intent = in - kind = kind_phys + kind = kind_phys [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation @@ -85,15 +77,6 @@ kind = kind_phys intent = in optional = F -[t_lev] - standard_name = air_temperature_at_interface_for_RRTMGP - long_name = air temperature at vertical interface for radiation calculation - units = K - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F [tv_lay] standard_name = virtual_temperature long_name = layer virtual temperature @@ -103,42 +86,6 @@ kind = kind_phys intent = in optional = F -[relhum] - standard_name = relative_humidity - long_name = layer relative humidity - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[qs_lay] - standard_name = saturation_mixing_ratio - long_name = saturation mixing ratio - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[q_lay] - standard_name = water_vapor_mixing_ratio - long_name = water mixing ratio - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[deltaZ] - standard_name = layer_thickness - long_name = layer_thickness - units = m - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index f3f2f3dc4..7c3609af4 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -180,10 +180,9 @@ end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run !! \htmlinclude GFS_rrtmgp_pre_run.html !! - subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Sfcprop, Tbd, ncol, lw_gas_props, & - active_gases_array, & ! IN - raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, tv_lay, relhum, qs_lay, q_lay, & ! OUT - deltaZ, tracer, gas_concentrations, errmsg, errflg) + subroutine GFS_rrtmgp_pre_run(Model, Grid, Statein, Sfcprop, Tbd, ncol, active_gases_array, & + raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, tv_lay, relhum, tracer, & + gas_concentrations, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -198,53 +197,47 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Sfcprop, Tbd, ncol, lw_gas_ Tbd ! DDT: FV3-GFS data not yet assigned to a defined container integer, intent(in) :: & ncol ! Number of horizontal grid points - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: longwave spectral information character(len=*),dimension(Model%ngases), intent(in) :: & active_gases_array ! Character array containing trace gases to include in RRTMGP ! Outputs - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - p_lay, & ! Pressure at model-layer - t_lay ! Temperature at model layer - real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & - p_lev, & ! Pressure at model-interface - t_lev ! Temperature at model-interface + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag real(kind_phys), intent(out) :: & raddt ! Radiation time-step real(kind_phys), dimension(ncol), intent(out) :: & tsfg, & ! Ground temperature - tsfa ! Skin temperature - type(ty_gas_concs),intent(out) :: & - gas_concentrations ! RRTMGP DDT: gas volumne mixing ratios - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error flag - real(kind_phys), dimension(ncol,Model%levs),intent(out) :: & + tsfa ! Skin temperature + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + p_lay, & ! Pressure at model-layer + t_lay, & ! Temperature at model layer tv_lay, & ! Virtual temperature at model-layers - relhum, & ! Relative-humidity at model-layers - qs_lay, & ! Saturation mixing-ratio at model-layers - q_lay, & ! Water-vapor mixing-ratio at model-layers - deltaZ ! Layer thickness at model-layers + relhum ! Relative-humidity at model-layers + real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & + p_lev, & ! Pressure at model-interface + t_lev ! Temperature at model-interface real(kind_phys), dimension(ncol, Model%levs, Model%ntrac),intent(out) :: & tracer ! Array containing trace gases - + type(ty_gas_concs),intent(out) :: & + gas_concentrations ! RRTMGP DDT: gas volumne mixing ratios + ! Local variables integer :: i, j, iCol, iBand, iSFC, iTOA, iLay logical :: top_at_1 real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs, tem1, tem2 real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol, Model%levs) :: o3_lay + real(kind_phys), dimension(ncol, Model%levs) :: o3_lay, qs_lay, q_lay real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr + if (.not. (Model%lsswr .or. Model%lslwr)) return + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. (Model%lsswr .or. Model%lslwr)) return - ! ####################################################################################### ! What is vertical ordering? ! ####################################################################################### @@ -295,7 +288,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Sfcprop, Tbd, ncol, lw_gas_ relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(QMIN, q_lay(iCol,iLay))/qs ) ) qs_lay(iCol,iLay) = qs tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + fvirt*q_lay(iCol,iLay)) - deltaZ(iCol,iLay) = (rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) enddo enddo diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 980190b5a..cf0195a39 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -88,14 +88,6 @@ type = integer intent = in optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [active_gases_array] standard_name = list_of_active_gases_used_by_RRTMGP long_name = list of active gases used by RRTMGP @@ -186,33 +178,6 @@ kind = kind_phys intent = out optional = F -[qs_lay] - standard_name = saturation_mixing_ratio - long_name = saturation mixing ratio - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[q_lay] - standard_name = water_vapor_mixing_ratio - long_name = water mixing ratio - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[deltaZ] - standard_name = layer_thickness - long_name = layer_thickness - units = m - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers From 6d2cdfb267c5c6d066d9f4f3e4df888d3cd18867 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 15 May 2020 14:25:11 -0600 Subject: [PATCH 156/404] Fix bugs from merge process --- physics/GFS_suite_interstitial.F90 | 2 +- physics/module_MYNNPBL_wrapper.F90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 6b5083401..3d22cf33b 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -463,7 +463,7 @@ end subroutine GFS_suite_interstitial_3_finalize subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, & satmedmf, trans_trac, do_shoc, ltaerosol, ntrac, ntcw, & ntiw, ntclamt, ntrw, ntsw, ntrnc, ntsnc, ntgl, ntgnc, & - xlon, xlat, gq0, imp_physics, imp_physics_mg, & + xlon, xlat, gt0, gq0, imp_physics, imp_physics_mg, & imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, & imp_physics_gfdl, imp_physics_thompson, & imp_physics_wsm6, imp_physics_fer_hires, prsi, & diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 3097d38d5..b215e5e62 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -269,7 +269,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & dx,zorl,slmsk,tsurf,qsfc,ps, & & hflx,qflx,ust,wspd,rb,recmol real(kind=kind_phys), dimension(im), intent(out) :: & - & hflxq, evapq + & hflxq, qflxq real(kind=kind_phys), dimension(im), intent(inout) :: & & pblh From d9c5e06bddb2ad529f169b34248a6054a46abf26 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 15 May 2020 14:46:12 -0600 Subject: [PATCH 157/404] Update GFS_rrtmgp_pre.F90 with progcld changes, update GFS_rrtmgp_setup.meta with standard name changes --- physics/GFS_rrtmgp_pre.F90 | 44 ++++++++++++++++++++++++++++++++--- physics/GFS_rrtmgp_setup.meta | 16 ++++++------- 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 1344f269c..0835f9e9b 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -37,7 +37,8 @@ module GFS_rrtmgp_pre progcld1, & ! Zhao/Moorthi's prognostic cloud scheme progcld3, & ! Zhao/Moorthi's prognostic cloud+pdfcld progcld4, & ! GFDL cloud scheme - progcld5, & ! Thompson / WSM6 cloud micrphysics scheme + progcld5, & ! Ferrier Aligo microphysics scheme + progcld6, & ! Thompson cloud microphysics scheme progclduni ! Unified cloud-scheme use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) @@ -740,10 +741,47 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) de_lgth) ! OUT - clouds decorrelation length (km) endif - ! *) Thompson / WSM6 cloud micrphysics scheme - elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then + ! *) Ferrier-Aligo cloud microphysics scheme + elseif(Model%imp_physics == 15) then call progcld5 ( & ! IN + p_lay/100., & ! IN - Pressure at model layer centers (mb) + p_lev/100., & ! IN - Pressure at model interfaces (mb) + t_lay, & ! IN - Temperature at layer centers (K) + tv_lay, & ! IN - Virtual temperature at layer centers (K) + q_lay, & ! IN - Specific humidity at layer center (kg/kg) + qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) + relhum, & ! IN - Relative humidity at layer center (1) + tracer, & ! IN - Cloud condensate amount in layer by type () + Grid%xlat, & ! IN - Latitude (radians) + Grid%xlon, & ! IN - Longitude (radians) + Sfcprop%slmsk, & ! IN - Land/Sea mask () + deltaZ, & ! IN - Layer thickness (km) + deltaP/100., & ! IN - Layer thickness (hPa) + Model%ntrac-1, & ! IN - Number of tracers + Model%ntcw-1, & ! IN - Tracer index for cloud condensate (or liquid water) + Model%ntiw-1, & ! IN - Tracer index for ice + Model%ntrw-1, & ! IN - Tracer index for rain + NCOL, & ! IN - Number of horizontal gridpoints + MODEL%LEVS, & ! IN - Number of model layers + MODEL%LEVS+1, & ! IN - Number of model levels + Model%icloud, & ! IN - cloud effect to the optical depth and cloud fraction in radiation + Model%uni_cld, & ! IN - True for cloud fraction from shoc + Model%lmfshal, & ! IN - True for mass flux shallow convection + Model%lmfdeep2, & ! IN - True for mass flux deep convection + cldcov(:,1:Model%levs), & ! IN - Layer cloud fraction (used if uni_cld=.true.) + Tbd%phy_f3d(:,:,1), & ! IN - Liquid-water effective radius (microns) + Tbd%phy_f3d(:,:,2), & ! IN - Ice-water effective radius (microns) + Tbd%phy_f3d(:,:,3), & ! IN - LSnow-water effective radius (microns) + clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) + cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) + mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) + mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) + de_lgth) ! OUT - clouds decorrelation length (km) + ! *) Thompson cloud microphysics scheme + elseif(Model%imp_physics == 8) then + + call progcld6 ( & ! IN p_lay/100., & ! IN - Pressure at model layer centers (mb) p_lev/100., & ! IN - Pressure at model interfaces (mb) t_lay, & ! IN - Temperature at layer centers (K) diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index e40ad865a..e419c7252 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -99,32 +99,32 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation - long_name = sw: max-random overlap clouds + standard_name = flag_for_cloud_overlapping_method_for_shortwave_radiation + long_name = control flag for cloud overlapping method for SW units = flag dimensions = () type = integer intent = in optional = F [iovr_lw] - standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation - long_name = lw: max-random overlap clouds + standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation + long_name = control flag for cloud overlapping method for LW units = flag dimensions = () type = integer intent = in optional = F [isubc_sw] - standard_name = flag_for_sw_clouds_without_sub_grid_approximation - long_name = flag for sw clouds without sub-grid approximation + standard_name = flag_for_sw_clouds_grid_approximation + long_name = flag for sw clouds sub-grid approximation units = flag dimensions = () type = integer intent = in optional = F [isubc_lw] - standard_name = flag_for_lw_clouds_without_sub_grid_approximation - long_name = flag for lw clouds without sub-grid approximation + standard_name = flag_for_lw_clouds_sub_grid_approximation + long_name = flag for lw clouds sub-grid approximation units = flag dimensions = () type = integer From 506c29aae9c960d2679ee79dca2ba2fe2d6941e0 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 18 May 2020 11:30:18 -0600 Subject: [PATCH 158/404] Housekeeping --- physics/GFS_cloud_diagnostics.F90 | 828 +++++++++++++++--------------- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 207 ++++---- 2 files changed, 518 insertions(+), 517 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index 83f43356d..c77bac5ce 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -1,108 +1,112 @@ +! ######################################################################################## +! This module contains code to produce the UFS High/Mid/Low cloud-diagnostics. +! This was bundled together with the prognostic cloud modules within the RRTMG implementation. +! For the RRTMGP implementation we propose to keep these diagnostics independent. +! ######################################################################################## module GFS_cloud_diagnostics use machine, only: kind_phys use physcons, only: con_pi, con_rog use physparam, only: iovrlw, iovrsw, ivflip, icldflg use GFS_typedefs, only: GFS_control_type - + ! Module parameters (imported directly from radiation_cloud.f) integer, parameter :: & - NF_CLDS = 9, & ! Number of fields in cloud array - NK_CLDS = 3 ! Number of cloud vertical domains + NF_CLDS = 9, & ! Number of fields in cloud array + NK_CLDS = 3 ! Number of cloud vertical domains real(kind_phys), parameter :: & - climit = 0.001, & ! Lowest allowable cloud-fraction - ovcst = 1.0 - 1.0e-8 ! Overcast cloud-fraction 0.999999999 + climit = 0.001, & ! Lowest allowable cloud-fraction + ovcst = 1.0 - 1.0e-8 ! Overcast cloud-fraction 0.999999999 real(kind_phys), parameter, dimension(NK_CLDS+1,2) :: & - ptopc = reshape(source=(/ 1050., 650., 400., 0.0, 1050., 750., 500., 0.0 /), & - shape=(/NK_CLDS+1,2/)) + ptopc = reshape(source=(/ 1050., 650., 400., 0.0, 1050., 750., 500., 0.0 /), & + shape=(/NK_CLDS+1,2/)) ! Version tag and last revision date - character(40), parameter :: VTAGCLD='NCEP-Radiation_clouds v5.1 Nov 2012 ' + character(40), parameter :: VTAGCLD='UFS-cloud-diagnostics vX.x May 2020 ' ! Module variables integer :: & - iovr = 1, & ! Cloud overlap used for diagnostic HML cloud outputs - llyr = 2 ! Upper limit of boundary layer clouds - + iovr = 1, & ! Cloud overlap used for diagnostic HML cloud outputs + llyr = 2 ! Upper limit of boundary layer clouds public GFS_cloud_diagnostics_run, GFS_cloud_diagnostics_init,& - GFS_cloud_diagnostics_finalize, hml_cloud_diagnostics_init + GFS_cloud_diagnostics_finalize, hml_cloud_diagnostics_init contains ! ###################################################################################### ! ###################################################################################### subroutine GFS_cloud_diagnostics_init() end subroutine GFS_cloud_diagnostics_init - + ! ###################################################################################### ! ###################################################################################### !! \section arg_table_GFS_cloud_diagnostics_run !! \htmlinclude GFS_cloud_diagnostics_run.html !! subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_frac, & - p_lev, mbota, mtopa, cldsa, de_lgth, overlap_param, errmsg, errflg) + p_lev, mbota, mtopa, cldsa, de_lgth, overlap_param, errmsg, errflg) implicit none ! Inputs type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters + Model ! DDT: FV3-GFS model control parameters integer, intent(in) :: & - nCol, & ! Number of horizontal grid-points - nLev ! Number of vertical-layers + nCol, & ! Number of horizontal grid-points + nLev ! Number of vertical-layers real(kind_phys), dimension(nCol), intent(in) :: & - lat ! Latitude + lat ! Latitude real(kind_phys), dimension(nCol,nLev), intent(in) :: & - p_lay, & ! Pressure at model-layer - tv_lay, & ! Virtual temperature - cld_frac ! Total cloud fraction + p_lay, & ! Pressure at model-layer + tv_lay, & ! Virtual temperature + cld_frac ! Total cloud fraction real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & - p_lev ! Pressure at model interfaces - + p_lev ! Pressure at model interfaces + ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error flag + errflg ! Error flag integer,dimension(ncol,3),intent(out) :: & - mbota, & ! Vertical indices for cloud tops - mtopa ! Vertical indices for cloud bases + mbota, & ! Vertical indices for cloud tops + mtopa ! Vertical indices for cloud bases real(kind_phys), dimension(ncol,5), intent(out) :: & - cldsa ! Fraction of clouds for low, middle, high, total and BL + cldsa ! Fraction of clouds for low, middle, high, total and BL real(kind_phys), dimension(ncol), intent(out) :: & - de_lgth ! Decorrelation length + de_lgth ! Decorrelation length real(kind_phys), dimension(nCol,nLev), intent(out) :: & - overlap_param ! Cloud-overlap parameter - - ! Local variables - integer i,id,iCol,iLay,icld - real(kind_phys) :: tem1 - real(kind_phys),dimension(nCol,NK_CLDS+1) :: ptop1 - real(kind_phys),dimension(nCol) :: rlat - real(kind_phys),dimension(nCol,nLev) :: cldcnv, deltaZ + overlap_param ! Cloud-overlap parameter + + ! Local variables + integer i,id,iCol,iLay,icld + real(kind_phys) :: tem1 + real(kind_phys),dimension(nCol,NK_CLDS+1) :: ptop1 + real(kind_phys),dimension(nCol) :: rlat + real(kind_phys),dimension(nCol,nLev) :: cldcnv, deltaZ if (.not. (Model%lsswr .or. Model%lslwr)) return - + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - ! This is set to zero in all of the progcld() routines and passed to gethml(). + + ! This is set to zero in all of the progcld() routines and passed to gethml(). cldcnv(:,:) = 0._kind_phys - + do icld = 1, NK_CLDS+1 tem1 = ptopc(icld,2) - ptopc(icld,1) - do i=1,nCol - rlat(i) = abs(lat(i) / con_pi ) + do i=1,nCol + rlat(i) = abs(lat(i) / con_pi ) ptop1(i,icld) = ptopc(icld,1) + tem1*max( 0.0, 4.0*rlat(i)-1.0 ) - enddo + enddo enddo ! Compute layer-thickness do iCol=1,nCol do iLay=1,nLev - deltaZ(iCol,iLay) = (con_rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + deltaZ(iCol,iLay) = (con_rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) enddo enddo - - ! Estimate clouds decorrelation length in km + + ! Estimate clouds decorrelation length in km ! *this is only a tentative test, need to consider change later* if ( iovrlw == 3 .and. iovrsw == 3) then do iCol =1,nCol @@ -110,48 +114,47 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ do iLay=nLev,2,-1 if (de_lgth(iCol) .gt. 0) then overlap_param(iCol,iLay-1) = & - exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) + exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) endif - enddo + enddo enddo - endif + endif - ! Compute low, mid, high, total, and boundary layer cloud fractions - ! and clouds top/bottom layer indices for low, mid, and high clouds. - ! The three cloud domain boundaries are defined by ptopc. The cloud - ! overlapping method is defined by control flag 'iovr', which may - ! be different for lw and sw radiation programs. + ! Compute low, mid, high, total, and boundary layer cloud fractions and clouds top/bottom + ! layer indices for low, mid, and high clouds. The three cloud domain boundaries are + ! defined by ptopc. The cloud overlapping method is defined by control flag 'iovr', which may + ! be different for lw and sw radiation programs. call gethml(p_lay, ptop1, cld_frac, cldcnv, deltaZ, de_lgth, nCol, nLev, cldsa, mtopa, mbota) - + end subroutine GFS_cloud_diagnostics_run - + ! ###################################################################################### ! ###################################################################################### subroutine GFS_cloud_diagnostics_finalize() end subroutine GFS_cloud_diagnostics_finalize - + ! ###################################################################################### ! Initialization routine for High/Mid/Low cloud diagnostics. ! ###################################################################################### subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit) implicit none - ! Inputs + ! Inputs type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters + Model ! DDT: FV3-GFS model control parameters integer, intent(in) :: & - nLev, & ! Number of vertical-layers - mpi_rank + nLev, & ! Number of vertical-layers + mpi_rank real(kind_phys), dimension(nLev+1), intent(in) :: & - sigmainit - + sigmainit + ! Local variables integer :: iLay, kl - + ! Cloud overlap used for diagnostic HML cloud outputs iovr = max(iovrsw,iovrlw) if (mpi_rank == 0) print *, VTAGCLD !print out version tag - + if ( icldflg == 0 ) then print *,' - Diagnostic Cloud Method has been discontinued' stop ! NoNo @@ -159,250 +162,245 @@ subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit) if (mpi_rank == 0) then print *,' - Using Prognostic Cloud Method' if (Model%imp_physics == Model%imp_physics_zhao_carr) then - print *,' --- Zhao/Carr/Sundqvist microphysics' + print *,' --- Zhao/Carr/Sundqvist microphysics' elseif (Model%imp_physics == Model%imp_physics_zhao_carr_pdf) then - print *,' --- zhao/carr/sundqvist + pdf cloud' + print *,' --- zhao/carr/sundqvist + pdf cloud' elseif (Model%imp_physics == Model%imp_physics_gfdl) then - print *,' --- GFDL Lin cloud microphysics' + print *,' --- GFDL Lin cloud microphysics' elseif (Model%imp_physics == Model%imp_physics_thompson) then - print *,' --- Thompson cloud microphysics' + print *,' --- Thompson cloud microphysics' elseif (Model%imp_physics == Model%imp_physics_wsm6) then - print *,' --- WSM6 cloud microphysics' + print *,' --- WSM6 cloud microphysics' elseif (Model%imp_physics == Model%imp_physics_mg) then - print *,' --- MG cloud microphysics' + print *,' --- MG cloud microphysics' elseif (Model%imp_physics == Model%imp_physics_fer_hires) then - print *,' --- Ferrier-Aligo cloud microphysics' + print *,' --- Ferrier-Aligo cloud microphysics' else - print *,' !!! ERROR in cloud microphysc specification!!!', & - ' imp_physics (NP3D) =',Model%imp_physics - stop + print *,' !!! ERROR in cloud microphysc specification!!!', & + ' imp_physics (NP3D) =',Model%imp_physics + stop endif - endif - endif - - ! Compute the top of BL cld (llyr), which is the topmost non cld(low) layer for - ! stratiform (at or above lowest 0.1 of the atmosphere). - lab_do_k0 : do iLay = nLev, 2, -1 - kl = iLay - if (sigmainit(iLay) < 0.9e0) exit lab_do_k0 - enddo lab_do_k0 - llyr = kl + endif + endif + + ! Compute the top of BL cld (llyr), which is the topmost non cld(low) layer for + ! stratiform (at or above lowest 0.1 of the atmosphere). + lab_do_k0 : do iLay = nLev, 2, -1 + kl = iLay + if (sigmainit(iLay) < 0.9e0) exit lab_do_k0 + enddo lab_do_k0 + llyr = kl - return + return end subroutine hml_cloud_diagnostics_initialize ! ######################################################################################### ! ######################################################################################### - subroutine gethml & - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & ! --- inputs: - & IX, NLAY, & - & clds, mtop, mbot & ! --- outputs: - & ) - -! =================================================================== ! -! ! -! abstract: compute high, mid, low, total, and boundary cloud fractions ! -! and cloud top/bottom layer indices for model diagnostic output. ! -! the three cloud domain boundaries are defined by ptopc. the cloud ! -! overlapping method is defined by control flag 'iovr', which is also ! -! used by lw and sw radiation programs. ! -! ! -! usage: call gethml ! -! ! -! subprograms called: none ! -! ! -! attributes: ! -! language: fortran 90 ! -! machine: ibm-sp, sgi ! -! ! -! ! -! ==================== definition of variables ==================== ! -! ! -! input variables: ! -! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! -! ptop1 (IX,4) : pressure limits of cloud domain interfaces ! -! (sfc,low,mid,high) in mb (100Pa) ! -! cldtot(IX,NLAY) : total or straiform cloud profile in fraction ! -! cldcnv(IX,NLAY) : convective cloud (for diagnostic scheme only) ! -! dz (ix,nlay) : layer thickness (km) ! -! de_lgth(ix) : clouds vertical de-correlation length (km) ! -! IX : horizontal dimention ! -! NLAY : vertical layer dimensions ! -! ! -! output variables: ! -! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! -! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! -! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! -! ! -! external module variables: (in physparam) ! -! ivflip : control flag of vertical index direction ! -! =0: index from toa to surface ! -! =1: index from surface to toa ! -! ! -! internal module variables: ! -! iovr : control flag for cloud overlap ! -! =0 random overlapping clouds ! -! =1 max/ran overlapping clouds ! -! =2 maximum overlapping ( for mcica only ) ! -! =3 decorr-length ovlp ( for mcica only ) ! -! ! -! ==================== end of description ===================== ! -! - implicit none! - -! --- inputs: - integer, intent(in) :: IX, NLAY - - real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & - & cldtot, cldcnv, dz - real (kind=kind_phys), dimension(:), intent(in) :: de_lgth - -! --- outputs - real (kind=kind_phys), dimension(:,:), intent(out) :: clds - - integer, dimension(:,:), intent(out) :: mtop, mbot - -! --- local variables: - real (kind=kind_phys) :: cl1(IX), cl2(IX), dz1(ix) - real (kind=kind_phys) :: pcur, pnxt, ccur, cnxt, alfa - - integer, dimension(IX):: idom, kbt1, kth1, kbt2, kth2 - integer :: i, k, id, id1, kstr, kend, kinc - -! -!===> ... begin here -! - clds(:,:) = 0.0 - - do i = 1, IX - cl1(i) = 1.0 - cl2(i) = 1.0 - enddo - -! --- total and bl clouds, where cl1, cl2 are fractions of clear-sky view -! layer processed from surface and up - -!> - Calculate total and BL cloud fractions (maximum-random cloud -!! overlapping is operational). - - if ( ivflip == 0 ) then ! input data from toa to sfc - kstr = NLAY - kend = 1 - kinc = -1 - else ! input data from sfc to toa - kstr = 1 - kend = NLAY - kinc = 1 - endif ! end_if_ivflip - - if ( iovr == 0 ) then ! random overlap - - do k = kstr, kend, kinc + subroutine gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, IX, NLAY, clds, mtop, mbot) + ! =================================================================== ! + ! ! + ! abstract: compute high, mid, low, total, and boundary cloud fractions ! + ! and cloud top/bottom layer indices for model diagnostic output. ! + ! the three cloud domain boundaries are defined by ptopc. the cloud ! + ! overlapping method is defined by control flag 'iovr', which is also ! + ! used by lw and sw radiation programs. ! + ! ! + ! usage: call gethml ! + ! ! + ! subprograms called: none ! + ! ! + ! attributes: ! + ! language: fortran 90 ! + ! machine: ibm-sp, sgi ! + ! ! + ! ! + ! ==================== definition of variables ==================== ! + ! ! + ! input variables: ! + ! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! + ! ptop1 (IX,4) : pressure limits of cloud domain interfaces ! + ! (sfc,low,mid,high) in mb (100Pa) ! + ! cldtot(IX,NLAY) : total or straiform cloud profile in fraction ! + ! cldcnv(IX,NLAY) : convective cloud (for diagnostic scheme only) ! + ! dz (ix,nlay) : layer thickness (km) ! + ! de_lgth(ix) : clouds vertical de-correlation length (km) ! + ! IX : horizontal dimention ! + ! NLAY : vertical layer dimensions ! + ! ! + ! output variables: ! + ! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! + ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! + ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! + ! ! + ! external module variables: (in physparam) ! + ! ivflip : control flag of vertical index direction ! + ! =0: index from toa to surface ! + ! =1: index from surface to toa ! + ! ! + ! internal module variables: ! + ! iovr : control flag for cloud overlap ! + ! =0 random overlapping clouds ! + ! =1 max/ran overlapping clouds ! + ! =2 maximum overlapping ( for mcica only ) ! + ! =3 decorr-length ovlp ( for mcica only ) ! + ! ! + ! ==================== end of description ===================== ! + ! + implicit none! + + ! --- inputs: + integer, intent(in) :: IX, NLAY + + real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & + cldtot, cldcnv, dz + real (kind=kind_phys), dimension(:), intent(in) :: de_lgth + + ! --- outputs + real (kind=kind_phys), dimension(:,:), intent(out) :: clds + + integer, dimension(:,:), intent(out) :: mtop, mbot + + ! --- local variables: + real (kind=kind_phys) :: cl1(IX), cl2(IX), dz1(ix) + real (kind=kind_phys) :: pcur, pnxt, ccur, cnxt, alfa + + integer, dimension(IX):: idom, kbt1, kth1, kbt2, kth2 + integer :: i, k, id, id1, kstr, kend, kinc + + ! + !===> ... begin here + ! + clds(:,:) = 0.0 + + do i = 1, IX + cl1(i) = 1.0 + cl2(i) = 1.0 + enddo + + ! --- total and bl clouds, where cl1, cl2 are fractions of clear-sky view + ! layer processed from surface and up + + !> - Calculate total and BL cloud fractions (maximum-random cloud + !! overlapping is operational). + + if ( ivflip == 0 ) then ! input data from toa to sfc + kstr = NLAY + kend = 1 + kinc = -1 + else ! input data from sfc to toa + kstr = 1 + kend = NLAY + kinc = 1 + endif ! end_if_ivflip + + if ( iovr == 0 ) then ! random overlap + + do k = kstr, kend, kinc do i = 1, IX - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) cl1(i) = cl1(i) * (1.0 - ccur) + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) cl1(i) = cl1(i) * (1.0 - ccur) enddo - + if (k == llyr) then - do i = 1, IX - clds(i,5) = 1.0 - cl1(i) ! save bl cloud - enddo + do i = 1, IX + clds(i,5) = 1.0 - cl1(i) ! save bl cloud + enddo endif - enddo - - do i = 1, IX + enddo + + do i = 1, IX clds(i,4) = 1.0 - cl1(i) ! save total cloud - enddo - - elseif ( iovr == 1 ) then ! max/ran overlap - - do k = kstr, kend, kinc + enddo + + elseif ( iovr == 1 ) then ! max/ran overlap + + do k = kstr, kend, kinc do i = 1, IX - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) then ! cloudy layer - cl2(i) = min( cl2(i), (1.0 - ccur) ) - else ! clear layer - cl1(i) = cl1(i) * cl2(i) - cl2(i) = 1.0 - endif + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) then ! cloudy layer + cl2(i) = min( cl2(i), (1.0 - ccur) ) + else ! clear layer + cl1(i) = cl1(i) * cl2(i) + cl2(i) = 1.0 + endif enddo - + if (k == llyr) then - do i = 1, IX - clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud - enddo + do i = 1, IX + clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud + enddo endif - enddo - - do i = 1, IX + enddo + + do i = 1, IX clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud - enddo - - elseif ( iovr == 2 ) then ! maximum overlap all levels - - cl1(:) = 0.0 - - do k = kstr, kend, kinc + enddo + + elseif ( iovr == 2 ) then ! maximum overlap all levels + + cl1(:) = 0.0 + + do k = kstr, kend, kinc do i = 1, IX - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) cl1(i) = max( cl1(i), ccur ) + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) cl1(i) = max( cl1(i), ccur ) enddo - + if (k == llyr) then - do i = 1, IX - clds(i,5) = cl1(i) ! save bl cloud - enddo + do i = 1, IX + clds(i,5) = cl1(i) ! save bl cloud + enddo endif - enddo - - do i = 1, IX + enddo + + do i = 1, IX clds(i,4) = cl1(i) ! save total cloud - enddo - - elseif ( iovr == 3 ) then ! random if clear-layer divided, - ! otherwise de-corrlength method - do i = 1, ix + enddo + + elseif ( iovr == 3 ) then ! random if clear-layer divided, + ! otherwise de-corrlength method + do i = 1, ix dz1(i) = - dz(i,kstr) - enddo - - do k = kstr, kend, kinc + enddo + + do k = kstr, kend, kinc do i = 1, ix - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) then ! cloudy layer - alfa = exp( -0.5*((dz1(i)+dz(i,k)))/de_lgth(i) ) - dz1(i) = dz(i,k) - cl2(i) = alfa * min(cl2(i), (1.0 - ccur)) & ! maximum part - & + (1.0 - alfa) * (cl2(i) * (1.0 - ccur)) ! random part - else ! clear layer - cl1(i) = cl1(i) * cl2(i) - cl2(i) = 1.0 - if (k /= kend) dz1(i) = -dz(i,k+kinc) - endif + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) then ! cloudy layer + alfa = exp( -0.5*((dz1(i)+dz(i,k)))/de_lgth(i) ) + dz1(i) = dz(i,k) + cl2(i) = alfa * min(cl2(i), (1.0 - ccur)) & ! maximum part + + (1.0 - alfa) * (cl2(i) * (1.0 - ccur)) ! random part + else ! clear layer + cl1(i) = cl1(i) * cl2(i) + cl2(i) = 1.0 + if (k /= kend) dz1(i) = -dz(i,k+kinc) + endif enddo - + if (k == llyr) then - do i = 1, ix - clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud - enddo + do i = 1, ix + clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud + enddo endif - enddo - - do i = 1, ix + enddo + + do i = 1, ix clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud - enddo - - endif ! end_if_iovr - -! --- high, mid, low clouds, where cl1, cl2 are cloud fractions -! layer processed from one layer below llyr and up -! --- change! layer processed from surface to top, so low clouds will -! contains both bl and low clouds. - -!> - Calculte high, mid, low cloud fractions and vertical indices of -!! cloud tops/bases. - if ( ivflip == 0 ) then ! input data from toa to sfc - - do i = 1, IX + enddo + + endif ! end_if_iovr + + ! --- high, mid, low clouds, where cl1, cl2 are cloud fractions + ! layer processed from one layer below llyr and up + ! --- change! layer processed from surface to top, so low clouds will + ! contains both bl and low clouds. + + !> - Calculte high, mid, low cloud fractions and vertical indices of + !! cloud tops/bases. + if ( ivflip == 0 ) then ! input data from toa to sfc + + do i = 1, IX cl1 (i) = 0.0 cl2 (i) = 0.0 kbt1(i) = NLAY @@ -416,75 +414,75 @@ subroutine gethml & mtop(i,2) = NLAY - 1 mbot(i,3) = NLAY - 1 mtop(i,3) = NLAY - 1 - enddo - -!org do k = llyr-1, 1, -1 - do k = NLAY, 1, -1 + enddo + + !org do k = llyr-1, 1, -1 + do k = NLAY, 1, -1 do i = 1, IX - id = idom(i) - id1= id + 1 - - pcur = plyr(i,k) - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - - if (k > 1) then - pnxt = plyr(i,k-1) - cnxt = min( ovcst, max( cldtot(i,k-1), cldcnv(i,k-1) )) - else - pnxt = -1.0 - cnxt = 0.0 - endif - - if (pcur < ptop1(i,id1)) then - id = id + 1 - id1= id1 + 1 - idom(i) = id - endif - - if (ccur >= climit) then - if (kth2(i) == 0) kbt2(i) = k - kth2(i) = kth2(i) + 1 - - if ( iovr == 0 ) then - cl2(i) = cl2(i) + ccur - cl2(i)*ccur - else - cl2(i) = max( cl2(i), ccur ) - endif - - if (cnxt < climit .or. pnxt < ptop1(i,id1)) then - kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i) ) & - & / (cl1(i) + cl2(i)) ) - kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i) ) & - & / (cl1(i) + cl2(i)) ) - cl1 (i) = cl1(i) + cl2(i) - cl1(i)*cl2(i) - - kbt2(i) = k - 1 - kth2(i) = 0 - cl2 (i) = 0.0 - endif ! end_if_cnxt_or_pnxt - endif ! end_if_ccur - - if (pnxt < ptop1(i,id1)) then - clds(i,id) = cl1(i) - mtop(i,id) = min( kbt1(i), kbt1(i)-kth1(i)+1 ) - mbot(i,id) = kbt1(i) - - cl1 (i) = 0.0 - kbt1(i) = k - 1 - kth1(i) = 0 - - if (id1 <= NK_CLDS) then - mbot(i,id1) = kbt1(i) - mtop(i,id1) = kbt1(i) - endif - endif ! end_if_pnxt - + id = idom(i) + id1= id + 1 + + pcur = plyr(i,k) + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + + if (k > 1) then + pnxt = plyr(i,k-1) + cnxt = min( ovcst, max( cldtot(i,k-1), cldcnv(i,k-1) )) + else + pnxt = -1.0 + cnxt = 0.0 + endif + + if (pcur < ptop1(i,id1)) then + id = id + 1 + id1= id1 + 1 + idom(i) = id + endif + + if (ccur >= climit) then + if (kth2(i) == 0) kbt2(i) = k + kth2(i) = kth2(i) + 1 + + if ( iovr == 0 ) then + cl2(i) = cl2(i) + ccur - cl2(i)*ccur + else + cl2(i) = max( cl2(i), ccur ) + endif + + if (cnxt < climit .or. pnxt < ptop1(i,id1)) then + kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i) ) & + / (cl1(i) + cl2(i)) ) + kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i) ) & + / (cl1(i) + cl2(i)) ) + cl1 (i) = cl1(i) + cl2(i) - cl1(i)*cl2(i) + + kbt2(i) = k - 1 + kth2(i) = 0 + cl2 (i) = 0.0 + endif ! end_if_cnxt_or_pnxt + endif ! end_if_ccur + + if (pnxt < ptop1(i,id1)) then + clds(i,id) = cl1(i) + mtop(i,id) = min( kbt1(i), kbt1(i)-kth1(i)+1 ) + mbot(i,id) = kbt1(i) + + cl1 (i) = 0.0 + kbt1(i) = k - 1 + kth1(i) = 0 + + if (id1 <= NK_CLDS) then + mbot(i,id1) = kbt1(i) + mtop(i,id1) = kbt1(i) + endif + endif ! end_if_pnxt + enddo ! end_do_i_loop - enddo ! end_do_k_loop - - else ! input data from sfc to toa - - do i = 1, IX + enddo ! end_do_k_loop + + else ! input data from sfc to toa + + do i = 1, IX cl1 (i) = 0.0 cl2 (i) = 0.0 kbt1(i) = 1 @@ -498,78 +496,76 @@ subroutine gethml & mtop(i,2) = 2 mbot(i,3) = 2 mtop(i,3) = 2 - enddo - -!org do k = llyr+1, NLAY - do k = 1, NLAY + enddo + + !org do k = llyr+1, NLAY + do k = 1, NLAY do i = 1, IX - id = idom(i) - id1= id + 1 - - pcur = plyr(i,k) - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - - if (k < NLAY) then - pnxt = plyr(i,k+1) - cnxt = min( ovcst, max( cldtot(i,k+1), cldcnv(i,k+1) )) - else - pnxt = -1.0 - cnxt = 0.0 - endif - - if (pcur < ptop1(i,id1)) then - id = id + 1 - id1= id1 + 1 - idom(i) = id - endif - - if (ccur >= climit) then - if (kth2(i) == 0) kbt2(i) = k - kth2(i) = kth2(i) + 1 - - if ( iovr == 0 ) then - cl2(i) = cl2(i) + ccur - cl2(i)*ccur - else - cl2(i) = max( cl2(i), ccur ) - endif - - if (cnxt < climit .or. pnxt < ptop1(i,id1)) then - kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i)) & - & / (cl1(i) + cl2(i)) ) - kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i)) & - & / (cl1(i) + cl2(i)) ) - cl1 (i) = cl1(i) + cl2(i) - cl1(i)*cl2(i) - - kbt2(i) = k + 1 - kth2(i) = 0 - cl2 (i) = 0.0 - endif ! end_if_cnxt_or_pnxt - endif ! end_if_ccur - - if (pnxt < ptop1(i,id1)) then - clds(i,id) = cl1(i) - mtop(i,id) = max( kbt1(i), kbt1(i)+kth1(i)-1 ) - mbot(i,id) = kbt1(i) - - cl1 (i) = 0.0 - kbt1(i) = min(k+1, nlay) - kth1(i) = 0 - - if (id1 <= NK_CLDS) then - mbot(i,id1) = kbt1(i) - mtop(i,id1) = kbt1(i) - endif - endif ! end_if_pnxt - + id = idom(i) + id1= id + 1 + + pcur = plyr(i,k) + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + + if (k < NLAY) then + pnxt = plyr(i,k+1) + cnxt = min( ovcst, max( cldtot(i,k+1), cldcnv(i,k+1) )) + else + pnxt = -1.0 + cnxt = 0.0 + endif + + if (pcur < ptop1(i,id1)) then + id = id + 1 + id1= id1 + 1 + idom(i) = id + endif + + if (ccur >= climit) then + if (kth2(i) == 0) kbt2(i) = k + kth2(i) = kth2(i) + 1 + + if ( iovr == 0 ) then + cl2(i) = cl2(i) + ccur - cl2(i)*ccur + else + cl2(i) = max( cl2(i), ccur ) + endif + + if (cnxt < climit .or. pnxt < ptop1(i,id1)) then + kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i)) & + / (cl1(i) + cl2(i)) ) + kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i)) & + / (cl1(i) + cl2(i)) ) + cl1 (i) = cl1(i) + cl2(i) - cl1(i)*cl2(i) + + kbt2(i) = k + 1 + kth2(i) = 0 + cl2 (i) = 0.0 + endif ! end_if_cnxt_or_pnxt + endif ! end_if_ccur + + if (pnxt < ptop1(i,id1)) then + clds(i,id) = cl1(i) + mtop(i,id) = max( kbt1(i), kbt1(i)+kth1(i)-1 ) + mbot(i,id) = kbt1(i) + + cl1 (i) = 0.0 + kbt1(i) = min(k+1, nlay) + kth1(i) = 0 + + if (id1 <= NK_CLDS) then + mbot(i,id1) = kbt1(i) + mtop(i,id1) = kbt1(i) + endif + endif ! end_if_pnxt + enddo ! end_do_i_loop - enddo ! end_do_k_loop - - endif ! end_if_ivflip - -! - return -!................................... - end subroutine gethml - - -end module GFS_cloud_diagnostics \ No newline at end of file + enddo ! end_do_k_loop + + endif ! end_if_ivflip + + ! + return + !................................... + end subroutine gethml +end module GFS_cloud_diagnostics diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 27e541160..442975d10 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -1,20 +1,25 @@ +! ######################################################################################## +! This module contains the interface between the GFDL macrophysics and the RRTMGP radiation +! schemes. Only compatable with Model%imp_physics = Model%imp_physics_gfdl +! ######################################################################################## module GFS_rrtmgp_gfdlmp_pre use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type, GFS_tbd_type use physcons, only: con_ttp, & ! Temperature at h2o 3pt (K) - con_rd, & ! Gas constant for dry air (J/KgK) - con_pi, & ! PI - con_g ! Gravity (m/s2) + con_rd, & ! Gas constant for dry air (J/KgK) + con_pi, & ! PI + con_g ! Gravity (m/s2) use physparam, only: lcnorm,lcrick + ! Parameters real(kind_phys), parameter :: & - reliq_def = 10.0, & ! Default liq radius to 10 micron - reice_def = 50.0, & ! Default ice radius to 50 micron - rrain_def = 1000.0, & ! Default rain radius to 1000 micron - rsnow_def = 250.0, & ! Default snow radius to 250 micron - epsq = 1.0e-12, & ! Tiny value - cllimit = 0.001, & ! Lowest cloud fraction in GFDL MP scheme - gfac=1.0e5/con_g ! + reliq_def = 10.0, & ! Default liq radius to 10 micron + reice_def = 50.0, & ! Default ice radius to 50 micron + rrain_def = 1000.0, & ! Default rain radius to 1000 micron + rsnow_def = 250.0, & ! Default snow radius to 250 micron + epsq = 1.0e-12, & ! Tiny value + cllimit = 0.001, & ! Lowest cloud fraction in GFDL MP scheme + gfac = 1.0e5/con_g contains ! ###################################################################################### @@ -28,9 +33,9 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_init !! \htmlinclude GFS_rrtmgp_gfdlmp_pre_run.html !! subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, p_lev, & - t_lay, tv_lay, tracer, & - cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, errmsg, errflg) + t_lay, tv_lay, tracer, & + cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & + cld_rerain, errmsg, errflg) implicit none ! Inputs @@ -68,7 +73,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - + ! Local variables real(kind_phys) :: tem1, tem2, tem3, clwt real(kind_phys), dimension(nCol) :: rlat @@ -82,7 +87,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - + ! Initialize outputs cld_lwp(:,:) = 0.0 cld_reliq(:,:) = 0.0 @@ -92,11 +97,11 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, cld_rerain(:,:) = 0.0 cld_swp(:,:) = 0.0 cld_resnow(:,:) = 0.0 - + ! Compute layer pressure thickness (hPa) deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. - - ! #################################################################################### + + ! #################################################################################### ! Pull out cloud information for GFDL MP scheme. ! #################################################################################### ! Cloud hydrometeors @@ -105,7 +110,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! -liquid water cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,Model%ntiw) ! -ice water ncndl = Model%ncnd - endif + endif if (Model%ncnd .eq. 5) then cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! -liquid water cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,Model%ntiw) ! -ice water @@ -117,18 +122,18 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, ncndl = min(4,Model%ncnd) endif - ! Cloud-fraction + ! Cloud-fraction cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) - - ! Set really tiny suspended particle amounts to clear + + ! Set really tiny suspended particle amounts to clear do l=1,ncndl do k=1,nLev do i=1,nCol if (cld_condensate(i,k,l) < epsq) cld_condensate(i,k,l) = 0.0 - enddo + enddo enddo enddo - + ! DJS asks. Do we need lcrick? If not replace clwf with cld_condensate(:,:,1) if ( lcrick ) then do icnd=1,ncndl @@ -138,23 +143,23 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, enddo do k = 2, nLev-1 do i = 1, nCol - clwf(i,k,icnd) = 0.25*cld_condensate(i,k-1,icnd) + 0.5*cld_condensate(i,k,icnd) + & - 0.25*cld_condensate(i,k+1,icnd) + clwf(i,k,icnd) = 0.25*cld_condensate(i,k-1,icnd) + 0.5*cld_condensate(i,k,icnd) + & + 0.25*cld_condensate(i,k+1,icnd) enddo enddo - enddo + enddo else do icnd=1,ncndl do k = 1, nLev do i = 1, nCol clwf(i,k,icnd) = cld_condensate(i,k,icnd) enddo - enddo - enddo - endif + enddo + enddo + endif ! #################################################################################### - ! A) Compute Liquid/Ice/Rain/Snow(+groupel) cloud condensate paths + ! A) Compute Liquid/Ice/Rain/Snow(+groupel) cloud condensate paths ! #################################################################################### ! #################################################################################### @@ -163,59 +168,59 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, ! Formerly progclduni() ! #################################################################################### if (Model%lgfdlmprad) then - ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) - do k = 1, nLev - do i = 1, nCol - if (cld_frac(i,k) .ge. cllimit) then - tem1 = gfac * deltaP(i,k) - cld_lwp(i,k) = clwf(i,k,1) * tem1 - cld_iwp(i,k) = clwf(i,k,2) * tem1 - ! Also Rain and Snow(+groupel) if provided - if (ncndl .eq. 4) then - cld_rwp(i,k) = clwf(i,k,3) * tem1 - cld_swp(i,k) = clwf(i,k,4) * tem1 - endif - endif + ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) + do k = 1, nLev + do i = 1, nCol + if (cld_frac(i,k) .ge. cllimit) then + tem1 = gfac * deltaP(i,k) + cld_lwp(i,k) = clwf(i,k,1) * tem1 + cld_iwp(i,k) = clwf(i,k,2) * tem1 + ! Also Rain and Snow(+groupel) if provided + if (ncndl .eq. 4) then + cld_rwp(i,k) = clwf(i,k,3) * tem1 + cld_swp(i,k) = clwf(i,k,4) * tem1 + endif + endif enddo - enddo + enddo ! #################################################################################### ! ii) This option uses only a single mixing-ratio and partitions into liquid/ice cloud ! properties by phase. ! Formerly progcld4() ! #################################################################################### else - ! Compute total-cloud suspended water. + ! Compute total-cloud suspended water. clwf(:,:,1) = sum(clwf,dim=3) - ! Compute liquid/ice condensate path (g/m2) - do k = 1, nLev - do i = 1, nCol - if (cld_frac(i,k) .ge. cllimit) then - clwt = max(0.0,clwf(i,k,1)) * gfac * deltaP(i,k) - tem2 = min( 1.0, max( 0.0, (con_ttp-t_lay(i,k))*0.05 ) ) - cld_iwp(i,k) = clwt * tem2 - cld_lwp(i,k) = clwt - cld_iwp(i,k) - endif - enddo - enddo - endif + ! Compute liquid/ice condensate path (g/m2) + do k = 1, nLev + do i = 1, nCol + if (cld_frac(i,k) .ge. cllimit) then + clwt = max(0.0,clwf(i,k,1)) * gfac * deltaP(i,k) + tem2 = min( 1.0, max( 0.0, (con_ttp-t_lay(i,k))*0.05 ) ) + cld_iwp(i,k) = clwt * tem2 + cld_lwp(i,k) = clwt - cld_iwp(i,k) + endif + enddo + enddo + endif ! #################################################################################### ! B) Particle sizes ! #################################################################################### - + ! #################################################################################### ! i) Use radii provided from the macrophysics ! #################################################################################### if (Model%effr_in) then do k=1,nLev do i=1,nCol - cld_reliq(i,k) = Tbd%phy_f3d(i,k,1) - cld_reice(i,k) = max(10.0, min(150.0,Tbd%phy_f3d(i,k,2))) - cld_rerain(i,k) = Tbd%phy_f3d(i,k,3) - cld_resnow(i,k) = Tbd%phy_f3d(i,k,4) + cld_reliq(i,k) = Tbd%phy_f3d(i,k,1) + cld_reice(i,k) = max(10.0, min(150.0,Tbd%phy_f3d(i,k,2))) + cld_rerain(i,k) = Tbd%phy_f3d(i,k,3) + cld_resnow(i,k) = Tbd%phy_f3d(i,k,4) enddo - enddo + enddo ! #################################################################################### ! ii) Start with default values. Modify liquid sizes over land. Adjust ice sizes following ! Hemsfield and McFarquhar (1996) https://doi.org/10.1175/1520-0469 @@ -226,51 +231,51 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, cld_rerain(:,:) = rrain_def cld_resnow(:,:) = rsnow_def - ! Compute effective liquid cloud droplet radius over land. + ! Compute effective liquid cloud droplet radius over land. do i = 1, nCol - if (nint(slmsk(i)) == 1) then - do k = 1, nLev - tem2 = min( 1.0, max( 0.0, (con_ttp-t_lay(i,k))*0.05 ) ) - cld_reliq(i,k) = 5.0 + 5.0 * tem2 - enddo - endif + if (nint(slmsk(i)) == 1) then + do k = 1, nLev + tem2 = min( 1.0, max( 0.0, (con_ttp-t_lay(i,k))*0.05 ) ) + cld_reliq(i,k) = 5.0 + 5.0 * tem2 + enddo + endif enddo - + ! Compute effective ice cloud droplet radius. do k = 1, nLev do i = 1, nCol tem2 = t_lay(i,k) - con_ttp if (cld_iwp(i,k) > 0.0) then - tem3 = (con_g/con_rd)* cld_iwp(i,k) * (p_lay(i,k)/100.) / (deltaP(i,k)*tv_lay(i,k)) - if (tem2 < -50.0) then - cld_reice(i,k) = (1250.0/9.917) * tem3 ** 0.109 - elseif (tem2 < -40.0) then - cld_reice(i,k) = (1250.0/9.337) * tem3 ** 0.08 - elseif (tem2 < -30.0) then - cld_reice(i,k) = (1250.0/9.208) * tem3 ** 0.055 - else - cld_reice(i,k) = (1250.0/9.387) * tem3 ** 0.031 - endif - cld_reice(i,k) = max(10.0, min(cld_reice(i,k), 150.0)) + tem3 = (con_g/con_rd)* cld_iwp(i,k) * (p_lay(i,k)/100.) / (deltaP(i,k)*tv_lay(i,k)) + if (tem2 < -50.0) then + cld_reice(i,k) = (1250.0/9.917) * tem3 ** 0.109 + elseif (tem2 < -40.0) then + cld_reice(i,k) = (1250.0/9.337) * tem3 ** 0.08 + elseif (tem2 < -30.0) then + cld_reice(i,k) = (1250.0/9.208) * tem3 ** 0.055 + else + cld_reice(i,k) = (1250.0/9.387) * tem3 ** 0.031 + endif + cld_reice(i,k) = max(10.0, min(cld_reice(i,k), 150.0)) endif - enddo - enddo - endif + enddo + enddo + endif - ! Normalize cloud-condensate by cloud-cover? - if ( lcnorm ) then - do k = 1, nLev - do i = 1, nCol - if (cld_frac(i,k) >= cllimit) then - tem1 = 1.0 / max(0.05, cld_frac(i,k)) - cld_lwp(i,k) = cld_lwp(i,k) * tem1 - cld_iwp(i,k) = cld_iwp(i,k) * tem1 - cld_rwp(i,k) = cld_rwp(i,k) * tem1 - cld_swp(i,k) = cld_swp(i,k) * tem1 - endif - enddo - enddo - endif + ! Normalize cloud-condensate by cloud-cover? + if ( lcnorm ) then + do k = 1, nLev + do i = 1, nCol + if (cld_frac(i,k) >= cllimit) then + tem1 = 1.0 / max(0.05, cld_frac(i,k)) + cld_lwp(i,k) = cld_lwp(i,k) * tem1 + cld_iwp(i,k) = cld_iwp(i,k) * tem1 + cld_rwp(i,k) = cld_rwp(i,k) * tem1 + cld_swp(i,k) = cld_swp(i,k) * tem1 + endif + enddo + enddo + endif end subroutine GFS_rrtmgp_gfdlmp_pre_run @@ -279,4 +284,4 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_run subroutine GFS_rrtmgp_gfdlmp_pre_finalize() end subroutine GFS_rrtmgp_gfdlmp_pre_finalize -end module GFS_rrtmgp_gfdlmp_pre \ No newline at end of file +end module GFS_rrtmgp_gfdlmp_pre From 4c08f739c121af21483e832cd29b4f3d34c9361e Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 18 May 2020 21:00:06 -0400 Subject: [PATCH 159/404] updating nst model coupled with ocean model --- physics/module_nst_water_prop.f90 | 86 ++++++++++++++----------------- physics/sfc_nst.f | 34 ++++++------ 2 files changed, 55 insertions(+), 65 deletions(-) diff --git a/physics/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index 3f3916396..81e31b148 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -60,8 +60,8 @@ subroutine rhocoef(t, s, rhoref, alpha, beta) tc = t - t0k - alpha = & - 6.793952e-2 & + alpha = & + 6.793952e-2 & - 2.0 * 9.095290e-3 * tc + 3.0 * 1.001685e-4 * tc**2 & - 4.0 * 1.120083e-6 * tc**3 + 5.0 * 6.536332e-9 * tc**4 & - 4.0899e-3 * s & @@ -73,7 +73,7 @@ subroutine rhocoef(t, s, rhoref, alpha, beta) ! alpha = -alpha/rhoref - beta = & + beta = & 8.24493e-1 - 4.0899e-3 * tc & + 7.6438e-5 * tc**2 - 8.2467e-7 * tc**3 & + 5.3875e-9 * tc**4 - 1.5 * 5.72466e-3 * s**.5 & @@ -109,10 +109,10 @@ subroutine density(t, s, rho) ! effect of temperature on density (lines 1-3) ! effect of temperature and salinity on density (lines 4-8) - rho = & - 999.842594 + 6.793952e-2 * tc & - - 9.095290e-3 * tc**2 + 1.001685e-4 * tc**3 & - - 1.120083e-6 * tc**4 + 6.536332e-9 * tc**5 & + rho = & + 999.842594 + 6.793952e-2 * tc & + - 9.095290e-3 * tc**2 + 1.001685e-4 * tc**3 & + - 1.120083e-6 * tc**4 + 6.536332e-9 * tc**5 & + 8.24493e-1 * s - 4.0899e-3 * tc * s & + 7.6438e-5 * tc**2 * s - 8.2467e-7 * tc**3 * s & + 5.3875e-9 * tc**4 * s - 5.72466e-3 * s**1.5 & @@ -415,9 +415,9 @@ elemental subroutine sw_soloviev_3exp_v2(f_sol_0,z,df_sol_z) real(kind=kind_phys),intent(out):: df_sol_z ! if(z>0) then - df_sol_z=f_sol_0*(1.0 & - -(0.28*0.014*(1.-exp(-z/0.014)) & - +0.27*0.357*(1.-exp(-z/0.357)) & + df_sol_z=f_sol_0*(1.0 & + -(0.28*0.014*(1.-exp(-z/0.014)) & + +0.27*0.357*(1.-exp(-z/0.357)) & +.45*12.82*(1.-exp(-z/12.82)))/z & ) else @@ -444,9 +444,9 @@ elemental subroutine sw_soloviev_3exp_v2_aw(z,aw) real(kind=kind_phys):: fxp ! if(z>0) then - fxp=(1.0 & - -(0.28*0.014*(1.-exp(-z/0.014)) & - + 0.27*0.357*(1.-exp(-z/0.357)) & + fxp=(1.0 & + -(0.28*0.014*(1.-exp(-z/0.014)) & + + 0.27*0.357*(1.-exp(-z/0.357)) & + 0.45*12.82*(1.-exp(-z/12.82)))/z & ) aw=1.0-fxp-(0.28*exp(-z/0.014)+0.27*exp(-z/0.357)+0.45*exp(-z/12.82)) @@ -702,69 +702,59 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,dtm) real (kind=kind_phys), dimension(nx,ny), intent(out) :: dtm ! Local variables integer :: i,j - real (kind=kind_phys), dimension(nx,ny) :: dtw,dtc - real (kind=kind_phys) :: dt_warm + real (kind=kind_phys) :: dt_warm, dtw, dtc, xzi + real (kind=kind_phys), parameter :: zero=0.0, half=0.5, one=1.0 -!$omp parallel do private(j,i) +!$omp parallel do private(j,i,dtw,dtc,xzi) do j = 1, ny do i= 1, nx -! -! initialize dtw & dtc as zeros -! - dtw(i,j) = 0.0 - dtc(i,j) = 0.0 -! if ( wet(i,j) .and. .not.icy(i,j) ) then + + dtm(i,j) = zero ! initialize dtm + if ( wet(i,j) ) then ! ! get the mean warming in the range of z=z1 to z=z2 ! - if ( xt(i,j) > 0.0 ) then - dt_warm = (xt(i,j)+xt(i,j))/xz(i,j) ! Tw(0) - if ( z1 < z2) then + dtw = zero + if ( xt(i,j) > zero ) then + xzi = one / xz(i,j) + dt_warm = (xt(i,j)+xt(i,j)) * xzi ! Tw(0) + if (z1 < z2) then if ( z2 < xz(i,j) ) then - dtw(i,j) = dt_warm*(1.0-(z1+z2)/(xz(i,j)+xz(i,j))) - elseif ( z1 < xz(i,j) .and. z2 >= xz(i,j) ) then - dtw(i,j) = 0.5*(1.0-z1/xz(i,j))*dt_warm*(xz(i,j)-z1)/(z2-z1) + dtw = dt_warm * (one-half*(z1+z2)*xzi) + elseif (z1 < xz(i,j) .and. z2 >= xz(i,j) ) then + dtw = half*(one-z1*xzi)*dt_warm*(xz(i,j)-z1)/(z2-z1) endif - elseif ( z1 == z2 ) then - if ( z1 < xz(i,j) ) then - dtw(i,j) = dt_warm*(1.0-z1/xz(i,j)) + elseif (z1 == z2 ) then + if (z1 < xz(i,j) ) then + dtw = dt_warm * (one-z1*xzi) endif endif endif ! ! get the mean cooling in the range of z=0 to z=zsea ! - if ( zc(i,j) > 0.0 ) then + dtc = zero + if ( zc(i,j) > zero ) then if ( z1 < z2) then if ( z2 < zc(i,j) ) then - dtc(i,j) = dt_cool(i,j)*(1.0-(z1+z2)/(zc(i,j)+zc(i,j))) + dtc = dt_cool(i,j) * (one-(z1+z2)/(zc(i,j)+zc(i,j))) elseif ( z1 < zc(i,j) .and. z2 >= zc(i,j) ) then - dtc(i,j) = 0.5*(1.0-z1/zc(i,j))*dt_cool(i,j)*(zc(i,j)-z1)/(z2-z1) + dtc = half*(one-z1/zc(i,j))*dt_cool(i,j)*(zc(i,j)-z1)/(z2-z1) endif elseif ( z1 == z2 ) then if ( z1 < zc(i,j) ) then - dtc(i,j) = dt_cool(i,j)*(1.0-z1/zc(i,j)) + dtc = dt_cool(i,j) * (one-z1/zc(i,j)) endif endif endif - endif ! if ( wet(i,j) .and. .not.icy(i,j) ) then - enddo - enddo -! ! get the mean T departure from Tf in the range of z=z1 to z=z2 - -! DH* NEED NTHREADS HERE! TODO -!$omp parallel do private(j,i) - do j = 1, ny - do i= 1, nx -! if ( wet(i,j) .and. .not.icy(i,j)) then - if ( wet(i,j) ) then - dtm(i,j) = dtw(i,j) - dtc(i,j) - endif + dtm(i,j) = dtw - dtc + endif ! if ( wet(i,j)) then enddo enddo +! end subroutine get_dtzm_2d diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 857506686..6022d229f 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -682,6 +682,7 @@ subroutine sfc_nst_pre_run & z_c, tref, cplflx, oceanfrac, errmsg, errflg) use machine , only : kind_phys + use module_nst_water_prop, only: get_dtzm_2d implicit none @@ -707,8 +708,9 @@ subroutine sfc_nst_pre_run real(kind=kind_phys), parameter :: zero = 0.0_r8, & one = 1.0_r8, & half = 0.5_r8, - & omz1 = 10.0_r8 - real(kind=kind_phys) :: tem1, tem2, dt_warm + & omz1 = 2.0_r8 + real(kind=kind_phys) :: tem1, tem2, dt_warm, dnsst + real(kind=kind_phys), dimension(im) :: dtzm ! Initialize CCPP error handling variables errmsg = '' @@ -720,31 +722,30 @@ subroutine sfc_nst_pre_run ! DH* 20190927 simplyfing this code because tem is zero !tem = zero !tseal(i) = tsfc_ocn(i) + tem - tseal(i) = tsfc_ocn(i) + tseal(i) = tsfc_ocn(i) !tsurf_ocn(i) = tsurf_ocn(i) + tem ! *DH endif enddo +! +! update tsfc & tref with T1 from OGCM & NSST Profile if coupled +! if (cplflx) then - tem1 = half / omz1 + call get_dtzm_2d (xt, xz, dt_cool, & + & z_c, wet, zero, omz1, im, 1, dtzm) do i=1,im if (wet(i) .and. oceanfrac(i) > zero) then +! dnsst = tsfc_ocn(i) - tref(i) ! retrive/get difference of Ts and Tf + tref(i) = tsfc_ocn(i) - dtzm(i) ! update Tf with T1 and NSST T-Profile +! tsfc_ocn(i) = max(271.2,tref(i) + dnsst) ! get Ts updated due to Tf update +! tseal(i) = tsfc_ocn(i) if (abs(xz(i)) > zero) then tem2 = one / xz(i) else tem2 = zero endif - dt_warm = (xt(i)+xt(i)) * tem2 - if ( xz(i) > omz1) then - tref(i) = tseal(i) - (one-half*omz1*tem2) * dt_warm & - & + z_c(i)*dt_cool(i)*tem1 - else - tref(i) = tseal(i) - (xz(i)*dt_warm & - & - z_c(i)*dt_cool(i))*tem1 - endif - tseal(i) = tref(i) + dt_warm - dt_cool(i) -! - (Sfcprop%oro(i)-Sfcprop%oro_uf(i))*rlapse + tseal(i) = tref(i) + (xt(i)+xt(i)) * tem2 - dt_cool(i) tsurf_ocn(i) = tseal(i) endif enddo @@ -838,15 +839,14 @@ subroutine sfc_nst_post_run & ! --- ... run nsst model ... --- - dtzm = 0.0_r8 if (nstf_name1 > 1) then zsea1 = 0.001_r8*real(nstf_name4) zsea2 = 0.001_r8*real(nstf_name5) call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & & im, 1, dtzm) do i = 1, im -! if (wet(i) .and. .not.icy(i)) then -! if (wet(i) .and. (Model%frac_grid .or. .not. icy(i))) then +! if (wet(i) .and. .not.icy(i)) then +! if (wet(i) .and. (frac_grid .or. .not. icy(i))) then if (wet(i)) then tsfc_ocn(i) = max(tgice, tref(i) + dtzm(i)) ! tsfc_ocn(i) = max(271.2, tref(i) + dtzm(i)) - & From b850fe7c98d9c195f62fd0887907685c120549c3 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 18 May 2020 21:26:32 -0600 Subject: [PATCH 160/404] add limits to fh, fh2 --- physics/gfdl_sfc_layer.F90 | 124 ++++++++++++++++++++++++++----------- 1 file changed, 87 insertions(+), 37 deletions(-) diff --git a/physics/gfdl_sfc_layer.F90 b/physics/gfdl_sfc_layer.F90 index edd3f0c30..1b29c166c 100644 --- a/physics/gfdl_sfc_layer.F90 +++ b/physics/gfdl_sfc_layer.F90 @@ -154,6 +154,8 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & integer :: i, its, ite, ims, ime + logical :: ch_bound_excursion + !GJF: the vonKarman constant should come in through the CCPP and be defined by the host model real (kind=kind_phys), parameter :: karman = 0.4 real (kind=kind_phys), parameter :: log01=log(0.01), log05=log(0.05), & @@ -180,7 +182,8 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & xxfh2, tzot real(kind=kind_phys), dimension(1:30) :: maxsmc, drysmc real(kind=kind_phys) :: smcmax, smcdry, zhalf, cd10, & - esat, fm_lnd_old, fh_lnd_old, tem1, tem2, czilc, cdlimit + esat, fm_lnd_old, fh_lnd_old, tem1, tem2, czilc, cd_low_limit, & + cd_high_limit, ch_low_limit, ch_high_limit !#### This block will become unnecessary when maxsmc and drysmc come through the CCPP #### if (lsm == lsm_noah) then @@ -273,8 +276,13 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & zkmax(i) = z1(i) z1_cm(i) = 100.0*z1(i) - !GJF: this drag coefficient lower limit was suggested by Chunxi Zhang via his module_sf_sfclayrev.f90 - cdlimit = 1.0e-5/zkmax(i) + !GJF: these drag coefficient limits were suggested by Chunxi Zhang via his module_sf_sfclayrev.f90 + cd_low_limit = 1.0e-5/zkmax(i) + cd_high_limit = 0.1 + !GJF: use the lower of 0.1 from Chunxi Zhang or 0.05/wspd from WRF's module_sf_gfdl.F + ! (this will always be the latter if wspd has a minimum of 1.0 m s-1 from above) + ch_low_limit = cd_low_limit + ch_high_limit = min(0.1,0.05/wspd(i)) !slwdc... GFDL downward net flux in units of cal/(cm**2/min) !also divide by 10**4 to convert from /m**2 to /cm**2 @@ -396,23 +404,37 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling + cdm_lnd(i) = max(cdm_lnd(i), cd_low_limit) + cdm_lnd(i) = min(cdm_lnd(i), cd_high_limit) fm_lnd(i) = karman/sqrt(cdm_lnd(i)) + + !1) try fh_lnd from MFLUX2 fh_lnd(i) = karman*xxfh(i) - !GJF: Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih - !psim_lnd(i)=gz1oz0(i)-fm_lnd(i) - !psih_lnd(i)=gz1oz0(i)-fh_lnd(i) + !2) calc ch_lnd from fm_lnd and fh_lnd + ch_lnd(i) = karman*karman/(fm_lnd(i) * fh_lnd(i)) + !3) check if ch_lnd is out of bounds (if so, recalculate fh_lnd from bounded value) + ch_bound_excursion = .false. + if (ch_lnd(i) < ch_low_limit) then + ch_bound_excursion = .true. + ch_lnd(i) = ch_low_limit + else if (ch_lnd(i) > ch_high_limit) then + ch_bound_excursion = .true. + ch_lnd(i) = ch_high_limit + end if + + if (ch_bound_excursion) then + fh_lnd(i) = karman*karman/(fm_lnd(i)*ch_lnd(i)) + end if + + !4) try fh2_lnd, limit to be less than or equal to constant*fh_lnd? fh2_lnd(i) = karman*xxfh2(i) - ch_lnd(i) = karman*karman/(fm_lnd(i) * fh_lnd(i)) + fh2_lnd(i) = min(fh2_lnd(i), fh_lnd(i)) !fh2_lnd > fh_lnd leads to bad values in sfc_diag.f - !GJF: these bounds on drag coefficients are from Chunxi Zhang's module_sf_sfclayrev.f90 - cdm_lnd(i) = max(cdm_lnd(i), cdlimit) - cdm_lnd(i) = min(cdm_lnd(i), 0.1) - ch_lnd(i) = max(ch_lnd(i), cdlimit) - ch_lnd(i) = min(ch_lnd(i), 0.1) - !GJF: this bound is from WRF's module_sf_gfdl.F (I'm not sure if both are needed or which is more restrictive.) - ch_lnd(i) = min(ch_lnd(i), 0.05/wspd(i)) + !GJF: Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih + !psim_lnd(i)=gz1oz0(i)-fm_lnd(i) + !psih_lnd(i)=gz1oz0(i)-fh_lnd(i) !GJF: from WRF's module_sf_gfdl.F ustar_lnd(i) = 0.01*sqrt(cdm_lnd(i)* & @@ -532,23 +554,37 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling + cdm_ice(i) = max(cdm_ice(i), cd_low_limit) + cdm_ice(i) = min(cdm_ice(i), cd_high_limit) fm_ice(i) = karman/sqrt(cdm_ice(i)) + + !1) try fh_ice from MFLUX2 fh_ice(i) = karman*xxfh(i) - !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih - !psim_ice(i)=gz1oz0(i)-fm_ice(i) - !psih_ice(i)=gz1oz0(i)-fh_ice(i) + !2) calc ch_ice from fm_ice and fh_ice + ch_ice(i) = karman*karman/(fm_ice(i) * fh_ice(i)) + + !3) check if ch_ice is out of bounds (if so, recalculate fh_ice from bounded value) + ch_bound_excursion = .false. + if (ch_ice(i) < ch_low_limit) then + ch_bound_excursion = .true. + ch_ice(i) = ch_low_limit + else if (ch_ice(i) > ch_high_limit) then + ch_bound_excursion = .true. + ch_ice(i) = ch_high_limit + end if + if (ch_bound_excursion) then + fh_ice(i) = karman*karman/(fm_ice(i)*ch_ice(i)) + end if + + !4) try fh2_ice, limit to be less than or equal to constant*fh_ice? fh2_ice(i) = karman*xxfh2(i) - ch_ice(i) = karman*karman/(fm_ice(i) * fh_ice(i)) + fh2_ice(i) = min(fh2_ice(i), fh_ice(i)) !fh2_ice > fh_ice leads to bad values in sfc_diag.f - !GJF: these bounds on drag coefficients are from Chunxi Zhang's module_sf_sfclayrev.f90 - cdm_ice(i) = max(cdm_ice(i), cdlimit) - cdm_ice(i) = min(cdm_ice(i), 0.1) - ch_ice(i) = max(ch_ice(i), cdlimit) - ch_ice(i) = min(ch_ice(i), 0.1) - !GJF: this bound is from WRF's module_sf_gfdl.F (I'm not sure if both are needed or which is more restrictive.) - ch_ice(i) = min(ch_ice(i), 0.05/wspd(i)) + !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih + !psim_ice(i)=gz1oz0(i)-fm_ice(i) + !psih_ice(i)=gz1oz0(i)-fh_ice(i) ustar_ice(i) = 0.01*sqrt(cdm_ice(i)* & (upc(i)*upc(i) + vpc(i)*vpc(i))) @@ -627,24 +663,38 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & !gz1oz0(i) = alog(zkmax(i)/znt_ocn(i)) !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling - + + cdm_ocn(i) = max(cdm_ocn(i), cd_low_limit) + cdm_ocn(i) = min(cdm_ocn(i), cd_high_limit) fm_ocn(i) = karman/sqrt(cdm_ocn(i)) + + !1) try fh_ocn from MFLUX2 fh_ocn(i) = karman*xxfh(i) - !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih - !psim_ocn(i)=gz1oz0(i)-fm_ocn(i) - !psih_ocn(i)=gz1oz0(i)-fh_ocn(i) + !2) calc ch_ocn from fm_ocn and fh_ocn + ch_ocn(i) = karman*karman/(fm_ocn(i) * fh_ocn(i)) + + !3) check if ch_lnd is out of bounds (if so, recalculate fh_lnd from bounded value) + ch_bound_excursion = .false. + if (ch_ocn(i) < ch_low_limit) then + ch_bound_excursion = .true. + ch_ocn(i) = ch_low_limit + else if (ch_ocn(i) > ch_high_limit) then + ch_bound_excursion = .true. + ch_ocn(i) = ch_high_limit + end if + + if (ch_bound_excursion) then + fh_ocn(i) = karman*karman/(fm_ocn(i)*ch_ocn(i)) + end if + !4) try fh2_ocn, limit to be less than or equal to constant*fh_ocn? fh2_ocn(i) = karman*xxfh2(i) - ch_ocn(i) = karman*karman/(fm_ocn(i) * fh_ocn(i)) + fh2_ocn(i) = min(fh2_ocn(i), fh_ocn(i)) !fh2_ocn > fh_ocn leads to bad values in sfc_diag.F - !GJF: these bounds on drag coefficients are from Chunxi Zhang's module_sf_sfclayrev.f90 - cdm_ocn(i) = max(cdm_ocn(i), cdlimit) - cdm_ocn(i) = min(cdm_ocn(i), 0.1) - ch_ocn(i) = max(ch_ocn(i), cdlimit) - ch_ocn(i) = min(ch_ocn(i), 0.1) - !GJF: this bound is from WRF's module_sf_gfdl.F (I'm not sure if both are needed or which is more restrictive.) - ch_ocn(i) = min(ch_ocn(i), 0.05/wspd(i)) + !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih + !psim_ocn(i)=gz1oz0(i)-fm_ocn(i) + !psih_ocn(i)=gz1oz0(i)-fh_ocn(i) ustar_ocn(i) = 0.01*sqrt(cdm_ocn(i)* & (upc(i)*upc(i) + vpc(i)*vpc(i))) From 6e4c7874d6685953b8887fd7638fdfb8870c4b2d Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 19 May 2020 07:20:18 -0600 Subject: [PATCH 161/404] Move canopy heat storage calculation of reduced latent/sensible heat flux from GFS_PBL_generic_pre to GFS_surface_generic_post and remove workaround in MYNNPBL wrapper --- physics/GFS_PBL_generic.F90 | 47 +----------- physics/GFS_PBL_generic.meta | 107 ---------------------------- physics/GFS_surface_generic.F90 | 48 ++++++++++++- physics/GFS_surface_generic.meta | 89 +++++++++++++++++++++++ physics/module_MYNNPBL_wrapper.F90 | 10 +-- physics/module_MYNNPBL_wrapper.meta | 22 +----- 6 files changed, 141 insertions(+), 182 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index b17f031bc..75c27fcc7 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -84,9 +84,8 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef, trans_aero, ntchs, ntchm, & imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires, cplchm, ltaerosol, & - hybedmf, do_shoc, satmedmf, qgrs, vdftra, lheatstrg, z0fac, e0fac, zorl, & - u10m, v10m, hflx, evap, hflxq, evapq, hffac, hefac, save_u, save_v, save_t, & - save_q, ldiag3d, qdiag3d, lssav, ugrs, vgrs, tgrs, errmsg, errflg) + hybedmf, do_shoc, satmedmf, qgrs, vdftra, save_u, save_v, save_t, save_q, & + ldiag3d, qdiag3d, lssav, ugrs, vgrs, tgrs, errmsg, errflg) use machine, only : kind_phys use GFS_PBL_generic_common, only : set_aerosol_tracer_index @@ -107,25 +106,12 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, real(kind=kind_phys), dimension(im, levs), intent(out) :: save_u, save_v, save_t real(kind=kind_phys), dimension(im, levs, ntrac), intent(out) :: save_q - ! For canopy heat storage - logical, intent(in) :: lheatstrg - real(kind=kind_phys), intent(in) :: z0fac, e0fac - real(kind=kind_phys), dimension(im), intent(in) :: zorl, u10m, v10m - real(kind=kind_phys), dimension(im), intent(in) :: hflx, evap - real(kind=kind_phys), dimension(im), intent(out) :: hflxq, evapq - real(kind=kind_phys), dimension(im), intent(out) :: hffac, hefac - ! CCPP error handling variables character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - ! Parameters for canopy heat storage parametrization - real (kind=kind_phys), parameter :: z0min=0.2, z0max=1.0 - real (kind=kind_phys), parameter :: u10min=2.5, u10max=7.5 - ! Local variables integer :: i, k, kk, k1, n - real(kind=kind_phys) :: tem, tem1, tem2 ! Initialize CCPP error handling variables errmsg = '' @@ -281,35 +267,6 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, ! endif -! --- ... Boundary Layer and Free atmospheic turbulence parameterization -! -! in order to achieve heat storage within canopy layer, in the canopy heat -! storage parameterization the kinematic sensible and latent heat fluxes -! (hflx & evap) as surface boundary forcings to the pbl scheme are -! reduced as a function of surface roughness -! - do i=1,im - hflxq(i) = hflx(i) - evapq(i) = evap(i) - hffac(i) = 1.0 - hefac(i) = 1.0 - enddo - if (lheatstrg) then - do i=1,im - tem = 0.01 * zorl(i) ! change unit from cm to m - tem1 = (tem - z0min) / (z0max - z0min) - hffac(i) = z0fac * min(max(tem1, 0.0), 1.0) - tem = sqrt(u10m(i)**2+v10m(i)**2) - tem1 = (tem - u10min) / (u10max - u10min) - tem2 = 1.0 - min(max(tem1, 0.0), 1.0) - hffac(i) = tem2 * hffac(i) - hefac(i) = 1. + e0fac * hffac(i) - hffac(i) = 1. + hffac(i) - hflxq(i) = hflx(i) / hffac(i) - evapq(i) = evap(i) / hefac(i) - enddo - endif - if(ldiag3d .and. lssav) then do k=1,levs do i=1,im diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index c46ed37f5..9a130831c 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -307,113 +307,6 @@ kind = kind_phys intent = inout optional = F -[lheatstrg] - standard_name = flag_for_canopy_heat_storage - long_name = flag for canopy heat storage parameterization - units = flag - dimensions = () - type = logical - intent = in - optional = F -[z0fac] - standard_name = surface_roughness_fraction_factor - long_name = surface roughness fraction factor for canopy heat storage parameterization - units = none - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[e0fac] - standard_name = latent_heat_flux_fraction_factor_relative_to_sensible_heat_flux - long_name = latent heat flux fraction factor relative to sensible heat flux for canopy heat storage parameterization - units = none - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[u10m] - standard_name = x_wind_at_10m - long_name = 10 meter u wind speed - units = m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[v10m] - standard_name = y_wind_at_10m - long_name = 10 meter v wind speed - units = m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux - long_name = kinematic surface upward sensible heat flux - units = K m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[evap] - standard_name = kinematic_surface_upward_latent_heat_flux - long_name = kinematic surface upward latent heat flux - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[hflxq] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux reduced by surface roughness - units = K m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[evapq] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux reduced by surface roughness - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[hefac] - standard_name = surface_upward_latent_heat_flux_reduction_factor - long_name = surface upward latent heat flux reduction factor from canopy heat storage - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[hffac] - standard_name = surface_upward_sensible_heat_flux_reduction_factor - long_name = surface upward sensible heat flux reduction factor from canopy heat storage - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [save_u] standard_name = x_wind_save long_name = x-wind before entering a physics scheme diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index dbcdec24b..30a29d393 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -221,7 +221,8 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, & v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, & nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, evcwa, transa, sbsnoa, snowca, snohfa, ep, & - runoff, srunoff, runof, drain, errmsg, errflg) + runoff, srunoff, runof, drain, lheatstrg, z0fac, e0fac, zorl, hflx, evap, hflxq, evapq, hffac, hefac, & + errmsg, errflg) implicit none @@ -243,13 +244,29 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt real(kind=kind_phys), dimension(im), intent(inout) :: runoff, srunoff real(kind=kind_phys), dimension(im), intent(in) :: drain, runof + ! For canopy heat storage + logical, intent(in) :: lheatstrg + real(kind=kind_phys), intent(in) :: z0fac, e0fac + real(kind=kind_phys), dimension(im), intent(in) :: zorl + real(kind=kind_phys), dimension(im), intent(in) :: hflx, evap + real(kind=kind_phys), dimension(im), intent(out) :: hflxq, evapq + real(kind=kind_phys), dimension(im), intent(out) :: hffac, hefac + + ! CCPP error handling variables character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + ! Local variables + real(kind=kind_phys), parameter :: albdf = 0.06d0 + ! Parameters for canopy heat storage parametrization + real(kind=kind_phys), parameter :: z0min=0.2, z0max=1.0 + real(kind=kind_phys), parameter :: u10min=2.5, u10max=7.5 + integer :: i real(kind=kind_phys) :: xcosz_loc, ocalnirdf_cpl, ocalnirbm_cpl, ocalvisdf_cpl, ocalvisbm_cpl + real(kind=kind_phys) :: tem, tem1, tem2 ! Initialize CCPP error handling variables errmsg = '' @@ -354,6 +371,35 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt enddo endif +! --- ... Boundary Layer and Free atmospheic turbulence parameterization +! +! in order to achieve heat storage within canopy layer, in the canopy heat +! storage parameterization the kinematic sensible and latent heat fluxes +! (hflx & evap) as surface boundary forcings to the pbl scheme are +! reduced as a function of surface roughness +! + do i=1,im + hflxq(i) = hflx(i) + evapq(i) = evap(i) + hffac(i) = 1.0 + hefac(i) = 1.0 + enddo + if (lheatstrg) then + do i=1,im + tem = 0.01 * zorl(i) ! change unit from cm to m + tem1 = (tem - z0min) / (z0max - z0min) + hffac(i) = z0fac * min(max(tem1, 0.0), 1.0) + tem = sqrt(u10m(i)**2+v10m(i)**2) + tem1 = (tem - u10min) / (u10max - u10min) + tem2 = 1.0 - min(max(tem1, 0.0), 1.0) + hffac(i) = tem2 * hffac(i) + hefac(i) = 1. + e0fac * hffac(i) + hffac(i) = 1. + hffac(i) + hflxq(i) = hflx(i) / hffac(i) + evapq(i) = evap(i) / hefac(i) + enddo + endif + end subroutine GFS_surface_generic_post_run end module GFS_surface_generic_post diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index 81ca18f94..10a060bc3 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -1280,6 +1280,95 @@ kind = kind_phys intent = in optional = F +[lheatstrg] + standard_name = flag_for_canopy_heat_storage + long_name = flag for canopy heat storage parameterization + units = flag + dimensions = () + type = logical + intent = in + optional = F +[z0fac] + standard_name = surface_roughness_fraction_factor + long_name = surface roughness fraction factor for canopy heat storage parameterization + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[e0fac] + standard_name = latent_heat_flux_fraction_factor_relative_to_sensible_heat_flux + long_name = latent heat flux fraction factor relative to sensible heat flux for canopy heat storage parameterization + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hflx] + standard_name = kinematic_surface_upward_sensible_heat_flux + long_name = kinematic surface upward sensible heat flux + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[evap] + standard_name = kinematic_surface_upward_latent_heat_flux + long_name = kinematic surface upward latent heat flux + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hflxq] + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward sensible heat flux reduced by surface roughness + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[evapq] + standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward latent heat flux reduced by surface roughness + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[hefac] + standard_name = surface_upward_latent_heat_flux_reduction_factor + long_name = surface upward latent heat flux reduction factor from canopy heat storage + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[hffac] + standard_name = surface_upward_sensible_heat_flux_reduction_factor + long_name = surface upward sensible heat flux reduction factor from canopy heat storage + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index b215e5e62..e6c553350 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -52,7 +52,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & qgrs_ice_aer_num_conc, & & prsl,exner, & & slmsk,tsurf,qsfc,ps, & - & ust,ch,hflx,qflx,hflxq,qflxq, & + & ust,ch,hflx,qflx, & & wspd,rb,dtsfc1,dqsfc1, & & dtsfci_diag,dqsfci_diag, & & dtsfc_diag,dqsfc_diag, & @@ -268,8 +268,6 @@ SUBROUTINE mynnedmf_wrapper_run( & real(kind=kind_phys), dimension(im), intent(in) :: & & dx,zorl,slmsk,tsurf,qsfc,ps, & & hflx,qflx,ust,wspd,rb,recmol - real(kind=kind_phys), dimension(im), intent(out) :: & - & hflxq, qflxq real(kind=kind_phys), dimension(im), intent(inout) :: & & pblh @@ -306,12 +304,6 @@ SUBROUTINE mynnedmf_wrapper_run( & !print*,"in MYNN, initflag=",initflag endif - ! Set "kinematic surface upward latent/sensible heat flux reduced by - ! surface roughness" to kinematic surface upward latent/sensible heat flux, - ! because the lheatstrg capability in GFS_PBL_generic_pre is not implemented - hflxq = hflx - qflxq = qflx - ! Assign variables for each microphysics scheme if (imp_physics == imp_physics_wsm6) then ! WSM6 diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 7db6c2621..393ad5292 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -334,40 +334,22 @@ intent = out optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux - long_name = kinematic surface upward sensible heat flux - units = K m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[hflxq] standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out - optional = F -[qflx] - standard_name = kinematic_surface_upward_latent_heat_flux - long_name = kinematic surface upward latent heat flux - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys intent = in optional = F -[qflxq] +[qflx] standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = in optional = F [wspd] standard_name = wind_speed_at_lowest_model_layer From cfdf0bb41bedb78c1a9d2931b36d5d5acddc85f4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 19 May 2020 14:21:35 -0600 Subject: [PATCH 162/404] Fixed unit error in cloud-diagnostic call --- physics/GFS_cloud_diagnostics.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index c77bac5ce..77e28582e 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -124,7 +124,7 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ ! layer indices for low, mid, and high clouds. The three cloud domain boundaries are ! defined by ptopc. The cloud overlapping method is defined by control flag 'iovr', which may ! be different for lw and sw radiation programs. - call gethml(p_lay, ptop1, cld_frac, cldcnv, deltaZ, de_lgth, nCol, nLev, cldsa, mtopa, mbota) + call gethml(p_lay/100., ptop1, cld_frac, cldcnv, deltaZ, de_lgth, nCol, nLev, cldsa, mtopa, mbota) end subroutine GFS_cloud_diagnostics_run From 6d3ce4f8ec86d90a25747f6fbc150caa96427e6e Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 19 May 2020 16:06:19 -0600 Subject: [PATCH 163/404] use precalculated wind speed with convective gustiness component in gfdl_sfc_layer instead of recalculating --- physics/gfdl_sfc_layer.F90 | 35 +++++++++++++---------------------- physics/gfdl_sfc_layer.meta | 9 +++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/physics/gfdl_sfc_layer.F90 b/physics/gfdl_sfc_layer.F90 index 1b29c166c..3f4426613 100644 --- a/physics/gfdl_sfc_layer.F90 +++ b/physics/gfdl_sfc_layer.F90 @@ -103,13 +103,13 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & lsm_noah, lsm_noahmp, lsm_ruc, lsm_noah_wrfv4, icoef_sf, cplwav, & cplwav2atm, lcurr_sf, pert_Cd, ntsflg, sfenth, z1, shdmax, ivegsrc, & vegtype, sigmaf, dt, wet, dry, icy, isltyp, rd, grav, ep1, ep2, smois, & - psfc, prsl1, q1, t1, u1, v1, u10, v10, gsw, glw, tsurf_ocn, tsurf_lnd, & - tsurf_ice, tskin_ocn, tskin_lnd, tskin_ice, ustar_ocn, ustar_lnd, & - ustar_ice, znt_ocn, znt_lnd, znt_ice, cdm_ocn, cdm_lnd, cdm_ice, & - stress_ocn, stress_lnd, stress_ice, rib_ocn, rib_lnd, rib_ice, fm_ocn, & - fm_lnd, fm_ice, fh_ocn, fh_lnd, fh_ice, fh2_ocn, fh2_lnd, fh2_ice, & - ch_ocn, ch_lnd, ch_ice, fm10_ocn, fm10_lnd, fm10_ice, qss_ocn, qss_lnd, & - qss_ice, errmsg, errflg) + psfc, prsl1, q1, t1, u1, v1, wspd, u10, v10, gsw, glw, tsurf_ocn, & + tsurf_lnd, tsurf_ice, tskin_ocn, tskin_lnd, tskin_ice, ustar_ocn, & + ustar_lnd, ustar_ice, znt_ocn, znt_lnd, znt_ice, cdm_ocn, cdm_lnd, & + cdm_ice, stress_ocn, stress_lnd, stress_ice, rib_ocn, rib_lnd, rib_ice, & + fm_ocn, fm_lnd, fm_ice, fh_ocn, fh_lnd, fh_ice, fh2_ocn, fh2_lnd, & + fh2_ice, ch_ocn, ch_lnd, ch_ice, fm10_ocn, fm10_lnd, fm10_ice, qss_ocn, & + qss_lnd, qss_ice, errmsg, errflg) use funcphys, only: fpvs @@ -136,8 +136,8 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & real(kind=kind_phys), intent(in) :: rd,grav,ep1,ep2 real(kind=kind_phys), dimension(im,nsoil), intent(in) :: smois real(kind=kind_phys), dimension(im), intent(in) :: psfc, prsl1, & - q1, t1, u1, v1, u10, v10, gsw, glw, z1, shdmax, sigmaf, xlat, xlon, & - tsurf_ocn, tsurf_lnd, tsurf_ice + q1, t1, u1, v1, wspd, u10, v10, gsw, glw, z1, shdmax, sigmaf, xlat, & + xlon, tsurf_ocn, tsurf_lnd, tsurf_ice real(kind=kind_phys), intent(inout), dimension(im) :: tskin_ocn, & tskin_lnd, tskin_ice, ustar_ocn, ustar_lnd, ustar_ice, & @@ -167,7 +167,7 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & real(kind=kind_phys) :: ens_Cdamp real(kind=kind_phys), dimension(im) :: wetc, pspc, pkmax, tstrc, upc, & - vpc, mznt, slwdc, wspd, wind10, qfx, qgh, zkmax, z1_cm, z0max, ztmax + vpc, mznt, slwdc, wind10, qfx, qgh, zkmax, z1_cm, z0max, ztmax real(kind=kind_phys), dimension(im) :: u10_lnd, u10_ocn, u10_ice, & v10_lnd, v10_ocn, v10_ice @@ -254,13 +254,6 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & upc(i) = u1(i)*100. ! convert from m s-1 to cm s-1 vpc(i) = v1(i)*100. ! convert from m s-1 to cm s-1 - !GJF: wind speed at the lowest model layer is calculated in a scheme prior to this (if this scheme - ! is part of a GFS-based suite), but it is recalculated here because this one DOES NOT include - ! a convective wind enhancement component (convective gustiness factor) to follow the original - ! GFDL surface layer scheme; this may not be necessary - wspd(i) = sqrt(u1(i)*u1(i) + v1(i)*v1(i)) - wspd(i) = amax1(wspd(i),1.0) !wspd is in m s-1 - !Wang: use previous u10 v10 to compute wind10, input to MFLUX2 to compute z0 (for first time step, u10 and v10 may be zero) wind10(i)=sqrt(u10(i)*u10(i)+v10(i)*v10(i)) !m s-1 @@ -373,8 +366,7 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & !GJF: from WRF's module_sf_gfdl.F if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then - !GJF: why not use wspd(i) to save compute? - wind10(i)=sqrt(u1(i)*u1(i)+v1(i)*v1(i))*alog(10.0/z0max(i))/alog(z1(i)/z0max(i)) !m s-1 + wind10(i)=wspd(i)*alog(10.0/z0max(i))/alog(z1(i)/z0max(i)) !m s-1 end if wind10(i)=wind10(i)*100.0 !convert from m/s to cm/s @@ -523,8 +515,7 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & !GJF: from WRF's module_sf_gfdl.F if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then - !GJF: why not use wspd(i) to save compute? - wind10(i)=sqrt(u1(i)*u1(i)+v1(i)*v1(i))*alog(10.0/z0max(i))/alog(z1(i)/z0max(i)) + wind10(i)=wspd(i)*alog(10.0/z0max(i))/alog(z1(i)/z0max(i)) end if wind10(i)=wind10(i)*100.0 !! m/s to cm/s @@ -628,7 +619,7 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & !GJF: from WRF's module_sf_gfdl.F if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then - wind10(i)=sqrt(u1(i)*u1(i)+v1(i)*v1(i))*alog(10.0/(0.01*znt_ocn(i)))/alog(z1(i)/(0.01*znt_ocn(i))) + wind10(i)=wspd(i)*alog(10.0/(0.01*znt_ocn(i)))/alog(z1(i)/(0.01*znt_ocn(i))) end if wind10(i)=wind10(i)*100.0 !! m/s to cm/s diff --git a/physics/gfdl_sfc_layer.meta b/physics/gfdl_sfc_layer.meta index 738216d1a..5a245cd69 100644 --- a/physics/gfdl_sfc_layer.meta +++ b/physics/gfdl_sfc_layer.meta @@ -401,6 +401,15 @@ kind = kind_phys intent = in optional = F +[wspd] + standard_name = wind_speed_at_lowest_model_layer + long_name = wind speed at lowest model level + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [u10] standard_name = x_wind_at_10m long_name = 10 meter u wind speed From 7d7c2ca1e7b6cedcac9484af1c46fcc19bc0714f Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 19 May 2020 20:56:51 -0600 Subject: [PATCH 164/404] physics/rrtmgp_lw_cloud_sampling.*, physics/rrtmgp_sw_cloud_sampling.*: add missing mandatory CCPP arguments errmsg and errflg --- physics/rrtmgp_lw_cloud_sampling.F90 | 10 +++++++++- physics/rrtmgp_lw_cloud_sampling.meta | 19 ++++++++++++++++++- physics/rrtmgp_sw_cloud_sampling.F90 | 10 +++++++++- physics/rrtmgp_sw_cloud_sampling.meta | 19 ++++++++++++++++++- 4 files changed, 54 insertions(+), 4 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index e42336923..d1da08405 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -18,13 +18,21 @@ module rrtmgp_lw_cloud_sampling !! \section arg_table_rrtmgp_lw_cloud_sampling_init !! \htmlinclude rrtmgp_lw_cloud_sampling_init.html !! - subroutine rrtmgp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0) + subroutine rrtmgp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0, errmsg, errflg) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! RRTMGP DDT: K-distribution data ! Outputs integer, intent(out) :: & ipsdlw0 ! Initial permutation seed for McICA + character(len=*), intent(out) :: & + errmsg ! CCPP error message + integer, intent(out) :: & + errflg ! CCPP error code + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 ! Set initial permutation seed for McICA, initially set to number of G-points ipsdlw0 = lw_gas_props%get_ngpt() diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 547c6177c..87e785a4d 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -17,6 +17,23 @@ type = integer intent = out optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F ###################################################### [ccpp-arg-table] @@ -111,4 +128,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 0c839afb2..45d0fad67 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -18,13 +18,21 @@ module rrtmgp_sw_cloud_sampling !! \section arg_table_rrtmgp_sw_cloud_sampling_init !! \htmlinclude rrtmgp_sw_cloud_sampling.html !! - subroutine rrtmgp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0) + subroutine rrtmgp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0, errmsg, errflg) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: K-distribution data ! Outputs integer, intent(out) :: & ipsdsw0 ! Initial permutation seed for McICA + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 ! Set initial permutation seed for McICA, initially set to number of G-points ipsdsw0 = sw_gas_props%get_ngpt() diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 3ad9073d5..c30d4934d 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -17,6 +17,23 @@ type = integer intent = out optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F ###################################################### [ccpp-arg-table] @@ -127,4 +144,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F From 4b5c379717ae789bbc61b63c1eb9d21e30018bfa Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 19 May 2020 20:58:35 -0600 Subject: [PATCH 165/404] Remove physics/GFS_suite_init_finalize_test.* --- physics/GFS_suite_init_finalize_test.F90 | 59 --------------------- physics/GFS_suite_init_finalize_test.meta | 64 ----------------------- 2 files changed, 123 deletions(-) delete mode 100644 physics/GFS_suite_init_finalize_test.F90 delete mode 100644 physics/GFS_suite_init_finalize_test.meta diff --git a/physics/GFS_suite_init_finalize_test.F90 b/physics/GFS_suite_init_finalize_test.F90 deleted file mode 100644 index 0a958d2fc..000000000 --- a/physics/GFS_suite_init_finalize_test.F90 +++ /dev/null @@ -1,59 +0,0 @@ - module GFS_suite_ini_fini_test - - contains - -!> \section arg_table_GFS_suite_ini_fini_test_init Argument Table -!! \htmlinclude GFS_suite_ini_fini_test_init.html -!! - subroutine GFS_suite_ini_fini_test_init (errmsg, errflg) - - implicit none - - ! interface variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - errmsg = '' - errflg = 0 - - write(0,*) "DH DEBUG: IN GFS_suite_ini_fini_test_init" - - end subroutine GFS_suite_ini_fini_test_init - -!> \section arg_table_GFS_suite_ini_fini_test_finalize Argument Table -!! \htmlinclude GFS_suite_ini_fini_test_finalize.html -!! - subroutine GFS_suite_ini_fini_test_finalize(errmsg, errflg) - - implicit none - - ! interface variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - errmsg = '' - errflg = 0 - - write(0,*) "DH DEBUG: IN GFS_suite_ini_fini_test_finalize" - - end subroutine GFS_suite_ini_fini_test_finalize - -!> \section arg_table_GFS_suite_ini_fini_test_run Argument Table -!! \htmlinclude GFS_suite_ini_fini_test_run.html -!! - subroutine GFS_suite_ini_fini_test_run (errmsg, errflg) - - use GFS_typedefs, only: GFS_interstitial_type - - implicit none - - ! interface variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - write(errmsg,'(a)') "DH ERROR: GFS_suite_ini_fini_test_run should not be called" - errflg = 1 - - end subroutine GFS_suite_ini_fini_test_run - - end module GFS_suite_ini_fini_test diff --git a/physics/GFS_suite_init_finalize_test.meta b/physics/GFS_suite_init_finalize_test.meta deleted file mode 100644 index cdca8b0e0..000000000 --- a/physics/GFS_suite_init_finalize_test.meta +++ /dev/null @@ -1,64 +0,0 @@ -[ccpp-arg-table] - name = GFS_suite_ini_fini_test_init - type = scheme -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F - -######################################################################## -[ccpp-arg-table] - name = GFS_suite_ini_fini_test_finalize - type = scheme -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F - -######################################################################## -[ccpp-arg-table] - name = GFS_suite_ini_fini_test_run - type = scheme -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F From b8629ee129fd81f7ed515c5faf85533cb1e88af3 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 19 May 2020 21:25:54 -0600 Subject: [PATCH 166/404] add logic to maintain ratio between fh and fh2 to attempt to reign in spuriously large 2m T,q diagnostics --- physics/gfdl_sfc_layer.F90 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/physics/gfdl_sfc_layer.F90 b/physics/gfdl_sfc_layer.F90 index 3f4426613..6bd969ac3 100644 --- a/physics/gfdl_sfc_layer.F90 +++ b/physics/gfdl_sfc_layer.F90 @@ -183,7 +183,7 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & real(kind=kind_phys), dimension(1:30) :: maxsmc, drysmc real(kind=kind_phys) :: smcmax, smcdry, zhalf, cd10, & esat, fm_lnd_old, fh_lnd_old, tem1, tem2, czilc, cd_low_limit, & - cd_high_limit, ch_low_limit, ch_high_limit + cd_high_limit, ch_low_limit, ch_high_limit, fh2_fh_ratio !#### This block will become unnecessary when maxsmc and drysmc come through the CCPP #### if (lsm == lsm_noah) then @@ -416,14 +416,14 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ch_lnd(i) = ch_high_limit end if + fh2_lnd(i) = karman*xxfh2(i) + if (ch_bound_excursion) then + fh2_fh_ratio = min(xxfh2(i)/xxfh(i), 1.0) fh_lnd(i) = karman*karman/(fm_lnd(i)*ch_lnd(i)) + fh2_lnd(i) = fh2_fh_ratio*fh_lnd(i) end if - !4) try fh2_lnd, limit to be less than or equal to constant*fh_lnd? - fh2_lnd(i) = karman*xxfh2(i) - fh2_lnd(i) = min(fh2_lnd(i), fh_lnd(i)) !fh2_lnd > fh_lnd leads to bad values in sfc_diag.f - !GJF: Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih !psim_lnd(i)=gz1oz0(i)-fm_lnd(i) !psih_lnd(i)=gz1oz0(i)-fh_lnd(i) @@ -565,14 +565,14 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ch_ice(i) = ch_high_limit end if + fh2_ice(i) = karman*xxfh2(i) + if (ch_bound_excursion) then + fh2_fh_ratio = min(xxfh2(i)/xxfh(i), 1.0) fh_ice(i) = karman*karman/(fm_ice(i)*ch_ice(i)) + fh2_ice(i) = fh2_fh_ratio*fh_ice(i) end if - !4) try fh2_ice, limit to be less than or equal to constant*fh_ice? - fh2_ice(i) = karman*xxfh2(i) - fh2_ice(i) = min(fh2_ice(i), fh_ice(i)) !fh2_ice > fh_ice leads to bad values in sfc_diag.f - !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih !psim_ice(i)=gz1oz0(i)-fm_ice(i) !psih_ice(i)=gz1oz0(i)-fh_ice(i) @@ -675,14 +675,14 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ch_ocn(i) = ch_high_limit end if + fh2_ocn(i) = karman*xxfh2(i) + if (ch_bound_excursion) then + fh2_fh_ratio = min(xxfh2(i)/xxfh(i), 1.0) fh_ocn(i) = karman*karman/(fm_ocn(i)*ch_ocn(i)) + fh2_ocn(i) = fh2_fh_ratio*fh_ocn(i) end if - !4) try fh2_ocn, limit to be less than or equal to constant*fh_ocn? - fh2_ocn(i) = karman*xxfh2(i) - fh2_ocn(i) = min(fh2_ocn(i), fh_ocn(i)) !fh2_ocn > fh_ocn leads to bad values in sfc_diag.F - !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih !psim_ocn(i)=gz1oz0(i)-fm_ocn(i) !psih_ocn(i)=gz1oz0(i)-fh_ocn(i) From b328abb08ff2410faeae3cc31e9619ec02807873 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Wed, 20 May 2020 04:33:34 +0000 Subject: [PATCH 167/404] Merge of latest GSL drag suite with latest updates on NOAA-GSD repo, gsd/develop branch --- physics/GFS_GWD_generic.F90 | 7 +++---- physics/GFS_GWD_generic.meta | 9 --------- physics/drag_suite.F90 | 9 --------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index 7d3f86b00..09c969162 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -17,7 +17,7 @@ end subroutine GFS_GWD_generic_pre_init !! @{ subroutine GFS_GWD_generic_pre_run( & & im, levs, nmtvr, mntvar, & - & var, oc, oa4, clx, theta, & + & oc, oa4, clx, theta, & & varss, ocss, oa4ss, clxss, & & sigma, gamma, elvmax, lssav, ldiag3d, & & dudt, dvdt, dtdt, du3dt, dv3dt, dt3dt, dtf, & @@ -30,8 +30,8 @@ subroutine GFS_GWD_generic_pre_run( & real(kind=kind_phys), intent(in) :: mntvar(im,nmtvr) real(kind=kind_phys), intent(out) :: & - & var(im), oc(im), oa4(im,4), clx(im,4), & - & varss(im), ocss(im), oa4ss(im,4), clxss(im,4), & + & oc(im), oa4(im,4), clx(im,4), & + & varss(:), ocss(:), oa4ss(:,:), clxss(:,:), & & theta(im), sigma(im), gamma(im), elvmax(im) logical, intent(in) :: lssav, ldiag3d, flag_for_gwd_generic_tend @@ -84,7 +84,6 @@ subroutine GFS_GWD_generic_pre_run( & clx(:,3) = 0.0 clx(:,4) = 0.0 elseif (nmtvr == 24) then ! GSD_drag_suite - var(:) = mntvar(:,1) oc(:) = mntvar(:,2) oa4(:,1) = mntvar(:,3) oa4(:,2) = mntvar(:,4) diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 78f2e742d..7f987f28f 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -39,15 +39,6 @@ kind = kind_phys intent = in optional = F -[var] - standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [oc] standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid orography diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 0eb1f3b5f..86ed514f9 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -475,15 +475,6 @@ subroutine drag_suite_run( & errflg = 0 -! Temporary line -!if (me==master) then -! print *, "Ahoj svete!: In drag suite -- cdmbgwd =", cdmbgwd(:) -! print *, "imx =", imx, " dx =", dx(1) -! print * -!end if - - -! if (me==master) print *,"Running drag suite" !-------------------------------------------------------------------- ! SCALE-ADPTIVE PARAMETER FROM GFS GWD SCHEME !-------------------------------------------------------------------- From 3e74dc233912b980c040464918abab7a321eda23 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 20 May 2020 13:49:56 -0600 Subject: [PATCH 168/404] Cleaned up optional arguments for rte routines. --- physics/rrtmgp_lw_rte.F90 | 51 +++++++++++++++++--------------------- physics/rrtmgp_lw_rte.meta | 17 ++++++------- physics/rrtmgp_sw_rte.F90 | 42 +++++++++++++++---------------- physics/rrtmgp_sw_rte.meta | 17 ++++++------- 4 files changed, 59 insertions(+), 68 deletions(-) diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index d4873799b..66a968af6 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -29,14 +29,15 @@ end subroutine rrtmgp_lw_rte_init !! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte_run.html !! - subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_gas_props, & - sfc_emiss_byband, sources, lw_optical_props_clrsky, lw_optical_props_clouds, & - lw_optical_props_aerosol, nGauss_angles, fluxlwUP_allsky, fluxlwDOWN_allsky,& - fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlwb, errmsg, errflg) + subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, nCol, nLev, p_lay, t_lay, p_lev, skt, & + lw_gas_props, sfc_emiss_byband, sources, lw_optical_props_clrsky, & + lw_optical_props_clouds, lw_optical_props_aerosol, nGauss_angles, fluxlwUP_allsky, & + fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, errmsg, errflg) ! Inputs logical, intent(in) :: & - doLWrad ! Logical flag for longwave radiation call + doLWrad, & ! Logical flag for longwave radiation call + doLWclrsky ! Compute clear-sky fluxes for clear-sky heating-rate? integer, intent(in) :: & nCol, & ! Number of horizontal gridpoints nLev, & ! Number of vertical levels @@ -70,10 +71,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g integer, intent(out) :: & errflg ! CCPP error flag - ! Outputs (optional) - real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()), optional, intent(inout) :: & - hlwb ! All-sky heating rate, by band (K/sec) - ! Local variables integer :: & iCol, iBand, iLay @@ -82,7 +79,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g real(kind_phys), dimension(ncol,nLev+1,lw_gas_props%get_nband()),target :: & fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky logical :: & - l_AllSky_HR_byband, top_at_1 + top_at_1 ! Initialize CCPP error handling variables errmsg = '' @@ -93,9 +90,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g ! Vertical ordering? top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev)) - ! Are any optional outputs requested? Need to know now to compute correct fluxes. - l_AllSky_HR_byband = present(hlwb) - ! Initialize RRTMGP DDT containing 2D(3D) fluxes flux_allsky%bnd_flux_up => fluxLW_up_allsky flux_allsky%bnd_flux_dn => fluxLW_dn_allsky @@ -109,17 +103,22 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_aerosol%increment(lw_optical_props_clrsky)) ! Call RTE solver - call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - lw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - sources, & ! IN - source function - sfc_emiss_byband, & ! IN - surface emissivity in each LW band - flux_clrsky, & ! OUT - Fluxes - n_gauss_angles = nGauss_angles)) - ! Store fluxes - fluxlwUP_clrsky = sum(flux_clrsky%bnd_flux_up,dim=3) - fluxlwDOWN_clrsky = sum(flux_clrsky%bnd_flux_dn,dim=3) - + if (doLWclrsky) then + call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band + flux_clrsky, & ! OUT - Fluxes + n_gauss_angles = nGauss_angles)) + ! Store fluxes + fluxlwUP_clrsky = sum(flux_clrsky%bnd_flux_up,dim=3) + fluxlwDOWN_clrsky = sum(flux_clrsky%bnd_flux_dn,dim=3) + else + fluxlwUP_clrsky = 0.0 + fluxlwDOWN_clrsky = 0.0 + endif + ! ! All-sky fluxes ! @@ -138,10 +137,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g fluxlwUP_allsky = sum(flux_allsky%bnd_flux_up,dim=3) fluxlwDOWN_allsky = sum(flux_allsky%bnd_flux_dn,dim=3) - ! Only output fluxes by-band when heating-rate profiles by band are requested. - !if (l_AllSky_HR_byband) then - !endif - end subroutine rrtmgp_lw_rte_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index a2350b4c2..d3876a211 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -9,6 +9,14 @@ type = logical intent = in optional = F +[doLWclrsky] + standard_name = flag_for_output_of_longwave_heating_rate + long_name = flag to output lw heating rate (Radtend%lwhc) + units = flag + dimensions = () + type = logical + intent = in + optional = F [ncol] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -118,15 +126,6 @@ type = ty_source_func_lw intent = in optional = F -[hlwb] - standard_name = RRTMGP_lw_heating_rate_spectral - long_name = RRTMGP longwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = in - optional = T [fluxlwUP_allsky] standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 98f95a1bd..9719c6e86 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -28,15 +28,16 @@ end subroutine rrtmgp_sw_rte_init !! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! - subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t_lay, & - p_lev, sw_gas_props, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif, & + subroutine rrtmgp_sw_rte_run(doSWrad, doSWclrsky, nCol, nLev, nDay, idxday, coszen, p_lay, & + t_lay, p_lev, sw_gas_props, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif,& sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, sw_optical_props_clouds, & sw_optical_props_aerosol, rrtmgp_nGases, active_gases_array, scmpsw, fluxswUP_allsky, & - fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, hswb, errmsg, errflg) + fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) ! Inputs logical, intent(in) :: & - doSWrad ! Flag to calculate SW irradiances + doSWrad, & ! Flag to calculate SW irradiances + doSWclrsky ! Compute clear-sky fluxes? integer, intent(in) :: & nCol, & ! Number of horizontal gridpoints nday, & ! Number of daytime points @@ -69,10 +70,6 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t character(len=*),dimension(rrtmgp_nGases), intent(in) :: & active_gases_array ! Character array containing trace gases to include in RRTMGP - ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) - real(kind_phys), dimension(ncol,NLev,sw_gas_props%get_nband()), intent(inout), optional :: & - hswb ! All-sky heating rate, by band (K/sec) - ! Outputs character(len=*), intent(out) :: & errmsg ! CCPP error message @@ -103,7 +100,7 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t real(kind_phys), dimension(nday,NLev+1,sw_gas_props%get_nband()),target :: & fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky real(kind_phys), dimension(ncol,NLev) :: vmrTemp - logical :: l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 + logical :: l_scmpsw=.false., top_at_1 integer :: iGas,iSFC,iTOA,iBand ! Initialize CCPP error handling variables @@ -131,7 +128,6 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t endif ! Are any optional outputs requested? Need to know now to compute correct fluxes. - l_AllSky_HR_byband = present(hswb) l_scmpsw = present(scmpsw) if ( l_scmpsw ) then scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) @@ -170,18 +166,20 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol%increment(sw_optical_props_clrsky)) ! Delta-scale optical properties call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) - call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle - toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) - sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) - flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,NLev,nBand) - ! Store fluxes - fluxswUP_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_up,dim=3) - fluxswDOWN_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_dn,dim=3) - + if (doSWclrsky) then + call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) + sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) + flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,NLev,nBand) + ! Store fluxes + fluxswUP_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_up,dim=3) + fluxswDOWN_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_dn,dim=3) + endif + ! Compute all-sky fluxes ! All-sky fluxes (clear-sky + clouds) call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds%increment(sw_optical_props_clrsky)) diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 629ede530..6f0be98c5 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -9,6 +9,14 @@ type = logical intent = in optional = F +[doSWclrsky] + standard_name = flag_for_output_of_shortwave_heating_rate + long_name = flag to output sw heating rate (Radtend%swhc) + units = flag + dimensions = () + type = logical + intent = in + optional = F [ncol] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -215,15 +223,6 @@ kind = kind_phys intent = inout optional = F -[hswb] - standard_name = RRTMGP_sw_heating_rate_spectral - long_name = shortwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = inout - optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 2a31351d96497e93329fa064aa1664537ab5788d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 20 May 2020 13:53:50 -0600 Subject: [PATCH 169/404] Tidied up. Removed options not exercised. Replaced with errors. --- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 257 +++++++++-------------------- physics/GFS_rrtmgp_gfdlmp_pre.meta | 43 ----- 2 files changed, 74 insertions(+), 226 deletions(-) diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 442975d10..67b65b23c 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -10,13 +10,12 @@ module GFS_rrtmgp_gfdlmp_pre con_pi, & ! PI con_g ! Gravity (m/s2) use physparam, only: lcnorm,lcrick - + use rrtmgp_aux, only: check_error_msg + ! Parameters real(kind_phys), parameter :: & - reliq_def = 10.0, & ! Default liq radius to 10 micron - reice_def = 50.0, & ! Default ice radius to 50 micron - rrain_def = 1000.0, & ! Default rain radius to 1000 micron - rsnow_def = 250.0, & ! Default snow radius to 250 micron + reice_min = 10.0, & ! Minimum ice size allowed by scheme + reice_max = 150.0, & ! Maximum ice size allowed by scheme epsq = 1.0e-12, & ! Tiny value cllimit = 0.001, & ! Lowest cloud fraction in GFDL MP scheme gfac = 1.0e5/con_g @@ -32,8 +31,7 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_init !! \section arg_table_GFS_rrtmgp_gfdlmp_pre_run !! \htmlinclude GFS_rrtmgp_gfdlmp_pre_run.html !! - subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, p_lev, & - t_lay, tv_lay, tracer, & + subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & cld_rerain, errmsg, errflg) implicit none @@ -46,13 +44,6 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, integer, intent(in) :: & nCol, & ! Number of horizontal grid-points nLev ! Number of vertical-layers - real(kind_phys), dimension(nCol), intent(in) :: & - slmsk, & ! Land/sea/sea-ice mask - lat ! Latitude - real(kind_phys), dimension(nCol,nLev), intent(in) :: & - p_lay, & ! Pressure at model-layer (Pa) - t_lay, & ! Temperature at model layer (K) - tv_lay ! Virtual temperature at model-layers (K) real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) real(kind_phys), dimension(nCol, nLev, Model%ntrac),intent(in) :: & @@ -75,12 +66,10 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, errflg ! Error flag ! Local variables - real(kind_phys) :: tem1, tem2, tem3, clwt - real(kind_phys), dimension(nCol) :: rlat - real(kind_phys), dimension(nCol, nLev, min(4,Model%ncnd)) :: cld_condensate, clwf - integer :: i,k,l,ncndl,icnd - real(kind_phys), dimension(nCol,nLev) :: deltaP, cldcov - real(kind_phys), dimension(nCol,nLev,9) :: clouds + real(kind_phys) :: tem1 + real(kind_phys), dimension(nCol, nLev, min(4,Model%ncnd)) :: cld_condensate + integer :: i,k,l,ncndl + real(kind_phys), dimension(nCol,nLev) :: deltaP if (.not. (Model%lsswr .or. Model%lslwr)) return @@ -88,6 +77,42 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, errmsg = '' errflg = 0 + ! Test inputs + if (Model%ncnd .ne. 5) then + errmsg = 'Incorrect number of cloud condensates provided' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return + endif + ! + if (lcrick) then + errmsg = 'Namelist option lcrick is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return + endif + ! + if (lcnorm) then + errmsg = 'Namelist option lcnorm is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return + endif + ! + if (.not. Model%lgfdlmprad) then + errmsg = 'Namelist option gfdlmprad=F is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return + endif + ! + if(.not. Model%effr_in) then + errmsg = 'Namelist option effr_in=F is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return + endif + ! Initialize outputs cld_lwp(:,:) = 0.0 cld_reliq(:,:) = 0.0 @@ -98,33 +123,19 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, cld_swp(:,:) = 0.0 cld_resnow(:,:) = 0.0 - ! Compute layer pressure thickness (hPa) - deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. - ! #################################################################################### ! Pull out cloud information for GFDL MP scheme. ! #################################################################################### - ! Cloud hydrometeors - cld_condensate(:,:,:) = 0._kind_phys - if (Model%ncnd .eq. 2) then - cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! -liquid water - cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,Model%ntiw) ! -ice water - ncndl = Model%ncnd - endif - if (Model%ncnd .eq. 5) then - cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! -liquid water - cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,Model%ntiw) ! -ice water - cld_condensate(1:nCol,1:nLev,3) = tracer(1:nCol,1:nLev,Model%ntrw) ! -rain water - cld_condensate(1:nCol,1:nLev,4) = tracer(1:nCol,1:nLev,Model%ntsw) + & ! -snow + grapuel - tracer(1:nCol,1:nLev,Model%ntgl) + ! Condensate + cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! -liquid water + cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,Model%ntiw) ! -ice water + cld_condensate(1:nCol,1:nLev,3) = tracer(1:nCol,1:nLev,Model%ntrw) ! -rain water + cld_condensate(1:nCol,1:nLev,4) = tracer(1:nCol,1:nLev,Model%ntsw) + & ! -snow + grapuel + tracer(1:nCol,1:nLev,Model%ntgl) - ! Since we combine the snow and grapuel, define local variable for number of condensate types. - ncndl = min(4,Model%ncnd) - endif - - ! Cloud-fraction - cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) - + ! Since we combine the snow and grapuel, define local variable for number of condensate types. + ncndl = min(4,Model%ncnd) + ! Set really tiny suspended particle amounts to clear do l=1,ncndl do k=1,nLev @@ -134,148 +145,28 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, slmsk, lat, p_lay, enddo enddo - ! DJS asks. Do we need lcrick? If not replace clwf with cld_condensate(:,:,1) - if ( lcrick ) then - do icnd=1,ncndl - do i = 1, nCol - clwf(i,1,icnd) = 0.75*cld_condensate(i,1,icnd) + 0.25*cld_condensate(i,2,icnd) - clwf(i,nlev,icnd) = 0.75*cld_condensate(i,nLev,icnd) + 0.25*cld_condensate(i,nLev-1,icnd) - enddo - do k = 2, nLev-1 - do i = 1, nCol - clwf(i,k,icnd) = 0.25*cld_condensate(i,k-1,icnd) + 0.5*cld_condensate(i,k,icnd) + & - 0.25*cld_condensate(i,k+1,icnd) - enddo - enddo - enddo - else - do icnd=1,ncndl - do k = 1, nLev - do i = 1, nCol - clwf(i,k,icnd) = cld_condensate(i,k,icnd) - enddo - enddo - enddo - endif - - ! #################################################################################### - ! A) Compute Liquid/Ice/Rain/Snow(+groupel) cloud condensate paths - ! #################################################################################### - - ! #################################################################################### - ! i) This option uses the mixing-ratios and effective radii for 5 cloud hydrometeor types, - ! Liquid, Ice, Rain, and Snow(+groupel), to determine cloud properties. - ! Formerly progclduni() - ! #################################################################################### - if (Model%lgfdlmprad) then - ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) - do k = 1, nLev - do i = 1, nCol - if (cld_frac(i,k) .ge. cllimit) then - tem1 = gfac * deltaP(i,k) - cld_lwp(i,k) = clwf(i,k,1) * tem1 - cld_iwp(i,k) = clwf(i,k,2) * tem1 - ! Also Rain and Snow(+groupel) if provided - if (ncndl .eq. 4) then - cld_rwp(i,k) = clwf(i,k,3) * tem1 - cld_swp(i,k) = clwf(i,k,4) * tem1 - endif - endif - enddo - enddo - ! #################################################################################### - ! ii) This option uses only a single mixing-ratio and partitions into liquid/ice cloud - ! properties by phase. - ! Formerly progcld4() - ! #################################################################################### - else - ! Compute total-cloud suspended water. - clwf(:,:,1) = sum(clwf,dim=3) - - ! Compute liquid/ice condensate path (g/m2) - do k = 1, nLev - do i = 1, nCol - if (cld_frac(i,k) .ge. cllimit) then - clwt = max(0.0,clwf(i,k,1)) * gfac * deltaP(i,k) - tem2 = min( 1.0, max( 0.0, (con_ttp-t_lay(i,k))*0.05 ) ) - cld_iwp(i,k) = clwt * tem2 - cld_lwp(i,k) = clwt - cld_iwp(i,k) - endif - enddo - enddo - endif - - ! #################################################################################### - ! B) Particle sizes - ! #################################################################################### + ! Cloud-fraction + cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) - ! #################################################################################### - ! i) Use radii provided from the macrophysics - ! #################################################################################### - if (Model%effr_in) then - do k=1,nLev - do i=1,nCol - cld_reliq(i,k) = Tbd%phy_f3d(i,k,1) - cld_reice(i,k) = max(10.0, min(150.0,Tbd%phy_f3d(i,k,2))) - cld_rerain(i,k) = Tbd%phy_f3d(i,k,3) - cld_resnow(i,k) = Tbd%phy_f3d(i,k,4) - enddo - enddo - ! #################################################################################### - ! ii) Start with default values. Modify liquid sizes over land. Adjust ice sizes following - ! Hemsfield and McFarquhar (1996) https://doi.org/10.1175/1520-0469 - ! #################################################################################### - else - cld_reliq(:,:) = reliq_def - cld_reice(:,:) = reice_def - cld_rerain(:,:) = rrain_def - cld_resnow(:,:) = rsnow_def - - ! Compute effective liquid cloud droplet radius over land. + ! Condensate and effective size + deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. + do k = 1, nLev do i = 1, nCol - if (nint(slmsk(i)) == 1) then - do k = 1, nLev - tem2 = min( 1.0, max( 0.0, (con_ttp-t_lay(i,k))*0.05 ) ) - cld_reliq(i,k) = 5.0 + 5.0 * tem2 - enddo - endif - enddo - - ! Compute effective ice cloud droplet radius. - do k = 1, nLev - do i = 1, nCol - tem2 = t_lay(i,k) - con_ttp - if (cld_iwp(i,k) > 0.0) then - tem3 = (con_g/con_rd)* cld_iwp(i,k) * (p_lay(i,k)/100.) / (deltaP(i,k)*tv_lay(i,k)) - if (tem2 < -50.0) then - cld_reice(i,k) = (1250.0/9.917) * tem3 ** 0.109 - elseif (tem2 < -40.0) then - cld_reice(i,k) = (1250.0/9.337) * tem3 ** 0.08 - elseif (tem2 < -30.0) then - cld_reice(i,k) = (1250.0/9.208) * tem3 ** 0.055 - else - cld_reice(i,k) = (1250.0/9.387) * tem3 ** 0.031 - endif - cld_reice(i,k) = max(10.0, min(cld_reice(i,k), 150.0)) - endif - enddo - enddo - endif - - ! Normalize cloud-condensate by cloud-cover? - if ( lcnorm ) then - do k = 1, nLev - do i = 1, nCol - if (cld_frac(i,k) >= cllimit) then - tem1 = 1.0 / max(0.05, cld_frac(i,k)) - cld_lwp(i,k) = cld_lwp(i,k) * tem1 - cld_iwp(i,k) = cld_iwp(i,k) * tem1 - cld_rwp(i,k) = cld_rwp(i,k) * tem1 - cld_swp(i,k) = cld_swp(i,k) * tem1 - endif - enddo - enddo - endif + ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) + if (cld_frac(i,k) .ge. cllimit) then + tem1 = gfac * deltaP(i,k) + cld_lwp(i,k) = cld_condensate(i,k,1) * tem1 + cld_iwp(i,k) = cld_condensate(i,k,2) * tem1 + cld_rwp(i,k) = cld_condensate(i,k,3) * tem1 + cld_swp(i,k) = cld_condensate(i,k,4) * tem1 + endif + ! Use radii provided from the macrophysics + cld_reliq(i,k) = Tbd%phy_f3d(i,k,1) + cld_reice(i,k) = max(reice_min, min(reice_max,Tbd%phy_f3d(i,k,2))) + cld_rerain(i,k) = Tbd%phy_f3d(i,k,3) + cld_resnow(i,k) = Tbd%phy_f3d(i,k,4) + enddo + enddo end subroutine GFS_rrtmgp_gfdlmp_pre_run diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index a9f61739e..77a4548f3 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -34,31 +34,6 @@ type = integer intent = in optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_dimension) - type = real - intent = in - kind = kind_phys -[lat] - standard_name = latitude - long_name = latitude - units = radians - dimensions = (horizontal_dimension) - type = real - intent = in - kind = kind_phys -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure at vertical layer for radiation calculation - units = hPa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation @@ -68,24 +43,6 @@ kind = kind_phys intent = in optional = F -[t_lay] - standard_name = air_temperature_at_layer_for_RRTMGP - long_name = air temperature at vertical layer for radiation calculation - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers From 22641512b02fffe57d2ac644c46796f4fb5acd83 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 20 May 2020 15:14:01 -0600 Subject: [PATCH 170/404] Replaced integer control over cloud-optics scheme with logics. --- physics/rrtmgp_lw_cloud_optics.F90 | 95 ++++++++++++++--------------- physics/rrtmgp_lw_cloud_optics.meta | 60 +++++++++++++----- physics/rrtmgp_sw_cloud_optics.F90 | 84 +++++++++++++------------ physics/rrtmgp_sw_cloud_optics.meta | 56 +++++++++++++---- 4 files changed, 181 insertions(+), 114 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index acff26bb6..c9601f7c8 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -20,14 +20,17 @@ module rrtmgp_lw_cloud_optics !! \section arg_table_rrtmgp_lw_cloud_optics_init !! \htmlinclude rrtmgp_lw_cloud_optics.html !! - subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_dir, & - rrtmgp_lw_file_clouds, mpicomm, mpirank, mpiroot, lw_cloud_props, errmsg, errflg) + subroutine rrtmgp_lw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, & + nrghice, rrtmgp_root_dir, rrtmgp_lw_file_clouds, mpicomm, mpirank, mpiroot, lw_cloud_props, errmsg, errflg) ! Inputs + logical, intent(in) :: & + doG_cldoptics, & ! Use legacy RRTMG cloud-optics? + doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? + doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? integer, intent(inout) :: & nrghice ! Number of ice-roughness categories integer, intent(in) :: & - cld_optics_scheme, & ! Cloud-optics scheme mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank @@ -44,7 +47,6 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d errflg ! Error code ! Variables that will be passed to cloud_optics%load() - ! cld_optics_scheme = 1 real(kind_phys) :: & radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation radliq_upr, & ! Liquid particle size upper bound for LUT interpolation @@ -61,7 +63,6 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d lut_extice, & ! LUT shortwave ice extinction coefficient lut_ssaice, & ! LUT shortwave ice single scattering albedo lut_asyice ! LUT shortwave ice asymmetry parameter - ! cld_optics_scheme = 2 real(kind_phys), dimension(:), allocatable :: & pade_sizereg_extliq, & ! Particle size regime boundaries for shortwave liquid extinction ! coefficient for Pade interpolation @@ -97,7 +98,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d errmsg = '' errflg = 0 - if (cld_optics_scheme .eq. 0) return + if (doG_cldoptics) return ! Filenames are set in the physics_nml lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) @@ -126,7 +127,6 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_inquire_dimension(ncid, dimid, len=nBound) status = nf90_inq_dimid(ncid, 'pair', dimid) status = nf90_inquire_dimension(ncid, dimid, len=npairs) - status = nf90_close(ncid) ! Has the number of ice-roughnesses to use been provided from the namelist? ! If not provided, use default number of ice-roughness categories @@ -142,7 +142,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d endif ! Allocate space for arrays - if (cld_optics_scheme .eq. 1) then + if (doGP_cldoptics_LUT) then allocate(lut_extliq(nSize_liq, nBand)) allocate(lut_ssaliq(nSize_liq, nBand)) allocate(lut_asyliq(nSize_liq, nBand)) @@ -150,7 +150,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(lut_ssaice(nSize_ice, nBand, nrghice_fromfile)) allocate(lut_asyice(nSize_ice, nBand, nrghice_fromfile)) endif - if (cld_optics_scheme .eq. 2) then + if (doGP_cldoptics_PADE) then allocate(pade_extliq(nBand, nSizeReg, nCoeff_ext )) allocate(pade_ssaliq(nBand, nSizeReg, nCoeff_ssa_g)) allocate(pade_asyliq(nBand, nSizeReg, nCoeff_ssa_g)) @@ -167,7 +167,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(band_lims(2,nBand)) ! Read in fields from file - if (cld_optics_scheme .eq. 1) then + if (doGP_cldoptics_LUT) then write (*,*) 'Reading RRTMGP longwave cloud data (LUT) ... ' status = nf90_inq_varid(ncid,'radliq_lwr',varID) status = nf90_get_var(ncid,varID,radliq_lwr) @@ -196,7 +196,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) status = nf90_get_var(ncid,varID,band_lims) endif - if (cld_optics_scheme .eq. 2) then + if (doGP_cldoptics_PADE) then write (*,*) 'Reading RRTMGP longwave cloud data (PADE) ... ' status = nf90_inq_varid(ncid,'radliq_lwr',varID) status = nf90_get_var(ncid,varID,radliq_lwr) @@ -243,18 +243,18 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! endif ! Load tables data for RRTMGP cloud-optics - if (cld_optics_scheme .eq. 1) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims, & - radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & + if (doGP_cldoptics_LUT) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims, & + radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif - if (cld_optics_scheme .eq. 2) then - call check_error_msg('lw_cloud_optics_init', lw_cloud_props%load(band_lims, & + if (doGP_cldoptics_PADE) then + call check_error_msg('lw_cloud_optics_init', lw_cloud_props%load(band_lims, & pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice,& pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif - call check_error_msg('lw_cloud_optics_init', lw_cloud_props%set_ice_roughness(nrghice)) + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice)) end subroutine rrtmgp_lw_cloud_optics_init @@ -264,37 +264,39 @@ end subroutine rrtmgp_lw_cloud_optics_init !! \section arg_table_rrtmgp_lw_cloud_optics_run !! \htmlinclude rrtmgp_lw_cloud_optics.html !! - subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nrghice, & - cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, p_lay, lw_cloud_props, lw_gas_props, lon, lat, & - cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg) + subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PADE, & + doGP_cldoptics_LUT, nCol, nLev, nrghice, cld_frac, cld_lwp, cld_reliq, cld_iwp, & + cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, p_lay, lw_cloud_props, & + lw_gas_props, lon, lat, cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg) ! Inputs logical, intent(in) :: & - doLWrad ! Logical flag for longwave radiation call - integer, intent(in) :: & - nCol, & ! Number of horizontal gridpoints - nLev, & ! Number of vertical levels - nrghice, & ! Number of ice-roughness categories - cld_optics_scheme ! Cloud-optics scheme + doLWrad, & ! Logical flag for longwave radiation call + doG_cldoptics, & ! Use legacy RRTMG cloud-optics? + doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? + doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? + integer, intent(in) :: & + nCol, & ! Number of horizontal gridpoints + nLev, & ! Number of vertical levels + nrghice ! Number of ice-roughness categories real(kind_phys), dimension(nCol), intent(in) :: & - lon, & ! Longitude - lat ! Latitude + lon, & ! Longitude + lat ! Latitude real(kind_phys), dimension(ncol,nLev),intent(in) :: & - p_lay, & ! Layer pressure (Pa) - cld_frac, & ! Total cloud fraction by layer - cld_lwp, & ! Cloud liquid water path - cld_reliq, & ! Cloud liquid effective radius - cld_iwp, & ! Cloud ice water path - cld_reice, & ! Cloud ice effective radius - cld_swp, & ! Cloud snow water path (used only for RRTMG legacy scheme) - cld_resnow, & ! Cloud snow effective radius (used only for RRTMG legacy scheme) - cld_rwp, & ! Cloud rain water path (used only for RRTMG legacy scheme) - cld_rerain ! Cloud rain effective radius (used only for RRTMG legacy scheme) + p_lay, & ! Layer pressure (Pa) + cld_frac, & ! Total cloud fraction by layer + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effective radius + cld_swp, & ! Cloud snow water path (used only for RRTMG legacy scheme) + cld_resnow, & ! Cloud snow effective radius (used only for RRTMG legacy scheme) + cld_rwp, & ! Cloud rain water path (used only for RRTMG legacy scheme) + cld_rerain ! Cloud rain effective radius (used only for RRTMG legacy scheme) type(ty_cloud_optics),intent(in) :: & - lw_cloud_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme + lw_cloud_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme + lw_gas_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme ! Outputs real(kind_phys), dimension(ncol,nLev), intent(out) :: & @@ -330,22 +332,17 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr lw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys ! Compute cloud-optics for RTE. - if (cld_optics_scheme .gt. 0) then + if (doGP_cldoptics_PADE .or. doGP_cldoptics_LUT) then ! i) RRTMGP cloud-optics. call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_cloud_props%cloud_optics(& - !ncol, & ! IN - Number of horizontal gridpoints - !nLev, & ! IN - Number of vertical layers - !lw_cloud_props%get_nband(), & ! IN - Number of LW bands - !nrghice, & ! IN - Number of ice-roughness categories - !liqmask, & ! IN - Liquid-cloud mask (1) - !icemask, & ! IN - Ice-cloud mask (1) cld_lwp, & ! IN - Cloud liquid water path (g/m2) cld_iwp, & ! IN - Cloud ice water path (g/m2) cld_reliq, & ! IN - Cloud liquid effective radius (microns) cld_reice, & ! IN - Cloud ice effective radius (microns) lw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties ! in each band - else + endif + if (doG_cldoptics) then ! ii) RRTMG cloud-optics. if (any(cld_frac .gt. 0)) then call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index cebbfc700..d00192f2f 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -1,14 +1,30 @@ [ccpp-arg-table] name = rrtmgp_lw_cloud_optics_init type = scheme -[cld_optics_scheme] - standard_name = rrtmgp_cloud_optics_flag - long_name = Flag to control which RRTMGP cloud-optics scheme +[doG_cldoptics] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMG + long_name = logical flag to control cloud optics scheme. units = flag - dimensions = () - type = integer + dimensions = () + type = logical intent = in - optional = F + optional = F +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F [nrghice] standard_name = number_of_rrtmgp_ice_roughness long_name = number of ice-roughness categories in RRTMGP calculation @@ -97,6 +113,30 @@ type = logical intent = in optional = F +[doG_cldoptics] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMG + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F [ncol] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -113,14 +153,6 @@ type = integer intent = in optional = F -[cld_optics_scheme] - standard_name = rrtmgp_cloud_optics_flag - long_name = Flag to control which RRTMGP cloud-optics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [nrghice] standard_name = number_of_rrtmgp_ice_roughness long_name = number of ice-roughness categories in RRTMGP calculation diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index ec44c7f8d..1c11b95c7 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -20,14 +20,18 @@ module rrtmgp_sw_cloud_optics !! \section arg_table_rrtmgp_sw_cloud_optics_init !! \htmlinclude rrtmgp_lw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_dir, & - rrtmgp_sw_file_clouds, mpicomm, mpirank, mpiroot, sw_cloud_props, errmsg, errflg) + subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, & + nrghice, rrtmgp_root_dir, rrtmgp_sw_file_clouds, mpicomm, mpirank, mpiroot, sw_cloud_props,& + errmsg, errflg) ! Inputs + logical, intent(in) :: & + doG_cldoptics, & ! Use legacy RRTMG cloud-optics? + doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? + doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? integer, intent(inout) :: & nrghice ! Number of ice-roughness categories integer, intent(in) :: & - cld_optics_scheme, & ! Cloud-optics scheme mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank @@ -44,7 +48,6 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d errflg ! CCPP error code ! Variables that will be passed to cloud_optics%load() - ! cld_optics_scheme = 1 real(kind_phys) :: & radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation radliq_upr, & ! Liquid particle size upper bound for LUT interpolation @@ -61,7 +64,6 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d lut_extice, & ! LUT shortwave ice extinction coefficient lut_ssaice, & ! LUT shortwave ice single scattering albedo lut_asyice ! LUT shortwave ice asymmetry parameter - ! cld_optics_scheme = 2 real(kind_phys), dimension(:), allocatable :: & pade_sizereg_extliq, & ! Particle size regime boundaries for shortwave liquid extinction ! coefficient for Pade interpolation @@ -97,7 +99,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d errmsg = '' errflg = 0 - if (cld_optics_scheme .eq. 0) return + if (doG_cldoptics) return ! Filenames are set in the physics_nml sw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_clouds) @@ -141,7 +143,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d endif ! Allocate space for arrays - if (cld_optics_scheme .eq. 1) then + if (doGP_cldoptics_LUT) then allocate(lut_extliq(nSize_liq, nBand)) allocate(lut_ssaliq(nSize_liq, nBand)) allocate(lut_asyliq(nSize_liq, nBand)) @@ -149,7 +151,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(lut_ssaice(nSize_ice, nBand, nrghice_fromfile)) allocate(lut_asyice(nSize_ice, nBand, nrghice_fromfile)) endif - if (cld_optics_scheme .eq. 2) then + if (doGP_cldoptics_PADE) then allocate(pade_extliq(nBand, nSizeReg, nCoeff_ext )) allocate(pade_ssaliq(nBand, nSizeReg, nCoeff_ssa_g)) allocate(pade_asyliq(nBand, nSizeReg, nCoeff_ssa_g)) @@ -166,7 +168,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(band_lims(2,nBand)) ! Read in fields from file - if (cld_optics_scheme .eq. 1) then + if (doGP_cldoptics_LUT) then write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' status = nf90_inq_varid(ncid,'radliq_lwr',varID) status = nf90_get_var(ncid,varID,radliq_lwr) @@ -195,7 +197,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) status = nf90_get_var(ncid,varID,band_lims) endif - if (cld_optics_scheme .eq. 2) then + if (doGP_cldoptics_PADE) then write (*,*) 'Reading RRTMGP shortwave cloud data (PADE) ... ' status = nf90_inq_varid(ncid,'radliq_lwr',varID) status = nf90_get_var(ncid,varID,radliq_lwr) @@ -242,18 +244,19 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! endif ! Load tables data for RRTMGP cloud-optics - if (cld_optics_scheme .eq. 1) then + if (doGP_cldoptics_LUT) then call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims, & radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif - if (cld_optics_scheme .eq. 2) then + if (doGP_cldoptics_PADE) then call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims, & pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice,& pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) + end subroutine rrtmgp_sw_cloud_optics_init ! ######################################################################################### @@ -262,36 +265,38 @@ end subroutine rrtmgp_sw_cloud_optics_init !! \section arg_table_rrtmgp_sw_cloud_optics_run !! \htmlinclude rrtmgp_sw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice, & - cld_optics_scheme, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, & - cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, sw_gas_props, & - sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) + subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PADE, & + doGP_cldoptics_LUT, nCol, nLev, nDay, idxday, nrghice, cld_frac, cld_lwp, cld_reliq, & + cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, & + sw_gas_props, sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) ! Inputs logical, intent(in) :: & - doSWrad ! Logical flag for shortwave radiation call + doSWrad, & ! Logical flag for shortwave radiation call + doG_cldoptics, & ! Use legacy RRTMG cloud-optics? + doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? + doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? integer, intent(in) :: & - nCol, & ! Number of horizontal gridpoints - nLev, & ! Number of vertical levels - nday, & ! Number of daylit points. - nrghice, & ! Number of ice-roughness categories - cld_optics_scheme ! Cloud-optics scheme + nCol, & ! Number of horizontal gridpoints + nLev, & ! Number of vertical levels + nday, & ! Number of daylit points. + nrghice ! Number of ice-roughness categories integer,intent(in),dimension(ncol) :: & - idxday ! Indices for daylit points. + idxday ! Indices for daylit points. real(kind_phys), dimension(ncol,nLev),intent(in) :: & - cld_frac, & ! Total cloud fraction by layer - cld_lwp, & ! Cloud liquid water path - cld_reliq, & ! Cloud liquid effective radius - cld_iwp, & ! Cloud ice water path - cld_reice, & ! Cloud ice effective radius - cld_swp, & ! Cloud snow water path - cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius + cld_frac, & ! Total cloud fraction by layer + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effective radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius type(ty_cloud_optics),intent(in) :: & - sw_cloud_props ! RRTMGP DDT: shortwave cloud properties + sw_cloud_props ! RRTMGP DDT: shortwave cloud properties type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: shortwave K-distribution data + sw_gas_props ! RRTMGP DDT: shortwave K-distribution data ! Outputs character(len=*), intent(out) :: & @@ -328,7 +333,7 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys ! Compute cloud-optics for RTE. - if (cld_optics_scheme .gt. 0) then + if (doGP_cldoptics_PADE .or. doGP_cldoptics_LUT) then ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& cld_lwp(idxday(1:nday),:), & ! IN - Cloud liquid water path @@ -337,7 +342,8 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice cld_reice(idxday(1:nday),:), & ! IN - Cloud ice effective radius sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT: Shortwave optical properties, ! in each band (tau,ssa,g) - else + endif + if (doG_cldoptics) then ! RRTMG cloud-optics tau_cld(:,:,:) = 0._kind_phys ssa_cld(:,:,:) = 0._kind_phys @@ -353,9 +359,9 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice sw_optical_props_cloudsByBand%tau(:,:,1) = tau_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%ssa(:,:,1) = ssa_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%g(:,:,1) = asy_cld(:,:,sw_gas_props%get_nband()) - sw_optical_props_cloudsByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_cld(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_cloudsByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_cld(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_cloudsByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_cld(:,:,1:sw_gas_props%get_nband()-1) endif ! All-sky SW optical depth ~0.55microns diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index c60ae90d6..cc28b0f00 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -1,14 +1,30 @@ [ccpp-arg-table] name = rrtmgp_sw_cloud_optics_init type = scheme -[cld_optics_scheme] - standard_name = rrtmgp_cloud_optics_flag - long_name = Flag to control which RRTMGP cloud-optics scheme +[doG_cldoptics] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMG + long_name = logical flag to control cloud optics scheme. units = flag - dimensions = () - type = integer + dimensions = () + type = logical intent = in - optional = F + optional = F +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F [nrghice] standard_name = number_of_rrtmgp_ice_roughness long_name = number of ice-roughness categories in RRTMGP calculation @@ -113,14 +129,30 @@ type = integer intent = in optional = F -[cld_optics_scheme] - standard_name = rrtmgp_cloud_optics_flag - long_name = Flag to control which RRTMGP cloud-optics scheme +[doG_cldoptics] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMG + long_name = logical flag to control cloud optics scheme. units = flag - dimensions = () - type = integer + dimensions = () + type = logical intent = in - optional = F + optional = F +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical + intent = in + optional = F [nrghice] standard_name = number_of_rrtmgp_ice_roughness long_name = number of ice-roughness categories in RRTMGP calculation From 1879026da7fa3aa7cb84f2e8d90ddac3a1a5fa54 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 21 May 2020 16:22:05 -0600 Subject: [PATCH 171/404] Seperated cloud/precipitation optics. --- physics/GFS_cloud_diagnostics.F90 | 27 ++-- physics/GFS_cloud_diagnostics.meta | 11 +- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 10 +- physics/GFS_rrtmgp_gfdlmp_pre.meta | 9 ++ physics/rrtmg_lw_cloud_optics.F90 | 171 ++------------------- physics/rrtmg_sw_cloud_optics.F90 | 208 +++++--------------------- physics/rrtmgp_lw_cloud_optics.F90 | 88 +++++++---- physics/rrtmgp_lw_cloud_optics.meta | 17 +++ physics/rrtmgp_lw_cloud_sampling.F90 | 108 ++++++++++--- physics/rrtmgp_lw_cloud_sampling.meta | 36 ++++- physics/rrtmgp_sw_cloud_optics.F90 | 124 ++++++++++++--- physics/rrtmgp_sw_cloud_optics.meta | 17 +++ physics/rrtmgp_sw_cloud_sampling.F90 | 125 ++++++++++++---- physics/rrtmgp_sw_cloud_sampling.meta | 36 ++++- 14 files changed, 543 insertions(+), 444 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index 77e28582e..2d616d3dc 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -42,7 +42,8 @@ end subroutine GFS_cloud_diagnostics_init !! \htmlinclude GFS_cloud_diagnostics_run.html !! subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_frac, & - p_lev, mbota, mtopa, cldsa, de_lgth, overlap_param, errmsg, errflg) + p_lev, mbota, mtopa, cldsa, de_lgth, cloud_overlap_param, precip_overlap_param, & + errmsg, errflg) implicit none ! Inputs @@ -62,18 +63,19 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error flag + errflg ! Error flag integer,dimension(ncol,3),intent(out) :: & - mbota, & ! Vertical indices for cloud tops - mtopa ! Vertical indices for cloud bases + mbota, & ! Vertical indices for cloud tops + mtopa ! Vertical indices for cloud bases real(kind_phys), dimension(ncol,5), intent(out) :: & - cldsa ! Fraction of clouds for low, middle, high, total and BL + cldsa ! Fraction of clouds for low, middle, high, total and BL real(kind_phys), dimension(ncol), intent(out) :: & - de_lgth ! Decorrelation length + de_lgth ! Decorrelation length real(kind_phys), dimension(nCol,nLev), intent(out) :: & - overlap_param ! Cloud-overlap parameter + cloud_overlap_param, & ! Cloud-overlap parameter + precip_overlap_param ! Precipitation overlap parameter ! Local variables integer i,id,iCol,iLay,icld @@ -106,6 +108,9 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ enddo enddo + ! + ! Cloud overlap parameter + ! ! Estimate clouds decorrelation length in km ! *this is only a tentative test, need to consider change later* if ( iovrlw == 3 .and. iovrsw == 3) then @@ -113,13 +118,17 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ de_lgth(iCol) = max( 0.6, 2.78-4.6*rlat(iCol) ) do iLay=nLev,2,-1 if (de_lgth(iCol) .gt. 0) then - overlap_param(iCol,iLay-1) = & + cloud_overlap_param(iCol,iLay-1) = & exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) endif enddo enddo endif + ! + ! Precipitation overlap parameter (Hack. Using same as cloud for now) + precip_overlap_param = cloud_overlap_param + ! Compute low, mid, high, total, and boundary layer cloud fractions and clouds top/bottom ! layer indices for low, mid, and high clouds. The three cloud domain boundaries are ! defined by ptopc. The cloud overlapping method is defined by control flag 'iovr', which may diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index 8967ba386..9b4340b18 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -95,7 +95,7 @@ kind = kind_phys intent = out optional = F -[overlap_param] +[cloud_overlap_param] standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km @@ -104,6 +104,15 @@ kind = kind_phys intent = out optional = F +[precip_overlap_param] + standard_name = precip_overlap_param + long_name = precipitation overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F [cldsa] standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 67b65b23c..0ab67baa9 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -33,7 +33,7 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_init !! subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, errmsg, errflg) + cld_rerain, precip_frac, errmsg, errflg) implicit none ! Inputs @@ -59,7 +59,8 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, cld_swp, & ! Cloud snow water path cld_resnow, & ! Cloud snow effective radius cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius + cld_rerain, & ! Cloud rain effective radius + precip_frac ! Precipitation fraction character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -146,7 +147,10 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, enddo ! Cloud-fraction - cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) + cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) + + ! Precipitation fraction (Hack. For now use cloud-fraction) + precip_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) ! Condensate and effective size deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 77a4548f3..248348b9b 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -133,6 +133,15 @@ kind = kind_phys intent = out optional = F +[precip_frac] + standard_name = precipitation_fraction_by_layer + long_name = precipitation fraction in each layer + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmg_lw_cloud_optics.F90 b/physics/rrtmg_lw_cloud_optics.F90 index 31551d797..ea0a703c7 100644 --- a/physics/rrtmg_lw_cloud_optics.F90 +++ b/physics/rrtmg_lw_cloud_optics.F90 @@ -554,7 +554,8 @@ module mo_rrtmg_lw_cloud_optics ! subroutine rrtmg_lw_cloud_optics ! ####################################################################################### subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & - cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, tau_cld) + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, tau_cld, & + tau_precip) ! Inputs integer,intent(in) :: & nBandsLW, & ! Number of spectral bands @@ -573,14 +574,16 @@ subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld ! Outputs real(kind_phys),dimension(ncol,nlay,nBandsLW),intent(out) :: & - tau_cld - + tau_cld, & ! Cloud optical-depth (1) + tau_precip ! Precipitation optical-depth (1) + ! Local variables integer :: ij,ik,ib,index,ia real(kind_phys) :: factor,fint,cld_ref_iceTemp,tau_snow, tau_rain real(kind_phys),dimension(nBandsLW) :: tau_liq, tau_ice - tau_cld(:,:,:) = 0._kind_phys + tau_cld(:,:,:) = 0._kind_phys + tau_precip(:,:,:) = 0._kind_phys if (ilwcliq .gt. 0) then do ij=1,ncol @@ -655,167 +658,11 @@ subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld endif ! Cloud optical depth do ib = 1, nBandsLW - tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow + tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_precip(ij,ik,ib) = tau_rain + tau_snow enddo end do end do endif end subroutine rrtmg_lw_cloud_optics - ! ####################################################################################### - ! SUBROUTINE mcica_subcol_lw - ! ####################################################################################### - subroutine mcica_subcol_lw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac_mcica) - ! Inputs - integer,intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nlay, & ! Number of vertical layers - ngpts ! Number of spectral g-points - integer,dimension(ncol),intent(in) :: & - icseed ! Permutation seed for each column. - real(kind_phys), dimension(ncol), intent(in) :: & - de_lgth ! Cloud decorrelation length (km) - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - cld_frac, & ! Cloud-fraction - dzlyr ! Layer thinkness (km) - ! Outputs - !real(kind_phys),dimension(ncol,nlay,ngpts),intent(out) :: & - logical,dimension(ncol,nlay,ngpts),intent(out) :: & - cld_frac_mcica - ! Local variables - type(random_stat) :: stat - integer :: icol,n,k,k1 - real(kind_phys) :: tem1 - real(kind_phys),dimension(ngpts) :: rand1D - real(kind_phys),dimension(nlay*ngpts) :: rand2D - real(kind_phys),dimension(ngpts,nlay) :: cdfunc,cdfun2 - real(kind_phys),dimension(nlay) :: fac_lcf - logical,dimension(ngpts,nlay) :: lcloudy - - ! Loop over all columns - do icol=1,ncol - ! Call random_setseed() to advance random number generator by "icseed" values. - call random_setseed(icseed(icol),stat) - - ! ################################################################################### - ! Sub-column set up according to overlapping assumption: - ! - For random overlap, pick a random value at every level - ! - For max-random overlap, pick a random value at every level - ! - For maximum overlap, pick same random numebr at every level - ! ################################################################################### - select case ( iovrlw ) - ! ################################################################################### - ! 0) Random overlap - ! ################################################################################### - case( 0 ) - call random_number(rand2D,stat) - k1 = 0 - do n = 1, ngpts - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - - ! ################################################################################### - ! 1) Maximum-random overlap - ! ################################################################################### - case(1) - call random_number(rand2D,stat) - k1 = 0 - do n = 1, ngpts - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - - ! First pick a random number for bottom (or top) layer. - ! then walk up the column: (aer's code) - ! if layer below is cloudy, use the same rand num in the layer below - ! if layer below is clear, use a new random number - do k = 2, nlay - k1 = k - 1 - tem1 = 1._kind_phys - cld_frac(icol,k1) - do n = 1, ngpts - if ( cdfunc(n,k1) > tem1 ) then - cdfunc(n,k) = cdfunc(n,k1) - else - cdfunc(n,k) = cdfunc(n,k) * tem1 - endif - enddo - enddo - - ! ################################################################################### - ! 2) Maximum overlap - ! ################################################################################### - case(2) - call random_number(rand1d,stat) - do n = 1, ngpts - tem1 = rand1d(n) - do k = 1, nlay - cdfunc(n,k) = tem1 - enddo - enddo - - ! ################################################################################### - ! 3) Decorrelation length - ! ################################################################################### - case(3) - ! Compute overlapping factors based on layer midpoint distances and decorrelation - ! depths - do k = nlay, 2, -1 - fac_lcf(k) = exp( -0.5 * (dzlyr(iCol,k)+dzlyr(iCol,k-1)) / de_lgth(iCol) ) - enddo - - ! Setup 2 sets of random numbers - call random_number ( rand2d, stat ) - k1 = 0 - do k = 1, nlay - do n = 1, ngpts - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - ! - call random_number ( rand2d, stat ) - k1 = 0 - do k = 1, nlay - do n = 1, ngpts - k1 = k1 + 1 - cdfun2(n,k) = rand2d(k1) - enddo - enddo - - ! Then working from the top down: - ! if a random number (from an independent set -cdfun2) is smaller then the - ! scale factor: use the upper layer's number, otherwise use a new random - ! number (keep the original assigned one). - do k = nlay-1, 1, -1 - k1 = k + 1 - do n = 1, ngpts - if ( cdfun2(n,k) <= fac_lcf(k1) ) then - cdfunc(n,k) = cdfunc(n,k1) - endif - enddo - enddo - - end select - - ! ################################################################################### - ! Generate subcolumn cloud mask (.false./.true. for clear/cloudy) - ! ################################################################################### - do k = 1, nlay - tem1 = 1._kind_phys - cld_frac(icol,k) - do n = 1, ngpts - lcloudy(n,k) = cdfunc(n,k) >= tem1 - if (lcloudy(n,k)) then - cld_frac_mcica(icol,k,n) = .true. - else - cld_frac_mcica(icol,k,n) = .false. - endif - enddo - enddo - enddo ! END LOOP OVER COLUMNS - end subroutine mcica_subcol_lw - end module mo_rrtmg_lw_cloud_optics diff --git a/physics/rrtmg_sw_cloud_optics.F90 b/physics/rrtmg_sw_cloud_optics.F90 index f576033d5..37b4e094c 100644 --- a/physics/rrtmg_sw_cloud_optics.F90 +++ b/physics/rrtmg_sw_cloud_optics.F90 @@ -2043,9 +2043,9 @@ module mo_rrtmg_sw_cloud_optics ! ######################################################################################### ! rrtmg_sw_cloud_optics ! ######################################################################################### - subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld_iwp, & - cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, & - tau_cld, ssa_cld, asy_cld) + subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld_iwp, & + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, & + tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip) ! Inputs integer,intent(in) :: & nBandsSW, & ! Number of spectral bands @@ -2066,7 +2066,10 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld real(kind_phys),dimension(ncol,nlay,nBandsSW),intent(out) :: & tau_cld, & ! In-cloud optical depth (1) ssa_cld, & ! In-cloud single-scattering albedo (1) - asy_cld ! In-cloud asymmetry parameter (1) + asy_cld, & ! In-cloud asymmetry parameter (1) + tau_precip, & ! Precipitation optical depth (1) + ssa_precip, & ! Precipitation single-scattering albedo (1) + asy_precip ! Precipitation asymmetry parameter (1) ! Local variables integer :: iCol, iLay, iBand, index, ia @@ -2077,11 +2080,14 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld forwice, extcoice, asycoice, ssacoice, fdelta, extcoliq, ssacoliq ! Initialize - tau_cld(:,:,:) = 0._kind_phys - ssa_cld(:,:,:) = 1._kind_phys - asy_cld(:,:,:) = 0._kind_phys + tau_cld(:,:,:) = 0._kind_phys + ssa_cld(:,:,:) = 1._kind_phys + asy_cld(:,:,:) = 0._kind_phys + tau_precip(:,:,:) = 0._kind_phys + ssa_precip(:,:,:) = 1._kind_phys + asy_precip(:,:,:) = 0._kind_phys - ! Compute cloud radiative properties for cloud. + ! Compute cloud/precipitation radiative properties if (iswcliq > 0) then do iCol=1,ncol do iLay=1,nlay @@ -2229,15 +2235,18 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld endif ! IF cloudy column ! ########################################################################### - ! Compute total cloud radiative properties (tau, omega, and g) + ! Compute total cloud and precipitation radiative properties (tau, omega, and g) ! ########################################################################### if (cld_frac(iCol,iLay) .gt. 1.e-12_kind_phys) then do iBand = 1,nBandsSW + ! + ! Cloud optics + ! ! Sum up radiative properties by type. - tau_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow) - ssa_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand)) - asy_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand)) - ! Delta-scale + tau_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, tau_liq(iBand) + tau_ice(iBand)) + ssa_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, ssa_liq(iBand) + ssa_ice(iBand)) + asy_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, asy_liq(iBand) + asy_ice(iBand)) + ! Combine asyw = asy_cld(iCol,iLay,iBand)/max(1.e-12_kind_phys, ssa_cld(iCol,iLay,iBand)) ssaw = min(1._kind_phys-0.000001, ssa_cld(iCol,iLay,iBand)/tau_cld(iCol,iLay,iBand)) za1 = asyw * asyw @@ -2245,6 +2254,22 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld tau_cld(iCol,iLay,iBand) = (1._kind_phys - za2) * tau_cld(iCol,iLay,iBand) ssa_cld(iCol,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) asy_cld(iCol,iLay,iBand) = asyw/(1+asyw) + ! + ! Precipitation optics + ! + ! Sum up radiative properties by type. + tau_precip(iCol,iLay,iBand) = max(1.e-12_kind_phys, tau_rain + tau_snow) + ssa_precip(iCol,iLay,iBand) = max(1.e-12_kind_phys, ssa_rain(iBand) + ssa_snow(iBand)) + asy_precip(iCol,iLay,iBand) = max(1.e-12_kind_phys, asy_rain(iBand) + asy_snow(iBand)) + ! Combine + asyw = asy_precip(iCol,iLay,iBand)/max(1.e-12_kind_phys, ssa_precip(iCol,iLay,iBand)) + ssaw = min(1._kind_phys-0.000001, ssa_precip(iCol,iLay,iBand)/tau_precip(iCol,iLay,iBand)) + za1 = asyw * asyw + za2 = ssaw * za1 + tau_precip(iCol,iLay,iBand) = (1._kind_phys - za2) * tau_precip(iCol,iLay,iBand) + ssa_precip(iCol,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) + asy_precip(iCol,iLay,iBand) = asyw/(1+asyw) + enddo ! Loop over SW bands endif ! END sum cloudy properties ! @@ -2252,161 +2277,4 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld enddo ! Loop over columns endif end subroutine rrtmg_sw_cloud_optics - - ! ####################################################################################### - ! SUBROUTINE mcica_subcol_sw - ! ###################################################################################### - subroutine mcica_subcol_sw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, & - cld_frac_mcica) - ! Inputs - integer,intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nlay, & ! Number of vertical layers - ngpts ! Number of spectral g-points - integer,dimension(ncol),intent(in) :: & - icseed ! Permutation seed for each column. - real(kind_phys), dimension(ncol), intent(in) :: & - de_lgth ! Cloud decorrelation length (km) - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - cld_frac, & ! Cloud-fraction - dzlyr ! Layer thinkness (km) - ! Outputs - logical,dimension(ncol,nlay,ngpts),intent(out) :: & - cld_frac_mcica - ! Local variables - type(random_stat) :: stat - integer :: icol,n,k,k1 - real(kind_phys) :: tem1 - real(kind_phys),dimension(ngpts) :: rand1D - real(kind_phys),dimension(nlay*ngpts) :: rand2D - real(kind_phys),dimension(ngpts,nlay) :: cdfunc,cdfun2 - real(kind_phys),dimension(nlay) :: fac_lcf - logical,dimension(ngpts,nlay) :: lcloudy - - ! Loop over all columns - do icol=1,ncol - ! Call random_setseed() to advance random number generator by "icseed" values. - call random_setseed(icseed(icol),stat) - - ! ################################################################################### - ! Sub-column set up according to overlapping assumption: - ! - For random overlap, pick a random value at every level - ! - For max-random overlap, pick a random value at every level - ! - For maximum overlap, pick same random numebr at every level - ! ################################################################################### - select case ( iovrsw ) - ! ################################################################################### - ! 0) Random overlap - ! ################################################################################### - case( 0 ) - call random_number(rand2D,stat) - k1 = 0 - do n = 1, ngpts - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - - ! ################################################################################### - ! 1) Maximum-random overlap - ! ################################################################################### - case(1) - call random_number(rand2D,stat) - k1 = 0 - do n = 1, ngpts - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - - ! First pick a random number for bottom (or top) layer. - ! then walk up the column: (aer's code) - ! if layer below is cloudy, use the same rand num in the layer below - ! if layer below is clear, use a new random number - do k = 2, nlay - k1 = k - 1 - tem1 = 1._kind_phys - cld_frac(icol,k1) - do n = 1, ngpts - if ( cdfunc(n,k1) > tem1 ) then - cdfunc(n,k) = cdfunc(n,k1) - else - cdfunc(n,k) = cdfunc(n,k) * tem1 - endif - enddo - enddo - - ! ################################################################################### - ! 2) Maximum overlap - ! ################################################################################### - case(2) - call random_number(rand1d,stat) - do n = 1, ngpts - tem1 = rand1d(n) - do k = 1, nlay - cdfunc(n,k) = tem1 - enddo - enddo - - ! ################################################################################### - ! 3) Decorrelation length - ! ################################################################################### - case(3) - ! Compute overlapping factors based on layer midpoint distances and decorrelation - ! depths - do k = nlay, 2, -1 - fac_lcf(k) = exp( -0.5 * (dzlyr(iCol,k)+dzlyr(iCol,k-1)) / de_lgth(iCol) ) - enddo - - ! Setup 2 sets of random numbers - call random_number ( rand2d, stat ) - k1 = 0 - do k = 1, nlay - do n = 1, ngpts - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - ! - call random_number ( rand2d, stat ) - k1 = 0 - do k = 1, nlay - do n = 1, ngpts - k1 = k1 + 1 - cdfun2(n,k) = rand2d(k1) - enddo - enddo - - ! Then working from the top down: - ! if a random number (from an independent set -cdfun2) is smaller then the - ! scale factor: use the upper layer's number, otherwise use a new random - ! number (keep the original assigned one). - do k = nlay-1, 1, -1 - k1 = k + 1 - do n = 1, ngpts - if ( cdfun2(n,k) <= fac_lcf(k1) ) then - cdfunc(n,k) = cdfunc(n,k1) - endif - enddo - enddo - - end select - - ! ################################################################################### - ! Generate subcolumn cloud mask (0/1 for clear/cloudy) - ! ################################################################################### - do k = 1, nlay - tem1 = 1._kind_phys - cld_frac(icol,k) - do n = 1, ngpts - lcloudy(n,k) = cdfunc(n,k) >= tem1 - if (lcloudy(n,k)) then - cld_frac_mcica(icol,k,n) = .true. - else - cld_frac_mcica(icol,k,n) = .false. - endif - enddo - enddo - enddo ! END LOOP OVER COLUMNS - end subroutine mcica_subcol_sw end module mo_rrtmg_sw_cloud_optics diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index c9601f7c8..aee4533a0 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -12,6 +12,12 @@ module rrtmgp_lw_cloud_optics public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize + ! Parameters used for rain and snow(+groupel) RRTMGP cloud-optics + real(kind_phys), parameter :: & + absrain = 0.33e-3, & ! Rain drop absorption coefficient \f$(m^{2}/g)\f$ . + abssnow0 = 1.5, & ! Snow flake absorption coefficient (micron), fu coeff + abssnow1 = 2.34e-3 ! Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef + contains ! ######################################################################################### @@ -29,7 +35,7 @@ subroutine rrtmgp_lw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_ doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? integer, intent(inout) :: & - nrghice ! Number of ice-roughness categories + nrghice ! Number of ice-roughness categories integer, intent(in) :: & mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank @@ -265,9 +271,10 @@ end subroutine rrtmgp_lw_cloud_optics_init !! \htmlinclude rrtmgp_lw_cloud_optics.html !! subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PADE, & - doGP_cldoptics_LUT, nCol, nLev, nrghice, cld_frac, cld_lwp, cld_reliq, cld_iwp, & - cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, p_lay, lw_cloud_props, & - lw_gas_props, lon, lat, cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg) + doGP_cldoptics_LUT, nCol, nLev, nrghice, p_lay, cld_frac, cld_lwp, cld_reliq, & + cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, precip_frac, & + lw_cloud_props, lw_gas_props, lon, lat, cldtaulw, lw_optical_props_cloudsByBand, & + lw_optical_props_precipByBand, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -289,48 +296,53 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PAD cld_reliq, & ! Cloud liquid effective radius cld_iwp, & ! Cloud ice water path cld_reice, & ! Cloud ice effective radius - cld_swp, & ! Cloud snow water path (used only for RRTMG legacy scheme) - cld_resnow, & ! Cloud snow effective radius (used only for RRTMG legacy scheme) - cld_rwp, & ! Cloud rain water path (used only for RRTMG legacy scheme) - cld_rerain ! Cloud rain effective radius (used only for RRTMG legacy scheme) + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain, & ! Cloud rain effective radius + precip_frac ! Precipitation fraction by layer. type(ty_cloud_optics),intent(in) :: & lw_cloud_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme ! Outputs - real(kind_phys), dimension(ncol,nLev), intent(out) :: & - cldtaulw ! Approx. 10.mu band layer cloud optical depth - type(ty_optical_props_1scl),intent(out) :: & - lw_optical_props_cloudsByBand ! RRTMGP DDT: longwave cloud optical properties in each band - integer, intent(out) :: & - errflg ! CCPP error flag character(len=*), intent(out) :: & - errmsg ! CCPP error message - + errmsg ! CCPP error message + integer, intent(out) :: & + errflg ! CCPP error flag + type(ty_optical_props_1scl),intent(out) :: & + lw_optical_props_cloudsByBand, & ! RRTMGP DDT: Longwave optical properties in each band (clouds) + lw_optical_props_precipByBand ! RRTMGP DDT: Longwave optical properties in each band (precipitation) + real(kind_phys), dimension(ncol,nLev), intent(out) :: & + cldtaulw ! Approx 10.mu band layer cloud optical depth + ! Local variables - logical,dimension(ncol,nLev) :: liqmask, icemask + real(kind_phys) :: tau_rain, tau_snow real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()) :: & - tau_cld - integer :: iCol, iLay + tau_cld, tau_precip + integer :: iCol, iLay, iBand ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - tau_cld = 0. + + ! Initialize locals + tau_cld = 0._kind_phys + tau_precip = 0._kind_phys if (.not. doLWrad) return - - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) - icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) - ! Allocate space for RRTMGP DDTs containing cloud radiative properties + ! Allocate space for RRTMGP DDTs containing cloud radiative properties ! Cloud optics [nCol,nLev,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) - lw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys - + lw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys + ! Precipitation optics [nCol,nLev,nBands] + call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_precipByBand%alloc_1scl(& + ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) + lw_optical_props_precipByBand%tau(:,:,:) = 0._kind_phys + ! Compute cloud-optics for RTE. if (doGP_cldoptics_PADE .or. doGP_cldoptics_LUT) then ! i) RRTMGP cloud-optics. @@ -341,15 +353,35 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PAD cld_reice, & ! IN - Cloud ice effective radius (microns) lw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties ! in each band + ! Add in rain and snow(+groupel) + do iCol=1,nCol + do iLay=1,nLev + if (cld_frac(iCol,iLay) .gt. 0.) then + ! Rain optical-depth (No band dependence) + tau_rain = absrain*cld_rwp(iCol,iLay) + + ! Snow (+groupel) optical-depth (No band dependence) + if (cld_swp(iCol,iLay) .gt. 0. .and. cld_resnow(iCol,iLay) .gt. 10._kind_phys) then + tau_snow = abssnow0*1.05756*cld_swp(iCol,iLay)/cld_resnow(iCol,iLay) + else + tau_snow = 0.0 + endif + do iBand=1,lw_gas_props%get_nband() + lw_optical_props_precipByBand%tau(iCol,iLay,iBand) = tau_rain + tau_snow + enddo + endif + enddo + enddo endif if (doG_cldoptics) then ! ii) RRTMG cloud-optics. if (any(cld_frac .gt. 0)) then call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & - cld_frac, tau_cld) + cld_frac, tau_cld, tau_precip) endif lw_optical_props_cloudsByBand%tau = tau_cld + lw_optical_props_precipByBand%tau = tau_precip endif ! All-sky LW optical depth ~10microns diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index d00192f2f..649b964e3 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -233,6 +233,15 @@ type = real intent = in kind = kind_phys +[precip_frac] + standard_name = precipitation_fraction_by_layer + long_name = precipitation fraction in each layer + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer @@ -293,6 +302,14 @@ type = ty_optical_props_1scl intent = out optional = F +[lw_optical_props_precipByBand] + standard_name = longwave_optical_properties_for_precipitation_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index efb383a5d..383694db0 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -38,29 +38,33 @@ end subroutine rrtmgp_lw_cloud_sampling_init !! \htmlinclude rrtmgp_lw_cloud_sampling_run.html !! subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, cld_frac,& - overlap_param, lw_gas_props, lw_optical_props_cloudsByBand, lw_optical_props_clouds, & - errmsg, errflg) + precip_frac, cloud_overlap_param, precip_overlap_param, lw_gas_props, & + lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, & + lw_optical_props_clouds, lw_optical_props_precip, errmsg, errflg) ! Inputs logical, intent(in) :: & - doLWrad ! Logical flag for shortwave radiation call + doLWrad ! Logical flag for shortwave radiation call integer, intent(in) :: & - nCol, & ! Number of horizontal gridpoints - nLev, & ! Number of vertical layers - ipsdlw0 ! Initial permutation seed for McICA + nCol, & ! Number of horizontal gridpoints + nLev, & ! Number of vertical layers + ipsdlw0 ! Initial permutation seed for McICA integer,intent(in),dimension(ncol) :: & - icseed_lw ! auxiliary special cloud related array when module - ! variable isubclw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubclw /=2, it will not be used. + icseed_lw ! auxiliary special cloud related array when module + ! variable isubclw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubclw /=2, it will not be used. real(kind_phys), dimension(ncol,nLev),intent(in) :: & - cld_frac ! Total cloud fraction by layer + cld_frac, & ! Total cloud fraction by layer + precip_frac ! Precipitation fraction by layer real(kind_phys), dimension(ncol,nLev), intent(in) :: & - overlap_param ! Overlap parameter + cloud_overlap_param, & ! Cloud overlap parameter + precip_overlap_param ! Precipitation overlap parameter type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: K-distribution data + lw_gas_props ! RRTMGP DDT: K-distribution data type(ty_optical_props_1scl),intent(in) :: & - lw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + lw_optical_props_cloudsByBand, & ! RRTMGP DDT: Longwave optical properties in each band (clouds) + lw_optical_props_precipByBand ! RRTMGP DDT: Longwave optical properties in each band (precipitation) ! Outputs character(len=*), intent(out) :: & @@ -68,7 +72,8 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, integer, intent(out) :: & errflg ! CCPP error code type(ty_optical_props_1scl),intent(out) :: & - lw_optical_props_clouds ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + lw_optical_props_clouds, & ! RRTMGP DDT: Shortwave optical properties by spectral point (clouds) + lw_optical_props_precip ! RRTMGP DDT: Shortwave optical properties by spectral point (precipitation) ! Local variables integer :: iCol @@ -76,15 +81,24 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, type(random_stat) :: rng_stat real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 real(kind_phys), dimension(lw_gas_props%get_ngpt()*nLev) :: rng1D - logical, dimension(ncol,nLev,lw_gas_props%get_ngpt()) :: cldfracMCICA - real(kind_phys), dimension(ncol,nLev) :: cld_frac_noSamp + logical, dimension(ncol,nLev,lw_gas_props%get_ngpt()) :: cldfracMCICA,precipfracSAMP ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + ! + if (iovrlw .ne. 1 .and. iovrlw .ne. 3) then + errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' + errflg = 1 + call check_error_msg('rrtmgp_lw_cloud_sampling',errmsg) + return + endif + if (.not. doLWrad) return - + ! + ! First sample the clouds... + ! ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] call check_error_msg('rrtmgp_lw_cloud_sampling_run',& lw_optical_props_clouds%alloc_1scl(nCol, nLev, lw_gas_props)) @@ -121,13 +135,69 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, call random_number(rng1D,rng_stat) rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,overlap_param(:,1:nLev-1),cldfracMCICA)) + call check_error_msg('rrtmgp_lw_cloud_sampling_run',& + sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,cloud_overlap_param(:,1:nLev-1),cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA call check_error_msg('rrtmgp_lw_cloud_sampling_run',draw_samples(& cldfracMCICA,lw_optical_props_cloudsByBand,lw_optical_props_clouds)) + ! + ! Next sample the precipitation... + ! + ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] + call check_error_msg('rrtmgp_lw_cloud_sampling_run',& + lw_optical_props_precip%alloc_1scl(nCol, nLev, lw_gas_props)) + + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). + if(isubclw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_lw(iCol) = ipsdlw0 + iCol + enddo + elseif (isubclw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_lw(iCol) = icseed_lw(iCol) + enddo + endif + + ! Call McICA to generate subcolumns. + ! No need to call RNG second time for now, just use the same seeds for precip as clouds. + !! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + !! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) + !do iCol=1,ncol + ! call random_setseed(ipseed_lw(icol),rng_stat) + ! call random_number(rng1D,rng_stat) + ! rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + !enddo + + ! Call McICA + select case ( iovrlw ) + ! Maximumn-random + case(1) ! Maximum-random overlap + call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) + case(3) ! Exponential decorrelation length overlap + ! No need to call RNG second time for now, just use the same seeds for precip as clouds. + !! Generate second RNG + !do iCol=1,ncol + ! call random_setseed(ipseed_lw(icol),rng_stat) + ! call random_number(rng1D,rng_stat) + ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + !enddo + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac,precip_overlap_param(:,1:nLev-1),precipfracSAMP)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_lw_cloud_sampling_run',draw_samples(& + precipfracSAMP,lw_optical_props_precipByBand,lw_optical_props_precip)) + + ! + ! For GFDL MP just add precipitation optics to cloud-optics + ! + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + lw_optical_props_precip%increment(lw_optical_props_clouds)) + end subroutine rrtmgp_lw_cloud_sampling_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 4267cab3e..d54932fa3 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -71,7 +71,16 @@ kind = kind_phys intent = in optional = F -[overlap_param] +[precip_frac] + standard_name = precipitation_fraction_by_layer + long_name = precipitation fraction in each layer + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cloud_overlap_param] standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km @@ -80,6 +89,15 @@ kind = kind_phys intent = in optional = F +[precip_overlap_param] + standard_name = precip_overlap_param + long_name = precipitation overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme @@ -96,6 +114,14 @@ type = ty_optical_props_1scl intent = in optional = F +[lw_optical_props_precipByBand] + standard_name = longwave_optical_properties_for_precipitation_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = in + optional = F [lw_optical_props_clouds] standard_name = longwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties @@ -104,6 +130,14 @@ type = ty_optical_props_1scl intent = out optional = F +[lw_optical_props_precip] + standard_name = longwave_optical_properties_for_precipitation + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 1c11b95c7..434dbe9f3 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -12,6 +12,13 @@ module rrtmgp_sw_cloud_optics implicit none public rrtmgp_sw_cloud_optics_init, rrtmgp_sw_cloud_optics_run, rrtmgp_sw_cloud_optics_finalize + + ! Parameters used for rain and snow(+groupel) RRTMGP cloud-optics + real(kind_phys),parameter :: & + a0r = 3.07e-3, & ! + a0s = 0.0, & ! + a1s = 1.5 ! + real(kind_phys),dimension(:),allocatable :: b0r,b0s,b1s,c0r,c0s contains ! ######################################################################################### @@ -257,6 +264,21 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_ endif call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) + ! Initialize coefficients for rain and snow(+groupel) cloud optics + allocate(b0r(sw_cloud_props%get_nband()),b0s(sw_cloud_props%get_nband()), & + b1s(sw_cloud_props%get_nband()),c0r(sw_cloud_props%get_nband()), & + c0s(sw_cloud_props%get_nband())) + b0r = (/0.496, 0.466, 0.437, 0.416, 0.391, 0.374, 0.352, & + 0.183, 0.048, 0.012, 0.000, 0.000, 0.000, 0.000/) + b0s = (/0.460, 0.460, 0.460, 0.460, 0.460, 0.460, 0.460, & + 0.460, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000/) + b1s = (/0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,& + 0.000, 1.62e-5, 1.62e-5, 0.000, 0.000, 0.000, 0.000/) + c0r = (/0.980, 0.975, 0.965, 0.960, 0.955, 0.952, 0.950, & + 0.944, 0.894, 0.884, 0.883, 0.883, 0.883, 0.883/) + c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, & + 0.970, 0.970, 0.970, 0.700, 0.700, 0.700, 0.700/) + end subroutine rrtmgp_sw_cloud_optics_init ! ######################################################################################### @@ -267,8 +289,9 @@ end subroutine rrtmgp_sw_cloud_optics_init !! subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PADE, & doGP_cldoptics_LUT, nCol, nLev, nDay, idxday, nrghice, cld_frac, cld_lwp, cld_reliq, & - cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, & - sw_gas_props, sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) + cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, precip_frac, & + sw_cloud_props, sw_gas_props, sw_optical_props_cloudsByBand, & + sw_optical_props_precipByBand, cldtausw, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -292,7 +315,8 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD cld_swp, & ! Cloud snow water path cld_resnow, & ! Cloud snow effective radius cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius + cld_rerain, & ! Cloud rain effective radius + precip_frac ! Precipitation fraction by layer type(ty_cloud_optics),intent(in) :: & sw_cloud_props ! RRTMGP DDT: shortwave cloud properties type(ty_gas_optics_rrtmgp),intent(in) :: & @@ -300,39 +324,47 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD ! Outputs character(len=*), intent(out) :: & - errmsg ! CCPP error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg ! CCPP error code + errflg ! CCPP error flag type(ty_optical_props_2str),intent(out) :: & - sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + sw_optical_props_cloudsByBand, & ! RRTMGP DDT: Shortwave optical properties in each band (clouds) + sw_optical_props_precipByBand ! RRTMGP DDT: Shortwave optical properties in each band (cloud precipitation) real(kind_phys), dimension(ncol,NLev), intent(out) :: & - cldtausw ! approx 10.mu band layer cloud optical depth + cldtausw ! Approx 10.mu band layer cloud optical depth ! Local variables - logical,dimension(nday,nLev) :: liqmask, icemask + integer :: iDay, iLay, iBand + real(kind_phys) :: tau_rain, tau_snow, ssa_rain, ssa_snow, asy_rain, asy_snow, & + tau_prec, asy_prec, ssa_prec, asyw, ssaw, za1, za2 real(kind_phys), dimension(nday,nLev,sw_gas_props%get_nband()) :: & - tau_cld, ssa_cld, asy_cld - + tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (.not. doSWrad) return + + ! Only process sunlit points... if (nDay .gt. 0) then - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - liqmask = (cld_frac(idxday(1:nday),:) .gt. 0 .and. cld_lwp(idxday(1:nday),:) .gt. 0) - icemask = (cld_frac(idxday(1:nday),:) .gt. 0 .and. cld_iwp(idxday(1:nday),:) .gt. 0) - - ! Allocate space for RRTMGP DDTs containing cloud radiative properties + ! Allocate space for RRTMGP DDTs containing cloud/precipitation radiative properties ! Cloud optics [nday,nLev,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& nday, nLev, sw_gas_props%get_band_lims_wavenumber())) sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - - ! Compute cloud-optics for RTE. + + ! Cloud-precipitation optics [nday,nLev,nBands] + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_precipByBand%alloc_2str(& + nday, nLev, sw_gas_props%get_band_lims_wavenumber())) + sw_optical_props_precipByBand%tau(:,:,:) = 0._kind_phys + sw_optical_props_precipByBand%ssa(:,:,:) = 0._kind_phys + sw_optical_props_precipByBand%g(:,:,:) = 0._kind_phys + + ! Compute cloud/precipitation optics. if (doGP_cldoptics_PADE .or. doGP_cldoptics_LUT) then ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& @@ -342,32 +374,78 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD cld_reice(idxday(1:nday),:), & ! IN - Cloud ice effective radius sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT: Shortwave optical properties, ! in each band (tau,ssa,g) + ! Cloud precipitation optics: rain and snow(+groupel) + do iDay=1,nDay + do iLay=1,nLev + if (cld_frac(idxday(iDay),iLay) .gt. 1.e-12_kind_phys) then + ! Rain/Snow optical depth (No band dependence) + tau_rain = cld_rwp(idxday(iDay),iLay)*a0r + if (cld_swp(idxday(iDay),iLay) .gt. 0. .and. cld_resnow(idxday(iDay),iLay) .gt. 10._kind_phys) then + tau_snow = cld_swp(idxday(iDay),iLay)*1.09087*(a0s + a1s/(1.0315*cld_resnow(idxday(iDay),iLay))) ! fu's formula + else + tau_snow = 0._kind_phys + endif + + ! Rain/Snow single-scattering albedo and asymmetry (Band dependent) + do iBand=1,sw_cloud_props%get_nband() + ! By species + ssa_rain = tau_rain*(1.-b0r(iBand)) + asy_rain = ssa_rain*c0r(iBand) + ssa_snow = tau_snow*(1.-(b0s(iBand)+b1s(iBand)*1.0315*cld_resnow(idxday(iDay),iLay))) + asy_snow = ssa_snow*c0s(iBand) + + ! Combine + tau_prec = max(1.e-12_kind_phys, tau_rain + tau_snow) + ssa_prec = max(1.e-12_kind_phys, ssa_rain + ssa_snow) + asy_prec = max(1.e-12_kind_phys, asy_rain + asy_snow) + asyw = asy_prec/max(1.e-12_kind_phys, ssa_prec) + ssaw = min(1._kind_phys-0.000001, ssa_prec/tau_prec) + za1 = asyw * asyw + za2 = ssaw * za1 + sw_optical_props_precipByBand%tau(iDay,iLay,iBand) = (1._kind_phys - za2) * tau_prec + sw_optical_props_precipByBand%ssa(iDay,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) + sw_optical_props_precipByBand%g(iDay,iLay,iBand) = asyw/(1+asyw) + enddo + endif + enddo + enddo endif if (doG_cldoptics) then - ! RRTMG cloud-optics - tau_cld(:,:,:) = 0._kind_phys - ssa_cld(:,:,:) = 0._kind_phys - asy_cld(:,:,:) = 0._kind_phys + ! RRTMG cloud(+precipitation) optics + tau_cld(:,:,:) = 0._kind_phys + ssa_cld(:,:,:) = 0._kind_phys + asy_cld(:,:,:) = 0._kind_phys + tau_precip(:,:,:) = 0._kind_phys + ssa_precip(:,:,:) = 0._kind_phys + asy_precip(:,:,:) = 0._kind_phys if (any(cld_frac .gt. 0)) then call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & - cld_frac(idxday(1:nday),:), tau_cld, ssa_cld, asy_cld) + cld_frac(idxday(1:nday),:), tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip) endif + ! Cloud-optics (Need to reorder from G->GP band conventions) sw_optical_props_cloudsByBand%tau(:,:,1) = tau_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%ssa(:,:,1) = ssa_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%g(:,:,1) = asy_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_cld(:,:,1:sw_gas_props%get_nband()-1) sw_optical_props_cloudsByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_cld(:,:,1:sw_gas_props%get_nband()-1) sw_optical_props_cloudsByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_cld(:,:,1:sw_gas_props%get_nband()-1) + ! Precipitation-optics (Need to reorder from G->GP band conventions) + sw_optical_props_precipByBand%tau(:,:,1) = tau_precip(:,:,sw_gas_props%get_nband()) + sw_optical_props_precipByBand%ssa(:,:,1) = ssa_precip(:,:,sw_gas_props%get_nband()) + sw_optical_props_precipByBand%g(:,:,1) = asy_precip(:,:,sw_gas_props%get_nband()) + sw_optical_props_precipByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_precip(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_precipByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_precip(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_precipByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_precip(:,:,1:sw_gas_props%get_nband()-1) endif ! All-sky SW optical depth ~0.55microns cldtausw(idxday(1:nDay),:) = sw_optical_props_cloudsByBand%tau(:,:,11) endif - + end subroutine rrtmgp_sw_cloud_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index cc28b0f00..9edb4130a 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -242,6 +242,15 @@ kind = kind_phys intent = in optional = F +[precip_frac] + standard_name = precipitation_fraction_by_layer + long_name = precipitation fraction in each layer + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [sw_cloud_props] standard_name = coefficients_for_sw_cloud_optics long_name = DDT containing spectral information for cloudy RRTMGP SW radiation scheme @@ -282,6 +291,14 @@ type = ty_optical_props_2str intent = out optional = F +[sw_optical_props_precipByBand] + standard_name = shortwave_optical_properties_for_precipitation_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F [cldtausw] standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 22718418a..2a3b7b58f 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -38,40 +38,45 @@ end subroutine rrtmgp_sw_cloud_sampling_init !! \htmlinclude rrtmgp_sw_cloud_sampling.html !! subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & - icseed_sw, cld_frac, overlap_param, sw_gas_props, sw_optical_props_cloudsByBand, & - sw_optical_props_clouds, errmsg, errflg) + icseed_sw, cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, & + sw_gas_props, sw_optical_props_cloudsByBand, sw_optical_props_precipByBand, & + sw_optical_props_clouds, sw_optical_props_precip, errmsg, errflg) ! Inputs logical, intent(in) :: & - doSWrad ! Logical flag for shortwave radiation call + doSWrad ! Logical flag for shortwave radiation call integer, intent(in) :: & - nCol, & ! Number of horizontal gridpoints - nDay, & ! Number of daylit points. - nLev, & ! Number of vertical layers - ipsdsw0 ! Initial permutation seed for McICA + nCol, & ! Number of horizontal gridpoints + nDay, & ! Number of daylit points. + nLev, & ! Number of vertical layers + ipsdsw0 ! Initial permutation seed for McICA integer,intent(in),dimension(ncol) :: & - idxday ! Indices for daylit points. + idxday ! Indices for daylit points. integer,intent(in),dimension(ncol) :: & - icseed_sw ! auxiliary special cloud related array when module - ! variable isubcsw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubcsw /=2, it will not be used. + icseed_sw ! auxiliary special cloud related array when module + ! variable isubcsw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubcsw /=2, it will not be used. real(kind_phys), dimension(ncol,nLev),intent(in) :: & - cld_frac ! Total cloud fraction by layer + cld_frac, & ! Total cloud fraction by layer + precip_frac ! Precipitation fraction by layer real(kind_phys), dimension(ncol,nLev), intent(in) :: & - overlap_param ! Overlap parameter + cloud_overlap_param, & ! Cloud overlap parameter + precip_overlap_param ! Precipitation overlap parameter type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: K-distribution data + sw_gas_props ! RRTMGP DDT: K-distribution data type(ty_optical_props_2str),intent(in) :: & - sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + sw_optical_props_cloudsByBand, & ! RRTMGP DDT: Shortwave optical properties in each band (clouds) + sw_optical_props_precipByBand ! RRTMGP DDT: Shortwave optical properties in each band (precipitation) ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error code + errflg ! Error flag type(ty_optical_props_2str),intent(out) :: & - sw_optical_props_clouds ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + sw_optical_props_clouds, & ! RRTMGP DDT: Shortwave optical properties at each spectral point (clouds) + sw_optical_props_precip ! RRTMGP DDT: Shortwave optical properties at each spectral point (precipitation) ! Local variables integer :: iCol,iLay @@ -79,18 +84,76 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd type(random_stat) :: rng_stat real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng1D - logical, dimension(ncol,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA - real(kind_phys), dimension(ncol,nLev) :: cld_frac_noSamp + logical, dimension(ncol,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA,precipfracSAMP ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + + ! + if (iovrsw .ne. 1 .and. iovrsw .ne. 3) then + errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' + errflg = 1 + call check_error_msg('rrtmgp_sw_cloud_sampling',errmsg) + return + endif if (.not. doSWrad) return if (nDay .gt. 0) then + ! + ! First sample the clouds... + ! + ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + sw_optical_props_clouds%alloc_2str(nday, nLev, sw_gas_props)) + + ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). + if(isubcsw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_sw(iCol) = ipsdsw0 + iCol + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_sw(iCol) = icseed_sw(iCol) + enddo + endif + + ! Call McICA to generate subcolumns. + ! No need to call RNG second time for now, just use the same seeds for precip as clouds. + !! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + !! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) + !do iCol=1,ncol + ! call random_setseed(ipseed_sw(icol),rng_stat) + ! call random_number(rng1D,rng_stat) + ! rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + !enddo + + ! Call McICA + select case ( iovrsw ) + case(1) ! Maximum-random + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + case(3) ! Exponential-random + ! No need to call RNG second time for now, just use the same seeds for precip as clouds. + !! Generate second RNG + !do iCol=1,ncol + ! call random_setseed(ipseed_sw(icol),rng_stat) + ! call random_number(rng1D,rng_stat) + ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + !enddo + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,cloud_overlap_param(:,1:nLev-1),cldfracMCICA)) + end select + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_sw_cloud_sampling_run',draw_samples(& + cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_cloudsByBand,sw_optical_props_clouds)) + + ! + ! Next sample precipitation (same as clouds for now) + ! ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] - call check_error_msg('rrtmgp_sw_cloud_sampling_run',sw_optical_props_clouds%alloc_2str( & + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sw_optical_props_precip%alloc_2str( & nday, nLev, sw_gas_props)) ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). @@ -116,7 +179,8 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Call McICA select case ( iovrsw ) case(1) ! Maximum-random - call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) case(3) ! Exponential-random ! Generate second RNG do iCol=1,ncol @@ -124,15 +188,22 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd call random_number(rng1D,rng_stat) rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,overlap_param(:,1:nLev-1),cldfracMCICA)) + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac,precip_overlap_param(:,1:nLev-1),precipfracSAMP)) end select ! Map band optical depth to each g-point using McICA call check_error_msg('rrtmgp_sw_cloud_sampling_run',draw_samples(& - cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_cloudsByBand,sw_optical_props_clouds)) - + precipfracSAMP(idxday(1:nDay),:,:),sw_optical_props_precipByBand,sw_optical_props_precip)) + endif - + + ! + ! For GFDL MP just add precipitation optics to cloud-optics + ! + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + sw_optical_props_precip%increment(sw_optical_props_clouds)) + end subroutine rrtmgp_sw_cloud_sampling_run ! ######################################################################################### diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index eed1101b8..4afdaa4db 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -87,7 +87,16 @@ kind = kind_phys intent = in optional = F -[overlap_param] +[precip_frac] + standard_name = precipitation_fraction_by_layer + long_name = precipitation fraction in each layer + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cloud_overlap_param] standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km @@ -96,6 +105,15 @@ kind = kind_phys intent = in optional = F +[precip_overlap_param] + standard_name = precip_overlap_param + long_name = precipitation overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme @@ -112,6 +130,14 @@ type = ty_optical_props_2str intent = in optional = F +[sw_optical_props_precipByBand] + standard_name = shortwave_optical_properties_for_precipitation_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = in + optional = F [sw_optical_props_clouds] standard_name = shortwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties @@ -120,6 +146,14 @@ type = ty_optical_props_2str intent = out optional = F +[sw_optical_props_precip] + standard_name = shortwave_optical_properties_for_precipitation + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 3375e32cd9eec7bc6c3447b830de2b0afd7b9a8a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 22 May 2020 13:54:41 -0600 Subject: [PATCH 172/404] Added pieces for combining cloud+precipitation optical properties. Still not producing same results as before the split. --- physics/rrtmgp_lw_cloud_sampling.F90 | 5 ++-- physics/rrtmgp_sw_cloud_sampling.F90 | 38 +++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 383694db0..d783af9c1 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -195,9 +195,8 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! ! For GFDL MP just add precipitation optics to cloud-optics ! - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - lw_optical_props_precip%increment(lw_optical_props_clouds)) - + lw_optical_props_clouds%tau = lw_optical_props_clouds%tau + lw_optical_props_precip%tau + end subroutine rrtmgp_lw_cloud_sampling_run ! ######################################################################################### diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 2a3b7b58f..ec86c147f 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -79,9 +79,10 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd sw_optical_props_precip ! RRTMGP DDT: Shortwave optical properties at each spectral point (precipitation) ! Local variables - integer :: iCol,iLay + integer :: iCol,iLay,iGpt integer,dimension(ncol) :: ipseed_sw type(random_stat) :: rng_stat + real(kind_phys) :: tauloc,asyloc,ssaloc real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng1D logical, dimension(ncol,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA,precipfracSAMP @@ -201,9 +202,38 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! ! For GFDL MP just add precipitation optics to cloud-optics ! - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sw_optical_props_precip%increment(sw_optical_props_clouds)) - + do iGpt=1,sw_gas_props%get_ngpt() + do iCol=1,nCol + do iLay=1,nLev + tauloc = sw_optical_props_clouds%tau(iCol,iLay,iGpt) + & + sw_optical_props_precip%tau(iCol,iLay,iGpt) + if (tauloc > 0) then + ssaloc = (sw_optical_props_clouds%tau(iCol,iLay,iGpt) * & + sw_optical_props_clouds%ssa(iCol,iLay,iGpt) + & + sw_optical_props_precip%tau(iCol,iLay,iGpt) * & + sw_optical_props_precip%ssa(iCol,iLay,iGpt)) / & + tauloc + if (ssaloc > 0) then + asyloc = (sw_optical_props_clouds%tau(iCol,iLay,iGpt) * & + sw_optical_props_clouds%ssa(iCol,iLay,iGpt) * & + sw_optical_props_clouds%g(iCol,iLay,iGpt) + & + sw_optical_props_precip%tau(iCol,iLay,iGpt) * & + sw_optical_props_precip%ssa(iCol,iLay,iGpt) * & + sw_optical_props_precip%g(iCol,iLay,iGpt)) / & + (tauloc*ssaloc) + sw_optical_props_clouds%ssa(iCol,iLay,iGpt) = ssaloc + sw_optical_props_clouds%g(iCol,iLay,iGpt) = asyloc + endif + sw_optical_props_clouds%tau(iCol,iLay,iGpt) = tauloc + endif + enddo + enddo + enddo + +! call combine_optics_2str(sw_optical_props_precip%tau, sw_optical_props_precip%ssa, & +! sw_optical_props_precip%g,sw_optical_props_clouds%tau,& +! sw_optical_props_clouds%ssa, sw_optical_props_clouds%g) + end subroutine rrtmgp_sw_cloud_sampling_run ! ######################################################################################### From c2fbbbea960972318e406714179096c1857a7ad2 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Fri, 22 May 2020 20:46:36 +0000 Subject: [PATCH 173/404] Adding tiice to RUC LSM. --- physics/lsm_ruc_sfc_sice_interstitial.F90 | 26 +++++++---- physics/lsm_ruc_sfc_sice_interstitial.meta | 50 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 8 deletions(-) diff --git a/physics/lsm_ruc_sfc_sice_interstitial.F90 b/physics/lsm_ruc_sfc_sice_interstitial.F90 index 63f006f1e..27033fcc8 100644 --- a/physics/lsm_ruc_sfc_sice_interstitial.F90 +++ b/physics/lsm_ruc_sfc_sice_interstitial.F90 @@ -21,17 +21,18 @@ end subroutine lsm_ruc_sfc_sice_pre_finalize !! \htmlinclude lsm_ruc_sfc_sice_pre_run.html !! #endif - subroutine lsm_ruc_sfc_sice_pre_run(im, lsoil_ruc, lsoil, land, stc, tslb, errmsg, errflg) + subroutine lsm_ruc_sfc_sice_pre_run(im, lsoil_ruc, lsoil, kice, land, icy, stc, tslb, tiice, errmsg, errflg) implicit none ! Interface variables - integer, intent(in) :: im, lsoil_ruc, lsoil - logical, dimension(im), intent(in) :: land + integer, intent(in) :: im, lsoil_ruc, lsoil, kice + logical, dimension(im), intent(in) :: land, icy ! --- on Noah levels real (kind=kind_phys), dimension(im,lsoil), intent(inout) :: stc ! --- on RUC levels real (kind=kind_phys), dimension(im,lsoil_ruc), intent(in) :: tslb + real (kind=kind_phys), dimension(im,kice), intent(inout) :: tiice character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -44,7 +45,11 @@ subroutine lsm_ruc_sfc_sice_pre_run(im, lsoil_ruc, lsoil, land, stc, tslb, errms errflg = 0 do i=1,im - if (.not.land(i)) then + if (icy(i)) then + do k=1,kice + tiice(i,k) = tslb(i,k) + end do + else if (.not.land(i)) then do k=1,min(lsoil,lsoil_ruc) stc(i,k) = tslb(i,k) end do @@ -78,15 +83,16 @@ end subroutine lsm_ruc_sfc_sice_post_finalize !! \htmlinclude lsm_ruc_sfc_sice_post_run.html !! #endif - subroutine lsm_ruc_sfc_sice_post_run(im, lsoil_ruc, lsoil, land, stc, tslb, errmsg, errflg) + subroutine lsm_ruc_sfc_sice_post_run(im, lsoil_ruc, lsoil, kice, land, icy, stc, tslb, tiice, errmsg, errflg) implicit none ! Interface variables - integer, intent(in) :: im, lsoil_ruc, lsoil - logical, dimension(im), intent(in) :: land + integer, intent(in) :: im, lsoil_ruc, lsoil, kice + logical, dimension(im), intent(in) :: land, icy ! --- on Noah levels real (kind=kind_phys), dimension(im,lsoil), intent(in) :: stc + real (kind=kind_phys), dimension(im,kice), intent(in) :: tiice ! --- on RUC levels real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb @@ -101,7 +107,11 @@ subroutine lsm_ruc_sfc_sice_post_run(im, lsoil_ruc, lsoil, land, stc, tslb, errm errflg = 0 do i=1,im - if (.not.land(i)) then + if (icy(i)) then + do k=1,kice + tslb(i,k) = tiice(i,k) + end do + else if (.not.land(i)) then do k=1,min(lsoil,lsoil_ruc) tslb(i,k) = stc(i,k) end do diff --git a/physics/lsm_ruc_sfc_sice_interstitial.meta b/physics/lsm_ruc_sfc_sice_interstitial.meta index c105abe9d..3b8213d78 100644 --- a/physics/lsm_ruc_sfc_sice_interstitial.meta +++ b/physics/lsm_ruc_sfc_sice_interstitial.meta @@ -9,6 +9,14 @@ type = integer intent = in optional = F +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer + intent = in + optional = F [lsoil_ruc] standard_name = soil_vertical_dimension_for_land_surface_model long_name = number of soil layers internal to land surface model @@ -33,6 +41,23 @@ type = logical intent = in optional = F +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = inout + optional = F +[tiice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,ice_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [stc] standard_name = soil_temperature long_name = soil temperature @@ -81,6 +106,14 @@ type = integer intent = in optional = F +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer + intent = in + optional = F [lsoil_ruc] standard_name = soil_vertical_dimension_for_land_surface_model long_name = number of soil layers internal to land surface model @@ -105,6 +138,23 @@ type = logical intent = in optional = F +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = inout + optional = F +[tiice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,ice_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [stc] standard_name = soil_temperature long_name = soil temperature From 48e94f402794b3dc8095c6d1c336aca908f201ac Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 26 May 2020 11:23:31 -0600 Subject: [PATCH 174/404] Some small changes. Minor differences in SW down at the surface still present. --- physics/rrtmgp_sw_cloud_optics.F90 | 4 +- physics/rrtmgp_sw_cloud_sampling.F90 | 55 +++++++++++++++------------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 434dbe9f3..2eb3b95b3 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -413,10 +413,10 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD if (doG_cldoptics) then ! RRTMG cloud(+precipitation) optics tau_cld(:,:,:) = 0._kind_phys - ssa_cld(:,:,:) = 0._kind_phys + ssa_cld(:,:,:) = 1._kind_phys asy_cld(:,:,:) = 0._kind_phys tau_precip(:,:,:) = 0._kind_phys - ssa_precip(:,:,:) = 0._kind_phys + ssa_precip(:,:,:) = 1._kind_phys asy_precip(:,:,:) = 0._kind_phys if (any(cld_frac .gt. 0)) then call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index ec86c147f..f2069bb95 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -158,24 +158,25 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd nday, nLev, sw_gas_props)) ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - if(isubcsw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed_sw(iCol) = ipsdsw0 + iCol - enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed_sw(iCol) = icseed_sw(iCol) - enddo - endif + !if(isubcsw == 1) then ! advance prescribed permutation seed + ! do iCol = 1, ncol + ! ipseed_sw(iCol) = ipsdsw0 + iCol + ! enddo + !elseif (isubcsw == 2) then ! use input array of permutaion seeds + ! do iCol = 1, ncol + ! ipseed_sw(iCol) = icseed_sw(iCol) + ! enddo + !endif ! Call McICA to generate subcolumns. - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_sw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) - enddo + ! No need to call RNG second time for now, just use the same seeds for precip as clouds. + !! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + !! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) + !do iCol=1,ncol + ! call random_setseed(ipseed_sw(icol),rng_stat) + ! call random_number(rng1D,rng_stat) + ! rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + !enddo ! Call McICA select case ( iovrsw ) @@ -183,12 +184,13 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) case(3) ! Exponential-random - ! Generate second RNG - do iCol=1,ncol - call random_setseed(ipseed_sw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) - enddo + ! No need to call RNG second time for now, just use the same seeds for precip as clouds. + !! Generate second RNG + !do iCol=1,ncol + !call random_setseed(ipseed_sw(icol),rng_stat) + ! call random_number(rng1D,rng_stat) + ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + !enddo call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac,precip_overlap_param(:,1:nLev-1),precipfracSAMP)) end select @@ -220,11 +222,14 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd sw_optical_props_precip%tau(iCol,iLay,iGpt) * & sw_optical_props_precip%ssa(iCol,iLay,iGpt) * & sw_optical_props_precip%g(iCol,iLay,iGpt)) / & - (tauloc*ssaloc) - sw_optical_props_clouds%ssa(iCol,iLay,iGpt) = ssaloc - sw_optical_props_clouds%g(iCol,iLay,iGpt) = asyloc + (tauloc*ssaloc) + else + ssaloc = 1. + asyloc = 0. endif sw_optical_props_clouds%tau(iCol,iLay,iGpt) = tauloc + sw_optical_props_clouds%ssa(iCol,iLay,iGpt) = ssaloc + sw_optical_props_clouds%g(iCol,iLay,iGpt) = asyloc endif enddo enddo From 333c30f0862c30abb05c09eefdcb06de9a8cf316 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 26 May 2020 15:02:13 -0600 Subject: [PATCH 175/404] Moved copy statement into conditional statement. --- physics/rrtmgp_sw_cloud_optics.F90 | 50 +++++++++++++++++------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 2eb3b95b3..55a4304eb 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -278,6 +278,8 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_ 0.944, 0.894, 0.884, 0.883, 0.883, 0.883, 0.883/) c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, & 0.970, 0.970, 0.970, 0.700, 0.700, 0.700, 0.700/) + + open(43,file='dumpGP.optics.txt',status='unknown') end subroutine rrtmgp_sw_cloud_optics_init @@ -412,12 +414,6 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD endif if (doG_cldoptics) then ! RRTMG cloud(+precipitation) optics - tau_cld(:,:,:) = 0._kind_phys - ssa_cld(:,:,:) = 1._kind_phys - asy_cld(:,:,:) = 0._kind_phys - tau_precip(:,:,:) = 0._kind_phys - ssa_precip(:,:,:) = 1._kind_phys - asy_precip(:,:,:) = 0._kind_phys if (any(cld_frac .gt. 0)) then call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & @@ -425,21 +421,32 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & cld_frac(idxday(1:nday),:), tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip) - endif - ! Cloud-optics (Need to reorder from G->GP band conventions) - sw_optical_props_cloudsByBand%tau(:,:,1) = tau_cld(:,:,sw_gas_props%get_nband()) - sw_optical_props_cloudsByBand%ssa(:,:,1) = ssa_cld(:,:,sw_gas_props%get_nband()) - sw_optical_props_cloudsByBand%g(:,:,1) = asy_cld(:,:,sw_gas_props%get_nband()) - sw_optical_props_cloudsByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_cld(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_cloudsByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_cld(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_cloudsByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_cld(:,:,1:sw_gas_props%get_nband()-1) - ! Precipitation-optics (Need to reorder from G->GP band conventions) - sw_optical_props_precipByBand%tau(:,:,1) = tau_precip(:,:,sw_gas_props%get_nband()) - sw_optical_props_precipByBand%ssa(:,:,1) = ssa_precip(:,:,sw_gas_props%get_nband()) - sw_optical_props_precipByBand%g(:,:,1) = asy_precip(:,:,sw_gas_props%get_nband()) - sw_optical_props_precipByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_precip(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_precipByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_precip(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_precipByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_precip(:,:,1:sw_gas_props%get_nband()-1) + + ! Cloud-optics (Need to reorder from G->GP band conventions) + sw_optical_props_cloudsByBand%tau(:,:,1) = tau_cld(:,:,sw_gas_props%get_nband()) + sw_optical_props_cloudsByBand%ssa(:,:,1) = ssa_cld(:,:,sw_gas_props%get_nband()) + sw_optical_props_cloudsByBand%g(:,:,1) = asy_cld(:,:,sw_gas_props%get_nband()) + sw_optical_props_cloudsByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_cld(:,:,1:sw_gas_props%get_nband()-1) + ! Precipitation-optics (Need to reorder from G->GP band conventions) + sw_optical_props_precipByBand%tau(:,:,1) = tau_precip(:,:,sw_gas_props%get_nband()) + sw_optical_props_precipByBand%ssa(:,:,1) = ssa_precip(:,:,sw_gas_props%get_nband()) + sw_optical_props_precipByBand%g(:,:,1) = asy_precip(:,:,sw_gas_props%get_nband()) + sw_optical_props_precipByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_precip(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_precipByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_precip(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_precipByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_precip(:,:,1:sw_gas_props%get_nband()-1) + + do iLay=1,nLev + write(43,'(a10,i5)') 'nLay: ',iLay + write(43,'(a10,14f12.7)') 'tau_cld: ',sw_optical_props_cloudsByBand%tau(1,iLay,:) + write(43,'(a10,14f12.7)') 'ssa_cld: ',sw_optical_props_cloudsByBand%ssa(1,iLay,:) + write(43,'(a10,14f12.7)') 'asy_cld: ',sw_optical_props_cloudsByBand%g(1,iLay,:) + write(43,'(a10,14f12.7)') 'tau_prec: ',sw_optical_props_precipByBand%tau(1,iLay,:) + write(43,'(a10,14f12.7)') 'ssa_prec: ',sw_optical_props_precipByBand%ssa(1,iLay,:) + write(43,'(a10,14f12.7)') 'asy_prec: ',sw_optical_props_precipByBand%g(1,iLay,:) + enddo + endif endif ! All-sky SW optical depth ~0.55microns @@ -452,6 +459,7 @@ end subroutine rrtmgp_sw_cloud_optics_run ! SUBROTUINE rrtmgp_sw_cloud_optics_finalize() ! ######################################################################################### subroutine rrtmgp_sw_cloud_optics_finalize() + close(43) end subroutine rrtmgp_sw_cloud_optics_finalize end module rrtmgp_sw_cloud_optics From d44e2e7446f9fc02c99ec02b9b2fe97a5b0aa055 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 27 May 2020 11:35:36 -0600 Subject: [PATCH 176/404] Clean up use of horizontal_dimension versus horizontal_loop_extent in a large number of files --- physics/GFS_MP_generic.F90 | 8 +++---- physics/GFS_MP_generic.meta | 8 ------- physics/GFS_rrtmg_setup.meta | 4 ++-- physics/GFS_rrtmgp_pre.F90 | 4 +--- physics/GFS_rrtmgp_pre.meta | 8 ------- physics/GFS_rrtmgp_sw_post.F90 | 5 ++-- physics/GFS_rrtmgp_sw_post.meta | 2 +- physics/cires_ugwp.F90 | 2 +- physics/cnvc90.f | 6 ++--- physics/cnvc90.meta | 8 ------- physics/cs_conv.F90 | 36 ++++++++++++++-------------- physics/cs_conv.meta | 8 ------- physics/cu_gf_driver.F90 | 32 ++++++++++++------------- physics/cu_gf_driver.meta | 8 ------- physics/cu_ntiedtke.F90 | 14 +++++------ physics/cu_ntiedtke.meta | 8 ------- physics/dcyc2.f | 18 +++++++------- physics/dcyc2.meta | 8 ------- physics/drag_suite.F90 | 4 ++-- physics/drag_suite.meta | 8 ------- physics/gcm_shoc.F90 | 8 +++---- physics/gcm_shoc.meta | 8 ------- physics/gscond.f | 20 ++++++++-------- physics/gscond.meta | 8 ------- physics/gwdc.f | 12 +++++----- physics/gwdc.meta | 8 ------- physics/gwdps.f | 34 +++++++++++++------------- physics/gwdps.meta | 8 ------- physics/h2ophys.f | 14 +++++------ physics/h2ophys.meta | 8 ------- physics/m_micro.F90 | 12 +++++----- physics/m_micro.meta | 8 ------- physics/module_MYJPBL_wrapper.F90 | 6 ++--- physics/module_MYJPBL_wrapper.meta | 8 ------- physics/module_MYJSFC_wrapper.F90 | 4 ++-- physics/module_MYJSFC_wrapper.meta | 8 ------- physics/module_MYNNPBL_wrapper.F90 | 4 ++-- physics/module_MYNNPBL_wrapper.meta | 9 +------ physics/module_MYNNSFC_wrapper.F90 | 6 ++--- physics/module_MYNNSFC_wrapper.meta | 8 ------- physics/module_SGSCloud_RadPost.F90 | 4 ++-- physics/module_SGSCloud_RadPost.meta | 8 ------- physics/module_SGSCloud_RadPre.F90 | 4 ++-- physics/module_SGSCloud_RadPre.meta | 8 ------- physics/moninedmf.f | 20 +++++++--------- physics/moninedmf.meta | 8 ------- physics/moninedmf_hafs.f | 20 +++++++--------- physics/moninedmf_hafs.meta | 8 ------- physics/moninshoc.f | 12 ++++------ physics/moninshoc.meta | 8 ------- physics/mp_thompson_post.F90 | 3 +-- physics/mp_thompson_post.meta | 8 ------- physics/ozphys.f | 12 +++++----- physics/ozphys.meta | 8 ------- physics/ozphys_2015.f | 14 +++++------ physics/ozphys_2015.meta | 8 ------- physics/precpd.f | 19 +++++++-------- physics/precpd.meta | 8 ------- physics/rascnv.F90 | 15 ++++++------ physics/rascnv.meta | 8 ------- physics/rayleigh_damp.f | 24 +++++++++---------- physics/rayleigh_damp.meta | 8 ------- physics/samfdeepcnv.f | 22 ++++++++--------- physics/samfdeepcnv.meta | 8 ------- physics/samfshalcnv.f | 18 +++++++------- physics/samfshalcnv.meta | 8 ------- physics/sascnvn.F | 9 ++++--- physics/sascnvn.meta | 8 ------- physics/satmedmfvdif.F | 22 ++++++++--------- physics/satmedmfvdif.meta | 8 ------- physics/satmedmfvdifq.F | 22 ++++++++--------- physics/satmedmfvdifq.meta | 8 ------- physics/shalcnv.F | 7 +++--- physics/shalcnv.meta | 8 ------- physics/shinhongvdif.F90 | 10 ++++---- physics/shinhongvdif.meta | 8 ------- physics/ysuvdif.F90 | 10 ++++---- physics/ysuvdif.meta | 8 ------- 78 files changed, 252 insertions(+), 567 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 13f8243ed..73b26c7a3 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -92,7 +92,7 @@ end subroutine GFS_MP_generic_post_init !! !> \section gfs_mp_gen GFS MP Generic Post General Algorithm !> @{ - subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, & + subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, & imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires, cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, con_g, dtf, frain, rainc, rain1, & rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_qv, rain0, ice0, snow0, & graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, & @@ -104,7 +104,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt implicit none - integer, intent(in) :: im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac + integer, intent(in) :: im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm @@ -112,7 +112,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt real(kind=kind_phys), dimension(im), intent(in) :: rainc, rain1, xlat, xlon, tsfc real(kind=kind_phys), dimension(im), intent(inout) :: ice, snow, graupel real(kind=kind_phys), dimension(im), intent(in) :: rain0, ice0, snow0, graupel0 - real(kind=kind_phys), dimension(ix,nrcm), intent(in) :: rann + real(kind=kind_phys), dimension(im,nrcm), intent(in) :: rann real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0, prsl, save_t, save_qv, del real(kind=kind_phys), dimension(im,levs+1), intent(in) :: prsi, phii real(kind=kind_phys), dimension(im,levs,ntrac), intent(in) :: gq0 @@ -224,7 +224,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt if (cal_pre) then ! hchuang: add dominant precipitation type algorithm ! - call calpreciptype (kdt, nrcm, im, ix, levs, levs+1, & + call calpreciptype (kdt, nrcm, im, im, levs, levs+1, & rann, xlat, xlon, gt0, & gq0(:,:,1), prsl, prsi, & rain, phii, tsfc, & ! input diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 3ecc94c00..c4eacb758 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -155,14 +155,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [levs] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 8405d160d..ad98575ca 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -195,8 +195,8 @@ intent = in optional = F [im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent + standard_name = horizontal_dimension + long_name = horizontal dimension units = count dimensions = () type = integer diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 1344f269c..a95a0fffd 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -85,12 +85,10 @@ module GFS_rrtmgp_pre !! \section arg_table_GFS_rrtmgp_pre_init !! \htmlinclude GFS_rrtmgp_pre_init.html !! - subroutine GFS_rrtmgp_pre_init(Model, Radtend, active_gases_array, errmsg, errflg) + subroutine GFS_rrtmgp_pre_init(Model, active_gases_array, errmsg, errflg) ! Inputs type(GFS_control_type), intent(inout) :: & Model ! DDT: FV3-GFS model control parameters - type(GFS_radtend_type), intent(inout) :: & - Radtend ! DDT: FV3-GFS radiation tendencies ! Outputs character(len=*),dimension(Model%ngases), intent(out) :: & diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index c80098709..ae94ddf20 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = inout optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F [active_gases_array] standard_name = list_of_active_gases_used_by_RRTMGP long_name = list of active gases used by RRTMGP diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 4e9f8a33f..3b09298c4 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -93,7 +93,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein ! dnfxc - total sky dnward flux (W/m2) ! upfx0 - clear sky upward flux (W/m2) ! dnfx0 - clear sky dnward flux (W/m2) - type(cmpfsw_type), dimension(nCol), intent(inout), optional :: & + type(cmpfsw_type), dimension(nCol), intent(inout) :: & scmpsw ! 2D surface fluxes, components: ! uvbfc - total sky downward uv-b flux at (W/m2) ! uvbf0 - clear sky downward uv-b flux at (W/m2) @@ -105,7 +105,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein integer :: i, j, k, iSFC, iTOA, itop, ibtc real(kind_phys) :: tem0d, tem1, tem2 real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky - logical :: l_fluxessw2d, top_at_1, l_sfcFluxessw1D + logical :: l_fluxessw2d, top_at_1 ! Initialize CCPP error handling variables errmsg = '' @@ -116,7 +116,6 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein ! Are any optional outputs requested? l_fluxessw2d = present(flxprf_sw) - l_sfcfluxessw1D = present(scmpsw) ! ####################################################################################### ! What is vertical ordering? diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index a817d9332..806bd49e4 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -56,7 +56,7 @@ dimensions = (horizontal_dimension) type = cmpfsw_type intent = inout - optional = T + optional = F [ncol] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index bf2825104..df0116cd0 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -260,7 +260,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr enddo if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then - call gwdps_run(im, im, levs, Pdvdt, Pdudt, Pdtdt, & + call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & ugrs, vgrs, tgrs, qgrs, & kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & hprime, oc, oa4, clx, theta, sigma, gamma, & diff --git a/physics/cnvc90.f b/physics/cnvc90.f index 87d034b77..9bef0ebf9 100644 --- a/physics/cnvc90.f +++ b/physics/cnvc90.f @@ -21,7 +21,7 @@ end subroutine cnvc90_init !! \htmlinclude cnvc90_run.html !! ! \section gen_cnvc_run GFS cnvc90_run General Algorithm - SUBROUTINE cnvc90_run(CLSTP,IM,IX,RN,KBOT,KTOP,KM,PRSI, & + SUBROUTINE cnvc90_run(CLSTP,IM,RN,KBOT,KTOP,KM,PRSI, & & ACV,ACVB,ACVT,CV,CVB,CVT,errmsg,errflg) USE MACHINE, ONLY :kind_phys @@ -29,11 +29,11 @@ SUBROUTINE cnvc90_run(CLSTP,IM,IX,RN,KBOT,KTOP,KM,PRSI, & ! Interface variables real(kind=kind_phys), intent(in) :: clstp - integer, intent(in) :: im, ix, km + integer, intent(in) :: im, km real(kind=kind_phys), intent(in) :: RN(IM) integer, intent(in) :: KBOT(IM) integer, intent(in) :: KTOP(IM) - real(kind=kind_phys), intent(in) :: prsi(ix,km+1) + real(kind=kind_phys), intent(in) :: prsi(IM,km+1) real(kind=kind_phys), intent(inout) :: ACV(IM) real(kind=kind_phys), intent(inout) :: ACVB(IM) real(kind=kind_phys), intent(inout) :: ACVT(IM) diff --git a/physics/cnvc90.meta b/physics/cnvc90.meta index 57290c9c5..0cf7c22a4 100644 --- a/physics/cnvc90.meta +++ b/physics/cnvc90.meta @@ -23,14 +23,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [rn] standard_name = lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep long_name = convective rainfall amount on dynamics timestep diff --git a/physics/cs_conv.F90 b/physics/cs_conv.F90 index 29044e4ec..386349422 100644 --- a/physics/cs_conv.F90 +++ b/physics/cs_conv.F90 @@ -289,7 +289,7 @@ end subroutine cs_conv_finalize !! !! \section general_cs_conv CS Convection Scheme General Algorithm !> @{ - subroutine cs_conv_run(IM , IJSDIM , KMAX , ntracp1 , NN, & + subroutine cs_conv_run( IJSDIM , KMAX , ntracp1 , NN, & NTR , nctp , & !DD dimensions otspt , lat , kdt , & t , q , rain1 , clw , & @@ -308,24 +308,24 @@ subroutine cs_conv_run(IM , IJSDIM , KMAX , ntracp1 , NN, & ! ! input arguments ! - INTEGER, INTENT(IN) :: IM,IJSDIM, KMAX, ntracp1, nn, NTR, mype, nctp, mp_phys, kdt, lat !! DD, for GFS, pass in + INTEGER, INTENT(IN) :: IJSDIM, KMAX, ntracp1, nn, NTR, mype, nctp, mp_phys, kdt, lat !! DD, for GFS, pass in logical, intent(in) :: otspt(1:ntracp1,1:2)! otspt(:,1) - on/off switch for tracer transport by updraft and ! downdraft. should not include subgrid PDF and turbulence ! otspt(:,2) - on/off switch for tracer transport by subsidence ! should include subgrid PDF and turbulence - real(r8), intent(inout) :: t(IM,KMAX) ! temperature at mid-layer (K) - real(r8), intent(inout) :: q(IM,KMAX) ! water vapor array including moisture (kg/kg) - real(r8), intent(inout) :: clw(IM,KMAX,nn) ! tracer array including cloud condensate (kg/kg) - real(r8), intent(in) :: pap(IM,KMAX) ! pressure at mid-layer (Pa) - real(r8), intent(in) :: paph(IM,KMAX+1) ! pressure at boundaries (Pa) - real(r8), intent(in) :: zm(IM,KMAX) ! geopotential at mid-layer (m) - real(r8), intent(in) :: zi(IM,KMAX+1) ! geopotential at boundaries (m) + real(r8), intent(inout) :: t(IJSDIM,KMAX) ! temperature at mid-layer (K) + real(r8), intent(inout) :: q(IJSDIM,KMAX) ! water vapor array including moisture (kg/kg) + real(r8), intent(inout) :: clw(IJSDIM,KMAX,nn) ! tracer array including cloud condensate (kg/kg) + real(r8), intent(in) :: pap(IJSDIM,KMAX) ! pressure at mid-layer (Pa) + real(r8), intent(in) :: paph(IJSDIM,KMAX+1) ! pressure at boundaries (Pa) + real(r8), intent(in) :: zm(IJSDIM,KMAX) ! geopotential at mid-layer (m) + real(r8), intent(in) :: zi(IJSDIM,KMAX+1) ! geopotential at boundaries (m) real(r8), intent(in) :: fscav(ntr), fswtr(ntr), wcbmaxm(ijsdim) real(r8), intent(in) :: precz0in, preczhin, clmdin ! added for cs_convr - real(r8), intent(inout) :: u(IM,KMAX) ! zonal wind at mid-layer (m/s) - real(r8), intent(inout) :: v(IM,KMAX) ! meridional wind at mid-layer (m/s) + real(r8), intent(inout) :: u(IJSDIM,KMAX) ! zonal wind at mid-layer (m/s) + real(r8), intent(inout) :: v(IJSDIM,KMAX) ! meridional wind at mid-layer (m/s) real(r8), intent(in) :: DELTA ! physics time step real(r8), intent(in) :: DELTI ! dynamics time step (model time increment in seconds) @@ -333,7 +333,7 @@ subroutine cs_conv_run(IM , IJSDIM , KMAX , ntracp1 , NN, & ! ! modified arguments ! - real(r8), intent(inout) :: CBMFX(IM,nctp) ! cloud base mass flux (kg/m2/s) + real(r8), intent(inout) :: CBMFX(IJSDIM,nctp) ! cloud base mass flux (kg/m2/s) ! ! output arguments ! @@ -348,21 +348,21 @@ subroutine cs_conv_run(IM , IJSDIM , KMAX , ntracp1 , NN, & cnv_dqldt, clcn, cnv_fice, & cnv_ndrop, cnv_nice, cf_upi ! *GJF - integer, intent(inout) :: kcnv(im) ! zero if no deep convection and 1 otherwise + integer, intent(inout) :: kcnv(ijsdim) ! zero if no deep convection and 1 otherwise character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !DDsigma - output added for AW sigma diagnostics ! interface sigma and vertical velocity by cloud type (1=sfc) -! real(r8), intent(out), dimension(IM,KMAX,nctp) :: sigmai, vverti - real(r8), intent(out), dimension(IM,KMAX) :: sigma ! sigma sigma totaled over cloud type - on interfaces (1=sfc) +! real(r8), intent(out), dimension(IJSDIM,KMAX,nctp) :: sigmai, vverti + real(r8), intent(out), dimension(IJSDIM,KMAX) :: sigma ! sigma sigma totaled over cloud type - on interfaces (1=sfc) ! sigma terms in eq 91 and 92 -! real(r8), dimension(IM,KMAX) :: sfluxterm, qvfluxterm, condterm +! real(r8), dimension(IJSDIM,KMAX) :: sfluxterm, qvfluxterm, condterm !DDsigma ! ! output arguments of CS_CUMLUS ! - real(r8), dimension(IM,KMAX,nctp) :: vverti + real(r8), dimension(IJSDIM,KMAX,nctp) :: vverti real(r8) GTT(IJSDIM,KMAX) !< temperature tendency [K/s] real(r8) GTQ(IJSDIM,KMAX,NTR) !< tracer tendency [kg/kg/s] @@ -528,7 +528,7 @@ subroutine cs_conv_run(IM , IJSDIM , KMAX , ntracp1 , NN, & enddo ! !> -# Call cs_cumlus() for the main CS cumulus parameterization - call CS_CUMLUS (im , IJSDIM, KMAX , NTR , & !DD dimensions + call CS_CUMLUS (IJSDIM, IJSDIM, KMAX , NTR , & !DD dimensions otspt(1:ntr,1), otspt(1:ntr,2), & lprnt , ipr , & GTT , GTQ , GTU , GTV , & ! output diff --git a/physics/cs_conv.meta b/physics/cs_conv.meta index d499885c7..b19a42a5b 100644 --- a/physics/cs_conv.meta +++ b/physics/cs_conv.meta @@ -266,14 +266,6 @@ [ccpp-arg-table] name = cs_conv_run type = scheme -[im] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [ijsdim] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 927b452cd..5c43709d1 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -68,7 +68,7 @@ end subroutine cu_gf_driver_finalize !! !>\section gen_gf_driver GSD GF Cumulus Scheme General Algorithm !> @{ - subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & + subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv, & forcet,forceqv_spechum,phil,raincv,qv_spechum,t,cld1d, & us,vs,t2di,w,qv2di_spechum,p2di,psuri, & hbot,htop,kcnv,xland,hfx2,qfx2,cliw,clcw, & @@ -97,39 +97,37 @@ subroutine cu_gf_driver_run(ntracer,garea,im,ix,km,dt,cactiv, & integer :: ishallow_g3 ! depend on imfshalcnv !------------------------------------------------------------- integer :: its,ite, jts,jte, kts,kte - integer, intent(in ) :: im,ix,km,ntracer + integer, intent(in ) :: im,km,ntracer logical, intent(in ) :: flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend logical, intent(in ) :: ldiag3d,qdiag3d - real(kind=kind_phys), dimension( ix , km ), intent(in ) :: forcet,forceqv_spechum,w,phil - real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: t,us,vs - real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: qci_conv - real(kind=kind_phys), dimension( ix ) :: rand_mom,rand_vmas - real(kind=kind_phys), dimension( ix,4 ) :: rand_clos - real(kind=kind_phys), dimension( ix , km, 11 ) :: gdc,gdc2 - real(kind=kind_phys), dimension( ix , km ), intent(out ) :: cnvw_moist,cnvc - real(kind=kind_phys), dimension( ix , km ), intent(inout ) :: cliw, clcw + real(kind=kind_phys), dimension( im , km ), intent(in ) :: forcet,forceqv_spechum,w,phil + real(kind=kind_phys), dimension( im , km ), intent(inout ) :: t,us,vs + real(kind=kind_phys), dimension( im , km ), intent(inout ) :: qci_conv + real(kind=kind_phys), dimension( im ) :: rand_mom,rand_vmas + real(kind=kind_phys), dimension( im,4 ) :: rand_clos + real(kind=kind_phys), dimension( im , km, 11 ) :: gdc,gdc2 + real(kind=kind_phys), dimension( im , km ), intent(out ) :: cnvw_moist,cnvc + real(kind=kind_phys), dimension( im , km ), intent(inout ) :: cliw, clcw real(kind=kind_phys), dimension( : , : ), intent(inout ) :: & du3dt_SCNV,dv3dt_SCNV,dt3dt_SCNV,dq3dt_SCNV, & du3dt_DCNV,dv3dt_DCNV,dt3dt_DCNV,dq3dt_DCNV -! change from ix to im integer, dimension (im), intent(inout) :: hbot,htop,kcnv integer, dimension (im), intent(in) :: xland real(kind=kind_phys), dimension (im), intent(in) :: pbl - integer, dimension (ix) :: tropics + integer, dimension (im) :: tropics ! ruc variable real(kind=kind_phys), dimension (im) :: hfx2,qfx2,psuri real(kind=kind_phys), dimension (im,km) :: ud_mf,dd_mf,dt_mf real(kind=kind_phys), dimension (im), intent(inout) :: raincv,cld1d -! end change ix to im - real(kind=kind_phys), dimension (ix,km) :: t2di,p2di + real(kind=kind_phys), dimension (im,km) :: t2di,p2di ! Specific humidity from FV3 - real(kind=kind_phys), dimension (ix,km), intent(in) :: qv2di_spechum - real(kind=kind_phys), dimension (ix,km), intent(inout) :: qv_spechum + real(kind=kind_phys), dimension (im,km), intent(in) :: qv2di_spechum + real(kind=kind_phys), dimension (im,km), intent(inout) :: qv_spechum ! Local water vapor mixing ratios and cloud water mixing ratios - real(kind=kind_phys), dimension (ix,km) :: qv2di, qv, forceqv, cnvw + real(kind=kind_phys), dimension (im,km) :: qv2di, qv, forceqv, cnvw ! real(kind=kind_phys), dimension( im ),intent(in) :: garea real(kind=kind_phys), intent(in ) :: dt diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index d89450273..e92949080 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -69,14 +69,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/cu_ntiedtke.F90 b/physics/cu_ntiedtke.F90 index 156e75c70..a824c6af4 100644 --- a/physics/cu_ntiedtke.F90 +++ b/physics/cu_ntiedtke.F90 @@ -148,8 +148,8 @@ end subroutine cu_ntiedtke_finalize !----------------------------------------------------------------------- ! level 1 subroutine 'tiecnvn' !----------------------------------------------------------------- - subroutine cu_ntiedtke_run(pu,pv,pt,pqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,prsi,pomg, & - evap,hfx,zprecc,lmask,lq,ix,km,dt,dx,kbot,ktop,kcnv,& + subroutine cu_ntiedtke_run(pu,pv,pt,pqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,prsi,pomg, & + evap,hfx,zprecc,lmask,lq,km,dt,dx,kbot,ktop,kcnv, & ktrac,ud_mf,dd_mf,dt_mf,cnvw,cnvc,errmsg,errflg) !----------------------------------------------------------------- ! this is the interface between the model and the mass @@ -157,14 +157,14 @@ subroutine cu_ntiedtke_run(pu,pv,pt,pqv,tdi,qvdi,pqvf,ptf,clw,poz,pzz,prsl,prsi, !----------------------------------------------------------------- implicit none ! in&out variables - integer, intent(in) :: lq, ix, km, ktrac + integer, intent(in) :: lq, km, ktrac real(kind=kind_phys), intent(in ) :: dt integer, dimension( lq ), intent(in) :: lmask real(kind=kind_phys), dimension( lq ), intent(in ) :: evap, hfx, dx - real(kind=kind_phys), dimension( ix , km ), intent(inout) :: pu, pv, pt, pqv - real(kind=kind_phys), dimension( ix , km ), intent(in ) :: tdi, qvdi, poz, prsl, pomg, pqvf, ptf - real(kind=kind_phys), dimension( ix , km+1 ), intent(in ) :: pzz, prsi - real(kind=kind_phys), dimension( ix , km, ktrac ), intent(inout ) :: clw + real(kind=kind_phys), dimension( lq , km ), intent(inout) :: pu, pv, pt, pqv + real(kind=kind_phys), dimension( lq , km ), intent(in ) :: tdi, qvdi, poz, prsl, pomg, pqvf, ptf + real(kind=kind_phys), dimension( lq , km+1 ), intent(in ) :: pzz, prsi + real(kind=kind_phys), dimension( lq , km, ktrac ), intent(inout ) :: clw integer, dimension( lq ), intent(out) :: kbot, ktop, kcnv real(kind=kind_phys), dimension( lq ), intent(out) :: zprecc diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 6dcc54a15..0e6a3d4b0 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -213,14 +213,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/dcyc2.f b/physics/dcyc2.f index c7a1ddd59..dcb164369 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -52,7 +52,7 @@ end subroutine dcyc2t3_finalize ! sfcdsw,sfcnsw,sfcdlw,swh,swhc,hlw,hlwc, ! ! sfcnirbmu,sfcnirdfu,sfcvisbmu,sfcvisdfu, ! ! sfcnirbmd,sfcnirdfd,sfcvisbmd,sfcvisdfd, ! -! ix, im, levs, deltim, fhswr, ! +! im, levs, deltim, fhswr, ! ! dry, icy, wet ! ! input/output: ! ! dtdt,dtdtc, ! @@ -83,10 +83,10 @@ end subroutine dcyc2t3_finalize ! sfcdsw (im) - real, total sky sfc downward sw flux ( w/m**2 ) ! ! sfcnsw (im) - real, total sky sfc net sw into ground (w/m**2) ! ! sfcdlw (im) - real, total sky sfc downward lw flux ( w/m**2 ) ! -! swh(ix,levs) - real, total sky sw heating rates ( k/s ) ! -! swhc(ix,levs) - real, clear sky sw heating rates ( k/s ) ! -! hlw(ix,levs) - real, total sky lw heating rates ( k/s ) ! -! hlwc(ix,levs) - real, clear sky lw heating rates ( k/s ) ! +! swh(im,levs) - real, total sky sw heating rates ( k/s ) ! +! swhc(im,levs) - real, clear sky sw heating rates ( k/s ) ! +! hlw(im,levs) - real, total sky lw heating rates ( k/s ) ! +! hlwc(im,levs) - real, clear sky lw heating rates ( k/s ) ! ! sfcnirbmu(im)- real, tot sky sfc nir-beam sw upward flux (w/m2) ! ! sfcnirdfu(im)- real, tot sky sfc nir-diff sw upward flux (w/m2) ! ! sfcvisbmu(im)- real, tot sky sfc uv+vis-beam sw upward flux (w/m2)! @@ -95,7 +95,7 @@ end subroutine dcyc2t3_finalize ! sfcnirdfd(im)- real, tot sky sfc nir-diff sw downward flux (w/m2) ! ! sfcvisbmd(im)- real, tot sky sfc uv+vis-beam sw dnward flux (w/m2)! ! sfcvisdfd(im)- real, tot sky sfc uv+vis-diff sw dnward flux (w/m2)! -! ix, im - integer, horiz. dimention and num of used points ! +! im - integer, horizontal dimension ! ! levs - integer, vertical layer dimension ! ! deltim - real, physics time step in seconds ! ! fhswr - real, Short wave radiation time step in seconds ! @@ -184,7 +184,7 @@ subroutine dcyc2t3_run & & sfcdsw,sfcnsw,sfcdlw,swh,swhc,hlw,hlwc, & & sfcnirbmu,sfcnirdfu,sfcvisbmu,sfcvisdfu, & & sfcnirbmd,sfcnirdfd,sfcvisbmd,sfcvisdfd, & - & ix, im, levs, deltim, fhswr, & + & im, levs, deltim, fhswr, & & dry, icy, wet, & ! & dry, icy, wet, lprnt, ipr, & ! --- input/output: @@ -212,7 +212,7 @@ subroutine dcyc2t3_run & & pid12 = con_pi / hour12 ! --- inputs: - integer, intent(in) :: ix, im, levs + integer, intent(in) :: im, levs ! integer, intent(in) :: ipr ! logical lprnt @@ -232,7 +232,7 @@ subroutine dcyc2t3_run & & sfcnirbmu, sfcnirdfu, sfcvisbmu, sfcvisdfu, & & sfcnirbmd, sfcnirdfd, sfcvisbmd, sfcvisdfd - real(kind=kind_phys), dimension(ix,levs), intent(in) :: swh, hlw & + real(kind=kind_phys), dimension(im,levs), intent(in) :: swh, hlw & &, swhc, hlwc ! --- input/output: diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 9a5687bf5..fa1ef4800 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -290,14 +290,6 @@ kind = kind_phys intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 0189785e3..6527adb34 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -194,7 +194,7 @@ end subroutine drag_suite_init ! & nmtvr, cdmbgwd, me, lprnt, ipr, rdxzb, errmsg, errflg) ! subroutine drag_suite_run( & - & IM,IX,KM,dvdt,dudt,dtdt,U1,V1,T1,Q1,KPBL, & + & IM,KM,dvdt,dudt,dtdt,U1,V1,T1,Q1,KPBL, & & PRSI,DEL,PRSL,PRSLK,PHII,PHIL,DELTIM,KDT, & & VAR,oc1,oa4,ol4, & ! & varss,oc1ss,oa4ss,ol4ss, & @@ -295,7 +295,7 @@ subroutine drag_suite_run( & implicit none ! Interface variables - integer, intent(in) :: im, ix, km, imx, kdt, ipr, me, master + integer, intent(in) :: im, km, imx, kdt, ipr, me, master integer, intent(in) :: gwd_opt logical, intent(in) :: lprnt integer, intent(in) :: KPBL(im) diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index dfb6f64b8..22747da0a 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -14,14 +14,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = number of vertical layers diff --git a/physics/gcm_shoc.F90 b/physics/gcm_shoc.F90 index b32843bc1..f9f2d4c0a 100644 --- a/physics/gcm_shoc.F90 +++ b/physics/gcm_shoc.F90 @@ -19,12 +19,10 @@ end subroutine shoc_init subroutine shoc_finalize () end subroutine shoc_finalize -#if 0 !> \section arg_table_shoc_run Argument Table !! \htmlinclude shoc_run.html !! -#endif -subroutine shoc_run (ix, nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_rv, con_rd, & +subroutine shoc_run (nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_rv, con_rd, & con_pi, con_fvirt, dtp, prsl, delp, phii, phil, u, v, omega, rhc, & supice, pcrit, cefac, cesfac, tkef1, dis_opt, hflx, evap, prnum, & gt0, gq0, ntrac, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, ntlnc, ntinc, & @@ -32,7 +30,7 @@ subroutine shoc_run (ix, nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, implicit none - integer, intent(in) :: ix, nx, nzm, ntrac, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, ntlnc, ntinc + integer, intent(in) :: nx, nzm, ntrac, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, ntlnc, ntinc real(kind=kind_phys), intent(in) :: tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_rv, con_rd, con_pi, con_fvirt, & dtp, supice, pcrit, cefac, cesfac, tkef1, dis_opt ! @@ -114,7 +112,7 @@ subroutine shoc_run (ix, nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, ! phy_f3d(1,1,ntot3d-1) - shoc determined diffusion coefficients ! phy_f3d(1,1,ntot3d ) - shoc determined w'theta' - call shoc_work (ix, nx, nzm, nzm+1, dtp, prsl, delp, & + call shoc_work (nx, nx, nzm, nzm+1, dtp, prsl, delp, & phii, phil, u, v, omega, gt0, gq0(:,:,1), qi, qc, qsnw, qrn, & rhc, supice, pcrit, cefac, cesfac, tkef1, dis_opt, & cld_sgs, tke, hflx, evap, prnum, tkh, wthv_sec, & diff --git a/physics/gcm_shoc.meta b/physics/gcm_shoc.meta index f4d2f3ae9..5bd59c589 100644 --- a/physics/gcm_shoc.meta +++ b/physics/gcm_shoc.meta @@ -1,14 +1,6 @@ [ccpp-arg-table] name = shoc_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [nx] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/gscond.f b/physics/gscond.f index 6dd77d87e..28f24763c 100644 --- a/physics/gscond.f +++ b/physics/gscond.f @@ -41,7 +41,7 @@ end subroutine zhaocarr_gscond_finalize !! -# Update \f$t\f$, \f$q\f$, \f$cwm\f$ due to cloud evaporation and condensation processes. !> \section Zhao-Carr_cond_detailed GFS gscond Scheme Detailed Algorithm !> @{ - subroutine zhaocarr_gscond_run (im,ix,km,dt,dtf,prsl,ps,q,clw1 & + subroutine zhaocarr_gscond_run (im,km,dt,dtf,prsl,ps,q,clw1 & &, clw2, cwm, t, tp, qp, psp & &, tp1, qp1, psp1, u, lprnt, ipr, errmsg, errflg) @@ -71,15 +71,15 @@ subroutine zhaocarr_gscond_run (im,ix,km,dt,dtf,prsl,ps,q,clw1 & implicit none ! ! Interface variables - integer, intent(in) :: im, ix, km, ipr + integer, intent(in) :: im, km, ipr real(kind=kind_phys), intent(in) :: dt, dtf - real(kind=kind_phys), intent(in) :: prsl(ix,km), ps(im) - real(kind=kind_phys), intent(inout) :: q(ix,km) - real(kind=kind_phys), intent(in) :: clw1(ix,km), clw2(ix,km) - real(kind=kind_phys), intent(out) :: cwm(ix,km) - real(kind=kind_phys), intent(inout) :: t(ix,km) & - &, tp(ix,km), qp(ix,km), psp(im) & - &, tp1(ix,km), qp1(ix,km), psp1(im) + real(kind=kind_phys), intent(in) :: prsl(im,km), ps(im) + real(kind=kind_phys), intent(inout) :: q(im,km) + real(kind=kind_phys), intent(in) :: clw1(im,km), clw2(im,km) + real(kind=kind_phys), intent(out) :: cwm(im,km) + real(kind=kind_phys), intent(inout) :: t(im,km) & + &, tp(im,km), qp(im,km), psp(im) & + &, tp1(im,km), qp1(im,km), psp1(im) real(kind=kind_phys), intent(in) :: u(im,km) logical, intent(in) :: lprnt ! @@ -124,7 +124,7 @@ subroutine zhaocarr_gscond_run (im,ix,km,dt,dtf,prsl,ps,q,clw1 & ! el2orc = hvap*hvap / (rv*cp) albycp = hvap / cp -! write(0,*)' in gscond im=',im,' ix=',ix +! write(0,*)' in gscond im=',im ! rdt = h1/dt us = h1 diff --git a/physics/gscond.meta b/physics/gscond.meta index f2046df0a..9302dc8ca 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -19,14 +19,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/gwdc.f b/physics/gwdc.f index 314aa4d44..5c6f8ecd7 100644 --- a/physics/gwdc.f +++ b/physics/gwdc.f @@ -141,7 +141,7 @@ end subroutine gwdc_init !! !> \section al_gwdc GFS Convective GWD Scheme Detailed Algorithm !> @{ - subroutine gwdc_run (im,ix,km,lat,u1,v1,t1,q1,deltim, & + subroutine gwdc_run (im,km,lat,u1,v1,t1,q1,deltim, & & pmid1,pint1,dpmid1,qmax,ktop,kbot,kcnv,cldf, & & grav,cp,rd,fv,pi,dlength,lprnt,ipr,fhour, & & utgwc,vtgwc,tauctx,taucty,errmsg,errflg) @@ -186,16 +186,16 @@ subroutine gwdc_run (im,ix,km,lat,u1,v1,t1,q1,deltim, & ! !----------------------------------------------------------------------- - integer, intent(in) :: im, ix, km, lat, ipr + integer, intent(in) :: im, km, lat, ipr integer, intent(in) :: ktop(im),kbot(im),kcnv(im) real(kind=kind_phys), intent(in) :: grav,cp,rd,fv,fhour,deltim,pi real(kind=kind_phys), dimension(im), intent(in) :: qmax real(kind=kind_phys), dimension(im), intent(out) :: tauctx,taucty real(kind=kind_phys), dimension(im), intent(in) :: cldf,dlength - real(kind=kind_phys), dimension(ix,km), intent(in) :: u1,v1,t1, & + real(kind=kind_phys), dimension(im,km), intent(in) :: u1,v1,t1, & & q1,pmid1,dpmid1 - real(kind=kind_phys), dimension(ix,km), intent(out) :: utgwc,vtgwc - real(kind=kind_phys), dimension(ix,km+1), intent(in) :: pint1 + real(kind=kind_phys), dimension(im,km), intent(out) :: utgwc,vtgwc + real(kind=kind_phys), dimension(im,km+1), intent(in) :: pint1 ! logical, intent(in) :: lprnt ! @@ -375,7 +375,7 @@ subroutine gwdc_run (im,ix,km,lat,u1,v1,t1,q1,deltim, & ! print *,' ' ! write(*,*) 'Inside GWDC raw input start print at fhour = ', ! & fhour -! write(*,*) 'IX IM KM ',ix,im,km +! write(*,*) 'IM KM ',im,km ! write(*,*) 'KBOT KTOP QMAX DLENGTH kcnv ', ! + kbot(ipr),ktop(ipr),qmax(ipr),dlength(ipr),kcnv(ipr) ! write(*,*) 'grav cp rd ',grav,cp,rd diff --git a/physics/gwdc.meta b/physics/gwdc.meta index 2151cc5f7..fc57604fb 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -185,14 +185,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = number of vertical layers diff --git a/physics/gwdps.f b/physics/gwdps.f index 96ce0205b..b09413f02 100644 --- a/physics/gwdps.f +++ b/physics/gwdps.f @@ -196,7 +196,7 @@ end subroutine gwdps_init !> \section det_gwdps GFS Orographic GWD Scheme Detailed Algorithm !> @{ subroutine gwdps_run( & - & IM,IX,KM,A,B,C,U1,V1,T1,Q1,KPBL, & + & IM,KM,A,B,C,U1,V1,T1,Q1,KPBL, & & PRSI,DEL,PRSL,PRSLK,PHII, PHIL,DELTIM,KDT, & & HPRIME,OC,OA4,CLX4,THETA,SIGMA,GAMMA,ELVMAX, & & DUSFC,DVSFC,G, CP, RD, RV, IMX, & @@ -269,13 +269,13 @@ subroutine gwdps_run( & ! CRITICAL LEVELS ! ! INPUT -! A(IX,KM) NON-LIN TENDENCY FOR V WIND COMPONENT -! B(IX,KM) NON-LIN TENDENCY FOR U WIND COMPONENT -! C(IX,KM) NON-LIN TENDENCY FOR TEMPERATURE -! U1(IX,KM) ZONAL WIND M/SEC AT T0-DT -! V1(IX,KM) MERIDIONAL WIND M/SEC AT T0-DT -! T1(IX,KM) TEMPERATURE DEG K AT T0-DT -! Q1(IX,KM) SPECIFIC HUMIDITY AT T0-DT +! A(IM,KM) NON-LIN TENDENCY FOR V WIND COMPONENT +! B(IM,KM) NON-LIN TENDENCY FOR U WIND COMPONENT +! C(IM,KM) NON-LIN TENDENCY FOR TEMPERATURE +! U1(IM,KM) ZONAL WIND M/SEC AT T0-DT +! V1(IM,KM) MERIDIONAL WIND M/SEC AT T0-DT +! T1(IM,KM) TEMPERATURE DEG K AT T0-DT +! Q1(IM,KM) SPECIFIC HUMIDITY AT T0-DT ! ! DELTIM TIME STEP SECS ! SI(N) P/PSFC AT BASE OF LAYER N @@ -297,24 +297,24 @@ subroutine gwdps_run( & implicit none ! ! Interface variables - integer, intent(in) :: im, ix, km, imx, kdt, ipr, me + integer, intent(in) :: im, km, imx, kdt, ipr, me integer, intent(in) :: KPBL(IM) ! Index for the PBL top layer! real(kind=kind_phys), intent(in) :: & & deltim, G, CP, RD, RV, cdmbgwd(4) real(kind=kind_phys), intent(inout) :: & - & A(IX,KM), B(IX,KM), C(IX,KM) + & A(IM,KM), B(IM,KM), C(IM,KM) real(kind=kind_phys), intent(in) :: & - & U1(IX,KM), V1(IX,KM), T1(IX,KM), & - & Q1(IX,KM), PRSI(IX,KM+1), DEL(IX,KM), & - & PRSL(IX,KM), PRSLK(IX,KM), PHIL(IX,KM), & - & PHII(IX,KM+1) + & U1(IM,KM), V1(IM,KM), T1(IM,KM), & + & Q1(IM,KM), PRSI(IM,KM+1), DEL(IM,KM), & + & PRSL(IM,KM), PRSLK(IM,KM), PHIL(IM,KM), & + & PHII(IM,KM+1) real(kind=kind_phys), intent(in) :: & - & OC(IM), OA4(IX,4), CLX4(IX,4), HPRIME(IM) + & OC(IM), OA4(IM,4), CLX4(IM,4), HPRIME(IM) real(kind=kind_phys), intent(inout) :: ELVMAX(IM) real(kind=kind_phys), intent(in) :: & & THETA(IM), SIGMA(IM), GAMMA(IM) real(kind=kind_phys), intent(out) :: DUSFC(IM), DVSFC(IM), & - & RDXZB(IX) + & RDXZB(IM) integer, intent(in) :: nmtvr logical, intent(in) :: lprnt character(len=*), intent(out) :: errmsg @@ -471,7 +471,7 @@ subroutine gwdps_run( & ! kreflm(i) = 0 enddo ! if (lprnt) -! & print *,' in gwdps_lm.f npt,IM,IX,IY,km,me=',npt,IM,IX,IY,km,me +! & print *,' in gwdps_lm.f npt,IM,IY,km,me=',npt,IM,IY,km,me ! ! !> --- Subgrid Mountain Blocking Section diff --git a/physics/gwdps.meta b/physics/gwdps.meta index 677dc6502..d843e6d53 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -14,14 +14,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = number of vertical layers diff --git a/physics/h2ophys.f b/physics/h2ophys.f index 929b38aa7..b3bdd279f 100644 --- a/physics/h2ophys.f +++ b/physics/h2ophys.f @@ -26,7 +26,7 @@ end subroutine h2ophys_init !! !! \section genal_h2ophys GFS H2O Physics Scheme General Algorithm !> @{ - subroutine h2ophys_run(ix, im, levs, kh2o, dt, h2o, ph2o, prsl, & + subroutine h2ophys_run(im, levs, kh2o, dt, h2o, ph2o, prsl, & & h2opltc, h2o_coeff, ldiag3d, me, & & errmsg, errflg) ! @@ -39,14 +39,14 @@ subroutine h2ophys_run(ix, im, levs, kh2o, dt, h2o, ph2o, prsl, & use machine , only : kind_phys implicit none ! interface variables - integer, intent(in) :: ix, im, levs, kh2o, h2o_coeff, me + integer, intent(in) :: im, levs, kh2o, h2o_coeff, me real(kind=kind_phys), intent(in) :: dt - real(kind=kind_phys), intent(inout) :: h2o(ix,levs) + real(kind=kind_phys), intent(inout) :: h2o(im,levs) real(kind=kind_phys), intent(in) :: ph2o(kh2o) - real(kind=kind_phys), intent(in) :: prsl(ix,levs) - real(kind=kind_phys), intent(in) :: h2opltc(ix,kh2o,h2o_coeff) + real(kind=kind_phys), intent(in) :: prsl(im,levs) + real(kind=kind_phys), intent(in) :: h2opltc(im,kh2o,h2o_coeff) logical , intent(in) :: ldiag3d - !real(kind=kind_phys), intent(inout) :: h2op(ix,levs,h2o_coeff) + !real(kind=kind_phys), intent(inout) :: h2op(im,levs,h2o_coeff) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! local variables @@ -61,7 +61,7 @@ subroutine h2ophys_run(ix, im, levs, kh2o, dt, h2o, ph2o, prsl, & errmsg = '' errflg = 0 ! -! write(1000+me,*)' in h2ophys ix=',ix, im, levs, kh2o, dt +! write(1000+me,*)' in h2ophys im=', im, levs, kh2o, dt do l=1,levs pmin = 1.0e10 pmax = -1.0e10 diff --git a/physics/h2ophys.meta b/physics/h2ophys.meta index 9aed54eb2..995e25436 100644 --- a/physics/h2ophys.meta +++ b/physics/h2ophys.meta @@ -6,14 +6,6 @@ [ccpp-arg-table] name = h2ophys_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index 8b2b4c99f..f3420e094 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -111,7 +111,7 @@ end subroutine m_micro_finalize !! !>\section detail_m_micro_run MG m_micro_run Detailed Algorithm !> @{ - subroutine m_micro_run( im, ix, lm, flipv, dt_i & + subroutine m_micro_run( im, lm, flipv, dt_i & &, prsl_i, prsi_i, phil, phii & &, omega_i, QLLS_i, QLCN_i, QILS_i, QICN_i& &, lwheat_i, swheat_i, w_upi, cf_upi & @@ -174,15 +174,15 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & & fourb3=4.0/3.0, RL_cub=1.0e-15, nmin=1.0 integer, parameter :: ncolmicro = 1 - integer,intent(in) :: im, ix,lm, kdt, fprcp, pdfflag + integer,intent(in) :: im, lm, kdt, fprcp, pdfflag logical,intent(in) :: flipv, skip_macro integer,intent(in) :: iccn real (kind=kind_phys), intent(in):: dt_i, alf_fac, qc_min(2) - real (kind=kind_phys), dimension(ix,lm),intent(in) :: & + real (kind=kind_phys), dimension(im,lm),intent(in) :: & & prsl_i,u_i,v_i,phil, omega_i, QLLS_i,QILS_i, & & lwheat_i,swheat_i - real (kind=kind_phys), dimension(ix,0:lm),intent(in):: prsi_i, & + real (kind=kind_phys), dimension(im,0:lm),intent(in):: prsi_i, & & phii ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared @@ -202,7 +202,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! & CNVPRCP ! output - real (kind=kind_phys),dimension(ix,lm), intent(out) :: lwm_o, qi_o, & + real (kind=kind_phys),dimension(im,lm), intent(out) :: lwm_o, qi_o, & cldreffl, cldreffi, cldreffr, cldreffs, cldreffg real (kind=kind_phys),dimension(im), intent(out) :: rn_o, sr_o character(len=*), intent(out) :: errmsg @@ -211,7 +211,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & ! input and output ! Anning Cheng 10/24/2016 twat for total water, diagnostic purpose integer, dimension(IM), intent(inout):: KCBL - real (kind=kind_phys),dimension(ix,lm),intent(inout):: q_io, t_io, & + real (kind=kind_phys),dimension(im,lm),intent(inout):: q_io, t_io, & & ncpl_io,ncpi_io,CLLS_io ! GJF* These variables are conditionally allocated depending on whether the ! Morrison-Gettelman microphysics is used, so they must be declared diff --git a/physics/m_micro.meta b/physics/m_micro.meta index 8ea90f7b9..b0b0c3522 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -309,14 +309,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [lm] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/module_MYJPBL_wrapper.F90 b/physics/module_MYJPBL_wrapper.F90 index e28cf5e69..d239013b4 100644 --- a/physics/module_MYJPBL_wrapper.F90 +++ b/physics/module_MYJPBL_wrapper.F90 @@ -21,8 +21,8 @@ end subroutine myjpbl_wrapper_finalize !! !###=================================================================== SUBROUTINE myjpbl_wrapper_run( & - & restart,do_myjsfc, & - & ix,im,levs,dt_phs, & + & restart,do_myjsfc, & + & im,levs,dt_phs, & & kdt,ntrac,ntke, & & ntcw,ntiw,ntrw,ntsw,ntgl, & & ugrs, vgrs, tgrs, qgrs, & @@ -76,7 +76,7 @@ SUBROUTINE myjpbl_wrapper_run( & integer, intent(out) :: errflg !MYJ-1D - integer,intent(in) :: im, ix, levs + integer,intent(in) :: im, levs integer,intent(in) :: kdt, me integer,intent(in) :: ntrac,ntke,ntcw,ntiw,ntrw,ntsw,ntgl logical,intent(in) :: restart,do_myjsfc,lprnt diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index dd2560e06..c8a4a0b9e 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -17,14 +17,6 @@ type = logical intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/module_MYJSFC_wrapper.F90 b/physics/module_MYJSFC_wrapper.F90 index 1406a99be..8d4ccc858 100644 --- a/physics/module_MYJSFC_wrapper.F90 +++ b/physics/module_MYJSFC_wrapper.F90 @@ -22,7 +22,7 @@ end subroutine myjsfc_wrapper_finalize !###=================================================================== SUBROUTINE myjsfc_wrapper_run( & & restart, & - & ix,im,levs, & + & im,levs, & & kdt,ntrac,ntke, & & ntcw,ntiw,ntrw,ntsw,ntgl, & & iter,flag_iter, & @@ -84,7 +84,7 @@ SUBROUTINE myjsfc_wrapper_run( & integer, intent(out) :: errflg !MYJ-1D - integer,intent(in) :: im, ix, levs + integer,intent(in) :: im, levs integer,intent(in) :: kdt, iter, me integer,intent(in) :: ntrac,ntke,ntcw,ntiw,ntrw,ntsw,ntgl logical,intent(in) :: restart, lprnt diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index 8100d0b05..bc7c7cec4 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -9,14 +9,6 @@ type = logical intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index e6c553350..0e9cb3c4f 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -37,7 +37,7 @@ end subroutine mynnedmf_wrapper_finalize !! \htmlinclude mynnedmf_wrapper_run.html !! SUBROUTINE mynnedmf_wrapper_run( & - & ix,im,levs, & + & im,levs, & & flag_init,flag_restart,cycling, & & lssav, ldiag3d, qdiag3d, lsidea,& & delt,dtf,dx,zorl, & @@ -204,7 +204,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !MYNN-1D REAL(kind=kind_phys), intent(in) :: delt, dtf - INTEGER, intent(in) :: im, ix, levs + INTEGER, intent(in) :: im, levs LOGICAL, intent(in) :: flag_init, flag_restart INTEGER :: initflag, k, i INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 393ad5292..31ebcde74 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -27,17 +27,10 @@ intent = out optional = F +##################################################################### [ccpp-arg-table] name = mynnedmf_wrapper_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index 82cdbca76..5693c49a8 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -19,14 +19,12 @@ end subroutine mynnsfc_wrapper_finalize !>\defgroup gsd_mynn_sfc GSD MYNN Surface Layer Scheme Module !> \brief This scheme (1) performs pre-mynnsfc work, (2) runs the mynn sfc layer scheme, and (3) performs post-mynnsfc work -#if 0 !! \section arg_table_mynnsfc_wrapper_run Argument Table !! \htmlinclude mynnsfc_wrapper_run.html !! -#endif !###=================================================================== SUBROUTINE mynnsfc_wrapper_run( & - & ix,im,levs, & + & im,levs, & & itimestep,iter, & & flag_init,flag_restart,lsm, & & delt,dx, & @@ -105,7 +103,7 @@ SUBROUTINE mynnsfc_wrapper_run( & !MYNN-1D REAL :: delt - INTEGER :: im, ix, levs + INTEGER :: im, levs INTEGER :: iter, k, i, itimestep, lsm LOGICAL :: flag_init,flag_restart,lprnt INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index a58253c08..61ddb4fd0 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -1,14 +1,6 @@ [ccpp-arg-table] name = mynnsfc_wrapper_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/module_SGSCloud_RadPost.F90 b/physics/module_SGSCloud_RadPost.F90 index 051033a26..bedb660a6 100644 --- a/physics/module_SGSCloud_RadPost.F90 +++ b/physics/module_SGSCloud_RadPost.F90 @@ -19,7 +19,7 @@ end subroutine sgscloud_radpost_finalize !! \htmlinclude sgscloud_radpost_run.html !! subroutine sgscloud_radpost_run( & - ix,im,levs, & + im,levs, & flag_init,flag_restart, & qc,qi, & qc_save,qi_save, & @@ -32,7 +32,7 @@ subroutine sgscloud_radpost_run( & implicit none !------------------------------------------------------------------- - integer, intent(in) :: ix, im, levs + integer, intent(in) :: im, levs logical, intent(in) :: flag_init, flag_restart real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi real(kind=kind_phys), dimension(im,levs), intent(in) :: qc_save, qi_save diff --git a/physics/module_SGSCloud_RadPost.meta b/physics/module_SGSCloud_RadPost.meta index b3a5bce2b..da4191aad 100644 --- a/physics/module_SGSCloud_RadPost.meta +++ b/physics/module_SGSCloud_RadPost.meta @@ -1,14 +1,6 @@ [ccpp-arg-table] name = sgscloud_radpost_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index e78941d81..16ebac5d7 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -32,7 +32,7 @@ end subroutine sgscloud_radpre_finalize !>\section sgscloud_radpre GSD SGS Scheme General Algorithm !> @{ subroutine sgscloud_radpre_run( & - ix,im,levs, & + im,levs, & flag_init,flag_restart, & do_mynnedmf, & qc, qi, T3D, & @@ -57,7 +57,7 @@ subroutine sgscloud_radpre_run( & !------------------------------------------------------------------- ! Interface variables real (kind=kind_phys), parameter :: gfac=1.0e5/con_g - integer, intent(in) :: ix, im, levs, imfdeepcnv, imfdeepcnv_gf, nlay + integer, intent(in) :: im, levs, imfdeepcnv, imfdeepcnv_gf, nlay logical, intent(in) :: flag_init, flag_restart, do_mynnedmf real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index f959e66ef..79691920d 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -11,14 +11,6 @@ [ccpp-arg-table] name = sgscloud_radpre_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 6cab9b7ed..63edc3486 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -57,7 +57,7 @@ end subroutine hedmf_finalize !! -# Solve for the horizontal momentum tendencies and add them to output tendency terms. !! \section detailed_hedmf GFS Hybrid HEDMF Detailed Algorithm !! @{ - subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & + subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & & u1,v1,t1,q1,swh,hlw,xmu, & & psk,rbsoil,zorl,u10m,v10m,fm,fh, & & tsea,heat,evap,stress,spd1,kpbl, & @@ -79,7 +79,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & logical, intent(in) :: lprnt,lssav,ldiag3d,qdiag3d,lsidea logical, intent(in) :: flag_for_pbl_generic_tend integer, intent(in) :: ipr - integer, intent(in) :: ix, im, km, ntrac, ntcw, kinver(im), ntoz + integer, intent(in) :: im, km, ntrac, ntcw, kinver(im), ntoz integer, intent(out) :: kpbl(im) ! @@ -91,9 +91,9 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & real(kind=kind_phys), intent(inout), dimension(:,:) :: & & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL real(kind=kind_phys), intent(in) :: & - & u1(ix,km), v1(ix,km), & - & t1(ix,km), q1(ix,km,ntrac), & - & swh(ix,km), hlw(ix,km), & + & u1(im,km), v1(im,km), & + & t1(im,km), q1(im,km,ntrac), & + & swh(im,km), hlw(im,km), & & xmu(im), psk(im), & & rbsoil(im), zorl(im), & & u10m(im), v10m(im), & @@ -102,9 +102,9 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & heat(im), evap(im), & & stress(im), spd1(im) real(kind=kind_phys), intent(in) :: & - & prsi(ix,km+1), del(ix,km), & - & prsl(ix,km), prslk(ix,km), & - & phii(ix,km+1), phil(ix,km) + & prsi(im,km+1), del(im,km), & + & prsl(im,km), prslk(im,km), & + & phii(im,km+1), phil(im,km) real(kind=kind_phys), intent(out) :: & & dusfc(im), dvsfc(im), & & dtsfc(im), dqsfc(im), & @@ -243,8 +243,6 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & !> ## Compute preliminary variables from input arguments ! compute preliminary variables -! - if (ix .lt. im) stop ! ! iprt = 0 ! if(iprt.eq.1) then @@ -860,7 +858,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo enddo !> For details of the mfpbl subroutine, step into its documentation ::mfpbl - call mfpbl(im,ix,km,ntrac,dt2,pcnvflg, + call mfpbl(im,im,km,ntrac,dt2,pcnvflg, & zl,zi,thvx,q1,t1,u1,v1,hpbl,kpbl, & sflux,ustar,wstar,xmf,tcko,qcko,ucko,vcko) ! diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 313e22e17..a89660cac 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -32,14 +32,6 @@ [ccpp-arg-table] name = hedmf_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/moninedmf_hafs.f b/physics/moninedmf_hafs.f index 5c6ff85a8..00a8dbd0b 100644 --- a/physics/moninedmf_hafs.f +++ b/physics/moninedmf_hafs.f @@ -57,7 +57,7 @@ end subroutine hedmf_hafs_finalize !! -# Solve for the horizontal momentum tendencies and add them to output tendency terms. !! \section detailed_hedmf GFS Hybrid HEDMF Detailed Algorithm !! @{ - subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & + subroutine hedmf_hafs_run(im,km,ntrac,ntcw,dv,du,tau,rtg, & & u1,v1,t1,q1,swh,hlw,xmu, & & psk,rbsoil,zorl,u10m,v10m,fm,fh, & & tsea,heat,evap,stress,spd1,kpbl, & @@ -76,7 +76,7 @@ subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & ! logical, intent(in) :: lprnt integer, intent(in) :: ipr - integer, intent(in) :: ix, im, km, ntrac, ntcw, kinver(im) + integer, intent(in) :: im, km, ntrac, ntcw, kinver(im) integer, intent(in) :: islimsk(1:im) integer, intent(out) :: kpbl(im) @@ -86,9 +86,9 @@ subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & & tau(im,km), rtg(im,km,ntrac) real(kind=kind_phys), intent(in) :: & - & u1(ix,km), v1(ix,km), & - & t1(ix,km), q1(ix,km,ntrac), & - & swh(ix,km), hlw(ix,km), & + & u1(im,km), v1(im,km), & + & t1(im,km), q1(im,km,ntrac), & + & swh(im,km), hlw(im,km), & & xmu(im), psk(im), & & rbsoil(im), zorl(im), & & u10m(im), v10m(im), & @@ -97,9 +97,9 @@ subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & & heat(im), evap(im), & & stress(im), spd1(im) real(kind=kind_phys), intent(in) :: & - & prsi(ix,km+1), del(ix,km), & - & prsl(ix,km), prslk(ix,km), & - & phii(ix,km+1), phil(ix,km) + & prsi(im,km+1), del(im,km), & + & prsl(im,km), prslk(im,km), & + & phii(im,km+1), phil(im,km) real(kind=kind_phys), intent(out) :: & & dusfc(im), dvsfc(im), & & dtsfc(im), dqsfc(im), & @@ -257,8 +257,6 @@ subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & !> ## Compute preliminary variables from input arguments ! compute preliminary variables -! - if (ix .lt. im) stop ! ! iprt = 0 ! if(iprt.eq.1) then @@ -1107,7 +1105,7 @@ subroutine hedmf_hafs_run(ix,im,km,ntrac,ntcw,dv,du,tau,rtg, & enddo enddo !> For details of the mfpbl subroutine, step into its documentation ::mfpbl - call mfpbl(im,ix,km,ntrac,dt2,pcnvflg, + call mfpbl(im,im,km,ntrac,dt2,pcnvflg, & zl,zi,thvx,q1,t1,u1,v1,hpbl,kpbl, & sflux,ustar,wstar,xmf,tcko,qcko,ucko,vcko) ! diff --git a/physics/moninedmf_hafs.meta b/physics/moninedmf_hafs.meta index d600c8eac..2883e6847 100644 --- a/physics/moninedmf_hafs.meta +++ b/physics/moninedmf_hafs.meta @@ -32,14 +32,6 @@ [ccpp-arg-table] name = hedmf_hafs_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/moninshoc.f b/physics/moninshoc.f index eb6ccd7e7..86cab9643 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -24,7 +24,7 @@ end subroutine moninshoc_finalize !> \section arg_table_moninshoc_run Argument Table !! \htmlinclude moninshoc_run.html !! - subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, + subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, & u1,v1,t1,q1,tkh,prnum,ntke, & psk,rbsoil,zorl,u10m,v10m,fm,fh, & tsea,heat,evap,stress,spd1,kpbl, @@ -41,7 +41,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! ! arguments ! - integer, intent(in) :: ix, im, + integer, intent(in) :: im, & km, ntrac, ntcw, ncnd, ntke integer, dimension(im), intent(in) :: kinver @@ -51,10 +51,10 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, & rd, cp, hvap, fv real(kind=kind_phys), dimension(im), intent(in) :: psk, & rbsoil, zorl, u10m, v10m, fm, fh, tsea, heat, evap, stress, spd1 - real(kind=kind_phys), dimension(ix,km), intent(in) :: u1, v1, + real(kind=kind_phys), dimension(im,km), intent(in) :: u1, v1, & t1, tkh, del, prsl, phil, prslk - real(kind=kind_phys), dimension(ix,km+1), intent(in) :: prsi, phii - real(kind=kind_phys), dimension(ix,km,ntrac), intent(in) :: q1 + real(kind=kind_phys), dimension(im,km+1), intent(in) :: prsi, phii + real(kind=kind_phys), dimension(im,km,ntrac), intent(in) :: q1 real(kind=kind_phys), dimension(im,km), intent(inout) :: du, dv, & tau @@ -114,8 +114,6 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, !----------------------------------------------------------------------- ! ! compute preliminary variables -! - if (ix < im) stop ! dt2 = delt rdt = 1. / dt2 diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index d5fd594ab..e8da8478d 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -1,14 +1,6 @@ [ccpp-arg-table] name = moninshoc_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/mp_thompson_post.F90 b/physics/mp_thompson_post.F90 index dd4a2b3f5..97b44943d 100644 --- a/physics/mp_thompson_post.F90 +++ b/physics/mp_thompson_post.F90 @@ -17,12 +17,11 @@ module mp_thompson_post !! \section arg_table_mp_thompson_post_init Argument Table !! \htmlinclude mp_thompson_post_init.html !! - subroutine mp_thompson_post_init(ncol, ttendlim, errmsg, errflg) + subroutine mp_thompson_post_init(ttendlim, errmsg, errflg) implicit none ! Interface variables - integer, intent(in) :: ncol real(kind_phys), intent(in) :: ttendlim ! CCPP error handling diff --git a/physics/mp_thompson_post.meta b/physics/mp_thompson_post.meta index 7a26db6f5..eeaeeb65d 100644 --- a/physics/mp_thompson_post.meta +++ b/physics/mp_thompson_post.meta @@ -1,14 +1,6 @@ [ccpp-arg-table] name = mp_thompson_post_init type = scheme -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F [ttendlim] standard_name = limit_for_temperature_tendency_for_microphysics long_name = temperature tendency limiter per physics time step diff --git a/physics/ozphys.f b/physics/ozphys.f index 8ca13b99f..f8da58760 100644 --- a/physics/ozphys.f +++ b/physics/ozphys.f @@ -50,7 +50,7 @@ end subroutine ozphys_finalize !> \section genal_ozphys GFS ozphys_run General Algorithm !> @{ subroutine ozphys_run ( & - & ix, im, levs, ko3, dt, oz, tin, po3, & + & im, levs, ko3, dt, oz, tin, po3, & & prsl, prdout, oz_coeff, delp, ldiag3d, qdiag3d, & & ozp1, ozp2, ozp3, ozp4, con_g, me, errmsg, errflg) ! @@ -61,15 +61,15 @@ subroutine ozphys_run ( & implicit none ! ! Interface variables - integer, intent(in) :: im, ix, levs, ko3, oz_coeff, me + integer, intent(in) :: im, levs, ko3, oz_coeff, me real(kind=kind_phys), intent(inout) :: & - & oz(ix,levs) + & oz(im,levs) ! These arrays may not be allocated and need assumed array sizes real(kind=kind_phys), intent(inout) :: & & ozp1(:,:), ozp2(:,:), ozp3(:,:), ozp4(:,:) real(kind=kind_phys), intent(in) :: & - & dt, po3(ko3), prdout(ix,ko3,oz_coeff), & - & prsl(ix,levs), tin(ix,levs), delp(ix,levs), & + & dt, po3(ko3), prdout(im,ko3,oz_coeff), & + & prsl(im,levs), tin(im,levs), delp(im,levs), & & con_g real :: gravi logical, intent(in) :: ldiag3d, qdiag3d @@ -82,7 +82,7 @@ subroutine ozphys_run ( & logical flg(im) real(kind=kind_phys) pmax, pmin, tem, temp real(kind=kind_phys) wk1(im), wk2(im), wk3(im), prod(im,oz_coeff), - & ozib(im), colo3(im,levs+1), ozi(ix,levs) + & ozib(im), colo3(im,levs+1), ozi(im,levs) ! ! Initialize CCPP error handling variables errmsg = '' diff --git a/physics/ozphys.meta b/physics/ozphys.meta index 8cce5c266..4f0e6aa9d 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -36,14 +36,6 @@ [ccpp-arg-table] name = ozphys_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/ozphys_2015.f b/physics/ozphys_2015.f index a42c74bfc..238a8fb21 100644 --- a/physics/ozphys_2015.f +++ b/physics/ozphys_2015.f @@ -54,7 +54,7 @@ end subroutine ozphys_2015_finalize !! climatological T and O3 are in location 5 and 6 of prdout array !!\author June 2015 - Shrinivas Moorthi subroutine ozphys_2015_run ( & - & ix, im, levs, ko3, dt, oz, tin, po3, & + & im, levs, ko3, dt, oz, tin, po3, & & prsl, prdout, pl_coeff, delp, & & ldiag3d, qdiag3d, & & ozp1,ozp2,ozp3,ozp4,con_g, & @@ -66,15 +66,15 @@ subroutine ozphys_2015_run ( & ! real(kind=kind_phys),intent(in) :: con_g real :: gravi - integer, intent(in) :: im, ix, levs, ko3, pl_coeff,me + integer, intent(in) :: im, levs, ko3, pl_coeff,me real(kind=kind_phys), intent(in) :: po3(ko3), & - & prsl(ix,levs), tin(ix,levs), & - & delp(ix,levs), & - & prdout(ix,ko3,pl_coeff), dt + & prsl(im,levs), tin(im,levs), & + & delp(im,levs), & + & prdout(im,ko3,pl_coeff), dt ! These arrays may not be allocated and need assumed array sizes real(kind=kind_phys), intent(inout) :: & & ozp1(:,:), ozp2(:,:), ozp3(:,:),ozp4(:,:) - real(kind=kind_phys), intent(inout) :: oz(ix,levs) + real(kind=kind_phys), intent(inout) :: oz(im,levs) character(len=*), intent(out) :: errmsg @@ -85,7 +85,7 @@ subroutine ozphys_2015_run ( & real(kind=kind_phys) pmax, pmin, tem, temp real(kind=kind_phys) wk1(im), wk2(im), wk3(im),prod(im,pl_coeff), & & ozib(im), colo3(im,levs+1), coloz(im,levs+1),& - & ozi(ix,levs) + & ozi(im,levs) ! ! Initialize CCPP error handling variables errmsg = '' diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index eedfe3ca2..bfc010358 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -36,14 +36,6 @@ [ccpp-arg-table] name = ozphys_2015_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/precpd.f b/physics/precpd.f index 5e7018314..0e330558b 100644 --- a/physics/precpd.f +++ b/physics/precpd.f @@ -45,7 +45,7 @@ end subroutine zhaocarr_precpd_init !! -# Calculate precipitation at surface (\f$rn\f$) and fraction of frozen precipitation (\f$sr\f$). !! \section Zhao-Carr_precip_detailed GFS precpd Scheme Detailed Algorithm !> @{ - subroutine zhaocarr_precpd_run (im,ix,km,dt,del,prsl,q,cwm,t,rn & + subroutine zhaocarr_precpd_run (im,km,dt,del,prsl,q,cwm,t,rn & &, sr,rainp,u00k,psautco,prautco,evpco,wminco & &, wk1,lprnt,jpr,errmsg,errflg) @@ -77,18 +77,17 @@ subroutine zhaocarr_precpd_run (im,ix,km,dt,del,prsl,q,cwm,t,rn & ! argument list: ! -------------- ! im : inner dimension over which calculation is made -! ix : maximum inner dimension ! km : number of vertical levels ! dt : time step in seconds ! del(km) : pressure layer thickness (bottom to top) ! prsl(km) : pressure values for model layers (bottom to top) -! q(ix,km) : specific humidity (updated in the code) -! cwm(ix,km) : condensate mixing ratio (updated in the code) -! t(ix,km) : temperature (updated in the code) +! q(im,km) : specific humidity (updated in the code) +! cwm(im,km) : condensate mixing ratio (updated in the code) +! t(im,km) : temperature (updated in the code) ! rn(im) : precipitation over one time-step dt (m/dt) !old sr(im) : index (=-1 snow, =0 rain/snow, =1 rain) !new sr(im) : "snow ratio", ratio of snow to total precipitation -! cll(ix,km) : cloud cover +! cll(im,km) : cloud cover !hchuang rn(im) unit in m per time step ! precipitation rate conversion 1 mm/s = 1 kg/m2/s ! @@ -101,11 +100,11 @@ subroutine zhaocarr_precpd_run (im,ix,km,dt,del,prsl,q,cwm,t,rn & ! include 'constant.h' ! ! Interface variables - integer, intent(in) :: im, ix, km, jpr + integer, intent(in) :: im, km, jpr real (kind=kind_phys), intent(in) :: dt - real (kind=kind_phys), intent(in) :: del(ix,km), prsl(ix,km) - real (kind=kind_phys), intent(inout) :: q(ix,km), t(ix,km), & - & cwm(ix,km) + real (kind=kind_phys), intent(in) :: del(im,km), prsl(im,km) + real (kind=kind_phys), intent(inout) :: q(im,km), t(im,km), & + & cwm(im,km) real (kind=kind_phys), intent(out) :: rn(im), sr(im), rainp(im,km) real (kind=kind_phys), intent(in) :: u00k(im,km) real (kind=kind_phys), intent(in) :: psautco(2), prautco(2), & diff --git a/physics/precpd.meta b/physics/precpd.meta index 37a1850ab..6df3f35af 100644 --- a/physics/precpd.meta +++ b/physics/precpd.meta @@ -14,14 +14,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/rascnv.F90 b/physics/rascnv.F90 index be3b928a8..cc6838b2c 100644 --- a/physics/rascnv.F90 +++ b/physics/rascnv.F90 @@ -228,11 +228,10 @@ end subroutine rascnv_finalize !! inputs: size !! ! !! im - integer, horiz dimension and num of used pts 1 ! -!! ix - integer, maximum horiz dimension 1 ! !! k - integer, vertical dimension 1 ! !! dt - real, time step in seconds 1 ! !! dtf - real, dynamics time step in seconds 1 ! -!! rannum - real, array holding random numbers between 0 an 1 (ix,nrcm) ! +!! rannum - real, array holding random numbers between 0 an 1 (im,nrcm) ! !! tin - real, input temperature (K) !! qin - real, input specific humidity (kg/kg) !! uin - real, input zonal wind component @@ -286,7 +285,7 @@ end subroutine rascnv_finalize !! \section arg_table_rascnv_run Argument Table !! \htmlinclude rascnv_run.html !! - subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & + subroutine rascnv_run(IM, k, ntr, dt, dtf & &, ccwf, area, dxmin, dxinv & &, psauras, prauras, wminras, dlqf, flipv & &, me, rannum, nrcm, mp_phys, mp_phys_mg & @@ -321,7 +320,7 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & ! ! input ! - integer, intent(in) :: im, ix, k, ntr, me, nrcm, ntk, kdt & + integer, intent(in) :: im, k, ntr, me, nrcm, ntk, kdt & &, mp_phys, mp_phys_mg integer, dimension(im) :: kbot, ktop, kcnv, kpbl ! @@ -329,9 +328,9 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & &, psauras(2), prauras(2) & &, wminras(2), dlqf(2) ! - real(kind=kind_phys), dimension(ix,k) :: tin, qin, uin, vin & + real(kind=kind_phys), dimension(im,k) :: tin, qin, uin, vin & &, prsl, prslk, phil - real(kind=kind_phys), dimension(ix,k+1) :: prsi, prsik, phii + real(kind=kind_phys), dimension(im,k+1) :: prsi, prsik, phii real(kind=kind_phys), dimension(im,k) :: ud_mf, dd_mf, dt_mf & &, rhc, qlcn, qicn, w_upi & &, cnv_mfd & @@ -340,8 +339,8 @@ subroutine rascnv_run(IM, IX, k, ntr, dt, dtf & &, cnv_nice, cf_upi real(kind=kind_phys), dimension(im) :: area, cdrag & &, rainc, ddvel - real(kind=kind_phys), dimension(ix,nrcm):: rannum - real(kind=kind_phys) ccin(ix,k,ntr+2) + real(kind=kind_phys), dimension(im,nrcm):: rannum + real(kind=kind_phys) ccin(im,k,ntr+2) real(kind=kind_phys) trcmin(ntr+2) real(kind=kind_phys) DT, dtf, qw0, qi0 diff --git a/physics/rascnv.meta b/physics/rascnv.meta index 0a201e74d..c2ad6bf3f 100644 --- a/physics/rascnv.meta +++ b/physics/rascnv.meta @@ -196,14 +196,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [k] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/rayleigh_damp.f b/physics/rayleigh_damp.f index 8ef5aa947..a56a85e8c 100644 --- a/physics/rayleigh_damp.f +++ b/physics/rayleigh_damp.f @@ -24,7 +24,7 @@ end subroutine rayleigh_damp_init !>\section gen_ray_damp_run GFS rayleigh_damp_runGeneral Algorithm !> @{ subroutine rayleigh_damp_run ( & - & lsidea,IM,IX,KM,A,B,C,U1,V1,DT,CP, & + & lsidea,IM,KM,A,B,C,U1,V1,DT,CP, & & LEVR,pgr,PRSL,PRSLRD0,ral_ts, & & ldiag3d,du3dt,dv3dt,dt3dt, & & errmsg,errflg) @@ -49,16 +49,16 @@ subroutine rayleigh_damp_run ( & ! IS CONVERTED INTO INTERNAL ENERGY. ! ! INPUT -! A(IX,KM) NON-LIN TENDENCY FOR V WIND COMPONENT -! B(IX,KM) NON-LIN TENDENCY FOR U WIND COMPONENT -! C(IX,KM) NON-LIN TENDENCY FOR TEMPERATURE -! U1(IX,KM) ZONAL WIND M/SEC AT T0-DT -! V1(IX,KM) MERIDIONAL WIND M/SEC AT T0-DT -! T1(IX,KM) TEMPERATURE DEG K AT T0-DT +! A(IM,KM) NON-LIN TENDENCY FOR V WIND COMPONENT +! B(IM,KM) NON-LIN TENDENCY FOR U WIND COMPONENT +! C(IM,KM) NON-LIN TENDENCY FOR TEMPERATURE +! U1(IM,KM) ZONAL WIND M/SEC AT T0-DT +! V1(IM,KM) MERIDIONAL WIND M/SEC AT T0-DT +! T1(IM,KM) TEMPERATURE DEG K AT T0-DT ! ! DT TIME STEP SECS ! pgr(im) surface pressure (Pa) -! prsl(IX,KM) PRESSURE AT MIDDLE OF LAYER (Pa) +! prsl(IM,KM) PRESSURE AT MIDDLE OF LAYER (Pa) ! prslrd0 pressure level above which to apply Rayleigh damping ! ral_ts timescale in days for Rayleigh damping ! @@ -69,11 +69,11 @@ subroutine rayleigh_damp_run ( & implicit none ! logical,intent(in) :: lsidea,ldiag3d - integer,intent(in) :: im, ix, km,levr + integer,intent(in) :: im, km,levr real(kind=kind_phys),intent(in) :: DT, CP, PRSLRD0, ral_ts - real(kind=kind_phys),intent(in) :: pgr(im), PRSL(IX,KM) - real(kind=kind_phys),intent(in) :: U1(IX,KM), V1(IX,KM) - real(kind=kind_phys),intent(inout) :: A(IX,KM), B(IX,KM), C(IX,KM) + real(kind=kind_phys),intent(in) :: pgr(im), PRSL(IM,KM) + real(kind=kind_phys),intent(in) :: U1(IM,KM), V1(IM,KM) + real(kind=kind_phys),intent(inout) :: A(IM,KM), B(IM,KM), C(IM,KM) real(kind=kind_phys),intent(inout) :: du3dt(:,:) real(kind=kind_phys),intent(inout) :: dv3dt(:,:) real(kind=kind_phys),intent(inout) :: dt3dt(:,:) diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index 2f9d81ed5..554ac4139 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -22,14 +22,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = number of vertical layers diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 03f5f05ef..361aadbae 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -68,7 +68,7 @@ end subroutine samfdeepcnv_finalize !! !! \section samfdeep_detailed GFS samfdeepcnv Detailed Algorithm !! @{ - subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & + subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & & eps,epsm1,fv,grav,hvap,rd,rv, & & t0c,delt,ntk,ntr,delp, & & prslp,psp,phil,qtr,q1,t1,u1,v1,fscav, & @@ -86,24 +86,24 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & implicit none ! - integer, intent(in) :: im, ix, km, itc, ntc, ntk, ntr, ncloud + integer, intent(in) :: im, km, itc, ntc, ntk, ntr, ncloud integer, intent(in) :: islimsk(im) real(kind=kind_phys), intent(in) :: cliq, cp, cvap, eps, epsm1, & & fv, grav, hvap, rd, rv, t0c real(kind=kind_phys), intent(in) :: delt - real(kind=kind_phys), intent(in) :: psp(im), delp(ix,km), & - & prslp(ix,km), garea(im), dot(ix,km), phil(ix,km) + real(kind=kind_phys), intent(in) :: psp(im), delp(im,km), & + & prslp(im,km), garea(im), dot(im,km), phil(im,km) real(kind=kind_phys), dimension(:), intent(in) :: fscav real(kind=kind_phys), intent(in) :: nthresh - real(kind=kind_phys), intent(in) :: ca_deep(ix) - real(kind=kind_phys), intent(out) :: rainevap(ix) + real(kind=kind_phys), intent(in) :: ca_deep(im) + real(kind=kind_phys), intent(out) :: rainevap(im) logical, intent(in) :: do_ca,ca_closure,ca_entr,ca_trigger integer, intent(inout) :: kcnv(im) ! DH* TODO - check dimensions of qtr, ntr+2 correct? *DH - real(kind=kind_phys), intent(inout) :: qtr(ix,km,ntr+2), & - & q1(ix,km), t1(ix,km), u1(ix,km), v1(ix,km), & - & cnvw(ix,km), cnvc(ix,km) + real(kind=kind_phys), intent(inout) :: qtr(im,km,ntr+2), & + & q1(im,km), t1(im,km), u1(im,km), v1(im,km), & + & cnvw(im,km), cnvc(im,km) integer, intent(out) :: kbot(im), ktop(im) real(kind=kind_phys), intent(out) :: cldwrk(im), & @@ -169,7 +169,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! ! real(kind=kind_phys) aa1(im), acrt(im), acrtfct(im), real(kind=kind_phys) aa1(im), tkemean(im),clamt(im), - & ps(im), del(ix,km), prsl(ix,km), + & ps(im), del(im,km), prsl(im,km), & umean(im), tauadv(im), gdx(im), & delhbar(im), delq(im), delq2(im), & delqbar(im), delqev(im), deltbar(im), @@ -2476,7 +2476,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & !> - Transport aerosols if present if (do_aerosols) - & call samfdeepcnv_aerosols(im, ix, km, itc, ntc, ntr, delt, + & call samfdeepcnv_aerosols(im, im, km, itc, ntc, ntr, delt, & xlamde, xlamdd, cnvflg, jmin, kb, kmax, kbcon, ktcon, fscav, & edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp, & qtr, qaero) diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 215026eb2..6f7ec3166 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -19,14 +19,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index ed80a2f54..36dab1c9a 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -49,7 +49,7 @@ end subroutine samfshalcnv_finalize !! -# For the "feedback control", calculate updated values of the state variables by multiplying the cloud base mass flux and the tendencies calculated per unit cloud base mass flux from the static control. !! \section det_samfshalcnv GFS samfshalcnv Detailed Algorithm !! @{ - subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & + subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, & & eps,epsm1,fv,grav,hvap,rd,rv, & & t0c,delt,ntk,ntr,delp, & & prslp,psp,phil,qtr,q1,t1,u1,v1,fscav, & @@ -62,23 +62,23 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & implicit none ! - integer, intent(in) :: im, ix, km, itc, ntc, ntk, ntr, ncloud + integer, intent(in) :: im, km, itc, ntc, ntk, ntr, ncloud integer, intent(in) :: islimsk(im) real(kind=kind_phys), intent(in) :: cliq, cp, cvap, & & eps, epsm1, fv, grav, hvap, rd, rv, t0c real(kind=kind_phys), intent(in) :: delt - real(kind=kind_phys), intent(in) :: psp(im), delp(ix,km), & - & prslp(ix,km), garea(im), hpbl(im), dot(ix,km), phil(ix,km) + real(kind=kind_phys), intent(in) :: psp(im), delp(im,km), & + & prslp(im,km), garea(im), hpbl(im), dot(im,km), phil(im,km) ! real(kind=kind_phys), dimension(:), intent(in) :: fscav integer, intent(inout) :: kcnv(im) ! DH* TODO - check dimensions of qtr, ntr+2 correct? *DH - real(kind=kind_phys), intent(inout) :: qtr(ix,km,ntr+2), & - & q1(ix,km), t1(ix,km), u1(ix,km), v1(ix,km) + real(kind=kind_phys), intent(inout) :: qtr(im,km,ntr+2), & + & q1(im,km), t1(im,km), u1(im,km), v1(im,km) ! integer, intent(out) :: kbot(im), ktop(im) real(kind=kind_phys), intent(out) :: rn(im), & - & cnvw(ix,km), cnvc(ix,km), ud_mf(im,km), dt_mf(im,km) + & cnvw(im,km), cnvc(im,km), ud_mf(im,km), dt_mf(im,km) ! real(kind=kind_phys), intent(in) :: clam, c0s, c1, & & asolfac, pgcon @@ -119,7 +119,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & ! real(kind=kind_phys) aa1(im), cina(im), & tkemean(im), clamt(im), - & ps(im), del(ix,km), prsl(ix,km), + & ps(im), del(im,km), prsl(im,km), & umean(im), tauadv(im), gdx(im), & delhbar(im), delq(im), delq2(im), & delqbar(im), delqev(im), deltbar(im), @@ -1504,7 +1504,7 @@ subroutine samfshalcnv_run(im,ix,km,itc,ntc,cliq,cp,cvap, & !> - Transport aerosols if present ! if (do_aerosols) - & call samfshalcnv_aerosols(im, ix, km, itc, ntc, ntr, delt, + & call samfshalcnv_aerosols(im, im, km, itc, ntc, ntr, delt, ! & xlamde, xlamdd, cnvflg, jmin, kb, kmax, kbcon, ktcon, fscav, & cnvflg, kb, kmax, kbcon, ktcon, fscav, ! & edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp, diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index 5189afd95..156cda581 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -19,14 +19,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = vertical layer dimension diff --git a/physics/sascnvn.F b/physics/sascnvn.F index 79c1bdc36..ac59b9c5c 100644 --- a/physics/sascnvn.F +++ b/physics/sascnvn.F @@ -55,8 +55,7 @@ end subroutine sascnvn_finalize !! !! As in Grell (1993) \cite grell_1993 , the SAS convective scheme can be described in terms of three types of "controls": static, dynamic, and feedback. The static control component consists of the simple entraining/detraining updraft/downdraft cloud model and is used to determine the cloud properties, convective precipitation, as well as the convective cloud top height. The dynamic control is the determination of the potential energy available for convection to "consume", or how primed the large-scale environment is for convection to occur due to changes by the dyanmics of the host model. The feedback control is the determination of how the parameterized convection changes the large-scale environment (the host model state variables) given the changes to the state variables per unit cloud base mass flux calculated in the static control portion and the deduced cloud base mass flux determined from the dynamic control. !! -!! \param[in] im number of used points -!! \param[in] ix horizontal dimension +!! \param[in] im horizontal dimension !! \param[in] km vertical layer dimension !! \param[in] jcap number of spectral wave trancation !! \param[in] delt physics time step in seconds @@ -99,7 +98,7 @@ end subroutine sascnvn_finalize !! @{ subroutine sascnvn_run( & grav,cp,hvap,rv,fv,t0c,rgas,cvap,cliq,eps,epsm1, & - & im,ix,km,jcap,delt,delp,prslp,psp,phil,qlc,qli, & + & im,km,jcap,delt,delp,prslp,psp,phil,qlc,qli, & & q1,t1,u1,v1,cldwrk,rn,kbot,ktop,kcnv,islimsk, & & dot,ncloud,ud_mf,dd_mf,dt_mf,cnvw,cnvc, & & qlcn,qicn,w_upi,cf_upi,cnv_mfd, & @@ -119,7 +118,7 @@ subroutine sascnvn_run( ! real(kind=kind_phys), intent(in) :: grav, cp, hvap, rv, fv, t0c, & & rgas, cvap, cliq, eps, epsm1 - integer, intent(in) :: im, ix, km, jcap, ncloud, & + integer, intent(in) :: im, km, jcap, ncloud, & & mp_phys, mp_phys_mg integer, intent(inout) :: kbot(:), ktop(:), kcnv(:) integer, intent(in) :: islimsk(:) @@ -184,7 +183,7 @@ subroutine sascnvn_run( & jmin(im), lmin(im), kbmax(im), & kbm(im), kmax(im) ! - real(kind=kind_phys) ps(im), del(ix,km), prsl(ix,km) + real(kind=kind_phys) ps(im), del(im,km), prsl(im,km) ! real(kind=kind_phys) aa1(im), acrt(im), acrtfct(im), & delhbar(im), delq(im), delq2(im), diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index f330dd94d..dbc10783a 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -151,14 +151,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal_dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = number of vertical levels diff --git a/physics/satmedmfvdif.F b/physics/satmedmfvdif.F index f17aaa35c..f00fb3776 100644 --- a/physics/satmedmfvdif.F +++ b/physics/satmedmfvdif.F @@ -53,7 +53,7 @@ end subroutine satmedmfvdif_finalize !! (mfscu.f). !! \section detail_satmedmfvidf GFS satmedmfvdif Detailed Algorithm !> @{ - subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & + subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & & grav,rd,cp,rv,hvap,hfus,fv,eps,epsm1, & & dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea, & & psk,rbsoil,zorl,u10m,v10m,fm,fh, & @@ -70,7 +70,7 @@ subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & implicit none ! !---------------------------------------------------------------------- - integer, intent(in) :: ix, im, km, ntrac, ntcw, ntiw, ntke + integer, intent(in) :: im, km, ntrac, ntcw, ntiw, ntke integer, intent(in) :: kinver(im) integer, intent(out) :: kpbl(im) ! @@ -84,19 +84,19 @@ subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & & tdt(im,km), rtg(im,km,ntrac) real(kind=kind_phys), intent(in) :: & - & u1(ix,km), v1(ix,km), & - & t1(ix,km), q1(ix,km,ntrac), & - & swh(ix,km), hlw(ix,km), & + & u1(im,km), v1(im,km), & + & t1(im,km), q1(im,km,ntrac), & + & swh(im,km), hlw(im,km), & & xmu(im), garea(im), & - & psk(ix), rbsoil(im), & + & psk(im), rbsoil(im), & & zorl(im), tsea(im), & & u10m(im), v10m(im), & & fm(im), fh(im), & & evap(im), heat(im), & & stress(im), spd1(im), & - & prsi(ix,km+1), del(ix,km), & - & prsl(ix,km), prslk(ix,km), & - & phii(ix,km+1), phil(ix,km) + & prsi(im,km+1), del(im,km), & + & prsl(im,km), prslk(im,km), & + & phii(im,km+1), phil(im,km) real(kind=kind_phys), intent(out) :: & & dusfc(im), dvsfc(im), & & dtsfc(im), dqsfc(im), & @@ -807,13 +807,13 @@ subroutine satmedmfvdif_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & enddo !> - Call mfpblt(), which is an EDMF parameterization (Siebesma et al.(2007) \cite Siebesma_2007) !! to take into account nonlocal transport by large eddies. - call mfpblt(im,ix,km,kmpbl,ntcw,ntrac1,dt2, + call mfpblt(im,im,km,kmpbl,ntcw,ntrac1,dt2, & pcnvflg,zl,zm,q1,t1,u1,v1,plyr,pix,thlx,thvx, & gdx,hpbl,kpbl,vpert,buou,xmf, & tcko,qcko,ucko,vcko,xlamue) !> - Call mfscu(), which is a new mass-flux parameterization for !! stratocumulus-top-induced turbulence mixing. - call mfscu(im,ix,km,kmscu,ntcw,ntrac1,dt2, + call mfscu(im,im,km,kmscu,ntcw,ntrac1,dt2, & scuflg,zl,zm,q1,t1,u1,v1,plyr,pix, & thlx,thvx,thlvx,gdx,thetae,radj, & krad,mrad,radmin,buod,xmfd, diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index b1c3fbfc4..6ff485565 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -39,14 +39,6 @@ [ccpp-arg-table] name = satmedmfvdif_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index f10ed97ef..c71663dc7 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -57,7 +57,7 @@ end subroutine satmedmfvdifq_finalize !! (mfscuq.f). !! \section detail_satmedmfvidfq GFS satmedmfvdifq Detailed Algorithm !! @{ - subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & + subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & grav,rd,cp,rv,hvap,hfus,fv,eps,epsm1, & & dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea, & & psk,rbsoil,zorl,u10m,v10m,fm,fh, & @@ -74,7 +74,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & implicit none ! !---------------------------------------------------------------------- - integer, intent(in) :: ix, im, km, ntrac, ntcw, ntiw, ntke, ntoz + integer, intent(in) :: im, km, ntrac, ntcw, ntiw, ntke, ntoz integer, intent(in) :: kinver(im) integer, intent(out) :: kpbl(im) logical, intent(in) :: ldiag3d,qdiag3d @@ -86,19 +86,19 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & & tdt(im,km), rtg(im,km,ntrac) real(kind=kind_phys), intent(in) :: & - & u1(ix,km), v1(ix,km), & - & t1(ix,km), q1(ix,km,ntrac), & - & swh(ix,km), hlw(ix,km), & + & u1(im,km), v1(im,km), & + & t1(im,km), q1(im,km,ntrac), & + & swh(im,km), hlw(im,km), & & xmu(im), garea(im), & - & psk(ix), rbsoil(im), & + & psk(im), rbsoil(im), & & zorl(im), tsea(im), & & u10m(im), v10m(im), & & fm(im), fh(im), & & evap(im), heat(im), & & stress(im), spd1(im), & - & prsi(ix,km+1), del(ix,km), & - & prsl(ix,km), prslk(ix,km), & - & phii(ix,km+1), phil(ix,km) + & prsi(im,km+1), del(im,km), & + & prsl(im,km), prslk(im,km), & + & phii(im,km+1), phil(im,km) real(kind=kind_phys), intent(inout), dimension(:,:) :: & & du3dt(:,:), dv3dt(:,:), & & dt3dt(:,:), dq3dt(:,:), & @@ -773,13 +773,13 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & enddo !> - Call mfpbltq(), which is an EDMF parameterization (Siebesma et al.(2007) \cite Siebesma_2007) !! to take into account nonlocal transport by large eddies. For details of the mfpbltq subroutine, step into its documentation ::mfpbltq - call mfpbltq(im,ix,km,kmpbl,ntcw,ntrac1,dt2, + call mfpbltq(im,im,km,kmpbl,ntcw,ntrac1,dt2, & pcnvflg,zl,zm,q1,t1,u1,v1,plyr,pix,thlx,thvx, & gdx,hpbl,kpbl,vpert,buou,xmf, & tcko,qcko,ucko,vcko,xlamue,bl_upfr) !> - Call mfscuq(), which is a new mass-flux parameterization for !! stratocumulus-top-induced turbulence mixing. For details of the mfscuq subroutine, step into its documentation ::mfscuq - call mfscuq(im,ix,km,kmscu,ntcw,ntrac1,dt2, + call mfscuq(im,im,km,kmscu,ntcw,ntrac1,dt2, & scuflg,zl,zm,q1,t1,u1,v1,plyr,pix, & thlx,thvx,thlvx,gdx,thetae, & krad,mrad,radmin,buod,xmfd, diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index 01211b599..c0cefb632 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -39,14 +39,6 @@ [ccpp-arg-table] name = satmedmfvdifq_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/shalcnv.F b/physics/shalcnv.F index 5c9e65203..2a8918985 100644 --- a/physics/shalcnv.F +++ b/physics/shalcnv.F @@ -58,8 +58,7 @@ end subroutine shalcnv_finalize !! !! This routine follows the \ref SAS scheme quite closely, although it can be interpreted as only having the "static" and "feedback" control portions, since the "dynamic" control is not necessary to find the cloud base mass flux. The algorithm is simplified from SAS deep convection by excluding convective downdrafts and being confined to operate below \f$p=0.7p_{sfc}\f$. Also, entrainment is both simpler and stronger in magnitude compared to the deep scheme. !! -!! \param[in] im number of used points -!! \param[in] ix horizontal dimension +!! \param[in] im horizontal dimension !! \param[in] km vertical layer dimension !! \param[in] jcap number of spectral wave trancation !! \param[in] delt physics time step in seconds @@ -101,7 +100,7 @@ end subroutine shalcnv_finalize !! @{ subroutine shalcnv_run( & & grav,cp,hvap,rv,fv,t0c,rd,cvap,cliq,eps,epsm1, & - & im,ix,km,jcap,delt,delp,prslp,psp,phil,qlc,qli, & + & im,km,jcap,delt,delp,prslp,psp,phil,qlc,qli, & & q1,t1,u1,v1,rn,kbot,ktop,kcnv,islimsk, & & dot,ncloud,hpbl,heat,evap,ud_mf,dt_mf,cnvw,cnvc, & & clam,c0,c1,pgcon,errmsg,errflg) @@ -118,7 +117,7 @@ subroutine shalcnv_run( & ! real(kind=kind_phys), intent(in) :: grav, cp, hvap, rv, fv, t0c, & & rd, cvap, cliq, eps, epsm1 - integer, intent(in) :: im, ix, km, jcap, ncloud + integer, intent(in) :: im, km, jcap, ncloud integer, intent(inout) :: kbot(:), ktop(:), kcnv(:) integer, intent(in) :: islimsk(:) real(kind=kind_phys), intent(in) :: delt, clam, c0, c1, pgcon diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index e0d806a5c..2a508cb0b 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -167,14 +167,6 @@ type = integer intent = in optional = F -[ix] - standard_name = horizontal_dimension - long_name = horizontal_dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [km] standard_name = vertical_dimension long_name = number of vertical levels diff --git a/physics/shinhongvdif.F90 b/physics/shinhongvdif.F90 index 8053934ac..83270a08d 100644 --- a/physics/shinhongvdif.F90 +++ b/physics/shinhongvdif.F90 @@ -25,7 +25,7 @@ end subroutine shinhongvdif_finalize !! \htmlinclude shinhongvdif_run.html !! !------------------------------------------------------------------------------- - subroutine shinhongvdif_run(ix,im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & + subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & utnp,vtnp,ttnp,qtnp,ntrac,ndiff,ntcw,ntiw, & phii,phil,psfcpa, & zorl,stress,hpbl,psim,psih, & @@ -104,20 +104,20 @@ subroutine shinhongvdif_run(ix,im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & real(kind=kind_phys),parameter :: cpent = -0.4,rigsmax = 100. real(kind=kind_phys),parameter :: entfmin = 1.0, entfmax = 5.0 ! 1D in - integer, intent(in ) :: ix,im,km,ntrac,ndiff,ntcw,ntiw + integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw real(kind=kind_phys), intent(in ) :: g,cp,rd,rv,ep1,ep2,xlv,dt ! 3D in - real(kind=kind_phys), dimension(ix, km) , & + real(kind=kind_phys), dimension(im, km) , & intent(in ) :: phil, & pi2d, & p2d, & ux, & vx, & tx - real(kind=kind_phys), dimension( ix, km, ntrac ) , & + real(kind=kind_phys), dimension( im, km, ntrac ) , & intent(in ) :: qx - real(kind=kind_phys), dimension( ix, km+1 ) , & + real(kind=kind_phys), dimension( im, km+1 ) , & intent(in ) :: p2di, & phii ! 3D in&out diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index 4ce047aa2..08646d7b9 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -1,14 +1,6 @@ [ccpp-arg-table] name = shinhongvdif_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent diff --git a/physics/ysuvdif.F90 b/physics/ysuvdif.F90 index fff945774..51ed599f0 100644 --- a/physics/ysuvdif.F90 +++ b/physics/ysuvdif.F90 @@ -25,7 +25,7 @@ end subroutine ysuvdif_finalize !! \htmlinclude ysuvdif_run.html !! !------------------------------------------------------------------------------- - subroutine ysuvdif_run(ix,im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & + subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & utnp,vtnp,ttnp,qtnp, & swh,hlw,xmu,ntrac,ndiff,ntcw,ntiw, & phii,phil,psfcpa, & @@ -59,16 +59,16 @@ subroutine ysuvdif_run(ix,im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & ! !------------------------------------------------------------------------------------- ! input variables - integer, intent(in ) :: ix,im,km,ntrac,ndiff,ntcw,ntiw + integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw real(kind=kind_phys), intent(in ) :: g,cp,rd,rv,ep1,ep2,xlv,dt - real(kind=kind_phys), dimension( ix,km ), & + real(kind=kind_phys), dimension( im,km ), & intent(in) :: pi2d,p2d,phil,ux,vx,swh,hlw,tx - real(kind=kind_phys), dimension( ix,km,ntrac ) , & + real(kind=kind_phys), dimension( im,km,ntrac ) , & intent(in ) :: qx - real(kind=kind_phys), dimension( ix, km+1 ) , & + real(kind=kind_phys), dimension( im, km+1 ) , & intent(in ) :: p2di,phii real(kind=kind_phys), dimension( im ) , & diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index fe18e6f45..c040233a7 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -1,14 +1,6 @@ [ccpp-arg-table] name = ysuvdif_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent From b3c070d72e33ce6ffd2d8dd5b52f0b3e2f9a8b31 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 27 May 2020 11:36:04 -0600 Subject: [PATCH 177/404] physics/GFS_debug.F90: bugfix for conditionally allocated variables --- physics/GFS_debug.F90 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 0d010ed76..cfd190b26 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -348,12 +348,18 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, end if ! CCPP/MYNNPBL only if (Model%do_mynnedmf) then - call print_var(mpirank,omprank, blkno, 'Diag%edmf_a ', Diag%edmf_a) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_w ', Diag%edmf_w) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_qt ', Diag%edmf_qt) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_thl ', Diag%edmf_thl) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_ent ', Diag%edmf_ent) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_qc ', Diag%edmf_qc) + if (Model%bl_mynn_output .ne. 0) then + call print_var(mpirank,omprank, blkno, 'Diag%edmf_a ', Diag%edmf_a) + call print_var(mpirank,omprank, blkno, 'Diag%edmf_w ', Diag%edmf_w) + call print_var(mpirank,omprank, blkno, 'Diag%edmf_qt ', Diag%edmf_qt) + call print_var(mpirank,omprank, blkno, 'Diag%edmf_thl ', Diag%edmf_thl) + call print_var(mpirank,omprank, blkno, 'Diag%edmf_ent ', Diag%edmf_ent) + call print_var(mpirank,omprank, blkno, 'Diag%edmf_qc ', Diag%edmf_qc) + call print_var(mpirank,omprank, blkno, 'Diag%sub_thl ', Diag%sub_thl) + call print_var(mpirank,omprank, blkno, 'Diag%sub_sqv ', Diag%sub_sqv) + call print_var(mpirank,omprank, blkno, 'Diag%det_thl ', Diag%det_thl) + call print_var(mpirank,omprank, blkno, 'Diag%det_sqv ', Diag%det_sqv) + end if call print_var(mpirank,omprank, blkno, 'Diag%nupdraft ', Diag%nupdraft) call print_var(mpirank,omprank, blkno, 'Diag%maxMF ', Diag%maxMF) call print_var(mpirank,omprank, blkno, 'Diag%ktop_plume ', Diag%ktop_plume) From fca0786f3834f8f6993f470b01ea3bd644a6efa0 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 27 May 2020 11:36:28 -0600 Subject: [PATCH 178/404] physics/GFS_phys_time_vary.fv3.meta: bugfix, use correct dimensions in metadata --- physics/GFS_phys_time_vary.fv3.meta | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/GFS_phys_time_vary.fv3.meta b/physics/GFS_phys_time_vary.fv3.meta index ac2ccbf3c..199cc362c 100644 --- a/physics/GFS_phys_time_vary.fv3.meta +++ b/physics/GFS_phys_time_vary.fv3.meta @@ -5,7 +5,7 @@ standard_name = GFS_data_type_instance_all_blocks long_name = Fortran DDT containing FV3-GFS data units = DDT - dimensions = (ccpp_block_number) + dimensions = (ccpp_block_count) type = GFS_data_type intent = inout optional = F @@ -21,7 +21,7 @@ standard_name = GFS_interstitial_type_instance_all_threads long_name = Fortran DDT containing FV3-GFS interstitial data units = DDT - dimensions = (ccpp_thread_number) + dimensions = (omp_threads) type = GFS_interstitial_type intent = inout optional = F @@ -81,7 +81,7 @@ standard_name = GFS_data_type_instance_all_blocks long_name = Fortran DDT containing FV3-GFS data units = DDT - dimensions = (ccpp_block_number) + dimensions = (ccpp_block_count) type = GFS_data_type intent = inout optional = F From 2354a89824f23a8eb42fa4b1a647337530347e79 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 27 May 2020 11:36:40 -0600 Subject: [PATCH 179/404] physics/module_bl_mynn.F90: fix compiler warning --- physics/module_bl_mynn.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index 6be141d9c..edc5d4a1e 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -3105,7 +3105,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=thl(k) + tcd(k)*delt + dtz(k)*(s_awthl(k)-s_awthl(k+1)) + & - & + diss_heat(k)*delt*dheat_opt + & + & diss_heat(k)*delt*dheat_opt + & & sub_thl(k)*delt + det_thl(k)*delt ENDDO From 6d6dd49eafeb687ea23b23790937a8f2e21a898e Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 27 May 2020 11:37:18 -0600 Subject: [PATCH 180/404] physics/mp_thompson.{F90,meta}: revert workaround in mp_thompson_init; remove physics/mp_thompson.meta.backup.before.workaround --- physics/mp_thompson.F90 | 567 ++++++--------- physics/mp_thompson.meta | 304 +++++--- .../mp_thompson.meta.backup.before.workaround | 676 ------------------ 3 files changed, 399 insertions(+), 1148 deletions(-) delete mode 100644 physics/mp_thompson.meta.backup.before.workaround diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index d7a08b7ef..824c4f63c 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -23,17 +23,10 @@ module mp_thompson contains -! DH* Note. The following is a nasty modification of the mp_thompson_init -! routine to account for the fact that the initialization of the physics -! must run over all blocks concurrently. In order to pass in the arguments -! as individual Fortran arrays as before, we need to remove the dynamic -! build first and add logic to detect that an array ... - !> This subroutine is a wrapper around the actual thompson_init(). !! \section arg_table_mp_thompson_init Argument Table !! \htmlinclude mp_thompson_init.html !! -#if 0 subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & imp_physics, imp_physics_thompson, & spechum, qc, qr, qi, qs, qg, ni, nr, & @@ -41,7 +34,7 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & nwfa, nifa, tgrs, prsl, phil, area, & re_cloud, re_ice, re_snow, & mpicomm, mpirank, mpiroot, & - threads, blkno, errmsg, errflg) + threads, errmsg, errflg) implicit none @@ -83,7 +76,6 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & integer, intent(in ) :: mpiroot ! Threading/blocking information integer, intent(in ) :: threads - integer, intent(in ) :: blkno ! CCPP error handling character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg @@ -105,91 +97,6 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & ! real (kind=kind_phys) :: h_01, airmass, niIN3, niCCN3 integer :: i, k -#else - subroutine mp_thompson_init(Data, ntqv, ntcw, ntrw, ntiw, ntsw, ntgl, & - ntinc, ntrnc, ntlnc, ntwa, ntia, nleffr, & - nieffr, nseffr, con_g, con_rd, & - restart, imp_physics, imp_physics_thompson, & - is_aerosol_aware, mpicomm, mpirank, mpiroot,& - threads, errmsg, errflg) - - use GFS_typedefs, only : GFS_data_type - - implicit none - - ! Interface variables - type(GFS_data_type), intent(inout) :: Data(:) - integer, intent(in ) :: ntqv - integer, intent(in ) :: ntcw - integer, intent(in ) :: ntrw - integer, intent(in ) :: ntiw - integer, intent(in ) :: ntsw - integer, intent(in ) :: ntgl - integer, intent(in ) :: ntinc - integer, intent(in ) :: ntrnc - integer, intent(in ) :: ntlnc - integer, intent(in ) :: ntwa - integer, intent(in ) :: ntia - integer, intent(in ) :: nleffr - integer, intent(in ) :: nieffr - integer, intent(in ) :: nseffr - real(kind_phys), intent(in ) :: con_g, con_rd - logical, intent(in ) :: restart - integer, intent(in ) :: imp_physics - integer, intent(in ) :: imp_physics_thompson - ! Aerosols - logical, intent(in ) :: is_aerosol_aware - ! MPI information - integer, intent(in ) :: mpicomm - integer, intent(in ) :: mpirank - integer, intent(in ) :: mpiroot - ! Threading/blocking information - integer, intent(in ) :: threads - ! CCPP error handling - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Local variables/pointers - - ! Hydrometeors - real(kind_phys), dimension(:,:), allocatable :: qv_mp !< kg kg-1 (dry mixing ratio) - real(kind_phys), dimension(:,:), allocatable :: qc_mp !< kg kg-1 (dry mixing ratio) - real(kind_phys), dimension(:,:), allocatable :: qr_mp !< kg kg-1 (dry mixing ratio) - real(kind_phys), dimension(:,:), allocatable :: qi_mp !< kg kg-1 (dry mixing ratio) - real(kind_phys), dimension(:,:), allocatable :: qs_mp !< kg kg-1 (dry mixing ratio) - real(kind_phys), dimension(:,:), allocatable :: qg_mp !< kg kg-1 (dry mixing ratio) - real(kind_phys), dimension(:,:), allocatable :: ni_mp !< kg-1 - real(kind_phys), dimension(:,:), allocatable :: nr_mp !< kg-1 - real(kind_phys), dimension(:,:), allocatable :: nc_mp !< kg-1 - ! - real(kind_phys), dimension(:,:), allocatable :: hgt ! m - real(kind_phys), dimension(:,:), allocatable :: rho ! kg m-3 - real(kind_phys), dimension(:,:), allocatable :: orho ! m3 kg-1 - real(kind_phys), pointer :: spechum (:,:) - real(kind_phys), pointer :: qc (:,:) - real(kind_phys), pointer :: qr (:,:) - real(kind_phys), pointer :: qi (:,:) - real(kind_phys), pointer :: qs (:,:) - real(kind_phys), pointer :: qg (:,:) - real(kind_phys), pointer :: ni (:,:) - real(kind_phys), pointer :: nr (:,:) - real(kind_phys), pointer :: nc (:,:) - real(kind_phys), pointer :: nwfa (:,:) - real(kind_phys), pointer :: nifa (:,:) - real(kind_phys), pointer :: nwfa2d (:) - real(kind_phys), pointer :: nifa2d (:) - real(kind_phys), pointer :: tgrs (:,:) - real(kind_phys), pointer :: prsl (:,:) - real(kind_phys), pointer :: phil (:,:) - real(kind_phys), pointer :: area (:) - real(kind_phys), pointer :: re_cloud (:,:) - real(kind_phys), pointer :: re_ice (:,:) - real(kind_phys), pointer :: re_snow (:,:) - - ! - real (kind=kind_phys) :: h_01, airmass, niIN3, niCCN3 - integer :: i, k, blkno, nblocks, ncol, nlev -#endif ! Initialize the CCPP error handling variables errmsg = '' @@ -212,298 +119,238 @@ subroutine mp_thompson_init(Data, ntqv, ntcw, ntrw, ntiw, ntsw, ntgl, & return end if - nblocks = size(Data) - block_loop: do blkno=1,nblocks - - spechum => Data(blkno)%Statein%qgrs(:,:,ntqv) - qc => Data(blkno)%Statein%qgrs(:,:,ntcw) - qr => Data(blkno)%Statein%qgrs(:,:,ntrw) - qi => Data(blkno)%Statein%qgrs(:,:,ntiw) - qs => Data(blkno)%Statein%qgrs(:,:,ntsw) - qg => Data(blkno)%Statein%qgrs(:,:,ntgl) - ni => Data(blkno)%Statein%qgrs(:,:,ntinc) - nr => Data(blkno)%Statein%qgrs(:,:,ntrnc) - if (is_aerosol_aware) then - nc => Data(blkno)%Statein%qgrs(:,:,ntlnc) - nwfa => Data(blkno)%Statein%qgrs(:,:,ntwa) - nifa => Data(blkno)%Statein%qgrs(:,:,ntia) - nwfa2d => Data(blkno)%Coupling%nwfa2d - nifa2d => Data(blkno)%Coupling%nifa2d - end if - tgrs => Data(blkno)%Statein%tgrs - prsl => Data(blkno)%Statein%prsl - phil => Data(blkno)%Statein%phil - area => Data(blkno)%Grid%area - re_cloud => Data(blkno)%Tbd%phy_f3d(:,:,nleffr) - re_ice => Data(blkno)%Tbd%phy_f3d(:,:,nieffr) - re_snow => Data(blkno)%Tbd%phy_f3d(:,:,nseffr) - - ncol = size(spechum(:,1)) - nlev = size(spechum(1,:)) - allocate(qv_mp(ncol,nlev)) - allocate(qc_mp(ncol,nlev)) - allocate(qr_mp(ncol,nlev)) - allocate(qi_mp(ncol,nlev)) - allocate(qs_mp(ncol,nlev)) - allocate(qg_mp(ncol,nlev)) - allocate(ni_mp(ncol,nlev)) - allocate(nr_mp(ncol,nlev)) - if (is_aerosol_aware) allocate(nc_mp(ncol,nlev)) - allocate(hgt (ncol,nlev)) - allocate(rho (ncol,nlev)) - allocate(orho (ncol,nlev)) - - only_for_first_block: if (blkno==1) then - - ! Call Thompson init - if (is_aerosol_aware) then - call thompson_init(nwfa2d=nwfa2d, nifa2d=nifa2d, nwfa=nwfa, nifa=nifa, & - mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & - threads=threads, errmsg=errmsg, errflg=errflg) - if (errflg /= 0) return - else - call thompson_init(mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & - threads=threads, errmsg=errmsg, errflg=errflg) - if (errflg /= 0) return - end if - - ! For restart runs, the init is done here - if (restart) then - is_initialized = .true. - return - end if - - end if only_for_first_block - - ! Fix initial values of hydrometeors - where(spechum<0) spechum = 0.0 - where(qc<0) qc = 0.0 - where(qr<0) qr = 0.0 - where(qi<0) qi = 0.0 - where(qs<0) qs = 0.0 - where(qg<0) qg = 0.0 - where(ni<0) ni = 0.0 - where(nr<0) nr = 0.0 - - if (is_aerosol_aware) then - ! Fix initial values of aerosols - where(nc<0) nc = 0.0 - where(nwfa<0) nwfa = 0.0 - where(nifa<0) nifa = 0.0 - where(nwfa2d<0) nwfa2d = 0.0 - where(nifa2d<0) nifa2d = 0.0 - end if + ! Call Thompson init + if (is_aerosol_aware) then + call thompson_init(nwfa2d=nwfa2d, nifa2d=nifa2d, nwfa=nwfa, nifa=nifa, & + mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & + threads=threads, errmsg=errmsg, errflg=errflg) + if (errflg /= 0) return + else + call thompson_init(mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, & + threads=threads, errmsg=errmsg, errflg=errflg) + if (errflg /= 0) return + end if - ! Geopotential height in m2 s-2 to height in m - hgt = phil/con_g - - ! Density of air in kg m-3 and inverse density of air - rho = prsl/(con_rd*tgrs) - orho = 1.0/rho - - ! Prior to calling the functions: make_DropletNumber, make_IceNumber, make_RainNumber, - ! the incoming mixing ratios should be converted to units of mass/num per cubic meter - ! rather than per kg of air. So, to pass back to the model state variables, - ! they also need to be switched back to mass/number per kg of air, because - ! what is returned by the functions is in units of number per cubic meter. - ! They also need to be converted to dry mixing ratios. - - !> - Convert specific humidity/moist mixing ratios to dry mixing ratios - qv_mp = spechum/(1.0_kind_phys-spechum) - qc_mp = qc/(1.0_kind_phys-spechum) - qr_mp = qr/(1.0_kind_phys-spechum) - qi_mp = qi/(1.0_kind_phys-spechum) - qs_mp = qs/(1.0_kind_phys-spechum) - qg_mp = qg/(1.0_kind_phys-spechum) - - !> - Convert number concentrations from moist to dry - ni_mp = ni/(1.0_kind_phys-spechum) - nr_mp = nr/(1.0_kind_phys-spechum) - if (is_aerosol_aware) then - nc_mp = nc/(1.0_kind_phys-spechum) - end if + ! For restart runs, the init is done here + if (restart) then + is_initialized = .true. + return + end if - ! If qi is in boundary conditions but ni is not, calculate ni from qi, rho and tgrs - if (maxval(qi_mp)>0.0 .and. maxval(ni_mp)==0.0) then - ni_mp = make_IceNumber(qi_mp*rho, tgrs) * orho - end if + ! Fix initial values of hydrometeors + where(spechum<0) spechum = 0.0 + where(qc<0) qc = 0.0 + where(qr<0) qr = 0.0 + where(qi<0) qi = 0.0 + where(qs<0) qs = 0.0 + where(qg<0) qg = 0.0 + where(ni<0) ni = 0.0 + where(nr<0) nr = 0.0 - ! If ni is in boundary conditions but qi is not, reset ni to zero - if (maxval(ni_mp)>0.0 .and. maxval(qi_mp)==0.0) ni_mp = 0.0 + if (is_aerosol_aware) then + ! Fix initial values of aerosols + where(nc<0) nc = 0.0 + where(nwfa<0) nwfa = 0.0 + where(nifa<0) nifa = 0.0 + where(nwfa2d<0) nwfa2d = 0.0 + where(nifa2d<0) nifa2d = 0.0 + end if - ! If qr is in boundary conditions but nr is not, calculate nr from qr, rho and tgrs - if (maxval(qr_mp)>0.0 .and. maxval(nr_mp)==0.0) then - nr_mp = make_RainNumber(qr_mp*rho, tgrs) * orho - end if + ! Geopotential height in m2 s-2 to height in m + hgt = phil/con_g - ! If nr is in boundary conditions but qr is not, reset nr to zero - if (maxval(nr_mp)>0.0 .and. maxval(qr_mp)==0.0) nr_mp = 0.0 + ! Density of air in kg m-3 and inverse density of air + rho = prsl/(con_rd*tgrs) + orho = 1.0/rho - !..Check for existing aerosol data, both CCN and IN aerosols. If missing - !.. fill in just a basic vertical profile, somewhat boundary-layer following. - if (is_aerosol_aware) then + ! Prior to calling the functions: make_DropletNumber, make_IceNumber, make_RainNumber, + ! the incoming mixing ratios should be converted to units of mass/num per cubic meter + ! rather than per kg of air. So, to pass back to the model state variables, + ! they also need to be switched back to mass/number per kg of air, because + ! what is returned by the functions is in units of number per cubic meter. + ! They also need to be converted to dry mixing ratios. - ! CCN - if (MAXVAL(nwfa) .lt. eps) then - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosols.' - do i = 1, ncol - if (hgt(i,1).le.1000.0) then - h_01 = 0.8 - elseif (hgt(i,1).ge.2500.0) then - h_01 = 0.01 - else - h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) - endif - niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 - nwfa(i,1) = naCCN1+naCCN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niCCN3) - airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg - nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) - do k = 2, nlev - nwfa(i,k) = naCCN1+naCCN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niCCN3) - enddo + !> - Convert specific humidity/moist mixing ratios to dry mixing ratios + qv_mp = spechum/(1.0_kind_phys-spechum) + qc_mp = qc/(1.0_kind_phys-spechum) + qr_mp = qr/(1.0_kind_phys-spechum) + qi_mp = qi/(1.0_kind_phys-spechum) + qs_mp = qs/(1.0_kind_phys-spechum) + qg_mp = qg/(1.0_kind_phys-spechum) + + !> - Convert number concentrations from moist to dry + ni_mp = ni/(1.0_kind_phys-spechum) + nr_mp = nr/(1.0_kind_phys-spechum) + if (is_aerosol_aware) then + nc_mp = nc/(1.0_kind_phys-spechum) + end if + + ! If qi is in boundary conditions but ni is not, calculate ni from qi, rho and tgrs + if (maxval(qi_mp)>0.0 .and. maxval(ni_mp)==0.0) then + ni_mp = make_IceNumber(qi_mp*rho, tgrs) * orho + end if + + ! If ni is in boundary conditions but qi is not, reset ni to zero + if (maxval(ni_mp)>0.0 .and. maxval(qi_mp)==0.0) ni_mp = 0.0 + + ! If qr is in boundary conditions but nr is not, calculate nr from qr, rho and tgrs + if (maxval(qr_mp)>0.0 .and. maxval(nr_mp)==0.0) then + nr_mp = make_RainNumber(qr_mp*rho, tgrs) * orho + end if + + ! If nr is in boundary conditions but qr is not, reset nr to zero + if (maxval(nr_mp)>0.0 .and. maxval(qr_mp)==0.0) nr_mp = 0.0 + + !..Check for existing aerosol data, both CCN and IN aerosols. If missing + !.. fill in just a basic vertical profile, somewhat boundary-layer following. + if (is_aerosol_aware) then + + ! CCN + if (MAXVAL(nwfa) .lt. eps) then + if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial CCN aerosols.' + do i = 1, ncol + if (hgt(i,1).le.1000.0) then + h_01 = 0.8 + elseif (hgt(i,1).ge.2500.0) then + h_01 = 0.01 + else + h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) + endif + niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 + nwfa(i,1) = naCCN1+naCCN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niCCN3) + airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg + nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) + do k = 2, nlev + nwfa(i,k) = naCCN1+naCCN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niCCN3) enddo - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosols are present.' - if (MAXVAL(nwfa2d) .lt. eps) then + enddo + else + if (mpirank==mpiroot) write(*,*) ' Apparently initial CCN aerosols are present.' + if (MAXVAL(nwfa2d) .lt. eps) then ! Hard-coded switch between new (from WRFv4.0, top) and old (until WRFv3.9.1.1, bottom) surface emission rate calculations #if 0 - !+---+-----------------------------------------------------------------+ - !..Scale the lowest level aerosol data into an emissions rate. This is - !.. very far from ideal, but need higher emissions where larger amount - !.. of (climo) existing and lesser emissions where there exists fewer to - !.. begin as a first-order simplistic approach. Later, proper connection to - !.. emission inventory would be better, but, for now, scale like this: - !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per second per grid box unit - !.. that was tested as ~(20kmx20kmx50m = 2.E10 m**-3) - !+---+-----------------------------------------------------------------+ - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Use new (WRFv4+) formula to calculate CCN surface emission rates.' - do i = 1, ncol - airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg - nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) - enddo + !+---+-----------------------------------------------------------------+ + !..Scale the lowest level aerosol data into an emissions rate. This is + !.. very far from ideal, but need higher emissions where larger amount + !.. of (climo) existing and lesser emissions where there exists fewer to + !.. begin as a first-order simplistic approach. Later, proper connection to + !.. emission inventory would be better, but, for now, scale like this: + !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per second per grid box unit + !.. that was tested as ~(20kmx20kmx50m = 2.E10 m**-3) + !+---+-----------------------------------------------------------------+ + if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' + if (mpirank==mpiroot) write(*,*) ' Use new (WRFv4+) formula to calculate CCN surface emission rates.' + do i = 1, ncol + airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg + nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*2.E-10) + enddo #else - !+---+-----------------------------------------------------------------+ - !..Scale the lowest level aerosol data into an emissions rate. This is - !.. very far from ideal, but need higher emissions where larger amount - !.. of existing and lesser emissions where not already lots of aerosols - !.. for first-order simplistic approach. Later, proper connection to - !.. emission inventory would be better, but, for now, scale like this: - !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per kg per second - !.. Nwfa=500 per cc, emit 0.875E5 aerosols per kg per second - !.. Nwfa=5000 per cc, emit 0.875E6 aerosols per kg per second - !.. for a grid with 20km spacing and scale accordingly for other spacings. - !+---+-----------------------------------------------------------------+ - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Use old (pre WRFv4) formula to calculate CCN surface emission rates.' - do i = 1, ncol - if (SQRT(area(i))/20000.0 .ge. 1.0) then - h_01 = 0.875 - else - h_01 = (0.875 + 0.125*((20000.-SQRT(area(i)))/16000.)) * SQRT(area(i))/20000. - endif - nwfa2d(i) = 10.0**(LOG10(nwfa(i,1)*1.E-6)-3.69897) - nwfa2d(i) = nwfa2d(i)*h_01 * 1.E6 - enddo -#endif - else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial CCN aerosol surface emission rates are present.' - endif - endif - - ! IN - if (MAXVAL(nifa) .lt. eps) then - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosols.' + !+---+-----------------------------------------------------------------+ + !..Scale the lowest level aerosol data into an emissions rate. This is + !.. very far from ideal, but need higher emissions where larger amount + !.. of existing and lesser emissions where not already lots of aerosols + !.. for first-order simplistic approach. Later, proper connection to + !.. emission inventory would be better, but, for now, scale like this: + !.. where: Nwfa=50 per cc, emit 0.875E4 aerosols per kg per second + !.. Nwfa=500 per cc, emit 0.875E5 aerosols per kg per second + !.. Nwfa=5000 per cc, emit 0.875E6 aerosols per kg per second + !.. for a grid with 20km spacing and scale accordingly for other spacings. + !+---+-----------------------------------------------------------------+ + if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' + if (mpirank==mpiroot) write(*,*) ' Use old (pre WRFv4) formula to calculate CCN surface emission rates.' do i = 1, ncol - if (hgt(i,1).le.1000.0) then - h_01 = 0.8 - elseif (hgt(i,1).ge.2500.0) then - h_01 = 0.01 - else - h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) - endif - niIN3 = -1.0*ALOG(naIN1/naIN0)/h_01 - nifa(i,1) = naIN1+naIN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niIN3) - nifa2d(i) = 0. - do k = 2, nlev - nifa(i,k) = naIN1+naIN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niIN3) - enddo + if (SQRT(area(i))/20000.0 .ge. 1.0) then + h_01 = 0.875 + else + h_01 = (0.875 + 0.125*((20000.-SQRT(area(i)))/16000.)) * SQRT(area(i))/20000. + endif + nwfa2d(i) = 10.0**(LOG10(nwfa(i,1)*1.E-6)-3.69897) + nwfa2d(i) = nwfa2d(i)*h_01 * 1.E6 enddo +#endif else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosols are present.' - if (MAXVAL(nifa2d) .lt. eps) then - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently there are no initial IN aerosol surface emission rates, set to zero.' - ! calculate IN surface flux here, right now just set to zero - nifa2d = 0. + if (mpirank==mpiroot) write(*,*) ' Apparently initial CCN aerosol surface emission rates are present.' + endif + endif + + ! IN + if (MAXVAL(nifa) .lt. eps) then + if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial IN aerosols.' + do i = 1, ncol + if (hgt(i,1).le.1000.0) then + h_01 = 0.8 + elseif (hgt(i,1).ge.2500.0) then + h_01 = 0.01 else - if (mpirank==mpiroot .and. blkno==1) write(*,*) ' Apparently initial IN aerosol surface emission rates are present.' + h_01 = 0.8*cos(hgt(i,1)*0.001 - 1.0) endif + niIN3 = -1.0*ALOG(naIN1/naIN0)/h_01 + nifa(i,1) = naIN1+naIN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niIN3) + nifa2d(i) = 0. + do k = 2, nlev + nifa(i,k) = naIN1+naIN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niIN3) + enddo + enddo + else + if (mpirank==mpiroot) write(*,*) ' Apparently initial IN aerosols are present.' + if (MAXVAL(nifa2d) .lt. eps) then + if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial IN aerosol surface emission rates, set to zero.' + ! calculate IN surface flux here, right now just set to zero + nifa2d = 0. + else + if (mpirank==mpiroot) write(*,*) ' Apparently initial IN aerosol surface emission rates are present.' endif + endif - ! If qc is in boundary conditions but nc is not, calculate nc from qc, rho and nwfa - if (maxval(qc_mp)>0.0 .and. maxval(nc_mp)==0.0) then - nc_mp = make_DropletNumber(qc_mp*rho, nwfa) * orho - end if + ! If qc is in boundary conditions but nc is not, calculate nc from qc, rho and nwfa + if (maxval(qc_mp)>0.0 .and. maxval(nc_mp)==0.0) then + nc_mp = make_DropletNumber(qc_mp*rho, nwfa) * orho + end if - ! If nc is in boundary conditions but qc is not, reset nc to zero - if (maxval(nc_mp)>0.0 .and. maxval(qc_mp)==0.0) nc_mp = 0.0 + ! If nc is in boundary conditions but qc is not, reset nc to zero + if (maxval(nc_mp)>0.0 .and. maxval(qc_mp)==0.0) nc_mp = 0.0 - else + else - ! Constant droplet concentration for single moment cloud water as in - ! module_mp_thompson.F90, only needed for effective radii calculation - nc_mp = Nt_c/rho + ! Constant droplet concentration for single moment cloud water as in + ! module_mp_thompson.F90, only needed for effective radii calculation + nc_mp = Nt_c/rho - end if + end if - ! Calculate initial cloud effective radii if requested - do i = 1, ncol - do k = 1, nlev - re_cloud(i,k) = 2.49E-6 - re_ice(i,k) = 4.99E-6 - re_snow(i,k) = 9.99E-6 - end do + ! Calculate initial cloud effective radii if requested + do i = 1, ncol + do k = 1, nlev + re_cloud(i,k) = 2.49E-6 + re_ice(i,k) = 4.99E-6 + re_snow(i,k) = 9.99E-6 end do - do i = 1, ncol - call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & - nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & - re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, nlev) + end do + do i = 1, ncol + call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & + nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & + re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, nlev) + end do + do i = 1, ncol + do k = 1, nlev + re_cloud(i,k) = MAX(2.49E-6, MIN(re_cloud(i,k), 50.E-6)) + re_ice(i,k) = MAX(4.99E-6, MIN(re_ice(i,k), 125.E-6)) + re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) end do - do i = 1, ncol - do k = 1, nlev - re_cloud(i,k) = MAX(2.49E-6, MIN(re_cloud(i,k), 50.E-6)) - re_ice(i,k) = MAX(4.99E-6, MIN(re_ice(i,k), 125.E-6)) - re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) - end do - end do - ! Convert to micron: required for bit-for-bit identical restarts; - ! otherwise entering mp_thompson_init and converting mu to m and - ! back (without updating re_*) introduces b4b differences. - re_cloud = 1.0E6*re_cloud - re_ice = 1.0E6*re_ice - re_snow = 1.0E6*re_snow - - !> - Convert number concentrations from dry to moist - ni = ni_mp/(1.0_kind_phys+qv_mp) - nr = nr_mp/(1.0_kind_phys+qv_mp) - if (is_aerosol_aware) then - nc = nc_mp/(1.0_kind_phys+qv_mp) - end if + end do + ! Convert to micron: required for bit-for-bit identical restarts; + ! otherwise entering mp_thompson_init and converting mu to m and + ! back (without updating re_*) introduces b4b differences. + re_cloud = 1.0E6*re_cloud + re_ice = 1.0E6*re_ice + re_snow = 1.0E6*re_snow - deallocate(qv_mp) - deallocate(qc_mp) - deallocate(qr_mp) - deallocate(qi_mp) - deallocate(qs_mp) - deallocate(qg_mp) - deallocate(ni_mp) - deallocate(nr_mp) - if (is_aerosol_aware) deallocate(nc_mp) - deallocate(hgt ) - deallocate(rho ) - deallocate(orho ) - - end do block_loop + !> - Convert number concentrations from dry to moist + ni = ni_mp/(1.0_kind_phys+qv_mp) + nr = nr_mp/(1.0_kind_phys+qv_mp) + if (is_aerosol_aware) then + nc = nc_mp/(1.0_kind_phys+qv_mp) + end if is_initialized = .true. diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index cbaf8b801..9b26bdc23 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -1,122 +1,18 @@ [ccpp-arg-table] name = mp_thompson_init type = scheme -[Data] - standard_name = GFS_data_type_instance_all_blocks - long_name = instance of derived type GFS_data_type - units = DDT - dimensions = (ccpp_block_number) - type = GFS_data_type - intent = inout - optional = F -[ntqv] - standard_name = index_for_water_vapor - long_name = tracer index for water vapor (specific humidity) - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntcw] - standard_name = index_for_liquid_cloud_condensate - long_name = tracer index for cloud condensate (or liquid water) - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntrw] - standard_name = index_for_rain_water - long_name = tracer index for rain water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntiw] - standard_name = index_for_ice_cloud_condensate - long_name = tracer index for ice water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntsw] - standard_name = index_for_snow_water - long_name = tracer index for snow water - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntgl] - standard_name = index_for_graupel - long_name = tracer index for graupel - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntinc] - standard_name = index_for_ice_cloud_number_concentration - long_name = tracer index for ice number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntrnc] - standard_name = index_for_rain_number_concentration - long_name = tracer index for rain number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntlnc] - standard_name = index_for_liquid_cloud_number_concentration - long_name = tracer index for liquid number concentration - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntwa] - standard_name = index_for_water_friendly_aerosols - long_name = tracer index for water friendly aerosol - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntia] - standard_name = index_for_ice_friendly_aerosols - long_name = tracer index for ice friendly aerosol - units = index - dimensions = () - type = integer - intent = in - optional = F -[nleffr] - standard_name = index_for_cloud_liquid_water_effective_radius - long_name = the index of cloud liquid water effective radius in phy_f3d - units = - dimensions = () - type = integer - intent = in - optional = F -[nieffr] - standard_name = index_for_ice_effective_radius - long_name = the index of ice effective radius in phy_f3d - units = +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () type = integer intent = in optional = F -[nseffr] - standard_name = index_for_snow_effective_radius - long_name = the index of snow effective radius in phy_f3d - units = +[nlev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () type = integer intent = in @@ -163,6 +59,78 @@ type = integer intent = in optional = F +[spechum] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qc] + standard_name = cloud_condensed_water_mixing_ratio + long_name = cloud water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qr] + standard_name = rain_water_mixing_ratio + long_name = rain water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qi] + standard_name = ice_water_mixing_ratio + long_name = ice water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qs] + standard_name = snow_water_mixing_ratio + long_name = snow water mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qg] + standard_name = graupel_mixing_ratio + long_name = graupel mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ni] + standard_name = ice_number_concentration + long_name = ice number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nr] + standard_name = rain_number_concentration + long_name = rain number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [is_aerosol_aware] standard_name = flag_for_aerosol_physics long_name = flag for aerosol-aware physics @@ -171,6 +139,116 @@ type = logical intent = in optional = F +[nc] + standard_name = cloud_droplet_number_concentration + long_name = cloud droplet number concentration + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nwfa2d] + standard_name = tendency_of_water_friendly_aerosols_at_surface + long_name = instantaneous fake water-friendly surface aerosol source + units = kg-1 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) + optional = T +[nifa2d] + standard_name = tendency_of_ice_friendly_aerosols_at_surface + long_name = instantaneous fake ice-friendly surface aerosol source + units = kg-1 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) + optional = T +[nwfa] + standard_name = water_friendly_aerosol_number_concentration + long_name = number concentration of water-friendly aerosols + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[nifa] + standard_name = ice_friendly_aerosol_number_concentration + long_name = number concentration of ice-friendly aerosols + units = kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phil] + standard_name = geopotential + long_name = geopotential at model layer centers + units = m2 s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[area] + standard_name = cell_area + long_name = area of the grid cell + units = m2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[re_cloud] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[re_ice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[re_snow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T [mpicomm] standard_name = mpi_comm long_name = MPI communicator @@ -374,6 +452,7 @@ type = real kind = kind_phys intent = in + active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) optional = T [nifa2d] standard_name = tendency_of_ice_friendly_aerosols_at_surface @@ -383,6 +462,7 @@ type = real kind = kind_phys intent = in + active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) optional = T [tgrs] standard_name = air_temperature_updated_by_physics diff --git a/physics/mp_thompson.meta.backup.before.workaround b/physics/mp_thompson.meta.backup.before.workaround deleted file mode 100644 index 0419a6c15..000000000 --- a/physics/mp_thompson.meta.backup.before.workaround +++ /dev/null @@ -1,676 +0,0 @@ -[ccpp-arg-table] - name = mp_thompson_init - type = scheme -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[nlev] - standard_name = vertical_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in - optional = F -[con_g] - standard_name = gravitational_acceleration - long_name = gravitational acceleration - units = m s-2 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[con_rd] - standard_name = gas_constant_dry_air - long_name = ideal gas constant for dry air - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[restart] - standard_name = flag_for_restart - long_name = flag for restart (warmstart) or coldstart - units = flag - dimensions = () - type = logical - intent = in - optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme - long_name = choice of Thompson microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[spechum] - standard_name = water_vapor_specific_humidity - long_name = water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qc] - standard_name = cloud_condensed_water_mixing_ratio - long_name = cloud water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qr] - standard_name = rain_water_mixing_ratio - long_name = rain water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qi] - standard_name = ice_water_mixing_ratio - long_name = ice water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qs] - standard_name = snow_water_mixing_ratio - long_name = snow water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qg] - standard_name = graupel_mixing_ratio - long_name = graupel mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ni] - standard_name = ice_number_concentration - long_name = ice number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[nr] - standard_name = rain_number_concentration - long_name = rain number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[is_aerosol_aware] - standard_name = flag_for_aerosol_physics - long_name = flag for aerosol-aware physics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[nc] - standard_name = cloud_droplet_number_concentration - long_name = cloud droplet number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nwfa2d] - standard_name = tendency_of_water_friendly_aerosols_at_surface - long_name = instantaneous fake water-friendly surface aerosol source - units = kg-1 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nifa2d] - standard_name = tendency_of_ice_friendly_aerosols_at_surface - long_name = instantaneous fake ice-friendly surface aerosol source - units = kg-1 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nwfa] - standard_name = water_friendly_aerosol_number_concentration - long_name = number concentration of water-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nifa] - standard_name = ice_friendly_aerosol_number_concentration - long_name = number concentration of ice-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[prsl] - standard_name = air_pressure - long_name = mean layer pressure - units = Pa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[phil] - standard_name = geopotential - long_name = geopotential at model layer centers - units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[area] - standard_name = cell_area - long_name = area of the grid cell - units = m2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[re_cloud] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - long_name = eff. radius of cloud liquid water particle in micrometer - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[re_ice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um - long_name = eff. radius of cloud ice water particle in micrometer - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[re_snow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um - long_name = effective radius of cloud snow particle in micrometer - units = um - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[mpicomm] - standard_name = mpi_comm - long_name = MPI communicator - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpirank] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[threads] - standard_name = omp_threads - long_name = number of OpenMP threads available to scheme - units = count - dimensions = () - type = integer - intent = in - optional = F -[blkno] - standard_name = ccpp_block_number - long_name = for explicit data blocking: block number of this block - units = index - dimensions = () - type = integer - intent = in - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F - -######################################################################## -[ccpp-arg-table] - name = mp_thompson_run - type = scheme -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[nlev] - standard_name = vertical_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in - optional = F -[con_g] - standard_name = gravitational_acceleration - long_name = gravitational acceleration - units = m s-2 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[con_rd] - standard_name = gas_constant_dry_air - long_name = ideal gas constant for dry air - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[spechum] - standard_name = water_vapor_specific_humidity_updated_by_physics - long_name = water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qc] - standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics - long_name = cloud water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qr] - standard_name = rain_water_mixing_ratio_updated_by_physics - long_name = rain water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qi] - standard_name = ice_water_mixing_ratio_updated_by_physics - long_name = ice water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qs] - standard_name = snow_water_mixing_ratio_updated_by_physics - long_name = snow water mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qg] - standard_name = graupel_mixing_ratio_updated_by_physics - long_name = graupel mixing ratio wrt dry+vapor (no condensates) - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ni] - standard_name = ice_number_concentration_updated_by_physics - long_name = ice number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[nr] - standard_name = rain_number_concentration_updated_by_physics - long_name = rain number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[is_aerosol_aware] - standard_name = flag_for_aerosol_physics - long_name = flag for aerosol-aware physics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[nc] - standard_name = cloud_droplet_number_concentration_updated_by_physics - long_name = cloud droplet number concentration - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nwfa] - standard_name = water_friendly_aerosol_number_concentration_updated_by_physics - long_name = number concentration of water-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nifa] - standard_name = ice_friendly_aerosol_number_concentration_updated_by_physics - long_name = number concentration of ice-friendly aerosols - units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[nwfa2d] - standard_name = tendency_of_water_friendly_aerosols_at_surface - long_name = instantaneous fake water-friendly surface aerosol source - units = kg-1 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = T -[nifa2d] - standard_name = tendency_of_ice_friendly_aerosols_at_surface - long_name = instantaneous fake ice-friendly surface aerosol source - units = kg-1 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = T -[tgrs] - standard_name = air_temperature_updated_by_physics - long_name = model layer mean temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[prsl] - standard_name = air_pressure - long_name = mean layer pressure - units = Pa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[phii] - standard_name = geopotential_at_interface - long_name = geopotential at model layer interfaces - units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[omega] - standard_name = omega - long_name = layer mean vertical velocity - units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dtp] - standard_name = time_step_for_physics - long_name = physics timestep - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[prcp] - standard_name = lwe_thickness_of_explicit_precipitation_amount - long_name = explicit precipitation (rain, ice, snow, graupel) on physics timestep - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[rain] - standard_name = lwe_thickness_of_explicit_rain_amount - long_name = explicit rain fall on physics timestep - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[graupel] - standard_name = lwe_thickness_of_graupel_amount - long_name = graupel fall on physics timestep - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ice] - standard_name = lwe_thickness_of_ice_amount - long_name = ice fall on physics timestep - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[snow] - standard_name = lwe_thickness_of_snow_amount - long_name = snow fall on physics timestep - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[sr] - standard_name = ratio_of_snowfall_to_rainfall - long_name = ratio of snowfall to large-scale rainfall - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[refl_10cm] - standard_name = radar_reflectivity_10cm - long_name = instantaneous refl_10cm - units = dBZ - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[do_radar_ref] - standard_name = flag_for_radar_reflectivity - long_name = flag for radar reflectivity - units = flag - dimensions = () - type = logical - intent = in - optional = F -[re_cloud] - standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - long_name = eff. radius of cloud liquid water particle in micrometer (meter here) - units = m - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = T -[re_ice] - standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um - long_name = eff. radius of cloud ice water particle in micrometer (meter here) - units = m - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = T -[re_snow] - standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um - long_name = effective radius of cloud snow particle in micrometer (meter here) - units = m - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = T -[mpicomm] - standard_name = mpi_comm - long_name = MPI communicator - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpirank] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F - -######################################################################## -[ccpp-arg-table] - name = mp_thompson_finalize - type = scheme -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F From 0298cebeeaf6f2d1cd88b8ae087a910a288a99d0 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 27 May 2020 12:22:32 -0600 Subject: [PATCH 181/404] add time-averaged calculation of skin temperature and soil temperature in HWRF Noah LSM to try to reduce spurious values of t2m and q2m --- physics/module_sf_noahlsm.F90 | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/physics/module_sf_noahlsm.F90 b/physics/module_sf_noahlsm.F90 index 9336abf65..13d8e9813 100644 --- a/physics/module_sf_noahlsm.F90 +++ b/physics/module_sf_noahlsm.F90 @@ -2631,6 +2631,7 @@ SUBROUTINE SHFLX (SSOIL,STC,SMC,SMCMAX,NSOIL,T1,DT,YY,ZZ1,ZSOIL, & INTEGER, INTENT(IN) :: OPT_THCND INTEGER, INTENT(IN) :: NSOIL, VEGTYP, ISURBAN, SOILTYP INTEGER :: I + LOGICAL, PARAMETER :: TIME_AVERAGE_T_UPDATE = .TRUE. REAL, INTENT(IN) :: BEXP,CSOIL,DF1,DT,F1,PSISAT,QUARTZ, & SMCMAX, SMCWLT, TBOT,YY, ZBOT,ZZ1 @@ -2641,7 +2642,10 @@ SUBROUTINE SHFLX (SSOIL,STC,SMC,SMCMAX,NSOIL,T1,DT,YY,ZZ1,ZSOIL, & REAL, DIMENSION(1:NSOIL), INTENT(INOUT) :: STC REAL, DIMENSION(1:NSOIL) :: AI, BI, CI, STCF,RHSTS REAL, PARAMETER :: T0 = 273.15 - + REAL :: OLDT1 + REAL, DIMENSION(1:NSOIL) :: OLDSTC + REAL, PARAMETER :: CTFIL1 = 0.5 + REAL, PARAMETER :: CTFIL2 = 1.0 - CTFIL1 ! ! FASDAS ! @@ -2652,7 +2656,14 @@ SUBROUTINE SHFLX (SSOIL,STC,SMC,SMCMAX,NSOIL,T1,DT,YY,ZZ1,ZSOIL, & ! ---------------------------------------------------------------------- ! HRT ROUTINE CALCS THE RIGHT HAND SIDE OF THE SOIL TEMP DIF EQN ! ---------------------------------------------------------------------- - + + IF (TIME_AVERAGE_T_UPDATE) THEN + OLDT1 = T1 + DO I = 1, NSOIL + OLDSTC(I) = STC(I) + ENDDO + ENDIF + ! Land case CALL HRT (RHSTS,STC,SMC,SMCMAX,NSOIL,ZSOIL,YY,ZZ1,TBOT, & @@ -2677,6 +2688,15 @@ SUBROUTINE SHFLX (SSOIL,STC,SMC,SMCMAX,NSOIL,T1,DT,YY,ZZ1,ZSOIL, & ! CALCULATE SURFACE SOIL HEAT FLUX ! ---------------------------------------------------------------------- T1 = (YY + (ZZ1- 1.0) * STC (1)) / ZZ1 + + !GJF: Following the GFS version of Noah, time average the updating of skin temperature and soil temperature + IF (TIME_AVERAGE_T_UPDATE) THEN + T1 = CTFIL1*T1 + CTFIL2*OLDT1 + DO I = 1, NSOIL + STC(I) = CTFIL1*STC(I) + CTFIL2*OLDSTC(I) + ENDDO + ENDIF + SSOIL = DF1 * (STC (1) - T1) / (0.5 * ZSOIL (1)) ! ---------------------------------------------------------------------- From 17e038239eef3fe6ae34a7774a6150be43c70ab3 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 27 May 2020 13:18:05 -0600 Subject: [PATCH 182/404] Housekeeping --- physics/rrtmgp_sw_cloud_optics.F90 | 9 --------- physics/rrtmgp_sw_cloud_sampling.F90 | 5 ----- 2 files changed, 14 deletions(-) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 55a4304eb..78b6f7e2a 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -437,15 +437,6 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD sw_optical_props_precipByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_precip(:,:,1:sw_gas_props%get_nband()-1) sw_optical_props_precipByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_precip(:,:,1:sw_gas_props%get_nband()-1) - do iLay=1,nLev - write(43,'(a10,i5)') 'nLay: ',iLay - write(43,'(a10,14f12.7)') 'tau_cld: ',sw_optical_props_cloudsByBand%tau(1,iLay,:) - write(43,'(a10,14f12.7)') 'ssa_cld: ',sw_optical_props_cloudsByBand%ssa(1,iLay,:) - write(43,'(a10,14f12.7)') 'asy_cld: ',sw_optical_props_cloudsByBand%g(1,iLay,:) - write(43,'(a10,14f12.7)') 'tau_prec: ',sw_optical_props_precipByBand%tau(1,iLay,:) - write(43,'(a10,14f12.7)') 'ssa_prec: ',sw_optical_props_precipByBand%ssa(1,iLay,:) - write(43,'(a10,14f12.7)') 'asy_prec: ',sw_optical_props_precipByBand%g(1,iLay,:) - enddo endif endif diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index f2069bb95..1104c8ae4 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -234,11 +234,6 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd enddo enddo enddo - -! call combine_optics_2str(sw_optical_props_precip%tau, sw_optical_props_precip%ssa, & -! sw_optical_props_precip%g,sw_optical_props_clouds%tau,& -! sw_optical_props_clouds%ssa, sw_optical_props_clouds%g) - end subroutine rrtmgp_sw_cloud_sampling_run ! ######################################################################################### From 5e5cfb35756ed9c4a60d81ed2eda58796b994139 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 27 May 2020 16:31:52 -0600 Subject: [PATCH 183/404] Minor bugfixes for handling conditionally allocated variables --- physics/mp_thompson.meta | 4 ---- 1 file changed, 4 deletions(-) diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 9b26bdc23..81b2241e1 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -156,7 +156,6 @@ type = real kind = kind_phys intent = inout - active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) optional = T [nifa2d] standard_name = tendency_of_ice_friendly_aerosols_at_surface @@ -166,7 +165,6 @@ type = real kind = kind_phys intent = inout - active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) optional = T [nwfa] standard_name = water_friendly_aerosol_number_concentration @@ -452,7 +450,6 @@ type = real kind = kind_phys intent = in - active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) optional = T [nifa2d] standard_name = tendency_of_ice_friendly_aerosols_at_surface @@ -462,7 +459,6 @@ type = real kind = kind_phys intent = in - active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) optional = T [tgrs] standard_name = air_temperature_updated_by_physics From d810799b637173f14360bad7727ef9f05a0351ba Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 27 May 2020 20:16:24 -0400 Subject: [PATCH 184/404] some fix related to ice in surface cycling --- physics/gcycle.F90 | 30 ++++++++++++------------ physics/sfcsub.F | 57 ++++++++++++++++++++++++++-------------------- 2 files changed, 47 insertions(+), 40 deletions(-) diff --git a/physics/gcycle.F90 b/physics/gcycle.F90 index ad627233b..f750f6769 100644 --- a/physics/gcycle.F90 +++ b/physics/gcycle.F90 @@ -84,22 +84,22 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) len = 0 do jx = Model%jsc, (Model%jsc+Model%ny-1) - do ix = Model%isc, (Model%isc+Model%nx-1) - len = len + 1 - i_index(len) = ix - j_index(len) = jx - enddo + do ix = Model%isc, (Model%isc+Model%nx-1) + len = len + 1 + i_index(len) = ix + j_index(len) = jx + enddo enddo - sig1t = 0.0 + sig1t = 0.0_kind_phys npts = Model%nx*Model%ny ! len = 0 do nb = 1,nblks do ix = 1,size(Grid(nb)%xlat,1) len = len + 1 - RLA (len) = Grid(nb)%xlat (ix) * pifac - RLO (len) = Grid(nb)%xlon (ix) * pifac + RLA (len) = Grid(nb)%xlat (ix) * pifac + RLO (len) = Grid(nb)%xlon (ix) * pifac OROG (len) = Sfcprop(nb)%oro (ix) OROG_UF (len) = Sfcprop(nb)%oro_uf (ix) SLIFCS (len) = Sfcprop(nb)%slmsk (ix) @@ -142,18 +142,18 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) SLCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%slc (ix,ls) enddo - IF (SLIFCS(len) .LT. 0.1 .OR. SLIFCS(len) .GT. 1.5) THEN - SLMASK(len) = 0 + IF (SLIFCS(len) < 0.1_kind_phys .OR. SLIFCS(len) > 1.5_kind_phys) THEN + SLMASK(len) = 0.0_kind_phys ELSE - SLMASK(len) = 1 + SLMASK(len) = 1.0_kind_phys ENDIF - IF (SLIFCS(len) .EQ. 2) THEN - AISFCS(len) = 1. + IF (SLIFCS(len) > 1.99_kind_phys) THEN + AISFCS(len) = 1.0_kind_phys ELSE - AISFCS(len) = 0. + AISFCS(len) = 0.0_kind_phys ENDIF - if (Sfcprop(nb)%lakefrac(ix) > 0.0) then + if (Sfcprop(nb)%lakefrac(ix) > 0.0_kind_phys) then lake(len) = .true. else lake(len) = .false. diff --git a/physics/sfcsub.F b/physics/sfcsub.F index f9c3af1f7..ee4a2ec09 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -2416,7 +2416,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & do j = 1,lsoil do i = 1,len smcfcs(i,j) = smcanl(i,j) - if (slifcs(i) .gt. 0.0) then + if (slifcs(i) > 0.0_kind_io8) then stcfcs(i,j) = stcanl(i,j) else stcfcs(i,j) = tsffcs(i) @@ -2435,7 +2435,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & enddo !cwu [+20l] update sihfcs, sicfcs. remove sea ice over non-ice points -! crit=aislim +! crit = aislim do i=1,len sihfcs(i) = sihanl(i) sitfcs(i) = tsffcs(i) @@ -2444,38 +2444,46 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & else crit = min_seaice endif - if (slifcs(i) >= 2.) then + if (slifcs(i) >= 1.99_kind_io8) then if (sicfcs(i) > crit) then - tem1 = 1.0 / sicfcs(i) + tem1 = 1.0_kind_io8 / sicfcs(i) tsffcs(i) = (sicanl(i)*tsffcs(i) & + (sicfcs(i)-sicanl(i))*tgice) * tem1 sitfcs(i) = (tsffcs(i)-tgice*(1.0-sicfcs(i))) * tem1 + sicfcs(i) = sicanl(i) else tsffcs(i) = tsfanl(i) ! tsffcs(i) = tgice - sihfcs(i) = sihnew +! sihfcs(i) = sihnew + sihfcs(i) = 0.0_kind_io8 + sicfcs(i) = 0.0_kind_io8 + slifcs(i) = 0.0_kind_io8 endif endif - sicfcs(i) = sicanl(i) - enddo - do i=1,len - if (slifcs(i) < 1.5) then - sihfcs(i) = 0. - sicfcs(i) = 0. - sitfcs(i) = tsffcs(i) - else - if (lake(i)) then - crit = min_lakeice - else - crit = min_seaice - endif - if (sicfcs(i) < crit) then + if (slifcs(i) > 1.5_kind_io8 .and. sicfcs(i) < crit) then print *,'warning: check, slifcs and sicfcs', & & slifcs(i),sicfcs(i) - endif endif enddo +! do i=1,len +! if (slifcs(i) < 1.5_kind_io8) then +! sihfcs(i) = 0.0_kind_io8 +! sicfcs(i) = 0.0_kind_io8 +! sitfcs(i) = tsffcs(i) +! else +! if (lake(i)) then +! crit = min_lakeice +! else +! crit = min_seaice +! endif +! if (sicfcs(i) < crit) then +! print *,'warning: check, slifcs and sicfcs', & +! & slifcs(i),sicfcs(i) +! endif +! endif +! enddo + ! ! ensure the consistency between slc and smc ! @@ -7323,8 +7331,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, & kpd7=-1 if (ialb == 1) then -!cbosu still need facsf and facwf. read them from the production -!cbosu file +!cbosu still need facsf and facwf. read them from the production file if ( index(fnalbc2, "tileX.nc") == 0) then ! grib file call fixrdc(lugb,fnalbc2,kpdalf(1),kpd7,kpd9,slmask &, alf,len,iret @@ -8133,8 +8140,7 @@ end subroutine clima !>\ingroup mod_sfcsub subroutine fixrdc_tile(filename_raw, tile_num_ch, & - & i_index, j_index, kpds, & - & var, mon, npts, me) + & i_index, j_index, kpds, var, mon, npts, me) use netcdf use machine , only : kind_io8 implicit none @@ -8151,7 +8157,8 @@ subroutine fixrdc_tile(filename_raw, tile_num_ch, & integer :: nx, ny, num_times integer :: id_var real(kind=4), allocatable :: dummy(:,:,:) - ii=index(filename_raw,"tileX") + + ii = index(filename_raw,"tileX") do i = 1, len(filename) filename(i:i) = " " From f49767db2b82519518ed2f474806ae32789176cf Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 28 May 2020 11:11:18 -0600 Subject: [PATCH 185/404] Add print statements for UFS debugging. --- physics/rrtmgp_sw_cloud_sampling.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 1104c8ae4..c335dfc81 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -204,9 +204,12 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! ! For GFDL MP just add precipitation optics to cloud-optics ! + print*,'ShapeC: ',shape(sw_optical_props_clouds%tau) + print*,'ShapeP: ',shape(sw_optical_props_precip%tau) do iGpt=1,sw_gas_props%get_ngpt() do iCol=1,nCol do iLay=1,nLev + write(*,"(a10,3i,2f10.4)") 'tauloc: ',iGpt,iCol,iLay,sw_optical_props_clouds%tau(iCol,iLay,iGpt),sw_optical_props_precip%tau(iCol,iLay,iGpt) tauloc = sw_optical_props_clouds%tau(iCol,iLay,iGpt) + & sw_optical_props_precip%tau(iCol,iLay,iGpt) if (tauloc > 0) then From ecd67779749491ca6d0e0ec6f71ab5e8535f8a7f Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 28 May 2020 11:11:39 -0600 Subject: [PATCH 186/404] Remove legacy code in physics/module_mp_thompson.F90 --- physics/module_mp_thompson.F90 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index b5c8da161..b3ccb7412 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -418,14 +418,8 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & !..OPTIONAL variables that control application of aerosol-aware scheme -#if 0 - REAL, DIMENSION(:,:,:), OPTIONAL, INTENT(IN) :: nwfa, nifa - REAL, DIMENSION(:,:), OPTIONAL, INTENT(IN) :: nwfa2d, nifa2d -#else -! DH* 20200208 - change dimensions for nasty init hack REAL, DIMENSION(:,:), OPTIONAL, INTENT(IN) :: nwfa, nifa REAL, DIMENSION(:), OPTIONAL, INTENT(IN) :: nwfa2d, nifa2d -#endif INTEGER, INTENT(IN) :: mpicomm, mpirank, mpiroot INTEGER, INTENT(IN) :: threads CHARACTER(len=*), INTENT(INOUT) :: errmsg From 70f1c0d1c9faee1156ed908d162999d749b69a2e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 28 May 2020 13:34:04 -0600 Subject: [PATCH 187/404] Cleanup SW cloud sampling routine. --- physics/rrtmgp_sw_cloud_sampling.F90 | 99 +++++++++++++--------------- 1 file changed, 46 insertions(+), 53 deletions(-) diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index c335dfc81..ced442e66 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -25,10 +25,10 @@ subroutine rrtmgp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0) ! Outputs integer, intent(out) :: & ipsdsw0 ! Initial permutation seed for McICA - + ! Set initial permutation seed for McICA, initially set to number of G-points ipsdsw0 = sw_gas_props%get_ngpt() - + end subroutine rrtmgp_sw_cloud_sampling_init ! ######################################################################################### @@ -91,14 +91,14 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd errmsg = '' errflg = 0 - ! + ! Only works w/ SDFs v15p2 and v16beta if (iovrsw .ne. 1 .and. iovrsw .ne. 3) then - errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' - errflg = 1 - call check_error_msg('rrtmgp_sw_cloud_sampling',errmsg) - return - endif - + errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' + errflg = 1 + call check_error_msg('rrtmgp_sw_cloud_sampling',errmsg) + return + endif + if (.not. doSWrad) return if (nDay .gt. 0) then ! @@ -106,7 +106,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sw_optical_props_clouds%alloc_2str(nday, nLev, sw_gas_props)) + sw_optical_props_clouds%alloc_2str(nday, nLev, sw_gas_props)) ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). if(isubcsw == 1) then ! advance prescribed permutation seed @@ -120,30 +120,27 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd endif ! Call McICA to generate subcolumns. - ! No need to call RNG second time for now, just use the same seeds for precip as clouds. - !! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - !! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) - !do iCol=1,ncol - ! call random_setseed(ipseed_sw(icol),rng_stat) - ! call random_number(rng1D,rng_stat) - ! rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) - !enddo + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + enddo ! Call McICA select case ( iovrsw ) case(1) ! Maximum-random call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) case(3) ! Exponential-random - ! No need to call RNG second time for now, just use the same seeds for precip as clouds. - !! Generate second RNG - !do iCol=1,ncol - ! call random_setseed(ipseed_sw(icol),rng_stat) - ! call random_number(rng1D,rng_stat) - ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) - !enddo + do iCol=1,ncol + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + enddo call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,cloud_overlap_param(:,1:nLev-1),cldfracMCICA)) + sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,cloud_overlap_param(:,1:nLev-1),cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA @@ -182,37 +179,32 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd select case ( iovrsw ) case(1) ! Maximum-random call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) + sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) case(3) ! Exponential-random - ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Generate second RNG - !do iCol=1,ncol - !call random_setseed(ipseed_sw(icol),rng_stat) - ! call random_number(rng1D,rng_stat) - ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) - !enddo + !do iCol=1,ncol + ! call random_setseed(ipseed_sw(icol),rng_stat) + ! call random_number(rng1D,rng_stat) + ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + !enddo call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac,precip_overlap_param(:,1:nLev-1),precipfracSAMP)) + sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac,precip_overlap_param(:,1:nLev-1),precipfracSAMP)) end select ! Map band optical depth to each g-point using McICA call check_error_msg('rrtmgp_sw_cloud_sampling_run',draw_samples(& - precipfracSAMP(idxday(1:nDay),:,:),sw_optical_props_precipByBand,sw_optical_props_precip)) - + precipfracSAMP(idxday(1:nDay),:,:),sw_optical_props_precipByBand,sw_optical_props_precip)) endif ! - ! For GFDL MP just add precipitation optics to cloud-optics + ! For GFDL MP just add precipitation optics to cloud-optics ! - print*,'ShapeC: ',shape(sw_optical_props_clouds%tau) - print*,'ShapeP: ',shape(sw_optical_props_precip%tau) - do iGpt=1,sw_gas_props%get_ngpt() - do iCol=1,nCol - do iLay=1,nLev - write(*,"(a10,3i,2f10.4)") 'tauloc: ',iGpt,iCol,iLay,sw_optical_props_clouds%tau(iCol,iLay,iGpt),sw_optical_props_precip%tau(iCol,iLay,iGpt) - tauloc = sw_optical_props_clouds%tau(iCol,iLay,iGpt) + & - sw_optical_props_precip%tau(iCol,iLay,iGpt) - if (tauloc > 0) then + do iGpt=1,sw_gas_props%get_ngpt() + do iCol=1,nCol + do iLay=1,nLev + tauloc = sw_optical_props_clouds%tau(iCol,iLay,iGpt) + & + sw_optical_props_precip%tau(iCol,iLay,iGpt) + if (sw_optical_props_precip%tau(iCol,iLay,iGpt) > 0) then ssaloc = (sw_optical_props_clouds%tau(iCol,iLay,iGpt) * & sw_optical_props_clouds%ssa(iCol,iLay,iGpt) + & sw_optical_props_precip%tau(iCol,iLay,iGpt) * & @@ -227,16 +219,17 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd sw_optical_props_precip%g(iCol,iLay,iGpt)) / & (tauloc*ssaloc) else - ssaloc = 1. - asyloc = 0. - endif + tauloc = sw_optical_props_clouds%tau(iCol,iLay,iGpt) + ssaloc = sw_optical_props_clouds%ssa(iCol,iLay,iGpt) + asyloc = sw_optical_props_clouds%g(iCol,iLay,iGpt) + endif sw_optical_props_clouds%tau(iCol,iLay,iGpt) = tauloc sw_optical_props_clouds%ssa(iCol,iLay,iGpt) = ssaloc sw_optical_props_clouds%g(iCol,iLay,iGpt) = asyloc - endif - enddo + endif + enddo enddo - enddo + enddo end subroutine rrtmgp_sw_cloud_sampling_run ! ######################################################################################### From 24376d32a7ba150713ffc6ab3de82e530670bfc9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 28 May 2020 13:59:36 -0600 Subject: [PATCH 188/404] Try using cloud-fraction for precipitation sampling. --- physics/rrtmgp_sw_cloud_optics.F90 | 4 ++-- physics/rrtmgp_sw_cloud_sampling.F90 | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 78b6f7e2a..a5f470617 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -356,14 +356,14 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& nday, nLev, sw_gas_props%get_band_lims_wavenumber())) sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys - sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%ssa(:,:,:) = 1._kind_phys sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys ! Cloud-precipitation optics [nday,nLev,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_precipByBand%alloc_2str(& nday, nLev, sw_gas_props%get_band_lims_wavenumber())) sw_optical_props_precipByBand%tau(:,:,:) = 0._kind_phys - sw_optical_props_precipByBand%ssa(:,:,:) = 0._kind_phys + sw_optical_props_precipByBand%ssa(:,:,:) = 1._kind_phys sw_optical_props_precipByBand%g(:,:,:) = 0._kind_phys ! Compute cloud/precipitation optics. diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index ced442e66..8412bd56c 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -11,9 +11,8 @@ module rrtmgp_sw_cloud_sampling implicit none contains - ! ######################################################################################### - ! SUBROUTINE mcica_init + ! SUBROUTINE rrtmgp_sw_cloud_sampling_init() ! ######################################################################################### !! \section arg_table_rrtmgp_sw_cloud_sampling_init !! \htmlinclude rrtmgp_sw_cloud_sampling.html @@ -193,7 +192,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Map band optical depth to each g-point using McICA call check_error_msg('rrtmgp_sw_cloud_sampling_run',draw_samples(& - precipfracSAMP(idxday(1:nDay),:,:),sw_optical_props_precipByBand,sw_optical_props_precip)) + cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_precipByBand,sw_optical_props_precip)) endif ! From 0d7483337842a7f50bf003818b37e316a46904d3 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 28 May 2020 14:30:57 -0600 Subject: [PATCH 189/404] Fixed nDay/nCol bug in sw cloud sampling. --- physics/rrtmgp_sw_cloud_sampling.F90 | 114 ++++++++++++++------------- 1 file changed, 59 insertions(+), 55 deletions(-) diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 8412bd56c..6d0f9ee97 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -78,13 +78,13 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd sw_optical_props_precip ! RRTMGP DDT: Shortwave optical properties at each spectral point (precipitation) ! Local variables - integer :: iCol,iLay,iGpt - integer,dimension(ncol) :: ipseed_sw + integer :: iday,iLay,iGpt + integer,dimension(nday) :: ipseed_sw type(random_stat) :: rng_stat real(kind_phys) :: tauloc,asyloc,ssaloc - real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 + real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,nday) :: rng3D,rng3D2 real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng1D - logical, dimension(ncol,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA,precipfracSAMP + logical, dimension(nday,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA,precipfracSAMP ! Initialize CCPP error handling variables errmsg = '' @@ -109,42 +109,44 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). if(isubcsw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed_sw(iCol) = ipsdsw0 + iCol + do iday = 1, nday + ipseed_sw(iday) = ipsdsw0 + iday enddo elseif (isubcsw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed_sw(iCol) = icseed_sw(iCol) + do iday = 1, nday + ipseed_sw(iday) = icseed_sw(iday) enddo endif ! Call McICA to generate subcolumns. ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_sw(icol),rng_stat) + ! and layers. ([nGpts,nLev,nDayumn]-> [nGpts*nLev]*nDayumn) + do iday=1,nday + call random_setseed(ipseed_sw(iday),rng_stat) call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + rng3D(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo ! Call McICA select case ( iovrsw ) case(1) ! Maximum-random call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + sampled_mask_max_ran(rng3D,cld_frac(idxday(1:nDay),:),cldfracMCICA)) case(3) ! Exponential-random - do iCol=1,ncol - call random_setseed(ipseed_sw(icol),rng_stat) + do iday=1,nday + call random_setseed(ipseed_sw(iday),rng_stat) call random_number(rng1D,rng_stat) - rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,cloud_overlap_param(:,1:nLev-1),cldfracMCICA)) + sampled_mask_exp_dcorr(rng3D, rng3D2, cld_frac(idxday(1:nDay),:), & + cloud_overlap_param(idxday(1:nDay),1:nLev-1), & + cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_sampling_run',draw_samples(& - cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_cloudsByBand,sw_optical_props_clouds)) + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + draw_samples(cldfracMCICA, sw_optical_props_cloudsByBand, sw_optical_props_clouds)) ! ! Next sample precipitation (same as clouds for now) @@ -155,76 +157,78 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). !if(isubcsw == 1) then ! advance prescribed permutation seed - ! do iCol = 1, ncol - ! ipseed_sw(iCol) = ipsdsw0 + iCol + ! do iday = 1, nday + ! ipseed_sw(iday) = ipsdsw0 + iday ! enddo !elseif (isubcsw == 2) then ! use input array of permutaion seeds - ! do iCol = 1, ncol - ! ipseed_sw(iCol) = icseed_sw(iCol) + ! do iday = 1, nday + ! ipseed_sw(iday) = icseed_sw(iday) ! enddo !endif ! Call McICA to generate subcolumns. ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - !! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) - !do iCol=1,ncol - ! call random_setseed(ipseed_sw(icol),rng_stat) + !! and layers. ([nGpts,nLev,nDay]-> [nGpts*nLev]*nDay) + !do iday=1,nday + ! call random_setseed(ipseed_sw(iday),rng_stat) ! call random_number(rng1D,rng_stat) - ! rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + ! rng3D(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) !enddo ! Call McICA select case ( iovrsw ) case(1) ! Maximum-random call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) + sampled_mask_max_ran(rng3D,precip_frac(idxday(1:nDay),:),precipfracSAMP)) case(3) ! Exponential-random !! Generate second RNG - !do iCol=1,ncol - ! call random_setseed(ipseed_sw(icol),rng_stat) + !do iday=1,nday + ! call random_setseed(ipseed_sw(iday),rng_stat) ! call random_number(rng1D,rng_stat) - ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + ! rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac,precip_overlap_param(:,1:nLev-1),precipfracSAMP)) + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac(idxday(1:nDay),:), & + precip_overlap_param(idxday(1:nDay),1:nLev-1), & + precipfracSAMP)) end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_sampling_run',draw_samples(& - cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_precipByBand,sw_optical_props_precip)) + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + draw_samples(precipfracSAMP, sw_optical_props_precipByBand, sw_optical_props_precip)) endif ! ! For GFDL MP just add precipitation optics to cloud-optics ! do iGpt=1,sw_gas_props%get_ngpt() - do iCol=1,nCol + do iday=1,nDay do iLay=1,nLev - tauloc = sw_optical_props_clouds%tau(iCol,iLay,iGpt) + & - sw_optical_props_precip%tau(iCol,iLay,iGpt) - if (sw_optical_props_precip%tau(iCol,iLay,iGpt) > 0) then - ssaloc = (sw_optical_props_clouds%tau(iCol,iLay,iGpt) * & - sw_optical_props_clouds%ssa(iCol,iLay,iGpt) + & - sw_optical_props_precip%tau(iCol,iLay,iGpt) * & - sw_optical_props_precip%ssa(iCol,iLay,iGpt)) / & + tauloc = sw_optical_props_clouds%tau(iday,iLay,iGpt) + & + sw_optical_props_precip%tau(iday,iLay,iGpt) + if (sw_optical_props_precip%tau(iday,iLay,iGpt) > 0) then + ssaloc = (sw_optical_props_clouds%tau(iday,iLay,iGpt) * & + sw_optical_props_clouds%ssa(iday,iLay,iGpt) + & + sw_optical_props_precip%tau(iday,iLay,iGpt) * & + sw_optical_props_precip%ssa(iday,iLay,iGpt)) / & tauloc if (ssaloc > 0) then - asyloc = (sw_optical_props_clouds%tau(iCol,iLay,iGpt) * & - sw_optical_props_clouds%ssa(iCol,iLay,iGpt) * & - sw_optical_props_clouds%g(iCol,iLay,iGpt) + & - sw_optical_props_precip%tau(iCol,iLay,iGpt) * & - sw_optical_props_precip%ssa(iCol,iLay,iGpt) * & - sw_optical_props_precip%g(iCol,iLay,iGpt)) / & + asyloc = (sw_optical_props_clouds%tau(iday,iLay,iGpt) * & + sw_optical_props_clouds%ssa(iday,iLay,iGpt) * & + sw_optical_props_clouds%g(iday,iLay,iGpt) + & + sw_optical_props_precip%tau(iday,iLay,iGpt) * & + sw_optical_props_precip%ssa(iday,iLay,iGpt) * & + sw_optical_props_precip%g(iday,iLay,iGpt)) / & (tauloc*ssaloc) else - tauloc = sw_optical_props_clouds%tau(iCol,iLay,iGpt) - ssaloc = sw_optical_props_clouds%ssa(iCol,iLay,iGpt) - asyloc = sw_optical_props_clouds%g(iCol,iLay,iGpt) + tauloc = sw_optical_props_clouds%tau(iday,iLay,iGpt) + ssaloc = sw_optical_props_clouds%ssa(iday,iLay,iGpt) + asyloc = sw_optical_props_clouds%g(iday,iLay,iGpt) endif - sw_optical_props_clouds%tau(iCol,iLay,iGpt) = tauloc - sw_optical_props_clouds%ssa(iCol,iLay,iGpt) = ssaloc - sw_optical_props_clouds%g(iCol,iLay,iGpt) = asyloc + sw_optical_props_clouds%tau(iday,iLay,iGpt) = tauloc + sw_optical_props_clouds%ssa(iday,iLay,iGpt) = ssaloc + sw_optical_props_clouds%g(iday,iLay,iGpt) = asyloc endif enddo enddo From 9d98056157ec6af0175b917bb73fbc69ed6b8799 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 28 May 2020 14:51:41 -0600 Subject: [PATCH 190/404] Housekeeeping. Working with both EMC SDFs in SCM and UFS. --- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 80 ++++++++++++++-------------- physics/rrtmgp_lw_cloud_optics.F90 | 46 ++++++++-------- physics/rrtmgp_lw_cloud_sampling.F90 | 14 ++--- physics/rrtmgp_sw_cloud_optics.F90 | 77 +++++++++++++------------- 4 files changed, 107 insertions(+), 110 deletions(-) diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 0ab67baa9..976443055 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -80,38 +80,38 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, ! Test inputs if (Model%ncnd .ne. 5) then - errmsg = 'Incorrect number of cloud condensates provided' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return + errmsg = 'Incorrect number of cloud condensates provided' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return endif ! if (lcrick) then - errmsg = 'Namelist option lcrick is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return + errmsg = 'Namelist option lcrick is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return endif ! if (lcnorm) then - errmsg = 'Namelist option lcnorm is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return - endif + errmsg = 'Namelist option lcnorm is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return + endif ! if (.not. Model%lgfdlmprad) then - errmsg = 'Namelist option gfdlmprad=F is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return + errmsg = 'Namelist option gfdlmprad=F is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return endif ! if(.not. Model%effr_in) then - errmsg = 'Namelist option effr_in=F is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return + errmsg = 'Namelist option effr_in=F is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return endif ! Initialize outputs @@ -148,35 +148,35 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, ! Cloud-fraction cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) - + ! Precipitation fraction (Hack. For now use cloud-fraction) precip_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) - ! Condensate and effective size - deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. + ! Condensate and effective size + deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. do k = 1, nLev do i = 1, nCol - ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) - if (cld_frac(i,k) .ge. cllimit) then - tem1 = gfac * deltaP(i,k) - cld_lwp(i,k) = cld_condensate(i,k,1) * tem1 - cld_iwp(i,k) = cld_condensate(i,k,2) * tem1 - cld_rwp(i,k) = cld_condensate(i,k,3) * tem1 - cld_swp(i,k) = cld_condensate(i,k,4) * tem1 - endif - ! Use radii provided from the macrophysics - cld_reliq(i,k) = Tbd%phy_f3d(i,k,1) - cld_reice(i,k) = max(reice_min, min(reice_max,Tbd%phy_f3d(i,k,2))) - cld_rerain(i,k) = Tbd%phy_f3d(i,k,3) - cld_resnow(i,k) = Tbd%phy_f3d(i,k,4) - enddo + ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) + if (cld_frac(i,k) .ge. cllimit) then + tem1 = gfac * deltaP(i,k) + cld_lwp(i,k) = cld_condensate(i,k,1) * tem1 + cld_iwp(i,k) = cld_condensate(i,k,2) * tem1 + cld_rwp(i,k) = cld_condensate(i,k,3) * tem1 + cld_swp(i,k) = cld_condensate(i,k,4) * tem1 + endif + ! Use radii provided from the macrophysics + cld_reliq(i,k) = Tbd%phy_f3d(i,k,1) + cld_reice(i,k) = max(reice_min, min(reice_max,Tbd%phy_f3d(i,k,2))) + cld_rerain(i,k) = Tbd%phy_f3d(i,k,3) + cld_resnow(i,k) = Tbd%phy_f3d(i,k,4) + enddo enddo end subroutine GFS_rrtmgp_gfdlmp_pre_run - + ! ######################################################################################### ! ######################################################################################### subroutine GFS_rrtmgp_gfdlmp_pre_finalize() end subroutine GFS_rrtmgp_gfdlmp_pre_finalize - + end module GFS_rrtmgp_gfdlmp_pre diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index aee4533a0..93e38994b 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -353,25 +353,25 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PAD cld_reice, & ! IN - Cloud ice effective radius (microns) lw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties ! in each band - ! Add in rain and snow(+groupel) - do iCol=1,nCol - do iLay=1,nLev - if (cld_frac(iCol,iLay) .gt. 0.) then - ! Rain optical-depth (No band dependence) - tau_rain = absrain*cld_rwp(iCol,iLay) - - ! Snow (+groupel) optical-depth (No band dependence) - if (cld_swp(iCol,iLay) .gt. 0. .and. cld_resnow(iCol,iLay) .gt. 10._kind_phys) then - tau_snow = abssnow0*1.05756*cld_swp(iCol,iLay)/cld_resnow(iCol,iLay) - else - tau_snow = 0.0 - endif - do iBand=1,lw_gas_props%get_nband() - lw_optical_props_precipByBand%tau(iCol,iLay,iBand) = tau_rain + tau_snow - enddo - endif - enddo - enddo + ! Add in rain and snow(+groupel) + do iCol=1,nCol + do iLay=1,nLev + if (cld_frac(iCol,iLay) .gt. 0.) then + ! Rain optical-depth (No band dependence) + tau_rain = absrain*cld_rwp(iCol,iLay) + + ! Snow (+groupel) optical-depth (No band dependence) + if (cld_swp(iCol,iLay) .gt. 0. .and. cld_resnow(iCol,iLay) .gt. 10._kind_phys) then + tau_snow = abssnow0*1.05756*cld_swp(iCol,iLay)/cld_resnow(iCol,iLay) + else + tau_snow = 0.0 + endif + do iBand=1,lw_gas_props%get_nband() + lw_optical_props_precipByBand%tau(iCol,iLay,iBand) = tau_rain + tau_snow + enddo + endif + enddo + enddo endif if (doG_cldoptics) then ! ii) RRTMG cloud-optics. @@ -382,11 +382,11 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PAD endif lw_optical_props_cloudsByBand%tau = tau_cld lw_optical_props_precipByBand%tau = tau_precip - endif - - ! All-sky LW optical depth ~10microns + endif + + ! All-sky LW optical depth ~10microns (DJS asks: Same as SW, move to cloud-diagnostics?) cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) - + end subroutine rrtmgp_lw_cloud_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index d783af9c1..2a9374e5c 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -89,12 +89,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! if (iovrlw .ne. 1 .and. iovrlw .ne. 3) then - errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' - errflg = 1 - call check_error_msg('rrtmgp_lw_cloud_sampling',errmsg) - return - endif - + errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' + errflg = 1 + call check_error_msg('rrtmgp_lw_cloud_sampling',errmsg) + return + endif + if (.not. doLWrad) return ! ! First sample the clouds... @@ -193,7 +193,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, precipfracSAMP,lw_optical_props_precipByBand,lw_optical_props_precip)) ! - ! For GFDL MP just add precipitation optics to cloud-optics + ! For GFDL MP just add precipitation optics to cloud-optics ! lw_optical_props_clouds%tau = lw_optical_props_clouds%tau + lw_optical_props_precip%tau diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index a5f470617..7ab3c27e3 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -28,14 +28,14 @@ module rrtmgp_sw_cloud_optics !! \htmlinclude rrtmgp_lw_cloud_optics.html !! subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, & - nrghice, rrtmgp_root_dir, rrtmgp_sw_file_clouds, mpicomm, mpirank, mpiroot, sw_cloud_props,& - errmsg, errflg) + nrghice, rrtmgp_root_dir, rrtmgp_sw_file_clouds, mpicomm, mpirank, mpiroot, sw_cloud_props,& + errmsg, errflg) ! Inputs logical, intent(in) :: & - doG_cldoptics, & ! Use legacy RRTMG cloud-optics? - doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? - doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? + doG_cldoptics, & ! Use legacy RRTMG cloud-optics? + doGP_cldoptics_PADE, & ! Use RRTMGP cloud-optics: PADE approximation? + doGP_cldoptics_LUT ! Use RRTMGP cloud-optics: LUTs? integer, intent(inout) :: & nrghice ! Number of ice-roughness categories integer, intent(in) :: & @@ -45,7 +45,7 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_ character(len=128),intent(in) :: & rrtmgp_root_dir, & ! RTE-RRTMGP root directory rrtmgp_sw_file_clouds ! RRTMGP file containing coefficients used to compute clouds optical properties - + ! Outputs type(ty_cloud_optics),intent(out) :: & sw_cloud_props ! RRTMGP DDT: shortwave spectral information @@ -53,7 +53,7 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_ errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error code - + ! Variables that will be passed to cloud_optics%load() real(kind_phys) :: & radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation @@ -268,18 +268,16 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE, doGP_ allocate(b0r(sw_cloud_props%get_nband()),b0s(sw_cloud_props%get_nband()), & b1s(sw_cloud_props%get_nband()),c0r(sw_cloud_props%get_nband()), & c0s(sw_cloud_props%get_nband())) - b0r = (/0.496, 0.466, 0.437, 0.416, 0.391, 0.374, 0.352, & - 0.183, 0.048, 0.012, 0.000, 0.000, 0.000, 0.000/) - b0s = (/0.460, 0.460, 0.460, 0.460, 0.460, 0.460, 0.460, & - 0.460, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000/) - b1s = (/0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,& + b0r = (/0.496, 0.466, 0.437, 0.416, 0.391, 0.374, 0.352, & + 0.183, 0.048, 0.012, 0.000, 0.000, 0.000, 0.000/) + b0s = (/0.460, 0.460, 0.460, 0.460, 0.460, 0.460, 0.460, & + 0.460, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000/) + b1s = (/0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, & 0.000, 1.62e-5, 1.62e-5, 0.000, 0.000, 0.000, 0.000/) - c0r = (/0.980, 0.975, 0.965, 0.960, 0.955, 0.952, 0.950, & - 0.944, 0.894, 0.884, 0.883, 0.883, 0.883, 0.883/) - c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, & - 0.970, 0.970, 0.970, 0.700, 0.700, 0.700, 0.700/) - - open(43,file='dumpGP.optics.txt',status='unknown') + c0r = (/0.980, 0.975, 0.965, 0.960, 0.955, 0.952, 0.950, & + 0.944, 0.894, 0.884, 0.883, 0.883, 0.883, 0.883/) + c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, & + 0.970, 0.970, 0.970, 0.700, 0.700, 0.700, 0.700/) end subroutine rrtmgp_sw_cloud_optics_init @@ -323,7 +321,7 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD sw_cloud_props ! RRTMGP DDT: shortwave cloud properties type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: shortwave K-distribution data - + ! Outputs character(len=*), intent(out) :: & errmsg ! CCPP error message @@ -334,18 +332,18 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD sw_optical_props_precipByBand ! RRTMGP DDT: Shortwave optical properties in each band (cloud precipitation) real(kind_phys), dimension(ncol,NLev), intent(out) :: & cldtausw ! Approx 10.mu band layer cloud optical depth - + ! Local variables integer :: iDay, iLay, iBand real(kind_phys) :: tau_rain, tau_snow, ssa_rain, ssa_snow, asy_rain, asy_snow, & tau_prec, asy_prec, ssa_prec, asyw, ssaw, za1, za2 real(kind_phys), dimension(nday,nLev,sw_gas_props%get_nband()) :: & tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip - + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - + if (.not. doSWrad) return ! Only process sunlit points... @@ -387,7 +385,7 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD else tau_snow = 0._kind_phys endif - + ! Rain/Snow single-scattering albedo and asymmetry (Band dependent) do iBand=1,sw_cloud_props%get_nband() ! By species @@ -395,8 +393,7 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD asy_rain = ssa_rain*c0r(iBand) ssa_snow = tau_snow*(1.-(b0s(iBand)+b1s(iBand)*1.0315*cld_resnow(idxday(iDay),iLay))) asy_snow = ssa_snow*c0s(iBand) - - ! Combine + ! Combine tau_prec = max(1.e-12_kind_phys, tau_rain + tau_snow) ssa_prec = max(1.e-12_kind_phys, ssa_rain + ssa_snow) asy_prec = max(1.e-12_kind_phys, asy_rain + asy_snow) @@ -407,10 +404,10 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD sw_optical_props_precipByBand%tau(iDay,iLay,iBand) = (1._kind_phys - za2) * tau_prec sw_optical_props_precipByBand%ssa(iDay,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) sw_optical_props_precipByBand%g(iDay,iLay,iBand) = asyw/(1+asyw) - enddo + enddo endif - enddo - enddo + enddo + enddo endif if (doG_cldoptics) then ! RRTMG cloud(+precipitation) optics @@ -420,27 +417,28 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & - cld_frac(idxday(1:nday),:), tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip) + cld_frac(idxday(1:nday),:), & + tau_cld, ssa_cld, asy_cld, & + tau_precip, ssa_precip, asy_precip) ! Cloud-optics (Need to reorder from G->GP band conventions) sw_optical_props_cloudsByBand%tau(:,:,1) = tau_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%ssa(:,:,1) = ssa_cld(:,:,sw_gas_props%get_nband()) sw_optical_props_cloudsByBand%g(:,:,1) = asy_cld(:,:,sw_gas_props%get_nband()) - sw_optical_props_cloudsByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_cld(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_cloudsByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_cld(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_cloudsByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_cld(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_cloudsByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_cld(:,:,1:sw_gas_props%get_nband()-1) ! Precipitation-optics (Need to reorder from G->GP band conventions) sw_optical_props_precipByBand%tau(:,:,1) = tau_precip(:,:,sw_gas_props%get_nband()) sw_optical_props_precipByBand%ssa(:,:,1) = ssa_precip(:,:,sw_gas_props%get_nband()) sw_optical_props_precipByBand%g(:,:,1) = asy_precip(:,:,sw_gas_props%get_nband()) - sw_optical_props_precipByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_precip(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_precipByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_precip(:,:,1:sw_gas_props%get_nband()-1) - sw_optical_props_precipByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_precip(:,:,1:sw_gas_props%get_nband()-1) - - endif + sw_optical_props_precipByBand%tau(:,:,2:sw_gas_props%get_nband()) = tau_precip(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_precipByBand%ssa(:,:,2:sw_gas_props%get_nband()) = ssa_precip(:,:,1:sw_gas_props%get_nband()-1) + sw_optical_props_precipByBand%g(:,:,2:sw_gas_props%get_nband()) = asy_precip(:,:,1:sw_gas_props%get_nband()-1) + endif endif - - ! All-sky SW optical depth ~0.55microns + + ! All-sky SW optical depth ~0.55microns (DJS asks: Move to cloud diagnostics?) cldtausw(idxday(1:nDay),:) = sw_optical_props_cloudsByBand%tau(:,:,11) endif @@ -450,7 +448,6 @@ end subroutine rrtmgp_sw_cloud_optics_run ! SUBROTUINE rrtmgp_sw_cloud_optics_finalize() ! ######################################################################################### subroutine rrtmgp_sw_cloud_optics_finalize() - close(43) end subroutine rrtmgp_sw_cloud_optics_finalize end module rrtmgp_sw_cloud_optics From 499b3ddb629e02d8d4956323f8901799baf003f0 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 1 Jun 2020 11:05:12 -0600 Subject: [PATCH 191/404] Renamed sampling routines. --- ...90 => rrtmgp_gfdlmp_lw_cloud_sampling.F90} | 48 +++++++++---------- ...a => rrtmgp_gfdlmp_lw_cloud_sampling.meta} | 4 +- ...90 => rrtmgp_gfdlmp_sw_cloud_sampling.F90} | 48 +++++++++---------- ...a => rrtmgp_gfdlmp_sw_cloud_sampling.meta} | 4 +- 4 files changed, 52 insertions(+), 52 deletions(-) rename physics/{rrtmgp_lw_cloud_sampling.F90 => rrtmgp_gfdlmp_lw_cloud_sampling.F90} (83%) rename physics/{rrtmgp_lw_cloud_sampling.meta => rrtmgp_gfdlmp_lw_cloud_sampling.meta} (97%) rename physics/{rrtmgp_sw_cloud_sampling.F90 => rrtmgp_gfdlmp_sw_cloud_sampling.F90} (87%) rename physics/{rrtmgp_sw_cloud_sampling.meta => rrtmgp_gfdlmp_sw_cloud_sampling.meta} (97%) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 similarity index 83% rename from physics/rrtmgp_lw_cloud_sampling.F90 rename to physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 index 2a9374e5c..94c813a94 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 @@ -1,4 +1,4 @@ -module rrtmgp_lw_cloud_sampling +module rrtmgp_gfdlmp_lw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubclw, iovrlw @@ -15,10 +15,10 @@ module rrtmgp_lw_cloud_sampling ! ######################################################################################### ! SUBROUTINE mcica_init ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_cloud_sampling_init -!! \htmlinclude rrtmgp_lw_cloud_sampling_init.html +!! \section arg_table_rrtmgp_gfdlmp_lw_cloud_sampling_init +!! \htmlinclude rrtmgp_gfdlmp_lw_cloud_sampling_init.html !! - subroutine rrtmgp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0) + subroutine rrtmgp_gfdlmp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! RRTMGP DDT: K-distribution data @@ -29,16 +29,16 @@ subroutine rrtmgp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0) ! Set initial permutation seed for McICA, initially set to number of G-points ipsdlw0 = lw_gas_props%get_ngpt() - end subroutine rrtmgp_lw_cloud_sampling_init + end subroutine rrtmgp_gfdlmp_lw_cloud_sampling_init ! ######################################################################################### - ! SUBROTUINE rrtmgp_lw_cloud_sampling_run() + ! SUBROTUINE rrtmgp_gfdlmp_lw_cloud_sampling_run() ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_cloud_sampling_run -!! \htmlinclude rrtmgp_lw_cloud_sampling_run.html +!! \section arg_table_rrtmgp_gfdlmp_lw_cloud_sampling_run +!! \htmlinclude rrtmgp_gfdlmp_lw_cloud_sampling_run.html !! - subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, cld_frac,& - precip_frac, cloud_overlap_param, precip_overlap_param, lw_gas_props, & + subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, & + cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, lw_gas_props, & lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, & lw_optical_props_clouds, lw_optical_props_precip, errmsg, errflg) @@ -91,7 +91,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, if (iovrlw .ne. 1 .and. iovrlw .ne. 3) then errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' errflg = 1 - call check_error_msg('rrtmgp_lw_cloud_sampling',errmsg) + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling',errmsg) return endif @@ -100,7 +100,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! First sample the clouds... ! ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] - call check_error_msg('rrtmgp_lw_cloud_sampling_run',& + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& lw_optical_props_clouds%alloc_1scl(nCol, nLev, lw_gas_props)) ! Change random number seed value for each radiation invocation (isubclw =1 or 2). @@ -127,7 +127,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, select case ( iovrlw ) ! Maximumn-random case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) case(3) ! Exponential decorrelation length overlap ! Generate second RNG do iCol=1,ncol @@ -135,19 +135,19 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, call random_number(rng1D,rng_stat) rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_lw_cloud_sampling_run',& + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,cloud_overlap_param(:,1:nLev-1),cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_sampling_run',draw_samples(& + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',draw_samples(& cldfracMCICA,lw_optical_props_cloudsByBand,lw_optical_props_clouds)) ! ! Next sample the precipitation... ! ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] - call check_error_msg('rrtmgp_lw_cloud_sampling_run',& + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& lw_optical_props_precip%alloc_1scl(nCol, nLev, lw_gas_props)) ! Change random number seed value for each radiation invocation (isubclw =1 or 2). @@ -175,7 +175,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, select case ( iovrlw ) ! Maximumn-random case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) case(3) ! Exponential decorrelation length overlap ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Generate second RNG @@ -184,12 +184,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac,precip_overlap_param(:,1:nLev-1),precipfracSAMP)) end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_sampling_run',draw_samples(& + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',draw_samples(& precipfracSAMP,lw_optical_props_precipByBand,lw_optical_props_precip)) ! @@ -197,12 +197,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! lw_optical_props_clouds%tau = lw_optical_props_clouds%tau + lw_optical_props_precip%tau - end subroutine rrtmgp_lw_cloud_sampling_run + end subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run ! ######################################################################################### - ! SUBROTUINE rrtmgp_lw_cloud_sampling_finalize() + ! SUBROTUINE rrtmgp_gfdlmp_lw_cloud_sampling_finalize() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_sampling_finalize() - end subroutine rrtmgp_lw_cloud_sampling_finalize + subroutine rrtmgp_gfdlmp_lw_cloud_sampling_finalize() + end subroutine rrtmgp_gfdlmp_lw_cloud_sampling_finalize -end module rrtmgp_lw_cloud_sampling +end module rrtmgp_gfdlmp_lw_cloud_sampling diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.meta similarity index 97% rename from physics/rrtmgp_lw_cloud_sampling.meta rename to physics/rrtmgp_gfdlmp_lw_cloud_sampling.meta index d54932fa3..2a1699c34 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.meta @@ -1,5 +1,5 @@ [ccpp-arg-table] - name = rrtmgp_lw_cloud_sampling_init + name = rrtmgp_gfdlmp_lw_cloud_sampling_init type = scheme [lw_gas_props] standard_name = coefficients_for_lw_gas_optics @@ -20,7 +20,7 @@ ###################################################### [ccpp-arg-table] - name = rrtmgp_lw_cloud_sampling_run + name = rrtmgp_gfdlmp_lw_cloud_sampling_run type = scheme [doLWrad] standard_name = flag_to_calc_lw diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 similarity index 87% rename from physics/rrtmgp_sw_cloud_sampling.F90 rename to physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 index 6d0f9ee97..19f0a2d8a 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 @@ -1,4 +1,4 @@ -module rrtmgp_sw_cloud_sampling +module rrtmgp_gfdlmp_sw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubcsw, iovrsw @@ -12,12 +12,12 @@ module rrtmgp_sw_cloud_sampling contains ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_cloud_sampling_init() + ! SUBROUTINE rrtmgp_gfdlmp_sw_cloud_sampling_init() ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_cloud_sampling_init -!! \htmlinclude rrtmgp_sw_cloud_sampling.html +!! \section arg_table_rrtmgp_gfdlmp_sw_cloud_sampling_init +!! \htmlinclude rrtmgp_gfdlmp_sw_cloud_sampling.html !! - subroutine rrtmgp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0) + subroutine rrtmgp_gfdlmp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: K-distribution data @@ -28,15 +28,15 @@ subroutine rrtmgp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0) ! Set initial permutation seed for McICA, initially set to number of G-points ipsdsw0 = sw_gas_props%get_ngpt() - end subroutine rrtmgp_sw_cloud_sampling_init + end subroutine rrtmgp_gfdlmp_sw_cloud_sampling_init ! ######################################################################################### - ! SUBROTUINE rrtmgp_sw_cloud_sampling_run() + ! SUBROTUINE rrtmgp_gfdlmp_sw_cloud_sampling_run() ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_cloud_sampling_run -!! \htmlinclude rrtmgp_sw_cloud_sampling.html +!! \section arg_table_rrtmgp_gfdlmp_sw_cloud_sampling_run +!! \htmlinclude rrtmgp_gfdlmp_sw_cloud_sampling.html !! - subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & + subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & icseed_sw, cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, & sw_gas_props, sw_optical_props_cloudsByBand, sw_optical_props_precipByBand, & sw_optical_props_clouds, sw_optical_props_precip, errmsg, errflg) @@ -94,7 +94,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd if (iovrsw .ne. 1 .and. iovrsw .ne. 3) then errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' errflg = 1 - call check_error_msg('rrtmgp_sw_cloud_sampling',errmsg) + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling',errmsg) return endif @@ -104,7 +104,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! First sample the clouds... ! ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & sw_optical_props_clouds%alloc_2str(nday, nLev, sw_gas_props)) ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). @@ -130,7 +130,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Call McICA select case ( iovrsw ) case(1) ! Maximum-random - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & sampled_mask_max_ran(rng3D,cld_frac(idxday(1:nDay),:),cldfracMCICA)) case(3) ! Exponential-random do iday=1,nday @@ -138,21 +138,21 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd call random_number(rng1D,rng_stat) rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D, rng3D2, cld_frac(idxday(1:nDay),:), & cloud_overlap_param(idxday(1:nDay),1:nLev-1), & cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & draw_samples(cldfracMCICA, sw_optical_props_cloudsByBand, sw_optical_props_clouds)) ! ! Next sample precipitation (same as clouds for now) ! ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] - call check_error_msg('rrtmgp_sw_cloud_sampling_run',sw_optical_props_precip%alloc_2str( & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run',sw_optical_props_precip%alloc_2str( & nday, nLev, sw_gas_props)) ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). @@ -179,7 +179,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Call McICA select case ( iovrsw ) case(1) ! Maximum-random - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & sampled_mask_max_ran(rng3D,precip_frac(idxday(1:nDay),:),precipfracSAMP)) case(3) ! Exponential-random !! Generate second RNG @@ -188,14 +188,14 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac(idxday(1:nDay),:), & precip_overlap_param(idxday(1:nDay),1:nLev-1), & precipfracSAMP)) end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & draw_samples(precipfracSAMP, sw_optical_props_precipByBand, sw_optical_props_precip)) endif @@ -233,12 +233,12 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd enddo enddo enddo - end subroutine rrtmgp_sw_cloud_sampling_run + end subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run ! ######################################################################################### - ! SUBROTUINE rrtmgp_sw_cloud_sampling_finalize() + ! SUBROTUINE rrtmgp_gfdlmp_sw_cloud_sampling_finalize() ! ######################################################################################### - subroutine rrtmgp_sw_cloud_sampling_finalize() - end subroutine rrtmgp_sw_cloud_sampling_finalize + subroutine rrtmgp_gfdlmp_sw_cloud_sampling_finalize() + end subroutine rrtmgp_gfdlmp_sw_cloud_sampling_finalize -end module rrtmgp_sw_cloud_sampling +end module rrtmgp_gfdlmp_sw_cloud_sampling diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.meta similarity index 97% rename from physics/rrtmgp_sw_cloud_sampling.meta rename to physics/rrtmgp_gfdlmp_sw_cloud_sampling.meta index 4afdaa4db..cdf3dc977 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.meta @@ -1,5 +1,5 @@ [ccpp-arg-table] - name = rrtmgp_sw_cloud_sampling_init + name = rrtmgp_gfdlmp_sw_cloud_sampling_init type = scheme [sw_gas_props] standard_name = coefficients_for_sw_gas_optics @@ -20,7 +20,7 @@ ###################################################### [ccpp-arg-table] - name = rrtmgp_sw_cloud_sampling_run + name = rrtmgp_gfdlmp_sw_cloud_sampling_run type = scheme [doSWrad] standard_name = flag_to_calc_sw From d9816a2d2d66fc679e5b475bee11612a17582e13 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 2 Jun 2020 07:29:12 -0600 Subject: [PATCH 192/404] physics/mp_thompson.{F90,meta}: cleanup use of optional arguments for cloud effective radii --- physics/mp_thompson.F90 | 61 +++++++++++++++++++++++----------------- physics/mp_thompson.meta | 6 ++-- 2 files changed, 38 insertions(+), 29 deletions(-) diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index 824c4f63c..3f2ee144e 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -67,9 +67,9 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & real(kind_phys), intent(in ) :: phil(:,:) real(kind_phys), intent(in ) :: area(:) ! Cloud effective radii - real(kind_phys), optional, intent(inout) :: re_cloud(:,:) - real(kind_phys), optional, intent(inout) :: re_ice(:,:) - real(kind_phys), optional, intent(inout) :: re_snow(:,:) + real(kind_phys), optional, intent( out) :: re_cloud(:,:) + real(kind_phys), optional, intent( out) :: re_ice(:,:) + real(kind_phys), optional, intent( out) :: re_snow(:,:) ! MPI information integer, intent(in ) :: mpicomm integer, intent(in ) :: mpirank @@ -319,31 +319,40 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & end if ! Calculate initial cloud effective radii if requested - do i = 1, ncol - do k = 1, nlev - re_cloud(i,k) = 2.49E-6 - re_ice(i,k) = 4.99E-6 - re_snow(i,k) = 9.99E-6 + if (present(re_cloud) .and. present(re_ice) .and. present(re_snow)) then + do i = 1, ncol + do k = 1, nlev + re_cloud(i,k) = 2.49E-6 + re_ice(i,k) = 4.99E-6 + re_snow(i,k) = 9.99E-6 + end do + end do + do i = 1, ncol + call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & + nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & + re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, nlev) end do - end do - do i = 1, ncol - call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & - nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & - re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, nlev) - end do - do i = 1, ncol - do k = 1, nlev - re_cloud(i,k) = MAX(2.49E-6, MIN(re_cloud(i,k), 50.E-6)) - re_ice(i,k) = MAX(4.99E-6, MIN(re_ice(i,k), 125.E-6)) - re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) + do i = 1, ncol + do k = 1, nlev + re_cloud(i,k) = MAX(2.49E-6, MIN(re_cloud(i,k), 50.E-6)) + re_ice(i,k) = MAX(4.99E-6, MIN(re_ice(i,k), 125.E-6)) + re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) + end do end do - end do - ! Convert to micron: required for bit-for-bit identical restarts; - ! otherwise entering mp_thompson_init and converting mu to m and - ! back (without updating re_*) introduces b4b differences. - re_cloud = 1.0E6*re_cloud - re_ice = 1.0E6*re_ice - re_snow = 1.0E6*re_snow + !! Convert to micron: required for bit-for-bit identical restarts; + !! otherwise entering mp_thompson_init and converting mu to m and + !! back (without updating re_*) introduces b4b differences. + !! If this code is used, change units in metadata from m to um! + !re_cloud = 1.0E6*re_cloud + !re_ice = 1.0E6*re_ice + !re_snow = 1.0E6*re_snow + else if (present(re_cloud) .or. present(re_ice) .or. present(re_snow)) then + write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_init:', & + ' all or none of the following optional', & + ' arguments are required: re_cloud, re_ice, re_snow' + errflg = 1 + return + end if !> - Convert number concentrations from dry to moist ni = ni_mp/(1.0_kind_phys+qv_mp) diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 81b2241e1..5bbd85732 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -223,7 +223,7 @@ [re_cloud] standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer - units = um + units = m dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -232,7 +232,7 @@ [re_ice] standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer - units = um + units = m dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -241,7 +241,7 @@ [re_snow] standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometer - units = um + units = m dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys From a219a4750614a5457fd7b7315ea804c4adad679e Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 2 Jun 2020 07:29:31 -0600 Subject: [PATCH 193/404] physics/GFS_rrtmg_pre.F90: cleanup calculation of cloud effective radii, fix bugs --- physics/GFS_rrtmg_pre.F90 | 134 ++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 79 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index d2ecef895..84732e401 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -581,7 +581,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input if (Model%imp_physics == Model%imp_physics_thompson .and. Model%ltaerosol) then do k=1,LMK do i=1,IM - qvs = Statein%qgrs(i,k2,1) + qvs = Statein%qgrs(i,k,1) qv_mp (i,k) = qvs/(1.-qvs) qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) @@ -594,7 +594,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input elseif (Model%imp_physics == Model%imp_physics_thompson) then do k=1,LMK do i=1,IM - qvs = Statein%qgrs(i,k2,1) + qvs = Statein%qgrs(i,k,1) qv_mp (i,k) = qvs/(1.-qvs) qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) @@ -701,76 +701,60 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo endif elseif (Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP - if(Model%kdt == 1 ) then - do k=1,lm - k1 = k + kd - do i=1,im - effrl(i,k1) = Tbd%phy_f3d(i,k,Model%nleffr) - effri(i,k1) = Tbd%phy_f3d(i,k,Model%nieffr) - effrr(i,k1) = 1000. ! rrain_def=1000. - effrs(i,k1) = Tbd%phy_f3d(i,k,Model%nseffr) - enddo + ! + ! Compute effective radii for QC, QI, QS with (GF, MYNN) or without (all others) sub-grid clouds + ! + ! Update number concentration, consistent with sub-grid clouds (GF, MYNN) or without (all others) + do k=1,lm + do i=1,im + if (Model%ltaerosol .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then + nc_mp(i,k) = make_DropletNumber(qc_mp(i,k)*rho(i,k), nwfa(i,k)) * orho(i,k) + endif + if (qi_mp(i,k)>1.e-12 .and. ni_mp(i,k)<100.) then + ni_mp(i,k) = make_IceNumber(qi_mp(i,k)*rho(i,k), tlyr(i,k)) * orho(i,k) + endif + end do + end do + ! Call Thompson's subroutine to compute effective radii + do i=1,im + ! Initialize to default in units m as in module_mp_thompson.F90 + re_cloud(i,:) = 2.49E-6 + re_ice(i,:) = 4.99E-6 + re_snow(i,:) = 9.99E-6 + call calc_effectRad (tlyr(i,:), plyr(i,:), qv_mp(i,:), qc_mp(i,:), & + nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & + re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, lm ) + end do + ! Scale Thompson's effective radii from meter to micron and apply bounds + do k=1,lm + do i=1,im + re_cloud(i,k) = MAX(2.49, MIN(re_cloud(i,k)*1.e6, 50.)) + re_ice(i,k) = MAX(4.99, MIN(re_ice(i,k)*1.e6, 125.)) + !tgs: clduni has different limits for ice radii: 10.0-150.0 + ! it will raise the low limit from 5 to 10, but the + ! high limit will remain 125. + re_snow(i,k) = MAX(9.99, MIN(re_snow(i,k)*1.e6, 999.)) + end do + end do + do k=1,lm + k1 = k + kd + do i=1,im + effrl(i,k1) = re_cloud (i,k) + effri(i,k1) = re_ice (i,k) + effrr(i,k1) = 1000. ! rrain_def=1000. + effrs(i,k1) = re_snow(i,k) enddo - else ! kdt>1 - if(Model%do_mynnedmf .or. & - Model%imfdeepcnv == Model%imfdeepcnv_gf ) then - !tgs - take into account sub-grid clouds from GF or MYNN PBL - - ! Compute effective radii for QC and QI with sub-grid clouds - do k=1,lm - do i=1,im - ! make NC consistent with sub-grid clouds - if (Model%ltaerosol .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then - nc_mp(i,k) = make_DropletNumber(qc_mp(i,k)*rho(i,k), nwfa(i,k)) * orho(i,k) - endif - if (qi_mp(i,k)>1.e-12 .and. ni_mp(i,k)<100.) then - ni_mp(i,k) = make_IceNumber(qi_mp(i,k)*rho(i,k), tlyr(i,k)) * orho(i,k) - endif - end do - end do - ! Call Thompson's subroutine to compute effective radii - do i=1,im - ! Initialize to default in units m as in module_mp_thompson.F90 - re_cloud(i,:) = 2.49E-6 - re_ice(i,:) = 4.99E-6 - re_snow(i,:) = 9.99E-6 - call calc_effectRad (tlyr(i,:), plyr(i,:), qv_mp(i,:), qc_mp(i,:), & - nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & - re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, lm ) - end do - do k=1,lm - do i=1,im - re_cloud(i,k) = MAX(2.49, MIN(re_cloud(i,k)*1.e6, 50.)) - re_ice(i,k) = MAX(4.99, MIN(re_ice(i,k)*1.e6, 125.)) - !tgs: clduni has different limits for ice radii: 10.0-150.0 - ! it will raise the low limit from 5 to 10, but the - ! high limit will remain 125. - re_snow(i,k) = MAX(9.99, MIN(re_snow(i,k)*1.e6, 999.)) - end do - end do - - do k=1,lm - k1 = k + kd - do i=1,im - effrl(i,k1) = re_cloud (i,k) ! Tbd%phy_f3d(i,k,Model%nleffr) - effri(i,k1) = re_ice (i,k) ! Tbd%phy_f3d(i,k,Model%nieffr) - effrr(i,k1) = 1000. ! rrain_def=1000. - effrs(i,k1) = Tbd%phy_f3d(i,k,Model%nseffr) - enddo - enddo - else ! not MYNN or not GF - do k=1,lm - k1 = k + kd - do i=1,im - effrl(i,k1) = Tbd%phy_f3d(i,k,Model%nleffr) - effri(i,k1) = Tbd%phy_f3d(i,k,Model%nieffr) - effrr(i,k1) = 1000. ! rrain_def=1000. - effrs(i,k1) = Tbd%phy_f3d(i,k,Model%nseffr) - enddo - enddo - endif ! MYNN PBL or GF conv - endif ! kdt - else ! neither of the other two cases + enddo + ! Update global arrays + do k=1,lm + k1 = k + kd + do i=1,im + Tbd%phy_f3d(i,k,Model%nleffr) = effrl(i,k1) + Tbd%phy_f3d(i,k,Model%nieffr) = effri(i,k1) + Tbd%phy_f3d(i,k,Model%nseffr) = effrs(i,k1) + enddo + enddo + else ! all other cases cldcov = 0.0 endif @@ -936,14 +920,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input else ! kdt > 1 - do k=1,lm - k1 = k + kd - do i=1,im - Tbd%phy_f3d(i,k,Model%nleffr) = effrl(i,k1) - Tbd%phy_f3d(i,k,Model%nieffr) = effri(i,k1) - Tbd%phy_f3d(i,k,Model%nseffr) = effrs(i,k1) - enddo - enddo ! --- call progcld6 to get Xu-Randall total cloud cover (clouds(:,1:LMK,1)) ! tgs: a short subroutine could be made of progcld5 to ! compute only total cloud fraction. From 2aa91ae97ef29195995317ee2285972c0abc1afb Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 2 Jun 2020 15:04:04 -0600 Subject: [PATCH 194/404] physics/GFS_suite_interstitial.F90: update of calculation of number concentrations for Thompson MP --- physics/GFS_suite_interstitial.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 3d22cf33b..466bcbb19 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -728,7 +728,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to qc_mp(i,k) = (clw(i,k,2)-save_qc(i,k))/(1.0_kind_phys-spechum(i,k)) !> - Convert number concentration from moist to dry nc_mp(i,k) = gq0(i,k,ntlnc)/(1.0_kind_phys-spechum(i,k)) - nc_mp(i,k) = nc_mp(i,k) + max(0.0, make_DropletNumber(qc_mp(i,k) * rho_dryair(i,k), nwfa(i,k)) * (1.0/rho_dryair(i,k))) + nc_mp(i,k) = max(0.0, nc_mp(i,k) + make_DropletNumber(qc_mp(i,k) * rho_dryair(i,k), nwfa(i,k)) * (1.0/rho_dryair(i,k))) !> - Convert number concentrations from dry to moist gq0(i,k,ntlnc) = nc_mp(i,k)/(1.0_kind_phys+qv_mp(i,k)) endif @@ -737,7 +737,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, cplchm, tracers_to qi_mp(i,k) = (clw(i,k,1)-save_qi(i,k))/(1.0_kind_phys-spechum(i,k)) !> - Convert number concentration from moist to dry ni_mp(i,k) = gq0(i,k,ntinc)/(1.0_kind_phys-spechum(i,k)) - ni_mp(i,k) = ni_mp(i,k) + max(0.0, make_IceNumber(qi_mp(i,k) * rho_dryair(i,k), save_tcp(i,k)) * (1.0/rho_dryair(i,k))) + ni_mp(i,k) = max(0.0, ni_mp(i,k) + make_IceNumber(qi_mp(i,k) * rho_dryair(i,k), save_tcp(i,k)) * (1.0/rho_dryair(i,k))) !> - Convert number concentrations from dry to moist gq0(i,k,ntinc) = ni_mp(i,k)/(1.0_kind_phys+qv_mp(i,k)) endif From ba106f70277426dac36094da8566435098b54422 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 30 Apr 2020 12:20:25 -0600 Subject: [PATCH 195/404] fix unitialized parameters in samfdeepcnv --- physics/samfdeepcnv.f | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index c2a9aba93..c0c264749 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -205,7 +205,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c physical parameters ! parameter(asolfac=0.89) !HWRF ! parameter(grav=grav) -! parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) +! parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) ! parameter(c0s=.002,c1=.002,d0=.01) ! parameter(d0=.01) parameter(d0=.001) @@ -219,7 +219,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! as Nccn=100 for sea and Nccn=1000 for land ! parameter(cm=1.0) -! parameter(fact1=(cvap-cliq)/rv,fact2=hvap/rv-fact1*t0c) +! parameter(fact1=(cvap-cliq)/rv,fact2=hvap/rv-fact1*t0c) parameter(clamd=0.03,tkemx=0.65,tkemn=0.05) parameter(dtke=tkemx-tkemn) parameter(dbeta=0.1) @@ -280,13 +280,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & errflg = 0 - if(.not. hwrf_samfdeep) then elocp = hvap/cp el2orc = hvap*hvap/(rv*cp) fact1 = (cvap-cliq)/rv fact2 = hvap/rv-fact1*t0c ! + if(.not. hwrf_samfdeep) then c----------------------------------------------------------------------- !> ## Determine whether to perform aerosol transport do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) From 42aa6e41c56637dbf8b2156ca8cbc8cf335117e2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 3 Jun 2020 09:51:46 -0600 Subject: [PATCH 196/404] Bugfixes, and formatting changes in physics/samfdeepcnv.f --- physics/samfdeepcnv.f | 83 ++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 52 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index c0c264749..8040c30c1 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -203,13 +203,12 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & bb1, bb2, wucb ! c physical parameters -! parameter(asolfac=0.89) !HWRF -! parameter(grav=grav) -! parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) +! parameter(grav=grav,asolfac=0.958) +! parameter(elocp=hvap/cp,el2orc=hvap*hvap/(rv*cp)) ! parameter(c0s=.002,c1=.002,d0=.01) ! parameter(d0=.01) parameter(d0=.001) -! parameter(c0l=c0s*asolfac) +! parameter(c0l=c0s*asolfac) ! ! asolfac: aerosol-aware parameter based on Lim (2011) ! asolfac= cx / c0s(=.002) @@ -219,7 +218,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! as Nccn=100 for sea and Nccn=1000 for land ! parameter(cm=1.0) -! parameter(fact1=(cvap-cliq)/rv,fact2=hvap/rv-fact1*t0c) +! parameter(fact1=(cvap-cliq)/rv,fact2=hvap/rv-fact1*t0c) parameter(clamd=0.03,tkemx=0.65,tkemn=0.05) parameter(dtke=tkemx-tkemn) parameter(dbeta=0.1) @@ -229,6 +228,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & parameter(cinacrmx=-120.,cinacrmn=-80.) parameter(bet1=1.875,cd1=.506,f1=2.0,gam1=.5) parameter(betaw=.03,dxcrtas=8.e3,dxcrtuf=15.e3) + ! ! local variables and arrays real(kind=kind_phys) pfld(im,km), to(im,km), qo(im,km), @@ -274,21 +274,21 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & real(kind=kind_phys) tf, tcr, tcrf parameter (tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf)) - ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - elocp = hvap/cp - el2orc = hvap*hvap/(rv*cp) + elocp = hvap/cp + el2orc = hvap*hvap/(rv*cp) - fact1 = (cvap-cliq)/rv - fact2 = hvap/rv-fact1*t0c -! - if(.not. hwrf_samfdeep) then + fact1 = (cvap-cliq)/rv + fact2 = hvap/rv-fact1*t0c c----------------------------------------------------------------------- !> ## Determine whether to perform aerosol transport + if(hwrf_samfdeep) then + do_aerosols = .false. + else do_aerosols = (itc > 0) .and. (ntc > 0) .and. (ntr > 0) if (do_aerosols) do_aerosols = (ntr >= itc + ntc - 3) endif @@ -342,7 +342,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & rainevap(i) = 0. gdx(i) = sqrt(garea(i)) enddo - else do i=1,im cnvflg(i) = .true. @@ -375,7 +374,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & vshear(i) = 0. rainevap(i) = 0. gdx(i) = sqrt(garea(i)) - !HWRF SAS scaldfunc(i)=-1.0 sigmagfm(i)=-1.0 @@ -391,7 +389,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c0(i) = c0s endif enddo - !> - determine rain conversion parameter above the freezing level which exponentially decreases with decreasing temperature from Han et al.'s (2017) \cite han_et_al_2017 equation 8. do k = 1, km do i = 1, im @@ -420,7 +417,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & dt_mf(i,k) = 0. enddo enddo - if(mp_phys == mp_phys_mg) then do k = 1, km do i = 1, im @@ -461,7 +457,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & crtlame = 1.0e-4 cxlame = 1.0e-4 endif - crtlamd = 1.0e-4 cxlamd = 1.0e-4 xlamde = 1.0e-4 @@ -527,7 +522,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo endif - c c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! c convert surface pressure to mb from cb @@ -684,7 +678,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo - if (.not.hwrf_samfdeep) then do n = 1, ntr do k = 1, km1 @@ -773,7 +766,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ptem1= .5*(cinpcrmx-cinpcrmn) cinpcr = cinpcrmx - ptem * ptem1 tem1 = pfld(i,kb(i)) - pfld(i,kbcon(i)) - if(tem1 > cinpcr) then cnvflg(i) = .false. endif @@ -793,12 +785,12 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & totflg = totflg .and. (.not. cnvflg(i)) enddo if(totflg) return - - if (.not. hwrf_samfdeep) then +!! +! ! turbulent entrainment rate assumed to be proportional ! to subcloud mean TKE ! - if(ntk > 0) then + if(.not. hwrf_samfdeep .and. ntk > 0) then ! do i= 1, im if(cnvflg(i)) then @@ -854,7 +846,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo endif ! - endif + endif !(.not. hwrf_samfdeep .and. ntk > 0) ! ! also initially assume updraft entrainment rate ! is an inverse function of height @@ -867,8 +859,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo - - endif !(.not.hwrf_samfdeep) c c assume that updraft entrainment rate above cloud base is c same as that at cloud base @@ -1019,14 +1009,14 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo if (.not.hwrf_samfdeep) then ! for tracers - do n = 1, ntr + do n = 1, ntr do i = 1, im if(cnvflg(i)) then indx = kb(i) ecko(i,indx,n) = ctro(i,indx,n) endif enddo - enddo + enddo endif c c cloud property is modified by the entrainment process @@ -1149,7 +1139,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo !> - Turn off convection if the CIN is less than a critical value (cinacr) which is inversely proportional to the large-scale vertical velocity. - if(hwrf_samfdeep) then do i = 1, im if(cnvflg(i)) then @@ -1532,8 +1521,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! compute updraft velocity square(wu2) !> - Calculate updraft velocity square(wu2) according to Han et al.'s (2017) \cite han_et_al_2017 equation 7. ! - bb1 = 4.0 - bb2 = 0.8 + bb1 = 4.0 + bb2 = 0.8 if (hwrf_samfdeep) then do i = 1, im if (cnvflg(i)) then @@ -1949,7 +1938,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & - vo(i,1)) * grav / dp endif enddo - if (.not.hwrf_samfdeep) then do n = 1, ntr do i = 1, im @@ -2072,7 +2060,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & qlko_ktcon(i) * grav / dp endif enddo - if (.not.hwrf_samfdeep) then do n = 1, ntr do i = 1, im @@ -2115,7 +2102,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo - c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! c c--- the above changed environment is now used to calulate the @@ -2452,7 +2438,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & ! compute convective turn-over time ! !> - Following Bechtold et al. (2008) \cite bechtold_et_al_2008, the convective adjustment time (dtconv) is set to be proportional to the convective turnover time, which is computed using the mean updraft velocity (wc) and the cloud depth. It is also proportional to the grid size (gdx). - if(hwrf_samfdeep) then do i= 1, im if(cnvflg(i)) then @@ -2474,7 +2459,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo endif - ! !> - Calculate advective time scale (tauadv) using a mean cloud layer wind speed. do i= 1, im @@ -2513,7 +2497,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & xmb(i) = tfac*betaw*rho*wc(i) endif enddo - !> - For the cases where the quasi-equilibrium assumption of Arakawa-Schubert is valid, first calculate the large scale destabilization as in equation 5 of Pan and Wu (1995) \cite pan_and_wu_1995 : !! \f[ !! \frac{\partial A}{\partial t}_{LS}=\frac{A^+-cA^0}{\Delta t_{LS}} @@ -2565,7 +2548,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo if(totflg) return !! - +! !> - For scale-aware parameterization, the updraft fraction (sigmagfm) is first computed as a function of the lateral entrainment rate at cloud base (see Han et al.'s (2017) \cite han_et_al_2017 equation 4 and 5), following the study by Grell and Freitas (2014) \cite grell_and_freitas_2014. if(hwrf_samfdeep) then do i = 1, im @@ -2592,8 +2575,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif ! !> - Then, calculate the reduction factor (scaldfunc) of the vertical convective eddy transport of mass flux as a function of updraft fraction from the studies by Arakawa and Wu (2013) \cite arakawa_and_wu_2013 (also see Han et al.'s (2017) \cite han_et_al_2017 equation 1 and 2). The final cloud base mass flux with scale-aware parameterization is obtained from the mass flux when sigmagfm << 1, multiplied by the reduction factor (Han et al.'s (2017) \cite han_et_al_2017 equation 2). - - do i = 1, im + do i = 1, im if(cnvflg(i)) then if (gdx(i) < dxcrtuf) then scaldfunc(i) = (1.-sigmagfm(i)) * (1.-sigmagfm(i)) @@ -2604,7 +2586,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & xmb(i) = xmb(i) * scaldfunc(i) xmb(i) = min(xmb(i),xmbmax(i)) endif - enddo + enddo ! if (do_ca .and. ca_closure)then do i = 1, im @@ -2624,7 +2606,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & & edto, xlamd, xmb, c0t, eta, etad, zi, xlamue, xlamud, delp, & qtr, qaero) - endif c c restore to,qo,uo,vo to t1,q1,u1,v1 in case convection stops c @@ -2672,11 +2653,11 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & qcond(i) = 0. enddo if (.not.hwrf_samfdeep) then - do n = 1, ntr - do i = 1, im + do n = 1, ntr + do i = 1, im delebar(i,n) = 0. - enddo - enddo + enddo + enddo endif do k = 1, km do i = 1, im @@ -2702,8 +2683,8 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo if (.not.hwrf_samfdeep) then do n = 1, ntr - kk = n+2 - do k = 1, km + kk = n+2 + do k = 1, km do i = 1, im if (cnvflg(i) .and. k <= kmax(i)) then if(k <= ktcon(i)) then @@ -2713,7 +2694,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif endif enddo - enddo + enddo enddo endif !> - Recalculate saturation specific humidity using the updated temperature. @@ -2907,7 +2888,6 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & endif enddo enddo - if (.not.hwrf_samfdeep) then do n = 1, ntr kk = n+2 @@ -3020,8 +3000,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo endif - - endif + endif ! (.not.hwrf_samfdeep) return end subroutine samfdeepcnv_run From 4fcdf2fd07e36f5a80620502fa9200cb7f1ca02e Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 3 Jun 2020 16:38:59 -0600 Subject: [PATCH 197/404] Update of samfdeepcnv.f based on code review --- physics/samfdeepcnv.f | 61 ++++++++++--------------------------------- 1 file changed, 14 insertions(+), 47 deletions(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 8040c30c1..9ec9ba7f3 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -309,41 +309,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c c initialize arrays c - if (.not.hwrf_samfdeep) then - do i=1,im - cnvflg(i) = .true. - rn(i)=0. - mbdt(i)=10. - kbot(i)=km+1 - ktop(i)=0 - kbcon(i)=km - ktcon(i)=1 - ktconn(i)=1 - dtconv(i) = 3600. - cldwrk(i) = 0. - pdot(i) = 0. - lmin(i) = 1 - jmin(i) = 1 - qlko_ktcon(i) = 0. - edt(i) = 0. - edto(i) = 0. - edtx(i) = 0. -! acrt(i) = 0. -! acrtfct(i) = 1. - aa1(i) = 0. - aa2(i) = 0. - xaa0(i) = 0. - cina(i) = 0. - pwavo(i)= 0. - pwevo(i)= 0. - xpwav(i)= 0. - xpwev(i)= 0. - vshear(i) = 0. - rainevap(i) = 0. - gdx(i) = sqrt(garea(i)) - enddo - else - do i=1,im + do i=1,im cnvflg(i) = .true. rn(i)=0. mbdt(i)=10. @@ -374,11 +340,14 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & vshear(i) = 0. rainevap(i) = 0. gdx(i) = sqrt(garea(i)) - !HWRF SAS - scaldfunc(i)=-1.0 - sigmagfm(i)=-1.0 -! sigmuout(i)=-1.0 - enddo + enddo +! + if (hwrf_samfdeep) then + do i=1,im + scaldfunc(i)=-1.0 + sigmagfm(i)=-1.0 +! sigmuout(i)=-1.0 + enddo endif ! !> - determine aerosol-aware rain conversion parameter over land @@ -508,19 +477,17 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & enddo enddo !> - Calculate interface height + do k = 1, km1 + do i=1,im + zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) + enddo + enddo if (hwrf_samfdeep) then do k = 1, km1 do i=1,im - zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) xlamue(i,k) = clam / zi(i,k) enddo enddo - else - do k = 1, km1 - do i=1,im - zi(i,k) = 0.5*(zo(i,k)+zo(i,k+1)) - enddo - enddo endif c c!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! From b271cf7e974a1b10c60593555e615635de98a836 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 3 Jun 2020 17:45:46 -0600 Subject: [PATCH 198/404] mp_thompson_post.F90: print statistics about tendency limiter use only in DEBUG mode --- physics/mp_thompson_post.F90 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/physics/mp_thompson_post.F90 b/physics/mp_thompson_post.F90 index 97b44943d..cca74951d 100644 --- a/physics/mp_thompson_post.F90 +++ b/physics/mp_thompson_post.F90 @@ -76,7 +76,9 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, ttendli ! Local variables real(kind_phys), dimension(1:ncol,1:nlev) :: mp_tend integer :: i, k +#ifdef DEBUG integer :: events +#endif ! Initialize the CCPP error handling variables errmsg = '' @@ -95,26 +97,30 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, ttendli ! mp_tend and ttendlim are expressed in potential temperature mp_tend = (tgrs - tgrs_save)/prslk +#ifdef DEBUG events = 0 +#endif do k=1,nlev do i=1,ncol mp_tend(i,k) = max( -ttendlim*dtp, min( ttendlim*dtp, mp_tend(i,k) ) ) - if (tgrs_save(i,k) + mp_tend(i,k)*prslk(i,k) .ne. tgrs(i,k)) then #ifdef DEBUG + if (tgrs_save(i,k) + mp_tend(i,k)*prslk(i,k) .ne. tgrs(i,k)) then write(0,'(a,3i6,3e16.7)') "mp_thompson_post_run mp_tend limiter: kdt, i, k, t_old, t_new, t_lim:", & & kdt, i, k, tgrs_save(i,k), tgrs(i,k), tgrs_save(i,k) + mp_tend(i,k)*prslk(i,k) -#endif events = events + 1 end if +#endif tgrs(i,k) = tgrs_save(i,k) + mp_tend(i,k)*prslk(i,k) end do end do +#ifdef DEBUG if (events > 0) then write(0,'(a,i0,a,i0,a,i0)') "mp_thompson_post_run: ttendlim applied ", events, "/", nlev*ncol, & & " times at timestep ", kdt end if +#endif end subroutine mp_thompson_post_run From 56d3bda05f8f39576c1d033869f07faa8f66aafd Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Thu, 4 Jun 2020 21:25:03 +0000 Subject: [PATCH 199/404] Follow up commit for Cleanup of Thompson MP cloud effective radii calculation --- physics/GFS_rrtmg_pre.F90 | 93 +-------- physics/module_SGSCloud_RadPre.F90 | 280 ++++++++++++++++++++-------- physics/module_SGSCloud_RadPre.meta | 50 +++++ 3 files changed, 258 insertions(+), 165 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 84732e401..413b532b4 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -180,7 +180,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw - logical :: clduni real(kind=kind_phys) :: qvs ! !===> ... begin here @@ -730,7 +729,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do i=1,im re_cloud(i,k) = MAX(2.49, MIN(re_cloud(i,k)*1.e6, 50.)) re_ice(i,k) = MAX(4.99, MIN(re_ice(i,k)*1.e6, 125.)) - !tgs: clduni has different limits for ice radii: 10.0-150.0 + !tgs: progclduni has different limits for ice radii: 10.0-150.0 ! it will raise the low limit from 5 to 10, but the ! high limit will remain 125. re_snow(i,k) = MAX(9.99, MIN(re_snow(i,k)*1.e6, 999.)) @@ -888,91 +887,16 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input elseif(Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP - clduni = .true. - if(Model%do_mynnedmf .or. & Model%imfdeepcnv == Model%imfdeepcnv_gf ) then ! MYNN PBL or GF conv - ! MYNN PBL or convective GF - - if (Model%kdt == 1 ) then - ! --- call progcld6 to get Xu-Randall total cloud cover (clouds(:,1:LMK,1)) at - ! --- initial time step, it takes into account subgrid PBL - ! --- clouds - call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,Model%nleffr), & - Tbd%phy_f3d(:,:,Model%nieffr), & - Tbd%phy_f3d(:,:,Model%nseffr), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs - if (clduni) then - ! use progclduni for interaction with radiation, - ! overwrites 'clouds' from progcld6 - call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & - IM, LMK, LMP, clouds(:,1:LMK,1), & - effrl, effri, effrr, effrs, Model%effr_in , & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - endif - - else ! kdt > 1 - - ! --- call progcld6 to get Xu-Randall total cloud cover (clouds(:,1:LMK,1)) - ! tgs: a short subroutine could be made of progcld5 to - ! compute only total cloud fraction. - call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,Model%nleffr), & - Tbd%phy_f3d(:,:,Model%nieffr), & - Tbd%phy_f3d(:,:,Model%nseffr), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs - - if (Model%do_mynnedmf) then - !tgs - let's use the PBL cloud fraction for now - do k=1,lmk - do i=1,im - !if (tracer1(i,k,ntrw) > 1.0e-7 .OR. tracer1(i,k,ntsw) > 1.0e-7) then - ! ! Xu-Randall cloud fraction computed in progcld6 - ! cldcov(i,k) = clouds(i,k,1) - !else - ! MYNN sub-grid cloud fraction - cldcov(i,k) = clouds1(i,k) - clouds(i,k,1) = clouds1(i,k) - !endif - enddo - enddo - elseif (Model%imfdeepcnv == Model%imfdeepcnv_gf) then ! GF conv - do k=1,lmk - do i=1,im - ! Xu-Randall cloud fraction computed in progcld6 - cldcov(i,k) = clouds(i,k,1) - enddo + !-- MYNN PBL or convective GF + !-- use cloud fractions with SGS clouds + do k=1,lmk + do i=1,im + clouds(i,k,1) = clouds1(i,k) enddo - endif + enddo - if (.not. clduni) then - ! --- call progcld6 for interaction with the radiation with setting - ! --- uni_cld=.true. to keep precomputed cloud - ! --- fraction - call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, .true., & ! Model%uni_cld - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,Model%nleffr), & - Tbd%phy_f3d(:,:,Model%nieffr), & - Tbd%phy_f3d(:,:,Model%nseffr), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs - - else ! clduni ! --- use clduni as with the GFDL microphysics. ! --- make sure that effr_in=.true. in the input.nml! call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs @@ -980,9 +904,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input IM, LMK, LMP, clouds(:,1:LMK,1), & effrl, effri, effrr, effrs, Model%effr_in , & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - endif ! clduni - - endif ! kdt else ! MYNN PBL or GF convective are not used diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index 16ebac5d7..4fb967ab0 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -2,7 +2,8 @@ !! Contains the preliminary (interstitial) work to the call to the radiation schemes: !! 1) Backs up the original qc & qi !! 2) Adds the partioning of convective condensate into liqice/ice for effective radii -!! 3) Adds the subgrid clouds mixing ratio and cloud fraction to the original qc, qi and cloud fraction coming from the microphysics scheme. +!! 3) Adds the subgrid clouds mixing ratio and cloud fraction to the original (resolved- +!! scale) qc, qi and cloud fraction coming from the microphysics scheme. !! 4) Recompute the diagnostic high, mid, low, total and bl clouds to be consistent with radiation module sgscloud_radpre @@ -17,11 +18,13 @@ end subroutine sgscloud_radpre_finalize !> \defgroup sgsrad_group GSD sgscloud_radpre_run Module !> \ingroup sgscloud_radpre -!! This interstitial code adds the subgrid clouds to the resolved-scale clouds if there is no resolved-scale clouds in that particular grid box. +!! This interstitial code adds the subgrid clouds to the resolved-scale clouds +!! if there is no resolved-scale clouds in that particular grid box. It can also +!! specify a cloud fraction for resolved-scale clouds, using Wu-Randall (1996), +!! if desired. !> \section arg_table_sgscloud_radpre_run Argument Table !! \htmlinclude sgscloud_radpre_run.html !! -!! !! cloud array description: ! !! clouds(:,:,1) - layer total cloud fraction ! !! clouds(:,:,2) - layer cloud liq water path ! @@ -35,7 +38,7 @@ subroutine sgscloud_radpre_run( & im,levs, & flag_init,flag_restart, & do_mynnedmf, & - qc, qi, T3D, & + qc, qi, qv, T3D, P3D, & qr, qs, & qci_conv, & imfdeepcnv, imfdeepcnv_gf, & @@ -45,25 +48,34 @@ subroutine sgscloud_radpre_run( & clouds4,clouds5,slmsk, & nlay, plyr, xlat, dz,de_lgth, & cldsa,mtopa,mbota, & + imp_physics, imp_physics_gfdl,& + imp_physics_thompson, & + imp_physics_wsm6, & errmsg, errflg ) ! should be moved to inside the mynn: use machine , only : kind_phys - use physcons, only : con_g, con_pi + use physcons, only : con_g, con_pi, & + eps => con_eps, & ! Rd/Rv + epsm1 => con_epsm1 ! Rd/Rv-1 use module_radiation_clouds, only : gethml - + use radcons, only: qmin ! Minimum vlaues for varius calculations + use funcphys, only: fpvs ! Function ot compute sat. vapor pressure over liq. !------------------------------------------------------------------- implicit none !------------------------------------------------------------------- ! Interface variables real (kind=kind_phys), parameter :: gfac=1.0e5/con_g - integer, intent(in) :: im, levs, imfdeepcnv, imfdeepcnv_gf, nlay + integer, intent(in) :: im, levs, imfdeepcnv, imfdeepcnv_gf, & + & nlay, imp_physics, imp_physics_wsm6, & + & imp_physics_thompson, imp_physics_gfdl logical, intent(in) :: flag_init, flag_restart, do_mynnedmf real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs ! qci_conv only allocated if GF is used real(kind=kind_phys), dimension(:,:), intent(inout) :: qci_conv - real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp + real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp, & + & qv,P3D real(kind=kind_phys), dimension(im,levs), intent(inout) :: & & clouds1,clouds2,clouds3,clouds4,clouds5 real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc_save, qi_save @@ -82,97 +94,207 @@ subroutine sgscloud_radpre_run( & data ptopc / 1050., 650., 400., 0.0, 1050., 750., 500., 0.0 / real(kind=kind_phys), dimension(im,nlay) :: cldcnv real(kind=kind_phys), dimension(im) :: rxlat - real (kind=kind_phys):: Tc, iwc, tem1 + real (kind=kind_phys):: Tc, iwc integer :: i, k, id + ! PARAMETERS FOR RANDALL AND XU (1996) CLOUD FRACTION + REAL, PARAMETER :: coef_p = 0.25, coef_gamm = 0.49, coef_alph = 100. + REAL :: rhgrid,h2oliq,qsat,tem1,tem2,clwt,es,onemrh,value + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 !write(0,*)"==============================================" - !write(0,*)"in mynn rad pre" + !write(0,*)"in SGSCLoud_RadPre" if (flag_init .and. (.not. flag_restart)) then - !write (0,*) 'Skip MYNNrad_pre flag_init = ', flag_init - return - endif - ! Back-up microphysics cloud information: - do k = 1, levs - do i = 1, im - qc_save(i,k) = qc(i,k) - qi_save(i,k) = qi(i,k) - end do - end do - - ! add boundary layer clouds - Note: now the temperature-dependent sorting of - ! ice and water subgrid-scale clouds is done inside the MYNN-EDMF - if (do_mynnedmf) then + !write (0,*) 'Skip this flag_init = ', flag_init + ! return + ! Need default cloud fraction when MYNN is not used: Resort to + ! Xu-Randall (1996). + ! cloud fraction = + ! {1-exp[-100.0*qc/((1-RH)*qsat)**0.49]}*RH**0.25 do k = 1, levs do i = 1, im - clouds1(i,k) = cldfra_bl(i,k) - - !if( qr(i,k) > 1.0e-7 .OR. qs(i,k) > 1.0e-7.or.qci_conv(i,k)>1.0e-7)THEN - !Keep Xu-RandalL clouds fraction - do not overwrite - !else - ! clouds1(i,k) = cldfra_bl(i,k) - !endif - - if (qc(i,k) < 1.e-6 .and. cldfra_bl(i,k)>0.001) then - qc(i,k) = qc_bl(i,k)*cldfra_bl(i,k) - if (nint(slmsk(i)) == 1) then !land - if(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) - else - !eff radius cloud water (microns), from Miles et al. - if(qc(i,k)>1.E-8)clouds3(i,k)=9.6 - endif - !calculate the liquid water path using additional BL clouds - clouds2(i,k) = max(0.0, qc(i,k) * gfac * delp(i,k)) - endif - if (qi(i,k) < 1.e-8 .and. cldfra_bl(i,k)>0.001) then - qi(i,k) = qi_bl(i,k)*cldfra_bl(i,k) - Tc = T3D(i,k) - 273.15 - !iwc = qi(i,k)*1.0e6*rho(i,k) - if (nint(slmsk(i)) == 1) then !land - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) - if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) - else - if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 8b) - !IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(139.7 + 1.76*Tc + 13.49*LOG(iwc), 20.) + if ( qi(i,k) > 1E-7 .OR. qc(i,k) > 1E-7 ) then + es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa + qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) + rhgrid = max( 0., min( 0.95, qv(i,k)/qsat ) ) + h2oliq = qc(i,k) + qi(i,k) ! g/kg + clwt = 1.0e-6 * (p3d(i,k)*0.00001) + + if (h2oliq > clwt) then + onemrh= max( 1.e-10, 1.0-rhgrid ) + tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan + tem1 = 100.0 / tem1 + value = max( min( tem1*(h2oliq), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhgrid) ) + + clouds1(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) endif - !calculate the ice water path using additional BL clouds - clouds4(i,k) = max(0.0, qi(i,k) * gfac * delp(i,k)) + !clouds1(i,k)=(1.-exp(-coef_alph*h2oliq/ & + ! & ((1.-rhgrid)*qsat*1000.0)**coef_gamm))*(rhgrid**coef_p) + !clouds1(i,k)=max(0.0,MIN(1.,clouds1(i,k))) endif - enddo enddo - endif ! do_mynnedmf - ! add convective clouds - if (imfdeepcnv == imfdeepcnv_gf) then + else ! kdt > 1 or restart + + ! Back-up microphysics cloud information: do k = 1, levs do i = 1, im - if ( qci_conv(i,k) > 0.) then - !Partition the convective clouds into water & ice according to a linear - qc(i,k) = qc(i,k)+qci_conv(i,k)*(min(1., max(0., (T3D(i,k)-244.)/25.))) - qi(i,k) = qi(i,k)+qci_conv(i,k)*(1. - min(1., max(0., (T3D(i,k)-244.)/25.))) - - Tc = T3D(i,k) - 273.15 - - if (nint(slmsk(i)) == 1) then !land - if(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos) - if(qi(i,k)>1.e-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) - else - !eff radius cloud water (microns), from Miles et al. - if(qc(i,k)>1.E-8)clouds3(i,k)=9.6 - !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) - if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) + qc_save(i,k) = qc(i,k) + qi_save(i,k) = qi(i,k) + end do + end do + + if ( do_mynnedmf ) then + + ! add boundary layer clouds - Note: now the temperature-dependent sorting of + ! ice and water subgrid-scale clouds is done inside the MYNN-EDMF + + do k = 1, levs + do i = 1, im + + !if (imp_physics == imp_physics_gfdl) then + ! ! only complement the GFDL cloud fractions + ! if (clouds1(i,k) < 0.01 .and. cldfra_bl(i,k) > 0.01) then + ! clouds1(i,k) = cldfra_bl(i,k) + ! endif + !else + clouds1(i,k) = cldfra_bl(i,k) + !endif + + !if( qr(i,k) > 1.0e-7 .OR. qs(i,k) > 1.0e-7.or.qci_conv(i,k)>1.0e-7)THEN + !Keep Xu-RandalL clouds fraction - do not overwrite + !else + ! clouds1(i,k) = cldfra_bl(i,k) + !endif + + if (qc(i,k) < 1.e-6 .and. cldfra_bl(i,k)>0.001) then + qc(i,k) = qc_bl(i,k)*cldfra_bl(i,k) + if (nint(slmsk(i)) == 1) then !land + if(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) + else + !eff radius cloud water (microns), from Miles et al. + if(qc(i,k)>1.E-8)clouds3(i,k)=9.6 + endif + !calculate the liquid water path using additional BL clouds + clouds2(i,k) = max(0.0, qc(i,k) * gfac * delp(i,k)) endif - endif + if (qi(i,k) < 1.e-8 .and. cldfra_bl(i,k)>0.001) then + qi(i,k) = qi_bl(i,k)*cldfra_bl(i,k) + Tc = T3D(i,k) - 273.15 + !iwc = qi(i,k)*1.0e6*rho(i,k) + if (nint(slmsk(i)) == 1) then !land + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) + if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) + else + if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 8b) + !IF(qi(i,k)>1.E-8)clouds5(i,k)=MAX(139.7 + 1.76*Tc + 13.49*LOG(iwc), 20.) + endif + !calculate the ice water path using additional BL clouds + clouds4(i,k) = max(0.0, qi(i,k) * gfac * delp(i,k)) + endif + + enddo enddo - enddo - endif + + elseif (imp_physics /= imp_physics_gfdl) then + + ! Non-MYNN cloud fraction AND non-GFDL microphysics, since bith + ! have their own cloud fractions. In this case, we resort to + ! Xu-Randall (1996). + ! cloud fraction = + ! {1-exp[-100.0*qc/((1-RH)*qsat)**0.49]}*RH**0.25 + do k = 1, levs + do i = 1, im + if ( qi(i,k) > 1E-7 .OR. qc(i,k) > 1E-7 ) then + + es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa + qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) + rhgrid = max( 0., min( 0.95, qv(i,k)/qsat ) ) + h2oliq = qc(i,k) + qi(i,k) ! g/kg + clwt = 1.0e-6 * (p3d(i,k)*0.00001) + + if (h2oliq > clwt) then + onemrh= max( 1.e-10, 1.0-rhgrid ) + tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan + tem1 = 100.0 / tem1 + value = max( min( tem1*(h2oliq), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhgrid) ) + + clouds1(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + + !es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa + !qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) + !rhgrid = max( 0., min( 0.95, qv(i,k)/qsat ) ) + !h2oliq=1000.0*( qc(i,k) + qi(i,k) ) ! g/kg + !clouds1(i,k)=(1.-exp(-coef_alph*h2oliq/ & + ! & ((1.-rhgrid)*qsat*1000.0)**coef_gamm))*(rhgrid**coef_p) + !clouds1(i,k)=max(0.0,MIN(1.,clouds1(i,k))) + endif + enddo + enddo + + endif ! end MYNN or OTHER choice for background clouds fractions + + ! At this point, we have cloud properties for all non-deep convective clouds. + ! So now we add the convective clouds, + + if (imfdeepcnv == imfdeepcnv_gf) then + do k = 1, levs + do i = 1, im + !if ( qci_conv(i,k) > 0. .AND. (qi(i,k) < 1E-7 .AND. qc(i,k) < 1E-7 ) ) then + if ( qci_conv(i,k) > 0. ) then + !Partition the convective clouds into water & ice according to a linear + qc(i,k) = qc(i,k)+qci_conv(i,k)*(min(1., max(0., (T3D(i,k)-244.)/25.))) + qi(i,k) = qi(i,k)+qci_conv(i,k)*(1. - min(1., max(0., (T3D(i,k)-244.)/25.))) + + Tc = T3D(i,k) - 273.15 + + if (nint(slmsk(i)) == 1) then !land + if(qc(i,k)>1.E-8)clouds3(i,k)=5.4 !eff radius cloud water (microns) + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos) + if(qi(i,k)>1.e-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) + else + !eff radius cloud water (microns), from Miles et al. + if(qc(i,k)>1.E-8)clouds3(i,k)=9.6 + !eff radius cloud ice (microns), from Mishra et al. (2014, JGR Atmos, fig 6b) + if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) + endif + + ! Xu-Randall (1996) cloud fraction + es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa + qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) + rhgrid = max( 0., min( 0.95, qv(i,k)/qsat ) ) + h2oliq = qc(i,k) + qi(i,k) ! g/kg + clwt = 1.0e-6 * (p3d(i,k)*0.00001) + + if (h2oliq > clwt) then + onemrh= max( 1.e-10, 1.0-rhgrid ) + tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan + tem1 = 100.0 / tem1 + value = max( min( tem1*(h2oliq), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhgrid) ) + + clouds1(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + else + clouds1(i,k) = 0.0 + endif + !print*,"XuRandla- cf:",clouds1(i,k)," rh:",rhgrid," qt:",h2oliq + !print*,"XuRandlb- clwt:",clwt," qsat:",qsat," p:",p3d(i,k) + endif + enddo + enddo + endif ! imfdeepcnv_gf + + endif ! kdt > 1 + !> - Compute SFC/low/middle/high cloud top pressure for each cloud domain for given latitude. do i =1, im diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 79691920d..fff8013c9 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -61,6 +61,15 @@ kind = kind_phys intent = inout optional = F +[qv] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [T3D] standard_name = air_temperature long_name = layer mean air temperature @@ -70,6 +79,15 @@ kind = kind_phys intent = in optional = F +[P3D] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [qr] standard_name = rain_water_mixing_ratio long_name = moist (dry+vapor, no condensates) mixing ratio of rain water @@ -298,6 +316,38 @@ type = logical intent = in optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_gfdl] + standard_name = flag_for_gfdl_microphysics_scheme + long_name = choice of GFDL microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_thompson] + standard_name = flag_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_wsm6] + standard_name = flag_for_wsm6_microphysics_scheme + long_name = choice of WSM6 microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From def46ffe8f4a785444e72b28e8ec49064bb5acd3 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 4 Jun 2020 15:59:08 -0600 Subject: [PATCH 200/404] Implement option to roll back Thompson MP to WRFV3.8.1 used in RAPv5/HRRRv4 --- physics/module_mp_thompson.F90 | 187 +++++++++++++++++++++++++++++---- 1 file changed, 167 insertions(+), 20 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index b3ccb7412..191070b62 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -1,6 +1,12 @@ !>\file module_mp_thompson.F90 !! This file contains the entity of GSD Thompson MP scheme. +! DH* 2020-06-05 +! Use the following preprocessor directive to roll back +! to the WRFv3.8.1, used in RAPv5/HRRRv4 for more reasonable +! representation of mesoscale storms and reflectivity values +!#define WRF381 + !>\ingroup aathompson !! This module computes the moisture tendencies of water vapor, @@ -43,9 +49,16 @@ !!\author Greg Thompson, NCAR-RAL, gthompsn@ucar.edu, 303-497-2805 !! !! - Last modified: 24 Jan 2018 Aerosol additions to v3.5.1 code 9/2013 -!! Cloud fraction additions 11/2014 part of pre-v3.7 +!! Cloud fraction additions 11/2014 part of pre-v3.7 !! - Imported in CCPP by: Dom Heinzeller, NOAA/ESRL/GSD, dom.heinzeller@noaa.gov !! - Last modified: 6 Aug 2018 Update of initial import to WRFV4.0 +!! - Last modified: 13 Mar 2020 Add logic to turtn on/off the calculation +!! of melting layer in radar reflectivity routine +!! - Last modified: 2 Jun 2020 Add option to rollback to version 3.8.1 +!! used in RAPv5/HRRRv4, include stochastic physics +!! perturbations to the graupel intercept parameter, +!! the cloud water shape parameter, and the number +!! concentration of nucleated aerosols. MODULE module_mp_thompson USE machine, only : kind_phys @@ -450,6 +463,13 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & if (.NOT. ALLOCATED(tcg_racg) ) then ALLOCATE(tcg_racg(ntb_g1,ntb_g,ntb_r1,ntb_r)) micro_init = .TRUE. + if (mpirank==mpiroot) then +#ifdef WRF381 + write(0,*) "Using Thompson MP from WRFv3.8.1 (RAPv5/HRRRv4)" +#else + write(0,*) "Using Thompson MP from WRFv4.0+" +#endif + endif endif if (.NOT. ALLOCATED(tmr_racg)) ALLOCATE(tmr_racg(ntb_g1,ntb_g,ntb_r1,ntb_r)) @@ -961,14 +981,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & end if precomputed_tables_2 - ! DH* TEMPORARY GUARD 20181203 - if (minval(tnccn_act)==maxval(tnccn_act)) then - write(0,*) "TEMPORARY GUARD: abort model because table_ccnact seems to be faulty." - call sleep(5) - stop - end if - ! *DH - endif if_not_iiwarm if (mpirank==mpiroot) write(0,*) ' ... DONE microphysical lookup tables' @@ -997,6 +1009,9 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & vt_dbz_wt, first_time_step, & re_cloud, re_ice, re_snow, & has_reqc, has_reqi, has_reqs, & + rand_perturb_on, & + kme_stoch, & + rand_pert, & ids,ide, jds,jde, kds,kde, & ! domain dims ims,ime, jms,jme, kms,kme, & ! memory dims its,ite, jts,jte, kts,kte, & ! tile dims @@ -1019,6 +1034,10 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(IN):: nwfa2d, nifa2d REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(OUT):: & re_cloud, re_ice, re_snow + INTEGER, INTENT(IN) :: rand_perturb_on, kme_stoch + REAL, DIMENSION(ims:ime,kms:kme_stoch,jms:jme), INTENT(IN), OPTIONAL:: & + rand_pert + INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs #if ( WRF_CHEM == 1 ) REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: & @@ -1054,7 +1073,8 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & REAL:: dt, pptrain, pptsnow, pptgraul, pptice REAL:: qc_max, qr_max, qs_max, qi_max, qg_max, ni_max, nr_max REAL:: nwfa1 - INTEGER:: i, j, k + REAL:: rand1, rand2, rand3, min_rand + INTEGER:: i, j, k, m INTEGER:: imax_qc,imax_qr,imax_qi,imax_qs,imax_qg,imax_ni,imax_nr INTEGER:: jmax_qc,jmax_qr,jmax_qi,jmax_qs,jmax_qg,jmax_ni,jmax_nr INTEGER:: kmax_qc,kmax_qr,kmax_qi,kmax_qs,kmax_qg,kmax_ni,kmax_nr @@ -1160,6 +1180,32 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & j_loop: do j = j_start, j_end i_loop: do i = i_start, i_end +!+---+-----------------------------------------------------------------+ +!..Introduce stochastic parameter perturbations by creating as many scalar rand1, rand2, ... +!.. variables as needed to perturb different pieces of microphysics. gthompsn 21Mar2018 +! Setting spp_mp to 1 gives graupel Y-intercept pertubations (2^0) +! 2 gives cloud water distribution gamma shape parameter perturbations (2^1) +! 4 gives CCN & IN activation perturbations (2^2) +! 3 gives both 1+2 +! 5 gives both 1+4 +! 6 gives both 2+4 +! 7 gives all 1+2+4 +! For now (22Mar2018), standard deviation should be only 0.25 and cut-off at 1.5 +! in order to constrain the various perturbations from being too extreme. +!+---+-----------------------------------------------------------------+ + rand1 = 0.0 + rand2 = 0.0 + rand3 = 0.0 + if (rand_perturb_on .ne. 0) then + if (MOD(rand_perturb_on,2) .ne. 0) rand1 = rand_pert(i,1,j) + m = RSHIFT(ABS(rand_perturb_on),1) + if (MOD(m,2) .ne. 0) rand2 = rand_pert(i,1,j)*2. + m = RSHIFT(ABS(rand_perturb_on),2) + if (MOD(m,2) .ne. 0) rand3 = 0.1*(rand_pert(i,1,j)+ABS(min_rand)) + m = RSHIFT(ABS(rand_perturb_on),3) + endif +!+---+-----------------------------------------------------------------+ + pptrain = 0. pptsnow = 0. pptgraul = 0. @@ -1218,6 +1264,7 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & #if ( WRF_CHEM == 1 ) rainprod1d, evapprod1d, & #endif + rand1, rand2, rand3, & kts, kte, dt, i, j) pcp_ra(i,j) = pptrain @@ -1485,6 +1532,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & #if ( WRF_CHEM == 1 ) rainprod, evapprod, & #endif + rand1, rand2, rand3, & kts, kte, dt, ii, jj) #ifdef MPI use mpi @@ -1499,6 +1547,8 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & REAL, DIMENSION(kts:kte), INTENT(IN):: p1d, w1d, dzq REAL, INTENT(INOUT):: pptrain, pptsnow, pptgraul, pptice REAL, INTENT(IN):: dt + REAL, INTENT(IN):: rand1, rand2, rand3 + #if ( WRF_CHEM == 1 ) REAL, DIMENSION(kts:kte), INTENT(INOUT):: & rainprod, evapprod @@ -1735,7 +1785,12 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & rc(k) = qc1d(k)*rho(k) nc(k) = MAX(2., MIN(nc1d(k)*rho(k), Nt_c_max)) L_qc(k) = .true. - nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + if (rand2 .eq. 0.0) then + nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + else + nu_c = NINT(1000.E6/nc(k)) + 2 + nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) + endif lamc = (nc(k)*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr xDc = (bm_r + nu_c + 1.) / lamc if (xDc.lt. D0c) then @@ -1984,7 +2039,10 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xslw1 = 0.01 endif ygra1 = 4.31 + alog10(max(5.E-5, rg(k))) - zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1)) + zans1 = (3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))) + rand1 + if (rand1 .ne. 0.0) then + zans1 = MAX(2., MIN(zans1, 7.)) + endif N0_exp = 10.**(zans1) N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max))) N0_min = MIN(N0_exp, N0_min) @@ -2025,7 +2083,12 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & mvd_c(k) = D0c if (L_qc(k)) then - nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + if (rand2 .eq. 0.0) then + nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + else + nu_c = NINT(1000.E6/nc(k)) + 2 + nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) + endif xDc = MAX(D0c*1.E6, ((rc(k)/(am_r*nc(k)))**obmr) * 1.E6) lamc = (nc(k)*am_r* ccg(2,nu_c) * ocg1(nu_c) / rc(k))**obmr mvd_c(k) = (3.0+nu_c+0.672) / lamc @@ -2427,6 +2490,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & .and. temp(k).lt.253.15) ) then if (dustyIce .AND. is_aerosol_aware) then xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),nifa(k)) + xnc = xnc*(1.0 + 3.*rand3) else xnc = MIN(250.E3, TNO*EXP(ATO*(T_0-temp(k)))) endif @@ -2633,7 +2697,13 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !! supersat again. sump = pri_inu(k) + pri_ide(k) + prs_ide(k) & + prs_sde(k) + prg_gde(k) + pri_iha(k) +! DH* 2020-06-02 I believe that the WRF381 version +! is wrong, because the units do not match. +#ifdef WRF381 + rate_max = (qv(k)-qvsi(k))*odts*0.999 +#else rate_max = (qv(k)-qvsi(k))*rho(k)*odts*0.999 +#endif if ( (sump.gt. eps .and. sump.gt. rate_max) .or. & (sump.lt. -eps .and. sump.lt. rate_max) ) then ratio = rate_max/sump @@ -2765,7 +2835,12 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xrc=MAX(R1, (qc1d(k) + qcten(k)*dtsave)*rho(k)) xnc=MAX(2., (nc1d(k) + ncten(k)*dtsave)*rho(k)) if (xrc .gt. R1) then - nu_c = MIN(15, NINT(1000.E6/xnc) + 2) + if (rand2 .eq. 0.0) then + nu_c = MIN(15, NINT(1000.E6/xnc) + 2) + else + nu_c = NINT(1000.E6/xnc) + 2 + nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) + endif lamc = (xnc*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr xDc = (bm_r + nu_c + 1.) / lamc if (xDc.lt. D0c) then @@ -3055,7 +3130,10 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xslw1 = 0.01 endif ygra1 = 4.31 + alog10(max(5.E-5, rg(k))) - zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1)) + zans1 = (3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))) + rand1 + if (rand1 .ne. 0.0) then + zans1 = MAX(2., MIN(zans1, 7.)) + endif N0_exp = 10.**(zans1) N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max))) N0_min = MIN(N0_exp, N0_min) @@ -3103,7 +3181,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !+---+-----------------------------------------------------------------+ ! DROPLET NUCLEATION if (clap .gt. eps) then if (is_aerosol_aware) then - xnc = MAX(2., activ_ncloud(temp(k), w1d(k), nwfa(k))) + xnc = MAX(2., activ_ncloud(temp(k), w1d(k)+rand3, nwfa(k))) else xnc = Nt_c endif @@ -3342,7 +3420,12 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & do k = ksed1(5), kts, -1 vtc = 0. if (rc(k) .gt. R1 .and. w1d(k) .lt. 1.E-1) then - nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + if (rand2 .eq. 0.0) then + nu_c = MIN(15, NINT(1000.E6/nc(k)) + 2) + else + nu_c = NINT(1000.E6/nc(k)) + 2 + nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) + endif lamc = (nc(k)*am_r*ccg(2,nu_c)*ocg1(nu_c)/rc(k))**obmr ilamc = 1./lamc vtc = rhof(k)*av_c*ccg(5,nu_c)*ocg2(nu_c) * ilamc**bv_c @@ -3408,7 +3491,12 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & vts = rhof(k)*av_s * (t1_vts+t2_vts)/(t3_vts+t4_vts) if (temp(k).gt. (T_0+0.1)) then vtsk(k) = MAX(vts*vts_boost(k), & - & vts*((vtrk(k)-vts*vts_boost(k))/(temp(k)-T_0))) + & vts*((vtrk(k)-vts*vts_boost(k))/(temp(k)-T_0))) ! +! DH* The version below is supposed to be a better formulation, +! but gave worse results in RAPv5/HRRRv4 than the line above. + ! this formulation for RAPv5/HRRRv4, reverted 20 Feb 2020 + ! SR = rs(k)/(rs(k)+rr(k)) ! bug fix from G. Thompson, 10 May 2019 + ! vtsk(k) = vts*SR + (1.-SR)*vtrk(k) else vtsk(k) = vts*vts_boost(k) endif @@ -3459,6 +3547,10 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !> - Sedimentation of mixing ratio is the integral of v(D)*m(D)*N(D)*dD, !! whereas neglect m(D) term for number concentration. Therefore, !! cloud ice has proper differential sedimentation. +!.. New in v3.0+ is computing separate for rain, ice, snow, and +!.. graupel species thus making code faster with credit to J. Schmidt. +!.. Bug fix, 2013Nov01 to tendencies using rho(k+1) correction thanks to +!.. Eric Skyllingstad. !+---+-----------------------------------------------------------------+ if (ANY(L_qr .eqv. .true.)) then @@ -3488,7 +3580,11 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(1)) enddo +#ifdef WRF381 + if (rr(kts).gt.R1*10.) & +#else if (rr(kts).gt.R1*1000.) & +#endif pptrain = pptrain + sed_r(kts)*DT*onstep(1) enddo endif @@ -3539,7 +3635,11 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(2)) enddo +#ifdef WRF381 + if (ri(kts).gt.R1*10.) & +#else if (ri(kts).gt.R1*1000.) & +#endif pptice = pptice + sed_i(kts)*DT*onstep(2) enddo endif @@ -3566,7 +3666,11 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(3)) enddo +#ifdef WRF381 + if (rs(kts).gt.R1*10.) & +#else if (rs(kts).gt.R1*1000.) & +#endif pptsnow = pptsnow + sed_s(kts)*DT*onstep(3) enddo endif @@ -3593,7 +3697,11 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(4)) enddo +#ifdef WRF381 + if (rg(kts).gt.R1*10.) & +#else if (rg(kts).gt.R1*1000.) & +#endif pptgraul = pptgraul + sed_g(kts)*DT*onstep(4) enddo endif @@ -3634,16 +3742,31 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & qv1d(k) = MAX(1.E-10, qv1d(k) + qvten(k)*DT) qc1d(k) = qc1d(k) + qcten(k)*DT nc1d(k) = MAX(2./rho(k), MIN(nc1d(k) + ncten(k)*DT, Nt_c_max)) +! DH* 2020-06-05 I believe WRF381 is wrong in terms of units; +! dividing by rho turns number concentration per volume into +! number concentration per mass. +#ifdef WRF381 + nwfa1d(k) = MAX(11.1E6/rho(k), MIN(9999.E6/rho(k), & + (nwfa1d(k)+nwfaten(k)*DT))) + nifa1d(k) = MAX(naIN1*0.01, MIN(9999.E6/rho(k), & + (nifa1d(k)+nifaten(k)*DT))) +#else nwfa1d(k) = MAX(11.1E6, MIN(9999.E6, & (nwfa1d(k)+nwfaten(k)*DT))) nifa1d(k) = MAX(naIN1*0.01, MIN(9999.E6, & (nifa1d(k)+nifaten(k)*DT))) +#endif if (qc1d(k) .le. R1) then qc1d(k) = 0.0 nc1d(k) = 0.0 else - nu_c = MIN(15, NINT(1000.E6/(nc1d(k)*rho(k))) + 2) + if (rand2 .eq. 0.0) then + nu_c = MIN(15, NINT(1000.E6/(nc1d(k)*rho(k))) + 2) + else + nu_c = NINT(1000.E6/(nc1d(k)*rho(k))) + 2 + nu_c = MAX(2, MIN(nu_c+NINT(rand2), 15)) + endif lamc = (am_r*ccg(2,nu_c)*ocg1(nu_c)*nc1d(k)/qc1d(k))**obmr xDc = (bm_r + nu_c + 1.) / lamc if (xDc.lt. D0c) then @@ -5124,7 +5247,14 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & do k = kts, kte rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622)) rc(k) = MAX(R1, qc1d(k)*rho(k)) +#ifdef WRF381 + nc(k) = MAX(R2, MIN(nc1d(k)*rho(k), Nt_c_max)) +#else + ! DH* 2020-06-05 is using 2.0 instead of R2 + ! a bug in the WRFv4.0+ version of Thompson? + ! For ni(k) a few lines below, it is still R2 nc(k) = MAX(2., MIN(nc1d(k)*rho(k), Nt_c_max)) +#endif if (.NOT. is_aerosol_aware) nc(k) = Nt_c if (rc(k).gt.R1 .and. nc(k).gt.R2) has_qc = .true. ri(k) = MAX(R1, qi1d(k)*rho(k)) @@ -5136,7 +5266,9 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & if (has_qc) then do k = kts, kte +#ifndef WRF381 re_qc1d(k) = 2.49E-6 +#endif if (rc(k).le.R1 .or. nc(k).le.R2) CYCLE if (nc(k).lt.100) then inu_c = 15 @@ -5152,16 +5284,24 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & if (has_qi) then do k = kts, kte +#ifndef WRF381 re_qi1d(k) = 2.49E-6 +#endif if (ri(k).le.R1 .or. ni(k).le.R2) CYCLE lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi +#ifdef WRF381 + re_qi1d(k) = MAX(5.01E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6)) +#else re_qi1d(k) = MAX(2.51E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6)) +#endif enddo endif if (has_qs) then do k = kts, kte +#ifndef WRF381 re_qs1d(k) = 4.99E-6 +#endif if (rs(k).le.R1) CYCLE tc0 = MIN(-0.1, t1d(k)-273.15) smob = rs(k)*oams @@ -5196,7 +5336,11 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & & + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) & & + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1) smoc = a_ * smo2**b_ +#ifdef WRF381 + re_qs1d(k) = MAX(10.E-6, MIN(0.5*(smoc/smob), 999.E-6)) +#else re_qs1d(k) = MAX(5.01E-6, MIN(0.5*(smoc/smob), 999.E-6)) +#endif enddo endif @@ -5383,7 +5527,10 @@ subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & xslw1 = 0.01 endif ygra1 = 4.31 + alog10(max(5.E-5, rg(k))) - zans1 = 3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1)) + zans1 = (3.1 + (100./(300.*xslw1*ygra1/(10./xslw1+1.+0.25*ygra1)+30.+10.*ygra1))) + rand1 + if (rand1 .ne. 0.0) then + zans1 = MAX(2., MIN(zans1, 7.)) + endif N0_exp = 10.**(zans1) N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max))) N0_min = MIN(N0_exp, N0_min) From 72ac01d95f651e82c5c70d51f203d1a83854ae89 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Thu, 4 Jun 2020 22:05:29 +0000 Subject: [PATCH 201/404] updating comment to provide more general meaning --- physics/module_SGSCloud_RadPre.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index 4fb967ab0..f38625509 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -140,7 +140,7 @@ subroutine sgscloud_radpre_run( & enddo enddo - else ! kdt > 1 or restart + else ! timestep > 1 or restart ! Back-up microphysics cloud information: do k = 1, levs @@ -293,7 +293,7 @@ subroutine sgscloud_radpre_run( & enddo endif ! imfdeepcnv_gf - endif ! kdt > 1 + endif ! timestep > 1 !> - Compute SFC/low/middle/high cloud top pressure for each cloud domain for given latitude. From c41d691d400fc6f4d3132602f127127cfb3f2ccc Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 4 Jun 2020 16:09:45 -0600 Subject: [PATCH 202/404] physics/module_mp_thompson.F90: add guard to prevent running Thompson MP with the untested stochastic perturbations code --- physics/module_mp_thompson.F90 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 191070b62..ce6df30e3 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -1091,6 +1091,17 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & if (present(errmsg)) errmsg = '' if (present(errflg)) errflg = 0 + ! DH* 2020-06-05: The stochastic perturbations code was retrofitted + ! from a newer version of the Thompson MP scheme, but it has not been + ! tested yet. + if (rand_perturb_on .ne. 0) then + errmsg = 'Logic error in mp_gt_driver: the stochastic perturbations code ' // & + 'has not been tested yet with this version of the Thompson scheme' + errflg = 1 + return + end if + ! *DH 2020-06-05 + if ( (present(tt) .and. (present(th) .or. present(pii))) .or. & (.not.present(tt) .and. .not.(present(th) .and. present(pii))) ) then if (present(errmsg)) then From 8fd1674e67e6e60360393fbf1907c958f113ace2 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Thu, 4 Jun 2020 23:03:05 +0000 Subject: [PATCH 203/404] remove progcld6 and thompson & wsm6 flags --- physics/GFS_rrtmg_pre.F90 | 2 +- physics/module_SGSCloud_RadPre.F90 | 5 +- physics/module_SGSCloud_RadPre.meta | 16 -- physics/radiation_clouds.f | 300 +--------------------------- 4 files changed, 3 insertions(+), 320 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 413b532b4..42411c88f 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -65,7 +65,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input & progcld1, progcld3, & & progcld2, & & progcld4, progcld5, & - & progcld6, progclduni + & progclduni use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & & profsw_type, NBDSW use module_radlw_parameters, only: topflw_type, sfcflw_type, & diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index f38625509..eacfcded7 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -49,8 +49,6 @@ subroutine sgscloud_radpre_run( & nlay, plyr, xlat, dz,de_lgth, & cldsa,mtopa,mbota, & imp_physics, imp_physics_gfdl,& - imp_physics_thompson, & - imp_physics_wsm6, & errmsg, errflg ) ! should be moved to inside the mynn: @@ -67,8 +65,7 @@ subroutine sgscloud_radpre_run( & ! Interface variables real (kind=kind_phys), parameter :: gfac=1.0e5/con_g integer, intent(in) :: im, levs, imfdeepcnv, imfdeepcnv_gf, & - & nlay, imp_physics, imp_physics_wsm6, & - & imp_physics_thompson, imp_physics_gfdl + & nlay, imp_physics, imp_physics_gfdl logical, intent(in) :: flag_init, flag_restart, do_mynnedmf real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index fff8013c9..63d83d349 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -332,22 +332,6 @@ type = integer intent = in optional = F -[imp_physics_thompson] - standard_name = flag_for_thompson_microphysics_scheme - long_name = choice of Thompson microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imp_physics_wsm6] - standard_name = flag_for_wsm6_microphysics_scheme - long_name = choice of WSM6 microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 176219199..5b4aa54ab 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -243,7 +243,7 @@ module module_radiation_clouds integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld6, progcld4o, gethml + & cld_init, progcld5, progcld4o, gethml ! ================= @@ -2683,304 +2683,6 @@ subroutine progcld5 & end subroutine progcld5 !................................... -!----------------------------------- -!> \ingroup module_radiation_clouds -!! This subroutine computes cloud related quantities using the Thompson -!! cloud microphysics scheme with updated microphysics-cloud-radiation -!! interaction (including subgrid clouds). Adapted from progcld5. - subroutine progcld6 & - & ( plyr,plvl,tlyr,qlyr,qstl,rhly,clw, & ! --- inputs: - & xlat,xlon,slmsk,dz,delp, & - & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & - & IX, NLAY, NLP1, & - & uni_cld, lmfshal, lmfdeep2, cldcov, & - & re_cloud,re_ice,re_snow, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: - & ) - -! ================= subprogram documentation block ================ ! -! ! -! subprogram: progcld6 computes cloud related quantities using ! -! the Thompson cloud microphysics scheme with updated microphysics ! -! cloud-radiation interaction (including subgrid clouds). ! -! ! -! abstract: this program computes cloud fractions from cloud ! -! condensates, ! -! and computes the low, mid, high, total and boundary layer cloud ! -! fractions and the vertical indices of low, mid, and high cloud ! -! top and base. the three vertical cloud domains are set up in the ! -! initial subroutine "cld_init". ! -! ! -! usage: call progcld6 ! -! ! -! subprograms called: gethml ! -! ! -! attributes: ! -! language: fortran 90 ! -! machine: ibm-sp, sgi ! -! ! -! ! -! ==================== definition of variables ==================== ! -! ! -! input variables: ! -! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! -! plvl (IX,NLP1) : model level pressure in mb (100Pa) ! -! tlyr (IX,NLAY) : model layer mean temperature in k ! -! tvly (IX,NLAY) : model layer virtual temperature in k ! -! qlyr (IX,NLAY) : layer specific humidity in gm/gm ! -! qstl (IX,NLAY) : layer saturate humidity in gm/gm ! -! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) ! -! clw (IX,NLAY,ntrac) : layer cloud condensate amount ! -! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2! -! range, otherwise see in-line comment ! -! xlon (IX) : grid longitude in radians (not used) ! -! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! -! dz (ix,nlay) : layer thickness (km) ! -! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! -! IX : horizontal dimention ! -! NLAY,NLP1 : vertical layer/level dimensions ! -! uni_cld : logical - true for cloud fraction from shoc ! -! lmfshal : logical - true for mass flux shallow convection ! -! lmfdeep2 : logical - true for mass flux deep convection ! -! cldcov : layer cloud fraction (used when uni_cld=.true. ! -! ! -! output variables: ! -! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! -! clouds(:,:,1) - layer total cloud fraction ! -! clouds(:,:,2) - layer cloud liq water path (g/m**2) ! -! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! -! clouds(:,:,4) - layer cloud ice water path (g/m**2) ! -! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! -! clouds(:,:,6) - layer rain drop water path not assigned ! -! clouds(:,:,7) - mean eff radius for rain drop (micron) ! -! *** clouds(:,:,8) - layer snow flake water path not assigned ! -! clouds(:,:,9) - mean eff radius for snow flake (micron) ! -! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) ! -! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! -! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! -! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! -! de_lgth(ix) : clouds decorrelation length (km) ! -! ! -! module variables: ! -! ivflip : control flag of vertical index direction ! -! =0: index from toa to surface ! -! =1: index from surface to toa ! -! lmfshal : mass-flux shallow conv scheme flag ! -! lmfdeep2 : scale-aware mass-flux deep conv scheme flag ! -! lcrick : control flag for eliminating CRICK ! -! =t: apply layer smoothing to eliminate CRICK ! -! =f: do not apply layer smoothing ! -! lcnorm : control flag for in-cld condensate ! -! =t: normalize cloud condensate ! -! =f: not normalize cloud condensate ! -! ! -! ==================== end of description ===================== ! -! - implicit none - -! --- inputs - integer, intent(in) :: IX, NLAY, NLP1 - integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl - - logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 - - real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, & - & re_cloud, re_ice, re_snow - - real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw - - real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & - & slmsk - -! --- outputs - real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds - - real (kind=kind_phys), dimension(:,:), intent(out) :: clds - real (kind=kind_phys), dimension(:), intent(out) :: de_lgth - - integer, dimension(:,:), intent(out) :: mtop,mbot - -! --- local variables: - real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, & - & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf - - real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix) - - real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & - & tem1, tem2, tem3 - - integer :: i, k, id, nf - -! --- constant values - real (kind=kind_phys), parameter :: xrc3 = 100. - -! -!===> ... begin here -! - do k = 1, NLAY - do i = 1, IX - cldtot(i,k) = 0.0 - cldcnv(i,k) = 0.0 - cwp (i,k) = 0.0 - cip (i,k) = 0.0 - crp (i,k) = 0.0 - csp (i,k) = 0.0 - rew (i,k) = re_cloud(i,k) - rei (i,k) = re_ice(i,k) - rer (i,k) = rrain_def ! default rain radius to 1000 micron - res (i,k) = re_snow(i,K) -! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) ) - clwf(i,k) = 0.0 - enddo - enddo - - do k = 1, NLAY - do i = 1, IX - clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) - & + clw(i,k,ntrw) + clw(i,k,ntgl) - enddo - enddo -!> - Find top pressure for each cloud domain for given latitude. -!! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; -!! i=1,2 are low-lat (<45 degree) and pole regions) - - do i =1, IX - rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range -! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range - enddo - - do id = 1, 4 - tem1 = ptopc(id,2) - ptopc(id,1) - do i =1, IX - ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) - enddo - enddo - -!> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . - - do k = 1, NLAY - do i = 1, IX - cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k)) - cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k)) - crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) - csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * - & gfac * delp(i,k)) - enddo - enddo - - if (uni_cld) then ! use unified sgs clouds generated outside - do k = 1, NLAY - do i = 1, IX - cldtot(i,k) = cldcov(i,k) - enddo - enddo - - else - -!> - Calculate layer cloud fraction. - - clwmin = 0.0 - - do k = 1, NLAY - do i = 1, IX - clwt = 1.0e-6 * (plyr(i,k)*0.001) -! clwt = 2.0e-6 * (plyr(i,k)*0.001) - - if (clwf(i,k) > clwt) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) -! - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan - !if (lmfdeep2) then - ! tem1 = xrc3 / tem1 - !else - tem1 = 100.0 / tem1 - !endif -! - value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - - cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - - endif ! if (uni_cld) then - - do k = 1, NLAY - do i = 1, IX - if (cldtot(i,k) < climit) then - cwp(i,k) = 0.0 - cip(i,k) = 0.0 - crp(i,k) = 0.0 - csp(i,k) = 0.0 - endif - enddo - enddo - - if ( lcnorm ) then - do k = 1, NLAY - do i = 1, IX - if (cldtot(i,k) >= climit) then - tem1 = 1.0 / max(climit2, cldtot(i,k)) - cwp(i,k) = cwp(i,k) * tem1 - cip(i,k) = cip(i,k) * tem1 - crp(i,k) = crp(i,k) * tem1 - csp(i,k) = csp(i,k) * tem1 - endif - enddo - enddo - endif - -! - do k = 1, NLAY - do i = 1, IX - clouds(i,k,1) = cldtot(i,k) - clouds(i,k,2) = cwp(i,k) - clouds(i,k,3) = rew(i,k) - clouds(i,k,4) = cip(i,k) - clouds(i,k,5) = rei(i,k) - clouds(i,k,6) = crp(i,k) ! added for Thompson - clouds(i,k,7) = rer(i,k) - clouds(i,k,8) = csp(i,k) ! added for Thompson - clouds(i,k,9) = res(i,k) - enddo - enddo - -! --- ... estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later - - if ( iovr == 3 ) then - do i = 1, ix - de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) - enddo - endif - -!> - Call gethml() to compute low,mid,high,total, and boundary layer -!! cloud fractions and clouds top/bottom layer indices for low, mid, -!! and high clouds. -! --- compute low, mid, high, total, and boundary layer cloud fractions -! and clouds top/bottom layer indices for low, mid, and high clouds. -! The three cloud domain boundaries are defined by ptopc. The cloud -! overlapping method is defined by control flag 'iovr', which may -! be different for lw and sw radiation programs. - - call gethml & -! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & - & IX,NLAY, & -! --- outputs: - & clds, mtop, mbot & - & ) - - -! - return -!................................... - end subroutine progcld6 -!................................... - !> \ingroup module_radiation_clouds !> This subroutine computes cloud related quantities using !! for unified cloud microphysics scheme. From fc9a06dda429f9908e5a136e703a75e3b5b867d7 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 4 Jun 2020 21:12:53 -0600 Subject: [PATCH 204/404] Correct typos in comments in physics/module_SGSCloud_RadPre.F90 --- physics/module_SGSCloud_RadPre.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index eacfcded7..a3731c63e 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -20,7 +20,7 @@ end subroutine sgscloud_radpre_finalize !> \ingroup sgscloud_radpre !! This interstitial code adds the subgrid clouds to the resolved-scale clouds !! if there is no resolved-scale clouds in that particular grid box. It can also -!! specify a cloud fraction for resolved-scale clouds, using Wu-Randall (1996), +!! specify a cloud fraction for resolved-scale clouds, using Xu-Randall (1996), !! if desired. !> \section arg_table_sgscloud_radpre_run Argument Table !! \htmlinclude sgscloud_radpre_run.html @@ -202,7 +202,7 @@ subroutine sgscloud_radpre_run( & elseif (imp_physics /= imp_physics_gfdl) then - ! Non-MYNN cloud fraction AND non-GFDL microphysics, since bith + ! Non-MYNN cloud fraction AND non-GFDL microphysics, since both ! have their own cloud fractions. In this case, we resort to ! Xu-Randall (1996). ! cloud fraction = From 90c83b557752a0bbe1ffbbff32585535130fe082 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 5 Jun 2020 20:02:07 +0000 Subject: [PATCH 205/404] MYNNPBL wrapper update to include all required variables for ocean coupling --- physics/module_MYNNPBL_wrapper.F90 | 74 ++++++++++--- physics/module_MYNNPBL_wrapper.meta | 164 ++++++++++++++++++++++++++-- 2 files changed, 214 insertions(+), 24 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 0e9cb3c4f..3ab44c989 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -37,9 +37,10 @@ end subroutine mynnedmf_wrapper_finalize !! \htmlinclude mynnedmf_wrapper_run.html !! SUBROUTINE mynnedmf_wrapper_run( & - & im,levs, & + & ix,im,levs, & & flag_init,flag_restart,cycling, & - & lssav, ldiag3d, qdiag3d, lsidea,& + & lssav, ldiag3d, qdiag3d, & + & lsidea, cplflx, & & delt,dtf,dx,zorl, & & phii,u,v,omega,t3d, & & qgrs_water_vapor, & @@ -50,12 +51,19 @@ SUBROUTINE mynnedmf_wrapper_run( & & qgrs_ozone, & & qgrs_water_aer_num_conc, & & qgrs_ice_aer_num_conc, & - & prsl,exner, & + & del,prsl,exner, & & slmsk,tsurf,qsfc,ps, & - & ust,ch,hflx,qflx, & - & wspd,rb,dtsfc1,dqsfc1, & + & ust,ch,hflx,qflx,wspd,rb, & + & dtsfc1,dqsfc1, & + & dusfc1,dvsfc1, & + & dusfci_diag,dvsfci_diag, & & dtsfci_diag,dqsfci_diag, & + & dusfc_diag,dvsfc_diag, & & dtsfc_diag,dqsfc_diag, & + & dusfci_cpl,dvsfci_cpl, & + & dtsfci_cpl,dqsfci_cpl, & + & dusfc_cpl,dvsfc_cpl, & + & dtsfc_cpl,dqsfc_cpl, & & recmol, & & qke,qke_adv,Tsq,Qsq,Cov, & & el_pbl,sh3d,exch_h,exch_m, & @@ -171,6 +179,8 @@ SUBROUTINE mynnedmf_wrapper_run( & integer, intent(out) :: errflg LOGICAL, INTENT(IN) :: lssav, ldiag3d, lsidea, qdiag3d + LOGICAL, INTENT(IN) :: cplflx + ! NAMELIST OPTIONS (INPUT): LOGICAL, INTENT(IN) :: bl_mynn_tkeadvect, ltaerosol, & lprnt, do_mynnsfclay, cycling @@ -204,7 +214,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !MYNN-1D REAL(kind=kind_phys), intent(in) :: delt, dtf - INTEGER, intent(in) :: im, levs + INTEGER, intent(in) :: im, ix, levs LOGICAL, intent(in) :: flag_init, flag_restart INTEGER :: initflag, k, i INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & @@ -231,7 +241,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & sub_thl,sub_sqv,det_thl,det_sqv real(kind=kind_phys), dimension(im,levs), intent(in) :: & & u,v,omega,t3d, & - & exner,prsl, & + & del,exner,prsl, & & qgrs_water_vapor, & & qgrs_liquid_cloud, & & qgrs_ice_cloud, & @@ -272,17 +282,25 @@ SUBROUTINE mynnedmf_wrapper_run( & real(kind=kind_phys), dimension(im), intent(inout) :: & & pblh real(kind=kind_phys), dimension(im), intent(out) :: & - & ch,dtsfc1,dqsfc1, & + & ch,dtsfc1,dqsfc1,dusfc1,dvsfc1, & & dtsfci_diag,dqsfci_diag,dtsfc_diag,dqsfc_diag, & + & dusfci_diag,dvsfci_diag,dusfc_diag,dvsfc_diag, & & maxMF - integer, dimension(im), intent(inout) :: & - & kpbl,nupdraft,ktop_plume + integer, dimension(im), intent(inout) :: & + & kpbl,nupdraft,ktop_plume + + real(kind=kind_phys), dimension(im), intent(inout) :: & + & dusfc_cpl,dvsfc_cpl,dtsfc_cpl,dqsfc_cpl + real(kind=kind_phys), dimension(im), intent(out) :: & + & dusfci_cpl,dvsfci_cpl,dtsfci_cpl,dqsfci_cpl !LOCAL real, dimension(im) :: & & WSTAR,DELTA,qcg,hfx,qfx,rmol,xland, & & uoce,voce,vdfg,znt,ts + real, dimension(im) :: dusfci1,dvsfci1,dtsfci1,dqsfci1 + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -474,12 +492,33 @@ SUBROUTINE mynnedmf_wrapper_run( & delta(i)=0.0 qcg(i)=0.0 - dtsfc1(i)=hfx(i) - dqsfc1(i)=qfx(i)*XLV - dtsfci_diag(i)=dtsfc1(i) - dqsfci_diag(i)=dqsfc1(i) - dtsfc_diag(i)=dtsfc_diag(i) + dtsfc1(i)*delt - dqsfc_diag(i)=dqsfc_diag(i) + dqsfc1(i)*delt + dtsfc1(i) = hfx(i) + dqsfc1(i) = qfx(i)*XLV + dusfc1(i) = -1.*rho(i,1)*ust(i)*ust(i)*u(i,1)/wspd(i) + dvsfc1(i) = -1.*rho(i,1)*ust(i)*ust(i)*v(i,1)/wspd(i) + + !BWG: diagnostic surface fluxes for scalars & momentum + dtsfci_diag(i) = dtsfc1(i) + dqsfci_diag(i) = dqsfc1(i) + dtsfc_diag(i) = dtsfc_diag(i) + dtsfc1(i)*delt + dqsfc_diag(i) = dqsfc_diag(i) + dqsfc1(i)*delt + dusfci_diag(i) = dusfc1(i) + dvsfci_diag(i) = dvsfc1(i) + dusfc_diag(i) = dusfc_diag(i) + dusfci_diag(i)*delt + dvsfc_diag(i) = dvsfc_diag(i) + dvsfci_diag(i)*delt + + ! BWG: Coupling insertion + if(cplflx) then + dusfci_cpl(i) = dusfci_diag(i) + dvsfci_cpl(i) = dvsfci_diag(i) + dtsfci_cpl(i) = dtsfci_diag(i) + dqsfci_cpl(i) = dqsfci_diag(i) + + dusfc_cpl(i) = dusfc_cpl(i) + dusfci_cpl(i)*delt + dvsfc_cpl(i) = dvsfc_cpl(i) + dvsfci_cpl(i)*delt + dtsfc_cpl(i) = dtsfc_cpl(i) + dtsfci_cpl(i)*delt + dqsfc_cpl(i) = dqsfc_cpl(i) + dqsfci_cpl(i)*delt + endif znt(i)=zorl(i)*0.01 !cm -> m? if (do_mynnsfclay) then @@ -782,7 +821,8 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo endif endif - + + if (lprnt) then print* print*,"===Finished with mynn_bl_driver; output:" diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 31ebcde74..6952fd7fd 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -27,10 +27,17 @@ intent = out optional = F -##################################################################### [ccpp-arg-table] name = mynnedmf_wrapper_run type = scheme +[ix] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -101,6 +108,14 @@ type = logical intent = in optional = F +[cplflx] + standard_name = flag_for_flux_coupling + long_name = flag controlling cplflx collection (default off) + units = flag + dimensions = () + type = logical + intent = in + optional = F [delt] standard_name = time_step_for_physics long_name = time step for physics @@ -254,6 +269,15 @@ kind = kind_phys intent = in optional = F +[del] + standard_name = air_pressure_difference_between_midlayers + long_name = pres(k) - pres(k+1) + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [prsl] standard_name = air_pressure long_name = mean layer pressure @@ -327,8 +351,8 @@ intent = out optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux reduced by surface roughness + standard_name = kinematic_surface_upward_sensible_heat_flux + long_name = kinematic surface upward sensible heat flux units = K m s-1 dimensions = (horizontal_dimension) type = real @@ -336,8 +360,8 @@ intent = in optional = F [qflx] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux reduced by surface roughness + standard_name = kinematic_surface_upward_latent_heat_flux + long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 dimensions = (horizontal_dimension) type = real @@ -380,6 +404,42 @@ kind = kind_phys intent = out optional = F +[dusfc1] + standard_name = instantaneous_surface_x_momentum_flux + long_name = surface momentum flux in the x-direction valid for current call + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc1] + standard_name = instantaneous_surface_y_momentum_flux + long_name = surface momentum flux in the y-direction valid for current call + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dusfci_diag] + standard_name = instantaneous_surface_x_momentum_flux_for_diag + long_name = instantaneous sfc x momentum flux multiplied by timestep + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfci_diag] + standard_name = instantaneous_surface_y_momentum_flux_for_diag + long_name = instantaneous sfc y momentum flux multiplied by timestep + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [dtsfci_diag] standard_name = instantaneous_surface_upward_sensible_heat_flux_for_diag long_name = instantaneous sfc sensible heat flux multiplied by timestep @@ -398,6 +458,24 @@ kind = kind_phys intent = out optional = F +[dusfc_diag] + standard_name = cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestep + long_name = cumulative sfc x momentum flux multiplied by timestep + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dvsfc_diag] + standard_name = cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestep + long_name = cumulative sfc y momentum flux multiplied by timestep + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [dtsfc_diag] standard_name = cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc sensible heat flux multiplied by timestep @@ -405,7 +483,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [dqsfc_diag] standard_name = cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestep @@ -414,7 +492,79 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = inout + optional = F +[dusfci_cpl] + standard_name = instantaneous_surface_x_momentum_flux_for_coupling + long_name = instantaneous sfc u momentum flux + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dvsfci_cpl] + standard_name = instantaneous_surface_y_momentum_flux_for_coupling + long_name = instantaneous sfc v momentum flux + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dtsfci_cpl] + standard_name = instantaneous_surface_upward_sensible_heat_flux_for_coupling + long_name = instantaneous sfc sensible heat flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dqsfci_cpl] + standard_name = instantaneous_surface_upward_latent_heat_flux_for_coupling + long_name = instantaneous sfc latent heat flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dusfc_cpl] + standard_name = cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep + long_name = cumulative sfc u momentum flux multiplied by timestep + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dvsfc_cpl] + standard_name = cumulative_surface_y_momentum_flux_for_coupling_multiplied_by_timestep + long_name = cumulative sfc v momentum flux multiplied by timestep + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dtsfc_cpl] + standard_name = cumulative_surface_upward_sensible_heat_flux_for_coupling_multiplied_by_timestep + long_name = cumulative sfc sensible heat flux multiplied by timestep + units = W m-2 s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dqsfc_cpl] + standard_name = cumulative_surface_upward_latent_heat_flux_for_coupling_multiplied_by_timestep + long_name = cumulative sfc latent heat flux multiplied by timestep + units = W m-2 s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout optional = F [recmol] standard_name = reciprocal_of_obukhov_length From 990ffbad9219d0ef595a8d5f8f0364d88145e451 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 5 Jun 2020 14:19:47 -0600 Subject: [PATCH 206/404] Add stochastic perturbation variables to mp_thompson.F90, bugfix in module_mp_thompson.F90 --- physics/module_mp_thompson.F90 | 22 +++++++++++++++------- physics/mp_thompson.F90 | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index ce6df30e3..532071a8e 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -1100,6 +1100,13 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & errflg = 1 return end if + ! Activate this code when removing the guard above + !if (rand_perturb_on .ne. 0 .and. .not. present(rand_pert)) then + ! errmsg = 'Logic error in mp_gt_driver: random perturbations are on, ' // & + ! 'but optional argument rand_pert is not present' + ! errflg = 1 + ! return + !end if ! *DH 2020-06-05 if ( (present(tt) .and. (present(th) .or. present(pii))) .or. & @@ -1428,13 +1435,13 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & endif ! if (present(vt_dbz_wt) .and. present(first_time_step)) then - call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & - t1d, p1d, dBZ, kts, kte, i, j, & - melti, vt_dbz_wt(i,:,j), & + call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & + t1d, p1d, dBZ, rand1, kts, kte, i, j, & + melti, vt_dbz_wt(i,:,j), & first_time_step) else - call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & - t1d, p1d, dBZ, kts, kte, i, j, & + call calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & + t1d, p1d, dBZ, rand1, kts, kte, i, j, & melti) end if do k = kts, kte @@ -5366,13 +5373,14 @@ end subroutine calc_effectRad !! of frozen species remaining from what initially existed at the !! melting level interface. subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & - t1d, p1d, dBZ, kts, kte, ii, jj, melti, vt_dBZ, & - first_time_step) + t1d, p1d, dBZ, rand1, kts, kte, ii, jj, melti, & + vt_dBZ, first_time_step) IMPLICIT NONE !..Sub arguments INTEGER, INTENT(IN):: kts, kte, ii, jj + REAL, INTENT(IN):: rand1 REAL, DIMENSION(kts:kte), INTENT(IN):: & qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, t1d, p1d REAL, DIMENSION(kts:kte), INTENT(INOUT):: dBZ diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index 3f2ee144e..1653c825d 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -472,6 +472,12 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & integer :: has_reqc integer :: has_reqi integer :: has_reqs + ! DH* 2020-06-05 hardcode these values for not using random perturbations, + ! hasn't been tested yet with this version of module_mp_thompson.F90 + integer, parameter :: rand_perturb_on = 0 + integer, parameter :: kme_stoch = 1 + !real(kind_phys) :: rand_pert(1:ncol,1:kme_stoch) + ! *DH 2020-06-05 ! Dimensions used in mp_gt_driver integer :: ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & @@ -601,6 +607,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & @@ -618,6 +628,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & diagflag=diagflag, do_radar_ref=do_radar_ref_mp, & re_cloud=re_cloud, re_ice=re_ice, re_snow=re_snow, & has_reqc=has_reqc, has_reqi=has_reqi, has_reqs=has_reqs, & + rand_perturb_on=rand_perturb_on, kme_stoch=kme_stoch, & + ! DH* 2020-06-05 not passing this optional argument, see + ! comment in module_mp_thompson.F90 / mp_gt_driver + !rand_pert=rand_pert, & ids=ids, ide=ide, jds=jds, jde=jde, kds=kds, kde=kde, & ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, & its=its, ite=ite, jts=jts, jte=jte, kts=kts, kte=kte, & From 45e6b4eed472969034c3510e29102fbe051f1638 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 5 Jun 2020 20:33:58 +0000 Subject: [PATCH 207/404] Removing del and ix. using the *_reduced_by_... versions of hflx and qflx. --- physics/module_MYNNPBL_wrapper.F90 | 8 ++++---- physics/module_MYNNPBL_wrapper.meta | 25 ++++--------------------- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 3ab44c989..3752f632b 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -37,7 +37,7 @@ end subroutine mynnedmf_wrapper_finalize !! \htmlinclude mynnedmf_wrapper_run.html !! SUBROUTINE mynnedmf_wrapper_run( & - & ix,im,levs, & + & im,levs, & & flag_init,flag_restart,cycling, & & lssav, ldiag3d, qdiag3d, & & lsidea, cplflx, & @@ -51,7 +51,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & qgrs_ozone, & & qgrs_water_aer_num_conc, & & qgrs_ice_aer_num_conc, & - & del,prsl,exner, & + & prsl,exner, & & slmsk,tsurf,qsfc,ps, & & ust,ch,hflx,qflx,wspd,rb, & & dtsfc1,dqsfc1, & @@ -214,7 +214,7 @@ SUBROUTINE mynnedmf_wrapper_run( & !MYNN-1D REAL(kind=kind_phys), intent(in) :: delt, dtf - INTEGER, intent(in) :: im, ix, levs + INTEGER, intent(in) :: im, levs LOGICAL, intent(in) :: flag_init, flag_restart INTEGER :: initflag, k, i INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, & @@ -241,7 +241,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & sub_thl,sub_sqv,det_thl,det_sqv real(kind=kind_phys), dimension(im,levs), intent(in) :: & & u,v,omega,t3d, & - & del,exner,prsl, & + & exner,prsl, & & qgrs_water_vapor, & & qgrs_liquid_cloud, & & qgrs_ice_cloud, & diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 6952fd7fd..c577b2563 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -30,14 +30,6 @@ [ccpp-arg-table] name = mynnedmf_wrapper_run type = scheme -[ix] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -269,15 +261,6 @@ kind = kind_phys intent = in optional = F -[del] - standard_name = air_pressure_difference_between_midlayers - long_name = pres(k) - pres(k+1) - units = Pa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F [prsl] standard_name = air_pressure long_name = mean layer pressure @@ -351,8 +334,8 @@ intent = out optional = F [hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux - long_name = kinematic surface upward sensible heat flux + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 dimensions = (horizontal_dimension) type = real @@ -360,8 +343,8 @@ intent = in optional = F [qflx] - standard_name = kinematic_surface_upward_latent_heat_flux - long_name = kinematic surface upward latent heat flux + standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 dimensions = (horizontal_dimension) type = real From 840f13500d01f71232276613de295a91bdc010c2 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 5 Jun 2020 21:01:12 +0000 Subject: [PATCH 208/404] Removing the im dimension specification of the *_cpl arrays, and making them all inout. Note that the meta file already had them as inout. --- physics/module_MYNNPBL_wrapper.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 3752f632b..413db8b62 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -289,9 +289,9 @@ SUBROUTINE mynnedmf_wrapper_run( & integer, dimension(im), intent(inout) :: & & kpbl,nupdraft,ktop_plume - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & dusfc_cpl,dvsfc_cpl,dtsfc_cpl,dqsfc_cpl - real(kind=kind_phys), dimension(im), intent(out) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & dusfci_cpl,dvsfci_cpl,dtsfci_cpl,dqsfci_cpl !LOCAL From 755de19e649a07d6beb060b35a13946192789c90 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 5 Jun 2020 21:41:13 +0000 Subject: [PATCH 209/404] Updates to MYNN-EDMF --- physics/module_bl_mynn.F90 | 309 ++++++++++++++++++++----------------- 1 file changed, 169 insertions(+), 140 deletions(-) diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index edc5d4a1e..2c1ce9fe0 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -459,7 +459,7 @@ MODULE module_bl_mynn !> @{ SUBROUTINE mym_initialize ( & & kts,kte, & - & dz, zw, & + & dz, dx, zw, & & u, v, thl, qw, & ! & ust, rmo, pmz, phh, flt, flq, & & zi, theta, sh, & @@ -476,7 +476,7 @@ SUBROUTINE mym_initialize ( & INTEGER, INTENT(IN) :: bl_mynn_mixlength,bl_mynn_edmf LOGICAL, INTENT(IN) :: INITIALIZE_QKE ! REAL, INTENT(IN) :: ust, rmo, pmz, phh, flt, flq - REAL, INTENT(IN) :: ust, rmo, Psig_bl + REAL, INTENT(IN) :: ust, rmo, Psig_bl, dx REAL, DIMENSION(kts:kte), INTENT(in) :: dz REAL, DIMENSION(kts:kte+1), INTENT(in) :: zw REAL, DIMENSION(kts:kte), INTENT(in) :: u,v,thl,qw,cldfra_bl1D,& @@ -546,7 +546,7 @@ SUBROUTINE mym_initialize ( & !> - call mym_length() to calculate the master length scale. CALL mym_length ( & & kts,kte, & - & dz, zw, & + & dz, dx, zw, & & rmo, flt, flq, & & vt, vq, & & u, v, qke, & @@ -791,7 +791,7 @@ END SUBROUTINE mym_level2 !! This subroutine calculates the mixing lengths. SUBROUTINE mym_length ( & & kts,kte, & - & dz, zw, & + & dz, dx, zw, & & rmo, flt, flq, & & vt, vq, & & u1, v1, qke, & @@ -813,7 +813,7 @@ SUBROUTINE mym_length ( & INTEGER, INTENT(IN) :: bl_mynn_mixlength,bl_mynn_edmf REAL, DIMENSION(kts:kte), INTENT(in) :: dz REAL, DIMENSION(kts:kte+1), INTENT(in) :: zw - REAL, INTENT(in) :: rmo,flt,flq,Psig_bl + REAL, INTENT(in) :: rmo,flt,flq,Psig_bl,dx REAL, DIMENSION(kts:kte), INTENT(IN) :: u1,v1,qke,vt,vq,cldfra_bl1D,& edmf_w1,edmf_a1,edmf_qc1 REAL, DIMENSION(kts:kte), INTENT(out) :: qkw, el @@ -1042,7 +1042,7 @@ SUBROUTINE mym_length ( & Ugrid = sqrt(u1(kts)**2 + v1(kts)**2) cns = 3.5 * (1.0 - MIN(MAX(Ugrid - Uonset, 0.0)/10.0, 1.0)) alp1 = 0.23 - alp2 = 0.30 + alp2 = 0.30 + 0.3*MIN(MAX((dx - 3000.)/10000., 0.0), 1.0) alp3 = 2.0 alp4 = 20. !10. alp5 = alp2 !like alp2, but for free atmosphere @@ -1543,7 +1543,7 @@ END SUBROUTINE boulac_length SUBROUTINE mym_turbulence ( & & kts,kte, & & levflag, & - & dz, zw, & + & dz, dx, zw, & & u, v, thl, ql, qw, & & qke, tsq, qsq, cov, & & vt, vq, & @@ -1571,7 +1571,7 @@ SUBROUTINE mym_turbulence ( & INTEGER, INTENT(IN) :: levflag,bl_mynn_mixlength,bl_mynn_edmf REAL, DIMENSION(kts:kte), INTENT(in) :: dz REAL, DIMENSION(kts:kte+1), INTENT(in) :: zw - REAL, INTENT(in) :: rmo,flt,flq,Psig_bl,Psig_shcu + REAL, INTENT(in) :: rmo,flt,flq,Psig_bl,Psig_shcu,dx REAL, DIMENSION(kts:kte), INTENT(in) :: u,v,thl,qw,& &ql,vt,vq,qke,tsq,qsq,cov,cldfra_bl1D,edmf_w1,edmf_a1,edmf_qc1,& &TKEprodTD @@ -1632,7 +1632,7 @@ SUBROUTINE mym_turbulence ( & ! CALL mym_length ( & & kts,kte, & - & dz, zw, & + & dz, dx, zw, & & rmo, flt, flq, & & vt, vq, & & u, v, qke, & @@ -1894,14 +1894,6 @@ SUBROUTINE mym_turbulence ( & gamv = 0.0 END IF ! -! Add stochastic perturbation of prandtl number limit - if (spp_pbl==1) then - prlimit = MIN(MAX(1.,2.5 + 5.0*rstoch_col(k)), 10.) - IF(sm(k) > sh(k)*Prlimit) THEN - sm(k) = sh(k)*Prlimit - ENDIF - ENDIF -! ! Add min background stability function (diffusivity) within model levels ! with active plumes and low cloud fractions. cldavg = 0.5*(cldfra_bl1D(k-1) + cldfra_bl1D(k)) @@ -2701,11 +2693,11 @@ SUBROUTINE mym_condensation (kts,kte, & !CLOUD WATER AND ICE IF (q1k < 0.) THEN !unstaurated ql_water = sgm(k)*EXP(1.2*q1k-1) -! ql_ice = sgm(k)*EXP(0.9*q1k-2.6) + ql_ice = sgm(k)*EXP(1.2*q1k-1.) !Reduce ice mixing ratios in the upper troposphere - low_weight = MIN(MAX(p(k)-40000.0, 0.0),40000.0)/40000.0 - ql_ice = low_weight * sgm(k)*EXP(1.1*q1k-1.6) & !low-lev - + (1.-low_weight) * sgm(k)*EXP(1.1*q1k-2.8)!upper-lev +! low_weight = MIN(MAX(p(k)-40000.0, 0.0),40000.0)/40000.0 +! ql_ice = low_weight * sgm(k)*EXP(1.1*q1k-1.6) & !low-lev +! + (1.-low_weight) * sgm(k)*EXP(1.1*q1k-2.8)!upper-lev ELSE IF (q1k > 2.) THEN !supersaturated ql_water = sgm(k)*q1k ql_ice = MIN(80.*qv(k),0.1)*sgm(k)*q1k @@ -2889,7 +2881,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & !! grav_settling = 0 otherwise ! thl - liquid water potential temperature ! qw - total water -! dfm,dfh,dfq - as above +! dfm,dfh,dfq - diffusivities i.e., dfh(k) = elq*sh(k) / dzk ! flt - surface flux of thl ! flq - surface flux of qw @@ -2915,7 +2907,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & REAL, DIMENSION(kts:kte) :: dtz,vt,vq,dfhc,dfmc !Kh for clouds (Pr < 2) REAL, DIMENSION(kts:kte) :: sqv2,sqc2,sqi2,sqw2,qni2,qnc2, & !AFTER MIXING qnwfa2,qnifa2,ozone2 - REAL, DIMENSION(kts:kte) :: zfac,plumeKh + REAL, DIMENSION(kts:kte) :: zfac,plumeKh,rhoinv REAL, DIMENSION(kts:kte) :: a,b,c,d,x REAL, DIMENSION(kts:kte+1) :: rhoz, & !rho on model interface & khdz, kmdz @@ -2940,28 +2932,31 @@ SUBROUTINE mynn_tendencies(kts,kte, & ENDIF !Prepare "constants" for diffusion equation. - !khdz = rho*Kh/dz - dtz(kts)=delt/dz(kts) - kh=dfh(kts)*dz(kts) - km=dfm(kts)*dz(kts) - rhoz(kts)=rho(kts) - khdz(kts)=rhoz(kts)*kh/dz(kts) - kmdz(kts)=rhoz(kts)*km/dz(kts) + !khdz = rho*Kh/dz = rho*dfh + dtz(kts) =delt/dz(kts) + rhoz(kts) =rho(kts) + rhoinv(kts)=1./rho(kts) + khdz(kts) =rhoz(kts)*dfh(kts) + kmdz(kts) =rhoz(kts)*dfm(kts) DO k=kts+1,kte - dtz(k)=delt/dz(k) - rhoz(k)=(rho(k)*dz(k-1) + rho(k-1)*dz(k))/(dz(k-1)+dz(k)) + dtz(k) =delt/dz(k) + rhoz(k) =(rho(k)*dz(k-1) + rho(k-1)*dz(k))/(dz(k-1)+dz(k)) + rhoz(k) = MAX(rhoz(k),1E-4) + rhoinv(k)=1./MAX(rho(k),1E-4) + dzk = 0.5 *( dz(k)+dz(k-1) ) + khdz(k) = rhoz(k)*dfh(k) + kmdz(k) = rhoz(k)*dfm(k) + ENDDO + khdz(kte+1)=rhoz(kte+1)*dfh(kte) + kmdz(kte+1)=rhoz(kte+1)*dfm(kte) - dzk = 0.5 *( dz(k)+dz(k-1) ) - kh = dfh(k)*dzk - km = dfm(k)*dzk - khdz(k)= rhoz(k)*kh/dzk - kmdz(k)= rhoz(k)*km/dzk + !stability criteria for mf + DO k=kts+1,kte-1 + khdz(k) = MAX(khdz(k), 0.5*rho(k)* s_aw(k)) + khdz(k) = MAX(khdz(k), -0.5*rho(k)*(s_aw(k)-s_aw(k+1))) + kmdz(k) = MAX(kmdz(k), 0.5*rho(k)* s_aw(k)) + kmdz(k) = MAX(kmdz(k), -0.5*rho(k)*(s_aw(k)-s_aw(k+1))) ENDDO - rhoz(kte+1)=rho(kte) - kh=dfh(kte)*dz(kte) - km=dfm(kte)*dz(kte) - khdz(kte+1)=rhoz(kte+1)*kh/dz(kte) - kmdz(kte+1)=rhoz(kte+1)*km/dz(kte) !!============================================ !! u @@ -2969,25 +2964,41 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(1)=0. - b(1)=1. + dtz(k)*(dfm(k+1)+ust**2/wspd) - 0.5*dtz(k)*s_aw(k+1)*onoff - c(1)=-dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff - d(1)=u(k) + dtz(k)*uoce*ust**2/wspd - dtz(k)*s_awu(k+1)*onoff + & - sub_u(k)*delt + det_u(k)*delt +! a(1)=0. +! b(1)=1. + dtz(k)*(dfm(k+1)+ust**2/wspd) - 0.5*dtz(k)*s_aw(k+1)*onoff +! c(1)=-dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff +! d(1)=u(k) + dtz(k)*uoce*ust**2/wspd - dtz(k)*s_awu(k+1)*onoff + & +! sub_u(k)*delt + det_u(k)*delt +! +! DO k=kts+1,kte-1 +! a(k)= - dtz(k)*dfm(k) + 0.5*dtz(k)*s_aw(k)*onoff +! b(k)=1. + dtz(k)*(dfm(k)+dfm(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*onoff +! c(k)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff +! d(k)=u(k) + dtz(k)*(s_awu(k)-s_awu(k+1))*onoff + & +! sub_u(k)*delt + det_u(k)*delt +! ENDDO -!JOE - tend test -! a(k)=0. -! b(k)=1.+dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff -! c(k)=-dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff -! d(k)=u(k)*(1.-ust**2/wspd*dtz(k)) + & -! dtz(k)*uoce*ust**2/wspd - dtz(k)*s_awu(k+1)*onoff +!rho-weighted: + a(k)= -dtz(k)*kmdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(kmdz(k+1)+ust**2/wspd)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff + c(k)= -dtz(k)*kmdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff + d(k)=u(k) + dtz(k)*uoce*ust**2/wspd - dtz(k)*s_awu(k+1)*onoff + & + & sub_u(k)*delt + det_u(k)*delt + +!!JOE - tend test +!! a(k)=0. +!! b(k)=1.+dtz(k)*kmdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff +!! c(k) =-dtz(k)*kmdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff +!! d(k)=u(k)*(1.-ust**2/wspd*dtz(k)) + & +!! dtz(k)*uoce*ust**2/wspd - dtz(k)*s_awu(k+1)*onoff DO k=kts+1,kte-1 - a(k)= - dtz(k)*dfm(k) + 0.5*dtz(k)*s_aw(k)*onoff - b(k)=1. + dtz(k)*(dfm(k)+dfm(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*onoff - c(k)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff + a(k)= -dtz(k)*kmdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k)*onoff + b(k)=1.+dtz(k)*(kmdz(k)+kmdz(k+1))*rhoinv(k) + & + & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*onoff + c(k)= -dtz(k)*kmdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff d(k)=u(k) + dtz(k)*(s_awu(k)-s_awu(k+1))*onoff + & - sub_u(k)*delt + det_u(k)*delt + & sub_u(k)*delt + det_u(k)*delt ENDDO !! no flux at the top @@ -3009,7 +3020,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & d(kte)=u(kte) ! CALL tridiag(kte,a,b,c,d) - CALL tridiag2(kte,a,b,c,d,x) + CALL tridiag3(kte,a,b,c,d,x) DO k=kts,kte ! du(k)=(d(k-kts+1)-u(k))/delt @@ -3022,26 +3033,42 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(1)=0. - b(1)=1. + dtz(k)*(dfm(k+1)+ust**2/wspd) - 0.5*dtz(k)*s_aw(k+1)*onoff - c(1)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff +! a(1)=0. +! b(1)=1. + dtz(k)*(dfm(k+1)+ust**2/wspd) - 0.5*dtz(k)*s_aw(k+1)*onoff +! c(1)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff !! d(1)=v(k) - d(1)=v(k) + dtz(k)*voce*ust**2/wspd - dtz(k)*s_awv(k+1)*onoff + & - sub_v(k)*delt + det_v(k)*delt +! d(1)=v(k) + dtz(k)*voce*ust**2/wspd - dtz(k)*s_awv(k+1)*onoff + & +! sub_v(k)*delt + det_v(k)*delt +! +! DO k=kts+1,kte-1 +! a(k)= - dtz(k)*dfm(k) + 0.5*dtz(k)*s_aw(k)*onoff +! b(k)=1. + dtz(k)*(dfm(k)+dfm(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*onoff +! c(k)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff +! d(k)=v(k) + dtz(k)*(s_awv(k)-s_awv(k+1))*onoff + & +! sub_v(k)*delt + det_v(k)*delt +! ENDDO -!JOE - tend test -! a(k)=0. -! b(k)=1.+dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff -! c(k)= -dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff -! d(k)=v(k)*(1.-ust**2/wspd*dtz(k)) + & -! dtz(k)*voce*ust**2/wspd - dtz(k)*s_awv(k+1)*onoff +!rho-weighted: + a(k)= -dtz(k)*kmdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(kmdz(k+1)+ust**2/wspd)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff + c(k)= -dtz(k)*kmdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff + d(k)=v(k) + dtz(k)*voce*ust**2/wspd - dtz(k)*s_awv(k+1)*onoff + & + & sub_v(k)*delt + det_v(k)*delt + +!!JOE - tend test +!! a(k)=0. +!! b(k)=1.+dtz(k)*kmdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff +!! c(k)= -dtz(k)*kmdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff +!! d(k)=v(k)*(1.-ust**2/wspd*dtz(k)) + & +!! dtz(k)*voce*ust**2/wspd - dtz(k)*s_awv(k+1)*onoff DO k=kts+1,kte-1 - a(k)= - dtz(k)*dfm(k) + 0.5*dtz(k)*s_aw(k)*onoff - b(k)=1. + dtz(k)*(dfm(k)+dfm(k+1)) + 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*onoff - c(k)= - dtz(k)*dfm(k+1) - 0.5*dtz(k)*s_aw(k+1)*onoff + a(k)= -dtz(k)*kmdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k)*onoff + b(k)=1.+dtz(k)*(kmdz(k)+kmdz(k+1))*rhoinv(k) + & + & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*onoff + c(k)= -dtz(k)*kmdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*onoff d(k)=v(k) + dtz(k)*(s_awv(k)-s_awv(k+1))*onoff + & - sub_v(k)*delt + det_v(k)*delt + & sub_v(k)*delt + det_v(k)*delt ENDDO !! no flux at the top @@ -3063,7 +3090,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & d(kte)=v(kte) ! CALL tridiag(kte,a,b,c,d) - CALL tridiag2(kte,a,b,c,d,x) + CALL tridiag3(kte,a,b,c,d,x) DO k=kts,kte ! dv(k)=(d(k-kts+1)-v(k))/delt @@ -3093,19 +3120,19 @@ SUBROUTINE mynn_tendencies(kts,kte, & ! ENDDO !rho-weighted: - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1) - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=thl(k) + dtz(k)*flt + tcd(k)*delt - dtz(k)*s_awthl(k+1) + & & diss_heat(k)*delt*dheat_opt + sub_thl(k)*delt + det_thl(k)*delt DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k) - b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))*rhoinv(k) + & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=thl(k) + tcd(k)*delt + dtz(k)*(s_awthl(k)-s_awthl(k+1)) + & - & diss_heat(k)*delt*dheat_opt + & + & + diss_heat(k)*delt*dheat_opt + & & sub_thl(k)*delt + det_thl(k)*delt ENDDO @@ -3161,16 +3188,16 @@ SUBROUTINE mynn_tendencies(kts,kte, & ! ENDDO !rho-weighted: - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1) - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=sqw(k) + dtz(k)*flq + qcd(k)*delt - dtz(k)*s_awqt(k+1) DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k) - b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))*rhoinv(k) + & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=sqw(k) + qcd(k)*delt + dtz(k)*(s_awqt(k)-s_awqt(k+1)) ENDDO @@ -3226,17 +3253,17 @@ SUBROUTINE mynn_tendencies(kts,kte, & ! ENDDO !rho-weighted: - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1) - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=sqc(k) + dtz(k)*flqc + qcd(k)*delt - dtz(k)*s_awqc(k+1) + & & det_sqc(k)*delt DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k) - b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))*rhoinv(k) + & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=sqc(k) + qcd(k)*delt + dtz(k)*(s_awqc(k)-s_awqc(k+1)) + & & det_sqc(k)*delt ENDDO @@ -3283,17 +3310,17 @@ SUBROUTINE mynn_tendencies(kts,kte, & ! ENDDO !rho-weighted: - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1) - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=sqv(k) + dtz(k)*flqv + qcd(k)*delt - dtz(k)*s_awqv(k+1) + & & sub_sqv(k)*delt + det_sqv(k)*delt DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k) - b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))*rhoinv(k) + & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=sqv(k) + qcd(k)*delt + dtz(k)*(s_awqv(k)-s_awqv(k+1)) + & & sub_sqv(k)*delt + det_sqv(k)*delt ENDDO @@ -3348,15 +3375,15 @@ SUBROUTINE mynn_tendencies(kts,kte, & ! ENDDO !rho-weighted: - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - c(k)= -dtz(k)*khdz(k+1)/rho(k) + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))*rhoinv(k) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) d(k)=sqi(k) DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) - c(k)= -dtz(k)*khdz(k+1)/rho(k) + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))*rhoinv(k) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) d(k)=sqi(k) ENDDO @@ -3398,16 +3425,16 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc d(k)=qni(k) - dtz(k)*s_awqni(k+1)*nonloc DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k)*nonloc - b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k)*nonloc + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))*rhoinv(k) + & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*nonloc - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc d(k)=qni(k) + dtz(k)*(s_awqni(k)-s_awqni(k+1))*nonloc ENDDO @@ -3439,16 +3466,16 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc d(k)=qnc(k) - dtz(k)*s_awqnc(k+1)*nonloc DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k)*nonloc - b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) + & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k)*nonloc + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))*rhoinv(k) + & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*nonloc - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc d(k)=qnc(k) + dtz(k)*(s_awqnc(k)-s_awqnc(k+1))*nonloc ENDDO @@ -3479,17 +3506,17 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k) + khdz(k+1))/rho(k) - & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k) + khdz(k+1))*rhoinv(k) - & & 0.5*dtz(k)*s_aw(k+1)*nonloc - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc d(k)=qnwfa(k) - dtz(k)*s_awqnwfa(k+1)*nonloc DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k)*nonloc - b(k)=1.+dtz(k)*(khdz(k) + khdz(k+1))/rho(k) + & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k)*nonloc + b(k)=1.+dtz(k)*(khdz(k) + khdz(k+1))*rhoinv(k) + & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*nonloc - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc d(k)=qnwfa(k) + dtz(k)*(s_awqnwfa(k)-s_awqnwfa(k+1))*nonloc ENDDO @@ -3521,17 +3548,17 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k) + khdz(k+1))/rho(k) - & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k) + khdz(k+1))*rhoinv(k) - & & 0.5*dtz(k)*s_aw(k+1)*nonloc - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc d(k)=qnifa(k) - dtz(k)*s_awqnifa(k+1)*nonloc DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) + 0.5*dtz(k)*s_aw(k)*nonloc - b(k)=1.+dtz(k)*(khdz(k) + khdz(k+1))/rho(k) + & + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + 0.5*dtz(k)*s_aw(k)*nonloc + b(k)=1.+dtz(k)*(khdz(k) + khdz(k+1))*rhoinv(k) + & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1))*nonloc - c(k)= -dtz(k)*khdz(k+1)/rho(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1)*nonloc d(k)=qnifa(k) + dtz(k)*(s_awqnifa(k)-s_awqnifa(k+1))*nonloc ENDDO @@ -3562,15 +3589,15 @@ SUBROUTINE mynn_tendencies(kts,kte, & k=kts !rho-weighted: - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))/rho(k) - c(k)= -dtz(k)*khdz(k+1)/rho(k) + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k+1)+khdz(k))*rhoinv(k) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) d(k)=ozone(k) DO k=kts+1,kte-1 - a(k)= -dtz(k)*khdz(k)/rho(k) - b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))/rho(k) - c(k)= -dtz(k)*khdz(k+1)/rho(k) + a(k)= -dtz(k)*khdz(k)*rhoinv(k) + b(k)=1.+dtz(k)*(khdz(k)+khdz(k+1))*rhoinv(k) + c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) d(k)=ozone(k) ENDDO @@ -4440,7 +4467,8 @@ SUBROUTINE mynn_bl_driver( & !! within mym_initialize(): mym_level2() and mym_length(). CALL mym_initialize ( & &kts,kte, & - &dz1, zw, u1, v1, thl, sqv, & + &dz1, dx(i,j), zw, & + &u1, v1, thl, sqv, & &PBLH(i,j), th1, sh, & &ust(i,j), rmol(i,j), & &el, Qke1, Tsq1, Qsq1, Cov1, & @@ -4816,7 +4844,7 @@ SUBROUTINE mynn_bl_driver( & !More strict limits over land to reduce stable-layer mixouts if ((xland(i,j)-1.5).GE.0)THEN ! WATER - radsum=MIN(radsum,120.0) + radsum=MIN(radsum,90.0) bfx0 = max(radsum/rho1(k)/cp,0.) else ! LAND radsum=MIN(0.25*radsum,30.0)!practically turn off over land @@ -4871,7 +4899,7 @@ SUBROUTINE mynn_bl_driver( & &qnc1,qni1,qnwfa1,qnifa1, & &ex1,Vt,Vq,sgm, & &ust(i,j),flt,flq,flqv,flqc, & - &PBLH(i,j),KPBL(i,j),DX(i,j), & + &PBLH(i,j),KPBL(i,j),DX(i,j), & &xland(i,j),th_sfc, & ! now outputs - tendencies ! &,dth1mf,dqv1mf,dqc1mf,du1mf,dv1mf & @@ -4908,7 +4936,8 @@ SUBROUTINE mynn_bl_driver( & !! to carry out successive claculations. CALL mym_turbulence ( & &kts,kte,levflag, & - &dz1, zw, u1, v1, thl, sqc, sqw, & + &dz1, DX(i,j), zw, & + &u1, v1, thl, sqc, sqw, & &qke1, tsq1, qsq1, cov1, & &vt, vq, & &rmol(i,j), flt, flq, & @@ -5875,7 +5904,7 @@ SUBROUTINE DMP_mf( & !w-dependency for entrainment a la Tian and Kuang (2016) !ENT(k,i) = 0.35/(MIN(MAX(UPW(K-1,I),0.75),1.9)*l) wmin = 0.3 + l*0.0005 !* MAX(pblh-ZW(k+1), 0.0)/pblh - ENT(k,i) = 0.31/(MIN(MAX(UPW(K-1,I),wmin),1.9)*l) + ENT(k,i) = 0.33/(MIN(MAX(UPW(K-1,I),wmin),1.9)*l) !Entrainment from Negggers (2015, JAMES) !ENT(k,i) = 0.02*l**-0.35 - 0.0009 !Minimum background entrainment From 49b7f3ca7757efde79f8480d906f8cc4457045dd Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 5 Jun 2020 23:26:07 +0000 Subject: [PATCH 210/404] Update to MYNN sfc layer scheme --- physics/module_MYNNSFC_wrapper.F90 | 21 +- physics/module_MYNNSFC_wrapper.meta | 68 ++++ physics/module_sf_mynn.F90 | 525 ++++++++++++++++++++++++++-- 3 files changed, 574 insertions(+), 40 deletions(-) diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index 5693c49a8..b2eaed414 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -19,14 +19,19 @@ end subroutine mynnsfc_wrapper_finalize !>\defgroup gsd_mynn_sfc GSD MYNN Surface Layer Scheme Module !> \brief This scheme (1) performs pre-mynnsfc work, (2) runs the mynn sfc layer scheme, and (3) performs post-mynnsfc work +#if 0 !! \section arg_table_mynnsfc_wrapper_run Argument Table !! \htmlinclude mynnsfc_wrapper_run.html !! +#endif !###=================================================================== SUBROUTINE mynnsfc_wrapper_run( & & im,levs, & & itimestep,iter, & & flag_init,flag_restart,lsm, & + & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) + & z0pert,ztpert, & !intent(in) + & redrag,sfc_z0_type, & !intent(in) & delt,dx, & & u, v, t3d, qvsh, qc, prsl, phii, & & exner, ps, PBLH, slmsk, & @@ -101,6 +106,15 @@ SUBROUTINE mynnsfc_wrapper_run( & & iz0tlnd = 0, & & isfflx = 1 + integer, intent(in) :: ivegsrc + integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean + logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) + +!Input data + integer, dimension(im), intent(in) :: vegtype + real(kind=kind_phys), dimension(im), intent(in) :: & + & sigmaf,shdmax,z0pert,ztpert + !MYNN-1D REAL :: delt INTEGER :: im, levs @@ -235,8 +249,11 @@ SUBROUTINE mynnsfc_wrapper_run( & CP=cp,G=g,ROVCP=rcp,R=r_d,XLV=xlv, & SVP1=svp1,SVP2=svp2,SVP3=svp3,SVPT0=svpt0, & EP1=ep_1,EP2=ep_2,KARMAN=karman, & - ISFFLX=isfflx,isftcflx=isftcflx,LSM=lsm, & - iz0tlnd=iz0tlnd,itimestep=itimestep,iter=iter, & + ISFFLX=isfflx,isftcflx=isftcflx,LSM=lsm,iz0tlnd=iz0tlnd, & + & sigmaf=sigmaf,vegtype=vegtype,shdmax=shdmax,ivegsrc=ivegsrc, & !intent(in) + & z0pert=z0pert,ztpert=ztpert, & !intent(in) + & redrag=redrag,sfc_z0_type=sfc_z0_type, & !intent(in) + itimestep=itimestep,iter=iter, & wet=wet, dry=dry, icy=icy, & !intent(in) tskin_ocn=tskin_ocn, tskin_lnd=tskin_lnd, tskin_ice=tskin_ice, & !intent(in) tsurf_ocn=tsurf_ocn, tsurf_lnd=tsurf_lnd, tsurf_ice=tsurf_ice, & !intent(in) diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 61ddb4fd0..73bf1a462 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -57,6 +57,74 @@ type = integer intent = in optional = F +[sigmaf] + standard_name = bounded_vegetation_area_fraction + long_name = areal fractional cover of green vegetation bounded on the bottom + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[vegtype] + standard_name = vegetation_type_classification + long_name = vegetation type at each grid cell + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[shdmax] + standard_name = maximum_vegetation_area_fraction + long_name = max fractnl cover of green veg + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ivegsrc] + standard_name = vegetation_type_dataset_choice + long_name = land use dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F +[z0pert] + standard_name = perturbation_of_momentum_roughness_length + long_name = perturbation of momentum roughness length + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ztpert] + standard_name = perturbation_of_heat_to_momentum_roughness_length_ratio + long_name = perturbation of heat to momentum roughness length ratio + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[redrag] + standard_name = flag_for_reduced_drag_coefficient_over_sea + long_name = flag for reduced drag coefficient over sea + units = flag + dimensions = () + type = logical + intent = in + optional = F +[sfc_z0_type] + standard_name = flag_for_surface_roughness_option_over_ocean + long_name = surface roughness options over ocean + units = flag + dimensions = () + type = integer + intent = in + optional = F [delt] standard_name = time_step_for_physics long_name = time step for physics diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index 73ef5e1fb..777a3d53f 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -26,20 +26,22 @@ MODULE module_sf_mynn ! roughness lengths (defaults are recommended): ! ! LAND only: -! "iz0tlnd" namelist option is used to select the following options: +! "iz0tlnd" namelist option is used to select the following momentum options: ! (default) =0: Zilitinkevich (1995); Czil now set to 0.085 ! =1: Czil_new (modified according to Chen & Zhang 2008) ! =2: Modified Yang et al (2002, 2008) - generalized for all landuse ! =3: constant zt = z0/7.4 (original form; Garratt 1992) +! =4: GFS - taken from sfc_diff.f, for comparison/testing ! ! WATER only: -! "isftcflx" namelist option is used to select the following options: +! "isftcflx" namelist option is used to select the following scalar options: ! (default) =0: z0, zt, and zq from the COARE algorithm. Set COARE_OPT (below) to ! 3.0 (Fairall et al. 2003, default) ! 3.5 (Edson et al 2013) ! =1: z0 from Davis et al (2008), zt & zq from COARE 3.0/3.5 ! =2: z0 from Davis et al (2008), zt & zq from Garratt (1992) ! =3: z0 from Taylor and Yelland (2004), zt and zq from COARE 3.0/3.5 +! =4: GFS - taken from sfc_diff.f, for comparison/testing ! ! SNOW/ICE only: ! Andreas (2002) snow/ice parameterization for thermal and @@ -78,6 +80,9 @@ MODULE module_sf_mynn & EP_1 => con_fvirt, & & EP_2 => con_eps +!use subroutines from sfc_diff: +! USE sfc_diff, only: znot_t_v6, znot_t_v7, znot_m_v6, znot_m_v7 + !------------------------------------------------------------------- IMPLICIT NONE !------------------------------------------------------------------- @@ -99,6 +104,7 @@ MODULE module_sf_mynn REAL, PARAMETER :: onethird = 1./3. REAL, PARAMETER :: sqrt3 = 1.7320508075688773 REAL, PARAMETER :: atan1 = 0.785398163397 !in radians + REAL, PARAMETER :: log01=log(0.01), log05=log(0.05), log07=log(0.07) REAL, PARAMETER :: SNOWZ0=0.011 REAL, PARAMETER :: COARE_OPT=3.0 ! 3.0 or 3.5 !For debugging purposes: @@ -141,6 +147,9 @@ SUBROUTINE SFCLAY_mynn( & CP,G,ROVCP,R,XLV, & !in SVP1,SVP2,SVP3,SVPT0,EP1,EP2,KARMAN, & !in ISFFLX,isftcflx,lsm,iz0tlnd, & !in + & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) + & z0pert,ztpert, & !intent(in) + & redrag,sfc_z0_type, & !intent(in) itimestep,iter, & !in wet, dry, icy, & !intent(in) tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) @@ -271,11 +280,18 @@ SUBROUTINE SFCLAY_mynn( & REAL, INTENT(IN) :: SVP1,SVP2,SVP3,SVPT0 REAL, INTENT(IN) :: EP1,EP2,KARMAN REAL, INTENT(IN) :: CP,G,ROVCP,R,XLV !,DX -!NAMELIST OPTIONS: +!NAMELIST/CONFIGURATION OPTIONS: INTEGER, INTENT(IN) :: ISFFLX, LSM INTEGER, OPTIONAL, INTENT(IN) :: ISFTCFLX, IZ0TLND INTEGER, OPTIONAL, INTENT(IN) :: spp_pbl - + integer, intent(in) :: ivegsrc + integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean + logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) + +!Input data + integer, dimension(ims:ime), intent(in) :: vegtype + real, dimension(ims:ime), intent(in) :: & + & sigmaf,shdmax,z0pert,ztpert !=================================== ! 3D VARIABLES !=================================== @@ -432,7 +448,11 @@ SUBROUTINE SFCLAY_mynn( & XLAND(ims,j),DX(ims,j), & CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & EP1,EP2,KARMAN, & - ISFFLX,isftcflx,iz0tlnd,itimestep,iter, & + ISFFLX,isftcflx,iz0tlnd, & + & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) + & z0pert,ztpert, & !intent(in) + & redrag,sfc_z0_type, & !intent(in) + itimestep,iter, & wet, dry, icy, & !intent(in) tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) @@ -479,7 +499,11 @@ SUBROUTINE SFCLAY1D_mynn( & PSFCPA,PBLH,MAVAIL,XLAND,DX, & CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & EP1,EP2,KARMAN, & - ISFFLX,isftcflx,iz0tlnd,itimestep,iter, & + ISFFLX,isftcflx,iz0tlnd, & + & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) + & z0pert,ztpert, & !intent(in) + & redrag,sfc_z0_type, & !intent(in) + itimestep,iter, & wet, dry, icy, & !intent(in) tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) @@ -529,6 +553,14 @@ SUBROUTINE SFCLAY1D_mynn( & INTEGER, INTENT(IN) :: ISFFLX INTEGER, OPTIONAL, INTENT(IN ) :: ISFTCFLX, IZ0TLND INTEGER, INTENT(IN) :: spp_pbl + integer, intent(in) :: ivegsrc + integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean + logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) + +!Input data + integer, dimension(ims:ime), intent(in) :: vegtype + real, dimension(ims:ime), intent(in) :: & + & sigmaf,shdmax,z0pert,ztpert !----------------------------- ! 1D ARRAYS @@ -837,7 +869,7 @@ SUBROUTINE SFCLAY1D_mynn( & ! Mahrt and Sun low-res correction - modified for water points (halved) ! (for 13 km ~ 0.18 m/s; for 3 km == 0 m/s) !-------------------------------------------------------- - VSGD = MIN( 0.16 * (max(dx(i)/5000.-1.,0.))**onethird , 0.25) + VSGD = MIN( 0.25 * (max(dx(i)/5000.-1.,0.))**onethird , 0.5) WSPD_ocn=SQRT(WSPD(I)*WSPD(I)+WSTAR(I)*WSTAR(I)+vsgd*vsgd) WSPD_ocn=MAX(WSPD_ocn,wmin) !-------------------------------------------------------- @@ -968,44 +1000,41 @@ SUBROUTINE SFCLAY1D_mynn( & !-------------------------------------- ! WATER !-------------------------------------- - ! CALCULATE z0 (znt) - !-------------------------------------- - IF (debug_code >= 1) THEN - write(*,*)"=============Input to ZNT over water:" - write(*,*)"u*:",UST_ocn(i)," wspd=",WSPD(i)," visc=",visc," za=",ZA(I) - ENDIF - IF ( PRESENT(ISFTCFLX) ) THEN - IF ( ISFTCFLX .EQ. 0 ) THEN - IF (COARE_OPT .EQ. 3.0) THEN - !COARE 3.0 (MISLEADING SUBROUTINE NAME) - CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) - ELSE - !COARE 3.5 - CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + if (sfc_z0_type >= 0) then ! Avoid calculation is using wave model + ! CALCULATE z0 (znt) + !-------------------------------------- + IF (debug_code >= 1) THEN + write(*,*)"=============Input to ZNT over water:" + write(*,*)"u*:",UST_ocn(i)," wspd=",WSPD(i)," visc=",visc," za=",ZA(I) + ENDIF + IF ( PRESENT(ISFTCFLX) ) THEN + IF ( ISFTCFLX .EQ. 0 ) THEN + IF (COARE_OPT .EQ. 3.0) THEN + !COARE 3.0 (MISLEADING SUBROUTINE NAME) + CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + ELSE + !COARE 3.5 + CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) + ENDIF + ELSEIF ( ISFTCFLX .EQ. 1 .OR. ISFTCFLX .EQ. 2 ) THEN + CALL davis_etal_2008(ZNT_ocn(i),UST_ocn(i)) + ELSEIF ( ISFTCFLX .EQ. 3 ) THEN + CALL Taylor_Yelland_2001(ZNT_ocn(i),UST_ocn(i),WSPD(i)) + ELSEIF ( ISFTCFLX .EQ. 4 ) THEN + !GFS surface layer scheme + CALL GFS_z0_ocn(ZNT_ocn(i),UST_ocn(i),WSPD(i),ZA(I),sfc_z0_type,redrag) ENDIF - ELSEIF ( ISFTCFLX .EQ. 1 .OR. ISFTCFLX .EQ. 2 ) THEN - CALL davis_etal_2008(ZNT_ocn(i),UST_ocn(i)) - ELSEIF ( ISFTCFLX .EQ. 3 ) THEN - CALL Taylor_Yelland_2001(ZNT_ocn(i),UST_ocn(i),WSPD(i)) - ELSEIF ( ISFTCFLX .EQ. 4 ) THEN + ELSE + !DEFAULT TO COARE 3.0/3.5 IF (COARE_OPT .EQ. 3.0) THEN - !COARE 3.0 (MISLEADING SUBROUTINE NAME) + !COARE 3.0 CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) ELSE !COARE 3.5 CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) ENDIF ENDIF - ELSE - !DEFAULT TO COARE 3.0/3.5 - IF (COARE_OPT .EQ. 3.0) THEN - !COARE 3.0 - CALL charnock_1955(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) - ELSE - !COARE 3.5 - CALL edson_etal_2013(ZNT_ocn(i),UST_ocn(i),WSPD(i),visc,ZA(I)) - ENDIF - ENDIF + endif !-end wave model check ! add stochastic perturbation of ZNT if (spp_pbl==1) then @@ -1061,6 +1090,10 @@ SUBROUTINE SFCLAY1D_mynn( & CALL fairall_etal_2014(ZT_ocn(i),ZQ_ocn(i),restar,UST_ocn(i),visc,& rstoch1D(i),spp_pbl) ENDIF + ELSEIF ( ISFTCFLX .EQ. 4 ) THEN + !GFS zt formulation + CALL GFS_zt_ocn(ZT_ocn(i),ZNTstoch_ocn(i),restar,WSPD(i),ZA(i),sfc_z0_type) + ZQ_ocn(i)=ZT_ocn(i) ENDIF ELSE !DEFAULT TO COARE 3.0/3.5 @@ -1089,6 +1122,10 @@ SUBROUTINE SFCLAY1D_mynn( & IF (dry(I)) THEN + if ( IZ0TLND .EQ. 4 ) then + CALL GFS_z0_lnd(ZNT_lnd(i),shdmax(i),ZA(i),vegtype(i),ivegsrc,z0pert(i)) + endif + ! add stochastic perturbaction of ZNT if (spp_pbl==1) then ZNTstoch_lnd(I) = MAX(ZNT_lnd(I) + ZNT_lnd(I)*1.0*rstoch1D(i), 1e-6) @@ -1118,6 +1155,10 @@ SUBROUTINE SFCLAY1D_mynn( & ELSEIF ( IZ0TLND .EQ. 3 ) THEN !Original MYNN in WRF-ARW used this form: CALL garratt_1992(ZT_lnd(i),ZQ_lnd(i),ZNTSTOCH_lnd(i),restar,1.0) + ELSEIF ( IZ0TLND .EQ. 4 ) THEN + !GFS: + CALL GFS_zt_lnd(ZT_lnd(i),ZNTSTOCH_lnd(i),sigmaf(i),ztpert(i),UST_lnd(i)) + ZQ_lnd(i)=ZT_lnd(i) ENDIF ELSE !DEFAULT TO ZILITINKEVICH @@ -1136,7 +1177,7 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF !end land point - IF (icy(I)) THEN + IF (icy(I) .OR. snowh_lnd(i) > 50.) THEN ! add stochastic perturbaction of ZNT if (spp_pbl==1) then @@ -2423,6 +2464,414 @@ SUBROUTINE Yang_2008(Z_0,Zt,Zq,ustar,tstar,qst,Ren,visc) END SUBROUTINE Yang_2008 !-------------------------------------------------------------------- +! Taken from the GFS (sfc_diff.f) for comparison + SUBROUTINE GFS_z0_lnd(z0max,shdmax,z1,vegtype,ivegsrc,z0pert) + + REAL, INTENT(OUT) :: z0max + REAL, INTENT(IN) :: shdmax,z1,z0pert + INTEGER, INTENT(IN):: vegtype,ivegsrc + REAL :: tem1, tem2 + +! z0max = max(1.0e-6, min(0.01 * z0max, z1)) +!already converted into meters in the wrapper + z0max = max(1.0e-6, min(z0max, z1)) +!** xubin's new z0 over land + tem1 = 1.0 - shdmax + tem2 = tem1 * tem1 + tem1 = 1.0 - tem2 + + if( ivegsrc == 1 ) then + + if (vegtype == 10) then + z0max = exp( tem2*log01 + tem1*log07 ) + elseif (vegtype == 6) then + z0max = exp( tem2*log01 + tem1*log05 ) + elseif (vegtype == 7) then +! z0max = exp( tem2*log01 + tem1*log01 ) + z0max = 0.01 + elseif (vegtype == 16) then +! z0max = exp( tem2*log01 + tem1*log01 ) + z0max = 0.01 + else + z0max = exp( tem2*log01 + tem1*log(z0max) ) + endif + + elseif (ivegsrc == 2 ) then + + if (vegtype == 7) then + z0max = exp( tem2*log01 + tem1*log07 ) + elseif (vegtype == 8) then + z0max = exp( tem2*log01 + tem1*log05 ) + elseif (vegtype == 9) then +! z0max = exp( tem2*log01 + tem1*log01 ) + z0max = 0.01 + elseif (vegtype == 11) then +! z0max = exp( tem2*log01 + tem1*log01 ) + z0max = 0.01 + else + z0max = exp( tem2*log01 + tem1*log(z0max) ) + endif + + endif + +! mg, sfc-perts: add surface perturbations to z0max over land + if (z0pert /= 0.0 ) then + z0max = z0max * (10.**z0pert) + endif + + z0max = max(z0max, 1.0e-6) + + END SUBROUTINE GFS_z0_lnd +!-------------------------------------------------------------------- +! Taken from the GFS (sfc_diff.f) for comparison + SUBROUTINE GFS_zt_lnd(ztmax,z0max,sigmaf,ztpert,ustar_lnd) + + REAL, INTENT(OUT) :: ztmax + REAL, INTENT(IN) :: z0max,sigmaf,ztpert,ustar_lnd + REAL :: czilc, tem1, tem2 + REAL, PARAMETER :: ca = 0.4 + +! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil + czilc = 0.8 + + tem1 = 1.0 - sigmaf + ztmax = z0max*exp( - tem1*tem1 & + & * czilc*ca*sqrt(ustar_lnd*(0.01/1.5e-05))) +! +! czilc = 10.0 ** (- 4. * z0max) ! Trier et al. (2011, WAF) +! ztmax = z0max * exp( - czilc * ca & +! & * 258.2 * sqrt(ustar_lnd*z0max) ) + + +! mg, sfc-perts: add surface perturbations to ztmax/z0max ratio over land + if (ztpert /= 0.0) then + ztmax = ztmax * (10.**ztpert) + endif + ztmax = max(ztmax, 1.0e-6) + + END SUBROUTINE GFS_zt_lnd +!-------------------------------------------------------------------- + SUBROUTINE GFS_z0_ocn(z0rl_ocn,ustar_ocn,WSPD,z1,sfc_z0_type,redrag) + + REAL, INTENT(OUT) :: z0rl_ocn + REAL, INTENT(INOUT):: ustar_ocn + REAL, INTENT(IN) :: wspd,z1 + LOGICAL, INTENT(IN):: redrag + INTEGER, INTENT(IN):: sfc_z0_type + REAL :: z0,z0max,wind10m + REAL, PARAMETER :: charnock = 0.014, z0s_max=.317e-2 + +! z0 = 0.01 * z0rl_ocn +!Already converted to meters in the wrapper + z0 = z0rl_ocn + z0max = max(1.0e-6, min(z0,z1)) + ustar_ocn = sqrt(g * z0 / charnock) + wind10m = wspd*log(10./1e-4)/log(z1/1e-4) + !wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i)) +! + if (sfc_z0_type >= 0) then + if (sfc_z0_type == 0) then + z0 = (charnock / g) * ustar_ocn * ustar_ocn + +! mbek -- toga-coare flux algorithm +! z0 = (charnock / g) * ustar(i)*ustar(i) + arnu/ustar(i) +! new implementation of z0 +! cc = ustar(i) * z0 / rnu +! pp = cc / (1. + cc) +! ff = g * arnu / (charnock * ustar(i) ** 3) +! z0 = arnu / (ustar(i) * ff ** pp) + + if (redrag) then + !z0rl_ocn = 100.0 * max(min(z0, z0s_max), 1.e-7) + z0rl_ocn = max(min(z0, z0s_max), 1.e-7) + else + !z0rl_ocn = 100.0 * max(min(z0,.1), 1.e-7) + z0rl_ocn = max(min(z0,.1), 1.e-7) + endif + + elseif (sfc_z0_type == 6) then ! wang + call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m + !z0rl_ocn = 100.0 * z0 ! cm + elseif (sfc_z0_type == 7) then ! wang + call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m + !z0rl_ocn = 100.0 * z0 ! cm + else + z0rl_ocn = 1.0e-6 + endif + + endif + + END SUBROUTINE GFS_z0_ocn +!-------------------------------------------------------------------- + SUBROUTINE GFS_zt_ocn(ztmax,z0rl_ocn,restar,WSPD,z1,sfc_z0_type) + + REAL, INTENT(OUT) :: ztmax + REAL, INTENT(IN) :: wspd,z1,z0rl_ocn,restar + INTEGER, INTENT(IN):: sfc_z0_type + REAL :: z0,z0max,wind10m,rat,ustar_ocn + REAL, PARAMETER :: charnock = 0.014, z0s_max=.317e-2 + +! z0 = 0.01 * z0rl_ocn +!Already converted to meters in the wrapper + z0 = z0rl_ocn + z0max = max(1.0e-6, min(z0,z1)) + ustar_ocn = sqrt(g * z0 / charnock) + wind10m = wspd*log(10./1e-4)/log(z1/1e-4) + +!** test xubin's new z0 + +! ztmax = z0max + +!input restar = max(ustar_ocn(i)*z0max*visi, 0.000001) + +! restar = log(restar) +! restar = min(restar,5.) +! restar = max(restar,-5.) +! rat = aa1 + (bb1 + cc1*restar) * restar +! rat = rat / (1. + (bb2 + cc2*restar) * restar)) +! rat taken from zeng, zhao and dickinson 1997 + + rat = min(7.0, 2.67 * sqrt(sqrt(restar)) - 2.57) + ztmax = max(z0max * exp(-rat), 1.0e-6) +! + if (sfc_z0_type == 6) then + call znot_t_v6(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) + else if (sfc_z0_type == 7) then + call znot_t_v7(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) + else if (sfc_z0_type > 0) then + write(0,*)'no option for sfc_z0_type=',sfc_z0_type + stop + endif + + END SUBROUTINE GFS_zt_ocn +!-------------------------------------------------------------------- +!! add fitted z0,zt curves for hurricane application (used in HWRF/HMON) +!! Weiguo Wang, 2019-0425 + + SUBROUTINE znot_m_v6(uref, znotm) + use machine , only : kind_phys + IMPLICIT NONE +! Calculate areodynamical roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Cd-U10 relationship from COARE V3.5 (Edson et al. 2013) +! For high winds, try to fit available observational data +! +! Bin Liu, NOAA/NCEP/EMC 2017 +! +! uref(m/s) : wind speed at 10-m height +! znotm(meter): areodynamical roughness scale over water +! + + REAL(kind=kind_phys), INTENT(IN) :: uref + REAL(kind=kind_phys), INTENT(OUT):: znotm + real(kind=kind_phys), parameter :: p13 = -1.296521881682694e-02,& + & p12 = 2.855780863283819e-01, p11 = -1.597898515251717e+00,& + & p10 = -8.396975715683501e+00, & + + & p25 = 3.790846746036765e-10, p24 = 3.281964357650687e-09,& + & p23 = 1.962282433562894e-07, p22 = -1.240239171056262e-06,& + & p21 = 1.739759082358234e-07, p20 = 2.147264020369413e-05,& + + & p35 = 1.840430200185075e-07, p34 = -2.793849676757154e-05,& + & p33 = 1.735308193700643e-03, p32 = -6.139315534216305e-02,& + & p31 = 1.255457892775006e+00, p30 = -1.663993561652530e+01,& + + & p40 = 4.579369142033410e-04 + + + if (uref >= 0.0 .and. uref <= 6.5 ) then + znotm = exp(p10 + uref * (p11 + uref * (p12 + uref*p13))) + elseif (uref > 6.5 .and. uref <= 15.7) then + znotm = p20 + uref * (p21 + uref * (p22 + uref * (p23 & + & + uref * (p24 + uref * p25)))) + elseif (uref > 15.7 .and. uref <= 53.0) then + znotm = exp( p30 + uref * (p31 + uref * (p32 + uref * (p33 & + & + uref * (p34 + uref * p35))))) + elseif ( uref > 53.0) then + znotm = p40 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_m_v6 +!-------------------------------------------------------------------- + SUBROUTINE znot_t_v6(uref, znott) + + IMPLICIT NONE +! Calculate scalar roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Ck-U10 relationship from COARE algorithm +! For high winds, try to retain the Ck-U10 relationship of FY2015 HWRF +! +! Bin Liu, NOAA/NCEP/EMC 2017 +! +! uref(m/s) : wind speed at 10-m height +! znott(meter): scalar roughness scale over water +! + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znott + real, parameter :: p00 = 1.100000000000000e-04,& + & p15 = -9.144581627678278e-10, p14 = 7.020346616456421e-08,& + & p13 = -2.155602086883837e-06, p12 = 3.333848806567684e-05,& + & p11 = -2.628501274963990e-04, p10 = 8.634221567969181e-04,& + + & p25 = -8.654513012535990e-12, p24 = 1.232380050058077e-09,& + & p23 = -6.837922749505057e-08, p22 = 1.871407733439947e-06,& + & p21 = -2.552246987137160e-05, p20 = 1.428968311457630e-04,& + + & p35 = 3.207515102100162e-12, p34 = -2.945761895342535e-10,& + & p33 = 8.788972147364181e-09, p32 = -3.814457439412957e-08,& + & p31 = -2.448983648874671e-06, p30 = 3.436721779020359e-05,& + + & p45 = -3.530687797132211e-11, p44 = 3.939867958963747e-09,& + & p43 = -1.227668406985956e-08, p42 = -1.367469811838390e-05,& + & p41 = 5.988240863928883e-04, p40 = -7.746288511324971e-03,& + + & p56 = -1.187982453329086e-13, p55 = 4.801984186231693e-11,& + & p54 = -8.049200462388188e-09, p53 = 7.169872601310186e-07,& + & p52 = -3.581694433758150e-05, p51 = 9.503919224192534e-04,& + & p50 = -1.036679430885215e-02, & + + & p60 = 4.751256171799112e-05 + + if (uref >= 0.0 .and. uref < 5.9 ) then + znott = p00 + elseif (uref >= 5.9 .and. uref <= 15.4) then + znott = p10 + uref * (p11 + uref * (p12 + uref * (p13 & + & + uref * (p14 + uref * p15)))) + elseif (uref > 15.4 .and. uref <= 21.6) then + znott = p20 + uref * (p21 + uref * (p22 + uref * (p23 & + & + uref * (p24 + uref * p25)))) + elseif (uref > 21.6 .and. uref <= 42.2) then + znott = p30 + uref * (p31 + uref * (p32 + uref * (p33 & + & + uref * (p34 + uref * p35)))) + elseif ( uref > 42.2 .and. uref <= 53.3) then + znott = p40 + uref * (p41 + uref * (p42 + uref * (p43 & + & + uref * (p44 + uref * p45)))) + elseif ( uref > 53.3 .and. uref <= 80.0) then + znott = p50 + uref * (p51 + uref * (p52 + uref * (p53 & + & + uref * (p54 + uref * (p55 + uref * p56))))) + elseif ( uref > 80.0) then + znott = p60 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_t_v6 + +!------------------------------------------------------------------- + + SUBROUTINE znot_m_v7(uref, znotm) + + IMPLICIT NONE +! Calculate areodynamical roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Cd-U10 relationship from COARE V3.5 (Edson et al. 2013) +! For high winds, try to fit available observational data +! Comparing to znot_t_v6, slightly decrease Cd for higher wind speed +! +! Bin Liu, NOAA/NCEP/EMC 2018 +! +! uref(m/s) : wind speed at 10-m height +! znotm(meter): areodynamical roughness scale over water +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znotm + + real, parameter :: p13 = -1.296521881682694e-02,& + & p12 = 2.855780863283819e-01, p11 = -1.597898515251717e+00,& + & p10 = -8.396975715683501e+00,& + + & p25 = 3.790846746036765e-10, p24 = 3.281964357650687e-09,& + & p23 = 1.962282433562894e-07, p22 = -1.240239171056262e-06,& + & p21 = 1.739759082358234e-07, p20 = 2.147264020369413e-05,& + + & p35 = 1.897534489606422e-07, p34 = -3.019495980684978e-05,& + & p33 = 1.931392924987349e-03, p32 = -6.797293095862357e-02,& + & p31 = 1.346757797103756e+00, p30 = -1.707846930193362e+01,& + + & p40 = 3.371427455376717e-04 + + if (uref >= 0.0 .and. uref <= 6.5 ) then + znotm = exp( p10 + uref * (p11 + uref * (p12 + uref * p13))) + elseif (uref > 6.5 .and. uref <= 15.7) then + znotm = p20 + uref * (p21 + uref * (p22 + uref * (p23 & + & + uref * (p24 + uref * p25)))) + elseif (uref > 15.7 .and. uref <= 53.0) then + znotm = exp( p30 + uref * (p31 + uref * (p32 + uref * (p33 & + & + uref * (p34 + uref * p35))))) + elseif ( uref > 53.0) then + znotm = p40 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_m_v7 +!-------------------------------------------------------------------- + SUBROUTINE znot_t_v7(uref, znott) + + IMPLICIT NONE +! Calculate scalar roughness over water with input 10-m wind +! For low-to-moderate winds, try to match the Ck-U10 relationship from COARE algorithm +! For high winds, try to retain the Ck-U10 relationship of FY2015 HWRF +! To be compatible with the slightly decreased Cd for higher wind speed +! +! Bin Liu, NOAA/NCEP/EMC 2018 +! +! uref(m/s) : wind speed at 10-m height +! znott(meter): scalar roughness scale over water +! + + REAL, INTENT(IN) :: uref + REAL, INTENT(OUT):: znott + + real, parameter :: p00 = 1.100000000000000e-04, & + + & p15 = -9.193764479895316e-10, p14 = 7.052217518653943e-08,& + & p13 = -2.163419217747114e-06, p12 = 3.342963077911962e-05,& + & p11 = -2.633566691328004e-04, p10 = 8.644979973037803e-04,& + + & p25 = -9.402722450219142e-12, p24 = 1.325396583616614e-09,& + & p23 = -7.299148051141852e-08, p22 = 1.982901461144764e-06,& + & p21 = -2.680293455916390e-05, p20 = 1.484341646128200e-04,& + + & p35 = 7.921446674311864e-12, p34 = -1.019028029546602e-09,& + & p33 = 5.251986927351103e-08, p32 = -1.337841892062716e-06,& + & p31 = 1.659454106237737e-05, p30 = -7.558911792344770e-05,& + + & p45 = -2.694370426850801e-10, p44 = 5.817362913967911e-08,& + & p43 = -5.000813324746342e-06, p42 = 2.143803523428029e-04,& + & p41 = -4.588070983722060e-03, p40 = 3.924356617245624e-02,& + + & p56 = -1.663918773476178e-13, p55 = 6.724854483077447e-11,& + & p54 = -1.127030176632823e-08, p53 = 1.003683177025925e-06,& + & p52 = -5.012618091180904e-05, p51 = 1.329762020689302e-03,& + & p50 = -1.450062148367566e-02, p60 = 6.840803042788488e-05 + + if (uref >= 0.0 .and. uref < 5.9 ) then + znott = p00 + elseif (uref >= 5.9 .and. uref <= 15.4) then + znott = p10 + uref * (p11 + uref * (p12 + uref * (p13 & + & + uref * (p14 + uref * p15)))) + elseif (uref > 15.4 .and. uref <= 21.6) then + znott = p20 + uref * (p21 + uref * (p22 + uref * (p23 & + & + uref * (p24 + uref * p25)))) + elseif (uref > 21.6 .and. uref <= 42.6) then + znott = p30 + uref * (p31 + uref * (p32 + uref * (p33 & + & + uref * (p34 + uref * p35)))) + elseif ( uref > 42.6 .and. uref <= 53.0) then + znott = p40 + uref * (p41 + uref * (p42 + uref * (p43 & + & + uref * (p44 + uref * p45)))) + elseif ( uref > 53.0 .and. uref <= 80.0) then + znott = p50 + uref * (p51 + uref * (p52 + uref * (p53 & + & + uref * (p54 + uref * (p55 + uref * p56))))) + elseif ( uref > 80.0) then + znott = p60 + else + print*, 'Wrong input uref value:',uref + endif + + END SUBROUTINE znot_t_v7 + +!-------------------------------------------------------------------- !>\ingroup module_sf_mynn_mod !> This is taken from Andreas (2002; J. of Hydromet) and !! Andreas et al. (2005; BLM). From 43821e3e426bc12950c91e370add48743bb7e901 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Mon, 8 Jun 2020 21:19:34 +0000 Subject: [PATCH 211/404] 2 small cosmetic updates, no impact on model behavior. --- physics/module_MYNNPBL_wrapper.meta | 1 + physics/module_MYNNSFC_wrapper.F90 | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index c577b2563..1ab7af8b4 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -27,6 +27,7 @@ intent = out optional = F +##################################################################### [ccpp-arg-table] name = mynnedmf_wrapper_run type = scheme diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index b2eaed414..d14932e07 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -19,11 +19,9 @@ end subroutine mynnsfc_wrapper_finalize !>\defgroup gsd_mynn_sfc GSD MYNN Surface Layer Scheme Module !> \brief This scheme (1) performs pre-mynnsfc work, (2) runs the mynn sfc layer scheme, and (3) performs post-mynnsfc work -#if 0 !! \section arg_table_mynnsfc_wrapper_run Argument Table !! \htmlinclude mynnsfc_wrapper_run.html !! -#endif !###=================================================================== SUBROUTINE mynnsfc_wrapper_run( & & im,levs, & From 626ec0e4c8a96b3599caaf18a28691c842bb2b9d Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 9 Jun 2020 08:15:53 -0600 Subject: [PATCH 212/404] Clean up of effective radii calculation for Thompson MP: move initialization and bounds into the calc_effectRad routine, use settings consistent with previous version of code --- physics/GFS_rrtmg_pre.F90 | 19 +++++++-------- physics/module_mp_thompson.F90 | 44 ++++++++++++++++++++++++---------- physics/mp_thompson.F90 | 15 +----------- 3 files changed, 40 insertions(+), 38 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 42411c88f..381fa159f 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -716,23 +716,20 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input end do ! Call Thompson's subroutine to compute effective radii do i=1,im - ! Initialize to default in units m as in module_mp_thompson.F90 - re_cloud(i,:) = 2.49E-6 - re_ice(i,:) = 4.99E-6 - re_snow(i,:) = 9.99E-6 + ! Effective radii [m] are now intent(out), bounds applied in calc_effectRad + !tgs: progclduni has different limits for ice radii (10.0-150.0) than + ! calc_effectRad (4.99-125.0 for WRFv3.8.1; 2.49-125.0 for WRFv4+) + ! it will raise the low limit from 5 to 10, but the high limit will remain 125. call calc_effectRad (tlyr(i,:), plyr(i,:), qv_mp(i,:), qc_mp(i,:), & nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, lm ) end do - ! Scale Thompson's effective radii from meter to micron and apply bounds + ! Scale Thompson's effective radii from meter to micron do k=1,lm do i=1,im - re_cloud(i,k) = MAX(2.49, MIN(re_cloud(i,k)*1.e6, 50.)) - re_ice(i,k) = MAX(4.99, MIN(re_ice(i,k)*1.e6, 125.)) - !tgs: progclduni has different limits for ice radii: 10.0-150.0 - ! it will raise the low limit from 5 to 10, but the - ! high limit will remain 125. - re_snow(i,k) = MAX(9.99, MIN(re_snow(i,k)*1.e6, 999.)) + re_cloud(i,k) = re_cloud(i,k)*1.e6 + re_ice(i,k) = re_ice(i,k)*1.e6 + re_snow(i,k) = re_snow(i,k)*1.e6 end do end do do k=1,lm diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 532071a8e..705d245ae 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -5246,7 +5246,7 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & INTEGER, INTENT(IN):: kts, kte REAL, DIMENSION(kts:kte), INTENT(IN):: & & t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d - REAL, DIMENSION(kts:kte), INTENT(INOUT):: re_qc1d, re_qi1d, re_qs1d + REAL, DIMENSION(kts:kte), INTENT(OUT):: re_qc1d, re_qi1d, re_qs1d !..Local variables INTEGER:: k REAL, DIMENSION(kts:kte):: rho, rc, nc, ri, ni, rs @@ -5262,6 +5262,30 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & has_qi = .false. has_qs = .false. +! DH* 2020-06-08 Moved the initial values and bounds from +! the calling routines into calc_effectRad (to prevent +! multiple definitions that may be inconsistent). The +! initial values and bounds from the calling routines were +! +! re_cloud(i,k) = MAX(2.49, MIN(re_cloud(i,k)*1.e6, 50.)) +! re_ice(i,k) = MAX(4.99, MIN(re_ice(i,k)*1.e6, 125.)) +! re_snow(i,k) = MAX(9.99, MIN(re_snow(i,k)*1.e6, 999.)) +! +! independent of the version of Thompson MP. These values +! are consistent with the WRFv3.8.1 settings, but inconsistent +! with the WRFv4+ settings. In order to apply the same bounds +! as before this change, use the WRF v3.8.1 settings throughout. +#if 1 +!ifdef WRF381 + re_qc1d(:) = 2.49E-6 + re_qi1d(:) = 4.99E-6 + re_qs1d(:) = 9.99E-6 +#else + re_qc1d(:) = 2.49E-6 + re_qi1d(:) = 2.49E-6 + re_qs1d(:) = 4.99E-6 +#endif + do k = kts, kte rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622)) rc(k) = MAX(R1, qc1d(k)*rho(k)) @@ -5270,7 +5294,8 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & #else ! DH* 2020-06-05 is using 2.0 instead of R2 ! a bug in the WRFv4.0+ version of Thompson? - ! For ni(k) a few lines below, it is still R2 + ! For ni(k) a few lines below, it is still R2. + ! Note that R2 is defined as R2 = 1.E-6 nc(k) = MAX(2., MIN(nc1d(k)*rho(k), Nt_c_max)) #endif if (.NOT. is_aerosol_aware) nc(k) = Nt_c @@ -5284,9 +5309,6 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & if (has_qc) then do k = kts, kte -#ifndef WRF381 - re_qc1d(k) = 2.49E-6 -#endif if (rc(k).le.R1 .or. nc(k).le.R2) CYCLE if (nc(k).lt.100) then inu_c = 15 @@ -5302,12 +5324,10 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & if (has_qi) then do k = kts, kte -#ifndef WRF381 - re_qi1d(k) = 2.49E-6 -#endif if (ri(k).le.R1 .or. ni(k).le.R2) CYCLE lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi -#ifdef WRF381 +#if 1 +!ifdef WRF381 re_qi1d(k) = MAX(5.01E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6)) #else re_qi1d(k) = MAX(2.51E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6)) @@ -5317,9 +5337,6 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & if (has_qs) then do k = kts, kte -#ifndef WRF381 - re_qs1d(k) = 4.99E-6 -#endif if (rs(k).le.R1) CYCLE tc0 = MIN(-0.1, t1d(k)-273.15) smob = rs(k)*oams @@ -5354,7 +5371,8 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & & + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) & & + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1) smoc = a_ * smo2**b_ -#ifdef WRF381 +#if 1 +!ifdef WRF381 re_qs1d(k) = MAX(10.E-6, MIN(0.5*(smoc/smob), 999.E-6)) #else re_qs1d(k) = MAX(5.01E-6, MIN(0.5*(smoc/smob), 999.E-6)) diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index 1653c825d..ec19945b0 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -320,25 +320,12 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, restart, & ! Calculate initial cloud effective radii if requested if (present(re_cloud) .and. present(re_ice) .and. present(re_snow)) then - do i = 1, ncol - do k = 1, nlev - re_cloud(i,k) = 2.49E-6 - re_ice(i,k) = 4.99E-6 - re_snow(i,k) = 9.99E-6 - end do - end do + ! Effective radii [m] are now intent(out), bounds applied in calc_effectRad do i = 1, ncol call calc_effectRad (tgrs(i,:), prsl(i,:), qv_mp(i,:), qc_mp(i,:), & nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, nlev) end do - do i = 1, ncol - do k = 1, nlev - re_cloud(i,k) = MAX(2.49E-6, MIN(re_cloud(i,k), 50.E-6)) - re_ice(i,k) = MAX(4.99E-6, MIN(re_ice(i,k), 125.E-6)) - re_snow(i,k) = MAX(9.99E-6, MIN(re_snow(i,k), 999.E-6)) - end do - end do !! Convert to micron: required for bit-for-bit identical restarts; !! otherwise entering mp_thompson_init and converting mu to m and !! back (without updating re_*) introduces b4b differences. From 4619424a2040d51cf63d2b92dde10c3a42cb02fe Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 9 Jun 2020 10:20:21 -0600 Subject: [PATCH 213/404] physics/module_mp_thompson.F90: update comment on possible bug in nc calculation --- physics/module_mp_thompson.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 705d245ae..304afc6d5 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -5295,7 +5295,9 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & ! DH* 2020-06-05 is using 2.0 instead of R2 ! a bug in the WRFv4.0+ version of Thompson? ! For ni(k) a few lines below, it is still R2. - ! Note that R2 is defined as R2 = 1.E-6 + ! Note that R2 is defined as R2 = 1.E-6, and is + ! used in other parts of Thompson MP for ni/nr + ! calculations (but not for nc calculations) nc(k) = MAX(2., MIN(nc1d(k)*rho(k), Nt_c_max)) #endif if (.NOT. is_aerosol_aware) nc(k) = Nt_c From 4983b5b7e8e174be466c5da2f716ca7d831d0fb4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 9 Jun 2020 13:01:00 -0600 Subject: [PATCH 214/404] Fixed bug in .meta file standard_name --- physics/GFS_rrtmgp_sw_post.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 96155580b..50da46a35 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -249,7 +249,7 @@ intent = inout optional = F [hsw0] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = shortwave clear sky heating rate units = K s-1 dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) From 245dc3b0a6bbfd9f148749762d4446201b7eb61b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 9 Jun 2020 13:09:02 -0600 Subject: [PATCH 215/404] Updated rte-rrtmgp submodule. --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index bab7d03c1..6ee0b62c1 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit bab7d03c1bc10e43b7077832aa36cb84c4598c08 +Subproject commit 6ee0b62c1ac6204a89a4e922382b611c16dd5fa7 From 16ab8762e1f16bc3228b4f173308326769a294e2 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 9 Jun 2020 16:23:20 -0600 Subject: [PATCH 216/404] Add LW Jacobians as interstitial fields. --- physics/GFS_rrtmgp_lw_post.F90 | 5 ++-- physics/GFS_rrtmgp_lw_post.meta | 9 ------ physics/GFS_rrtmgp_sw_post.F90 | 6 ++-- physics/GFS_rrtmgp_sw_post.meta | 11 +------- physics/rrtmgp_lw_rte.F90 | 50 +++++++++++++++++++++++---------- physics/rrtmgp_lw_rte.meta | 26 +++++++++++++++++ 6 files changed, 66 insertions(+), 41 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 8f5bb3611..7555f7278 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -33,7 +33,7 @@ end subroutine GFS_rrtmgp_lw_post_init subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statein, im, & p_lev, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky,& raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, & - flxprf_lw, hlwc, hlw0, errmsg, errflg) + flxprf_lw, hlw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -77,8 +77,6 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei Radtend ! Fortran DDT: FV3-GFS radiation tendencies type(GFS_diag_type), intent(inout) :: & Diag ! Fortran DDT: FV3-GFS diagnotics data - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs), intent(inout) :: & - hlwc ! Longwave all-sky heating-rate (K/sec) ! Outputs (optional) type(proflw_type), dimension(size(Grid%xlon,1), Model%levs+1), optional, intent(inout) :: & flxprf_lw ! 2D radiative fluxes, components: @@ -92,6 +90,7 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei integer :: i, j, k, iSFC, iTOA, itop, ibtc logical :: l_fluxeslw2d, top_at_1 real(kind_phys) :: tem0d, tem1, tem2 + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: hlwc ! Initialize CCPP error handling variables errmsg = '' diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index 274bc1129..646945d90 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -180,15 +180,6 @@ type = proflw_type intent = inout optional = T -[hlwc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levels - long_name = longwave total sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = inout - optional = F [hlw0] standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = longwave clear sky heating rate diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 086bceb4c..2ec5477b9 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -30,7 +30,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein nCol, p_lev, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, & sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, & fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, mtopa, cld_frac, cldtausw, flxprf_sw,& - hswc, hsw0, errmsg, errflg) + hsw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -78,8 +78,6 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein cldtausw ! approx .55mu band layer cloud optical depth ! Outputs (mandatory) - real(kind_phys),dimension(nCol, Model%levs), intent(inout) :: & - hswc ! All-sky heating rate (K/s) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & @@ -108,7 +106,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein real(kind_phys) :: tem0d, tem1, tem2 real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky logical :: l_fluxessw2d, top_at_1, l_sfcFluxessw1D - + real(kind_phys),dimension(nCol, Model%levs) :: hswc ! Initialize CCPP error handling variables errmsg = '' errflg = 0 diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 50da46a35..ce27d0096 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -239,17 +239,8 @@ type = profsw_type intent = inout optional = T -[hswc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels - long_name = shortwave total sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = inout - optional = F [hsw0] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = shortwave clear sky heating rate units = K s-1 dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 66a968af6..dc49260f6 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -14,7 +14,6 @@ module rrtmgp_lw_rte implicit none public rrtmgp_lw_rte_init, rrtmgp_lw_rte_run, rrtmgp_lw_rte_finalize - contains ! ######################################################################################### @@ -29,15 +28,17 @@ end subroutine rrtmgp_lw_rte_init !! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte_run.html !! - subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, nCol, nLev, p_lay, t_lay, p_lev, skt, & - lw_gas_props, sfc_emiss_byband, sources, lw_optical_props_clrsky, & - lw_optical_props_clouds, lw_optical_props_aerosol, nGauss_angles, fluxlwUP_allsky, & - fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, errmsg, errflg) + subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, use_LW_jacobian, nCol, nLev, p_lay, & + t_lay, p_lev, skt, lw_gas_props, sfc_emiss_byband, sources, lw_optical_props_clrsky,& + lw_optical_props_clouds, lw_optical_props_aerosol, nGauss_angles, fluxlwUP_allsky, & + fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, fluxlwUP_jac, & + fluxlwDOWN_jac, errmsg, errflg) ! Inputs logical, intent(in) :: & doLWrad, & ! Logical flag for longwave radiation call - doLWclrsky ! Compute clear-sky fluxes for clear-sky heating-rate? + doLWclrsky, & ! Compute clear-sky fluxes for clear-sky heating-rate? + use_LW_jacobian ! Compute Jacobian of LW to update radiative fluxes between radiation calls? integer, intent(in) :: & nCol, & ! Number of horizontal gridpoints nLev, & ! Number of vertical levels @@ -70,6 +71,10 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, nCol, nLev, p_lay, t_lay, p_le errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error flag + ! Outputs (optional) + real(kind_phys), dimension(ncol,nLev+1), intent(out), optional :: & + fluxlwUP_jac, & ! Jacobian of upward LW flux (W/m2/K) + fluxlwDOWN_jac ! Jacobian of downward LW flux (W/m2/K) ! Local variables integer :: & @@ -89,7 +94,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, nCol, nLev, p_lay, t_lay, p_le ! Vertical ordering? top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev)) - + ! Initialize RRTMGP DDT containing 2D(3D) fluxes flux_allsky%bnd_flux_up => fluxLW_up_allsky flux_allsky%bnd_flux_dn => fluxLW_dn_allsky @@ -110,7 +115,8 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, nCol, nLev, p_lay, t_lay, p_le sources, & ! IN - source function sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_clrsky, & ! OUT - Fluxes - n_gauss_angles = nGauss_angles)) + n_gauss_angles = nGauss_angles)) ! IN - Number of angles in Gaussian quadrature + ! Store fluxes fluxlwUP_clrsky = sum(flux_clrsky%bnd_flux_up,dim=3) fluxlwDOWN_clrsky = sum(flux_clrsky%bnd_flux_dn,dim=3) @@ -126,13 +132,27 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, nCol, nLev, p_lay, t_lay, p_le call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_clouds%increment(lw_optical_props_clrsky)) ! Call RTE solver - call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - lw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - sources, & ! IN - source function - sfc_emiss_byband, & ! IN - surface emissivity in each LW band - flux_allsky, & ! OUT - Flxues - n_gauss_angles = nGauss_angles)) + if (use_LW_jacobian) then + ! Compute LW Jacobians + call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band + flux_allsky, & ! OUT - Flxues + n_gauss_angles = nGauss_angles, & ! IN - Number of angles in Gaussian quadrature + flux_up_Jac = fluxlwUP_jac, & ! OUT - surface temperature flux (upward) Jacobian (W/m2/K) + flux_dn_Jac = fluxlwDOWN_jac)) ! OUT - surface temperature flux (downward) Jacobian (W/m2/K) + else + call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band + flux_allsky, & ! OUT - Flxues + n_gauss_angles = nGauss_angles)) ! IN - Number of angles in Gaussian quadrature + end if + ! Store fluxes fluxlwUP_allsky = sum(flux_allsky%bnd_flux_up,dim=3) fluxlwDOWN_allsky = sum(flux_allsky%bnd_flux_dn,dim=3) diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index d3876a211..f8cdfe891 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -17,6 +17,14 @@ type = logical intent = in optional = F +[use_LW_jacobian] + standard_name = flag_to_calc_RRTMGP_LW_jacobian + long_name = logical flag to control RRTMGP LW calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F [ncol] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -162,6 +170,24 @@ kind = kind_phys intent = out optional = F +[fluxlwUP_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward + long_name = RRTMGP Jacobian upward longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = T +[fluxlwDOWN_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward + long_name = RRTMGP Jacobian downward of longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From f896694d06ae6b2f93e3285290ca89fe29117c30 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Thu, 11 Jun 2020 02:24:48 +0000 Subject: [PATCH 217/404] merge GFSv16 physics update with rad bug fix, reverting changes in sfc_diff, tuning in samfdeepcnv.f, update veritcal mixing in satmedmfvdifq.F --- physics/radsw_datatb.f | 2 +- physics/samfdeepcnv.f | 16 +++------------- physics/satmedmfvdifq.F | 37 ++++++++++++++++++++++++++++--------- physics/satmedmfvdifq.meta | 17 +++++++++++++++++ physics/sfc_diff.f | 24 ++++++++---------------- 5 files changed, 57 insertions(+), 39 deletions(-) diff --git a/physics/radsw_datatb.f b/physics/radsw_datatb.f index 3cc9e2d82..6d88f1989 100644 --- a/physics/radsw_datatb.f +++ b/physics/radsw_datatb.f @@ -2551,7 +2551,7 @@ module module_radsw_sflux ! !> band index (3rd index in array sfluxref described below) integer, dimension(nblow:nbhgh), public :: ibx - data layreffr/ 18,30, 6, 3, 3, 8, 2, 6, 1, 2, 0,32,58,49 / + data layreffr/ 18,30, 6, 3, 3, 8, 2, 6, 1, 2, 0,32,42,49 / data ix1 / 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 3, 0 / data ix2 / 5, 2, 5, 2, 0, 2, 6, 0, 6, 0, 0, 0, 6, 0 / data ibx / 1, 1, 1, 2, 2, 3, 4, 3, 5, 4, 5, 6, 2, 7 / diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 9ec9ba7f3..677a2cee1 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -222,7 +222,7 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & parameter(clamd=0.03,tkemx=0.65,tkemn=0.05) parameter(dtke=tkemx-tkemn) parameter(dbeta=0.1) - parameter(cthk=200.,dthk=25.) + parameter(cthk=150.,dthk=25.) parameter(cinpcrmx=180.,cinpcrmn=120.) ! parameter(cinacrmx=-120.,cinacrmn=-120.) parameter(cinacrmx=-120.,cinacrmn=-80.) @@ -1239,23 +1239,13 @@ subroutine samfdeepcnv_run (im,ix,km,itc,ntc,cliq,cp,cvap, & c specify upper limit of mass flux at cloud base c !> - Calculate the maximum value of the cloud base mass flux using the CFL-criterion-based formula of Han and Pan (2011) \cite han_and_pan_2011, equation 7. - if(hwrf_samfdeep) then - do i = 1, im + do i = 1, im if(cnvflg(i)) then k = kbcon(i) dp = 1000. * del(i,k) xmbmax(i) = dp / (grav * dt2) endif - enddo - else - do i = 1, im - if(cnvflg(i)) then - k = kbcon(i) - dp = 1000. * del(i,k) - xmbmax(i) = dp / (2. * grav * dt2) - endif - enddo - endif + enddo c c compute cloud moisture property and precipitation c diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index d465b7c5e..0f4aa5103 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -59,8 +59,8 @@ end subroutine satmedmfvdifq_finalize !! @{ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & & grav,rd,cp,rv,hvap,hfus,fv,eps,epsm1, & - & dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea, & - & psk,rbsoil,zorl,u10m,v10m,fm,fh, & + & dv,du,tdt,rtg,u1,v1,t1,q1,swh,hlw,xmu,garea,islimsk, & + & snwdph_lnd,psk,rbsoil,zorl,u10m,v10m,fm,fh, & & tsea,heat,evap,stress,spd1,kpbl, & & prsi,del,prsl,prslk,phii,phil,delt, & & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & @@ -75,6 +75,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & !---------------------------------------------------------------------- integer, intent(in) :: ix, im, km, ntrac, ntcw, ntiw, ntke integer, intent(in) :: kinver(im) + integer, intent(in) :: islimsk(im) integer, intent(out) :: kpbl(im) ! real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, & @@ -88,6 +89,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & & t1(ix,km), q1(ix,km,ntrac), & & swh(ix,km), hlw(ix,km), & & xmu(im), garea(im), & + & snwdph_lnd(im), & & psk(ix), rbsoil(im), & & zorl(im), tsea(im), & & u10m(im), v10m(im), & @@ -201,6 +203,8 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & & zlup, zldn, bsum, & tem, tem1, tem2, & ptem, ptem0, ptem1, ptem2 +! + real(kind=kind_phys) xkzm_mp, xkzm_hp ! real(kind=kind_phys) ck0, ck1, ch0, ch1, ce0, rchck ! @@ -212,7 +216,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & parameter(gamcrt=3.,gamcrq=0.,sfcfrac=0.1) parameter(vk=0.4,rimin=-100.) parameter(rbcr=0.25,zolcru=-0.02,tdzmin=1.e-3) - parameter(rlmn=30.,rlmn1=5.,rlmn2=15.) + parameter(rlmn=30.,rlmn1=5.,rlmn2=10.) parameter(rlmx=300.,elmx=300.) parameter(prmin=0.25,prmax=4.0) parameter(pr0=1.0,prtke=1.0,prscu=0.67) @@ -222,7 +226,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & parameter(aphi5=5.,aphi16=16.) parameter(elmfac=1.0,elefac=1.0,cql=100.) parameter(dw2min=1.e-4,dkmax=1000.,xkgdx=5000.) - parameter(qlcr=3.5e-5,zstblmax=2500.,xkzinv=0.15) + parameter(qlcr=3.5e-5,zstblmax=2500.,xkzinv=0.1) parameter(h1=0.33333333) parameter(ck0=0.4,ck1=0.15,ch0=0.4,ch1=0.15) parameter(ce0=0.4) @@ -317,16 +321,31 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & !! \n xkzm_mx = 0.01 + (xkzm_h - 0.01)/(xkgdx-5.) * (gdx-5.) do i=1,im + xkzm_mp = xkzm_m + xkzm_hp = xkzm_h +! + if( islimsk(i) == 1 .and. snwdph_lnd(i) > 10.0 ) then ! over land + if (rbsoil(i) > 0. .and. rbsoil(i) <= 0.25) then + xkzm_mp = xkzm_m * (1.0 - rbsoil(i)/0.25)**2 + + & 0.1 * (1.0 - (1.0-rbsoil(i)/0.25)**2) + xkzm_hp = xkzm_h * (1.0 - rbsoil(i)/0.25)**2 + + & 0.1 * (1.0 - (1.0-rbsoil(i)/0.25)**2) + else if (rbsoil(i) > 0.25) then + xkzm_mp = 0.1 + xkzm_hp = 0.1 + endif + endif +! kx1(i) = 1 tx1(i) = 1.0 / prsi(i,1) tx2(i) = tx1(i) if(gdx(i) >= xkgdx) then - xkzm_hx(i) = xkzm_h - xkzm_mx(i) = xkzm_m + xkzm_hx(i) = xkzm_hp + xkzm_mx(i) = xkzm_mp else tem = 1. / (xkgdx - 5.) - tem1 = (xkzm_h - 0.01) * tem - tem2 = (xkzm_m - 0.01) * tem + tem1 = (xkzm_hp - 0.01) * tem + tem2 = (xkzm_mp - 0.01) * tem ptem = gdx(i) - 5. xkzm_hx(i) = 0.01 + tem1 * ptem xkzm_mx(i) = 0.01 + tem2 * ptem @@ -833,7 +852,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, & ! tem1 = (tvx(i,k+1)-tvx(i,k)) * rdzt(i,k) ! if(tem1 > 1.e-5) then tem1 = tvx(i,k+1)-tvx(i,k) - if(tem1 > 0.) then + if(tem1 > 0. .and. islimsk(i) /= 1) then xkzo(i,k) = min(xkzo(i,k), xkzinv) xkzmo(i,k) = min(xkzmo(i,k), xkzinv) rlmnz(i,k) = min(rlmnz(i,k), rlmn2) diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index 26667a627..f8f0c1918 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -284,6 +284,23 @@ kind = kind_phys intent = in optional = F +[islimsk] + standard_name = sea_land_ice_mask + long_name = sea/land/ice mask (=0/1/2) + units = flag + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[snwdph_lnd] + standard_name = surface_snow_thickness_water_equivalent_over_land + long_name = water equivalent snow depth over land + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [psk] standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the surface interface diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 2a723e70c..e55ec90d7 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -220,15 +220,11 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0max = max(z0max, 1.0e-6) ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil -! czilc = 0.8 + czilc = 0.8 -! tem1 = 1.0 - sigmaf(i) -! ztmax = z0max*exp( - tem1*tem1 -! & * czilc*ca*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) -! - czilc = 10.0 ** (- 4. * z0max) ! Trier et al. (2011, WAF) - ztmax = z0max * exp( - czilc * ca - & * 258.2 * sqrt(ustar_lnd(i)*z0max) ) + tem1 = 1.0 - sigmaf(i) + ztmax = z0max*exp( - tem1*tem1 + & * czilc*ca*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) ! mg, sfc-perts: add surface perturbations to ztmax/z0max ratio over land @@ -265,15 +261,11 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height ! dependance of czil -! czilc = 0.8 - -! tem1 = 1.0 - sigmaf(i) -! ztmax = z0max*exp( - tem1*tem1 -! & * czilc*ca*sqrt(ustar_ice(i)*(0.01/1.5e-05))) - czilc = 10.0 ** (- 4. * z0max) ! Trier et al. (2011, WAF) - ztmax = z0max * exp( - czilc * ca - & * 258.2 * sqrt(ustar_ice(i)*z0max) ) + czilc = 0.8 + tem1 = 1.0 - sigmaf(i) + ztmax = z0max*exp( - tem1*tem1 + & * czilc*ca*sqrt(ustar_ice(i)*(0.01/1.5e-05))) ztmax = max(ztmax, 1.0e-6) ! call stability From 56bca411c1882b0c53fe86cef2332a795eed7f72 Mon Sep 17 00:00:00 2001 From: "Jun.Wang" Date: Thu, 11 Jun 2020 12:05:59 +0000 Subject: [PATCH 218/404] update sfc_diff.f --- physics/sfc_diff.f | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index e55ec90d7..c75d1a36d 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -307,7 +307,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) call znot_t_v6(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) else if (sfc_z0_type == 7) then call znot_t_v7(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) - else if (sfc_z0_type > 0) then + else if (sfc_z0_type /= 0) then write(0,*)'no option for sfc_z0_type=',sfc_z0_type stop endif @@ -322,35 +322,33 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! ! update z0 over ocean ! - if (sfc_z0_type >= 0) then - if (sfc_z0_type == 0) then - z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) + if (sfc_z0_type == 0) then + z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) ! mbek -- toga-coare flux algorithm -! z0 = (charnock / grav) * ustar(i)*ustar(i) + arnu/ustar(i) +! z0 = (charnock / grav) * ustar(i)*ustar(i) + arnu/ustar(i) ! new implementation of z0 -! cc = ustar(i) * z0 / rnu -! pp = cc / (1. + cc) -! ff = grav * arnu / (charnock * ustar(i) ** 3) -! z0 = arnu / (ustar(i) * ff ** pp) - - if (redrag) then - z0rl_wat(i) = 100.0 * max(min(z0, z0s_max), 1.e-7) - else - z0rl_wat(i) = 100.0 * max(min(z0,.1), 1.e-7) - endif - - elseif (sfc_z0_type == 6) then ! wang - call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m - z0rl_wat(i) = 100.0 * z0 ! cm - elseif (sfc_z0_type == 7) then ! wang - call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m - z0rl_wat(i) = 100.0 * z0 ! cm +! cc = ustar(i) * z0 / rnu +! pp = cc / (1. + cc) +! ff = grav * arnu / (charnock * ustar(i) ** 3) +! z0 = arnu / (ustar(i) * ff ** pp) + + if (redrag) then + z0rl_wat(i) = 100.0 * max(min(z0, z0s_max), 1.e-7) else - z0rl_wat(i) = 1.0e-4 + z0rl_wat(i) = 100.0 * max(min(z0,.1), 1.e-7) endif + elseif (sfc_z0_type == 6) then ! wang + call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m + z0rl_wat(i) = 100.0 * z0 ! cm + elseif (sfc_z0_type == 7) then ! wang + call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m + z0rl_wat(i) = 100.0 * z0 ! cm + else + z0rl_wat(i) = 1.0e-4 endif + endif ! end of if(open ocean) ! endif ! end of if(flagiter) loop From 810426e0df91a5883a1471ce099e941dd3f0e4f8 Mon Sep 17 00:00:00 2001 From: "Jun.Wang" Date: Thu, 11 Jun 2020 13:27:04 +0000 Subject: [PATCH 219/404] remove whitespaces in sfc_diff.f --- physics/sfc_diff.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index c75d1a36d..7af159a1d 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -224,7 +224,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) tem1 = 1.0 - sigmaf(i) ztmax = z0max*exp( - tem1*tem1 - & * czilc*ca*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) + & * czilc*ca*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) ! mg, sfc-perts: add surface perturbations to ztmax/z0max ratio over land @@ -265,7 +265,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) tem1 = 1.0 - sigmaf(i) ztmax = z0max*exp( - tem1*tem1 - & * czilc*ca*sqrt(ustar_ice(i)*(0.01/1.5e-05))) + & * czilc*ca*sqrt(ustar_ice(i)*(0.01/1.5e-05))) ztmax = max(ztmax, 1.0e-6) ! call stability From f84468b1a3a732631aeee01a741335d1ed49dff2 Mon Sep 17 00:00:00 2001 From: "Jun.Wang" Date: Thu, 11 Jun 2020 15:47:43 +0000 Subject: [PATCH 220/404] keep z0 unchanged in coupled mode --- physics/sfc_diff.f | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 7af159a1d..fd35d5964 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -307,7 +307,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) call znot_t_v6(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) else if (sfc_z0_type == 7) then call znot_t_v7(wind10m, ztmax) ! 10-m wind,m/s, ztmax(m) - else if (sfc_z0_type /= 0) then + else if (sfc_z0_type > 0) then write(0,*)'no option for sfc_z0_type=',sfc_z0_type stop endif @@ -322,33 +322,34 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! ! update z0 over ocean ! - if (sfc_z0_type == 0) then - z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) + if (sfc_z0_type >= 0) then + if (sfc_z0_type == 0) then + z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) ! mbek -- toga-coare flux algorithm -! z0 = (charnock / grav) * ustar(i)*ustar(i) + arnu/ustar(i) +! z0 = (charnock / grav) * ustar(i)*ustar(i) + arnu/ustar(i) ! new implementation of z0 -! cc = ustar(i) * z0 / rnu -! pp = cc / (1. + cc) -! ff = grav * arnu / (charnock * ustar(i) ** 3) -! z0 = arnu / (ustar(i) * ff ** pp) - - if (redrag) then - z0rl_wat(i) = 100.0 * max(min(z0, z0s_max), 1.e-7) +! cc = ustar(i) * z0 / rnu +! pp = cc / (1. + cc) +! ff = grav * arnu / (charnock * ustar(i) ** 3) +! z0 = arnu / (ustar(i) * ff ** pp) + + if (redrag) then + z0rl_wat(i) = 100.0 * max(min(z0, z0s_max), 1.e-7) + else + z0rl_wat(i) = 100.0 * max(min(z0,.1), 1.e-7) + endif + + elseif (sfc_z0_type == 6) then ! wang + call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m + z0rl_wat(i) = 100.0 * z0 ! cm + elseif (sfc_z0_type == 7) then ! wang + call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m + z0rl_wat(i) = 100.0 * z0 ! cm else - z0rl_wat(i) = 100.0 * max(min(z0,.1), 1.e-7) + z0rl_wat(i) = 1.0e-4 endif - - elseif (sfc_z0_type == 6) then ! wang - call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m - z0rl_wat(i) = 100.0 * z0 ! cm - elseif (sfc_z0_type == 7) then ! wang - call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m - z0rl_wat(i) = 100.0 * z0 ! cm - else - z0rl_wat(i) = 1.0e-4 endif - endif ! end of if(open ocean) ! endif ! end of if(flagiter) loop From b00d5fbf2189e65365ef0e04c741b82e1c6fe80b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 11 Jun 2020 15:22:43 -0600 Subject: [PATCH 221/404] Added new scheme for RRTMGP LW surface flux adjustment between radiation time-steps. --- physics/GFS_suite_interstitial.F90 | 92 ++++++++++++----------- physics/GFS_suite_interstitial.meta | 8 ++ physics/rrtmgp_lwadj.F90 | 77 ++++++++++++++++++++ physics/rrtmgp_lwadj.meta | 109 ++++++++++++++++++++++++++++ 4 files changed, 242 insertions(+), 44 deletions(-) create mode 100644 physics/rrtmgp_lwadj.F90 create mode 100644 physics/rrtmgp_lwadj.meta diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 935dd9430..9f497af26 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -157,10 +157,10 @@ end subroutine GFS_suite_interstitial_2_finalize !! \htmlinclude GFS_suite_interstitial_2_run.html !! #endif - subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplflx, flag_cice, shal_cnv, old_monin, mstrat, & - do_shoc, frac_grid, imfshalcnv, dtf, xcosz, adjsfcdsw, adjsfcdlw, cice, pgr, ulwsfc_cice, lwhd, htrsw, htrlw, xmu, ctei_rm, & - work1, work2, prsi, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, cp, hvap, prslk, suntim, adjsfculw, adjsfculw_lnd, & - adjsfculw_ice, adjsfculw_ocn, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & + subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplflx, flag_cice, shal_cnv, old_monin, mstrat, use_GP_jacobian, & + do_shoc, frac_grid, imfshalcnv, dtf, xcosz, adjsfcdsw, adjsfcdlw, cice, pgr, ulwsfc_cice, lwhd, htrsw, htrlw, xmu, ctei_rm, & + work1, work2, prsi, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, cp, hvap, prslk, suntim, adjsfculw, adjsfculw_lnd, & + adjsfculw_ice, adjsfculw_ocn, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & ctei_rml, ctei_r, kinver, dry, icy, wet, frland, huge, errmsg, errflg) implicit none @@ -168,7 +168,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl ! interface variables integer, intent(in ) :: im, levs, imfshalcnv logical, intent(in ) :: lssav, ldiag3d, lsidea, cplflx, shal_cnv - logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid + logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid, use_GP_jacobian real(kind=kind_phys), intent(in ) :: dtf, cp, hvap logical, intent(in ), dimension(im) :: flag_cice @@ -182,7 +182,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl integer, intent(inout), dimension(im) :: kinver real(kind=kind_phys), intent(inout), dimension(im) :: suntim, dlwsfc, ulwsfc, psmean, ctei_rml, ctei_r real(kind=kind_phys), intent(in ), dimension(im) :: adjsfculw_lnd, adjsfculw_ice, adjsfculw_ocn - real(kind=kind_phys), intent( out), dimension(im) :: adjsfculw + real(kind=kind_phys), intent(inout), dimension(im) :: adjsfculw ! These arrays are only allocated if ldiag3d is .true. real(kind=kind_phys), intent(inout), dimension(:,:) :: dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp @@ -225,45 +225,49 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl enddo ! --- ... sfc lw fluxes used by atmospheric model are saved for output - - if (frac_grid) then - do i=1,im - tem = (one - frland(i)) * cice(i) ! tem = ice fraction wrt whole cell - if (flag_cice(i)) then - adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & - + ulwsfc_cice(i) * tem & - + adjsfculw_ocn(i) * (one - frland(i) - tem) - else - adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & - + adjsfculw_ice(i) * tem & - + adjsfculw_ocn(i) * (one - frland(i) - tem) - endif - enddo - else - do i=1,im - if (dry(i)) then ! all land - adjsfculw(i) = adjsfculw_lnd(i) - elseif (icy(i)) then ! ice (and water) - tem = one - cice(i) - if (flag_cice(i)) then - if (wet(i) .and. adjsfculw_ocn(i) /= huge) then - adjsfculw(i) = ulwsfc_cice(i)*cice(i) + adjsfculw_ocn(i)*tem - else - adjsfculw(i) = ulwsfc_cice(i) - endif - else - if (wet(i) .and. adjsfculw_ocn(i) /= huge) then - adjsfculw(i) = adjsfculw_ice(i)*cice(i) + adjsfculw_ocn(i)*tem +! --- ... when using RRTMGP w/ use_GP_jacobian, these adjustment factors are pre-computed +! --- ... and provided as inputs in this routine. + + if (.not. use_GP_jacobian) then + if (frac_grid) then + do i=1,im + tem = (one - frland(i)) * cice(i) ! tem = ice fraction wrt whole cell + if (flag_cice(i)) then + adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & + + ulwsfc_cice(i) * tem & + + adjsfculw_ocn(i) * (one - frland(i) - tem) else - adjsfculw(i) = adjsfculw_ice(i) - endif - endif - else ! all water - adjsfculw(i) = adjsfculw_ocn(i) - endif - enddo - endif - + adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & + + adjsfculw_ice(i) * tem & + + adjsfculw_ocn(i) * (one - frland(i) - tem) + endif + enddo + else + do i=1,im + if (dry(i)) then ! all land + adjsfculw(i) = adjsfculw_lnd(i) + elseif (icy(i)) then ! ice (and water) + tem = one - cice(i) + if (flag_cice(i)) then + if (wet(i) .and. adjsfculw_ocn(i) /= huge) then + adjsfculw(i) = ulwsfc_cice(i)*cice(i) + adjsfculw_ocn(i)*tem + else + adjsfculw(i) = ulwsfc_cice(i) + endif + else + if (wet(i) .and. adjsfculw_ocn(i) /= huge) then + adjsfculw(i) = adjsfculw_ice(i)*cice(i) + adjsfculw_ocn(i)*tem + else + adjsfculw(i) = adjsfculw_ice(i) + endif + endif + else ! all water + adjsfculw(i) = adjsfculw_ocn(i) + endif + enddo + endif + endif + do i=1,im dlwsfc(i) = dlwsfc(i) + adjsfcdlw(i)*dtf ulwsfc(i) = ulwsfc(i) + adjsfculw(i)*dtf diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 5c206ef30..083326dff 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -354,6 +354,14 @@ type = logical intent = in optional = F +[use_GP_jacobian] + standard_name = flag_to_calc_RRTMGP_LW_jacobian + long_name = logical flag to control RRTMGP LW calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F [frac_grid] standard_name = flag_for_fractional_grid long_name = flag for fractional grid diff --git a/physics/rrtmgp_lwadj.F90 b/physics/rrtmgp_lwadj.F90 new file mode 100644 index 000000000..19918d1ec --- /dev/null +++ b/physics/rrtmgp_lwadj.F90 @@ -0,0 +1,77 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_lwadj + use machine, only: kind_phys + use rrtmgp_aux, only: check_error_msg + implicit none + + logical :: & + linit_mod = .false. ! + + public rrtmgp_lwadj_init, rrtmgp_lwadj_run, rrtmgp_lwadj_finalize +contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lwadj_init + ! ######################################################################################### + subroutine rrtmgp_lwadj_init() + end subroutine rrtmgp_lwadj_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lwadj_run + ! ######################################################################################### + subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_jac, & + fluxlwDOWN_jac, adjsfculw, adjsfcdlw, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + use_LW_jacobian ! If true the GP scheme is using the Jacobians of the upward/downward + ! to adjust the LW surface fluxes between radiation calls. + integer, intent(in) :: & + nCol, & ! Number of horizontal gridpoints + nLev ! Number of vertical levels + real(kind_phys), dimension(nCol), intent(in) :: & + skt ! Surface(skin) temperature (K) + real(kind_phys), dimension(nCol), intent(inout) :: & + sktp1r ! Surface(skin) temperature from previous radiation time step (K) + real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + fluxlwUP_jac, & ! Jacobian of upward LW flux (W/m2/K) + fluxlwDOWN_jac ! Jacobian of downward LW flux (W/m2/K) + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! CCPP error message + integer, intent(out) :: & + errflg ! CCPP error flag + real(kind_phys), dimension(nCol), intent(out) :: & + adjsfculw, & ! + adjsfcdlw ! + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. use_LW_jacobian) return + + ! Compute adjustment to the surface flux using Jacobian. + if(linit_mod) then + adjsfculw(:) = (skt(:) - sktp1r(:)) * fluxlwUP_jac(:,nLev+1) + adjsfcdlw(:) = (skt(:) - sktp1r(:)) * fluxlwDOWN_jac(:,nLev+1) + else + adjsfculw(:) = 0. + adjsfcdlw(:) = 0. + linit_mod = .true. + endif + + ! Store surface temperature for next iteration + sktp1r(:) = skt(:) + + end subroutine rrtmgp_lwadj_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lwadj_finalize + ! ######################################################################################### + subroutine rrtmgp_lwadj_finalize() + end subroutine rrtmgp_lwadj_finalize + +end module rrtmgp_lwadj diff --git a/physics/rrtmgp_lwadj.meta b/physics/rrtmgp_lwadj.meta new file mode 100644 index 000000000..bea4201e4 --- /dev/null +++ b/physics/rrtmgp_lwadj.meta @@ -0,0 +1,109 @@ +######################################################################## +# +######################################################################## +[ccpp-arg-table] + name = rrtmgp_lwadj_init + type = scheme + +######################################################################## +# +######################################################################## +[ccpp-arg-table] + name = rrtmgp_lwadj_run + type = scheme +[use_LW_jacobian] + standard_name = flag_to_calc_RRTMGP_LW_jacobian + long_name = logical flag to control RRTMGP LW calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[skt] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sktp1r] + standard_name = surface_ground_temperature_for_radiation_at_previous_rad_time_step + long_name = surface ground temperature for radiation at previous radiation time step + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwUP_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward + long_name = RRTMGP Jacobian upward longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwDOWN_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward + long_name = RRTMGP Jacobian downward of longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F +[adjsfcdlw] + standard_name = surface_downwelling_longwave_flux + long_name = surface downwelling longwave flux at current time + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[adjsfculw] + standard_name = surface_upwelling_longwave_flux + long_name = surface upwelling longwave flux at current time + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F + From 4d21e5fc791885e97df8e4cede60a1f75b20c7f3 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 12 Jun 2020 08:34:50 -0600 Subject: [PATCH 222/404] Changed intent of fields from in to inout. --- physics/rrtmgp_lwadj.meta | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/physics/rrtmgp_lwadj.meta b/physics/rrtmgp_lwadj.meta index bea4201e4..d431c07b1 100644 --- a/physics/rrtmgp_lwadj.meta +++ b/physics/rrtmgp_lwadj.meta @@ -1,13 +1,3 @@ -######################################################################## -# -######################################################################## -[ccpp-arg-table] - name = rrtmgp_lwadj_init - type = scheme - -######################################################################## -# -######################################################################## [ccpp-arg-table] name = rrtmgp_lwadj_run type = scheme @@ -95,7 +85,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = F [adjsfculw] standard_name = surface_upwelling_longwave_flux From 8b77f369475e949bc1735c33e340a97d09f59c82 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Sun, 14 Jun 2020 23:52:12 +0000 Subject: [PATCH 223/404] updating sfc_diff.f to compute z0 overocean when ww3 sends z0 values <= 0.0 --- physics/sfc_diff.f | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 81aacc19a..53837cac5 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -356,15 +356,25 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) elseif (sfc_z0_type == 6) then ! wang call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m - z0rl_ocn(i) = 100.0_r8 * z0 ! cm + z0rl_ocn(i) = 100.0_r8 * z0 ! cm elseif (sfc_z0_type == 7) then ! wang - call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m - z0rl_ocn(i) = 100.0_r8 * z0 ! cm + call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m + z0rl_ocn(i) = 100.0_r8 * z0 ! cm else z0rl_ocn(i) = 1.0e-4_r8 endif + elseif (z0rl_ocn(i) <= 0.0_r8) then + z0 = (charnock / grav) * ustar_ocn(i) * ustar_ocn(i) + + if (redrag) then + z0rl_ocn(i) = 100.0_r8 * max(min(z0, z0s_max),1.0e-7_r8) + else + z0rl_ocn(i) = 100.0_r8 * max(min(z0,0.1_r8), 1.e-7_r8) + endif + endif + endif ! end of if(open ocean) ! endif ! end of if(flagiter) loop From dbaba27e7d5661862415b9ff54c4a502544289e6 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 16 Jun 2020 14:17:05 -0600 Subject: [PATCH 224/404] Make Jacbians optional inputs --- physics/rrtmgp_lwadj.F90 | 17 ++++++++++++++--- physics/rrtmgp_lwadj.meta | 18 +++++++++--------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/physics/rrtmgp_lwadj.F90 b/physics/rrtmgp_lwadj.F90 index 19918d1ec..35d11acb4 100644 --- a/physics/rrtmgp_lwadj.F90 +++ b/physics/rrtmgp_lwadj.F90 @@ -20,6 +20,9 @@ end subroutine rrtmgp_lwadj_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lwadj_run ! ######################################################################################### +!> \section arg_table_rrtmgp_lwadj_run Argument Table +!! \htmlinclude rrtmgp_lwadj_run.html +!! subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_jac, & fluxlwDOWN_jac, adjsfculw, adjsfcdlw, errmsg, errflg) @@ -34,7 +37,7 @@ subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_j skt ! Surface(skin) temperature (K) real(kind_phys), dimension(nCol), intent(inout) :: & sktp1r ! Surface(skin) temperature from previous radiation time step (K) - real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + real(kind_phys), dimension(nCol,nLev+1), intent(in), optional :: & fluxlwUP_jac, & ! Jacobian of upward LW flux (W/m2/K) fluxlwDOWN_jac ! Jacobian of downward LW flux (W/m2/K) @@ -46,17 +49,25 @@ subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_j real(kind_phys), dimension(nCol), intent(out) :: & adjsfculw, & ! adjsfcdlw ! + + ! Local + real(kind_phys),dimension(nCol) :: dT ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + print*,'skt: ',skt,sktp1r,linit_mod + print*,'Jacobian(up): ',fluxlwUP_jac + print*,'Jacobian(dn): ',fluxlwDOWN_jac + if (.not. use_LW_jacobian) return ! Compute adjustment to the surface flux using Jacobian. if(linit_mod) then - adjsfculw(:) = (skt(:) - sktp1r(:)) * fluxlwUP_jac(:,nLev+1) - adjsfcdlw(:) = (skt(:) - sktp1r(:)) * fluxlwDOWN_jac(:,nLev+1) + dT(:) = (skt(:) - sktp1r(:)) + adjsfculw(:) = fluxlwUP_jac(:,nLev+1) * dT(:) + adjsfcdlw(:) = fluxlwDOWN_jac(:,nLev+1) * dT(:) else adjsfculw(:) = 0. adjsfcdlw(:) = 0. diff --git a/physics/rrtmgp_lwadj.meta b/physics/rrtmgp_lwadj.meta index d431c07b1..f6809275a 100644 --- a/physics/rrtmgp_lwadj.meta +++ b/physics/rrtmgp_lwadj.meta @@ -26,23 +26,23 @@ intent = in optional = F [skt] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation + standard_name = surface_skin_temperature + long_name = surface skin temperature units = K dimensions = (horizontal_dimension) type = real - kind = kind_phys + kind = kind_phys intent = in optional = F [sktp1r] - standard_name = surface_ground_temperature_for_radiation_at_previous_rad_time_step - long_name = surface ground temperature for radiation at previous radiation time step + standard_name = surface_skin_temperature_at_previous_time_step + long_name = surface skin temperature at previous time step units = K dimensions = (horizontal_dimension) type = real - kind = kind_phys + kind = kind_phys intent = in - optional = F + optional = F [fluxlwUP_jac] standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward long_name = RRTMGP Jacobian upward longwave flux profile @@ -51,7 +51,7 @@ type = real kind = kind_phys intent = in - optional = F + optional = T [fluxlwDOWN_jac] standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward long_name = RRTMGP Jacobian downward of longwave flux profile @@ -60,7 +60,7 @@ type = real kind = kind_phys intent = in - optional = F + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From e889b037948b58e7009e80e13206c7b694a14e95 Mon Sep 17 00:00:00 2001 From: Ben Green Date: Thu, 18 Jun 2020 14:17:38 +0000 Subject: [PATCH 225/404] Mods to GSL physics for fractional --- physics/module_MYNNPBL_wrapper.F90 | 79 +++++++++++++++++---- physics/module_MYNNPBL_wrapper.meta | 105 ++++++++++++++++++++++++++++ physics/module_MYNNSFC_wrapper.F90 | 6 ++ physics/module_MYNNSFC_wrapper.meta | 54 ++++++++++++++ physics/module_sf_mynn.F90 | 34 +++++++-- 5 files changed, 259 insertions(+), 19 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 413db8b62..ea507db82 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -60,6 +60,10 @@ SUBROUTINE mynnedmf_wrapper_run( & & dtsfci_diag,dqsfci_diag, & & dusfc_diag,dvsfc_diag, & & dtsfc_diag,dqsfc_diag, & + & dusfc_cice,dvsfc_cice, & + & dtsfc_cice,dqsfc_cice, & + & hflx_ocn,qflx_ocn,stress_ocn, & + & oceanfrac,fice,wet,icy,dry, & & dusfci_cpl,dvsfci_cpl, & & dtsfci_cpl,dqsfci_cpl, & & dusfc_cpl,dvsfc_cpl, & @@ -175,6 +179,9 @@ SUBROUTINE mynnedmf_wrapper_run( & REAL, PARAMETER :: TKmin=253.0 !< for total water conversion, Tripoli and Cotton (1981) REAL, PARAMETER :: tv0=p608*tref, tv1=(1.+p608)*tref, gtr=g/tref, g_inv=1./g + REAL, PARAMETER :: zero=0.0d0, one=1.0d0, epsln=1.0d-10 + REAL, PARAMETER :: huge=9.9692099683868690E36 ! NetCDF float FillValue, same as in GFS_typedefs.F90 + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -279,6 +286,14 @@ SUBROUTINE mynnedmf_wrapper_run( & & dx,zorl,slmsk,tsurf,qsfc,ps, & & hflx,qflx,ust,wspd,rb,recmol + real(kind=kind_phys), dimension(im), intent(in) :: & + & dusfc_cice,dvsfc_cice,dtsfc_cice,dqsfc_cice, & + & stress_ocn,hflx_ocn,qflx_ocn, & + & oceanfrac,fice + + logical, dimension(im), intent(in) :: & + & wet, dry, icy + real(kind=kind_phys), dimension(im), intent(inout) :: & & pblh real(kind=kind_phys), dimension(im), intent(out) :: & @@ -289,9 +304,9 @@ SUBROUTINE mynnedmf_wrapper_run( & integer, dimension(im), intent(inout) :: & & kpbl,nupdraft,ktop_plume - real(kind=kind_phys), dimension(:), intent(inout) :: & + real(kind=kind_phys), dimension(im), intent(inout) :: & & dusfc_cpl,dvsfc_cpl,dtsfc_cpl,dqsfc_cpl - real(kind=kind_phys), dimension(:), intent(inout) :: & + real(kind=kind_phys), dimension(im), intent(inout) :: & & dusfci_cpl,dvsfci_cpl,dtsfci_cpl,dqsfci_cpl !LOCAL @@ -508,17 +523,55 @@ SUBROUTINE mynnedmf_wrapper_run( & dvsfc_diag(i) = dvsfc_diag(i) + dvsfci_diag(i)*delt ! BWG: Coupling insertion - if(cplflx) then - dusfci_cpl(i) = dusfci_diag(i) - dvsfci_cpl(i) = dvsfci_diag(i) - dtsfci_cpl(i) = dtsfci_diag(i) - dqsfci_cpl(i) = dqsfci_diag(i) - - dusfc_cpl(i) = dusfc_cpl(i) + dusfci_cpl(i)*delt - dvsfc_cpl(i) = dvsfc_cpl(i) + dvsfci_cpl(i)*delt - dtsfc_cpl(i) = dtsfc_cpl(i) + dtsfci_cpl(i)*delt - dqsfc_cpl(i) = dqsfc_cpl(i) + dqsfci_cpl(i)*delt - endif + if (cplflx) then + !do i=1,im + if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES + if (fice(i) > one - epsln) then ! no open water, use results from CICE + dusfci_cpl(i) = dusfc_cice(i) + dvsfci_cpl(i) = dvsfc_cice(i) + dtsfci_cpl(i) = dtsfc_cice(i) + dqsfci_cpl(i) = dqsfc_cice(i) + elseif (icy(i) .or. dry(i)) then ! use stress_ocean for opw component at mixed point + if (wspd(i) > zero) then + dusfci_cpl(i) = -1.*rho(i,1)*stress_ocn(i)*u(i,1)/wspd(i) ! U-momentum flux + dvsfci_cpl(i) = -1.*rho(i,1)*stress_ocn(i)*v(i,1)/wspd(i) ! V-momentum flux + else + dusfci_cpl(i) = zero + dvsfci_cpl(i) = zero + endif + dtsfci_cpl(i) = cp*rho(i,1)*hflx_ocn(i) ! sensible heat flux over open ocean + dqsfci_cpl(i) = XLV*rho(i,1)*qflx_ocn(i) ! latent heat flux over open ocean + else ! use results from this scheme for 100% open ocean + dusfci_cpl(i) = dusfci_diag(i) + dvsfci_cpl(i) = dvsfci_diag(i) + dtsfci_cpl(i) = dtsfci_diag(i) + dqsfci_cpl(i) = dqsfci_diag(i) + endif +! + dusfc_cpl (i) = dusfc_cpl(i) + dusfci_cpl(i) * delt + dvsfc_cpl (i) = dvsfc_cpl(i) + dvsfci_cpl(i) * delt + dtsfc_cpl (i) = dtsfc_cpl(i) + dtsfci_cpl(i) * delt + dqsfc_cpl (i) = dqsfc_cpl(i) + dqsfci_cpl(i) * delt + else ! If no ocean + dusfc_cpl(i) = huge + dvsfc_cpl(i) = huge + dtsfc_cpl(i) = huge + dqsfc_cpl(i) = huge + endif ! Ocean only, NO LAKES + !enddo + endif + +! if(cplflx) then +! dusfci_cpl(i) = dusfci_diag(i) +! dvsfci_cpl(i) = dvsfci_diag(i) +! dtsfci_cpl(i) = dtsfci_diag(i) +! dqsfci_cpl(i) = dqsfci_diag(i) +! +! dusfc_cpl(i) = dusfc_cpl(i) + dusfci_cpl(i)*delt +! dvsfc_cpl(i) = dvsfc_cpl(i) + dvsfci_cpl(i)*delt +! dtsfc_cpl(i) = dtsfc_cpl(i) + dtsfci_cpl(i)*delt +! dqsfc_cpl(i) = dqsfc_cpl(i) + dqsfci_cpl(i)*delt +! endif znt(i)=zorl(i)*0.01 !cm -> m? if (do_mynnsfclay) then diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 1ab7af8b4..b256277a2 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -352,6 +352,111 @@ kind = kind_phys intent = in optional = F +[oceanfrac] + standard_name = sea_area_fraction + long_name = fraction of horizontal grid area occupied by ocean + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dusfc_cice] + standard_name = surface_x_momentum_flux_for_coupling + long_name = sfc x momentum flux for coupling + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dvsfc_cice] + standard_name = surface_y_momentum_flux_for_coupling + long_name = sfc y momentum flux for coupling + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dtsfc_cice] + standard_name = surface_upward_sensible_heat_flux_for_coupling + long_name = sfc sensible heat flux for coupling + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dqsfc_cice] + standard_name = surface_upward_latent_heat_flux_for_coupling + long_name = sfc latent heat flux for coupling + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[wet] + standard_name = flag_nonzero_wet_surface_fraction + long_name = flag indicating presence of some ocean or lake surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[dry] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[stress_ocn] + standard_name = surface_wind_stress_over_ocean + long_name = surface wind stress over ocean + units = m2 s-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hflx_ocn] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean + long_name = kinematic surface upward sensible heat flux over ocean + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qflx_ocn] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean + long_name = kinematic surface upward latent heat flux over ocean + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [wspd] standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index d14932e07..496db7580 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -48,6 +48,8 @@ SUBROUTINE mynnsfc_wrapper_run( & & fh_ocn, fh_lnd, fh_ice, & !intent(inout) & fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) & fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) + & hflx_ocn, hflx_lnd, hflx_ice, & + & qflx_ocn, qflx_lnd, qflx_ice, & & QSFC, qsfc_ruc, USTM, ZOL, MOL, & & RMOL, WSPD, ch, HFLX, QFLX, LH, & & FLHC, FLQC, & @@ -149,6 +151,8 @@ SUBROUTINE mynnsfc_wrapper_run( & & fh_ocn, fh_lnd, fh_ice, & & fm10_ocn, fm10_lnd, fm10_ice, & & fh2_ocn, fh2_lnd, fh2_ice, & + & hflx_ocn, hflx_lnd, hflx_ice, & + & qflx_ocn, qflx_lnd, qflx_ice, & & qsfc_ocn, qsfc_lnd, qsfc_ice !MYNN-2D @@ -267,6 +271,8 @@ SUBROUTINE mynnsfc_wrapper_run( & fh_ocn=fh_ocn, fh_lnd=fh_lnd, fh_ice=fh_ice, & !intent(inout) fm10_ocn=fm10_ocn, fm10_lnd=fm10_lnd, fm10_ice=fm10_ice, & !intent(inout) fh2_ocn=fh2_ocn, fh2_lnd=fh2_lnd, fh2_ice=fh2_ice, & !intent(inout) + hflx_ocn=hflx_ocn, hflx_lnd=hflx_lnd, hflx_ice=hflx_ice, & + qflx_ocn=qflx_ocn, qflx_lnd=qflx_lnd, qflx_ice=qflx_ice, & ch=ch,CHS=chs,CHS2=chs2,CQS2=cqs2,CPM=cpm, & ZNT=znt,USTM=ustm,ZOL=zol,MOL=mol,RMOL=rmol, & psim=psim,psih=psih, & diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 73bf1a462..54aa4ff4c 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -725,6 +725,33 @@ kind = kind_phys intent = inout optional = F +[hflx_ocn] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean + long_name = kinematic surface upward sensible heat flux over ocean + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx_lnd] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_land + long_name = kinematic surface upward sensible heat flux over land + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx_ice] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice + long_name = kinematic surface upward sensible heat flux over ice + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [qflx] standard_name = kinematic_surface_upward_latent_heat_flux long_name = kinematic surface upward latent heat flux @@ -734,6 +761,33 @@ kind = kind_phys intent = inout optional = F +[qflx_ocn] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean + long_name = kinematic surface upward latent heat flux over ocean + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qflx_lnd] + standard_name = kinematic_surface_upward_latent_heat_flux_over_land + long_name = kinematic surface upward latent heat flux over land + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qflx_ice] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ice + long_name = kinematic surface upward latent heat flux over ice + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [lh] standard_name = surface_latent_heat long_name = latent heating at the surface (pos = up) diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index 777a3d53f..94b118521 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -166,6 +166,8 @@ SUBROUTINE SFCLAY_mynn( & fh_ocn, fh_lnd, fh_ice, & !intent(inout) fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) fh2_ocn, fh2_lnd, fh2_ice, & !intent(inout) + HFLX_ocn, HFLX_lnd, HFLX_ice, & + QFLX_ocn, QFLX_lnd, QFLX_ice, & CH,CHS,CHS2,CQS2,CPM, & ZNT,USTM,ZOL,MOL,RMOL, & PSIM,PSIH, & @@ -360,6 +362,8 @@ SUBROUTINE SFCLAY_mynn( & & fh_ocn, fh_lnd, fh_ice, & & fm10_ocn, fm10_lnd, fm10_ice, & & fh2_ocn, fh2_lnd, fh2_ice, & + & HFLX_ocn, HFLX_lnd, HFLX_ice, & + & QFLX_ocn, QFLX_lnd, QFLX_ice, & & qsfc_ocn, qsfc_lnd, qsfc_ice, & & qsfc_ruc @@ -468,6 +472,8 @@ SUBROUTINE SFCLAY_mynn( & fh_ocn, fh_lnd, fh_ice, & !intent(inout) fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) fh2_ocn, fh2_lnd, fh2_ice, & + HFLX_ocn, HFLX_lnd, HFLX_ice, & + QFLX_ocn, QFLX_lnd, QFLX_ice, & ch(ims,j),CHS(ims,j),CHS2(ims,j),CQS2(ims,j), & CPM(ims,j), & ZNT(ims,j),USTM(ims,j),ZOL(ims,j), & @@ -519,6 +525,8 @@ SUBROUTINE SFCLAY1D_mynn( & psit_ocn, psit_lnd, psit_ice, & !=fh, intent(inout) psix10_ocn, psix10_lnd, psix10_ice, & !=fm10, intent(inout) psit2_ocn, psit2_lnd, psit2_ice, & !=fh2, intent(inout) + HFLX_ocn, HFLX_lnd, HFLX_ice, & + QFLX_ocn, QFLX_lnd, QFLX_ice, & ch,CHS,CHS2,CQS2,CPM, & ZNT,USTM,ZOL,MOL,RMOL, & PSIM,PSIH, & @@ -613,6 +621,8 @@ SUBROUTINE SFCLAY1D_mynn( & & psit_ocn, psit_lnd, psit_ice, & & psix10_ocn,psix10_lnd,psix10_ice, & & psit2_ocn, psit2_lnd, psit2_ice, & + & HFLX_ocn, HFLX_lnd, HFLX_ice, & + & QFLX_ocn, QFLX_lnd, QFLX_ice, & & qsfc_ocn, qsfc_lnd, qsfc_ice REAL, DIMENSION( its:ite ), INTENT(IN) :: rstoch1D @@ -1763,14 +1773,18 @@ SUBROUTINE SFCLAY1D_mynn( & QFX(I)=FLQC(I)*(QSFC_lnd(I)-QV1D(I)) QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX LH(i)=XLV*QFX(i) - QFLX(i)=QFX(i)/RHO1D(i) + ! BWG, 2020-06-17: Mod next 2 lines for fractional + QFLX_lnd(i)=QFX(i)/RHO1D(i) + QFLX(i)=QFLX_lnd(i) !---------------------------------- ! COMPUTE SURFACE HEAT FLUX: !---------------------------------- HFX(I)=FLHC(I)*(THSK_lnd(I)-TH1D(I)) HFX(I)=MAX(HFX(I),-250.) - HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + ! BWG, 2020-06-17: Mod next 2 lines for fractional + HFLX_lnd(I)=HFX(I)/(RHO1D(I)*cpm(I)) + HFLX(I)=HFLX_lnd(I) ENDIF !TRANSFER COEFF FOR SOME LSMs: @@ -1801,7 +1815,9 @@ SUBROUTINE SFCLAY1D_mynn( & QFX(I)=FLQC(I)*(QSFC_ocn(I)-QV1D(I)) QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX LH(I)=XLV*QFX(I) - QFLX(i)=QFX(i)/RHO1D(i) + ! BWG, 2020-06-17: Mod next 2 lines for fractional + QFLX_ocn(i)=QFX(i)/RHO1D(i) + QFLX(i)=QFLX_ocn(i) !---------------------------------- ! COMPUTE SURFACE HEAT FLUX: @@ -1813,7 +1829,9 @@ SUBROUTINE SFCLAY1D_mynn( & HFX(I)=HFX(I)+RHO1D(I)*USTM(I)*USTM(I)*WSPDI(I) ENDIF ENDIF - HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + ! BWG, 2020-06-17: Mod next 2 lines for fractional + HFLX_ocn(I)=HFX(I)/(RHO1D(I)*cpm(I)) + HFLX(I)=HFLX_ocn(I) ENDIF !TRANSFER COEFF FOR SOME LSMs: @@ -1844,14 +1862,18 @@ SUBROUTINE SFCLAY1D_mynn( & QFX(I)=FLQC(I)*(QSFC_ice(I)-QV1D(I)) QFX(I)=MAX(QFX(I),-0.02) !allows small neg QFX LH(I)=XLF*QFX(I) - QFLX(i)=QFX(i)/RHO1D(i) + ! BWG, 2020-06-17: Mod next 2 lines for fractional + QFLX_ice(i)=QFX(i)/RHO1D(i) + QFLX(i)=QFLX_ice(i) !---------------------------------- ! COMPUTE SURFACE HEAT FLUX: !---------------------------------- HFX(I)=FLHC(I)*(THSK_ice(I)-TH1D(I)) HFX(I)=MAX(HFX(I),-250.) - HFLX(I)=HFX(I)/(RHO1D(I)*cpm(I)) + ! BWG, 2020-06-17: Mod next 2 lines for fractional + HFLX_ice(I)=HFX(I)/(RHO1D(I)*cpm(I)) + HFLX(I)=HFLX_ice(I) ENDIF !TRANSFER COEFF FOR SOME LSMs: From 707dece954e8ea97211167ac42b5718230401715 Mon Sep 17 00:00:00 2001 From: Ben Green Date: Thu, 18 Jun 2020 15:45:14 +0000 Subject: [PATCH 226/404] Cosmetic changes to MYNNPBL --- physics/module_MYNNPBL_wrapper.F90 | 62 ++++++++++++------------------ 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index ea507db82..57d05390f 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -522,9 +522,30 @@ SUBROUTINE mynnedmf_wrapper_run( & dusfc_diag(i) = dusfc_diag(i) + dusfci_diag(i)*delt dvsfc_diag(i) = dvsfc_diag(i) + dvsfci_diag(i)*delt - ! BWG: Coupling insertion + znt(i)=zorl(i)*0.01 !cm -> m? + if (do_mynnsfclay) then + rmol(i)=recmol(i) + else + if (hfx(i) .ge. 0.)then + rmol(i)=-hfx(i)/(200.*dz(i,1)*0.5) + else + rmol(i)=ABS(rb(i))*1./(dz(i,1)*0.5) + endif + !if (rb(i) .ge. 0.)then + ! rmol(i)=rb(i)*8./(dz(i,1)*0.5) + !else + ! rmol(i)=MAX(rb(i)*5.,-10.)/(dz(i,1)*0.5) + !endif + endif + ts(i)=tsurf(i)/exner(i,1) !theta +! qsfc(i)=qss(i) +! ps(i)=pgr(i) +! wspd(i)=wind(i) + enddo + + ! BWG: Coupling insertion if (cplflx) then - !do i=1,im + do i=1,im if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES if (fice(i) > one - epsln) then ! no open water, use results from CICE dusfci_cpl(i) = dusfc_cice(i) @@ -558,41 +579,8 @@ SUBROUTINE mynnedmf_wrapper_run( & dtsfc_cpl(i) = huge dqsfc_cpl(i) = huge endif ! Ocean only, NO LAKES - !enddo - endif - -! if(cplflx) then -! dusfci_cpl(i) = dusfci_diag(i) -! dvsfci_cpl(i) = dvsfci_diag(i) -! dtsfci_cpl(i) = dtsfci_diag(i) -! dqsfci_cpl(i) = dqsfci_diag(i) -! -! dusfc_cpl(i) = dusfc_cpl(i) + dusfci_cpl(i)*delt -! dvsfc_cpl(i) = dvsfc_cpl(i) + dvsfci_cpl(i)*delt -! dtsfc_cpl(i) = dtsfc_cpl(i) + dtsfci_cpl(i)*delt -! dqsfc_cpl(i) = dqsfc_cpl(i) + dqsfci_cpl(i)*delt -! endif - - znt(i)=zorl(i)*0.01 !cm -> m? - if (do_mynnsfclay) then - rmol(i)=recmol(i) - else - if (hfx(i) .ge. 0.)then - rmol(i)=-hfx(i)/(200.*dz(i,1)*0.5) - else - rmol(i)=ABS(rb(i))*1./(dz(i,1)*0.5) - endif - !if (rb(i) .ge. 0.)then - ! rmol(i)=rb(i)*8./(dz(i,1)*0.5) - !else - ! rmol(i)=MAX(rb(i)*5.,-10.)/(dz(i,1)*0.5) - !endif - endif - ts(i)=tsurf(i)/exner(i,1) !theta -! qsfc(i)=qss(i) -! ps(i)=pgr(i) -! wspd(i)=wind(i) - enddo + enddo + endif ! End coupling insertion if (lprnt) then print* From 1315db391f793fe9072b80f2b9797b6702649152 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Thu, 18 Jun 2020 16:54:34 +0000 Subject: [PATCH 227/404] MYNN-EDMF wrapper bug fix: mis-handling ozone when using GFDL microphysics --- physics/module_MYNNPBL_wrapper.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 413db8b62..f54ae7d38 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -429,6 +429,7 @@ SUBROUTINE mynnedmf_wrapper_run( & qni(i,k) = 0. qnwfa(i,k) = 0. qnifa(i,k) = 0. + ozone(i,k) = qgrs_ozone(i,k) enddo enddo else @@ -456,6 +457,7 @@ SUBROUTINE mynnedmf_wrapper_run( & qni(i,k) = 0. qnwfa(i,k) = 0. qnifa(i,k) = 0. + ozone(i,k) = qgrs_ozone(i,k) enddo enddo endif From 37719daee48f16e7be2c510ab0a3425e856c1eef Mon Sep 17 00:00:00 2001 From: Ben Green Date: Thu, 18 Jun 2020 18:25:16 +0000 Subject: [PATCH 228/404] cleanup of .meta file order to match corresponding .F90 --- physics/module_MYNNPBL_wrapper.F90 | 4 +- physics/module_MYNNPBL_wrapper.meta | 210 ++++++++++++++-------------- physics/module_MYNNSFC_wrapper.meta | 108 +++++++------- 3 files changed, 161 insertions(+), 161 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 57d05390f..53561818a 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -304,9 +304,9 @@ SUBROUTINE mynnedmf_wrapper_run( & integer, dimension(im), intent(inout) :: & & kpbl,nupdraft,ktop_plume - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & dusfc_cpl,dvsfc_cpl,dtsfc_cpl,dqsfc_cpl - real(kind=kind_phys), dimension(im), intent(inout) :: & + real(kind=kind_phys), dimension(:), intent(inout) :: & & dusfci_cpl,dvsfci_cpl,dtsfci_cpl,dqsfci_cpl !LOCAL diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index b256277a2..9833f7eba 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -352,111 +352,6 @@ kind = kind_phys intent = in optional = F -[oceanfrac] - standard_name = sea_area_fraction - long_name = fraction of horizontal grid area occupied by ocean - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[fice] - standard_name = sea_ice_concentration - long_name = ice fraction over open water - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dusfc_cice] - standard_name = surface_x_momentum_flux_for_coupling - long_name = sfc x momentum flux for coupling - units = Pa - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dvsfc_cice] - standard_name = surface_y_momentum_flux_for_coupling - long_name = sfc y momentum flux for coupling - units = Pa - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dtsfc_cice] - standard_name = surface_upward_sensible_heat_flux_for_coupling - long_name = sfc sensible heat flux for coupling - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[dqsfc_cice] - standard_name = surface_upward_latent_heat_flux_for_coupling - long_name = sfc latent heat flux for coupling - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[wet] - standard_name = flag_nonzero_wet_surface_fraction - long_name = flag indicating presence of some ocean or lake surface area fraction - units = flag - dimensions = (horizontal_dimension) - type = logical - intent = in - optional = F -[dry] - standard_name = flag_nonzero_land_surface_fraction - long_name = flag indicating presence of some land surface area fraction - units = flag - dimensions = (horizontal_dimension) - type = logical - intent = in - optional = F -[icy] - standard_name = flag_nonzero_sea_ice_surface_fraction - long_name = flag indicating presence of some sea ice surface area fraction - units = flag - dimensions = (horizontal_dimension) - type = logical - intent = in - optional = F -[stress_ocn] - standard_name = surface_wind_stress_over_ocean - long_name = surface wind stress over ocean - units = m2 s-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[hflx_ocn] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean - units = K m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[qflx_ocn] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [wspd] standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level @@ -583,6 +478,111 @@ kind = kind_phys intent = inout optional = F +[dusfc_cice] + standard_name = surface_x_momentum_flux_for_coupling + long_name = sfc x momentum flux for coupling + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dvsfc_cice] + standard_name = surface_y_momentum_flux_for_coupling + long_name = sfc y momentum flux for coupling + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dtsfc_cice] + standard_name = surface_upward_sensible_heat_flux_for_coupling + long_name = sfc sensible heat flux for coupling + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dqsfc_cice] + standard_name = surface_upward_latent_heat_flux_for_coupling + long_name = sfc latent heat flux for coupling + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hflx_ocn] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean + long_name = kinematic surface upward sensible heat flux over ocean + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qflx_ocn] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean + long_name = kinematic surface upward latent heat flux over ocean + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[stress_ocn] + standard_name = surface_wind_stress_over_ocean + long_name = surface wind stress over ocean + units = m2 s-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[oceanfrac] + standard_name = sea_area_fraction + long_name = fraction of horizontal grid area occupied by ocean + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[wet] + standard_name = flag_nonzero_wet_surface_fraction + long_name = flag indicating presence of some ocean or lake surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[dry] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F [dusfci_cpl] standard_name = instantaneous_surface_x_momentum_flux_for_coupling long_name = instantaneous sfc u momentum flux diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 54aa4ff4c..cf366d3d4 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -644,6 +644,60 @@ kind = kind_phys intent = inout optional = F +[hflx_ocn] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean + long_name = kinematic surface upward sensible heat flux over ocean + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx_lnd] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_land + long_name = kinematic surface upward sensible heat flux over land + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx_ice] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice + long_name = kinematic surface upward sensible heat flux over ice + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qflx_ocn] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean + long_name = kinematic surface upward latent heat flux over ocean + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qflx_lnd] + standard_name = kinematic_surface_upward_latent_heat_flux_over_land + long_name = kinematic surface upward latent heat flux over land + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qflx_ice] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ice + long_name = kinematic surface upward latent heat flux over ice + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [qsfc] standard_name = surface_specific_humidity long_name = surface air saturation specific humidity @@ -725,33 +779,6 @@ kind = kind_phys intent = inout optional = F -[hflx_ocn] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean - long_name = kinematic surface upward sensible heat flux over ocean - units = K m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[hflx_lnd] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_land - long_name = kinematic surface upward sensible heat flux over land - units = K m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[hflx_ice] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice - long_name = kinematic surface upward sensible heat flux over ice - units = K m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [qflx] standard_name = kinematic_surface_upward_latent_heat_flux long_name = kinematic surface upward latent heat flux @@ -761,33 +788,6 @@ kind = kind_phys intent = inout optional = F -[qflx_ocn] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean - long_name = kinematic surface upward latent heat flux over ocean - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[qflx_lnd] - standard_name = kinematic_surface_upward_latent_heat_flux_over_land - long_name = kinematic surface upward latent heat flux over land - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[qflx_ice] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ice - long_name = kinematic surface upward latent heat flux over ice - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [lh] standard_name = surface_latent_heat long_name = latent heating at the surface (pos = up) From d8253bd38d8a5c78d3d462fe1a5eb3231260461f Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 19 Jun 2020 13:26:44 -0600 Subject: [PATCH 229/404] Fixed bug in previous commit. --- physics/rrtmgp_lwadj.F90 | 53 +++++++++++++++++++-------------------- physics/rrtmgp_lwadj.meta | 2 +- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/physics/rrtmgp_lwadj.F90 b/physics/rrtmgp_lwadj.F90 index 35d11acb4..5b9906442 100644 --- a/physics/rrtmgp_lwadj.F90 +++ b/physics/rrtmgp_lwadj.F90 @@ -4,19 +4,19 @@ module rrtmgp_lwadj use machine, only: kind_phys use rrtmgp_aux, only: check_error_msg implicit none - + logical :: & linit_mod = .false. ! - + public rrtmgp_lwadj_init, rrtmgp_lwadj_run, rrtmgp_lwadj_finalize contains - + ! ######################################################################################### ! SUBROUTINE rrtmgp_lwadj_init ! ######################################################################################### subroutine rrtmgp_lwadj_init() end subroutine rrtmgp_lwadj_init - + ! ######################################################################################### ! SUBROUTINE rrtmgp_lwadj_run ! ######################################################################################### @@ -24,12 +24,12 @@ end subroutine rrtmgp_lwadj_init !! \htmlinclude rrtmgp_lwadj_run.html !! subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_jac, & - fluxlwDOWN_jac, adjsfculw, adjsfcdlw, errmsg, errflg) + fluxlwDOWN_jac, adjsfculw, adjsfcdlw, errmsg, errflg) - ! Inputs - logical, intent(in) :: & - use_LW_jacobian ! If true the GP scheme is using the Jacobians of the upward/downward - ! to adjust the LW surface fluxes between radiation calls. + ! Inputs + logical, intent(in) :: & + use_LW_jacobian ! If true the GP scheme is using the Jacobians of the upward/downward + ! to adjust the LW surface fluxes between radiation calls. integer, intent(in) :: & nCol, & ! Number of horizontal gridpoints nLev ! Number of vertical levels @@ -37,40 +37,39 @@ subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_j skt ! Surface(skin) temperature (K) real(kind_phys), dimension(nCol), intent(inout) :: & sktp1r ! Surface(skin) temperature from previous radiation time step (K) - real(kind_phys), dimension(nCol,nLev+1), intent(in), optional :: & + real(kind_phys), dimension(nCol,nLev+1), intent(in),optional :: & fluxlwUP_jac, & ! Jacobian of upward LW flux (W/m2/K) fluxlwDOWN_jac ! Jacobian of downward LW flux (W/m2/K) - ! Outputs + ! Outputs character(len=*), intent(out) :: & errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error flag - real(kind_phys), dimension(nCol), intent(out) :: & - adjsfculw, & ! - adjsfcdlw ! + real(kind_phys), dimension(nCol), intent(inout) :: & + adjsfculw, & ! + adjsfcdlw ! - ! Local - real(kind_phys),dimension(nCol) :: dT - + ! Local + real(kind_phys),dimension(nCol) :: dT + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - print*,'skt: ',skt,sktp1r,linit_mod - print*,'Jacobian(up): ',fluxlwUP_jac - print*,'Jacobian(dn): ',fluxlwDOWN_jac - - if (.not. use_LW_jacobian) return + + print*,'skt: ',skt,sktp1r,linit_mod + print*,'Jacobian(up): ',fluxlwUP_jac + print*,'use_LW_jacobian: ',use_LW_jacobian + + if (.not. present(fluxlwUP_jac)) return + if (.not. use_LW_jacobian) return ! Compute adjustment to the surface flux using Jacobian. - if(linit_mod) then - dT(:) = (skt(:) - sktp1r(:)) + if(linit_mod) then + dT(:) = (skt(:) - sktp1r(:)) adjsfculw(:) = fluxlwUP_jac(:,nLev+1) * dT(:) - adjsfcdlw(:) = fluxlwDOWN_jac(:,nLev+1) * dT(:) else adjsfculw(:) = 0. - adjsfcdlw(:) = 0. linit_mod = .true. endif diff --git a/physics/rrtmgp_lwadj.meta b/physics/rrtmgp_lwadj.meta index f6809275a..202ccb841 100644 --- a/physics/rrtmgp_lwadj.meta +++ b/physics/rrtmgp_lwadj.meta @@ -85,7 +85,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [adjsfculw] standard_name = surface_upwelling_longwave_flux From 556c67320ffabb14bb673555fb315518e0c57c18 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 19 Jun 2020 16:35:48 -0600 Subject: [PATCH 230/404] LW adjusted flux using GP Jacobians is working. --- physics/rrtmgp_lwadj.F90 | 15 ++++++--------- physics/rrtmgp_lwadj.meta | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/physics/rrtmgp_lwadj.F90 b/physics/rrtmgp_lwadj.F90 index 5b9906442..4f5bcb89e 100644 --- a/physics/rrtmgp_lwadj.F90 +++ b/physics/rrtmgp_lwadj.F90 @@ -24,7 +24,7 @@ end subroutine rrtmgp_lwadj_init !! \htmlinclude rrtmgp_lwadj_run.html !! subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_jac, & - fluxlwDOWN_jac, adjsfculw, adjsfcdlw, errmsg, errflg) + fluxlwDOWN_jac, fluxlwUP, adjsfculw, adjsfcdlw, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -38,6 +38,7 @@ subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_j real(kind_phys), dimension(nCol), intent(inout) :: & sktp1r ! Surface(skin) temperature from previous radiation time step (K) real(kind_phys), dimension(nCol,nLev+1), intent(in),optional :: & + fluxlwUP, & ! Upwelling LW flux fluxlwUP_jac, & ! Jacobian of upward LW flux (W/m2/K) fluxlwDOWN_jac ! Jacobian of downward LW flux (W/m2/K) @@ -56,23 +57,19 @@ subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_j ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - print*,'skt: ',skt,sktp1r,linit_mod - print*,'Jacobian(up): ',fluxlwUP_jac - print*,'use_LW_jacobian: ',use_LW_jacobian - - if (.not. present(fluxlwUP_jac)) return + if (.not. use_LW_jacobian) return ! Compute adjustment to the surface flux using Jacobian. if(linit_mod) then dT(:) = (skt(:) - sktp1r(:)) - adjsfculw(:) = fluxlwUP_jac(:,nLev+1) * dT(:) + adjsfculw(:) = fluxlwUP(:,1) + fluxlwUP_jac(:,1) * dT(:) else adjsfculw(:) = 0. linit_mod = .true. endif - + print*,'adjsfculw: ',adjsfculw + ! Store surface temperature for next iteration sktp1r(:) = skt(:) diff --git a/physics/rrtmgp_lwadj.meta b/physics/rrtmgp_lwadj.meta index 202ccb841..8e1ca06a8 100644 --- a/physics/rrtmgp_lwadj.meta +++ b/physics/rrtmgp_lwadj.meta @@ -24,14 +24,14 @@ dimensions = () type = integer intent = in - optional = F + optional = F [skt] - standard_name = surface_skin_temperature - long_name = surface skin temperature + standard_name = air_temperature_at_lowest_model_layer + long_name = air temperature at lowest model layer units = K dimensions = (horizontal_dimension) type = real - kind = kind_phys + kind = kind_phys intent = in optional = F [sktp1r] @@ -42,7 +42,16 @@ type = real kind = kind_phys intent = in - optional = F + optional = F +[fluxlwUP] + standard_name = RRTMGP_lw_flux_profile_upward_allsky + long_name = RRTMGP upward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F [fluxlwUP_jac] standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward long_name = RRTMGP Jacobian upward longwave flux profile From 0a5ab18b6d87145a6f2439d94fcff55e32760e48 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 22 Jun 2020 18:05:13 -0600 Subject: [PATCH 231/404] Moved rrtmgp_lwadj into conditional in GFS_suite_interstitial_2_run. --- physics/GFS_suite_interstitial.F90 | 45 +++++++++--- physics/GFS_suite_interstitial.meta | 56 ++++++++++++--- physics/rrtmgp_lwadj.F90 | 84 ---------------------- physics/rrtmgp_lwadj.meta | 108 ---------------------------- 4 files changed, 80 insertions(+), 213 deletions(-) delete mode 100644 physics/rrtmgp_lwadj.F90 delete mode 100644 physics/rrtmgp_lwadj.meta diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 9f497af26..680185729 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -144,6 +144,7 @@ module GFS_suite_interstitial_2 use machine, only: kind_phys real(kind=kind_phys), parameter :: one = 1.0d0 + logical :: linit_mod = .false. contains @@ -157,18 +158,18 @@ end subroutine GFS_suite_interstitial_2_finalize !! \htmlinclude GFS_suite_interstitial_2_run.html !! #endif - subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplflx, flag_cice, shal_cnv, old_monin, mstrat, use_GP_jacobian, & - do_shoc, frac_grid, imfshalcnv, dtf, xcosz, adjsfcdsw, adjsfcdlw, cice, pgr, ulwsfc_cice, lwhd, htrsw, htrlw, xmu, ctei_rm, & - work1, work2, prsi, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, cp, hvap, prslk, suntim, adjsfculw, adjsfculw_lnd, & - adjsfculw_ice, adjsfculw_ocn, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & - ctei_rml, ctei_r, kinver, dry, icy, wet, frland, huge, errmsg, errflg) + subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplflx, flag_cice, shal_cnv, old_monin, mstrat, & + do_shoc, frac_grid, imfshalcnv, dtf, xcosz, adjsfcdsw, adjsfcdlw, cice, pgr, ulwsfc_cice, lwhd, htrsw, htrlw, xmu, ctei_rm, & + work1, work2, prsi, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, cp, hvap, prslk, suntim, adjsfculw, adjsfculw_lnd, & + adjsfculw_ice, adjsfculw_ocn, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & + ctei_rml, ctei_r, kinver, dry, icy, wet, frland, huge, use_GP_jacobian, skt, sktp1r, fluxlwUP, fluxlwUP_jac, errmsg, errflg) implicit none ! interface variables integer, intent(in ) :: im, levs, imfshalcnv logical, intent(in ) :: lssav, ldiag3d, lsidea, cplflx, shal_cnv - logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid, use_GP_jacobian + logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid real(kind=kind_phys), intent(in ) :: dtf, cp, hvap logical, intent(in ), dimension(im) :: flag_cice @@ -178,11 +179,21 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl real(kind=kind_phys), intent(in ), dimension(im, levs) :: htrsw, htrlw, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, prslk real(kind=kind_phys), intent(in ), dimension(im, levs+1) :: prsi real(kind=kind_phys), intent(in ), dimension(im, levs, 6) :: lwhd - integer, intent(inout), dimension(im) :: kinver real(kind=kind_phys), intent(inout), dimension(im) :: suntim, dlwsfc, ulwsfc, psmean, ctei_rml, ctei_r real(kind=kind_phys), intent(in ), dimension(im) :: adjsfculw_lnd, adjsfculw_ice, adjsfculw_ocn - real(kind=kind_phys), intent(inout), dimension(im) :: adjsfculw + real(kind=kind_phys), intent( out), dimension(im) :: adjsfculw + + ! RRTMGP + logical, intent(in ) :: & + use_GP_jacobian ! Use RRTMGP LW Jacobian of upwelling to adjust the surface flux? + real(kind=kind_phys), intent(in ), dimension(im) :: & + skt ! Skin temperature + real(kind=kind_phys), intent(inout), dimension(im) :: & + sktp1r ! Skin temperature at previous timestep + real(kind=kind_phys), intent(in ), dimension(im,levs+1), optional :: & + fluxlwUP, & ! Upwelling LW flux (W/m2) + fluxlwUP_jac ! Jacobian of upwelling LW flux (W/m2/K) ! These arrays are only allocated if ldiag3d is .true. real(kind=kind_phys), intent(inout), dimension(:,:) :: dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp @@ -199,7 +210,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl integer :: i, k real(kind=kind_phys) :: tem1, tem2, tem, hocp logical, dimension(im) :: invrsn - real(kind=kind_phys), dimension(im) :: tx1, tx2 + real(kind=kind_phys), dimension(im) :: tx1, tx2, dT real(kind=kind_phys), parameter :: qmin = 1.0d-10 @@ -227,8 +238,20 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl ! --- ... sfc lw fluxes used by atmospheric model are saved for output ! --- ... when using RRTMGP w/ use_GP_jacobian, these adjustment factors are pre-computed ! --- ... and provided as inputs in this routine. - - if (.not. use_GP_jacobian) then + + if (use_GP_jacobian) then + ! Compute adjustment to the surface flux using Jacobian. + if(linit_mod) then + dT(:) = (skt(:) - sktp1r(:)) + adjsfculw(:) = fluxlwUP(:,1) + fluxlwUP_jac(:,1) * dT(:) + else + adjsfculw(:) = 0. + linit_mod = .true. + endif + + ! Store surface temperature for next iteration + sktp1r(:) = skt(:) + else if (frac_grid) then do i=1,im tem = (one - frland(i)) * cice(i) ! tem = ice fraction wrt whole cell diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 083326dff..605380198 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -353,15 +353,7 @@ dimensions = () type = logical intent = in - optional = F -[use_GP_jacobian] - standard_name = flag_to_calc_RRTMGP_LW_jacobian - long_name = logical flag to control RRTMGP LW calculation - units = flag - dimensions = () - type = logical - intent = in - optional = F + optional = F [frac_grid] standard_name = flag_for_fractional_grid long_name = flag for fractional grid @@ -592,7 +584,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = F [adjsfculw_lnd] standard_name = surface_upwelling_longwave_flux_over_land_interstitial @@ -770,6 +762,50 @@ kind = kind_phys intent = in optional = F +[use_GP_jacobian] + standard_name = flag_to_calc_RRTMGP_LW_jacobian + long_name = logical flag to control RRTMGP LW calculation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[skt] + standard_name = air_temperature_at_lowest_model_layer + long_name = air temperature at lowest model layer + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sktp1r] + standard_name = surface_skin_temperature_at_previous_time_step + long_name = surface skin temperature at previous time step + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwUP] + standard_name = RRTMGP_lw_flux_profile_upward_allsky + long_name = RRTMGP upward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwUP_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward + long_name = RRTMGP Jacobian upward longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_lwadj.F90 b/physics/rrtmgp_lwadj.F90 deleted file mode 100644 index 4f5bcb89e..000000000 --- a/physics/rrtmgp_lwadj.F90 +++ /dev/null @@ -1,84 +0,0 @@ -! ########################################################################################### -! ########################################################################################### -module rrtmgp_lwadj - use machine, only: kind_phys - use rrtmgp_aux, only: check_error_msg - implicit none - - logical :: & - linit_mod = .false. ! - - public rrtmgp_lwadj_init, rrtmgp_lwadj_run, rrtmgp_lwadj_finalize -contains - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lwadj_init - ! ######################################################################################### - subroutine rrtmgp_lwadj_init() - end subroutine rrtmgp_lwadj_init - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lwadj_run - ! ######################################################################################### -!> \section arg_table_rrtmgp_lwadj_run Argument Table -!! \htmlinclude rrtmgp_lwadj_run.html -!! - subroutine rrtmgp_lwadj_run(use_LW_jacobian, nCol, nLev, skt, sktp1r, fluxlwUP_jac, & - fluxlwDOWN_jac, fluxlwUP, adjsfculw, adjsfcdlw, errmsg, errflg) - - ! Inputs - logical, intent(in) :: & - use_LW_jacobian ! If true the GP scheme is using the Jacobians of the upward/downward - ! to adjust the LW surface fluxes between radiation calls. - integer, intent(in) :: & - nCol, & ! Number of horizontal gridpoints - nLev ! Number of vertical levels - real(kind_phys), dimension(nCol), intent(in) :: & - skt ! Surface(skin) temperature (K) - real(kind_phys), dimension(nCol), intent(inout) :: & - sktp1r ! Surface(skin) temperature from previous radiation time step (K) - real(kind_phys), dimension(nCol,nLev+1), intent(in),optional :: & - fluxlwUP, & ! Upwelling LW flux - fluxlwUP_jac, & ! Jacobian of upward LW flux (W/m2/K) - fluxlwDOWN_jac ! Jacobian of downward LW flux (W/m2/K) - - ! Outputs - character(len=*), intent(out) :: & - errmsg ! CCPP error message - integer, intent(out) :: & - errflg ! CCPP error flag - real(kind_phys), dimension(nCol), intent(inout) :: & - adjsfculw, & ! - adjsfcdlw ! - - ! Local - real(kind_phys),dimension(nCol) :: dT - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. use_LW_jacobian) return - - ! Compute adjustment to the surface flux using Jacobian. - if(linit_mod) then - dT(:) = (skt(:) - sktp1r(:)) - adjsfculw(:) = fluxlwUP(:,1) + fluxlwUP_jac(:,1) * dT(:) - else - adjsfculw(:) = 0. - linit_mod = .true. - endif - print*,'adjsfculw: ',adjsfculw - - ! Store surface temperature for next iteration - sktp1r(:) = skt(:) - - end subroutine rrtmgp_lwadj_run - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lwadj_finalize - ! ######################################################################################### - subroutine rrtmgp_lwadj_finalize() - end subroutine rrtmgp_lwadj_finalize - -end module rrtmgp_lwadj diff --git a/physics/rrtmgp_lwadj.meta b/physics/rrtmgp_lwadj.meta deleted file mode 100644 index 8e1ca06a8..000000000 --- a/physics/rrtmgp_lwadj.meta +++ /dev/null @@ -1,108 +0,0 @@ -[ccpp-arg-table] - name = rrtmgp_lwadj_run - type = scheme -[use_LW_jacobian] - standard_name = flag_to_calc_RRTMGP_LW_jacobian - long_name = logical flag to control RRTMGP LW calculation - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[nLev] - standard_name = vertical_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in - optional = F -[skt] - standard_name = air_temperature_at_lowest_model_layer - long_name = air temperature at lowest model layer - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sktp1r] - standard_name = surface_skin_temperature_at_previous_time_step - long_name = surface skin temperature at previous time step - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[fluxlwUP] - standard_name = RRTMGP_lw_flux_profile_upward_allsky - long_name = RRTMGP upward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[fluxlwUP_jac] - standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward - long_name = RRTMGP Jacobian upward longwave flux profile - units = W m-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = T -[fluxlwDOWN_jac] - standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward - long_name = RRTMGP Jacobian downward of longwave flux profile - units = W m-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = T -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F -[adjsfcdlw] - standard_name = surface_downwelling_longwave_flux - long_name = surface downwelling longwave flux at current time - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[adjsfculw] - standard_name = surface_upwelling_longwave_flux - long_name = surface upwelling longwave flux at current time - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F - From 728c076a64f921670e8be18d1b0c0d79de6e3254 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 25 Jun 2020 09:58:45 -0600 Subject: [PATCH 232/404] physics/module_MYNNPBL_wrapper.F90: modify coupling code as suggested by @shansun6 --- physics/module_MYNNPBL_wrapper.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 1faa62889..06385b0b1 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -179,7 +179,7 @@ SUBROUTINE mynnedmf_wrapper_run( & REAL, PARAMETER :: TKmin=253.0 !< for total water conversion, Tripoli and Cotton (1981) REAL, PARAMETER :: tv0=p608*tref, tv1=(1.+p608)*tref, gtr=g/tref, g_inv=1./g - REAL, PARAMETER :: zero=0.0d0, one=1.0d0, epsln=1.0d-10 + REAL, PARAMETER :: zero=0.0d0, one=1.0d0 REAL, PARAMETER :: huge=9.9692099683868690E36 ! NetCDF float FillValue, same as in GFS_typedefs.F90 character(len=*), intent(out) :: errmsg @@ -549,7 +549,7 @@ SUBROUTINE mynnedmf_wrapper_run( & if (cplflx) then do i=1,im if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES - if (fice(i) > one - epsln) then ! no open water, use results from CICE + if ( .not. wet(i)) then ! no open water, use results from CICE dusfci_cpl(i) = dusfc_cice(i) dvsfci_cpl(i) = dvsfc_cice(i) dtsfci_cpl(i) = dtsfc_cice(i) From 3e214f7bffb840235b88a2d164963397ef3ba165 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 26 Jun 2020 23:42:20 +0000 Subject: [PATCH 233/404] Updates to module_SGSCloud_RadPre.F90 and .meta (from Tanya) --- physics/module_SGSCloud_RadPre.F90 | 72 ++++++++++++++--------------- physics/module_SGSCloud_RadPre.meta | 9 ++++ 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index a3731c63e..5a1a2744f 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -39,7 +39,7 @@ subroutine sgscloud_radpre_run( & flag_init,flag_restart, & do_mynnedmf, & qc, qi, qv, T3D, P3D, & - qr, qs, & + qr, qs, qg, & qci_conv, & imfdeepcnv, imfdeepcnv_gf, & qc_save, qi_save, & @@ -68,7 +68,7 @@ subroutine sgscloud_radpre_run( & & nlay, imp_physics, imp_physics_gfdl logical, intent(in) :: flag_init, flag_restart, do_mynnedmf real(kind=kind_phys), dimension(im,levs), intent(inout) :: qc, qi - real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs + real(kind=kind_phys), dimension(im,levs), intent(inout) :: qr, qs, qg ! qci_conv only allocated if GF is used real(kind=kind_phys), dimension(:,:), intent(inout) :: qci_conv real(kind=kind_phys), dimension(im,levs), intent(in) :: T3D,delp, & @@ -117,22 +117,20 @@ subroutine sgscloud_radpre_run( & if ( qi(i,k) > 1E-7 .OR. qc(i,k) > 1E-7 ) then es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) - rhgrid = max( 0., min( 0.95, qv(i,k)/qsat ) ) - h2oliq = qc(i,k) + qi(i,k) ! g/kg + rhgrid = max( 0., min( 1., qv(i,k)/qsat ) ) + h2oliq = qc(i,k) + qi(i,k) + qr(i,k) + qs(i,k) + qg(i,k) ! g/kg clwt = 1.0e-6 * (p3d(i,k)*0.00001) if (h2oliq > clwt) then onemrh= max( 1.e-10, 1.0-rhgrid ) tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan tem1 = 100.0 / tem1 - value = max( min( tem1*(h2oliq), 50.0 ), 0.0 ) + value = max( min( tem1*(h2oliq-clwt), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhgrid) ) clouds1(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) endif - !clouds1(i,k)=(1.-exp(-coef_alph*h2oliq/ & - ! & ((1.-rhgrid)*qsat*1000.0)**coef_gamm))*(rhgrid**coef_p) - !clouds1(i,k)=max(0.0,MIN(1.,clouds1(i,k))) + endif enddo enddo @@ -213,27 +211,20 @@ subroutine sgscloud_radpre_run( & es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) - rhgrid = max( 0., min( 0.95, qv(i,k)/qsat ) ) - h2oliq = qc(i,k) + qi(i,k) ! g/kg + rhgrid = max( 0., min( 1., qv(i,k)/qsat ) ) + h2oliq = qc(i,k) + qi(i,k) + qr(i,k) + qs(i,k) + qg(i,k) ! g/kg clwt = 1.0e-6 * (p3d(i,k)*0.00001) if (h2oliq > clwt) then onemrh= max( 1.e-10, 1.0-rhgrid ) tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan tem1 = 100.0 / tem1 - value = max( min( tem1*(h2oliq), 50.0 ), 0.0 ) + value = max( min( tem1*(h2oliq-clwt), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhgrid) ) clouds1(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) endif - !es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa - !qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) - !rhgrid = max( 0., min( 0.95, qv(i,k)/qsat ) ) - !h2oliq=1000.0*( qc(i,k) + qi(i,k) ) ! g/kg - !clouds1(i,k)=(1.-exp(-coef_alph*h2oliq/ & - ! & ((1.-rhgrid)*qsat*1000.0)**coef_gamm))*(rhgrid**coef_p) - !clouds1(i,k)=max(0.0,MIN(1.,clouds1(i,k))) endif enddo enddo @@ -265,27 +256,32 @@ subroutine sgscloud_radpre_run( & if(qi(i,k)>1.E-8)clouds5(i,k)=max(173.45 + 2.14*Tc, 20.) endif - ! Xu-Randall (1996) cloud fraction - es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa - qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) - rhgrid = max( 0., min( 0.95, qv(i,k)/qsat ) ) - h2oliq = qc(i,k) + qi(i,k) ! g/kg - clwt = 1.0e-6 * (p3d(i,k)*0.00001) - - if (h2oliq > clwt) then - onemrh= max( 1.e-10, 1.0-rhgrid ) - tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan - tem1 = 100.0 / tem1 - value = max( min( tem1*(h2oliq), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhgrid) ) - - clouds1(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + if ( do_mynnedmf .or. (imp_physics == imp_physics_gfdl) ) then + !print *,'MYNN PBL or GFDL MP cldcov used' else - clouds1(i,k) = 0.0 - endif - !print*,"XuRandla- cf:",clouds1(i,k)," rh:",rhgrid," qt:",h2oliq - !print*,"XuRandlb- clwt:",clwt," qsat:",qsat," p:",p3d(i,k) - endif + !print *,'GF with Xu-Randall cloud fraction' + ! Xu-Randall (1996) cloud fraction + es = min( p3d(i,k), fpvs( t3d(i,k) ) ) ! fpvs and prsl in pa + qsat = max( QMIN, eps * es / (p3d(i,k) + epsm1*es) ) + rhgrid = max( 0., min( 1.00, qv(i,k)/qsat ) ) + h2oliq = qc(i,k) + qi(i,k) + qr(i,k) + qs(i,k) + qg(i,k) ! g/kg + clwt = 1.0e-6 * (p3d(i,k)*0.00001) + + if (h2oliq > clwt) then + onemrh= max( 1.e-10, 1.0-rhgrid ) + tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan + tem1 = 100.0 / tem1 + value = max( min( tem1*(h2oliq-clwt), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhgrid) ) + + clouds1(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + else + clouds1(i,k) = 0.0 + endif + !print*,"XuRandla- cf:",clouds1(i,k)," rh:",rhgrid," qt:",h2oliq + !print*,"XuRandlb- clwt:",clwt," qsat:",qsat," p:",p3d(i,k) + endif ! not MYNN PBL or GFDL MP + endif ! qci_conv enddo enddo endif ! imfdeepcnv_gf diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 63d83d349..8a742a041 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -106,6 +106,15 @@ kind = kind_phys intent = inout optional = F +[qg] + standard_name = graupel_mixing_ratio + long_name = graupel mixing ratio wrt dry+vapor (no condensates) + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [qci_conv] standard_name = convective_cloud_condesate_after_rainout long_name = convective cloud condesate after rainout From 37444dc7da2af9399c17c1c9bd63b100ea0fd81c Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 29 Jun 2020 23:38:57 +0000 Subject: [PATCH 234/404] updating sfc_diff.f to recompute z0 over ocean when coupled to ww3 and value is below 1.0e-7 --- physics/sfc_diff.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 2a52b28c4..3ec69cd4f 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -355,13 +355,13 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0rl_wat(i) = 1.0e-4_r8 endif - elseif (z0rl_wat(i) <= 0.0_r8) then + elseif (z0rl_wat(i) <= 1.0e-7_r8) then z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) if (redrag) then z0rl_wat(i) = 100.0_r8 * max(min(z0, z0s_max),1.0e-7_r8) else - z0rl_wat(i) = 100.0_r8 * max(min(z0,0.1_r8), 1.e-7_r8) + z0rl_wat(i) = 100.0_r8 * max(min(z0,0.1_r8), 1.0e-7_r8) endif endif From daddd741a3b56a25f2ca004002dac0ad5c5c8629 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 30 Jun 2020 07:48:21 -0600 Subject: [PATCH 235/404] Cleanup/revert changes after merge of gsd/develop into master --- CODEOWNERS | 2 +- physics/GFS_rrtmg_pre.F90 | 2 +- physics/GFS_surface_generic.F90 | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index b6c597371..0d5230f89 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,7 +3,7 @@ # These owners will be the default owners for everything in the repo. #* @defunkt -* @DomHeinzeller +* @climbfuji @llpcarson @grantfirl @JulieSchramm # Order is important. The last matching pattern has the most precedence. # So if a pull request only touches javascript files, only these owners diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 381fa159f..d0826eb17 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -865,7 +865,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif elseif(Model%imp_physics == 6 .or. Model%imp_physics == 15) then - if (Model%kdt == 1 ) then + if (Model%kdt == 1) then Tbd%phy_f3d(:,:,Model%nleffr) = 10. Tbd%phy_f3d(:,:,Model%nieffr) = 50. Tbd%phy_f3d(:,:,Model%nseffr) = 250. diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index bdc546ce9..d7debf1cc 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -221,8 +221,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dt dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, & v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, & nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, evcwa, transa, sbsnoa, snowca, snohfa, ep, & - runoff, srunoff, runof, drain, lheatstrg, z0fac, e0fac, zorl, hflx, evap, hflxq, evapq, hffac, hefac, & - errmsg, errflg) + runoff, srunoff, runof, drain, lheatstrg, z0fac, e0fac, zorl, hflx, evap, hflxq, evapq, hffac, hefac, errmsg, errflg) implicit none From 3af3d7f9b1ae847662958ffbebba28e79ef23bf4 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 8 Jul 2020 00:49:55 +0000 Subject: [PATCH 236/404] fixing errors/logic with fractional grid option to reproduce a continuous run from a restart run - works for both NEMS mediator and CMEPS --- physics/GFS_surface_composites.F90 | 65 +++++++++++++++++++++-------- physics/GFS_surface_composites.meta | 24 +++++++++-- physics/GFS_surface_generic.F90 | 1 + physics/gcycle.F90 | 11 ++--- physics/sfc_sice.f | 55 ++++++++++++++---------- physics/sfc_sice.meta | 64 ++++++++++++++-------------- 6 files changed, 142 insertions(+), 78 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index cb0b24320..96dc88949 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -26,7 +26,7 @@ end subroutine GFS_surface_composites_pre_finalize !! subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cplwav2atm, & landfrac, lakefrac, oceanfrac, & - frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorl_wat, & + frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorli, zorl_wat, & zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & tprcp_lnd, tprcp_ice, uustar, uustar_lnd, uustar_ice, weasd, weasd_wat, & weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, tsfc_lnd, & @@ -47,7 +47,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl real(kind=kind_phys), dimension(im), intent( out) :: frland real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd - real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, tsfc, tsfco, tsfcl, tisfc, tsurf + real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, zorli, tsfc, tsfco, tsfcl, tisfc, tsurf real(kind=kind_phys), dimension(im), intent(inout) :: snowd_wat, snowd_lnd, snowd_ice, tprcp_wat, & tprcp_lnd, tprcp_ice, zorl_wat, zorl_lnd, zorl_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat, & tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, gflx_ice @@ -77,23 +77,31 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl if (flag_cice(i)) then if (cice(i) >= min_seaice) then icy(i) = .true. + if (cice(i) < one) wet(i) = .true. ! some open ocean/lake water exists else - cice(i) = zero - flag_cice(i) = .false. - islmsk(i) = 0 + cice(i) = zero + flag_cice(i) = .false. +! islmsk_cice(i) = 0 +! islmsk(i) = 0 + wet(i) = .true. ! some open ocean/lake water exists endif else if (cice(i) >= min_lakeice) then icy(i) = .true. + if (cice(i) < one) wet(i) = .true. ! some open ocean/lake water exists + islmsk(i) = 2 else cice(i) = zero - islmsk(i) = 0 +! islmsk(i) = 0 + wet(i) = .true. ! some open ocean/lake water exists endif endif - if (cice(i) < one ) then - wet(i) = .true. ! some open ocean/lake water exists - if ((.not. cplflx .or. oceanfrac(i) == zero) .and. icy(i)) & - tsfco(i) = max(tisfc(i), tgice) + if (wet(i) .and. .not. cplflx) then + if (oceanfrac(i) > zero) then + tsfco(i) = max(tsfco(i), tisfc(i), tgice) + elseif (icy(i)) then + tsfco(i) = max(tisfc(i), tgice) + endif endif else cice(i) = zero @@ -173,7 +181,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl if (icy(i)) then ! Ice uustar_ice(i) = uustar(i) weasd_ice(i) = weasd(i) - zorl_ice(i) = zorll(i) + zorl_ice(i) = zorli(i) tsfc_ice(i) = tisfc(i) tsurf_ice(i) = tisfc(i) snowd_ice(i) = snowd(i) @@ -296,7 +304,7 @@ end subroutine GFS_surface_composites_post_finalize #endif subroutine GFS_surface_composites_post_run ( & im, kice, km, cplflx, cplwav2atm, frac_grid, flag_cice, islmsk, dry, wet, icy, landfrac, lakefrac, oceanfrac, & - zorl, zorlo, zorll, zorl_wat, zorl_lnd, zorl_ice, & + zorl, zorlo, zorll, zorli, zorl_wat, zorl_lnd, zorl_ice, & cd, cd_wat, cd_lnd, cd_ice, cdq, cdq_wat, cdq_lnd, cdq_ice, rb, rb_wat, rb_lnd, rb_ice, stress, stress_wat, stress_lnd, & stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, & uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & @@ -319,7 +327,7 @@ subroutine GFS_surface_composites_post_run ( snowd_wat, snowd_lnd, snowd_ice,tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, & hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, tsfc_lnd, tsfc_ice - real(kind=kind_phys), dimension(im), intent(inout) :: zorl, zorlo, zorll, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & + real(kind=kind_phys), dimension(im), intent(inout) :: zorl, zorlo, zorll, zorli, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & fh2, tsurf, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc real(kind=kind_phys), dimension(im), intent(in ) :: tice ! interstitial sea ice temperature @@ -361,7 +369,7 @@ subroutine GFS_surface_composites_post_run ( uustar(i) = txl*uustar_lnd(i) + txi*uustar_ice(i) + txo*uustar_wat(i) fm10(i) = txl*fm10_lnd(i) + txi*fm10_ice(i) + txo*fm10_wat(i) fh2(i) = txl*fh2_lnd(i) + txi*fh2_ice(i) + txo*fh2_wat(i) - !tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_wat(i) + !tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_wat(i) !tsurf(i) = txl*tsurf_lnd(i) + txi*tsurf_ice(i) + txo*tsurf_wat(i) ! not used again! Moorthi cmm(i) = txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_wat(i) chh(i) = txl*chh_lnd(i) + txi*chh_ice(i) + txo*chh_wat(i) @@ -388,10 +396,30 @@ subroutine GFS_surface_composites_post_run ( tsfc(i) = txl*tsfc_lnd(i) + txi*tice(i) + txo*tsfc_wat(i) zorll(i) = zorl_lnd(i) + zorli(i) = zorl_ice(i) zorlo(i) = zorl_wat(i) - if (dry(i)) tsfcl(i) = tsfc_lnd(i) ! over land - if (wet(i)) tsfco(i) = tsfc_wat(i) ! over lake or ocean when uncoupled + if (dry(i)) then + tsfcl(i) = tsfc_lnd(i) ! over land + elseif (wet(i)) then + tsfcl(i) = tsfc_wat(i) ! over water + else + tsfcl(i) = tice(i) ! over ice + endif + if (wet(i)) then + tsfco(i) = tsfc_wat(i) ! over lake or ocean when uncoupled + elseif (icy(i)) then + tsfco(i) = tice(i) ! over lake or ocean ice when uncoupled + else + tsfco(i) = tsfc_lnd(i) ! over land + endif + if (icy(i)) then + tisfc(i) = tice(i) ! over lake or ocean ice when uncoupled + elseif (wet(i)) then + tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled + else + tisfc(i) = tsfc_lnd(i) ! over land + endif ! for coupled model ocean will replace this ! if (icy(i)) tisfc(i) = tsfc_ice(i) ! over ice when uncoupled ! if (icy(i)) tisfc(i) = tice(i) ! over ice when uncoupled @@ -402,9 +430,9 @@ subroutine GFS_surface_composites_post_run ( ! endif if (.not. flag_cice(i)) then - if (islmsk(i) == 2) then ! return updated lake ice thickness & concentration to global array + if (islmsk(i) == 2) then ! return updated lake ice thickness & concentration to global array tisfc(i) = tice(i) - else ! this would be over open ocean or land (no ice fraction) + else ! this would be over open ocean or land (no ice fraction) hice(i) = zero cice(i) = zero tisfc(i) = tsfc(i) @@ -530,6 +558,7 @@ subroutine GFS_surface_composites_post_run ( zorll(i) = zorl_lnd(i) zorlo(i) = zorl_wat(i) + zorli(i) = zorl_ice(i) enddo diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index f58eddc2f..0f9c065f3 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -162,6 +162,15 @@ kind = kind_phys intent = inout optional = F +[zorli] + standard_name = surface_roughness_length_over_ice + long_name = surface roughness length over ice + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [zorl_wat] standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) @@ -506,7 +515,7 @@ [min_lakeice] standard_name = lake_ice_minimum long_name = minimum lake ice value - units = ??? + units = frac dimensions = () type = real kind = kind_phys @@ -515,7 +524,7 @@ [min_seaice] standard_name = sea_ice_minimum long_name = minimum sea ice value - units = ??? + units = frac dimensions = () type = real kind = kind_phys @@ -829,6 +838,15 @@ kind = kind_phys intent = inout optional = F +[zorli] + standard_name = surface_roughness_length_over_ice + long_name = surface roughness length over ice + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [zorl_wat] standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) @@ -1669,7 +1687,7 @@ [min_seaice] standard_name = sea_ice_minimum long_name = minimum sea ice value - units = ??? + units = frac dimensions = () type = real kind = kind_phys diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index b05a84173..c7032866d 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -141,6 +141,7 @@ subroutine GFS_surface_generic_pre_run (im, levs, vfrac, islmsk, isot, ivegsrc, do i=1,im sigmaf(i) = max(vfrac(i), 0.01_kind_phys) + islmsk_cice(i) = islmsk(i) if (islmsk(i) == 2) then if (isot == 1) then soiltyp(i) = 16 diff --git a/physics/gcycle.F90 b/physics/gcycle.F90 index bffcbefa5..f92ee8821 100644 --- a/physics/gcycle.F90 +++ b/physics/gcycle.F90 @@ -67,7 +67,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) character(len=6) :: tile_num_ch real(kind=kind_phys), parameter :: pifac=180.0/pi real(kind=kind_phys) :: sig1t, dt_warm - integer :: npts, len, nb, ix, jx, ls, ios + integer :: npts, len, nb, ix, jx, ls, ios, ll logical :: exists ! !@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -244,10 +244,11 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) Sfcprop(nb)%alnsf (ix) = ALBFC1 (len + npts*2) Sfcprop(nb)%alnwf (ix) = ALBFC1 (len + npts*3) do ls = 1,Model%lsoil - Sfcprop(nb)%smc (ix,ls) = SMCFC1 (len + (ls-1)*npts) - Sfcprop(nb)%stc (ix,ls) = STCFC1 (len + (ls-1)*npts) - Sfcprop(nb)%slc (ix,ls) = SLCFC1 (len + (ls-1)*npts) - if (ls<=Model%kice) Sfcprop(nb)%tiice (ix,ls) = STCFC1 (len + (ls-1)*npts) + ll = len + (ls-1)*npts + Sfcprop(nb)%smc (ix,ls) = SMCFC1 (ll) + Sfcprop(nb)%stc (ix,ls) = STCFC1 (ll) + Sfcprop(nb)%slc (ix,ls) = SLCFC1 (ll) + if (ls<=Model%kice) Sfcprop(nb)%tiice (ix,ls) = STCFC1 (ll) enddo ENDDO !-----END BLOCK SIZE LOOP------------------------------ ENDDO !-----END BLOCK LOOP------------------------------- diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index 7e55f7244..ab67f849e 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -43,11 +43,12 @@ subroutine sfc_sice_run & & ( im, kice, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav, & ! --- inputs: & t0c, rd, ps, t1, q1, delt, & & sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, & - & cm, ch, prsl1, prslki, prsik1, prslk1, islimsk, wind, & - & flag_iter, lprnt, ipr, cimin, & + & cm, ch, prsl1, prslki, prsik1, prslk1, wind, & + & flag_iter, lprnt, ipr, & & hice, fice, tice, weasd, tskin, tprcp, tiice, ep, & ! --- input/outputs: & snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx, & ! - & cplflx, cplchm, flag_cice, islmsk_cice, & + & frac_grid, icy, islmsk_cice, & + & min_lakeice, min_seaice, oceanfrac, & & errmsg, errflg & ) @@ -60,10 +61,10 @@ subroutine sfc_sice_run & ! inputs: ! ! ( im, kice, ps, t1, q1, delt, ! ! sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, ! -! cm, ch, prsl1, prslki, prsik1, prslk1, islimsk, wind, ! +! cm, ch, prsl1, prslki, prsik1, prslk1, wind, ! ! flag_iter, ! ! input/outputs: ! -! hice, fice, tice, weasd, tskin, tprcp, tiice, ep, ! +! hice, fice, tice, weasd, tskin, tprcp, tiice, ep, ! ! outputs: ! ! snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx ) ! ! ! @@ -151,21 +152,21 @@ subroutine sfc_sice_run & ! --- inputs: integer, intent(in) :: im, kice, ipr logical, intent(in) :: lprnt - logical, intent(in) :: cplflx - logical, intent(in) :: cplchm + logical, intent(in) :: frac_grid real (kind=kind_phys), intent(in) :: sbc, hvap, tgice, cp, eps, & & epsm1, grav, rvrdm1, t0c, rd real (kind=kind_phys), dimension(im), intent(in) :: ps, & & t1, q1, sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, cm, ch, & - & prsl1, prslki, prsik1, prslk1, wind + & prsl1, prslki, prsik1, prslk1, wind, oceanfrac - integer, dimension(im), intent(in) :: islimsk +! integer, dimension(im), intent(in) :: islimsk integer, dimension(im), intent(in) :: islmsk_cice - real (kind=kind_phys), intent(in) :: delt, cimin + real (kind=kind_phys), intent(in) :: delt, min_seaice, & + & min_lakeice - logical, dimension(im), intent(in) :: flag_iter, flag_cice + logical, dimension(im), intent(in) :: flag_iter, icy ! --- input/outputs: real (kind=kind_phys), dimension(im), intent(inout) :: hice, & @@ -189,7 +190,7 @@ subroutine sfc_sice_run & real (kind=kind_phys) :: t12, t14, tem, stsice(im,kice) &, hflxi, hflxw, q0, qs1, qssi, qssw - real (kind=kind_phys) :: cpinv, hvapi, elocp, snetw + real (kind=kind_phys) :: cpinv, hvapi, elocp, snetw, cimin integer :: i, k integer, dimension(im) :: islmsk_local @@ -207,15 +208,22 @@ subroutine sfc_sice_run & errflg = 0 - if (cplflx) then - where (flag_cice) - islmsk_local = islmsk_cice - elsewhere - islmsk_local = islimsk - endwhere - else - islmsk_local = islimsk - end if + islmsk_local = islmsk_cice + if (frac_grid) then + do i=1,im + if (icy(i) .and. islmsk_local(i) < 2) then + if (oceanfrac(i) > zero) then + tem = min_seaice + else + tem = min_lakeice + endif + if (fice(i) > tem) then + islmsk_local(i) = 2 + tice(i) =min( tice(i), tgice) + endif + endif + enddo + endif ! !> - Set flag for sea-ice. @@ -255,6 +263,11 @@ subroutine sfc_sice_run & do i = 1, im if (flag(i)) then + if (oceanfrac(i) > zero) then + cimin = min_seaice + else + cimin = min_lakeice + endif ! psurf(i) = 1000.0 * ps(i) ! ps1(i) = 1000.0 * prsl1(i) diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index dc08e0170..a05f2e4d6 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -242,14 +242,6 @@ kind = kind_phys intent = in optional = F -[islimsk] - standard_name = sea_land_ice_mask - long_name = sea/land/ice mask (=0/1/2) - units = flag - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F [wind] standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level @@ -283,15 +275,6 @@ type = integer intent = in optional = F -[cimin] - standard_name = lake_ice_minimum - long_name = minimum lake ice value - units = ??? - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F [hice] standard_name = sea_ice_thickness long_name = sea-ice thickness @@ -436,25 +419,17 @@ kind = kind_phys intent = inout optional = F -[cplflx] - standard_name = flag_for_flux_coupling - long_name = flag controlling cplflx collection (default off) +[frac_grid] + standard_name = flag_for_fractional_grid + long_name = flag for fractional grid units = flag dimensions = () type = logical intent = in optional = F -[cplchm] - standard_name = flag_for_chemistry_coupling - long_name = flag controlling cplchm collection (default off) - units = flag - dimensions = () - type = logical - intent = in - optional = F -[flag_cice] - standard_name = flag_for_cice - long_name = flag for cice +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction units = flag dimensions = (horizontal_dimension) type = logical @@ -468,6 +443,33 @@ type = integer intent = in optional = F +[min_lakeice] + standard_name = lake_ice_minimum + long_name = minimum lake ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[min_seaice] + standard_name = sea_ice_minimum + long_name = minimum sea ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[oceanfrac] + standard_name = sea_area_fraction + long_name = fraction of horizontal grid area occupied by ocean + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From fe89d6721d6bf75693198032183fdf65afe3baf8 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 9 Jul 2020 11:56:46 -0600 Subject: [PATCH 237/404] Correct units for latitude, longitude, and pi --- physics/GFS_MP_generic.meta | 4 ++-- physics/GFS_rrtmg_setup.meta | 2 +- physics/GFS_rrtmgp_setup.meta | 2 +- physics/GFS_suite_interstitial.meta | 6 +++--- physics/cires_ugwp.meta | 10 +++++----- physics/dcyc2.meta | 4 ++-- physics/drag_suite.meta | 2 +- physics/gcm_shoc.meta | 2 +- physics/gwdc.meta | 2 +- physics/m_micro.meta | 4 ++-- physics/module_SGSCloud_RadPre.meta | 4 ++-- physics/rrtmgp_lw_aerosol_optics.meta | 6 +++--- physics/rrtmgp_lw_cloud_optics.meta | 4 ++-- physics/rrtmgp_lw_pre.meta | 4 ++-- physics/rrtmgp_sw_aerosol_optics.meta | 4 ++-- physics/sfc_drv_ruc.meta | 2 +- physics/sfc_noahmp_drv.meta | 2 +- physics/sfc_nst.meta | 6 +++--- 18 files changed, 35 insertions(+), 35 deletions(-) diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index c4eacb758..727f735ee 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -356,7 +356,7 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -365,7 +365,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index ad98575ca..3ca93ffd4 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -312,7 +312,7 @@ [slag] standard_name = equation_of_time long_name = equation of time (radian) - units = radians + units = radian dimensions = () type = real kind = kind_phys diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index e40ad865a..9165117c5 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -269,7 +269,7 @@ [slag] standard_name = equation_of_time long_name = equation of time (radian) - units = radians + units = radian dimensions = () type = real kind = kind_phys diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 127de9c6e..d2c3f7247 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1212,7 +1212,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -1221,7 +1221,7 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -1711,7 +1711,7 @@ [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radians + units = none dimensions = () type = real kind = kind_phys diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 5d5e0dd1a..bee052286 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -397,8 +397,8 @@ optional = F [xlat] standard_name = latitude - long_name = grid latitude in radians - units = radians + long_name = grid latitude + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -406,8 +406,8 @@ optional = F [xlat_d] standard_name = latitude_degree - long_name = latitude in degrees - units = degree + long_name = latitude in degrees north + units = degrees_north dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -757,7 +757,7 @@ [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radians + units = none dimensions = () type = real kind = kind_phys diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 69f787ea0..e946e3c90 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -23,7 +23,7 @@ [slag] standard_name = equation_of_time long_name = equation of time - units = radians + units = radian dimensions = () type = real kind = kind_phys @@ -68,7 +68,7 @@ [xlon] standard_name = longitude long_name = longitude of grid box - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index 5e2565e22..cc97f521f 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -509,7 +509,7 @@ [pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radians + units = none dimensions = () type = real kind = kind_phys diff --git a/physics/gcm_shoc.meta b/physics/gcm_shoc.meta index 5bd59c589..c1ed6fbd4 100644 --- a/physics/gcm_shoc.meta +++ b/physics/gcm_shoc.meta @@ -92,7 +92,7 @@ [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radians + units = none dimensions = () type = real kind = kind_phys diff --git a/physics/gwdc.meta b/physics/gwdc.meta index fc57604fb..b9f0b669c 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -354,7 +354,7 @@ [pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radians + units = none dimensions = () type = real kind = kind_phys diff --git a/physics/m_micro.meta b/physics/m_micro.meta index b0b0c3522..00b0b39f3 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -853,7 +853,7 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -862,7 +862,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 8a742a041..2658e8638 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -267,8 +267,8 @@ optional = F [xlat] standard_name = latitude - long_name = grid latitude in radians - units = radians + long_name = grid latitude + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta index 305151270..c71a2a97e 100644 --- a/physics/rrtmgp_lw_aerosol_optics.meta +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -116,7 +116,7 @@ [lon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -125,7 +125,7 @@ [lat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -180,4 +180,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index cebbfc700..9de19382a 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -229,7 +229,7 @@ [lon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -238,7 +238,7 @@ [lat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 5d1c518b6..f49563a49 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -20,7 +20,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -29,7 +29,7 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta index 1aaabf4f1..bd02434b6 100644 --- a/physics/rrtmgp_sw_aerosol_optics.meta +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -132,7 +132,7 @@ [lon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -141,7 +141,7 @@ [lat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index aa0ad3d0c..088a9e81b 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -234,7 +234,7 @@ [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radians + units = none dimensions = () type = real kind = kind_phys diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index 1fdee7a4a..4e1c5b334 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -424,7 +424,7 @@ [xlatin] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index ff3566ac0..4198af0eb 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -112,7 +112,7 @@ [pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radians + units = none dimensions = () type = real kind = kind_phys @@ -237,7 +237,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -932,7 +932,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys From 19f9df2b141aad14386e6ab23c418fc834c73c42 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 9 Jul 2020 14:00:04 -0600 Subject: [PATCH 238/404] physics/GFS_suite_interstitial.meta: correct standard name air_temperature_save_from_cumulus_paramterization to air_temperature_save_from_convective_parameterization --- physics/GFS_suite_interstitial.meta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index d2c3f7247..37c474335 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1467,7 +1467,7 @@ intent = inout optional = F [save_tcp] - standard_name = air_temperature_save_from_cumulus_paramterization + standard_name = air_temperature_save_from_convective_parameterization long_name = air temperature after cumulus parameterization units = K dimensions = (horizontal_dimension,vertical_dimension) @@ -1745,7 +1745,7 @@ intent = in optional = F [save_tcp] - standard_name = air_temperature_save_from_cumulus_paramterization + standard_name = air_temperature_save_from_convective_parameterization long_name = air temperature after cumulus parameterization units = K dimensions = (horizontal_dimension,vertical_dimension) From a3302db09243bb45288c9061aee8db0a19ef02f0 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 9 Jul 2020 14:00:27 -0600 Subject: [PATCH 239/404] physics/module_MYNNPBL_wrapper.{F90,meta}: make cycling a local variable, hard-coded to .false. --- physics/module_MYNNPBL_wrapper.F90 | 6 ++++-- physics/module_MYNNPBL_wrapper.meta | 8 -------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 06385b0b1..8fd727148 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -38,7 +38,7 @@ end subroutine mynnedmf_wrapper_finalize !! SUBROUTINE mynnedmf_wrapper_run( & & im,levs, & - & flag_init,flag_restart,cycling, & + & flag_init,flag_restart, & & lssav, ldiag3d, qdiag3d, & & lsidea, cplflx, & & delt,dtf,dx,zorl, & @@ -190,7 +190,7 @@ SUBROUTINE mynnedmf_wrapper_run( & ! NAMELIST OPTIONS (INPUT): LOGICAL, INTENT(IN) :: bl_mynn_tkeadvect, ltaerosol, & - lprnt, do_mynnsfclay, cycling + lprnt, do_mynnsfclay INTEGER, INTENT(IN) :: & & bl_mynn_cloudpdf, & & bl_mynn_mixlength, & @@ -215,6 +215,8 @@ SUBROUTINE mynnedmf_wrapper_run( & LOGICAL :: & & FLAG_QI, FLAG_QNI, FLAG_QC, FLAG_QNC, & & FLAG_QNWFA, FLAG_QNIFA + ! Define locally until needed from CCPP + LOGICAL, PARAMETER :: cycling = .false. INTEGER, PARAMETER :: param_first_scalar = 1 INTEGER :: & & p_qc, p_qr, p_qi, p_qs, p_qg, p_qnc, p_qni diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 9833f7eba..59dbf1b79 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -63,14 +63,6 @@ type = logical intent = in optional = F -[cycling] - standard_name = flag_for_cycling - long_name = flag for cycling or coldstart - units = flag - dimensions = () - type = logical - intent = in - optional = F [lssav] standard_name = flag_diagnostics long_name = logical flag for storing diagnostics From 1c64f9f7a9e8536bfc235b75c36449edaa396261 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Fri, 10 Jul 2020 20:11:44 +0000 Subject: [PATCH 240/404] This EMC flake physics --- physics/GFS_surface_composites.F90 | 13 +- physics/GFS_surface_composites.meta | 9 + physics/GFS_time_vary_pre.fv3.F90 | 5 +- physics/flake.F90 | 3281 +++++++++++++++++++++++++++ physics/flake_driver.F90 | 394 ++++ physics/flake_driver.meta | 346 +++ physics/sfc_ocean.F | 6 +- physics/sfc_ocean.meta | 8 + 8 files changed, 4056 insertions(+), 6 deletions(-) create mode 100644 physics/flake.F90 create mode 100644 physics/flake_driver.F90 create mode 100644 physics/flake_driver.meta diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index d5bc98322..3734513d7 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -25,7 +25,7 @@ end subroutine GFS_surface_composites_pre_finalize !! \htmlinclude GFS_surface_composites_pre_run.html !! subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cplwav2atm, & - landfrac, lakefrac, oceanfrac, & + landfrac, lakefrac, lakedepth, oceanfrac, & frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorl_wat, & zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & @@ -43,7 +43,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl logical, dimension(im), intent(in ) :: flag_cice logical, dimension(im), intent(inout) :: dry, icy, lake, ocean, wet real(kind=kind_phys), intent(in ) :: cimin - real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, oceanfrac + real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac real(kind=kind_phys), dimension(im), intent(inout) :: cice real(kind=kind_phys), dimension(im), intent( out) :: frland real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd, qss, hflx @@ -182,6 +182,15 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl endif enddo +! to prepare to separate lake from ocean in later + do i = 1, im + if(lakefrac(i) .ge. 0.15 .and. lakedepth(i) .gt. 1.0) then + lake(i) = .true. + else + lake(i) = .false. + endif + enddo + ! Assign sea ice temperature to interstitial variable do i = 1, im tice(i) = tisfc(i) diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index ff0ca9774..c24c112e2 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -59,6 +59,15 @@ kind = kind_phys intent = in optional = F +[lakedepth] + standard_name = lake_depth + long_name = lake depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [oceanfrac] standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean diff --git a/physics/GFS_time_vary_pre.fv3.F90 b/physics/GFS_time_vary_pre.fv3.F90 index 98a0f6697..b2674166c 100644 --- a/physics/GFS_time_vary_pre.fv3.F90 +++ b/physics/GFS_time_vary_pre.fv3.F90 @@ -121,7 +121,8 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & fhour = (sec + dtp)/con_hr kdt = nint((sec + dtp)/dtp) - if(lsm == lsm_noahmp) then +! if(lsm == lsm_noahmp) then +! flake need this too !GJF* These calculations were originally in GFS_physics_driver.F90 for ! NoahMP. They were moved to this routine since they only depend ! on time (not space). Note that this code is included as-is from @@ -157,7 +158,7 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & endif endif endif - endif +! endif ipt = 1 lprnt = .false. diff --git a/physics/flake.F90 b/physics/flake.F90 new file mode 100644 index 000000000..2c2e7218c --- /dev/null +++ b/physics/flake.F90 @@ -0,0 +1,3281 @@ + +!======================================================================= +! Current Code Owner: DWD, Ulrich Schaettler +! phone: +49 69 8062 2739 +! fax: +49 69 8236 1493 +! email: uschaettler@dwd.d400.de +! +! History: +! Version Date Name +! ---------- ---------- ---- +! 1.1 1998/03/11 Ulrich Schaettler +! Initial release +! 1.8 1998/08/03 Ulrich Schaettler +! Eliminated intgribf, intgribc, irealgrib, iwlength and put it to data_io. +! 1.10 1998/09/29 Ulrich Schaettler +! Eliminated parameters for grid point and diagnostic calculations. +! !VERSION! !DATE! +! +! +! Code Description: +! Language: Fortran 90. +! Software Standards: "European Standards for Writing and +! Documenting Exchangeable Fortran 90 Code". +! +! reorganize the FLake to module_FLake.F90 by Shaobo Zhang in 2016-7-13 +! added a new layer for deep lakes by Shaobo Zhang in 2016-11-15 +! +!======================================================================= + +!------------------------------------------------------------------------------ + +MODULE data_parameters + +!------------------------------------------------------------------------------ +! +! Description: +! Global parameters for the program are defined. +! + +IMPLICIT NONE + +!======================================================================= +! Global (i.e. public) Declarations: +! Parameters for the Program: + + INTEGER, PARAMETER :: & + ireals = SELECTED_REAL_KIND (12,200), & + ! number of desired significant digits for + ! real variables + ! corresponds to 8 byte real variables + + iintegers = KIND (1) + ! kind-type parameter of the integer values + ! corresponds to the default integers + +!======================================================================= + +END MODULE data_parameters + +!------------------------------------------------------------------------------ + +MODULE flake_albedo_ref + +!------------------------------------------------------------------------------ +! +! Description: +! +! This module contains "reference" values of albedo +! for the lake water, lake ice and snow. +! As in "flake_paramoptic_ref", two ice categories, viz. white ice and blue ice, +! and two snow categories, viz. dry snow and melting snow, are used. +! + +USE data_parameters, ONLY : & + ireals , & ! KIND-type parameter for real variables + iintegers ! KIND-type parameter for "normal" integer variables + +use machine, only: kind_phys +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Albedo for water, ice and snow. +!REAL (KIND = ireals), PARAMETER :: & +! albedo_water_ref = 0.070 , & ! Water +! albedo_whiteice_ref = 0.600 , & ! White ice +! albedo_blueice_ref = 0.100 , & ! Blue ice +! albedo_drysnow_ref = 0.600 , & ! Dry snow +! albedo_meltingsnow_ref = 0.100 ! Melting snow + +! Empirical parameters. +!REAL (KIND = ireals), PARAMETER :: & +! c_albice_MR = 95.60 ! Constant in the interpolation formula for + ! the ice albedo (Mironov and Ritter 2004) +! Albedo for water, ice and snow. +REAL (KIND = kind_phys), PARAMETER :: & + albedo_water_ref = 0.07 , & ! Water + albedo_whiteice_ref = 0.60 , & ! White ice + albedo_blueice_ref = 0.10 , & ! Blue ice + albedo_drysnow_ref = 0.60 , & ! Dry snow + albedo_meltingsnow_ref = 0.10 ! Melting snow + +! Empirical parameters. +REAL (KIND = kind_phys), PARAMETER :: & + c_albice_MR = 95.6 ! Constant in the interpolation formula for + ! the ice albedo (Mironov and Ritter 2004) + + +!============================================================================== + +END MODULE flake_albedo_ref + +!------------------------------------------------------------------------------ + +MODULE flake_configure + +!------------------------------------------------------------------------------ +! +! Description: +! +! Switches and reference values of parameters +! that configure the lake model FLake are set. +! + +USE data_parameters , ONLY : & + ireals , & ! KIND-type parameter for real variables + iintegers ! KIND-type parameter for "normal" integer variables + +use machine, only: kind_phys +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations +! changed by Shaobo Zhang +LOGICAL lflk_botsed_use +!LOGICAL, PARAMETER :: & +! lflk_botsed_use = .TRUE. ! .TRUE. indicates that the bottom-sediment scheme is used + ! to compute the depth penetrated by the thermal wave, + ! the temperature at this depth and the bottom heat flux. + ! Otherwise, the heat flux at the water-bottom sediment interface + ! is set to zero, the depth penetrated by the thermal wave + ! is set to a reference value defined below, + ! and the temperature at this depth is set to + ! the temperature of maximum density of the fresh water. + +!REAL (KIND = ireals), PARAMETER :: & +! rflk_depth_bs_ref = 10.00 ! Reference value of the depth of the thermally active + ! layer of bottom sediments [m]. + ! This value is used to (formally) define + ! the depth penetrated by the thermal wave + ! in case the bottom-sediment scheme is not used. + +REAL (KIND = kind_phys), PARAMETER :: & + rflk_depth_bs_ref = 10.0 + +!============================================================================== + +END MODULE flake_configure + +!------------------------------------------------------------------------------ + +MODULE flake_derivedtypes + +!------------------------------------------------------------------------------ +! +! Description: +! +! Derived type(s) is(are) defined. +! + +USE data_parameters , ONLY : & + ireals , & ! KIND-type parameter for real variables + iintegers ! KIND-type parameter for "normal" integer variables + +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Maximum value of the wave-length bands +! in the exponential decay law for the radiation flux. +! A storage for a ten-band approximation is allocated, +! although a smaller number of bands is actually used. +INTEGER (KIND = iintegers), PARAMETER :: & + nband_optic_max = 10_iintegers + +! Define TYPE "opticpar_medium" +TYPE opticpar_medium + INTEGER (KIND = iintegers) :: & + nband_optic ! Number of wave-length bands + REAL (KIND = ireals), DIMENSION (nband_optic_max) :: & + frac_optic , & ! Fractions of total radiation flux + extincoef_optic ! Extinction coefficients +END TYPE opticpar_medium + +!============================================================================== + +END MODULE flake_derivedtypes + +!------------------------------------------------------------------------------ + +MODULE flake_paramoptic_ref + +!------------------------------------------------------------------------------ +! +! Description: +! +! This module contains "reference" values of the optical characteristics +! of the lake water, lake ice and snow. These reference values may be used +! if no information about the optical characteristics of the lake in question +! is available. An exponential decay law for the solar radiation flux is assumed. +! In the simplest one-band approximation, +! the extinction coefficient for water is set to a large value, +! leading to the absorption of 95% of the incoming radiation +! within the uppermost 1 m of the lake water. +! The extinction coefficients for ice and snow are taken from +! Launiainen and Cheng (1998). The estimates for the ice correspond +! to the uppermost 0.1 m of the ice layer and to the clear sky conditions +! (see Table 2 in op. cit.). +! Very large values of the extinction coefficients for ice and snow ("opaque") +! can be used to prevent penetration of the solar radiation +! through the snow-ice cover. +! + +USE data_parameters, ONLY : & + ireals , & ! KIND-type parameter for real variables + iintegers ! KIND-type parameter for "normal" integer variables + +USE flake_derivedtypes, ONLY : & + nband_optic_max , & ! Maximum value of the wave-length bands + opticpar_medium ! Derived TYPE + +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +INTEGER (KIND = iintegers), PRIVATE :: & ! Help variable(s) + i ! DO loop index + +! Optical characteristics for water, ice and snow. +! The simplest one-band approximation is used as a reference. +!TYPE (opticpar_medium), PARAMETER :: & +! opticpar_water_ref = opticpar_medium(1, & ! Water (reference) +! (/1.0, (0.0,i=2,nband_optic_max)/), & +! (/3.0, (1.E+100,i=2,nband_optic_max)/)) , & +! opticpar_water_trans = opticpar_medium(2, & ! Transparent Water (two-band) +! (/0.100, 0.900, (0.0,i=3,nband_optic_max)/), & +! (/2.00, 0.200, (1.E+100,i=3,nband_optic_max)/)) , & +!!_nu opticpar_water_trans = opticpar_medium(1, & ! Transparent Water (one-band) +!!_nu (/1.0, (0.0,i=2,nband_optic_max)/), & +!!_nu (/0.300, (1.E+100,i=2,nband_optic_max)/)) , & +! opticpar_whiteice_ref = opticpar_medium(1, & ! White ice +! (/1.0, (0.0,i=2,nband_optic_max)/), & +! (/17.10, (1.E+100,i=2,nband_optic_max)/)) , & +! opticpar_blueice_ref = opticpar_medium(1, & ! Blue ice +! (/1.0, (0.0,i=2,nband_optic_max)/), & +! (/8.40, (1.E+100,i=2,nband_optic_max)/)) , & +! opticpar_drysnow_ref = opticpar_medium(1, & ! Dry snow +! (/1.0, (0.0,i=2,nband_optic_max)/), & +! (/25.00, (1.E+100,i=2,nband_optic_max)/)) , & +! opticpar_meltingsnow_ref = opticpar_medium(1, & ! Melting snow +! (/1.0, (0.0,i=2,nband_optic_max)/), & +! (/15.00, (1.E+100,i=2,nband_optic_max)/)) , & +! opticpar_ice_opaque = opticpar_medium(1, & ! Opaque ice +! (/1.0, (0.0,i=2,nband_optic_max)/), & +! (/1.0E+070, (1.E+100,i=2,nband_optic_max)/)) , & +! opticpar_snow_opaque = opticpar_medium(1, & ! Opaque snow +! (/1.0, (0.0,i=2,nband_optic_max)/), & +! (/1.0E+070, (1.E+100,i=2,nband_optic_max)/)) + +TYPE (opticpar_medium), PARAMETER :: & + opticpar_water_ref = opticpar_medium(1, & ! Water (reference) + (/1., (0.,i=2,nband_optic_max)/), & + (/3., (1.E+10,i=2,nband_optic_max)/)) , & + opticpar_water_trans = opticpar_medium(2, & ! Transparent Water (two-band) + (/0.10, 0.90, (0.,i=3,nband_optic_max)/), & + (/2.0, 0.20, (1.E+10,i=3,nband_optic_max)/)) , & + opticpar_whiteice_ref = opticpar_medium(1, & ! White ice + (/1., (0.,i=2,nband_optic_max)/), & + (/17.1, (1.E+10,i=2,nband_optic_max)/)) , & + opticpar_blueice_ref = opticpar_medium(1, & ! Blue ice + (/1., (0.,i=2,nband_optic_max)/), & + (/8.4, (1.E+10,i=2,nband_optic_max)/)) , & + opticpar_drysnow_ref = opticpar_medium(1, & ! Dry snow + (/1., (0.,i=2,nband_optic_max)/), & + (/25.0, (1.E+10,i=2,nband_optic_max)/)) , & + opticpar_meltingsnow_ref = opticpar_medium(1, & ! Melting snow + (/1., (0.,i=2,nband_optic_max)/), & + (/15.0, (1.E+10,i=2,nband_optic_max)/)) , & + opticpar_ice_opaque = opticpar_medium(1, & ! Opaque ice + (/1., (0.,i=2,nband_optic_max)/), & + (/1.0E+07, (1.E+10,i=2,nband_optic_max)/)) , & + opticpar_snow_opaque = opticpar_medium(1, & ! Opaque snow + (/1., (0.,i=2,nband_optic_max)/), & + (/1.0E+07, (1.E+10,i=2,nband_optic_max)/)) + + +!============================================================================== + +END MODULE flake_paramoptic_ref + +!------------------------------------------------------------------------------ + +MODULE flake_parameters + +!------------------------------------------------------------------------------ +! +! Description: +! +! Values of empirical constants of the lake model FLake +! and of several thermodynamic parameters are set. +! + +USE data_parameters , ONLY : & + ireals , & ! KIND-type parameter for real variables + iintegers ! KIND-type parameter for "normal" integer variables + +use machine, only: kind_phys + +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Dimensionless constants +! in the equations for the mixed-layer depth +! and for the shape factor with respect to the temperature profile in the thermocline +REAL (KIND = kind_phys), PARAMETER :: & +! c_cbl_1 = 0.170 , & ! Constant in the CBL entrainment equation +! c_cbl_2 = 1.0 , & ! Constant in the CBL entrainment equation +! c_sbl_ZM_n = 0.50 , & ! Constant in the ZM1996 equation for the equilibrium SBL depth +! c_sbl_ZM_s = 10.0 , & ! Constant in the ZM1996 equation for the equilibrium SBL depth +! c_sbl_ZM_i = 20.0 , & ! Constant in the ZM1996 equation for the equilibrium SBL depth +! c_relax_h = 0.0300 , & ! Constant in the relaxation equation for the SBL depth +! c_relax_C = 0.00300 ! Constant in the relaxation equation for the shape factor + ! with respect to the temperature profile in the thermocline + c_cbl_1 = 0.17 , & ! Constant in the CBL entrainment equation + c_cbl_2 = 1. , & ! Constant in the CBL entrainment equation + c_sbl_ZM_n = 0.5 , & ! Constant in the ZM1996 equation for the equilibrium SBL depth + c_sbl_ZM_s = 10. , & ! Constant in the ZM1996 equation for the equilibrium SBL depth + c_sbl_ZM_i = 20. , & ! Constant in the ZM1996 equation for the equilibrium SBL depth + c_relax_h = 0.030 , & ! Constant in the relaxation equation for the SBL depth + c_relax_C = 0.0030 + +! Parameters of the shape functions +! Indices refer to T - thermocline, S - snow, I - ice, +! B1 - upper layer of the bottom sediments, B2 - lower layer of the bottom sediments. +! "pr0" and "pr1" denote zeta derivatives of the corresponding shape function +! at "zeta=0" ad "zeta=1", respectively. +REAL (KIND = kind_phys), PARAMETER :: & + C_T_min = 0.5 , & ! Minimum value of the shape factor C_T (thermocline) + C_T_max = 0.8 , & ! Maximum value of the shape factor C_T (thermocline) + Phi_T_pr0_1 = 40.0/3.0 , & ! Constant in the expression for the T shape-function derivative + Phi_T_pr0_2 = 20.0/3.0 , & ! Constant in the expression for the T shape-function derivative + C_TT_1 = 11.0/18.0 , & ! Constant in the expression for C_TT (thermocline) + C_TT_2 = 7.0/45.0 , & ! Constant in the expression for C_TT (thermocline) + C_B1 = 2.0/3.0 , & ! Shape factor (upper layer of bottom sediments) + C_B2 = 3.0/5.0 , & ! Shape factor (lower layer of bottom sediments) + Phi_B1_pr0 = 2.0 , & ! B1 shape-function derivative + C_S_lin = 0.5 , & ! Shape factor (linear temperature profile in the snow layer) + Phi_S_pr0_lin = 1.0 , & ! S shape-function derivative (linear profile) + C_I_lin = 0.5 , & ! Shape factor (linear temperature profile in the ice layer) + Phi_I_pr0_lin = 1.0 , & ! I shape-function derivative (linear profile) + Phi_I_pr1_lin = 1.0 , & ! I shape-function derivative (linear profile) + Phi_I_ast_MR = 2.0 , & ! Constant in the MR2004 expression for I shape factor + C_I_MR = 1.0/12.0 , & ! Constant in the MR2004 expression for I shape factor + H_Ice_max = 3.0 ! Maximum ice tickness in + ! the Mironov and Ritter (2004, MR2004) ice model [m] + +! Security constants +REAL (KIND = kind_phys), PARAMETER :: & + h_Snow_min_flk = 1.0E-5 , & ! Minimum snow thickness [m] + h_Ice_min_flk = 1.0E-9 , & ! Minimum ice thickness [m] + h_ML_min_flk = 1.0E-2 , & ! Minimum mixed-layer depth [m] + h_ML_max_flk = 1.0E+3 , & ! Maximum mixed-layer depth [m] + H_B1_min_flk = 1.0E-3 , & ! Minimum thickness of the upper layer of bottom sediments [m] + u_star_min_flk = 1.0E-6 ! Minimum value of the surface friction velocity [m s^{-1}] + +! Security constant(s) +REAL (KIND = kind_phys), PARAMETER :: & + c_small_flk = 1.0E-10 ! A small number + +! Thermodynamic parameters +REAL (KIND = kind_phys), PARAMETER :: & + tpl_grav = 9.81 , & ! Acceleration due to gravity [m s^{-2}] + tpl_T_r = 277.13 , & ! Temperature of maximum density of fresh water [K] + tpl_T_f = 273.15 , & ! Fresh water freezing point [K] + tpl_a_T = 1.6509E-05 , & ! Constant in the fresh-water equation of state [K^{-2}] + tpl_rho_w_r = 1.0E+03 , & ! Maximum density of fresh water [kg m^{-3}] + tpl_rho_I = 9.1E+02 , & ! Density of ice [kg m^{-3}] + tpl_rho_S_min = 1.0E+02 , & ! Minimum snow density [kg m^{-3}] + tpl_rho_S_max = 4.0E+02 , & ! Maximum snow density [kg m^{-3}] + tpl_Gamma_rho_S = 2.0E+02 , & ! Empirical parameter [kg m^{-4}] + ! in the expression for the snow density + tpl_L_f = 3.3E+05 , & ! Latent heat of fusion [J kg^{-1}] + tpl_c_w = 4.2E+03 , & ! Specific heat of water [J kg^{-1} K^{-1}] + tpl_c_I = 2.1E+03 , & ! Specific heat of ice [J kg^{-1} K^{-1}] + tpl_c_S = 2.1E+03 , & ! Specific heat of snow [J kg^{-1} K^{-1}] + tpl_kappa_w = 5.46E-01 , & ! Molecular heat conductivity of water [J m^{-1} s^{-1} K^{-1}] + tpl_kappa_I = 2.29 , & ! Molecular heat conductivity of ice [J m^{-1} s^{-1} K^{-1}] + tpl_kappa_S_min = 0.2 , & ! Minimum molecular heat conductivity of snow [J m^{-1} s^{-1} K^{-1}] + tpl_kappa_S_max = 1.5 , & ! Maximum molecular heat conductivity of snow [J m^{-1} s^{-1} K^{-1}] + tpl_Gamma_kappa_S = 1.3 ! Empirical parameter [J m^{-2} s^{-1} K^{-1}] + ! in the expression for the snow heat conductivity + +!============================================================================== + +END MODULE flake_parameters + +!------------------------------------------------------------------------------ + +MODULE flake + +!------------------------------------------------------------------------------ +! +! Description: +! +! The main program unit of the lake model FLake, +! containing most of the FLake procedures. +! Most FLake variables and local parameters are declared. +! +! FLake (Fresh-water Lake) is a lake model capable of predicting the surface temperature +! in lakes of various depth on the time scales from a few hours to a year. +! The model is based on a two-layer parametric representation of +! the evolving temperature profile, where the structure of the stratified layer between the +! upper mixed layer and the basin bottom, the lake thermocline, +! is described using the concept of self-similarity of the temperature-depth curve. +! The concept was put forward by Kitaigorodskii and Miropolsky (1970) +! to describe the vertical temperature structure of the oceanic seasonal thermocline. +! It has since been successfully used in geophysical applications. +! The concept of self-similarity of the evolving temperature profile +! is also used to describe the vertical structure of the thermally active upper layer +! of bottom sediments and of the ice and snow cover. +! +! The lake model incorporates the heat budget equations +! for the four layers in question, viz., snow, ice, water and bottom sediments, +! developed with due regard for the vertically distributed character +! of solar radiation heating. +! The entrainment equation that incorporates the Zilitinkevich (1975) spin-up term +! is used to compute the depth of a convectively-mixed layer. +! A relaxation-type equation is used +! to compute the wind-mixed layer depth in stable and neutral stratification, +! where a multi-limit formulation for the equilibrium mixed-layer depth +! proposed by Zilitinkevich and Mironov (1996) +! accounts for the effects of the earth's rotation, of the surface buoyancy flux +! and of the static stability in the thermocline. +! The equations for the mixed-layer depth are developed with due regard for +! the volumetric character of the radiation heating. +! Simple thermodynamic arguments are invoked to develop +! the evolution equations for the ice thickness and for the snow thickness. +! The heat flux through the water-bottom sediment interface is computed, +! using a parameterization proposed by Golosov et al. (1998). +! The heat flux trough the air-water interface +! (or through the air-ice or air-snow interface) +! is provided by the driving atmospheric model. +! +! Empirical constants and parameters of the lake model +! are estimated, using independent empirical and numerical data. +! They should not be re-evaluated when the model is applied to a particular lake. +! The only lake-specific parameters are the lake depth, +! the optical characteristics of lake water, +! the temperature at the bottom of the thermally active layer +! of bottom sediments and the depth of that layer. +! +! A detailed description of the lake model is given in +! Mironov, D. V., 2005: +! Parameterization of Lakes in Numerical Weather Prediction. +! Part 1: Description of a Lake Model. +! Manuscript is available from the author. +! Dmitrii Mironov +! German Weather Service, Kaiserleistr. 29/35, D-63067 Offenbach am Main, Germany. +! dmitrii.mironov@dwd.de +! +! Lines embraced with "!_tmp" contain temporary parts of the code. +! Lines embraced/marked with "!_dev" may be replaced +! as improved parameterizations are developed and tested. +! Lines embraced/marked with "!_dm" are DM's comments +! that may be helpful to a user. +! Lines embraced/marked with "!_dbg" are used +! for debugging purposes only. +! + +USE data_parameters , ONLY : & + ireals , & ! KIND-type parameter for real variables + iintegers ! KIND-type parameter for "normal" integer variables + +use machine, only: kind_phys +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations +! +! The variables declared below +! are accessible to all program units of the MODULE flake. +! Some of them should be USEd by the driving routines that call flake routines. +! These are basically the quantities computed by FLake. +! All variables declared below have a suffix "flk". + +! FLake variables of type REAL + +! Temperatures at the previous time step ("p") and the updated temperatures ("n") +REAL (KIND = kind_phys) :: & + T_mnw_p_flk, T_mnw_n_flk , & ! Mean temperature of the water column [K] + T_snow_p_flk, T_snow_n_flk , & ! Temperature at the air-snow interface [K] + T_ice_p_flk, T_ice_n_flk , & ! Temperature at the snow-ice or air-ice interface [K] + T_wML_p_flk, T_wML_n_flk , & ! Mixed-layer temperature [K] + T_bot_p_flk, T_bot_n_flk , & ! Temperature at the water-bottom sediment interface [K] + T_B1_p_flk, T_B1_n_flk ! Temperature at the bottom of the upper layer of the sediments [K] + +! Thickness of various layers at the previous time step ("p") and the updated values ("n") +REAL (KIND = kind_phys) :: & + h_snow_p_flk, h_snow_n_flk , & ! Snow thickness [m] + h_ice_p_flk, h_ice_n_flk , & ! Ice thickness [m] + h_ML_p_flk, h_ML_n_flk , & ! Thickness of the mixed-layer [m] + H_B1_p_flk, H_B1_n_flk ! Thickness of the upper layer of bottom sediments [m] + +! The shape factor(s) at the previous time step ("p") and the updated value(s) ("n") +REAL (KIND = kind_phys) :: & + C_T_p_flk, C_T_n_flk , & ! Shape factor (thermocline) + C_TT_flk , & ! Dimensionless parameter (thermocline) + C_Q_flk , & ! Shape factor with respect to the heat flux (thermocline) + C_I_flk , & ! Shape factor (ice) + C_S_flk ! Shape factor (snow) + +! Derivatives of the shape functions +REAL (KIND = kind_phys) :: & + Phi_T_pr0_flk , & ! d\Phi_T(0)/d\zeta (thermocline) + Phi_I_pr0_flk , & ! d\Phi_I(0)/d\zeta_I (ice) + Phi_I_pr1_flk , & ! d\Phi_I(1)/d\zeta_I (ice) + Phi_S_pr0_flk ! d\Phi_S(0)/d\zeta_S (snow) + +! Heat and radiation fluxes +REAL (KIND = kind_phys) :: & + Q_snow_flk , & ! Heat flux through the air-snow interface [W m^{-2}] + Q_ice_flk , & ! Heat flux through the snow-ice or air-ice interface [W m^{-2}] + Q_w_flk , & ! Heat flux through the ice-water or air-water interface [W m^{-2}] + Q_bot_flk , & ! Heat flux through the water-bottom sediment interface [W m^{-2}] + I_atm_flk , & ! Radiation flux at the lower boundary of the atmosphere [W m^{-2}], + ! i.e. the incident radiation flux with no regard for the surface albedo. + I_snow_flk , & ! Radiation flux through the air-snow interface [W m^{-2}] + I_ice_flk , & ! Radiation flux through the snow-ice or air-ice interface [W m^{-2}] + I_w_flk , & ! Radiation flux through the ice-water or air-water interface [W m^{-2}] + I_h_flk , & ! Radiation flux through the mixed-layer-thermocline interface [W m^{-2}] + I_bot_flk , & ! Radiation flux through the water-bottom sediment interface [W m^{-2}] + I_intm_0_h_flk , & ! Mean radiation flux over the mixed layer [W m^{-1}] + I_intm_h_D_flk , & ! Mean radiation flux over the thermocline [W m^{-1}] + I_intm_D_H_flk , & ! Mean radiation flux over the deeper layer defined by Shaobo Zhang [W m^{-1}] + I_HH_flk , & ! Radiation flux through the bottom of the deeper layer defined by Shaobo Zhang [W m^{-2}] + Q_star_flk ! A generalized heat flux scale [W m^{-2}] + +! Velocity scales +REAL (KIND = kind_phys) :: & + u_star_w_flk , & ! Friction velocity in the surface layer of lake water [m s^{-1}] + w_star_sfc_flk ! Convective velocity scale, + ! using a generalized heat flux scale [m s^{-1}] + +! The rate of snow accumulation +REAL (KIND = kind_phys) :: & + dMsnowdt_flk ! The rate of snow accumulation [kg m^{-2} s^{-1}] +! The secondary layer temp +REAL (KIND = kind_phys) :: & + T_BOT_2_IN_FLK + +!============================================================================== +! Procedures +!============================================================================== + +CONTAINS + +!============================================================================== +! The codes of the FLake procedures are stored in separate "*.incf" files +! and are included below. +!------------------------------------------------------------------------------ + +!============================================================================== +! include 'flake_radflux.incf' +!------------------------------------------------------------------------------ +! changed by Shaobo Zhang + +SUBROUTINE flake_radflux ( depth_w, albedo_water, albedo_ice, albedo_snow, & + opticpar_water, opticpar_ice, opticpar_snow, & + depth_bs ) + +!------------------------------------------------------------------------------ +! +! Description: +! +! Computes the radiation fluxes +! at the snow-ice, ice-water, air-water, +! mixed layer-thermocline and water column-bottom sediment interfaces, +! the mean radiation flux over the mixed layer, +! and the mean radiation flux over the thermocline. +! +! +! Declarations: +! +! Modules used: + +!_dm Parameters are USEd in module "flake". +!_nu USE data_parameters , ONLY : & +!_nu ireals, & ! KIND-type parameter for real variables +!_nu iintegers ! KIND-type parameter for "normal" integer variables + +USE flake_derivedtypes ! Definitions of derived TYPEs + +USE flake_parameters , ONLY : & + h_Snow_min_flk , & ! Minimum snow thickness [m] + h_Ice_min_flk , & ! Minimum ice thickness [m] + h_ML_min_flk ! Minimum mixed-layer depth [m] + +use machine, only: kind_phys +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Input (procedure arguments) + +REAL (KIND = kind_phys), INTENT(IN) :: & + depth_w , & ! The lake depth [m] + depth_bs , & ! The depth_bs added by Shaobo Zhang + albedo_water , & ! Albedo of the water surface + albedo_ice , & ! Albedo of the ice surface + albedo_snow ! Albedo of the snow surface + +TYPE (opticpar_medium), INTENT(IN) :: & + opticpar_water , & ! Optical characteristics of water + opticpar_ice , & ! Optical characteristics of ice + opticpar_snow ! Optical characteristics of snow + + +! Local variables of type INTEGER +INTEGER (KIND = iintegers) :: & ! Help variable(s) + i ! DO loop index + +!============================================================================== +! Start calculations +!------------------------------------------------------------------------------ + + IF(h_ice_p_flk.GE.h_Ice_min_flk) THEN ! Ice exists + IF(h_snow_p_flk.GE.h_Snow_min_flk) THEN ! There is snow above the ice + I_snow_flk = I_atm_flk*(1.0-albedo_snow) + I_bot_flk = 0.0 + DO i=1, opticpar_snow%nband_optic + I_bot_flk = I_bot_flk + & + opticpar_snow%frac_optic(i)*EXP(-opticpar_snow%extincoef_optic(i)*h_snow_p_flk) + END DO + I_ice_flk = I_snow_flk*I_bot_flk + ELSE ! No snow above the ice + I_snow_flk = I_atm_flk + I_ice_flk = I_atm_flk*(1.0-albedo_ice) + END IF + I_bot_flk = 0.0 + DO i=1, opticpar_ice%nband_optic + I_bot_flk = I_bot_flk + & + opticpar_ice%frac_optic(i)*EXP(-opticpar_ice%extincoef_optic(i)*h_ice_p_flk) + END DO + I_w_flk = I_ice_flk*I_bot_flk + ELSE ! No ice-snow cover + I_snow_flk = I_atm_flk + I_ice_flk = I_atm_flk + I_w_flk = I_atm_flk*(1.0-albedo_water) + END IF + + IF(h_ML_p_flk.GE.h_ML_min_flk) THEN ! Radiation flux at the bottom of the mixed layer + I_bot_flk = 0.0 + DO i=1, opticpar_water%nband_optic + I_bot_flk = I_bot_flk + & + opticpar_water%frac_optic(i)*EXP(-opticpar_water%extincoef_optic(i)*h_ML_p_flk) +! print*,'nband_optic=',opticpar_water%nband_optic +! print*,'Extinction=',opticpar_water%extincoef_optic(i) + END DO + I_h_flk = I_w_flk*I_bot_flk + ELSE ! Mixed-layer depth is less then a minimum value + I_h_flk = I_w_flk + END IF + + I_bot_flk = 0.0 ! Radiation flux at the lake bottom + DO i=1, opticpar_water%nband_optic + I_bot_flk = I_bot_flk + & + opticpar_water%frac_optic(i)*EXP(-opticpar_water%extincoef_optic(i)*depth_w) + END DO + I_bot_flk = I_w_flk*I_bot_flk + + IF(h_ML_p_flk.GE.h_ML_min_flk) THEN ! Integral-mean radiation flux over the mixed layer + I_intm_0_h_flk = 0.0 + DO i=1, opticpar_water%nband_optic + I_intm_0_h_flk = I_intm_0_h_flk + & + opticpar_water%frac_optic(i)/opticpar_water%extincoef_optic(i)* & + (1.0 - EXP(-opticpar_water%extincoef_optic(i)*h_ML_p_flk)) + END DO + I_intm_0_h_flk = I_w_flk*I_intm_0_h_flk/h_ML_p_flk + ELSE + I_intm_0_h_flk = I_h_flk + END IF + + IF(h_ML_p_flk.LE.depth_w-h_ML_min_flk) THEN ! Integral-mean radiation flux over the thermocline + I_intm_h_D_flk = 0.0 + DO i=1, opticpar_water%nband_optic + I_intm_h_D_flk = I_intm_h_D_flk + & + opticpar_water%frac_optic(i)/opticpar_water%extincoef_optic(i)* & + ( EXP(-opticpar_water%extincoef_optic(i)*h_ML_p_flk) & + - EXP(-opticpar_water%extincoef_optic(i)*depth_w) ) + END DO + I_intm_h_D_flk = I_w_flk*I_intm_h_D_flk/(depth_w-h_ML_p_flk) + ELSE + I_intm_h_D_flk = I_h_flk + END IF + +! Added by Shaobo Zhang + + IF(depth_bs.GE.h_ML_min_flk) THEN! Integral-mean radiation flux over the deeper layer defined by Shaobo Zhang + I_intm_D_H_flk = 0.0 + DO i=1, opticpar_water%nband_optic + I_intm_D_H_flk = I_intm_D_H_flk + & + opticpar_water%frac_optic(i)/opticpar_water%extincoef_optic(i)* & + ( EXP(-opticpar_water%extincoef_optic(i)*depth_w) & + - EXP(-opticpar_water%extincoef_optic(i)*(depth_w+depth_bs)) ) + END DO + I_intm_D_H_flk = I_w_flk*I_intm_D_H_flk/depth_bs + ELSE + I_intm_D_H_flk = I_bot_flk + END IF + +! Radiation flux at the bottom of the deeper layer defined by Shaobo Zhang + I_HH_flk = 0.0 + DO i=1, opticpar_water%nband_optic + I_HH_flk = I_HH_flk + & + opticpar_water%frac_optic(i)*EXP(-opticpar_water%extincoef_optic(i)*(depth_w+depth_bs)) + END DO + I_HH_flk = I_w_flk*I_HH_flk + +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END SUBROUTINE flake_radflux + +!============================================================================== + +!============================================================================== +! include 'flake_main.incf' +!------------------------------------------------------------------------------ + +SUBROUTINE flake_main ( depthw, depthbs, T_bs, par_Coriolis, & + extincoef_water_typ, & + del_time, T_sfc_p, T_sfc_n, T_bot_2_in, & + T_bot_2_out ) + +!------------------------------------------------------------------------------ +! +! Description: +! +! The main driving routine of the lake model FLake +! where computations are performed. +! Advances the surface temperature +! and other FLake variables one time step. +! At the moment, the Euler explicit scheme is used. +! +! Lines embraced with "!_tmp" contain temporary parts of the code. +! Lines embraced/marked with "!_dev" may be replaced +! as improved parameterizations are developed and tested. +! Lines embraced/marked with "!_dm" are DM's comments +! that may be helpful to a user. +! Lines embraced/marked with "!_dbg" are used +! for debugging purposes only. +! +! Declarations: +! +! Modules used: + +!_dm Parameters are USEd in module "flake". +!_nu USE data_parameters , ONLY : & +!_nu ireals, & ! KIND-type parameter for real variables +!_nu iintegers ! KIND-type parameter for "normal" integer variables + +USE flake_parameters ! Thermodynamic parameters and dimensionless constants of FLake + +USE flake_configure ! Switches and parameters that configure FLake + +use machine, only: kind_phys +! ADDED by Shaobo Zhang +! USE mod_dynparam, only : lake_depth_max + +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Input (procedure arguments) + +! changed by Shaobo Zhang +REAL (KIND = kind_phys), INTENT(IN) :: & + depthw , & ! The lake depth [m] + depthbs , & ! Depth of the thermally active layer of bottom sediments [m] + T_bs , & ! Temperature at the outer edge of + ! the thermally active layer of bottom sediments [K] + par_Coriolis , & ! The Coriolis parameter [s^{-1}] + extincoef_water_typ , & ! "Typical" extinction coefficient of the lake water [m^{-1}], + ! used to compute the equilibrium CBL depth + del_time , & ! The model time step [s] + T_sfc_p , & ! Surface temperature at the previous time step [K] + T_bot_2_in + +REAL (KIND = kind_phys) :: & + depth_w , & ! The lake depth [m] + depth_bs ! Depth of the thermally active layer of bottom sediments [m] + +! Output (procedure arguments) + +REAL (KIND = kind_phys), INTENT(OUT) :: & + T_sfc_n , & ! Updated surface temperature [K] + ! (equal to the updated value of either T_ice, T_snow or T_wML) + T_bot_2_out + + +! Local variables of type LOGICAL +LOGICAL :: & + l_ice_create , & ! Switch, .TRUE. = ice does not exist but should be created + l_snow_exists , & ! Switch, .TRUE. = there is snow above the ice + l_ice_meltabove ! Switch, .TRUE. = snow/ice melting from above takes place + +! Local variables of type INTEGER +INTEGER (KIND = iintegers) :: & + i ! Loop index + +! Local variables of type REAL +REAL (KIND = kind_phys) :: & + d_T_mnw_dt , & ! Time derivative of T_mnw [K s^{-1}] + d_T_ice_dt , & ! Time derivative of T_ice [K s^{-1}] + d_T_bot_dt , & ! Time derivative of T_bot [K s^{-1}] + d_T_B1_dt , & ! Time derivative of T_B1 [K s^{-1}] + d_h_snow_dt , & ! Time derivative of h_snow [m s^{-1}] + d_h_ice_dt , & ! Time derivative of h_ice [m s^{-1}] + d_h_ML_dt , & ! Time derivative of h_ML [m s^{-1}] + d_H_B1_dt , & ! Time derivative of H_B1 [m s^{-1}] + d_h_D_dt , & ! Time derivative of h_D, new defined by Shaobo Zhang + d_T_H_dt , & ! Time derivative of T_H, new defined by Shaobo Zhang + d_C_T_dt ! Time derivative of C_T [s^{-1}] + +! Local variables of type REAL +REAL (KIND = kind_phys) :: & + N_T_mean , & ! The mean buoyancy frequency in the thermocline [s^{-1}] + tmp , & ! temperary variable + ZM_h_scale , & ! The ZM96 equilibrium SBL depth scale [m] + conv_equil_h_scale ! The equilibrium CBL depth scale [m] + +! Local variables of type REAL +REAL (KIND = kind_phys) :: & + h_ice_threshold , & ! If h_iceRi_cr + +u_star_st = 0.0 ! Set turbulent fluxes to zero +Q_mom_tur = 0.0 +Q_sen_tur = 0.0 +Q_lat_tur = 0.0 + +ELSE Turb_Fluxes ! Compute turbulent fluxes using MO similarity + +! Compute z/L, where z=height_u +IF(Ri.GE.0.0) THEN ! Stable stratification + ZoL = SQRT(1.0-4.0*(c_MO_u_stab-R_z*c_MO_t_stab)*Ri) + ZoL = ZoL - 1.0 + 2.0*c_MO_u_stab*Ri + ZoL = ZoL/2.0/c_MO_u_stab/c_MO_u_stab/(Ri_cr-Ri) +ELSE ! Convection + n_iter = 0_iintegers + Delta = 1.0 ! Set initial error to a large value (as compared to the accuracy) + u_star_previter = Ri*MAX(1.0, SQRT(R_z*c_MO_t_conv/c_MO_u_conv)) ! Initial guess for ZoL + DO WHILE (Delta.GT.c_accur_sf.AND.n_iter.LT.n_iter_max) + Fun = u_star_previter**2_iintegers*(c_MO_u_conv*u_star_previter-1.0) & + + Ri**2_iintegers*(1.0-R_z*c_MO_t_conv*u_star_previter) + Fun_prime = 3.0*c_MO_u_conv*u_star_previter**2_iintegers & + - 2.0*u_star_previter - R_z*c_MO_t_conv*Ri**2_iintegers + ZoL = u_star_previter - Fun/Fun_prime + Delta = ABS(ZoL-u_star_previter)/MAX(c_accur_sf, ABS(ZoL+u_star_previter)) + u_star_previter = ZoL + n_iter = n_iter + 1_iintegers + END DO +!_dbg +! IF(n_iter.GE.n_iter_max-1_iintegers) & +! print*(*,*) 'ZoL: Max No. iters. exceeded (n_iter = ', n_iter, ')!' +!_dbg +END IF + +! Compute fetch-dependent Charnock parameter, use "u_star_min_sf" +CALL SfcFlx_roughness (fetch, U_a, u_star_min_sf, h_ice, c_z0u_fetch, u_star_thresh, z0u_sf, z0t_sf, z0q_sf) + +! Threshold value of wind speed +u_star_st = u_star_thresh +CALL SfcFlx_roughness (fetch, U_a, u_star_st, h_ice, c_z0u_fetch, u_star_thresh, z0u_sf, z0t_sf, z0q_sf) +IF(ZoL.GT.0.0) THEN ! MO function in stable stratification + psi_u = c_MO_u_stab*ZoL*(1.0-MIN(z0u_sf/height_u, 1.0)) +ELSE ! MO function in convection + psi_t = (1.0-c_MO_u_conv*ZoL)**c_MO_u_exp + psi_q = (1.0-c_MO_u_conv*ZoL*MIN(z0u_sf/height_u, 1.0))**c_MO_u_exp + psi_u = 2.0*(ATAN(psi_t)-ATAN(psi_q)) & + + 2.0*LOG((1.0+psi_q)/(1.0+psi_t)) & + + LOG((1.0+psi_q*psi_q)/(1.0+psi_t*psi_t)) +END IF +U_a_thresh = u_star_thresh/c_Karman*(LOG(height_u/z0u_sf)+psi_u) + +! Compute friction velocity +n_iter = 0_iintegers +Delta = 1.0 ! Set initial error to a large value (as compared to the accuracy) +u_star_previter = u_star_thresh ! Initial guess for friction velocity +IF(U_a.LE.U_a_thresh) THEN ! Smooth surface + DO WHILE (Delta.GT.c_accur_sf.AND.n_iter.LT.n_iter_max) + CALL SfcFlx_roughness (fetch, U_a, MIN(u_star_thresh, u_star_previter), h_ice, & + c_z0u_fetch, u_star_thresh, z0u_sf, z0t_sf, z0q_sf) + IF(ZoL.GE.0.0) THEN ! Stable stratification + psi_u = c_MO_u_stab*ZoL*(1.0-MIN(z0u_sf/height_u, 1.0)) + Fun = LOG(height_u/z0u_sf) + psi_u + Fun_prime = (Fun + 1.0 + c_MO_u_stab*ZoL*MIN(z0u_sf/height_u, 1.0))/c_Karman + Fun = Fun*u_star_previter/c_Karman - U_a + ELSE ! Convection + psi_t = (1.0-c_MO_u_conv*ZoL)**c_MO_u_exp + psi_q = (1.0-c_MO_u_conv*ZoL*MIN(z0u_sf/height_u, 1.0))**c_MO_u_exp + psi_u = 2.0*(ATAN(psi_t)-ATAN(psi_q)) & + + 2.0*LOG((1.0+psi_q)/(1.0+psi_t)) & + + LOG((1.0+psi_q*psi_q)/(1.0+psi_t*psi_t)) + Fun = LOG(height_u/z0u_sf) + psi_u + Fun_prime = (Fun + 1.0/psi_q)/c_Karman + Fun = Fun*u_star_previter/c_Karman - U_a + END IF + u_star_st = u_star_previter - Fun/Fun_prime + Delta = ABS((u_star_st-u_star_previter)/(u_star_st+u_star_previter)) + u_star_previter = u_star_st + n_iter = n_iter + 1_iintegers + END DO +ELSE ! Rough surface + DO WHILE (Delta.GT.c_accur_sf.AND.n_iter.LT.n_iter_max) + CALL SfcFlx_roughness (fetch, U_a, MAX(u_star_thresh, u_star_previter), h_ice, & + c_z0u_fetch, u_star_thresh, z0u_sf, z0t_sf, z0q_sf) + IF(ZoL.GE.0.0) THEN ! Stable stratification + psi_u = c_MO_u_stab*ZoL*(1.0-MIN(z0u_sf/height_u, 1.0)) + Fun = LOG(height_u/z0u_sf) + psi_u + Fun_prime = (Fun - 2.0 - 2.0*c_MO_u_stab*ZoL*MIN(z0u_sf/height_u, 1.0))/c_Karman + Fun = Fun*u_star_previter/c_Karman - U_a + ELSE ! Convection + psi_t = (1.0-c_MO_u_conv*ZoL)**c_MO_u_exp + psi_q = (1.0-c_MO_u_conv*ZoL*MIN(z0u_sf/height_u, 1.0))**c_MO_u_exp + psi_u = 2.0*(ATAN(psi_t)-ATAN(psi_q)) & + + 2.0*LOG((1.0+psi_q)/(1.0+psi_t)) & + + LOG((1.0+psi_q*psi_q)/(1.0+psi_t*psi_t)) + Fun = LOG(height_u/z0u_sf) + psi_u + Fun_prime = (Fun - 2.0/psi_q)/c_Karman + Fun = Fun*u_star_previter/c_Karman - U_a + END IF + IF(h_ice.GE.h_Ice_min_flk) THEN ! No iteration is required for rough flow over ice + u_star_st = c_Karman*U_a/MAX(c_small_sf, LOG(height_u/z0u_sf)+psi_u) + u_star_previter = u_star_st + ELSE ! Iterate in case of open water + u_star_st = u_star_previter - Fun/Fun_prime + END IF + Delta = ABS((u_star_st-u_star_previter)/(u_star_st+u_star_previter)) + u_star_previter = u_star_st + n_iter = n_iter + 1_iintegers + END DO +END IF + +!_dbg +! print*(*,*) 'MO stab. func. psi_u = ', psi_u, ' n_iter = ', n_iter +! print*(*,*) ' Wind speed = ', U_a, ' u_* = ', u_star_st +! print*(*,*) ' Fun = ', Fun +!_dbg + +!_dbg +! IF(n_iter.GE.n_iter_max-1_iintegers) & +! print*(*,*) 'u_*: Max No. iters. exceeded (n_iter = ', n_iter, ')!' +!_dbg + +! Momentum flux +Q_mom_tur = -u_star_st*u_star_st + +! Temperature and specific humidity fluxes +CALL SfcFlx_roughness (fetch, U_a, u_star_st, h_ice, c_z0u_fetch, u_star_thresh, z0u_sf, z0t_sf, z0q_sf) +IF(ZoL.GE.0.0) THEN ! Stable stratification + psi_t = c_MO_t_stab*R_z*ZoL*(1.0-MIN(z0t_sf/height_tq, 1.0)) + psi_q = c_MO_q_stab*R_z*ZoL*(1.0-MIN(z0q_sf/height_tq, 1.0)) +!_dbg +! print*(*,*) 'STAB: psi_t = ', psi_t, ' psi_q = ', psi_q +!_dbg +ELSE ! Convection + psi_u = (1.0-c_MO_t_conv*R_z*ZoL)**c_MO_t_exp + psi_t = (1.0-c_MO_t_conv*R_z*ZoL*MIN(z0t_sf/height_tq, 1.0))**c_MO_t_exp + psi_t = 2.0*LOG((1.0+psi_t)/(1.0+psi_u)) + psi_u = (1.0-c_MO_q_conv*R_z*ZoL)**c_MO_q_exp + psi_q = (1.0-c_MO_q_conv*R_z*ZoL*MIN(z0q_sf/height_tq, 1.0))**c_MO_q_exp + psi_q = 2.0*LOG((1.0+psi_q)/(1.0+psi_u)) +!_dbg +! print*(*,*) 'CONV: psi_t = ', psi_t, ' psi_q = ', psi_q +!_dbg +END IF +Q_sen_tur = -(T_a-T_s)*u_star_st*c_Karman/Pr_neutral & + / MAX(c_small_sf, LOG(height_tq/z0t_sf)+psi_t) +Q_lat_tur = -(q_a-q_s)*u_star_st*c_Karman/Sc_neutral & + / MAX(c_small_sf, LOG(height_tq/z0q_sf)+psi_q) + +END IF Turb_Fluxes + +!------------------------------------------------------------------------------ +! Decide between turbulent, molecular, and convective fluxes +!------------------------------------------------------------------------------ + +Q_momentum = MIN(Q_mom_tur, Q_mom_mol, Q_mom_con) ! Momentum flux is negative +IF(l_conv_visc) THEN ! Convection, take fluxes that are maximal in magnitude + IF(ABS(Q_sen_tur).GE.ABS(Q_sen_con)) THEN + Q_sensible = Q_sen_tur + ELSE + Q_sensible = Q_sen_con + END IF + IF(ABS(Q_sensible).LT.ABS(Q_sen_mol)) THEN + Q_sensible = Q_sen_mol + END IF + IF(ABS(Q_lat_tur).GE.ABS(Q_lat_con)) THEN + Q_latent = Q_lat_tur + ELSE + Q_latent = Q_lat_con + END IF + IF(ABS(Q_latent).LT.ABS(Q_lat_mol)) THEN + Q_latent = Q_lat_mol + END IF +ELSE ! Stable or neutral stratification, chose fluxes that are maximal in magnitude + IF(ABS(Q_sen_tur).GE.ABS(Q_sen_mol)) THEN + Q_sensible = Q_sen_tur + ELSE + Q_sensible = Q_sen_mol + END IF + IF(ABS(Q_lat_tur).GE.ABS(Q_lat_mol)) THEN + Q_latent = Q_lat_tur + ELSE + Q_latent = Q_lat_mol + END IF +END IF + +!------------------------------------------------------------------------------ +! Set output (notice that fluxes are no longer in kinematic units) +!------------------------------------------------------------------------------ + +Q_momentum = Q_momentum*rho_a +!Q_sensible = Q_sensible*rho_a*tpsf_c_a_p + +Q_watvap = Q_latent*rho_a + +Q_latent = tpsf_L_evap +IF(h_ice.GE.h_Ice_min_flk) Q_latent = Q_latent + tpl_L_f ! Add latent heat of fusion over ice +Q_latent = Q_watvap*Q_latent + +! Set "*_sf" variables to make fluxes accessible to driving routines that use "SfcFlx" +u_star_a_sf = u_star_st +Q_mom_a_sf = Q_momentum +Q_sens_a_sf = Q_sensible +Q_lat_a_sf = Q_latent +Q_watvap_a_sf = Q_watvap + +!write(85,127) Q_sensible, Q_watvap, Q_latent + 127 format(1x, 3(f16.9,1x)) + +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END SUBROUTINE SfcFlx_momsenlat + +!============================================================================== + +!============================================================================== +! include 'SfcFlx_rhoair.incf' +!------------------------------------------------------------------------------ + +REAL (KIND = kind_phys) FUNCTION SfcFlx_rhoair (T, q, P) + +!------------------------------------------------------------------------------ +! +! Description: +! +! Computes the air density as function +! of temperature, specific humidity and pressure. +! +! Declarations: +! +! Modules used: + +!_dm Parameters are USEd in module "SfcFlx". +!_nu USE data_parameters , ONLY : & +!_nu ireals, & ! KIND-type parameter for real variables +!_nu iintegers ! KIND-type parameter for "normal" integer variables + +use machine, only: kind_phys +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Input (function argument) +REAL (KIND = kind_phys), INTENT(IN) :: & + T , & ! Temperature [K] + q , & ! Specific humidity + P ! Pressure [N m^{-2} = kg m^{-1} s^{-2}] + +!============================================================================== +! Start calculations +!------------------------------------------------------------------------------ + +! Air density [kg m^{-3}] + +SfcFlx_rhoair = P/tpsf_R_dryair/T/(1.0+(1.0/tpsf_Rd_o_Rv-1.0)*q) + +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END FUNCTION SfcFlx_rhoair + +!============================================================================== + +!============================================================================== +! include 'SfcFlx_roughness.incf' +!------------------------------------------------------------------------------ + +SUBROUTINE SfcFlx_roughness (fetch, U_a, u_star, h_ice, & + c_z0u_fetch, u_star_thresh, z0u, z0t, z0q) + +!------------------------------------------------------------------------------ +! +! Description: +! +! Computes the water-surface or the ice-surface roughness lengths +! with respect to wind velocity, potential temperature and specific humidity. +! +! The water-surface roughness lengths with respect to wind velocity is computed +! from the Charnock formula when the surface is aerodynamically rough. +! A simple empirical formulation is used to account for the dependence +! of the Charnock parameter on the wind fetch. +! When the flow is aerodynamically smooth, the roughness length with respect to +! wind velocity is proportional to the depth of the viscous sub-layer. +! The water-surface roughness lengths for scalars are computed using the power-law +! formulations in terms of the roughness Reynolds number (Zilitinkevich et al. 2001). +! The ice-surface aerodynamic roughness is taken to be constant. +! The ice-surface roughness lengths for scalars +! are computed through the power-law formulations +! in terms of the roughness Reynolds number (Andreas 2002). +! +! Declarations: +! +! Modules used: + +!_dm Parameters are USEd in module "SfcFlx". +!_nu USE data_parameters , ONLY : & +!_nu ireals , & ! KIND-type parameter for real variables +!_nu iintegers ! KIND-type parameter for "normal" integer variables + +use machine, only: kind_phys +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Input (procedure arguments) +REAL (KIND = kind_phys), INTENT(IN) :: & + fetch , & ! Typical wind fetch [m] + U_a , & ! Wind speed [m s^{-1}] + u_star , & ! Friction velocity in the surface air layer [m s^{-1}] + h_ice ! Ice thickness [m] + +! Output (procedure arguments) +REAL (KIND = kind_phys), INTENT(OUT) :: & + c_z0u_fetch , & ! Fetch-dependent Charnock parameter + u_star_thresh , & ! Threshold value of friction velocity [m s^{-1}] + z0u , & ! Roughness length with respect to wind velocity [m] + z0t , & ! Roughness length with respect to potential temperature [m] + z0q ! Roughness length with respect to specific humidity [m] + +! Local variables of type REAL +REAL (KIND = kind_phys) :: & + Re_s , & ! Surface Reynolds number + Re_s_thresh ! Threshold value of Re_s + +!============================================================================== +! Start calculations +!------------------------------------------------------------------------------ + +Water_or_Ice: IF(h_ice.LT.h_Ice_min_flk) THEN ! Water surface + +! The Charnock parameter as dependent on dimensionless fetch + c_z0u_fetch = MAX(U_a, u_wind_min_sf)**2_iintegers/tpl_grav/fetch ! Inverse dimensionless fetch + c_z0u_fetch = c_z0u_rough + c_z0u_ftch_f*c_z0u_fetch**c_z0u_ftch_ex + c_z0u_fetch = MIN(c_z0u_fetch, c_z0u_rough_L) ! Limit Charnock parameter + +! Threshold value of friction velocity + u_star_thresh = (c_z0u_smooth/c_z0u_fetch*tpl_grav*tpsf_nu_u_a)**num_1o3_sf + +! Surface Reynolds number and its threshold value + Re_s = u_star**3_iintegers/tpsf_nu_u_a/tpl_grav + Re_s_thresh = c_z0u_smooth/c_z0u_fetch + +! Aerodynamic roughness + IF(Re_s.LE.Re_s_thresh) THEN + z0u = c_z0u_smooth*tpsf_nu_u_a/u_star ! Smooth flow + ELSE + z0u = c_z0u_fetch*u_star*u_star/tpl_grav ! Rough flow + END IF +! Roughness for scalars + z0q = c_z0u_fetch*MAX(Re_s, Re_s_thresh) + z0t = c_z0t_rough_1*z0q**c_z0t_rough_3 - c_z0t_rough_2 + z0q = c_z0q_rough_1*z0q**c_z0q_rough_3 - c_z0q_rough_2 + z0t = z0u*EXP(-c_Karman/Pr_neutral*z0t) + z0q = z0u*EXP(-c_Karman/Sc_neutral*z0q) + +ELSE Water_or_Ice ! Ice surface + +! The Charnock parameter is not used over ice, formally set "c_z0u_fetch" to its minimum value + c_z0u_fetch = c_z0u_rough + +! Threshold value of friction velocity + u_star_thresh = c_z0u_smooth*tpsf_nu_u_a/z0u_ice_rough + +! Aerodynamic roughness + z0u = MAX(z0u_ice_rough, c_z0u_smooth*tpsf_nu_u_a/u_star) + +! Roughness Reynolds number + Re_s = MAX(u_star*z0u/tpsf_nu_u_a, c_accur_sf) + +! Roughness for scalars + IF(Re_s.LE.Re_z0s_ice_t) THEN + z0t = c_z0t_ice_b0t + c_z0t_ice_b1t*LOG(Re_s) + z0t = MIN(z0t, c_z0t_ice_b0s) + z0q = c_z0q_ice_b0t + c_z0q_ice_b1t*LOG(Re_s) + z0q = MIN(z0q, c_z0q_ice_b0s) + ELSE + z0t = c_z0t_ice_b0r + c_z0t_ice_b1r*LOG(Re_s) + c_z0t_ice_b2r*LOG(Re_s)**2_iintegers + z0q = c_z0q_ice_b0r + c_z0q_ice_b1r*LOG(Re_s) + c_z0q_ice_b2r*LOG(Re_s)**2_iintegers + END IF + z0t = z0u*EXP(z0t) + z0q = z0u*EXP(z0q) + +END IF Water_or_Ice + +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END SUBROUTINE SfcFlx_roughness + +!============================================================================== + +!============================================================================== +! include 'SfcFlx_satwvpres.incf' +!------------------------------------------------------------------------------ + +REAL (KIND = kind_phys) FUNCTION SfcFlx_satwvpres (T, h_ice) + +!------------------------------------------------------------------------------ +! +! Description: +! +! Computes saturation water vapour pressure +! over the water surface or over the ice surface +! as function of temperature. +! +! Declarations: +! +! Modules used: + +!_dm Parameters are USEd in module "SfcFlx". +!_nu USE data_parameters , ONLY : & +!_nu ireals, & ! KIND-type parameter for real variables +!_nu iintegers ! KIND-type parameter for "normal" integer variables + +!_dm The variable is USEd in module "SfcFlx". +!_nu USE flake_parameters , ONLY : & +!_nu h_Ice_min_flk ! Minimum ice thickness [m] +use machine, only: kind_phys + +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Input (function argument) +REAL (KIND = kind_phys), INTENT(IN) :: & + T , & ! Temperature [K] + h_ice ! Ice thickness [m] + +! Local parameters +REAL (KIND = kind_phys), PARAMETER :: & + b1_vap = 610.780 , & ! Coefficient [N m^{-2} = kg m^{-1} s^{-2}] + b3_vap = 273.160 , & ! Triple point [K] + b2w_vap = 17.26938820 , & ! Coefficient (water) + b2i_vap = 21.87455840 , & ! Coefficient (ice) + b4w_vap = 35.860 , & ! Coefficient (temperature) [K] + b4i_vap = 7.660 ! Coefficient (temperature) [K] + +!============================================================================== +! Start calculations +!------------------------------------------------------------------------------ + +! Saturation water vapour pressure [N m^{-2} = kg m^{-1} s^{-2}] + +IF(h_ice.LT.h_Ice_min_flk) THEN ! Water surface + SfcFlx_satwvpres = b1_vap*EXP(b2w_vap*(T-b3_vap)/(T-b4w_vap)) +ELSE ! Ice surface + SfcFlx_satwvpres = b1_vap*EXP(b2i_vap*(T-b3_vap)/(T-b4i_vap)) +END IF + +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END FUNCTION SfcFlx_satwvpres + +!============================================================================== + +!============================================================================== +! include 'SfcFlx_spechum.incf' +!------------------------------------------------------------------------------ + +REAL (KIND = kind_phys) FUNCTION SfcFlx_spechum (wvpres, P) + +!------------------------------------------------------------------------------ +! +! Description: +! +! Computes specific humidity as function +! of water vapour pressure and air pressure. +! +! Declarations: +! +! Modules used: + +!_dm Parameters are USEd in module "SfcFlx". +!_nu USE data_parameters , ONLY : & +!_nu ireals, & ! KIND-type parameter for real variables +!_nu iintegers ! KIND-type parameter for "normal" integer variables + +use machine, only: kind_phys +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Input (function argument) +REAL (KIND = kind_phys), INTENT(IN) :: & + wvpres , & ! Water vapour pressure [N m^{-2} = kg m^{-1} s^{-2}] + P ! Air pressure [N m^{-2} = kg m^{-1} s^{-2}] + +!============================================================================== +! Start calculations +!------------------------------------------------------------------------------ + +! Specific humidity + +SfcFlx_spechum = tpsf_Rd_o_Rv*wvpres/(P-(1.0-tpsf_Rd_o_Rv)*wvpres) + +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END FUNCTION SfcFlx_spechum + +!============================================================================== + +!============================================================================== +! include 'SfcFlx_wvpreswetbulb.incf' +!------------------------------------------------------------------------------ + +REAL (KIND = ireals) FUNCTION SfcFlx_wvpreswetbulb (T_dry, T_wetbulb, satwvpres_bulb, P) + +!------------------------------------------------------------------------------ +! +! Description: +! +! Computes water vapour pressure as function of air temperature, +! wet bulb temperature, satururation vapour pressure at wet-bulb temperature, +! and air pressure. +! +! Declarations: +! +! Modules used: + +!_dm Parameters are USEd in module "SfcFlx". +!_nu USE data_parameters , ONLY : & +!_nu ireals, & ! KIND-type parameter for real variables +!_nu iintegers ! KIND-type parameter for "normal" integer variables + +use machine, only: kind_phys +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Input (function argument) +REAL (KIND = kind_phys), INTENT(IN) :: & + T_dry , & ! Dry air temperature [K] + T_wetbulb , & ! Wet bulb temperature [K] + satwvpres_bulb , & ! Satururation vapour pressure at wet-bulb temperature [N m^{-2}] + P ! Atmospheric pressure [N m^{-2}] + +!============================================================================== +! Start calculations +!------------------------------------------------------------------------------ + +! Water vapour pressure [N m^{-2} = kg m^{-1} s^{-2}] + +SfcFlx_wvpreswetbulb = satwvpres_bulb & + - tpsf_c_a_p*P/tpsf_L_evap/tpsf_Rd_o_Rv*(T_dry-T_wetbulb) + + +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END FUNCTION SfcFlx_wvpreswetbulb + +!============================================================================== + +END MODULE SfcFlx + + +MODULE module_FLake +IMPLICIT NONE +CONTAINS + +!------------------------------------------------------------------------------ + +SUBROUTINE flake_interface ( dMsnowdt_in, I_atm_in, Q_atm_lw_in, height_u_in, height_tq_in, & + U_a_in, T_a_in, q_a_in, P_a_in, & + + depth_w, fetch, depth_bs, T_bs, par_Coriolis, del_time, & + T_snow_in, T_ice_in, T_mnw_in, T_wML_in, T_bot_in, T_B1_in, & + C_T_in, h_snow_in, h_ice_in, h_ML_in, H_B1_in, T_sfc_p, & + ch, cm, albedo_water, water_extinc, & + + T_snow_out, T_ice_out, T_mnw_out, T_wML_out, T_bot_out, & + T_B1_out, C_T_out, h_snow_out, h_ice_out, h_ML_out, & + H_B1_out, T_sfc_n, hflx_out, evap_out, & + + T_bot_2_in, T_bot_2_out,ustar, q_sfc, chh, cmm ) + +!------------------------------------------------------------------------------ +! +! Description: +! +! The FLake interface is +! a communication routine between "flake_main" +! and a prediction system that uses FLake. +! It assigns the FLake variables at the previous time step +! to their input values given by the driving model, +! calls a number of routines to compute the heat and radiation fluxes, +! calls "flake_main", +! and returns the updated FLake variables to the driving model. +! The "flake_interface" does not contain any Flake physics. +! It only serves as a convenient means to organize calls of "flake_main" +! and of external routines that compute heat and radiation fluxes. +! The interface may (should) be changed so that to provide +! the most convenient use of FLake. +! Within a 3D atmospheric prediction system, +! "flake_main" may be called in a DO loop within "flake_interface" +! for each grid-point where a lake is present. +! In this way, the driving atmospheric model should call "flake_interface" +! only once, passing the FLake variables to "flake_interface" as 2D fields. +! +! Lines embraced with "!_tmp" contain temporary parts of the code. +! These should be removed prior to using FLake in applications. +! Lines embraced/marked with "!_dev" may be replaced +! as improved parameterizations are developed and tested. +! Lines embraced/marked with "!_dm" are DM's comments +! that may be helpful to a user. +! +use machine, only: kind_phys + +USE data_parameters , ONLY : & + ireals, & ! KIND-type parameter for real variables + iintegers ! KIND-type parameter for "normal" integer variables + +USE flake_derivedtypes ! Definitions of several derived TYPEs + +USE flake_parameters , ONLY : & + tpl_T_f , & ! Fresh water freezing point [K] + tpl_rho_w_r , & ! Maximum density of fresh water [kg m^{-3}] + h_Snow_min_flk , & ! Minimum snow thickness [m] + h_Ice_min_flk ! Minimum ice thickness [m] + +USE flake_paramoptic_ref ! Reference values of the optical characteristics + ! of the lake water, lake ice and snow + +USE flake_albedo_ref ! Reference values the albedo for the lake water, lake ice and snow + +USE flake , ONLY : & + flake_main , & ! Subroutine, FLake driver + flake_radflux , & ! Subroutine, computes radiation fluxes at various depths + ! + T_snow_p_flk, T_snow_n_flk , & ! Temperature at the air-snow interface [K] + T_ice_p_flk, T_ice_n_flk , & ! Temperature at the snow-ice or air-ice interface [K] + T_mnw_p_flk, T_mnw_n_flk , & ! Mean temperature of the water column [K] + T_wML_p_flk, T_wML_n_flk , & ! Mixed-layer temperature [K] + T_bot_p_flk, T_bot_n_flk , & ! Temperature at the water-bottom sediment interface [K] + T_B1_p_flk, T_B1_n_flk , & ! Temperature at the bottom of the upper layer of the sediments [K] + C_T_p_flk, C_T_n_flk , & ! Shape factor (thermocline) + h_snow_p_flk, h_snow_n_flk , & ! Snow thickness [m] + h_ice_p_flk, h_ice_n_flk , & ! Ice thickness [m] + h_ML_p_flk, h_ML_n_flk , & ! Thickness of the mixed-layer [m] + H_B1_p_flk, H_B1_n_flk , & ! Thickness of the upper layer of bottom sediments [m] + ! + Q_snow_flk , & ! Heat flux through the air-snow interface [W m^{-2}] + Q_ice_flk , & ! Heat flux through the snow-ice or air-ice interface [W m^{-2}] + Q_w_flk , & ! Heat flux through the ice-water or air-water interface [W m^{-2}] + Q_bot_flk , & ! Heat flux through the water-bottom sediment interface [W m^{-2}] + I_atm_flk , & ! Radiation flux at the lower boundary of the atmosphere [W m^{-2}], + ! i.e. the incident radiation flux with no regard for the surface albedo + I_snow_flk , & ! Radiation flux through the air-snow interface [W m^{-2}] + I_ice_flk , & ! Radiation flux through the snow-ice or air-ice interface [W m^{-2}] + I_w_flk , & ! Radiation flux through the ice-water or air-water interface [W m^{-2}] + I_h_flk , & ! Radiation flux through the mixed-layer-thermocline interface [W m^{-2}] + I_bot_flk , & ! Radiation flux through the water-bottom sediment interface [W m^{-2}] + I_intm_0_h_flk , & ! Mean radiation flux over the mixed layer [W m^{-1}] + I_intm_h_D_flk , & ! Mean radiation flux over the thermocline [W m^{-1}] + Q_star_flk , & ! A generalized heat flux scale [W m^{-2}] + u_star_w_flk , & ! Friction velocity in the surface layer of lake water [m s^{-1}] + w_star_sfc_flk , & ! Convective velocity scale, using a generalized heat flux scale [m s^{-1}] + dMsnowdt_flk , & ! The rate of snow accumulation [kg m^{-2} s^{-1}] + T_bot_2_in_flk + + +USE SfcFlx , ONLY : & + SfcFlx_lwradwsfc , & ! Function, returns the surface long-wave radiation flux + SfcFlx_momsenlat ! Subroutine, computes fluxes of momentum and of sensible and latent heat + +!============================================================================== + +IMPLICIT NONE + +!============================================================================== +! +! Declarations + +! Input (procedure arguments) + +REAL (KIND = kind_phys), INTENT(IN) :: & + dMsnowdt_in , & ! The rate of snow accumulation [kg m^{-2} s^{-1}] + I_atm_in , & ! Solar radiation flux at the surface [W m^{-2}] + Q_atm_lw_in , & ! Long-wave radiation flux from the atmosphere [W m^{-2}] + height_u_in , & ! Height above the lake surface where the wind speed is measured [m] + height_tq_in , & ! Height where temperature and humidity are measured [m] + U_a_in , & ! Wind speed at z=height_u_in [m s^{-1}] + T_a_in , & ! Air temperature at z=height_tq_in [K] + q_a_in , & ! Air specific humidity at z=height_tq_in + P_a_in , & ! Surface air pressure [N m^{-2} = kg m^{-1} s^{-2}] + ch , & + cm , & + albedo_water, & ! Water surface albedo with respect to the solar radiation + water_extinc + +REAL (KIND = kind_phys), INTENT(IN) :: & + depth_w , & ! The lake depth [m] + fetch , & ! Typical wind fetch [m] + depth_bs , & ! Depth of the thermally active layer of the bottom sediments [m] + T_bs , & ! Temperature at the outer edge of + ! the thermally active layer of the bottom sediments [K] + par_Coriolis , & ! The Coriolis parameter [s^{-1}] + del_time ! The model time step [s] + +REAL (KIND = kind_phys), INTENT(IN) :: & + T_snow_in , & ! Temperature at the air-snow interface [K] + T_ice_in , & ! Temperature at the snow-ice or air-ice interface [K] + T_mnw_in , & ! Mean temperature of the water column [K] + T_wML_in , & ! Mixed-layer temperature [K] + T_bot_in , & ! Temperature at the water-bottom sediment interface [K] + T_B1_in , & ! Temperature at the bottom of the upper layer of the sediments [K] + C_T_in , & ! Shape factor (thermocline) + h_snow_in , & ! Snow thickness [m] + h_ice_in , & ! Ice thickness [m] + h_ML_in , & ! Thickness of the mixed-layer [m] + H_B1_in , & ! Thickness of the upper layer of bottom sediments [m] + T_sfc_p , & ! Surface temperature at the previous time step [K] + T_bot_2_in + +! Input/Output (procedure arguments) + +!REAL (KIND = ireals), INTENT(INOUT) :: & +REAL (KIND = kind_phys) :: & + albedo_ice , & ! Ice surface albedo with respect to the solar radiation + albedo_snow ! Snow surface albedo with respect to the solar radiation + +!TYPE (opticpar_medium), INTENT(INOUT) :: & +TYPE (opticpar_medium) :: & + opticpar_water , & ! Optical characteristics of water + opticpar_ice , & ! Optical characteristics of ice + opticpar_snow ! Optical characteristics of snow + +! Output (procedure arguments) + +REAL (KIND = kind_phys), INTENT(OUT) :: & + T_snow_out , & ! Temperature at the air-snow interface [K] + T_ice_out , & ! Temperature at the snow-ice or air-ice interface [K] + T_mnw_out , & ! Mean temperature of the water column [K] + T_wML_out , & ! Mixed-layer temperature [K] + T_bot_out , & ! Temperature at the water-bottom sediment interface [K] + T_B1_out , & ! Temperature at the bottom of the upper layer of the sediments [K] + C_T_out , & ! Shape factor (thermocline) + h_snow_out , & ! Snow thickness [m] + h_ice_out , & ! Ice thickness [m] + h_ML_out , & ! Thickness of the mixed-layer [m] + H_B1_out , & ! Thickness of the upper layer of bottom sediments [m] + T_sfc_n , & ! Updated surface temperature [K] + hflx_out , & ! sensibl heat flux + evap_out , & ! Latent heat flux + T_bot_2_out , & ! Bottom temperature + ustar , & + q_sfc , & + chh , & + cmm + +! Local variables of type REAL + +REAL (KIND = kind_phys) :: & + Q_momentum , & ! Momentum flux [N m^{-2}] + Q_sensible , & ! Sensible heat flux [W m^{-2}] + Q_latent , & ! Latent heat flux [W m^{-2}] + Q_watvap , & ! Flux of water vapour [kg m^{-2} s^{-1}] + rho_a + +! ADDED by Shaobo Zhang +LOGICAL lflk_botsed_use +!REAL (KIND = kind_phys) :: T_bot_2_in, T_bot_2_out + +!============================================================================== +! Start calculations +!------------------------------------------------------------------------------ + lflk_botsed_use = .TRUE. +!------------------------------------------------------------------------------ +! Set albedos of the lake water, lake ice and snow +!------------------------------------------------------------------------------ + +! Use default value +! albedo_water = albedo_water_ref +! Use empirical formulation proposed by Mironov and Ritter (2004) for GME +!_nu albedo_ice = albedo_whiteice_ref +!albedo_ice = EXP(-c_albice_MR*(tpl_T_f-T_sfc_p)/tpl_T_f) +!albedo_ice = albedo_whiteice_ref*(1.0-albedo_ice) + albedo_blueice_ref*albedo_ice +! Snow is not considered +!albedo_snow = albedo_ice +albedo_ice = albedo_whiteice_ref +albedo_snow = albedo_ice +opticpar_water%extincoef_optic(1) = water_extinc +!print*,'albedo= ',albedo_water,albedo_ice,albedo_snow + +!------------------------------------------------------------------------------ +! Set optical characteristics of the lake water, lake ice and snow +!------------------------------------------------------------------------------ + +! Use default values +opticpar_water = opticpar_water_ref +opticpar_ice = opticpar_ice_opaque ! Opaque ice +opticpar_snow = opticpar_snow_opaque ! Opaque snow + +!print*,'opticpar = ',opticpar_water, opticpar_ice,opticpar_snow + +!------------------------------------------------------------------------------ +! Set initial values +!------------------------------------------------------------------------------ +!print*,'Inter depth_w=',depth_w +!print*,'Inter depth_bs=',depth_bs + +T_snow_p_flk = T_snow_in +T_ice_p_flk = T_ice_in +T_mnw_p_flk = T_mnw_in +T_wML_p_flk = T_wML_in +T_bot_p_flk = T_bot_in +T_B1_p_flk = T_B1_in +C_T_p_flk = C_T_in +h_snow_p_flk = h_snow_in +h_ice_p_flk = h_ice_in +h_ML_p_flk = h_ML_in +H_B1_p_flk = H_B1_in +T_bot_2_in_flk = T_bot_2_in + +!write(71,120) T_sfc_p,T_mnw_in,T_wML_in,T_bot_in,T_B1_in,T_bot_2_in + 120 format(1x,6(f12.5,1x)) +!------------------------------------------------------------------------------ +! Set the rate of snow accumulation +!------------------------------------------------------------------------------ + +dMsnowdt_flk = dMsnowdt_in + +!------------------------------------------------------------------------------ +! Compute solar radiation fluxes (positive downward) +!------------------------------------------------------------------------------ + +I_atm_flk = I_atm_in +CALL flake_radflux ( depth_w, albedo_water, albedo_ice, albedo_snow, & + opticpar_water, opticpar_ice, opticpar_snow, & + depth_bs ) + +!------------------------------------------------------------------------------ +! Compute long-wave radiation fluxes (positive downward) +!------------------------------------------------------------------------------ + +Q_w_flk = Q_atm_lw_in ! Radiation of the atmosphere +Q_w_flk = Q_w_flk - SfcFlx_lwradwsfc(T_sfc_p) ! Radiation of the surface (notice the sign) + +!------------------------------------------------------------------------------ +! Compute the surface friction velocity and fluxes of sensible and latent heat +!------------------------------------------------------------------------------ + +CALL SfcFlx_momsenlat ( height_u_in, height_tq_in, fetch, & + U_a_in, T_a_in, q_a_in, T_sfc_p, P_a_in, h_ice_p_flk, & + Q_momentum, Q_sensible, Q_latent, Q_watvap, q_sfc, rho_a ) + +u_star_w_flk = SQRT(-Q_momentum/tpl_rho_w_r) +ustar = u_star_w_flk + +!------------------------------------------------------------------------------ +! Compute heat fluxes Q_snow_flk, Q_ice_flk, Q_w_flk +!------------------------------------------------------------------------------ + +Q_w_flk = Q_w_flk - Q_sensible - Q_latent ! Add sensible and latent heat fluxes (notice the signs) +IF(h_ice_p_flk.GE.h_Ice_min_flk) THEN ! Ice exists + IF(h_snow_p_flk.GE.h_Snow_min_flk) THEN ! There is snow above the ice + Q_snow_flk = Q_w_flk + Q_ice_flk = 0.0 + Q_w_flk = 0.0 + ELSE ! No snow above the ice + Q_snow_flk = 0.0 + Q_ice_flk = Q_w_flk + Q_w_flk = 0.0 + END IF +ELSE ! No ice-snow cover + Q_snow_flk = 0.0 + Q_ice_flk = 0.0 +END IF + +!------------------------------------------------------------------------------ +! Advance FLake variables +!------------------------------------------------------------------------------ + +CALL flake_main ( depth_w, depth_bs, T_bs, par_Coriolis, & + opticpar_water%extincoef_optic(1), & + del_time, T_sfc_p, T_sfc_n, T_bot_2_in_flk, & + T_bot_2_out ) + +!------------------------------------------------------------------------------ +! Set output values +!------------------------------------------------------------------------------ + +T_snow_out = T_snow_n_flk +T_ice_out = T_ice_n_flk +T_mnw_out = T_mnw_n_flk +T_wML_out = T_wML_n_flk +T_bot_out = T_bot_n_flk +T_B1_out = T_B1_n_flk +C_T_out = C_T_n_flk +h_snow_out = h_snow_n_flk +h_ice_out = h_ice_n_flk +h_ML_out = h_ML_n_flk +H_B1_out = H_B1_n_flk +hflx_out = Q_sensible +evap_out = Q_watvap +chh = ch * U_a_in * rho_a +cmm = cm * U_a_in + +!write(72,120) T_sfc_n,T_mnw_out,T_wML_out,T_bot_out,T_B1_out,T_bot_2_out +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END SUBROUTINE flake_interface + +END MODULE module_FLake diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 new file mode 100644 index 000000000..2af274f4f --- /dev/null +++ b/physics/flake_driver.F90 @@ -0,0 +1,394 @@ +!> \file flake_driver.F90 +!! This file contains the flake scheme driver. + +!> This module contains the CCPP-compliant flake scheme driver. + module flake_driver + + implicit none + + private + + public :: flake_driver_init, flake_driver_run, flake_driver_finalize + + contains + +!> \section arg_table_flake_driver_init Argument Table +!! \htmlinclude flake_driver_init.html +!! + subroutine flake_driver_init (errmsg, errflg) + + implicit none + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + end subroutine flake_driver_init + +!> \section arg_table_flake_driver_finalize Argument Table +!! \htmlinclude flake_driver_finalize.html +!! + subroutine flake_driver_finalize (errmsg, errflg) + + implicit none + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + end subroutine flake_driver_finalize + +!> \section arg_table_flake_driver_run Argument Table +!! \htmlinclude flake_driver_run.html +!! + SUBROUTINE flake_driver_run ( & +! ---- Inputs + im, ps, t1, q1, wind, & + dlwflx, dswsfc, weasd, lakedepth, & + lake, xlat, delt, zlvl, elev, & + wet, flag_iter, yearlen, julian, imon, & +! ---- in/outs + snwdph, hice, tsurf, fice, T_sfc, hflx, evap, & + ustar, qsfc, ch, cm, chh, cmm, & + errmsg, errflg ) + +!============================================================================== +! +! Declarations +! use module_flake_ini, only:flake_init + use module_FLake +! use flake_albedo_ref +! use data_parameters +! use flake_derivedtypes +! use flake_paramoptic_ref +! use flake_parameters + use machine , only : kind_phys +! use funcphys, only : fpvs +! use physcons, only : grav => con_g, cp => con_cp, & +! & hvap => con_hvap, rd => con_rd, & +! & eps => con_eps, epsm1 => con_epsm1, & +! & rvrdm1 => con_fvirt + +!============================================================================== +IMPLICIT NONE + + integer, intent(in) :: im, imon,yearlen +! integer, dimension(im), intent(in) :: islmsk + + real (kind=kind_phys), dimension(im), intent(in) :: ps, wind, & + & t1, q1, dlwflx, dswsfc, zlvl, elev + + real (kind=kind_phys), intent(in) :: delt + + real (kind=kind_phys), dimension(im), intent(in) :: & + & xlat, weasd, lakedepth + + real (kind=kind_phys),dimension(im),intent(inout) :: & + & snwdph, hice, tsurf, t_sfc, hflx, evap, fice, ustar, qsfc, & + & ch, cm, chh, cmm + + real (kind=kind_phys), intent(in) :: julian + + logical, dimension(im), intent(in) :: flag_iter, wet, lake + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +! --- locals + + real (kind=kind_phys) , parameter :: lake_pct_min = 0.1 + + real (kind=kind_phys), dimension(im) :: & + T_snow , & ! Temperature at the air-snow interface [K] + T_ice , & ! Temperature at the snow-ice or air-ice interface [K] + T_mnw , & ! Mean temperature of the water column [K] + T_wML , & ! Mixed-layer temperature [K] + T_bot , & ! Temperature at the water-bottom sediment interface [K] + T_B1 , & ! Temperature at the upper layer of the sediments [K] + C_T , & ! Shape factor (thermocline) + fetch , & ! Typical wind fetch [m] + h_ML , & ! Thickness of the mixed-layer [m] + H_B1 , & ! Thickness of the upper layer of bottom sediments [m] + w_albedo , & ! + w_extinc + +! Input (procedure arguments) + +REAL (KIND = kind_phys) :: & + + dMsnowdt_in , & ! The rate of snow accumulation [kg m^{-2} s^{-1}] + I_atm_in , & ! Solar radiation flux at the surface [W m^{-2}] + Q_atm_lw_in , & ! Long-wave radiation flux from the atmosphere [W m^{-2}] + height_u_in , & ! Height above the lake surface where the wind speed is measured [m] + height_tq_in , & ! Height where temperature and humidity are measured [m] + U_a_in , & ! Wind speed at z=height_u_in [m s^{-1}] + T_a_in , & ! Air temperature at z=height_tq_in [K] + q_a_in , & ! Air specific humidity at z=height_tq_in + P_a_in ! Surface air pressure [N m^{-2} = kg m^{-1} s^{-2}] + +REAL (KIND = kind_phys) :: & + depth_w , & ! The lake depth [m] + fetch_in , & ! Typical wind fetch [m] + depth_bs_in , & ! Depth of the thermally active layer of the bottom sediments [m] + T_bs_in , & ! Temperature at the outer edge of + ! the thermally active layer of the bottom sediments [K] + par_Coriolis , & ! The Coriolis parameter [s^{-1}] + del_time ! The model time step [s] + +REAL (KIND = kind_phys) :: & + T_snow_in , & ! Temperature at the air-snow interface [K] + T_ice_in , & ! Temperature at the snow-ice or air-ice interface [K] + T_mnw_in , & ! Mean temperature of the water column [K] + T_wML_in , & ! Mixed-layer temperature [K] + T_bot_in , & ! Temperature at the water-bottom sediment interface [K] + T_B1_in , & ! Temperature at the bottom of the upper layer of the sediments [K] + C_T_in , & ! Shape factor (thermocline) + h_snow_in , & ! Snow thickness [m] + h_ice_in , & ! Ice thickness [m] + h_ML_in , & ! Thickness of the mixed-layer [m] + H_B1_in , & ! Thickness of the upper layer of bottom sediments [m] + T_sfc_in , & ! Surface temperature at the previous time step [K] + ch_in , & + cm_in , & + albedo_water , & + water_extinc + +REAL (KIND = kind_phys) :: & + T_snow_out , & ! Temperature at the air-snow interface [K] + T_ice_out , & ! Temperature at the snow-ice or air-ice interface [K] + T_mnw_out , & ! Mean temperature of the water column [K] + T_wML_out , & ! Mixed-layer temperature [K] + T_bot_out , & ! Temperature at the water-bottom sediment interface [K] + T_B1_out , & ! Temperature at the bottom of the upper layer of the sediments [K] + C_T_out , & ! Shape factor (thermocline) + h_snow_out , & ! Snow thickness [m] + h_ice_out , & ! Ice thickness [m] + h_ML_out , & ! Thickness of the mixed-layer [m] + H_B1_out , & ! Thickness of the upper layer of bottom sediments [m] + T_sfc_out , & ! surface temperature [K] + T_sfc_n , & ! Updated surface temperature [K] + u_star , & + q_sfc , & + chh_out , & + cmm_out + +REAL (KIND = kind_phys) :: & + Q_momentum , & ! Momentum flux [N m^{-2}] + Q_SHT_flx , & ! Sensible heat flux [W m^{-2}] + Q_LHT_flx , & ! Latent heat flux [W m^{-2}] + Q_watvap ! Flux of water vapour [kg m^{-2} s^{-1}] + +REAL (KIND = kind_phys) :: & + lake_depth_max, T_bot_2_in, T_bot_2_out, dxlat,tb,tr,tt,temp,Kbar, DelK + +INTEGER :: i,ipr,iter + +LOGICAL :: lflk_botsed_use +logical :: flag(im) +CHARACTER(LEN=*), PARAMETER :: FMT2 = "(1x,8(F12.4,1x))" + +!============================================================================== +! Start calculations +!------------------------------------------------------------------------------ +! FLake_write need to assign original value to make the model somooth + + lake_depth_max = 60.0 + ipr = min(im,10) + +! --- ... set flag for lake points + + do i = 1, im + flag(i) = (wet(i) .and. flag_iter(i)) + enddo + + Kbar=3.5 + DelK=3.0 + + do i = 1, im + if (flag(i)) then + if( lake(i) ) then + print*,'lake depth=',lakedepth + T_ice(i) = 273.15 + T_snow(i) = 273.15 + fetch(i) = 2.0E+03 + C_T(i) = 0.50 + + dxlat = 57.29578*abs(xlat(i)) + tt = 29.275+0.0813*dxlat-0.0052*dxlat*dxlat-0.0038*elev(i)+273.15 + tb = 29.075-0.7566*dxlat+0.0051*dxlat*dxlat-0.0038*elev(i)+273.15 +! if(fice(i).le.0.0) then +! h_ice(i) = 0.0 +! h_snow(i)= 0.0 +! endif + if(snwdph(i).gt.0.0 .or. hice(i).gt.0.0) then + if(tsurf(i).lt.T_ice(i)) then + T_sfc(i) = T_ice(i) + else + T_sfc(i) = tsurf(i) + endif + else +! if(tsurf(i).lt.tt) then +! T_sfc(i) = tt +! else +! T_sfc(i) = tsurf(i) +! endif + T_sfc(i) = 0.2*tt + 0.8* tsurf(i) + endif + + T_bot(i) = tb + T_B1(i) = tb + +! if(lakedepth(i).lt.10.0) then +! T_bot(i) = T_sfc(i) +! T_B1(i) = T_bot(i) +! endif + + T_mnw(i) = C_T(i)*T_sfc(i)+(1-C_T(i))*T_bot(i) + T_wML(i) = C_T(i)*T_sfc(i)+(1-C_T(i))*T_bot(i) + h_ML(i) = C_T(i)* min ( lakedepth(i), lake_depth_max ) + H_B1(i) = min ( lakedepth(i),4.0) + hflx(i) = 0.0 + evap(i) = 0.0 + +! compute albedo as a function of julian day and latitute + temp = 2*3.14159265*(julian-1)/float(yearlen) + temp = 0.006918-0.399912*cos(temp)+0.070257*sin(temp)- & + 0.006758*cos(2.0*temp)+0.000907*sin(2.0*temp) - & + 0.002697*cos(3.0*temp)+0.00148*sin(3.0*temp) + w_albedo(I) = 0.06/cos((xlat(i)-temp)/1.2) +! w_albedo(I) = 0.06 +! compute water extinction coefficient as a function of julian day + if(julian.lt.90 .or. julian .gt. 333) then + w_extinc(i) = Kbar-Kbar/DelK + else + w_extinc(i) = Kbar+Kbar/DelK*sin(2*3.14159265*(julian-151)/244) + endif +! w_extinc(i) = 3.0 + +! write(65,1002) julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) +! print 1002 julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) + print*,'inside flake driver' + print*, julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) + + endif !lake fraction and depth + endif !flag + enddo + 1001 format ( 'At icount=', i5, ' x = ', f5.2,5x, 'y = ', & + 1p, e12.3) +! 1002 format ( ' julian= ',F6.2,1x,5(F8.4,1x),3(f11.4,1x)) + 1002 format (I4,1x,3(f8.4,1x),6(f11.4,1x)) + + +! +! call lake interface + do i=1,im + if (flag(i)) then + if( lake(i) ) then + dMsnowdt_in = weasd(i)/delt + I_atm_in = dswsfc(i) + Q_atm_lw_in = dlwflx(i) + height_u_in = zlvl(i) + height_tq_in = zlvl(i) + U_a_in = wind(i) + T_a_in = t1(i) + q_a_in = q1(i) + P_a_in = ps(i) + ch_in = ch(i) + cm_in = cm(i) + albedo_water= w_albedo(i) + water_extinc= w_extinc(i) + + depth_w = min ( lakedepth(i), lake_depth_max ) + depth_bs_in = max ( 4.0, min ( depth_w * 0.2, 10.0 ) ) + fetch_in = fetch(i) + T_bs_in = T_bot(i) + par_Coriolis = 2 * 7.2921 / 100000. * sin ( xlat(i) ) + del_time = delt + + do iter=1,10 !interation loop + T_snow_in = T_snow(i) + T_ice_in = T_ice(i) + T_mnw_in = T_mnw(i) + T_wML_in = T_wML(i) + T_bot_in = T_bot(i) + T_B1_in = T_B1(i) + C_T_in = C_T(i) + h_snow_in = snwdph(i) + h_ice_in = hice(i) + h_ML_in = h_ML(i) + H_B1_in = H_B1(i) + T_sfc_in = T_sfc(i) + + T_bot_2_in = T_bot(i) + Q_SHT_flx = hflx(i) + Q_watvap = evap(i) + +!------------------------------------------------------------------------------ +! Set the rate of snow accumulation +!------------------------------------------------------------------------------ + + CALL flake_interface(dMsnowdt_in, I_atm_in, Q_atm_lw_in, height_u_in, & + height_tq_in, U_a_in, T_a_in, q_a_in, P_a_in, & + + depth_w, fetch_in, depth_bs_in, T_bs_in, par_Coriolis, del_time, & + T_snow_in, T_ice_in, T_mnw_in, T_wML_in, T_bot_in, T_B1_in, & + C_T_in, h_snow_in, h_ice_in, h_ML_in, H_B1_in, T_sfc_in, & + ch_in, cm_in, albedo_water, water_extinc, & +! + T_snow_out, T_ice_out, T_mnw_out, T_wML_out, T_bot_out, & + T_B1_out, C_T_out, h_snow_out, h_ice_out, h_ML_out, & + H_B1_out, T_sfc_out, Q_SHT_flx, Q_watvap, & +! + T_bot_2_in, T_bot_2_out,u_star, q_sfc,chh_out,cmm_out ) + +!------------------------------------------------------------------------------ +! Update output and values for previous time step +! + T_snow(i) = T_snow_out + T_ice(i) = T_ice_out + T_mnw(i) = T_mnw_out + T_wML(i) = T_wML_out + T_sfc(i) = T_sfc_out + Tsurf(i) = T_sfc_out + T_bot(i) = T_bot_out + T_B1(i) = T_B1_out + C_T(i) = C_T_out + h_ML(i) = h_ML_out + H_B1(i) = H_B1_out + ustar(i) = u_star + qsfc(i) = q_sfc + chh(i) = chh_out + cmm(i) = cmm_out + snwdph(i) = h_snow_out + hice(i) = h_ice_out + evap(i) = Q_watvap + hflx(i) = Q_SHT_flx + + if(hice(i) .gt. 0.0 .or. snwdph(i) .gt. 0.0) then + fice(i) = 1.0 + else + fice(i) = 0.0 + endif + enddo !iter loop + endif !endif of lake + endif !endif of flag + + ENDDO + + 125 format(1x,i2,1x,i2,1x,i2,1x,6(1x,f14.8)) + 126 format(1x,i2,1x,i2,1x,6(1x,f14.8)) + 127 format(1x,i2,2(1x,f16.9)) +!------------------------------------------------------------------------------ +! End calculations +!============================================================================== + +END SUBROUTINE flake_driver_run + +!--------------------------------- + end module flake_driver diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta new file mode 100644 index 000000000..c70ad880e --- /dev/null +++ b/physics/flake_driver.meta @@ -0,0 +1,346 @@ +[ccpp-arg-table] + name = flake_driver_init + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = flake_driver_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = flake_driver_run + type = scheme +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[ps] + standard_name = surface_air_pressure + long_name = surface pressure + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t1] + standard_name = air_temperature_at_lowest_model_layer + long_name = mean temperature at lowest model layer + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[q1] + standard_name = water_vapor_specific_humidity_at_lowest_model_layer + long_name = water vapor specific humidity at lowest model layer + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[wind] + standard_name = wind_speed_at_lowest_model_layer + long_name = wind speed at lowest model level + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dlwflx] + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean + long_name = total sky surface downward longwave flux absorbed by the ground over ocean + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dswsfc] + standard_name = surface_downwelling_shortwave_flux + long_name = surface downwelling shortwave flux at current time + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[weasd] + standard_name = water_equivalent_accumulated_snow_depth_over_ocean + long_name = water equiv of acc snow depth over ocean + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lakedepth] + standard_name = lake_depth + long_name = lake depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[delt] + standard_name = time_step_for_dynamics + long_name = dynamics time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[zlvl] + standard_name = height_above_ground_at_lowest_model_layer + long_name = layer 1 height above ground (not MSL) + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[elev] + standard_name = orography + long_name = orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[wet] + standard_name = flag_nonzero_wet_surface_fraction + long_name = flag indicating presence of some ocean or lake surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[flag_iter] + standard_name = flag_for_iteration + long_name = flag for iteration + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[yearlen] + standard_name = number_of_days_in_year + long_name = number of days in a year + units = days + dimensions = () + type = integer + intent = in + optional = F +[julian] + standard_name = julian_day + long_name = julian day + units = days + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[imon] + standard_name = forecast_month + long_name = current forecast month + units = none + dimensions = () + type = integer + intent = in + optional = F +[snwdph] + standard_name = surface_snow_thickness_water_equivalent_over_ocean + long_name = water equivalent snow depth over ocean + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hice] + standard_name = sea_ice_thickness + long_name = sea ice thickness + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tsurf] + standard_name = surface_skin_temperature_after_iteration_over_ocean + long_name = surface skin temperature after iteration over ocean + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[t_sfc] + standard_name = surface_skin_temperature_over_ocean_interstitial + long_name = surface skin temperature over ocean (temporary use as interstitial) + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[hflx] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean + long_name = kinematic surface upward sensible heat flux over ocean + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[evap] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean + long_name = kinematic surface upward latent heat flux over ocean + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ustar] + standard_name = surface_friction_velocity_over_ocean + long_name = surface friction velocity over ocean + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qsfc] + standard_name = surface_specific_humidity_over_ocean + long_name = surface air saturation specific humidity over ocean + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ch] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean + long_name = surface exchange coeff heat & moisture over ocean + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[cm] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean + long_name = surface exchange coeff for momentum over ocean + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[chh] + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean + long_name = thermal exchange coefficient over ocean + units = kg m-2 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[cmm] + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean + long_name = momentum exchange coefficient over ocean + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index e21ddb3a7..33a1d3082 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -29,7 +29,7 @@ end subroutine sfc_ocean_finalize !! subroutine sfc_ocean_run & & ( im, cp, rd, eps, epsm1, hvap, rvrdm1, ps, t1, q1, & ! --- inputs - & tskin, cm, ch, prsl1, prslki, wet, wind, & + & tskin, cm, ch, prsl1, prslki, wet, lake, wind, & & flag_iter, & & qsurf, cmm, chh, gflux, evap, hflx, ep, & ! --- outputs & errmsg, errflg & @@ -102,7 +102,7 @@ subroutine sfc_ocean_run & real (kind=kind_phys), dimension(im), intent(in) :: ps, & & t1, q1, tskin, cm, ch, prsl1, prslki, wind - logical, dimension(im), intent(in) :: flag_iter, wet + logical, dimension(im), intent(in) :: flag_iter, wet, lake ! --- outputs: real (kind=kind_phys), dimension(im), intent(inout) :: qsurf, & @@ -138,6 +138,7 @@ subroutine sfc_ocean_run & ! rho is density, qss is sat. hum. at surface if ( flag(i) ) then + if(.not.lake(i)) then q0 = max( q1(i), 1.0e-8 ) rho = prsl1(i) / (rd*t1(i)*(1.0 + rvrdm1*q0)) @@ -166,6 +167,7 @@ subroutine sfc_ocean_run & hflx(i) = hflx(i) * tem * cpinv evap(i) = evap(i) * tem * hvapi endif + endif !end of if not lake enddo ! return diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index d60c1ce2c..733e69f54 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -153,6 +153,14 @@ type = logical intent = in optional = F +[lake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F [wind] standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level From ec6111c9b75c427044542e06dc5b5ddcf7f8d168 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 13 Jul 2020 11:35:45 -0600 Subject: [PATCH 241/404] make unit 'degree' singular --- physics/GFS_GWD_generic.meta | 2 +- physics/GFS_rrtmgp_sw_pre.meta | 2 +- physics/cires_ugwp.meta | 8 ++++---- physics/drag_suite.meta | 2 +- physics/gwdps.meta | 2 +- physics/rascnv.meta | 2 +- physics/samfdeepcnv.meta | 2 +- physics/samfshalcnv.meta | 2 +- physics/sascnvn.meta | 2 +- physics/sfc_sice.meta | 2 +- physics/shalcnv.meta | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 7f987f28f..a06cf02b6 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -105,7 +105,7 @@ [theta] standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with_respect to east of maximum subgrid orographic variations - units = degrees + units = degree dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 73df740e1..3a96e1522 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -191,4 +191,4 @@ ######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_sw_pre_finalize - type = scheme \ No newline at end of file + type = scheme diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index bee052286..abc2e2187 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -337,7 +337,7 @@ [theta] standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with_respect to east of maximum subgrid orographic variations - units = degrees + units = degree dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -405,9 +405,9 @@ intent = in optional = F [xlat_d] - standard_name = latitude_degree - long_name = latitude in degrees north - units = degrees_north + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index cc97f521f..dfcac8582 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -239,7 +239,7 @@ [theta] standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with respect to east of maximum subgrid orographic variations - units = degrees + units = degree dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/gwdps.meta b/physics/gwdps.meta index d843e6d53..655c085ac 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -203,7 +203,7 @@ [theta] standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with respect to east of maximum subgrid orographic variations - units = degrees + units = degree dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/rascnv.meta b/physics/rascnv.meta index c2ad6bf3f..f83699347 100644 --- a/physics/rascnv.meta +++ b/physics/rascnv.meta @@ -83,7 +83,7 @@ optional = F [con_t0c] standard_name = temperature_at_zero_celsius - long_name = temperature at 0 degrees Celsius + long_name = temperature at 0 degree Celsius units = K dimensions = () type = real diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 2a134bac7..4185764e3 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -135,7 +135,7 @@ optional = F [t0c] standard_name = temperature_at_zero_celsius - long_name = temperature at 0 degrees Celsius + long_name = temperature at 0 degree Celsius units = K dimensions = () type = real diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index 0fd6c2922..09150adb4 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -135,7 +135,7 @@ optional = F [t0c] standard_name = temperature_at_zero_celsius - long_name = temperature at 0 degrees Celsius + long_name = temperature at 0 degree Celsius units = K dimensions = () type = real diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index dbc10783a..2e386bc43 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -91,7 +91,7 @@ optional = F [t0c] standard_name = temperature_at_zero_celsius - long_name = temperature at 0 degrees Celsius + long_name = temperature at 0 degree Celsius units = K dimensions = () type = real diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index dc08e0170..f916d09fd 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -91,7 +91,7 @@ optional = F [t0c] standard_name = temperature_at_zero_celsius - long_name = temperature at 0 degrees Celsius + long_name = temperature at 0 degree Celsius units = K dimensions = () type = real diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index 2a508cb0b..d56e1da3b 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -107,7 +107,7 @@ optional = F [t0c] standard_name = temperature_at_zero_celsius - long_name = temperature at 0 degrees Celsius + long_name = temperature at 0 degree Celsius units = K dimensions = () type = real From 71215b21a72d7e160a2d3c2fc83579cf10dd5602 Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Mon, 13 Jul 2020 11:28:37 -0700 Subject: [PATCH 242/404] Update GFS_rrtmg_pre.meta --- physics/GFS_rrtmg_pre.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index b206ec9ed..2c2df364c 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -1,4 +1,4 @@ -e[ccpp-arg-table] +[ccpp-arg-table] name = GFS_rrtmg_pre_init type = scheme From 1c3803309fe28702a901c71ba8853fb8113146f5 Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Mon, 13 Jul 2020 13:22:42 -0700 Subject: [PATCH 243/404] added missing intent and optional keys to many arguments, removed some duplicates --- physics/GFS_DCNV_generic.meta | 1 + physics/GFS_GWD_generic.meta | 7 +++++++ physics/GFS_PBL_generic.meta | 32 +++++++++++++++++++++++++++++ physics/GFS_SCNV_generic.meta | 16 +++++++++++---- physics/cires_ugwp.meta | 10 +++++++++ physics/cu_gf_driver.meta | 12 +++++++++++ physics/module_MYNNPBL_wrapper.meta | 6 ++++++ physics/moninedmf.meta | 10 +++++++++ physics/samfdeepcnv.meta | 2 ++ physics/satmedmfvdif.meta | 14 +++++++++++++ physics/sfc_drv_ruc.meta | 9 -------- 11 files changed, 106 insertions(+), 13 deletions(-) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index aa2c99c6a..85a7cfa74 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -500,6 +500,7 @@ dimensions = () type = logical intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 7f987f28f..40a7937f4 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -162,6 +162,7 @@ type = real kind = kind_phys intent = inout + optional = F [dvdt] standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics @@ -170,6 +171,7 @@ type = real kind = kind_phys intent = inout + optional = F [dtdt] standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature @@ -187,6 +189,7 @@ type = real kind = kind_phys intent = inout + optional = F [dv3dt] standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag @@ -195,6 +198,7 @@ type = real kind = kind_phys intent = inout + optional = F [dt3dt] standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag @@ -220,6 +224,7 @@ dimensions = () type = logical intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -368,6 +373,8 @@ units = flag dimensions = () type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 1e08e3ef0..51962c37b 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -314,6 +314,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = out + optional = F [save_v] standard_name = y_wind_save long_name = y-wind before entering a physics scheme @@ -321,6 +323,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = out + optional = F [save_t] standard_name = air_temperature_save long_name = air temperature before entering a physics scheme @@ -328,6 +332,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = out + optional = F [save_q] standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme @@ -335,6 +341,8 @@ dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) type = real kind = kind_phys + intent = out + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -358,6 +366,7 @@ dimensions = () type = logical intent = in + optional = F [ugrs] standard_name = x_wind long_name = zonal wind @@ -365,6 +374,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [vgrs] standard_name = y_wind long_name = meridional wind @@ -372,6 +383,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [tgrs] standard_name = air_temperature long_name = model layer mean temperature @@ -379,6 +392,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -688,6 +703,7 @@ dimensions = () type = logical intent = in + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -1331,6 +1347,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [vgrs] standard_name = y_wind long_name = meridional wind @@ -1338,6 +1356,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [tgrs] standard_name = air_temperature long_name = model layer mean temperature @@ -1345,6 +1365,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [qgrs] standard_name = tracer_concentration long_name = model layer mean tracer concentration @@ -1352,6 +1374,8 @@ dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) type = real kind = kind_phys + intent = in + optional = F [save_u] standard_name = x_wind_save long_name = x-wind before entering a physics scheme @@ -1359,6 +1383,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [save_v] standard_name = y_wind_save long_name = y-wind before entering a physics scheme @@ -1366,6 +1392,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [save_t] standard_name = air_temperature_save long_name = air temperature before entering a physics scheme @@ -1373,6 +1401,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = in + optional = F [save_q] standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme @@ -1380,6 +1410,8 @@ dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) type = real kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index 702fe6df0..e11e3fbc3 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -76,7 +76,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = in + intent = out + optional = F [save_v] standard_name = y_wind_save long_name = y-wind before entering a physics scheme @@ -84,7 +85,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = in + intent = out + optional = F [save_t] standard_name = air_temperature_save long_name = air temperature before entering a physics scheme @@ -92,7 +94,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = F [save_qv] standard_name = water_vapor_specific_humidity_save @@ -101,7 +103,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = inout + intent = out optional = F [flag_for_scnv_generic_tend] standard_name = flag_for_generic_shallow_convection_tendency @@ -110,6 +112,7 @@ dimensions = () type = logical intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -241,6 +244,7 @@ type = real kind = kind_phys intent = in + optional = F [save_v] standard_name = y_wind_save long_name = y-wind before entering a physics scheme @@ -249,6 +253,7 @@ type = real kind = kind_phys intent = in + optional = F [save_t] standard_name = air_temperature_save long_name = air temperature before entering a physics scheme @@ -284,6 +289,7 @@ type = real kind = kind_phys intent = inout + optional = F [dv3dt] standard_name = cumulative_change_in_y_wind_due_to_shallow_convection long_name = cumulative change in y wind due to shallow convection @@ -292,6 +298,7 @@ type = real kind = kind_phys intent = inout + optional = F [dt3dt] standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shal conv. @@ -430,6 +437,7 @@ dimensions = () type = logical intent = in + optional = F [imfshalcnv] standard_name = flag_for_mass_flux_shallow_convection_scheme long_name = flag for mass-flux shallow convection scheme diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index deccde586..ef4cdbb29 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -858,6 +858,7 @@ type = real kind = kind_phys intent = inout + optional = F [ldv3dt_ogw] standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag @@ -866,6 +867,7 @@ type = real kind = kind_phys intent = inout + optional = F [ldt3dt_ogw] standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag @@ -874,6 +876,7 @@ type = real kind = kind_phys intent = inout + optional = F [ldu3dt_cgw] standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in x wind due to convective gravity wave drag @@ -882,6 +885,7 @@ type = real kind = kind_phys intent = inout + optional = F [ldv3dt_cgw] standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in y wind due to convective gravity wave drag @@ -890,6 +894,7 @@ type = real kind = kind_phys intent = inout + optional = F [ldt3dt_cgw] standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag long_name = cumulative change in temperature due to convective gravity wave drag @@ -898,12 +903,15 @@ type = real kind = kind_phys intent = inout + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical + intent = in + optional = F [lssav] standard_name = flag_diagnostics long_name = logical flag for storing diagnostics @@ -911,6 +919,7 @@ dimensions = () type = logical intent = in + optional = F [flag_for_gwd_generic_tend] standard_name = flag_for_generic_gravity_wave_drag_tendency long_name = true if GFS_GWD_generic should calculate tendencies @@ -918,6 +927,7 @@ dimensions = () type = logical intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index e92949080..d684ce331 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -357,6 +357,7 @@ dimensions = () type = logical intent = in + optional = F [flag_for_dcnv_generic_tend] standard_name = flag_for_generic_deep_convection_tendency long_name = true if GFS_DCNV_generic should calculate tendencies @@ -364,6 +365,7 @@ dimensions = () type = logical intent = in + optional = F [du3dt_SCNV] standard_name = cumulative_change_in_x_wind_due_to_shallow_convection long_name = cumulative change in x wind due to shallow convection @@ -372,6 +374,7 @@ type = real kind = kind_phys intent = inout + optional = F [dv3dt_SCNV] standard_name = cumulative_change_in_y_wind_due_to_shallow_convection long_name = cumulative change in y wind due to shallow convection @@ -380,6 +383,7 @@ type = real kind = kind_phys intent = inout + optional = F [dt3dt_SCNV] standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shallow convection @@ -388,6 +392,7 @@ type = real kind = kind_phys intent = inout + optional = F [dq3dt_SCNV] standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection long_name = cumulative change in water vapor specific humidity due to shallow convection @@ -396,6 +401,7 @@ type = real kind = kind_phys intent = inout + optional = F [du3dt_DCNV] standard_name = cumulative_change_in_x_wind_due_to_deep_convection long_name = cumulative change in x wind due to deep convection @@ -404,6 +410,7 @@ type = real kind = kind_phys intent = inout + optional = F [dv3dt_DCNV] standard_name = cumulative_change_in_y_wind_due_to_deep_convection long_name = cumulative change in y wind due to deep convection @@ -412,6 +419,7 @@ type = real kind = kind_phys intent = inout + optional = F [dt3dt_DCNV] standard_name = cumulative_change_in_temperature_due_to_deep_convection long_name = cumulative change in temperature due to deep convection @@ -420,6 +428,7 @@ type = real kind = kind_phys intent = inout + optional = F [dq3dt_DCNV] standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection long_name = cumulative change in water vapor specific humidity due to deep convection @@ -428,6 +437,7 @@ type = real kind = kind_phys intent = inout + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -435,6 +445,7 @@ dimensions = () type = logical intent = in + optional = F [qdiag3d] standard_name = flag_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields @@ -442,6 +453,7 @@ dimensions = () type = logical intent = in + optional = F [qci_conv] standard_name = convective_cloud_condesate_after_rainout long_name = convective cloud condesate after rainout diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 9833f7eba..c2fdc32c0 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -93,6 +93,8 @@ units = flag dimensions = () type = logical + intent = in + optional = F [lsidea] standard_name = flag_idealized_physics long_name = flag for idealized physics @@ -1047,6 +1049,7 @@ type = real kind = kind_phys intent = inout + optional = F [dq3dt_PBL] standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL @@ -1055,6 +1058,7 @@ type = real kind = kind_phys intent = inout + optional = F [dt3dt_PBL] standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL @@ -1062,6 +1066,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout + optional = F [htrsw] standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index a89660cac..196862ae6 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -498,6 +498,7 @@ dimensions = () type = logical intent = in + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -505,6 +506,7 @@ dimensions = () type = logical intent = in + optional = F [qdiag3d] standard_name = flag_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields @@ -512,6 +514,7 @@ dimensions = () type = logical intent = in + optional = F [lsidea] standard_name = flag_idealized_physics long_name = flag for idealized physics @@ -519,6 +522,7 @@ dimensions = () type = logical intent = in + optional = F [ntoz] standard_name = index_for_ozone long_name = tracer index for ozone mixing ratio @@ -535,6 +539,7 @@ type = real kind = kind_phys intent = inout + optional = F [dv3dt_PBL] standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL @@ -543,6 +548,7 @@ type = real kind = kind_phys intent = inout + optional = F [dt3dt_PBL] standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL @@ -551,6 +557,7 @@ type = real kind = kind_phys intent = inout + optional = F [dq3dt_PBL] standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL @@ -559,6 +566,7 @@ type = real kind = kind_phys intent = inout + optional = F [do3dt_PBL] standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL @@ -567,6 +575,7 @@ type = real kind = kind_phys intent = inout + optional = F [flag_for_pbl_generic_tend] standard_name = flag_for_generic_planetary_boundary_layer_tendency long_name = true if GFS_PBL_generic should calculate tendencies @@ -574,6 +583,7 @@ dimensions = () type = logical intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 2a134bac7..3fe7e1d55 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -263,6 +263,8 @@ units = flag dimensions = () type = logical + intent = in + optional = F [nthresh] standard_name = threshold_for_perturbed_vertical_velocity long_name = threshold used for perturbed vertical velocity diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index 6ff485565..c4230b950 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -550,6 +550,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout + optional = F [du3dt_PBL] standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL @@ -557,6 +559,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout + optional = F [dv3dt_PBL] standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL @@ -564,6 +568,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout + optional = F [dq3dt_PBL] standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL @@ -571,6 +577,8 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout + optional = F [do3dt_PBL] standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL @@ -578,18 +586,24 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + intent = inout + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields units = flag dimensions = () type = logical + intent = in + optional = F [qdiag3d] standard_name = flag_tracer_diagnostics_3D long_name = flag for 3d tracer diagnostic fields units = flag dimensions = () type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index edab5898c..7ea1a201d 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -388,15 +388,6 @@ type = integer intent = in optional = F -[qc] - standard_name = cloud_condensed_water_mixing_ratio_at_lowest_model_layer - long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) at lowest model layer - units = kg kg-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [fice] standard_name = sea_ice_concentration long_name = ice fraction over open water From 3852260724b85b4534058654ff975ef3948b18bc Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Mon, 13 Jul 2020 15:07:18 -0700 Subject: [PATCH 244/404] fix argument order for several routines --- physics/GFS_GWD_generic.meta | 20 ++-- physics/GFS_stochastics.meta | 44 ++++---- physics/GFS_surface_composites.meta | 18 ++-- physics/lsm_ruc_sfc_sice_interstitial.meta | 68 ++++++------ physics/module_MYNNSFC_wrapper.meta | 6 +- physics/samfdeepcnv.meta | 118 ++++++++++----------- physics/sfc_drv_ruc.meta | 16 ++- 7 files changed, 149 insertions(+), 141 deletions(-) diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 40a7937f4..1e5c3cf5a 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -66,6 +66,15 @@ kind = kind_phys intent = out optional = F +[theta] + standard_name = angle_from_east_of_maximum_subgrid_orographic_variations + long_name = angle with_respect to east of maximum subgrid orographic variations + units = degrees + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [varss] standard_name = standard_deviation_of_subgrid_orography_small_scale long_name = standard deviation of subgrid orography small scale @@ -73,7 +82,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = out optional = F [ocss] standard_name = convexity_of_subgrid_orography_small_scale @@ -102,15 +111,6 @@ kind = kind_phys intent = out optional = F -[theta] - standard_name = angle_from_east_of_maximum_subgrid_orographic_variations - long_name = angle with_respect to east of maximum subgrid orographic variations - units = degrees - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [sigma] standard_name = slope_of_subgrid_orography long_name = slope of subgrid orography diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index c4fad912e..bd0dbf487 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -57,24 +57,6 @@ type = logical intent = in optional = F -[zmtnblck] - standard_name = level_of_dividing_streamline - long_name = level of the dividing streamline - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sppt_wts] - standard_name = weights_for_stochastic_sppt_perturbation - long_name = weights for stochastic sppt perturbation - units = none - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [do_ca] standard_name = flag_for_cellular_automata long_name = cellular automata main switch @@ -100,6 +82,15 @@ kind = kind_phys intent = in optional = F +[si] + standard_name = vertical_sigma_coordinate_for_radiation_initialization + long_name = vertical sigma coordinate for radiation initialization + units = none + dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + type = real + kind = kind_phys + intent = in + optional = F [vfact_ca] standard_name = vertical_weight_for_ca long_name = vertical weight for ca @@ -109,15 +100,24 @@ kind = kind_phys intent = inout optional = F -[si] - standard_name = vertical_sigma_coordinate_for_radiation_initialization - long_name = vertical sigma coordinate for radiation initialization +[zmtnblck] + standard_name = level_of_dividing_streamline + long_name = level of the dividing streamline units = none - dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F +[sppt_wts] + standard_name = weights_for_stochastic_sppt_perturbation + long_name = weights for stochastic sppt perturbation + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [skebu_wts] standard_name = weights_for_stochastic_skeb_perturbation_of_x_wind long_name = weights for stochastic skeb perturbation of x wind diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index ff0ca9774..6c9fb5ba0 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -719,6 +719,15 @@ kind = kind_phys intent = inout optional = F +[adjsfcusw] + standard_name = surface_upwelling_shortwave_flux + long_name = surface upwelling shortwave flux at current time + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [adjsfcdsw] standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time @@ -737,15 +746,6 @@ kind = kind_phys intent = in optional = F -[adjsfcusw] - standard_name = surface_upwelling_shortwave_flux - long_name = surface upwelling shortwave flux at current time - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/lsm_ruc_sfc_sice_interstitial.meta b/physics/lsm_ruc_sfc_sice_interstitial.meta index 3b8213d78..bc3618703 100644 --- a/physics/lsm_ruc_sfc_sice_interstitial.meta +++ b/physics/lsm_ruc_sfc_sice_interstitial.meta @@ -9,14 +9,6 @@ type = integer intent = in optional = F -[kice] - standard_name = ice_vertical_dimension - long_name = vertical loop extent for ice levels, start at 1 - units = count - dimensions = () - type = integer - intent = in - optional = F [lsoil_ruc] standard_name = soil_vertical_dimension_for_land_surface_model long_name = number of soil layers internal to land surface model @@ -33,6 +25,14 @@ type = integer intent = in optional = F +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer + intent = in + optional = F [land] standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction @@ -49,15 +49,6 @@ type = logical intent = inout optional = F -[tiice] - standard_name = internal_ice_temperature - long_name = sea ice internal temperature - units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [stc] standard_name = soil_temperature long_name = soil temperature @@ -76,6 +67,15 @@ kind = kind_phys intent = in optional = F +[tiice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,ice_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -106,14 +106,6 @@ type = integer intent = in optional = F -[kice] - standard_name = ice_vertical_dimension - long_name = vertical loop extent for ice levels, start at 1 - units = count - dimensions = () - type = integer - intent = in - optional = F [lsoil_ruc] standard_name = soil_vertical_dimension_for_land_surface_model long_name = number of soil layers internal to land surface model @@ -130,6 +122,14 @@ type = integer intent = in optional = F +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer + intent = in + optional = F [land] standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction @@ -146,15 +146,6 @@ type = logical intent = inout optional = F -[tiice] - standard_name = internal_ice_temperature - long_name = sea ice internal temperature - units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [stc] standard_name = soil_temperature long_name = soil temperature @@ -173,6 +164,15 @@ kind = kind_phys intent = inout optional = F +[tiice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,ice_vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index cf366d3d4..655c65769 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -678,7 +678,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F [qflx_lnd] standard_name = kinematic_surface_upward_latent_heat_flux_over_land @@ -687,7 +687,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F [qflx_ice] standard_name = kinematic_surface_upward_latent_heat_flux_over_ice @@ -696,7 +696,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = F [qsfc] standard_name = surface_specific_humidity diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 3fe7e1d55..f0d787f59 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -265,65 +265,6 @@ type = logical intent = in optional = F -[nthresh] - standard_name = threshold_for_perturbed_vertical_velocity - long_name = threshold used for perturbed vertical velocity - units = m s-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[do_ca] - standard_name = flag_for_cellular_automata - long_name = cellular automata main switch - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ca_closure] - standard_name = flag_for_global_cellular_automata_closure - long_name = switch for ca on closure - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ca_entr] - standard_name = flag_for_global_cellular_automata_entr - long_name = switch for ca on entr - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ca_trigger] - standard_name = flag_for_global_cellular_automata_trigger - long_name = switch for ca on trigger - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ca_deep] - standard_name = fraction_of_cellular_automata_for_deep_convection - long_name = fraction of cellular automata for deep convection - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[rainevap] - standard_name = physics_field_for_coupling - long_name = physics_field_for_coupling - units = m2 s-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [cldwrk] standard_name = cloud_work_function long_name = cloud work function @@ -632,6 +573,65 @@ kind = kind_phys intent = in optional = F +[do_ca] + standard_name = flag_for_cellular_automata + long_name = cellular automata main switch + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ca_closure] + standard_name = flag_for_global_cellular_automata_closure + long_name = switch for ca on closure + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ca_entr] + standard_name = flag_for_global_cellular_automata_entr + long_name = switch for ca on entr + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ca_trigger] + standard_name = flag_for_global_cellular_automata_trigger + long_name = switch for ca on trigger + units = flag + dimensions = () + type = logical + intent = in + optional = F +[nthresh] + standard_name = threshold_for_perturbed_vertical_velocity + long_name = threshold used for perturbed vertical velocity + units = m s-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[ca_deep] + standard_name = fraction_of_cellular_automata_for_deep_convection + long_name = fraction of cellular automata for deep convection + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[rainevap] + standard_name = physics_field_for_coupling + long_name = physics_field_for_coupling + units = m2 s-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 7ea1a201d..c116a1f5b 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -388,6 +388,14 @@ type = integer intent = in optional = F +[ivegsrc] + standard_name = vegetation_type_dataset_choice + long_name = land use dataset choice + units = index + dimensions = () + type = integer + intent = in + optional = F [fice] standard_name = sea_ice_concentration long_name = ice fraction over open water @@ -604,7 +612,7 @@ kind = kind_phys intent = inout optional = F -[tskin_ocn] +[tskin_wat] standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K @@ -739,9 +747,9 @@ kind = kind_phys intent = inout optional = F -[tskin_wat] - standard_name = surface_skin_temperature_over_ocean_interstitial - long_name = surface skin temperature over ocean (temporary use as interstitial) +[tsnow] + standard_name = snow_temperature_bottom_first_layer + long_name = snow temperature at the bottom of first snow layer units = K dimensions = (horizontal_dimension) type = real From 82da19901a48e0d7759464a33d699af9af408b42 Mon Sep 17 00:00:00 2001 From: Jeremy McGibbon Date: Tue, 14 Jul 2020 09:31:10 -0700 Subject: [PATCH 245/404] updates based on review comments from @climbfuji --- physics/GFS_rrtmg_pre.meta | 2 +- physics/gscond.meta | 10 ---------- physics/sfc_ocean.meta | 36 ++++++++++++++++++------------------ 3 files changed, 19 insertions(+), 29 deletions(-) diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 2c2df364c..a06e718a5 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -101,7 +101,7 @@ standard_name = minimum_large_ice_fraction long_name = minimum large ice fraction in F-A mp scheme units = frac - dimensions = (horizontal_dimension) + dimensions = (2) type = real kind = kind_phys intent = in diff --git a/physics/gscond.meta b/physics/gscond.meta index 578280606..57156358f 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -1,13 +1,3 @@ -[ccpp-arg-table] - name = zhaocarr_gscond_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = zhaocarr_gscond_finalize - type = scheme - -######################################################################## [ccpp-arg-table] name = zhaocarr_gscond_run type = scheme diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index a5287e095..d60c1ce2c 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -77,7 +77,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -86,7 +86,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = surface layer mean temperature units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -95,7 +95,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = surface layer mean specific humidity units = kg kg-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -104,7 +104,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -113,7 +113,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -122,7 +122,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -131,7 +131,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = surface layer mean pressure units = Pa - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -140,7 +140,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -149,7 +149,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = logical intent = in optional = F @@ -157,7 +157,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -166,7 +166,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = logical intent = in optional = F @@ -174,7 +174,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -183,7 +183,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -192,7 +192,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -201,7 +201,7 @@ standard_name = upward_heat_flux_in_soil_over_ocean long_name = soil heat flux over ocean units = W m-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -210,7 +210,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -219,7 +219,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout @@ -228,7 +228,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ocean long_name = surface upward potential latent heat flux over ocean units = W m-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout From 8ecadc447520839d049a1a362af76effe9205ed2 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Wed, 15 Jul 2020 20:15:08 +0000 Subject: [PATCH 246/404] Updated the four files for S2S --- physics/GFS_surface_composites.F90 | 18 +++++++++++------- physics/GFS_surface_composites.meta | 8 ++++++++ physics/GFS_time_vary_pre.fv3.F90 | 10 +++++----- physics/GFS_time_vary_pre.fv3.meta | 8 ++++++++ 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 3734513d7..3e9d12770 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -24,7 +24,7 @@ end subroutine GFS_surface_composites_pre_finalize !> \section arg_table_GFS_surface_composites_pre_run Argument Table !! \htmlinclude GFS_surface_composites_pre_run.html !! - subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cplwav2atm, & + subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, & landfrac, lakefrac, lakedepth, oceanfrac, & frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorl_wat, & zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & @@ -38,7 +38,7 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl implicit none ! Interface variables - integer, intent(in ) :: im + integer, intent(in ) :: im, lkm logical, intent(in ) :: frac_grid, cplflx, cplwav2atm logical, dimension(im), intent(in ) :: flag_cice logical, dimension(im), intent(inout) :: dry, icy, lake, ocean, wet @@ -184,11 +184,15 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl ! to prepare to separate lake from ocean in later do i = 1, im - if(lakefrac(i) .ge. 0.15 .and. lakedepth(i) .gt. 1.0) then - lake(i) = .true. - else - lake(i) = .false. - endif + if(lkm == 1) then + if(lakefrac(i) .ge. 0.15 .and. lakedepth(i) .gt. 1.0) then + lake(i) = .true. + else + lake(i) = .false. + endif + else + lake(i) = .false. + endif enddo ! Assign sea ice temperature to interstitial variable diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index c24c112e2..84635623f 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -9,6 +9,14 @@ type = integer intent = in optional = F +[lkm] + standard_name = flag_for_lake_surface_scheme + long_name = flag for lake surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F [frac_grid] standard_name = flag_for_fractional_grid long_name = flag for fractional grid diff --git a/physics/GFS_time_vary_pre.fv3.F90 b/physics/GFS_time_vary_pre.fv3.F90 index b2674166c..5f72a6b27 100644 --- a/physics/GFS_time_vary_pre.fv3.F90 +++ b/physics/GFS_time_vary_pre.fv3.F90 @@ -65,8 +65,8 @@ end subroutine GFS_time_vary_pre_finalize !> \section arg_table_GFS_time_vary_pre_run Argument Table !! \htmlinclude GFS_time_vary_pre_run.html !! - subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & - nslwr, nhfrad, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, & + subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lkm, lsm, lsm_noahmp, nsswr, & + nslwr, nhfrad, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, & kdt, julian, yearlen, ipt, lprnt, lssav, lsswr, lslwr, solhr, errmsg, errflg) use machine, only: kind_phys @@ -75,7 +75,7 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & integer, intent(in) :: idate(4) integer, intent(in) :: jdat(1:8), idat(1:8) - integer, intent(in) :: lsm, lsm_noahmp, & + integer, intent(in) :: lkm, lsm, lsm_noahmp, & nsswr, nslwr, me, & master, nscyc, nhfrad logical, intent(in) :: debug @@ -121,7 +121,7 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & fhour = (sec + dtp)/con_hr kdt = nint((sec + dtp)/dtp) -! if(lsm == lsm_noahmp) then + if(lsm == lsm_noahmp .or. lkm == 1) then ! flake need this too !GJF* These calculations were originally in GFS_physics_driver.F90 for ! NoahMP. They were moved to this routine since they only depend @@ -158,7 +158,7 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & endif endif endif -! endif + endif ipt = 1 lprnt = .false. diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index 14081f8e4..04f7f1529 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -70,6 +70,14 @@ kind = kind_phys intent = in optional = F +[lkm] + standard_name = flag_for_lake_surface_scheme + long_name = flag for lake surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F [lsm] standard_name = flag_for_land_surface_scheme long_name = flag for land surface model From e22848195f094f0741c0beb4883e688cc32990f0 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 16 Jul 2020 15:07:35 +0000 Subject: [PATCH 247/404] Removed some print lines --- physics/GFS_surface_composites.F90 | 2 +- physics/flake_driver.F90 | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 3e9d12770..1e04a9d44 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -182,7 +182,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx endif enddo -! to prepare to separate lake from ocean in later +! to prepare to separate lake from ocean under water category do i = 1, im if(lkm == 1) then if(lakefrac(i) .ge. 0.15 .and. lakedepth(i) .gt. 1.0) then diff --git a/physics/flake_driver.F90 b/physics/flake_driver.F90 index 2af274f4f..b882c7404 100644 --- a/physics/flake_driver.F90 +++ b/physics/flake_driver.F90 @@ -213,7 +213,6 @@ SUBROUTINE flake_driver_run ( & do i = 1, im if (flag(i)) then if( lake(i) ) then - print*,'lake depth=',lakedepth T_ice(i) = 273.15 T_snow(i) = 273.15 fetch(i) = 2.0E+03 @@ -273,8 +272,8 @@ SUBROUTINE flake_driver_run ( & ! write(65,1002) julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) ! print 1002 julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) - print*,'inside flake driver' - print*, julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) +! print*,'inside flake driver' +! print*, julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) endif !lake fraction and depth endif !flag From e0422ea480572167611759b584cfba0f499f2508 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Fri, 17 Jul 2020 14:14:34 +0000 Subject: [PATCH 248/404] Changed radians to radian in flake_driver.meta file --- physics/flake_driver.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index c70ad880e..a40016010 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -136,7 +136,7 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys From a60979041fd91fe4b942332d1e6efb1c009f44fe Mon Sep 17 00:00:00 2001 From: Michael Iacono Date: Fri, 17 Jul 2020 22:52:12 +0000 Subject: [PATCH 249/404] Update for new RRTMG cloud overlap methods EXP and ER --- physics/GFS_rrtmg_pre.F90 | 132 +++++++---- physics/GFS_rrtmg_pre.meta | 9 + physics/physcons.F90 | 3 + physics/physparam.f | 8 + physics/radiation_clouds.f | 468 ++++++++++++++++++++++++++++++++++--- physics/radlw_main.f | 145 ++++++++++-- physics/radlw_main.meta | 9 + physics/radsw_main.f | 150 ++++++++++-- physics/radsw_main.meta | 9 + 9 files changed, 811 insertions(+), 122 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index d0826eb17..e4e8c10b0 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -33,7 +33,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input faerlw1, faerlw2, faerlw3, aerodp, & clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & clouds7, clouds8, clouds9, cldsa, & - mtopa, mbota, de_lgth, alb1d, errmsg, errflg) + mtopa, mbota, de_lgth, alpha, alb1d, errmsg, errflg) use machine, only: kind_phys use GFS_typedefs, only: GFS_statein_type, & @@ -146,6 +146,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota integer, dimension(size(Grid%xlon,1),3), intent(out) :: mtopa real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: alpha real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d character(len=*), intent(out) :: errmsg @@ -156,14 +157,14 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb - real(kind=kind_phys) :: es, qs, delt, tem0d + real(kind=kind_phys) :: es, qs, delt, tem0d, pfac real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & - cldcov, deltaq, cnvc, cnvw, & + dzb, hzb, cldcov, deltaq, cnvc, cnvw, & effrl, effri, effrr, effrs, rho, orho ! for Thompson MP real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & @@ -171,7 +172,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input qi_mp, qs_mp, nc_mp, ni_mp, nwfa real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db -! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,min(4,Model%ncnd)) :: ccnd real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 @@ -432,6 +433,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo ! --- ... level height and layer thickness (km) +! dz: Layer thickness between layer boundaries +! dzb: Layer thickness between layer centers (lowest is from surface to lowest layer center) +! hz: Height of each level (i.e. layer boundary) +! hzb: Height of each layer center tem0d = 0.001 * rog do i = 1, IM @@ -439,10 +444,20 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input dz(i,k) = tem0d * (tem2db(i,k+1) - tem2db(i,k)) * tvly(i,k) enddo -! hz(i,LMP) = 0.0 -! do k = LMK, 1, -1 -! hz(i,k) = hz(i,k+1) + dz(i,k) -! enddo + hz(i,LMP) = 0.0 + do k = LMK, 1, -1 + hz(i,k) = hz(i,k+1) + dz(i,k) + enddo + + do k = LMK, 1, -1 + pfac = (tem2db(i,k+1) - tem2da(i,k)) / (tem2db(i,k+1) - tem2db(i,k)) + hzb(i,k) = hz(i,k+1) + pfac * (hz(i,k) - hz(i,k+1)) + enddo + + do k = LMK-1, 1, -1 + dzb(i,k) = hzb(i,k) - hzb(i,k+1) + enddo + dzb(i,LMK) = hzb(i,LMK) - hz(i,LMP) enddo else ! input data from sfc to toa @@ -483,6 +498,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo ! --- ... level height and layer thickness (km) +! dz: Layer thickness between layer boundaries +! dzb: Layer thickness between layer centers (lowest is from surface to lowest layer center) +! hz: Height of each level (i.e. layer boundary) +! hzb: Height of each layer center tem0d = 0.001 * rog do i = 1, IM @@ -490,10 +509,20 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input dz(i,k) = tem0d * (tem2db(i,k) - tem2db(i,k+1)) * tvly(i,k) enddo -! hz(i,1) = 0.0 -! do k = 1, LMP -! hz(i,k+1) = hz(i,k) + dz(i,k) -! enddo + hz(i,1) = 0.0 + do k = 1, LMK + hz(i,k+1) = hz(i,k) + dz(i,k) + enddo + + do k = 1, LMK + pfac = (tem2db(i,k) - tem2da(i,k)) / (tem2db(i,k) - tem2db(i,k+1)) + hzb(i,k) = hz(i,k) + pfac * (hz(i,k+1) - hz(i,k)) + enddo + + do k = 2, LMK + dzb(i,k) = hzb(i,k) - hzb(i,k-1) + enddo + dzb(i,1) = hzb(i,1) - hz(i,1) enddo endif ! end_if_ivflip @@ -815,19 +844,21 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! or unified cloud and/or with MG microphysics if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & + IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs else - call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & - Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & - Model%uni_cld, Model%lmfshal, & - Model%lmfdeep2, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & + Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & + Model%uni_cld, Model%lmfshal, & + Model%lmfdeep2, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs endif elseif(Model%imp_physics == 98) then ! zhao/moorthi's prognostic cloud+pdfcld @@ -837,7 +868,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cnvw, cnvc, Grid%xlat, Grid%xlon, & Sfcprop%slmsk, dz, delp, im, lmk, lmp, deltaq, & Model%sup, Model%kdt, me, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs elseif (Model%imp_physics == 11) then ! GFDL cloud scheme @@ -847,21 +879,24 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(1:IM,1:LMK,1), cnvw, cnvc, & Grid%xlat, Grid%xlon, Sfcprop%slmsk, & cldcov, dz, delp, im, lmk, lmp, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs else call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & IM, LMK, LMP, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + dzb, Grid%xlat_d, Model%julian, Model%yearlen,& + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs ! call progcld4o (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs ! tracer1, Grid%xlat, Grid%xlon, Sfcprop%slmsk, & ! dz, delp, & ! ntrac-1, Model%ntcw-1,Model%ntiw-1,Model%ntrw-1,& ! Model%ntsw-1,Model%ntgl-1,Model%ntclamt-1, & ! im, lmk, lmp, & -! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs +! dzb, Grid%xlat_d, Model%julian, Model%yearlen, & +! clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs endif elseif(Model%imp_physics == 6 .or. Model%imp_physics == 15) then @@ -871,15 +906,16 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd%phy_f3d(:,:,Model%nseffr) = 250. endif - call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + dzb, Grid%xlat_d, Model%julian, Model%yearlen,& + clouds,cldsa,mtopa,mbota, de_lgth, alpha) ! --- outputs elseif(Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP @@ -900,19 +936,21 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & IM, LMK, LMP, clouds(:,1:LMK,1), & effrl, effri, effrr, effrs, Model%effr_in , & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + dzb, Grid%xlat_d, Model%julian, Model%yearlen, & + clouds, cldsa, mtopa, mbota, de_lgth, alpha) ! --- outputs else ! MYNN PBL or GF convective are not used - call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + dzb, Grid%xlat_d, Model%julian, Model%yearlen,& + clouds,cldsa,mtopa,mbota, de_lgth, alpha) ! --- outputs endif ! MYNN PBL or GF endif ! end if_imp_physics diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index a06e718a5..b46272605 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -554,6 +554,15 @@ kind = kind_phys intent = out optional = F +[alpha] + standard_name = cloud_overlap_decorrelation_parameter + long_name = cloud overlap decorrelation parameter + units = frac + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = out + optional = F [alb1d] standard_name = surface_albedo_perturbation long_name = surface albedo perturbation diff --git a/physics/physcons.F90 b/physics/physcons.F90 index 5fb993ac3..8fbdc9930 100644 --- a/physics/physcons.F90 +++ b/physics/physcons.F90 @@ -137,6 +137,9 @@ module physcons real(kind=kind_phys),parameter:: rhosnow = 100._kind_phys !< density of snow (kg/m^3) real(kind=kind_phys),parameter:: rhoair = 1.28_kind_phys !< density of air near surface (kg/m^3) +! Decorrelation length constant (km) for iovrlw/iovrsw = 4 or 5 and idcor = 0 + real(kind=kind_phys),parameter:: decorr_con = 2.50_kind_phys + !........................................! end module physcons ! !========================================! diff --git a/physics/physparam.f b/physics/physparam.f index 795cb4fab..c71b62e5b 100644 --- a/physics/physparam.f +++ b/physics/physparam.f @@ -234,6 +234,8 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method +!!\n =4:use exponential overlapping method +!!\n =5:use exponential-random overlapping method !!\n Opr GFS/CFS=1; see IOVR_SW in run scripts integer, save :: iovrsw = 1 !> cloud overlapping control flag for LW @@ -241,8 +243,14 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method +!!\n =4:use exponential overlapping method +!!\n =5:use exponential-random overlapping method !!\n Opr GFS/CFS=1; see IOVR_LW in run scripts integer, save :: iovrlw = 1 +!!\n Decorrelation length type for iovrlw/iovrsw = 4 or 5 +!!\n =0:use constant decorrelation length defined by decorr_con (in module physcons) +!!\n =1:use day-of-year and latitude-varying decorrelation length + integer, save :: idcor = 1 !> sub-column cloud approx flag in SW radiation !!\n =0:no McICA approximation in SW radiation diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 5b4aa54ab..9b0f34ef7 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -25,16 +25,18 @@ ! IX, NLAY, NLP1, ! ! uni_cld, lmfshal, lmfdeep2, cldcov, ! ! effrl,effri,effrr,effrs,effr_in, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progcld2' --- ferrier prognostic cloud microphysics ! ! inputs: ! ! (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, ! ! xlat,xlon,slmsk,dz,delp, f_ice,f_rain,r_rime,flgmin, ! ! IX, NLAY, NLP1, lmfshal, lmfdeep2, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progcld3' --- zhao/moorthi prognostic cloud + pdfcld! ! inputs: ! @@ -42,16 +44,18 @@ ! xlat,xlon,slmsk, dz, delp, ! ! ix, nlay, nlp1, ! ! deltaq,sup,kdt,me, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progcld4' --- gfdl-lin cloud microphysics ! ! inputs: ! ! (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, ! ! xlat,xlon,slmsk, dz, delp, ! ! ix, nlay, nlp1, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progcld4o' --- inactive ! ! ! @@ -63,16 +67,18 @@ ! ix, nlay, nlp1, ! ! uni_cld, lmfshal, lmfdeep2, cldcov, ! ! re_cloud,re_ice,re_snow, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! 'progclduni' --- for unified clouds with MG microphys! ! inputs: ! ! (plyr,plvl,tlyr,tvly,ccnd,ncnd, ! ! xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, cldtot, ! ! effrl,effri,effrr,effrs,effr_in, ! +! dzlay, latdeg, julian, yearlen, ! ! outputs: ! -! clouds,clds,mtop,mbot,de_lgth) ! +! clouds,clds,mtop,mbot,de_lgth,alpha) ! ! ! ! internal accessable only subroutines: ! ! 'gethml' --- get diagnostic hi, mid, low clouds ! @@ -154,6 +160,10 @@ ! 'diagcld1' for diagnostic cloud scheme, added new cloud ! ! overlapping method of de-correlation length, and optimized ! ! the code structure. ! +! jul 2020, m.j. iacono - added rrtmg/mcica cloud overlap options ! +! exponential and exponential-random. each method can use ! +! either a constant or a latitude-varying and day-of-year ! +! varying decorrelation length selected with parameter "idcor". ! ! ! !!!!! ========================================================== !!!!! !!!!! end descriptions !!!!! @@ -181,6 +191,10 @@ !! Cloud overlapping method (namelist control parameter - \b IOVR_LW, \b IOVR_SW) !!\n IOVR=0: randomly overlapping vertical cloud layers !!\n IOVR=1: maximum-random overlapping vertical cloud layers +!!\n IOVR=2: maximum overlapping vertical cloud layers +!!\n IOVR=3: decorrelation length overlapping vertical cloud layers +!!\n IOVR=4: exponential overlapping vertical cloud layers +!!\n IOVR=5: exponential-random overlapping vertical cloud layers !! !! Sub-grid cloud approximation (namelist control parameter - \b ISUBC_LW=2, \b ISUBC_SW=2) !!\n ISUBC=0: grid averaged quantities, without sub-grid cloud approximation @@ -243,7 +257,7 @@ module module_radiation_clouds integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld4o, gethml + & cld_init, progcld5, progcld4o, gethml, get_alpha ! ================= @@ -302,6 +316,8 @@ subroutine cld_init & ! =1: max/ran overlapping clouds ! ! =2: maximum overlap clouds (mcica only) ! ! =3: decorrelation-length overlap (mcica only) ! +! =4: exponential cloud overlap (AER; mcica only) ! +! =5: exponential-random overlap (AER; mcica only) ! ! ivflip : control flag for direction of vertical index ! ! =0: index from toa to surface ! ! =1: index from surface to toa ! @@ -417,6 +433,10 @@ end subroutine cld_init !!\param effrr effective radius for rain water !!\param effrs effective radius for snow water !!\param effr_in logical, if .true. use input effective radii +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (IX,NLAY,NF_CLDS), cloud profiles !!\n (:,:,1) - layer total cloud fraction !!\n (:,:,2) - layer cloud liq water path \f$(g/m^2)\f$ @@ -430,7 +450,8 @@ end subroutine cld_init !!\param clds (IX,5), fraction of clouds for low, mid, hi, tot, bl !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops !!\param mbot (IX,3), vertical indices for low, mid, hi cloud bases -!!\param de_lgth (IX), clouds decorrelation length (km) +!!\param de_lgth (IX), clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld1 progcld1 General Algorithm !> @{ subroutine progcld1 & @@ -438,7 +459,8 @@ subroutine progcld1 & & xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & effrl,effri,effrr,effrs,effr_in, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -485,6 +507,10 @@ subroutine progcld1 & ! lmfshal : logical - true for mass flux shallow convection ! ! lmfdeep2 : logical - true for mass flux deep convection ! ! cldcov : layer cloud fraction (used when uni_cld=.true. ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -502,6 +528,7 @@ subroutine progcld1 & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -527,16 +554,21 @@ subroutine progcld1 & real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, cldcov, delp, dz, & - & effrl, effri, effrr, effrs + & effrl, effri, effrr, effrs, dzlay real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -804,6 +836,16 @@ subroutine progcld1 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. The three cloud domain boundaries are defined by @@ -811,7 +853,7 @@ subroutine progcld1 & !! 'iovr', which may be different for lw and sw radiation programs. call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -850,6 +892,10 @@ end subroutine progcld1 !!\param NLAY,NLP1 vertical layer/level dimensions !!\param lmfshal flag for mass-flux shallow convection scheme in the cloud fraction calculation !!\param lmfdeep2 flag for mass-flux deep convection scheme in the cloud fraction calculation +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (IX,NLAY,NF_CLDS), cloud profiles !!\n (:,:,1) - layer total cloud fraction !!\n (:,:,2) - layer cloud liq water path \f$(g/m^2)\f$ @@ -864,13 +910,15 @@ end subroutine progcld1 !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops !!\param mbot (IX,3), vertical indices for low, mid, hi cloud bases !!\param de_lgth (IX), clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld2 progcld2 General Algorithm !> @{ subroutine progcld2 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, f_ice,f_rain,r_rime,flgmin, & & IX, NLAY, NLP1, lmfshal, lmfdeep2, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -917,6 +965,10 @@ subroutine progcld2 & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -934,6 +986,7 @@ subroutine progcld2 & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! external module variables: ! ! ivflip : control flag of vertical index direction ! @@ -964,17 +1017,22 @@ subroutine progcld2 & real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, f_ice, f_rain, r_rime, & - & dz, delp + & dz, delp, dzlay real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk real (kind=kind_phys), dimension(:), intent(in) :: flgmin + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -1250,6 +1308,16 @@ subroutine progcld2 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml(), to compute low, mid, high, total, and boundary !! layer cloud fractions and clouds top/bottom layer indices for low, !! mid, and high clouds. @@ -1259,7 +1327,7 @@ subroutine progcld2 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -1298,6 +1366,10 @@ end subroutine progcld2 !!\param sup supersaturation !!\param kdt !!\param me print control flag +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (ix,nlay,nf_clds), cloud profiles !!\n (:,:,1) - layer total cloud fraction !!\n (:,:,2) - layer cloud liq water path (g/m**2) @@ -1312,6 +1384,7 @@ end subroutine progcld2 !!\param mtop (ix,3), vertical indices for low, mid, hi cloud tops !!\param mbot (ix,3), vertical indices for low, mid, hi cloud bases !!\param de_lgth (ix), clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld3 progcld3 General Algorithm !! @{ subroutine progcld3 & @@ -1319,7 +1392,8 @@ subroutine progcld3 & & xlat,xlon,slmsk, dz, delp, & & ix, nlay, nlp1, & & deltaq,sup,kdt,me, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -1366,6 +1440,10 @@ subroutine progcld3 & ! cnvc (ix,nlay) : layer convective cloud cover ! ! deltaq(ix,nlay) : half total water distribution width ! ! sup : supersaturation ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! @@ -1384,6 +1462,7 @@ subroutine progcld3 & ! mtop (ix,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (ix,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -1404,7 +1483,7 @@ subroutine progcld3 & integer, intent(in) :: ix, nlay, nlp1,kdt real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, tvly, qlyr, qstl, rhly, clw, dz, delp + & tlyr, tvly, qlyr, qstl, rhly, clw, dz, delp, dzlay ! & tlyr, tvly, qlyr, qstl, rhly, clw, cnvw, cnvc ! real (kind=kind_phys), dimension(:,:), intent(in) :: deltaq real (kind=kind_phys), dimension(:,:) :: deltaq, cnvw, cnvc @@ -1416,11 +1495,16 @@ subroutine progcld3 & & slmsk integer :: me + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -1647,6 +1731,16 @@ subroutine progcld3 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> -# Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -1657,7 +1751,7 @@ subroutine progcld3 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & ix,nlay, & ! --- outputs: & clds, mtop, mbot & @@ -1696,6 +1790,10 @@ end subroutine progcld3 !!\param ix horizontal dimension !!\param nlay vertical layer dimension !!\param nlp1 vertical level dimension +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (ix,nlay,nf_clds), cloud profiles !!\n clouds(:,:,1) - layer total cloud fraction !!\n clouds(:,:,2) - layer cloud liquid water path (\f$g m^{-2}\f$) @@ -1710,13 +1808,15 @@ end subroutine progcld3 !!\param mtop vertical indices for low, mid, hi cloud tops !!\param mbot vertical indices for low, mid, hi cloud bases !!\param de_lgth clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld4 progcld4 General Algorithm !! @{ subroutine progcld4 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, & ! --- inputs: & xlat,xlon,slmsk,cldtot, dz, delp, & & IX, NLAY, NLP1, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -1761,6 +1861,10 @@ subroutine progcld4 & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -1778,6 +1882,7 @@ subroutine progcld4 & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -1800,16 +1905,21 @@ subroutine progcld4 & real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, tvly, qlyr, qstl, rhly, clw, cldtot, cnvw, cnvc, & - & delp, dz + & delp, dz, dzlay real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -1984,6 +2094,16 @@ subroutine progcld4 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + ! --- compute low, mid, high, total, and boundary layer cloud fractions ! and clouds top/bottom layer indices for low, mid, and high clouds. ! The three cloud domain boundaries are defined by ptopc. The cloud @@ -1992,7 +2112,7 @@ subroutine progcld4 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -2036,6 +2156,10 @@ end subroutine progcld4 !>\param ix horizontal dimension !>\param nlay vertical layer dimension !>\param nlp1 vertical level dimension +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !>\param clouds (ix,nlay,nf_clds), cloud profiles !!\n clouds(:,:,1) - layer totoal cloud fraction !!\n clouds(:,:,2) - layer cloud liquid water path (\f$g m^{-2}\f$) @@ -2050,6 +2174,7 @@ end subroutine progcld4 !>\param mtop (ix,3), vertical indices for low, mid, hi cloud tops !>\param mbot (ix,3), vertical indices for low, mid, hi cloud bases !>\param de_lgth clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld4o progcld4o General Algorithm !! @{ subroutine progcld4o & @@ -2057,7 +2182,8 @@ subroutine progcld4o & & xlat,xlon,slmsk, dz, delp, & & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl,ntclamt, & & IX, NLAY, NLP1, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -2101,6 +2227,10 @@ subroutine progcld4o & ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -2118,6 +2248,7 @@ subroutine progcld4o & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -2141,18 +2272,23 @@ subroutine progcld4o & & ntclamt real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, tvly, qlyr, qstl, rhly, delp, dz + & tlyr, tvly, qlyr, qstl, rhly, delp, dz, dzlay real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -2312,6 +2448,16 @@ subroutine progcld4o & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low, mid, high, total, and boundary layer cloud fractions !! and clouds top/bottom layer indices for low, mid, and high clouds. !! The three cloud domain boundaries are defined by ptopc. The cloud @@ -2320,7 +2466,7 @@ subroutine progcld4o & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -2345,7 +2491,8 @@ subroutine progcld5 & & IX, NLAY, NLP1, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -2392,6 +2539,10 @@ subroutine progcld5 & ! lmfshal : logical - true for mass flux shallow convection ! ! lmfdeep2 : logical - true for mass flux deep convection ! ! cldcov : layer cloud fraction (used when uni_cld=.true. ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -2409,6 +2560,7 @@ subroutine progcld5 & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -2434,7 +2586,7 @@ subroutine progcld5 & logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, & + & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, dzlay, & & re_cloud, re_ice, re_snow real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw @@ -2442,11 +2594,16 @@ subroutine progcld5 & real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds real (kind=kind_phys), dimension(:,:), intent(out) :: clds real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha integer, dimension(:,:), intent(out) :: mtop,mbot @@ -2659,6 +2816,16 @@ subroutine progcld5 & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -2670,7 +2837,7 @@ subroutine progcld5 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -2706,6 +2873,10 @@ end subroutine progcld5 !!\param effrr (IX,NLAY), effective radius for rain water !!\param effrs (IX,NLAY), effective radius for snow water !!\param effr_in logical - if .true. use input effective radii +!!\param dzlay(ix,nlay) distance between model layer centers +!!\param latdeg(ix) latitude (in degrees 90 -> -90) +!!\param julian day of the year (fractional julian day) +!!\param yearlen current length of the year (365/366 days) !!\param clouds (IX,NLAY,NF_CLDS), cloud profiles !!\n (:,:,1) - layer total cloud fraction !!\n (:,:,2) - layer cloud liq water path \f$(g/m^2)\f$ @@ -2720,13 +2891,15 @@ end subroutine progcld5 !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops !!\param mbot (IX,3), vertical indices for low, mid, hi cloud bases !!\param de_lgth (IX), clouds decorrelation length (km) +!!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progclduni progclduni General Algorithm !> @{ subroutine progclduni & & ( plyr,plvl,tlyr,tvly,ccnd,ncnd, & ! --- inputs: & xlat,xlon,slmsk,dz,delp, IX, NLAY, NLP1, cldtot, & & effrl,effri,effrr,effrs,effr_in, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -2774,6 +2947,10 @@ subroutine progclduni & ! effr_in : logical - if .true. use input effective radii ! ! dz (ix,nlay) : layer thickness (km) ! ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! +! dzlay(ix,nlay) : thickness between model layer centers (km) ! +! latdeg(ix) : latitude (in degrees 90 -> -90) ! +! julian : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -2791,6 +2968,7 @@ subroutine progclduni & ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! ! de_lgth(ix) : clouds decorrelation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! ! ! module variables: ! ! ivflip : control flag of vertical index direction ! @@ -2815,11 +2993,16 @@ subroutine progclduni & real (kind=kind_phys), dimension(:,:,:), intent(in) :: ccnd real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr,& - & tlyr, tvly, cldtot, effrl, effri, effrr, effrs, dz, delp + & tlyr, tvly, cldtot, effrl, effri, effrr, effrs, dz, delp, & + & dzlay real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + ! --- outputs real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds @@ -2827,6 +3010,8 @@ subroutine progclduni & real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha + integer, dimension(:,:), intent(out) :: mtop,mbot ! --- local variables: @@ -3026,6 +3211,16 @@ subroutine progclduni & enddo endif +!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -3037,7 +3232,7 @@ subroutine progclduni & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & @@ -3064,6 +3259,7 @@ end subroutine progclduni !> \param cldcnv (IX,NLAY), convective cloud (for diagnostic scheme only) !> \param dz (IX,NLAY), layer thickness (km) !> \param de_lgth (IX), clouds decorrelation length (km) +!> \param alpha (IX,NLAY), alpha decorrelation parameter !> \param IX horizontal dimension !> \param NLAY vertical layer dimensions !> \param clds (IX,5), fraction of clouds for low, mid, hi, tot, bl @@ -3073,7 +3269,7 @@ end subroutine progclduni !>\section detail Detailed Algorithm !! @{ subroutine gethml & - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & ! --- inputs: + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & ! --- inputs: & IX, NLAY, & & clds, mtop, mbot & ! --- outputs: & ) @@ -3105,6 +3301,7 @@ subroutine gethml & ! cldcnv(IX,NLAY) : convective cloud (for diagnostic scheme only) ! ! dz (ix,nlay) : layer thickness (km) ! ! de_lgth(ix) : clouds vertical de-correlation length (km) ! +! alpha(ix,nlay) : alpha decorrelation parameter ! IX : horizontal dimention ! ! NLAY : vertical layer dimensions ! ! ! @@ -3124,6 +3321,8 @@ subroutine gethml & ! =1 max/ran overlapping clouds ! ! =2 maximum overlapping ( for mcica only ) ! ! =3 decorr-length ovlp ( for mcica only ) ! +! =4: exponential cloud overlap (AER; mcica only) ! +! =5: exponential-random overlap (AER; mcica only) ! ! ! ! ==================== end of description ===================== ! ! @@ -3135,6 +3334,7 @@ subroutine gethml & real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & & cldtot, cldcnv, dz real (kind=kind_phys), dimension(:), intent(in) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(in) :: alpha ! --- outputs real (kind=kind_phys), dimension(:,:), intent(out) :: clds @@ -3270,6 +3470,33 @@ subroutine gethml & clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud enddo + elseif ( iovr == 4 .or. iovr == 5 ) then ! exponential overlap (iovr=4), or + ! exponential-random (iovr=5); + ! distinction defined by alpha + + do k = kstr, kend, kinc + do i = 1, ix + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) then ! cloudy layer + cl2(i) = alpha(i,k) * min(cl2(i), (1.0 - ccur)) & ! maximum part + & + (1.0 - alpha(i,k)) * (cl2(i) * (1.0 - ccur)) ! random part + else ! clear layer + cl1(i) = cl1(i) * cl2(i) + cl2(i) = 1.0 + endif + enddo + + if (k == llyr) then + do i = 1, ix + clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud + enddo + endif + enddo + + do i = 1, ix + clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud + enddo + endif ! end_if_iovr ! --- high, mid, low clouds, where cl1, cl2 are cloud fractions @@ -3452,6 +3679,187 @@ end subroutine gethml !----------------------------------- !! @} +!> \ingroup module_radiation_clouds +!! This program derives the exponential transition, alpha, from maximum to +!! random overlap needed to define the fractional cloud vertical correlation +!! for the exponential (EXP, iovrlp=4) or the exponential-random (ER, iovrlp=5) +!! cloud overlap options for RRTMG. For exponential, the transition from +!! maximum to random with distance through model layers occurs without regard +!! to the configuration of clear and cloudy layers. For the ER method, each +!! block of adjacent cloudy layers is treated with a separate transition from +!! maximum to random, and blocks of cloudy layers separated by one or more +!! clear layers are correlated randomly. +!> /param nlon : number of model longitude points +!> /param nlay : vertical layer dimension +!> /param dzlay(nlon,nlay) : distance between the center of model layers +!> /param iovrlp : cloud overlap method +!> : 0 = random +!> : 1 = maximum-random +!> : 2 = maximum +!> : 3 = decorrelation (NOAA/Hou) +!> : 4 = exponential (AER) +!> : 5 = exponential-random (AER) +!> /param latdeg(nlon) : latitude (in degrees 90 -> -90) +!> /param juldat : day of the year (fractional julian day) +!> /param yearlen : current length of the year (365/366 days) +!> /param cldf(nlon,nlay) : cloud fraction +!> /param idcor : decorrelation length method +!> : 0 = constant value (AER; decorr_con) +!> : 1 = latitude and day of year varying value (AER; Oreopoulos, et al., 2012) +!> /param decorr_con : decorrelation length constant +!! +!>\section detail Detailed Algorithm +!! @{ + subroutine get_alpha & +! --- inputs: + & (nlon, nlay, dzlay, iovrlp, latdeg, juldat, yearlen, cldf, & +! --- outputs: + & alpha & + & ) + +! =================================================================== ! +! ! +! abstract: Derives the exponential transition, alpha, from maximum to ! +! random overlap needed to define the fractional cloud vertical ! +! correlation for the exponential (EXP, iovrlp=4) or the exponential- ! +! random (ER, iovrlp=5) cloud overlap options for RRTMG. For ! +! exponential, the transition from maximum to random with distance ! +! through model layers occurs without regard to the configuration of ! +! clear and cloudy layers. For the ER method, each block of adjacent ! +! cloudy layers is treated with a separate transition from maximum to ! +! random, and blocks of cloudy layers separated by one or more ! +! clear layers are correlated randomly. ! +! ! +! usage: call get_alpha ! +! ! +! subprograms called: none ! +! ! +! attributes: ! +! language: fortran 90 ! +! machine: ibm-sp, sgi ! +! ! +! author: m.j. iacono (AER) for use with the RRTMG radiation code ! +! ! +! ==================== definition of variables ==================== ! +! ! +! Input variables: ! +! nlon : number of model longitude points ! +! nlay : vertical layer dimension ! +! dzlay(nlon,nlay) : distance between the center of model layers ! +! iovrlp : cloud overlap method ! +! : 0 = random ! +! : 1 = maximum-random ! +! : 2 = maximum ! +! : 3 = decorrelation (NOAA/Hou) ! +! : 4 = exponential (AER) ! +! : 5 = exponential-random (AER) ! +! latdeg(nlon) : latitude (in degrees 90 -> -90) ! +! juldat : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! +! cldf(nlon,nlay) : cloud fraction ! +! ! +! output variables: ! +! alpha(nlon,nlay) : alpha exponential transition parameter for ! +! : cloud vertical correlation ! +! ! +! external module variables: (in physcons) ! +! decorr_con : decorrelation length constant (km) ! +! ! +! external module variables: (in physparam) ! +! idcor : control flag for decorrelation length method ! +! =0: constant decorrelation length (decorr_con) ! +! =1: latitude and day-of-year varying decorrelation! +! length (AER; Oreopoulos, et al., 2012) ! +! ! +! ==================== end of description ===================== ! +! + use physcons, only: decorr_con + use physparam, only: idcor + + implicit none + +! Input + integer, intent(in) :: nlon, nlay + integer, intent(in) :: iovrlp + integer, intent(in) :: yearlen + real(kind=kind_phys), dimension(:,:), intent(in) :: dzlay + real(kind=kind_phys), dimension(:,:), intent(in) :: cldf + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: juldat + +! Output + real(kind=kind_phys), dimension(:,:), intent(out):: alpha + +! Local + integer :: i, k + real(kind=kind_phys) :: decorr_len(nlon) ! Decorrelation length (km) + +! Constants for latitude and day-of-year dependent decorrlation length (Oreopoulos et al, 2012) +! Used when idcor = 1 + real(kind=kind_phys), parameter :: am1 = 1.4315_kind_phys + real(kind=kind_phys), parameter :: am2 = 2.1219_kind_phys + real(kind=kind_phys), parameter :: am4 = -25.584_kind_phys + real(kind=kind_phys), parameter :: amr = 7.0_kind_phys + real(kind=kind_phys) :: am3 + + real(kind=kind_phys), parameter :: zero = 0.0d0 + real(kind=kind_phys), parameter :: one = 1.0d0 + +! +!===> ... begin here +! +! If exponential or exponential-random cloud overlap is used: +! derive day-of-year and latitude-varying decorrelation lendth if requested; +! otherwise use the constant decorrelation length, decorr_con, specified in physcons.F90 + do i = 1, nlon + if (iovrlp == 4 .or. iovrlp == 5) then + if (idcor .eq. 1) then + if (juldat .gt. 181._kind_phys) then + am3 = -4._kind_phys * amr * (juldat - 272._kind_phys) + & / yearlen + else + am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) + & / yearlen + endif +! For latitude in degrees, decorr_len in km + decorr_len(i) = am1 + am2 * exp( -(latdeg(i) - am3)**2 + & / am4**2) + else + decorr_len(i) = decorr_con + endif + endif + enddo + +! For atmospheric data defined from surface to toa; define alpha from surface to toa +! Exponential cloud overlap + if (iovrlp == 4) then + do i = 1, nlon + alpha(i,1) = zero + do k = 2, nlay + alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) + enddo + enddo + endif +! Exponential-random cloud overlap + if (iovrlp == 5) then + do i = 1, nlon + alpha(i,1) = zero + do k = 2, nlay + alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (cldf(i,k) .eq. zero .and. cldf(i,k-1) .gt. zero) then + alpha(i,k) = zero + endif + enddo + enddo + endif + + return + + end subroutine get_alpha +!----------------------------------- +!! @} ! !........................................! end module module_radiation_clouds ! diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 7b029f8b0..cdcb91b48 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -6,7 +6,7 @@ !!!!! lw-rrtm3 radiation package description !!!!! !!!!! ============================================================== !!!!! ! ! -! this package includes ncep's modifications of the rrtm-lw radiation ! +! this package includes ncep's modifications of the rrtmg-lw radiation ! ! code from aer inc. ! ! ! ! the lw-rrtm3 package includes these parts: ! @@ -39,7 +39,7 @@ ! inputs: ! ! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, ! ! clouds,icseed,aerosols,sfemis,sfgtmp, ! -! dzlyr,delpin,de_lgth, ! +! dzlyr,delpin,de_lgth,alpha, ! ! npts, nlay, nlp1, lprnt, ! ! outputs: ! ! hlwc,topflx,sfcflx,cldtau, ! @@ -93,17 +93,38 @@ ! ! !==========================================================================! ! ! -! the original aer's program declarations: ! +! the original aer program declarations: ! ! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! | -! Copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). | -! This software may be used, copied, or redistributed as long as it is | -! not sold and this copyright notice is reproduced on each copy made. | -! This model is provided as is without any express or implied warranties. | -! (http://www.rtweb.aer.com/) | -! | -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! ! +! Copyright (c) 2002-2020, Atmospheric & Environmental Research, Inc. (AER) ! +! All rights reserved. ! +! ! +! Redistribution and use in source and binary forms, with or without ! +! modification, are permitted provided that the following conditions are met: ! +! * Redistributions of source code must retain the above copyright ! +! notice, this list of conditions and the following disclaimer. ! +! * Redistributions in binary form must reproduce the above copyright ! +! notice, this list of conditions and the following disclaimer in the ! +! documentation and/or other materials provided with the distribution. ! +! * Neither the name of Atmospheric & Environmental Research, Inc., nor ! +! the names of its contributors may be used to endorse or promote products ! +! derived from this software without specific prior written permission. ! +! ! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ! +! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ! +! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ! +! ARE DISCLAIMED. IN NO EVENT SHALL ATMOSPHERIC & ENVIRONMENTAL RESEARCH, INC.,! +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ! +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ! +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ! +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ! +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF ! +! THE POSSIBILITY OF SUCH DAMAGE. ! +! (http://www.rtweb.aer.com/) ! +! ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ************************************************************************ ! ! ! @@ -136,8 +157,14 @@ ! ************************************************************************ ! ! ! ! references: ! -! (rrtm_lw/rrtmg_lw): ! -! clough, s.A., m.w. shephard, e.j. mlawer, j.s. delamere, ! +! (rrtmg_lw/rrtm_lw): ! +! iacono, m.j., j.s. delamere, e.j. mlawer, m.w. shepard, ! +! s.a. clough, and w.d collins, radiative forcing by long-lived ! +! greenhouse gases: calculations with the aer radiative transfer ! +! models, j, geophys. res., 113, d13103, doi:10.1029/2008jd009944, ! +! 2008. ! +! ! +! clough, s.a., m.w. shephard, e.j. mlawer, j.s. delamere, ! ! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: ! ! atmospheric radiative transfer modeling: a summary of the aer ! ! codes, j. quant. spectrosc. radiat. transfer, 91, 233-244, 2005. ! @@ -234,12 +261,21 @@ ! jun 2018, h-m lin/y-t hou -- added new option of cloud overlap ! ! method 'de-correlation-length' for mcica application ! ! ! +! ************************************************************************ ! +! ! +! additional aer revision history: ! +! jul 2020, m.j. iacono -- added new mcica cloud overlap options ! +! exponential and exponential-random. each method can ! +! use either a constant or a latitude-varying and ! +! day-of-year varying decorrelation length selected ! +! with parameter "idcor". ! +! ! !!!!! ============================================================== !!!!! !!!!! end descriptions !!!!! !!!!! ============================================================== !!!!! !> This module contains the CCPP-compliant NCEP's modifications of the -!! rrtm-lw radiation code from aer inc. +!! rrtmg-lw radiation code from aer inc. module rrtmg_lw ! use physparam, only : ilwrate, ilwrgas, ilwcliq, ilwcice, & @@ -360,7 +396,7 @@ end subroutine rrtmg_lw_init !! \brief This module includes NCEP's modifications of the RRTMG-LW radiation !! code from AER. !! -!! The RRTM-LW package includes three files: +!! The RRTMG-LW package includes three files: !! - radlw_param.f, which contains: !! - module_radlw_parameters: band parameters set up !! - radlw_datatb.f, which contains modules: @@ -389,7 +425,7 @@ subroutine rrtmg_lw_run & & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, & & icseed,aeraod,aerssa,sfemis,sfgtmp, & - & dzlyr,delpin,de_lgth, & + & dzlyr,delpin,de_lgth,alpha, & & npts, nlay, nlp1, lprnt, cld_cf, lslwr, & & hlwc,topflx,sfcflx,cldtau, & ! --- outputs & HLW0,HLWB,FLXPRF, & ! --- optional @@ -444,6 +480,7 @@ subroutine rrtmg_lw_run & ! dzlyr(npts,nlay) : layer thickness (km) ! ! delpin(npts,nlay): layer pressure thickness (mb) ! ! de_lgth(npts) : cloud decorrelation length (km) ! +! alpha(npts,nlay) : EXP/ER cloud overlap decorrelation parameter ! ! npts : total number of horizontal points ! ! nlay, nlp1 : total number of vertical layers, levels ! ! lprnt : cntl flag for diagnostic print out ! @@ -492,6 +529,8 @@ subroutine rrtmg_lw_run & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud (used for isubclw>0 only) ! ! =3: decorrelation-length overlap (for isubclw>0 only) ! +! =4: exponential cloud overlap (AER) ! +! =5: exponential-random cloud overlap (AER) ! ! ivflip - control flag for vertical index direction ! ! =0: vertical index from toa to surface ! ! =1: vertical index from surface to toa ! @@ -589,6 +628,7 @@ subroutine rrtmg_lw_run & real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & & sfgtmp, de_lgth + real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & & aeraod, aerssa @@ -650,6 +690,7 @@ subroutine rrtmg_lw_run & real (kind=kind_phys) :: tem0, tem1, tem2, pwvcm, summol, stemp, & & delgth + real (kind=kind_phys), dimension(nlay) :: alph integer, dimension(npts) :: ipseed integer, dimension(nlay) :: jp, jt, jt1, indself, indfor, indminor @@ -756,6 +797,7 @@ subroutine rrtmg_lw_run & tavel(k)= tlyr(iplon,k1) tz(k) = tlvl(iplon,k1) dz(k) = dzlyr(iplon,k1) + if (iovrlw == 4 .or. iovrlw == 5) alph(k) = alpha(iplon,k) ! alpha decorrelation !> -# Set absorber amount for h2o, co2, and o3. @@ -868,6 +910,7 @@ subroutine rrtmg_lw_run & tavel(k)= tlyr(iplon,k) tz(k) = tlvl(iplon,k+1) dz(k) = dzlyr(iplon,k) + if (iovrlw == 4 .or. iovrlw == 5) alph(k) = alpha(iplon,k) ! alpha decorrelation ! --- ... set absorber amount !test use @@ -1017,7 +1060,7 @@ subroutine rrtmg_lw_run & call cldprop & ! --- inputs: & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & - & nlay, nlp1, ipseed(iplon), dz, delgth, & + & nlay, nlp1, ipseed(iplon), dz, delgth, alph, & ! --- outputs: & cldfmc, taucld & & ) @@ -1344,7 +1387,7 @@ subroutine rlwinit & ! !===> ... begin here ! - if ( iovrlw<0 .or. iovrlw>3 ) then + if ( iovrlw<0 .or. iovrlw>5 ) then print *,' *** Error in specification of cloud overlap flag', & & ' IOVRLW=',iovrlw,' in RLWINIT !!' stop @@ -1486,13 +1529,14 @@ end subroutine rlwinit !!\param ipseed permutation seed for generating random numbers (isubclw>0) !!\param dz layer thickness (km) !!\param de_lgth layer cloud decorrelation length (km) +!!\param alpha EXP/ER cloud overlap decorrelation parameter !!\param cldfmc cloud fraction for each sub-column !!\param taucld cloud optical depth for bands (non-mcica) !!\section gen_cldprop cldprop General Algorithm !> @{ subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & nlay, nlp1, ipseed, dz, de_lgth, & + & nlay, nlp1, ipseed, dz, de_lgth, alpha, & & cldfmc, taucld & ! --- outputs & ) @@ -1528,6 +1572,7 @@ subroutine cldprop & ! ! ! dz - real, layer thickness (km) nlay ! ! de_lgth- real, layer cloud decorrelation length (km) 1 ! +! alpha - real, EXP/ER decorrelation parameter nlay ! ! nlay - integer, number of vertical layers 1 ! ! nlp1 - integer, number of vertical levels 1 ! ! ipseed- permutation seed for generating random numbers (isubclw>0) ! @@ -1598,6 +1643,7 @@ subroutine cldprop & real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, dz real (kind=kind_phys), intent(in) :: de_lgth + real (kind=kind_phys), dimension(nlay), intent(in) :: alpha ! --- outputs: real (kind=kind_phys), dimension(ngptlw,nlay),intent(out):: cldfmc @@ -1772,7 +1818,7 @@ subroutine cldprop & call mcica_subcol & ! --- inputs: - & ( cldf, nlay, ipseed, dz, de_lgth, & + & ( cldf, nlay, ipseed, dz, de_lgth, alpha, & ! --- output: & lcloudy & & ) @@ -1802,11 +1848,12 @@ end subroutine cldprop !!\param ipseed permute seed for random num generator !!\param dz layer thickness !!\param de_lgth layer cloud decorrelation length (km) +!!\param alpha EXP/ER cloud overlap decorrelation parameter !!\param lcloudy sub-colum cloud profile flag array !!\section mcica_subcol_gen mcica_subcol General Algorithm !! @{ subroutine mcica_subcol & - & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- inputs + & ( cldf, nlay, ipseed, dz, de_lgth, alpha, & ! --- inputs & lcloudy & ! --- outputs & ) @@ -1821,6 +1868,7 @@ subroutine mcica_subcol & ! for lw and sw, use values differ by the number of g-pts. ! ! dz - real, layer thickness (km) nlay ! ! de_lgth - real, layer cloud decorrelation length (km) 1 ! +! alpha - real, EXP/ER decorrelation parameter nlay ! ! ! ! output variables: ! ! lcloudy - logical, sub-colum cloud profile flag array ngptlw*nlay! @@ -1838,6 +1886,7 @@ subroutine mcica_subcol & real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz real (kind=kind_phys), intent(in) :: de_lgth + real (kind=kind_phys), dimension(nlay), intent(in) :: alpha ! --- outputs: logical, dimension(ngptlw,nlay), intent(out) :: lcloudy @@ -1997,6 +2046,58 @@ subroutine mcica_subcol & enddo enddo + case( 4:5 ) ! exponential and exponential-random cloud overlap + +! --- Use previously derived decorrelation parameter, alpha, to specify +! the exponenential transition of cloud correlation in the vertical column. +! +! For exponential cloud overlap, the correlation is applied across layers +! without regard to the configuration of clear and cloudy layers. + +! For exponential-random cloud overlap, a new exponential transition is +! performed within each group of adjacent cloudy layers and blocks of +! cloudy layers with clear layers between them are correlated randomly. +! +! NOTE: The code below is identical for case (4) and (5) because the +! distinction in the vertical correlation between EXP and ER is already +! built into the specification of alpha (in subroutine get_alpha). + +! --- setup 2 sets of random numbers + + call random_number ( rand2d, stat ) + + k1 = 0 + do k = 1, nlay + do n = 1, ngptlw + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + call random_number ( rand2d, stat ) + + k1 = 0 + do k = 1, nlay + do n = 1, ngptlw + k1 = k1 + 1 + cdfun2(n,k) = rand2d(k1) + enddo + enddo + +! --- then working upward from the surface: +! if a random number (from an independent set: cdfun2) is smaller than +! alpha, then use the previous layer's number, otherwise use a new random +! number (keep the originally assigned one in cdfunc for that layer). + + do k = 2, nlay + k1 = k - 1 + do n = 1, ngptlw + if ( cdfun2(n,k) < alpha(k) ) then + cdfunc(n,k) = cdfunc(n,k1) + endif + enddo + enddo + end select !> -# Generate subcolumns for homogeneous clouds. diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index e91fc10df..4e371e7c5 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -207,6 +207,15 @@ kind = kind_phys intent = in optional = F +[alpha] + standard_name = cloud_overlap_decorrelation_parameter + long_name = cloud overlap decorrelation parameter + units = frac + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F [npts] standard_name = horizontal_loop_extent long_name = horizontal dimension diff --git a/physics/radsw_main.f b/physics/radsw_main.f index b10541fb7..d285a8901 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -6,7 +6,7 @@ ! sw-rrtm3 radiation package description !!!!! ! ============================================================== !!!!! ! ! -! this package includes ncep's modifications of the rrtm-sw radiation ! +! this package includes ncep's modifications of the rrtmg-sw radiation ! ! code from aer inc. ! ! ! ! the sw-rrtm3 package includes these parts: ! @@ -38,7 +38,7 @@ ! inputs: ! ! (plyr,plvl,tlyr,tlvl,qlyr,olyr,gasvmr, ! ! clouds,icseed,aerosols,sfcalb, ! -! dzlyr,delpin,de_lgth, ! +! dzlyr,delpin,de_lgth,alpha, ! ! cosz,solcon,NDAY,idxday, ! ! npts, nlay, nlp1, lprnt, ! ! outputs: ! @@ -104,17 +104,38 @@ ! ! !==========================================================================! ! ! -! the original program declarations: ! +! the original aer program declarations: ! ! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! ! -! Copyright 2002-2007, Atmospheric & Environmental Research, Inc. (AER). ! -! This software may be used, copied, or redistributed as long as it is ! -! not sold and this copyright notice is reproduced on each copy made. ! -! This model is provided as is without any express or implied warranties. ! -! (http://www.rtweb.aer.com/) ! -! ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! ! +! Copyright (c) 2002-2020, Atmospheric & Environmental Research, Inc. (AER) ! +! All rights reserved. ! +! ! +! Redistribution and use in source and binary forms, with or without ! +! modification, are permitted provided that the following conditions are met: ! +! * Redistributions of source code must retain the above copyright ! +! notice, this list of conditions and the following disclaimer. ! +! * Redistributions in binary form must reproduce the above copyright ! +! notice, this list of conditions and the following disclaimer in the ! +! documentation and/or other materials provided with the distribution. ! +! * Neither the name of Atmospheric & Environmental Research, Inc., nor ! +! the names of its contributors may be used to endorse or promote products ! +! derived from this software without specific prior written permission. ! +! ! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ! +! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ! +! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ! +! ARE DISCLAIMED. IN NO EVENT SHALL ATMOSPHERIC & ENVIRONMENTAL RESEARCH, INC.,! +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ! +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ! +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ! +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ! +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF ! +! THE POSSIBILITY OF SUCH DAMAGE. ! +! (http://www.rtweb.aer.com/) ! +! ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! ************************************************************************ ! ! ! @@ -144,7 +165,13 @@ ! ************************************************************************ ! ! ! ! references: ! -! (rrtm_sw/rrtmg_sw): ! +! (rrtmg_sw/rrtm_sw): ! +! iacono, m.j., j.s. delamere, e.j. mlawer, m.w. shepard, ! +! s.a. clough, and w.d collins, radiative forcing by long-lived ! +! greenhouse gases: calculations with the aer radiative transfer ! +! models, j, geophys. res., 113, d13103, doi:10.1029/2008jd009944, ! +! 2008. ! +! ! ! clough, s.a., m.w. shephard, e.j. mlawer, j.s. delamere, ! ! m.j. iacono, k. cady-pereira, s. boukabara, and p.d. brown: ! ! atmospheric radiative transfer modeling: a summary of the aer ! @@ -189,7 +216,7 @@ ! ! ! ncep modifications history log: ! ! ! -! sep 2003, yu-tai hou -- received aer's rrtm-sw gcm version ! +! sep 2003, yu-tai hou -- received aer's rrtmg-sw gcm version! ! code (v224) ! ! nov 2003, yu-tai hou -- corrected errors in direct/diffuse ! ! surface alabedo components. ! @@ -260,12 +287,21 @@ ! scheme. (used if iswcliq=2); added new option of ! ! cloud overlap method 'de-correlation-length'. ! ! ! +! ************************************************************************ ! +! ! +! additional aer revision history: ! +! jul 2020, m.j. iacono -- added new mcica cloud overlap options ! +! exponential and exponential-random. each method can ! +! use either a constant or a latitude-varying and ! +! day-of-year varying decorrelation length selected ! +! with parameter "idcor". ! +! ! !!!!! ============================================================== !!!!! !!!!! end descriptions !!!!! !!!!! ============================================================== !!!!! -!> This module contains the CCPP-compliant NCEP's modifications of the rrtm-sw radiation -!! code from aer inc. +!> This module contains the CCPP-compliant NCEP's modifications of the +!! rrtmg-sw radiation code from aer inc. module rrtmg_sw ! use physparam, only : iswrate, iswrgas, iswcliq, iswcice, & @@ -422,7 +458,7 @@ end subroutine rrtmg_sw_init !! | 29 | 820-2600 |H2O |CO2 |CO2 |H2O | !!\tableofcontents !! -!! The RRTM-SW package includes three files: +!! The RRTMG-SW package includes three files: !! - radsw_param.f, which contains: !! - module_radsw_parameters: specifies major parameters of the spectral !! bands and defines the construct structures of derived-type variables @@ -467,7 +503,7 @@ subroutine rrtmg_sw_run & & icseed, aeraod, aerssa, aerasy, & & sfcalb_nir_dir, sfcalb_nir_dif, & & sfcalb_uvis_dir, sfcalb_uvis_dif, & - & dzlyr,delpin,de_lgth, & + & dzlyr,delpin,de_lgth,alpha, & & cosz,solcon,NDAY,idxday, & & npts, nlay, nlp1, lprnt, & & cld_cf, lsswr, & @@ -528,6 +564,7 @@ subroutine rrtmg_sw_run & ! dzlyr(npts,nlay) : layer thickness in km ! ! delpin(npts,nlay): layer pressure thickness (mb) ! ! de_lgth(npts) : clouds decorrelation length (km) ! +! alpha(npts,nlay) : EXP/ER cloud overlap decorrelation parameter ! ! cosz (npts) : cosine of solar zenith angle ! ! solcon : solar constant (w/m**2) ! ! NDAY : num of daytime points ! @@ -595,6 +632,8 @@ subroutine rrtmg_sw_run & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! ! =3: decorrelation-length overlap clouds ! +! =4: exponential cloud overlap (AER) ! +! =5: exponential-random cloud overlap (AER) ! ! ivflip - control flg for direction of vertical index ! ! =0: index from toa to surface ! ! =1: index from surface to toa ! @@ -691,6 +730,7 @@ subroutine rrtmg_sw_run & real (kind=kind_phys), intent(in) :: cosz(npts), solcon, & & de_lgth(npts) + real (kind=kind_phys), dimension(npts,nlay), intent(in) :: alpha ! --- outputs: real (kind=kind_phys), dimension(npts,nlay), intent(inout) :: hswc @@ -740,6 +780,7 @@ subroutine rrtmg_sw_run & real (kind=kind_phys) :: cosz1, sntz1, tem0, tem1, tem2, s0fac, & & ssolar, zcf0, zcf1, ftoau0, ftoauc, ftoadc, & & fsfcu0, fsfcuc, fsfcd0, fsfcdc, suvbfc, suvbf0, delgth + real (kind=kind_phys), dimension(nlay) :: alph ! --- column amount of absorbing gases: ! (:,m) m = 1-h2o, 2-co2, 3-o3, 4-n2o, 5-ch4, 6-o2, 7-co @@ -869,6 +910,8 @@ subroutine rrtmg_sw_run & tavel(k) = tlyr(j1,kk) delp (k) = delpin(j1,kk) dz (k) = dzlyr (j1,kk) + if (iovrsw == 4 .or. iovrsw == 5) alph(k) = alpha(j1,k) ! alpha decorrelation + !> -# Set absorber and gas column amount, convert from volume mixing !! ratio to molec/cm2 based on coldry (scaled to 1.0e-20) !! - colamt(nlay,maxgas):column amounts of absorbing gases 1 to @@ -958,6 +1001,7 @@ subroutine rrtmg_sw_run & tavel(k) = tlyr(j1,k) delp (k) = delpin(j1,k) dz (k) = dzlyr (j1,k) + if (iovrsw == 4 .or. iovrsw == 5) alph(k) = alpha(j1,k) ! alpha decorrelation ! --- ... set absorber amount !test use @@ -1080,7 +1124,7 @@ subroutine rrtmg_sw_run & call cldprop & ! --- inputs: & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & - & zcf1, nlay, ipseed(j1), dz, delgth, & + & zcf1, nlay, ipseed(j1), dz, delgth, alph, & ! --- outputs: & taucw, ssacw, asycw, cldfrc, cldfmc & & ) @@ -1409,7 +1453,7 @@ subroutine rswinit & ! !===> ... begin here ! - if ( iovrsw<0 .or. iovrsw>3 ) then + if ( iovrsw<0 .or. iovrsw>5 ) then print *,' *** Error in specification of cloud overlap flag', & & ' IOVRSW=',iovrsw,' in RSWINIT !!' stop @@ -1530,6 +1574,7 @@ end subroutine rswinit !! (isubcsw>0) !!\param dz layer thickness (km) !!\param delgth layer cloud decorrelation length (km) +!!\param alpha EXP/ER cloud overlap decorrelation parameter !!\param taucw cloud optical depth, w/o delta scaled !!\param ssacw weighted cloud single scattering albedo !! (ssa = ssacw / taucw) @@ -1542,7 +1587,7 @@ end subroutine rswinit !----------------------------------- subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & cf1, nlay, ipseed, dz, delgth, & + & cf1, nlay, ipseed, dz, delgth, alpha, & & taucw, ssacw, asycw, cldfrc, cldfmc & ! --- output & ) @@ -1581,6 +1626,7 @@ subroutine cldprop & ! ipseed- permutation seed for generating random numbers (isubcsw>0) ! ! dz - real, layer thickness (km) nlay ! ! delgth- real, layer cloud decorrelation length (km) 1 ! +! alpha - real, EXP/ER decorrelation parameter nlay ! ! ! ! outputs: ! ! taucw - real, cloud optical depth, w/o delta scaled nlay*nbdsw ! @@ -1633,6 +1679,7 @@ subroutine cldprop & real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & & reliq, cicep, reice, cdat1, cdat2, cdat3, cdat4, cfrac, dz + real (kind=kind_phys), dimension(nlay), intent(in) :: alpha ! --- outputs: real (kind=kind_phys), dimension(nlay,ngptsw), intent(out) :: & @@ -1885,7 +1932,7 @@ subroutine cldprop & call mcica_subcol & ! --- inputs: - & ( cldf, nlay, ipseed, dz, delgth, & + & ( cldf, nlay, ipseed, dz, delgth, alpha, & ! --- outputs: & lcloudy & & ) @@ -1920,12 +1967,13 @@ end subroutine cldprop !!\param ipseed permute seed for random num generator !!\param dz layer thickness (km) !!\param de_lgth layer cloud decorrelation length (km) +!!\param alpha EXP/ER cloud overlap decorrelation parameter !!\param lcloudy sub-colum cloud profile flag array !!\section mcica_sw_gen mcica_subcol General Algorithm !> @{ ! ---------------------------------- subroutine mcica_subcol & - & ( cldf, nlay, ipseed, dz, de_lgth, & ! --- inputs + & ( cldf, nlay, ipseed, dz, de_lgth, alpha, & ! --- inputs & lcloudy & ! --- outputs & ) @@ -1940,6 +1988,7 @@ subroutine mcica_subcol & ! for lw and sw, use values differ by the number of g-pts. ! ! dz - real, layer thickness (km) nlay ! ! de_lgth-real, layer cloud decorrelation length (km) 1 ! +! alpha - real, EXP/ER decorrelation parameter nlay ! ! ! ! output variables: ! ! lcloudy - logical, sub-colum cloud profile flag array nlay*ngptsw! @@ -1950,6 +1999,8 @@ subroutine mcica_subcol & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! ! =3: cloud decorrelation-length overlap method ! +! =4: exponential cloud overlap method (AER) ! +! =5: exponential-random cloud overlap method (AER) ! ! ! ! ===================== end of definitions ==================== ! @@ -1960,6 +2011,7 @@ subroutine mcica_subcol & real (kind=kind_phys), dimension(nlay), intent(in) :: cldf, dz real (kind=kind_phys), intent(in) :: de_lgth + real (kind=kind_phys), dimension(nlay), intent(in) :: alpha ! --- outputs: logical, dimension(nlay,ngptsw), intent(out):: lcloudy @@ -2115,6 +2167,58 @@ subroutine mcica_subcol & enddo enddo + case( 4:5 ) ! exponential and exponential-random cloud overlap + +! --- Use previously derived decorrelation parameter, alpha, to specify +! the exponenential transition of cloud correlation in the vertical column. +! +! For exponential cloud overlap, the correlation is applied across layers +! without regard to the configuration of clear and cloudy layers. + +! For exponential-random cloud overlap, a new exponential transition is +! performed within each group of adjacent cloudy layers and blocks of +! cloudy layers with clear layers between them are correlated randomly. +! +! NOTE: The code below is identical for case (4) and (5) because the +! distinction in the vertical correlation between EXP and ER is already +! built into the specification of alpha (in subroutine get_alpha). + +! --- setup 2 sets of random numbers + + call random_number ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptsw + do k = 1, nlay + k1 = k1 + 1 + cdfunc(k,n) = rand2d(k1) + enddo + enddo + + call random_number ( rand2d, stat ) + + k1 = 0 + do n = 1, ngptsw + do k = 1, nlay + k1 = k1 + 1 + cdfun2(k,n) = rand2d(k1) + enddo + enddo + +! --- then working upward from the surface: +! if a random number (from an independent set: cdfun2) is smaller than +! alpha, then use the previous layer's number, otherwise use a new random +! number (keep the originally assigned one in cdfunc for that layer). + + do n = 1, ngptsw + do k = 2, nlay + k1 = k - 1 + if ( cdfun2(k,n) < alpha(k) ) then + cdfunc(k,n) = cdfunc(k1,n) + endif + enddo + enddo + end select !> -# Generate subcolumns for homogeneous clouds. diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index c8074cf47..37ce0d30c 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -234,6 +234,15 @@ kind = kind_phys intent = in optional = F +[alpha] + standard_name = cloud_overlap_decorrelation_parameter + long_name = cloud overlap decorrelation parameter + units = frac + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F [cosz] standard_name = cosine_of_zenith_angle long_name = cosine of the solar zenit angle From 33739998ab375e1c1d87dc37d9e7dc7aed126e68 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Sat, 18 Jul 2020 20:33:50 +0000 Subject: [PATCH 250/404] Chenged radians to radian --- CCPP_VARIABLES_FV3.html | 13437 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 13437 insertions(+) create mode 100644 CCPP_VARIABLES_FV3.html diff --git a/CCPP_VARIABLES_FV3.html b/CCPP_VARIABLES_FV3.html new file mode 100644 index 000000000..454874f0a --- /dev/null +++ b/CCPP_VARIABLES_FV3.html @@ -0,0 +1,13437 @@ + +CCPP variables provided by model FV3 + +

    CCPP variables provided by model FV3

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    standard_namelong_name units rank type kind source FV3 name
    CCPP_interstitial_typedefinition of type CCPP_interstitial_type DDT 0 CCPP_interstitial_type MODULE CCPP_typedefs CCPP_interstitial_type
    CCPP_interstitial_type_instanceinstance of derived type CCPP_interstitial_type DDT 0 CCPP_interstitial_type MODULE CCPP_data CCPP_interstitial
    GFS_cldprop_typedefinition of type GFS_cldprop_type DDT 0 GFS_cldprop_type MODULE GFS_typedefs GFS_cldprop_type
    GFS_cldprop_type_instancecloud fields needed by radiation from physics DDT 0 GFS_cldprop_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Cldprop
    GFS_control_typedefinition of type GFS_control_type DDT 0 GFS_control_type MODULE GFS_typedefs GFS_control_type
    GFS_control_type_instanceinstance of derived type GFS_control_type DDT 0 GFS_control_type MODULE CCPP_data GFS_Control
    GFS_coupling_typedefinition of type GFS_coupling_type DDT 0 GFS_coupling_type MODULE GFS_typedefs GFS_coupling_type
    GFS_coupling_type_instancefields to/from coupling with other components (land/ice/ocean) DDT 0 GFS_coupling_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Coupling
    GFS_data_typedefinition of type GFS_data_type DDT 0 GFS_data_type MODULE GFS_typedefs GFS_data_type
    GFS_data_type_instanceinstance of derived type GFS_data_type DDT 0 GFS_data_type MODULE CCPP_data GFS_Data(cdata%blk_no)
    GFS_data_type_instance_all_blocksinstance of derived type GFS_data_type DDT 1 GFS_data_type MODULE CCPP_data GFS_Data
    GFS_diag_typedefinition of type GFS_diag_type DDT 0 GFS_diag_type MODULE GFS_typedefs GFS_diag_type
    GFS_diag_type_instancefields targeted for diagnostic output DDT 0 GFS_diag_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Intdiag
    GFS_grid_typedefinition of type GFS_grid_type DDT 0 GFS_grid_type MODULE GFS_typedefs GFS_grid_type
    GFS_grid_type_instancegrid and interpolation related data DDT 0 GFS_grid_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Grid
    GFS_interstitial_typedefinition of type GFS_interstitial_type DDT 0 GFS_interstitial_type MODULE GFS_typedefs GFS_interstitial_type
    GFS_interstitial_type_instanceinstance of derived type GFS_interstitial_type DDT 0 GFS_interstitial_type MODULE CCPP_data GFS_Interstitial(cdata%thrd_no)
    GFS_interstitial_type_instance_all_threadsinstance of derived type GFS_interstitial_type DDT 1 GFS_interstitial_type MODULE CCPP_data GFS_Interstitial
    GFS_radtend_typedefinition of type GFS_radtend_type DDT 0 GFS_radtend_type MODULE GFS_typedefs GFS_radtend_type
    GFS_radtend_type_instanceradiation tendencies needed in physics DDT 0 GFS_radtend_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Radtend
    GFS_sfcprop_typedefinition of type GFS_sfcprop_type DDT 0 GFS_sfcprop_type MODULE GFS_typedefs GFS_sfcprop_type
    GFS_sfcprop_type_instancesurface fields DDT 0 GFS_sfcprop_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Sfcprop
    GFS_statein_typedefinition of type GFS_statein_type DDT 0 GFS_statein_type MODULE GFS_typedefs GFS_statein_type
    GFS_statein_type_instanceprognostic state data in from dycore DDT 0 GFS_statein_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Statein
    GFS_stateout_typedefinition of type GFS_stateout_type DDT 0 GFS_stateout_type MODULE GFS_typedefs GFS_stateout_type
    GFS_stateout_type_instanceprognostic state or tendencies return to dycore DDT 0 GFS_stateout_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Stateout
    GFS_tbd_typedefinition of type GFS_tbd_type DDT 0 GFS_tbd_type MODULE GFS_typedefs GFS_tbd_type
    GFS_tbd_type_instanceto be determined data that doesn't fit in any one container DDT 0 GFS_tbd_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Tbd
    Gas_concentrations_for_RRTMGP_suiteDDT containing gas concentrations for RRTMGP radiation scheme DDT 0 ty_gas_concs MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gas_concentrations
    Monin_Obukhov_similarity_function_for_heatMonin-Obukhov similarity function for heat none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%ffhh
    Monin_Obukhov_similarity_function_for_heat_at_2mMonin-Obukhov similarity parameter for heat at 2m none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fh2
    Monin_Obukhov_similarity_function_for_heat_at_2m_over_iceMonin-Obukhov similarity parameter for heat at 2m over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fh2_ice
    Monin_Obukhov_similarity_function_for_heat_at_2m_over_landMonin-Obukhov similarity parameter for heat at 2m over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fh2_land
    Monin_Obukhov_similarity_function_for_heat_at_2m_over_oceanMonin-Obukhov similarity parameter for heat at 2m over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fh2_ocean
    Monin_Obukhov_similarity_function_for_heat_over_iceMonin-Obukhov similarity function for heat over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffhh_ice
    Monin_Obukhov_similarity_function_for_heat_over_landMonin-Obukhov similarity function for heat over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffhh_land
    Monin_Obukhov_similarity_function_for_heat_over_oceanMonin-Obukhov similarity function for heat over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffhh_ocean
    Monin_Obukhov_similarity_function_for_momentumMonin-Obukhov similarity function for momentum none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%ffmm
    Monin_Obukhov_similarity_function_for_momentum_at_10mMonin-Obukhov similarity parameter for momentum at 10m none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fm10
    Monin_Obukhov_similarity_function_for_momentum_at_10m_over_iceMonin-Obukhov similarity parameter for momentum at 10m over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fm10_ice
    Monin_Obukhov_similarity_function_for_momentum_at_10m_over_landMonin-Obukhov similarity parameter for momentum at 10m over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fm10_land
    Monin_Obukhov_similarity_function_for_momentum_at_10m_over_oceanMonin-Obukhov similarity parameter for momentum at 10m over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fm10_ocean
    Monin_Obukhov_similarity_function_for_momentum_over_iceMonin-Obukhov similarity function for momentum over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffmm_ice
    Monin_Obukhov_similarity_function_for_momentum_over_landMonin-Obukhov similarity function for momentum over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffmm_land
    Monin_Obukhov_similarity_function_for_momentum_over_oceanMonin-Obukhov similarity function for momentum over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffmm_ocean
    RRTMGP_aerosol_asymmetry_parameter_for_longwave_bands_01_16aerosol asymmetry parameter for longwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolslw(:,:,:,3)
    RRTMGP_aerosol_asymmetry_parameter_for_shortwave_bands_01_16aerosol asymmetry parameter for shortwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolssw(:,:,:,3)
    RRTMGP_aerosol_optical_depth_for_longwave_bands_01_16aerosol optical depth for longwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolslw(:,:,:,1)
    RRTMGP_aerosol_optical_depth_for_shortwave_bands_01_16aerosol optical depth for shortwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolssw(:,:,:,1)
    RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16aerosol optical properties for longwave bands 01-16 various 4 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolslw
    RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16aerosol optical properties for shortwave bands 01-16 various 4 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolssw
    RRTMGP_aerosol_single_scattering_albedo_for_longwave_bands_01_16aerosol single scattering albedo for longwave bands 01-16 frac 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolslw(:,:,:,2)
    RRTMGP_aerosol_single_scattering_albedo_for_shortwave_bands_01_16aerosol single scattering albedo for shortwave bands 01-16 frac 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolssw(:,:,:,2)
    RRTMGP_cloud_ice_water_pathlayer cloud ice water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_iwp
    RRTMGP_cloud_liquid_water_pathlayer cloud liquid water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_lwp
    RRTMGP_cloud_optical_depth_layers_at_0_55mu_bandapprox .55mu band layer cloud optical depth none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldtausw
    RRTMGP_cloud_optical_depth_layers_at_10mu_bandapprox 10mu band layer cloud optical depth none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldtaulw
    RRTMGP_cloud_rain_water_pathcloud rain water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_rwp
    RRTMGP_cloud_snow_water_pathcloud snow water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_swp
    RRTMGP_lw_flux_profile_downward_allskyRRTMGP downward longwave all-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxlwDOWN_allsky
    RRTMGP_lw_flux_profile_downward_clrskyRRTMGP downward longwave clr-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxlwDOWN_clrsky
    RRTMGP_lw_flux_profile_upward_allskyRRTMGP upward longwave all-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxlwUP_allsky
    RRTMGP_lw_flux_profile_upward_clrskyRRTMGP upward longwave clr-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxlwUP_clrsky
    RRTMGP_lw_fluxeslw fluxes total sky / csk and up / down at levels W m-2 2 proflw_type MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flxprf_lw
    RRTMGP_lw_heating_rate_all_skyRRTMGP longwave all sky heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hlwc
    RRTMGP_lw_heating_rate_clear_skyRRTMGP longwave clear sky heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hlw0
    RRTMGP_lw_heating_rate_spectralRRTMGP longwave total sky heating rate (spectral) K s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hlwb
    RRTMGP_mean_effective_radius_for_ice_cloudmean effective radius for ice cloud micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_reice
    RRTMGP_mean_effective_radius_for_liquid_cloudmean effective radius for liquid cloud micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_reliq
    RRTMGP_mean_effective_radius_for_rain_dropmean effective radius for rain drop micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_rerain
    RRTMGP_mean_effective_radius_for_snow_flakemean effective radius for snow flake micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_resnow
    RRTMGP_sw_flux_profile_downward_allskyRRTMGP downward shortwave all-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxswDOWN_allsky
    RRTMGP_sw_flux_profile_downward_clrskyRRTMGP downward shortwave clr-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxswDOWN_clrsky
    RRTMGP_sw_flux_profile_upward_allskyRRTMGP upward shortwave all-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxswUP_allsky
    RRTMGP_sw_flux_profile_upward_clrskyRRTMGP upward shortwave clr-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxswUP_clrsky
    RRTMGP_sw_fluxessw fluxes total sky / csk and up / down at levels W m-2 2 profsw_type MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flxprf_sw
    RRTMGP_sw_heating_rate_all_skyRRTMGP shortwave all sky heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hswc
    RRTMGP_sw_heating_rate_clear_skyRRTMGP shortwave clear sky heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hsw0
    RRTMGP_sw_heating_rate_spectralRRTMGP shortwave total sky heating rate (spectral) K s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hswb
    RRTMGP_total_cloud_fractionlayer total cloud fraction frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_frac
    a_parameter_of_the_hybrid_coordinatea parameter for sigma pressure level calculations Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ak
    accumulated_change_of_air_temperature_due_to_FA_schemeaccumulated change of air temperature due to FA MP scheme K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%train
    accumulated_lwe_thickness_of_convective_precipitation_amount_cnvc90accumulated convective rainfall amount for cnvc90 only m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%acv
    accumulated_lwe_thickness_of_graupel_amountaccumulated graupel precipitation kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totgrp
    accumulated_lwe_thickness_of_graupel_amount_in_bucketaccumulated graupel precipitation in bucket kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totgrpb
    accumulated_lwe_thickness_of_ice_amountaccumulated ice precipitation kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totice
    accumulated_lwe_thickness_of_ice_amount_in_bucketaccumulated ice precipitation in bucket kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%toticeb
    accumulated_lwe_thickness_of_precipitation_amountaccumulated total precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totprcp
    accumulated_lwe_thickness_of_precipitation_amount_in_bucketaccumulated total precipitation in bucket m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totprcpb
    accumulated_lwe_thickness_of_snow_amountaccumulated snow precipitation kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totsnw
    accumulated_lwe_thickness_of_snow_amount_in_bucketaccumulated snow precipitation in bucket kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totsnwb
    accumulated_water_equivalent_of_frozen_precipsnow water equivalent of run-total frozen precip kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%acsnow
    active_gases_used_by_RRTMGPactive gases used by RRTMGP none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%active_gases
    adjusted_vertical_layer_dimension_for_radiationadjusted number of vertical layers for radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lmk
    adjusted_vertical_level_dimension_for_radiationadjusted number of vertical levels for radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lmp
    aerosol_asymmetry_parameter_for_longwave_bands_01_16aerosol asymmetry parameter for longwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faerlw(:,:,:,3)
    aerosol_asymmetry_parameter_for_shortwave_bands_01_16aerosol asymmetry parameter for shortwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faersw(:,:,:,3)
    aerosol_aware_parameter_deep_convectionaerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for deep convection none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%asolfac_deep
    aerosol_aware_parameter_shallow_convectionaerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for shallow convection none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%asolfac_shal
    aerosol_number_concentration_from_gocart_aerosol_climatologyGOCART aerosol climatology number concentration kg-1? 3 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%aer_nm
    aerosol_optical_depth_for_longwave_bands_01_16aerosol optical depth for longwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faerlw(:,:,:,1)
    aerosol_optical_depth_for_shortwave_bands_01_16aerosol optical depth for shortwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faersw(:,:,:,1)
    aerosol_optical_properties_for_longwave_bands_01_16aerosol optical properties for longwave bands 01-16 various 4 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faerlw
    aerosol_optical_properties_for_shortwave_bands_01_16aerosol optical properties for shortwave bands 01-16 various 4 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faersw
    aerosol_single_scattering_albedo_for_longwave_bands_01_16aerosol single scattering albedo for longwave bands 01-16 frac 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faerlw(:,:,:,2)
    aerosol_single_scattering_albedo_for_shortwave_bands_01_16aerosol single scattering albedo for shortwave bands 01-16 frac 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faersw(:,:,:,2)
    air_pressuremean layer pressure Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsl
    air_pressure_at_interfaceair pressure at model layer interfaces Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsi
    air_pressure_at_interface_for_RRTMGP_in_hPaair pressure level hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%p_lev
    air_pressure_at_interface_for_radiation_in_hPaair pressure at vertical interface for radiation calculation hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%plvl
    air_pressure_at_layer_for_RRTMGP_in_hPaair pressure layer hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%p_lay
    air_pressure_at_layer_for_radiation_in_hPaair pressure at vertical layer for radiation calculation hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%plyr
    air_pressure_at_lowest_model_layermean pressure at lowest model layer Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsl(:,1)
    air_pressure_difference_between_midlayersair pressure difference between midlayers Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%del
    air_temperaturemodel layer mean temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%tgrs
    air_temperature_at_interface_for_RRTMGPair temperature layer K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%t_lev
    air_temperature_at_interface_for_radiationair temperature at vertical interface for radiation calculation K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tlvl
    air_temperature_at_layer_for_RRTMGPair temperature layer K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%t_lay
    air_temperature_at_layer_for_radiationair temperature at vertical layer for radiation calculation K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tlyr
    air_temperature_at_lowest_model_layermean temperature at lowest model layer K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%tgrs(:,1)
    air_temperature_at_lowest_model_layer_for_diaglayer 1 temperature for diag K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%t1
    air_temperature_at_lowest_model_layer_updated_by_physicstemperature at lowest model layer updated by physics K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gt0(:,1)
    air_temperature_at_previous_time_stepair temperature at previous time step K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,3)
    air_temperature_lapse_rate_constantenvironmental air temperature lapse rate constant K m-1 0 real kind_phys MODULE GFS_typedefs rlapse
    air_temperature_saveair temperature before entering a physics scheme K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_t
    air_temperature_save_from_convective_parameterizationair temperature after cumulus parameterization K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_tcp
    air_temperature_two_time_steps_backair temperature two time steps back K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,1)
    air_temperature_updated_by_physicstemperature updated by physics K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gt0
    angle_from_east_of_maximum_subgrid_orographic_variationsangle with_respect to east of maximum subgrid orographic variations degree 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%theta
    anisotropy_of_subgrid_orographyanisotropy of subgrid orography none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gamma
    area_fraction_of_wet_canopyarea fraction of canopy that is wetted/snowed none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%fwetxy
    array_dimension_of_2d_arrays_for_microphysicsnumber of 2D arrays needed for microphysics count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%num_p2d
    array_dimension_of_3d_arrays_for_microphysicsnumber of 3D arrays needed for microphysics count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%num_p3d
    array_dimension_of_random_numbersecond dimension of random number stream for RAS count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nrcm
    asymmetry_of_subgrid_orographyasymmetry of subgrid orography none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oa4
    asymmetry_of_subgrid_orography_small_scaleasymmetry of subgrid orography small scale none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oa4ss
    atmosphere_boundary_layer_thicknesspbl height m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%hpbl
    atmosphere_diffusivity_coefficient_factormultiplicative constant for atmospheric diffusivities none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%moninq_fac
    atmosphere_energy_content_at_Lagrangian_surfaceatmosphere total energy at Lagrangian surface J m-2 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%te0
    atmosphere_energy_content_in_columnatmosphere total energy in columns J m-2 2 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%te0_2d
    atmosphere_heat_diffusivitydiffusivity for heat m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dkt
    atmosphere_heat_diffusivity_backgroundbackground vertical diffusion for heat q m2 s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%xkzm_h
    atmosphere_heat_diffusivity_background_maximummaximum background value of heat diffusivity m2 s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%xkzminv
    atmosphere_heat_diffusivity_for_mynnpbldiffusivity for heat for MYNN PBL (defined for all mass levels) m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%exch_h
    atmosphere_heat_diffusivity_from_shocdiffusivity for heat from the SHOC scheme m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nahdshoc)
    atmosphere_momentum_diffusivity_backgroundbackground vertical diffusion for momentum m2 s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%xkzm_m
    atmosphere_momentum_diffusivity_for_mynnpbldiffusivity for momentum for MYNN PBL (defined for all mass levels) m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%exch_m
    atmosphere_optical_thickness_due_to_ambient_aerosol_particlesvertical integrated optical depth for various aerosol species none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerodp
    auxiliary_2d_arraysauxiliary 2d arrays to output (for debugging) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%aux2d
    auxiliary_3d_arraysauxiliary 3d arrays to output (for debugging) none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%aux3d
    b_parameter_of_the_hybrid_coordinateb parameter for sigma pressure level calculations none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bk
    baseline_surface_roughness_lengthbaseline surface roughness length for momentum in meter m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_z0base
    bounded_vegetation_area_fractionareal fractional cover of green vegetation bounded on the bottom frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sigmaf
    bulk_richardson_number_at_lowest_model_levelbulk Richardson number at the surface none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rb
    bulk_richardson_number_at_lowest_model_level_over_icebulk Richardson number at the surface over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rb_ice
    bulk_richardson_number_at_lowest_model_level_over_landbulk Richardson number at the surface over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rb_land
    bulk_richardson_number_at_lowest_model_level_over_oceanbulk Richardson number at the surface over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rb_ocean
    canopy_air_temperaturecanopy air temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tahxy
    canopy_air_vapor_pressurecanopy air vapor pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%eahxy
    canopy_intercepted_ice_masscanopy intercepted ice mass mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%canicexy
    canopy_intercepted_liquid_watercanopy intercepted liquid water mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%canliqxy
    canopy_upward_latent_heat_fluxcanopy upward latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evcw
    canopy_water_amountcanopy water amount kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%canopy
    cappa_moist_gas_constant_at_Lagrangian_surfacecappa(i,j,k) = rdgas / ( rdgas + cvm(i)/(1.+r_vir*q(i,j,k,sphum)) ) none 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%cappa
    ccn_number_concentrationCCN number concentration kg-1? 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%ccn_nm
    ccpp_block_countfor explicit data blocking: number of blocks count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nblks
    ccpp_block_numbernumber of block for explicit data blocking in CCPP index 0 integer MODULE ccpp_types TYPE ccpp_t cdata%blk_no
    ccpp_block_sizesfor explicit data blocking: block sizes of all blocks count 1 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%blksz
    ccpp_error_flagerror flag for error handling in CCPP flag 0 integer MODULE ccpp_types TYPE ccpp_t cdata%errflg
    ccpp_error_messageerror message for error handling in CCPP none 0 character len=512 MODULE ccpp_types TYPE ccpp_t cdata%errmsg
    ccpp_loop_counterloop counter for subcycling loops in CCPP index 0 integer MODULE ccpp_types TYPE ccpp_t cdata%loop_cnt
    ccpp_tdefinition of type ccpp_t DDT 0 ccpp_t MODULE ccpp_types ccpp_t
    ccpp_t_instanceinstance of derived data type ccpp_t DDT 0 ccpp_t MODULE CCPP_data cdata
    ccpp_thread_numbernumber of thread for threading in CCPP index 0 integer MODULE ccpp_types TYPE ccpp_t cdata%thrd_no
    cell_areaarea of the grid cell m2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%area
    cell_area_for_fast_physicsarea of the grid cell for fast physics m2 2 real kind_grid MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%area
    cell_sizerelative dx for the grid cell m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%dx
    cellular_automata_finer_gridcellular automata finer grid count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncells
    cellular_automata_global_patterncellular automata global pattern flag 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%ca1
    cellular_automata_lifetimecellular automata lifetime count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nlives
    cellular_automata_seed_frequencycellular automata seed frequency in units of time steps count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nseed
    cellular_automata_seed_probabilitycellular automata seed probability fraction 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nfracseed
    characteristic_grid_length_scalerepresentative horizontal length scale of grid box m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dlength
    chemical_tracerschemical tracers g g-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tracer
    choice_of_original_scale_aware_TKE_moist_EDMF_PBLchoice of original scale-aware TKE moist EDMF PBL scheme none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isatmedmf_vdif
    choice_of_scale_aware_TKE_moist_EDMF_PBLchoice of scale-aware TKE moist EDMF PBL scheme none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isatmedmf
    choice_of_updated_scale_aware_TKE_moist_EDMF_PBLchoice of updated scale-aware TKE moist EDMF PBL scheme none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isatmedmf_vdifq
    cloud_area_fractionfraction of grid box area in which updrafts occur frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldf
    cloud_area_fraction_for_radiationfraction of clouds for low, middle, high, total and BL frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldsa
    cloud_base_mass_fluxcloud base mass flux for CS convection kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_fctd
    cloud_condensed_water_conversion_thresholdwater and ice minimum threshold for Zhao none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%wminco
    cloud_condensed_water_ice_conversion_threshold_rasconversion coefficient from cloud liquid and ice to precipitation in ras none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%wminras
    cloud_condensed_water_mixing_ratioratio of mass of cloud water to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntcw)
    cloud_condensed_water_mixing_ratio_at_lowest_model_layerratio of mass of cloud water to mass of dry air plus vapor (without condensates) at lowest model layer kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,1,GFS_Control%ntcw)
    cloud_condensed_water_mixing_ratio_at_surfacemoist cloud water mixing ratio at surface kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%clw_surf
    cloud_condensed_water_mixing_ratio_convective_transport_tracerratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clw(:,:,2)
    cloud_condensed_water_mixing_ratio_saveratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q(:,:,GFS_Control%ntcw)
    cloud_condensed_water_mixing_ratio_updated_by_physicsratio of mass of cloud water to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntcw)
    cloud_condensed_water_specific_humidity_at_Lagrangian_surfacecloud condensed water specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%q_con
    cloud_decorrelation_lengthcloud decorrelation length km 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%de_lgth
    cloud_droplet_number_concentrationnumber concentration of cloud droplets (liquid) kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntlnc)
    cloud_droplet_number_concentration_updated_by_physicsnumber concentration of cloud droplets updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntlnc)
    cloud_fraction_at_Lagrangian_surfacecloud fraction at Lagrangian surface none 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qc
    cloud_fraction_for_MGcloud fraction used by Morrison-Gettelman MP frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%indcld)
    cloud_fraction_updated_by_physicscloud fraction updated by physics frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntclamt)
    cloud_graupel_specific_humidity_at_Lagrangian_surfacecloud graupel specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qg
    cloud_ice_mixing_ratiothe ratio of the mass of ice to the mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qi_r
    cloud_ice_specific_humidity_at_Lagrangian_surfacecloud ice specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qi
    cloud_ice_water_pathlayer cloud ice water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,4)
    cloud_liquid_water_mixing_ratiothe ratio of the mass of liquid water to the mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qc_r
    cloud_liquid_water_pathlayer cloud liquid water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,2)
    cloud_liquid_water_specific_humidity_at_Lagrangian_surfacecloud liquid water specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ql
    cloud_optical_depth_layers_at_0p55mu_bandapprox .55mu band layer cloud optical depth none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldtausw
    cloud_optical_depth_layers_at_10mu_bandapprox 10mu band layer cloud optical depth none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldtaulw
    cloud_phase_transition_denominatordenominator in cloud phase transition = 1/(tcr-tf) K-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%tcrf
    cloud_phase_transition_threshold_temperaturethreshold temperature below which cloud starts to freeze K 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%tcr
    cloud_rain_specific_humidity_at_Lagrangian_surfacecloud rain specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qr
    cloud_rain_water_mixing_ratiothe ratio of the mass rain water to the mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qr_r
    cloud_rain_water_pathcloud rain water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,6)
    cloud_snow_mixing_ratiothe ratio of the mass of snow to mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qs_r
    cloud_snow_specific_humidity_at_Lagrangian_surfacecloud snow specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qs
    cloud_snow_water_pathcloud snow water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,8)
    cloud_specie_mix_flagflag to activate mixing of cloud species flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_cloudmix
    cloud_top_entrainment_instability_valuecloud top entrainment instability value none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ctei_r
    cloud_work_functioncloud work function m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld1d
    cloudpdfflag to determine which cloud PDF to use flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_cloudpdf
    cmpfsw_typedefinition of type cmpfsw_type DDT 0 cmpfsw_type MODULE module_radsw_parameters cmpfsw_type
    coefficient_c_0coefficient 1 to calculate d(Tz)/d(Ts) none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%c_0
    coefficient_c_dcoefficient 2 to calculate d(Tz)/d(Ts) none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%c_d
    coefficient_for_evaporation_of_rainfallcoeff for evaporation of largescale rain none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%evpco
    coefficient_from_cloud_ice_to_snowauto conversion coeff from ice to snow none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%psautco
    coefficient_from_cloud_ice_to_snow_rasconversion coefficient from cloud ice to snow in ras none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%psauras
    coefficient_from_cloud_water_to_rainauto conversion coeff from cloud to rain none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%prautco
    coefficient_from_cloud_water_to_rain_rasconversion coefficient from cloud water to rain in ras none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%prauras
    coefficient_w_0coefficient 3 to calculate d(Tz)/d(Ts) none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%w_0
    coefficient_w_dcoefficient 4 to calculate d(Tz)/d(Ts) none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%w_d
    coefficients_for_aerosol_scavengingarray of aerosol scavenging coefficients none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fscav
    coefficients_for_lw_cloud_opticsDDT containing spectral information for RRTMGP LW radiation scheme DDT 0 ty_cloud_optics MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_cloud_props
    coefficients_for_lw_gas_opticsDDT containing spectral information for RRTMGP LW radiation scheme DDT 0 ty_gas_optics_rrtmgp MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_gas_props
    coefficients_for_sw_cloud_opticsDDT containing spectral information for RRTMGP SW radiation scheme DDT 0 ty_cloud_optics MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_cloud_props
    coefficients_for_sw_gas_opticsDDT containing spectral information for RRTMGP SW radiation scheme DDT 0 ty_gas_optics_rrtmgp MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_gas_props
    column_precipitable_waterprecipitable water kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%pwat
    components_of_surface_downward_shortwave_fluxesderived type for special components of surface downward shortwave fluxes W m-2 1 cmpfsw_type MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%scmpsw
    condensate_fraction_detrained_in_updraft_layerscondensate fraction detrained with in a updraft layers none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dlqf
    conv_activity_counterconvective activity memory none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%cactiv
    convective_cloud_condesate_after_rainoutconvective cloud condesate after rainout kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%qci_conv
    convective_cloud_coverconvective cloud cover frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnvc
    convective_cloud_cover_in_phy_f3dconvective cloud cover in the phy_f3d array frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%ncnvc)
    convective_cloud_fraction_for_microphysicsconvective cloud fraction for microphysics frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cf_upi
    convective_cloud_switchindex used by cnvc90 (for convective clouds) none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%clstp
    convective_cloud_volume_fractionconvective cloud volume fraction frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clcn
    convective_cloud_water_mixing_ratiomoist convective cloud water mixing ratio kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnvw
    convective_cloud_water_mixing_ratio_in_phy_f3dconvective cloud water mixing ratio in the phy_f3d array kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%ncnvw)
    convective_precipitation_rate_from_previous_timestepconvective precipitation rate from previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%draincprv
    convective_transportable_tracersarray to contain cloud water and other convective trans. tracers kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clw
    convective_updraft_area_fractionconvective updraft area fraction frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sigmafrac
    convective_updraft_area_fraction_at_model_interfacesconvective updraft area fraction at model interfaces frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sigmatot
    convexity_of_subgrid_orographyconvexity of subgrid orography none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oc
    convexity_of_subgrid_orography_small_scaleconvexity of subgrid orography small scale none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ocss
    cosine_of_latitudecosine of latitude none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%coslat
    cosine_of_solar_declination_anglecos of the solar declination angle none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cdec
    cosine_of_zenith_anglemean cos of zenith angle over rad call period none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%coszen
    countergradient_mixing_term_for_temperaturecountergradient mixing term for temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gamt
    countergradient_mixing_term_for_water_vaporcountergradient mixing term for water vapor kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gamq
    couple_sgs_clouds_to_radiation_flagflag for coupling sgs clouds to radiation flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%icloud_bl
    critical_cloud_top_entrainment_instability_criteriacritical cloud top entrainment instability criteria none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ctei_rm
    critical_relative_humiditycritical relative humidity frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rhc
    critical_relative_humidity_at_PBL_topcritical relative humidity at the PBL top frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%crtrh(2)
    critical_relative_humidity_at_surfacecritical relative humidity at the surface frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%crtrh(1)
    critical_relative_humidity_at_top_of_atmospherecritical relative humidity at the top of atmosphere frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%crtrh(3)
    cumulative_atmosphere_detrainment_convective_mass_fluxcumulative detrainment mass flux Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%det_mf
    cumulative_atmosphere_downdraft_convective_mass_fluxcumulative downdraft mass flux Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dwn_mf
    cumulative_atmosphere_updraft_convective_mass_fluxcumulative updraft mass flux Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%upd_mf
    cumulative_canopy_upward_latent_heat_flu_multiplied_by_timestepcumulative canopy upward latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%evcwa
    cumulative_change_in_ozone_concentration_due_to_non_physics_processescumulative change in ozone_concentration due to non-physics processes kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,13)
    cumulative_change_in_ozone_concentration_due_to_overhead_ozone_columncumulative change in ozone concentration due to overhead ozone column kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,9)
    cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratiocumulative change in ozone concentration due to ozone mixing ratio kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,7)
    cumulative_change_in_ozone_concentration_due_to_physicscumulative change in ozone concentration due to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,11)
    cumulative_change_in_ozone_concentration_due_to_production_and_loss_ratecumulative change in ozone concentration due to production and loss rate kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,6)
    cumulative_change_in_ozone_concentration_due_to_temperaturecumulative change in ozone concentration due to temperature kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,8)
    cumulative_change_in_ozone_mixing_ratio_due_to_PBLcumulative change in ozone mixing ratio due to PBL kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,5)
    cumulative_change_in_temperature_due_to_PBLcumulative change in temperature due to PBL K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,3)
    cumulative_change_in_temperature_due_to_convective_gravity_wave_dragcumulative change in temperature due to convective gravity wave drag K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,9)
    cumulative_change_in_temperature_due_to_deep_convectioncumulative change in temperature due to deep convection K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,4)
    cumulative_change_in_temperature_due_to_longwave_radiationcumulative change in temperature due to longwave radiation K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,1)
    cumulative_change_in_temperature_due_to_microphysicscumulative change in temperature due to microphysics K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,6)
    cumulative_change_in_temperature_due_to_non_physics_processescumulative change in temperature due to non-physics processed K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,11)
    cumulative_change_in_temperature_due_to_orographic_gravity_wave_dragcumulative change in temperature due to orographic gravity wave drag K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,7)
    cumulative_change_in_temperature_due_to_physicscumulative change in temperature due to physics K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,10)
    cumulative_change_in_temperature_due_to_rayleigh_dampingcumulative change in temperature due to Rayleigh damping K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,8)
    cumulative_change_in_temperature_due_to_shallow_convectioncumulative change in temperature due to shallow convection K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,5)
    cumulative_change_in_temperature_due_to_shortwave_radiationcumulative change in temperature due to shortwave radiation K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,2)
    cumulative_change_in_water_vapor_specific_humidity_due_to_PBLcumulative change in water vapor specific humidity due to PBL kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,1)
    cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convectioncumulative change in water vapor specific humidity due to deep convection kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,2)
    cumulative_change_in_water_vapor_specific_humidity_due_to_microphysicscumulative change in water vapor specific humidity due to microphysics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,4)
    cumulative_change_in_water_vapor_specific_humidity_due_to_non_physics_processescumulative change in water vapor specific humidity due to non-physics processes kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,12)
    cumulative_change_in_water_vapor_specific_humidity_due_to_physicscumulative change in water vapor specific humidity due to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,10)
    cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convectioncumulative change in water vapor specific humidity due to shallow convection kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,3)
    cumulative_change_in_x_wind_due_to_PBLcumulative change in x wind due to PBL m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,1)
    cumulative_change_in_x_wind_due_to_convective_gravity_wave_dragcumulative change in x wind due to convective gravity wave drag m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,4)
    cumulative_change_in_x_wind_due_to_deep_convectioncumulative change in x wind due to deep convection m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,3)
    cumulative_change_in_x_wind_due_to_non_physics_processescumulative change in x wind due to non-physics processes m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,8)
    cumulative_change_in_x_wind_due_to_orographic_gravity_wave_dragcumulative change in x wind due to orographic gravity wave drag m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,2)
    cumulative_change_in_x_wind_due_to_physicscumulative change in x wind due to physics m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,7)
    cumulative_change_in_x_wind_due_to_rayleigh_dampingcumulative change in x wind due to Rayleigh damping m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,5)
    cumulative_change_in_x_wind_due_to_shallow_convectioncumulative change in x wind due to shallow convection m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,6)
    cumulative_change_in_y_wind_due_to_PBLcumulative change in y wind due to PBL m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,1)
    cumulative_change_in_y_wind_due_to_convective_gravity_wave_dragcumulative change in y wind due to convective gravity wave drag m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,4)
    cumulative_change_in_y_wind_due_to_deep_convectioncumulative change in y wind due to deep convection m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,3)
    cumulative_change_in_y_wind_due_to_non_physics_processescumulative change in y wind due to non-physics processes m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,8)
    cumulative_change_in_y_wind_due_to_orographic_gravity_wave_dragcumulative change in y wind due to orographic gravity wave drag m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,2)
    cumulative_change_in_y_wind_due_to_physicscumulative change in y wind due to physics m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,7)
    cumulative_change_in_y_wind_due_to_rayleigh_dampingcumulative change in y wind due to Rayleigh damping m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,5)
    cumulative_change_in_y_wind_due_to_shallow_convectioncumulative change in y wind due to shallow convection m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,6)
    cumulative_cloud_work_functioncumulative cloud work function (valid only with sas) m2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%cldwrk
    cumulative_lwe_thickness_of_convective_precipitation_amountcumulative convective precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%cnvprcp
    cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucketcumulative convective precipitation in bucket m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%cnvprcpb
    cumulative_snow_deposition_sublimation_upward_latent_heat_flux_multiplied_by_timestepcumulative latent heat flux from snow depo/subl multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sbsnoa
    cumulative_snow_freezing_rain_upward_latent_heat_flux_multiplied_by_timestepcumulative latent heat flux due to snow and frz rain multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%snohfa
    cumulative_soil_upward_latent_heat_flux_multiplied_by_timestepcumulative soil upward latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%evbsa
    cumulative_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc nir diff downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dnirdf_cpl
    cumulative_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc uv+vis diff dnwd sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvisdf_cpl
    cumulative_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc nir beam downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dnirbm_cpl
    cumulative_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc uv+vis beam dnwd sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvisbm_cpl
    cumulative_surface_downwelling_longwave_flux_for_coupling_multiplied_by_timestepcumulative sfc downward lw flux mulitplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dlwsfc_cpl
    cumulative_surface_downwelling_longwave_flux_multiplied_by_timestepcumulative surface downwelling LW flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dlwsfc
    cumulative_surface_downwelling_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dswsfc_cpl
    cumulative_surface_ground_heat_flux_multiplied_by_timestepcumulative groud conductive heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%gflux
    cumulative_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net nir diff downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nnirdf_cpl
    cumulative_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net uv+vis diff downward sw rad flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nvisdf_cpl
    cumulative_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net nir beam downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nnirbm_cpl
    cumulative_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net uv+vis beam downward sw rad flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nvisbm_cpl
    cumulative_surface_net_downward_longwave_flux_for_coupling_multiplied_by_timestepcumulative net downward lw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nlwsfc_cpl
    cumulative_surface_net_downward_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nswsfc_cpl
    cumulative_surface_pressure_multiplied_by_timestepcumulative surface pressure multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%psmean
    cumulative_surface_snow_area_fraction_multiplied_by_timestepcumulative surface snow area fraction multiplied by timestep s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%snowca
    cumulative_surface_upward_latent_heat_flux_for_coupling_multiplied_by_timestepcumulative sfc latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dqsfc_cpl
    cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestepcumulative sfc latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dqsfc
    cumulative_surface_upward_potential_latent_heat_flux_multiplied_by_timestepcumulative surface upward potential latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ep
    cumulative_surface_upward_sensible_heat_flux_for_coupling_multiplied_by_timestepcumulative sfc sensible heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dtsfc_cpl
    cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestepcumulative sfc sensible heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtsfc
    cumulative_surface_upwelling_longwave_flux_multiplied_by_timestepcumulative surface upwelling LW flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ulwsfc
    cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestepcumulative sfc x momentum flux multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dusfc_cpl
    cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestepcumulative sfc x momentum flux multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc
    cumulative_surface_y_momentum_flux_for_coupling_multiplied_by_timestepcumulative sfc y momentum flux multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvsfc_cpl
    cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestepcumulative sfc y momentum flux multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc
    cumulative_transpiration_flux_multiplied_by_timestepcumulative total plant transpiration rate multiplied by timestep kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%transa
    date_and_time_at_model_initializationinitialization date and time none 1 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%idat
    date_and_time_at_model_initialization_reorderedinitial date with different size and ordering none 1 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%idate
    daytime_mean_cosz_over_rad_call_perioddaytime mean cosz over rad call period none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%coszdg
    daytime_pointsdaytime points index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%idxday
    daytime_points_dimensiondaytime points dimension count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nday
    deep_soil_temperaturedeep soil temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tg3
    density_of_fresh_waterdensity of fresh water ??? 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rho_h2o
    density_of_frozen_precipitationdensity of frozen precipitation kg m-3 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rhofr
    depth_of_soil_levels_for_land_surface_modeldepth of soil levels for land surface model m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zs
    detrained_mass_fluxdetrained mass flux kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_mfd
    detrainment_and_precipitation_tunable_parameter_3_CSpartition water between detrainment and precipitation (decrease for more precipitation) m 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(3)
    detrainment_and_precipitation_tunable_parameter_4_CSpartition water between detrainment and precipitation (decrease for more precipitation) m 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(4)
    detrainment_conversion_parameter_deep_convectionconvective detrainment conversion parameter for deep convection m-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%c1_deep
    detrainment_conversion_parameter_shallow_convectionconvective detrainment conversion parameter for shallow convection m-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%c1_shal
    dewpoint_temperature_at_2m2 meter dewpoint temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dpt2m
    diag_ugwp_flagflag for CIRES UGWP Diagnostics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ldiag_ugwp
    diagnostics_control_for_chemical_tracersarray to control diagnostics for chemical tracers flag 1 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntdiag
    diffusivity_background_sigma_levelsigma threshold for background mom. diffusion none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%xkzm_s
    dimensionless_exner_function_at_lowest_model_interfacedimensionless Exner function at lowest model interface none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsik(:,1)
    dimensionless_exner_function_at_lowest_model_layerdimensionless Exner function at lowest model layer none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prslk(:,1)
    dimensionless_exner_function_at_model_interfacesdimensionless Exner function at model layer interfaces none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsik
    dimensionless_exner_function_at_model_layersdimensionless Exner function at model layer centers none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prslk
    directory_for_rte_rrtmgp_source_codedirectory for rte+rrtmgp source code (Model%rrtmgp_root) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_root
    dissipation_estimate_of_air_temperature_at_model_layersdissipation estimate model layer mean temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%diss_est
    diurnal_thermocline_layer_heat_contentheat content in diurnal thermocline layer K m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xt
    diurnal_thermocline_layer_thicknessdiurnal thermocline layer thickness m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xz
    diurnal_thermocline_layer_x_currentu-current content in diurnal thermocline layer m2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xu
    diurnal_thermocline_layer_y_currentv-current content in diurnal thermocline layer m2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xv
    do_myjpblflag to activate MYJ PBL scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_myjpbl
    do_myjsfcflag to activate MYJ surface layer scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_myjsfc
    do_mynnedmfflag to activate MYNN-EDMF flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_mynnedmf
    do_mynnsfclayflag to activate MYNN surface layer flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_mynnsfclay
    do_ugwpflag to activate CIRES UGWP flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_ugwp
    dominant_freezing_rain_typedominant freezing rain type none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tdomzr
    dominant_rain_typedominant rain type none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tdomr
    dominant_sleet_typedominant sleet type none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tdomip
    dominant_snow_typedominant snow type none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tdoms
    downdraft_fraction_in_boundary_layer_mass_flux_schemedowndraft fraction in boundary layer mass flux scheme none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_dnfr
    downdraft_fraction_reaching_surface_over_land_deep_convectiondowndraft fraction reaching surface over land for deep convection frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%betal_deep
    downdraft_fraction_reaching_surface_over_ocean_deep_convectiondowndraft fraction reaching surface over ocean for deep convection frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%betas_deep
    duration_of_sunshinesunshine duration time s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%suntim
    dynamics_to_physics_timestep_ratioratio of dynamics timestep to physics timestep none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%frain
    eddy_mixing_due_to_ugwpeddy mixing due to UGWP m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gw_kdis
    edmf_flagflag to activate the mass-flux scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_edmf
    edmf_momentum_transport_flagflag to activate the transport of momentum flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_edmf_mom
    edmf_partition_flagflag to partitioning og the MF and ED areas flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_edmf_part
    edmf_tke_transport_flagflag to activate the transport of TKE flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_edmf_tke
    effective_radius_of_stratiform_cloud_graupel_particle_in_umeff. radius of cloud graupel particle in micrometer um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%ngeffr)
    effective_radius_of_stratiform_cloud_ice_particle_in_umeff. radius of cloud ice water particle in micrometer um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nieffr)
    effective_radius_of_stratiform_cloud_liquid_water_particle_in_umeff. radius of cloud liquid water particle in micrometer um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nleffr)
    effective_radius_of_stratiform_cloud_rain_particle_in_umeffective radius of cloud rain particle in micrometers um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nreffr)
    effective_radius_of_stratiform_cloud_snow_particle_in_umeffective radius of cloud snow particle in micrometers um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nseffr)
    emdf_updraft_areaupdraft area from mass flux scheme frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_a
    emdf_updraft_cloud_waterupdraft cloud water from mass flux scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_qc
    emdf_updraft_entrainment_rateupdraft entranment rate from mass flux scheme s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_ent
    emdf_updraft_theta_lupdraft theta-l from mass flux scheme K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_thl
    emdf_updraft_total_waterupdraft total water from mass flux scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_qt
    emdf_updraft_vertical_velocityupdraft vertical velocity from mass flux scheme m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_w
    ending_x_direction_indexending X direction index count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ie
    ending_x_direction_index_domainending X direction index for domain count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ied
    ending_y_direction_indexending Y direction index count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%je
    ending_y_direction_index_domainending X direction index for domain count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%jed
    entrainment_efficiency_tunable_parameter_9_CSentrainment efficiency none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(9)
    entrainment_rate_coefficient_deep_convectionentrainment rate coefficient for deep convection none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%clam_deep
    entrainment_rate_coefficient_shallow_convectionentrainment rate coefficient for shallow convection none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%clam_shal
    equation_of_timeequation of time (radian) radian 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%slag
    equilibrium_soil_water_contentequilibrium soil water content m3 m-3 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%smoiseq
    explicit_rainfall_rate_from_previous_timestepexplicit rainfall rate previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%drainncprv
    extra_top_layerextra top layer for radiation none 0 integer MODULE GFS_typedefs LTP
    fa_threshold_relative_humidity_for_onset_of_condensationrelative humidity threshold parameter for condensation for FA scheme none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rhgrd
    fast_soil_pool_mass_content_of_carbonshort-lived carbon in shallow soil g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%fastcpxy
    fine_root_massfine root mass g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rtmassxy
    finite_volume_mean_edge_pressure_raised_to_the_power_of_kappafinite-volume mean edge pressure raised to the power of kappa Pa**kappa 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%pkz
    flag_TKE_dissipation_heatingflag for tke dissipative heating flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dspheat
    flag_arakawa_wu_downdraftAW scale-aware option in cs convection downdraft flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_awdd
    flag_convective_tracer_transportflag to enable tracer transport by updrafts/downdrafts[(:,1)] or subsidence [(:,2)] flag 2 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%otspt
    flag_debugcontrol flag for debug flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%debug
    flag_deep_convectionflag indicating whether convection occurs in column (0 or 1) flag 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kcnv
    flag_diagnosticslogical flag for storing diagnostics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lssav
    flag_diagnostics_3Dflag for 3d diagnostic fields flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ldiag3d
    flag_flipvertical flip logical flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flipv
    flag_flux_form_CSenable use of flux form of equations in CS scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flx_form
    flag_for_2015_ozone_physicsflag for new (2015) ozone physics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%oz_phys_2015
    flag_for_Arakawa_Wu_adjustmentflag for Arakawa Wu scale-aware adjustment flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_aw
    flag_for_CRICK_proof_cloud_waterflag for CRICK-Proof cloud water flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%crick_proof
    flag_for_Chikira_Sugiyama_deep_convectionflag for Chikira-Sugiyama convection flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cscnv
    flag_for_aerosol_convective_transport_and_PBL_diffusionflag for aerosol convective transport and PBL diffusion flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%trans_aero
    flag_for_aerosol_input_MG_radiationflag for using aerosols in Morrison-Gettelman MP_radiation flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iaerclm
    flag_for_aerosol_physicsflag for aerosol physics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ltaerosol
    flag_for_canopy_heat_storageflag for canopy heat storage parameterization flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lheatstrg
    flag_for_canopy_stomatal_resistance_optionchoice for canopy stomatal resistance option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_crs
    flag_for_cellular_automatacellular automata main switch flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_ca
    flag_for_chemistry_couplingflag controlling cplchm collection (default off) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cplchm
    flag_for_ciceflag for cice flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flag_cice
    flag_for_cloud_condensate_normalized_by_cloud_coverflag for cloud condensate normalized by cloud cover flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ccnorm
    flag_for_cloud_effective_radiiflag for cloud effective radii calculations in GFDL microphysics 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%effr_in
    flag_for_convective_gravity_wave_dragflag for convective gravity wave drag (gwd) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_cnvgwd
    flag_for_convective_transport_of_tracersflag for convective transport of tracers flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%trans_trac
    flag_for_default_aerosol_effect_in_shortwave_radiationdefault aerosol effect in sw only flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iaer
    flag_for_dynamic_vegetation_optionchoice for dynamic vegetation option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_dveg
    flag_for_fast_microphysics_energy_conservationflag for fast microphysics energy conservation flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%fast_mp_consv
    flag_for_fer_hires_microphysics_schemechoice of Ferrier-Aligo microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_fer_hires
    flag_for_first_time_stepflag for first time step for time integration loop (cold/warmstart) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%first_time_step
    flag_for_flux_couplingflag controlling cplflx collection (default off) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cplflx
    flag_for_fractional_gridflag for fractional grid flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%frac_grid
    flag_for_frozen_soil_permeability_optionchoice for frozen soil permeability option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_inf
    flag_for_frozen_soil_physicsflag for frozen soil physics (RUC) flag 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%flag_frsoil
    flag_for_gaussian_spatial_filterswitch for gaussian spatial filter flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_smooth
    flag_for_generic_deep_convection_tendencytrue if GFS_DCNV_generic should calculate tendencies flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flag_for_dcnv_generic_tend
    flag_for_generic_gravity_wave_drag_tendencytrue if GFS_GWD_generic should calculate tendencies flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flag_for_gwd_generic_tend
    flag_for_generic_planetary_boundary_layer_tendencytrue if GFS_PBL_generic should calculate tendencies flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flag_for_pbl_generic_tend
    flag_for_generic_shallow_convection_tendencytrue if GFS_SCNV_generic should calculate tendencies flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flag_for_scnv_generic_tend
    flag_for_gf_deep_convection_schemeflag for Grell-Freitas deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv_gf
    flag_for_gf_shallow_convection_schemeflag for Grell-Freitas shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv_gf
    flag_for_gfdl_microphysics_schemechoice of GFDL microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_gfdl
    flag_for_global_cellular_automataswitch for global ca flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_global
    flag_for_global_cellular_automata_closureswitch for ca on closure flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_closure
    flag_for_global_cellular_automata_entrswitch for ca on entr flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_entr
    flag_for_global_cellular_automata_triggerswitch for ca on trigger flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_trigger
    flag_for_gravity_wave_dragflag for gravity wave drag (gwd) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_gwd
    flag_for_ground_snow_surface_albedo_optionchoice for ground snow surface albedo option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_alb
    flag_for_guess_runflag for guess run flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flag_guess
    flag_for_hedmfflag for hybrid edmf pbl scheme (moninedmf) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hybedmf
    flag_for_hwrf_samfdeepcnv_schemeflag for hwrf samfdeepcnv scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hwrf_samfdeep
    flag_for_hwrf_samfshalcnv_schemeflag for hwrf samfshalcnv scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hwrf_samfshal
    flag_for_hydrostatic_heating_from_physicsflag for use of hydrostatic heating in physics flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%phys_hydrostatic
    flag_for_hydrostatic_solverflag for hydrostatic solver from dynamics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hydrostatic
    flag_for_hydrostatic_solver_for_fast_physicsflag for use the hydrostatic or nonhydrostatic solver for fast physics schemes flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%hydrostatic
    flag_for_in_ccn_forcing_for_morrison_gettelman_microphysicsflag for IN and CCN forcing for morrison gettelman microphysics none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iccn
    flag_for_individual_cloud_species_advectedflag for individual cloud species advected flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%spec_adv
    flag_for_initial_time_date_controlflag for initial conditions and forcing flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ictm
    flag_for_inline_cloud_fraction_calculationflag for the inline cloud fraction calculation flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%do_qa
    flag_for_iterationflag for iteration flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flag_iter
    flag_for_lake_surface_schemeflag for lake surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lkm
    flag_for_land_surface_schemeflag for land surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsm
    flag_for_lower_boundary_soil_temperature_optionchoice for lower boundary soil temperature option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_tbot
    flag_for_lw_clouds_without_sub_grid_approximationflag for lw clouds without sub-grid approximation flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isubc_lw
    flag_for_mass_flux_deep_convection_schemeflag for mass-flux deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv
    flag_for_mass_flux_shallow_convection_schemeflag for mass-flux shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv
    flag_for_max_random_overlap_clouds_for_longwave_radiationlw: max-random overlap clouds flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iovr_lw
    flag_for_max_random_overlap_clouds_for_shortwave_radiationsw: max-random overlap clouds flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iovr_sw
    flag_for_microphysics_schemechoice of microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics
    flag_for_moorthi_stratusflag for moorthi approach for stratus flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mstrat
    flag_for_morrison_gettelman_microphysics_schemechoice of Morrison-Gettelman microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_mg
    flag_for_mountain_blockingflag for mountain blocking flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%use_zmtnblck
    flag_for_noah_land_surface_schemeflag for NOAH land surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsm_noah
    flag_for_noahmp_land_surface_schemeflag for NOAH MP land surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsm_noahmp
    flag_for_nsstm_runNSSTM flag: off/uncoupled/coupled=0/1/2 flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nstf_name(1)
    flag_for_ntiedtke_deep_convection_schemeflag for new Tiedtke deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv_ntiedtke
    flag_for_ntiedtke_shallow_convection_schemeflag for new Tiedtke shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv_gf
    flag_for_old_PBL_schemeflag for using old PBL schemes flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%old_monin
    flag_for_optical_property_for_liquid_clouds_for_shortwave_radiationsw optical property for liquid clouds flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%icliq_sw
    flag_for_output_of_longwave_heating_rateflag to output lw heating rate (Radtend%lwhc) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lwhtr
    flag_for_output_of_shortwave_heating_rateflag to output sw heating rate (Radtend%swhc) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%swhtr
    flag_for_ozone_physicsflag for old (2006) ozone physics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%oz_phys
    flag_for_pdf_for_morrison_gettelman_microphysics_schemepdf flag for MG macrophysics flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pdfflag
    flag_for_precipitation_effect_on_radiationradiation precip flag for Ferrier/Moorthi flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%norad_precip
    flag_for_precipitation_partition_optionchoice for precipitation partition option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_snf
    flag_for_precipitation_typesnow/rain flag for precipitation flag 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%srflag
    flag_for_precipitation_type_algorithmflag controls precip type algorithm flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cal_pre
    flag_for_radar_reflectivityflag for radar reflectivity flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lradar
    flag_for_radiation_transfer_optionchoice for radiation transfer option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_rad
    flag_for_ras_deep_convectionflag for ras convection scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ras
    flag_for_reading_leaf_area_index_from_inputflag for reading leaf area index from initial conditions for RUC LSM flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rdlai
    flag_for_reduced_drag_coefficient_over_seaflag for reduced drag coeff. over sea flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%redrag
    flag_for_resetting_radar_reflectivity_calculationflag for resetting radar reflectivity calculation flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%radar_reset
    flag_for_restartflag for restart (warmstart) or coldstart flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%restart
    flag_for_rrtmgp_radiation_schemeflag for RRTMGP scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_RRTMGP
    flag_for_ruc_land_surface_schemeflag for RUC land surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsm_ruc
    flag_for_runoff_and_groundwater_optionchoice for runoff and groundwater option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_run
    flag_for_samf_deep_convection_schemeflag for SAMF deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv_samf
    flag_for_samf_shallow_convection_schemeflag for SAMF shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv_samf
    flag_for_sas_deep_convection_schemeflag for SAS deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv_sas
    flag_for_sas_shallow_convection_schemeflag for SAS shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv_sas
    flag_for_saturation_adjustment_for_microphysics_in_dynamicsflag for saturation adjustment for microphysics in dynamics none 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%do_sat_adj
    flag_for_scale_aware_Shinhong_PBLflag for scale-aware Shinhong PBL scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shinhong
    flag_for_scale_aware_TKE_moist_EDMF_PBLflag for scale-aware TKE moist EDMF PBL scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%satmedmf
    flag_for_sgs_cellular_automataswitch for sgs ca flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_sgs
    flag_for_shallow_convectionflag for calling shallow convection flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shal_cnv
    flag_for_shocflag for SHOC flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_shoc
    flag_for_shoc_after_convectionflag to execute SHOC after convection flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shocaftcnv
    flag_for_soil_and_snow_temperature_time_stepping_optionchoice for soil and snow temperature time stepping option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_stc
    flag_for_soil_moisture_factor_stomatal_resistance_optionchoice for soil moisture factor for canopy stomatal resistance option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_btr
    flag_for_solar_constantuse prescribed solar constant flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isol
    flag_for_stochastic_shum_optionflag for stochastic shum option flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_shum
    flag_for_stochastic_skeb_optionflag for stochastic skeb option flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_skeb
    flag_for_stochastic_surface_perturbationsflag for stochastic surface perturbations option flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_sfcperts
    flag_for_stochastic_surface_physics_perturbationsflag for stochastic surface physics perturbations flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_sppt
    flag_for_supercooled_liquid_water_optionchoice for supercooled liquid water option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_frz
    flag_for_surface_emissivity_controlsurface emissivity control flag, use fixed value of 1 flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iems
    flag_for_surface_layer_drag_coefficient_optionchoice for surface layer drag coefficient option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_sfc
    flag_for_surface_roughness_option_over_oceansurface roughness options over ocean flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sfc_z0_type
    flag_for_sw_clouds_without_sub_grid_approximationflag for sw clouds without sub-grid approximation flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isubc_sw
    flag_for_tendency_of_air_temperature_at_Lagrangian_surfaceflag for calculating tendency of air temperature due to fast physics flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%out_dt
    flag_for_the_last_step_of_k_split_remappingflag for the last step of k-split remapping flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%last_step
    flag_for_thompson_microphysics_schemechoice of Thompson microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_thompson
    flag_for_using_climatology_albedoflag for using climatology alb, based on sfc type flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ialb
    flag_for_using_prescribed_global_mean_co2_valueprescribed global mean value (old opernl) flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ico2
    flag_for_vertical_index_direction_controliflip - is not the same as flipv flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iflip
    flag_for_wave_couplingflag controlling cplwav collection (default off) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cplwav
    flag_for_wave_coupling_to_atmflag controlling ocean wave coupling to the atmosphere (default off) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cplwav2atm
    flag_for_wsm6_microphysics_schemechoice of WSM6 microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_wsm6
    flag_for_ysuflag for YSU PBL scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_ysu
    flag_for_zhao_carr_microphysics_schemechoice of Zhao-Carr microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_zhao_carr
    flag_for_zhao_carr_pdf_microphysics_schemechoice of Zhao-Carr microphysics scheme with PDF clouds flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_zhao_carr_pdf
    flag_idealized_physicsflag for idealized physics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsidea
    flag_mg3_as_mg2flag for controlling prep for Morrison-Gettelman microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%mg3_as_mg2
    flag_nonzero_lake_surface_fractionflag indicating presence of some lake surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lake
    flag_nonzero_land_surface_fractionflag indicating presence of some land surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dry
    flag_nonzero_ocean_surface_fractionflag indicating presence of some ocean surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ocean
    flag_nonzero_sea_ice_surface_fractionflag indicating presence of some sea ice surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%icy
    flag_nonzero_wet_surface_fractionflag indicating presence of some ocean or lake surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%wet
    flag_printcontrol flag for diagnostic print out flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lprnt
    flag_reset_maximum_hourly_fieldsflag for resetting maximum hourly fields flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%reset
    flag_shallow_convective_cloudflag for shallow convective cloud 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shcnvcw
    flag_skip_macroflag to skip cloud macrophysics in Morrison scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%skip_macro
    flag_to_calc_lwlogical flags for lw radiation calls flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lslwr
    flag_to_calc_swlogical flags for sw radiation calls flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsswr
    flag_tracer_diagnostics_3Dflag for 3d tracer diagnostic fields flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%qdiag3d
    forecast_date_and_timecurrent forecast date and time none 1 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%jdat
    forecast_hour_of_the_daytime in hours after 00z at the current timestep h 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%solhr
    forecast_monthcurrent forecast month none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imn
    forecast_timecurrent forecast time h 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fhour
    forecast_time_at_previous_timestepforecast time at the previous timestep h 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%phour
    fraction_of_cellular_automata_for_deep_convectionfraction of cellular automata for deep convection frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%ca_deep
    fraction_of_cloud_top_water_scavengedfraction of the tracer (cloud top water) that is scavenged by convection km-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fswtr
    fraction_of_convective_cloudfraction of convective cloud frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_cldprop_type GFS_Data(cdata%blk_no)%Cldprop%cv
    fraction_of_grid_box_with_subgrid_orography_higher_than_critical_heightfrac. of grid box with by subgrid orography higher than critical height frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clx
    fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scalefrac. of grid box with by subgrid orography higher than critical height small scale frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clxss
    fraction_of_ice_water_cloudfraction of ice water cloud frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%f_ice
    fraction_of_rain_water_cloudfraction of rain water cloud frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%f_rain
    fraction_of_tracer_scavengedfraction of the tracer (aerosols) that is scavenged by convection km-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fscav
    fractional_coverage_with_strong_cosz_dependencyfractional coverage with strong cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%facsf
    fractional_coverage_with_weak_cosz_dependencyfractional coverage with weak cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%facwf
    free_convection_layer_thicknessthickness of free convection layer (FCL) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%d_conv
    freezing_point_temperature_of_seawaterfreezing point temperature of seawater K 0 real kind_phys MODULE GFS_typedefs con_tice
    frequency_for_longwave_radiationfrequency for longwave radiation s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fhlwr
    frequency_for_shortwave_radiationfrequency for shortwave radiation s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fhswr
    frozen_cloud_threshold_temperaturethreshold temperature below which all cloud is ice K 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%tf
    gas_constant_dry_airideal gas constant for dry air J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_rd
    gas_constant_water_vaporideal gas constant for water vapor J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_rv
    gas_constants_for_multi_gases_physicsgas constants for multi gases physics J kg-1 K-1 1 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%rilist
    gas_tracers_for_multi_gas_physics_at_Lagrangian_surfacegas tracers for multi gas physics at Lagrangian surface kg kg-1 4 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qvi
    geopotentialgeopotential at model layer centers m2 s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%phil
    geopotential_at_interfacegeopotential at model layer interfaces m2 s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%phii
    geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperaturedifference between mid-layer geopotentials divided by mid-layer virtual temperature m2 s-2 K-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%del_gz
    gf_memory_counterMemory counter for GF none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%conv_act
    graupel_mixing_ratioratio of mass of graupel to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntgl)
    graupel_mixing_ratio_updated_by_physicsratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntgl)
    graupel_number_concentrationnumber concentration of graupel kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntgnc)
    graupel_number_concentration_updated_by_physicsnumber concentration of graupel updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntgnc)
    graupel_precipitation_rate_from_previous_timestepgraupel precipitation rate from previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%dgraupelprv
    grav_settlingflag to activate gravitational setting of fog flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%grav_settling
    gravitational_accelerationgravitational acceleration m s-2 0 real kind_phys MODULE GFS_typedefs con_g
    grid_sensitive_critical_cloud_top_entrainment_instability_criteriagrid sensitive critical cloud top entrainment instability criteria none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ctei_rml
    grid_size_related_coefficient_used_in_scale_sensitive_schemesgrid size related coefficient used in scale-sensitive schemes none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%work1
    grid_size_related_coefficient_used_in_scale_sensitive_schemes_complementcomplement to work1 none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%work2
    ground_temperature_for_noahmpground temperature for noahmp K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tgxy
    gwd_optflag to choose gwd scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%gwd_opt
    h2o_forcingwater forcing data various 3 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%h2opl
    heat_exchange_coefficient_for_MYJ_schemessurface heat exchange_coefficient for MYJ schemes m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_akhs
    height_above_ground_at_lowest_model_layerlayer 1 height above ground (not MSL) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zlvl
    height_of_launch_level_of_orographic_gravity_waveheight of launch level of orographic gravity wave m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zogw
    height_of_low_level_wave_breakingheight of drag due to low level wave breaking m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zlwb
    height_of_mountain_blockingheight of mountain blocking drag m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zmtb
    horizontal_dimensionhorizontal dimension count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncols
    horizontal_index_of_printed_columnhorizontal index of printed column index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ipr
    horizontal_loop_extenthorizontal loop extent count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%blksz(cdata%blk_no)
    humidity_mixing_ratiothe ratio of the mass of water vapor to the mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qv_r
    ice_fraction_in_convective_towerice fraction in convective tower frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_fice
    ice_friendly_aerosol_number_concentrationnumber concentration of ice-friendly aerosols kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntia)
    ice_friendly_aerosol_number_concentration_updated_by_physicsnumber concentration of ice-friendly aerosols updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntia)
    ice_number_concentrationnumber concentration of ice kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntinc)
    ice_number_concentration_updated_by_physicsnumber concentration of ice updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntinc)
    ice_precipitation_rate_from_previous_timestepice precipitation rate from previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%diceprv
    ice_supersaturation_thresholdice supersaturation parameter for PDF clouds none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sup
    ice_vertical_dimensionvertical loop extent for ice levels, start at 1 count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%kice
    ice_water_mixing_ratioratio of mass of ice water to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntiw)
    ice_water_mixing_ratio_convective_transport_tracerratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clw(:,:,1)
    ice_water_mixing_ratio_savecloud ice water mixing ratio before entering a physics scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q(:,:,GFS_Control%ntiw)
    ice_water_mixing_ratio_updated_by_physicsratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntiw)
    in_number_concentrationIN number concentration kg-1? 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%in_nm
    index_for_cloud_amounttracer index for cloud amount integer index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntclamt
    index_for_cloud_fraction_in_3d_arrays_for_microphysicsindex of cloud fraction in phyf3d (used only for SHOC or MG) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%indcld
    index_for_cloud_liquid_water_effective_radiusthe index of cloud liquid water effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nleffr
    index_for_convective_cloud_cover_in_phy_f3dthe index of convective cloud cover in phy f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncnvc
    index_for_convective_cloud_water_mixing_ratio_in_phy_f3dthe index of convective cloud water mixing ratio in phy f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncnvw
    index_for_diagnostic_printouthorizontal index for point used for diagnostic printout 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ipt
    index_for_first_chemical_tracertracer index for first chemical tracer index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntchs
    index_for_graupeltracer index for graupel index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntgl
    index_for_graupel_effective_radiusthe index of graupel effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ngeffr
    index_for_graupel_number_concentrationtracer index for graupel number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntgnc
    index_for_ice_cloud_condensatetracer index for ice water index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntiw
    index_for_ice_cloud_condensate_vertical_diffusion_tracerindex for ice cloud condensate in the vertically diffused tracer array index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ntiwx
    index_for_ice_cloud_number_concentrationtracer index for ice number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntinc
    index_for_ice_effective_radiusthe index of ice effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nieffr
    index_for_ice_friendly_aerosolstracer index for ice friendly aerosol index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntia
    index_for_liquid_cloud_condensatetracer index for cloud condensate (or liquid water) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntcw
    index_for_liquid_cloud_number_concentrationtracer index for liquid number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntlnc
    index_for_mass_weighted_rime_factortracer index for mass weighted rime factor index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nqrimef
    index_for_ozonetracer index for ozone mixing ratio index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntoz
    index_for_rain_effective_radiusthe index of rain effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nreffr
    index_for_rain_number_concentrationtracer index for rain number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntrnc
    index_for_rain_watertracer index for rain water index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntrw
    index_for_snow_effective_radiusthe index of snow effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nseffr
    index_for_snow_number_concentrationtracer index for snow number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntsnc
    index_for_snow_watertracer index for snow water index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntsw
    index_for_turbulent_kinetic_energytracer index for turbulent kinetic energy index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntke
    index_for_turbulent_kinetic_energy_convective_transport_tracerindex for turbulent kinetic energy in the convectively transported tracer array index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ntk
    index_for_turbulent_kinetic_energy_vertical_diffusion_tracerindex for turbulent kinetic energy in the vertically diffused tracer array index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ntkev
    index_for_water_friendly_aerosolstracer index for water friendly aerosol index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntwa
    index_for_water_vaportracer index for water vapor (specific humidity) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntqv
    index_of_atmosphere_heat_diffusivity_from_shoc_in_phy_f3dthe index of diffusivity for heat from from SHOC in phy_f3d index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nahdshoc
    index_of_dtlm_startindex to start dtlm run or not index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%ifd
    index_of_highest_temperature_inversionindex of highest temperature inversion index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kinver
    index_of_kinematic_buoyancy_flux_from_shoc_in_phy_f3dthe index of upward kinematic buoyancy flux from SHOC in phy_f3d index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nkbfshoc
    index_of_subgrid_scale_cloud_fraction_from_shoc_in_phy_f3dthe index of subgrid-scale cloud fraction from from SHOC in phy_f3d index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nscfshoc
    index_of_time_stepcurrent forecast iteration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%kdt
    initial_permutation_seed_lwinitial seed for McICA LW none 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ipsdlw0
    initial_permutation_seed_swinitial seed for McICA SW none 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ipsdsw0
    instantaneous_aerosol_column_mass_densitiesinstantaneous aerosol column mass densities for pm2.5, black carbon, organic carbon, sulfate, dust, sea salt g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%aecm
    instantaneous_anthopogenic_and_biomass_burning_emissionsinstantaneous anthopogenic and biomass burning emissions for black carbon, organic carbon, and sulfur dioxide ug m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%abem
    instantaneous_atmosphere_detrainment_convective_mass_flux(detrainment mass flux) * delt kg m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dt_mf
    instantaneous_atmosphere_downdraft_convective_mass_flux(downdraft mass flux) * delt kg m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dd_mf
    instantaneous_atmosphere_heat_diffusivityinstantaneous atmospheric heat diffusivity m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dkt
    instantaneous_atmosphere_updraft_convective_mass_flux(updraft mass flux) * delt kg m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ud_mf
    instantaneous_change_in_x_wind_due_to_mountain_blocking_draginstantaneous change in x wind due to mountain blocking drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dudt_mtb
    instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_draginstantaneous change in x wind due to orographic gw drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dudt_ogw
    instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_draginstantaneous change in x wind due to TOFD m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dudt_tms
    instantaneous_convective_scale_wet_depositioninstantaneous convective-scale wet deposition kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%wetdpc
    instantaneous_cosine_of_zenith_anglecosine of zenith angle at current time none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%xcosz
    instantaneous_dry_depositioninstantaneous dry deposition kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%drydep
    instantaneous_dust_emission_fluxinstantaneous dust emission flux kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%duem
    instantaneous_large_scale_wet_depositioninstantaneous large-scale wet deposition kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%wetdpl
    instantaneous_momentum_flux_due_to_mountain_blocking_draginstantaneous momentum flux due to mountain blocking drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tau_mtb
    instantaneous_momentum_flux_due_to_nonstationary_gravity_waveinstantaneous momentum flux due to nonstationary gravity waves Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tau_ngw
    instantaneous_momentum_flux_due_to_orographic_gravity_wave_draginstantaneous momentum flux due to orographic gravity wave drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tau_ogw
    instantaneous_momentum_flux_due_to_turbulent_orographic_form_draginstantaneous momentum flux due to TOFD Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tau_tofd
    instantaneous_seasalt_emission_fluxinstantaneous sea salt emission flux kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ssem
    instantaneous_sedimentationinstantaneous sedimentation kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sedim
    instantaneous_specific_humidity_at_2m_for_couplinginstantaneous Q2m kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%q2mi_cpl
    instantaneous_surface_air_pressure_for_couplinginstantaneous sfc pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%psurfi_cpl
    instantaneous_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_couplinginstantaneous sfc nir diff downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dnirdfi_cpl
    instantaneous_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_couplinginstantaneous sfc uv+vis diff downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvisdfi_cpl
    instantaneous_surface_downwelling_direct_near_infrared_shortwave_flux_for_couplinginstantaneous sfc nir beam downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dnirbmi_cpl
    instantaneous_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_couplinginstantaneous sfc uv+vis beam downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvisbmi_cpl
    instantaneous_surface_downwelling_longwave_flux_for_couplinginstantaneous sfc downward lw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dlwsfci_cpl
    instantaneous_surface_downwelling_shortwave_flux_for_couplinginstantaneous sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dswsfci_cpl
    instantaneous_surface_ground_heat_fluxinstantaneous sfc ground heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%gfluxi
    instantaneous_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_couplinginstantaneous net nir diff sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nnirdfi_cpl
    instantaneous_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_couplinginstantaneous net uv+vis diff downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nvisdfi_cpl
    instantaneous_surface_net_downward_direct_near_infrared_shortwave_flux_for_couplinginstantaneous net nir beam sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nnirbmi_cpl
    instantaneous_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_couplinginstantaneous net uv+vis beam downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nvisbmi_cpl
    instantaneous_surface_net_downward_longwave_flux_for_couplinginstantaneous net sfc downward lw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nlwsfci_cpl
    instantaneous_surface_net_downward_shortwave_flux_for_couplinginstantaneous net sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nswsfci_cpl
    instantaneous_surface_potential_evaporationinstantaneous sfc potential evaporation W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%epi
    instantaneous_surface_skin_temperature_for_couplinginstantaneous sfc temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%tsfci_cpl
    instantaneous_surface_upward_latent_heat_fluxsurface upward latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqsfc1
    instantaneous_surface_upward_latent_heat_flux_for_couplinginstantaneous sfc latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dqsfci_cpl
    instantaneous_surface_upward_latent_heat_flux_for_diaginstantaneous sfc latent heat flux multiplied by timestep W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dqsfci
    instantaneous_surface_upward_sensible_heat_fluxsurface upward sensible heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dtsfc1
    instantaneous_surface_upward_sensible_heat_flux_for_chemistry_couplinginstantaneous upward sensible heat flux for chemistry coupling W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%ushfsfci
    instantaneous_surface_upward_sensible_heat_flux_for_couplinginstantaneous sfc sensible heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dtsfci_cpl
    instantaneous_surface_upward_sensible_heat_flux_for_diaginstantaneous sfc sensible heat flux multiplied by timestep W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtsfci
    instantaneous_surface_x_momentum_fluxx momentum flux Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dusfc1
    instantaneous_surface_x_momentum_flux_for_couplinginstantaneous sfc x momentum flux Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dusfci_cpl
    instantaneous_surface_x_momentum_flux_for_diaginstantaneous sfc x momentum flux multiplied by timestep Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfci
    instantaneous_surface_y_momentum_fluxy momentum flux Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dvsfc1
    instantaneous_surface_y_momentum_flux_for_couplinginstantaneous sfc y momentum flux Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvsfci_cpl
    instantaneous_surface_y_momentum_flux_for_diaginstantaneous sfc y momentum flux multiplied by timestep Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfci
    instantaneous_temperature_at_2m_for_couplinginstantaneous T2m K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%t2mi_cpl
    instantaneous_water_vapor_specific_humidity_tendency_due_to_convectioninstantaneous moisture tendency due to convection kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dqdti
    instantaneous_x_stress_due_to_gravity_wave_dragzonal surface stress due to orographic gravity wave drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dusfcg
    instantaneous_x_wind_at_10m_for_couplinginstantaneous U10m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%u10mi_cpl
    instantaneous_y_stress_due_to_gravity_wave_dragmeridional surface stress due to orographic gravity wave drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dvsfcg
    instantaneous_y_wind_at_10m_for_couplinginstantaneous V10m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%v10mi_cpl
    integrated_x_momentum_flux_from_blocking_dragintegrated x momentum flux from blocking drag Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc_bl
    integrated_x_momentum_flux_from_form_dragintegrated x momentum flux from form drag Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc_fd
    integrated_x_momentum_flux_from_large_scale_gwdintegrated x momentum flux from large scale gwd Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc_ls
    integrated_x_momentum_flux_from_small_scale_gwdintegrated x momentum flux from small scale gwd Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc_ss
    integrated_y_momentum_flux_from_blocking_dragintegrated y momentum flux from blocking drag Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc_bl
    integrated_y_momentum_flux_from_form_dragintegrated y momentum flux from form drag Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc_fd
    integrated_y_momentum_flux_from_large_scale_gwdintegrated y momentum flux from large scale gwd Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc_ls
    integrated_y_momentum_flux_from_small_scale_gwdintegrated y momentum flux from small scale gwd Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc_ss
    internal_ice_temperaturesea ice internal temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tiice
    inverse_scaling_factor_for_critical_relative_humidityinverse scaling factor for critical relative humidity rad2 m-2 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dxinv
    iounit_logfortran unit number for logfile none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%logunit
    iounit_namelistfortran unit number for file opens none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nlunit
    joules_per_calorie_constantjoules per calorie constant J cal-1 0 real kind_phys MODULE GFS_typedefs con_jcal
    julian_dayjulian day days 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%julian
    k_level_of_highest_plumek-level of highest plume count 1 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ktop_plume
    k_level_of_highest_reaching_plumek-level of highest reaching plume count 1 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ktop_shallow
    kappa_dry_for_fast_physicsmodified kappa for fast physics none 0 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%akap
    kind_INTEGERdefinition of kind_INTEGER none 0 integer MODULE machine kind_INTEGER
    kind_LOGICALdefinition of kind_LOGICAL none 0 integer MODULE machine kind_LOGICAL
    kind_dyndefinition of kind_dyn none 0 integer MODULE machine kind_dyn
    kind_griddefinition of kind_grid none 0 integer MODULE machine kind_grid
    kind_physdefinition of kind_phys none 0 integer MODULE machine kind_phys
    kinematic_buoyancy_flux_from_shocupward kinematic buoyancy flux from the SHOC scheme K m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nkbfshoc)
    kinematic_surface_latent_heat_fluxkinematic surface latent heat flux m s-1 kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_elflx
    kinematic_surface_upward_latent_heat_fluxkinematic surface upward latent heat flux kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%evap
    kinematic_surface_upward_latent_heat_flux_over_icekinematic surface upward latent heat flux over ice kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evap_ice
    kinematic_surface_upward_latent_heat_flux_over_landkinematic surface upward latent heat flux over land kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evap_land
    kinematic_surface_upward_latent_heat_flux_over_oceankinematic surface upward latent heat flux over ocean kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evap_ocean
    kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughnesskinematic surface upward latent heat flux reduced by surface roughness kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evapq
    kinematic_surface_upward_sensible_heat_fluxkinematic surface upward sensible heat flux K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%hflx
    kinematic_surface_upward_sensible_heat_flux_over_icekinematic surface upward sensible heat flux over ice K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hflx_ice
    kinematic_surface_upward_sensible_heat_flux_over_landkinematic surface upward sensible heat flux over land K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hflx_land
    kinematic_surface_upward_sensible_heat_flux_over_oceankinematic surface upward sensible heat flux over ocean K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hflx_ocean
    kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughnesskinematic surface upward sensible heat flux reduced by surface roughness K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hflxq
    lake_area_fractionfraction of horizontal grid area occupied by lake frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%lakefrac
    lake_depthlake depth m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%lakedepth
    lake_ice_minimumminimum lake ice value ??? 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%min_lakeice
    lake_water_storagelake water storage mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%wslakexy
    land_area_fractionfraction of horizontal grid area occupied by land frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%landfrac
    land_area_fraction_for_microphysicsland area fraction used in microphysics schemes frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%frland
    largest_cloud_top_vertical_index_encountered_thus_farlargest cloud top vertical index encountered thus far index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%acvt
    latent_heat_flux_fraction_factor_relative_to_sensible_heat_fluxlatent heat flux fraction relative to sensible heat flux for canopy heat storage parameterization none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%e0fac
    latent_heat_of_fusion_of_water_at_0Clatent heat of fusion J kg-1 0 real kind_phys MODULE GFS_typedefs con_hfus
    latent_heat_of_vaporization_of_water_at_0Clatent heat of evaporation/sublimation J kg-1 0 real kind_phys MODULE GFS_typedefs con_hvap
    latitudelatitude radian 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%xlat
    latitude_in_degreelatitude in degree north degree_north 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%xlat_d
    latitude_index_in_debug_printoutslatitude index in debug printouts index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%latidxprnt
    layer_bottom_depth_from_snow_surfacedepth from the top of the snow surface at the bottom of the layer m 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zsnsoxy
    layer_pressure_thickness_for_radiationlayer pressure thickness on radiation levels hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%delr
    layer_thickness_for_radiationlayer thickness on radiation levels km 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dzlyr
    leaf_area_indexleaf area index none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xlaixy
    leaf_massleaf mass g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%lfmassxy
    level_of_dividing_streamlinelevel of the dividing streamline none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zmtnblck
    limit_for_temperature_tendency_for_microphysicstemperature tendency limiter per physics time step K s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ttendlim
    liquid_water_densitydensity of liquid water kg m-3 0 real kind_phys MODULE GFS_typedefs rhowater
    list_of_active_gases_used_by_RRTMGPlist of active gases used by RRTMGP none 1 character len=128 MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%active_gases_array
    local_condesed_water_number_concentrationnumber concentration of condensed water local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncpl
    local_graupel_mixing_ratioratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qgl
    local_graupel_number_concentrationnumber concentration of graupel local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncgl
    local_ice_number_concentrationnumber concentration of ice local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncpi
    local_rain_number_concentrationnumber concentration of rain local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncpr
    local_rain_water_mixing_ratioratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qrn
    local_snow_number_concentrationnumber concentration of snow local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncps
    local_snow_water_mixing_ratioratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qsnw
    log_pressure_at_Lagrangian_surfacelogarithm of pressure at Lagrangian surface Pa 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%peln
    longitudelongitude radian 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%xlon
    longwave_optical_properties_for_aerosolsFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_optical_props_aerosol
    longwave_optical_properties_for_clear_skyFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_optical_props_clrsky
    longwave_optical_properties_for_cloudy_atmosphereFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_optical_props_clouds
    longwave_optical_properties_for_cloudy_atmosphere_by_bandFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_optical_props_cloudsByBand
    longwave_source_functionFortran DDT containing RRTMGP source functions DDT 0 ty_source_func_lw MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sources
    lower_bound_of_snow_vertical_dimension_for_land_surface_modellower bound of of snow-related arrays for land surface model count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsnow_lsm_lbound
    lw_fluxes_sfclw radiation fluxes at sfc W m-2 1 sfcflw_type MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%sfcflw
    lw_fluxes_top_atmospherelw radiation fluxes at top W m-2 1 topflw_type MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%topflw
    lwe_thickness_of_convective_precipitation_amount_for_couplingtotal convective precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%rainc_cpl
    lwe_thickness_of_convective_precipitation_amount_from_previous_timestepconvective_precipitation_amount from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%raincprv
    lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestepconvective rain at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%rainc
    lwe_thickness_of_deep_convective_precipitation_amountdeep convective rainfall amount on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%raincd
    lwe_thickness_of_explicit_precipitation_amountexplicit precipitation (rain, ice, snow, graupel, ...) on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%prcpmp
    lwe_thickness_of_explicit_rain_amountexplicit rain on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rainmp
    lwe_thickness_of_explicit_rainfall_amount_from_previous_timestepexplicit rainfall from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rainncprv
    lwe_thickness_of_graupel_amountexplicit graupel fall on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%graupelmp
    lwe_thickness_of_graupel_amount_from_previous_timestepgraupel amount from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%graupelprv
    lwe_thickness_of_graupel_amount_on_dynamics_timestepgraupel fall at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%graupel
    lwe_thickness_of_ice_amountexplicit ice fall on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%icemp
    lwe_thickness_of_ice_amount_from_previous_timestepice amount from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%iceprv
    lwe_thickness_of_ice_amount_on_dynamics_timestepice fall at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ice
    lwe_thickness_of_moist_convective_adj_precipitation_amountadjusted moist convective rainfall amount on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rainmcadj
    lwe_thickness_of_precipitation_amount_for_couplingtotal rain precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%rain_cpl
    lwe_thickness_of_precipitation_amount_on_dynamics_timesteptotal rain at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%rain
    lwe_thickness_of_shallow_convective_precipitation_amountshallow convective rainfall amount on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%raincs
    lwe_thickness_of_snow_amountexplicit snow fall on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowmp
    lwe_thickness_of_snow_amount_for_couplingtotal snow precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%snow_cpl
    lwe_thickness_of_snow_amount_from_previous_timestepsnow amount from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snowprv
    lwe_thickness_of_snow_amount_on_dynamics_timestepsnow fall at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%snow
    magnitude_of_perturbation_of_heat_to_momentum_roughness_length_ratiomagnitude of perturbation of heat to momentum roughness length ratio frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertzt
    magnitude_of_perturbation_of_leaf_area_indexmagnitude of perturbation of leaf area index frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertlai
    magnitude_of_perturbation_of_momentum_roughness_lengthmagnitude of perturbation of momentum roughness length frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertz0
    magnitude_of_perturbation_of_soil_type_b_parametermagnitude of perturbation of soil type b parameter frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertshc
    magnitude_of_perturbation_of_vegetation_fractionmagnitude of perturbation of vegetation fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertvegf
    magnitude_of_surface_albedo_perturbationmagnitude of surface albedo perturbation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertalb
    map_of_block_column_number_to_global_i_indexmap of local index ix to global index i for this block none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%imap
    map_of_block_column_number_to_global_j_indexmap of local index ix to global index j for this block none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%jmap
    mass_fraction_of_convective_cloud_icemass fraction of convective cloud ice water kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qicn
    mass_fraction_of_convective_cloud_liquid_watermass fraction of convective cloud liquid water kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qlcn
    mass_weighted_rime_factor_mixing_ratiothe ratio of the mass of rime factor to mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qg_r
    mass_weighted_rime_factor_updated_by_physicsmass weighted rime factor updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%nqrimef)
    maximum_column_heating_ratemaximum heating rate in column K s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cumabs
    maximum_critical_relative_humiditymaximum critical relative humidity frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rhcmax
    maximum_mass_fluxmaximum mass flux within a column m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%maxMF
    maximum_reflectivity_at_1km_agl_over_maximum_hourly_time_intervalmaximum reflectivity at 1km agl over maximum hourly time interval dBZ 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%refdmax
    maximum_reflectivity_at_minus10c_over_maximum_hourly_time_intervalmaximum reflectivity at minus10c over maximum hourly time interval dBZ 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%refdmax263k
    maximum_relative_humidity_at_2m_over_maximum_hourly_time_intervalmaximum relative humidity at 2m over maximum hourly time interval % 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%rh02max
    maximum_scaling_factor_for_critical_relative_humiditymaximum scaling factor for critical relative humidity m2 rad-2 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dxmax
    maximum_specific_humidity_at_2mmaximum specific humidity at 2m height kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%spfhmax
    maximum_subgrid_orographymaximum of subgrid orography m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%elvmax
    maximum_temperature_at_2mmax temperature at 2m height K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tmpmax
    maximum_temperature_at_2m_over_maximum_hourly_time_intervalmaximum temperature at 2m over maximum hourly time interval K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%t02max
    maximum_u_wind_at_10m_over_maximum_hourly_time_intervalmaximum u wind at 10m over maximum hourly time interval m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%u10max
    maximum_updraft_velocity_at_cloud_basemaximum updraft velocity at cloud base m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%wcbmax
    maximum_v_wind_at_10m_over_maximum_hourly_time_intervalmaximum v wind at 10m over maximum hourly time interval m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%v10max
    maximum_vegetation_area_fractionmax fractional coverage of green vegetation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%shdmax
    maximum_wind_at_10mmaximum wind speed at 10 m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%wind10mmax
    maximum_wind_at_10m_over_maximum_hourly_time_intervalmaximum wind at 10m over maximum hourly time interval m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%spd10max
    maximum_x_wind_at_10mmaximum x wind at 10 m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%u10mmax
    maximum_y_wind_at_10mmaximum y wind at 10 m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%v10mmax
    mean_change_over_depth_in_sea_water_temperaturemean of dT(z) (zsea1 to zsea2) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dtzm
    mean_effective_radius_for_ice_cloudmean effective radius for ice cloud micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,5)
    mean_effective_radius_for_liquid_cloudmean effective radius for liquid cloud micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,3)
    mean_effective_radius_for_rain_dropmean effective radius for rain drop micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,7)
    mean_effective_radius_for_snow_flakemean effective radius for snow flake micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,9)
    mean_nir_albedo_with_strong_cosz_dependencymean nir albedo with strong cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alnsf
    mean_nir_albedo_with_weak_cosz_dependencymean nir albedo with weak cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alnwf
    mean_vis_albedo_with_strong_cosz_dependencymean vis albedo with strong cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alvsf
    mean_vis_albedo_with_weak_cosz_dependencymean vis albedo with weak cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alvwf
    mg_allow_supersat_after_sedallow supersaturation after sedimentation for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sed_supersat
    mg_autoconversion_size_threshold_ice_snowautoconversion size threshold for cloud ice to snow for MG microphysics um 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_dcs
    mg_bergeron_efficiency_factorbergeron efficiency factor for MG microphysics frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_berg_eff_factor
    mg_cloud_water_variancecloud water relative variance for MG microphysics 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_qcvar
    mg_drop_concentration_constantdroplet concentration constant for MG microphysics m-3 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ncnst
    mg_flag_drop_concentration_constantflag for constant droplet concentration for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_nccons
    mg_flag_for_cloud_ice_processesflag for cloud ice processes for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_cldice
    mg_flag_for_gmao_ice_formulationflag for gmao ice formulation flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_do_ice_gmao
    mg_flag_for_graupelflag for graupel for MG microphysics (hail possible if false) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_do_graupel
    mg_flag_for_hailflag for hail for MG microphysics (graupel possible if false) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_do_hail
    mg_flag_for_heterogeneous_freezingflag for heterogeneous freezing for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hetfrz_classnuc
    mg_flag_for_liu_liquid_treatmentflag for liu liquid treatment flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_do_liq_liu
    mg_flag_for_sb2001_autoconversionflag for SB 2001 autoconversion or accretion for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_sb_physics
    mg_flag_for_uniform_subcolumnsflag for uniform subcolumns for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%microp_uniform
    mg_flag_graupel_concentration_constantflag for constant graupel concentration for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ngcons
    mg_flag_ice_concentration_constantflag for constant ice concentration for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_nicons
    mg_graupel_concentration_constantgraupel concentration constant for MG microphysics m-3 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ngnst
    mg_ice_concentration_constantice concentration constant for MG microphysics m-3 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ninst
    mg_minimum_cloud_condensed_water_and_ice_mixing_ratiominimum cloud condensed water and ice mixing ratio in MG macro clouds kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_qcmin
    mg_minimum_cloud_condensed_water_mixing_ratiominimum cloud condensed water mixing ratio in MG macro clouds kg kg-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_qcmin(1)
    mg_minimum_ice_mixing_ratiominimum ice mixing ratio in MG macro clouds kg kg-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_qcmin(2)
    mg_minimum_rh_for_icerelative humidity threshold parameter for nucleating ice for MG microphysics none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_rhmini
    mg_time_scale_for_autoconversion_of_iceautoconversion time scale for ice for MG microphysics s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ts_auto_ice
    mg_tuning_factor_for_alphastuning factor for alphas (alpha = 1 - critical relative humidity) none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_alf
    mg_type_of_precip_fraction_methodtype of precip fraction method for MG microphysics (in_cloud or max_overlap) none 0 character len=16 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_precip_frac_method
    minimum_large_ice_fractionminimum large ice fraction in F-A mp scheme frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flgmin
    minimum_relative_humidity_at_2m_over_maximum_hourly_time_intervalminumum relative humidity at 2m over maximum hourly time interval % 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%rh02min
    minimum_scaling_factor_for_critical_relative_humidityminimum scaling factor for critical relative humidity m2 rad-2 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dxmin
    minimum_sea_ice_concentrationminimum sea ice concentration frac 0 real kind_phys MODULE GFS_typedefs cimin
    minimum_specific_humidity_at_2mminimum specific humidity at 2m height kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%spfhmin
    minimum_temperature_at_2mmin temperature at 2m height K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tmpmin
    minimum_temperature_at_2m_over_maximum_hourly_time_intervalminumum temperature at 2m over maximum hourly time interval K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%t02min
    minimum_value_of_specific_humidityfloor value for specific humidity kg kg-1 0 real kind_phys MODULE GFS_typedefs con_epsq
    minimum_vegetation_area_fractionmin fractional coverage of green vegetation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%shdmin
    mix_total_water_flagflag to mix total water or individual species flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_mixqt
    mixing_lengthmixing length in meters m 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%el_pbl
    mixing_length_flagflag to determine which mixing length form to use flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_mixlength
    model_layer_number_at_cloud_basevertical indices for low, middle and high cloud bases index 2 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%mbota
    model_layer_number_at_cloud_topvertical indices for low, middle and high cloud tops index 2 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%mtopa
    moisture_from_previous_timestepmoisture from previous time step kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%prevsq
    moisture_tendency_due_to_dynamicsmoisture tendency due to dynamics only kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%forceq
    momentum_exchange_coefficient_for_MYJ_schemessurface momentum exchange_coefficient for MYJ schemes m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_akms
    momentum_transport_reduction_factor_pgf_deep_convectionreduction factor in momentum transport due to deep convection induced pressure gradient force frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pgcon_deep
    momentum_transport_reduction_factor_pgf_shallow_convectionreduction factor in momentum transport due to shallow convection induced pressure gradient force frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pgcon_shal
    mpi_commMPI communicator index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%communicator
    mpi_rankcurrent MPI-rank index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%me
    mpi_rank_for_fast_physicscurrent MPI-rank for fast physics schemes index 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%mpirank
    mpi_rootmaster MPI-rank index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%master
    mpi_root_for_fast_physicsmaster MPI-rank for fast physics schemes index 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%mpiroot
    mpi_sizenumber of MPI tasks in communicator count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntasks
    multiplication_factor_for_critical_cloud_workfunctionmultiplication factor for tical_cloud_workfunction none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ccwf
    multiplication_factors_for_convective_gravity_wave_dragmultiplication factor for convective GWD none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cgwf
    multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_dragmultiplication factors for cdmb and gwd none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cdmbgwd
    mynn_output_flagflag initialize and output extra 3D variables flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_output
    namelist_filenamenamelist filename none 0 character len=64 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fn_nml
    namelist_filename_for_internal_file_readsnamelist filename for internal file reads none 1 character len=256 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%input_nml_file
    natural_log_of_h2o_forcing_data_pressure_levelsnatural log of h2o forcing data pressure levels log(Pa) 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%h2o_pres
    natural_log_of_ozone_forcing_data_pressure_levelsnatural log of ozone forcing data pressure levels log(Pa) 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oz_pres
    netcdf_float_fillvaluedefinition of NetCDF float FillValue none 0 real kind_phys MODULE GFS_typedefs huge
    nondimensional_snow_agenon-dimensional snow age none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%taussxy
    nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timesteptotal precipitation amount in each time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tprcp
    nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_icetotal precipitation amount in each time step over ice m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tprcp_ice
    nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_landtotal precipitation amount in each time step over land m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tprcp_land
    nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_oceantotal precipitation amount in each time step over ocean m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tprcp_ocean
    normalized_soil_wetnessnormalized soil wetness frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%wet1
    normalized_soil_wetness_for_land_surface_modelnormalized soil wetness for lsm frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%wetness
    number_concentration_of_cloud_liquid_water_particles_for_detrainmentdroplet number concentration in convective detrainment m-3 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_ndrop
    number_concentration_of_ice_crystals_for_detrainmentcrystal number concentration in convective detrainment m-3 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_nice
    number_of_2d_auxiliary_arraysnumber of 2d auxiliary arrays to output (for debugging) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%naux2d
    number_of_3d_arrays_associated_with_pdf_based_cloudsnumber of 3d arrays associated with pdf based clouds/mp count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%npdf3d
    number_of_3d_auxiliary_arraysnumber of 3d auxiliary arrays to output (for debugging) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%naux3d
    number_of_active_gases_used_by_RRTMGPnumber of gases available used by RRTMGP (Model%nGases) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nGases
    number_of_aerosol_bands_for_longwave_radiationnumber of aerosol bands for longwave radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nbdlw
    number_of_aerosol_bands_for_shortwave_radiationnumber of aerosol bands for shortwave radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nbdsw
    number_of_aerosol_output_fields_for_longwave_radiationnumber of aerosol output fields for longwave radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nf_aelw
    number_of_aerosol_output_fields_for_shortwave_radiationnumber of aerosol output fields for shortwave radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nf_aesw
    number_of_aerosol_tracers_MGnumber of aerosol tracers for Morrison Gettelman MP count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntrcaer
    number_of_aerosol_tracers_for_convectionnumber of aerosol tracers transported/scavenged by convection count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%itc
    number_of_angles_used_in_gaussian_quadratureNumber of angles used in Gaussian quadrature count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nGauss_ang
    number_of_chemical_tracersnumber of chemical tracers count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntchm
    number_of_chemical_tracers_for_diagnosticsnumber of chemical tracers for diagnostic output count 0 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ntchmdiag
    number_of_cloud_condensate_typesnumber of cloud condensate types count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncnd
    number_of_cloud_types_CSnumber of cloud types in Chikira-Sugiyama scheme count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nctp
    number_of_coefficients_in_h2o_forcing_datanumber of coefficients in h2o forcing data index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%h2o_coeff
    number_of_coefficients_in_ozone_forcing_datanumber of coefficients in ozone forcing data index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oz_coeff
    number_of_coefficients_in_ozone_forcing_data_plus_fivenumber of coefficients in ozone forcing data plus five index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oz_coeffp5
    number_of_convective_3d_cloud_fieldsnumber of convective 3d clouds fields count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncnvcld3d
    number_of_days_in_yearnumber of days in a year days 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%yearlen
    number_of_dust_bins_for_diagnosticsnumber of dust bins for diagnostics count 0 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ndust
    number_of_equatorial_longitude_pointsnumber of global points in x-dir (i) along the equator count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lonr
    number_of_fields_in_phyf2dtotal number of variables for phyf2d count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntot2d
    number_of_fields_in_phyf3dtotal number of variables for phyf3d count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntot3d
    number_of_frozen_precipitation_speciesnumber of frozen precipitation species count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fprcp
    number_of_gases_for_multi_gases_physicsnumber of gases for multi gases physics count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ngas
    number_of_ghost_zonesnumber of ghost zones defined in fv_mp count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ng
    number_of_hydrometeorschoice of cloud scheme / number of hydrometeors count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncld
    number_of_independent_cellular_automatanumber of independent cellular automata count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nca
    number_of_iterations_to_spin_up_cellular_automatanumber of iterations to spin up the ca count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nspinup
    number_of_latitude_pointsnumber of global points in y-dir (j) along the meridian count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%latr
    number_of_lines_of_namelist_filename_for_internal_file_readslines in namelist file for internal file reads count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%input_nml_file_length
    number_of_lw_bands_rrtmgpnumber of lw bands used in RRTMGP (Model%rrtmgp_nBandsLW) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nBandsLW
    number_of_lw_spectral_points_rrtmgpnumber of spectral points in RRTMGP LW calculation (model%rrtmgp_nGptsLW) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nGptsLW
    number_of_plumesnumber of plumes per grid column count 1 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%nupdraft
    number_of_rrtmgp_ice_roughnessnumber of ice-roughness categories in RRTMGP calculation (Model%rrtmgp_nrghice) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nrghice
    number_of_seasalt_bins_for_diagnosticsnumber of seasalt bins for diagnostics count 0 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%nseasalt
    number_of_snow_layersnumber of snow layers count 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snowxy
    number_of_species_for_aerosol_optical_depthnumber of species for output aerosol optical depth plus total count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nspc1
    number_of_spectral_wave_trancation_for_sasnumber of spectral wave trancation used only by sascnv and shalcnv count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%jcap
    number_of_statistical_measures_of_subgrid_orographynumber of topographic variables in GWD count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nmtvr
    number_of_surface_perturbationsnumber of surface perturbations count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nsfcpert
    number_of_sw_bands_rrtmgpnumber of sw bands used in RRTMGP (Model%rrtmgp_nBandsSW) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nBandsSW
    number_of_sw_spectral_points_rrtmgpnumber of spectral points in RRTMGP SW calculation (model%rrtmgp_nGptsSW) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nGptsSW
    number_of_tiletile number none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%tile_num
    number_of_timesteps_between_longwave_radiation_callsnumber of timesteps between longwave radiation calls 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nslwr
    number_of_timesteps_between_shortwave_radiation_callsnumber of timesteps between shortwave radiation calls 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nsswr
    number_of_timesteps_between_surface_cycling_callsnumber of timesteps between surface cycling calls 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nscyc
    number_of_timesteps_for_radiation_calls_on_physics_timestepnumber of timesteps for radiation calls on physics timestep (coldstarts only) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nhfrad
    number_of_total_tracerstotal number of tracers count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tracers_total
    number_of_tracersnumber of tracers count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntrac
    number_of_tracers_for_CSnumber of convectively transported tracers in Chikira-Sugiyama deep convection scheme count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncstrac
    number_of_tracers_for_cloud_condensatenumber of tracers for cloud condensate count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nncl
    number_of_tracers_for_convective_transportnumber of tracers for convective transport count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nn
    number_of_tracers_for_samfnumber of tracers for scale-aware mass flux schemes count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nsamftrac
    number_of_tracers_plus_onenumber of tracers plus one count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntracp1
    number_of_tracers_scavengednumber of tracers scavenged count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nscav
    number_of_vertical_diffusion_tracersnumber of tracers to diffuse vertically count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nvdiff
    number_of_vertical_layers_for_radiation_calculationsnumber of vertical levels for radiation calculations count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levr
    number_of_vertical_layers_for_radiation_calculations_plus_onenumber of vertical levels for radiation calculations + 1 count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levrp1
    number_of_water_speciesnumber of water species count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%nwat
    number_of_water_tracersnumber of water-related tracers count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tracers_water
    ocean_mixed_layer_thicknessmixed layer thickness m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zm
    omegalayer mean vertical velocity Pa s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%vvl
    omp_threadsnumber of OpenMP threads available for physics schemes count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nthreads
    omp_threads_for_fast_physicsnumber of OpenMP threads available for fast physics schemes count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%nthreads
    orographyorography m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%oro
    orography_unfilteredunfiltered orography m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%oro_uf
    ozone_concentration_at_layer_for_radiationozone concentration layer kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%olyr
    ozone_concentration_updated_by_physicsozone concentration updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntoz)
    ozone_forcingozone forcing data various 3 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%ozpl
    ozone_mixing_ratioozone mixing ratio kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntoz)
    ozone_mixing_ratio_saveozone mixing ratio before entering a physics scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q(:,:,GFS_Control%ntoz)
    perturbation_of_heat_to_momentum_roughness_length_ratioperturbation of heat to momentum roughness length ratio frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zt1d
    perturbation_of_leaf_area_indexperturbation of leaf area index frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%xlai1d
    perturbation_of_momentum_roughness_lengthperturbation of momentum roughness length frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%z01d
    perturbation_of_soil_type_b_parameterperturbation of soil type "b" parameter frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%bexp1d
    perturbation_of_vegetation_fractionperturbation of vegetation fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%vegf1d
    physics_field_for_couplingphysics_field_for_coupling m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%condition
    piratio of a circle's circumference to its diameter none 0 real kind_phys MODULE GFS_typedefs con_pi
    potential_temperature_at_2m2 meter potential temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%th2m
    potential_temperature_at_viscous_sublayer_toppotential temperature at viscous sublayer top over water K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_thz0
    prandtl_numberturbulent Prandtl number none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%prnum
    pressure_at_bottom_of_convective_cloudconvective cloud bottom pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_cldprop_type GFS_Data(cdata%blk_no)%Cldprop%cvb
    pressure_at_top_of_convective_cloudconvective cloud top pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_cldprop_type GFS_Data(cdata%blk_no)%Cldprop%cvt
    pressure_cutoff_for_rayleigh_dampingpressure level from which Rayleigh Damping is applied Pa 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%prslrd0
    pressure_thickness_at_Lagrangian_surfacepressure thickness at Lagrangian surface Pa 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%delp
    proflw_typedefinition of type proflw_type DDT 0 proflw_type MODULE module_radlw_parameters proflw_type
    profsw_typedefinition of type profsw_type DDT 0 profsw_type MODULE module_radsw_parameters profsw_type
    q_prime_squaredwater vapor fluctuation squared kg2 kg-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%qsq
    radar_reflectivity_10cminstantaneous refl_10cm dBZ 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%refl_10cm
    rain_conversion_parameter_deep_convectionconvective rain conversion parameter for deep convection m-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%c0s_deep
    rain_conversion_parameter_shallow_convectionconvective rain conversion parameter for shallow convection m-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%c0s_shal
    rain_evaporation_coefficient_deep_convectionconvective rain evaporation coefficient for deep convection frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%evfact_deep
    rain_evaporation_coefficient_over_land_deep_convectionconvective rain evaporation coefficient over land for deep convection frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%evfactl_deep
    rain_number_concentrationnumber concentration of rain kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntrnc)
    rain_number_concentration_updated_by_physicsnumber concentration of rain updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntrnc)
    rain_water_mixing_ratioratio of mass of rain water to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntrw)
    rain_water_mixing_ratio_updated_by_physicsratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntrw)
    random_number_arrayrandom number array (0-1) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%rann
    ratio_of_dry_air_to_water_vapor_gas_constantsrd/rv none 0 real kind_phys MODULE GFS_typedefs con_eps
    ratio_of_dry_air_to_water_vapor_gas_constants_minus_one(rd/rv) - 1 none 0 real kind_phys MODULE GFS_typedefs con_epsm1
    ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layerExner function ratio bt midlayer and interface at 1st layer ratio 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%work3
    ratio_of_snowfall_to_rainfallsnow ratio: ratio of snow to total precipitation (explicit only) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sr
    ratio_of_vapor_to_dry_air_gas_constants_minus_one(rv/rd) - 1 (rv = ideal gas constant for water vapor) none 0 real kind_phys MODULE GFS_typedefs con_fvirt
    ratio_of_vapor_to_dry_air_gas_constants_minus_one_default_kindzvir=rv/rd-1.0 none 0 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%zvir
    ratio_of_wind_at_lowest_model_layer_and_wind_at_10mratio of sigma level 1 wind and 10m wind ratio 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%f10m
    reciprocal_of_obukhov_lengthone over obukhov length m-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rmol
    relative_humiditylayer relative humidity frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%relhum
    rime_factorrime factor frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%f_rimef
    rrtmgp_cloud_optics_flagFlag to control which RRTMGP cloud-optics scheme (Model%rrtmgp_cld_optics) flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_cld_optics
    rrtmgp_coeff_lw_cloud_opticsfile containing coefficients for RRTMGP LW cloud optics (Model%lw_file_clouds) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lw_file_clouds
    rrtmgp_coeff_sw_cloud_opticsfile containing coefficients for RRTMGP SW cloud optics (Model%sw_file_clouds) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sw_file_clouds
    rrtmgp_kdistribution_lwfile containing RRTMGP LW k-distribution (Model%lw_file_gas) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lw_file_gas
    rrtmgp_kdistribution_swfile containing RRTMGP SW k-distribution (Model%sw_file_gas) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sw_file_gas
    scheme_flagWhen true GP is used for SW calculation and G is used for LW calculation flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_GPsw_Glw
    sea_area_fractionfraction of horizontal grid area occupied by ocean frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%oceanfrac
    sea_ice_concentrationice fraction over open water frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%fice
    sea_ice_minimumminimum sea ice value ??? 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%min_seaice
    sea_ice_temperaturesea ice surface skin temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tisfc
    sea_ice_temperature_interstitialsea ice surface skin temperature use as interstitial K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tice
    sea_ice_thicknesssea ice thickness m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%hice
    sea_land_ice_masksea/land/ice mask (=0/1/2) flag 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%islmsk
    sea_land_ice_mask_cicesea/land/ice mask cice (=0/1/2) flag 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%islmsk_cice
    sea_land_ice_mask_insea/land/ice mask input (=0/1/2) flag 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%slimskin_cpl
    sea_land_ice_mask_reallandmask: sea/land/ice=0/1/2 flag 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%slmsk
    sea_surface_reference_temperaturesea surface reference temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tref
    sea_surface_temperaturesea surface temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsfco
    sea_water_reference_densitysea water reference density kg m-3 0 real kind_phys MODULE GFS_typedefs con_rhw0
    sea_water_salinitysalinity content in diurnal thermocline layer ppt m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xs
    secant_of_diffusivity_angle_each_RRTMGP_LW_bandsecant of diffusivity angle in each RRTMGP LW band none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sec_diff_byband
    seconds_elapsed_since_model_initializationseconds elapsed since model initialization s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sec
    seed_for_random_number_generation_in_cellular_automata_schemeseed for random number generation in ca scheme none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iseed_ca
    seed_random_numbers_lwrandom seeds for sub-column cloud generators lw none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%icsdlw
    seed_random_numbers_lw_for_RRTMGPseed for random number generation for longwave radiation none 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%icseed_lw
    seed_random_numbers_swrandom seeds for sub-column cloud generators sw none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%icsdsw
    seed_random_numbers_sw_for_RRTMGPseed for random number generation for shortwave radiation none 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%icseed_sw
    sensible_heat_flux_due_to_rainfallsensible heat flux due to rainfall W 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%qrain
    sensitivity_of_dtl_heat_content_to_surface_temperatured(xt)/d(ts) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xtts
    sensitivity_of_dtl_thickness_to_surface_temperatured(xz)/d(ts) m K-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xzts
    sfcflw_typedefinition of type sfcflw_type DDT 0 sfcflw_type MODULE module_radlw_parameters sfcflw_type
    sfcfsw_typedefinition of type sfcfsw_type DDT 0 sfcfsw_type MODULE module_radsw_parameters sfcfsw_type
    shoc_flag_for_optional_surface_TKE_dissipationflag for alt. TKE diss. near surface in SHOC (>0 = ON) none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(5)
    shoc_implicit_TKE_integration_uncentering_termuncentering term for TKE integration in SHOC none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(4)
    shoc_tke_dissipatation_pressure_thresholdpressure below which extra TKE diss. is applied in SHOC Pa 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(1)
    shoc_tke_dissipation_tunable_parametermult. tuning parameter for TKE diss. in SHOC none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(2)
    shoc_tke_dissipation_tunable_parameter_near_surfacemult. tuning parameter for TKE diss. at surface in SHOC none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(3)
    shortwave_optical_properties_for_aerosolsFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_optical_props_aerosol
    shortwave_optical_properties_for_clear_skyFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_optical_props_clrsky
    shortwave_optical_properties_for_cloudy_atmosphereFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_optical_props_clouds
    shortwave_optical_properties_for_cloudy_atmosphere_by_bandFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_optical_props_cloudsByBand
    sine_of_latitudesine of latitude none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%sinlat
    sine_of_solar_declination_anglesin of the solar declination angle none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sdec
    slope_of_subgrid_orographyslope of subgrid orography none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sigma
    slow_soil_pool_mass_content_of_carbonstable carbon in deep soil g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%stblcpxy
    smallest_cloud_base_vertical_index_encountered_thus_farsmallest cloud base vertical index encountered thus far index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%acvb
    snow_albedo_at_previous_time_stepsnow albedo at previous time step frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alboldxy
    snow_deposition_sublimation_upward_latent_heat_fluxlatent heat flux from snow depo/subl W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sbsno
    snow_freezing_rain_upward_latent_heat_fluxlatent heat flux due to snow and frz rain W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snohf
    snow_layer_icesnow layer ice mm 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snicexy
    snow_layer_liquid_watersnow layer liquid water mm 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snliqxy
    snow_mass_at_previous_time_stepsnow mass at previous time step mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%sneqvoxy
    snow_number_concentrationnumber concentration of snow kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntsnc)
    snow_number_concentration_updated_by_physicsnumber concentration of snow updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntsnc)
    snow_precipitation_rate_at_surfacesnow precipitation rate at surface mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%qsnowxy
    snow_precipitation_rate_from_previous_timestepsnow precipitation rate from previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%dsnowprv
    snow_temperaturesnow_temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsnoxy
    snow_temperature_bottom_first_layersnow temperature at the bottom of the first snow layer K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsnow
    snow_vertical_dimension_for_land_surface_modelmaximum number of snow layers for land surface model count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsnow_lsm
    snow_water_mixing_ratioratio of mass of snow water to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntsw)
    snow_water_mixing_ratio_updated_by_physicsratio of mass of snow water to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntsw)
    soil_moisture_contentsoil moisture kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%soilm
    soil_temperaturesoil temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%stc
    soil_temperature_for_land_surface_modelsoil temperature for land surface model K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tslb
    soil_type_classificationsoil type at each grid cell index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%soiltype
    soil_type_classification_realsoil type for lsm index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%stype
    soil_type_dataset_choicesoil type dataset choice index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isot
    soil_upward_latent_heat_fluxsoil upward latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evbs
    soil_vertical_dimensionnumber of soil layers count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsoil
    soil_vertical_dimension_for_land_surface_modelnumber of soil layers internal to land surface model count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsoil_lsm
    soil_water_content_between_soil_bottom_and_water_tablesoil water content between the bottom of the soil and the water table m3 m-3 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%smcwtdxy
    solar_constantsolar constant (sun-earth distant adjusted) W m-2 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%solcon
    specific_heat_capacities_for_multi_gases_physicsspecific heat capacities for multi gases physics J kg-1 K-1 1 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%cpilist
    specific_heat_of_dry_air_at_constant_pressurespecific heat of dry air at constant pressure J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_cp
    specific_heat_of_ice_at_constant_pressurespecific heat of ice at constant pressure J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_csol
    specific_heat_of_liquid_water_at_constant_pressurespecific heat of liquid water at constant pressure J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_cliq
    specific_heat_of_water_vapor_at_constant_pressurespecific heat of water vapor at constant pressure J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_cvap
    specific_humidity_at_2m2 meter specific humidity kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%q2m
    specific_humidity_at_2m_from_noahmp2 meter specific humidity from noahmp kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%q2mp
    specific_humidity_at_viscous_sublayer_topspecific humidity at_viscous sublayer top over water kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_qz0
    stability_function_for_heatstability function for heat none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%Sh3D
    standard_atmospheric_pressurestandard atmospheric pressure Pa 0 real kind_phys MODULE GFS_typedefs con_p0
    standard_deviation_of_subgrid_orographystandard deviation of subgrid orography m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%hprime(:,1)
    standard_deviation_of_subgrid_orography_small_scalestandard deviation of subgrid orography small scale m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%varss
    start_index_of_other_tracersbeginning index of the non-water tracer species index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tracers_start_index
    starting_x_direction_indexstarting X direction index count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%is
    starting_x_direction_index_domainstarting X direction index for domain count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%isd
    starting_y_direction_indexstarting Y direction index count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%js
    starting_y_direction_index_domainstarting X direction index for domain count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%jsd
    statistical_measures_of_subgrid_orographyorographic metrics various 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%hprime
    stefan_boltzmann_constantStefan-Boltzmann constant W m-2 K-4 0 real kind_phys MODULE GFS_typedefs con_sbc
    stem_area_indexstem area index none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xsaixy
    stem_massstem mass g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%stmassxy
    sub_layer_cooling_amountsub-layer cooling amount K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%dt_cool
    sub_layer_cooling_thicknesssub-layer cooling thickness m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%z_c
    subgrid_cloud_fraction_pblsubgrid cloud fraction from PBL scheme frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%CLDFRA_BL
    subgrid_cloud_ice_mixing_ratio_pblsubgrid cloud ice mixing ratio from PBL scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%QI_BL
    subgrid_cloud_water_mixing_ratio_pblsubgrid cloud water mixing ratio from PBL scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%QC_BL
    subgrid_scale_cloud_fraction_from_shocsubgrid-scale cloud fraction from the SHOC scheme frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nscfshoc)
    subsurface_runoff_fluxsubsurface runoff flux kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%drain
    surface_air_pressuresurface pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%pgr
    surface_air_pressure_at_previous_time_stepsurface air pressure at previous time step Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f2d(:,2)
    surface_air_pressure_diagsurface air pressure diagnostic Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%psurf
    surface_air_pressure_two_time_steps_backsurface air pressure two time steps back Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f2d(:,1)
    surface_air_temperature_for_radiationlowest model layer air temperature for radiation K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfa
    surface_albedo_due_to_UV_and_VIS_diffusedsurface albedo due to UV+VIS diffused beam frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfcalb(:,4)
    surface_albedo_due_to_UV_and_VIS_directsurface albedo due to UV+VIS direct beam frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfcalb(:,3)
    surface_albedo_due_to_near_IR_diffusedsurface albedo due to near IR diffused beam frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfcalb(:,2)
    surface_albedo_due_to_near_IR_directsurface albedo due to near IR direct beam frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfcalb(:,1)
    surface_albedo_nearIR_diffusenear-IR (diffuse) surface albedo (sfc_alb_nir_dif) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_alb_nir_dif
    surface_albedo_nearIR_directnear-IR (direct) surface albedo (sfc_alb_nir_dir) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_alb_nir_dir
    surface_albedo_perturbationsurface albedo perturbation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%alb1d
    surface_albedo_uvvis_difUVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_alb_uvvis_dif
    surface_albedo_uvvis_dirUVVIS (direct) surface albedo (sfc_alb_uvvis_dir) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_alb_uvvis_dir
    surface_condensation_masssurface condensation mass kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%cndm_surf
    surface_diffused_shortwave_albedomean surface diffused sw albedo frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%sfalb
    surface_downwelling_diffuse_near_infrared_shortwave_fluxsurface downwelling diffuse near-infrared shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjnirdfd
    surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_stepsfc nir diff sw downward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nirdfdi
    surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_fluxsurface downwelling diffuse ultraviolet plus visible shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjvisdfd
    surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_stepsfc uv+vis diff sw downward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%visdfdi
    surface_downwelling_direct_near_infrared_shortwave_fluxsurface downwelling beam near-infrared shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjnirbmd
    surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_stepsfc nir beam sw downward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nirbmdi
    surface_downwelling_direct_ultraviolet_and_visible_shortwave_fluxsurface downwelling beam ultraviolet plus visible shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjvisbmd
    surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_stepsfc uv+vis beam sw downward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%visbmdi
    surface_downwelling_longwave_fluxsurface downwelling longwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dlwsfci
    surface_downwelling_longwave_flux_absorbed_by_groundtotal sky surface downward longwave flux absorbed by the ground W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gabsbdlw
    surface_downwelling_longwave_flux_absorbed_by_ground_over_icetotal sky surface downward longwave flux absorbed by the ground over ice W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gabsbdlw_ice
    surface_downwelling_longwave_flux_absorbed_by_ground_over_landtotal sky surface downward longwave flux absorbed by the ground over land W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gabsbdlw_land
    surface_downwelling_longwave_flux_absorbed_by_ground_over_oceantotal sky surface downward longwave flux absorbed by the ground over ocean W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gabsbdlw_ocean
    surface_downwelling_longwave_flux_on_radiation_time_steptotal sky sfc downward lw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sfcdlw
    surface_downwelling_shortwave_fluxsurface downwelling shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dswsfci
    surface_downwelling_shortwave_flux_on_radiation_time_steptotal sky sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sfcdsw
    surface_drag_coefficient_for_heat_and_moisture_for_noahmpsurface exchange coeff heat & moisture for noahmp none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%chxy
    surface_drag_coefficient_for_heat_and_moisture_in_airsurface exchange coeff heat & moisture none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cdq
    surface_drag_coefficient_for_heat_and_moisture_in_air_over_icesurface exchange coeff heat & moisture over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cdq_ice
    surface_drag_coefficient_for_heat_and_moisture_in_air_over_landsurface exchange coeff heat & moisture over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cdq_land
    surface_drag_coefficient_for_heat_and_moisture_in_air_over_oceansurface exchange coeff heat & moisture over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cdq_ocean
    surface_drag_coefficient_for_momentum_for_noahmpsurface drag coefficient for momentum for noahmp none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%cmxy
    surface_drag_coefficient_for_momentum_in_airsurface exchange coeff for momentum none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cd
    surface_drag_coefficient_for_momentum_in_air_over_icesurface exchange coeff for momentum over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cd_ice
    surface_drag_coefficient_for_momentum_in_air_over_landsurface exchange coeff for momentum over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cd_land
    surface_drag_coefficient_for_momentum_in_air_over_oceansurface exchange coeff for momentum over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cd_ocean
    surface_drag_mass_flux_for_heat_and_moisture_in_airthermal exchange coefficient kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%chh
    surface_drag_mass_flux_for_heat_and_moisture_in_air_over_icethermal exchange coefficient over ice kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%chh_ice
    surface_drag_mass_flux_for_heat_and_moisture_in_air_over_landthermal exchange coefficient over land kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%chh_land
    surface_drag_mass_flux_for_heat_and_moisture_in_air_over_oceanthermal exchange coefficient over ocean kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%chh_ocean
    surface_drag_wind_speed_for_momentum_in_airmomentum exchange coefficient m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%cmm
    surface_drag_wind_speed_for_momentum_in_air_over_icemomentum exchange coefficient over ice m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cmm_ice
    surface_drag_wind_speed_for_momentum_in_air_over_landmomentum exchange coefficient over land m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cmm_land
    surface_drag_wind_speed_for_momentum_in_air_over_oceanmomentum exchange coefficient over ocean m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cmm_ocean
    surface_emissivity_in_each_RRTMGP_LW_bandsurface emissivity in each RRTMGP LW band none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_emiss_byband
    surface_exchange_coefficient_for_heatsurface exchange coefficient for heat W m-2 K-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%flhc
    surface_exchange_coefficient_for_heat_at_2mexchange coefficient for heat at 2 meters m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%chs2
    surface_exchange_coefficient_for_moisturesurface exchange coefficient for moisture kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%flqc
    surface_exchange_coefficient_for_moisture_at_2mexchange coefficient for moisture at 2 meters m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%cqs2
    surface_friction_velocityboundary layer parameter m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%uustar
    surface_friction_velocity_dragfriction velocity isolated for momentum only m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%ustm
    surface_friction_velocity_over_icesurface friction velocity over ice m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%uustar_ice
    surface_friction_velocity_over_landsurface friction velocity over land m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%uustar_land
    surface_friction_velocity_over_oceansurface friction velocity over ocean m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%uustar_ocean
    surface_geopotential_at_Lagrangian_surfacesurface geopotential at Lagrangian surface m2 s-2 2 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%phis
    surface_ground_temperature_for_radiationsurface ground temperature for radiation K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfg
    surface_latent_heatlatent heating at the surface (pos = up) W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%lh
    surface_layer_evaporation_switchsurface layer evaporation switch none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_chkqlm
    surface_longwave_emissivitysurface lw emissivity in fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%semis
    surface_longwave_emissivity_over_ice_interstitialsurface lw emissivity in fraction over ice (temporary use as interstitial) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%semis_ice
    surface_longwave_emissivity_over_land_interstitialsurface lw emissivity in fraction over land (temporary use as interstitial) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%semis_land
    surface_longwave_emissivity_over_ocean_interstitialsurface lw emissivity in fraction over ocean (temporary use as interstitial) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%semis_ocean
    surface_midlayer_air_temperature_in_longwave_radiationsurface air temp during lw calculation K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%tsflw
    surface_net_downwelling_shortwave_fluxsurface net downwelling shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%nswsfci
    surface_net_downwelling_shortwave_flux_on_radiation_time_steptotal sky sfc netsw flx into ground W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sfcnsw
    surface_roughness_fraction_factorsurface roughness fraction for canopy heat storage parameterization none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%z0fac
    surface_roughness_lengthsurface roughness length cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zorl
    surface_roughness_length_over_ice_interstitialsurface roughness length over ice (temporary use as interstitial) cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zorl_ice
    surface_roughness_length_over_landsurface roughness length over land cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zorll
    surface_roughness_length_over_land_interstitialsurface roughness length over land (temporary use as interstitial) cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zorl_land
    surface_roughness_length_over_oceansurface roughness length over ocean cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zorlo
    surface_roughness_length_over_ocean_interstitialsurface roughness length over ocean (temporary use as interstitial) cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zorl_ocean
    surface_runoffsurface water runoff (from lsm) kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%srunoff
    surface_runoff_fluxsurface runoff flux kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%runoff
    surface_skin_temperaturesurface skin temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsfc
    surface_skin_temperature_after_iterationsurface skin temperature after iteration K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsurf
    surface_skin_temperature_after_iteration_over_icesurface skin temperature after iteration over ice K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsurf_ice
    surface_skin_temperature_after_iteration_over_landsurface skin temperature after iteration over land K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsurf_land
    surface_skin_temperature_after_iteration_over_oceansurface skin temperature after iteration over ocean K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsurf_ocean
    surface_skin_temperature_for_nsstocean surface skin temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tseal
    surface_skin_temperature_over_ice_interstitialsurface skin temperature over ice (temporary use as interstitial) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfc_ice
    surface_skin_temperature_over_landsurface skin temperature over land K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsfcl
    surface_skin_temperature_over_land_interstitialsurface skin temperature over land (temporary use as interstitial) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfc_land
    surface_skin_temperature_over_ocean_interstitialsurface skin temperature over ocean (temporary use as interstitial) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfc_ocean
    surface_slope_classificationsurface slope type at each grid cell index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%slopetype
    surface_slope_classification_realsfc slope type for lsm index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%slope
    surface_snow_area_fractionsurface snow area fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowc
    surface_snow_area_fraction_over_landsurface snow area fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%sncovr
    surface_snow_meltsnow melt during timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowmt
    surface_snow_thickness_water_equivalentwater equivalent snow depth mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snowd
    surface_snow_thickness_water_equivalent_over_icewater equivalent snow depth over ice mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowd_ice
    surface_snow_thickness_water_equivalent_over_landwater equivalent snow depth over land mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowd_land
    surface_snow_thickness_water_equivalent_over_oceanwater equivalent snow depth over ocean mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowd_ocean
    surface_specific_humiditysurface air saturation specific humidity kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%qss
    surface_specific_humidity_for_MYJ_schemessurface air saturation specific humidity for MYJ schemes kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_qsfc
    surface_specific_humidity_over_icesurface air saturation specific humidity over ice kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qss_ice
    surface_specific_humidity_over_landsurface air saturation specific humidity over land kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qss_land
    surface_specific_humidity_over_oceansurface air saturation specific humidity over ocean kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qss_ocean
    surface_stability_parametermonin obukhov surface stability parameter none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zol
    surface_upward_latent_heat_flux_for_couplingsfc latent heat flux input for coupling W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dqsfcin_cpl
    surface_upward_latent_heat_flux_reduction_factorsurface upward latent heat flux reduction factor from canopy heat storage none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hefac
    surface_upward_potential_latent_heat_fluxsurface upward potential latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ep1d
    surface_upward_potential_latent_heat_flux_over_icesurface upward potential latent heat flux over ice W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ep1d_ice
    surface_upward_potential_latent_heat_flux_over_landsurface upward potential latent heat flux over land W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ep1d_land
    surface_upward_potential_latent_heat_flux_over_oceansurface upward potential latent heat flux over ocean W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ep1d_ocean
    surface_upward_sensible_heat_flux_for_couplingsfc sensible heat flux input W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dtsfcin_cpl
    surface_upward_sensible_heat_flux_reduction_factorsurface upward sensible heat flux reduction factor from canopy heat storage none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hffac
    surface_upwelling_diffuse_near_infrared_shortwave_fluxsurface upwelling diffuse near-infrared shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjnirdfu
    surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_stepsfc nir diff sw upward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nirdfui
    surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_fluxsurface upwelling diffuse ultraviolet plus visible shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjvisdfu
    surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_stepsfc uv+vis diff sw upward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%visdfui
    surface_upwelling_direct_near_infrared_shortwave_fluxsurface upwelling beam near-infrared shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjnirbmu
    surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_stepsfc nir beam sw upward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nirbmui
    surface_upwelling_direct_ultraviolet_and_visible_shortwave_fluxsurface upwelling beam ultraviolet plus visible shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjvisbmu
    surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_stepsfc uv+vis beam sw upward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%visbmui
    surface_upwelling_longwave_fluxsurface upwelling longwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ulwsfci
    surface_upwelling_longwave_flux_for_couplingsurface upwelling LW flux for coupling W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%ulwsfcin_cpl
    surface_upwelling_longwave_flux_over_ice_interstitialsurface upwelling longwave flux at current time over ice (temporary use as interstitial) W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjsfculw_ice
    surface_upwelling_longwave_flux_over_land_interstitialsurface upwelling longwave flux at current time over land (temporary use as interstitial) W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjsfculw_land
    surface_upwelling_longwave_flux_over_ocean_interstitialsurface upwelling longwave flux at current time over ocean (temporary use as interstitial) W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjsfculw_ocean
    surface_upwelling_shortwave_fluxsurface upwelling shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%uswsfci
    surface_wind_enhancement_due_to_convectionsurface wind enhancement due to convection m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f2d(:,GFS_Control%num_p2d)
    surface_wind_stresssurface wind stress m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%stress
    surface_wind_stress_over_icesurface wind stress over ice m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%stress_ice
    surface_wind_stress_over_landsurface wind stress over land m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%stress_land
    surface_wind_stress_over_oceansurface wind stress over ocean m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%stress_ocean
    surface_x_momentum_flux_for_couplingsfc x momentum flux for coupling Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dusfcin_cpl
    surface_y_momentum_flux_for_couplingsfc y momentum flux for coupling Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvsfcin_cpl
    sw_fluxes_sfcsw radiation fluxes at sfc W m-2 1 sfcfsw_type MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%sfcfsw
    sw_fluxes_top_atmospheresw radiation fluxes at toa W m-2 1 topfsw_type MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%topfsw
    t_prime_q_primecovariance of temperature and moisture K kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%cov
    t_prime_squaredtemperature fluctuation squared K2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%tsq
    temperature_at_2m2 meter temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%t2m
    temperature_at_2m_from_noahmp2 meter temperature from noahmp K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%t2mmp
    temperature_at_zero_celsiustemperature at 0 degree Celsius K 0 real kind_phys MODULE GFS_typedefs con_t0c
    temperature_from_previous_timesteptemperature from previous time step K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%prevst
    temperature_tendency_due_to_dynamicstemperature tendency due to dynamics only K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%forcet
    tendency_of_air_temperature_at_Lagrangian_surfaceair temperature tendency due to fast physics at Lagrangian surface K s-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%dtdt
    tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_stepclear sky lw heating rates K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%lwhc
    tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levelsclear sky heating rate due to longwave radiation K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%htlw0
    tendency_of_air_temperature_due_to_longwave_heating_for_ideaidea sky lw heating rates K s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%lwhd
    tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_steptotal sky lw heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%htrlw
    tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levelstotal sky heating rate due to longwave radiation K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%htlwc
    tendency_of_air_temperature_due_to_model_physicsair temperature tendency due to model physics K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dtdt
    tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_skyclear sky radiative (shortwave + longwave) heating rate at current time K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dtdtc
    tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_steptemp. change due to radiative heating per time step K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%dtdtr
    tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_stepclear sky sw heating rates K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%swhc
    tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levelsclear sky heating rates due to shortwave radiation K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%htsw0
    tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_steptotal sky sw heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%htrsw
    tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levelstotal sky heating rate due to shortwave radiation K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%htswc
    tendency_of_air_temperature_due_to_ugwpair temperature tendency due to UGWP K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gw_dtdt
    tendency_of_cloud_droplet_number_concentration_due_to_model_physicsnumber concentration of cloud droplets (liquid) tendency due to model physics kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntlnc)
    tendency_of_cloud_water_due_to_convective_microphysicstendency of cloud water due to convective microphysics kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_dqldt
    tendency_of_graupel_mixing_ratio_due_to_model_physicsratio of mass of graupel tendency to mass of dry air plus vapor (without condensates) due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntgl)
    tendency_of_ice_cloud_water_mixing_ratio_due_to_model_physicscloud condensed water mixing ratio tendency due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntiw)
    tendency_of_ice_friendly_aerosol_number_concentration_due_to_model_physicsnumber concentration of ice-friendly aerosols tendency due to model physics kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntia)
    tendency_of_ice_friendly_aerosols_at_surfaceinstantaneous ice-friendly sfc aerosol source kg-1 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nifa2d
    tendency_of_ice_number_concentration_due_to_model_physicsnumber concentration of ice tendency due to model physics kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntinc)
    tendency_of_liquid_cloud_water_mixing_ratio_due_to_model_physicscloud condensed water mixing ratio tendency due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntcw)
    tendency_of_lwe_thickness_of_precipitation_amount_for_couplingchange in rain_cpl (coupling_type) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%drain_cpl
    tendency_of_lwe_thickness_of_snow_amount_for_couplingchange in show_cpl (coupling_type) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%dsnow_cpl
    tendency_of_ozone_mixing_ratio_due_to_model_physicsozone mixing ratio tendency due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntoz)
    tendency_of_rain_water_mixing_ratio_due_to_microphysicstendency of rain water mixing ratio due to microphysics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rainp
    tendency_of_rain_water_mixing_ratio_due_to_model_physicsratio of mass of rain water tendency to mass of dry air plus vapor (without condensates) due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntrw)
    tendency_of_snow_water_mixing_ratio_due_to_model_physicsratio of mass of snow water tendency to mass of dry air plus vapor (without condensates) due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntsw)
    tendency_of_tracers_due_to_model_physicsupdated tendency of the tracers due to model physics kg kg-1 s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt
    tendency_of_turbulent_kinetic_energy_due_to_model_physicsturbulent kinetic energy tendency due to model physics J s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntke)
    tendency_of_vertically_diffused_tracer_concentrationupdated tendency of the tracers due to vertical diffusion in PBL scheme kg kg-1 s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dvdftra
    tendency_of_water_friendly_aerosol_number_concentration_due_to_model_physicsnumber concentration of water-friendly aerosols tendency due to model physics kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntwa)
    tendency_of_water_friendly_aerosols_at_surfaceinstantaneous water-friendly sfc aerosol source kg-1 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nwfa2d
    tendency_of_water_vapor_specific_humidity_due_to_model_physicswater vapor specific humidity tendency due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntqv)
    tendency_of_x_wind_due_to_convective_gravity_wave_dragzonal wind tendency due to convective gravity wave drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gwdcu
    tendency_of_x_wind_due_to_model_physicszonal wind tendency due to model physics m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dudt
    tendency_of_x_wind_due_to_ugwpzonal wind tendency due to UGWP m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gw_dudt
    tendency_of_y_wind_due_to_convective_gravity_wave_dragmeridional wind tendency due to convective gravity wave drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gwdcv
    tendency_of_y_wind_due_to_model_physicsmeridional wind tendency due to model physics m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dvdt
    tendency_of_y_wind_due_to_ugwpmeridional wind tendency due to UGWP m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gw_dvdt
    theta_detrainment_tendencyupdraft theta detrainment tendency K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%det_thl
    theta_startemperature flux divided by ustar (temperature scale) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%mol
    theta_subsidence_tendencyupdraft theta subsidence tendency K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sub_thl
    thickness_at_Lagrangian_surfacethickness at Lagrangian_surface m 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%delz
    threshold_for_perturbed_vertical_velocitythreshold used for perturbed vertical velocity m s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nthresh
    threshold_volume_fraction_of_condensed_water_in_soilsoil moisture threshold (volumetric) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%smcref2
    time_integral_of_change_in_x_wind_due_to_mountain_blocking_dragtime integral of change in x wind due to mountain blocking drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt_mtb
    time_integral_of_change_in_x_wind_due_to_nonstationary_gravity_wavetime integral of change in x wind due to NGW m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt_ngw
    time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_dragtime integral of change in x wind due to orographic gw drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt_ogw
    time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_dragtime integral of change in x wind due to TOFD m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt_tms
    time_integral_of_change_in_y_wind_due_to_nonstationary_gravity_wavetime integral of change in y wind due to NGW m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt_ngw
    time_integral_of_height_of_launch_level_of_orographic_gravity_wavetime integral of height of launch level of orographic gravity wave m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zogw
    time_integral_of_height_of_low_level_wave_breakingtime integral of height of drag due to low level wave breaking m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zlwb
    time_integral_of_height_of_mountain_blockingtime integral of height of mountain blocking drag m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zmtb
    time_integral_of_momentum_flux_due_to_mountain_blocking_dragtime integral of momentum flux due to mountain blocking drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tau_mtb
    time_integral_of_momentum_flux_due_to_nonstationary_gravity_wavetime integral of momentum flux due to nonstationary gravity waves Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tau_ngw
    time_integral_of_momentum_flux_due_to_orographic_gravity_wave_dragtime integral of momentum flux due to orographic gravity wave drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tau_ogw
    time_integral_of_momentum_flux_due_to_turbulent_orographic_form_dragtime integral of momentum flux due to TOFD Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tau_tofd
    time_integral_of_x_stress_due_to_gravity_wave_dragvertically integrated u change by OGWD Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dugwd
    time_integral_of_y_stress_due_to_gravity_wave_dragvertically integrated v change by OGWD Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvgwd
    time_interval_for_maximum_hourly_fieldsreset time interval for maximum hourly fields s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%avg_max_length
    time_scale_for_rayleigh_dampingtime scale for Rayleigh damping in days d 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ral_ts
    time_since_diagnostics_zeroedtime since diagnostics variables have been zeroed h 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%zhour
    time_step_for_dynamicsdynamics timestep s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dtf
    time_step_for_physicsphysics timestep s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dtp
    time_step_for_radiationradiation time step s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%raddt
    time_step_for_remapping_for_fast_physicsremapping time step s 0 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%mdt
    tke_advectflag for activating TKE advection flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_tkeadvect
    tke_at_mass_points2 x tke at mass points m2 s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%qke
    tke_budgetflag for activating TKE budget flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_tkebudget
    tke_dissipative_heating_factortke dissipative heating factor none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dspfac
    toa_incident_lw_flux_by_spectral_pointTOA longwave incident flux at each spectral points W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%toa_src_lw
    toa_incident_sw_flux_by_spectral_pointTOA shortwave incident flux at each spectral points W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%toa_src_sw
    top_layer_index_for_fast_physicstop_layer_inder_for_gfdl_mp index 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%kmp
    topflw_typedefinition of type topflw_type DDT 0 topflw_type MODULE module_radlw_parameters topflw_type
    topfsw_typedefinition of type topfsw_type DDT 0 topfsw_type MODULE module_radsw_parameters topfsw_type
    total_accumulated_snowfallrun-total snow accumulation on the ground kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snowfallac
    total_cloud_condensate_mixing_ratio_updated_by_physicstotal cloud condensate mixing ratio (except water vapor) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cwm
    total_cloud_fractionlayer total cloud fraction frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,1)
    total_runofftotal water runoff kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%runoff
    tracer_concentrationmodel layer mean tracer concentration kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs
    tracer_concentration_savetracer concentration before entering a physics scheme kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q
    tracer_concentration_updated_by_physicstracer concentration updated by physics kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0
    transpiration_fluxtotal plant transpiration rate W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%trans
    triple_point_temperature_of_watertriple point temperature of water K 0 real kind_phys MODULE GFS_typedefs con_ttp
    turb_oro_form_drag_flagflag for turbulent orographic form drag flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_tofd
    turbulent_kinetic_energyturbulent kinetic energy J 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntke)
    turbulent_kinetic_energy_convective_transport_tracerturbulent kinetic energy in the convectively transported tracer array m2 s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clw(:,:,GFS_Interstitial(cdata%thrd_no)%ntk)
    ty_cloud_opticsdefinition of type ty_cloud_optics DDT 0 ty_cloud_optics MODULE mo_cloud_optics ty_cloud_optics
    ty_gas_concsdefinition of type ty_gas_concs DDT 0 ty_gas_concs MODULE mo_gas_concentrations ty_gas_concs
    ty_gas_optics_rrtmgpdefinition of type ty_gas_optics_rrtmgp DDT 0 ty_gas_optics_rrtmgp MODULE mo_gas_optics_rrtmgp ty_gas_optics_rrtmgp
    ty_optical_props_1sclFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE mo_optical_props ty_optical_props_1scl
    ty_optical_props_2strFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE mo_optical_props ty_optical_props_2str
    ty_optical_props_nstrFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_nstr MODULE mo_optical_props ty_optical_props_nstr
    ty_source_func_lwFortran DDT containing RRTMGP source functions DDT 0 ty_source_func_lw MODULE mo_source_functions ty_source_func_lw
    u_wind_component_at_viscous_sublayer_topu wind component at viscous sublayer top over water m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_uz0
    updraft_fraction_in_boundary_layer_mass_flux_schemeupdraft fraction in boundary layer mass flux scheme none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_upfr
    updraft_velocity_tunable_parameter_1_CStunable parameter 1 for Chikira-Sugiyama convection m s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(1)
    updraft_velocity_tunable_parameter_2_CStunable parameter 2 for Chikira-Sugiyama convection m s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(2)
    upper_bound_on_max_albedo_over_deep_snowmaximum snow albedo frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snoalb
    upward_heat_flux_in_soilsoil heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gflx
    upward_heat_flux_in_soil_over_icesoil heat flux over ice W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gflx_ice
    upward_heat_flux_in_soil_over_landsoil heat flux over land W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gflx_land
    upward_heat_flux_in_soil_over_oceansoil heat flux over ocean W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gflx_ocean
    v_wind_component_at_viscous_sublayer_topv wind component at viscous sublayer top over water m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_vz0
    vegetation_area_fractionareal fractional cover of green vegetation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%vfrac
    vegetation_temperaturevegetation temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tvxy
    vegetation_type_classificationvegetation type at each grid cell index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%vegtype
    vegetation_type_classification_realvegetation type for lsm index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%vtype
    vegetation_type_dataset_choiceland use dataset choice index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ivegsrc
    vertical_dimensionnumber of vertical levels count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levs
    vertical_dimension_for_cappa_at_Lagrangian_surfacevertical dimension for cappa at Lagrangian surface count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npzcappa
    vertical_dimension_for_condensed_water_at_Lagrangian_surfacevertical dimension for condensed water at Lagrangian surface count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npzq_con
    vertical_dimension_for_fast_physicsnumber of vertical levels for fast physics count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npz
    vertical_dimension_for_fast_physics_plus_onenumber of vertical levels for fast physics plus one count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npzp1
    vertical_dimension_for_thickness_at_Lagrangian_surfacevertical dimension for thickness at Lagrangian surface count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npzdelz
    vertical_dimension_minus_onenumber of vertical levels minus one count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levsm1
    vertical_dimension_of_h2o_forcing_datanumber of vertical layers in h2o forcing data count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%levh2o
    vertical_dimension_of_ozone_forcing_datanumber of vertical layers in ozone forcing data count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%levozp
    vertical_dimension_plus_onenumber of vertical levels plus one count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levsp1
    vertical_index_at_cloud_basevertical index at cloud base index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kbot
    vertical_index_at_cloud_topvertical index at cloud top index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ktop
    vertical_index_at_top_of_atmosphere_boundary_layervertical index at top atmospheric boundary layer index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kpbl
    vertical_index_difference_between_inout_and_localvertical index difference between in/out and local index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kd
    vertical_index_difference_between_layer_and_lower_boundvertical index difference between layer and lower bound index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kb
    vertical_index_difference_between_layer_and_upper_boundvertical index difference between layer and upper bound index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kt
    vertical_interface_dimensionvertical interface dimension count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%levi
    vertical_sigma_coordinate_for_radiation_initializationvertical sigma coordinate for radiation initialization none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%si
    vertical_temperature_average_range_lower_boundzsea1 in mm mm 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nstf_name(4)
    vertical_temperature_average_range_upper_boundzsea2 in mm mm 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nstf_name(5)
    vertical_velocity_for_updraftvertical velocity for updraft m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%w_upi
    vertical_weight_for_cavertical weight for ca frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%vfact_ca
    vertically_diffused_tracer_concentrationtracer concentration diffused by PBL scheme kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%vdftra
    virtual_temperaturelayer virtual temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tv_lay
    virtual_temperature_at_Lagrangian_surfacevirtual temperature at Lagrangian surface K 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%pt
    volume_fraction_of_condensed_water_in_soil_at_wilting_pointwilting point (volumetric) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%smcwlt2
    volume_fraction_of_frozen_soil_moisture_for_land_surface_modelvolume fraction of frozen soil moisture for lsm frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%keepsmfr
    volume_fraction_of_soil_moisturetotal soil moisture frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%smc
    volume_fraction_of_soil_moisture_for_land_surface_modelvolumetric fraction of soil moisture for lsm frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%smois
    volume_fraction_of_unfrozen_soil_moistureliquid soil moisture frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%slc
    volume_fraction_of_unfrozen_soil_moisture_for_land_surface_modelvolume fraction of unfrozen soil moisture for lsm frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%sh2o
    volume_mixing_ratio_ccl4volume mixing ratio ccl4 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,9)
    volume_mixing_ratio_cfc11volume mixing ratio cfc11 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,6)
    volume_mixing_ratio_cfc113volume mixing ratio cfc113 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,10)
    volume_mixing_ratio_cfc12volume mixing ratio cfc12 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,7)
    volume_mixing_ratio_cfc22volume mixing ratio cfc22 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,8)
    volume_mixing_ratio_ch4volume mixing ratio ch4 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,3)
    volume_mixing_ratio_covolume mixing ratio co kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,5)
    volume_mixing_ratio_co2volume mixing ratio co2 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,1)
    volume_mixing_ratio_n2ovolume mixing ratio no2 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,2)
    volume_mixing_ratio_o2volume mixing ratio o2 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,4)
    water_equivalent_accumulated_snow_depthwater equiv of acc snow depth over land and sea ice mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%weasd
    water_equivalent_accumulated_snow_depth_over_icewater equiv of acc snow depth over ice mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%weasd_ice
    water_equivalent_accumulated_snow_depth_over_landwater equiv of acc snow depth over land mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%weasd_land
    water_equivalent_accumulated_snow_depth_over_oceanwater equiv of acc snow depth over ocean mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%weasd_ocean
    water_friendly_aerosol_number_concentrationnumber concentration of water-friendly aerosols kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntwa)
    water_friendly_aerosol_number_concentration_updated_by_physicsnumber concentration of water-friendly aerosols updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntwa)
    water_storage_in_aquiferwater storage in aquifer mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%waxy
    water_storage_in_aquifer_and_saturated_soilwater storage in aquifer and saturated soil mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%wtxy
    water_table_depthwater table depth m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zwtxy
    water_table_recharge_when_deeprecharge to or from the water table when deep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%deeprechxy
    water_table_recharge_when_shallowrecharge to or from the water table when shallow m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rechxy
    water_vapor_detrainment_tendencyupdraft water vapor detrainment tendency kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%det_sqv
    water_vapor_mixing_ratio_at_surfacewater vapor mixing ratio at surface kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%qwv_surf
    water_vapor_specific_humiditywater vapor specific humidity kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntqv)
    water_vapor_specific_humidity_at_Lagrangian_surfacewater vapor specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qv
    water_vapor_specific_humidity_at_layer_for_radiationspecific humidity layer kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qlyr
    water_vapor_specific_humidity_at_lowest_model_layerwater vapor specific humidity at lowest model layer kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,1,GFS_Control%ntqv)
    water_vapor_specific_humidity_at_lowest_model_layer_for_diaglayer 1 specific humidity for diag kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%q1
    water_vapor_specific_humidity_at_lowest_model_layer_updated_by_physicswater vapor specific humidity at lowest model layer updated by physics kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,1,GFS_Control%ntqv)
    water_vapor_specific_humidity_at_previous_time_stepwater vapor specific humidity at previous time step kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,4)
    water_vapor_specific_humidity_savewater vapor specific humidity before entering a physics scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q(:,:,GFS_Control%ntqv)
    water_vapor_specific_humidity_two_time_steps_backwater vapor specific humidity two time steps back kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,2)
    water_vapor_specific_humidity_updated_by_physicswater vapor specific humidity updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntqv)
    water_vapor_subsidence_tendencyupdraft water vapor subsidence tendency kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sub_sqv
    weight_for_momentum_at_viscous_sublayer_topweight for momentum at viscous layer top none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_a1u
    weight_for_potental_temperature_at_viscous_sublayer_topweight for potental temperature at viscous layer top none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_a1t
    weight_for_specific_humidity_at_viscous_sublayer_topweight for Specfic Humidity at viscous layer top none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_a1q
    weights_for_stochastic_shum_perturbationweights for stochastic shum perturbation none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%shum_wts
    weights_for_stochastic_shum_perturbation_flippedweights for stochastic shum perturbation, flipped none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%shum_wts
    weights_for_stochastic_skeb_perturbation_of_x_windweights for stochastic skeb perturbation of x wind none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%skebu_wts
    weights_for_stochastic_skeb_perturbation_of_x_wind_flippedweights for stochastic skeb perturbation of x wind, flipped none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%skebu_wts
    weights_for_stochastic_skeb_perturbation_of_y_windweights for stochastic skeb perturbation of y wind none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%skebv_wts
    weights_for_stochastic_skeb_perturbation_of_y_wind_flippedweights for stochastic skeb perturbation of y wind, flipped none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%skebv_wts
    weights_for_stochastic_sppt_perturbationweights for stochastic sppt perturbation none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sppt_wts
    weights_for_stochastic_sppt_perturbation_flippedweights for stochastic sppt perturbation, flipped none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sppt_wts
    weights_for_stochastic_surface_physics_perturbationweights for stochastic surface physics perturbation none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sfc_wts
    wind_speed_at_lowest_model_layerwind speed at lowest model level m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%wind
    wood_masswood mass including woody roots g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%woodxy
    x_momentum_tendency_from_blocking_dragx momentum tendency from blocking drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtaux2d_bl
    x_momentum_tendency_from_form_dragx momentum tendency from form drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtaux2d_fd
    x_momentum_tendency_from_large_scale_gwdx momentum tendency from large scale gwd m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtaux2d_ls
    x_momentum_tendency_from_small_scale_gwdx momentum tendency from small scale gwd m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtaux2d_ss
    x_windzonal wind m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%ugrs
    x_wind_at_10m10 meter u wind speed m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%u10m
    x_wind_at_lowest_model_layerzonal wind at lowest model layer m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%ugrs(:,1)
    x_wind_at_lowest_model_layer_for_diaglayer 1 x wind for diag m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%u1
    x_wind_at_lowest_model_layer_updated_by_physicszonal wind at lowest model layer updated by physics m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gu0(:,1)
    x_wind_savex-wind before entering a physics scheme m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_u
    x_wind_updated_by_physicszonal wind updated by physics m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gu0
    y_momentum_tendency_from_blocking_dragy momentum tendency from blocking drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtauy2d_bl
    y_momentum_tendency_from_form_dragy momentum tendency from form drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtauy2d_fd
    y_momentum_tendency_from_large_scale_gwdy momentum tendency from large scale gwd m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtauy2d_ls
    y_momentum_tendency_from_small_scale_gwdy momentum tendency from small scale gwd m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtauy2d_ss
    y_windmeridional wind m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%vgrs
    y_wind_at_10m10 meter v wind speed m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%v10m
    y_wind_at_lowest_model_layermeridional wind at lowest model layer m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%vgrs(:,1)
    y_wind_at_lowest_model_layer_for_diaglayer 1 y wind for diag m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%v1
    y_wind_at_lowest_model_layer_updated_by_physicsmeridional wind at lowest model layer updated by physics m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gv0(:,1)
    y_wind_savey-wind before entering a physics scheme m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_v
    y_wind_updated_by_physicsmeridional wind updated by physics m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gv0
    zenith_angle_temporal_adjustment_factor_for_shortwave_fluxeszenith angle temporal adjustment factor for shortwave none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%xmu
    + + From 9d43e41899e62f997f47589c30151f5525fd3c7d Mon Sep 17 00:00:00 2001 From: YihuaWu-NOAA / ufs-weather-model <55712832+YihuaWu-NOAA@users.noreply.github.com> Date: Mon, 20 Jul 2020 08:38:16 -0400 Subject: [PATCH 251/404] Delete CCPP_VARIABLES_FV3.html --- CCPP_VARIABLES_FV3.html | 13437 -------------------------------------- 1 file changed, 13437 deletions(-) delete mode 100644 CCPP_VARIABLES_FV3.html diff --git a/CCPP_VARIABLES_FV3.html b/CCPP_VARIABLES_FV3.html deleted file mode 100644 index 454874f0a..000000000 --- a/CCPP_VARIABLES_FV3.html +++ /dev/null @@ -1,13437 +0,0 @@ - -CCPP variables provided by model FV3 - -

    CCPP variables provided by model FV3

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    standard_namelong_name units rank type kind source FV3 name
    CCPP_interstitial_typedefinition of type CCPP_interstitial_type DDT 0 CCPP_interstitial_type MODULE CCPP_typedefs CCPP_interstitial_type
    CCPP_interstitial_type_instanceinstance of derived type CCPP_interstitial_type DDT 0 CCPP_interstitial_type MODULE CCPP_data CCPP_interstitial
    GFS_cldprop_typedefinition of type GFS_cldprop_type DDT 0 GFS_cldprop_type MODULE GFS_typedefs GFS_cldprop_type
    GFS_cldprop_type_instancecloud fields needed by radiation from physics DDT 0 GFS_cldprop_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Cldprop
    GFS_control_typedefinition of type GFS_control_type DDT 0 GFS_control_type MODULE GFS_typedefs GFS_control_type
    GFS_control_type_instanceinstance of derived type GFS_control_type DDT 0 GFS_control_type MODULE CCPP_data GFS_Control
    GFS_coupling_typedefinition of type GFS_coupling_type DDT 0 GFS_coupling_type MODULE GFS_typedefs GFS_coupling_type
    GFS_coupling_type_instancefields to/from coupling with other components (land/ice/ocean) DDT 0 GFS_coupling_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Coupling
    GFS_data_typedefinition of type GFS_data_type DDT 0 GFS_data_type MODULE GFS_typedefs GFS_data_type
    GFS_data_type_instanceinstance of derived type GFS_data_type DDT 0 GFS_data_type MODULE CCPP_data GFS_Data(cdata%blk_no)
    GFS_data_type_instance_all_blocksinstance of derived type GFS_data_type DDT 1 GFS_data_type MODULE CCPP_data GFS_Data
    GFS_diag_typedefinition of type GFS_diag_type DDT 0 GFS_diag_type MODULE GFS_typedefs GFS_diag_type
    GFS_diag_type_instancefields targeted for diagnostic output DDT 0 GFS_diag_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Intdiag
    GFS_grid_typedefinition of type GFS_grid_type DDT 0 GFS_grid_type MODULE GFS_typedefs GFS_grid_type
    GFS_grid_type_instancegrid and interpolation related data DDT 0 GFS_grid_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Grid
    GFS_interstitial_typedefinition of type GFS_interstitial_type DDT 0 GFS_interstitial_type MODULE GFS_typedefs GFS_interstitial_type
    GFS_interstitial_type_instanceinstance of derived type GFS_interstitial_type DDT 0 GFS_interstitial_type MODULE CCPP_data GFS_Interstitial(cdata%thrd_no)
    GFS_interstitial_type_instance_all_threadsinstance of derived type GFS_interstitial_type DDT 1 GFS_interstitial_type MODULE CCPP_data GFS_Interstitial
    GFS_radtend_typedefinition of type GFS_radtend_type DDT 0 GFS_radtend_type MODULE GFS_typedefs GFS_radtend_type
    GFS_radtend_type_instanceradiation tendencies needed in physics DDT 0 GFS_radtend_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Radtend
    GFS_sfcprop_typedefinition of type GFS_sfcprop_type DDT 0 GFS_sfcprop_type MODULE GFS_typedefs GFS_sfcprop_type
    GFS_sfcprop_type_instancesurface fields DDT 0 GFS_sfcprop_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Sfcprop
    GFS_statein_typedefinition of type GFS_statein_type DDT 0 GFS_statein_type MODULE GFS_typedefs GFS_statein_type
    GFS_statein_type_instanceprognostic state data in from dycore DDT 0 GFS_statein_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Statein
    GFS_stateout_typedefinition of type GFS_stateout_type DDT 0 GFS_stateout_type MODULE GFS_typedefs GFS_stateout_type
    GFS_stateout_type_instanceprognostic state or tendencies return to dycore DDT 0 GFS_stateout_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Stateout
    GFS_tbd_typedefinition of type GFS_tbd_type DDT 0 GFS_tbd_type MODULE GFS_typedefs GFS_tbd_type
    GFS_tbd_type_instanceto be determined data that doesn't fit in any one container DDT 0 GFS_tbd_type MODULE GFS_typedefs TYPE GFS_data_type GFS_Data(cdata%blk_no)%Tbd
    Gas_concentrations_for_RRTMGP_suiteDDT containing gas concentrations for RRTMGP radiation scheme DDT 0 ty_gas_concs MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gas_concentrations
    Monin_Obukhov_similarity_function_for_heatMonin-Obukhov similarity function for heat none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%ffhh
    Monin_Obukhov_similarity_function_for_heat_at_2mMonin-Obukhov similarity parameter for heat at 2m none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fh2
    Monin_Obukhov_similarity_function_for_heat_at_2m_over_iceMonin-Obukhov similarity parameter for heat at 2m over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fh2_ice
    Monin_Obukhov_similarity_function_for_heat_at_2m_over_landMonin-Obukhov similarity parameter for heat at 2m over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fh2_land
    Monin_Obukhov_similarity_function_for_heat_at_2m_over_oceanMonin-Obukhov similarity parameter for heat at 2m over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fh2_ocean
    Monin_Obukhov_similarity_function_for_heat_over_iceMonin-Obukhov similarity function for heat over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffhh_ice
    Monin_Obukhov_similarity_function_for_heat_over_landMonin-Obukhov similarity function for heat over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffhh_land
    Monin_Obukhov_similarity_function_for_heat_over_oceanMonin-Obukhov similarity function for heat over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffhh_ocean
    Monin_Obukhov_similarity_function_for_momentumMonin-Obukhov similarity function for momentum none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%ffmm
    Monin_Obukhov_similarity_function_for_momentum_at_10mMonin-Obukhov similarity parameter for momentum at 10m none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fm10
    Monin_Obukhov_similarity_function_for_momentum_at_10m_over_iceMonin-Obukhov similarity parameter for momentum at 10m over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fm10_ice
    Monin_Obukhov_similarity_function_for_momentum_at_10m_over_landMonin-Obukhov similarity parameter for momentum at 10m over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fm10_land
    Monin_Obukhov_similarity_function_for_momentum_at_10m_over_oceanMonin-Obukhov similarity parameter for momentum at 10m over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fm10_ocean
    Monin_Obukhov_similarity_function_for_momentum_over_iceMonin-Obukhov similarity function for momentum over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffmm_ice
    Monin_Obukhov_similarity_function_for_momentum_over_landMonin-Obukhov similarity function for momentum over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffmm_land
    Monin_Obukhov_similarity_function_for_momentum_over_oceanMonin-Obukhov similarity function for momentum over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ffmm_ocean
    RRTMGP_aerosol_asymmetry_parameter_for_longwave_bands_01_16aerosol asymmetry parameter for longwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolslw(:,:,:,3)
    RRTMGP_aerosol_asymmetry_parameter_for_shortwave_bands_01_16aerosol asymmetry parameter for shortwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolssw(:,:,:,3)
    RRTMGP_aerosol_optical_depth_for_longwave_bands_01_16aerosol optical depth for longwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolslw(:,:,:,1)
    RRTMGP_aerosol_optical_depth_for_shortwave_bands_01_16aerosol optical depth for shortwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolssw(:,:,:,1)
    RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16aerosol optical properties for longwave bands 01-16 various 4 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolslw
    RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16aerosol optical properties for shortwave bands 01-16 various 4 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolssw
    RRTMGP_aerosol_single_scattering_albedo_for_longwave_bands_01_16aerosol single scattering albedo for longwave bands 01-16 frac 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolslw(:,:,:,2)
    RRTMGP_aerosol_single_scattering_albedo_for_shortwave_bands_01_16aerosol single scattering albedo for shortwave bands 01-16 frac 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerosolssw(:,:,:,2)
    RRTMGP_cloud_ice_water_pathlayer cloud ice water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_iwp
    RRTMGP_cloud_liquid_water_pathlayer cloud liquid water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_lwp
    RRTMGP_cloud_optical_depth_layers_at_0_55mu_bandapprox .55mu band layer cloud optical depth none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldtausw
    RRTMGP_cloud_optical_depth_layers_at_10mu_bandapprox 10mu band layer cloud optical depth none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldtaulw
    RRTMGP_cloud_rain_water_pathcloud rain water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_rwp
    RRTMGP_cloud_snow_water_pathcloud snow water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_swp
    RRTMGP_lw_flux_profile_downward_allskyRRTMGP downward longwave all-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxlwDOWN_allsky
    RRTMGP_lw_flux_profile_downward_clrskyRRTMGP downward longwave clr-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxlwDOWN_clrsky
    RRTMGP_lw_flux_profile_upward_allskyRRTMGP upward longwave all-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxlwUP_allsky
    RRTMGP_lw_flux_profile_upward_clrskyRRTMGP upward longwave clr-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxlwUP_clrsky
    RRTMGP_lw_fluxeslw fluxes total sky / csk and up / down at levels W m-2 2 proflw_type MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flxprf_lw
    RRTMGP_lw_heating_rate_all_skyRRTMGP longwave all sky heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hlwc
    RRTMGP_lw_heating_rate_clear_skyRRTMGP longwave clear sky heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hlw0
    RRTMGP_lw_heating_rate_spectralRRTMGP longwave total sky heating rate (spectral) K s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hlwb
    RRTMGP_mean_effective_radius_for_ice_cloudmean effective radius for ice cloud micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_reice
    RRTMGP_mean_effective_radius_for_liquid_cloudmean effective radius for liquid cloud micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_reliq
    RRTMGP_mean_effective_radius_for_rain_dropmean effective radius for rain drop micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_rerain
    RRTMGP_mean_effective_radius_for_snow_flakemean effective radius for snow flake micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_resnow
    RRTMGP_sw_flux_profile_downward_allskyRRTMGP downward shortwave all-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxswDOWN_allsky
    RRTMGP_sw_flux_profile_downward_clrskyRRTMGP downward shortwave clr-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxswDOWN_clrsky
    RRTMGP_sw_flux_profile_upward_allskyRRTMGP upward shortwave all-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxswUP_allsky
    RRTMGP_sw_flux_profile_upward_clrskyRRTMGP upward shortwave clr-sky flux profile W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fluxswUP_clrsky
    RRTMGP_sw_fluxessw fluxes total sky / csk and up / down at levels W m-2 2 profsw_type MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flxprf_sw
    RRTMGP_sw_heating_rate_all_skyRRTMGP shortwave all sky heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hswc
    RRTMGP_sw_heating_rate_clear_skyRRTMGP shortwave clear sky heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hsw0
    RRTMGP_sw_heating_rate_spectralRRTMGP shortwave total sky heating rate (spectral) K s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hswb
    RRTMGP_total_cloud_fractionlayer total cloud fraction frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld_frac
    a_parameter_of_the_hybrid_coordinatea parameter for sigma pressure level calculations Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ak
    accumulated_change_of_air_temperature_due_to_FA_schemeaccumulated change of air temperature due to FA MP scheme K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%train
    accumulated_lwe_thickness_of_convective_precipitation_amount_cnvc90accumulated convective rainfall amount for cnvc90 only m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%acv
    accumulated_lwe_thickness_of_graupel_amountaccumulated graupel precipitation kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totgrp
    accumulated_lwe_thickness_of_graupel_amount_in_bucketaccumulated graupel precipitation in bucket kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totgrpb
    accumulated_lwe_thickness_of_ice_amountaccumulated ice precipitation kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totice
    accumulated_lwe_thickness_of_ice_amount_in_bucketaccumulated ice precipitation in bucket kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%toticeb
    accumulated_lwe_thickness_of_precipitation_amountaccumulated total precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totprcp
    accumulated_lwe_thickness_of_precipitation_amount_in_bucketaccumulated total precipitation in bucket m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totprcpb
    accumulated_lwe_thickness_of_snow_amountaccumulated snow precipitation kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totsnw
    accumulated_lwe_thickness_of_snow_amount_in_bucketaccumulated snow precipitation in bucket kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%totsnwb
    accumulated_water_equivalent_of_frozen_precipsnow water equivalent of run-total frozen precip kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%acsnow
    active_gases_used_by_RRTMGPactive gases used by RRTMGP none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%active_gases
    adjusted_vertical_layer_dimension_for_radiationadjusted number of vertical layers for radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lmk
    adjusted_vertical_level_dimension_for_radiationadjusted number of vertical levels for radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lmp
    aerosol_asymmetry_parameter_for_longwave_bands_01_16aerosol asymmetry parameter for longwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faerlw(:,:,:,3)
    aerosol_asymmetry_parameter_for_shortwave_bands_01_16aerosol asymmetry parameter for shortwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faersw(:,:,:,3)
    aerosol_aware_parameter_deep_convectionaerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for deep convection none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%asolfac_deep
    aerosol_aware_parameter_shallow_convectionaerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for shallow convection none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%asolfac_shal
    aerosol_number_concentration_from_gocart_aerosol_climatologyGOCART aerosol climatology number concentration kg-1? 3 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%aer_nm
    aerosol_optical_depth_for_longwave_bands_01_16aerosol optical depth for longwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faerlw(:,:,:,1)
    aerosol_optical_depth_for_shortwave_bands_01_16aerosol optical depth for shortwave bands 01-16 none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faersw(:,:,:,1)
    aerosol_optical_properties_for_longwave_bands_01_16aerosol optical properties for longwave bands 01-16 various 4 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faerlw
    aerosol_optical_properties_for_shortwave_bands_01_16aerosol optical properties for shortwave bands 01-16 various 4 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faersw
    aerosol_single_scattering_albedo_for_longwave_bands_01_16aerosol single scattering albedo for longwave bands 01-16 frac 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faerlw(:,:,:,2)
    aerosol_single_scattering_albedo_for_shortwave_bands_01_16aerosol single scattering albedo for shortwave bands 01-16 frac 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%faersw(:,:,:,2)
    air_pressuremean layer pressure Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsl
    air_pressure_at_interfaceair pressure at model layer interfaces Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsi
    air_pressure_at_interface_for_RRTMGP_in_hPaair pressure level hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%p_lev
    air_pressure_at_interface_for_radiation_in_hPaair pressure at vertical interface for radiation calculation hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%plvl
    air_pressure_at_layer_for_RRTMGP_in_hPaair pressure layer hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%p_lay
    air_pressure_at_layer_for_radiation_in_hPaair pressure at vertical layer for radiation calculation hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%plyr
    air_pressure_at_lowest_model_layermean pressure at lowest model layer Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsl(:,1)
    air_pressure_difference_between_midlayersair pressure difference between midlayers Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%del
    air_temperaturemodel layer mean temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%tgrs
    air_temperature_at_interface_for_RRTMGPair temperature layer K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%t_lev
    air_temperature_at_interface_for_radiationair temperature at vertical interface for radiation calculation K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tlvl
    air_temperature_at_layer_for_RRTMGPair temperature layer K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%t_lay
    air_temperature_at_layer_for_radiationair temperature at vertical layer for radiation calculation K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tlyr
    air_temperature_at_lowest_model_layermean temperature at lowest model layer K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%tgrs(:,1)
    air_temperature_at_lowest_model_layer_for_diaglayer 1 temperature for diag K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%t1
    air_temperature_at_lowest_model_layer_updated_by_physicstemperature at lowest model layer updated by physics K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gt0(:,1)
    air_temperature_at_previous_time_stepair temperature at previous time step K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,3)
    air_temperature_lapse_rate_constantenvironmental air temperature lapse rate constant K m-1 0 real kind_phys MODULE GFS_typedefs rlapse
    air_temperature_saveair temperature before entering a physics scheme K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_t
    air_temperature_save_from_convective_parameterizationair temperature after cumulus parameterization K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_tcp
    air_temperature_two_time_steps_backair temperature two time steps back K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,1)
    air_temperature_updated_by_physicstemperature updated by physics K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gt0
    angle_from_east_of_maximum_subgrid_orographic_variationsangle with_respect to east of maximum subgrid orographic variations degree 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%theta
    anisotropy_of_subgrid_orographyanisotropy of subgrid orography none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gamma
    area_fraction_of_wet_canopyarea fraction of canopy that is wetted/snowed none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%fwetxy
    array_dimension_of_2d_arrays_for_microphysicsnumber of 2D arrays needed for microphysics count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%num_p2d
    array_dimension_of_3d_arrays_for_microphysicsnumber of 3D arrays needed for microphysics count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%num_p3d
    array_dimension_of_random_numbersecond dimension of random number stream for RAS count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nrcm
    asymmetry_of_subgrid_orographyasymmetry of subgrid orography none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oa4
    asymmetry_of_subgrid_orography_small_scaleasymmetry of subgrid orography small scale none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oa4ss
    atmosphere_boundary_layer_thicknesspbl height m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%hpbl
    atmosphere_diffusivity_coefficient_factormultiplicative constant for atmospheric diffusivities none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%moninq_fac
    atmosphere_energy_content_at_Lagrangian_surfaceatmosphere total energy at Lagrangian surface J m-2 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%te0
    atmosphere_energy_content_in_columnatmosphere total energy in columns J m-2 2 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%te0_2d
    atmosphere_heat_diffusivitydiffusivity for heat m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dkt
    atmosphere_heat_diffusivity_backgroundbackground vertical diffusion for heat q m2 s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%xkzm_h
    atmosphere_heat_diffusivity_background_maximummaximum background value of heat diffusivity m2 s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%xkzminv
    atmosphere_heat_diffusivity_for_mynnpbldiffusivity for heat for MYNN PBL (defined for all mass levels) m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%exch_h
    atmosphere_heat_diffusivity_from_shocdiffusivity for heat from the SHOC scheme m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nahdshoc)
    atmosphere_momentum_diffusivity_backgroundbackground vertical diffusion for momentum m2 s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%xkzm_m
    atmosphere_momentum_diffusivity_for_mynnpbldiffusivity for momentum for MYNN PBL (defined for all mass levels) m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%exch_m
    atmosphere_optical_thickness_due_to_ambient_aerosol_particlesvertical integrated optical depth for various aerosol species none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%aerodp
    auxiliary_2d_arraysauxiliary 2d arrays to output (for debugging) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%aux2d
    auxiliary_3d_arraysauxiliary 3d arrays to output (for debugging) none 3 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%aux3d
    b_parameter_of_the_hybrid_coordinateb parameter for sigma pressure level calculations none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bk
    baseline_surface_roughness_lengthbaseline surface roughness length for momentum in meter m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_z0base
    bounded_vegetation_area_fractionareal fractional cover of green vegetation bounded on the bottom frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sigmaf
    bulk_richardson_number_at_lowest_model_levelbulk Richardson number at the surface none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rb
    bulk_richardson_number_at_lowest_model_level_over_icebulk Richardson number at the surface over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rb_ice
    bulk_richardson_number_at_lowest_model_level_over_landbulk Richardson number at the surface over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rb_land
    bulk_richardson_number_at_lowest_model_level_over_oceanbulk Richardson number at the surface over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rb_ocean
    canopy_air_temperaturecanopy air temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tahxy
    canopy_air_vapor_pressurecanopy air vapor pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%eahxy
    canopy_intercepted_ice_masscanopy intercepted ice mass mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%canicexy
    canopy_intercepted_liquid_watercanopy intercepted liquid water mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%canliqxy
    canopy_upward_latent_heat_fluxcanopy upward latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evcw
    canopy_water_amountcanopy water amount kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%canopy
    cappa_moist_gas_constant_at_Lagrangian_surfacecappa(i,j,k) = rdgas / ( rdgas + cvm(i)/(1.+r_vir*q(i,j,k,sphum)) ) none 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%cappa
    ccn_number_concentrationCCN number concentration kg-1? 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%ccn_nm
    ccpp_block_countfor explicit data blocking: number of blocks count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nblks
    ccpp_block_numbernumber of block for explicit data blocking in CCPP index 0 integer MODULE ccpp_types TYPE ccpp_t cdata%blk_no
    ccpp_block_sizesfor explicit data blocking: block sizes of all blocks count 1 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%blksz
    ccpp_error_flagerror flag for error handling in CCPP flag 0 integer MODULE ccpp_types TYPE ccpp_t cdata%errflg
    ccpp_error_messageerror message for error handling in CCPP none 0 character len=512 MODULE ccpp_types TYPE ccpp_t cdata%errmsg
    ccpp_loop_counterloop counter for subcycling loops in CCPP index 0 integer MODULE ccpp_types TYPE ccpp_t cdata%loop_cnt
    ccpp_tdefinition of type ccpp_t DDT 0 ccpp_t MODULE ccpp_types ccpp_t
    ccpp_t_instanceinstance of derived data type ccpp_t DDT 0 ccpp_t MODULE CCPP_data cdata
    ccpp_thread_numbernumber of thread for threading in CCPP index 0 integer MODULE ccpp_types TYPE ccpp_t cdata%thrd_no
    cell_areaarea of the grid cell m2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%area
    cell_area_for_fast_physicsarea of the grid cell for fast physics m2 2 real kind_grid MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%area
    cell_sizerelative dx for the grid cell m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%dx
    cellular_automata_finer_gridcellular automata finer grid count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncells
    cellular_automata_global_patterncellular automata global pattern flag 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%ca1
    cellular_automata_lifetimecellular automata lifetime count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nlives
    cellular_automata_seed_frequencycellular automata seed frequency in units of time steps count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nseed
    cellular_automata_seed_probabilitycellular automata seed probability fraction 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nfracseed
    characteristic_grid_length_scalerepresentative horizontal length scale of grid box m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dlength
    chemical_tracerschemical tracers g g-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tracer
    choice_of_original_scale_aware_TKE_moist_EDMF_PBLchoice of original scale-aware TKE moist EDMF PBL scheme none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isatmedmf_vdif
    choice_of_scale_aware_TKE_moist_EDMF_PBLchoice of scale-aware TKE moist EDMF PBL scheme none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isatmedmf
    choice_of_updated_scale_aware_TKE_moist_EDMF_PBLchoice of updated scale-aware TKE moist EDMF PBL scheme none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isatmedmf_vdifq
    cloud_area_fractionfraction of grid box area in which updrafts occur frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldf
    cloud_area_fraction_for_radiationfraction of clouds for low, middle, high, total and BL frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldsa
    cloud_base_mass_fluxcloud base mass flux for CS convection kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_fctd
    cloud_condensed_water_conversion_thresholdwater and ice minimum threshold for Zhao none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%wminco
    cloud_condensed_water_ice_conversion_threshold_rasconversion coefficient from cloud liquid and ice to precipitation in ras none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%wminras
    cloud_condensed_water_mixing_ratioratio of mass of cloud water to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntcw)
    cloud_condensed_water_mixing_ratio_at_lowest_model_layerratio of mass of cloud water to mass of dry air plus vapor (without condensates) at lowest model layer kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,1,GFS_Control%ntcw)
    cloud_condensed_water_mixing_ratio_at_surfacemoist cloud water mixing ratio at surface kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%clw_surf
    cloud_condensed_water_mixing_ratio_convective_transport_tracerratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clw(:,:,2)
    cloud_condensed_water_mixing_ratio_saveratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q(:,:,GFS_Control%ntcw)
    cloud_condensed_water_mixing_ratio_updated_by_physicsratio of mass of cloud water to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntcw)
    cloud_condensed_water_specific_humidity_at_Lagrangian_surfacecloud condensed water specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%q_con
    cloud_decorrelation_lengthcloud decorrelation length km 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%de_lgth
    cloud_droplet_number_concentrationnumber concentration of cloud droplets (liquid) kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntlnc)
    cloud_droplet_number_concentration_updated_by_physicsnumber concentration of cloud droplets updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntlnc)
    cloud_fraction_at_Lagrangian_surfacecloud fraction at Lagrangian surface none 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qc
    cloud_fraction_for_MGcloud fraction used by Morrison-Gettelman MP frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%indcld)
    cloud_fraction_updated_by_physicscloud fraction updated by physics frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntclamt)
    cloud_graupel_specific_humidity_at_Lagrangian_surfacecloud graupel specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qg
    cloud_ice_mixing_ratiothe ratio of the mass of ice to the mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qi_r
    cloud_ice_specific_humidity_at_Lagrangian_surfacecloud ice specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qi
    cloud_ice_water_pathlayer cloud ice water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,4)
    cloud_liquid_water_mixing_ratiothe ratio of the mass of liquid water to the mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qc_r
    cloud_liquid_water_pathlayer cloud liquid water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,2)
    cloud_liquid_water_specific_humidity_at_Lagrangian_surfacecloud liquid water specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ql
    cloud_optical_depth_layers_at_0p55mu_bandapprox .55mu band layer cloud optical depth none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldtausw
    cloud_optical_depth_layers_at_10mu_bandapprox 10mu band layer cloud optical depth none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cldtaulw
    cloud_phase_transition_denominatordenominator in cloud phase transition = 1/(tcr-tf) K-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%tcrf
    cloud_phase_transition_threshold_temperaturethreshold temperature below which cloud starts to freeze K 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%tcr
    cloud_rain_specific_humidity_at_Lagrangian_surfacecloud rain specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qr
    cloud_rain_water_mixing_ratiothe ratio of the mass rain water to the mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qr_r
    cloud_rain_water_pathcloud rain water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,6)
    cloud_snow_mixing_ratiothe ratio of the mass of snow to mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qs_r
    cloud_snow_specific_humidity_at_Lagrangian_surfacecloud snow specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qs
    cloud_snow_water_pathcloud snow water path g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,8)
    cloud_specie_mix_flagflag to activate mixing of cloud species flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_cloudmix
    cloud_top_entrainment_instability_valuecloud top entrainment instability value none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ctei_r
    cloud_work_functioncloud work function m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cld1d
    cloudpdfflag to determine which cloud PDF to use flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_cloudpdf
    cmpfsw_typedefinition of type cmpfsw_type DDT 0 cmpfsw_type MODULE module_radsw_parameters cmpfsw_type
    coefficient_c_0coefficient 1 to calculate d(Tz)/d(Ts) none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%c_0
    coefficient_c_dcoefficient 2 to calculate d(Tz)/d(Ts) none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%c_d
    coefficient_for_evaporation_of_rainfallcoeff for evaporation of largescale rain none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%evpco
    coefficient_from_cloud_ice_to_snowauto conversion coeff from ice to snow none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%psautco
    coefficient_from_cloud_ice_to_snow_rasconversion coefficient from cloud ice to snow in ras none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%psauras
    coefficient_from_cloud_water_to_rainauto conversion coeff from cloud to rain none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%prautco
    coefficient_from_cloud_water_to_rain_rasconversion coefficient from cloud water to rain in ras none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%prauras
    coefficient_w_0coefficient 3 to calculate d(Tz)/d(Ts) none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%w_0
    coefficient_w_dcoefficient 4 to calculate d(Tz)/d(Ts) none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%w_d
    coefficients_for_aerosol_scavengingarray of aerosol scavenging coefficients none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fscav
    coefficients_for_lw_cloud_opticsDDT containing spectral information for RRTMGP LW radiation scheme DDT 0 ty_cloud_optics MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_cloud_props
    coefficients_for_lw_gas_opticsDDT containing spectral information for RRTMGP LW radiation scheme DDT 0 ty_gas_optics_rrtmgp MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_gas_props
    coefficients_for_sw_cloud_opticsDDT containing spectral information for RRTMGP SW radiation scheme DDT 0 ty_cloud_optics MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_cloud_props
    coefficients_for_sw_gas_opticsDDT containing spectral information for RRTMGP SW radiation scheme DDT 0 ty_gas_optics_rrtmgp MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_gas_props
    column_precipitable_waterprecipitable water kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%pwat
    components_of_surface_downward_shortwave_fluxesderived type for special components of surface downward shortwave fluxes W m-2 1 cmpfsw_type MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%scmpsw
    condensate_fraction_detrained_in_updraft_layerscondensate fraction detrained with in a updraft layers none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dlqf
    conv_activity_counterconvective activity memory none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%cactiv
    convective_cloud_condesate_after_rainoutconvective cloud condesate after rainout kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%qci_conv
    convective_cloud_coverconvective cloud cover frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnvc
    convective_cloud_cover_in_phy_f3dconvective cloud cover in the phy_f3d array frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%ncnvc)
    convective_cloud_fraction_for_microphysicsconvective cloud fraction for microphysics frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cf_upi
    convective_cloud_switchindex used by cnvc90 (for convective clouds) none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%clstp
    convective_cloud_volume_fractionconvective cloud volume fraction frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clcn
    convective_cloud_water_mixing_ratiomoist convective cloud water mixing ratio kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnvw
    convective_cloud_water_mixing_ratio_in_phy_f3dconvective cloud water mixing ratio in the phy_f3d array kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%ncnvw)
    convective_precipitation_rate_from_previous_timestepconvective precipitation rate from previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%draincprv
    convective_transportable_tracersarray to contain cloud water and other convective trans. tracers kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clw
    convective_updraft_area_fractionconvective updraft area fraction frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sigmafrac
    convective_updraft_area_fraction_at_model_interfacesconvective updraft area fraction at model interfaces frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sigmatot
    convexity_of_subgrid_orographyconvexity of subgrid orography none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oc
    convexity_of_subgrid_orography_small_scaleconvexity of subgrid orography small scale none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ocss
    cosine_of_latitudecosine of latitude none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%coslat
    cosine_of_solar_declination_anglecos of the solar declination angle none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cdec
    cosine_of_zenith_anglemean cos of zenith angle over rad call period none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%coszen
    countergradient_mixing_term_for_temperaturecountergradient mixing term for temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gamt
    countergradient_mixing_term_for_water_vaporcountergradient mixing term for water vapor kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gamq
    couple_sgs_clouds_to_radiation_flagflag for coupling sgs clouds to radiation flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%icloud_bl
    critical_cloud_top_entrainment_instability_criteriacritical cloud top entrainment instability criteria none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ctei_rm
    critical_relative_humiditycritical relative humidity frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rhc
    critical_relative_humidity_at_PBL_topcritical relative humidity at the PBL top frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%crtrh(2)
    critical_relative_humidity_at_surfacecritical relative humidity at the surface frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%crtrh(1)
    critical_relative_humidity_at_top_of_atmospherecritical relative humidity at the top of atmosphere frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%crtrh(3)
    cumulative_atmosphere_detrainment_convective_mass_fluxcumulative detrainment mass flux Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%det_mf
    cumulative_atmosphere_downdraft_convective_mass_fluxcumulative downdraft mass flux Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dwn_mf
    cumulative_atmosphere_updraft_convective_mass_fluxcumulative updraft mass flux Pa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%upd_mf
    cumulative_canopy_upward_latent_heat_flu_multiplied_by_timestepcumulative canopy upward latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%evcwa
    cumulative_change_in_ozone_concentration_due_to_non_physics_processescumulative change in ozone_concentration due to non-physics processes kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,13)
    cumulative_change_in_ozone_concentration_due_to_overhead_ozone_columncumulative change in ozone concentration due to overhead ozone column kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,9)
    cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratiocumulative change in ozone concentration due to ozone mixing ratio kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,7)
    cumulative_change_in_ozone_concentration_due_to_physicscumulative change in ozone concentration due to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,11)
    cumulative_change_in_ozone_concentration_due_to_production_and_loss_ratecumulative change in ozone concentration due to production and loss rate kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,6)
    cumulative_change_in_ozone_concentration_due_to_temperaturecumulative change in ozone concentration due to temperature kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,8)
    cumulative_change_in_ozone_mixing_ratio_due_to_PBLcumulative change in ozone mixing ratio due to PBL kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,5)
    cumulative_change_in_temperature_due_to_PBLcumulative change in temperature due to PBL K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,3)
    cumulative_change_in_temperature_due_to_convective_gravity_wave_dragcumulative change in temperature due to convective gravity wave drag K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,9)
    cumulative_change_in_temperature_due_to_deep_convectioncumulative change in temperature due to deep convection K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,4)
    cumulative_change_in_temperature_due_to_longwave_radiationcumulative change in temperature due to longwave radiation K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,1)
    cumulative_change_in_temperature_due_to_microphysicscumulative change in temperature due to microphysics K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,6)
    cumulative_change_in_temperature_due_to_non_physics_processescumulative change in temperature due to non-physics processed K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,11)
    cumulative_change_in_temperature_due_to_orographic_gravity_wave_dragcumulative change in temperature due to orographic gravity wave drag K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,7)
    cumulative_change_in_temperature_due_to_physicscumulative change in temperature due to physics K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,10)
    cumulative_change_in_temperature_due_to_rayleigh_dampingcumulative change in temperature due to Rayleigh damping K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,8)
    cumulative_change_in_temperature_due_to_shallow_convectioncumulative change in temperature due to shallow convection K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,5)
    cumulative_change_in_temperature_due_to_shortwave_radiationcumulative change in temperature due to shortwave radiation K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dt3dt(:,:,2)
    cumulative_change_in_water_vapor_specific_humidity_due_to_PBLcumulative change in water vapor specific humidity due to PBL kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,1)
    cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convectioncumulative change in water vapor specific humidity due to deep convection kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,2)
    cumulative_change_in_water_vapor_specific_humidity_due_to_microphysicscumulative change in water vapor specific humidity due to microphysics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,4)
    cumulative_change_in_water_vapor_specific_humidity_due_to_non_physics_processescumulative change in water vapor specific humidity due to non-physics processes kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,12)
    cumulative_change_in_water_vapor_specific_humidity_due_to_physicscumulative change in water vapor specific humidity due to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,10)
    cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convectioncumulative change in water vapor specific humidity due to shallow convection kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dq3dt(:,:,3)
    cumulative_change_in_x_wind_due_to_PBLcumulative change in x wind due to PBL m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,1)
    cumulative_change_in_x_wind_due_to_convective_gravity_wave_dragcumulative change in x wind due to convective gravity wave drag m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,4)
    cumulative_change_in_x_wind_due_to_deep_convectioncumulative change in x wind due to deep convection m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,3)
    cumulative_change_in_x_wind_due_to_non_physics_processescumulative change in x wind due to non-physics processes m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,8)
    cumulative_change_in_x_wind_due_to_orographic_gravity_wave_dragcumulative change in x wind due to orographic gravity wave drag m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,2)
    cumulative_change_in_x_wind_due_to_physicscumulative change in x wind due to physics m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,7)
    cumulative_change_in_x_wind_due_to_rayleigh_dampingcumulative change in x wind due to Rayleigh damping m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,5)
    cumulative_change_in_x_wind_due_to_shallow_convectioncumulative change in x wind due to shallow convection m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt(:,:,6)
    cumulative_change_in_y_wind_due_to_PBLcumulative change in y wind due to PBL m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,1)
    cumulative_change_in_y_wind_due_to_convective_gravity_wave_dragcumulative change in y wind due to convective gravity wave drag m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,4)
    cumulative_change_in_y_wind_due_to_deep_convectioncumulative change in y wind due to deep convection m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,3)
    cumulative_change_in_y_wind_due_to_non_physics_processescumulative change in y wind due to non-physics processes m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,8)
    cumulative_change_in_y_wind_due_to_orographic_gravity_wave_dragcumulative change in y wind due to orographic gravity wave drag m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,2)
    cumulative_change_in_y_wind_due_to_physicscumulative change in y wind due to physics m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,7)
    cumulative_change_in_y_wind_due_to_rayleigh_dampingcumulative change in y wind due to Rayleigh damping m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,5)
    cumulative_change_in_y_wind_due_to_shallow_convectioncumulative change in y wind due to shallow convection m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt(:,:,6)
    cumulative_cloud_work_functioncumulative cloud work function (valid only with sas) m2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%cldwrk
    cumulative_lwe_thickness_of_convective_precipitation_amountcumulative convective precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%cnvprcp
    cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucketcumulative convective precipitation in bucket m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%cnvprcpb
    cumulative_snow_deposition_sublimation_upward_latent_heat_flux_multiplied_by_timestepcumulative latent heat flux from snow depo/subl multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sbsnoa
    cumulative_snow_freezing_rain_upward_latent_heat_flux_multiplied_by_timestepcumulative latent heat flux due to snow and frz rain multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%snohfa
    cumulative_soil_upward_latent_heat_flux_multiplied_by_timestepcumulative soil upward latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%evbsa
    cumulative_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc nir diff downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dnirdf_cpl
    cumulative_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc uv+vis diff dnwd sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvisdf_cpl
    cumulative_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc nir beam downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dnirbm_cpl
    cumulative_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc uv+vis beam dnwd sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvisbm_cpl
    cumulative_surface_downwelling_longwave_flux_for_coupling_multiplied_by_timestepcumulative sfc downward lw flux mulitplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dlwsfc_cpl
    cumulative_surface_downwelling_longwave_flux_multiplied_by_timestepcumulative surface downwelling LW flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dlwsfc
    cumulative_surface_downwelling_shortwave_flux_for_coupling_multiplied_by_timestepcumulative sfc downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dswsfc_cpl
    cumulative_surface_ground_heat_flux_multiplied_by_timestepcumulative groud conductive heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%gflux
    cumulative_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net nir diff downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nnirdf_cpl
    cumulative_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net uv+vis diff downward sw rad flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nvisdf_cpl
    cumulative_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net nir beam downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nnirbm_cpl
    cumulative_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net uv+vis beam downward sw rad flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nvisbm_cpl
    cumulative_surface_net_downward_longwave_flux_for_coupling_multiplied_by_timestepcumulative net downward lw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nlwsfc_cpl
    cumulative_surface_net_downward_shortwave_flux_for_coupling_multiplied_by_timestepcumulative net downward sw flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nswsfc_cpl
    cumulative_surface_pressure_multiplied_by_timestepcumulative surface pressure multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%psmean
    cumulative_surface_snow_area_fraction_multiplied_by_timestepcumulative surface snow area fraction multiplied by timestep s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%snowca
    cumulative_surface_upward_latent_heat_flux_for_coupling_multiplied_by_timestepcumulative sfc latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dqsfc_cpl
    cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestepcumulative sfc latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dqsfc
    cumulative_surface_upward_potential_latent_heat_flux_multiplied_by_timestepcumulative surface upward potential latent heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ep
    cumulative_surface_upward_sensible_heat_flux_for_coupling_multiplied_by_timestepcumulative sfc sensible heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dtsfc_cpl
    cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestepcumulative sfc sensible heat flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtsfc
    cumulative_surface_upwelling_longwave_flux_multiplied_by_timestepcumulative surface upwelling LW flux multiplied by timestep W m-2 s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ulwsfc
    cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestepcumulative sfc x momentum flux multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dusfc_cpl
    cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestepcumulative sfc x momentum flux multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc
    cumulative_surface_y_momentum_flux_for_coupling_multiplied_by_timestepcumulative sfc y momentum flux multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvsfc_cpl
    cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestepcumulative sfc y momentum flux multiplied by timestep Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc
    cumulative_transpiration_flux_multiplied_by_timestepcumulative total plant transpiration rate multiplied by timestep kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%transa
    date_and_time_at_model_initializationinitialization date and time none 1 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%idat
    date_and_time_at_model_initialization_reorderedinitial date with different size and ordering none 1 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%idate
    daytime_mean_cosz_over_rad_call_perioddaytime mean cosz over rad call period none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%coszdg
    daytime_pointsdaytime points index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%idxday
    daytime_points_dimensiondaytime points dimension count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nday
    deep_soil_temperaturedeep soil temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tg3
    density_of_fresh_waterdensity of fresh water ??? 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rho_h2o
    density_of_frozen_precipitationdensity of frozen precipitation kg m-3 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rhofr
    depth_of_soil_levels_for_land_surface_modeldepth of soil levels for land surface model m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zs
    detrained_mass_fluxdetrained mass flux kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_mfd
    detrainment_and_precipitation_tunable_parameter_3_CSpartition water between detrainment and precipitation (decrease for more precipitation) m 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(3)
    detrainment_and_precipitation_tunable_parameter_4_CSpartition water between detrainment and precipitation (decrease for more precipitation) m 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(4)
    detrainment_conversion_parameter_deep_convectionconvective detrainment conversion parameter for deep convection m-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%c1_deep
    detrainment_conversion_parameter_shallow_convectionconvective detrainment conversion parameter for shallow convection m-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%c1_shal
    dewpoint_temperature_at_2m2 meter dewpoint temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dpt2m
    diag_ugwp_flagflag for CIRES UGWP Diagnostics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ldiag_ugwp
    diagnostics_control_for_chemical_tracersarray to control diagnostics for chemical tracers flag 1 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntdiag
    diffusivity_background_sigma_levelsigma threshold for background mom. diffusion none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%xkzm_s
    dimensionless_exner_function_at_lowest_model_interfacedimensionless Exner function at lowest model interface none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsik(:,1)
    dimensionless_exner_function_at_lowest_model_layerdimensionless Exner function at lowest model layer none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prslk(:,1)
    dimensionless_exner_function_at_model_interfacesdimensionless Exner function at model layer interfaces none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prsik
    dimensionless_exner_function_at_model_layersdimensionless Exner function at model layer centers none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%prslk
    directory_for_rte_rrtmgp_source_codedirectory for rte+rrtmgp source code (Model%rrtmgp_root) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_root
    dissipation_estimate_of_air_temperature_at_model_layersdissipation estimate model layer mean temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%diss_est
    diurnal_thermocline_layer_heat_contentheat content in diurnal thermocline layer K m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xt
    diurnal_thermocline_layer_thicknessdiurnal thermocline layer thickness m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xz
    diurnal_thermocline_layer_x_currentu-current content in diurnal thermocline layer m2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xu
    diurnal_thermocline_layer_y_currentv-current content in diurnal thermocline layer m2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xv
    do_myjpblflag to activate MYJ PBL scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_myjpbl
    do_myjsfcflag to activate MYJ surface layer scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_myjsfc
    do_mynnedmfflag to activate MYNN-EDMF flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_mynnedmf
    do_mynnsfclayflag to activate MYNN surface layer flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_mynnsfclay
    do_ugwpflag to activate CIRES UGWP flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_ugwp
    dominant_freezing_rain_typedominant freezing rain type none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tdomzr
    dominant_rain_typedominant rain type none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tdomr
    dominant_sleet_typedominant sleet type none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tdomip
    dominant_snow_typedominant snow type none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tdoms
    downdraft_fraction_in_boundary_layer_mass_flux_schemedowndraft fraction in boundary layer mass flux scheme none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_dnfr
    downdraft_fraction_reaching_surface_over_land_deep_convectiondowndraft fraction reaching surface over land for deep convection frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%betal_deep
    downdraft_fraction_reaching_surface_over_ocean_deep_convectiondowndraft fraction reaching surface over ocean for deep convection frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%betas_deep
    duration_of_sunshinesunshine duration time s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%suntim
    dynamics_to_physics_timestep_ratioratio of dynamics timestep to physics timestep none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%frain
    eddy_mixing_due_to_ugwpeddy mixing due to UGWP m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gw_kdis
    edmf_flagflag to activate the mass-flux scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_edmf
    edmf_momentum_transport_flagflag to activate the transport of momentum flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_edmf_mom
    edmf_partition_flagflag to partitioning og the MF and ED areas flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_edmf_part
    edmf_tke_transport_flagflag to activate the transport of TKE flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_edmf_tke
    effective_radius_of_stratiform_cloud_graupel_particle_in_umeff. radius of cloud graupel particle in micrometer um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%ngeffr)
    effective_radius_of_stratiform_cloud_ice_particle_in_umeff. radius of cloud ice water particle in micrometer um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nieffr)
    effective_radius_of_stratiform_cloud_liquid_water_particle_in_umeff. radius of cloud liquid water particle in micrometer um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nleffr)
    effective_radius_of_stratiform_cloud_rain_particle_in_umeffective radius of cloud rain particle in micrometers um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nreffr)
    effective_radius_of_stratiform_cloud_snow_particle_in_umeffective radius of cloud snow particle in micrometers um 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nseffr)
    emdf_updraft_areaupdraft area from mass flux scheme frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_a
    emdf_updraft_cloud_waterupdraft cloud water from mass flux scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_qc
    emdf_updraft_entrainment_rateupdraft entranment rate from mass flux scheme s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_ent
    emdf_updraft_theta_lupdraft theta-l from mass flux scheme K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_thl
    emdf_updraft_total_waterupdraft total water from mass flux scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_qt
    emdf_updraft_vertical_velocityupdraft vertical velocity from mass flux scheme m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%edmf_w
    ending_x_direction_indexending X direction index count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ie
    ending_x_direction_index_domainending X direction index for domain count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ied
    ending_y_direction_indexending Y direction index count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%je
    ending_y_direction_index_domainending X direction index for domain count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%jed
    entrainment_efficiency_tunable_parameter_9_CSentrainment efficiency none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(9)
    entrainment_rate_coefficient_deep_convectionentrainment rate coefficient for deep convection none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%clam_deep
    entrainment_rate_coefficient_shallow_convectionentrainment rate coefficient for shallow convection none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%clam_shal
    equation_of_timeequation of time (radian) radian 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%slag
    equilibrium_soil_water_contentequilibrium soil water content m3 m-3 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%smoiseq
    explicit_rainfall_rate_from_previous_timestepexplicit rainfall rate previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%drainncprv
    extra_top_layerextra top layer for radiation none 0 integer MODULE GFS_typedefs LTP
    fa_threshold_relative_humidity_for_onset_of_condensationrelative humidity threshold parameter for condensation for FA scheme none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rhgrd
    fast_soil_pool_mass_content_of_carbonshort-lived carbon in shallow soil g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%fastcpxy
    fine_root_massfine root mass g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rtmassxy
    finite_volume_mean_edge_pressure_raised_to_the_power_of_kappafinite-volume mean edge pressure raised to the power of kappa Pa**kappa 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%pkz
    flag_TKE_dissipation_heatingflag for tke dissipative heating flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dspheat
    flag_arakawa_wu_downdraftAW scale-aware option in cs convection downdraft flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_awdd
    flag_convective_tracer_transportflag to enable tracer transport by updrafts/downdrafts[(:,1)] or subsidence [(:,2)] flag 2 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%otspt
    flag_debugcontrol flag for debug flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%debug
    flag_deep_convectionflag indicating whether convection occurs in column (0 or 1) flag 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kcnv
    flag_diagnosticslogical flag for storing diagnostics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lssav
    flag_diagnostics_3Dflag for 3d diagnostic fields flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ldiag3d
    flag_flipvertical flip logical flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flipv
    flag_flux_form_CSenable use of flux form of equations in CS scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flx_form
    flag_for_2015_ozone_physicsflag for new (2015) ozone physics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%oz_phys_2015
    flag_for_Arakawa_Wu_adjustmentflag for Arakawa Wu scale-aware adjustment flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_aw
    flag_for_CRICK_proof_cloud_waterflag for CRICK-Proof cloud water flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%crick_proof
    flag_for_Chikira_Sugiyama_deep_convectionflag for Chikira-Sugiyama convection flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cscnv
    flag_for_aerosol_convective_transport_and_PBL_diffusionflag for aerosol convective transport and PBL diffusion flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%trans_aero
    flag_for_aerosol_input_MG_radiationflag for using aerosols in Morrison-Gettelman MP_radiation flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iaerclm
    flag_for_aerosol_physicsflag for aerosol physics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ltaerosol
    flag_for_canopy_heat_storageflag for canopy heat storage parameterization flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lheatstrg
    flag_for_canopy_stomatal_resistance_optionchoice for canopy stomatal resistance option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_crs
    flag_for_cellular_automatacellular automata main switch flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_ca
    flag_for_chemistry_couplingflag controlling cplchm collection (default off) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cplchm
    flag_for_ciceflag for cice flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flag_cice
    flag_for_cloud_condensate_normalized_by_cloud_coverflag for cloud condensate normalized by cloud cover flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ccnorm
    flag_for_cloud_effective_radiiflag for cloud effective radii calculations in GFDL microphysics 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%effr_in
    flag_for_convective_gravity_wave_dragflag for convective gravity wave drag (gwd) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_cnvgwd
    flag_for_convective_transport_of_tracersflag for convective transport of tracers flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%trans_trac
    flag_for_default_aerosol_effect_in_shortwave_radiationdefault aerosol effect in sw only flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iaer
    flag_for_dynamic_vegetation_optionchoice for dynamic vegetation option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_dveg
    flag_for_fast_microphysics_energy_conservationflag for fast microphysics energy conservation flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%fast_mp_consv
    flag_for_fer_hires_microphysics_schemechoice of Ferrier-Aligo microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_fer_hires
    flag_for_first_time_stepflag for first time step for time integration loop (cold/warmstart) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%first_time_step
    flag_for_flux_couplingflag controlling cplflx collection (default off) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cplflx
    flag_for_fractional_gridflag for fractional grid flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%frac_grid
    flag_for_frozen_soil_permeability_optionchoice for frozen soil permeability option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_inf
    flag_for_frozen_soil_physicsflag for frozen soil physics (RUC) flag 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%flag_frsoil
    flag_for_gaussian_spatial_filterswitch for gaussian spatial filter flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_smooth
    flag_for_generic_deep_convection_tendencytrue if GFS_DCNV_generic should calculate tendencies flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flag_for_dcnv_generic_tend
    flag_for_generic_gravity_wave_drag_tendencytrue if GFS_GWD_generic should calculate tendencies flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flag_for_gwd_generic_tend
    flag_for_generic_planetary_boundary_layer_tendencytrue if GFS_PBL_generic should calculate tendencies flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flag_for_pbl_generic_tend
    flag_for_generic_shallow_convection_tendencytrue if GFS_SCNV_generic should calculate tendencies flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flag_for_scnv_generic_tend
    flag_for_gf_deep_convection_schemeflag for Grell-Freitas deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv_gf
    flag_for_gf_shallow_convection_schemeflag for Grell-Freitas shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv_gf
    flag_for_gfdl_microphysics_schemechoice of GFDL microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_gfdl
    flag_for_global_cellular_automataswitch for global ca flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_global
    flag_for_global_cellular_automata_closureswitch for ca on closure flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_closure
    flag_for_global_cellular_automata_entrswitch for ca on entr flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_entr
    flag_for_global_cellular_automata_triggerswitch for ca on trigger flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_trigger
    flag_for_gravity_wave_dragflag for gravity wave drag (gwd) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_gwd
    flag_for_ground_snow_surface_albedo_optionchoice for ground snow surface albedo option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_alb
    flag_for_guess_runflag for guess run flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flag_guess
    flag_for_hedmfflag for hybrid edmf pbl scheme (moninedmf) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hybedmf
    flag_for_hwrf_samfdeepcnv_schemeflag for hwrf samfdeepcnv scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hwrf_samfdeep
    flag_for_hwrf_samfshalcnv_schemeflag for hwrf samfshalcnv scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hwrf_samfshal
    flag_for_hydrostatic_heating_from_physicsflag for use of hydrostatic heating in physics flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%phys_hydrostatic
    flag_for_hydrostatic_solverflag for hydrostatic solver from dynamics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hydrostatic
    flag_for_hydrostatic_solver_for_fast_physicsflag for use the hydrostatic or nonhydrostatic solver for fast physics schemes flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%hydrostatic
    flag_for_in_ccn_forcing_for_morrison_gettelman_microphysicsflag for IN and CCN forcing for morrison gettelman microphysics none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iccn
    flag_for_individual_cloud_species_advectedflag for individual cloud species advected flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%spec_adv
    flag_for_initial_time_date_controlflag for initial conditions and forcing flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ictm
    flag_for_inline_cloud_fraction_calculationflag for the inline cloud fraction calculation flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%do_qa
    flag_for_iterationflag for iteration flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%flag_iter
    flag_for_lake_surface_schemeflag for lake surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lkm
    flag_for_land_surface_schemeflag for land surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsm
    flag_for_lower_boundary_soil_temperature_optionchoice for lower boundary soil temperature option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_tbot
    flag_for_lw_clouds_without_sub_grid_approximationflag for lw clouds without sub-grid approximation flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isubc_lw
    flag_for_mass_flux_deep_convection_schemeflag for mass-flux deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv
    flag_for_mass_flux_shallow_convection_schemeflag for mass-flux shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv
    flag_for_max_random_overlap_clouds_for_longwave_radiationlw: max-random overlap clouds flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iovr_lw
    flag_for_max_random_overlap_clouds_for_shortwave_radiationsw: max-random overlap clouds flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iovr_sw
    flag_for_microphysics_schemechoice of microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics
    flag_for_moorthi_stratusflag for moorthi approach for stratus flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mstrat
    flag_for_morrison_gettelman_microphysics_schemechoice of Morrison-Gettelman microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_mg
    flag_for_mountain_blockingflag for mountain blocking flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%use_zmtnblck
    flag_for_noah_land_surface_schemeflag for NOAH land surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsm_noah
    flag_for_noahmp_land_surface_schemeflag for NOAH MP land surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsm_noahmp
    flag_for_nsstm_runNSSTM flag: off/uncoupled/coupled=0/1/2 flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nstf_name(1)
    flag_for_ntiedtke_deep_convection_schemeflag for new Tiedtke deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv_ntiedtke
    flag_for_ntiedtke_shallow_convection_schemeflag for new Tiedtke shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv_gf
    flag_for_old_PBL_schemeflag for using old PBL schemes flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%old_monin
    flag_for_optical_property_for_liquid_clouds_for_shortwave_radiationsw optical property for liquid clouds flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%icliq_sw
    flag_for_output_of_longwave_heating_rateflag to output lw heating rate (Radtend%lwhc) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lwhtr
    flag_for_output_of_shortwave_heating_rateflag to output sw heating rate (Radtend%swhc) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%swhtr
    flag_for_ozone_physicsflag for old (2006) ozone physics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%oz_phys
    flag_for_pdf_for_morrison_gettelman_microphysics_schemepdf flag for MG macrophysics flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pdfflag
    flag_for_precipitation_effect_on_radiationradiation precip flag for Ferrier/Moorthi flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%norad_precip
    flag_for_precipitation_partition_optionchoice for precipitation partition option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_snf
    flag_for_precipitation_typesnow/rain flag for precipitation flag 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%srflag
    flag_for_precipitation_type_algorithmflag controls precip type algorithm flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cal_pre
    flag_for_radar_reflectivityflag for radar reflectivity flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lradar
    flag_for_radiation_transfer_optionchoice for radiation transfer option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_rad
    flag_for_ras_deep_convectionflag for ras convection scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ras
    flag_for_reading_leaf_area_index_from_inputflag for reading leaf area index from initial conditions for RUC LSM flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rdlai
    flag_for_reduced_drag_coefficient_over_seaflag for reduced drag coeff. over sea flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%redrag
    flag_for_resetting_radar_reflectivity_calculationflag for resetting radar reflectivity calculation flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%radar_reset
    flag_for_restartflag for restart (warmstart) or coldstart flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%restart
    flag_for_rrtmgp_radiation_schemeflag for RRTMGP scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_RRTMGP
    flag_for_ruc_land_surface_schemeflag for RUC land surface model flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsm_ruc
    flag_for_runoff_and_groundwater_optionchoice for runoff and groundwater option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_run
    flag_for_samf_deep_convection_schemeflag for SAMF deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv_samf
    flag_for_samf_shallow_convection_schemeflag for SAMF shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv_samf
    flag_for_sas_deep_convection_schemeflag for SAS deep convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfdeepcnv_sas
    flag_for_sas_shallow_convection_schemeflag for SAS shallow convection scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imfshalcnv_sas
    flag_for_saturation_adjustment_for_microphysics_in_dynamicsflag for saturation adjustment for microphysics in dynamics none 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%do_sat_adj
    flag_for_scale_aware_Shinhong_PBLflag for scale-aware Shinhong PBL scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shinhong
    flag_for_scale_aware_TKE_moist_EDMF_PBLflag for scale-aware TKE moist EDMF PBL scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%satmedmf
    flag_for_sgs_cellular_automataswitch for sgs ca flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ca_sgs
    flag_for_shallow_convectionflag for calling shallow convection flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shal_cnv
    flag_for_shocflag for SHOC flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_shoc
    flag_for_shoc_after_convectionflag to execute SHOC after convection flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shocaftcnv
    flag_for_soil_and_snow_temperature_time_stepping_optionchoice for soil and snow temperature time stepping option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_stc
    flag_for_soil_moisture_factor_stomatal_resistance_optionchoice for soil moisture factor for canopy stomatal resistance option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_btr
    flag_for_solar_constantuse prescribed solar constant flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isol
    flag_for_stochastic_shum_optionflag for stochastic shum option flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_shum
    flag_for_stochastic_skeb_optionflag for stochastic skeb option flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_skeb
    flag_for_stochastic_surface_perturbationsflag for stochastic surface perturbations option flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_sfcperts
    flag_for_stochastic_surface_physics_perturbationsflag for stochastic surface physics perturbations flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_sppt
    flag_for_supercooled_liquid_water_optionchoice for supercooled liquid water option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_frz
    flag_for_surface_emissivity_controlsurface emissivity control flag, use fixed value of 1 flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iems
    flag_for_surface_layer_drag_coefficient_optionchoice for surface layer drag coefficient option (see noahmp module for definition) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iopt_sfc
    flag_for_surface_roughness_option_over_oceansurface roughness options over ocean flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sfc_z0_type
    flag_for_sw_clouds_without_sub_grid_approximationflag for sw clouds without sub-grid approximation flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isubc_sw
    flag_for_tendency_of_air_temperature_at_Lagrangian_surfaceflag for calculating tendency of air temperature due to fast physics flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%out_dt
    flag_for_the_last_step_of_k_split_remappingflag for the last step of k-split remapping flag 0 logical MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%last_step
    flag_for_thompson_microphysics_schemechoice of Thompson microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_thompson
    flag_for_using_climatology_albedoflag for using climatology alb, based on sfc type flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ialb
    flag_for_using_prescribed_global_mean_co2_valueprescribed global mean value (old opernl) flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ico2
    flag_for_vertical_index_direction_controliflip - is not the same as flipv flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iflip
    flag_for_wave_couplingflag controlling cplwav collection (default off) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cplwav
    flag_for_wave_coupling_to_atmflag controlling ocean wave coupling to the atmosphere (default off) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cplwav2atm
    flag_for_wsm6_microphysics_schemechoice of WSM6 microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_wsm6
    flag_for_ysuflag for YSU PBL scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_ysu
    flag_for_zhao_carr_microphysics_schemechoice of Zhao-Carr microphysics scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_zhao_carr
    flag_for_zhao_carr_pdf_microphysics_schemechoice of Zhao-Carr microphysics scheme with PDF clouds flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imp_physics_zhao_carr_pdf
    flag_idealized_physicsflag for idealized physics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsidea
    flag_mg3_as_mg2flag for controlling prep for Morrison-Gettelman microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%mg3_as_mg2
    flag_nonzero_lake_surface_fractionflag indicating presence of some lake surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lake
    flag_nonzero_land_surface_fractionflag indicating presence of some land surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dry
    flag_nonzero_ocean_surface_fractionflag indicating presence of some ocean surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ocean
    flag_nonzero_sea_ice_surface_fractionflag indicating presence of some sea ice surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%icy
    flag_nonzero_wet_surface_fractionflag indicating presence of some ocean or lake surface area fraction flag 1 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%wet
    flag_printcontrol flag for diagnostic print out flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lprnt
    flag_reset_maximum_hourly_fieldsflag for resetting maximum hourly fields flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%reset
    flag_shallow_convective_cloudflag for shallow convective cloud 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shcnvcw
    flag_skip_macroflag to skip cloud macrophysics in Morrison scheme flag 0 logical MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%skip_macro
    flag_to_calc_lwlogical flags for lw radiation calls flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lslwr
    flag_to_calc_swlogical flags for sw radiation calls flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsswr
    flag_tracer_diagnostics_3Dflag for 3d tracer diagnostic fields flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%qdiag3d
    forecast_date_and_timecurrent forecast date and time none 1 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%jdat
    forecast_hour_of_the_daytime in hours after 00z at the current timestep h 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%solhr
    forecast_monthcurrent forecast month none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%imn
    forecast_timecurrent forecast time h 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fhour
    forecast_time_at_previous_timestepforecast time at the previous timestep h 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%phour
    fraction_of_cellular_automata_for_deep_convectionfraction of cellular automata for deep convection frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%ca_deep
    fraction_of_cloud_top_water_scavengedfraction of the tracer (cloud top water) that is scavenged by convection km-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fswtr
    fraction_of_convective_cloudfraction of convective cloud frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_cldprop_type GFS_Data(cdata%blk_no)%Cldprop%cv
    fraction_of_grid_box_with_subgrid_orography_higher_than_critical_heightfrac. of grid box with by subgrid orography higher than critical height frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clx
    fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scalefrac. of grid box with by subgrid orography higher than critical height small scale frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clxss
    fraction_of_ice_water_cloudfraction of ice water cloud frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%f_ice
    fraction_of_rain_water_cloudfraction of rain water cloud frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%f_rain
    fraction_of_tracer_scavengedfraction of the tracer (aerosols) that is scavenged by convection km-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%fscav
    fractional_coverage_with_strong_cosz_dependencyfractional coverage with strong cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%facsf
    fractional_coverage_with_weak_cosz_dependencyfractional coverage with weak cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%facwf
    free_convection_layer_thicknessthickness of free convection layer (FCL) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%d_conv
    freezing_point_temperature_of_seawaterfreezing point temperature of seawater K 0 real kind_phys MODULE GFS_typedefs con_tice
    frequency_for_longwave_radiationfrequency for longwave radiation s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fhlwr
    frequency_for_shortwave_radiationfrequency for shortwave radiation s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fhswr
    frozen_cloud_threshold_temperaturethreshold temperature below which all cloud is ice K 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%tf
    gas_constant_dry_airideal gas constant for dry air J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_rd
    gas_constant_water_vaporideal gas constant for water vapor J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_rv
    gas_constants_for_multi_gases_physicsgas constants for multi gases physics J kg-1 K-1 1 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%rilist
    gas_tracers_for_multi_gas_physics_at_Lagrangian_surfacegas tracers for multi gas physics at Lagrangian surface kg kg-1 4 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qvi
    geopotentialgeopotential at model layer centers m2 s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%phil
    geopotential_at_interfacegeopotential at model layer interfaces m2 s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%phii
    geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperaturedifference between mid-layer geopotentials divided by mid-layer virtual temperature m2 s-2 K-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%del_gz
    gf_memory_counterMemory counter for GF none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%conv_act
    graupel_mixing_ratioratio of mass of graupel to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntgl)
    graupel_mixing_ratio_updated_by_physicsratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntgl)
    graupel_number_concentrationnumber concentration of graupel kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntgnc)
    graupel_number_concentration_updated_by_physicsnumber concentration of graupel updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntgnc)
    graupel_precipitation_rate_from_previous_timestepgraupel precipitation rate from previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%dgraupelprv
    grav_settlingflag to activate gravitational setting of fog flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%grav_settling
    gravitational_accelerationgravitational acceleration m s-2 0 real kind_phys MODULE GFS_typedefs con_g
    grid_sensitive_critical_cloud_top_entrainment_instability_criteriagrid sensitive critical cloud top entrainment instability criteria none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ctei_rml
    grid_size_related_coefficient_used_in_scale_sensitive_schemesgrid size related coefficient used in scale-sensitive schemes none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%work1
    grid_size_related_coefficient_used_in_scale_sensitive_schemes_complementcomplement to work1 none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%work2
    ground_temperature_for_noahmpground temperature for noahmp K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tgxy
    gwd_optflag to choose gwd scheme flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%gwd_opt
    h2o_forcingwater forcing data various 3 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%h2opl
    heat_exchange_coefficient_for_MYJ_schemessurface heat exchange_coefficient for MYJ schemes m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_akhs
    height_above_ground_at_lowest_model_layerlayer 1 height above ground (not MSL) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zlvl
    height_of_launch_level_of_orographic_gravity_waveheight of launch level of orographic gravity wave m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zogw
    height_of_low_level_wave_breakingheight of drag due to low level wave breaking m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zlwb
    height_of_mountain_blockingheight of mountain blocking drag m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zmtb
    horizontal_dimensionhorizontal dimension count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncols
    horizontal_index_of_printed_columnhorizontal index of printed column index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ipr
    horizontal_loop_extenthorizontal loop extent count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%blksz(cdata%blk_no)
    humidity_mixing_ratiothe ratio of the mass of water vapor to the mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qv_r
    ice_fraction_in_convective_towerice fraction in convective tower frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_fice
    ice_friendly_aerosol_number_concentrationnumber concentration of ice-friendly aerosols kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntia)
    ice_friendly_aerosol_number_concentration_updated_by_physicsnumber concentration of ice-friendly aerosols updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntia)
    ice_number_concentrationnumber concentration of ice kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntinc)
    ice_number_concentration_updated_by_physicsnumber concentration of ice updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntinc)
    ice_precipitation_rate_from_previous_timestepice precipitation rate from previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%diceprv
    ice_supersaturation_thresholdice supersaturation parameter for PDF clouds none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sup
    ice_vertical_dimensionvertical loop extent for ice levels, start at 1 count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%kice
    ice_water_mixing_ratioratio of mass of ice water to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntiw)
    ice_water_mixing_ratio_convective_transport_tracerratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clw(:,:,1)
    ice_water_mixing_ratio_savecloud ice water mixing ratio before entering a physics scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q(:,:,GFS_Control%ntiw)
    ice_water_mixing_ratio_updated_by_physicsratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntiw)
    in_number_concentrationIN number concentration kg-1? 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%in_nm
    index_for_cloud_amounttracer index for cloud amount integer index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntclamt
    index_for_cloud_fraction_in_3d_arrays_for_microphysicsindex of cloud fraction in phyf3d (used only for SHOC or MG) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%indcld
    index_for_cloud_liquid_water_effective_radiusthe index of cloud liquid water effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nleffr
    index_for_convective_cloud_cover_in_phy_f3dthe index of convective cloud cover in phy f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncnvc
    index_for_convective_cloud_water_mixing_ratio_in_phy_f3dthe index of convective cloud water mixing ratio in phy f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncnvw
    index_for_diagnostic_printouthorizontal index for point used for diagnostic printout 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ipt
    index_for_first_chemical_tracertracer index for first chemical tracer index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntchs
    index_for_graupeltracer index for graupel index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntgl
    index_for_graupel_effective_radiusthe index of graupel effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ngeffr
    index_for_graupel_number_concentrationtracer index for graupel number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntgnc
    index_for_ice_cloud_condensatetracer index for ice water index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntiw
    index_for_ice_cloud_condensate_vertical_diffusion_tracerindex for ice cloud condensate in the vertically diffused tracer array index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ntiwx
    index_for_ice_cloud_number_concentrationtracer index for ice number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntinc
    index_for_ice_effective_radiusthe index of ice effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nieffr
    index_for_ice_friendly_aerosolstracer index for ice friendly aerosol index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntia
    index_for_liquid_cloud_condensatetracer index for cloud condensate (or liquid water) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntcw
    index_for_liquid_cloud_number_concentrationtracer index for liquid number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntlnc
    index_for_mass_weighted_rime_factortracer index for mass weighted rime factor index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nqrimef
    index_for_ozonetracer index for ozone mixing ratio index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntoz
    index_for_rain_effective_radiusthe index of rain effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nreffr
    index_for_rain_number_concentrationtracer index for rain number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntrnc
    index_for_rain_watertracer index for rain water index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntrw
    index_for_snow_effective_radiusthe index of snow effective radius in phy_f3d 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nseffr
    index_for_snow_number_concentrationtracer index for snow number concentration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntsnc
    index_for_snow_watertracer index for snow water index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntsw
    index_for_turbulent_kinetic_energytracer index for turbulent kinetic energy index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntke
    index_for_turbulent_kinetic_energy_convective_transport_tracerindex for turbulent kinetic energy in the convectively transported tracer array index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ntk
    index_for_turbulent_kinetic_energy_vertical_diffusion_tracerindex for turbulent kinetic energy in the vertically diffused tracer array index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ntkev
    index_for_water_friendly_aerosolstracer index for water friendly aerosol index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntwa
    index_for_water_vaportracer index for water vapor (specific humidity) index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntqv
    index_of_atmosphere_heat_diffusivity_from_shoc_in_phy_f3dthe index of diffusivity for heat from from SHOC in phy_f3d index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nahdshoc
    index_of_dtlm_startindex to start dtlm run or not index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%ifd
    index_of_highest_temperature_inversionindex of highest temperature inversion index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kinver
    index_of_kinematic_buoyancy_flux_from_shoc_in_phy_f3dthe index of upward kinematic buoyancy flux from SHOC in phy_f3d index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nkbfshoc
    index_of_subgrid_scale_cloud_fraction_from_shoc_in_phy_f3dthe index of subgrid-scale cloud fraction from from SHOC in phy_f3d index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nscfshoc
    index_of_time_stepcurrent forecast iteration index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%kdt
    initial_permutation_seed_lwinitial seed for McICA LW none 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ipsdlw0
    initial_permutation_seed_swinitial seed for McICA SW none 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ipsdsw0
    instantaneous_aerosol_column_mass_densitiesinstantaneous aerosol column mass densities for pm2.5, black carbon, organic carbon, sulfate, dust, sea salt g m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%aecm
    instantaneous_anthopogenic_and_biomass_burning_emissionsinstantaneous anthopogenic and biomass burning emissions for black carbon, organic carbon, and sulfur dioxide ug m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%abem
    instantaneous_atmosphere_detrainment_convective_mass_flux(detrainment mass flux) * delt kg m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dt_mf
    instantaneous_atmosphere_downdraft_convective_mass_flux(downdraft mass flux) * delt kg m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dd_mf
    instantaneous_atmosphere_heat_diffusivityinstantaneous atmospheric heat diffusivity m2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dkt
    instantaneous_atmosphere_updraft_convective_mass_flux(updraft mass flux) * delt kg m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ud_mf
    instantaneous_change_in_x_wind_due_to_mountain_blocking_draginstantaneous change in x wind due to mountain blocking drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dudt_mtb
    instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_draginstantaneous change in x wind due to orographic gw drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dudt_ogw
    instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_draginstantaneous change in x wind due to TOFD m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dudt_tms
    instantaneous_convective_scale_wet_depositioninstantaneous convective-scale wet deposition kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%wetdpc
    instantaneous_cosine_of_zenith_anglecosine of zenith angle at current time none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%xcosz
    instantaneous_dry_depositioninstantaneous dry deposition kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%drydep
    instantaneous_dust_emission_fluxinstantaneous dust emission flux kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%duem
    instantaneous_large_scale_wet_depositioninstantaneous large-scale wet deposition kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%wetdpl
    instantaneous_momentum_flux_due_to_mountain_blocking_draginstantaneous momentum flux due to mountain blocking drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tau_mtb
    instantaneous_momentum_flux_due_to_nonstationary_gravity_waveinstantaneous momentum flux due to nonstationary gravity waves Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tau_ngw
    instantaneous_momentum_flux_due_to_orographic_gravity_wave_draginstantaneous momentum flux due to orographic gravity wave drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tau_ogw
    instantaneous_momentum_flux_due_to_turbulent_orographic_form_draginstantaneous momentum flux due to TOFD Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tau_tofd
    instantaneous_seasalt_emission_fluxinstantaneous sea salt emission flux kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ssem
    instantaneous_sedimentationinstantaneous sedimentation kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sedim
    instantaneous_specific_humidity_at_2m_for_couplinginstantaneous Q2m kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%q2mi_cpl
    instantaneous_surface_air_pressure_for_couplinginstantaneous sfc pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%psurfi_cpl
    instantaneous_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_couplinginstantaneous sfc nir diff downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dnirdfi_cpl
    instantaneous_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_couplinginstantaneous sfc uv+vis diff downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvisdfi_cpl
    instantaneous_surface_downwelling_direct_near_infrared_shortwave_flux_for_couplinginstantaneous sfc nir beam downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dnirbmi_cpl
    instantaneous_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_couplinginstantaneous sfc uv+vis beam downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvisbmi_cpl
    instantaneous_surface_downwelling_longwave_flux_for_couplinginstantaneous sfc downward lw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dlwsfci_cpl
    instantaneous_surface_downwelling_shortwave_flux_for_couplinginstantaneous sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dswsfci_cpl
    instantaneous_surface_ground_heat_fluxinstantaneous sfc ground heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%gfluxi
    instantaneous_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_couplinginstantaneous net nir diff sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nnirdfi_cpl
    instantaneous_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_couplinginstantaneous net uv+vis diff downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nvisdfi_cpl
    instantaneous_surface_net_downward_direct_near_infrared_shortwave_flux_for_couplinginstantaneous net nir beam sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nnirbmi_cpl
    instantaneous_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_couplinginstantaneous net uv+vis beam downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nvisbmi_cpl
    instantaneous_surface_net_downward_longwave_flux_for_couplinginstantaneous net sfc downward lw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nlwsfci_cpl
    instantaneous_surface_net_downward_shortwave_flux_for_couplinginstantaneous net sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nswsfci_cpl
    instantaneous_surface_potential_evaporationinstantaneous sfc potential evaporation W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%epi
    instantaneous_surface_skin_temperature_for_couplinginstantaneous sfc temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%tsfci_cpl
    instantaneous_surface_upward_latent_heat_fluxsurface upward latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqsfc1
    instantaneous_surface_upward_latent_heat_flux_for_couplinginstantaneous sfc latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dqsfci_cpl
    instantaneous_surface_upward_latent_heat_flux_for_diaginstantaneous sfc latent heat flux multiplied by timestep W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dqsfci
    instantaneous_surface_upward_sensible_heat_fluxsurface upward sensible heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dtsfc1
    instantaneous_surface_upward_sensible_heat_flux_for_chemistry_couplinginstantaneous upward sensible heat flux for chemistry coupling W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%ushfsfci
    instantaneous_surface_upward_sensible_heat_flux_for_couplinginstantaneous sfc sensible heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dtsfci_cpl
    instantaneous_surface_upward_sensible_heat_flux_for_diaginstantaneous sfc sensible heat flux multiplied by timestep W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtsfci
    instantaneous_surface_x_momentum_fluxx momentum flux Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dusfc1
    instantaneous_surface_x_momentum_flux_for_couplinginstantaneous sfc x momentum flux Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dusfci_cpl
    instantaneous_surface_x_momentum_flux_for_diaginstantaneous sfc x momentum flux multiplied by timestep Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfci
    instantaneous_surface_y_momentum_fluxy momentum flux Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dvsfc1
    instantaneous_surface_y_momentum_flux_for_couplinginstantaneous sfc y momentum flux Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvsfci_cpl
    instantaneous_surface_y_momentum_flux_for_diaginstantaneous sfc y momentum flux multiplied by timestep Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfci
    instantaneous_temperature_at_2m_for_couplinginstantaneous T2m K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%t2mi_cpl
    instantaneous_water_vapor_specific_humidity_tendency_due_to_convectioninstantaneous moisture tendency due to convection kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dqdti
    instantaneous_x_stress_due_to_gravity_wave_dragzonal surface stress due to orographic gravity wave drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dusfcg
    instantaneous_x_wind_at_10m_for_couplinginstantaneous U10m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%u10mi_cpl
    instantaneous_y_stress_due_to_gravity_wave_dragmeridional surface stress due to orographic gravity wave drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dvsfcg
    instantaneous_y_wind_at_10m_for_couplinginstantaneous V10m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%v10mi_cpl
    integrated_x_momentum_flux_from_blocking_dragintegrated x momentum flux from blocking drag Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc_bl
    integrated_x_momentum_flux_from_form_dragintegrated x momentum flux from form drag Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc_fd
    integrated_x_momentum_flux_from_large_scale_gwdintegrated x momentum flux from large scale gwd Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc_ls
    integrated_x_momentum_flux_from_small_scale_gwdintegrated x momentum flux from small scale gwd Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dusfc_ss
    integrated_y_momentum_flux_from_blocking_dragintegrated y momentum flux from blocking drag Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc_bl
    integrated_y_momentum_flux_from_form_dragintegrated y momentum flux from form drag Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc_fd
    integrated_y_momentum_flux_from_large_scale_gwdintegrated y momentum flux from large scale gwd Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc_ls
    integrated_y_momentum_flux_from_small_scale_gwdintegrated y momentum flux from small scale gwd Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvsfc_ss
    internal_ice_temperaturesea ice internal temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tiice
    inverse_scaling_factor_for_critical_relative_humidityinverse scaling factor for critical relative humidity rad2 m-2 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dxinv
    iounit_logfortran unit number for logfile none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%logunit
    iounit_namelistfortran unit number for file opens none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nlunit
    joules_per_calorie_constantjoules per calorie constant J cal-1 0 real kind_phys MODULE GFS_typedefs con_jcal
    julian_dayjulian day days 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%julian
    k_level_of_highest_plumek-level of highest plume count 1 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ktop_plume
    k_level_of_highest_reaching_plumek-level of highest reaching plume count 1 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ktop_shallow
    kappa_dry_for_fast_physicsmodified kappa for fast physics none 0 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%akap
    kind_INTEGERdefinition of kind_INTEGER none 0 integer MODULE machine kind_INTEGER
    kind_LOGICALdefinition of kind_LOGICAL none 0 integer MODULE machine kind_LOGICAL
    kind_dyndefinition of kind_dyn none 0 integer MODULE machine kind_dyn
    kind_griddefinition of kind_grid none 0 integer MODULE machine kind_grid
    kind_physdefinition of kind_phys none 0 integer MODULE machine kind_phys
    kinematic_buoyancy_flux_from_shocupward kinematic buoyancy flux from the SHOC scheme K m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nkbfshoc)
    kinematic_surface_latent_heat_fluxkinematic surface latent heat flux m s-1 kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_elflx
    kinematic_surface_upward_latent_heat_fluxkinematic surface upward latent heat flux kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%evap
    kinematic_surface_upward_latent_heat_flux_over_icekinematic surface upward latent heat flux over ice kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evap_ice
    kinematic_surface_upward_latent_heat_flux_over_landkinematic surface upward latent heat flux over land kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evap_land
    kinematic_surface_upward_latent_heat_flux_over_oceankinematic surface upward latent heat flux over ocean kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evap_ocean
    kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughnesskinematic surface upward latent heat flux reduced by surface roughness kg kg-1 m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evapq
    kinematic_surface_upward_sensible_heat_fluxkinematic surface upward sensible heat flux K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%hflx
    kinematic_surface_upward_sensible_heat_flux_over_icekinematic surface upward sensible heat flux over ice K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hflx_ice
    kinematic_surface_upward_sensible_heat_flux_over_landkinematic surface upward sensible heat flux over land K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hflx_land
    kinematic_surface_upward_sensible_heat_flux_over_oceankinematic surface upward sensible heat flux over ocean K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hflx_ocean
    kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughnesskinematic surface upward sensible heat flux reduced by surface roughness K m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hflxq
    lake_area_fractionfraction of horizontal grid area occupied by lake frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%lakefrac
    lake_depthlake depth m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%lakedepth
    lake_ice_minimumminimum lake ice value ??? 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%min_lakeice
    lake_water_storagelake water storage mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%wslakexy
    land_area_fractionfraction of horizontal grid area occupied by land frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%landfrac
    land_area_fraction_for_microphysicsland area fraction used in microphysics schemes frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%frland
    largest_cloud_top_vertical_index_encountered_thus_farlargest cloud top vertical index encountered thus far index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%acvt
    latent_heat_flux_fraction_factor_relative_to_sensible_heat_fluxlatent heat flux fraction relative to sensible heat flux for canopy heat storage parameterization none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%e0fac
    latent_heat_of_fusion_of_water_at_0Clatent heat of fusion J kg-1 0 real kind_phys MODULE GFS_typedefs con_hfus
    latent_heat_of_vaporization_of_water_at_0Clatent heat of evaporation/sublimation J kg-1 0 real kind_phys MODULE GFS_typedefs con_hvap
    latitudelatitude radian 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%xlat
    latitude_in_degreelatitude in degree north degree_north 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%xlat_d
    latitude_index_in_debug_printoutslatitude index in debug printouts index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%latidxprnt
    layer_bottom_depth_from_snow_surfacedepth from the top of the snow surface at the bottom of the layer m 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zsnsoxy
    layer_pressure_thickness_for_radiationlayer pressure thickness on radiation levels hPa 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%delr
    layer_thickness_for_radiationlayer thickness on radiation levels km 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dzlyr
    leaf_area_indexleaf area index none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xlaixy
    leaf_massleaf mass g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%lfmassxy
    level_of_dividing_streamlinelevel of the dividing streamline none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zmtnblck
    limit_for_temperature_tendency_for_microphysicstemperature tendency limiter per physics time step K s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ttendlim
    liquid_water_densitydensity of liquid water kg m-3 0 real kind_phys MODULE GFS_typedefs rhowater
    list_of_active_gases_used_by_RRTMGPlist of active gases used by RRTMGP none 1 character len=128 MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%active_gases_array
    local_condesed_water_number_concentrationnumber concentration of condensed water local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncpl
    local_graupel_mixing_ratioratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qgl
    local_graupel_number_concentrationnumber concentration of graupel local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncgl
    local_ice_number_concentrationnumber concentration of ice local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncpi
    local_rain_number_concentrationnumber concentration of rain local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncpr
    local_rain_water_mixing_ratioratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qrn
    local_snow_number_concentrationnumber concentration of snow local to physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncps
    local_snow_water_mixing_ratioratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qsnw
    log_pressure_at_Lagrangian_surfacelogarithm of pressure at Lagrangian surface Pa 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%peln
    longitudelongitude radian 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%xlon
    longwave_optical_properties_for_aerosolsFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_optical_props_aerosol
    longwave_optical_properties_for_clear_skyFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_optical_props_clrsky
    longwave_optical_properties_for_cloudy_atmosphereFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_optical_props_clouds
    longwave_optical_properties_for_cloudy_atmosphere_by_bandFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%lw_optical_props_cloudsByBand
    longwave_source_functionFortran DDT containing RRTMGP source functions DDT 0 ty_source_func_lw MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sources
    lower_bound_of_snow_vertical_dimension_for_land_surface_modellower bound of of snow-related arrays for land surface model count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsnow_lsm_lbound
    lw_fluxes_sfclw radiation fluxes at sfc W m-2 1 sfcflw_type MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%sfcflw
    lw_fluxes_top_atmospherelw radiation fluxes at top W m-2 1 topflw_type MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%topflw
    lwe_thickness_of_convective_precipitation_amount_for_couplingtotal convective precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%rainc_cpl
    lwe_thickness_of_convective_precipitation_amount_from_previous_timestepconvective_precipitation_amount from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%raincprv
    lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestepconvective rain at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%rainc
    lwe_thickness_of_deep_convective_precipitation_amountdeep convective rainfall amount on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%raincd
    lwe_thickness_of_explicit_precipitation_amountexplicit precipitation (rain, ice, snow, graupel, ...) on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%prcpmp
    lwe_thickness_of_explicit_rain_amountexplicit rain on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rainmp
    lwe_thickness_of_explicit_rainfall_amount_from_previous_timestepexplicit rainfall from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rainncprv
    lwe_thickness_of_graupel_amountexplicit graupel fall on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%graupelmp
    lwe_thickness_of_graupel_amount_from_previous_timestepgraupel amount from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%graupelprv
    lwe_thickness_of_graupel_amount_on_dynamics_timestepgraupel fall at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%graupel
    lwe_thickness_of_ice_amountexplicit ice fall on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%icemp
    lwe_thickness_of_ice_amount_from_previous_timestepice amount from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%iceprv
    lwe_thickness_of_ice_amount_on_dynamics_timestepice fall at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ice
    lwe_thickness_of_moist_convective_adj_precipitation_amountadjusted moist convective rainfall amount on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rainmcadj
    lwe_thickness_of_precipitation_amount_for_couplingtotal rain precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%rain_cpl
    lwe_thickness_of_precipitation_amount_on_dynamics_timesteptotal rain at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%rain
    lwe_thickness_of_shallow_convective_precipitation_amountshallow convective rainfall amount on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%raincs
    lwe_thickness_of_snow_amountexplicit snow fall on physics timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowmp
    lwe_thickness_of_snow_amount_for_couplingtotal snow precipitation m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%snow_cpl
    lwe_thickness_of_snow_amount_from_previous_timestepsnow amount from previous timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snowprv
    lwe_thickness_of_snow_amount_on_dynamics_timestepsnow fall at this time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%snow
    magnitude_of_perturbation_of_heat_to_momentum_roughness_length_ratiomagnitude of perturbation of heat to momentum roughness length ratio frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertzt
    magnitude_of_perturbation_of_leaf_area_indexmagnitude of perturbation of leaf area index frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertlai
    magnitude_of_perturbation_of_momentum_roughness_lengthmagnitude of perturbation of momentum roughness length frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertz0
    magnitude_of_perturbation_of_soil_type_b_parametermagnitude of perturbation of soil type b parameter frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertshc
    magnitude_of_perturbation_of_vegetation_fractionmagnitude of perturbation of vegetation fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertvegf
    magnitude_of_surface_albedo_perturbationmagnitude of surface albedo perturbation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pertalb
    map_of_block_column_number_to_global_i_indexmap of local index ix to global index i for this block none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%imap
    map_of_block_column_number_to_global_j_indexmap of local index ix to global index j for this block none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%jmap
    mass_fraction_of_convective_cloud_icemass fraction of convective cloud ice water kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qicn
    mass_fraction_of_convective_cloud_liquid_watermass fraction of convective cloud liquid water kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qlcn
    mass_weighted_rime_factor_mixing_ratiothe ratio of the mass of rime factor to mass of dry air kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qg_r
    mass_weighted_rime_factor_updated_by_physicsmass weighted rime factor updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%nqrimef)
    maximum_column_heating_ratemaximum heating rate in column K s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cumabs
    maximum_critical_relative_humiditymaximum critical relative humidity frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rhcmax
    maximum_mass_fluxmaximum mass flux within a column m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%maxMF
    maximum_reflectivity_at_1km_agl_over_maximum_hourly_time_intervalmaximum reflectivity at 1km agl over maximum hourly time interval dBZ 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%refdmax
    maximum_reflectivity_at_minus10c_over_maximum_hourly_time_intervalmaximum reflectivity at minus10c over maximum hourly time interval dBZ 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%refdmax263k
    maximum_relative_humidity_at_2m_over_maximum_hourly_time_intervalmaximum relative humidity at 2m over maximum hourly time interval % 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%rh02max
    maximum_scaling_factor_for_critical_relative_humiditymaximum scaling factor for critical relative humidity m2 rad-2 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dxmax
    maximum_specific_humidity_at_2mmaximum specific humidity at 2m height kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%spfhmax
    maximum_subgrid_orographymaximum of subgrid orography m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%elvmax
    maximum_temperature_at_2mmax temperature at 2m height K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tmpmax
    maximum_temperature_at_2m_over_maximum_hourly_time_intervalmaximum temperature at 2m over maximum hourly time interval K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%t02max
    maximum_u_wind_at_10m_over_maximum_hourly_time_intervalmaximum u wind at 10m over maximum hourly time interval m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%u10max
    maximum_updraft_velocity_at_cloud_basemaximum updraft velocity at cloud base m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%wcbmax
    maximum_v_wind_at_10m_over_maximum_hourly_time_intervalmaximum v wind at 10m over maximum hourly time interval m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%v10max
    maximum_vegetation_area_fractionmax fractional coverage of green vegetation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%shdmax
    maximum_wind_at_10mmaximum wind speed at 10 m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%wind10mmax
    maximum_wind_at_10m_over_maximum_hourly_time_intervalmaximum wind at 10m over maximum hourly time interval m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%spd10max
    maximum_x_wind_at_10mmaximum x wind at 10 m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%u10mmax
    maximum_y_wind_at_10mmaximum y wind at 10 m m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%v10mmax
    mean_change_over_depth_in_sea_water_temperaturemean of dT(z) (zsea1 to zsea2) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dtzm
    mean_effective_radius_for_ice_cloudmean effective radius for ice cloud micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,5)
    mean_effective_radius_for_liquid_cloudmean effective radius for liquid cloud micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,3)
    mean_effective_radius_for_rain_dropmean effective radius for rain drop micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,7)
    mean_effective_radius_for_snow_flakemean effective radius for snow flake micron 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,9)
    mean_nir_albedo_with_strong_cosz_dependencymean nir albedo with strong cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alnsf
    mean_nir_albedo_with_weak_cosz_dependencymean nir albedo with weak cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alnwf
    mean_vis_albedo_with_strong_cosz_dependencymean vis albedo with strong cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alvsf
    mean_vis_albedo_with_weak_cosz_dependencymean vis albedo with weak cosz dependency frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alvwf
    mg_allow_supersat_after_sedallow supersaturation after sedimentation for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sed_supersat
    mg_autoconversion_size_threshold_ice_snowautoconversion size threshold for cloud ice to snow for MG microphysics um 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_dcs
    mg_bergeron_efficiency_factorbergeron efficiency factor for MG microphysics frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_berg_eff_factor
    mg_cloud_water_variancecloud water relative variance for MG microphysics 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_qcvar
    mg_drop_concentration_constantdroplet concentration constant for MG microphysics m-3 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ncnst
    mg_flag_drop_concentration_constantflag for constant droplet concentration for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_nccons
    mg_flag_for_cloud_ice_processesflag for cloud ice processes for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_cldice
    mg_flag_for_gmao_ice_formulationflag for gmao ice formulation flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_do_ice_gmao
    mg_flag_for_graupelflag for graupel for MG microphysics (hail possible if false) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_do_graupel
    mg_flag_for_hailflag for hail for MG microphysics (graupel possible if false) flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_do_hail
    mg_flag_for_heterogeneous_freezingflag for heterogeneous freezing for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%hetfrz_classnuc
    mg_flag_for_liu_liquid_treatmentflag for liu liquid treatment flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_do_liq_liu
    mg_flag_for_sb2001_autoconversionflag for SB 2001 autoconversion or accretion for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_sb_physics
    mg_flag_for_uniform_subcolumnsflag for uniform subcolumns for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%microp_uniform
    mg_flag_graupel_concentration_constantflag for constant graupel concentration for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ngcons
    mg_flag_ice_concentration_constantflag for constant ice concentration for MG microphysics flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_nicons
    mg_graupel_concentration_constantgraupel concentration constant for MG microphysics m-3 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ngnst
    mg_ice_concentration_constantice concentration constant for MG microphysics m-3 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ninst
    mg_minimum_cloud_condensed_water_and_ice_mixing_ratiominimum cloud condensed water and ice mixing ratio in MG macro clouds kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_qcmin
    mg_minimum_cloud_condensed_water_mixing_ratiominimum cloud condensed water mixing ratio in MG macro clouds kg kg-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_qcmin(1)
    mg_minimum_ice_mixing_ratiominimum ice mixing ratio in MG macro clouds kg kg-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_qcmin(2)
    mg_minimum_rh_for_icerelative humidity threshold parameter for nucleating ice for MG microphysics none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_rhmini
    mg_time_scale_for_autoconversion_of_iceautoconversion time scale for ice for MG microphysics s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_ts_auto_ice
    mg_tuning_factor_for_alphastuning factor for alphas (alpha = 1 - critical relative humidity) none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_alf
    mg_type_of_precip_fraction_methodtype of precip fraction method for MG microphysics (in_cloud or max_overlap) none 0 character len=16 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%mg_precip_frac_method
    minimum_large_ice_fractionminimum large ice fraction in F-A mp scheme frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%flgmin
    minimum_relative_humidity_at_2m_over_maximum_hourly_time_intervalminumum relative humidity at 2m over maximum hourly time interval % 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%rh02min
    minimum_scaling_factor_for_critical_relative_humidityminimum scaling factor for critical relative humidity m2 rad-2 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dxmin
    minimum_sea_ice_concentrationminimum sea ice concentration frac 0 real kind_phys MODULE GFS_typedefs cimin
    minimum_specific_humidity_at_2mminimum specific humidity at 2m height kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%spfhmin
    minimum_temperature_at_2mmin temperature at 2m height K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tmpmin
    minimum_temperature_at_2m_over_maximum_hourly_time_intervalminumum temperature at 2m over maximum hourly time interval K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%t02min
    minimum_value_of_specific_humidityfloor value for specific humidity kg kg-1 0 real kind_phys MODULE GFS_typedefs con_epsq
    minimum_vegetation_area_fractionmin fractional coverage of green vegetation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%shdmin
    mix_total_water_flagflag to mix total water or individual species flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_mixqt
    mixing_lengthmixing length in meters m 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%el_pbl
    mixing_length_flagflag to determine which mixing length form to use flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_mixlength
    model_layer_number_at_cloud_basevertical indices for low, middle and high cloud bases index 2 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%mbota
    model_layer_number_at_cloud_topvertical indices for low, middle and high cloud tops index 2 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%mtopa
    moisture_from_previous_timestepmoisture from previous time step kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%prevsq
    moisture_tendency_due_to_dynamicsmoisture tendency due to dynamics only kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%forceq
    momentum_exchange_coefficient_for_MYJ_schemessurface momentum exchange_coefficient for MYJ schemes m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_akms
    momentum_transport_reduction_factor_pgf_deep_convectionreduction factor in momentum transport due to deep convection induced pressure gradient force frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pgcon_deep
    momentum_transport_reduction_factor_pgf_shallow_convectionreduction factor in momentum transport due to shallow convection induced pressure gradient force frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%pgcon_shal
    mpi_commMPI communicator index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%communicator
    mpi_rankcurrent MPI-rank index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%me
    mpi_rank_for_fast_physicscurrent MPI-rank for fast physics schemes index 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%mpirank
    mpi_rootmaster MPI-rank index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%master
    mpi_root_for_fast_physicsmaster MPI-rank for fast physics schemes index 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%mpiroot
    mpi_sizenumber of MPI tasks in communicator count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntasks
    multiplication_factor_for_critical_cloud_workfunctionmultiplication factor for tical_cloud_workfunction none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ccwf
    multiplication_factors_for_convective_gravity_wave_dragmultiplication factor for convective GWD none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cgwf
    multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_dragmultiplication factors for cdmb and gwd none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cdmbgwd
    mynn_output_flagflag initialize and output extra 3D variables flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_output
    namelist_filenamenamelist filename none 0 character len=64 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fn_nml
    namelist_filename_for_internal_file_readsnamelist filename for internal file reads none 1 character len=256 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%input_nml_file
    natural_log_of_h2o_forcing_data_pressure_levelsnatural log of h2o forcing data pressure levels log(Pa) 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%h2o_pres
    natural_log_of_ozone_forcing_data_pressure_levelsnatural log of ozone forcing data pressure levels log(Pa) 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oz_pres
    netcdf_float_fillvaluedefinition of NetCDF float FillValue none 0 real kind_phys MODULE GFS_typedefs huge
    nondimensional_snow_agenon-dimensional snow age none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%taussxy
    nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timesteptotal precipitation amount in each time step m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tprcp
    nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_icetotal precipitation amount in each time step over ice m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tprcp_ice
    nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_landtotal precipitation amount in each time step over land m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tprcp_land
    nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_oceantotal precipitation amount in each time step over ocean m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tprcp_ocean
    normalized_soil_wetnessnormalized soil wetness frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%wet1
    normalized_soil_wetness_for_land_surface_modelnormalized soil wetness for lsm frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%wetness
    number_concentration_of_cloud_liquid_water_particles_for_detrainmentdroplet number concentration in convective detrainment m-3 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_ndrop
    number_concentration_of_ice_crystals_for_detrainmentcrystal number concentration in convective detrainment m-3 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_nice
    number_of_2d_auxiliary_arraysnumber of 2d auxiliary arrays to output (for debugging) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%naux2d
    number_of_3d_arrays_associated_with_pdf_based_cloudsnumber of 3d arrays associated with pdf based clouds/mp count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%npdf3d
    number_of_3d_auxiliary_arraysnumber of 3d auxiliary arrays to output (for debugging) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%naux3d
    number_of_active_gases_used_by_RRTMGPnumber of gases available used by RRTMGP (Model%nGases) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nGases
    number_of_aerosol_bands_for_longwave_radiationnumber of aerosol bands for longwave radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nbdlw
    number_of_aerosol_bands_for_shortwave_radiationnumber of aerosol bands for shortwave radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nbdsw
    number_of_aerosol_output_fields_for_longwave_radiationnumber of aerosol output fields for longwave radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nf_aelw
    number_of_aerosol_output_fields_for_shortwave_radiationnumber of aerosol output fields for shortwave radiation count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nf_aesw
    number_of_aerosol_tracers_MGnumber of aerosol tracers for Morrison Gettelman MP count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntrcaer
    number_of_aerosol_tracers_for_convectionnumber of aerosol tracers transported/scavenged by convection count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%itc
    number_of_angles_used_in_gaussian_quadratureNumber of angles used in Gaussian quadrature count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nGauss_ang
    number_of_chemical_tracersnumber of chemical tracers count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntchm
    number_of_chemical_tracers_for_diagnosticsnumber of chemical tracers for diagnostic output count 0 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ntchmdiag
    number_of_cloud_condensate_typesnumber of cloud condensate types count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncnd
    number_of_cloud_types_CSnumber of cloud types in Chikira-Sugiyama scheme count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nctp
    number_of_coefficients_in_h2o_forcing_datanumber of coefficients in h2o forcing data index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%h2o_coeff
    number_of_coefficients_in_ozone_forcing_datanumber of coefficients in ozone forcing data index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oz_coeff
    number_of_coefficients_in_ozone_forcing_data_plus_fivenumber of coefficients in ozone forcing data plus five index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%oz_coeffp5
    number_of_convective_3d_cloud_fieldsnumber of convective 3d clouds fields count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncnvcld3d
    number_of_days_in_yearnumber of days in a year days 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%yearlen
    number_of_dust_bins_for_diagnosticsnumber of dust bins for diagnostics count 0 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ndust
    number_of_equatorial_longitude_pointsnumber of global points in x-dir (i) along the equator count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lonr
    number_of_fields_in_phyf2dtotal number of variables for phyf2d count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntot2d
    number_of_fields_in_phyf3dtotal number of variables for phyf3d count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntot3d
    number_of_frozen_precipitation_speciesnumber of frozen precipitation species count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%fprcp
    number_of_gases_for_multi_gases_physicsnumber of gases for multi gases physics count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ngas
    number_of_ghost_zonesnumber of ghost zones defined in fv_mp count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%ng
    number_of_hydrometeorschoice of cloud scheme / number of hydrometeors count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ncld
    number_of_independent_cellular_automatanumber of independent cellular automata count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nca
    number_of_iterations_to_spin_up_cellular_automatanumber of iterations to spin up the ca count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nspinup
    number_of_latitude_pointsnumber of global points in y-dir (j) along the meridian count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%latr
    number_of_lines_of_namelist_filename_for_internal_file_readslines in namelist file for internal file reads count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%input_nml_file_length
    number_of_lw_bands_rrtmgpnumber of lw bands used in RRTMGP (Model%rrtmgp_nBandsLW) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nBandsLW
    number_of_lw_spectral_points_rrtmgpnumber of spectral points in RRTMGP LW calculation (model%rrtmgp_nGptsLW) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nGptsLW
    number_of_plumesnumber of plumes per grid column count 1 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%nupdraft
    number_of_rrtmgp_ice_roughnessnumber of ice-roughness categories in RRTMGP calculation (Model%rrtmgp_nrghice) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nrghice
    number_of_seasalt_bins_for_diagnosticsnumber of seasalt bins for diagnostics count 0 integer MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%nseasalt
    number_of_snow_layersnumber of snow layers count 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snowxy
    number_of_species_for_aerosol_optical_depthnumber of species for output aerosol optical depth plus total count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nspc1
    number_of_spectral_wave_trancation_for_sasnumber of spectral wave trancation used only by sascnv and shalcnv count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%jcap
    number_of_statistical_measures_of_subgrid_orographynumber of topographic variables in GWD count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nmtvr
    number_of_surface_perturbationsnumber of surface perturbations count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nsfcpert
    number_of_sw_bands_rrtmgpnumber of sw bands used in RRTMGP (Model%rrtmgp_nBandsSW) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nBandsSW
    number_of_sw_spectral_points_rrtmgpnumber of spectral points in RRTMGP SW calculation (model%rrtmgp_nGptsSW) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_nGptsSW
    number_of_tiletile number none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%tile_num
    number_of_timesteps_between_longwave_radiation_callsnumber of timesteps between longwave radiation calls 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nslwr
    number_of_timesteps_between_shortwave_radiation_callsnumber of timesteps between shortwave radiation calls 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nsswr
    number_of_timesteps_between_surface_cycling_callsnumber of timesteps between surface cycling calls 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nscyc
    number_of_timesteps_for_radiation_calls_on_physics_timestepnumber of timesteps for radiation calls on physics timestep (coldstarts only) count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nhfrad
    number_of_total_tracerstotal number of tracers count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tracers_total
    number_of_tracersnumber of tracers count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntrac
    number_of_tracers_for_CSnumber of convectively transported tracers in Chikira-Sugiyama deep convection scheme count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ncstrac
    number_of_tracers_for_cloud_condensatenumber of tracers for cloud condensate count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nncl
    number_of_tracers_for_convective_transportnumber of tracers for convective transport count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nn
    number_of_tracers_for_samfnumber of tracers for scale-aware mass flux schemes count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nsamftrac
    number_of_tracers_plus_onenumber of tracers plus one count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ntracp1
    number_of_tracers_scavengednumber of tracers scavenged count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nscav
    number_of_vertical_diffusion_tracersnumber of tracers to diffuse vertically count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%nvdiff
    number_of_vertical_layers_for_radiation_calculationsnumber of vertical levels for radiation calculations count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levr
    number_of_vertical_layers_for_radiation_calculations_plus_onenumber of vertical levels for radiation calculations + 1 count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levrp1
    number_of_water_speciesnumber of water species count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%nwat
    number_of_water_tracersnumber of water-related tracers count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tracers_water
    ocean_mixed_layer_thicknessmixed layer thickness m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zm
    omegalayer mean vertical velocity Pa s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%vvl
    omp_threadsnumber of OpenMP threads available for physics schemes count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nthreads
    omp_threads_for_fast_physicsnumber of OpenMP threads available for fast physics schemes count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%nthreads
    orographyorography m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%oro
    orography_unfilteredunfiltered orography m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%oro_uf
    ozone_concentration_at_layer_for_radiationozone concentration layer kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%olyr
    ozone_concentration_updated_by_physicsozone concentration updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntoz)
    ozone_forcingozone forcing data various 3 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%ozpl
    ozone_mixing_ratioozone mixing ratio kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntoz)
    ozone_mixing_ratio_saveozone mixing ratio before entering a physics scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q(:,:,GFS_Control%ntoz)
    perturbation_of_heat_to_momentum_roughness_length_ratioperturbation of heat to momentum roughness length ratio frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zt1d
    perturbation_of_leaf_area_indexperturbation of leaf area index frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%xlai1d
    perturbation_of_momentum_roughness_lengthperturbation of momentum roughness length frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%z01d
    perturbation_of_soil_type_b_parameterperturbation of soil type "b" parameter frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%bexp1d
    perturbation_of_vegetation_fractionperturbation of vegetation fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%vegf1d
    physics_field_for_couplingphysics_field_for_coupling m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%condition
    piratio of a circle's circumference to its diameter none 0 real kind_phys MODULE GFS_typedefs con_pi
    potential_temperature_at_2m2 meter potential temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%th2m
    potential_temperature_at_viscous_sublayer_toppotential temperature at viscous sublayer top over water K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_thz0
    prandtl_numberturbulent Prandtl number none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%prnum
    pressure_at_bottom_of_convective_cloudconvective cloud bottom pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_cldprop_type GFS_Data(cdata%blk_no)%Cldprop%cvb
    pressure_at_top_of_convective_cloudconvective cloud top pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_cldprop_type GFS_Data(cdata%blk_no)%Cldprop%cvt
    pressure_cutoff_for_rayleigh_dampingpressure level from which Rayleigh Damping is applied Pa 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%prslrd0
    pressure_thickness_at_Lagrangian_surfacepressure thickness at Lagrangian surface Pa 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%delp
    proflw_typedefinition of type proflw_type DDT 0 proflw_type MODULE module_radlw_parameters proflw_type
    profsw_typedefinition of type profsw_type DDT 0 profsw_type MODULE module_radsw_parameters profsw_type
    q_prime_squaredwater vapor fluctuation squared kg2 kg-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%qsq
    radar_reflectivity_10cminstantaneous refl_10cm dBZ 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%refl_10cm
    rain_conversion_parameter_deep_convectionconvective rain conversion parameter for deep convection m-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%c0s_deep
    rain_conversion_parameter_shallow_convectionconvective rain conversion parameter for shallow convection m-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%c0s_shal
    rain_evaporation_coefficient_deep_convectionconvective rain evaporation coefficient for deep convection frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%evfact_deep
    rain_evaporation_coefficient_over_land_deep_convectionconvective rain evaporation coefficient over land for deep convection frac 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%evfactl_deep
    rain_number_concentrationnumber concentration of rain kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntrnc)
    rain_number_concentration_updated_by_physicsnumber concentration of rain updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntrnc)
    rain_water_mixing_ratioratio of mass of rain water to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntrw)
    rain_water_mixing_ratio_updated_by_physicsratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntrw)
    random_number_arrayrandom number array (0-1) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%rann
    ratio_of_dry_air_to_water_vapor_gas_constantsrd/rv none 0 real kind_phys MODULE GFS_typedefs con_eps
    ratio_of_dry_air_to_water_vapor_gas_constants_minus_one(rd/rv) - 1 none 0 real kind_phys MODULE GFS_typedefs con_epsm1
    ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layerExner function ratio bt midlayer and interface at 1st layer ratio 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%work3
    ratio_of_snowfall_to_rainfallsnow ratio: ratio of snow to total precipitation (explicit only) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sr
    ratio_of_vapor_to_dry_air_gas_constants_minus_one(rv/rd) - 1 (rv = ideal gas constant for water vapor) none 0 real kind_phys MODULE GFS_typedefs con_fvirt
    ratio_of_vapor_to_dry_air_gas_constants_minus_one_default_kindzvir=rv/rd-1.0 none 0 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%zvir
    ratio_of_wind_at_lowest_model_layer_and_wind_at_10mratio of sigma level 1 wind and 10m wind ratio 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%f10m
    reciprocal_of_obukhov_lengthone over obukhov length m-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rmol
    relative_humiditylayer relative humidity frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%relhum
    rime_factorrime factor frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%f_rimef
    rrtmgp_cloud_optics_flagFlag to control which RRTMGP cloud-optics scheme (Model%rrtmgp_cld_optics) flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%rrtmgp_cld_optics
    rrtmgp_coeff_lw_cloud_opticsfile containing coefficients for RRTMGP LW cloud optics (Model%lw_file_clouds) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lw_file_clouds
    rrtmgp_coeff_sw_cloud_opticsfile containing coefficients for RRTMGP SW cloud optics (Model%sw_file_clouds) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sw_file_clouds
    rrtmgp_kdistribution_lwfile containing RRTMGP LW k-distribution (Model%lw_file_gas) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lw_file_gas
    rrtmgp_kdistribution_swfile containing RRTMGP SW k-distribution (Model%sw_file_gas) none 0 character len=128 MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sw_file_gas
    scheme_flagWhen true GP is used for SW calculation and G is used for LW calculation flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_GPsw_Glw
    sea_area_fractionfraction of horizontal grid area occupied by ocean frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%oceanfrac
    sea_ice_concentrationice fraction over open water frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%fice
    sea_ice_minimumminimum sea ice value ??? 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%min_seaice
    sea_ice_temperaturesea ice surface skin temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tisfc
    sea_ice_temperature_interstitialsea ice surface skin temperature use as interstitial K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tice
    sea_ice_thicknesssea ice thickness m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%hice
    sea_land_ice_masksea/land/ice mask (=0/1/2) flag 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%islmsk
    sea_land_ice_mask_cicesea/land/ice mask cice (=0/1/2) flag 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%islmsk_cice
    sea_land_ice_mask_insea/land/ice mask input (=0/1/2) flag 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%slimskin_cpl
    sea_land_ice_mask_reallandmask: sea/land/ice=0/1/2 flag 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%slmsk
    sea_surface_reference_temperaturesea surface reference temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tref
    sea_surface_temperaturesea surface temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsfco
    sea_water_reference_densitysea water reference density kg m-3 0 real kind_phys MODULE GFS_typedefs con_rhw0
    sea_water_salinitysalinity content in diurnal thermocline layer ppt m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xs
    secant_of_diffusivity_angle_each_RRTMGP_LW_bandsecant of diffusivity angle in each RRTMGP LW band none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sec_diff_byband
    seconds_elapsed_since_model_initializationseconds elapsed since model initialization s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sec
    seed_for_random_number_generation_in_cellular_automata_schemeseed for random number generation in ca scheme none 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%iseed_ca
    seed_random_numbers_lwrandom seeds for sub-column cloud generators lw none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%icsdlw
    seed_random_numbers_lw_for_RRTMGPseed for random number generation for longwave radiation none 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%icseed_lw
    seed_random_numbers_swrandom seeds for sub-column cloud generators sw none 1 integer MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%icsdsw
    seed_random_numbers_sw_for_RRTMGPseed for random number generation for shortwave radiation none 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%icseed_sw
    sensible_heat_flux_due_to_rainfallsensible heat flux due to rainfall W 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%qrain
    sensitivity_of_dtl_heat_content_to_surface_temperatured(xt)/d(ts) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xtts
    sensitivity_of_dtl_thickness_to_surface_temperatured(xz)/d(ts) m K-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xzts
    sfcflw_typedefinition of type sfcflw_type DDT 0 sfcflw_type MODULE module_radlw_parameters sfcflw_type
    sfcfsw_typedefinition of type sfcfsw_type DDT 0 sfcfsw_type MODULE module_radsw_parameters sfcfsw_type
    shoc_flag_for_optional_surface_TKE_dissipationflag for alt. TKE diss. near surface in SHOC (>0 = ON) none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(5)
    shoc_implicit_TKE_integration_uncentering_termuncentering term for TKE integration in SHOC none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(4)
    shoc_tke_dissipatation_pressure_thresholdpressure below which extra TKE diss. is applied in SHOC Pa 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(1)
    shoc_tke_dissipation_tunable_parametermult. tuning parameter for TKE diss. in SHOC none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(2)
    shoc_tke_dissipation_tunable_parameter_near_surfacemult. tuning parameter for TKE diss. at surface in SHOC none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%shoc_parm(3)
    shortwave_optical_properties_for_aerosolsFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_optical_props_aerosol
    shortwave_optical_properties_for_clear_skyFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_optical_props_clrsky
    shortwave_optical_properties_for_cloudy_atmosphereFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_optical_props_clouds
    shortwave_optical_properties_for_cloudy_atmosphere_by_bandFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sw_optical_props_cloudsByBand
    sine_of_latitudesine of latitude none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_grid_type GFS_Data(cdata%blk_no)%Grid%sinlat
    sine_of_solar_declination_anglesin of the solar declination angle none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%sdec
    slope_of_subgrid_orographyslope of subgrid orography none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sigma
    slow_soil_pool_mass_content_of_carbonstable carbon in deep soil g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%stblcpxy
    smallest_cloud_base_vertical_index_encountered_thus_farsmallest cloud base vertical index encountered thus far index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%acvb
    snow_albedo_at_previous_time_stepsnow albedo at previous time step frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%alboldxy
    snow_deposition_sublimation_upward_latent_heat_fluxlatent heat flux from snow depo/subl W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sbsno
    snow_freezing_rain_upward_latent_heat_fluxlatent heat flux due to snow and frz rain W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snohf
    snow_layer_icesnow layer ice mm 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snicexy
    snow_layer_liquid_watersnow layer liquid water mm 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snliqxy
    snow_mass_at_previous_time_stepsnow mass at previous time step mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%sneqvoxy
    snow_number_concentrationnumber concentration of snow kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntsnc)
    snow_number_concentration_updated_by_physicsnumber concentration of snow updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntsnc)
    snow_precipitation_rate_at_surfacesnow precipitation rate at surface mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%qsnowxy
    snow_precipitation_rate_from_previous_timestepsnow precipitation rate from previous timestep mm s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%dsnowprv
    snow_temperaturesnow_temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsnoxy
    snow_temperature_bottom_first_layersnow temperature at the bottom of the first snow layer K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsnow
    snow_vertical_dimension_for_land_surface_modelmaximum number of snow layers for land surface model count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsnow_lsm
    snow_water_mixing_ratioratio of mass of snow water to mass of dry air plus vapor (without condensates) kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntsw)
    snow_water_mixing_ratio_updated_by_physicsratio of mass of snow water to mass of dry air plus vapor (without condensates) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntsw)
    soil_moisture_contentsoil moisture kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%soilm
    soil_temperaturesoil temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%stc
    soil_temperature_for_land_surface_modelsoil temperature for land surface model K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tslb
    soil_type_classificationsoil type at each grid cell index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%soiltype
    soil_type_classification_realsoil type for lsm index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%stype
    soil_type_dataset_choicesoil type dataset choice index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%isot
    soil_upward_latent_heat_fluxsoil upward latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%evbs
    soil_vertical_dimensionnumber of soil layers count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsoil
    soil_vertical_dimension_for_land_surface_modelnumber of soil layers internal to land surface model count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%lsoil_lsm
    soil_water_content_between_soil_bottom_and_water_tablesoil water content between the bottom of the soil and the water table m3 m-3 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%smcwtdxy
    solar_constantsolar constant (sun-earth distant adjusted) W m-2 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%solcon
    specific_heat_capacities_for_multi_gases_physicsspecific heat capacities for multi gases physics J kg-1 K-1 1 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%cpilist
    specific_heat_of_dry_air_at_constant_pressurespecific heat of dry air at constant pressure J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_cp
    specific_heat_of_ice_at_constant_pressurespecific heat of ice at constant pressure J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_csol
    specific_heat_of_liquid_water_at_constant_pressurespecific heat of liquid water at constant pressure J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_cliq
    specific_heat_of_water_vapor_at_constant_pressurespecific heat of water vapor at constant pressure J kg-1 K-1 0 real kind_phys MODULE GFS_typedefs con_cvap
    specific_humidity_at_2m2 meter specific humidity kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%q2m
    specific_humidity_at_2m_from_noahmp2 meter specific humidity from noahmp kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%q2mp
    specific_humidity_at_viscous_sublayer_topspecific humidity at_viscous sublayer top over water kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_qz0
    stability_function_for_heatstability function for heat none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%Sh3D
    standard_atmospheric_pressurestandard atmospheric pressure Pa 0 real kind_phys MODULE GFS_typedefs con_p0
    standard_deviation_of_subgrid_orographystandard deviation of subgrid orography m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%hprime(:,1)
    standard_deviation_of_subgrid_orography_small_scalestandard deviation of subgrid orography small scale m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%varss
    start_index_of_other_tracersbeginning index of the non-water tracer species index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tracers_start_index
    starting_x_direction_indexstarting X direction index count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%is
    starting_x_direction_index_domainstarting X direction index for domain count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%isd
    starting_y_direction_indexstarting Y direction index count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%js
    starting_y_direction_index_domainstarting X direction index for domain count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%jsd
    statistical_measures_of_subgrid_orographyorographic metrics various 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%hprime
    stefan_boltzmann_constantStefan-Boltzmann constant W m-2 K-4 0 real kind_phys MODULE GFS_typedefs con_sbc
    stem_area_indexstem area index none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%xsaixy
    stem_massstem mass g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%stmassxy
    sub_layer_cooling_amountsub-layer cooling amount K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%dt_cool
    sub_layer_cooling_thicknesssub-layer cooling thickness m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%z_c
    subgrid_cloud_fraction_pblsubgrid cloud fraction from PBL scheme frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%CLDFRA_BL
    subgrid_cloud_ice_mixing_ratio_pblsubgrid cloud ice mixing ratio from PBL scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%QI_BL
    subgrid_cloud_water_mixing_ratio_pblsubgrid cloud water mixing ratio from PBL scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%QC_BL
    subgrid_scale_cloud_fraction_from_shocsubgrid-scale cloud fraction from the SHOC scheme frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,GFS_Control%nscfshoc)
    subsurface_runoff_fluxsubsurface runoff flux kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%drain
    surface_air_pressuresurface pressure Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%pgr
    surface_air_pressure_at_previous_time_stepsurface air pressure at previous time step Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f2d(:,2)
    surface_air_pressure_diagsurface air pressure diagnostic Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%psurf
    surface_air_pressure_two_time_steps_backsurface air pressure two time steps back Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f2d(:,1)
    surface_air_temperature_for_radiationlowest model layer air temperature for radiation K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfa
    surface_albedo_due_to_UV_and_VIS_diffusedsurface albedo due to UV+VIS diffused beam frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfcalb(:,4)
    surface_albedo_due_to_UV_and_VIS_directsurface albedo due to UV+VIS direct beam frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfcalb(:,3)
    surface_albedo_due_to_near_IR_diffusedsurface albedo due to near IR diffused beam frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfcalb(:,2)
    surface_albedo_due_to_near_IR_directsurface albedo due to near IR direct beam frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfcalb(:,1)
    surface_albedo_nearIR_diffusenear-IR (diffuse) surface albedo (sfc_alb_nir_dif) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_alb_nir_dif
    surface_albedo_nearIR_directnear-IR (direct) surface albedo (sfc_alb_nir_dir) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_alb_nir_dir
    surface_albedo_perturbationsurface albedo perturbation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%alb1d
    surface_albedo_uvvis_difUVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_alb_uvvis_dif
    surface_albedo_uvvis_dirUVVIS (direct) surface albedo (sfc_alb_uvvis_dir) none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_alb_uvvis_dir
    surface_condensation_masssurface condensation mass kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%cndm_surf
    surface_diffused_shortwave_albedomean surface diffused sw albedo frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%sfalb
    surface_downwelling_diffuse_near_infrared_shortwave_fluxsurface downwelling diffuse near-infrared shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjnirdfd
    surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_stepsfc nir diff sw downward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nirdfdi
    surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_fluxsurface downwelling diffuse ultraviolet plus visible shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjvisdfd
    surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_stepsfc uv+vis diff sw downward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%visdfdi
    surface_downwelling_direct_near_infrared_shortwave_fluxsurface downwelling beam near-infrared shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjnirbmd
    surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_stepsfc nir beam sw downward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nirbmdi
    surface_downwelling_direct_ultraviolet_and_visible_shortwave_fluxsurface downwelling beam ultraviolet plus visible shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjvisbmd
    surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_stepsfc uv+vis beam sw downward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%visbmdi
    surface_downwelling_longwave_fluxsurface downwelling longwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dlwsfci
    surface_downwelling_longwave_flux_absorbed_by_groundtotal sky surface downward longwave flux absorbed by the ground W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gabsbdlw
    surface_downwelling_longwave_flux_absorbed_by_ground_over_icetotal sky surface downward longwave flux absorbed by the ground over ice W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gabsbdlw_ice
    surface_downwelling_longwave_flux_absorbed_by_ground_over_landtotal sky surface downward longwave flux absorbed by the ground over land W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gabsbdlw_land
    surface_downwelling_longwave_flux_absorbed_by_ground_over_oceantotal sky surface downward longwave flux absorbed by the ground over ocean W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gabsbdlw_ocean
    surface_downwelling_longwave_flux_on_radiation_time_steptotal sky sfc downward lw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sfcdlw
    surface_downwelling_shortwave_fluxsurface downwelling shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dswsfci
    surface_downwelling_shortwave_flux_on_radiation_time_steptotal sky sfc downward sw flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sfcdsw
    surface_drag_coefficient_for_heat_and_moisture_for_noahmpsurface exchange coeff heat & moisture for noahmp none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%chxy
    surface_drag_coefficient_for_heat_and_moisture_in_airsurface exchange coeff heat & moisture none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cdq
    surface_drag_coefficient_for_heat_and_moisture_in_air_over_icesurface exchange coeff heat & moisture over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cdq_ice
    surface_drag_coefficient_for_heat_and_moisture_in_air_over_landsurface exchange coeff heat & moisture over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cdq_land
    surface_drag_coefficient_for_heat_and_moisture_in_air_over_oceansurface exchange coeff heat & moisture over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cdq_ocean
    surface_drag_coefficient_for_momentum_for_noahmpsurface drag coefficient for momentum for noahmp none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%cmxy
    surface_drag_coefficient_for_momentum_in_airsurface exchange coeff for momentum none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cd
    surface_drag_coefficient_for_momentum_in_air_over_icesurface exchange coeff for momentum over ice none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cd_ice
    surface_drag_coefficient_for_momentum_in_air_over_landsurface exchange coeff for momentum over land none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cd_land
    surface_drag_coefficient_for_momentum_in_air_over_oceansurface exchange coeff for momentum over ocean none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cd_ocean
    surface_drag_mass_flux_for_heat_and_moisture_in_airthermal exchange coefficient kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%chh
    surface_drag_mass_flux_for_heat_and_moisture_in_air_over_icethermal exchange coefficient over ice kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%chh_ice
    surface_drag_mass_flux_for_heat_and_moisture_in_air_over_landthermal exchange coefficient over land kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%chh_land
    surface_drag_mass_flux_for_heat_and_moisture_in_air_over_oceanthermal exchange coefficient over ocean kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%chh_ocean
    surface_drag_wind_speed_for_momentum_in_airmomentum exchange coefficient m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%cmm
    surface_drag_wind_speed_for_momentum_in_air_over_icemomentum exchange coefficient over ice m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cmm_ice
    surface_drag_wind_speed_for_momentum_in_air_over_landmomentum exchange coefficient over land m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cmm_land
    surface_drag_wind_speed_for_momentum_in_air_over_oceanmomentum exchange coefficient over ocean m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cmm_ocean
    surface_emissivity_in_each_RRTMGP_LW_bandsurface emissivity in each RRTMGP LW band none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%sfc_emiss_byband
    surface_exchange_coefficient_for_heatsurface exchange coefficient for heat W m-2 K-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%flhc
    surface_exchange_coefficient_for_heat_at_2mexchange coefficient for heat at 2 meters m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%chs2
    surface_exchange_coefficient_for_moisturesurface exchange coefficient for moisture kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%flqc
    surface_exchange_coefficient_for_moisture_at_2mexchange coefficient for moisture at 2 meters m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%cqs2
    surface_friction_velocityboundary layer parameter m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%uustar
    surface_friction_velocity_dragfriction velocity isolated for momentum only m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%ustm
    surface_friction_velocity_over_icesurface friction velocity over ice m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%uustar_ice
    surface_friction_velocity_over_landsurface friction velocity over land m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%uustar_land
    surface_friction_velocity_over_oceansurface friction velocity over ocean m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%uustar_ocean
    surface_geopotential_at_Lagrangian_surfacesurface geopotential at Lagrangian surface m2 s-2 2 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%phis
    surface_ground_temperature_for_radiationsurface ground temperature for radiation K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfg
    surface_latent_heatlatent heating at the surface (pos = up) W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%lh
    surface_layer_evaporation_switchsurface layer evaporation switch none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_chkqlm
    surface_longwave_emissivitysurface lw emissivity in fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%semis
    surface_longwave_emissivity_over_ice_interstitialsurface lw emissivity in fraction over ice (temporary use as interstitial) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%semis_ice
    surface_longwave_emissivity_over_land_interstitialsurface lw emissivity in fraction over land (temporary use as interstitial) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%semis_land
    surface_longwave_emissivity_over_ocean_interstitialsurface lw emissivity in fraction over ocean (temporary use as interstitial) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%semis_ocean
    surface_midlayer_air_temperature_in_longwave_radiationsurface air temp during lw calculation K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%tsflw
    surface_net_downwelling_shortwave_fluxsurface net downwelling shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%nswsfci
    surface_net_downwelling_shortwave_flux_on_radiation_time_steptotal sky sfc netsw flx into ground W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sfcnsw
    surface_roughness_fraction_factorsurface roughness fraction for canopy heat storage parameterization none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%z0fac
    surface_roughness_lengthsurface roughness length cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zorl
    surface_roughness_length_over_ice_interstitialsurface roughness length over ice (temporary use as interstitial) cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zorl_ice
    surface_roughness_length_over_landsurface roughness length over land cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zorll
    surface_roughness_length_over_land_interstitialsurface roughness length over land (temporary use as interstitial) cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zorl_land
    surface_roughness_length_over_oceansurface roughness length over ocean cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zorlo
    surface_roughness_length_over_ocean_interstitialsurface roughness length over ocean (temporary use as interstitial) cm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%zorl_ocean
    surface_runoffsurface water runoff (from lsm) kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%srunoff
    surface_runoff_fluxsurface runoff flux kg m-2 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%runoff
    surface_skin_temperaturesurface skin temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsfc
    surface_skin_temperature_after_iterationsurface skin temperature after iteration K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsurf
    surface_skin_temperature_after_iteration_over_icesurface skin temperature after iteration over ice K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsurf_ice
    surface_skin_temperature_after_iteration_over_landsurface skin temperature after iteration over land K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsurf_land
    surface_skin_temperature_after_iteration_over_oceansurface skin temperature after iteration over ocean K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsurf_ocean
    surface_skin_temperature_for_nsstocean surface skin temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tseal
    surface_skin_temperature_over_ice_interstitialsurface skin temperature over ice (temporary use as interstitial) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfc_ice
    surface_skin_temperature_over_landsurface skin temperature over land K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tsfcl
    surface_skin_temperature_over_land_interstitialsurface skin temperature over land (temporary use as interstitial) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfc_land
    surface_skin_temperature_over_ocean_interstitialsurface skin temperature over ocean (temporary use as interstitial) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tsfc_ocean
    surface_slope_classificationsurface slope type at each grid cell index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%slopetype
    surface_slope_classification_realsfc slope type for lsm index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%slope
    surface_snow_area_fractionsurface snow area fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowc
    surface_snow_area_fraction_over_landsurface snow area fraction frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%sncovr
    surface_snow_meltsnow melt during timestep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowmt
    surface_snow_thickness_water_equivalentwater equivalent snow depth mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snowd
    surface_snow_thickness_water_equivalent_over_icewater equivalent snow depth over ice mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowd_ice
    surface_snow_thickness_water_equivalent_over_landwater equivalent snow depth over land mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowd_land
    surface_snow_thickness_water_equivalent_over_oceanwater equivalent snow depth over ocean mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%snowd_ocean
    surface_specific_humiditysurface air saturation specific humidity kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%qss
    surface_specific_humidity_for_MYJ_schemessurface air saturation specific humidity for MYJ schemes kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_qsfc
    surface_specific_humidity_over_icesurface air saturation specific humidity over ice kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qss_ice
    surface_specific_humidity_over_landsurface air saturation specific humidity over land kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qss_land
    surface_specific_humidity_over_oceansurface air saturation specific humidity over ocean kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qss_ocean
    surface_stability_parametermonin obukhov surface stability parameter none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zol
    surface_upward_latent_heat_flux_for_couplingsfc latent heat flux input for coupling W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dqsfcin_cpl
    surface_upward_latent_heat_flux_reduction_factorsurface upward latent heat flux reduction factor from canopy heat storage none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hefac
    surface_upward_potential_latent_heat_fluxsurface upward potential latent heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ep1d
    surface_upward_potential_latent_heat_flux_over_icesurface upward potential latent heat flux over ice W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ep1d_ice
    surface_upward_potential_latent_heat_flux_over_landsurface upward potential latent heat flux over land W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ep1d_land
    surface_upward_potential_latent_heat_flux_over_oceansurface upward potential latent heat flux over ocean W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ep1d_ocean
    surface_upward_sensible_heat_flux_for_couplingsfc sensible heat flux input W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dtsfcin_cpl
    surface_upward_sensible_heat_flux_reduction_factorsurface upward sensible heat flux reduction factor from canopy heat storage none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%hffac
    surface_upwelling_diffuse_near_infrared_shortwave_fluxsurface upwelling diffuse near-infrared shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjnirdfu
    surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_stepsfc nir diff sw upward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nirdfui
    surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_fluxsurface upwelling diffuse ultraviolet plus visible shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjvisdfu
    surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_stepsfc uv+vis diff sw upward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%visdfui
    surface_upwelling_direct_near_infrared_shortwave_fluxsurface upwelling beam near-infrared shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjnirbmu
    surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_stepsfc nir beam sw upward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nirbmui
    surface_upwelling_direct_ultraviolet_and_visible_shortwave_fluxsurface upwelling beam ultraviolet plus visible shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjvisbmu
    surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_stepsfc uv+vis beam sw upward flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%visbmui
    surface_upwelling_longwave_fluxsurface upwelling longwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%ulwsfci
    surface_upwelling_longwave_flux_for_couplingsurface upwelling LW flux for coupling W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%ulwsfcin_cpl
    surface_upwelling_longwave_flux_over_ice_interstitialsurface upwelling longwave flux at current time over ice (temporary use as interstitial) W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjsfculw_ice
    surface_upwelling_longwave_flux_over_land_interstitialsurface upwelling longwave flux at current time over land (temporary use as interstitial) W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjsfculw_land
    surface_upwelling_longwave_flux_over_ocean_interstitialsurface upwelling longwave flux at current time over ocean (temporary use as interstitial) W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%adjsfculw_ocean
    surface_upwelling_shortwave_fluxsurface upwelling shortwave flux at current time W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%uswsfci
    surface_wind_enhancement_due_to_convectionsurface wind enhancement due to convection m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f2d(:,GFS_Control%num_p2d)
    surface_wind_stresssurface wind stress m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%stress
    surface_wind_stress_over_icesurface wind stress over ice m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%stress_ice
    surface_wind_stress_over_landsurface wind stress over land m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%stress_land
    surface_wind_stress_over_oceansurface wind stress over ocean m2 s-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%stress_ocean
    surface_x_momentum_flux_for_couplingsfc x momentum flux for coupling Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dusfcin_cpl
    surface_y_momentum_flux_for_couplingsfc y momentum flux for coupling Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%dvsfcin_cpl
    sw_fluxes_sfcsw radiation fluxes at sfc W m-2 1 sfcfsw_type MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%sfcfsw
    sw_fluxes_top_atmospheresw radiation fluxes at toa W m-2 1 topfsw_type MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%topfsw
    t_prime_q_primecovariance of temperature and moisture K kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%cov
    t_prime_squaredtemperature fluctuation squared K2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%tsq
    temperature_at_2m2 meter temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%t2m
    temperature_at_2m_from_noahmp2 meter temperature from noahmp K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%t2mmp
    temperature_at_zero_celsiustemperature at 0 degree Celsius K 0 real kind_phys MODULE GFS_typedefs con_t0c
    temperature_from_previous_timesteptemperature from previous time step K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%prevst
    temperature_tendency_due_to_dynamicstemperature tendency due to dynamics only K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%forcet
    tendency_of_air_temperature_at_Lagrangian_surfaceair temperature tendency due to fast physics at Lagrangian surface K s-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%dtdt
    tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_stepclear sky lw heating rates K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%lwhc
    tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levelsclear sky heating rate due to longwave radiation K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%htlw0
    tendency_of_air_temperature_due_to_longwave_heating_for_ideaidea sky lw heating rates K s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%lwhd
    tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_steptotal sky lw heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%htrlw
    tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levelstotal sky heating rate due to longwave radiation K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%htlwc
    tendency_of_air_temperature_due_to_model_physicsair temperature tendency due to model physics K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dtdt
    tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_skyclear sky radiative (shortwave + longwave) heating rate at current time K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dtdtc
    tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_steptemp. change due to radiative heating per time step K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%dtdtr
    tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_stepclear sky sw heating rates K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%swhc
    tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levelsclear sky heating rates due to shortwave radiation K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%htsw0
    tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_steptotal sky sw heating rate K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_radtend_type GFS_Data(cdata%blk_no)%Radtend%htrsw
    tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levelstotal sky heating rate due to shortwave radiation K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%htswc
    tendency_of_air_temperature_due_to_ugwpair temperature tendency due to UGWP K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gw_dtdt
    tendency_of_cloud_droplet_number_concentration_due_to_model_physicsnumber concentration of cloud droplets (liquid) tendency due to model physics kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntlnc)
    tendency_of_cloud_water_due_to_convective_microphysicstendency of cloud water due to convective microphysics kg m-2 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cnv_dqldt
    tendency_of_graupel_mixing_ratio_due_to_model_physicsratio of mass of graupel tendency to mass of dry air plus vapor (without condensates) due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntgl)
    tendency_of_ice_cloud_water_mixing_ratio_due_to_model_physicscloud condensed water mixing ratio tendency due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntiw)
    tendency_of_ice_friendly_aerosol_number_concentration_due_to_model_physicsnumber concentration of ice-friendly aerosols tendency due to model physics kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntia)
    tendency_of_ice_friendly_aerosols_at_surfaceinstantaneous ice-friendly sfc aerosol source kg-1 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nifa2d
    tendency_of_ice_number_concentration_due_to_model_physicsnumber concentration of ice tendency due to model physics kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntinc)
    tendency_of_liquid_cloud_water_mixing_ratio_due_to_model_physicscloud condensed water mixing ratio tendency due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntcw)
    tendency_of_lwe_thickness_of_precipitation_amount_for_couplingchange in rain_cpl (coupling_type) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%drain_cpl
    tendency_of_lwe_thickness_of_snow_amount_for_couplingchange in show_cpl (coupling_type) m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%dsnow_cpl
    tendency_of_ozone_mixing_ratio_due_to_model_physicsozone mixing ratio tendency due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntoz)
    tendency_of_rain_water_mixing_ratio_due_to_microphysicstendency of rain water mixing ratio due to microphysics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%rainp
    tendency_of_rain_water_mixing_ratio_due_to_model_physicsratio of mass of rain water tendency to mass of dry air plus vapor (without condensates) due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntrw)
    tendency_of_snow_water_mixing_ratio_due_to_model_physicsratio of mass of snow water tendency to mass of dry air plus vapor (without condensates) due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntsw)
    tendency_of_tracers_due_to_model_physicsupdated tendency of the tracers due to model physics kg kg-1 s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt
    tendency_of_turbulent_kinetic_energy_due_to_model_physicsturbulent kinetic energy tendency due to model physics J s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntke)
    tendency_of_vertically_diffused_tracer_concentrationupdated tendency of the tracers due to vertical diffusion in PBL scheme kg kg-1 s-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dvdftra
    tendency_of_water_friendly_aerosol_number_concentration_due_to_model_physicsnumber concentration of water-friendly aerosols tendency due to model physics kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntwa)
    tendency_of_water_friendly_aerosols_at_surfaceinstantaneous water-friendly sfc aerosol source kg-1 s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%nwfa2d
    tendency_of_water_vapor_specific_humidity_due_to_model_physicswater vapor specific humidity tendency due to model physics kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dqdt(:,:,GFS_Control%ntqv)
    tendency_of_x_wind_due_to_convective_gravity_wave_dragzonal wind tendency due to convective gravity wave drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gwdcu
    tendency_of_x_wind_due_to_model_physicszonal wind tendency due to model physics m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dudt
    tendency_of_x_wind_due_to_ugwpzonal wind tendency due to UGWP m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gw_dudt
    tendency_of_y_wind_due_to_convective_gravity_wave_dragmeridional wind tendency due to convective gravity wave drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gwdcv
    tendency_of_y_wind_due_to_model_physicsmeridional wind tendency due to model physics m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%dvdt
    tendency_of_y_wind_due_to_ugwpmeridional wind tendency due to UGWP m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gw_dvdt
    theta_detrainment_tendencyupdraft theta detrainment tendency K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%det_thl
    theta_startemperature flux divided by ustar (temperature scale) K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%mol
    theta_subsidence_tendencyupdraft theta subsidence tendency K s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sub_thl
    thickness_at_Lagrangian_surfacethickness at Lagrangian_surface m 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%delz
    threshold_for_perturbed_vertical_velocitythreshold used for perturbed vertical velocity m s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nthresh
    threshold_volume_fraction_of_condensed_water_in_soilsoil moisture threshold (volumetric) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%smcref2
    time_integral_of_change_in_x_wind_due_to_mountain_blocking_dragtime integral of change in x wind due to mountain blocking drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt_mtb
    time_integral_of_change_in_x_wind_due_to_nonstationary_gravity_wavetime integral of change in x wind due to NGW m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt_ngw
    time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_dragtime integral of change in x wind due to orographic gw drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt_ogw
    time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_dragtime integral of change in x wind due to TOFD m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%du3dt_tms
    time_integral_of_change_in_y_wind_due_to_nonstationary_gravity_wavetime integral of change in y wind due to NGW m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dv3dt_ngw
    time_integral_of_height_of_launch_level_of_orographic_gravity_wavetime integral of height of launch level of orographic gravity wave m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zogw
    time_integral_of_height_of_low_level_wave_breakingtime integral of height of drag due to low level wave breaking m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zlwb
    time_integral_of_height_of_mountain_blockingtime integral of height of mountain blocking drag m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%zmtb
    time_integral_of_momentum_flux_due_to_mountain_blocking_dragtime integral of momentum flux due to mountain blocking drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tau_mtb
    time_integral_of_momentum_flux_due_to_nonstationary_gravity_wavetime integral of momentum flux due to nonstationary gravity waves Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tau_ngw
    time_integral_of_momentum_flux_due_to_orographic_gravity_wave_dragtime integral of momentum flux due to orographic gravity wave drag Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tau_ogw
    time_integral_of_momentum_flux_due_to_turbulent_orographic_form_dragtime integral of momentum flux due to TOFD Pa 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%tau_tofd
    time_integral_of_x_stress_due_to_gravity_wave_dragvertically integrated u change by OGWD Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dugwd
    time_integral_of_y_stress_due_to_gravity_wave_dragvertically integrated v change by OGWD Pa s 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dvgwd
    time_interval_for_maximum_hourly_fieldsreset time interval for maximum hourly fields s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%avg_max_length
    time_scale_for_rayleigh_dampingtime scale for Rayleigh damping in days d 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ral_ts
    time_since_diagnostics_zeroedtime since diagnostics variables have been zeroed h 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%zhour
    time_step_for_dynamicsdynamics timestep s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dtf
    time_step_for_physicsphysics timestep s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dtp
    time_step_for_radiationradiation time step s 0 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%raddt
    time_step_for_remapping_for_fast_physicsremapping time step s 0 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%mdt
    tke_advectflag for activating TKE advection flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_tkeadvect
    tke_at_mass_points2 x tke at mass points m2 s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%qke
    tke_budgetflag for activating TKE budget flag 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_mynn_tkebudget
    tke_dissipative_heating_factortke dissipative heating factor none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%dspfac
    toa_incident_lw_flux_by_spectral_pointTOA longwave incident flux at each spectral points W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%toa_src_lw
    toa_incident_sw_flux_by_spectral_pointTOA shortwave incident flux at each spectral points W m-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%toa_src_sw
    top_layer_index_for_fast_physicstop_layer_inder_for_gfdl_mp index 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%kmp
    topflw_typedefinition of type topflw_type DDT 0 topflw_type MODULE module_radlw_parameters topflw_type
    topfsw_typedefinition of type topfsw_type DDT 0 topfsw_type MODULE module_radsw_parameters topfsw_type
    total_accumulated_snowfallrun-total snow accumulation on the ground kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snowfallac
    total_cloud_condensate_mixing_ratio_updated_by_physicstotal cloud condensate mixing ratio (except water vapor) updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%cwm
    total_cloud_fractionlayer total cloud fraction frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clouds(:,:,1)
    total_runofftotal water runoff kg m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%runoff
    tracer_concentrationmodel layer mean tracer concentration kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs
    tracer_concentration_savetracer concentration before entering a physics scheme kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q
    tracer_concentration_updated_by_physicstracer concentration updated by physics kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0
    transpiration_fluxtotal plant transpiration rate W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%trans
    triple_point_temperature_of_watertriple point temperature of water K 0 real kind_phys MODULE GFS_typedefs con_ttp
    turb_oro_form_drag_flagflag for turbulent orographic form drag flag 0 logical MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%do_tofd
    turbulent_kinetic_energyturbulent kinetic energy J 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntke)
    turbulent_kinetic_energy_convective_transport_tracerturbulent kinetic energy in the convectively transported tracer array m2 s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%clw(:,:,GFS_Interstitial(cdata%thrd_no)%ntk)
    ty_cloud_opticsdefinition of type ty_cloud_optics DDT 0 ty_cloud_optics MODULE mo_cloud_optics ty_cloud_optics
    ty_gas_concsdefinition of type ty_gas_concs DDT 0 ty_gas_concs MODULE mo_gas_concentrations ty_gas_concs
    ty_gas_optics_rrtmgpdefinition of type ty_gas_optics_rrtmgp DDT 0 ty_gas_optics_rrtmgp MODULE mo_gas_optics_rrtmgp ty_gas_optics_rrtmgp
    ty_optical_props_1sclFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_1scl MODULE mo_optical_props ty_optical_props_1scl
    ty_optical_props_2strFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_2str MODULE mo_optical_props ty_optical_props_2str
    ty_optical_props_nstrFortran DDT containing RRTMGP optical properties DDT 0 ty_optical_props_nstr MODULE mo_optical_props ty_optical_props_nstr
    ty_source_func_lwFortran DDT containing RRTMGP source functions DDT 0 ty_source_func_lw MODULE mo_source_functions ty_source_func_lw
    u_wind_component_at_viscous_sublayer_topu wind component at viscous sublayer top over water m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_uz0
    updraft_fraction_in_boundary_layer_mass_flux_schemeupdraft fraction in boundary layer mass flux scheme none 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%bl_upfr
    updraft_velocity_tunable_parameter_1_CStunable parameter 1 for Chikira-Sugiyama convection m s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(1)
    updraft_velocity_tunable_parameter_2_CStunable parameter 2 for Chikira-Sugiyama convection m s-1 0 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%cs_parm(2)
    upper_bound_on_max_albedo_over_deep_snowmaximum snow albedo frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%snoalb
    upward_heat_flux_in_soilsoil heat flux W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gflx
    upward_heat_flux_in_soil_over_icesoil heat flux over ice W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gflx_ice
    upward_heat_flux_in_soil_over_landsoil heat flux over land W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gflx_land
    upward_heat_flux_in_soil_over_oceansoil heat flux over ocean W m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gflx_ocean
    v_wind_component_at_viscous_sublayer_topv wind component at viscous sublayer top over water m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_vz0
    vegetation_area_fractionareal fractional cover of green vegetation frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%vfrac
    vegetation_temperaturevegetation temperature K 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%tvxy
    vegetation_type_classificationvegetation type at each grid cell index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%vegtype
    vegetation_type_classification_realvegetation type for lsm index 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%vtype
    vegetation_type_dataset_choiceland use dataset choice index 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%ivegsrc
    vertical_dimensionnumber of vertical levels count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levs
    vertical_dimension_for_cappa_at_Lagrangian_surfacevertical dimension for cappa at Lagrangian surface count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npzcappa
    vertical_dimension_for_condensed_water_at_Lagrangian_surfacevertical dimension for condensed water at Lagrangian surface count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npzq_con
    vertical_dimension_for_fast_physicsnumber of vertical levels for fast physics count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npz
    vertical_dimension_for_fast_physics_plus_onenumber of vertical levels for fast physics plus one count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npzp1
    vertical_dimension_for_thickness_at_Lagrangian_surfacevertical dimension for thickness at Lagrangian surface count 0 integer MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%npzdelz
    vertical_dimension_minus_onenumber of vertical levels minus one count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levsm1
    vertical_dimension_of_h2o_forcing_datanumber of vertical layers in h2o forcing data count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%levh2o
    vertical_dimension_of_ozone_forcing_datanumber of vertical layers in ozone forcing data count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%levozp
    vertical_dimension_plus_onenumber of vertical levels plus one count 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%levsp1
    vertical_index_at_cloud_basevertical index at cloud base index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kbot
    vertical_index_at_cloud_topvertical index at cloud top index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%ktop
    vertical_index_at_top_of_atmosphere_boundary_layervertical index at top atmospheric boundary layer index 1 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kpbl
    vertical_index_difference_between_inout_and_localvertical index difference between in/out and local index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kd
    vertical_index_difference_between_layer_and_lower_boundvertical index difference between layer and lower bound index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kb
    vertical_index_difference_between_layer_and_upper_boundvertical index difference between layer and upper bound index 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%kt
    vertical_interface_dimensionvertical interface dimension count 0 integer MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%levi
    vertical_sigma_coordinate_for_radiation_initializationvertical sigma coordinate for radiation initialization none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%si
    vertical_temperature_average_range_lower_boundzsea1 in mm mm 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nstf_name(4)
    vertical_temperature_average_range_upper_boundzsea2 in mm mm 0 integer MODULE GFS_typedefs TYPE GFS_control_type GFS_Control%nstf_name(5)
    vertical_velocity_for_updraftvertical velocity for updraft m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%w_upi
    vertical_weight_for_cavertical weight for ca frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%vfact_ca
    vertically_diffused_tracer_concentrationtracer concentration diffused by PBL scheme kg kg-1 3 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%vdftra
    virtual_temperaturelayer virtual temperature K 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%tv_lay
    virtual_temperature_at_Lagrangian_surfacevirtual temperature at Lagrangian surface K 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%pt
    volume_fraction_of_condensed_water_in_soil_at_wilting_pointwilting point (volumetric) frac 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%smcwlt2
    volume_fraction_of_frozen_soil_moisture_for_land_surface_modelvolume fraction of frozen soil moisture for lsm frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%keepsmfr
    volume_fraction_of_soil_moisturetotal soil moisture frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%smc
    volume_fraction_of_soil_moisture_for_land_surface_modelvolumetric fraction of soil moisture for lsm frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%smois
    volume_fraction_of_unfrozen_soil_moistureliquid soil moisture frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%slc
    volume_fraction_of_unfrozen_soil_moisture_for_land_surface_modelvolume fraction of unfrozen soil moisture for lsm frac 2 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%sh2o
    volume_mixing_ratio_ccl4volume mixing ratio ccl4 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,9)
    volume_mixing_ratio_cfc11volume mixing ratio cfc11 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,6)
    volume_mixing_ratio_cfc113volume mixing ratio cfc113 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,10)
    volume_mixing_ratio_cfc12volume mixing ratio cfc12 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,7)
    volume_mixing_ratio_cfc22volume mixing ratio cfc22 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,8)
    volume_mixing_ratio_ch4volume mixing ratio ch4 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,3)
    volume_mixing_ratio_covolume mixing ratio co kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,5)
    volume_mixing_ratio_co2volume mixing ratio co2 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,1)
    volume_mixing_ratio_n2ovolume mixing ratio no2 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,2)
    volume_mixing_ratio_o2volume mixing ratio o2 kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%gasvmr(:,:,4)
    water_equivalent_accumulated_snow_depthwater equiv of acc snow depth over land and sea ice mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%weasd
    water_equivalent_accumulated_snow_depth_over_icewater equiv of acc snow depth over ice mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%weasd_ice
    water_equivalent_accumulated_snow_depth_over_landwater equiv of acc snow depth over land mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%weasd_land
    water_equivalent_accumulated_snow_depth_over_oceanwater equiv of acc snow depth over ocean mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%weasd_ocean
    water_friendly_aerosol_number_concentrationnumber concentration of water-friendly aerosols kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntwa)
    water_friendly_aerosol_number_concentration_updated_by_physicsnumber concentration of water-friendly aerosols updated by physics kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntwa)
    water_storage_in_aquiferwater storage in aquifer mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%waxy
    water_storage_in_aquifer_and_saturated_soilwater storage in aquifer and saturated soil mm 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%wtxy
    water_table_depthwater table depth m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%zwtxy
    water_table_recharge_when_deeprecharge to or from the water table when deep m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%deeprechxy
    water_table_recharge_when_shallowrecharge to or from the water table when shallow m 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%rechxy
    water_vapor_detrainment_tendencyupdraft water vapor detrainment tendency kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%det_sqv
    water_vapor_mixing_ratio_at_surfacewater vapor mixing ratio at surface kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%qwv_surf
    water_vapor_specific_humiditywater vapor specific humidity kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,:,GFS_Control%ntqv)
    water_vapor_specific_humidity_at_Lagrangian_surfacewater vapor specific humidity updated by fast physics at Lagrangian surface kg kg-1 3 real kind_dyn MODULE CCPP_typedefs TYPE CCPP_interstitial_type CCPP_interstitial%qv
    water_vapor_specific_humidity_at_layer_for_radiationspecific humidity layer kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%qlyr
    water_vapor_specific_humidity_at_lowest_model_layerwater vapor specific humidity at lowest model layer kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%qgrs(:,1,GFS_Control%ntqv)
    water_vapor_specific_humidity_at_lowest_model_layer_for_diaglayer 1 specific humidity for diag kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%q1
    water_vapor_specific_humidity_at_lowest_model_layer_updated_by_physicswater vapor specific humidity at lowest model layer updated by physics kg kg-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,1,GFS_Control%ntqv)
    water_vapor_specific_humidity_at_previous_time_stepwater vapor specific humidity at previous time step kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,4)
    water_vapor_specific_humidity_savewater vapor specific humidity before entering a physics scheme kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_q(:,:,GFS_Control%ntqv)
    water_vapor_specific_humidity_two_time_steps_backwater vapor specific humidity two time steps back kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_f3d(:,:,2)
    water_vapor_specific_humidity_updated_by_physicswater vapor specific humidity updated by physics kg kg-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gq0(:,:,GFS_Control%ntqv)
    water_vapor_subsidence_tendencyupdraft water vapor subsidence tendency kg kg-1 s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sub_sqv
    weight_for_momentum_at_viscous_sublayer_topweight for momentum at viscous layer top none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_a1u
    weight_for_potental_temperature_at_viscous_sublayer_topweight for potental temperature at viscous layer top none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_a1t
    weight_for_specific_humidity_at_viscous_sublayer_topweight for Specfic Humidity at viscous layer top none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_tbd_type GFS_Data(cdata%blk_no)%Tbd%phy_myj_a1q
    weights_for_stochastic_shum_perturbationweights for stochastic shum perturbation none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%shum_wts
    weights_for_stochastic_shum_perturbation_flippedweights for stochastic shum perturbation, flipped none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%shum_wts
    weights_for_stochastic_skeb_perturbation_of_x_windweights for stochastic skeb perturbation of x wind none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%skebu_wts
    weights_for_stochastic_skeb_perturbation_of_x_wind_flippedweights for stochastic skeb perturbation of x wind, flipped none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%skebu_wts
    weights_for_stochastic_skeb_perturbation_of_y_windweights for stochastic skeb perturbation of y wind none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%skebv_wts
    weights_for_stochastic_skeb_perturbation_of_y_wind_flippedweights for stochastic skeb perturbation of y wind, flipped none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%skebv_wts
    weights_for_stochastic_sppt_perturbationweights for stochastic sppt perturbation none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sppt_wts
    weights_for_stochastic_sppt_perturbation_flippedweights for stochastic sppt perturbation, flipped none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%sppt_wts
    weights_for_stochastic_surface_physics_perturbationweights for stochastic surface physics perturbation none 2 real kind_phys MODULE GFS_typedefs TYPE GFS_coupling_type GFS_Data(cdata%blk_no)%Coupling%sfc_wts
    wind_speed_at_lowest_model_layerwind speed at lowest model level m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%wind
    wood_masswood mass including woody roots g m-2 1 real kind_phys MODULE GFS_typedefs TYPE GFS_sfcprop_type GFS_Data(cdata%blk_no)%Sfcprop%woodxy
    x_momentum_tendency_from_blocking_dragx momentum tendency from blocking drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtaux2d_bl
    x_momentum_tendency_from_form_dragx momentum tendency from form drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtaux2d_fd
    x_momentum_tendency_from_large_scale_gwdx momentum tendency from large scale gwd m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtaux2d_ls
    x_momentum_tendency_from_small_scale_gwdx momentum tendency from small scale gwd m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtaux2d_ss
    x_windzonal wind m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%ugrs
    x_wind_at_10m10 meter u wind speed m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%u10m
    x_wind_at_lowest_model_layerzonal wind at lowest model layer m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%ugrs(:,1)
    x_wind_at_lowest_model_layer_for_diaglayer 1 x wind for diag m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%u1
    x_wind_at_lowest_model_layer_updated_by_physicszonal wind at lowest model layer updated by physics m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gu0(:,1)
    x_wind_savex-wind before entering a physics scheme m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_u
    x_wind_updated_by_physicszonal wind updated by physics m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gu0
    y_momentum_tendency_from_blocking_dragy momentum tendency from blocking drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtauy2d_bl
    y_momentum_tendency_from_form_dragy momentum tendency from form drag m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtauy2d_fd
    y_momentum_tendency_from_large_scale_gwdy momentum tendency from large scale gwd m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtauy2d_ls
    y_momentum_tendency_from_small_scale_gwdy momentum tendency from small scale gwd m s-2 2 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%dtauy2d_ss
    y_windmeridional wind m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%vgrs
    y_wind_at_10m10 meter v wind speed m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%v10m
    y_wind_at_lowest_model_layermeridional wind at lowest model layer m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_statein_type GFS_Data(cdata%blk_no)%Statein%vgrs(:,1)
    y_wind_at_lowest_model_layer_for_diaglayer 1 y wind for diag m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_diag_type GFS_Data(cdata%blk_no)%Intdiag%v1
    y_wind_at_lowest_model_layer_updated_by_physicsmeridional wind at lowest model layer updated by physics m s-1 1 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gv0(:,1)
    y_wind_savey-wind before entering a physics scheme m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%save_v
    y_wind_updated_by_physicsmeridional wind updated by physics m s-1 2 real kind_phys MODULE GFS_typedefs TYPE GFS_stateout_type GFS_Data(cdata%blk_no)%Stateout%gv0
    zenith_angle_temporal_adjustment_factor_for_shortwave_fluxeszenith angle temporal adjustment factor for shortwave none 1 real kind_phys MODULE GFS_typedefs TYPE GFS_interstitial_type GFS_Interstitial(cdata%thrd_no)%xmu
    - - From 21f7fddfd1885896a2ac282c093c9529b10e1bd6 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 20 Jul 2020 19:02:16 +0000 Subject: [PATCH 252/404] some minor fixes --- physics/GFS_MP_generic.F90 | 48 +++++++------------------------ physics/GFS_PBL_generic.F90 | 2 +- physics/GFS_rrtmg_pre.F90 | 4 +-- physics/GFS_time_vary_pre.fv3.F90 | 2 +- 4 files changed, 14 insertions(+), 42 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 68c19df42..8810cc7cf 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -253,40 +253,6 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, endif - if (lssav) then -! if (Model%me == 0) print *,'in phys drive, kdt=',Model%kdt, & -! 'totprcpb=', Diag%totprcpb(1),'totprcp=',Diag%totprcp(1), & -! 'rain=',Diag%rain(1) - do i=1,im - cnvprcp (i) = cnvprcp (i) + rainc(i) - totprcp (i) = totprcp (i) + rain(i) - totice (i) = totice (i) + ice(i) - totsnw (i) = totsnw (i) + snow(i) - totgrp (i) = totgrp (i) + graupel(i) - - cnvprcpb(i) = cnvprcpb(i) + rainc(i) - totprcpb(i) = totprcpb(i) + rain(i) - toticeb (i) = toticeb (i) + ice(i) - totsnwb (i) = totsnwb (i) + snow(i) - totgrpb (i) = totgrpb (i) + graupel(i) - enddo - - if (ldiag3d) then - do k=1,levs - do i=1,im - dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain - enddo - enddo - if (qdiag3d) then - do k=1,levs - do i=1,im - dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain - enddo - enddo - endif - endif - endif - t850(1:im) = gt0(1:im,1) do k = 1, levs-1 @@ -365,9 +331,9 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, endif if (lssav) then -! if (Model%me == 0) print *,'in phys drive, kdt=',kdt, & -! 'totprcpb=', totprcpb(1),'totprcp=',totprcp(1), & -! 'rain=',rain(1) +! if (Model%me == 0) print *,'in phys drive, kdt=',Model%kdt, & +! 'totprcpb=', Diag%totprcpb(1),'totprcp=',Diag%totprcp(1), & +! 'rain=',Diag%rain(1) do i=1,im cnvprcp (i) = cnvprcp (i) + rainc(i) totprcp (i) = totprcp (i) + rain(i) @@ -386,9 +352,15 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, do k=1,levs do i=1,im dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain -! dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain enddo enddo + if (qdiag3d) then + do k=1,levs + do i=1,im + dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain + enddo + enddo + endif endif endif diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 77a1aa86f..f3eb212c7 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -626,7 +626,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, if(qdiag3d) then do k=1,levs do i=1,im - dq3dt(i,k) = dq3dt(i,k) + (qgrs(i,k,ntqv)-save_q(i,k,ntqv)) + dq3dt (i,k) = dq3dt (i,k) + (qgrs(i,k,ntqv)-save_q(i,k,ntqv)) dq3dt_ozone(i,k) = dq3dt_ozone(i,k) + (qgrs(i,k,ntoz)-save_q(i,k,ntoz)) enddo enddo diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 5116d20b1..cc5b31447 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -141,13 +141,13 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP) :: & + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP) :: & htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & cldcov, deltaq, cnvc, cnvw, & effrl, effri, effrr, effrs, rho, orho ! for Thompson MP - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & + real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP) :: & re_cloud, re_ice, re_snow, qv_mp, qc_mp, & qi_mp, qs_mp, nc_mp, ni_mp, nwfa diff --git a/physics/GFS_time_vary_pre.fv3.F90 b/physics/GFS_time_vary_pre.fv3.F90 index 98a0f6697..6a21199e9 100644 --- a/physics/GFS_time_vary_pre.fv3.F90 +++ b/physics/GFS_time_vary_pre.fv3.F90 @@ -171,7 +171,7 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & if (nslwr == 1) lslwr = .true. !--- allow for radiation to be called on every physics time step ! for the first nhfrad timesteps (for spinup, coldstarts only) - if (kdt<=nhfrad) then + if (kdt <= nhfrad) then lsswr = .true. lslwr = .true. end if From 3ff25ecf862941501bc5c2c1fba8d2cb05d207db Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Mon, 20 Jul 2020 19:42:26 +0000 Subject: [PATCH 253/404] Updated to new land pert scheme. --- physics/GFS_rrtmgp_sw_pre.F90 | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 6987c3e4a..827907e62 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -86,6 +86,7 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ ! Local variables integer :: i, j, iCol, iBand, iLay real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb + real(kind_phys) :: lndp_alb ! Initialize CCPP error handling variables errmsg = '' @@ -117,13 +118,17 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ ! --- turn vegetation fraction pattern into percentile pattern ! ####################################################################################### alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then + lndp_alb = -999. + if (Model%lndp_type ==1) then + do k =1,Model%n_var_lndp + if (Model%lndp_var_list(k) == 'alb') then do i=1,ncol - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + call cdfnor(Coupling%sfc_wts(i,k),alb1d(i)) + lndp_alb = Model%lndp_prt_list(k) enddo - endif - endif + endif + enddo + endif ! ####################################################################################### ! Call module_radiation_surface::setalb() to setup surface albedo. @@ -131,7 +136,7 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, Sfcprop%zorl, & Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprime(:,1), Sfcprop%alvsf, & Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, Sfcprop%facwf, & - Sfcprop%fice, Sfcprop%tisfc, NCOL, alb1d, Model%pertalb, sfcalb) + Sfcprop%fice, Sfcprop%tisfc, NCOL, alb1d, lndp_alb, sfcalb) ! Approximate mean surface albedo from vis- and nir- diffuse values. Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) From c2c4492d1c137a54eae76a6aa3c83515a1e36f35 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 22 Jul 2020 11:07:36 +0000 Subject: [PATCH 254/404] updating sfx_diff to fix issues related to coupling to waves --- physics/sfc_diff.f | 4 +++- physics/sfc_diff.meta | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 3ec69cd4f..f84da9bec 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -72,6 +72,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) & tsurf_wat, tsurf_lnd, tsurf_ice, & !intent(in) & snwdph_wat,snwdph_lnd,snwdph_ice, & !intent(in) & z0rl_wat, z0rl_lnd, z0rl_ice, & !intent(inout) + & z0rl_wav, & !intent(inout) & ustar_wat, ustar_lnd, ustar_ice, & !intent(inout) & cm_wat, cm_lnd, cm_ice, & !intent(inout) & ch_wat, ch_lnd, ch_ice, & !intent(inout) @@ -105,6 +106,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) & tsurf_wat, tsurf_lnd, tsurf_ice, & & snwdph_wat,snwdph_lnd,snwdph_ice + real(kind=kind_phys), dimension(im), intent(in) :: z0rl_wav real(kind=kind_phys), dimension(im), intent(inout) :: & & z0rl_wat, z0rl_lnd, z0rl_ice, & & ustar_wat, ustar_lnd, ustar_ice, & @@ -355,7 +357,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0rl_wat(i) = 1.0e-4_r8 endif - elseif (z0rl_wat(i) <= 1.0e-7_r8) then + elseif (z0rl_wav(i) <= 1.0e-7_r8) then z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) if (redrag) then diff --git a/physics/sfc_diff.meta b/physics/sfc_diff.meta index ab99dcb06..ea109c9e5 100644 --- a/physics/sfc_diff.meta +++ b/physics/sfc_diff.meta @@ -352,6 +352,15 @@ kind = kind_phys intent = inout optional = F +[z0rl_wav] + standard_name = surface_roughness_length_from_wave_model + long_name = surface roughness length from wave model + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [ustar_wat] standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean From 70ba799f342c05e61e74cf31123b0343a25d14d5 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 27 Jul 2020 23:48:43 +0000 Subject: [PATCH 255/404] fixing bug in orho in GFS_rrtmg_pre.F90 --- physics/GFS_rrtmg_pre.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index cc5b31447..ca7695528 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -590,7 +590,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) qs_mp (i,k) = tracer1(i,k,ntsw)/(1.-qvs) - nc_mp (i,k) = nt_c*orho(i,k1) + nc_mp (i,k) = nt_c*orho(i,k) ni_mp (i,k) = tracer1(i,k,ntinc)/(1.-qvs) enddo enddo From fea249135c5f9e75ffe3a32b0981656ba13d5b0e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jul 2020 18:17:02 -0600 Subject: [PATCH 256/404] Some bug fixes from previous commit. Now running --- physics/GFS_suite_interstitial.F90 | 18 +++++++++--------- physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 | 10 +++++++++- physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 | 10 +++++++++- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index b04561db2..5e6104478 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -161,7 +161,7 @@ end subroutine GFS_suite_interstitial_2_finalize subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplflx, flag_cice, shal_cnv, old_monin, mstrat, & do_shoc, frac_grid, imfshalcnv, dtf, xcosz, adjsfcdsw, adjsfcdlw, cice, pgr, ulwsfc_cice, lwhd, htrsw, htrlw, xmu, ctei_rm, & work1, work2, prsi, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, cp, hvap, prslk, suntim, adjsfculw, adjsfculw_lnd, & - adjsfculw_ice, adjsfculw_ocn, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & + adjsfculw_ice, adjsfculw_wat, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, & ctei_rml, ctei_r, kinver, dry, icy, wet, frland, huge, use_GP_jacobian, skt, sktp1r, fluxlwUP, fluxlwUP_jac, errmsg, errflg) implicit none @@ -169,7 +169,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl ! interface variables integer, intent(in ) :: im, levs, imfshalcnv logical, intent(in ) :: lssav, ldiag3d, lsidea, cplflx, shal_cnv - logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid, use_GP_jacobian + logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid real(kind=kind_phys), intent(in ) :: dtf, cp, hvap logical, intent(in ), dimension(im) :: flag_cice @@ -259,11 +259,11 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl if (flag_cice(i)) then adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & + ulwsfc_cice(i) * tem & - + adjsfculw_ocn(i) * (one - frland(i) - tem) + + adjsfculw_wat(i) * (one - frland(i) - tem) else adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & + adjsfculw_ice(i) * tem & - + adjsfculw_ocn(i) * (one - frland(i) - tem) + + adjsfculw_wat(i) * (one - frland(i) - tem) endif enddo else @@ -273,20 +273,20 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl elseif (icy(i)) then ! ice (and water) tem = one - cice(i) if (flag_cice(i)) then - if (wet(i) .and. adjsfculw_ocn(i) /= huge) then - adjsfculw(i) = ulwsfc_cice(i)*cice(i) + adjsfculw_ocn(i)*tem + if (wet(i) .and. adjsfculw_wat(i) /= huge) then + adjsfculw(i) = ulwsfc_cice(i)*cice(i) + adjsfculw_wat(i)*tem else adjsfculw(i) = ulwsfc_cice(i) endif else - if (wet(i) .and. adjsfculw_ocn(i) /= huge) then - adjsfculw(i) = adjsfculw_ice(i)*cice(i) + adjsfculw_ocn(i)*tem + if (wet(i) .and. adjsfculw_wat(i) /= huge) then + adjsfculw(i) = adjsfculw_ice(i)*cice(i) + adjsfculw_wat(i)*tem else adjsfculw(i) = adjsfculw_ice(i) endif endif else ! all water - adjsfculw(i) = adjsfculw_ocn(i) + adjsfculw(i) = adjsfculw_wat(i) endif enddo endif diff --git a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 index 94c813a94..cde622728 100644 --- a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 @@ -18,13 +18,21 @@ module rrtmgp_gfdlmp_lw_cloud_sampling !! \section arg_table_rrtmgp_gfdlmp_lw_cloud_sampling_init !! \htmlinclude rrtmgp_gfdlmp_lw_cloud_sampling_init.html !! - subroutine rrtmgp_gfdlmp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0) + subroutine rrtmgp_gfdlmp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0, errmsg, errflg) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! RRTMGP DDT: K-distribution data ! Outputs integer, intent(out) :: & ipsdlw0 ! Initial permutation seed for McICA + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 ! Set initial permutation seed for McICA, initially set to number of G-points ipsdlw0 = lw_gas_props%get_ngpt() diff --git a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 index 19f0a2d8a..43032032b 100644 --- a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 @@ -17,13 +17,21 @@ module rrtmgp_gfdlmp_sw_cloud_sampling !! \section arg_table_rrtmgp_gfdlmp_sw_cloud_sampling_init !! \htmlinclude rrtmgp_gfdlmp_sw_cloud_sampling.html !! - subroutine rrtmgp_gfdlmp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0) + subroutine rrtmgp_gfdlmp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0, errmsg, errflg) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: K-distribution data ! Outputs integer, intent(out) :: & ipsdsw0 ! Initial permutation seed for McICA + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 ! Set initial permutation seed for McICA, initially set to number of G-points ipsdsw0 = sw_gas_props%get_ngpt() From cfb269cedfc42a9016c18331cd9cf3bdba7f4a9f Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Tue, 28 Jul 2020 14:50:53 +0000 Subject: [PATCH 257/404] adding nthreads to sfc_nst.f --- physics/module_nst_water_prop.f90 | 7 ++++--- physics/sfc_nst.f | 12 ++++++------ physics/sfc_nst.meta | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/physics/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index 81e31b148..39020526c 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -657,7 +657,7 @@ subroutine get_dtzm_point(xt,xz,dt_cool,zc,z1,z2,dtm) end subroutine get_dtzm_point !>\ingroup waterprop - subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,dtm) + subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm) !subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) ! ===================================================================== ! ! ! @@ -687,6 +687,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,dtm) ! ny - integer, dimension in y-direction (meridional) 1 ! ! z1 - lower bound of depth of sea temperature 1 ! ! z2 - upper bound of depth of sea temperature 1 ! +! nth - integer, num of openmp thread 1 ! ! outputs: ! ! dtm - mean of dT(z) (z1 to z2) 1 ! ! @@ -694,7 +695,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,dtm) implicit none - integer, intent(in) :: nx,ny + integer, intent(in) :: nx,ny, nth real (kind=kind_phys), dimension(nx,ny), intent(in) :: xt,xz,dt_cool,zc logical, dimension(nx,ny), intent(in) :: wet ! logical, dimension(nx,ny), intent(in) :: wet,icy @@ -706,7 +707,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,dtm) real (kind=kind_phys), parameter :: zero=0.0, half=0.5, one=1.0 -!$omp parallel do private(j,i,dtw,dtc,xzi) +!$omp parallel do num_threads (nth) private(j,i,dtw,dtc,xzi) do j = 1, ny do i= 1, nx diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 72982e248..cfe191a85 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -676,7 +676,7 @@ end subroutine sfc_nst_pre_finalize !! @{ subroutine sfc_nst_pre_run & (im, wet, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, - & z_c, tref, cplflx, oceanfrac, errmsg, errflg) + & z_c, tref, cplflx, oceanfrac, nthreads, errmsg, errflg) use machine , only : kind_phys use module_nst_water_prop, only: get_dtzm_2d @@ -686,7 +686,7 @@ subroutine sfc_nst_pre_run integer, parameter :: r8 = kind_phys ! --- inputs: - integer, intent(in) :: im + integer, intent(in) :: im, nthreads logical, dimension(im), intent(in) :: wet real (kind=kind_phys), dimension(im), intent(in) :: & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac @@ -730,7 +730,7 @@ subroutine sfc_nst_pre_run ! if (cplflx) then call get_dtzm_2d (xt, xz, dt_cool, & - & z_c, wet, zero, omz1, im, 1, dtzm) + & z_c, wet, zero, omz1, im, 1, nthreads, dtzm) do i=1,im if (wet(i) .and. oceanfrac(i) > zero) then ! dnsst = tsfc_wat(i) - tref(i) ! retrive/get difference of Ts and Tf @@ -786,7 +786,7 @@ end subroutine sfc_nst_post_finalize subroutine sfc_nst_post_run & & ( im, rlapse, tgice, wet, icy, oro, oro_uf, nstf_name1, & & nstf_name4, nstf_name5, xt, xz, dt_cool, z_c, tref, xlon, & - & tsurf_wat, tsfc_wat, dtzm, errmsg, errflg & + & tsurf_wat, tsfc_wat, nthreads, dtzm, errmsg, errflg & & ) use machine , only : kind_phys @@ -797,7 +797,7 @@ subroutine sfc_nst_post_run & integer, parameter :: r8 = kind_phys ! --- inputs: - integer, intent(in) :: im + integer, intent(in) :: im, nthreads logical, dimension(im), intent(in) :: wet, icy real (kind=kind_phys), intent(in) :: rlapse, tgice real (kind=kind_phys), dimension(im), intent(in) :: oro, oro_uf @@ -840,7 +840,7 @@ subroutine sfc_nst_post_run & zsea1 = 0.001_r8*real(nstf_name4) zsea2 = 0.001_r8*real(nstf_name5) call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & - & im, 1, dtzm) + & im, 1, nthreads, dtzm) do i = 1, im ! if (wet(i) .and. .not.icy(i)) then ! if (wet(i) .and. (frac_grid .or. .not. icy(i))) then diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 4198af0eb..ed0451aaa 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -768,6 +768,14 @@ kind = kind_phys intent = in optional = F +[nthreads] + standard_name = omp_threads + long_name = number of OpenMP threads available for physics schemes + units = count + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -956,6 +964,14 @@ kind = kind_phys intent = inout optional = F +[nthreads] + standard_name = omp_threads + long_name = number of OpenMP threads available for physics schemes + units = count + dimensions = () + type = integer + intent = in + optional = F [dtzm] standard_name = mean_change_over_depth_in_sea_water_temperature long_name = mean of dT(z) (zsea1 to zsea2) From ddcc4b84e5059dd2dbf8be65f334bbcc631ad410 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 29 Jul 2020 19:18:53 +0000 Subject: [PATCH 258/404] fixing a typo in ugwp_driver_v0.F --- physics/ugwp_driver_v0.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/ugwp_driver_v0.F b/physics/ugwp_driver_v0.F index abba5137f..f209cf97a 100644 --- a/physics/ugwp_driver_v0.F +++ b/physics/ugwp_driver_v0.F @@ -138,7 +138,7 @@ subroutine cires_ugwp_driver_v0(me, master, pkdis(i,k) = zero enddo enddo - if (cdmbgwd(1) > zero.or. cdmbgwd(2) > zero)_r8 then + if (cdmbgwd(1) > zero.or. cdmbgwd(2) > zero) then call gwdps(im, im, im, levs, Pdvdt, Pdudt, Pdtdt & &, ugrs, vgrs, tgrs, qgrs & &, kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt& From fc7d561e31c92b42dc867df0670b3f5b99f6150c Mon Sep 17 00:00:00 2001 From: "Linlin.Pan" Date: Thu, 30 Jul 2020 13:39:20 +0000 Subject: [PATCH 259/404] Bug fix for rrfs_v1beta debug regression test modified file physics/drag_suite.F90 physics/module_sf_noahmp_glacier.f90 The codes have been tested on Hera. --- physics/drag_suite.F90 | 1 + physics/module_sf_noahmp_glacier.f90 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 725011ee4..1a0c0a3d8 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -473,6 +473,7 @@ subroutine drag_suite_run( & ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + var_temp2=0. !-------------------------------------------------------------------- diff --git a/physics/module_sf_noahmp_glacier.f90 b/physics/module_sf_noahmp_glacier.f90 index 1b9b3cf3f..61d7b4e3a 100644 --- a/physics/module_sf_noahmp_glacier.f90 +++ b/physics/module_sf_noahmp_glacier.f90 @@ -1111,6 +1111,8 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z dtg = 0. mozsgn = 0 mozold = 0. + moz=0. + h = 0. fv = 0.1 From eba02e9d518921c786e617f883c5d143cbf6e8ae Mon Sep 17 00:00:00 2001 From: "Linlin.Pan" Date: Thu, 30 Jul 2020 14:07:23 +0000 Subject: [PATCH 260/404] Update the codes according to the comments. Modified codes: physics/drag_suite.F90 physics/module_sf_noahmp_glacier.f90 --- physics/drag_suite.F90 | 2 +- physics/module_sf_noahmp_glacier.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 1a0c0a3d8..55ef9c268 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -473,7 +473,7 @@ subroutine drag_suite_run( & ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - var_temp2=0. + var_temp2 = 0. !-------------------------------------------------------------------- diff --git a/physics/module_sf_noahmp_glacier.f90 b/physics/module_sf_noahmp_glacier.f90 index 61d7b4e3a..f3e0531f5 100644 --- a/physics/module_sf_noahmp_glacier.f90 +++ b/physics/module_sf_noahmp_glacier.f90 @@ -1111,7 +1111,7 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z dtg = 0. mozsgn = 0 mozold = 0. - moz=0. + moz = 0. h = 0. fv = 0.1 From 390e5d6b2213c890fe0158559c9980d408e586a2 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Jul 2020 16:23:37 +0000 Subject: [PATCH 261/404] Add new cloud-overlap assumptions (see NCAR/ccpp-physics PR#477). Moving over to SCM for debugging. --- physics/GFS_cloud_diagnostics.F90 | 38 ++++++++- physics/mo_cloud_sampling.F90 | 95 ++++++++++++++++++++- physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 | 7 +- physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 | 11 ++- 4 files changed, 139 insertions(+), 12 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index 2d616d3dc..fc956f711 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -113,7 +113,7 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ ! ! Estimate clouds decorrelation length in km ! *this is only a tentative test, need to consider change later* - if ( iovrlw == 3 .and. iovrsw == 3) then + if ( iovr == 3) then do iCol =1,nCol de_lgth(iCol) = max( 0.6, 2.78-4.6*rlat(iCol) ) do iLay=nLev,2,-1 @@ -124,10 +124,17 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ enddo enddo endif + + + ! Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha(nCol, nLev, deltaZ, iovr, lat, julian, yearlen, cldtot, cloud_overlap_param) + endif - ! - ! Precipitation overlap parameter (Hack. Using same as cloud for now) - precip_overlap_param = cloud_overlap_param + ! + ! Precipitation overlap parameter (Hack. Using same as cloud for now) + precip_overlap_param = cloud_overlap_param + ! Compute low, mid, high, total, and boundary layer cloud fractions and clouds top/bottom ! layer indices for low, mid, and high clouds. The three cloud domain boundaries are @@ -398,6 +405,29 @@ subroutine gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, IX, NLAY, clds, mtop clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud enddo + elseif ( iovr == 4 .or. iovr == 5 ) then ! exponential overlap (iovr=4), or + ! exponential-random (iovr=5); + ! distinction defined by alpha + do k = kstr, kend, kinc + do i = 1, ix + ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) + if (ccur >= climit) then ! cloudy layer + cl2(i) = alpha(i,k) * min(cl2(i), (1.0 - ccur)) & ! maximum part + + (1.0 - alpha(i,k)) * (cl2(i) * (1.0 - ccur)) ! random part + else ! clear layer + cl1(i) = cl1(i) * cl2(i) + cl2(i) = 1.0 + endif + enddo + if (k == llyr) then + do i = 1, ix + clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud + enddo + endif + enddo + do i = 1, ix + clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud + enddo endif ! end_if_iovr ! --- high, mid, low clouds, where cl1, cl2 are cloud fractions diff --git a/physics/mo_cloud_sampling.F90 b/physics/mo_cloud_sampling.F90 index d2225a230..d743a7af2 100644 --- a/physics/mo_cloud_sampling.F90 +++ b/physics/mo_cloud_sampling.F90 @@ -192,8 +192,101 @@ function sampled_mask_max_ran(randoms,cloud_frac,cloud_mask) result(error_msg) end function sampled_mask_max_ran ! ------------------------------------------------------------------------------------------------- ! - ! Generate a McICA-sampled cloud mask for exponential-decorrelation overlap + ! Generate a McICA-sampled cloud mask for exponential-random overlap ! The overlap parameter alpha is defined between pairs of layers + ! for layer i, alpha(i) describes the overlap betwen cloud_frac(i) and cloud_frac(i+1) + ! By skipping layers with 0 cloud fraction the code forces alpha(i) = 0 for cloud_frac(i) = 0. + ! + function sampled_mask_exp_ran(randoms,cloud_frac,overlap_param,cloud_mask) result(error_msg) + real(wp), dimension(:,:,:), intent(in ) :: randoms ! ngpt,nlay,ncol + real(wp), dimension(:,:), intent(in ) :: cloud_frac ! ncol,nlay + real(wp), dimension(:,:), intent(in ) :: overlap_param ! ncol,nlay-1 + logical, dimension(:,:,:), intent(out) :: cloud_mask ! ncol,nlay,ngpt + character(len=128) :: error_msg + ! ------------------------ + integer :: ncol, nlay, ngpt, icol, ilay, igpt + integer :: cloud_lay_fst, cloud_lay_lst + real(wp) :: rho ! correlation coefficient + real(wp), dimension(size(randoms,1)) :: local_rands + logical, dimension(size(randoms,2)) :: cloud_mask_layer + ! ------------------------ + ! + ! Error checking + ! + error_msg = "" + ncol = size(randoms, 3) + nlay = size(randoms, 2) + ngpt = size(randoms, 1) + if(any([ncol,nlay] /= [size(cloud_frac, 1),size(cloud_frac, 2)])) then + error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" + return + end if + if(any([ncol,nlay-1] /= [size(overlap_param, 1),size(overlap_param, 2)])) then + error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and overlap_param(ncol,nlay-1) are inconsistent" + return + end if + if(any([ncol,nlay,ngpt] /= [size(cloud_mask, 1),size(cloud_mask, 2), size(cloud_mask,3)])) then + error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" + return + end if + + if(any(cloud_frac > 1._wp) .or. any(cloud_frac < 0._wp)) then + error_msg = "sampled_mask_max_ran: cloud fraction values out of range [0,1]" + return + end if + if(any(overlap_param > 1._wp) .or. any(overlap_param < -1._wp)) then + error_msg = "sampled_mask_max_ran: overlap_param values out of range [-1,1]" + return + end if + ! + ! We chould check the random numbers but that would be computationally heavy + ! + ! ------------------------ + ! Construct the cloud mask for each column + ! + do icol = 1, ncol + cloud_mask_layer(1:nlay) = cloud_frac(icol,1:nlay) > 0._wp + if(.not. any(cloud_mask_layer)) then + cloud_mask(icol,1:nlay,1:ngpt) = .false. + cycle + end if + cloud_lay_fst = findloc(cloud_mask_layer, .true., dim=1) + cloud_lay_lst = findloc(cloud_mask_layer, .true., dim=1, back = .true.) + cloud_mask(icol,1:cloud_lay_fst,1:ngpt) = .false. + + ilay = cloud_lay_fst + local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + do ilay = cloud_lay_fst+1, cloud_lay_lst + if(cloud_mask_layer(ilay)) then + ! + ! Exponential-random overlap: + ! new random deviates if the adjacent layer isn't cloudy + ! correlated deviates if the adjacent layer is cloudy + ! + if(cloud_mask_layer(ilay-1)) then + ! + ! Create random deviates correlated between this layer and the previous layer + ! (have to remove mean value before enforcing correlation) + ! + rho = overlap_param(icol,ilay-1) + local_rands(1:ngpt) = rho*(local_rands(1:ngpt) -0.5_wp) + & + sqrt(1._wp-rho*rho)*(randoms(1:ngpt,ilay,icol)-0.5_wp) + 0.5_wp + else + local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) + end if + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + end if + end do + + cloud_mask(icol,cloud_lay_lst+1:nlay, 1:ngpt) = .false. + end do + end function sampled_mask_exp_ran + + ! ------------------------------------------------------------------------------------------------- + ! + ! Generate a McICA-sampled cloud mask for exponential-decorrelation overlap + ! The overlap parameter is defined between pairs of layers ! function sampled_mask_exp_dcorr(randoms1,randoms2,cloud_frac,overlap_param,cloud_mask) result(error_msg) real(wp), dimension(:,:,:), intent(in ) :: randoms1,randoms2 ! ngpt,nlay,ncol diff --git a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 index cde622728..4b97a1301 100644 --- a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 @@ -3,7 +3,7 @@ module rrtmgp_gfdlmp_lw_cloud_sampling use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubclw, iovrlw use mo_optical_props, only: ty_optical_props_1scl - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, draw_samples + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use rrtmgp_aux, only: check_error_msg use netcdf @@ -96,7 +96,7 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics errflg = 0 ! - if (iovrlw .ne. 1 .and. iovrlw .ne. 3) then + if (iovrlw .ne. 1 .and. iovrlw .ne. 3 .and. iovrlw .ne. 4 .and. iovrlw .ne. 5) then errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' errflg = 1 call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling',errmsg) @@ -133,7 +133,6 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! Call McICA select case ( iovrlw ) - ! Maximumn-random case(1) ! Maximum-random overlap call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) case(3) ! Exponential decorrelation length overlap @@ -145,6 +144,8 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics enddo call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,cloud_overlap_param(:,1:nLev-1),cldfracMCICA)) + case(5) ! Exponential-random overlap + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',sampled_mask_exp_ran(rng3D,cld_frac,cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA diff --git a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 index 43032032b..ebf2257de 100644 --- a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 @@ -3,7 +3,7 @@ module rrtmgp_gfdlmp_sw_cloud_sampling use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubcsw, iovrsw use mo_optical_props, only: ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, draw_samples + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use rrtmgp_aux, only: check_error_msg use netcdf @@ -99,7 +99,7 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw errflg = 0 ! Only works w/ SDFs v15p2 and v16beta - if (iovrsw .ne. 1 .and. iovrsw .ne. 3) then + if (iovrsw .ne. 1 .and. iovrsw .ne. 3 .and. iovrsw .ne. 4 .an. iovrsw .ne. 5) then errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' errflg = 1 call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling',errmsg) @@ -137,10 +137,10 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw ! Call McICA select case ( iovrsw ) - case(1) ! Maximum-random + case(1) ! Maximum-random overlap call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & sampled_mask_max_ran(rng3D,cld_frac(idxday(1:nDay),:),cldfracMCICA)) - case(3) ! Exponential-random + case(3) ! Decorrelation-length overlap do iday=1,nday call random_setseed(ipseed_sw(iday),rng_stat) call random_number(rng1D,rng_stat) @@ -150,6 +150,9 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw sampled_mask_exp_dcorr(rng3D, rng3D2, cld_frac(idxday(1:nDay),:), & cloud_overlap_param(idxday(1:nDay),1:nLev-1), & cldfracMCICA)) + case(5) ! Exponential-random overlap + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D,cld_frac(idxday(1:nDay),:),cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA From e530096764773b67fa30c7f3b11285c81bb5374d Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Thu, 30 Jul 2020 17:39:57 +0000 Subject: [PATCH 262/404] fixing one file --- physics/ugwp_driver_v0.F | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/physics/ugwp_driver_v0.F b/physics/ugwp_driver_v0.F index f209cf97a..f573c8776 100644 --- a/physics/ugwp_driver_v0.F +++ b/physics/ugwp_driver_v0.F @@ -38,7 +38,7 @@ subroutine cires_ugwp_driver_v0(me, master, implicit none !input - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys integer, intent(in) :: me, master integer, intent(in) :: im, levs, kdt, imx, nmtvr, ntke, ipr @@ -89,9 +89,9 @@ subroutine cires_ugwp_driver_v0(me, master, ! ! switches that activate impact of OGWs and NGWs along with eddy diffusion ! - real(kind=kind_phys), parameter :: pogw=1.0_r8, pngw=1.0_r8 - &, pked=1.0_r8, zero=0.0_r8 - &, ompked=1.0_r8-pked + real(kind=kind_phys), parameter :: pogw=1.0_kp, pngw=1.0_kp + &, pked=1.0_kp, zero=0.0_kp + &, ompked=1.0_kp-pked ! ! switches for GW-effects: pogw=1 (OGWs) pngw=1 (NGWs) pked=1 (eddy mixing) ! @@ -162,7 +162,7 @@ subroutine cires_ugwp_driver_v0(me, master, ! call slat_geos5(im, xlatd, tau_ngw) ! - if (abs(1.0_r8-cdmbgwd(3)) > 1.0e-6_r8) then + if (abs(1.0_kp-cdmbgwd(3)) > 1.0e-6_kp) then if (cdmbgwd(4) > zero) then do i=1,im turb_fac(i) = zero @@ -182,7 +182,7 @@ subroutine cires_ugwp_driver_v0(me, master, rfac = 86400000 / dtp do i=1,im tx1 = cdmbgwd(4)*min(10.0, max(turb_fac(i),rain(i)*rfac)) - tau_ngw(i) = tau_ngw(i) * max(0.1_r8, min(5.0_r8, tx1)) + tau_ngw(i) = tau_ngw(i) * max(0.1_kp, min(5.0_kp, tx1)) enddo endif do i=1,im @@ -317,7 +317,7 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, use sso_coorde, only : pgwd, pgwd4, debugprint !---------------------------------------- implicit none - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys character(len=8) :: strsolver='PSS-1986' ! current operational solver or 'WAM-2017' integer, intent(in) :: im, km, imx, kdt integer, intent(in) :: me, master @@ -363,9 +363,9 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, ! cleff = 2.5*0.5e-5 * sqrt(192./768.) => Lh_eff = 1004. km ! 6*dx = 240 km 8*dx = 320. ~ 3-5 more effective !--------------------------------------------------------------------- - real(kind=kind_phys) :: gammin = 0.00999999_r8 - real(kind=kind_phys), parameter :: nhilmax = 25.0_r8 - real(kind=kind_phys), parameter :: sso_min = 3000.0_r8 + real(kind=kind_phys) :: gammin = 0.00999999_kp + real(kind=kind_phys), parameter :: nhilmax = 25.0_kp + real(kind=kind_phys), parameter :: sso_min = 3000.0_kp logical, parameter :: do_adjoro = .true. ! real(kind=kind_phys) :: shilmin, sgrmax, sgrmin @@ -439,7 +439,7 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, dsmax = sqrt(sgrmax) ; dsmin = sqrt(sgrmin) dxres = pi2*arad/float(IMX) - hdxres = 0.5_r8*dxres + hdxres = 0.5_kp*dxres ! shilmin = sgrmin/nhilmax ! not used - Moorthi ! gammin = min(sso_min/dsmax, 1.) ! Moorthi - with this results are not reproducible @@ -1311,7 +1311,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, implicit none !23456 - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys integer, intent(in) :: klev ! vertical level integer, intent(in) :: klon ! horiz tiles @@ -1338,9 +1338,9 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, real, intent(out) :: pdvdt(klon,klev) ! meridional momentum tendency real, intent(out) :: pdtdt(klon,klev) ! gw-heating (u*ax+v*ay)/cp real, intent(out) :: dked(klon,klev) ! gw-eddy diffusion - real, parameter :: minvel = 0.5_r8 ! - real, parameter :: epsln = 1.0e-12_r8 ! - real, parameter :: zero = 0.0_r8, one = 1.0_r8, half = 0.5_r8 + real, parameter :: minvel = 0.5_kp ! + real, parameter :: epsln = 1.0e-12_kp ! + real, parameter :: zero = 0.0_kp, one = 1.0_kp, half = 0.5_kp !vay-2018 @@ -1466,7 +1466,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, tvc1 = tm1(jl,jk) * (one +fv*qm1(jl,jk)) tvm1 = tm1(jl,jk-1) * (one +fv*qm1(jl,jk-1)) ! zthm1(jl,jk) = 0.5 *(tvc1+tvm1) - zthm1 = 2.0_r8 / (tvc1+tvm1) + zthm1 = 2.0_kp / (tvc1+tvm1) zuhm1(jl,jk) = half *(um1(jl,jk-1)+um1(jl,jk)) zvhm1(jl,jk) = half *(vm1(jl,jk-1)+vm1(jl,jk)) ! zrhohm1(jl,jk) = prsi(jl,jk)*rdi/zthm1(jl,jk) ! rho = p/(RTv) @@ -1475,7 +1475,7 @@ subroutine fv3_ugwp_solv2_v0(klon, klev, dtime, v_zmet(jl,jk) = zdelp + zdelp delpi(jl,jk) = grav / (prsi(jl,jk-1) - prsi(jl,jk)) vueff(jl,jk) = - & 2.e-5_r8*exp( (phil(jl,jk)+phil(jl,jk-1))*rhp2)+dked_min + & 2.e-5_kp*exp( (phil(jl,jk)+phil(jl,jk-1))*rhp2)+dked_min ! ! zbn2(jl,jk) = grav2cpd/zthm1(jl,jk) zbn2(jl,jk) = grav2cpd*zthm1 From a696a8478b861336da0ec0ea06fbebc882e5d4a6 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Jul 2020 15:30:46 -0600 Subject: [PATCH 263/404] Added exponential-random and exponential cloud-overlap assumptions to the RRTMGP radiation scheme. This is based on NCAR/ccpp-physics PR 477, but for the GP scheme. --- physics/GFS_cloud_diagnostics.F90 | 73 ++--- physics/GFS_cloud_diagnostics.meta | 28 +- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 311 ++++++++++++++++++-- physics/GFS_rrtmgp_gfdlmp_pre.meta | 79 +++++ physics/mo_cloud_sampling.F90 | 3 +- physics/physcons.F90 | 3 + physics/physparam.f | 10 +- physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 | 88 ++++-- physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 | 104 ++++--- 9 files changed, 541 insertions(+), 158 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index fc956f711..9055cd578 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -5,8 +5,8 @@ ! ######################################################################################## module GFS_cloud_diagnostics use machine, only: kind_phys - use physcons, only: con_pi, con_rog - use physparam, only: iovrlw, iovrsw, ivflip, icldflg + use physcons, only: con_pi, con_rog, decorr_con + use physparam, only: iovrlw, iovrsw, ivflip, icldflg, idcor use GFS_typedefs, only: GFS_control_type ! Module parameters (imported directly from radiation_cloud.f) @@ -41,9 +41,9 @@ end subroutine GFS_cloud_diagnostics_init !! \section arg_table_GFS_cloud_diagnostics_run !! \htmlinclude GFS_cloud_diagnostics_run.html !! - subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_frac, & - p_lev, mbota, mtopa, cldsa, de_lgth, cloud_overlap_param, precip_overlap_param, & - errmsg, errflg) + subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, de_lgth, p_lay, cld_frac, & + p_lev, deltaZ, cloud_overlap_param, precip_overlap_param, & + mbota, mtopa, cldsa, errmsg, errflg) implicit none ! Inputs @@ -53,13 +53,17 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ nCol, & ! Number of horizontal grid-points nLev ! Number of vertical-layers real(kind_phys), dimension(nCol), intent(in) :: & - lat ! Latitude + lat, & ! Latitude + de_lgth ! Decorrelation length real(kind_phys), dimension(nCol,nLev), intent(in) :: & p_lay, & ! Pressure at model-layer - tv_lay, & ! Virtual temperature cld_frac ! Total cloud fraction real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & - p_lev ! Pressure at model interfaces + p_lev ! Pressure at model interfaces + real(kind_phys), dimension(nCol,nLev), intent(in) :: & + deltaZ, & ! Layer thickness (km) + cloud_overlap_param, & ! Cloud-overlap parameter + precip_overlap_param ! Precipitation overlap parameter ! Outputs character(len=*), intent(out) :: & @@ -71,18 +75,15 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ mtopa ! Vertical indices for cloud bases real(kind_phys), dimension(ncol,5), intent(out) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL - real(kind_phys), dimension(ncol), intent(out) :: & - de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,nLev), intent(out) :: & - cloud_overlap_param, & ! Cloud-overlap parameter - precip_overlap_param ! Precipitation overlap parameter + + ! Local variables integer i,id,iCol,iLay,icld real(kind_phys) :: tem1 real(kind_phys),dimension(nCol,NK_CLDS+1) :: ptop1 real(kind_phys),dimension(nCol) :: rlat - real(kind_phys),dimension(nCol,nLev) :: cldcnv, deltaZ + real(kind_phys),dimension(nCol,nLev) :: cldcnv if (.not. (Model%lsswr .or. Model%lslwr)) return @@ -100,47 +101,13 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, p_lay, tv_lay, cld_ ptop1(i,icld) = ptopc(icld,1) + tem1*max( 0.0, 4.0*rlat(i)-1.0 ) enddo enddo - - ! Compute layer-thickness - do iCol=1,nCol - do iLay=1,nLev - deltaZ(iCol,iLay) = (con_rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) - enddo - enddo - - ! - ! Cloud overlap parameter - ! - ! Estimate clouds decorrelation length in km - ! *this is only a tentative test, need to consider change later* - if ( iovr == 3) then - do iCol =1,nCol - de_lgth(iCol) = max( 0.6, 2.78-4.6*rlat(iCol) ) - do iLay=nLev,2,-1 - if (de_lgth(iCol) .gt. 0) then - cloud_overlap_param(iCol,iLay-1) = & - exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) - endif - enddo - enddo - endif - - - ! Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha(nCol, nLev, deltaZ, iovr, lat, julian, yearlen, cldtot, cloud_overlap_param) - endif - - ! - ! Precipitation overlap parameter (Hack. Using same as cloud for now) - precip_overlap_param = cloud_overlap_param - ! Compute low, mid, high, total, and boundary layer cloud fractions and clouds top/bottom ! layer indices for low, mid, and high clouds. The three cloud domain boundaries are ! defined by ptopc. The cloud overlapping method is defined by control flag 'iovr', which may ! be different for lw and sw radiation programs. - call gethml(p_lay/100., ptop1, cld_frac, cldcnv, deltaZ, de_lgth, nCol, nLev, cldsa, mtopa, mbota) + call gethml(p_lay/100., ptop1, cld_frac, cldcnv, deltaZ, de_lgth, cloud_overlap_param,& + nCol, nLev, cldsa, mtopa, mbota) end subroutine GFS_cloud_diagnostics_run @@ -212,7 +179,7 @@ end subroutine hml_cloud_diagnostics_initialize ! ######################################################################################### ! ######################################################################################### - subroutine gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, IX, NLAY, clds, mtop, mbot) + subroutine gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, IX, NLAY, clds, mtop, mbot) ! =================================================================== ! ! ! ! abstract: compute high, mid, low, total, and boundary cloud fractions ! @@ -240,6 +207,7 @@ subroutine gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, IX, NLAY, clds, mtop ! cldcnv(IX,NLAY) : convective cloud (for diagnostic scheme only) ! ! dz (ix,nlay) : layer thickness (km) ! ! de_lgth(ix) : clouds vertical de-correlation length (km) ! + ! alpha(ix,nlay) : alpha decorrelation parameter ! ! IX : horizontal dimention ! ! NLAY : vertical layer dimensions ! ! ! @@ -259,6 +227,8 @@ subroutine gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, IX, NLAY, clds, mtop ! =1 max/ran overlapping clouds ! ! =2 maximum overlapping ( for mcica only ) ! ! =3 decorr-length ovlp ( for mcica only ) ! + ! =4 exponential cloud overlap (AER; mcica only) ! + ! =5 exponential-random overlap (AER; mcica only) ! ! ! ! ==================== end of description ===================== ! ! @@ -270,6 +240,7 @@ subroutine gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, IX, NLAY, clds, mtop real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & cldtot, cldcnv, dz real (kind=kind_phys), dimension(:), intent(in) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(in) :: alpha ! --- outputs real (kind=kind_phys), dimension(:,:), intent(out) :: clds diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index c54e78aa2..babc2cb28 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -42,16 +42,7 @@ type = real kind = kind_phys intent = in - optional = F -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction @@ -69,7 +60,7 @@ type = real kind = kind_phys intent = in - optional = F + optional = F [mtopa] standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops @@ -93,8 +84,17 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = in optional = F +[deltaZ] + standard_name = layer_thickness + long_name = layer_thickness + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [cloud_overlap_param] standard_name = cloud_overlap_param long_name = cloud overlap parameter @@ -102,7 +102,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = out + intent = in optional = F [precip_overlap_param] standard_name = precip_overlap_param @@ -111,7 +111,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = out + intent = in optional = F [cldsa] standard_name = cloud_area_fraction_for_radiation diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 976443055..d63bcc321 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -8,8 +8,10 @@ module GFS_rrtmgp_gfdlmp_pre use physcons, only: con_ttp, & ! Temperature at h2o 3pt (K) con_rd, & ! Gas constant for dry air (J/KgK) con_pi, & ! PI - con_g ! Gravity (m/s2) - use physparam, only: lcnorm,lcrick + con_g, & ! Gravity (m/s2) + con_rog, & + decorr_con + use physparam, only: lcnorm, lcrick, idcor, iovrlw, iovrsw use rrtmgp_aux, only: check_error_msg ! Parameters @@ -20,6 +22,8 @@ module GFS_rrtmgp_gfdlmp_pre cllimit = 0.001, & ! Lowest cloud fraction in GFDL MP scheme gfac = 1.0e5/con_g + public GFS_rrtmgp_gfdlmp_pre_init, GFS_rrtmgp_gfdlmp_pre_run, GFS_rrtmgp_gfdlmp_pre_finalize + private get_alpha_dcorr, get_alpha_exp contains ! ###################################################################################### ! ###################################################################################### @@ -31,9 +35,10 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_init !! \section arg_table_GFS_rrtmgp_gfdlmp_pre_run !! \htmlinclude GFS_rrtmgp_gfdlmp_pre_run.html !! - subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, & - cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, precip_frac, errmsg, errflg) + subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, yearlen, julian, lat, & + p_lev, p_lay, tv_lay, tracer, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, & + cld_swp, cld_resnow, cld_rwp, cld_rerain, precip_frac, cloud_overlap_param, & + precip_overlap_param, de_lgth, deltaZ, errmsg, errflg) implicit none ! Inputs @@ -43,24 +48,37 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, Tbd ! DDT: FV3-GFS data not yet assigned to a defined container integer, intent(in) :: & nCol, & ! Number of horizontal grid-points - nLev ! Number of vertical-layers + nLev, & ! Number of vertical-layers + yearlen ! Length of current year (365/366) WTF? + real(kind_phys), intent(in) :: & + julian ! Julian day + real(kind_phys), dimension(nCol), intent(in) :: & + lat ! Latitude + real(kind_phys), dimension(nCol,nLev), intent(in) :: & + tv_lay, & ! Virtual temperature (K) + p_lay ! Pressure at model-layers (Pa) real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) real(kind_phys), dimension(nCol, nLev, Model%ntrac),intent(in) :: & tracer ! Cloud condensate amount in layer by type () ! Outputs + real(kind_phys), dimension(nCol),intent(out) :: & + de_lgth ! Decorrelation length real(kind_phys), dimension(nCol,nLev),intent(out) :: & - cld_frac, & ! Total cloud fraction - cld_lwp, & ! Cloud liquid water path - cld_reliq, & ! Cloud liquid effective radius - cld_iwp, & ! Cloud ice water path - cld_reice, & ! Cloud ice effecive radius - cld_swp, & ! Cloud snow water path - cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path - cld_rerain, & ! Cloud rain effective radius - precip_frac ! Precipitation fraction + cld_frac, & ! Total cloud fraction + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effecive radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain, & ! Cloud rain effective radius + precip_frac, & ! Precipitation fraction + cloud_overlap_param, & ! Cloud-overlap parameter + precip_overlap_param, & ! Precipitation overlap parameter + deltaZ ! Layer thickness (km) character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -69,7 +87,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, ! Local variables real(kind_phys) :: tem1 real(kind_phys), dimension(nCol, nLev, min(4,Model%ncnd)) :: cld_condensate - integer :: i,k,l,ncndl + integer :: iCol,iLay,l,ncndl,iovr real(kind_phys), dimension(nCol,nLev) :: deltaP if (.not. (Model%lsswr .or. Model%lslwr)) return @@ -139,9 +157,9 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, ! Set really tiny suspended particle amounts to clear do l=1,ncndl - do k=1,nLev - do i=1,nCol - if (cld_condensate(i,k,l) < epsq) cld_condensate(i,k,l) = 0.0 + do iLay=1,nLev + do iCol=1,nCol + if (cld_condensate(iCol,iLay,l) < epsq) cld_condensate(iCol,iLay,l) = 0.0 enddo enddo enddo @@ -154,24 +172,52 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, p_lev, tracer, ! Condensate and effective size deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. - do k = 1, nLev - do i = 1, nCol + do iLay = 1, nLev + do iCol = 1, nCol ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) - if (cld_frac(i,k) .ge. cllimit) then - tem1 = gfac * deltaP(i,k) - cld_lwp(i,k) = cld_condensate(i,k,1) * tem1 - cld_iwp(i,k) = cld_condensate(i,k,2) * tem1 - cld_rwp(i,k) = cld_condensate(i,k,3) * tem1 - cld_swp(i,k) = cld_condensate(i,k,4) * tem1 + if (cld_frac(iCol,iLay) .ge. cllimit) then + tem1 = gfac * deltaP(iCol,iLay) + cld_lwp(iCol,iLay) = cld_condensate(iCol,iLay,1) * tem1 + cld_iwp(iCol,iLay) = cld_condensate(iCol,iLay,2) * tem1 + cld_rwp(iCol,iLay) = cld_condensate(iCol,iLay,3) * tem1 + cld_swp(iCol,iLay) = cld_condensate(iCol,iLay,4) * tem1 endif ! Use radii provided from the macrophysics - cld_reliq(i,k) = Tbd%phy_f3d(i,k,1) - cld_reice(i,k) = max(reice_min, min(reice_max,Tbd%phy_f3d(i,k,2))) - cld_rerain(i,k) = Tbd%phy_f3d(i,k,3) - cld_resnow(i,k) = Tbd%phy_f3d(i,k,4) + cld_reliq(iCol,iLay) = Tbd%phy_f3d(iCol,iLay,1) + cld_reice(iCol,iLay) = max(reice_min, min(reice_max,Tbd%phy_f3d(iCol,iLay,2))) + cld_rerain(iCol,iLay) = Tbd%phy_f3d(iCol,iLay,3) + cld_resnow(iCol,iLay) = Tbd%phy_f3d(iCol,iLay,4) enddo enddo + ! #################################################################################### + ! Cloud (and precipitation) overlap + ! #################################################################################### + + iovr = max(iovrsw,iovrlw) + + ! Compute layer-thickness + do iCol=1,nCol + do iLay=1,nLev + deltaZ(iCol,iLay) = (con_rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + enddo + enddo + + ! + ! Cloud overlap parameter + ! + if (iovr == 3) then + call get_alpha_dcorr(nCol, nLev, lat, deltaZ, de_lgth, cloud_overlap_param) + endif + if (iovr == 4 .or. iovr == 5) then + call get_alpha_exp(nCol, nLev, deltaZ, iovr, lat, julian, yearlen, cld_frac, cloud_overlap_param) + endif + + ! + ! Compute precipitation overlap parameter (Hack. Using same as cloud for now) + ! + precip_overlap_param = cloud_overlap_param + end subroutine GFS_rrtmgp_gfdlmp_pre_run ! ######################################################################################### @@ -179,4 +225,205 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_run subroutine GFS_rrtmgp_gfdlmp_pre_finalize() end subroutine GFS_rrtmgp_gfdlmp_pre_finalize + ! ######################################################################################### + ! Private module routines + ! ######################################################################################### + + ! ######################################################################################### + ! Subroutine to compute cloud-overlap parameter, alpha, for decorrelation-length cloud + ! overlap assumption. + ! ######################################################################################### + subroutine get_alpha_dcorr(nCol, nLev, lat, deltaZ, de_lgth, cloud_overlap_param) + + ! Inputs + integer, intent(in) :: & + nCol, & ! Number of horizontal grid-points + nLev ! Number of vertical-layers + real(kind_phys), dimension(nCol), intent(in) :: & + lat ! Latitude + real(kind_phys), dimension(nCol,nLev),intent(in) :: & + deltaZ ! Layer thickness + + ! Outputs + real(kind_phys), dimension(nCol),intent(out) :: & + de_lgth ! Decorrelation length + real(kind_phys), dimension(nCol,nLev),intent(out) :: & + cloud_overlap_param ! Cloud-overlap parameter + + ! Local + integer :: iCol, iLay + + do iCol =1,nCol + de_lgth(iCol) = max( 0.6, 2.78-4.6*abs(lat(iCol)/con_pi) ) + do iLay=nLev,2,-1 + if (de_lgth(iCol) .gt. 0) then + cloud_overlap_param(iCol,iLay-1) = & + exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) + endif + enddo + enddo + end subroutine get_alpha_dcorr + + ! ######################################################################################### +!> \ingroup module_radiation_clouds +!! This program derives the exponential transition, alpha, from maximum to +!! random overlap needed to define the fractional cloud vertical correlation +!! for the exponential (EXP, iovrlp=4) or the exponential-random (ER, iovrlp=5) +!! cloud overlap options for RRTMGP. For exponential, the transition from +!! maximum to random with distance through model layers occurs without regard +!! to the configuration of clear and cloudy layers. For the ER method, each +!! block of adjacent cloudy layers is treated with a separate transition from +!! maximum to random, and blocks of cloudy layers separated by one or more +!! clear layers are correlated randomly. +!> /param nlon : number of model longitude points +!> /param nlay : vertical layer dimension +!> /param dzlay(nlon,nlay) : distance between the center of model layers +!> /param iovrlp : cloud overlap method +!> : 0 = random +!> : 1 = maximum-random +!> : 2 = maximum +!> : 3 = decorrelation (NOAA/Hou) +!> : 4 = exponential (AER) +!> : 5 = exponential-random (AER) +!> /param latdeg(nlon) : latitude (in degrees 90 -> -90) +!> /param juldat : day of the year (fractional julian day) +!> /param yearlen : current length of the year (365/366 days) +!> /param cldf(nlon,nlay) : cloud fraction +!> /param idcor : decorrelation length method +!> : 0 = constant value (AER; decorr_con) +!> : 1 = latitude and day of year varying value (AER; Oreopoulos, et al., 2012) +!> /param decorr_con : decorrelation length constant +!! +!>\section detail Detailed Algorithm +!! @{ + subroutine get_alpha_exp(nlon, nlay, dzlay, iovrlp, latdeg, juldat, yearlen, cldf, alpha) +! =================================================================== ! +! ! +! abstract: Derives the exponential transition, alpha, from maximum to ! +! random overlap needed to define the fractional cloud vertical ! +! correlation for the exponential (EXP, iovrlp=4) or the exponential- ! +! random (ER, iovrlp=5) cloud overlap options for RRTMG. For ! +! exponential, the transition from maximum to random with distance ! +! through model layers occurs without regard to the configuration of ! +! clear and cloudy layers. For the ER method, each block of adjacent ! +! cloudy layers is treated with a separate transition from maximum to ! +! random, and blocks of cloudy layers separated by one or more ! +! clear layers are correlated randomly. ! +! ! +! usage: call get_alpha ! +! ! +! subprograms called: none ! +! ! +! attributes: ! +! language: fortran 90 ! +! machine: ibm-sp, sgi ! +! ! +! author: m.j. iacono (AER) for use with the RRTMG radiation code ! +! ! +! ==================== definition of variables ==================== ! +! ! +! Input variables: ! +! nlon : number of model longitude points ! +! nlay : vertical layer dimension ! +! dzlay(nlon,nlay) : distance between the center of model layers ! +! iovrlp : cloud overlap method ! +! : 0 = random ! +! : 1 = maximum-random ! +! : 2 = maximum ! +! : 3 = decorrelation (NOAA/Hou) ! +! : 4 = exponential (AER) ! +! : 5 = exponential-random (AER) ! +! latdeg(nlon) : latitude (in degrees 90 -> -90) ! +! juldat : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! +! cldf(nlon,nlay) : cloud fraction ! +! ! +! output variables: ! +! alpha(nlon,nlay) : alpha exponential transition parameter for ! +! : cloud vertical correlation ! +! ! +! external module variables: (in physcons) ! +! decorr_con : decorrelation length constant (km) ! +! ! +! external module variables: (in physparam) ! +! idcor : control flag for decorrelation length method ! +! =0: constant decorrelation length (decorr_con) ! +! =1: latitude and day-of-year varying decorrelation! +! length (AER; Oreopoulos, et al., 2012) ! +! ! +! ==================== end of description ===================== ! +! + use physcons, only: decorr_con + use physparam, only: idcor + implicit none +! Input + integer, intent(in) :: nlon, nlay + integer, intent(in) :: iovrlp + integer, intent(in) :: yearlen + real(kind_phys), dimension(:,:), intent(in) :: dzlay + real(kind_phys), dimension(:,:), intent(in) :: cldf + real(kind_phys), dimension(:), intent(in) :: latdeg + real(kind_phys), intent(in) :: juldat +! Output + real(kind_phys), dimension(:,:), intent(out):: alpha +! Local + integer :: i, k + real(kind_phys) :: decorr_len(nlon) ! Decorrelation length (km) +! Constants for latitude and day-of-year dependent decorrlation length (Oreopoulos et al, 2012) +! Used when idcor = 1 + real(kind_phys), parameter :: am1 = 1.4315_kind_phys + real(kind_phys), parameter :: am2 = 2.1219_kind_phys + real(kind_phys), parameter :: am4 = -25.584_kind_phys + real(kind_phys), parameter :: amr = 7.0_kind_phys + real(kind_phys) :: am3 + real(kind_phys), parameter :: zero = 0.0d0 + real(kind_phys), parameter :: one = 1.0d0 +! +!===> ... begin here +! +! If exponential or exponential-random cloud overlap is used: +! derive day-of-year and latitude-varying decorrelation lendth if requested; +! otherwise use the constant decorrelation length, decorr_con, specified in physcons.F90 + do i = 1, nlon + if (iovrlp == 4 .or. iovrlp == 5) then + if (idcor .eq. 1) then + if (juldat .gt. 181._kind_phys) then + am3 = -4._kind_phys * amr * (juldat - 272._kind_phys) / yearlen + else + am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) / yearlen + endif +! For latitude in degrees, decorr_len in km + decorr_len(i) = am1 + am2 * exp( -(latdeg(i) - am3)**2 / am4**2) + else + decorr_len(i) = decorr_con + endif + endif + enddo +! For atmospheric data defined from surface to toa; define alpha from surface to toa +! Exponential cloud overlap + if (iovrlp == 4) then + do i = 1, nlon + alpha(i,1) = zero + do k = 2, nlay + alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) + enddo + enddo + endif +! Exponential-random cloud overlap + if (iovrlp == 5) then + do i = 1, nlon + alpha(i,1) = zero + do k = 2, nlay + alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (cldf(i,k) .eq. zero .and. cldf(i,k-1) .gt. zero) then + alpha(i,k) = zero + endif + enddo + enddo + endif + return + end subroutine get_alpha_exp + end module GFS_rrtmgp_gfdlmp_pre diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 248348b9b..586587510 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -34,6 +34,31 @@ type = integer intent = in optional = F +[yearlen] + standard_name = number_of_days_in_year + long_name = number of days in a year + units = days + dimensions = () + type = integer + intent = in + optional = F +[julian] + standard_name = julian_day + long_name = julian day + units = days + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radian + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation @@ -43,6 +68,24 @@ kind = kind_phys intent = in optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers @@ -52,6 +95,15 @@ kind = kind_phys intent = in optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction @@ -142,6 +194,33 @@ kind = kind_phys intent = out optional = F +[cloud_overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[precip_overlap_param] + standard_name = precip_overlap_param + long_name = precipitation overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[deltaZ] + standard_name = layer_thickness + long_name = layer_thickness + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/mo_cloud_sampling.F90 b/physics/mo_cloud_sampling.F90 index d743a7af2..02741439f 100644 --- a/physics/mo_cloud_sampling.F90 +++ b/physics/mo_cloud_sampling.F90 @@ -26,7 +26,7 @@ module mo_cloud_sampling ty_optical_props_nstr implicit none private - public :: draw_samples, sampled_mask_max_ran, sampled_mask_exp_dcorr + public :: draw_samples, sampled_mask_max_ran, sampled_mask_exp_dcorr, sampled_mask_exp_ran contains ! ------------------------------------------------------------------------------------------------- ! @@ -394,4 +394,5 @@ subroutine apply_cloud_mask(ncol,nlay,nbnd,ngpt,band_lims_gpt,cloud_mask,input_f end do end do end subroutine apply_cloud_mask + end module mo_cloud_sampling diff --git a/physics/physcons.F90 b/physics/physcons.F90 index 5fb993ac3..8fbdc9930 100644 --- a/physics/physcons.F90 +++ b/physics/physcons.F90 @@ -137,6 +137,9 @@ module physcons real(kind=kind_phys),parameter:: rhosnow = 100._kind_phys !< density of snow (kg/m^3) real(kind=kind_phys),parameter:: rhoair = 1.28_kind_phys !< density of air near surface (kg/m^3) +! Decorrelation length constant (km) for iovrlw/iovrsw = 4 or 5 and idcor = 0 + real(kind=kind_phys),parameter:: decorr_con = 2.50_kind_phys + !........................................! end module physcons ! !========================================! diff --git a/physics/physparam.f b/physics/physparam.f index 795cb4fab..0747b2a14 100644 --- a/physics/physparam.f +++ b/physics/physparam.f @@ -234,6 +234,8 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method +!!\n =4:use exponential overlapping method +!!\n =5:use exponential-random overlapping method !!\n Opr GFS/CFS=1; see IOVR_SW in run scripts integer, save :: iovrsw = 1 !> cloud overlapping control flag for LW @@ -241,9 +243,15 @@ module physparam !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method +!!\n =4:use exponential overlapping method +!!\n =5:use exponential-random overlapping method !!\n Opr GFS/CFS=1; see IOVR_LW in run scripts integer, save :: iovrlw = 1 - +!!\n Decorrelation length type for iovrlw/iovrsw = 4 or 5 +!!\n =0:use constant decorrelation length defined by decorr_con (in module physcons) +!!\n =1:use day-of-year and latitude-varying decorrelation length + integer, save :: idcor = 1 + !> sub-column cloud approx flag in SW radiation !!\n =0:no McICA approximation in SW radiation !!\n =1:use McICA with precribed permutation seeds (test mode) diff --git a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 index 4b97a1301..8b3b57208 100644 --- a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 @@ -104,9 +104,11 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics endif if (.not. doLWrad) return - ! + + ! #################################################################################### ! First sample the clouds... - ! + ! #################################################################################### + ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& lw_optical_props_clouds%alloc_1scl(nCol, nLev, lw_gas_props)) @@ -122,7 +124,6 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics enddo endif - ! Call McICA to generate subcolumns. ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) do iCol=1,ncol @@ -131,10 +132,13 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - ! Call McICA + ! Cloud-overlap. select case ( iovrlw ) case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + sampled_mask_max_ran(rng3D, & + cld_frac, & + cldfracMCICA)) case(3) ! Exponential decorrelation length overlap ! Generate second RNG do iCol=1,ncol @@ -142,19 +146,36 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics call random_number(rng1D,rng_stat) rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& - sampled_mask_exp_dcorr(rng3D,rng3D2,cld_frac,cloud_overlap_param(:,1:nLev-1),cldfracMCICA)) + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + sampled_mask_exp_dcorr(rng3D, & + rng3D2, & + cld_frac, & + cloud_overlap_param(:,1:nLev-1), & + cldfracMCICA)) + case(4) ! Exponential overlap + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D, & + cld_frac, & + cloud_overlap_param(:,1:nLev-1), & + cldfracMCICA)) case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',sampled_mask_exp_ran(rng3D,cld_frac,cldfracMCICA)) + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D, & + cld_frac, & + cloud_overlap_param(:,1:nLev-1), & + cldfracMCICA)) end select - ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',draw_samples(& - cldfracMCICA,lw_optical_props_cloudsByBand,lw_optical_props_clouds)) + ! Sampling. Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + draw_samples(cldfracMCICA, & + lw_optical_props_cloudsByBand, & + lw_optical_props_clouds)) - ! + ! #################################################################################### ! Next sample the precipitation... - ! + ! #################################################################################### + ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& lw_optical_props_precip%alloc_1scl(nCol, nLev, lw_gas_props)) @@ -170,7 +191,6 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics enddo endif - ! Call McICA to generate subcolumns. ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points !! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) @@ -180,11 +200,13 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) !enddo - ! Call McICA + ! Precipitation overlap. select case ( iovrlw ) - ! Maximumn-random case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,precip_frac,precipfracSAMP)) + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + sampled_mask_max_ran(rng3D, & + precip_frac, & + precipfracSAMP)) case(3) ! Exponential decorrelation length overlap ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Generate second RNG @@ -193,17 +215,35 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac,precip_overlap_param(:,1:nLev-1),precipfracSAMP)) + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + sampled_mask_exp_dcorr(rng3D, & + rng3D2, & + precip_frac, & + precip_overlap_param(:,1:nLev-1), & + precipfracSAMP)) + case(4) ! Exponential overlap + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D, & + precip_frac, & + precip_overlap_param(:,1:nLev-1), & + precipfracSAMP)) + case(5) ! Exponential-random overlap + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D, & + precip_frac, & + precip_overlap_param(:,1:nLev-1), & + precipfracSAMP)) end select - ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',draw_samples(& - precipfracSAMP,lw_optical_props_precipByBand,lw_optical_props_precip)) + ! Sampling. Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + draw_samples(precipfracSAMP, & + lw_optical_props_precipByBand, & + lw_optical_props_precip)) - ! + ! #################################################################################### ! For GFDL MP just add precipitation optics to cloud-optics - ! + ! #################################################################################### lw_optical_props_clouds%tau = lw_optical_props_clouds%tau + lw_optical_props_precip%tau end subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run diff --git a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 index ebf2257de..4986e3d61 100644 --- a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 @@ -3,7 +3,8 @@ module rrtmgp_gfdlmp_sw_cloud_sampling use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubcsw, iovrsw use mo_optical_props, only: ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, sampled_mask_exp_ran, draw_samples + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, & + sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use rrtmgp_aux, only: check_error_msg use netcdf @@ -99,7 +100,7 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw errflg = 0 ! Only works w/ SDFs v15p2 and v16beta - if (iovrsw .ne. 1 .and. iovrsw .ne. 3 .and. iovrsw .ne. 4 .an. iovrsw .ne. 5) then + if (iovrsw .ne. 1 .and. iovrsw .ne. 3 .and. iovrsw .ne. 4 .and. iovrsw .ne. 5) then errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' errflg = 1 call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling',errmsg) @@ -108,9 +109,10 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw if (.not. doSWrad) return if (nDay .gt. 0) then - ! + ! ################################################################################# ! First sample the clouds... - ! + ! ################################################################################# + ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & sw_optical_props_clouds%alloc_2str(nday, nLev, sw_gas_props)) @@ -126,7 +128,6 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw enddo endif - ! Call McICA to generate subcolumns. ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points ! and layers. ([nGpts,nLev,nDayumn]-> [nGpts*nLev]*nDayumn) do iday=1,nday @@ -135,49 +136,64 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw rng3D(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - ! Call McICA + ! Cloud overlap. select case ( iovrsw ) case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D,cld_frac(idxday(1:nDay),:),cldfracMCICA)) + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sampled_mask_max_ran(rng3D, & + cld_frac(idxday(1:nDay),:), & + cldfracMCICA)) case(3) ! Decorrelation-length overlap do iday=1,nday call random_setseed(ipseed_sw(iday),rng_stat) call random_number(rng1D,rng_stat) rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D, rng3D2, cld_frac(idxday(1:nDay),:), & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sampled_mask_exp_dcorr(rng3D, & + rng3D2, & + cld_frac(idxday(1:nDay),:), & cloud_overlap_param(idxday(1:nDay),1:nLev-1), & cldfracMCICA)) + case(4) ! Exponential overlap + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D, & + cld_frac(idxday(1:nDay),:), & + cloud_overlap_param(idxday(1:nDay),1:nLev-1), & + cldfracMCICA)) case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D,cld_frac(idxday(1:nDay),:),cldfracMCICA)) + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D, & + cld_frac(idxday(1:nDay),:), & + cloud_overlap_param(idxday(1:nDay),1:nLev-1), & + cldfracMCICA)) end select - ! Map band optical depth to each g-point using McICA + ! Sampling. Map band optical depth to each g-point using McICA call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - draw_samples(cldfracMCICA, sw_optical_props_cloudsByBand, sw_optical_props_clouds)) + draw_samples(cldfracMCICA, & + sw_optical_props_cloudsByBand, & + sw_optical_props_clouds)) - ! + ! ################################################################################# ! Next sample precipitation (same as clouds for now) - ! + ! ################################################################################# + ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run',sw_optical_props_precip%alloc_2str( & - nday, nLev, sw_gas_props)) + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sw_optical_props_precip%alloc_2str( nday, nLev, sw_gas_props)) ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - !if(isubcsw == 1) then ! advance prescribed permutation seed - ! do iday = 1, nday - ! ipseed_sw(iday) = ipsdsw0 + iday - ! enddo - !elseif (isubcsw == 2) then ! use input array of permutaion seeds - ! do iday = 1, nday - ! ipseed_sw(iday) = icseed_sw(iday) - ! enddo - !endif + if(isubcsw == 1) then ! advance prescribed permutation seed + do iday = 1, nday + ipseed_sw(iday) = ipsdsw0 + iday + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iday = 1, nday + ipseed_sw(iday) = icseed_sw(iday) + enddo + endif - ! Call McICA to generate subcolumns. ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points !! and layers. ([nGpts,nLev,nDay]-> [nGpts*nLev]*nDay) @@ -187,11 +203,13 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw ! rng3D(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) !enddo - ! Call McICA + ! Precipitation overlap select case ( iovrsw ) case(1) ! Maximum-random call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D,precip_frac(idxday(1:nDay),:),precipfracSAMP)) + sampled_mask_max_ran(rng3D, & + precip_frac(idxday(1:nDay),:), & + precipfracSAMP)) case(3) ! Exponential-random !! Generate second RNG !do iday=1,nday @@ -199,20 +217,36 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D,rng3D2,precip_frac(idxday(1:nDay),:), & + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sampled_mask_exp_dcorr(rng3D, & + rng3D2, & + precip_frac(idxday(1:nDay),:), & precip_overlap_param(idxday(1:nDay),1:nLev-1), & precipfracSAMP)) + case(4) ! Exponential overlap + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D, & + precip_frac(idxday(1:nDay),:), & + precip_overlap_param(idxday(1:nDay),1:nLev-1), & + precipfracSAMP)) + case(5) ! Exponential-random overlap + call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + sampled_mask_exp_ran(rng3D, & + precip_frac(idxday(1:nDay),:), & + precip_overlap_param(idxday(1:nDay),1:nLev-1), & + precipfracSAMP)) end select ! Map band optical depth to each g-point using McICA call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - draw_samples(precipfracSAMP, sw_optical_props_precipByBand, sw_optical_props_precip)) + draw_samples(precipfracSAMP, & + sw_optical_props_precipByBand, & + sw_optical_props_precip)) endif - ! + ! #################################################################################### ! For GFDL MP just add precipitation optics to cloud-optics - ! + ! #################################################################################### do iGpt=1,sw_gas_props%get_ngpt() do iday=1,nDay do iLay=1,nLev From 5d88f7cffa578e98576ef91273991899e6a07360 Mon Sep 17 00:00:00 2001 From: Joseph Olson Date: Fri, 31 Jul 2020 16:10:17 +0000 Subject: [PATCH 264/404] Updates and bug fix for MYNN surface layer scheme --- physics/module_MYNNSFC_wrapper.F90 | 26 +- physics/module_sf_mynn.F90 | 707 ++++++++++++++++++----------- 2 files changed, 454 insertions(+), 279 deletions(-) diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index 496db7580..7cc64bbcf 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -5,12 +5,16 @@ MODULE mynnsfc_wrapper USE module_sf_mynn + !Global variables: + INTEGER, PARAMETER :: psi_opt = 0 !0: MYNN + !1: GFS + contains - subroutine mynnsfc_wrapper_init () + subroutine mynnsfc_wrapper_init() ! initialize tables for psih and psim (stable and unstable) - CALL PSI_INIT + CALL PSI_INIT(psi_opt) end subroutine mynnsfc_wrapper_init @@ -100,10 +104,10 @@ SUBROUTINE mynnsfc_wrapper_run( & integer, intent(out) :: errflg !MISC CONFIGURATION OPTIONS - INTEGER, PARAMETER :: & - & spp_pbl = 0, & - & isftcflx = 0, & - & iz0tlnd = 0, & + INTEGER, PARAMETER :: & + & spp_pbl = 0, & + & isftcflx = 0, & !control: 0 + & iz0tlnd = 0, & !control: 0 & isfflx = 1 integer, intent(in) :: ivegsrc @@ -166,7 +170,7 @@ SUBROUTINE mynnsfc_wrapper_run( & & lh, wstar !LOCAL real, dimension(im) :: & - & hfx, znt, ts, psim, psih, & + & hfx, znt, psim, psih, & & chs, ck, cd, mavail, xland, GZ1OZ0, & & cpm, qgh, qfx @@ -199,14 +203,11 @@ SUBROUTINE mynnsfc_wrapper_run( & xland(i)=2.0 endif qgh(i)=0.0 + mavail(i)=1.0 !snowh(i)=snowd(i)*800. !mm -> m !znt_lnd(i)=znt_lnd(i)*0.01 !cm -> m !znt_ocn(i)=znt_ocn(i)*0.01 !cm -> m !znt_ice(i)=znt_ice(i)*0.01 !cm -> m - ! DH* do the following line only if wet(i)? - ts(i)=tskin_ocn(i)/exner(i,1) !theta - ! *DH - mavail(i)=1.0 !???? cpm(i)=cp enddo @@ -251,7 +252,8 @@ SUBROUTINE mynnsfc_wrapper_run( & CP=cp,G=g,ROVCP=rcp,R=r_d,XLV=xlv, & SVP1=svp1,SVP2=svp2,SVP3=svp3,SVPT0=svpt0, & EP1=ep_1,EP2=ep_2,KARMAN=karman, & - ISFFLX=isfflx,isftcflx=isftcflx,LSM=lsm,iz0tlnd=iz0tlnd, & + ISFFLX=isfflx,isftcflx=isftcflx,LSM=lsm, & + iz0tlnd=iz0tlnd,psi_opt=psi_opt, & & sigmaf=sigmaf,vegtype=vegtype,shdmax=shdmax,ivegsrc=ivegsrc, & !intent(in) & z0pert=z0pert,ztpert=ztpert, & !intent(in) & redrag=redrag,sfc_z0_type=sfc_z0_type, & !intent(in) diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index 94b118521..ebbc3dcf9 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -7,7 +7,7 @@ MODULE module_sf_mynn !------------------------------------------------------------------- -!Modifications implemented by Joseph Olson NOAA/GSD/AMB - CU/CIRES +!Modifications implemented by Joseph Olson NOAA/GSL !The following overviews the current state of this scheme:: ! ! BOTH LAND AND WATER: @@ -129,11 +129,13 @@ MODULE module_sf_mynn !! and Grachev et al (2000) for unstable conditions and the form !! from Cheng and Brutsaert (2005) for stable conditions. - SUBROUTINE mynn_sf_init_driver(allowed_to_read) + SUBROUTINE mynn_sf_init_driver(allowed_to_read,psi_opt) LOGICAL, INTENT(in) :: allowed_to_read + INTEGER, INTENT(IN) :: psi_opt - CALL psi_init + !CALL psi_init + CALL psi_init(psi_opt) END SUBROUTINE mynn_sf_init_driver @@ -146,7 +148,7 @@ SUBROUTINE SFCLAY_mynn( & PSFCPA,PBLH,MAVAIL,XLAND,DX, & !in CP,G,ROVCP,R,XLV, & !in SVP1,SVP2,SVP3,SVPT0,EP1,EP2,KARMAN, & !in - ISFFLX,isftcflx,lsm,iz0tlnd, & !in + ISFFLX,isftcflx,lsm,iz0tlnd,psi_opt, & !in & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) & z0pert,ztpert, & !intent(in) & redrag,sfc_z0_type, & !intent(in) @@ -285,7 +287,7 @@ SUBROUTINE SFCLAY_mynn( & !NAMELIST/CONFIGURATION OPTIONS: INTEGER, INTENT(IN) :: ISFFLX, LSM INTEGER, OPTIONAL, INTENT(IN) :: ISFTCFLX, IZ0TLND - INTEGER, OPTIONAL, INTENT(IN) :: spp_pbl + INTEGER, OPTIONAL, INTENT(IN) :: spp_pbl, psi_opt integer, intent(in) :: ivegsrc integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) @@ -297,7 +299,7 @@ SUBROUTINE SFCLAY_mynn( & !=================================== ! 3D VARIABLES !=================================== - REAL, DIMENSION( ims:ime, kms:kme, jms:jme ) , & + REAL, DIMENSION( ims:ime, kms:kme ) , & INTENT(IN ) :: dz8w, & QV3D, & P3D, & @@ -306,24 +308,24 @@ SUBROUTINE SFCLAY_mynn( & U3D,V3D, & th3d,pi3d - REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), OPTIONAL, & + REAL, DIMENSION( ims:ime, kms:kme), OPTIONAL, & INTENT(IN) :: pattern_spp_pbl !=================================== ! 2D VARIABLES !=================================== - REAL, DIMENSION( ims:ime, jms:jme ) , & + REAL, DIMENSION( ims:ime ) , & INTENT(IN ) :: MAVAIL, & PBLH, & XLAND, & PSFCPA, & DX - REAL, DIMENSION( ims:ime, jms:jme ) , & + REAL, DIMENSION( ims:ime ) , & INTENT(OUT ) :: U10,V10, & TH2,T2,Q2 - REAL, DIMENSION( ims:ime, jms:jme ) , & + REAL, DIMENSION( ims:ime ) , & INTENT(INOUT) :: HFLX,HFX, & QFLX,QFX, & LH, & @@ -369,7 +371,7 @@ SUBROUTINE SFCLAY_mynn( & !ADDITIONAL OUTPUT !JOE-begin - REAL, DIMENSION( ims:ime, jms:jme ) :: qstar + REAL, DIMENSION( ims:ime ) :: qstar !JOE-end !=================================== ! 1D LOCAL ARRAYS @@ -384,7 +386,7 @@ SUBROUTINE SFCLAY_mynn( & REAL, DIMENSION( its:ite ) :: rstoch1D - INTEGER :: I,J,K,itf,jtf,ktf + INTEGER :: I,J,K,itf,ktf !----------------------------------------------------------- IF (debug_code >= 1) THEN @@ -397,100 +399,91 @@ SUBROUTINE SFCLAY_mynn( & ENDIF itf=ite !MIN0(ite,ide-1) - jtf=jte !MIN0(jte,jde-1) ktf=kte !MIN0(kte,kde-1) - DO J=jts,jte - DO i=its,ite - dz8w1d(I) = dz8w(i,kts,j) - dz2w1d(I) = dz8w(i,kts+1,j) - U1D(i) =U3D(i,kts,j) - V1D(i) =V3D(i,kts,j) - !2nd model level winds - for diags with high-res grids - U1D2(i) =U3D(i,kts+1,j) - V1D2(i) =V3D(i,kts+1,j) - QV1D(i)=QV3D(i,kts,j) - QC1D(i)=QC3D(i,kts,j) - P1D(i) =P3D(i,kts,j) - T1D(i) =T3D(i,kts,j) - if (spp_pbl==1) then - rstoch1D(i)=pattern_spp_pbl(i,kts,j) - else - rstoch1D(i)=0.0 - endif - ENDDO - - IF (itimestep==1 .AND. iter==1) THEN - DO i=its,ite - !Everything here is used before calculated - UST_OCN(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) - UST_LND(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) - UST_ICE(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) - MOL(i,j)=0. ! Tstar - QSFC(i,j)=QV3D(i,kts,j)/(1.+QV3D(i,kts,j)) - QSFC_OCN(i)=QSFC(i,j) - QSFC_LND(i)=QSFC(i,j) - QSFC_ICE(i)=QSFC(i,j) - qstar(i,j)=0.0 - QFX(i,j)=0. - HFX(i,j)=0. - QFLX(i,j)=0. - HFLX(i,j)=0. - ENDDO - ELSE - IF (LSM == 3) THEN - DO i=its,ite - QSFC_LND(i)=QSFC_RUC(i) - ENDDO - ENDIF - ENDIF + DO i=its,ite + dz8w1d(I) = dz8w(i,kts) + dz2w1d(I) = dz8w(i,kts+1) + U1D(i) =U3D(i,kts) + V1D(i) =V3D(i,kts) + !2nd model level winds - for diags with high-res grids + U1D2(i) =U3D(i,kts+1) + V1D2(i) =V3D(i,kts+1) + QV1D(i)=QV3D(i,kts) + QC1D(i)=QC3D(i,kts) + P1D(i) =P3D(i,kts) + T1D(i) =T3D(i,kts) + if (spp_pbl==1) then + rstoch1D(i)=pattern_spp_pbl(i,kts) + else + rstoch1D(i)=0.0 + endif + ENDDO - CALL SFCLAY1D_mynn( & - J,U1D,V1D,T1D,QV1D,P1D,dz8w1d, & - U1D2,V1D2,dz2w1d, & - PSFCPA(ims,j),PBLH(ims,j),MAVAIL(ims,j), & - XLAND(ims,j),DX(ims,j), & - CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & - EP1,EP2,KARMAN, & - ISFFLX,isftcflx,iz0tlnd, & - & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) - & z0pert,ztpert, & !intent(in) - & redrag,sfc_z0_type, & !intent(in) - itimestep,iter, & - wet, dry, icy, & !intent(in) - tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) - tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) - qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) - snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) - ZNT_ocn, ZNT_lnd, ZNT_ice, & !intent(inout) - UST_ocn, UST_lnd, UST_ice, & !intent(inout) - cm_ocn, cm_lnd, cm_ice, & !intent(inout) - ch_ocn, ch_lnd, ch_ice, & !intent(inout) - rb_ocn, rb_lnd, rb_ice, & !intent(inout) - stress_ocn, stress_lnd, stress_ice, & !intent(inout) - fm_ocn, fm_lnd, fm_ice, & !intent(inout) - fh_ocn, fh_lnd, fh_ice, & !intent(inout) - fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) - fh2_ocn, fh2_lnd, fh2_ice, & - HFLX_ocn, HFLX_lnd, HFLX_ice, & - QFLX_ocn, QFLX_lnd, QFLX_ice, & - ch(ims,j),CHS(ims,j),CHS2(ims,j),CQS2(ims,j), & - CPM(ims,j), & - ZNT(ims,j),USTM(ims,j),ZOL(ims,j), & - MOL(ims,j),RMOL(ims,j), & - PSIM(ims,j),PSIH(ims,j), & - HFLX(ims,j),HFX(ims,j),QFLX(ims,j),QFX(ims,j), & - LH(ims,j),FLHC(ims,j),FLQC(ims,j), & - QGH(ims,j),QSFC(ims,j), & - U10(ims,j),V10(ims,j),TH2(ims,j),T2(ims,j),Q2(ims,j),& - GZ1OZ0(ims,j),WSPD(ims,j),wstar(ims,j), & - spp_pbl,rstoch1D, & - ids,ide, jds,jde, kds,kde, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte & - ) + IF (itimestep==1 .AND. iter==1) THEN + DO i=its,ite + !Everything here is used before calculated + UST_OCN(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + UST_LND(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + UST_ICE(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + MOL(i)=0.0 + QSFC(i)=QV3D(i,kts)/(1.+QV3D(i,kts)) + QSFC_OCN(i)=QSFC(i) + QSFC_LND(i)=QSFC(i) + QSFC_ICE(i)=QSFC(i) + qstar(i)=0.0 + QFX(i)=0. + HFX(i)=0. + QFLX(i)=0. + HFLX(i)=0. + ENDDO + ELSE + IF (LSM == 3) THEN + DO i=its,ite + QSFC_LND(i)=QSFC_RUC(i) + ENDDO + ENDIF + ENDIF - ENDDO + CALL SFCLAY1D_mynn( & + J,U1D,V1D,T1D,QV1D,P1D,dz8w1d, & + U1D2,V1D2,dz2w1d, & + PSFCPA,PBLH,MAVAIL,XLAND,DX, & + CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & + EP1,EP2,KARMAN, & + ISFFLX,isftcflx,iz0tlnd,psi_opt, & + sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) + z0pert,ztpert, & !intent(in) + redrag,sfc_z0_type, & !intent(in) + itimestep,iter, & + wet, dry, icy, & !intent(in) + tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) + tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) + qsfc_ocn, qsfc_lnd, qsfc_ice, & !intent(in) + snowh_ocn, snowh_lnd, snowh_ice, & !intent(in) + ZNT_ocn, ZNT_lnd, ZNT_ice, & !intent(inout) + UST_ocn, UST_lnd, UST_ice, & !intent(inout) + cm_ocn, cm_lnd, cm_ice, & !intent(inout) + ch_ocn, ch_lnd, ch_ice, & !intent(inout) + rb_ocn, rb_lnd, rb_ice, & !intent(inout) + stress_ocn, stress_lnd, stress_ice, & !intent(inout) + fm_ocn, fm_lnd, fm_ice, & !intent(inout) + fh_ocn, fh_lnd, fh_ice, & !intent(inout) + fm10_ocn, fm10_lnd, fm10_ice, & !intent(inout) + fh2_ocn, fh2_lnd, fh2_ice, & + HFLX_ocn, HFLX_lnd, HFLX_ice, & + QFLX_ocn, QFLX_lnd, QFLX_ice, & + ch,CHS,CHS2,CQS2,CPM, & + ZNT,USTM,ZOL,MOL,RMOL, & + PSIM,PSIH, & + HFLX,HFX,QFLX,QFX,LH,FLHC,FLQC, & + QGH,QSFC,U10,V10,TH2,T2,Q2, & + GZ1OZ0,WSPD,wstar, & + spp_pbl,rstoch1D, & + ids,ide, jds,jde, kds,kde, & + ims,ime, jms,jme, kms,kme, & + its,ite, jts,jte, kts,kte & + ) END SUBROUTINE SFCLAY_MYNN @@ -505,10 +498,10 @@ SUBROUTINE SFCLAY1D_mynn( & PSFCPA,PBLH,MAVAIL,XLAND,DX, & CP,G,ROVCP,R,XLV,SVP1,SVP2,SVP3,SVPT0, & EP1,EP2,KARMAN, & - ISFFLX,isftcflx,iz0tlnd, & - & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) - & z0pert,ztpert, & !intent(in) - & redrag,sfc_z0_type, & !intent(in) + ISFFLX,isftcflx,iz0tlnd,psi_opt, & + sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) + z0pert,ztpert, & !intent(in) + redrag,sfc_z0_type, & !intent(in) itimestep,iter, & wet, dry, icy, & !intent(in) tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) @@ -560,7 +553,7 @@ SUBROUTINE SFCLAY1D_mynn( & !----------------------------- INTEGER, INTENT(IN) :: ISFFLX INTEGER, OPTIONAL, INTENT(IN ) :: ISFTCFLX, IZ0TLND - INTEGER, INTENT(IN) :: spp_pbl + INTEGER, INTENT(IN) :: spp_pbl, psi_opt integer, intent(in) :: ivegsrc integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han) @@ -676,7 +669,7 @@ SUBROUTINE SFCLAY1D_mynn( & REAL :: PL,E1,TABS REAL :: WSPD_lnd, WSPD_ice, WSPD_ocn - REAL :: DTHVDZ,DTHVM,VCONV,ZOL2,ZOL10,ZOLZA,ZOLZ0 + REAL :: DTHVDZ,DTHVM,VCONV,ZOL2,ZOL10,ZOLZA,ZOLZ0,ZOLZT REAL :: DTG,DTTHX,PSIQ,PSIQ2,PSIQ10,PSIT10 REAL :: FLUXC,VSGD REAL :: restar,VISC,DQG,OLDUST,OLDTST @@ -891,8 +884,8 @@ SUBROUTINE SFCLAY1D_mynn( & rb_ocn(I)=MAX(rb_ocn(I),-2.0) rb_ocn(I)=MIN(rb_ocn(I), 2.0) ELSE - rb_ocn(I)=MAX(rb_ocn(I),-50.0) - rb_ocn(I)=MIN(rb_ocn(I), 50.0) + rb_ocn(I)=MAX(rb_ocn(I),-10.0) + rb_ocn(I)=MIN(rb_ocn(I), 10.0) ENDIF ENDIF ! end water point @@ -931,8 +924,8 @@ SUBROUTINE SFCLAY1D_mynn( & rb_lnd(I)=MAX(rb_lnd(I),-2.0) rb_lnd(I)=MIN(rb_lnd(I), 2.0) ELSE - rb_lnd(I)=MAX(rb_lnd(I),-50.0) - rb_lnd(I)=MIN(rb_lnd(I), 50.0) + rb_lnd(I)=MAX(rb_lnd(I),-10.0) + rb_lnd(I)=MIN(rb_lnd(I), 10.0) ENDIF ENDIF ! end land point @@ -965,8 +958,8 @@ SUBROUTINE SFCLAY1D_mynn( & rb_ice(I)=MAX(rb_ice(I),-2.0) rb_ice(I)=MIN(rb_ice(I), 2.0) ELSE - rb_ice(I)=MAX(rb_ice(I),-50.0) - rb_ice(I)=MIN(rb_ice(I), 50.0) + rb_ice(I)=MAX(rb_ice(I),-10.0) + rb_ice(I)=MIN(rb_ice(I), 10.0) ENDIF ENDIF ! end ice point @@ -1121,11 +1114,11 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF GZ1OZ0_ocn(I)= LOG((ZA(I)+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) - GZ1OZt_ocn(I)= LOG((ZA(I)+ZT_ocn(i))/ZT_ocn(i)) + GZ1OZt_ocn(I)= LOG((ZA(I)+ZNTstoch_ocn(i))/ZT_ocn(i)) GZ2OZ0_ocn(I)= LOG((2.0+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) - GZ2OZt_ocn(I)= LOG((2.0+ZT_ocn(i))/ZT_ocn(i)) + GZ2OZt_ocn(I)= LOG((2.0+ZNTstoch_ocn(i))/ZT_ocn(i)) GZ10OZ0_ocn(I)=LOG((10.+ZNTstoch_ocn(I))/ZNTstoch_ocn(I)) - GZ10OZt_ocn(I)=LOG((10.+ZT_ocn(i))/ZT_ocn(i)) + GZ10OZt_ocn(I)=LOG((10.+ZNTstoch_ocn(i))/ZT_ocn(i)) zratio_ocn(i)=ZNTstoch_ocn(I)/ZT_ocn(I) !need estimate for Li et al. ENDIF !end water point @@ -1178,11 +1171,11 @@ SUBROUTINE SFCLAY1D_mynn( & ENDIF GZ1OZ0_lnd(I)= LOG((ZA(I)+ZNTstoch_lnd(I))/ZNTstoch_lnd(I)) - GZ1OZt_lnd(I)= LOG((ZA(I)+ZT_lnd(i))/ZT_lnd(i)) + GZ1OZt_lnd(I)= LOG((ZA(I)+ZNTstoch_lnd(i))/ZT_lnd(i)) GZ2OZ0_lnd(I)= LOG((2.0+ZNTstoch_lnd(I))/ZNTstoch_lnd(I)) - GZ2OZt_lnd(I)= LOG((2.0+ZT_lnd(i))/ZT_lnd(i)) + GZ2OZt_lnd(I)= LOG((2.0+ZNTstoch_lnd(i))/ZT_lnd(i)) GZ10OZ0_lnd(I)=LOG((10.+ZNTstoch_lnd(I))/ZNTstoch_lnd(I)) - GZ10OZt_lnd(I)=LOG((10.+ZT_lnd(i))/ZT_lnd(i)) + GZ10OZt_lnd(I)=LOG((10.+ZNTstoch_lnd(i))/ZT_lnd(i)) zratio_lnd(i)=ZNTstoch_lnd(I)/ZT_lnd(I) !need estimate for Li et al. ENDIF !end land point @@ -1207,11 +1200,11 @@ SUBROUTINE SFCLAY1D_mynn( & CALL Andreas_2002(ZNTstoch_ice(i),visc,ust_ice(i),ZT_ice(i),ZQ_ice(i)) GZ1OZ0_ice(I)= LOG((ZA(I)+ZNTstoch_ice(I))/ZNTstoch_ice(I)) - GZ1OZt_ice(I)= LOG((ZA(I)+ZT_ice(i))/ZT_ice(i)) + GZ1OZt_ice(I)= LOG((ZA(I)+ZNTstoch_ice(i))/ZT_ice(i)) GZ2OZ0_ice(I)= LOG((2.0+ZNTstoch_ice(I))/ZNTstoch_ice(I)) - GZ2OZt_ice(I)= LOG((2.0+ZT_ice(i))/ZT_ice(i)) + GZ2OZt_ice(I)= LOG((2.0+ZNTstoch_ice(i))/ZT_ice(i)) GZ10OZ0_ice(I)=LOG((10.+ZNTstoch_ice(I))/ZNTstoch_ice(I)) - GZ10OZt_ice(I)=LOG((10.+ZT_ice(i))/ZT_ice(i)) + GZ10OZt_ice(I)=LOG((10.+ZNTstoch_ice(i))/ZT_ice(i)) zratio_ice(i)=ZNTstoch_ice(I)/ZT_ice(I) !need estimate for Li et al. ENDIF !end ice point @@ -1234,13 +1227,10 @@ SUBROUTINE SFCLAY1D_mynn( & IF (rb_ocn(I) .GT. 0.0) THEN !COMPUTE z/L first guess: - IF (itimestep .LE. 1) THEN - CALL Li_etal_2010(ZOL(I),rb_ocn(I),ZA(I)/ZNTstoch_ocn(I),zratio_ocn(I)) - ELSE - ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ocn(I)*UST_ocn(I),0.0001)) - ZOL(I)=MAX(ZOL(I),0.0) - ZOL(I)=MIN(ZOL(I),50.) - ENDIF + CALL Li_etal_2010(ZOL(I),rb_ocn(I),ZA(I)/ZNTstoch_ocn(I),zratio_ocn(I)) + !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ocn(I)*UST_ocn(I),0.0001)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),20.) IF (debug_code >= 1) THEN IF (ZNTstoch_ocn(i) < 1E-8 .OR. Zt_ocn(i) < 1E-10) THEN @@ -1252,11 +1242,15 @@ SUBROUTINE SFCLAY1D_mynn( & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDIF + !Use Pedros iterative function to find z/L - zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I)) + !zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I),psi_opt) + !Use brute-force method + zol(I)=zolrib(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),zt_ocn(I),GZ1OZ0_ocn(I),GZ1OZt_ocn(I),ZOL(I),psi_opt) ZOL(I)=MAX(ZOL(I),0.0) ZOL(I)=MIN(ZOL(I),50.) + zolzt = zol(I)*zt_ocn(I)/ZA(I) ! zt/L zolz0 = zol(I)*ZNTstoch_ocn(I)/ZA(I) ! z0/L zolza = zol(I)*(za(I)+ZNTstoch_ocn(I))/za(I) ! (z+z0/L zol10 = zol(I)*(10.+ZNTstoch_ocn(I))/za(I) ! (10+z0)/L @@ -1269,11 +1263,11 @@ SUBROUTINE SFCLAY1D_mynn( & !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ocn(I),ZNTstoch_ocn(I),ZA(I)) !CALL PSI_CB2005(PSIM(I),PSIH(I),zolza,zolz0) ! or use tables - psim(I)=psim_stable(zolza)-psim_stable(zolz0) - psih(I)=psih_stable(zolza)-psih_stable(zolz0) - psim10(I)=psim_stable(zol10)-psim_stable(zolz0) - psih10(I)=psih_stable(zol10)-psih_stable(zolz0) - psih2(I)=psih_stable(zol2)-psih_stable(zolz0) + psim(I)=psim_stable(zolza,psi_opt)-psim_stable(zolz0,psi_opt) + psih(I)=psih_stable(zolza,psi_opt)-psih_stable(zolzt,psi_opt) + psim10(I)=psim_stable(zol10,psi_opt)-psim_stable(zolz0,psi_opt) + psih10(I)=psih_stable(zol10,psi_opt)-psih_stable(zolz0,psi_opt) + psih2(I)=psih_stable(zol2,psi_opt)-psih_stable(zolzt,psi_opt) ! 1.0 over Monin-Obukhov length RMOL(I)= ZOL(I)/ZA(I) @@ -1298,13 +1292,10 @@ SUBROUTINE SFCLAY1D_mynn( & !========================================================== !COMPUTE z/L first guess: - IF (itimestep .LE. 1) THEN - CALL Li_etal_2010(ZOL(I),rb_ocn(I),ZA(I)/ZNTstoch_ocn(I),zratio_ocn(I)) - ELSE - ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ocn(I)*UST_ocn(I),0.001)) - ZOL(I)=MAX(ZOL(I),-50.0) - ZOL(I)=MIN(ZOL(I),0.0) - ENDIF + CALL Li_etal_2010(ZOL(I),rb_ocn(I),ZA(I)/ZNTstoch_ocn(I),zratio_ocn(I)) + !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ocn(I)*UST_ocn(I),0.001)) + ZOL(I)=MAX(ZOL(I),-20.0) + ZOL(I)=MIN(ZOL(I),0.0) IF (debug_code >= 1) THEN IF (ZNTstoch_ocn(i) < 1E-8 .OR. Zt_ocn(i) < 1E-10) THEN @@ -1316,11 +1307,15 @@ SUBROUTINE SFCLAY1D_mynn( & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDIF + !Use Pedros iterative function to find z/L - zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I)) - ZOL(I)=MAX(ZOL(I),-50.0) + !zol(I)=zolri(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),ZT_ocn(I),ZOL(I),psi_opt) + !Use brute-force method + zol(I)=zolrib(rb_ocn(I),ZA(I),ZNTstoch_ocn(I),zt_ocn(I),GZ1OZ0_ocn(I),GZ1OZt_ocn(I),ZOL(I),psi_opt) + ZOL(I)=MAX(ZOL(I),-20.0) ZOL(I)=MIN(ZOL(I),0.0) + zolzt = zol(I)*zt_ocn(I)/ZA(I) ! zt/L zolz0 = zol(I)*ZNTstoch_ocn(I)/ZA(I) ! z0/L zolza = zol(I)*(za(I)+ZNTstoch_ocn(I))/za(I) ! (z+z0/L zol10 = zol(I)*(10.+ZNTstoch_ocn(I))/za(I) ! (10+z0)/L @@ -1332,11 +1327,11 @@ SUBROUTINE SFCLAY1D_mynn( & !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ocn(I),ZNTstoch_ocn(I),ZA(I)) ! use tables - psim(I)=psim_unstable(zolza)-psim_unstable(zolz0) - psih(I)=psih_unstable(zolza)-psih_unstable(zolz0) - psim10(I)=psim_unstable(zol10)-psim_unstable(zolz0) - psih10(I)=psih_unstable(zol10)-psih_unstable(zolz0) - psih2(I)=psih_unstable(zol2)-psih_unstable(zolz0) + psim(I)=psim_unstable(zolza,psi_opt)-psim_unstable(zolz0,psi_opt) + psih(I)=psih_unstable(zolza,psi_opt)-psih_unstable(zolzt,psi_opt) + psim10(I)=psim_unstable(zol10,psi_opt)-psim_unstable(zolz0,psi_opt) + psih10(I)=psih_unstable(zol10,psi_opt)-psih_unstable(zolz0,psi_opt) + psih2(I)=psih_unstable(zol2,psi_opt)-psih_unstable(zolzt,psi_opt) !---LIMIT PSIH AND PSIM IN THE CASE OF THIN LAYERS AND !---HIGH ROUGHNESS. THIS PREVENTS DENOMINATOR IN FLUXES @@ -1365,13 +1360,10 @@ SUBROUTINE SFCLAY1D_mynn( & IF (rb_lnd(I) .GT. 0.0) THEN !COMPUTE z/L first guess: - IF (itimestep .LE. 1) THEN - CALL Li_etal_2010(ZOL(I),rb_lnd(I),ZA(I)/ZNTstoch_lnd(I),zratio_lnd(I)) - ELSE - ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_lnd(I)*UST_lnd(I),0.0001)) - ZOL(I)=MAX(ZOL(I),0.0) - ZOL(I)=MIN(ZOL(I),50.) - ENDIF + CALL Li_etal_2010(ZOL(I),rb_lnd(I),ZA(I)/ZNTstoch_lnd(I),zratio_lnd(I)) + !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_lnd(I)*UST_lnd(I),0.0001)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),50.) IF (debug_code >= 1) THEN IF (ZNTstoch_lnd(i) < 1E-8 .OR. Zt_lnd(i) < 1E-10) THEN @@ -1383,11 +1375,15 @@ SUBROUTINE SFCLAY1D_mynn( & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDIF + !Use Pedros iterative function to find z/L - zol(I)=zolri(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),ZT_lnd(I),ZOL(I)) + !zol(I)=zolri(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),ZT_lnd(I),ZOL(I),psi_opt) + !Use brute-force method + zol(I)=zolrib(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),zt_lnd(I),GZ1OZ0_lnd(I),GZ1OZt_lnd(I),ZOL(I),psi_opt) ZOL(I)=MAX(ZOL(I),0.0) ZOL(I)=MIN(ZOL(I),50.) + zolzt = zol(I)*zt_lnd(I)/ZA(I) ! zt/L zolz0 = zol(I)*ZNTstoch_lnd(I)/ZA(I) ! z0/L zolza = zol(I)*(za(I)+ZNTstoch_lnd(I))/za(I) ! (z+z0/L zol10 = zol(I)*(10.+ZNTstoch_lnd(I))/za(I) ! (10+z0)/L @@ -1399,11 +1395,11 @@ SUBROUTINE SFCLAY1D_mynn( & !CALL PSI_Zilitinkevich_Esau_2007(PSIM(I),PSIH(I),ZOL(I)) !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_lnd(I),ZNTstoch_lnd(I),ZA(I)) !CALL PSI_CB2005(PSIM(I),PSIH(I),zolza,zolz0) - psim(I)=psim_stable(zolza)-psim_stable(zolz0) - psih(I)=psih_stable(zolza)-psih_stable(zolz0) - psim10(I)=psim_stable(zol10)-psim_stable(zolz0) - psih10(I)=psih_stable(zol10)-psih_stable(zolz0) - psih2(I)=psih_stable(zol2)-psih_stable(zolz0) + psim(I)=psim_stable(zolza,psi_opt)-psim_stable(zolz0,psi_opt) + psih(I)=psih_stable(zolza,psi_opt)-psih_stable(zolzt,psi_opt) + psim10(I)=psim_stable(zol10,psi_opt)-psim_stable(zolz0,psi_opt) + psih10(I)=psih_stable(zol10,psi_opt)-psih_stable(zolz0,psi_opt) + psih2(I)=psih_stable(zol2,psi_opt)-psih_stable(zolzt,psi_opt) ! 1.0 over Monin-Obukhov length RMOL(I)= ZOL(I)/ZA(I) @@ -1428,13 +1424,10 @@ SUBROUTINE SFCLAY1D_mynn( & !========================================================== !COMPUTE z/L first guess: - IF (itimestep .LE. 1) THEN - CALL Li_etal_2010(ZOL(I),rb_lnd(I),ZA(I)/ZNTstoch_lnd(I),zratio_lnd(I)) - ELSE - ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_lnd(I)*UST_lnd(I),0.001)) - ZOL(I)=MAX(ZOL(I),-50.0) - ZOL(I)=MIN(ZOL(I),0.0) - ENDIF + CALL Li_etal_2010(ZOL(I),rb_lnd(I),ZA(I)/ZNTstoch_lnd(I),zratio_lnd(I)) + !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_lnd(I)*UST_lnd(I),0.001)) + ZOL(I)=MAX(ZOL(I),-20.0) + ZOL(I)=MIN(ZOL(I),0.0) IF (debug_code >= 1) THEN IF (ZNTstoch_lnd(i) < 1E-8 .OR. Zt_lnd(i) < 1E-10) THEN @@ -1446,11 +1439,15 @@ SUBROUTINE SFCLAY1D_mynn( & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDIF + !Use Pedros iterative function to find z/L - zol(I)=zolri(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),ZT_lnd(I),ZOL(I)) - ZOL(I)=MAX(ZOL(I),-50.0) + !zol(I)=zolri(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),ZT_lnd(I),ZOL(I),psi_opt) + !Use brute-force method + zol(I)=zolrib(rb_lnd(I),ZA(I),ZNTstoch_lnd(I),zt_lnd(I),GZ1OZ0_lnd(I),GZ1OZt_lnd(I),ZOL(I),psi_opt) + ZOL(I)=MAX(ZOL(I),-20.0) ZOL(I)=MIN(ZOL(I),0.0) + zolzt = zol(I)*zt_lnd(I)/ZA(I) ! zt/L zolz0 = zol(I)*ZNTstoch_lnd(I)/ZA(I) ! z0/L zolza = zol(I)*(za(I)+ZNTstoch_lnd(I))/za(I) ! (z+z0/L zol10 = zol(I)*(10.+ZNTstoch_lnd(I))/za(I) ! (10+z0)/L @@ -1461,11 +1458,11 @@ SUBROUTINE SFCLAY1D_mynn( & !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_lnd(I),ZNTstoch_lnd(I),ZA(I)) ! use tables - psim(I)=psim_unstable(zolza)-psim_unstable(zolz0) - psih(I)=psih_unstable(zolza)-psih_unstable(zolz0) - psim10(I)=psim_unstable(zol10)-psim_unstable(zolz0) - psih10(I)=psih_unstable(zol10)-psih_unstable(zolz0) - psih2(I)=psih_unstable(zol2)-psih_unstable(zolz0) + psim(I)=psim_unstable(zolza,psi_opt)-psim_unstable(zolz0,psi_opt) + psih(I)=psih_unstable(zolza,psi_opt)-psih_unstable(zolzt,psi_opt) + psim10(I)=psim_unstable(zol10,psi_opt)-psim_unstable(zolz0,psi_opt) + psih10(I)=psih_unstable(zol10,psi_opt)-psih_unstable(zolz0,psi_opt) + psih2(I)=psih_unstable(zol2,psi_opt)-psih_unstable(zolzt,psi_opt) !---LIMIT PSIH AND PSIM IN THE CASE OF THIN LAYERS AND !---HIGH ROUGHNESS. THIS PREVENTS DENOMINATOR IN FLUXES @@ -1494,13 +1491,10 @@ SUBROUTINE SFCLAY1D_mynn( & IF (rb_ice(I) .GT. 0.0) THEN !COMPUTE z/L first guess: - IF (itimestep .LE. 1) THEN - CALL Li_etal_2010(ZOL(I),rb_ice(I),ZA(I)/ZNTstoch_ice(I),zratio_ice(I)) - ELSE - ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ice(I)*UST_ice(I),0.0001)) - ZOL(I)=MAX(ZOL(I),0.0) - ZOL(I)=MIN(ZOL(I),50.) - ENDIF + CALL Li_etal_2010(ZOL(I),rb_ice(I),ZA(I)/ZNTstoch_ice(I),zratio_ice(I)) + !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ice(I)*UST_ice(I),0.0001)) + ZOL(I)=MAX(ZOL(I),0.0) + ZOL(I)=MIN(ZOL(I),50.) IF (debug_code >= 1) THEN IF (ZNTstoch_ice(i) < 1E-8 .OR. Zt_ice(i) < 1E-10) THEN @@ -1512,11 +1506,15 @@ SUBROUTINE SFCLAY1D_mynn( & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDIF + !Use Pedros iterative function to find z/L - zol(I)=zolri(rb_ice(I),ZA(I),ZNTstoch_ice(I),ZT_ice(I),ZOL(I)) + !zol(I)=zolri(rb_ice(I),ZA(I),ZNTstoch_ice(I),ZT_ice(I),ZOL(I),psi_opt) + !Use brute-force method + zol(I)=zolrib(rb_ice(I),ZA(I),ZNTstoch_ice(I),zt_ice(I),GZ1OZ0_ice(I),GZ1OZt_ice(I),ZOL(I),psi_opt) ZOL(I)=MAX(ZOL(I),0.0) ZOL(I)=MIN(ZOL(I),50.) + zolzt = zol(I)*zt_ice(I)/ZA(I) ! zt/L zolz0 = zol(I)*ZNTstoch_ice(I)/ZA(I) ! z0/L zolza = zol(I)*(za(I)+ZNTstoch_ice(I))/za(I) ! (z+z0/L zol10 = zol(I)*(10.+ZNTstoch_ice(I))/za(I) ! (10+z0)/L @@ -1528,11 +1526,11 @@ SUBROUTINE SFCLAY1D_mynn( & !CALL PSI_Zilitinkevich_Esau_2007(PSIM(I),PSIH(I),ZOL(I)) !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ice(I),ZNTstoch_ice(I),ZA(I)) !CALL PSI_CB2005(PSIM(I),PSIH(I),zolza,zolz0) - psim(I)=psim_stable(zolza)-psim_stable(zolz0) - psih(I)=psih_stable(zolza)-psih_stable(zolz0) - psim10(I)=psim_stable(zol10)-psim_stable(zolz0) - psih10(I)=psih_stable(zol10)-psih_stable(zolz0) - psih2(I)=psih_stable(zol2)-psih_stable(zolz0) + psim(I)=psim_stable(zolza,psi_opt)-psim_stable(zolz0,psi_opt) + psih(I)=psih_stable(zolza,psi_opt)-psih_stable(zolzt,psi_opt) + psim10(I)=psim_stable(zol10,psi_opt)-psim_stable(zolz0,psi_opt) + psih10(I)=psih_stable(zol10,psi_opt)-psih_stable(zolz0,psi_opt) + psih2(I)=psih_stable(zol2,psi_opt)-psih_stable(zolzt,psi_opt) ! 1.0 over Monin-Obukhov length RMOL(I)= ZOL(I)/ZA(I) @@ -1557,13 +1555,10 @@ SUBROUTINE SFCLAY1D_mynn( & !========================================================== !COMPUTE z/L first guess: - IF (itimestep .LE. 1) THEN - CALL Li_etal_2010(ZOL(I),rb_ice(I),ZA(I)/ZNTstoch_ice(I),zratio_ice(I)) - ELSE - ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ice(I)*UST_ice(I),0.001)) - ZOL(I)=MAX(ZOL(I),-50.0) - ZOL(I)=MIN(ZOL(I),0.0) - ENDIF + CALL Li_etal_2010(ZOL(I),rb_ice(I),ZA(I)/ZNTstoch_ice(I),zratio_ice(I)) + !ZOL(I)=ZA(I)*KARMAN*G*MOL(I)/(TH1D(I)*MAX(UST_ice(I)*UST_ice(I),0.001)) + ZOL(I)=MAX(ZOL(I),-20.0) + ZOL(I)=MIN(ZOL(I),0.0) IF (debug_code >= 1) THEN IF (ZNTstoch_ice(i) < 1E-8 .OR. Zt_ice(i) < 1E-10) THEN @@ -1575,11 +1570,15 @@ SUBROUTINE SFCLAY1D_mynn( & " dz=",dz8w1d(i)," qflx=",qflx(i)," hflx=",hflx(i)," hpbl=",pblh(i) ENDIF ENDIF + !Use Pedros iterative function to find z/L - zol(I)=zolri(rb_ice(I),ZA(I),ZNTstoch_ice(I),ZT_ice(I),ZOL(I)) - ZOL(I)=MAX(ZOL(I),-50.0) + !zol(I)=zolri(rb_ice(I),ZA(I),ZNTstoch_ice(I),ZT_ice(I),ZOL(I),psi_opt) + !Use brute-force method + zol(I)=zolrib(rb_ice(I),ZA(I),ZNTstoch_ice(I),zt_ice(I),GZ1OZ0_ice(I),GZ1OZt_ice(I),ZOL(I),psi_opt) + ZOL(I)=MAX(ZOL(I),-20.0) ZOL(I)=MIN(ZOL(I),0.0) + zolzt = zol(I)*zt_ice(I)/ZA(I) ! zt/L zolz0 = zol(I)*ZNTstoch_ice(I)/ZA(I) ! z0/L zolza = zol(I)*(za(I)+ZNTstoch_ice(I))/za(I) ! (z+z0/L zol10 = zol(I)*(10.+ZNTstoch_ice(I))/za(I) ! (10+z0)/L @@ -1590,11 +1589,11 @@ SUBROUTINE SFCLAY1D_mynn( & !CALL PSI_Businger_1971(PSIM(I),PSIH(I),ZOL(I)) !CALL PSI_DyerHicks(PSIM(I),PSIH(I),ZOL(I),ZT_ice(I),ZNTstoch_ice(I),ZA(I)) ! use tables - psim(I)=psim_unstable(zolza)-psim_unstable(zolz0) - psih(I)=psih_unstable(zolza)-psih_unstable(zolz0) - psim10(I)=psim_unstable(zol10)-psim_unstable(zolz0) - psih10(I)=psih_unstable(zol10)-psih_unstable(zolz0) - psih2(I)=psih_unstable(zol2)-psih_unstable(zolz0) + psim(I)=psim_unstable(zolza,psi_opt)-psim_unstable(zolz0,psi_opt) + psih(I)=psih_unstable(zolza,psi_opt)-psih_unstable(zolzt,psi_opt) + psim10(I)=psim_unstable(zol10,psi_opt)-psim_unstable(zolz0,psi_opt) + psih10(I)=psih_unstable(zol10,psi_opt)-psih_unstable(zolz0,psi_opt) + psih2(I)=psih_unstable(zol2,psi_opt)-psih_unstable(zolzt,psi_opt) !---LIMIT PSIH AND PSIM IN THE CASE OF THIN LAYERS AND !---HIGH ROUGHNESS. THIS PREVENTS DENOMINATOR IN FLUXES @@ -1644,7 +1643,7 @@ SUBROUTINE SFCLAY1D_mynn( & !NON-AVERAGED: !UST_lnd(I)=KARMAN*WSPD(I)/PSIX_lnd(I) !From Tilden Meyers: - !IF (rb_lnd(I) .GE 0.0) THEN + !IF (rb_lnd(I) .GE. 0.0) THEN ! ust_lnd(i)=WSPD_lnd*0.1/(1.0 + 10.0*rb_lnd(I)) !ELSE ! ust_lnd(i)=WSPD_lnd*0.1*(1.0 - 10.0*rb_lnd(I))**onethird @@ -2546,6 +2545,10 @@ SUBROUTINE GFS_z0_lnd(z0max,shdmax,z1,vegtype,ivegsrc,z0pert) END SUBROUTINE GFS_z0_lnd !-------------------------------------------------------------------- ! Taken from the GFS (sfc_diff.f) for comparison +! This formulation comes from Zheng et al. (2012, JGR), which is a +! modified form of the Zilitinkevich thermal roughness length but it adds +! the dependence on vegetation fraction. +! SUBROUTINE GFS_zt_lnd(ztmax,z0max,sigmaf,ztpert,ustar_lnd) REAL, INTENT(OUT) :: ztmax @@ -3227,18 +3230,21 @@ SUBROUTINE Li_etal_2010(zL, Rib, zaz0, z0zt) END SUBROUTINE Li_etal_2010 !------------------------------------------------------------------- - REAL function zolri(ri,za,z0,zt,zol1) + REAL function zolri(ri,za,z0,zt,zol1,psi_opt) ! This iterative algorithm was taken from the revised surface layer ! scheme in WRF-ARW, written by Pedro Jimenez and Jimy Dudhia and ! summarized in Jimenez et al. (2012, MWR). This function was adapted - ! to input the thermal roughness length, zt, (as well as z0) because - ! zt is necessary input for the Dyer-Hicks functions used in MYNN. + ! to input the thermal roughness length, zt, (as well as z0) and use initial + ! estimate of z/L. IMPLICIT NONE REAL, INTENT(IN) :: ri,za,z0,zt,zol1 + INTEGER, INTENT(IN) :: psi_opt REAL :: x1,x2,fx1,fx2 INTEGER :: n + INTEGER, PARAMETER :: nmax = 20 + !REAL, DIMENSION(nmax):: zLhux if (ri.lt.0.)then x1=zol1 - 0.02 !-5. @@ -3248,40 +3254,38 @@ REAL function zolri(ri,za,z0,zt,zol1) x2=zol1 + 0.02 !5. endif - n=0 - fx1=zolri2(x1,ri,za,z0,zt) - fx2=zolri2(x2,ri,za,z0,zt) - Do While (abs(x1 - x2) > 0.01 .and. n < 5) + n=1 + fx1=zolri2(x1,ri,za,z0,zt,psi_opt) + fx2=zolri2(x2,ri,za,z0,zt,psi_opt) + + Do While (abs(x1 - x2) > 0.01 .and. n < nmax) if(abs(fx2).lt.abs(fx1))then x1=x1-fx1/(fx2-fx1)*(x2-x1) - fx1=zolri2(x1,ri,za,z0,zt) + fx1=zolri2(x1,ri,za,z0,zt,psi_opt) zolri=x1 else x2=x2-fx2/(fx2-fx1)*(x2-x1) - fx2=zolri2(x2,ri,za,z0,zt) + fx2=zolri2(x2,ri,za,z0,zt,psi_opt) zolri=x2 endif n=n+1 !print*," n=",n," x1=",x1," x2=",x2 + !zLhux(n)=zolri enddo - if (n==5 .and. abs(x1 - x2) >= 0.01) then - !print*,"iter FAIL, n=",n," Ri=",ri," z/L=",zolri - !Tests results: fails convergence ~ 0.07 % of the time - !set approximate values: - if (ri.lt.0.)then - zolri=ri*5. - else - zolri=ri*8. - endif - !else - ! print*,"iter OK, n=",n," Ri=",ri," z/L=",zolri + if (n==nmax .and. abs(x1 - x2) >= 0.01) then + !if convergence fails, use approximate values: + CALL Li_etal_2010(zolri, ri, za/z0, z0/zt) + !zLhux(n)=zolri + !print*,"iter FAIL, n=",n," Ri=",ri," z0=",z0 + else + !print*,"SUCCESS,n=",n," Ri=",ri," z0=",z0 endif return end function !------------------------------------------------------------------- - REAL function zolri2(zol2,ri2,za,z0,zt) + REAL function zolri2(zol2,ri2,za,z0,zt,psi_opt) ! INPUT: ================================= ! zol2 - estimated z/L @@ -3290,59 +3294,150 @@ REAL function zolri2(zol2,ri2,za,z0,zt) ! z0 - aerodynamic roughness length ! zt - thermal roughness length ! OUTPUT: ================================ - ! zolri2 - updated estimate of z/L + ! zolri2 - delta Ri IMPLICIT NONE + INTEGER, INTENT(IN) :: psi_opt REAL, INTENT(IN) :: ri2,za,z0,zt REAL, INTENT(INOUT) :: zol2 - REAL :: zol20,zol3,psim1,psih1,psix2,psit2 + REAL :: zol20,zol3,psim1,psih1,psix2,psit2,zolt if(zol2*ri2 .lt. 0.)zol2=0. ! limit zol2 - must be same sign as ri2 zol20=zol2*z0/za ! z0/L zol3=zol2+zol20 ! (z+z0)/L + zolt=zol2*zt/za ! zt/L if (ri2.lt.0) then - !CALL PSI_DyerHicks(psim1,psih1,zol3,zt,z0,za) - psix2=log((za+z0)/z0)-(psim_unstable(zol3)-psim_unstable(zol20)) - psit2=log((za+zt)/zt)-(psih_unstable(zol3)-psih_unstable(zol20)) - !psix2=log((za+z0)/z0)-psim1 - !psit2=log((za+zt)/zt)-psih1 + !psix2=log((za+z0)/z0)-(psim_unstable(zol3)-psim_unstable(zol20)) + !psit2=log((za+zt)/zt)-(psih_unstable(zol3)-psih_unstable(zol20)) + psit2=MAX(log((za+z0)/zt)-(psih_unstable(zol3,psi_opt)-psih_unstable(zolt,psi_opt)), 1.0) + psix2=MAX(log((za+z0)/z0)-(psim_unstable(zol3,psi_opt)-psim_unstable(zol20,psi_opt)),1.0) else - !CALL PSI_DyerHicks(psim1,psih1,zol2,zt,z0,za) - !CALL PSI_CB2005(psim1,psih1,zol3,zol20) - psix2=log((za+z0)/z0)-(psim_stable(zol3)-psim_stable(zol20)) - psit2=log((za+zt)/zt)-(psih_stable(zol3)-psih_stable(zol20)) - !psix2=log((za+z0)/z0)-psim1 - !psit2=log((za+zt)/zt)-psih1 + !psix2=log((za+z0)/z0)-(psim_stable(zol3)-psim_stable(zol20)) + !psit2=log((za+zt)/zt)-(psih_stable(zol3)-psih_stable(zol20)) + psit2=MAX(log((za+z0)/zt)-(psih_stable(zol3,psi_opt)-psih_stable(zolt,psi_opt)), 1.0) + psix2=MAX(log((za+z0)/z0)-(psim_stable(zol3,psi_opt)-psim_stable(zol20,psi_opt)),1.0) endif zolri2=zol2*psit2/psix2**2 - ri2 + !print*," target ri=",ri2," est ri=",zol2*psit2/psix2**2 return end function !==================================================================== - SUBROUTINE psi_init - INTEGER :: N - REAL :: zolf + REAL function zolrib(ri,za,z0,zt,logz0,logzt,zol1,psi_opt) - DO N=0,1000 - ! stable function tables - zolf = float(n)*0.01 - psim_stab(n)=psim_stable_full(zolf) - psih_stab(n)=psih_stable_full(zolf) + ! This iterative algorithm to compute z/L from bulk-Ri - ! unstable function tables - zolf = -float(n)*0.01 - psim_unstab(n)=psim_unstable_full(zolf) - psih_unstab(n)=psih_unstable_full(zolf) - ENDDO + IMPLICIT NONE + REAL, INTENT(IN) :: ri,za,z0,zt,logz0,logzt + INTEGER, INTENT(IN) :: psi_opt + REAL, INTENT(INOUT) :: zol1 + REAL :: zol20,zol3,zolt,zolold + INTEGER :: n + INTEGER, PARAMETER :: nmax = 20 + REAL, DIMENSION(nmax):: zLhux + REAL :: psit2,psix2 + + !print*,"+++++++INCOMING: z/L=",zol1," ri=",ri + if (zol1*ri .lt. 0.) THEN + !print*,"begin: WRONG QUADRANTS: z/L=",zol1," ri=",ri + zol1=0. + endif + + if (ri .lt. 0.) then + zolold=-99999. + zolrib=-66666. + else + zolold=99999. + zolrib=66666. + endif + n=1 + + DO While (abs(zolold - zolrib) > 0.01 .and. n < nmax) + + if(n==1)then + zolold=zol1 + else + zolold=zolrib + endif + zol20=zolold*z0/za ! z0/L + zol3=zolold+zol20 ! (z+z0)/L + zolt=zolold*zt/za ! zt/L + !print*,"z0/L=",zol20," (z+z0)/L=",zol3," zt/L=",zolt + if (ri.lt.0) then + !psit2=log((za+zt)/zt)-(psih_unstable(zol3)-psih_unstable(zol20)) + !psit2=log((za+z0)/zt)-(psih_unstable(zol3)-psih_unstable(zol20)) + psit2=MAX(logzt-(psih_unstable(zol3,psi_opt)-psih_unstable(zolt,psi_opt)), 1.0) + psix2=MAX(logz0-(psim_unstable(zol3,psi_opt)-psim_unstable(zol20,psi_opt)), 1.0) + else + !psit2=log((za+zt)/zt)-(psih_stable(zol3)-psih_stable(zol20)) + !psit2=log((za+z0)/zt)-(psih_stable(zol3)-psih_stable(zol20)) + psit2=MAX(logzt-(psih_stable(zol3,psi_opt)-psih_stable(zolt,psi_opt)), 1.0) + psix2=MAX(logz0-(psim_stable(zol3,psi_opt)-psim_stable(zol20,psi_opt)), 1.0) + endif + !print*,"n=",n," psit2=",psit2," psix2=",psix2 + zolrib=ri*psix2**2/psit2 + zLhux(n)=zolrib + n=n+1 + enddo + + if (n==nmax .and. abs(zolold - zolrib) > 0.01 ) then + !print*,"iter FAIL, n=",n," Ri=",ri," z/L=",zolri + !if convergence fails, use approximate values: + CALL Li_etal_2010(zolrib, ri, za/z0, z0/zt) + zLhux(n)=zolrib + !print*,"FAILED, n=",n," Ri=",ri," z0=",z0 + !print*,"z/L=",zLhux(1:nmax) + else + !if(zolrib*ri .lt. 0.) THEN + ! !print*,"end: WRONG QUADRANTS: z/L=",zolrib," ri=",ri + ! !CALL Li_etal_2010(zolrib, ri, za/z0, z0/zt) + !endif + !print*,"SUCCESS,n=",n," Ri=",ri," z0=",z0 + endif + + return + end function +!==================================================================== + + SUBROUTINE psi_init(psi_opt) + + INTEGER :: N,psi_opt + REAL :: zolf + + if (psi_opt == 0) then + DO N=0,1000 + ! stable function tables + zolf = float(n)*0.01 + psim_stab(n)=psim_stable_full(zolf) + psih_stab(n)=psih_stable_full(zolf) + + ! unstable function tables + zolf = -float(n)*0.01 + psim_unstab(n)=psim_unstable_full(zolf) + psih_unstab(n)=psih_unstable_full(zolf) + ENDDO + else + DO N=0,1000 + ! stable function tables + zolf = float(n)*0.01 + psim_stab(n)=psim_stable_full_gfs(zolf) + psih_stab(n)=psih_stable_full_gfs(zolf) + + ! unstable function tables + zolf = -float(n)*0.01 + psim_unstab(n)=psim_unstable_full_gfs(zolf) + psih_unstab(n)=psih_unstable_full_gfs(zolf) + ENDDO + endif END SUBROUTINE psi_init ! ================================================================== -! ... integrated similarity functions ... -! +! ... integrated similarity functions from MYNN... +! REAL function psim_stable_full(zolf) REAL :: zolf @@ -3392,11 +3487,73 @@ REAL function psih_unstable_full(zolf) return end function + +! ================================================================== +! ... integrated similarity functions from GFS... +! + REAL function psim_stable_full_gfs(zolf) + REAL :: zolf + REAL, PARAMETER :: alpha4 = 20. + REAL :: aa + + aa = sqrt(1. + alpha4 * zolf) + psim_stable_full_gfs = -1.*aa + log(aa + 1.) + + return + end function + + REAL function psih_stable_full_gfs(zolf) + REAL :: zolf + REAL, PARAMETER :: alpha4 = 20. + REAL :: bb + + bb = sqrt(1. + alpha4 * zolf) + psih_stable_full_gfs = -1.*bb + log(bb + 1.) + + return + end function + + REAL function psim_unstable_full_gfs(zolf) + REAL :: zolf + REAL :: hl1,tem1 + REAL, PARAMETER :: a0=-3.975, a1=12.32, & + b1=-7.755, b2=6.041 + + if (zolf .ge. -0.5) then + hl1 = zolf + psim_unstable_full_gfs = (a0 + a1*hl1) * hl1 / (1.+ (b1+b2*hl1) *hl1) + else + hl1 = -zolf + tem1 = 1.0 / sqrt(hl1) + psim_unstable_full_gfs = log(hl1) + 2. * sqrt(tem1) - .8776 + end if + + return + end function + + REAL function psih_unstable_full_gfs(zolf) + REAL :: zolf + REAL :: hl1,tem1 + REAL, PARAMETER :: a0p=-7.941, a1p=24.75, & + b1p=-8.705, b2p=7.899 + + if (zolf .ge. -0.5) then + hl1 = zolf + psih_unstable_full_gfs = (a0p + a1p*hl1) * hl1 / (1.+ (b1p+b2p*hl1)*hl1) + else + hl1 = -zolf + tem1 = 1.0 / sqrt(hl1) + psih_unstable_full_gfs = log(hl1) + .5 * tem1 + 1.386 + end if + + return + end function + !================================================================= -! look-up table functions +! look-up table functions - or, if beyond -10 < z/L < 10, recalculate !================================================================= - REAL function psim_stable(zolf) - integer :: nzol + REAL function psim_stable(zolf,psi_opt) + integer :: nzol,psi_opt real :: rzol,zolf nzol = int(zolf*100.) @@ -3404,14 +3561,18 @@ REAL function psim_stable(zolf) if(nzol+1 .le. 1000)then psim_stable = psim_stab(nzol) + rzol*(psim_stab(nzol+1)-psim_stab(nzol)) else - psim_stable = psim_stable_full(zolf) + if (psi_opt == 0) then + psim_stable = psim_stable_full(zolf) + else + psim_stable = psim_stable_full_gfs(zolf) + endif endif return end function - REAL function psih_stable(zolf) - integer :: nzol + REAL function psih_stable(zolf,psi_opt) + integer :: nzol,psi_opt real :: rzol,zolf nzol = int(zolf*100.) @@ -3419,14 +3580,18 @@ REAL function psih_stable(zolf) if(nzol+1 .le. 1000)then psih_stable = psih_stab(nzol) + rzol*(psih_stab(nzol+1)-psih_stab(nzol)) else - psih_stable = psih_stable_full(zolf) + if (psi_opt == 0) then + psih_stable = psih_stable_full(zolf) + else + psih_stable = psih_stable_full_gfs(zolf) + endif endif return end function - REAL function psim_unstable(zolf) - integer :: nzol + REAL function psim_unstable(zolf,psi_opt) + integer :: nzol,psi_opt real :: rzol,zolf nzol = int(-zolf*100.) @@ -3434,14 +3599,18 @@ REAL function psim_unstable(zolf) if(nzol+1 .le. 1000)then psim_unstable = psim_unstab(nzol) + rzol*(psim_unstab(nzol+1)-psim_unstab(nzol)) else - psim_unstable = psim_unstable_full(zolf) + if (psi_opt == 0) then + psim_unstable = psim_unstable_full(zolf) + else + psim_unstable = psim_unstable_full_gfs(zolf) + endif endif return end function - REAL function psih_unstable(zolf) - integer :: nzol + REAL function psih_unstable(zolf,psi_opt) + integer :: nzol,psi_opt real :: rzol,zolf nzol = int(-zolf*100.) @@ -3449,7 +3618,11 @@ REAL function psih_unstable(zolf) if(nzol+1 .le. 1000)then psih_unstable = psih_unstab(nzol) + rzol*(psih_unstab(nzol+1)-psih_unstab(nzol)) else - psih_unstable = psih_unstable_full(zolf) + if (psi_opt == 0) then + psih_unstable = psih_unstable_full(zolf) + else + psih_unstable = psih_unstable_full_gfs(zolf) + endif endif return From 5943288b2298112dbdea47bba9af1385fbb660c5 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Fri, 31 Jul 2020 17:29:24 +0000 Subject: [PATCH 265/404] Changes for flexible number of soil levels. --- physics/gcycle.F90 | 36 ++++--- physics/sfcsub.F | 255 +++++++++++---------------------------------- 2 files changed, 86 insertions(+), 205 deletions(-) diff --git a/physics/gcycle.F90 b/physics/gcycle.F90 index bc1bb032c..c37d39d10 100644 --- a/physics/gcycle.F90 +++ b/physics/gcycle.F90 @@ -58,9 +58,9 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) ABSFCS (Model%nx*Model%ny), & ALFFC1 (Model%nx*Model%ny*2), & ALBFC1 (Model%nx*Model%ny*4), & - SMCFC1 (Model%nx*Model%ny*Model%lsoil), & - STCFC1 (Model%nx*Model%ny*Model%lsoil), & - SLCFC1 (Model%nx*Model%ny*Model%lsoil) + SMCFC1 (Model%nx*Model%ny*max(Model%lsoil,Model%lsoil_lsm)), & + STCFC1 (Model%nx*Model%ny*max(Model%lsoil,Model%lsoil_lsm)), & + SLCFC1 (Model%nx*Model%ny*max(Model%lsoil,Model%lsoil_lsm)) character(len=6) :: tile_num_ch real(kind=kind_phys), parameter :: pifac=180.0/pi @@ -134,10 +134,16 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) ALBFC1 (len + npts*2) = Sfcprop(nb)%alnsf (ix) ALBFC1 (len + npts*3) = Sfcprop(nb)%alnwf (ix) - do ls = 1,Model%lsoil - SMCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%smc (ix,ls) - STCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%stc (ix,ls) - SLCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%slc (ix,ls) + do ls = 1,max(Model%lsoil,Model%lsoil_lsm) + if (Model%lsoil == Model%lsoil_lsm) then + SMCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%smc (ix,ls) + STCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%stc (ix,ls) + SLCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%slc (ix,ls) + else + SMCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%smois (ix,ls) + STCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%tslb (ix,ls) + SLCFC1 (len + (ls-1)*npts) = Sfcprop(nb)%sh2o (ix,ls) + endif enddo IF (SLIFCS(len) .LT. 0.1 .OR. SLIFCS(len) .GT. 1.5) THEN @@ -171,7 +177,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) rewind (Model%nlunit) endif #endif - CALL SFCCYCLE (9998, npts, Model%lsoil, SIG1T, Model%fhcyc, & + CALL SFCCYCLE (9998, npts, max(Model%lsoil,Model%lsoil_lsm), SIG1T, Model%fhcyc, & Model%idate(4), Model%idate(2), & Model%idate(3), Model%idate(1), & Model%phour, RLA, RLO, SLMASK, & @@ -235,10 +241,16 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) Sfcprop(nb)%alvwf (ix) = ALBFC1 (len + npts ) Sfcprop(nb)%alnsf (ix) = ALBFC1 (len + npts*2) Sfcprop(nb)%alnwf (ix) = ALBFC1 (len + npts*3) - do ls = 1,Model%lsoil - Sfcprop(nb)%smc (ix,ls) = SMCFC1 (len + (ls-1)*npts) - Sfcprop(nb)%stc (ix,ls) = STCFC1 (len + (ls-1)*npts) - Sfcprop(nb)%slc (ix,ls) = SLCFC1 (len + (ls-1)*npts) + do ls = 1,max(Model%lsoil,Model%lsoil_lsm) + if(Model%lsoil == Model%lsoil_lsm) then + Sfcprop(nb)%smc (ix,ls) = SMCFC1 (len + (ls-1)*npts) + Sfcprop(nb)%stc (ix,ls) = STCFC1 (len + (ls-1)*npts) + Sfcprop(nb)%slc (ix,ls) = SLCFC1 (len + (ls-1)*npts) + else + Sfcprop(nb)%smois (ix,ls) = SMCFC1 (len + (ls-1)*npts) + Sfcprop(nb)%tslb (ix,ls) = STCFC1 (len + (ls-1)*npts) + Sfcprop(nb)%sh2o (ix,ls) = SLCFC1 (len + (ls-1)*npts) + endif if (ls<=Model%kice) Sfcprop(nb)%tiice (ix,ls) = STCFC1 (len + (ls-1)*npts) enddo ENDDO !-----END BLOCK SIZE LOOP------------------------------ diff --git a/physics/sfcsub.F b/physics/sfcsub.F index 6296e7856..a78ac650f 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -3,7 +3,7 @@ !>\defgroup mod_sfcsub GFS sfcsub Module -!!\ingroup Noah_LSM +!!\ingroup LSMs !> @{ !! This module contains grib code for each parameter-used in subroutines sfccycle() !! and setrmsk(). @@ -299,7 +299,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & parameter(plrlmx=1000.,plrlmn=0.0,plromx=1000.0,plromn=0.0, & plrsmx=1000.,plrsmn=0.0,plrimx=1000.,plrimn=0.0, & plrjmx=1000.,plrjmn=0.0) -!clu [-1l/+1l] relax tsfsmx (for noah lsm) +!clu [-1l/+1l] relax tsfsmx parameter(tsflmx=353.,tsflmn=173.0,tsfomx=313.0,tsfomn=271.2, & tsfsmx=305.0,tsfsmn=173.0,tsfimx=271.2,tsfimn=173.0, & tsfjmx=273.16,tsfjmn=173.0) @@ -384,8 +384,9 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & parameter(snwmin=5.0,snwmax=100.) real (kind=kind_io8), parameter :: ten=10.0, one=1.0 ! -! coeeficients of blending forecast and interpolated clim +! coeficients of blending forecast and interpolated clim ! (or analyzed) fields over sea or land(l) (not for clouds) +!tgs -- important ! 1.0 = use of forecast ! 0.0 = replace with interpolated analysis ! @@ -395,10 +396,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! --------------------------------------------------------- ! surface temperature forecast analysis ! surface temperature forecast forecast (over sea ice) -! albedo analysis analysis +! albedo forecast/analysis analysis ! sea-ice analysis analysis -! snow analysis forecast (over sea ice) -! roughness analysis forecast +! snow forecast/analysis forecast (over sea ice) +! roughness forecast/analysis forecast ! plant resistance analysis analysis ! soil wetness (layer) weighted average analysis ! soil temperature forecast analysis @@ -416,7 +417,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! max snow albedo analysis analysis ! slope type analysis analysis ! liquid soil wetness analysis-weighted analysis -! actual snow depth analysis-weighted analysis +! actual snow depth forecast/analysis-weighted analysis ! ! note: if analysis file is not given, then time interpolated climatology ! is used. if analyiss file is given, it will be used as far as the @@ -533,9 +534,9 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! rec. 1 label ! rec. 2 date record ! rec. 3 tsf -! rec. 4 soilm(two layers) ----> 4 layers +! rec. 4 soilm(lsoil) ! rec. 5 snow -! rec. 6 soilt(two layers) ----> 4 layers +! rec. 6 soilt(lsoil) ! rec. 7 tg3 ! rec. 8 zor ! rec. 9 cv @@ -560,7 +561,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! rec. 25 tprcp ! rec. 26 srflag ! rec. 27 swd -! rec. 28 slc (4 layers) +! rec. 28 slc (lsoil) ! rec. 29 vmn ! rec. 30 vmx ! rec. 31 slp @@ -1234,50 +1235,27 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! ! get soil temp and moisture (after all the qcs are completed) ! + !-- soil moisture if(fnsmcc(1:8).eq.' ') then call getsmc(wetclm,len,lsoil,smcclm,me) endif - call qcmxmn('smc1c ',smcclm(1,1),sliclm,snoclm,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc2c ',smcclm(1,2),sliclm,snoclm,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add smcclm(3:4) - if(lsoil.gt.2) then - call qcmxmn('smc3c ',smcclm(1,3),sliclm,snoclm,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc4c ',smcclm(1,4),sliclm,snoclm,icefl1, + do k=1,lsoil + call qcmxmn('smc ',smcclm(1,k),sliclm,snoclm,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif + enddo + !-- soil temperature if(fnstcc(1:8).eq.' ') then call getstc(tsfclm,tg3clm,sliclm,len,lsoil,stcclm,tsfimx) endif - call qcmxmn('stc1c ',stcclm(1,1),sliclm,snoclm,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc2c ',stcclm(1,2),sliclm,snoclm,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add stcclm(3:4) - if(lsoil.gt.2) then - call qcmxmn('stc3c ',stcclm(1,3),sliclm,snoclm,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc4c ',stcclm(1,4),sliclm,snoclm,icefl1, + do k=1,lsoil + call qcmxmn('stc ',stcclm(1,k),sliclm,snoclm,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif + enddo + call qcmxmn('vegc ',vegclm,sliclm,snoclm,icefl1, & veglmx,veglmn,vegomx,vegomn,vegimx,vegimn, & vegjmx,vegjmn,vegsmx,vegsmn,epsveg, @@ -1335,17 +1313,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('aisclm',aisclm,sliclm,snoclm,len) call monitr('snoclm',snoclm,sliclm,snoclm,len) call monitr('scvclm',scvclm,sliclm,snoclm,len) - call monitr('smcclm1',smcclm(1,1),sliclm,snoclm,len) - call monitr('smcclm2',smcclm(1,2),sliclm,snoclm,len) - call monitr('stcclm1',stcclm(1,1),sliclm,snoclm,len) - call monitr('stcclm2',stcclm(1,2),sliclm,snoclm,len) -!clu [+4l] add smcclm(3:4) and stcclm(3:4) - if(lsoil.gt.2) then - call monitr('smcclm3',smcclm(1,3),sliclm,snoclm,len) - call monitr('smcclm4',smcclm(1,4),sliclm,snoclm,len) - call monitr('stcclm3',stcclm(1,3),sliclm,snoclm,len) - call monitr('stcclm4',stcclm(1,4),sliclm,snoclm,len) - endif + do k=1,lsoil + call monitr('smcclm1',smcclm(1,k),sliclm,snoclm,len) + call monitr('stcclm1',stcclm(1,k),sliclm,snoclm,len) + enddo call monitr('tg3clm',tg3clm,sliclm,snoclm,len) call monitr('zorclm',zorclm,sliclm,snoclm,len) ! if (gaus) then @@ -1637,47 +1608,23 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & if(fnsmca(1:8).eq.' ' .and. fnsmcc(1:8).eq.' ') then call getsmc(wetanl,len,lsoil,smcanl,me) endif - call qcmxmn('smc1a ',smcanl(1,1),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc2a ',smcanl(1,2),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add smcanl(3:4) - if(lsoil.gt.2) then - call qcmxmn('smc3a ',smcanl(1,3),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc4a ',smcanl(1,4),slianl,snoanl,icefl1, + !-- soil moisture + do k=1,lsoil + call qcmxmn('smca ',smcanl(1,1),slianl,snoanl,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif + enddo + !-- soil temperature if(fnstca(1:8).eq.' ') then call getstc(tsfanl,tg3anl,slianl,len,lsoil,stcanl,tsfimx) endif - call qcmxmn('stc1a ',stcanl(1,1),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc2a ',stcanl(1,2),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add stcanl(3:4) - if(lsoil.gt.2) then - call qcmxmn('stc3a ',stcanl(1,3),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc4a ',stcanl(1,4),slianl,snoanl,icefl1, + do k=1,lsoil + call qcmxmn('stca ',stcanl(1,1),slianl,snoanl,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif + enddo call qcmxmn('vega ',veganl,slianl,snoanl,icefl1, & veglmx,veglmn,vegomx,vegomn,vegimx,vegimn, & vegjmx,vegjmn,vegsmx,vegsmn,epsveg, @@ -1723,17 +1670,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('aisanl',aisanl,slianl,snoanl,len) call monitr('snoanl',snoanl,slianl,snoanl,len) call monitr('scvanl',scvanl,slianl,snoanl,len) - call monitr('smcanl1',smcanl(1,1),slianl,snoanl,len) - call monitr('smcanl2',smcanl(1,2),slianl,snoanl,len) - call monitr('stcanl1',stcanl(1,1),slianl,snoanl,len) - call monitr('stcanl2',stcanl(1,2),slianl,snoanl,len) -!clu [+4l] add smcanl(3:4) and stcanl(3:4) - if(lsoil.gt.2) then - call monitr('smcanl3',smcanl(1,3),slianl,snoanl,len) - call monitr('smcanl4',smcanl(1,4),slianl,snoanl,len) - call monitr('stcanl3',stcanl(1,3),slianl,snoanl,len) - call monitr('stcanl4',stcanl(1,4),slianl,snoanl,len) - endif + do k=1,lsoil + call monitr('smcanl',smcanl(1,k),slianl,snoanl,len) + call monitr('stcanl',stcanl(1,k),slianl,snoanl,len) + enddo call monitr('tg3anl',tg3anl,slianl,snoanl,len) call monitr('zoranl',zoranl,slianl,snoanl,len) ! if (gaus) then @@ -1902,44 +1842,20 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & siclmx,siclmn,sicomx,sicomn,sicimx,sicimn, & sicjmx,sicjmn,sicsmx,sicsmn,epssic, & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc1f ',smcfcs(1,1),slifcs,snofcs,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc2f ',smcfcs(1,2),slifcs,snofcs,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add smcfcs(3:4) - if(lsoil.gt.2) then - call qcmxmn('smc3f ',smcfcs(1,3),slifcs,snofcs,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc4f ',smcfcs(1,4),slifcs,snofcs,icefl1, +!-- soil moisture forecast + do k=1,lsoil + call qcmxmn('smcf ',smcfcs(1,k),slifcs,snofcs,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif - call qcmxmn('stc1f ',stcfcs(1,1),slifcs,snofcs,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc2f ',stcfcs(1,2),slifcs,snofcs,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add stcfcs(3:4) - if(lsoil.gt.2) then - call qcmxmn('stc3f ',stcfcs(1,3),slifcs,snofcs,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc4f ',stcfcs(1,4),slifcs,snofcs,icefl1, + enddo +!-- soil temperature forecast + do k=1,lsoil + call qcmxmn('stcf ',stcfcs(1,k),slifcs,snofcs,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif + enddo call qcmxmn('vegf ',vegfcs,slifcs,snofcs,icefl1, & veglmx,veglmn,vegomx,vegomn,vegimx,vegimn, & vegjmx,vegjmn,vegsmx,vegsmn,epsveg, @@ -1985,17 +1901,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('albfcs',albfcs,slifcs,snofcs,len) call monitr('aisfcs',aisfcs,slifcs,snofcs,len) call monitr('snofcs',snofcs,slifcs,snofcs,len) - call monitr('smcfcs1',smcfcs(1,1),slifcs,snofcs,len) - call monitr('smcfcs2',smcfcs(1,2),slifcs,snofcs,len) - call monitr('stcfcs1',stcfcs(1,1),slifcs,snofcs,len) - call monitr('stcfcs2',stcfcs(1,2),slifcs,snofcs,len) -!clu [+4l] add smcfcs(3:4) and stcfcs(3:4) - if(lsoil.gt.2) then - call monitr('smcfcs3',smcfcs(1,3),slifcs,snofcs,len) - call monitr('smcfcs4',smcfcs(1,4),slifcs,snofcs,len) - call monitr('stcfcs3',stcfcs(1,3),slifcs,snofcs,len) - call monitr('stcfcs4',stcfcs(1,4),slifcs,snofcs,len) - endif + do k=1,lsoil + call monitr('smcfcs',smcfcs(1,k),slifcs,snofcs,len) + call monitr('stcfcs',stcfcs(1,k),slifcs,snofcs,len) + enddo call monitr('tg3fcs',tg3fcs,slifcs,snofcs,len) call monitr('zorfcs',zorfcs,slifcs,snofcs,len) ! if (gaus) then @@ -2138,44 +2047,18 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! & plrjmx,plrjmn,plrsmx,plrsmn,epsplr, ! & rla,rlo,len,kqcm,percrit,lgchek,me) ! endif - call qcmxmn('stc1m ',stcanl(1,1),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc2m ',stcanl(1,2),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add stcanl(3:4) - if(lsoil.gt.2) then - call qcmxmn('stc3m ',stcanl(1,3),slianl,snoanl,icefl1, - & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, - & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('stc4m ',stcanl(1,4),slianl,snoanl,icefl1, + do k=1,lsoil + call qcmxmn('stcm ',stcanl(1,k),slianl,snoanl,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif - call qcmxmn('smc1m ',smcanl(1,1),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc2m ',smcanl(1,2),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) -!clu [+8l] add smcanl(3:4) - if(lsoil.gt.2) then - call qcmxmn('smc3m ',smcanl(1,3),slianl,snoanl,icefl1, - & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, - & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, - & rla,rlo,len,kqcm,percrit,lgchek,me) - call qcmxmn('smc4m ',smcanl(1,4),slianl,snoanl,icefl1, + enddo + do k=1,lsoil + call qcmxmn('smcm ',smcanl(1,k),slianl,snoanl,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) - endif + enddo kqcm=1 call qcmxmn('vegm ',veganl,slianl,snoanl,icefl1, & veglmx,veglmn,vegomx,vegomn,vegimx,vegimn, @@ -2258,19 +2141,12 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('albanl',albanl,slianl,snoanl,len) call monitr('aisanl',aisanl,slianl,snoanl,len) call monitr('snoanl',snoanl,slianl,snoanl,len) - call monitr('smcanl1',smcanl(1,1),slianl,snoanl,len) - call monitr('smcanl2',smcanl(1,2),slianl,snoanl,len) - call monitr('stcanl1',stcanl(1,1),slianl,snoanl,len) - call monitr('stcanl2',stcanl(1,2),slianl,snoanl,len) -!clu [+4l] add smcanl(3:4) and stcanl(3:4) - if(lsoil.gt.2) then - call monitr('smcanl3',smcanl(1,3),slianl,snoanl,len) - call monitr('smcanl4',smcanl(1,4),slianl,snoanl,len) - call monitr('stcanl3',stcanl(1,3),slianl,snoanl,len) - call monitr('stcanl4',stcanl(1,4),slianl,snoanl,len) + do k=1,lsoil + call monitr('smcanl',smcanl(1,k),slianl,snoanl,len) + call monitr('stcanl',stcanl(1,k),slianl,snoanl,len) + enddo call monitr('tg3anl',tg3anl,slianl,snoanl,len) call monitr('zoranl',zoranl,slianl,snoanl,len) - endif ! if (gaus) then call monitr('cvaanl',cvanl ,slianl,snoanl,len) call monitr('cvbanl',cvbanl,slianl,snoanl,len) @@ -2344,17 +2220,10 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('albdif4',albfcs(1,4),slianl,snoanl,len) call monitr('aisdif',aisfcs,slianl,snoanl,len) call monitr('snodif',snofcs,slianl,snoanl,len) - call monitr('smcanl1',smcfcs(1,1),slianl,snoanl,len) - call monitr('smcanl2',smcfcs(1,2),slianl,snoanl,len) - call monitr('stcanl1',stcfcs(1,1),slianl,snoanl,len) - call monitr('stcanl2',stcfcs(1,2),slianl,snoanl,len) -!clu [+4l] add smcfcs(3:4) and stc(3:4) - if(lsoil.gt.2) then - call monitr('smcanl3',smcfcs(1,3),slianl,snoanl,len) - call monitr('smcanl4',smcfcs(1,4),slianl,snoanl,len) - call monitr('stcanl3',stcfcs(1,3),slianl,snoanl,len) - call monitr('stcanl4',stcfcs(1,4),slianl,snoanl,len) - endif + do k=1,lsoil + call monitr('smcanl',smcfcs(1,k),slianl,snoanl,len) + call monitr('stcanl',stcfcs(1,k),slianl,snoanl,len) + enddo call monitr('tg3dif',tg3fcs,slianl,snoanl,len) call monitr('zordif',zorfcs,slianl,snoanl,len) ! if (gaus) then From 8a0f31bb21c0a64c9231bfce2949143d18563b3e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 Jul 2020 13:57:36 -0600 Subject: [PATCH 266/404] Added RRTMGP interface for Zhao-Carr scheme. --- physics/GFS_rrtmgp_zhaocarr_pre.F90 | 245 ++++++++++++++++++ physics/GFS_rrtmgp_zhaocarr_pre.meta | 205 +++++++++++++++ ...pling.F90 => rrtmgp_lw_cloud_sampling.F90} | 54 ++-- ...ing.meta => rrtmgp_lw_cloud_sampling.meta} | 4 +- ...pling.F90 => rrtmgp_sw_cloud_sampling.F90} | 68 ++--- ...ing.meta => rrtmgp_sw_cloud_sampling.meta} | 4 +- 6 files changed, 515 insertions(+), 65 deletions(-) create mode 100644 physics/GFS_rrtmgp_zhaocarr_pre.F90 create mode 100644 physics/GFS_rrtmgp_zhaocarr_pre.meta rename physics/{rrtmgp_gfdlmp_lw_cloud_sampling.F90 => rrtmgp_lw_cloud_sampling.F90} (86%) rename physics/{rrtmgp_gfdlmp_lw_cloud_sampling.meta => rrtmgp_lw_cloud_sampling.meta} (97%) rename physics/{rrtmgp_gfdlmp_sw_cloud_sampling.F90 => rrtmgp_sw_cloud_sampling.F90} (85%) rename physics/{rrtmgp_gfdlmp_sw_cloud_sampling.meta => rrtmgp_sw_cloud_sampling.meta} (98%) diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.F90 b/physics/GFS_rrtmgp_zhaocarr_pre.F90 new file mode 100644 index 000000000..20330f0c6 --- /dev/null +++ b/physics/GFS_rrtmgp_zhaocarr_pre.F90 @@ -0,0 +1,245 @@ +! ######################################################################################## +! This module contains the interface between the Zhao-Carr macrophysics and the RRTMGP +! radiation schemes. Only compatable with Model%imp_physics = Model%imp_physics_zhaocarr +! ######################################################################################## +module GFS_rrtmgp_zhaocarr_pre + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_tbd_type + use physcons, only: con_ttp, & ! Temperature at h2o 3pt (K) + con_rd, & ! Gas constant for dry air (J/KgK) + con_pi, & ! PI + con_g, & ! Gravity (m/s2) + con_rog, & + eps => con_eps, & ! Rd/Rv + epsm1 => con_epsm1 ! Rd/Rv-1 + use physparam, only: lcnorm, lcrick, idcor, iovrlw, iovrsw + use rrtmgp_aux, only: check_error_msg + use funcphys, only: fpvs + use radcons, only: qmin + ! Parameters + real(kind_phys), parameter :: & + reliq_def = 10.0 , & ! fault liq radius to 10 micron + reice_def = 50.0, & ! Default ice radius to 50 micron + rerain_def = 1000.0, & ! Default rain radius to 1000 micron + resnow_def = 250.0, & ! Default snow radius to 250 micron + epsq = 1.0e-12, & ! Tiny value + xrc3 = 100., & !??? + gfac = 1.0e5/con_g, & + gord = con_g/con_rd + public GFS_rrtmgp_zhaocarr_pre_init, GFS_rrtmgp_zhaocarr_pre_run, GFS_rrtmgp_zhaocarr_pre_finalize + +contains + ! ###################################################################################### + ! ###################################################################################### + subroutine GFS_rrtmgp_zhaocarr_pre_init() + end subroutine GFS_rrtmgp_zhaocarr_pre_init + + ! ###################################################################################### + ! ###################################################################################### +!! \section arg_table_GFS_rrtmgp_zhaocarr_pre_run +!! \htmlinclude GFS_rrtmgp_zhaocarr_pre_run.html +!! + subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & + p_lev, p_lay, t_lay, relhum, tv_lay, tracer, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, & + cld_swp, cld_resnow, cld_rwp, cld_rerain, errmsg, errflg) + implicit none + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT: FV3-GFS model control parameters + type(GFS_tbd_type), intent(in) :: & + Tbd ! DDT: FV3-GFS data not yet assigned to a defined container + integer, intent(in) :: & + nCol, & ! Number of horizontal grid-points + nLev ! Number of vertical-layers + + real(kind_phys), dimension(nCol), intent(in) :: & + lsmask, & ! Land/Sea mask + lat ! Latitude + real(kind_phys), dimension(nCol,nLev), intent(in) :: & + tv_lay, & ! Virtual temperature (K) + p_lay, & ! Pressure at model-layers (Pa) + t_lay, & ! Temperature at model-layers (K) + relhum ! Relative humidity at model-layers () + real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & + p_lev ! Pressure at model-level interfaces (Pa) + real(kind_phys), dimension(nCol, nLev, Model%ntrac),intent(in) :: & + tracer ! Cloud condensate amount in layer by type () + + ! Outputs + real(kind_phys), dimension(nCol,nLev),intent(out) :: & + cld_frac, & ! Total cloud fraction + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effecive radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius + + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Local variables + real(kind_phys) :: tem1,tem2,tem3,clwt,onemrh,clwm,clwmin,es,qs,value + real(kind_phys), dimension(nCol, nLev, min(4,Model%ncnd)) :: cld_condensate + integer :: iCol,iLay,l,ncndl,iovr + real(kind_phys), dimension(nCol,nLev) :: deltaP + + if (.not. (Model%lsswr .or. Model%lslwr)) return + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Test inputs + if (lcnorm) then + errmsg = 'Namelist option lcnorm is not supported.' + errflg = 1 + call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) + return + endif + + ! Initialize outputs + cld_lwp(:,:) = 0.0 + cld_reliq(:,:) = 0.0 + cld_iwp(:,:) = 0.0 + cld_reice(:,:) = 0.0 + cld_rwp(:,:) = 0.0 + cld_rerain(:,:) = 0.0 + cld_swp(:,:) = 0.0 + cld_resnow(:,:) = 0.0 + + ! #################################################################################### + ! Pull out cloud information for Zhao-Carr MP scheme. + ! #################################################################################### + ! Condensate + cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! Liquid water + + ! Set really tiny suspended particle amounts to clear + do iLay=1,nLev + do iCol=1,nCol + if (cld_condensate(iCol,iLay,1) < epsq) cld_condensate(iCol,iLay,1) = 0.0 + enddo + enddo + + ! Use radii provided from the macrophysics + if (Model%effr_in) then + cld_reliq(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,2) + cld_reice(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,3) + cld_rerain(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,4) + cld_resnow(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,5) + else + cld_reliq(1:nCol,1:nLev) = reliq_def + cld_reice(1:nCol,1:nLev) = reice_def + cld_rerain(1:nCol,1:nLev) = rerain_def + cld_resnow(1:nCol,1:nLev) = resnow_def + endif + + ! Use cloud-fraction from SHOC? + if (Model%uni_cld) then + cld_frac(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,Model%indcld) + ! Compute cloud-fraction + else + clwmin = 0.0e-6 + if (.not. Model%lmfshal) then + do iLay = 1,nLev + do iCol = 1, nCol + es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (p_lay(iCol,iLay) + epsm1*es) ) + clwt = 1.0e-6 * (p_lay(iCol,iLay)*0.001) + if (cld_condensate(iCol,iLay,1) > clwt) then + onemrh= max( 1.e-10, 1.0-relhum(iCol,iLay) ) + clwm = clwmin / max( 0.01, p_lay(iCol,iLay)*0.001 ) + tem1 = min(max(sqrt(sqrt(onemrh*qs)),0.0001),1.0) + tem1 = 2000.0 / tem1 + value = max( min( tem1*(cld_condensate(iCol,iLay,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(relhum(iCol,iLay)) ) + cld_frac(iCol,iLay) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + else + do iLay=1,nLev + do iCol = 1, nCol + es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (p_lay(iCol,iLay) + epsm1*es) ) + clwt = 1.0e-6 * (p_lay(iCol,iLay)*0.001) + if (cld_condensate(iCol,iLay,1) > clwt) then + onemrh= max( 1.e-10, 1.0-relhum(iCol,iLay) ) + clwm = clwmin / max( 0.01, p_lay(iCol,iLay)*0.001 ) + tem1 = min(max((onemrh*qs)**0.49,0.0001),1.0) !jhan + if (Model%lmfdeep2) then + tem1 = xrc3 / tem1 + else + tem1 = 100.0 / tem1 + endif + value = max( min( tem1*(cld_condensate(iCol,iLay,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(relhum(iCol,iLay)) ) + cld_frac(iCol,iLay) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + endif + endif + + ! Add suspended convective cloud water to grid-scale cloud water only for cloud + ! fraction & radiation computation it is to enhance cloudiness due to suspended convec + ! cloud water for zhao/moorthi's (imp_phys=99) + cld_condensate(1:nCol,1:nLev,1) = cld_condensate(1:nCol,1:nLev,1) + Tbd%phy_f3d(1:nCol,1:nLev,6) + + ! Compute cloud liquid/ice condensate path. + do iLay=1,nLev + do iCol=1,nCol + tem1 = max(0.0, cld_condensate(iCol,iLay,1)) * gfac * deltaP(iCol,iLay) + cld_iwp(iCol,iLay) = tem1*(t_lay(iCol,iLay) - 273.16) + cld_lwp(iCol,iLay) = tem1 - cld_iwp(iCol,iLay) + enddo + enddo + + ! Compute effective liquid cloud droplet radius over land. + if(.not. Model%effr_in) then + do iCol = 1, nCol + if (nint(lsmask(iCol)) == 1) then + do iLay = 1, nLev + cld_reliq(iCol,iLay) = 5.0 + 5.0 * (t_lay(iCol,iLay) - 273.16) + enddo + endif + enddo + endif + + ! Compute effective ice cloud droplet radius following Heymsfield + ! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. + if(.not. Model%effr_in) then + deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. + do iLay=1,nLev + do iCol=1,nCol + tem2 = t_lay(iCol,iLay) - con_ttp + if (cld_iwp(iCol,iLay) > 0.0) then + tem3 = gord * cld_iwp(iCol,iLay) * p_lay(iCol,iLay) / (deltaP(iCol,iLay)*tv_lay(iCol,iLay)) + if (tem2 < -50.0) then + cld_reice(iCol,iLay) = (1250.0/9.917) * tem3 ** 0.109 + elseif (tem2 < -40.0) then + cld_reice(iCol,iLay) = (1250.0/9.337) * tem3 ** 0.08 + elseif (tem2 < -30.0) then + cld_reice(iCol,iLay) = (1250.0/9.208) * tem3 ** 0.055 + else + cld_reice(iCol,iLay) = (1250.0/9.387) * tem3 ** 0.031 + endif + cld_reice(iCol,iLay) = max(10.0, min(cld_reice(iCol,iLay), 150.0)) + endif + enddo + enddo + endif + + end subroutine GFS_rrtmgp_zhaocarr_pre_run + + ! ######################################################################################### + ! ######################################################################################### + subroutine GFS_rrtmgp_zhaocarr_pre_finalize() + end subroutine GFS_rrtmgp_zhaocarr_pre_finalize + +end module GFS_rrtmgp_zhaocarr_pre diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta new file mode 100644 index 000000000..0afed8c1e --- /dev/null +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -0,0 +1,205 @@ +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_zhaocarr_pre_run + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Tbd] + standard_name = GFS_tbd_type_instance + long_name = instance of derived type GFS_tbd_type + units = DDT + dimensions = () + type = GFS_tbd_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radian + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature at vertical layer for radiation calculation + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_lwp] + standard_name = cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_reliq] + standard_name = mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_iwp] + standard_name = cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_reice] + standard_name = mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_swp] + standard_name = cloud_snow_water_path + long_name = layer cloud snow water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_resnow] + standard_name = mean_effective_radius_for_snow_flake + long_name = mean effective radius for snow cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_rwp] + standard_name = cloud_rain_water_path + long_name = layer cloud rain water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_rerain] + standard_name = mean_effective_radius_for_rain_drop + long_name = mean effective radius for rain cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 similarity index 86% rename from physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 rename to physics/rrtmgp_lw_cloud_sampling.F90 index 8b3b57208..396c98a76 100644 --- a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -1,4 +1,4 @@ -module rrtmgp_gfdlmp_lw_cloud_sampling +module rrtmgp_lw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubclw, iovrlw @@ -15,10 +15,10 @@ module rrtmgp_gfdlmp_lw_cloud_sampling ! ######################################################################################### ! SUBROUTINE mcica_init ! ######################################################################################### -!! \section arg_table_rrtmgp_gfdlmp_lw_cloud_sampling_init -!! \htmlinclude rrtmgp_gfdlmp_lw_cloud_sampling_init.html +!! \section arg_table_rrtmgp_lw_cloud_sampling_init +!! \htmlinclude rrtmgp_lw_cloud_sampling_init.html !! - subroutine rrtmgp_gfdlmp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0, errmsg, errflg) + subroutine rrtmgp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0, errmsg, errflg) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! RRTMGP DDT: K-distribution data @@ -37,15 +37,15 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0, errmsg, e ! Set initial permutation seed for McICA, initially set to number of G-points ipsdlw0 = lw_gas_props%get_ngpt() - end subroutine rrtmgp_gfdlmp_lw_cloud_sampling_init + end subroutine rrtmgp_lw_cloud_sampling_init ! ######################################################################################### - ! SUBROTUINE rrtmgp_gfdlmp_lw_cloud_sampling_run() + ! SUBROTUINE rrtmgp_lw_cloud_sampling_run() ! ######################################################################################### -!! \section arg_table_rrtmgp_gfdlmp_lw_cloud_sampling_run -!! \htmlinclude rrtmgp_gfdlmp_lw_cloud_sampling_run.html +!! \section arg_table_rrtmgp_lw_cloud_sampling_run +!! \htmlinclude rrtmgp_lw_cloud_sampling_run.html !! - subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, & + subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, & cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, lw_gas_props, & lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, & lw_optical_props_clouds, lw_optical_props_precip, errmsg, errflg) @@ -99,7 +99,7 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics if (iovrlw .ne. 1 .and. iovrlw .ne. 3 .and. iovrlw .ne. 4 .and. iovrlw .ne. 5) then errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' errflg = 1 - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling',errmsg) + call check_error_msg('rrtmgp_lw_cloud_sampling',errmsg) return endif @@ -110,7 +110,7 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! #################################################################################### ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& + call check_error_msg('rrtmgp_lw_cloud_sampling_run',& lw_optical_props_clouds%alloc_1scl(nCol, nLev, lw_gas_props)) ! Change random number seed value for each radiation invocation (isubclw =1 or 2). @@ -135,7 +135,7 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! Cloud-overlap. select case ( iovrlw ) case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_max_ran(rng3D, & cld_frac, & cldfracMCICA)) @@ -146,20 +146,20 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics call random_number(rng1D,rng_stat) rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D, & rng3D2, & cld_frac, & cloud_overlap_param(:,1:nLev-1), & cldfracMCICA)) case(4) ! Exponential overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & cld_frac, & cloud_overlap_param(:,1:nLev-1), & cldfracMCICA)) case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & cld_frac, & cloud_overlap_param(:,1:nLev-1), & @@ -167,7 +167,7 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics end select ! Sampling. Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & draw_samples(cldfracMCICA, & lw_optical_props_cloudsByBand, & lw_optical_props_clouds)) @@ -177,7 +177,7 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! #################################################################################### ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run',& + call check_error_msg('rrtmgp_lw_cloud_sampling_run',& lw_optical_props_precip%alloc_1scl(nCol, nLev, lw_gas_props)) ! Change random number seed value for each radiation invocation (isubclw =1 or 2). @@ -203,7 +203,7 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! Precipitation overlap. select case ( iovrlw ) case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_max_ran(rng3D, & precip_frac, & precipfracSAMP)) @@ -215,20 +215,20 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D, & rng3D2, & precip_frac, & precip_overlap_param(:,1:nLev-1), & precipfracSAMP)) case(4) ! Exponential overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & precip_frac, & precip_overlap_param(:,1:nLev-1), & precipfracSAMP)) case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & precip_frac, & precip_overlap_param(:,1:nLev-1), & @@ -236,7 +236,7 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics end select ! Sampling. Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_gfdlmp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & draw_samples(precipfracSAMP, & lw_optical_props_precipByBand, & lw_optical_props_precip)) @@ -246,12 +246,12 @@ subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, ics ! #################################################################################### lw_optical_props_clouds%tau = lw_optical_props_clouds%tau + lw_optical_props_precip%tau - end subroutine rrtmgp_gfdlmp_lw_cloud_sampling_run + end subroutine rrtmgp_lw_cloud_sampling_run ! ######################################################################################### - ! SUBROTUINE rrtmgp_gfdlmp_lw_cloud_sampling_finalize() + ! SUBROTUINE rrtmgp_lw_cloud_sampling_finalize() ! ######################################################################################### - subroutine rrtmgp_gfdlmp_lw_cloud_sampling_finalize() - end subroutine rrtmgp_gfdlmp_lw_cloud_sampling_finalize + subroutine rrtmgp_lw_cloud_sampling_finalize() + end subroutine rrtmgp_lw_cloud_sampling_finalize -end module rrtmgp_gfdlmp_lw_cloud_sampling +end module rrtmgp_lw_cloud_sampling diff --git a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta similarity index 97% rename from physics/rrtmgp_gfdlmp_lw_cloud_sampling.meta rename to physics/rrtmgp_lw_cloud_sampling.meta index 0eb0835ea..251e1e880 100644 --- a/physics/rrtmgp_gfdlmp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -1,5 +1,5 @@ [ccpp-arg-table] - name = rrtmgp_gfdlmp_lw_cloud_sampling_init + name = rrtmgp_lw_cloud_sampling_init type = scheme [lw_gas_props] standard_name = coefficients_for_lw_gas_optics @@ -37,7 +37,7 @@ ###################################################### [ccpp-arg-table] - name = rrtmgp_gfdlmp_lw_cloud_sampling_run + name = rrtmgp_lw_cloud_sampling_run type = scheme [doLWrad] standard_name = flag_to_calc_lw diff --git a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 similarity index 85% rename from physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 rename to physics/rrtmgp_sw_cloud_sampling.F90 index 4986e3d61..3be4b023e 100644 --- a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -1,4 +1,4 @@ -module rrtmgp_gfdlmp_sw_cloud_sampling +module rrtmgp_sw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubcsw, iovrsw @@ -13,12 +13,12 @@ module rrtmgp_gfdlmp_sw_cloud_sampling contains ! ######################################################################################### - ! SUBROUTINE rrtmgp_gfdlmp_sw_cloud_sampling_init() + ! SUBROUTINE rrtmgp_sw_cloud_sampling_init() ! ######################################################################################### -!! \section arg_table_rrtmgp_gfdlmp_sw_cloud_sampling_init -!! \htmlinclude rrtmgp_gfdlmp_sw_cloud_sampling.html +!! \section arg_table_rrtmgp_sw_cloud_sampling_init +!! \htmlinclude rrtmgp_sw_cloud_sampling.html !! - subroutine rrtmgp_gfdlmp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0, errmsg, errflg) + subroutine rrtmgp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0, errmsg, errflg) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: K-distribution data @@ -37,15 +37,15 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0, errmsg, e ! Set initial permutation seed for McICA, initially set to number of G-points ipsdsw0 = sw_gas_props%get_ngpt() - end subroutine rrtmgp_gfdlmp_sw_cloud_sampling_init + end subroutine rrtmgp_sw_cloud_sampling_init ! ######################################################################################### - ! SUBROTUINE rrtmgp_gfdlmp_sw_cloud_sampling_run() + ! SUBROTUINE rrtmgp_sw_cloud_sampling_run() ! ######################################################################################### -!! \section arg_table_rrtmgp_gfdlmp_sw_cloud_sampling_run -!! \htmlinclude rrtmgp_gfdlmp_sw_cloud_sampling.html +!! \section arg_table_rrtmgp_sw_cloud_sampling_run +!! \htmlinclude rrtmgp_sw_cloud_sampling.html !! - subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & + subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & icseed_sw, cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, & sw_gas_props, sw_optical_props_cloudsByBand, sw_optical_props_precipByBand, & sw_optical_props_clouds, sw_optical_props_precip, errmsg, errflg) @@ -103,7 +103,7 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw if (iovrsw .ne. 1 .and. iovrsw .ne. 3 .and. iovrsw .ne. 4 .and. iovrsw .ne. 5) then errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' errflg = 1 - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling',errmsg) + call check_error_msg('rrtmgp_sw_cloud_sampling',errmsg) return endif @@ -114,7 +114,7 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw ! ################################################################################# ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sw_optical_props_clouds%alloc_2str(nday, nLev, sw_gas_props)) ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). @@ -139,7 +139,7 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw ! Cloud overlap. select case ( iovrsw ) case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_max_ran(rng3D, & cld_frac(idxday(1:nDay),:), & cldfracMCICA)) @@ -149,20 +149,20 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw call random_number(rng1D,rng_stat) rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D, & rng3D2, & cld_frac(idxday(1:nDay),:), & cloud_overlap_param(idxday(1:nDay),1:nLev-1), & cldfracMCICA)) case(4) ! Exponential overlap - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & cld_frac(idxday(1:nDay),:), & cloud_overlap_param(idxday(1:nDay),1:nLev-1), & cldfracMCICA)) case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & cld_frac(idxday(1:nDay),:), & cloud_overlap_param(idxday(1:nDay),1:nLev-1), & @@ -170,9 +170,9 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw end select ! Sampling. Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - draw_samples(cldfracMCICA, & - sw_optical_props_cloudsByBand, & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + draw_samples(cldfracMCICA, & + sw_optical_props_cloudsByBand, & sw_optical_props_clouds)) ! ################################################################################# @@ -180,7 +180,7 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw ! ################################################################################# ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sw_optical_props_precip%alloc_2str( nday, nLev, sw_gas_props)) ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). @@ -206,9 +206,9 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw ! Precipitation overlap select case ( iovrsw ) case(1) ! Maximum-random - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D, & - precip_frac(idxday(1:nDay),:), & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + sampled_mask_max_ran(rng3D, & + precip_frac(idxday(1:nDay),:), & precipfracSAMP)) case(3) ! Exponential-random !! Generate second RNG @@ -217,20 +217,20 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D, & rng3D2, & precip_frac(idxday(1:nDay),:), & precip_overlap_param(idxday(1:nDay),1:nLev-1), & precipfracSAMP)) case(4) ! Exponential overlap - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & precip_frac(idxday(1:nDay),:), & precip_overlap_param(idxday(1:nDay),1:nLev-1), & precipfracSAMP)) case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & precip_frac(idxday(1:nDay),:), & precip_overlap_param(idxday(1:nDay),1:nLev-1), & @@ -238,9 +238,9 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_gfdlmp_sw_cloud_sampling_run', & - draw_samples(precipfracSAMP, & - sw_optical_props_precipByBand, & + call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + draw_samples(precipfracSAMP, & + sw_optical_props_precipByBand, & sw_optical_props_precip)) endif @@ -278,12 +278,12 @@ subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw enddo enddo enddo - end subroutine rrtmgp_gfdlmp_sw_cloud_sampling_run + end subroutine rrtmgp_sw_cloud_sampling_run ! ######################################################################################### - ! SUBROTUINE rrtmgp_gfdlmp_sw_cloud_sampling_finalize() + ! SUBROTUINE rrtmgp_sw_cloud_sampling_finalize() ! ######################################################################################### - subroutine rrtmgp_gfdlmp_sw_cloud_sampling_finalize() - end subroutine rrtmgp_gfdlmp_sw_cloud_sampling_finalize + subroutine rrtmgp_sw_cloud_sampling_finalize() + end subroutine rrtmgp_sw_cloud_sampling_finalize -end module rrtmgp_gfdlmp_sw_cloud_sampling +end module rrtmgp_sw_cloud_sampling diff --git a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta similarity index 98% rename from physics/rrtmgp_gfdlmp_sw_cloud_sampling.meta rename to physics/rrtmgp_sw_cloud_sampling.meta index 42aa3c2de..7ce6a708d 100644 --- a/physics/rrtmgp_gfdlmp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -1,5 +1,5 @@ [ccpp-arg-table] - name = rrtmgp_gfdlmp_sw_cloud_sampling_init + name = rrtmgp_sw_cloud_sampling_init type = scheme [sw_gas_props] standard_name = coefficients_for_sw_gas_optics @@ -37,7 +37,7 @@ ###################################################### [ccpp-arg-table] - name = rrtmgp_gfdlmp_sw_cloud_sampling_run + name = rrtmgp_sw_cloud_sampling_run type = scheme [doSWrad] standard_name = flag_to_calc_sw From 7fcec1f48fdea6686083a03b7151ea0829746887 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 Jul 2020 17:40:21 -0600 Subject: [PATCH 267/404] Cleanup from Doms comments in PR 446 --- physics/GFS_cloud_diagnostics.F90 | 12 +++++++++--- physics/GFS_cloud_diagnostics.meta | 1 + physics/GFS_rrtmgp_setup.F90 | 12 ++++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index 9055cd578..8ee548aea 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -119,7 +119,7 @@ end subroutine GFS_cloud_diagnostics_finalize ! ###################################################################################### ! Initialization routine for High/Mid/Low cloud diagnostics. ! ###################################################################################### - subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit) + subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit, errflg) implicit none ! Inputs type(GFS_control_type), intent(in) :: & @@ -129,9 +129,15 @@ subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit) mpi_rank real(kind_phys), dimension(nLev+1), intent(in) :: & sigmainit + ! Outputs + integer, intent(out) :: & + errflg ! Local variables integer :: iLay, kl + + ! Initialize error flag + errflg = 0 ! Cloud overlap used for diagnostic HML cloud outputs iovr = max(iovrsw,iovrlw) @@ -140,7 +146,7 @@ subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit) if ( icldflg == 0 ) then print *,' - Diagnostic Cloud Method has been discontinued' - stop ! NoNo + errflg = 1 else if (mpi_rank == 0) then print *,' - Using Prognostic Cloud Method' @@ -161,7 +167,7 @@ subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit) else print *,' !!! ERROR in cloud microphysc specification!!!', & ' imp_physics (NP3D) =',Model%imp_physics - stop + errflg = 1 endif endif endif diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index babc2cb28..b3cb423c5 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -34,6 +34,7 @@ type = real intent = in kind = kind_phys + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 894450773..f890b30ee 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -121,7 +121,7 @@ subroutine GFS_rrtmgp_setup_init (Model, si, levr, ictm, isol, ico2, & endif - call radinit( Model, si, levr, imp_physics, me ) + call radinit( Model, si, levr, imp_physics, me, errflg ) if ( me == 0 ) then print *,' Radiation sub-cloud initial seed =',ipsd0, & @@ -197,13 +197,13 @@ end subroutine GFS_rrtmgp_setup_finalize ! Private functions - subroutine radinit( Model, si, NLAY, imp_physics, me ) + subroutine radinit( Model, si, NLAY, imp_physics, me, errflg ) !................................... ! --- inputs: ! & ( si, NLAY, imp_physics, me ) ! --- outputs: -! ( none ) +! ( errflg ) ! ================= subprogram documentation block ================ ! ! ! @@ -325,9 +325,13 @@ subroutine radinit( Model, si, NLAY, imp_physics, me ) real (kind=kind_phys), intent(in) :: si(:) ! --- outputs: (none, to module variables) + integer, intent(out) :: & + errflg ! --- locals: + ! Initialize + errflg = 0 ! !===> ... begin here ! @@ -408,7 +412,7 @@ subroutine radinit( Model, si, NLAY, imp_physics, me ) call aer_init ( NLAY, me ) ! --- ... aerosols initialization routine call gas_init ( me ) ! --- ... co2 and other gases initialization routine call sfc_init ( me ) ! --- ... surface initialization routine - call hml_cloud_diagnostics_initialize( Model, NLAY, me, si) + call hml_cloud_diagnostics_initialize( Model, NLAY, me, si, errflg) return !................................... From b7c2a5ed7e2340a1397ea373ec0e6e68207759c3 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 Jul 2020 17:41:03 -0600 Subject: [PATCH 268/404] Add optional to field in meta file --- physics/GFS_rrtmgp_gfdlmp_pre.meta | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 586587510..5a20836b8 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -58,7 +58,8 @@ dimensions = (horizontal_dimension) type = real intent = in - kind = kind_phys + kind = kind_phys + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation From 0d72c531630a7c5560fb86ce59a8f2fd91419ca6 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 Jul 2020 17:42:29 -0600 Subject: [PATCH 269/404] Remove DDTs from argument list in GFS_rrtmgp_pre. Also removed use statements and added physical/algorithmic constants to the Interstitial type. --- physics/GFS_rrtmgp_pre.F90 | 182 +++++++++++++---------------- physics/GFS_rrtmgp_pre.meta | 226 +++++++++++++++++++++++++++++------- 2 files changed, 264 insertions(+), 144 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 7c3609af4..e4110c950 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -1,54 +1,16 @@ module GFS_rrtmgp_pre - use physparam use machine, only: & kind_phys ! Working type - use GFS_typedefs, only: & - GFS_statein_type, & ! Prognostic state data in from dycore - GFS_stateout_type, & ! Prognostic state or tendencies return to dycore - GFS_sfcprop_type, & ! Surface fields - GFS_control_type, & ! Model control parameters - GFS_grid_type, & ! Grid and interpolation related data - GFS_tbd_type, & ! To-Be-Determined data that doesn't fit in any one container - GFS_diag_type ! Fields targetted for diagnostic output - use physcons, only: & - eps => con_eps, & ! Rd/Rv - epsm1 => con_epsm1, & ! Rd/Rv-1 - fvirt => con_fvirt, & ! Rv/Rd-1 - rog => con_rog ! Rd/g - use radcons, only: & - qmin, epsq ! Minimum vlaues for varius calculations use funcphys, only: & fpvs ! Function ot compute sat. vapor pressure over liq. - use module_radiation_astronomy,only: & - coszmn ! Function to compute cos(SZA) use module_radiation_gases, only: & NF_VGAS, & ! Number of active gas species getgases, & ! Routine to setup trace gases getozn ! Routine to setup ozone - use module_radiation_aerosols, only: & - NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) - NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) - setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) - NSPC1 ! Number of species for vertically integrated aerosol optical-depth - use module_radiation_clouds, only: & - NF_CLDS, & ! Number of fields in "clouds" array (e.g. (cloud(1)=lwp,clouds(2)=ReffLiq,...) - progcld1, & ! Zhao/Moorthi's prognostic cloud scheme - progcld3, & ! Zhao/Moorthi's prognostic cloud+pdfcld - progcld4, & ! GFDL cloud scheme - progcld5, & ! Thompson / WSM6 cloud micrphysics scheme - progclduni ! Unified cloud-scheme - use surface_perturbation, only: & - cdfnor ! Routine to compute CDF (used to compute percentiles) - use module_radiation_surface, only: & - setemis, & ! Routine to compute surface-emissivity - NF_ALBD, & ! Number of surface albedo categories (4; nir-direct, nir-diffuse, uvvis-direct, uvvis-diffuse) - setalb ! Routine to compute surface albedo ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_aux, only: check_error_msg!, rrtmgp_minP, rrtmgp_minT - use mo_rrtmgp_constants, only: grav, avogad - use mo_rrtmg_lw_cloud_optics + use rrtmgp_aux, only: check_error_msg real(kind_phys), parameter :: & amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) @@ -83,13 +45,14 @@ module GFS_rrtmgp_pre !! \section arg_table_GFS_rrtmgp_pre_init !! \htmlinclude GFS_rrtmgp_pre_init.html !! - subroutine GFS_rrtmgp_pre_init(Model, active_gases_array, errmsg, errflg) + subroutine GFS_rrtmgp_pre_init(nGases, active_gases, active_gases_array, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(inout) :: & - Model ! DDT: FV3-GFS model control parameters - + integer, intent(in) :: & + nGases ! Number of active gases in RRTMGP + character(len=*), intent(in) :: & + active_gases ! List of active gases from namelist. ! Outputs - character(len=*),dimension(Model%ngases), intent(out) :: & + character(len=*),dimension(nGases), intent(out) :: & active_gases_array ! Character array containing trace gases to include in RRTMGP character(len=*), intent(out) :: & errmsg ! Error message @@ -99,13 +62,13 @@ subroutine GFS_rrtmgp_pre_init(Model, active_gases_array, errmsg, errflg) ! Local variables character(len=1) :: tempstr integer :: ij, count - integer,dimension(Model%ngases,2) :: gasIndices + integer,dimension(nGases,2) :: gasIndices ! Initialize errmsg = '' errflg = 0 - if (len(Model%active_gases) .eq. 0) return + if (len(active_gases) .eq. 0) return ! Which gases are active? Provided via physics namelist. @@ -113,23 +76,23 @@ subroutine GFS_rrtmgp_pre_init(Model, active_gases_array, errmsg, errflg) ! First grab indices in character array corresponding to start:end of gas name. gasIndices(1,1)=1 count=1 - do ij=1,len(Model%active_gases) - tempstr=trim(Model%active_gases(ij:ij)) + do ij=1,len(active_gases) + tempstr=trim(active_gases(ij:ij)) if (tempstr .eq. '_') then gasIndices(count,2)=ij-1 gasIndices(count+1,1)=ij+1 count=count+1 endif enddo - gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) + gasIndices(nGases,2)=len(trim(active_gases)) ! Now extract the gas names - do ij=1,Model%ngases - active_gases_array(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) + do ij=1,nGases + active_gases_array(ij) = active_gases(gasIndices(ij,1):gasIndices(ij,2)) enddo ! Which gases are active? (This is purely for flexibility) - do ij=1,Model%ngases + do ij=1,nGases if(trim(active_gases_array(ij)) .eq. 'h2o') then isActive_h2o = .true. istr_h2o = ij @@ -180,25 +143,45 @@ end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run !! \htmlinclude GFS_rrtmgp_pre_run.html !! - subroutine GFS_rrtmgp_pre_run(Model, Grid, Statein, Sfcprop, Tbd, ncol, active_gases_array, & - raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, tv_lay, relhum, tracer, & + subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, fhswr, & + fhlwr, xlat, xlon, prsl, tgrs, prslk, prsi, qgrs, tsfc, active_gases_array, & + pcon_eps, pcon_epsm1, pcon_fvirt, acon_qMin, & + raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, tv_lay, relhum, tracer, & gas_concentrations, errmsg, errflg) - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters - type(GFS_grid_type), intent(in) :: & - Grid ! DDT: FV3-GFS grid and interpolation related data - type(GFS_statein_type), intent(in) :: & - Statein ! DDT: FV3-GFS prognostic state data in from dycore - type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! DDT: FV3-GFS surface fields - type(GFS_tbd_type), intent(in) :: & - Tbd ! DDT: FV3-GFS data not yet assigned to a defined container + ! Inputs integer, intent(in) :: & - ncol ! Number of horizontal grid points - character(len=*),dimension(Model%ngases), intent(in) :: & + nCol, & ! Number of horizontal grid points + nLev, & ! Number of vertical layers + nGases, & ! Number of active gases in RRTMGP. + nTracers, & ! Number of tracers from model. + i_o3 ! Index into tracer array for ozone + logical, intent(in) :: & + lsswr, & ! Call SW radiation? + lslwr ! Call LW radiation + character(len=*),dimension(nGases), intent(in) :: & active_gases_array ! Character array containing trace gases to include in RRTMGP + real(kind_phys), intent(in) :: & + fhswr, & ! Frequency of SW radiation call. + fhlwr ! Frequency of LW radiation call. + real(kind_phys), intent(in) :: & + pcon_eps, & ! Physical constant: Epsilon (Rd/Rv) + pcon_epsm1, & ! Physical constant: Epsilon (Rd/Rv) minus one + pcon_fvirt, & ! Physical constant: Inverse of epsilon minus one + acon_qMin ! Algorithmic constant: Lower limit for saturation vapor pressure + + real(kind_phys), dimension(nCol), intent(in) :: & + xlon, & ! Longitude + xlat, & ! Latitude + tsfc ! Surface skin temperature (K) + real(kind_phys), dimension(nCol,nLev), intent(in) :: & + prsl, & ! Pressure at model-layer centers (Pa) + tgrs, & ! Temperature at model-layer centers (K) + prslk ! Exner function at model layer centers (1) + real(kind_phys), dimension(nCol,nLev+1) :: & + prsi ! Pressure at model-interfaces (Pa) + real(kind_phys), dimension(nCol,nLev,nTracers) :: & + qgrs ! Tracer concentrations (kg/kg) ! Outputs character(len=*), intent(out) :: & @@ -210,15 +193,15 @@ subroutine GFS_rrtmgp_pre_run(Model, Grid, Statein, Sfcprop, Tbd, ncol, active_g real(kind_phys), dimension(ncol), intent(out) :: & tsfg, & ! Ground temperature tsfa ! Skin temperature - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + real(kind_phys), dimension(nCol,nLev), intent(out) :: & p_lay, & ! Pressure at model-layer t_lay, & ! Temperature at model layer tv_lay, & ! Virtual temperature at model-layers relhum ! Relative-humidity at model-layers - real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & + real(kind_phys), dimension(nCol,nLev+1), intent(out) :: & p_lev, & ! Pressure at model-interface t_lev ! Temperature at model-interface - real(kind_phys), dimension(ncol, Model%levs, Model%ntrac),intent(out) :: & + real(kind_phys), dimension(nCol, nLev, nTracers),intent(out) :: & tracer ! Array containing trace gases type(ty_gas_concs),intent(out) :: & gas_concentrations ! RRTMGP DDT: gas volumne mixing ratios @@ -226,28 +209,27 @@ subroutine GFS_rrtmgp_pre_run(Model, Grid, Statein, Sfcprop, Tbd, ncol, active_g ! Local variables integer :: i, j, iCol, iBand, iSFC, iTOA, iLay logical :: top_at_1 - real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o + real(kind_phys),dimension(nCol,nLev) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs, tem1, tem2 - real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol, Model%levs) :: o3_lay, qs_lay, q_lay - real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr - - if (.not. (Model%lsswr .or. Model%lslwr)) return + real(kind_phys), dimension(nCol,nLev) :: o3_lay, qs_lay, q_lay + real(kind_phys), dimension(nCol,nLev, NF_VGAS) :: gas_vmr ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + if (.not. (lsswr .or. lslwr)) return + ! ####################################################################################### ! What is vertical ordering? ! ####################################################################################### - top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + top_at_1 = (prsi(1,1) .lt. prsi(1, nLev)) if (top_at_1) then - iSFC = Model%levs + iSFC = nLev iTOA = 1 else iSFC = 1 - iTOA = Model%levs + iTOA = nLev endif ! ####################################################################################### @@ -255,25 +237,25 @@ subroutine GFS_rrtmgp_pre_run(Model, Grid, Statein, Sfcprop, Tbd, ncol, active_g ! ####################################################################################### ! Water-vapor mixing-ratio - q_lay(1:ncol,:) = Statein%qgrs(1:NCOL,:,1) + q_lay(1:ncol,:) = qgrs(1:NCOL,:,1) where(q_lay .lt. 1.e-6) q_lay = 1.e-6 ! Pressure at layer-interface - p_lev(1:NCOL,:) = Statein%prsi(1:NCOL,:) + p_lev(1:NCOL,:) = prsi(1:NCOL,:) ! Pressure at layer-center - p_lay(1:NCOL,:) = Statein%prsl(1:NCOL,:) + p_lay(1:NCOL,:) = prsl(1:NCOL,:) ! Temperature at layer-center - t_lay(1:NCOL,:) = Statein%tgrs(1:NCOL,:) + t_lay(1:NCOL,:) = tgrs(1:NCOL,:) ! Temperature at layer-interfaces if (top_at_1) then t_lev(1:NCOL,1) = t_lay(1:NCOL,iTOA) t_lev(1:NCOL,2:iSFC) = (t_lay(1:NCOL,2:iSFC)+t_lay(1:NCOL,1:iSFC-1))/2._kind_phys - t_lev(1:NCOL,iSFC+1) = Sfcprop%tsfc(1:NCOL) + t_lev(1:NCOL,iSFC+1) = tsfc(1:NCOL) else - t_lev(1:NCOL,1) = Sfcprop%tsfc(1:NCOL) + t_lev(1:NCOL,1) = tsfc(1:NCOL) t_lev(1:NCOL,2:iTOA) = (t_lay(1:NCOL,2:iTOA)+t_lay(1:NCOL,1:iTOA-1))/2._kind_phys t_lev(1:NCOL,iTOA+1) = t_lay(1:NCOL,iTOA) endif @@ -282,12 +264,12 @@ subroutine GFS_rrtmgp_pre_run(Model, Grid, Statein, Sfcprop, Tbd, ncol, active_g ! Relative humidity, saturation mixing-ratio, vapor mixing-ratio, virtual temperature, ! layer thickness,... do iCol=1,NCOL - do iLay=1,Model%levs + do iLay=1,nLev es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (p_lay(iCol,iLay) + epsm1*es) ) - relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(QMIN, q_lay(iCol,iLay))/qs ) ) + qs = max( acon_qMin, pcon_eps * es / (p_lay(iCol,iLay) + pcon_epsm1*es) ) + relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(acon_qMin, q_lay(iCol,iLay))/qs ) ) qs_lay(iCol,iLay) = qs - tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + fvirt*q_lay(iCol,iLay)) + tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + pcon_fvirt*q_lay(iCol,iLay)) enddo enddo @@ -295,27 +277,27 @@ subroutine GFS_rrtmgp_pre_run(Model, Grid, Statein, Sfcprop, Tbd, ncol, active_g ! Get layer ozone mass mixing ratio ! ####################################################################################### ! First recast remaining all tracers (except sphum) forcing them all to be positive - do j = 2, model%NTRAC - tracer(1:NCOL,:,j) = Statein%qgrs(1:NCOL,:,j) + do j = 2, nTracers + tracer(1:NCOL,:,j) = qgrs(1:NCOL,:,j) where(tracer(:,:,j) .lt. 0.0) tracer(:,:,j) = 0._kind_phys enddo - if (Model%ntoz > 0) then - do iLay=1,Model%levs + if (i_o3 > 0) then + do iLay=1,nlev do iCol=1,NCOL - o3_lay(iCol,iLay) = max( QMIN, tracer(iCol,iLay,Model%ntoz) ) + o3_lay(iCol,iLay) = max( acon_qMin, tracer(iCol,iLay,i_o3) ) enddo enddo ! OR Use climatological ozone data else - call getozn (Statein%prslk(1:NCOL,:), Grid%xlat, NCOL, Model%levs, o3_lay) + call getozn (prslk(1:NCOL,:), xlat, nCol, nLev, o3_lay) endif ! ####################################################################################### ! Set gas concentrations for RRTMGP ! ####################################################################################### ! Call getgases(), to set up non-prognostic gas volume mixing ratios (gas_vmr). - call getgases (p_lev/100., Grid%xlon, Grid%xlat, NCOL, Model%levs, gas_vmr) + call getgases (p_lev/100., xlon, xlat, nCol, nLev, gas_vmr) ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) @@ -331,15 +313,15 @@ subroutine GFS_rrtmgp_pre_run(Model, Grid, Statein, Sfcprop, Tbd, ncol, active_g call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o3), vmr_o3)) ! ####################################################################################### - ! Radiation time step (output) (Is this really needed?) (Used by some diangostics) + ! Radiation time step (output) (Is this really needed?) (Used by some diagnostics) ! ####################################################################################### - raddt = min(Model%fhswr, Model%fhlwr) + raddt = min(fhswr, fhlwr) ! ####################################################################################### ! Setup surface ground temperature and ground/air skin temperature if required. ! ####################################################################################### - tsfg(1:NCOL) = Sfcprop%tsfc(1:NCOL) - tsfa(1:NCOL) = Sfcprop%tsfc(1:NCOL) + tsfg(1:NCOL) = tsfc(1:NCOL) + tsfa(1:NCOL) = tsfc(1:NCOL) end subroutine GFS_rrtmgp_pre_run diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index cf0195a39..721cff001 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -1,14 +1,23 @@ [ccpp-arg-table] name = GFS_rrtmgp_pre_init type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = inout - optional = F +[active_gases] + standard_name = active_gases_used_by_RRTMGP + long_name = active gases used by RRTMGP + units = none + dimensions = () + type = character + kind = len=128 + intent = in + optional = F +[nGases] + standard_name = number_of_active_gases_used_by_RRTMGP + long_name = number of gases available used by RRTMGP (Model%nGases) + units = count + dimensions = () + type = integer + intent = in + optional = F [active_gases_array] standard_name = list_of_active_gases_used_by_RRTMGP long_name = list of active gases used by RRTMGP @@ -40,53 +49,151 @@ [ccpp-arg-table] name = GFS_rrtmgp_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in - optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = instance of derived type GFS_sfcprop_type - units = DDT + optional = F +[nGases] + standard_name = number_of_active_gases_used_by_RRTMGP + long_name = number of gases available used by RRTMGP (Model%nGases) + units = count + dimensions = () + type = integer + intent = in + optional = F +[nTracers] + standard_name = number_of_tracers + long_name = number of tracers + units = count dimensions = () - type = GFS_sfcprop_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_statein_type + type = logical intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = instance of derived type GFS_tbd_type - units = DDT +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_tbd_type + type = logical intent = in - optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count + optional = F +[i_o3] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index dimensions = () type = integer intent = in + optional = F +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = latitude + units = radian + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[xlon] + standard_name = longitude + long_name = longitude + units = radian + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[prslk] + standard_name = dimensionless_exner_function_at_model_layers + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qgrs] + standard_name = tracer_concentration + long_name = model layer mean tracer concentration + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in optional = F [active_gases_array] standard_name = list_of_active_gases_used_by_RRTMGP @@ -97,6 +204,42 @@ kind = len=* intent = in optional = F +[pcon_eps] + standard_name = physical_constant_epsilon + long_name = gas constant for air divided by gas constant for h2o + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[pcon_epsm1] + standard_name = physical_constant_epsilon_minus_one + long_name = gas constant for air divided by gas constant for h2o minus one + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[pcon_fvirt] + standard_name = physical_constant_inverse_of_epsilon + long_name = gas constant for h2o divided by gas constant fir air minus one + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[acon_qMin] + standard_name = algorithmic_constant_lower_limit_for_saturation_vapor_pressure + long_name = lower limit allowed when computing saturation vapor pressure + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step @@ -212,8 +355,3 @@ type = integer intent = out optional = F - -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmgp_pre_finalize - type = scheme From 732fcd2e444e9572e141f0a5a50c680bd8d0b3d7 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Sun, 2 Aug 2020 16:28:48 -0600 Subject: [PATCH 270/404] Removed all GFS DDTs. Replaced with flat fields. Physical constants are also passed via argument lists in the RRTMGP suite level files (still need to add constants to scheme level code). --- physics/GFS_cloud_diagnostics.F90 | 51 +++-- physics/GFS_cloud_diagnostics.meta | 33 ++- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 109 +++++----- physics/GFS_rrtmgp_gfdlmp_pre.meta | 178 +++++++++++++-- physics/GFS_rrtmgp_lw_post.F90 | 242 ++++++++++----------- physics/GFS_rrtmgp_lw_post.meta | 143 +++++++----- physics/GFS_rrtmgp_pre.F90 | 18 +- physics/GFS_rrtmgp_pre.meta | 32 +-- physics/GFS_rrtmgp_setup.F90 | 55 +++-- physics/GFS_rrtmgp_setup.meta | 74 +++++-- physics/GFS_rrtmgp_sw_post.F90 | 334 +++++++++++++++-------------- physics/GFS_rrtmgp_sw_post.meta | 287 ++++++++++++++++++------- physics/GFS_rrtmgp_sw_pre.F90 | 95 ++++---- physics/GFS_rrtmgp_sw_pre.meta | 286 ++++++++++++++++++++---- 14 files changed, 1290 insertions(+), 647 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index 8ee548aea..c62cc685d 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -5,9 +5,7 @@ ! ######################################################################################## module GFS_cloud_diagnostics use machine, only: kind_phys - use physcons, only: con_pi, con_rog, decorr_con use physparam, only: iovrlw, iovrsw, ivflip, icldflg, idcor - use GFS_typedefs, only: GFS_control_type ! Module parameters (imported directly from radiation_cloud.f) integer, parameter :: & @@ -41,17 +39,20 @@ end subroutine GFS_cloud_diagnostics_init !! \section arg_table_GFS_cloud_diagnostics_run !! \htmlinclude GFS_cloud_diagnostics_run.html !! - subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, de_lgth, p_lay, cld_frac, & - p_lev, deltaZ, cloud_overlap_param, precip_overlap_param, & + subroutine GFS_cloud_diagnostics_run(nCol, nLev, lsswr, lslwr, lat, de_lgth, p_lay, & + cld_frac, p_lev, deltaZ, cloud_overlap_param, precip_overlap_param, con_pi, & mbota, mtopa, cldsa, errmsg, errflg) implicit none - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters + ! Inputs integer, intent(in) :: & nCol, & ! Number of horizontal grid-points nLev ! Number of vertical-layers + logical, intent(in) :: & + lsswr, & ! Call SW radiation? + lslwr ! Call LW radiation + real(kind_phys), intent(in) :: & + con_pi ! Physical constant: pi real(kind_phys), dimension(nCol), intent(in) :: & lat, & ! Latitude de_lgth ! Decorrelation length @@ -75,8 +76,6 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, de_lgth, p_lay, cld mtopa ! Vertical indices for cloud bases real(kind_phys), dimension(ncol,5), intent(out) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL - - ! Local variables integer i,id,iCol,iLay,icld @@ -85,7 +84,7 @@ subroutine GFS_cloud_diagnostics_run(Model, nCol, nLev, lat, de_lgth, p_lay, cld real(kind_phys),dimension(nCol) :: rlat real(kind_phys),dimension(nCol,nLev) :: cldcnv - if (.not. (Model%lsswr .or. Model%lslwr)) return + if (.not. (lsswr .or. lslwr)) return ! Initialize CCPP error handling variables errmsg = '' @@ -119,11 +118,21 @@ end subroutine GFS_cloud_diagnostics_finalize ! ###################################################################################### ! Initialization routine for High/Mid/Low cloud diagnostics. ! ###################################################################################### - subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit, errflg) + subroutine hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, & + imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & + imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, imp_physics_mg, nLev, & + mpi_rank, sigmainit, errflg) implicit none ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters + integer, intent(in) :: & + imp_physics, & ! Flag for MP scheme + imp_physics_fer_hires, & ! Flag for fer-hires scheme + imp_physics_gfdl, & ! Flag for gfdl scheme + imp_physics_thompson, & ! Flag for thompsonscheme + imp_physics_wsm6, & ! Flag for wsm6 scheme + imp_physics_zhao_carr, & ! Flag for zhao-carr scheme + imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme + imp_physics_mg ! Flag for MG scheme integer, intent(in) :: & nLev, & ! Number of vertical-layers mpi_rank @@ -150,23 +159,23 @@ subroutine hml_cloud_diagnostics_initialize(Model, nLev, mpi_rank, sigmainit, er else if (mpi_rank == 0) then print *,' - Using Prognostic Cloud Method' - if (Model%imp_physics == Model%imp_physics_zhao_carr) then + if (imp_physics == imp_physics_zhao_carr) then print *,' --- Zhao/Carr/Sundqvist microphysics' - elseif (Model%imp_physics == Model%imp_physics_zhao_carr_pdf) then + elseif (imp_physics == imp_physics_zhao_carr_pdf) then print *,' --- zhao/carr/sundqvist + pdf cloud' - elseif (Model%imp_physics == Model%imp_physics_gfdl) then + elseif (imp_physics == imp_physics_gfdl) then print *,' --- GFDL Lin cloud microphysics' - elseif (Model%imp_physics == Model%imp_physics_thompson) then + elseif (imp_physics == imp_physics_thompson) then print *,' --- Thompson cloud microphysics' - elseif (Model%imp_physics == Model%imp_physics_wsm6) then + elseif (imp_physics == imp_physics_wsm6) then print *,' --- WSM6 cloud microphysics' - elseif (Model%imp_physics == Model%imp_physics_mg) then + elseif (imp_physics == imp_physics_mg) then print *,' --- MG cloud microphysics' - elseif (Model%imp_physics == Model%imp_physics_fer_hires) then + elseif (imp_physics == imp_physics_fer_hires) then print *,' --- Ferrier-Aligo cloud microphysics' else print *,' !!! ERROR in cloud microphysc specification!!!', & - ' imp_physics (NP3D) =',Model%imp_physics + ' imp_physics (NP3D) =',imp_physics errflg = 1 endif endif diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index b3cb423c5..f78a76490 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -2,14 +2,6 @@ [ccpp-arg-table] name = GFS_cloud_diagnostics_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F [ncol] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -26,6 +18,22 @@ type = integer intent = in optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F [lat] standard_name = latitude long_name = latitude @@ -114,6 +122,15 @@ kind = kind_phys intent = in optional = F +[con_pi] + standard_name = pi + long_name = ratio of a circle's circumference to its diameter + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [cldsa] standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index d63bcc321..938e6ac95 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -4,13 +4,6 @@ ! ######################################################################################## module GFS_rrtmgp_gfdlmp_pre use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_tbd_type - use physcons, only: con_ttp, & ! Temperature at h2o 3pt (K) - con_rd, & ! Gas constant for dry air (J/KgK) - con_pi, & ! PI - con_g, & ! Gravity (m/s2) - con_rog, & - decorr_con use physparam, only: lcnorm, lcrick, idcor, iovrlw, iovrsw use rrtmgp_aux, only: check_error_msg @@ -18,10 +11,9 @@ module GFS_rrtmgp_gfdlmp_pre real(kind_phys), parameter :: & reice_min = 10.0, & ! Minimum ice size allowed by scheme reice_max = 150.0, & ! Maximum ice size allowed by scheme - epsq = 1.0e-12, & ! Tiny value cllimit = 0.001, & ! Lowest cloud fraction in GFDL MP scheme - gfac = 1.0e5/con_g - + decorr_con = 2.50 ! Decorrelation length constant (km) for iovrlw/iovrsw = 4 or 5 and idcor = 0 + public GFS_rrtmgp_gfdlmp_pre_init, GFS_rrtmgp_gfdlmp_pre_run, GFS_rrtmgp_gfdlmp_pre_finalize private get_alpha_dcorr, get_alpha_exp contains @@ -35,31 +27,50 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_init !! \section arg_table_GFS_rrtmgp_gfdlmp_pre_run !! \htmlinclude GFS_rrtmgp_gfdlmp_pre_run.html !! - subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, yearlen, julian, lat, & - p_lev, p_lay, tv_lay, tracer, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, & - cld_swp, cld_resnow, cld_rwp, cld_rerain, precip_frac, cloud_overlap_param, & - precip_overlap_param, de_lgth, deltaZ, errmsg, errflg) + subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldice, & + i_cldrain, i_cldsnow, i_cldgrpl, i_cldtot, yearlen, lsswr, lslwr, effr_in, julian,& + lat, p_lev, p_lay, tv_lay, effrin_cldliq, effrin_cldice, effrin_cldrain, & + effrin_cldsnow, tracer, con_pi, con_g, con_rd, con_epsq, & + cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & + cld_rerain, precip_frac, cloud_overlap_param, precip_overlap_param, de_lgth, & + deltaZ, errmsg, errflg) implicit none - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters - type(GFS_tbd_type), intent(in) :: & - Tbd ! DDT: FV3-GFS data not yet assigned to a defined container - integer, intent(in) :: & - nCol, & ! Number of horizontal grid-points - nLev, & ! Number of vertical-layers - yearlen ! Length of current year (365/366) WTF? + ! Inputs + integer, intent(in) :: & + nCol, & ! Number of horizontal grid points + nLev, & ! Number of vertical layers + ncnd, & ! Number of cloud condensation types. + nTracers, & ! Number of tracers from model. + i_cldliq, & ! Index into tracer array for cloud liquid. + i_cldice, & ! Index into tracer array for cloud ice. + i_cldrain, & ! Index into tracer array for cloud rain. + i_cldsnow, & ! Index into tracer array for cloud snow. + i_cldgrpl, & ! Index into tracer array for cloud groupel. + i_cldtot, & ! Index into tracer array for cloud total amount. + yearlen ! Length of current year (365/366) WTF? + logical, intent(in) :: & + lsswr, & ! Call SW radiation? + lslwr, & ! Call LW radiation + effr_in ! Provide hydrometeor radii from macrophysics? real(kind_phys), intent(in) :: & - julian ! Julian day + julian, & ! Julian day + con_pi, & ! Physical constant: pi + con_g, & ! Physical constant: gravitational constant + con_rd, & ! Physical constant: gas-constant for dry air + con_epsq ! Physical constant(?): Minimum value for specific humidity real(kind_phys), dimension(nCol), intent(in) :: & lat ! Latitude real(kind_phys), dimension(nCol,nLev), intent(in) :: & tv_lay, & ! Virtual temperature (K) - p_lay ! Pressure at model-layers (Pa) + p_lay, & ! Pressure at model-layers (Pa) + effrin_cldliq, & ! Effective radius for liquid cloud-particles (microns) + effrin_cldice, & ! Effective radius for ice cloud-particles (microns) + effrin_cldrain, & ! Effective radius for rain cloud-particles (microns) + effrin_cldsnow ! Effective radius for snow cloud-particles (microns) real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) - real(kind_phys), dimension(nCol, nLev, Model%ntrac),intent(in) :: & + real(kind_phys), dimension(nCol, nLev, nTracers),intent(in) :: & tracer ! Cloud condensate amount in layer by type () ! Outputs @@ -86,18 +97,18 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, yearlen, julian, la ! Local variables real(kind_phys) :: tem1 - real(kind_phys), dimension(nCol, nLev, min(4,Model%ncnd)) :: cld_condensate + real(kind_phys), dimension(nCol, nLev, min(4,ncnd)) :: cld_condensate integer :: iCol,iLay,l,ncndl,iovr real(kind_phys), dimension(nCol,nLev) :: deltaP - if (.not. (Model%lsswr .or. Model%lslwr)) return + if (.not. (lsswr .or. lslwr)) return ! Initialize CCPP error handling variables errmsg = '' errflg = 0 ! Test inputs - if (Model%ncnd .ne. 5) then + if (ncnd .ne. 5) then errmsg = 'Incorrect number of cloud condensates provided' errflg = 1 call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) @@ -118,14 +129,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, yearlen, julian, la return endif ! - if (.not. Model%lgfdlmprad) then - errmsg = 'Namelist option gfdlmprad=F is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return - endif - ! - if(.not. Model%effr_in) then + if(.not. effr_in) then errmsg = 'Namelist option effr_in=F is not supported.' errflg = 1 call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) @@ -146,29 +150,29 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, yearlen, julian, la ! Pull out cloud information for GFDL MP scheme. ! #################################################################################### ! Condensate - cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! -liquid water - cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,Model%ntiw) ! -ice water - cld_condensate(1:nCol,1:nLev,3) = tracer(1:nCol,1:nLev,Model%ntrw) ! -rain water - cld_condensate(1:nCol,1:nLev,4) = tracer(1:nCol,1:nLev,Model%ntsw) + & ! -snow + grapuel - tracer(1:nCol,1:nLev,Model%ntgl) + cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,i_cldliq) ! -liquid water + cld_condensate(1:nCol,1:nLev,2) = tracer(1:nCol,1:nLev,i_cldice) ! -ice water + cld_condensate(1:nCol,1:nLev,3) = tracer(1:nCol,1:nLev,i_cldrain) ! -rain water + cld_condensate(1:nCol,1:nLev,4) = tracer(1:nCol,1:nLev,i_cldsnow) + &! -snow + grapuel + tracer(1:nCol,1:nLev,i_cldgrpl) ! Since we combine the snow and grapuel, define local variable for number of condensate types. - ncndl = min(4,Model%ncnd) + ncndl = min(4,ncnd) ! Set really tiny suspended particle amounts to clear do l=1,ncndl do iLay=1,nLev do iCol=1,nCol - if (cld_condensate(iCol,iLay,l) < epsq) cld_condensate(iCol,iLay,l) = 0.0 + if (cld_condensate(iCol,iLay,l) < con_epsq) cld_condensate(iCol,iLay,l) = 0.0 enddo enddo enddo ! Cloud-fraction - cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) + cld_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,i_cldtot) ! Precipitation fraction (Hack. For now use cloud-fraction) - precip_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,Model%ntclamt) + precip_frac(1:nCol,1:nLev) = tracer(1:nCol,1:nLev,i_cldtot) ! Condensate and effective size deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. @@ -176,17 +180,17 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, yearlen, julian, la do iCol = 1, nCol ! Compute liquid/ice condensate path from mixing ratios (kg/kg)->(g/m2) if (cld_frac(iCol,iLay) .ge. cllimit) then - tem1 = gfac * deltaP(iCol,iLay) + tem1 = (1.0e5/con_g) * deltaP(iCol,iLay) cld_lwp(iCol,iLay) = cld_condensate(iCol,iLay,1) * tem1 cld_iwp(iCol,iLay) = cld_condensate(iCol,iLay,2) * tem1 cld_rwp(iCol,iLay) = cld_condensate(iCol,iLay,3) * tem1 cld_swp(iCol,iLay) = cld_condensate(iCol,iLay,4) * tem1 endif ! Use radii provided from the macrophysics - cld_reliq(iCol,iLay) = Tbd%phy_f3d(iCol,iLay,1) - cld_reice(iCol,iLay) = max(reice_min, min(reice_max,Tbd%phy_f3d(iCol,iLay,2))) - cld_rerain(iCol,iLay) = Tbd%phy_f3d(iCol,iLay,3) - cld_resnow(iCol,iLay) = Tbd%phy_f3d(iCol,iLay,4) + cld_reliq(iCol,iLay) = effrin_cldliq(iCol,iLay) + cld_reice(iCol,iLay) = max(reice_min, min(reice_max,effrin_cldice(iCol,iLay))) + cld_rerain(iCol,iLay) = effrin_cldrain(iCol,iLay) + cld_resnow(iCol,iLay) = effrin_cldsnow(iCol,iLay) enddo enddo @@ -199,7 +203,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(Model, Tbd, nCol, nLev, yearlen, julian, la ! Compute layer-thickness do iCol=1,nCol do iLay=1,nLev - deltaZ(iCol,iLay) = (con_rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + deltaZ(iCol,iLay) = ((con_rd/con_g)*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) enddo enddo @@ -353,7 +357,6 @@ subroutine get_alpha_exp(nlon, nlay, dzlay, iovrlp, latdeg, juldat, yearlen, cld ! ! ! ==================== end of description ===================== ! ! - use physcons, only: decorr_con use physparam, only: idcor implicit none ! Input diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 5a20836b8..67efc4b4f 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -2,23 +2,7 @@ [ccpp-arg-table] name = GFS_rrtmgp_gfdlmp_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = instance of derived type GFS_tbd_type - units = DDT - dimensions = () - type = GFS_tbd_type - intent = in - optional = F -[ncol] +[nCol] standard_name = horizontal_loop_extent long_name = horizontal dimension units = count @@ -34,6 +18,130 @@ type = integer intent = in optional = F +[nTracers] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[ncnd] + standard_name = number_of_cloud_condensate_types + long_name = number of cloud condensate types + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[effr_in] + standard_name = flag_for_cloud_effective_radii + long_name = flag for cloud effective radii calculations in GFDL microphysics + units = + dimensions = () + type = logical + intent = in + optional = F +[i_cldliq] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[i_cldice] + standard_name = index_for_ice_cloud_condensate + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[i_cldrain] + standard_name = index_for_rain_water + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[i_cldsnow] + standard_name = index_for_snow_water + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[i_cldgrpl] + standard_name = index_for_graupel + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[i_cldtot] + standard_name = index_for_cloud_amount + long_name = tracer index for cloud amount integer + units = index + dimensions = () + type = integer + intent = in + optional = F +[effrin_cldliq] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldrain] + standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um + long_name = effective radius of cloud rain particle in micrometers + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldsnow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometers + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [yearlen] standard_name = number_of_days_in_year long_name = number of days in a year @@ -96,6 +204,42 @@ kind = kind_phys intent = in optional = F +[con_pi] + standard_name = pi + long_name = ratio of a circle's circumference to its diameter + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_epsq] + standard_name = minimum_value_of_specific_humidity + long_name = floor value for specific humidity + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [de_lgth] standard_name = cloud_decorrelation_length long_name = cloud decorrelation length diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 7555f7278..a9a238cc9 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -1,11 +1,5 @@ module GFS_rrtmgp_lw_post - use machine, only: kind_phys - use GFS_typedefs, only: GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_statein_type, & - GFS_diag_type + use machine, only: kind_phys use module_radiation_aerosols, only: NSPC1 use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type ! RRTMGP DDT's @@ -30,73 +24,80 @@ end subroutine GFS_rrtmgp_lw_post_init !> \section arg_table_GFS_rrtmgp_lw_post_run !! \htmlinclude GFS_rrtmgp_lw_post.html !! - subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statein, im, & - p_lev, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky,& + subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag, fhlwr, & + p_lev, t_lay, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky,& raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, & - flxprf_lw, hlw0, errmsg, errflg) + sfcdlw, sfcflw, tsflw, htrlw, topflw, flxprf_lw, htrlwc, errmsg, errflg) - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT: FV3-GFS model control parameters - type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT: FV3-GFS grid and interpolation related data - type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT: FV3-GFS prognostic state data in from dycore + ! Inputs integer, intent(in) :: & - im ! Horizontal loop extent - real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & + nCol, & ! Horizontal loop extent + nLev ! Number of vertical layers + logical, intent(in) :: & + lslwr, & ! Logical flags for lw radiation calls + do_lw_clrsky_hr, & ! Output clear-sky SW heating-rate? + save_diag ! Output radiation diagnostics? + real(kind_phys), intent(in) :: & + fhlwr ! Frequency for SW radiation + real(kind_phys), dimension(nCol), intent(in) :: & tsfa ! Lowest model layer air temperature for radiation (K) - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & + real(kind_phys), dimension(nCol, nLev), intent(in) :: & + t_lay ! Temperature @ model layer centers (K) + real(kind_phys), dimension(nCol, nLev+1), intent(in) :: & + p_lev, & ! Pressure @ model layer-interfaces (Pa) fluxlwUP_allsky, & ! RRTMGP longwave all-sky flux (W/m2) fluxlwDOWN_allsky, & ! RRTMGP longwave all-sky flux (W/m2) fluxlwUP_clrsky, & ! RRTMGP longwave clear-sky flux (W/m2) fluxlwDOWN_clrsky ! RRTMGP longwave clear-sky flux (W/m2) real(kind_phys), intent(in) :: & raddt ! Radiation time step - real(kind_phys), dimension(im,NSPC1), intent(in) :: & + real(kind_phys), dimension(nCol,NSPC1), intent(in) :: & aerodp ! Vertical integrated optical depth for various aerosol species - real(kind_phys), dimension(im,5), intent(in) :: & + real(kind_phys), dimension(nCol,5), intent(in) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL - integer, dimension(im,3), intent(in) ::& + integer, dimension(nCol,3), intent(in) ::& mbota, & ! vertical indices for low, middle and high cloud tops mtopa ! vertical indices for low, middle and high cloud bases - real(kind_phys), dimension(im,Model%levs), intent(in) :: & + real(kind_phys), dimension(nCol,nLev), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtaulw ! approx 10.mu band layer cloud optical depth ! Outputs (mandatory) + real(kind_phys), dimension(nCol), intent(out) :: & + sfcdlw, & ! Total sky sfc downward lw flux (W/m2) + tsflw ! surface air temp during lw calculation (K) + type(sfcflw_type), dimension(nCol), intent(out) :: & + sfcflw ! LW radiation fluxes at sfc + real(kind_phys), dimension(nCol,nLev), intent(out) :: & + htrlw ! LW all-sky heating rate + type(topflw_type), dimension(nCol), intent(out) :: & + topflw ! lw_fluxes_top_atmosphere character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg - type(GFS_coupling_type), intent(inout) :: & - Coupling ! Fortran DDT: FV3-GFS fields to/from coupling with other components - type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT: FV3-GFS radiation tendencies - type(GFS_diag_type), intent(inout) :: & - Diag ! Fortran DDT: FV3-GFS diagnotics data + ! Outputs (optional) - type(proflw_type), dimension(size(Grid%xlon,1), Model%levs+1), optional, intent(inout) :: & + type(proflw_type), dimension(nCol, nLev+1), optional, intent(out) :: & flxprf_lw ! 2D radiative fluxes, components: ! upfxc - total sky upward flux (W/m2) ! dnfxc - total sky dnward flux (W/m2) ! upfx0 - clear sky upward flux (W/m2) ! dnfx0 - clear sky dnward flux (W/m2) - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(inout),optional :: & - hlw0 ! Longwave clear-sky heating-rate (K/sec) + real(kind_phys),dimension(nCol, nLev),intent(out),optional :: & + htrlwc ! Longwave clear-sky heating-rate (K/sec) + ! Local variables integer :: i, j, k, iSFC, iTOA, itop, ibtc logical :: l_fluxeslw2d, top_at_1 real(kind_phys) :: tem0d, tem1, tem2 - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: hlwc + real(kind_phys),dimension(nCol,nLev) :: hlwc ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. Model%lslwr) return + if (.not. lslwr) return ! Are any optional outputs requested? l_fluxeslw2d = present(flxprf_lw) @@ -104,72 +105,59 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei ! ####################################################################################### ! What is vertical ordering? ! ####################################################################################### - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev)) if (top_at_1) then - iSFC = Model%levs+1 + iSFC = nLev+1 iTOA = 1 else iSFC = 1 - iTOA = Model%levs+1 + iTOA = nLev+1 endif ! ####################################################################################### ! Compute LW heating-rates. ! ####################################################################################### - if (Model%lslwr) then - ! Clear-sky heating-rate (optional) - if (Model%lwhtr) then - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_clrsky, & ! IN - RRTMGP upward longwave clear-sky flux profiles (W/m2) - fluxlwDOWN_clrsky, & ! IN - RRTMGP downward longwave clear-sky flux profiles (W/m2) - p_lev, & ! IN - Pressure @ layer-interfaces (Pa) - hlw0)) ! OUT - Longwave clear-sky heating rate (K/sec) - endif - ! All-sky heating-rate (mandatory) - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_allsky, & ! IN - RRTMGP upward longwave all-sky flux profiles (W/m2) - fluxlwDOWN_allsky, & ! IN - RRTMGP downward longwave all-sky flux profiles (W/m2) - p_lev, & ! IN - Pressure @ layer-interfaces (Pa) - hlwc)) ! OUT - Longwave all-sky heating rate (K/sec) - - ! Copy fluxes from RRTGMP types into model radiation types. - ! Mandatory outputs - Diag%topflw(:)%upfxc = fluxlwUP_allsky(:,iTOA) - Diag%topflw(:)%upfx0 = fluxlwUP_clrsky(:,iTOA) - Radtend%sfcflw(:)%upfxc = fluxlwUP_allsky(:,iSFC) - Radtend%sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) - Radtend%sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) - Radtend%sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) - - ! Optional outputs - if(l_fluxeslw2d) then - flxprf_lw%upfxc = fluxlwUP_allsky - flxprf_lw%dnfxc = fluxlwDOWN_allsky - flxprf_lw%upfx0 = fluxlwUP_clrsky - flxprf_lw%dnfx0 = fluxlwDOWN_clrsky - endif + ! Clear-sky heating-rate (optional) + if (do_lw_clrsky_hr) then + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxlwUP_clrsky, & ! IN - RRTMGP upward longwave clear-sky flux profiles (W/m2) + fluxlwDOWN_clrsky, & ! IN - RRTMGP downward longwave clear-sky flux profiles (W/m2) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + htrlwc)) ! OUT - Longwave clear-sky heating rate (K/sec) endif + ! All-sky heating-rate (mandatory) + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxlwUP_allsky, & ! IN - RRTMGP upward longwave all-sky flux profiles (W/m2) + fluxlwDOWN_allsky, & ! IN - RRTMGP downward longwave all-sky flux profiles (W/m2) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + htrlw)) ! OUT - Longwave all-sky heating rate (K/sec) + ! ####################################################################################### - ! Save LW outputs. + ! Save LW outputs. ! ####################################################################################### - if (Model%lslwr) then - ! Save surface air temp for diurnal adjustment at model t-steps - Radtend%tsflw (:) = tsfa(:) + ! Copy fluxes from RRTGMP types into model radiation types. + ! Mandatory outputs + topflw(:)%upfxc = fluxlwUP_allsky(:,iTOA) + topflw(:)%upfx0 = fluxlwUP_clrsky(:,iTOA) + sfcflw(:)%upfxc = fluxlwUP_allsky(:,iSFC) + sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) + sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) + sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) - ! All-sky heating rate profile - do k = 1, model%levs - Radtend%htrlw(1:im,k) = hlwc(1:im,k) - enddo - if (Model%lwhtr) then - do k = 1, model%levs - Radtend%lwhc(1:im,k) = hlw0(1:im,k) - enddo - endif - - ! Radiation fluxes for other physics processes - Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc - endif + ! Optional outputs + if(l_fluxeslw2d) then + flxprf_lw%upfxc = fluxlwUP_allsky + flxprf_lw%dnfxc = fluxlwDOWN_allsky + flxprf_lw%upfx0 = fluxlwUP_clrsky + flxprf_lw%dnfx0 = fluxlwDOWN_clrsky + endif + + ! Save surface air temp for diurnal adjustment at model t-steps + tsflw (:) = tsfa(:) + + ! Radiation fluxes for other physics processes + sfcdlw(:) = sfcflw(:)%dnfxc ! ####################################################################################### ! Save LW diagnostics @@ -179,45 +167,43 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei ! corresponding slots of array fluxr with appropriate time weights. ! - Collect the fluxr data for wrtsfc ! ####################################################################################### - if (Model%lssav) then - if (Model%lslwr) then - do i=1,im - ! LW all-sky fluxes - Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up - Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn - Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up - ! LW clear-sky fluxes - Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up - Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn - Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up - enddo - - do i=1,im - Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) - Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) - enddo - - ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud is reversed for - ! the fluxr output. save interface pressure (pa) of top/bot - do j = 1, 3 - do i = 1, IM - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - ibtc = mbota(i,j) - Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d - Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop) - Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc) - Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) - - ! Add optical depth and emissivity output - tem2 = 0. - do k=ibtc,itop - tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel - enddo - Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) - enddo - enddo - endif + if (save_diag) then +! do i=1,nCol +! ! LW all-sky fluxes +! Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up +! Diag%fluxr(i,19) = Diag%fluxr(i,19) + fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn +! Diag%fluxr(i,20) = Diag%fluxr(i,20) + fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up +! ! LW clear-sky fluxes +! Diag%fluxr(i,28) = Diag%fluxr(i,28) + fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up +! Diag%fluxr(i,30) = Diag%fluxr(i,30) + fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn +! Diag%fluxr(i,33) = Diag%fluxr(i,33) + fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up +! enddo +! +! do i=1,nCol +! Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) +! Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) +! enddo +! +! ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud is reversed for +! ! the fluxr output. save interface pressure (pa) of top/bot +! do j = 1, 3 +! do i = 1, nCol +! tem0d = raddt * cldsa(i,j) +! itop = mtopa(i,j) +! ibtc = mbota(i,j) +! Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d +! Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * p_lev(i,itop) +! Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * p_lev(i,ibtc) +! Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * t_lay(i,itop) +! +! ! Add optical depth and emissivity output +! tem2 = 0. +! do k=ibtc,itop +! tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel +! enddo +! Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) +! enddo +! enddo endif end subroutine GFS_rrtmgp_lw_post_run diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index 646945d90..c261a7797 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -1,62 +1,55 @@ [ccpp-arg-table] name = GFS_rrtmgp_lw_post_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[nCol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = instance of derived type GFS_coupling_type - units = DDT + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_coupling_type - intent = inout - optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = instance of derived type GFS_diag_type - units = DDT + type = logical + intent = in + optional = F +[do_lw_clrsky_hr] + standard_name = flag_for_output_of_longwave_heating_rate + long_name = flag to output lw heating rate + units = flag dimensions = () - type = GFS_diag_type - intent = inout - optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT + type = logical + intent = in + optional = F +[save_diag] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag dimensions = () - type = GFS_statein_type + type = logical intent = in - optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count + optional = F +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s dimensions = () - type = integer + type = real + kind = kind_phys intent = in - optional = F + optional = F [tsfa] standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation @@ -66,6 +59,15 @@ kind = kind_phys intent = in optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature at vertical layer for radiation calculation + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level @@ -172,22 +174,65 @@ kind = kind_phys intent = in optional = F +[sfcdlw] + standard_name = surface_downwelling_longwave_flux_on_radiation_time_step + long_name = total sky sfc downward lw flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[sfcflw] + standard_name = lw_fluxes_sfc + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcflw_type + intent = out + optional = F +[tsflw] + standard_name = surface_midlayer_air_temperature_in_longwave_radiation + long_name = surface air temp during lw calculation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[htrlw] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + long_name = total sky lw heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[topflw] + standard_name = lw_fluxes_top_atmosphere + long_name = lw radiation fluxes at top + units = W m-2 + dimensions = (horizontal_dimension) + type = topflw_type + intent = out + optional = F [flxprf_lw] standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = proflw_type - intent = inout + intent = out optional = T -[hlw0] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels +[htrlwc] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = longwave clear sky heating rate units = K s-1 dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys - intent = inout + intent = out optional = T [errmsg] standard_name = ccpp_error_message diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index e4110c950..01a56a00f 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -145,7 +145,7 @@ end subroutine GFS_rrtmgp_pre_init !! subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, fhswr, & fhlwr, xlat, xlon, prsl, tgrs, prslk, prsi, qgrs, tsfc, active_gases_array, & - pcon_eps, pcon_epsm1, pcon_fvirt, acon_qMin, & + con_eps, con_epsm1, con_fvirt, qs_Min, & raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, tv_lay, relhum, tracer, & gas_concentrations, errmsg, errflg) @@ -165,10 +165,10 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, fhswr, & ! Frequency of SW radiation call. fhlwr ! Frequency of LW radiation call. real(kind_phys), intent(in) :: & - pcon_eps, & ! Physical constant: Epsilon (Rd/Rv) - pcon_epsm1, & ! Physical constant: Epsilon (Rd/Rv) minus one - pcon_fvirt, & ! Physical constant: Inverse of epsilon minus one - acon_qMin ! Algorithmic constant: Lower limit for saturation vapor pressure + con_eps, & ! Physical constant: Epsilon (Rd/Rv) + con_epsm1, & ! Physical constant: Epsilon (Rd/Rv) minus one + con_fvirt, & ! Physical constant: Inverse of epsilon minus one + qs_Min ! Algorithmic constant: Lower limit for saturation vapor pressure real(kind_phys), dimension(nCol), intent(in) :: & xlon, & ! Longitude @@ -266,10 +266,10 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, do iCol=1,NCOL do iLay=1,nLev es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa - qs = max( acon_qMin, pcon_eps * es / (p_lay(iCol,iLay) + pcon_epsm1*es) ) - relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(acon_qMin, q_lay(iCol,iLay))/qs ) ) + qs = max( qs_Min, con_eps * es / (p_lay(iCol,iLay) + con_epsm1*es) ) + relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(qs_Min, q_lay(iCol,iLay))/qs ) ) qs_lay(iCol,iLay) = qs - tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + pcon_fvirt*q_lay(iCol,iLay)) + tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + con_fvirt*q_lay(iCol,iLay)) enddo enddo @@ -285,7 +285,7 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, if (i_o3 > 0) then do iLay=1,nlev do iCol=1,NCOL - o3_lay(iCol,iLay) = max( acon_qMin, tracer(iCol,iLay,i_o3) ) + o3_lay(iCol,iLay) = max( qs_Min, tracer(iCol,iLay,i_o3) ) enddo enddo ! OR Use climatological ozone data diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 721cff001..b5fcc7879 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -204,42 +204,42 @@ kind = len=* intent = in optional = F -[pcon_eps] - standard_name = physical_constant_epsilon - long_name = gas constant for air divided by gas constant for h2o +[qs_Min] + standard_name = lower_limit_for_saturation_vapor_pressure + long_name = lower limit allowed when computing saturation vapor pressure units = none dimensions = () type = real kind = kind_phys intent = in - optional = F -[pcon_epsm1] - standard_name = physical_constant_epsilon_minus_one - long_name = gas constant for air divided by gas constant for h2o minus one + optional = F +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv units = none dimensions = () type = real - kind = kind_phys + kind = kind_phys intent = in optional = F -[pcon_fvirt] - standard_name = physical_constant_inverse_of_epsilon - long_name = gas constant for h2o divided by gas constant fir air minus one +[con_epsm1] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + long_name = (rd/rv) - 1 units = none dimensions = () type = real kind = kind_phys intent = in optional = F -[acon_qMin] - standard_name = algorithmic_constant_lower_limit_for_saturation_vapor_pressure - long_name = lower limit allowed when computing saturation vapor pressure +[con_fvirt] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) units = none dimensions = () type = real - kind = kind_phys + kind = kind_phys intent = in - optional = F + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index f890b30ee..9b503e3bc 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -8,8 +8,6 @@ module GFS_rrtmgp_setup isubcsw, isubclw, ivflip , ipsd0, iswcliq use machine, only: & kind_phys ! Working type - use GFS_typedefs, only: & - GFS_control_type ! Model control parameters implicit none public GFS_rrtmgp_setup_init, GFS_rrtmgp_setup_run, GFS_rrtmgp_setup_finalize @@ -39,21 +37,28 @@ module GFS_rrtmgp_setup !! \section arg_table_GFS_rrtmgp_setup_init !! \htmlinclude GFS_rrtmgp_setup_init.html !! - subroutine GFS_rrtmgp_setup_init (Model, si, levr, ictm, isol, ico2, & - iaer, ialb, iems, ntcw, num_p3d, ntoz, iovr_sw, iovr_lw, & - isubc_sw, isubc_lw, icliq_sw, crick_proof, ccnorm, imp_physics, & - norad_precip, idate, iflip, me, & - errmsg, errflg) + subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics_gfdl,& + imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & + imp_physics_zhao_carr_pdf, imp_physics_mg, si, levr, ictm, isol, ico2, iaer, & + ialb, iems, ntcw, num_p3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & + icliq_sw, crick_proof, ccnorm, norad_precip, idate, iflip, me, errmsg, errflg) implicit none ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters + integer, intent(in) :: & + imp_physics, & ! Flag for MP scheme + imp_physics_fer_hires, & ! Flag for fer-hires scheme + imp_physics_gfdl, & ! Flag for gfdl scheme + imp_physics_thompson, & ! Flag for thompsonscheme + imp_physics_wsm6, & ! Flag for wsm6 scheme + imp_physics_zhao_carr, & ! Flag for zhao-carr scheme + imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme + imp_physics_mg ! Flag for MG scheme real(kind_phys), dimension(levr+1), intent(in) :: & si integer, intent(in) :: levr, ictm, isol, ico2, iaer, ialb, iems, & ntcw, num_p3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & - icliq_sw, imp_physics, iflip, me + icliq_sw, iflip, me logical, intent(in) :: & crick_proof, ccnorm, norad_precip integer, intent(in), dimension(4) :: & @@ -121,7 +126,9 @@ subroutine GFS_rrtmgp_setup_init (Model, si, levr, ictm, isol, ico2, & endif - call radinit( Model, si, levr, imp_physics, me, errflg ) + call radinit( si, levr, imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & + imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & + imp_physics_zhao_carr_pdf, imp_physics_mg, me, errflg ) if ( me == 0 ) then print *,' Radiation sub-cloud initial seed =',ipsd0, & @@ -197,11 +204,15 @@ end subroutine GFS_rrtmgp_setup_finalize ! Private functions - subroutine radinit( Model, si, NLAY, imp_physics, me, errflg ) + subroutine radinit(si, NLAY, imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & + imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & + imp_physics_zhao_carr_pdf, imp_physics_mg, me, errflg ) !................................... ! --- inputs: -! & ( si, NLAY, imp_physics, me ) +! & ( si, NLAY, imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & +! & imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & +! & imp_physics_zhao_carr_pdf, imp_physics_mg, me ) ! --- outputs: ! ( errflg ) @@ -319,9 +330,16 @@ subroutine radinit( Model, si, NLAY, imp_physics, me, errflg ) implicit none ! --- inputs: - integer, intent(in) :: NLAY, me, imp_physics - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters + integer, intent(in) :: & + imp_physics, & ! Flag for MP scheme + imp_physics_fer_hires, & ! Flag for fer-hires scheme + imp_physics_gfdl, & ! Flag for gfdl scheme + imp_physics_thompson, & ! Flag for thompsonscheme + imp_physics_wsm6, & ! Flag for wsm6 scheme + imp_physics_zhao_carr, & ! Flag for zhao-carr scheme + imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme + imp_physics_mg ! Flag for MG scheme + integer, intent(in) :: NLAY, me real (kind=kind_phys), intent(in) :: si(:) ! --- outputs: (none, to module variables) @@ -412,7 +430,10 @@ subroutine radinit( Model, si, NLAY, imp_physics, me, errflg ) call aer_init ( NLAY, me ) ! --- ... aerosols initialization routine call gas_init ( me ) ! --- ... co2 and other gases initialization routine call sfc_init ( me ) ! --- ... surface initialization routine - call hml_cloud_diagnostics_initialize( Model, NLAY, me, si, errflg) + call hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, & + imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & + imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, imp_physics_mg, NLAY, me, si,& + errflg) return !................................... diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 9165117c5..aec1b4374 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -1,14 +1,70 @@ [ccpp-arg-table] name = GFS_rrtmgp_setup_init type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_fer_hires] + standard_name = flag_for_fer_hires_microphysics_scheme + long_name = choice of Ferrier-Aligo microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_gfdl] + standard_name = flag_for_gfdl_microphysics_scheme + long_name = choice of GFDL microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_thompson] + standard_name = flag_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer +[imp_physics_wsm6] + intent = in + optional = F + standard_name = flag_for_wsm6_microphysics_scheme + long_name = choice of WSM6 microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr] + standard_name = flag_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag dimensions = () - type = GFS_control_type + type = integer + intent = in + optional = F +[imp_physics_zhao_carr_pdf] + standard_name = flag_for_zhao_carr_pdf_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme with PDF clouds + units = flag + dimensions = () + type = integer intent = in optional = F +[imp_physics_mg] + standard_name = flag_for_morrison_gettelman_microphysics_scheme + long_name = choice of Morrison-Gettelman microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [si] standard_name = vertical_sigma_coordinate_for_radiation_initialization long_name = vertical sigma coordinate for radiation initialization @@ -154,14 +210,6 @@ type = logical intent = in optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [norad_precip] standard_name = flag_for_precipitation_effect_on_radiation long_name = radiation precip flag for Ferrier/Moorthi diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 56d96a90f..840360429 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -1,7 +1,5 @@ module GFS_rrtmgp_sw_post use machine, only: kind_phys - use GFS_typedefs, only: GFS_coupling_type, GFS_control_type, GFS_grid_type, & - GFS_radtend_type, GFS_diag_type, GFS_statein_type use module_radiation_aerosols, only: NSPC1 use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp @@ -26,40 +24,41 @@ end subroutine GFS_rrtmgp_sw_post_init !> \section arg_table_GFS_rrtmgp_sw_post_run !! \htmlinclude GFS_rrtmgp_sw_post_run.html !! - subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein, scmpsw, & - nCol, p_lev, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, & - sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, & - fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, mtopa, cld_frac, cldtausw, flxprf_sw,& - hsw0, errmsg, errflg) + subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky_hr, & + save_diag, fhswr, coszen, coszdg, t_lay, p_lev, sfc_alb_nir_dir, & + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sw_gas_props, fluxswUP_allsky, & + fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & + mtopa, cld_frac, cldtausw, & + nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, & + sfcdsw, htrsw, sfcfsw, topfsw, htrswc, flxprf_sw, scmpsw, errmsg, errflg) - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT: FV3-GFS model control parameters - type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT: FV3-GFS grid and interpolation related data - type(GFS_coupling_type), intent(inout) :: & - Coupling ! Fortran DDT: FV3-GFS fields to/from coupling with other components - type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT: FV3-GFS radiation tendencies - type(GFS_diag_type), intent(inout) :: & - Diag ! Fortran DDT: FV3-GFS diagnotics data - type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT: FV3-GFS prognostic state data in from dycore + ! Inputs integer, intent(in) :: & nCol, & ! Horizontal loop extent + nLev, & ! Number of vertical layers nDay ! Number of daylit columns integer, intent(in), dimension(nday) :: & idxday ! Index array for daytime points + logical, intent(in) :: & + lsswr, & ! Call SW radiation? + do_sw_clrsky_hr, & ! Output clear-sky SW heating-rate? + save_diag ! Output radiation diagnostics? type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing SW spectral information - real(kind_phys), dimension(nCol, Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), intent(in) :: & + fhswr ! Frequency for SW radiation + real(kind_phys), dimension(nCol), intent(in) :: & + t_lay, & ! Temperature at model layer centers (K) + coszen, & ! Cosine(SZA) + coszdg ! Cosine(SZA), daytime + real(kind_phys), dimension(nCol, nLev+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (Pa) real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) sfc_alb_uvvis_dir, & ! Surface albedo (direct) sfc_alb_uvvis_dif ! Surface albedo (diffuse) - real(kind_phys), dimension(nCol, Model%levs+1), intent(in) :: & + real(kind_phys), dimension(nCol, nLev+1), intent(in) :: & fluxswUP_allsky, & ! SW All-sky flux (W/m2) fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) fluxswUP_clrsky, & ! SW Clear-sky flux (W/m2) @@ -73,95 +72,119 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein integer, dimension(nCol,3), intent(in) ::& mbota, & ! vertical indices for low, middle and high cloud tops mtopa ! vertical indices for low, middle and high cloud bases - real(kind_phys), dimension(nCol,Model%levs), intent(in) :: & + real(kind_phys), dimension(nCol,nLev), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer - cldtausw ! approx .55mu band layer cloud optical depth + cldtausw ! approx .55mu band layer cloud optical depth + + ! Inputs (optional) + type(cmpfsw_type), dimension(nCol), intent(in), optional :: & + scmpsw ! 2D surface fluxes, components: + ! uvbfc - total sky downward uv-b flux at (W/m2) + ! uvbf0 - clear sky downward uv-b flux at (W/m2) + ! nirbm - downward nir direct beam flux (W/m2) + ! nirdf - downward nir diffused flux (W/m2) + ! visbm - downward uv+vis direct beam flux (W/m2) + ! visdf - downward uv+vis diffused flux (W/m2) ! Outputs (mandatory) + real(kind_phys), dimension(nCol), intent(out) :: & + nirbmdi, & ! sfc nir beam sw downward flux (W/m2) + nirdfdi, & ! sfc nir diff sw downward flux (W/m2) + visbmdi, & ! sfc uv+vis beam sw downward flux (W/m2) + visdfdi, & ! sfc uv+vis diff sw downward flux (W/m2) + nirbmui, & ! sfc nir beam sw upward flux (W/m2) + nirdfui, & ! sfc nir diff sw upward flux (W/m2) + visbmui, & ! sfc uv+vis beam sw upward flux (W/m2) + visdfui, & ! sfc uv+vis diff sw upward flux (W/m2) + sfcnsw, & ! total sky sfc netsw flx into ground + sfcdsw ! + real(kind_phys), dimension(nCol,nLev), intent(out) :: & + htrsw ! SW all-sky heating rate + type(sfcfsw_type), dimension(nCol), intent(out) :: & + sfcfsw ! sw radiation fluxes at sfc + type(topfsw_type), dimension(nCol), intent(out) :: & + topfsw ! sw_fluxes_top_atmosphere character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg ! Outputs (optional) - type(profsw_type), dimension(nCol, Model%levs+1), intent(inout), optional :: & + type(profsw_type), dimension(nCol, nLev), intent(out), optional :: & flxprf_sw ! 2D radiative fluxes, components: ! upfxc - total sky upward flux (W/m2) ! dnfxc - total sky dnward flux (W/m2) ! upfx0 - clear sky upward flux (W/m2) ! dnfx0 - clear sky dnward flux (W/m2) - type(cmpfsw_type), dimension(nCol), intent(inout), optional :: & - scmpsw ! 2D surface fluxes, components: - ! uvbfc - total sky downward uv-b flux at (W/m2) - ! uvbf0 - clear sky downward uv-b flux at (W/m2) - ! nirbm - downward nir direct beam flux (W/m2) - ! nirdf - downward nir diffused flux (W/m2) - ! visbm - downward uv+vis direct beam flux (W/m2) - ! visdf - downward uv+vis diffused flux (W/m2) - real(kind_phys),dimension(nCol, Model%levs),intent(inout),optional :: & - hsw0 ! Clear-sky heating rate (K/s) - + real(kind_phys),dimension(nCol, nLev),intent(out),optional :: & + htrswc ! Clear-sky heating rate (K/s) + ! Local variables integer :: i, j, k, iSFC, iTOA, itop, ibtc real(kind_phys) :: tem0d, tem1, tem2 - real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky - logical :: l_fluxessw2d, top_at_1 - real(kind_phys),dimension(nCol, Model%levs) :: hswc + real(kind_phys), dimension(nDay, nLev) :: thetaTendClrSky, thetaTendAllSky + logical :: l_fluxessw2d, top_at_1, l_scmpsw ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. Model%lsswr) return + if (.not. lsswr) return if (nDay .gt. 0) then ! Are any optional outputs requested? - l_fluxessw2d = present(flxprf_sw) + l_fluxessw2d = present(flxprf_sw) + + ! Are the components of the surface fluxes provided? + l_scmpsw = present(scmpsw) ! ####################################################################################### ! What is vertical ordering? ! ####################################################################################### - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev)) if (top_at_1) then - iSFC = Model%levs+1 + iSFC = nLev+1 iTOA = 1 else iSFC = 1 - iTOA = Model%levs+1 + iTOA = nLev+1 endif ! ####################################################################################### ! Compute SW heating-rates ! ####################################################################################### ! Clear-sky heating-rate (optional) - if (Model%swhtr) then - hsw0(:,:) = 0._kind_phys + if (do_sw_clrsky_hr) then + htrswc(:,:) = 0._kind_phys call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & fluxswUP_clrsky(idxday(1:nDay),:), & ! IN - Shortwave upward clear-sky flux profiles (W/m2) fluxswDOWN_clrsky(idxday(1:nDay),:), & ! IN - Shortwave downward clear-sky flux profiles (W/m2) p_lev(idxday(1:nDay),:), & ! IN - Pressure at model-interface (Pa) thetaTendClrSky)) ! OUT - Clear-sky heating-rate (K/sec) - hsw0(idxday(1:nDay),:)=thetaTendClrSky + htrswc(idxday(1:nDay),:)=thetaTendClrSky !**NOTE** GP doesn't use radiation levels, it uses the model fields. Not sure if this is necessary endif ! All-sky heating-rate (mandatory) - hswc(:,:) = 0._kind_phys + htrsw(:,:) = 0._kind_phys call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & fluxswUP_allsky(idxday(1:nDay),:), & ! IN - Shortwave upward all-sky flux profiles (W/m2) fluxswDOWN_allsky(idxday(1:nDay),:), & ! IN - Shortwave downward all-sky flux profiles (W/m2) p_lev(idxday(1:nDay),:), & ! IN - Pressure at model-interface (Pa) thetaTendAllSky)) ! OUT - All-sky heating-rate (K/sec) - hswc(idxday(1:nDay),:) = thetaTendAllSky + htrsw(idxday(1:nDay),:) = thetaTendAllSky + ! ####################################################################################### + ! Save SW outputs + ! ####################################################################################### ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - Diag%topfsw(:)%upfxc = fluxswUP_allsky(:,iTOA) - Diag%topfsw(:)%upfx0 = fluxswUP_clrsky(:,iTOA) - Diag%topfsw(:)%dnfxc = fluxswDOWN_allsky(:,iTOA) - Radtend%sfcfsw(:)%upfxc = fluxswUP_allsky(:,iSFC) - Radtend%sfcfsw(:)%upfx0 = fluxswUP_clrsky(:,iSFC) - Radtend%sfcfsw(:)%dnfxc = fluxswDOWN_allsky(:,iSFC) - Radtend%sfcfsw(:)%dnfx0 = fluxswDOWN_clrsky(:,iSFC) + topfsw(:)%upfxc = fluxswUP_allsky(:,iTOA) + topfsw(:)%upfx0 = fluxswUP_clrsky(:,iTOA) + topfsw(:)%dnfxc = fluxswDOWN_allsky(:,iTOA) + sfcfsw(:)%upfxc = fluxswUP_allsky(:,iSFC) + sfcfsw(:)%upfx0 = fluxswUP_clrsky(:,iSFC) + sfcfsw(:)%dnfxc = fluxswDOWN_allsky(:,iSFC) + sfcfsw(:)%dnfx0 = fluxswDOWN_clrsky(:,iSFC) ! Optional output if(l_fluxessw2D) then @@ -171,63 +194,54 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein flxprf_sw(:,:)%dnfx0 = fluxswDOWN_clrsky(:,:) endif - ! ####################################################################################### - ! Save SW outputs - ! ####################################################################################### - ! All-sky heating rate - do k = 1, Model%levs - Radtend%htrsw(1:nCol,k) = hswc(1:nCol,k) - enddo - ! Clear-sky heating rate - if (Model%swhtr) then - do k = 1, Model%levs - Radtend%swhc(1:nCol,k) = hsw0(1:nCol,k) - enddo - endif - ! Surface down and up spectral component fluxes ! - Save two spectral bands' surface downward and upward fluxes for output. - do i=1,nCol - Coupling%nirbmdi(i) = scmpsw(i)%nirbm - Coupling%nirdfdi(i) = scmpsw(i)%nirdf - Coupling%visbmdi(i) = scmpsw(i)%visbm - Coupling%visdfdi(i) = scmpsw(i)%visdf - - Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfc_alb_nir_dir(1,i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfc_alb_nir_dif(1,i) - Coupling%visbmui(i) = scmpsw(i)%visbm * sfc_alb_uvvis_dir(1,i) - Coupling%visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) - enddo + if (l_scmpsw) then + do i=1,nCol + nirbmdi(i) = scmpsw(i)%nirbm + nirdfdi(i) = scmpsw(i)%nirdf + visbmdi(i) = scmpsw(i)%visbm + visdfdi(i) = scmpsw(i)%visdf + nirbmui(i) = scmpsw(i)%nirbm * sfc_alb_nir_dir(1,i) + nirdfui(i) = scmpsw(i)%nirdf * sfc_alb_nir_dif(1,i) + visbmui(i) = scmpsw(i)%visbm * sfc_alb_uvvis_dir(1,i) + visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) + enddo + else + nirbmdi(:) = 0.0 + nirdfdi(:) = 0.0 + visbmdi(:) = 0.0 + visdfdi(:) = 0.0 + nirbmui(:) = 0.0 + nirdfui(:) = 0.0 + visbmui(:) = 0.0 + visdfui(:) = 0.0 + endif else ! if_nday_block ! ####################################################################################### - ! Save SW outputs + ! Dark everywhere ! ####################################################################################### - Radtend%htrsw(:,:) = 0.0 - Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) - Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) - scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) + htrsw(:,:) = 0.0 + sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) + topfsw = topfsw_type( 0.0, 0.0, 0.0 ) + nirbmdi(:) = 0.0 + nirdfdi(:) = 0.0 + visbmdi(:) = 0.0 + visdfdi(:) = 0.0 + nirbmui(:) = 0.0 + nirdfui(:) = 0.0 + visbmui(:) = 0.0 + visdfui(:) = 0.0 - do i=1,nCol - Coupling%nirbmdi(i) = 0.0 - Coupling%nirdfdi(i) = 0.0 - Coupling%visbmdi(i) = 0.0 - Coupling%visdfdi(i) = 0.0 - - Coupling%nirbmui(i) = 0.0 - Coupling%nirdfui(i) = 0.0 - Coupling%visbmui(i) = 0.0 - Coupling%visdfui(i) = 0.0 - enddo - - if (Model%swhtr) then - Radtend%swhc(:,:) = 0 + if (do_sw_clrsky_hr) then + htrswc(:,:) = 0 endif endif ! end_if_nday ! Radiation fluxes for other physics processes do i=1,nCol - Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc - Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc + sfcnsw(i) = sfcfsw(i)%dnfxc - sfcfsw(i)%upfxc + sfcdsw(i) = sfcfsw(i)%dnfxc enddo ! ####################################################################################### @@ -238,63 +252,63 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein ! corresponding slots of array fluxr with appropriate time weights. ! - Collect the fluxr data for wrtsfc ! ####################################################################################### - if (Model%lssav) then - do i=1,nCol - Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm - Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm - Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm - Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm - Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm - Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm - if (Radtend%coszen(i) > 0.) then - ! SW all-sky fluxes - tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn - ! SW uv-b fluxes - Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn - ! SW TOA incoming fluxes - Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn - ! SW SFC flux components - Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn - Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn - Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn - Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn - ! SW clear-sky fluxes - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d - Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d - Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d - endif - enddo - - ! Save total and boundary-layer clouds - do i=1,nCol - Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) - Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) - enddo - - ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud - ! is reversed for the fluxr output. save interface pressure (pa) of top/bot - do j = 1, 3 - do i = 1, nCol - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - ibtc = mbota(i,j) - Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d - Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop) - Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc) - Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) - - ! Add optical depth and emissivity output - tem1 = 0. - do k=ibtc,itop - tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel - enddo - Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 - enddo - enddo + if (save_diag) then +! do i=1,nCol +! Diag%fluxr(i,34) = Diag%fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm +! Diag%fluxr(i,35) = Diag%fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm +! Diag%fluxr(i,36) = Diag%fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm +! Diag%fluxr(i,37) = Diag%fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm +! Diag%fluxr(i,38) = Diag%fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm +! Diag%fluxr(i,39) = Diag%fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm +! if (coszen(i) > 0.) then +! ! SW all-sky fluxes +! tem0d = fhswr * coszdg(i) / coszen(i) +! Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up +! Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + sfcfsw(i)%upfxc * tem0d +! Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn +! ! SW uv-b fluxes +! Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn +! Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn +! ! SW TOA incoming fluxes +! Diag%fluxr(i,23) = Diag%fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn +! ! SW SFC flux components +! Diag%fluxr(i,24) = Diag%fluxr(i,24) + visbmdi(i) * tem0d ! uv/vis beam sw dn +! Diag%fluxr(i,25) = Diag%fluxr(i,25) + visdfdi(i) * tem0d ! uv/vis diff sw dn +! Diag%fluxr(i,26) = Diag%fluxr(i,26) + nirbmdi(i) * tem0d ! nir beam sw dn +! Diag%fluxr(i,27) = Diag%fluxr(i,27) + nirdfdi(i) * tem0d ! nir diff sw dn +! ! SW clear-sky fluxes +! Diag%fluxr(i,29) = Diag%fluxr(i,29) + topfsw(i)%upfx0 * tem0d +! Diag%fluxr(i,31) = Diag%fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d +! Diag%fluxr(i,32) = Diag%fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d +! endif +! enddo +! +! ! Save total and boundary-layer clouds +! do i=1,nCol +! Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) +! Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) +! enddo +! +! ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud +! ! is reversed for the fluxr output. save interface pressure (pa) of top/bot +! do j = 1, 3 +! do i = 1, nCol +! tem0d = raddt * cldsa(i,j) +! itop = mtopa(i,j) +! ibtc = mbota(i,j) +! Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d +! Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * p_lev(i,itop) +! Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * p_lev(i,ibtc) +! Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * p_lev(i,itop) +! +! ! Add optical depth and emissivity output +! tem1 = 0. +! do k=ibtc,itop +! tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel +! enddo +! Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 +! enddo +! enddo endif end subroutine GFS_rrtmgp_sw_post_run diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index ce27d0096..94f2cbf5f 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -1,68 +1,96 @@ [ccpp-arg-table] name = GFS_rrtmgp_sw_post_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in - optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = instance of derived type GFS_diag_type - units = DDT + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count dimensions = () - type = GFS_diag_type - intent = inout + type = integer + intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = instance of derived type GFS_coupling_type - units = DDT +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_coupling_type - intent = inout + type = logical + intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[do_sw_clrsky_hr] + standard_name = flag_for_output_of_shortwave_heating_rate + long_name = flag to output sw heating rate + units = flag dimensions = () - type = GFS_statein_type + type = logical intent = in - optional = F -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_dimension) - type = cmpfsw_type - intent = inout - optional = T -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count + optional = F +[save_diag] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag dimensions = () - type = integer + type = logical + intent = in + optional = F +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature at vertical layer for radiation calculation + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys intent = in optional = F [p_lev] @@ -110,22 +138,6 @@ kind = kind_phys intent = in optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F [fluxswUP_allsky] standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile @@ -231,23 +243,146 @@ type = ty_gas_optics_rrtmgp intent = in optional = F +[nirbmdi] + standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir beam sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[nirdfdi] + standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir diff sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[visbmdi] + standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis beam sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[visdfdi] + standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis diff sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[nirbmui] + standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir beam sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[nirdfui] + standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir diff sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[visbmui] + standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis beam sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[visdfui] + standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis diff sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[sfcnsw] + standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step + long_name = total sky sfc netsw flx into ground + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[sfcdsw] + standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step + long_name = total sky sfc downward sw flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcfsw_type + intent = out + optional = F +[htrsw] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + long_name = total sky sw heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_dimension) + type = topfsw_type + intent = out + optional = F +[htrswc] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + long_name = clear sky sw heating rates + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = T +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = in + optional = T [flxprf_sw] standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels units = W m-2 dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_plus_one) type = profsw_type - intent = inout - optional = T -[hsw0] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels - long_name = shortwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = inout - optional = T + intent = out + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index c9b5a1b87..c4208d872 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -2,14 +2,6 @@ module GFS_rrtmgp_sw_pre use physparam use machine, only: & kind_phys ! Working type - use GFS_typedefs, only: & - GFS_sfcprop_type, & ! Surface fields - GFS_control_type, & ! Model control parameters - GFS_grid_type, & ! Grid and interpolation related data - GFS_coupling_type, & ! - GFS_statein_type, & ! - GFS_radtend_type, & ! Radiation tendencies needed in physics - GFS_interstitial_type use module_radiation_astronomy,only: & coszmn ! Function to compute cos(SZA) use module_radiation_surface, only: & @@ -35,27 +27,52 @@ end subroutine GFS_rrtmgp_sw_pre_init !> \section arg_table_GFS_rrtmgp_sw_pre_run !! \htmlinclude GFS_rrtmgp_sw_pre.html !! - subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, sw_gas_props, nday, idxday, alb1d, sfc_alb_nir_dir, & - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, & - errmsg, errflg) + subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, nsfcpert, lsswr, do_sfcperts, solhr, & + pertalb, lon, coslat, sinlat, snowd, sncovr, snoalb, zorl, tsfc, hprime, alvsf, & + alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, lsmask, sfc_wts, p_lay, tv_lay, & + relhum, p_lev, sw_gas_props, & + nday, idxday, alb1d, coszen, coszdg, sfc_alb_nir_dir, sfc_alb_nir_dif, & + sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sfc_alb_dif, errmsg, errflg) - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters - type(GFS_grid_type), intent(in) :: & - Grid ! DDT: FV3-GFS grid and interpolation related data - type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! DDT: FV3-GFS surface fields - type(GFS_statein_type), intent(in) :: & - Statein ! DDT: FV3-GFS prognostic state data in from dycore + ! Inputs integer, intent(in) :: & - ncol ! Number of horizontal grid points - real(kind_phys), dimension(ncol,Model%levs),intent(in) :: & + me, & ! Current MPI rank + nCol, & ! Number of horizontal grid points + nLev, & ! Number of vertical layers + nsfcpert ! Number of surface perturbations + logical,intent(in) :: & + lsswr, & ! Call RRTMGP SW radiation? + do_sfcperts + real(kind_phys), intent(in) :: & + solhr ! Time in hours after 00z at the current timestep + real(kind_phys), dimension(5), intent(in) :: & + pertalb ! Magnitude of surface albedo perturbation (frac) + real(kind_phys), dimension(nCol), intent(in) :: & + lsmask, & ! Landmask: sea/land/ice=0/1/2 + lon, & ! Longitude + coslat, & ! Cosine(latitude) + sinlat, & ! Sine(latitude) + snowd, & ! Water equivalent snow depth (mm) + sncovr, & ! Surface snow area fraction (frac) + snoalb, & ! Maximum snow albedo (frac) + zorl, & ! Surface roughness length (cm) + tsfc, & ! Surface skin temperature (K) + hprime, & ! Standard deviation of subgrid orography (m) + alvsf, & ! Mean vis albedo with strong cosz dependency (frac) + alnsf, & ! Mean nir albedo with strong cosz dependency (frac) + alvwf, & ! Mean vis albedo with weak cosz dependency (frac) + alnwf, & ! Mean nir albedo with weak cosz dependency (frac) + facsf, & ! Fractional coverage with strong cosz dependency (frac) + facwf, & ! Fractional coverage with weak cosz dependency (frac) + fice, & ! Ice fraction over open water (frac) + tisfc ! Sea ice surface skin temperature (K) + real(kind_phys), dimension(nCol,nsfcpert), intent(in) :: & + sfc_wts ! Weights for stochastic surface physics perturbation () + real(kind_phys), dimension(nCol,nLev),intent(in) :: & p_lay, & ! Layer pressure tv_lay, & ! Layer virtual-temperature relhum ! Layer relative-humidity - real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & + real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & p_lev ! Pressure @ layer interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: spectral information for SW calculation @@ -66,16 +83,15 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ integer, dimension(ncol), intent(out) :: & idxday ! Indices for daylit points real(kind_phys), dimension(ncol), intent(out) :: & - alb1d ! Surface albedo pertubation + alb1d, & ! Surface albedo pertubation + coszen, & ! Cosine of SZA + coszdg, & ! Cosine of SZA, daytime + sfc_alb_dif ! Mean surface diffused (nIR+uvvis) sw albedo real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(out) :: & sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) sfc_alb_uvvis_dir, & ! Surface albedo (direct) sfc_alb_uvvis_dif ! Surface albedo (diffuse) - type(GFS_radtend_type), intent(inout) :: & - Radtend ! DDT: FV3-GFS radiation tendencies - type(GFS_coupling_type), intent(inout) :: & - Coupling ! DDT: FV3-GFS coupling arrays character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -89,13 +105,12 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ errmsg = '' errflg = 0 - if (.not. Model%lsswr) return + if (.not. lsswr) return ! ####################################################################################### ! Compute cosine of zenith angle (only when SW is called) ! ####################################################################################### - call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, NCOL, Model%me, & - Radtend%coszen, Radtend%coszdg) + call coszmn (lon, sinlat, coslat, solhr, nCol, me, coszen, coszdg) ! ####################################################################################### ! For SW gather daylit points @@ -103,7 +118,7 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ nday = 0 idxday = 0 do i = 1, NCOL - if (Radtend%coszen(i) >= 0.0001) then + if (coszen(i) >= 0.0001) then nday = nday + 1 idxday(nday) = i endif @@ -115,10 +130,10 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ ! --- turn vegetation fraction pattern into percentile pattern ! ####################################################################################### alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then + if (do_sfcperts) then + if (pertalb(1) > 0.) then do i=1,ncol - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + call cdfnor(sfc_wts(i,5),alb1d(i)) enddo endif endif @@ -126,13 +141,11 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ ! ####################################################################################### ! Call module_radiation_surface::setalb() to setup surface albedo. ! ####################################################################################### - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, Sfcprop%zorl, & - Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprime(:,1), Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, Sfcprop%facwf, & - Sfcprop%fice, Sfcprop%tisfc, NCOL, alb1d, Model%pertalb, sfcalb) + call setalb (lsmask, snowd, sncovr, snoalb, zorl, coszen, tsfc, tsfc, hprime, alvsf, & + alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, NCOL, alb1d, pertalb, sfcalb) ! Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + sfc_alb_dif(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) ! Spread across all SW bands do iBand=1,sw_gas_props%get_nband() diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 40949834c..1cccf6ffd 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -1,60 +1,241 @@ [ccpp-arg-table] name = GFS_rrtmgp_sw_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = instance of derived type GFS_sfcprop_type - units = DDT +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_sfcprop_type + type = integer intent = in - optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT + optional = F +[nsfcpert] + standard_name = number_of_surface_perturbations + long_name = number of surface perturbations + units = count dimensions = () - type = GFS_statein_type + type = integer intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_radtend_type - intent = inout + type = logical + intent = in optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components - units = DDT +[do_sfcperts] + standard_name = flag_for_stochastic_surface_perturbations + long_name = flag for stochastic surface perturbations option + units = flag dimensions = () - type = GFS_coupling_type - intent = inout + type = logical + intent = in optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count +[solhr] + standard_name = forecast_hour_of_the_day + long_name = time in hours after 00z at the current timestep + units = h dimensions = () - type = integer + type = real + kind = kind_phys + intent = in + optional = F +[pertalb] + standard_name = magnitude_of_surface_albedo_perturbation + long_name = magnitude of surface albedo perturbation + units = frac + dimensions = (5) + type = real + kind = kind_phys + intent = in + optional = F +[lon] + standard_name = longitude + long_name = longitude + units = radian + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[coslat] + standard_name = cosine_of_latitude + long_name = cosine of latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sinlat] + standard_name = sine_of_latitude + long_name = sine of latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = surface_snow_thickness_water_equivalent + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snoalb] + standard_name = upper_bound_on_max_albedo_over_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvsf] + standard_name = mean_vis_albedo_with_strong_cosz_dependency + long_name = mean vis albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnsf] + standard_name = mean_nir_albedo_with_strong_cosz_dependency + long_name = mean nir albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvwf] + standard_name = mean_vis_albedo_with_weak_cosz_dependency + long_name = mean vis albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnwf] + standard_name = mean_nir_albedo_with_weak_cosz_dependency + long_name = mean nir albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facsf] + standard_name =fractional_coverage_with_strong_cosz_dependency + long_name = fractional coverage with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facwf] + standard_name = fractional_coverage_with_weak_cosz_dependency + long_name = fractional coverage with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tisfc] + standard_name = sea_ice_temperature + long_name = sea ice surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_wts] + standard_name = weights_for_stochastic_surface_physics_perturbation + long_name = weights for stochastic surface physics perturbation + units = none + dimensions = (horizontal_dimension,number_of_surface_perturbations) + type = real + kind = kind_phys intent = in optional = F [tv_lay] @@ -162,6 +343,33 @@ type = integer intent = out optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[sfc_alb_dif] + standard_name = surface_diffused_shortwave_albedo + long_name = mean surface diffused sw albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 4b11e849183fa7635c0db6fd0631159159ec126c Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 3 Aug 2020 13:36:11 +0000 Subject: [PATCH 271/404] fixing issues related to z0 and restart reproducibility --- physics/GFS_surface_composites.F90 | 25 +++++++++++++------------ physics/gcycle.F90 | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index a08fcca76..b3000b008 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -144,18 +144,18 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx enddo endif - if (.not. cplflx .or. .not. frac_grid) then - if (cplwav2atm) then - do i=1,im - zorll(i) = zorl(i) - enddo - else - do i=1,im - zorll(i) = zorl(i) - zorlo(i) = zorl(i) - enddo - endif - endif +! if (.not. cplflx .or. .not. frac_grid) then +! if (cplwav2atm) then +! do i=1,im +! zorll(i) = zorl(i) +! enddo +! else +! do i=1,im +! zorll(i) = zorl(i) +! zorlo(i) = zorl(i) +! enddo +! endif +! endif do i=1,im tprcp_wat(i) = tprcp(i) @@ -546,6 +546,7 @@ subroutine GFS_surface_composites_post_run ( qss(i) = qss_ice(i) if (.not. flag_cice(i)) then tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) + zorl(i) = cice(i) * zorl_ice(i) + (one - cice(i)) * zorl_wat(i) elseif (wet(i)) then if (cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice txi = cice(i) diff --git a/physics/gcycle.F90 b/physics/gcycle.F90 index b076f69bd..56d774afd 100644 --- a/physics/gcycle.F90 +++ b/physics/gcycle.F90 @@ -109,7 +109,12 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) TSFFCS(len) = Sfcprop(nb)%tsfc (ix) endif SNOFCS (len) = Sfcprop(nb)%weasd (ix) - ZORFCS (len) = Sfcprop(nb)%zorl (ix) + ZORFCS (len) = Sfcprop(nb)%zorll (ix) + if (SLIFCS(len) > 1.9_kind_phys .and. .not. Model%frac_grid) then + ZORFCS (len) = Sfcprop(nb)%zorli (ix) + elseif (SLIFCS(len) < 0.1_kind_phys .and. .not. Model%frac_grid) then + ZORFCS (len) = Sfcprop(nb)%zorlo (ix) + endif TG3FCS (len) = Sfcprop(nb)%tg3 (ix) CNPFCS (len) = Sfcprop(nb)%canopy (ix) ! F10MFCS (len) = Sfcprop(nb)%f10m (ix) @@ -217,7 +222,12 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) Sfcprop(nb)%tsfco(ix) = TSFFCS (len) endif Sfcprop(nb)%weasd (ix) = SNOFCS (len) - Sfcprop(nb)%zorl (ix) = ZORFCS (len) + Sfcprop(nb)%zorll (ix) = ZORFCS (len) + if (SLIFCS(len) > 1.9_kind_phys .and. .not. Model%frac_grid) then + Sfcprop(nb)%zorli(ix) = ZORFCS (len) + elseif (SLIFCS(len) < 0.1_kind_phys .and. .not. Model%frac_grid) then + Sfcprop(nb)%zorlo(ix) = ZORFCS (len) + endif Sfcprop(nb)%tg3 (ix) = TG3FCS (len) Sfcprop(nb)%canopy (ix) = CNPFCS (len) ! Sfcprop(nb)%f10m (ix) = F10MFCS (len) From 405d5fcc97ad2e6f8255980682687b55d70dc04d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 3 Aug 2020 11:55:04 -0600 Subject: [PATCH 272/404] All DDTs have been removed from argument lists. Physical constatns have been added to the argument lists. Some cleanup. --- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 36 ++--- physics/GFS_rrtmgp_lw_post.F90 | 10 +- physics/GFS_rrtmgp_pre.F90 | 14 +- physics/GFS_rrtmgp_pre.meta | 18 +-- physics/GFS_rrtmgp_sw_post.F90 | 12 +- physics/GFS_rrtmgp_zhaocarr_pre.F90 | 134 +++++++++--------- physics/GFS_rrtmgp_zhaocarr_pre.meta | 197 ++++++++++++++++++++++++--- physics/rrtmgp_lw_cloud_sampling.F90 | 24 ++-- physics/rrtmgp_sw_cloud_sampling.F90 | 4 +- 9 files changed, 307 insertions(+), 142 deletions(-) diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 938e6ac95..79b1aaeb1 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -9,10 +9,13 @@ module GFS_rrtmgp_gfdlmp_pre ! Parameters real(kind_phys), parameter :: & - reice_min = 10.0, & ! Minimum ice size allowed by scheme - reice_max = 150.0, & ! Maximum ice size allowed by scheme - cllimit = 0.001, & ! Lowest cloud fraction in GFDL MP scheme - decorr_con = 2.50 ! Decorrelation length constant (km) for iovrlw/iovrsw = 4 or 5 and idcor = 0 + reliq_def = 10.0 , & ! Default liq radius to 10 micron (used when effr_in=F) + reice_def = 50.0, & ! Default ice radius to 50 micron (used when effr_in=F) + rerain_def = 1000.0, & ! Default rain radius to 1000 micron (used when effr_in=F) + resnow_def = 250.0, & ! Default snow radius to 250 micron (used when effr_in=F) + reice_min = 10.0, & ! Minimum ice size allowed by scheme + reice_max = 150.0, & ! Maximum ice size allowed by scheme + cllimit = 0.001 ! Lowest cloud fraction in GFDL MP scheme public GFS_rrtmgp_gfdlmp_pre_init, GFS_rrtmgp_gfdlmp_pre_run, GFS_rrtmgp_gfdlmp_pre_finalize private get_alpha_dcorr, get_alpha_exp @@ -128,14 +131,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) return endif - ! - if(.not. effr_in) then - errmsg = 'Namelist option effr_in=F is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return - endif - + ! Initialize outputs cld_lwp(:,:) = 0.0 cld_reliq(:,:) = 0.0 @@ -187,10 +183,17 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld cld_swp(iCol,iLay) = cld_condensate(iCol,iLay,4) * tem1 endif ! Use radii provided from the macrophysics - cld_reliq(iCol,iLay) = effrin_cldliq(iCol,iLay) - cld_reice(iCol,iLay) = max(reice_min, min(reice_max,effrin_cldice(iCol,iLay))) - cld_rerain(iCol,iLay) = effrin_cldrain(iCol,iLay) - cld_resnow(iCol,iLay) = effrin_cldsnow(iCol,iLay) + if (effr_in) then + cld_reliq(iCol,iLay) = effrin_cldliq(iCol,iLay) + cld_reice(iCol,iLay) = max(reice_min, min(reice_max,effrin_cldice(iCol,iLay))) + cld_rerain(iCol,iLay) = effrin_cldrain(iCol,iLay) + cld_resnow(iCol,iLay) = effrin_cldsnow(iCol,iLay) + else + cld_reliq(iCol,iLay) = reliq_def + cld_reice(iCol,iLay) = reice_def + cld_rerain(iCol,iLay) = rerain_def + cld_resnow(iCol,iLay) = resnow_def + endif enddo enddo @@ -358,6 +361,7 @@ subroutine get_alpha_exp(nlon, nlay, dzlay, iovrlp, latdeg, juldat, yearlen, cld ! ==================== end of description ===================== ! ! use physparam, only: idcor + use physcons, only: decorr_con implicit none ! Input integer, intent(in) :: nlon, nlay diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index a9a238cc9..a6b37acfc 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -20,14 +20,14 @@ end subroutine GFS_rrtmgp_lw_post_init ! ######################################################################################### ! SUBROUTINE GFS_rrtmgp_lw_post_run - ! ######################################################################################### + ! ######################################################################################## !> \section arg_table_GFS_rrtmgp_lw_post_run !! \htmlinclude GFS_rrtmgp_lw_post.html !! - subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag, fhlwr, & - p_lev, t_lay, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky,& - raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, & - sfcdlw, sfcflw, tsflw, htrlw, topflw, flxprf_lw, htrlwc, errmsg, errflg) + subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag, fhlwr, & + p_lev, t_lay, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & + fluxlwDOWN_clrsky, raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, sfcdlw, & + sfcflw, tsflw, htrlw, topflw, flxprf_lw, htrlwc, errmsg, errflg) ! Inputs integer, intent(in) :: & diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 01a56a00f..0e5d65f5c 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -145,7 +145,7 @@ end subroutine GFS_rrtmgp_pre_init !! subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, fhswr, & fhlwr, xlat, xlon, prsl, tgrs, prslk, prsi, qgrs, tsfc, active_gases_array, & - con_eps, con_epsm1, con_fvirt, qs_Min, & + con_eps, con_epsm1, con_fvirt, con_epsqs, & raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, tv_lay, relhum, tracer, & gas_concentrations, errmsg, errflg) @@ -168,8 +168,7 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, con_eps, & ! Physical constant: Epsilon (Rd/Rv) con_epsm1, & ! Physical constant: Epsilon (Rd/Rv) minus one con_fvirt, & ! Physical constant: Inverse of epsilon minus one - qs_Min ! Algorithmic constant: Lower limit for saturation vapor pressure - + con_epsqs ! Physical constant: Minimum saturation mixing-ratio (kg/kg) real(kind_phys), dimension(nCol), intent(in) :: & xlon, & ! Longitude xlat, & ! Latitude @@ -211,7 +210,7 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, logical :: top_at_1 real(kind_phys),dimension(nCol,nLev) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs, tem1, tem2 - real(kind_phys), dimension(nCol,nLev) :: o3_lay, qs_lay, q_lay + real(kind_phys), dimension(nCol,nLev) :: o3_lay, q_lay real(kind_phys), dimension(nCol,nLev, NF_VGAS) :: gas_vmr ! Initialize CCPP error handling variables @@ -266,9 +265,8 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, do iCol=1,NCOL do iLay=1,nLev es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa - qs = max( qs_Min, con_eps * es / (p_lay(iCol,iLay) + con_epsm1*es) ) - relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(qs_Min, q_lay(iCol,iLay))/qs ) ) - qs_lay(iCol,iLay) = qs + qs = max( con_epsqs, con_eps * es / (p_lay(iCol,iLay) + con_epsm1*es) ) + relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(con_epsqs, q_lay(iCol,iLay))/qs ) ) tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + con_fvirt*q_lay(iCol,iLay)) enddo enddo @@ -285,7 +283,7 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr, if (i_o3 > 0) then do iLay=1,nlev do iCol=1,NCOL - o3_lay(iCol,iLay) = max( qs_Min, tracer(iCol,iLay,i_o3) ) + o3_lay(iCol,iLay) = max( con_epsqs, tracer(iCol,iLay,i_o3) ) enddo enddo ! OR Use climatological ozone data diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index b5fcc7879..95a9403cd 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -204,15 +204,6 @@ kind = len=* intent = in optional = F -[qs_Min] - standard_name = lower_limit_for_saturation_vapor_pressure - long_name = lower limit allowed when computing saturation vapor pressure - units = none - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F [con_eps] standard_name = ratio_of_dry_air_to_water_vapor_gas_constants long_name = rd/rv @@ -240,6 +231,15 @@ kind = kind_phys intent = in optional = F +[con_epsqs] + standard_name = minimum_value_of_saturation_mixing_ratio + long_name = floor value for saturation mixing ratio + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 840360429..0d3991fcf 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -24,12 +24,12 @@ end subroutine GFS_rrtmgp_sw_post_init !> \section arg_table_GFS_rrtmgp_sw_post_run !! \htmlinclude GFS_rrtmgp_sw_post_run.html !! - subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky_hr, & - save_diag, fhswr, coszen, coszdg, t_lay, p_lev, sfc_alb_nir_dir, & - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sw_gas_props, fluxswUP_allsky, & - fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & - mtopa, cld_frac, cldtausw, & - nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, & + subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky_hr, & + save_diag, fhswr, coszen, coszdg, t_lay, p_lev, sfc_alb_nir_dir, sfc_alb_nir_dif, & + sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sw_gas_props, fluxswUP_allsky, & + fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & + mtopa, cld_frac, cldtausw, & + nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, & sfcdsw, htrsw, sfcfsw, topfsw, htrswc, flxprf_sw, scmpsw, errmsg, errflg) ! Inputs diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.F90 b/physics/GFS_rrtmgp_zhaocarr_pre.F90 index 20330f0c6..edba20958 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.F90 +++ b/physics/GFS_rrtmgp_zhaocarr_pre.F90 @@ -1,31 +1,19 @@ ! ######################################################################################## ! This module contains the interface between the Zhao-Carr macrophysics and the RRTMGP -! radiation schemes. Only compatable with Model%imp_physics = Model%imp_physics_zhaocarr +! radiation schemes. Only compatable with imp_physics = imp_physics_zhaocarr ! ######################################################################################## module GFS_rrtmgp_zhaocarr_pre use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_tbd_type - use physcons, only: con_ttp, & ! Temperature at h2o 3pt (K) - con_rd, & ! Gas constant for dry air (J/KgK) - con_pi, & ! PI - con_g, & ! Gravity (m/s2) - con_rog, & - eps => con_eps, & ! Rd/Rv - epsm1 => con_epsm1 ! Rd/Rv-1 - use physparam, only: lcnorm, lcrick, idcor, iovrlw, iovrsw use rrtmgp_aux, only: check_error_msg use funcphys, only: fpvs - use radcons, only: qmin - ! Parameters + + ! Zhao-Carr MP parameters. real(kind_phys), parameter :: & - reliq_def = 10.0 , & ! fault liq radius to 10 micron + reliq_def = 10.0 , & ! Default liq radius to 10 micron reice_def = 50.0, & ! Default ice radius to 50 micron rerain_def = 1000.0, & ! Default rain radius to 1000 micron - resnow_def = 250.0, & ! Default snow radius to 250 micron - epsq = 1.0e-12, & ! Tiny value - xrc3 = 100., & !??? - gfac = 1.0e5/con_g, & - gord = con_g/con_rd + resnow_def = 250.0 ! Default snow radius to 250 micron + public GFS_rrtmgp_zhaocarr_pre_init, GFS_rrtmgp_zhaocarr_pre_run, GFS_rrtmgp_zhaocarr_pre_finalize contains @@ -39,20 +27,36 @@ end subroutine GFS_rrtmgp_zhaocarr_pre_init !! \section arg_table_GFS_rrtmgp_zhaocarr_pre_run !! \htmlinclude GFS_rrtmgp_zhaocarr_pre_run.html !! - subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & - p_lev, p_lay, t_lay, relhum, tv_lay, tracer, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, & - cld_swp, cld_resnow, cld_rwp, cld_rerain, errmsg, errflg) + subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lsswr, & + lslwr, effr_in, uni_cld, lmfshal, lat, lsmask, p_lev, p_lay, t_lay, relhum, & + tv_lay, effrin_cldliq, effrin_cldice, effrin_cldrain, effrin_cldsnow, & + shoc_sgs_cldfrac, cncvw, tracer, & + con_eps, con_epsq, con_epsqs, con_epsm1, con_g, con_ttp, con_rd, & + cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & + cld_rerain, errmsg, errflg) implicit none - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters - type(GFS_tbd_type), intent(in) :: & - Tbd ! DDT: FV3-GFS data not yet assigned to a defined container - integer, intent(in) :: & - nCol, & ! Number of horizontal grid-points - nLev ! Number of vertical-layers - + + ! Inputs + integer, intent(in) :: & + nCol, & ! Number of horizontal grid points + nLev, & ! Number of vertical layers + nCnd, & ! Number of cloud condensation types. + nTracers, & ! Number of tracers from model. + i_cldliq ! Index into tracer array for cloud liquid. + logical, intent(in) :: & + lsswr, & ! Call SW radiation? + lslwr, & ! Call LW radiation + effr_in, & ! Provide hydrometeor radii from macrophysics? + uni_cld, & ! + lmfshal + real(kind_phys), intent(in) :: & + con_eps, & ! rd/rv + con_epsm1, & ! (rd/rv) - 1 + con_epsq, & ! Floor value for specific humidity + con_epsqs, & ! Floor value for saturation mixing ratio + con_g, & ! Gravitational acceleration (m/s2) + con_ttp, & ! Triple point temperature of water (K) + con_rd ! Ideal gas constant for dry air (J/kg/K) real(kind_phys), dimension(nCol), intent(in) :: & lsmask, & ! Land/Sea mask lat ! Latitude @@ -60,10 +64,16 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & tv_lay, & ! Virtual temperature (K) p_lay, & ! Pressure at model-layers (Pa) t_lay, & ! Temperature at model-layers (K) - relhum ! Relative humidity at model-layers () + relhum, & ! Relative humidity at model-layers () + effrin_cldliq, & ! Effective radius for liquid cloud-particles (microns) + effrin_cldice, & ! Effective radius for ice cloud-particles (microns) + effrin_cldrain, & ! Effective radius for rain cloud-particles (microns) + effrin_cldsnow, & ! Effective radius for snow cloud-particles (microns) + shoc_sgs_cldfrac, & ! Subgrid-scale cloud fraction from the SHOC scheme + cncvw ! Convective cloud water mixing ratio (kg/kg) real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & p_lev ! Pressure at model-level interfaces (Pa) - real(kind_phys), dimension(nCol, nLev, Model%ntrac),intent(in) :: & + real(kind_phys), dimension(nCol, nLev, nTracers),intent(in) :: & tracer ! Cloud condensate amount in layer by type () ! Outputs @@ -85,24 +95,16 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & ! Local variables real(kind_phys) :: tem1,tem2,tem3,clwt,onemrh,clwm,clwmin,es,qs,value - real(kind_phys), dimension(nCol, nLev, min(4,Model%ncnd)) :: cld_condensate + real(kind_phys), dimension(nCol, nLev, min(4,nCnd)) :: cld_condensate integer :: iCol,iLay,l,ncndl,iovr real(kind_phys), dimension(nCol,nLev) :: deltaP - if (.not. (Model%lsswr .or. Model%lslwr)) return + if (.not. (lsswr .or. lslwr)) return ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - ! Test inputs - if (lcnorm) then - errmsg = 'Namelist option lcnorm is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return - endif - + ! Initialize outputs cld_lwp(:,:) = 0.0 cld_reliq(:,:) = 0.0 @@ -117,21 +119,21 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & ! Pull out cloud information for Zhao-Carr MP scheme. ! #################################################################################### ! Condensate - cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,Model%ntcw) ! Liquid water + cld_condensate(1:nCol,1:nLev,1) = tracer(1:nCol,1:nLev,i_cldliq) ! Liquid water ! Set really tiny suspended particle amounts to clear do iLay=1,nLev do iCol=1,nCol - if (cld_condensate(iCol,iLay,1) < epsq) cld_condensate(iCol,iLay,1) = 0.0 + if (cld_condensate(iCol,iLay,1) < con_epsq) cld_condensate(iCol,iLay,1) = 0.0 enddo enddo - ! Use radii provided from the macrophysics - if (Model%effr_in) then - cld_reliq(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,2) - cld_reice(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,3) - cld_rerain(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,4) - cld_resnow(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,5) + ! Use radii provided from the macrophysics? + if (effr_in) then + cld_reliq(1:nCol,1:nLev) = effrin_cldliq(1:nCol,1:nLev) + cld_reice(1:nCol,1:nLev) = effrin_cldice(1:nCol,1:nLev) + cld_rerain(1:nCol,1:nLev) = effrin_cldrain(1:nCol,1:nLev) + cld_resnow(1:nCol,1:nLev) = effrin_cldsnow(1:nCol,1:nLev) else cld_reliq(1:nCol,1:nLev) = reliq_def cld_reice(1:nCol,1:nLev) = reice_def @@ -140,16 +142,16 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & endif ! Use cloud-fraction from SHOC? - if (Model%uni_cld) then - cld_frac(1:nCol,1:nLev) = Tbd%phy_f3d(1:nCol,1:nLev,Model%indcld) - ! Compute cloud-fraction + if (uni_cld) then + cld_frac(1:nCol,1:nLev) = shoc_sgs_cldfrac(1:nCol,1:nLev) + ! Compute cloud-fraction? else clwmin = 0.0e-6 - if (.not. Model%lmfshal) then + if (.not. lmfshal) then do iLay = 1,nLev do iCol = 1, nCol es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (p_lay(iCol,iLay) + epsm1*es) ) + qs = max( con_epsqs, con_eps * es / (p_lay(iCol,iLay) + con_epsm1*es) ) clwt = 1.0e-6 * (p_lay(iCol,iLay)*0.001) if (cld_condensate(iCol,iLay,1) > clwt) then onemrh= max( 1.e-10, 1.0-relhum(iCol,iLay) ) @@ -166,17 +168,13 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & do iLay=1,nLev do iCol = 1, nCol es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (p_lay(iCol,iLay) + epsm1*es) ) + qs = max( con_epsqs, con_eps * es / (p_lay(iCol,iLay) + con_epsm1*es) ) clwt = 1.0e-6 * (p_lay(iCol,iLay)*0.001) if (cld_condensate(iCol,iLay,1) > clwt) then onemrh= max( 1.e-10, 1.0-relhum(iCol,iLay) ) clwm = clwmin / max( 0.01, p_lay(iCol,iLay)*0.001 ) tem1 = min(max((onemrh*qs)**0.49,0.0001),1.0) !jhan - if (Model%lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif + tem1 = 100.0 / tem1 value = max( min( tem1*(cld_condensate(iCol,iLay,1)-clwm), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(relhum(iCol,iLay)) ) cld_frac(iCol,iLay) = max( tem2*(1.0-exp(-value)), 0.0 ) @@ -189,19 +187,19 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & ! Add suspended convective cloud water to grid-scale cloud water only for cloud ! fraction & radiation computation it is to enhance cloudiness due to suspended convec ! cloud water for zhao/moorthi's (imp_phys=99) - cld_condensate(1:nCol,1:nLev,1) = cld_condensate(1:nCol,1:nLev,1) + Tbd%phy_f3d(1:nCol,1:nLev,6) + cld_condensate(1:nCol,1:nLev,1) = cld_condensate(1:nCol,1:nLev,1) + cncvw(1:nCol,1:nLev) ! Compute cloud liquid/ice condensate path. do iLay=1,nLev do iCol=1,nCol - tem1 = max(0.0, cld_condensate(iCol,iLay,1)) * gfac * deltaP(iCol,iLay) + tem1 = max(0.0, cld_condensate(iCol,iLay,1)) * (1.0e5/con_g) * deltaP(iCol,iLay) cld_iwp(iCol,iLay) = tem1*(t_lay(iCol,iLay) - 273.16) cld_lwp(iCol,iLay) = tem1 - cld_iwp(iCol,iLay) enddo enddo ! Compute effective liquid cloud droplet radius over land. - if(.not. Model%effr_in) then + if(.not. effr_in) then do iCol = 1, nCol if (nint(lsmask(iCol)) == 1) then do iLay = 1, nLev @@ -213,13 +211,13 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(Model, Tbd, nCol, nLev, lat, lsmask, & ! Compute effective ice cloud droplet radius following Heymsfield ! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. - if(.not. Model%effr_in) then + if(.not. effr_in) then deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. do iLay=1,nLev do iCol=1,nCol tem2 = t_lay(iCol,iLay) - con_ttp if (cld_iwp(iCol,iLay) > 0.0) then - tem3 = gord * cld_iwp(iCol,iLay) * p_lay(iCol,iLay) / (deltaP(iCol,iLay)*tv_lay(iCol,iLay)) + tem3 = (con_g/con_rd ) * cld_iwp(iCol,iLay) * p_lay(iCol,iLay) / (deltaP(iCol,iLay)*tv_lay(iCol,iLay)) if (tem2 < -50.0) then cld_reice(iCol,iLay) = (1250.0/9.917) * tem3 ** 0.109 elseif (tem2 < -40.0) then diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta index 0afed8c1e..bf72d7400 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.meta +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -2,22 +2,6 @@ [ccpp-arg-table] name = GFS_rrtmgp_zhaocarr_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = instance of derived type GFS_tbd_type - units = DDT - dimensions = () - type = GFS_tbd_type - intent = in - optional = F [ncol] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -34,6 +18,70 @@ type = integer intent = in optional = F +[nTracers] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[ncnd] + standard_name = number_of_cloud_condensate_types + long_name = number of cloud condensate types + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[effr_in] + standard_name = flag_for_cloud_effective_radii + long_name = flag for cloud effective radii calculations in GFDL microphysics + units = + dimensions = () + type = logical + intent = in + optional = F +[uni_cld] + standard_name = flag_for_uni_cld + long_name = flag for uni_cld + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lmfshal] + standard_name = flag_for_lmfshal + long_name = flag for lmfshal + units = flag + dimensions = () + type = logical + intent = in + optional = F +[i_cldliq] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F [lat] standard_name = latitude long_name = latitude @@ -87,6 +135,60 @@ kind = kind_phys intent = in optional = F +[effrin_cldliq] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldice] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldrain] + standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um + long_name = effective radius of cloud rain particle in micrometers + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[effrin_cldsnow] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometers + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[shoc_sgs_cldfrac] + standard_name = subgrid_scale_cloud_fraction_from_shoc + long_name = subgrid-scale cloud fraction from the SHOC scheme + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cncvw] + standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d + long_name = convective cloud water mixing ratio in the phy_f3d array + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers @@ -105,6 +207,69 @@ kind = kind_phys intent = in optional = F +[con_ttp] + standard_name = triple_point_temperature_of_water + long_name = triple point temperature of water + units = K + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_epsq] + standard_name = minimum_value_of_specific_humidity + long_name = floor value for specific humidity + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_epsqs] + standard_name = minimum_value_of_saturation_mixing_ratio + long_name = floor value for saturation mixing ratio + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_epsm1] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + long_name = (rd/rv) - 1 + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 396c98a76..1d6cc06a1 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -97,7 +97,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! if (iovrlw .ne. 1 .and. iovrlw .ne. 3 .and. iovrlw .ne. 4 .and. iovrlw .ne. 5) then - errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' + errmsg = 'Cloud overlap assumption not supported.' errflg = 1 call check_error_msg('rrtmgp_lw_cloud_sampling',errmsg) return @@ -135,7 +135,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Cloud-overlap. select case ( iovrlw ) case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_max_ran(rng3D, & cld_frac, & cldfracMCICA)) @@ -146,20 +146,20 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, call random_number(rng1D,rng_stat) rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D, & rng3D2, & cld_frac, & cloud_overlap_param(:,1:nLev-1), & cldfracMCICA)) case(4) ! Exponential overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & cld_frac, & cloud_overlap_param(:,1:nLev-1), & cldfracMCICA)) case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & cld_frac, & cloud_overlap_param(:,1:nLev-1), & @@ -167,7 +167,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, end select ! Sampling. Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & draw_samples(cldfracMCICA, & lw_optical_props_cloudsByBand, & lw_optical_props_clouds)) @@ -203,7 +203,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Precipitation overlap. select case ( iovrlw ) case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_max_ran(rng3D, & precip_frac, & precipfracSAMP)) @@ -215,20 +215,20 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_dcorr(rng3D, & rng3D2, & precip_frac, & precip_overlap_param(:,1:nLev-1), & precipfracSAMP)) case(4) ! Exponential overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & precip_frac, & precip_overlap_param(:,1:nLev-1), & precipfracSAMP)) case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & sampled_mask_exp_ran(rng3D, & precip_frac, & precip_overlap_param(:,1:nLev-1), & @@ -236,13 +236,13 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, end select ! Sampling. Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run', & draw_samples(precipfracSAMP, & lw_optical_props_precipByBand, & lw_optical_props_precip)) ! #################################################################################### - ! For GFDL MP just add precipitation optics to cloud-optics + ! Just add precipitation optics to cloud-optics ! #################################################################################### lw_optical_props_clouds%tau = lw_optical_props_clouds%tau + lw_optical_props_precip%tau diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 3be4b023e..0a0511bc2 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -101,7 +101,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Only works w/ SDFs v15p2 and v16beta if (iovrsw .ne. 1 .and. iovrsw .ne. 3 .and. iovrsw .ne. 4 .and. iovrsw .ne. 5) then - errmsg = 'Cloud overlap assumption not supported by GFDL microphysics suite.' + errmsg = 'Cloud overlap assumption not supported.' errflg = 1 call check_error_msg('rrtmgp_sw_cloud_sampling',errmsg) return @@ -245,7 +245,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd endif ! #################################################################################### - ! For GFDL MP just add precipitation optics to cloud-optics + ! Just add precipitation optics to cloud-optics ! #################################################################################### do iGpt=1,sw_gas_props%get_ngpt() do iday=1,nDay From 7b6a9cf3950b5ceaad4e0f73e3c943781c9af9b4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 4 Aug 2020 00:47:21 +0000 Subject: [PATCH 273/404] Some changes to work in UFS. --- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 208 +-------------------------- physics/GFS_rrtmgp_gfdlmp_pre.meta | 2 +- physics/GFS_rrtmgp_zhaocarr_pre.F90 | 56 +++++--- physics/GFS_rrtmgp_zhaocarr_pre.meta | 36 +++++ physics/physcons.F90 | 1 + physics/radiation_clouds.f | 201 +++++++++++++++++++++++++- 6 files changed, 274 insertions(+), 230 deletions(-) diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 79b1aaeb1..b67b22d41 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -6,7 +6,7 @@ module GFS_rrtmgp_gfdlmp_pre use machine, only: kind_phys use physparam, only: lcnorm, lcrick, idcor, iovrlw, iovrsw use rrtmgp_aux, only: check_error_msg - + use module_radiation_clouds, only: get_alpha_exp, get_alpha_dcorr ! Parameters real(kind_phys), parameter :: & reliq_def = 10.0 , & ! Default liq radius to 10 micron (used when effr_in=F) @@ -18,7 +18,7 @@ module GFS_rrtmgp_gfdlmp_pre cllimit = 0.001 ! Lowest cloud fraction in GFDL MP scheme public GFS_rrtmgp_gfdlmp_pre_init, GFS_rrtmgp_gfdlmp_pre_run, GFS_rrtmgp_gfdlmp_pre_finalize - private get_alpha_dcorr, get_alpha_exp + contains ! ###################################################################################### ! ###################################################################################### @@ -214,7 +214,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld ! Cloud overlap parameter ! if (iovr == 3) then - call get_alpha_dcorr(nCol, nLev, lat, deltaZ, de_lgth, cloud_overlap_param) + call get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, de_lgth, cloud_overlap_param) endif if (iovr == 4 .or. iovr == 5) then call get_alpha_exp(nCol, nLev, deltaZ, iovr, lat, julian, yearlen, cld_frac, cloud_overlap_param) @@ -231,206 +231,4 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_run ! ######################################################################################### subroutine GFS_rrtmgp_gfdlmp_pre_finalize() end subroutine GFS_rrtmgp_gfdlmp_pre_finalize - - ! ######################################################################################### - ! Private module routines - ! ######################################################################################### - - ! ######################################################################################### - ! Subroutine to compute cloud-overlap parameter, alpha, for decorrelation-length cloud - ! overlap assumption. - ! ######################################################################################### - subroutine get_alpha_dcorr(nCol, nLev, lat, deltaZ, de_lgth, cloud_overlap_param) - - ! Inputs - integer, intent(in) :: & - nCol, & ! Number of horizontal grid-points - nLev ! Number of vertical-layers - real(kind_phys), dimension(nCol), intent(in) :: & - lat ! Latitude - real(kind_phys), dimension(nCol,nLev),intent(in) :: & - deltaZ ! Layer thickness - - ! Outputs - real(kind_phys), dimension(nCol),intent(out) :: & - de_lgth ! Decorrelation length - real(kind_phys), dimension(nCol,nLev),intent(out) :: & - cloud_overlap_param ! Cloud-overlap parameter - - ! Local - integer :: iCol, iLay - - do iCol =1,nCol - de_lgth(iCol) = max( 0.6, 2.78-4.6*abs(lat(iCol)/con_pi) ) - do iLay=nLev,2,-1 - if (de_lgth(iCol) .gt. 0) then - cloud_overlap_param(iCol,iLay-1) = & - exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1)) / de_lgth(iCol) ) - endif - enddo - enddo - end subroutine get_alpha_dcorr - - ! ######################################################################################### -!> \ingroup module_radiation_clouds -!! This program derives the exponential transition, alpha, from maximum to -!! random overlap needed to define the fractional cloud vertical correlation -!! for the exponential (EXP, iovrlp=4) or the exponential-random (ER, iovrlp=5) -!! cloud overlap options for RRTMGP. For exponential, the transition from -!! maximum to random with distance through model layers occurs without regard -!! to the configuration of clear and cloudy layers. For the ER method, each -!! block of adjacent cloudy layers is treated with a separate transition from -!! maximum to random, and blocks of cloudy layers separated by one or more -!! clear layers are correlated randomly. -!> /param nlon : number of model longitude points -!> /param nlay : vertical layer dimension -!> /param dzlay(nlon,nlay) : distance between the center of model layers -!> /param iovrlp : cloud overlap method -!> : 0 = random -!> : 1 = maximum-random -!> : 2 = maximum -!> : 3 = decorrelation (NOAA/Hou) -!> : 4 = exponential (AER) -!> : 5 = exponential-random (AER) -!> /param latdeg(nlon) : latitude (in degrees 90 -> -90) -!> /param juldat : day of the year (fractional julian day) -!> /param yearlen : current length of the year (365/366 days) -!> /param cldf(nlon,nlay) : cloud fraction -!> /param idcor : decorrelation length method -!> : 0 = constant value (AER; decorr_con) -!> : 1 = latitude and day of year varying value (AER; Oreopoulos, et al., 2012) -!> /param decorr_con : decorrelation length constant -!! -!>\section detail Detailed Algorithm -!! @{ - subroutine get_alpha_exp(nlon, nlay, dzlay, iovrlp, latdeg, juldat, yearlen, cldf, alpha) -! =================================================================== ! -! ! -! abstract: Derives the exponential transition, alpha, from maximum to ! -! random overlap needed to define the fractional cloud vertical ! -! correlation for the exponential (EXP, iovrlp=4) or the exponential- ! -! random (ER, iovrlp=5) cloud overlap options for RRTMG. For ! -! exponential, the transition from maximum to random with distance ! -! through model layers occurs without regard to the configuration of ! -! clear and cloudy layers. For the ER method, each block of adjacent ! -! cloudy layers is treated with a separate transition from maximum to ! -! random, and blocks of cloudy layers separated by one or more ! -! clear layers are correlated randomly. ! -! ! -! usage: call get_alpha ! -! ! -! subprograms called: none ! -! ! -! attributes: ! -! language: fortran 90 ! -! machine: ibm-sp, sgi ! -! ! -! author: m.j. iacono (AER) for use with the RRTMG radiation code ! -! ! -! ==================== definition of variables ==================== ! -! ! -! Input variables: ! -! nlon : number of model longitude points ! -! nlay : vertical layer dimension ! -! dzlay(nlon,nlay) : distance between the center of model layers ! -! iovrlp : cloud overlap method ! -! : 0 = random ! -! : 1 = maximum-random ! -! : 2 = maximum ! -! : 3 = decorrelation (NOAA/Hou) ! -! : 4 = exponential (AER) ! -! : 5 = exponential-random (AER) ! -! latdeg(nlon) : latitude (in degrees 90 -> -90) ! -! juldat : day of the year (fractional julian day) ! -! yearlen : current length of the year (365/366 days) ! -! cldf(nlon,nlay) : cloud fraction ! -! ! -! output variables: ! -! alpha(nlon,nlay) : alpha exponential transition parameter for ! -! : cloud vertical correlation ! -! ! -! external module variables: (in physcons) ! -! decorr_con : decorrelation length constant (km) ! -! ! -! external module variables: (in physparam) ! -! idcor : control flag for decorrelation length method ! -! =0: constant decorrelation length (decorr_con) ! -! =1: latitude and day-of-year varying decorrelation! -! length (AER; Oreopoulos, et al., 2012) ! -! ! -! ==================== end of description ===================== ! -! - use physparam, only: idcor - use physcons, only: decorr_con - implicit none -! Input - integer, intent(in) :: nlon, nlay - integer, intent(in) :: iovrlp - integer, intent(in) :: yearlen - real(kind_phys), dimension(:,:), intent(in) :: dzlay - real(kind_phys), dimension(:,:), intent(in) :: cldf - real(kind_phys), dimension(:), intent(in) :: latdeg - real(kind_phys), intent(in) :: juldat -! Output - real(kind_phys), dimension(:,:), intent(out):: alpha -! Local - integer :: i, k - real(kind_phys) :: decorr_len(nlon) ! Decorrelation length (km) -! Constants for latitude and day-of-year dependent decorrlation length (Oreopoulos et al, 2012) -! Used when idcor = 1 - real(kind_phys), parameter :: am1 = 1.4315_kind_phys - real(kind_phys), parameter :: am2 = 2.1219_kind_phys - real(kind_phys), parameter :: am4 = -25.584_kind_phys - real(kind_phys), parameter :: amr = 7.0_kind_phys - real(kind_phys) :: am3 - real(kind_phys), parameter :: zero = 0.0d0 - real(kind_phys), parameter :: one = 1.0d0 -! -!===> ... begin here -! -! If exponential or exponential-random cloud overlap is used: -! derive day-of-year and latitude-varying decorrelation lendth if requested; -! otherwise use the constant decorrelation length, decorr_con, specified in physcons.F90 - do i = 1, nlon - if (iovrlp == 4 .or. iovrlp == 5) then - if (idcor .eq. 1) then - if (juldat .gt. 181._kind_phys) then - am3 = -4._kind_phys * amr * (juldat - 272._kind_phys) / yearlen - else - am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) / yearlen - endif -! For latitude in degrees, decorr_len in km - decorr_len(i) = am1 + am2 * exp( -(latdeg(i) - am3)**2 / am4**2) - else - decorr_len(i) = decorr_con - endif - endif - enddo -! For atmospheric data defined from surface to toa; define alpha from surface to toa -! Exponential cloud overlap - if (iovrlp == 4) then - do i = 1, nlon - alpha(i,1) = zero - do k = 2, nlay - alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) - enddo - enddo - endif -! Exponential-random cloud overlap - if (iovrlp == 5) then - do i = 1, nlon - alpha(i,1) = zero - do k = 2, nlay - alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) - ! Decorrelate layers when a clear layer follows a cloudy layer to enforce - ! random correlation between non-adjacent blocks of cloudy layers - if (cldf(i,k) .eq. zero .and. cldf(i,k-1) .gt. zero) then - alpha(i,k) = zero - endif - enddo - enddo - endif - return - end subroutine get_alpha_exp - end module GFS_rrtmgp_gfdlmp_pre diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 67efc4b4f..932ffeb8f 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -364,7 +364,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = in + intent = out optional = F [errmsg] standard_name = ccpp_error_message diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.F90 b/physics/GFS_rrtmgp_zhaocarr_pre.F90 index edba20958..ac9fb7446 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.F90 +++ b/physics/GFS_rrtmgp_zhaocarr_pre.F90 @@ -6,7 +6,8 @@ module GFS_rrtmgp_zhaocarr_pre use machine, only: kind_phys use rrtmgp_aux, only: check_error_msg use funcphys, only: fpvs - + use module_radiation_clouds, only: get_alpha_dcorr + ! Zhao-Carr MP parameters. real(kind_phys), parameter :: & reliq_def = 10.0 , & ! Default liq radius to 10 micron @@ -31,9 +32,9 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss lslwr, effr_in, uni_cld, lmfshal, lat, lsmask, p_lev, p_lay, t_lay, relhum, & tv_lay, effrin_cldliq, effrin_cldice, effrin_cldrain, effrin_cldsnow, & shoc_sgs_cldfrac, cncvw, tracer, & - con_eps, con_epsq, con_epsqs, con_epsm1, con_g, con_ttp, con_rd, & + con_eps, con_epsq, con_epsqs, con_epsm1, con_g, con_ttp, con_rd, con_pi, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, errmsg, errflg) + cld_rerain, de_lgth, deltaZ, cloud_overlap_param, errmsg, errflg) implicit none ! Inputs @@ -56,7 +57,8 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss con_epsqs, & ! Floor value for saturation mixing ratio con_g, & ! Gravitational acceleration (m/s2) con_ttp, & ! Triple point temperature of water (K) - con_rd ! Ideal gas constant for dry air (J/kg/K) + con_rd, & ! Ideal gas constant for dry air (J/kg/K) + con_pi ! Pi real(kind_phys), dimension(nCol), intent(in) :: & lsmask, & ! Land/Sea mask lat ! Latitude @@ -77,6 +79,8 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss tracer ! Cloud condensate amount in layer by type () ! Outputs + real(kind_phys), dimension(nCol),intent(out) :: & + de_lgth ! Decorrelation length real(kind_phys), dimension(nCol,nLev),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path @@ -86,8 +90,9 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss cld_swp, & ! Cloud snow water path cld_resnow, & ! Cloud snow effective radius cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius - + cld_rerain, & ! Cloud rain effective radius + deltaZ, & ! Layer thickness (km) + cloud_overlap_param ! Cloud-overlap parameter character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -96,7 +101,7 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss ! Local variables real(kind_phys) :: tem1,tem2,tem3,clwt,onemrh,clwm,clwmin,es,qs,value real(kind_phys), dimension(nCol, nLev, min(4,nCnd)) :: cld_condensate - integer :: iCol,iLay,l,ncndl,iovr + integer :: iCol,iLay real(kind_phys), dimension(nCol,nLev) :: deltaP if (.not. (lsswr .or. lslwr)) return @@ -134,11 +139,6 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss cld_reice(1:nCol,1:nLev) = effrin_cldice(1:nCol,1:nLev) cld_rerain(1:nCol,1:nLev) = effrin_cldrain(1:nCol,1:nLev) cld_resnow(1:nCol,1:nLev) = effrin_cldsnow(1:nCol,1:nLev) - else - cld_reliq(1:nCol,1:nLev) = reliq_def - cld_reice(1:nCol,1:nLev) = reice_def - cld_rerain(1:nCol,1:nLev) = rerain_def - cld_resnow(1:nCol,1:nLev) = resnow_def endif ! Use cloud-fraction from SHOC? @@ -152,10 +152,10 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss do iCol = 1, nCol es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa qs = max( con_epsqs, con_eps * es / (p_lay(iCol,iLay) + con_epsm1*es) ) - clwt = 1.0e-6 * (p_lay(iCol,iLay)*0.001) + clwt = 1.0e-6 * (p_lay(iCol,iLay)*0.00001) if (cld_condensate(iCol,iLay,1) > clwt) then onemrh= max( 1.e-10, 1.0-relhum(iCol,iLay) ) - clwm = clwmin / max( 0.01, p_lay(iCol,iLay)*0.001 ) + clwm = clwmin / max( 0.01, p_lay(iCol,iLay)*0.00001 ) tem1 = min(max(sqrt(sqrt(onemrh*qs)),0.0001),1.0) tem1 = 2000.0 / tem1 value = max( min( tem1*(cld_condensate(iCol,iLay,1)-clwm), 50.0 ), 0.0 ) @@ -169,10 +169,10 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss do iCol = 1, nCol es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa qs = max( con_epsqs, con_eps * es / (p_lay(iCol,iLay) + con_epsm1*es) ) - clwt = 1.0e-6 * (p_lay(iCol,iLay)*0.001) + clwt = 1.0e-6 * (p_lay(iCol,iLay)*0.00001) if (cld_condensate(iCol,iLay,1) > clwt) then onemrh= max( 1.e-10, 1.0-relhum(iCol,iLay) ) - clwm = clwmin / max( 0.01, p_lay(iCol,iLay)*0.001 ) + clwm = clwmin / max( 0.01, p_lay(iCol,iLay)*0.00001 ) tem1 = min(max((onemrh*qs)**0.49,0.0001),1.0) !jhan tem1 = 100.0 / tem1 value = max( min( tem1*(cld_condensate(iCol,iLay,1)-clwm), 50.0 ), 0.0 ) @@ -190,6 +190,7 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss cld_condensate(1:nCol,1:nLev,1) = cld_condensate(1:nCol,1:nLev,1) + cncvw(1:nCol,1:nLev) ! Compute cloud liquid/ice condensate path. + deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. do iLay=1,nLev do iCol=1,nCol tem1 = max(0.0, cld_condensate(iCol,iLay,1)) * (1.0e5/con_g) * deltaP(iCol,iLay) @@ -207,17 +208,14 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss enddo endif enddo - endif - ! Compute effective ice cloud droplet radius following Heymsfield - ! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. - if(.not. effr_in) then - deltaP = abs(p_lev(:,2:nLev+1)-p_lev(:,1:nLev))/100. + ! Compute effective ice cloud droplet radius following Heymsfield + ! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. do iLay=1,nLev do iCol=1,nCol tem2 = t_lay(iCol,iLay) - con_ttp if (cld_iwp(iCol,iLay) > 0.0) then - tem3 = (con_g/con_rd ) * cld_iwp(iCol,iLay) * p_lay(iCol,iLay) / (deltaP(iCol,iLay)*tv_lay(iCol,iLay)) + tem3 = (con_g/con_rd ) * cld_iwp(iCol,iLay) * (0.01*p_lay(iCol,iLay)) / (deltaP(iCol,iLay)*tv_lay(iCol,iLay)) if (tem2 < -50.0) then cld_reice(iCol,iLay) = (1250.0/9.917) * tem3 ** 0.109 elseif (tem2 < -40.0) then @@ -232,7 +230,19 @@ subroutine GFS_rrtmgp_zhaocarr_pre_run(nCol, nLev, nCnd, nTracers, i_cldliq, lss enddo enddo endif - + + ! #################################################################################### + ! Cloud (and precipitation) overlap ! #################################################################################### + ! Compute layer-thickness + do iCol=1,nCol + do iLay=1,nLev + deltaZ(iCol,iLay) = ((con_rd/con_g)*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + enddo + enddo + + ! Cloud overlap parameter + call get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, de_lgth, cloud_overlap_param) + end subroutine GFS_rrtmgp_zhaocarr_pre_run ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta index bf72d7400..052da5798 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.meta +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -270,6 +270,15 @@ kind = kind_phys intent = in optional = F +[con_pi] + standard_name = pi + long_name = ratio of a circle's circumference to its diameter + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction @@ -351,6 +360,33 @@ kind = kind_phys intent = out optional = F +[cloud_overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[deltaZ] + standard_name = layer_thickness + long_name = layer_thickness + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/physcons.F90 b/physics/physcons.F90 index 8fbdc9930..6a41bda44 100644 --- a/physics/physcons.F90 +++ b/physics/physcons.F90 @@ -79,6 +79,7 @@ module physcons real(kind=kind_phys),parameter:: con_jcal =4.1855E+0_kind_phys !< joules per calorie real(kind=kind_phys),parameter:: con_rhw0 =1022.0_kind_phys !< sea water reference density (\f$kg/m^{3}\f$) real(kind=kind_phys),parameter:: con_epsq =1.0E-12_kind_phys !< min q for computing precip type + real(kind=kind_phys),parameter:: con_epsqs =1.0E-10_kind_phys ! Selected thermodynamics constants with kind=kind_dyn real(kind=kind_dyn), parameter:: con_rd_dyn =2.8705e+2_kind_dyn !< gas constant air (\f$J/kg/K\f$) real(kind=kind_dyn), parameter:: con_rv_dyn =4.6150e+2_kind_dyn !< gas constant H2O (\f$J/kg/K\f$) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 5b4aa54ab..f6d7e32cb 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -243,7 +243,8 @@ module module_radiation_clouds integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld4o, gethml + & cld_init, progcld5, progcld4o, gethml, & + & get_alpha_dcorr, get_alpha_exp ! ================= @@ -3451,6 +3452,204 @@ subroutine gethml & end subroutine gethml !----------------------------------- !! @} + ! ######################################################################################### + ! Subroutine to compute cloud-overlap parameter, alpha, for decorrelation-length cloud + ! overlap assumption. + ! ######################################################################################### + subroutine get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, & + & de_lgth, cloud_overlap_param) + + integer, intent(in) :: nCol, nLev + real(kind_phys), intent(in) :: con_pi + real(kind_phys), dimension(nCol), intent(in) :: lat + real(kind_phys), dimension(nCol,nLev),intent(in) :: deltaZ + real(kind_phys), dimension(nCol),intent(out) :: de_lgth + real(kind_phys), dimension(nCol,nLev),intent(out) :: & + & cloud_overlap_param + + ! Local + integer :: iCol, iLay + + do iCol =1,nCol + de_lgth(iCol) = max( 0.6, 2.78-4.6*abs(lat(iCol)/con_pi) ) + do iLay=nLev,2,-1 + if (de_lgth(iCol) .gt. 0) then + cloud_overlap_param(iCol,iLay-1) = & + & exp( -0.5 * (deltaZ(iCol,iLay)+deltaZ(iCol,iLay-1))/& + & de_lgth(iCol)) + endif + enddo + enddo + end subroutine get_alpha_dcorr + + ! ######################################################################################### +!> \ingroup module_radiation_clouds +!! This program derives the exponential transition, alpha, from maximum to +!! random overlap needed to define the fractional cloud vertical correlation +!! for the exponential (EXP, iovrlp=4) or the exponential-random (ER, iovrlp=5) +!! cloud overlap options for RRTMGP. For exponential, the transition from +!! maximum to random with distance through model layers occurs without regard +!! to the configuration of clear and cloudy layers. For the ER method, each +!! block of adjacent cloudy layers is treated with a separate transition from +!! maximum to random, and blocks of cloudy layers separated by one or more +!! clear layers are correlated randomly. +!> /param nlon : number of model longitude points +!> /param nlay : vertical layer dimension +!> /param dzlay(nlon,nlay) : distance between the center of model layers +!> /param iovrlp : cloud overlap method +!> : 0 = random +!> : 1 = maximum-random +!> : 2 = maximum +!> : 3 = decorrelation (NOAA/Hou) +!> : 4 = exponential (AER) +!> : 5 = exponential-random (AER) +!> /param latdeg(nlon) : latitude (in degrees 90 -> -90) +!> /param juldat : day of the year (fractional julian day) +!> /param yearlen : current length of the year (365/366 days) +!> /param cldf(nlon,nlay) : cloud fraction +!> /param idcor : decorrelation length method +!> : 0 = constant value (AER; decorr_con) +!> : 1 = latitude and day of year varying value (AER; Oreopoulos, et al., 2012) +!> /param decorr_con : decorrelation length constant +!! +!>\section detail Detailed Algorithm +!! @{ + subroutine get_alpha_exp(nlon, nlay, dzlay, iovrlp, latdeg, & + & juldat, yearlen, cldf, alpha) +! =================================================================== ! +! ! +! abstract: Derives the exponential transition, alpha, from maximum to ! +! random overlap needed to define the fractional cloud vertical ! +! correlation for the exponential (EXP, iovrlp=4) or the exponential- ! +! random (ER, iovrlp=5) cloud overlap options for RRTMG. For ! +! exponential, the transition from maximum to random with distance ! +! through model layers occurs without regard to the configuration of ! +! clear and cloudy layers. For the ER method, each block of adjacent ! +! cloudy layers is treated with a separate transition from maximum to ! +! random, and blocks of cloudy layers separated by one or more ! +! clear layers are correlated randomly. ! +! ! +! usage: call get_alpha ! +! ! +! subprograms called: none ! +! ! +! attributes: ! +! language: fortran 90 ! +! machine: ibm-sp, sgi ! +! ! +! author: m.j. iacono (AER) for use with the RRTMG radiation code ! +! ! +! ==================== definition of variables ==================== ! +! ! +! Input variables: ! +! nlon : number of model longitude points ! +! nlay : vertical layer dimension ! +! dzlay(nlon,nlay) : distance between the center of model layers ! +! iovrlp : cloud overlap method ! +! : 0 = random ! +! : 1 = maximum-random ! +! : 2 = maximum ! +! : 3 = decorrelation (NOAA/Hou) ! +! : 4 = exponential (AER) ! +! : 5 = exponential-random (AER) ! +! latdeg(nlon) : latitude (in degrees 90 -> -90) ! +! juldat : day of the year (fractional julian day) ! +! yearlen : current length of the year (365/366 days) ! +! cldf(nlon,nlay) : cloud fraction ! +! ! +! output variables: ! +! alpha(nlon,nlay) : alpha exponential transition parameter for ! +! : cloud vertical correlation ! +! ! +! external module variables: (in physcons) ! +! decorr_con : decorrelation length constant (km) ! +! ! +! external module variables: (in physparam) ! +! idcor : control flag for decorrelation length method ! +! =0: constant decorrelation length (decorr_con) ! +! =1: latitude and day-of-year varying decorrelation! +! length (AER; Oreopoulos, et al., 2012) ! +! ! +! ==================== end of description ===================== ! +! + use physparam, only: idcor + use physcons, only: decorr_con + implicit none +! Input + integer, intent(in) :: nlon, nlay + integer, intent(in) :: iovrlp + integer, intent(in) :: yearlen + real(kind_phys), dimension(:,:), intent(in) :: dzlay + real(kind_phys), dimension(:,:), intent(in) :: cldf + real(kind_phys), dimension(:), intent(in) :: latdeg + real(kind_phys), intent(in) :: juldat +! Output + real(kind_phys), dimension(:,:), intent(out):: alpha +! Local + integer :: i, k + real(kind_phys) :: decorr_len(nlon) ! Decorrelation length (km) +! Constants for latitude and day-of-year dependent decorrlation length (Oreopoulos et al, 2012) +! Used when idcor = 1 + real(kind_phys), parameter :: am1 = 1.4315_kind_phys + real(kind_phys), parameter :: am2 = 2.1219_kind_phys + real(kind_phys), parameter :: am4 = -25.584_kind_phys + real(kind_phys), parameter :: amr = 7.0_kind_phys + real(kind_phys) :: am3 + real(kind_phys), parameter :: zero = 0.0d0 + real(kind_phys), parameter :: one = 1.0d0 +! +!===> ... begin here +! +! If exponential or exponential-random cloud overlap is used: +! derive day-of-year and latitude-varying decorrelation lendth if requested; +! otherwise use the constant decorrelation length, decorr_con, specified in physcons.F90 + do i = 1, nlon + if (iovrlp == 4 .or. iovrlp == 5) then + if (idcor .eq. 1) then + if (juldat .gt. 181._kind_phys) then + am3 = -4._kind_phys * amr * (juldat - 272._kind_phys)/& + & yearlen + else + am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) / & + & yearlen + endif +! For latitude in degrees, decorr_len in km + decorr_len(i) = am1 + am2 * exp( -(latdeg(i) - am3)**2 / & + & am4**2) + else + decorr_len(i) = decorr_con + endif + endif + enddo +! For atmospheric data defined from surface to toa; define alpha from surface to toa +! Exponential cloud overlap + if (iovrlp == 4) then + do i = 1, nlon + alpha(i,1) = zero + do k = 2, nlay + alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) + enddo + enddo + endif +! Exponential-random cloud overlap + if (iovrlp == 5) then + do i = 1, nlon + alpha(i,1) = zero + do k = 2, nlay + alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (cldf(i,k) .eq. zero .and. cldf(i,k-1) .gt. zero) then + alpha(i,k) = zero + endif + enddo + enddo + endif + + return + end subroutine get_alpha_exp + + ! !........................................! From 04f660ba4e305028a3c8064239619266971226d6 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Tue, 4 Aug 2020 15:16:33 +0000 Subject: [PATCH 274/404] adding _kp in place of -r8 in some routines --- physics/GFS_PBL_generic.F90 | 10 +- physics/gcm_shoc.F90 | 160 ++++----- physics/m_micro.F90 | 354 ++++++++++---------- physics/moninshoc.f | 38 +-- physics/rascnv.F90 | 382 +++++++++++----------- physics/sfc_diff.f | 112 +++---- physics/sfc_nst.f | 56 ++-- physics/wv_saturation.F | 636 ++++++++++++++++++------------------ 8 files changed, 874 insertions(+), 874 deletions(-) diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index f3eb212c7..357309b2a 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -92,7 +92,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, implicit none - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys integer, intent(in) :: im, levs, nvdiff, ntrac integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc integer, intent(in) :: ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef,ntchs, ntchm @@ -111,7 +111,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real (kind=kind_phys), parameter :: zero = 0.0_r8, one=1.0_r8 + real (kind=kind_phys), parameter :: zero = 0.0_kp, one=1.0_kp ! Local variables integer :: i, k, kk, k1, n @@ -325,7 +325,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, implicit none - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys integer, intent(in) :: im, levs, nvdiff, ntrac, ntchs, ntchm integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef logical, intent(in) :: trans_aero @@ -375,9 +375,9 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: zero = 0.0_r8, one = 1.0_r8 + real(kind=kind_phys), parameter :: zero = 0.0_kp, one = 1.0_kp real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue, same as in GFS_typedefs.F90 - real(kind=kind_phys), parameter :: qmin = 1.0e-8_r8 + real(kind=kind_phys), parameter :: qmin = 1.0e-8_kp integer :: i, k, kk, k1, n real(kind=kind_phys) :: tem, rho diff --git a/physics/gcm_shoc.F90 b/physics/gcm_shoc.F90 index 5f755a779..dd7791e18 100644 --- a/physics/gcm_shoc.F90 +++ b/physics/gcm_shoc.F90 @@ -10,7 +10,7 @@ module shoc private public shoc_run, shoc_init, shoc_finalize - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys contains @@ -45,7 +45,7 @@ subroutine shoc_run (nx, nzm, tcr, tcrf, con_cp, con_g, con_hvap, con_hfus, con_ character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: epsq = 1.0e-20_r8, zero=0.0_r8, one=1.0_r8 + real(kind=kind_phys), parameter :: epsq = 1.0e-20_kp, zero=0.0_kp, one=1.0_kp integer :: i, k @@ -219,34 +219,34 @@ subroutine shoc_work (ix, nx, nzm, nz, dtn, & real, intent(in) :: prnum (nx,nzm) ! turbulent Prandtl number real, intent(inout) :: wthv_sec (ix,nzm) ! Buoyancy flux, K*m/s - real, parameter :: zero=0.0_r8, one=1.0_r8, half=0.5_r8, two=2.0_r8, eps=0.622_r8, & - three=3.0_r8, oneb3=one/three, twoby3=two/three, fourb3=twoby3+twoby3 - real, parameter :: sqrt2 = sqrt(two), twoby15 = two / 15.0_r8, & - nmin = 1.0_r8, RI_cub = 6.4e-14_r8, RL_cub = 1.0e-15_r8, & - skew_facw=1.2_r8, skew_fact=0.0_r8, & - tkhmax=300.0_r8, qcmin=1.0e-9_r8 + real, parameter :: zero=0.0_kp, one=1.0_kp, half=0.5_kp, two=2.0_kp, eps=0.622_kp, & + three=3.0_kp, oneb3=one/three, twoby3=two/three, fourb3=twoby3+twoby3 + real, parameter :: sqrt2 = sqrt(two), twoby15 = two / 15.0_kp, & + nmin = 1.0_kp, RI_cub = 6.4e-14_kp, RL_cub = 1.0e-15_kp, & + skew_facw=1.2_kp, skew_fact=0.0_kp, & + tkhmax=300.0_kp, qcmin=1.0e-9_kp real :: lsub, fac_cond, fac_fus, cpolv, fac_sub, ggri, kapa, gocp, & rog, sqrtpii, epsterm, onebeps, onebrvcp ! SHOC tunable parameters - real, parameter :: lambda = 0.04_r8 -! real, parameter :: min_tke = 1.0e-6_r8 ! Minumum TKE value, m**2/s**2 - real, parameter :: min_tke = 1.0e-4_r8 ! Minumum TKE value, m**2/s**2 -! real, parameter :: max_tke = 100.0_r8 ! Maximum TKE value, m**2/s**2 - real, parameter :: max_tke = 40.0_r8 ! Maximum TKE value, m**2/s**2 + real, parameter :: lambda = 0.04_kp +! real, parameter :: min_tke = 1.0e-6_kp ! Minumum TKE value, m**2/s**2 + real, parameter :: min_tke = 1.0e-4_kp ! Minumum TKE value, m**2/s**2 +! real, parameter :: max_tke = 100.0_kp ! Maximum TKE value, m**2/s**2 + real, parameter :: max_tke = 40.0_kp ! Maximum TKE value, m**2/s**2 ! Maximum turbulent eddy length scale, m -! real, parameter :: max_eddy_length_scale = 2000.0_r8 - real, parameter :: max_eddy_length_scale = 1000.0_r8 +! real, parameter :: max_eddy_length_scale = 2000.0_kp + real, parameter :: max_eddy_length_scale = 1000.0_kp ! Maximum "return-to-isotropy" time scale, s - real, parameter :: max_eddy_dissipation_time_scale = 2000.0_r8 - real, parameter :: Pr = 1.0_r8 ! Prandtl number + real, parameter :: max_eddy_dissipation_time_scale = 2000.0_kp + real, parameter :: Pr = 1.0_kp ! Prandtl number ! Constants for the TKE dissipation term based on Deardorff (1980) - real, parameter :: pt19=0.19_r8, pt51=0.51_r8, pt01=0.01_r8, atmin=0.01_r8, atmax=one-atmin - real, parameter :: Cs = 0.15_r8, epsln=1.0e-6_r8 -! real, parameter :: Ck = 0.2_r8 ! Coeff in the eddy diffusivity - TKE relationship, see Eq. 7 in BK13 - real, parameter :: Ck = 0.1_r8 ! Coeff in the eddy diffusivity - TKE relationship, see Eq. 7 in BK13 + real, parameter :: pt19=0.19_kp, pt51=0.51_kp, pt01=0.01_kp, atmin=0.01_kp, atmax=one-atmin + real, parameter :: Cs = 0.15_kp, epsln=1.0e-6_kp +! real, parameter :: Ck = 0.2_kp ! Coeff in the eddy diffusivity - TKE relationship, see Eq. 7 in BK13 + real, parameter :: Ck = 0.1_kp ! Coeff in the eddy diffusivity - TKE relationship, see Eq. 7 in BK13 ! real, parameter :: Ce = Ck**3/(0.7*Cs**4) ! real, parameter :: Ce = Ck**3/(0.7*Cs**4) * 2.2 @@ -260,28 +260,28 @@ subroutine shoc_work (ix, nx, nzm, nz, dtn, & ! real, parameter :: Ce = Ck**3/Cs**4, Ces = Ce*3.0/0.7 ! real, parameter :: vonk=0.35 ! Von Karman constant - real, parameter :: vonk=0.4_r8 ! Von Karman constant Moorthi - as in GFS - real, parameter :: tscale=400.0_r8 ! time scale set based off of similarity results of BK13, s - real, parameter :: w_tol_sqd = 4.0e-04_r8 ! Min vlaue of second moment of w -! real, parameter :: w_tol_sqd = 1.0e-04_r8 ! Min vlaue of second moment of w - real, parameter :: w_thresh = 0.0_r8, thresh = 0.0_r8 - real, parameter :: w3_tol = 1.0e-20_r8 ! Min vlaue of third moment of w + real, parameter :: vonk=0.4_kp ! Von Karman constant Moorthi - as in GFS + real, parameter :: tscale=400.0_kp ! time scale set based off of similarity results of BK13, s + real, parameter :: w_tol_sqd = 4.0e-04_kp ! Min vlaue of second moment of w +! real, parameter :: w_tol_sqd = 1.0e-04_kp ! Min vlaue of second moment of w + real, parameter :: w_thresh = 0.0_kp, thresh = 0.0_kp + real, parameter :: w3_tol = 1.0e-20_kp ! Min vlaue of third moment of w ! These parameters are a tie-in with a microphysical scheme ! Double check their values for the Zhao-Carr scheme. - real, parameter :: tbgmin = 233.16_r8 ! Minimum temperature for cloud water., K (ZC) -! real, parameter :: tbgmin = 258.16_r8 ! Minimum temperature for cloud water., K (ZC) -! real, parameter :: tbgmin = 253.16_r8 ! Minimum temperature for cloud water., K - real, parameter :: tbgmax = 273.16_r8 ! Maximum temperature for cloud ice, K + real, parameter :: tbgmin = 233.16_kp ! Minimum temperature for cloud water., K (ZC) +! real, parameter :: tbgmin = 258.16_kp ! Minimum temperature for cloud water., K (ZC) +! real, parameter :: tbgmin = 253.16_kp ! Minimum temperature for cloud water., K + real, parameter :: tbgmax = 273.16_kp ! Maximum temperature for cloud ice, K real, parameter :: a_bg = one/(tbgmax-tbgmin) ! ! Parameters to tune the second order moments- No tuning is performed currently -! real, parameter :: thl2tune = 2.0_r8, qw2tune = 2.0_r8, qwthl2tune = 2.0_r8, & - real, parameter :: thl2tune = 1.0_r8, qw2tune = 1.0_r8, qwthl2tune = 1.0_r8, & -! thl_tol = 1.0e-4_r8, rt_tol = 1.0e-8_r8, basetemp = 300.0_r8 - thl_tol = 1.0e-2_r8, rt_tol = 1.0e-4_r8 +! real, parameter :: thl2tune = 2.0_kp, qw2tune = 2.0_kp, qwthl2tune = 2.0_kp, & + real, parameter :: thl2tune = 1.0_kp, qw2tune = 1.0_kp, qwthl2tune = 1.0_kp, & +! thl_tol = 1.0e-4_kp, rt_tol = 1.0e-8_kp, basetemp = 300.0_kp + thl_tol = 1.0e-2_kp, rt_tol = 1.0e-4_kp integer, parameter :: nitr=6 @@ -453,7 +453,7 @@ subroutine shoc_work (ix, nx, nzm, nz, dtn, & ! total_water(i,k) = qcl(i,k) + qci(i,k) + qv(i,k) - prespot = (100000.0_r8*wrk) ** kapa ! Exner function + prespot = (100000.0_kp*wrk) ** kapa ! Exner function bet(i,k) = ggr/(tabs(i,k)*prespot) ! Moorthi thv(i,k) = thv(i,k)*prespot ! Moorthi ! @@ -635,8 +635,8 @@ subroutine tke_shoc() if (dis_opt > 0) then do i=1,nx - wrk = (zl(i,k)-zi(i,1)) / adzl(i,1) + 1.5_r8 - cek(i) = (one + two / max((wrk*wrk - 3.3_r8), 0.5_r8)) * cefac + wrk = (zl(i,k)-zi(i,1)) / adzl(i,1) + 1.5_kp + cek(i) = (one + two / max((wrk*wrk - 3.3_kp), 0.5_kp)) * cefac enddo else if (k == 1) then @@ -660,7 +660,7 @@ subroutine tke_shoc() !Obtain Brunt-Vaisalla frequency from diagnosed SGS buoyancy flux !Presumably it is more precise than BV freq. calculated in eddy_length()? - buoy_sgs = - (a_prod_bu+a_prod_bu) / (tkh(i,ku)+tkh(i,kd) + 0.0001_r8) ! tkh is eddy thermal diffussivity + buoy_sgs = - (a_prod_bu+a_prod_bu) / (tkh(i,ku)+tkh(i,kd) + 0.0001_kp) ! tkh is eddy thermal diffussivity !Compute $c_k$ (variable Cee) for the TKE dissipation term following Deardorff (1980) @@ -668,7 +668,7 @@ subroutine tke_shoc() if (buoy_sgs <= zero) then smix = grd else - smix = min(grd,max(0.1_r8*grd, 0.76_r8*sqrt(tke(i,k)/(buoy_sgs+1.0e-10_r8)))) + smix = min(grd,max(0.1_kp*grd, 0.76_kp*sqrt(tke(i,k)/(buoy_sgs+1.0e-10_kp)))) endif ratio = smix/grd @@ -810,9 +810,9 @@ subroutine eddy_length() ! Calculate the measure of PBL depth, Eq. 11 in BK13 (Is this really PBL depth?) do i=1,nx if (denom(i) > zero .and. numer(i) > zero) then - l_inf(i) = min(0.1_r8 * (numer(i)/denom(i)), 100.0_r8) + l_inf(i) = min(0.1_kp * (numer(i)/denom(i)), 100.0_kp) else - l_inf(i) = 100.0_r8 + l_inf(i) = 100.0_kp endif enddo @@ -848,7 +848,7 @@ subroutine eddy_length() ! Find the in-cloud Brunt-Vaisalla frequency - omn = qcl(i,k) / (wrk+1.0e-20_r8) ! Ratio of liquid water to total water + omn = qcl(i,k) / (wrk+1.0e-20_kp) ! Ratio of liquid water to total water ! Latent heat of phase transformation based on relative water phase content ! fac_cond = lcond/cp, fac_fus = lfus/cp @@ -867,7 +867,7 @@ subroutine eddy_length() ! liquid/ice moist static energy static energy divided by cp? bbb = (one + epsv*qsatt-wrk-qpl(i,k)-qpi(i,k) & - + 1.61_r8*tabs(i,k)*dqsat) / (one+lstarn*dqsat) + + 1.61_kp*tabs(i,k)*dqsat) / (one+lstarn*dqsat) ! Calculate Brunt-Vaisalla frequency using centered differences in the vertical @@ -917,7 +917,7 @@ subroutine eddy_length() wrk1 = one / (tscale*tkes*vonk*zl(i,k)) wrk2 = one / (tscale*tkes*l_inf(i)) wrk1 = wrk1 + wrk2 + pt01 * brunt2(i,k) / tke(i,k) - wrk1 = sqrt(one / max(wrk1,1.0e-8_r8)) * (one/0.3_r8) + wrk1 = sqrt(one / max(wrk1,1.0e-8_kp)) * (one/0.3_kp) ! smixt(i,k) = min(max_eddy_length_scale, 2.8284*sqrt(wrk1)/0.3) smixt(i,k) = min(max_eddy_length_scale, wrk1) @@ -988,7 +988,7 @@ subroutine eddy_length() ! The calculation below finds the integral in the Eq. 10 in BK13 for the current cloud conv_var = zero do kk=kl,ku - conv_var = conv_var+ 2.5_r8*adzi(i,kk)*bet(i,kk)*wthv_sec(i,kk) + conv_var = conv_var+ 2.5_kp*adzi(i,kk)*bet(i,kk)*wthv_sec(i,kk) enddo conv_var = conv_var ** oneb3 @@ -1005,7 +1005,7 @@ subroutine eddy_length() wrk = conv_var/(depth*depth*sqrt(tke(i,kk))) & + pt01*brunt2(i,kk)/tke(i,kk) - smixt(i,kk) = min(max_eddy_length_scale, (one/0.3_r8)*sqrt(one/wrk)) + smixt(i,kk) = min(max_eddy_length_scale, (one/0.3_kp)*sqrt(one/wrk)) enddo @@ -1052,7 +1052,7 @@ subroutine conv_scale() !********************************************************************** conv_vel2(i,k) = conv_vel2(i,k-1) & - + 2.5_r8*adzi(i,k)*bet(i,k)*wthv_sec(i,k) + + 2.5_kp*adzi(i,k)*bet(i,k)*wthv_sec(i,k) enddo enddo @@ -1083,7 +1083,7 @@ subroutine check_eddy() do i=1,nx - wrk = 0.1_r8*adzl(i,k) + wrk = 0.1_kp*adzl(i,k) ! Minimum 0.1 of local dz smixt(i,k) = max(wrk, min(max_eddy_length_scale,smixt(i,k))) @@ -1091,7 +1091,7 @@ subroutine check_eddy() ! be not larger that that. ! if (sqrt(dx*dy) .le. 1000.) smixt(i,k)=min(sqrt(dx*dy),smixt(i,k)) - if (qcl(i,kb) == zero .and. qcl(i,k) > zero .and. brunt(i,k) > 1.0e-4_r8) then + if (qcl(i,kb) == zero .and. qcl(i,k) > zero .and. brunt(i,k) > 1.0e-4_kp) then !If just above the cloud top and atmosphere is stable, set to 0.1 of local dz smixt(i,k) = wrk endif @@ -1117,10 +1117,10 @@ subroutine canuto() ! cond, wrk, wrk1, wrk2, wrk3, avew ! ! See Eq. 7 in C01 (B.7 in Pete's dissertation) - real, parameter :: c=7.0_r8, a0=0.52_r8/(c*c*(c-2.0_r8)), a1=0.87_r8/(c*c), & - a2=0.5_r8/c, a3=0.6_r8/(c*(c-2.0_r8)), a4=2.4_r8/(3.0_r8*c+5.0_r8), & - a5=0.6_r8/(c*(3.0_r8*c+5.0_r8)) -!Moorthi a5=0.6_r8/(c*(3.0_r8+5.0_r8*c)) + real, parameter :: c=7.0_kp, a0=0.52_kp/(c*c*(c-2.0_kp)), a1=0.87_kp/(c*c), & + a2=0.5_kp/c, a3=0.6_kp/(c*(c-2.0_kp)), a4=2.4_kp/(3.0_kp*c+5.0_kp), & + a5=0.6_kp/(c*(3.0_kp*c+5.0_kp)) +!Moorthi a5=0.6_kp/(c*(3.0_kp+5.0_kp*c)) ! do k=1,nzm do k=2,nzm @@ -1210,7 +1210,7 @@ subroutine canuto() omega0 = a4 / (one-a5*buoy_sgs2) omega1 = omega0 / (c+c) - omega2 = omega1*f3+(5.0_r8/4.0_r8)*omega0*f4 + omega2 = omega1*f3+(5.0_kp/4.0_kp)*omega0*f4 ! Compute the X0, Y0, X1, Y1 terms, see Eq. 5 a-b in C01 (B.5 in Pete's dissertation) @@ -1233,7 +1233,7 @@ subroutine canuto() !aab ! Implemetation of the C01 approach in this subroutine is nearly complete @@ -1287,7 +1287,7 @@ subroutine assumed_pdf() diag_qi = zero pval = prsl(i,k) - pfac = pval * 1.0e-5_r8 + pfac = pval * 1.0e-5_kp pkap = pfac ** kapa ! Read in liquid/ice static energy, total water mixing ratio, @@ -1361,21 +1361,21 @@ subroutine assumed_pdf() ELSE !aab Skew_w = w3var / (sqrtw2*sqrtw2*sqrtw2) ! Moorthi ! Proportionality coefficients between widths of each vertical velocity ! gaussian and the sqrt of the second moment of w - w2_1 = 0.4_r8 - w2_2 = 0.4_r8 + w2_1 = 0.4_kp + w2_2 = 0.4_kp ! Compute realtive weight of the first PDF "plume" ! See Eq A4 in Pete's dissertaion - Ensure 0.01 < a < 0.99 wrk = one - w2_1 - aterm = max(atmin,min(half*(one-Skew_w*sqrt(one/(4.0_r8*wrk*wrk*wrk+Skew_w*Skew_w))),atmax)) + aterm = max(atmin,min(half*(one-Skew_w*sqrt(one/(4.0_kp*wrk*wrk*wrk+Skew_w*Skew_w))),atmax)) onema = one - aterm sqrtw2t = sqrt(wrk) @@ -1414,8 +1414,8 @@ subroutine assumed_pdf() ! wrk4 = - aterm*wrk1*thl1_1 - onema*wrk2*thl1_2 wrk = three * (thl1_2-thl1_1) if (wrk /= zero) then - thl2_1 = thlsec * min(100.0_r8,max(zero,(thl1_2*wrk3-wrk4)/(aterm*wrk))) ! A.10 - thl2_2 = thlsec * min(100.0_r8,max(zero,(-thl1_1*wrk3+wrk4)/(onema*wrk))) ! A.11 + thl2_1 = thlsec * min(100.0_kp,max(zero,(thl1_2*wrk3-wrk4)/(aterm*wrk))) ! A.10 + thl2_2 = thlsec * min(100.0_kp,max(zero,(-thl1_1*wrk3+wrk4)/(onema*wrk))) ! A.11 else thl2_1 = zero thl2_2 = zero @@ -1449,12 +1449,12 @@ subroutine assumed_pdf() ! Skew_qw = skew_facw*Skew_w - IF (tsign > 0.4_r8) THEN + IF (tsign > 0.4_kp) THEN Skew_qw = skew_facw*Skew_w - ELSEIF (tsign <= 0.2_r8) THEN + ELSEIF (tsign <= 0.2_kp) THEN Skew_qw = zero ELSE - Skew_qw = (skew_facw/0.2_r8) * Skew_w * (tsign-0.2_r8) + Skew_qw = (skew_facw/0.2_kp) * Skew_w * (tsign-0.2_kp) ENDIF wrk1 = qw1_1 * qw1_1 @@ -1464,8 +1464,8 @@ subroutine assumed_pdf() wrk = three * (qw1_2-qw1_1) if (wrk /= zero) then - qw2_1 = qwsec * min(100.0_r8,max(zero,( qw1_2*wrk3-wrk4)/(aterm*wrk))) ! A.10 - qw2_2 = qwsec * min(100.0_r8,max(zero,(-qw1_1*wrk3+wrk4)/(onema*wrk))) ! A.11 + qw2_1 = qwsec * min(100.0_kp,max(zero,( qw1_2*wrk3-wrk4)/(aterm*wrk))) ! A.10 + qw2_2 = qwsec * min(100.0_kp,max(zero,(-qw1_1*wrk3+wrk4)/(onema*wrk))) ! A.11 else qw2_1 = zero qw2_2 = zero @@ -1511,18 +1511,18 @@ subroutine assumed_pdf() IF (Tl1_1 >= tbgmax) THEN lstarn1 = lcond esval = min(fpvsl(Tl1_1), pval) - qs1 = eps * esval / (pval-0.378_r8*esval) + qs1 = eps * esval / (pval-0.378_kp*esval) ELSE IF (Tl1_1 <= tbgmin) THEN lstarn1 = lsub esval = min(fpvsi(Tl1_1), pval) - qs1 = epss * esval / (pval-0.378_r8*esval) + qs1 = epss * esval / (pval-0.378_kp*esval) ELSE om1 = max(zero, min(one, a_bg*(Tl1_1-tbgmin))) lstarn1 = lcond + (one-om1)*lfus esval = min(fpvsl(Tl1_1), pval) esval2 = min(fpvsi(Tl1_1), pval) - qs1 = om1 * eps * esval / (pval-0.378_r8*esval) & - + (one-om1) * epss * esval2 / (pval-0.378_r8*esval2) + qs1 = om1 * eps * esval / (pval-0.378_kp*esval) & + + (one-om1) * epss * esval2 / (pval-0.378_kp*esval2) ENDIF ! beta1 = (rgas/rv)*(lstarn1/(rgas*Tl1_1))*(lstarn1/(cp*Tl1_1)) @@ -1541,18 +1541,18 @@ subroutine assumed_pdf() IF (Tl1_2 >= tbgmax) THEN lstarn2 = lcond esval = min(fpvsl(Tl1_2), pval) - qs2 = eps * esval / (pval-0.378_r8*esval) + qs2 = eps * esval / (pval-0.378_kp*esval) ELSE IF (Tl1_2 <= tbgmin) THEN lstarn2 = lsub esval = min(fpvsi(Tl1_2), pval) - qs2 = epss * esval / (pval-0.378_r8*esval) + qs2 = epss * esval / (pval-0.378_kp*esval) ELSE om2 = max(zero, min(one, a_bg*(Tl1_2-tbgmin))) lstarn2 = lcond + (one-om2)*lfus esval = min(fpvsl(Tl1_2), pval) esval2 = min(fpvsi(Tl1_2), pval) - qs2 = om2 * eps * esval / (pval-0.378_r8*esval) & - + (one-om2) * epss * esval2 / (pval-0.378_r8*esval2) + qs2 = om2 * eps * esval / (pval-0.378_kp*esval) & + + (one-om2) * epss * esval2 / (pval-0.378_kp*esval2) ENDIF ! beta2 = (rgas/rv)*(lstarn2/(rgas*Tl1_2))*(lstarn2/(cp*Tl1_2)) ! A.18 @@ -1662,14 +1662,14 @@ subroutine assumed_pdf() ! Update ncpl and ncpi Moorthi 12/12/2018 if (ntlnc > 0) then ! liquid and ice number concentrations predicted if (ncpl(i,k) > nmin) then - ncpl(i,k) = diag_ql/max(qc(i,k),1.0e-10_r8)*ncpl(i,k) + ncpl(i,k) = diag_ql/max(qc(i,k),1.0e-10_kp)*ncpl(i,k) else - ncpl(i,k) = max(diag_ql/(fourb3*pi*RL_cub*997.0_r8), nmin) + ncpl(i,k) = max(diag_ql/(fourb3*pi*RL_cub*997.0_kp), nmin) endif if (ncpi(i,k) > nmin) then - ncpi(i,k) = diag_qi/max(qi(i,k),1.0e-10_r8)*ncpi(i,k) + ncpi(i,k) = diag_qi/max(qi(i,k),1.0e-10_kp)*ncpi(i,k) else - ncpi(i,k) = max(diag_qi/(fourb3*pi*RI_cub*500.0_r8), nmin) + ncpi(i,k) = max(diag_qi/(fourb3*pi*RI_cub*500.0_kp), nmin) endif endif diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index 183365a6e..69690d52e 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -167,14 +167,14 @@ subroutine m_micro_run( im, lm, flipv, dt_i & !------------------------------------ ! input ! real, parameter :: r_air = 3.47d-3 - integer, parameter :: r8 = kind_phys - real, parameter :: one=1.0_r8, oneb3=one/3.0_r8, onebcp=one/cp, & - zero=0.0_r8, half=0.5_r8, onebg=one/grav, & + integer, parameter :: kp = kind_phys + real, parameter :: one=1.0_kp, oneb3=one/3.0_kp, onebcp=one/cp, & + zero=0.0_kp, half=0.5_kp, onebg=one/grav, & & kapa=rgas*onebcp, cpbg=cp/grav, & & lvbcp=hvap*onebcp, lsbcp=(hvap+hfus)*onebcp, & - & qsmall=1.0e-14_r8, rainmin = 1.0e-13_r8, & - & fourb3=4.0_r8/3.0_r8, RL_cub=1.0e-15_r8, & - & nmin=1.0_r8 + & qsmall=1.0e-14_kp, rainmin = 1.0e-13_kp, & + & fourb3=4.0_kp/3.0_kp, RL_cub=1.0e-15_kp, & + & nmin=1.0_kp integer, parameter :: ncolmicro = 1 integer,intent(in) :: im, lm, kdt, fprcp, pdfflag, iccn @@ -229,7 +229,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & integer kcldtopcvn,i,k,ll, kbmin, NAUX, nbincontactdust,l integer, dimension(im) :: kct real (kind=kind_phys) T_ICE_ALL, USE_AV_V,BKGTAU,LCCIRRUS, & - & NPRE_FRAC, Nct, Wct, fcn, ksa1, tauxr8, DT_Moist, dt_r8, tem, & + & NPRE_FRAC, Nct, Wct, fcn, ksa1, tauxr8, DT_Moist, dt_kp, tem, & & TMAXLL, USURF,LTS_UP, LTS_LOW, MIN_EXP, fracover, c2_gw, est3 real(kind=kind_phys), allocatable, dimension(:,:) :: & @@ -328,7 +328,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & & ncalr8, ncair8, mnuccdor8, nnucctor8, nsoutr8, nroutr8, & & nnuccdor8, nnucccor8,naair8, & & nsacwior8, nsubior8, nprcior8, npraior8, npccnor8, npsacwsor8, & - & nsubcor8, npraor8, nprc1or8, tlatauxr8,pfrz_inc_r8,sadice, & + & nsubcor8, npraor8, nprc1or8, tlatauxr8,pfrz_inc_kp,sadice, & & sadsnow, am_evp_st, reff_rain, reff_snow, & & umr,ums,qrsedten,qssedten,refl,arefl,areflz,frefl,csrfl, & & acsrfl,fcsrfl,rercld,qrout2,qsout2,nrout2,nsout2,drout2, & @@ -348,28 +348,28 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! real (kind=kind_phys), parameter :: disp_liu=2., ui_scale=1.0 & ! &, dcrit=20.0d-6 & - real (kind=kind_phys), parameter :: disp_liu=1.0_r8 & - &, ui_scale=1.0_r8 & - &, dcrit=1.0e-6_r8 & + real (kind=kind_phys), parameter :: disp_liu=1.0_kp & + &, ui_scale=1.0_kp & + &, dcrit=1.0e-6_kp & ! &, ts_autice=1800.0 & ! &, ts_autice=3600.0 & !time scale - &, ninstr8 = 0.1e6_r8 & - &, ncnstr8 = 100.0e6_r8 + &, ninstr8 = 0.1e6_kp & + &, ncnstr8 = 100.0e6_kp - real(kind=kind_phys):: k_gw, maxkh, tausurf_gw, overscale, tx1, rh1_r8 + real(kind=kind_phys):: k_gw, maxkh, tausurf_gw, overscale, tx1, rh1_kp real(kind=kind_phys):: t_ice_denom integer, dimension(1) :: lev_sed_strt ! sedimentation start level - real(kind=kind_phys), parameter :: sig_sed_strt=0.05_r8 ! normalized pressure at sedimentation start + real(kind=kind_phys), parameter :: sig_sed_strt=0.05_kp ! normalized pressure at sedimentation start real(kind=kind_phys),dimension(3) :: ccn_diag real(kind=kind_phys),dimension(58) :: cloudparams integer, parameter :: CCN_PARAM=2, IN_PARAM=5 - real(kind=kind_phys), parameter ::fdust_drop=1.0_r8, fsoot_drop=0.1_r8 & - &, sigma_nuc_r8=0.28_r8,SCLMFDFR=0.03_r8 -! &, sigma_nuc_r8=0.28,SCLMFDFR=0.1 + real(kind=kind_phys), parameter ::fdust_drop=1.0_kp, fsoot_drop=0.1_kp & + &, sigma_nuc_kp=0.28_kp,SCLMFDFR=0.03_kp +! &, sigma_nuc_kp=0.28,SCLMFDFR=0.1 type (AerProps), dimension (IM,LM) :: AeroProps type (AerProps) :: AeroAux, AeroAux_b @@ -383,22 +383,22 @@ subroutine m_micro_run( im, lm, flipv, dt_i & !================== Start Stratiform cloud processes========================================== !set up initial values - data USE_AV_V/1.0_r8/, BKGTAU/0.015_r8/, LCCIRRUS/500.0_r8/, NPRE_FRAC/1.0_r8/, & - & TMAXLL/296.0_r8/, fracover/1.0_r8/, LTS_LOW/12.0_r8/, LTS_UP/24.0_r8/, & - & MIN_EXP/0.5_r8/ + data USE_AV_V/1.0_kp/, BKGTAU/0.015_kp/, LCCIRRUS/500.0_kp/, NPRE_FRAC/1.0_kp/, & + & TMAXLL/296.0_kp/, fracover/1.0_kp/, LTS_LOW/12.0_kp/, LTS_UP/24.0_kp/, & + & MIN_EXP/0.5_kp/ data cloudparams/ & - & 10.0_r8, 4.0_r8 , 4.0_r8 , 1.0_r8 , 2.e-3_r8, 8.e-4_r8, 2.0_r8 , 1.0_r8 , -1.0_r8 & - &, 0.0_r8 , 1.3_r8 , 1.0e-9_r8, 3.3e-4_r8, 20.0_r8 , 4.8_r8 , 4.8_r8 , 230.0_r8 , 1.0_r8 & - &, 1.0_r8 , 230.0_r8, 14400._r8, 50.0_r8 , 0.01_r8 , 0.1_r8 , 200.0_r8, 0.0_r8 , 0.0_r8 & - &, 0.5_r8 , 0.5_r8 , 2000.0_r8, 0.8_r8 , 0.5_r8 , -40.0_r8, 1.0_r8 , 4.0_r8 , 0.0_r8 & - &, 0.0_r8 , 0.0_r8 , 1.0e-3_r8, 8.0e-4_r8, 1.0_r8 , 0.95_r8 , 1.0_r8 , 0.0_r8 , 900.0_r8& -! &, 0.0_r8 , 0.0_r8 , 1.0e-3_r8, 8.0e-4_r8, 1.0_r8 , 0.95_r8 , 1.0_r8 , 0.0_r8 , 880.0_r8& -! &, 0.0_r8 , 0.0_r8 , 1.0e-3_r8, 8.0e-4_r8, 1.0_r8 , 0.95_r8 , 1.0_r8 , 0.0_r8 , 980.0_r8& - &, 1.0_r8 , 1.0_r8 , 1.0_r8 , 0.0_r8 , 0.0_r8 , 1.e-5_r8, 2.e-5_r8, 2.1e-5_r8, 4.e-5_r8& -! &, 3e-5_r8, 0.1_r8 , 4.0_r8 , 250.0_r8/ ! Annings version - &, 3e-5_r8, 0.1_r8 , 4.0_r8 , 150.0_r8/ ! Annings version -! &, 3e-5_r8, 0.1_r8 , 1.0_r8 , 150.0_r8/ + & 10.0_kp, 4.0_kp , 4.0_kp , 1.0_kp , 2.e-3_kp, 8.e-4_kp, 2.0_kp , 1.0_kp , -1.0_kp & + &, 0.0_kp , 1.3_kp , 1.0e-9_kp, 3.3e-4_kp, 20.0_kp , 4.8_kp , 4.8_kp , 230.0_kp , 1.0_kp & + &, 1.0_kp , 230.0_kp, 14400._kp, 50.0_kp , 0.01_kp , 0.1_kp , 200.0_kp, 0.0_kp , 0.0_kp & + &, 0.5_kp , 0.5_kp , 2000.0_kp, 0.8_kp , 0.5_kp , -40.0_kp, 1.0_kp , 4.0_kp , 0.0_kp & + &, 0.0_kp , 0.0_kp , 1.0e-3_kp, 8.0e-4_kp, 1.0_kp , 0.95_kp , 1.0_kp , 0.0_kp , 900.0_kp& +! &, 0.0_kp , 0.0_kp , 1.0e-3_kp, 8.0e-4_kp, 1.0_kp , 0.95_kp , 1.0_kp , 0.0_kp , 880.0_kp& +! &, 0.0_kp , 0.0_kp , 1.0e-3_kp, 8.0e-4_kp, 1.0_kp , 0.95_kp , 1.0_kp , 0.0_kp , 980.0_kp& + &, 1.0_kp , 1.0_kp , 1.0_kp , 0.0_kp , 0.0_kp , 1.e-5_kp, 2.e-5_kp, 2.1e-5_kp, 4.e-5_kp& +! &, 3e-5_kp, 0.1_kp , 4.0_kp , 250.0_kp/ ! Annings version + &, 3e-5_kp, 0.1_kp , 4.0_kp , 150.0_kp/ ! Annings version +! &, 3e-5_kp, 0.1_kp , 1.0_kp , 150.0_kp/ ! Initialize CCPP error handling variables errmsg = '' @@ -434,7 +434,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & CNV_DQLDT(I,K) = CNV_DQLDT_i(I,ll) CLCN(I,k) = CLCN_i(I,ll) CLLS(I,k) = max(CLLS_io(I,ll)-CLCN_i(I,ll),zero) - PLO(i,k) = prsl_i(i,ll)*0.01_r8 + PLO(i,k) = prsl_i(i,ll)*0.01_kp zlo(i,k) = phil(i,ll) * onebg temp(i,k) = t_io(i,ll) radheat(i,k) = lwheat_i(i,ll) + swheat_i(i,ll) @@ -449,7 +449,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & DO K=0, LM ll = lm-k DO I = 1,IM - PLE(i,k) = prsi_i(i,ll) * 0.01_r8 ! interface pressure in hPa + PLE(i,k) = prsi_i(i,ll) * 0.01_kp ! interface pressure in hPa zet(i,k+1) = phii(i,ll) * onebg END DO END DO @@ -494,7 +494,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & CNV_DQLDT(I,K) = CNV_DQLDT_i(I,k) CLCN(I,k) = CLCN_i(I,k) CLLS(I,k) = max(CLLS_io(I,k)-CLCN_i(I,k),zero) - PLO(i,k) = prsl_i(i,k)*0.01_r8 + PLO(i,k) = prsl_i(i,k)*0.01_kp zlo(i,k) = phil(i,k) * onebg temp(i,k) = t_io(i,k) radheat(i,k) = lwheat_i(i,k) + swheat_i(i,k) @@ -508,7 +508,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & END DO DO K=0, LM DO I = 1,IM - PLE(i,k) = prsi_i(i,k) * 0.01_r8 ! interface pressure in hPa + PLE(i,k) = prsi_i(i,k) * 0.01_kp ! interface pressure in hPa zet(i,k+1) = phii(i,k) * onebg END DO END DO @@ -535,7 +535,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! endif ! DT_MOIST = dt_i - dt_r8 = dt_i + dt_kp = dt_i if (kdt == 1) then DO K=1, LM @@ -547,17 +547,17 @@ subroutine m_micro_run( im, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_r8), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kp), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif enddo @@ -571,8 +571,8 @@ subroutine m_micro_run( im, lm, flipv, dt_i & DO I=1, IM DO K = LM-2, 10, -1 - If ((CNV_DQLDT(I,K) <= 1.0e-9_r8) .and. & - & (CNV_DQLDT(I,K+1) > 1.0e-9_r8)) then + If ((CNV_DQLDT(I,K) <= 1.0e-9_kp) .and. & + & (CNV_DQLDT(I,K+1) > 1.0e-9_kp)) then KCT(I) = K+1 exit end if @@ -652,7 +652,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & do l=lm-1,1,-1 do i=1,im tx1 = half * (temp(i,l+1) + temp(i,l)) - kh(i,l) = 3.55e-7_r8*tx1**2.5_r8*(rgas*0.01_r8) / ple(i,l) !kh molecule diff only needing refinement + kh(i,l) = 3.55e-7_kp*tx1**2.5_kp*(rgas*0.01_kp) / ple(i,l) !kh molecule diff only needing refinement enddo end do do i=1,im @@ -661,8 +661,8 @@ subroutine m_micro_run( im, lm, flipv, dt_i & enddo do L=LM,1,-1 do i=1,im - blk_l(i,l) = one / ( one/max(0.15_r8*ZPBL(i),0.4_r8*zlo(i,lm-1))& - & + one/(zlo(i,l)*0.4_r8) ) + blk_l(i,l) = one / ( one/max(0.15_kp*ZPBL(i),0.4_kp*zlo(i,lm-1))& + & + one/(zlo(i,l)*0.4_kp) ) SC_ICE(i,l) = one NCPL(i,l) = MAX( NCPL(i,l), zero) @@ -681,8 +681,8 @@ subroutine m_micro_run( im, lm, flipv, dt_i & do l=1,lm - rhdfdar8(l) = 1.e-8_r8 - rhu00r8(l) = 0.95_r8 + rhdfdar8(l) = 1.e-8_kp + rhu00r8(l) = 0.95_kp ttendr8(l) = zero qtendr8(l) = zero @@ -692,7 +692,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & enddo do k=1,10 do l=1,lm - rndstr8(l,k) = 2.0e-7_r8 + rndstr8(l,k) = 2.0e-7_kp enddo enddo @@ -727,8 +727,8 @@ subroutine m_micro_run( im, lm, flipv, dt_i & if ( iccn == 2) then AERMASSMIX(:,:,1:ntrcaer) = aerfld_i(:,:,1:ntrcaer) else - AERMASSMIX(:,:,1:5) = 1.0e-6_r8 - AERMASSMIX(:,:,6:15) = 2.0e-14_r8 + AERMASSMIX(:,:,1:5) = 1.0e-6_kp + AERMASSMIX(:,:,6:15) = 2.0e-14_kp end if !> - Call aerconversion1() call AerConversion1 (AERMASSMIX, AeroProps) @@ -747,23 +747,23 @@ subroutine m_micro_run( im, lm, flipv, dt_i & kcldtopcvn = KCT(I) tausurf_gw = min(half*SQRT(TAUOROX(I)*TAUOROX(I) & - & + TAUOROY(I)*TAUOROY(I)), 10.0_r8) + & + TAUOROY(I)*TAUOROY(I)), 10.0_kp) do k=1,lm uwind_gw(k) = min(half*SQRT( U1(I,k)*U1(I,k) & - & + V1(I,k)*V1(I,k)), 50.0_r8) + & + V1(I,k)*V1(I,k)), 50.0_kp) ! tausurf_gw =tausurf_gw + max (tausurf_gw, min(0.5*SQRT(TAUX(I , J)**2+TAUY(I , J)**2), 10.0)*BKGTAU) !adds a minimum value from unresolved sources - pm_gw(k) = 100.0_r8*PLO(I,k) + pm_gw(k) = 100.0_kp*PLO(I,k) tm_gw(k) = TEMP(I,k) nm_gw(k) = zero rho_gw(k) = pm_gw(k) /(RGAS*tm_gw(k)) ter8(k) = TEMP(I,k) - plevr8(k) = 100.0_r8*PLO(I,k) + plevr8(k) = 100.0_kp*PLO(I,k) ndropr8(k) = NCPL(I,k) qir8(k) = QILS(I,k) + QICN(I,k) qcr8(k) = QLLS(I,k) + QLCN(I,k) @@ -774,27 +774,27 @@ subroutine m_micro_run( im, lm, flipv, dt_i & npre8(k) = zero - if (RAD_CF(I,k) > 0.01_r8 .and. qir8(k) > zero) then + if (RAD_CF(I,k) > 0.01_kp .and. qir8(k) > zero) then npre8(k) = NPRE_FRAC*NCPI(I,k) else npre8(k) = zero endif omegr8(k) = OMEGA(I,k) - lc_turb(k) = max(blk_l(I,k), 50.0_r8) + lc_turb(k) = max(blk_l(I,k), 50.0_kp) ! rad_cooling(k) = RADheat(I,k) if (npre8(k) > zero .and. qir8(k) > zero) then - dpre8(k) = ( qir8(k)/(6.0_r8*npre8(k)*900.0_r8*PI))**(one/3.0_r8) + dpre8(k) = ( qir8(k)/(6.0_kp*npre8(k)*900.0_kp*PI))**(one/3.0_kp) else - dpre8(k) = 1.0e-9_r8 + dpre8(k) = 1.0e-9_kp endif wparc_ls(k) = -omegr8(k) / (rho_gw(k)*GRAV) & & + cpbg * radheat(i,k) ! & + cpbg * rad_cooling(k) enddo do k=0,lm - pi_gw(k) = 100.0_r8*PLE(I,k) + pi_gw(k) = 100.0_kp*PLE(I,k) rhoi_gw(k) = zero ni_gw(k) = zero ti_gw(k) = zero @@ -810,13 +810,13 @@ subroutine m_micro_run( im, lm, flipv, dt_i & & ti_gw, nm_gw, q1(i,:)) do k=1,lm - nm_gw(k) = max(nm_gw(k), 0.005_r8) + nm_gw(k) = max(nm_gw(k), 0.005_kp) h_gw(k) = k_gw*rho_gw(k)*uwind_gw(k)*nm_gw(k) if (h_gw(K) > zero) then - h_gw(K) = sqrt(2.0_r8*tausurf_gw/h_gw(K)) + h_gw(K) = sqrt(2.0_kp*tausurf_gw/h_gw(K)) end if - wparc_gw(k) = k_gw*uwind_gw(k)*h_gw(k)*0.133_r8 + wparc_gw(k) = k_gw*uwind_gw(k)*h_gw(k)*0.133_kp wparc_cgw(k) = zero end do @@ -833,14 +833,14 @@ subroutine m_micro_run( im, lm, flipv, dt_i & do k=1,kcldtopcvn c2_gw = (nm_gw(k) + Nct) / Nct - wparc_cgw(k) = sqrt(ksa1*fcn*fcn*12.56_r8* & - & 1.806_r8*c2_gw*c2_gw)*Wct*0.133_r8 + wparc_cgw(k) = sqrt(ksa1*fcn*fcn*12.56_kp* & + & 1.806_kp*c2_gw*c2_gw)*Wct*0.133_kp enddo end if do k=1,lm - dummyW(k) = 0.133_r8*k_gw*uwind_gw(k)/nm_gw(k) + dummyW(k) = 0.133_kp*k_gw*uwind_gw(k)/nm_gw(k) enddo do K=1, LM-5, 1 @@ -860,17 +860,17 @@ subroutine m_micro_run( im, lm, flipv, dt_i & kbmin = min(kbmin, LM-1) - 4 do K = 1, LM wparc_turb(k) = KH(I,k) / lc_turb(k) - dummyW(k) = 10.0_r8 + dummyW(k) = 10.0_kp enddo - if (FRLAND(I) < 0.1_r8 .and. ZPBL(I) < 800.0_r8 .and. & - & TEMP(I,LM) < 298.0_r8 .and. TEMP(I,LM) > 274.0_r8) then + if (FRLAND(I) < 0.1_kp .and. ZPBL(I) < 800.0_kp .and. & + & TEMP(I,LM) < 298.0_kp .and. TEMP(I,LM) > 274.0_kp) then do K = 1, LM - dummyW(k) = max(min((ZET(I,k+1)-ZPBL(I))*0.01_r8, 10.0_r8),-10.0_r8) + dummyW(k) = max(min((ZET(I,k+1)-ZPBL(I))*0.01_kp, 10.0_kp),-10.0_kp) dummyW(k) = one / (one+exp(dummyW(k))) enddo maxkh = max(maxval(KH(I,kbmin:LM-1)*nm_gw(kbmin:LM-1)/ & - & 0.17_r8), 0.3_r8) + & 0.17_kp), 0.3_kp) do K = 1, LM wparc_turb(k) = (one-dummyW(k))*wparc_turb(k) & & + dummyW(k)*maxkh @@ -878,7 +878,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & end if - wparc_turb(kbmin:LM) = max(wparc_turb(kbmin:LM), 0.2_r8) + wparc_turb(kbmin:LM) = max(wparc_turb(kbmin:LM), 0.2_kp) @@ -896,11 +896,11 @@ subroutine m_micro_run( im, lm, flipv, dt_i & do K = 1, LM - if (plevr8(K) > 70.0_r8) then + if (plevr8(K) > 70.0_kp) then - ccn_diag(1) = 0.001_r8 - ccn_diag(2) = 0.004_r8 - ccn_diag(3) = 0.01_r8 + ccn_diag(1) = 0.001_kp + ccn_diag(2) = 0.004_kp + ccn_diag(3) = 0.01_kp if (K > 2 .and. K <= LM-2) then tauxr8 = (ter8(K-1) + ter8(K+1) + ter8(K)) * oneb3 @@ -915,8 +915,8 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! call init_Aer(AeroAux_b) ! endif - pfrz_inc_r8(k) = zero - rh1_r8 = zero !related to cnv_dql_dt, needed to changed soon + pfrz_inc_kp(k) = zero + rh1_kp = zero !related to cnv_dql_dt, needed to changed soon ! if (lprnt) write(0,*)' bef aero npccninr8=',npccninr8(k),' k=',k & ! &,' ccn_param=',ccn_param,' in_param=',in_param & @@ -932,12 +932,12 @@ subroutine m_micro_run( im, lm, flipv, dt_i & & sc_icer8(k), dust_immr8(K), dust_depr8(k), & & dust_dhfr8(k), nlimicer8(k), use_average_v, & & CCN_PARAM, IN_PARAM, fdust_drop, & - & fsoot_drop,pfrz_inc_r8(K),sigma_nuc_r8, rh1_r8, & + & fsoot_drop,pfrz_inc_kp(K),sigma_nuc_kp, rh1_kp, & & size(ccn_diag)) ! & size(ccn_diag), lprnt) ! if (lprnt) write(0,*)' aft aero npccninr8=',npccninr8(k),' k=',k - if (npccninr8(k) < 1.0e-12_r8) npccninr8(k) = zero + if (npccninr8(k) < 1.0e-12_kp) npccninr8(k) = zero ! CCN01(I,K) = max(ccn_diag(1)*1e-6, 0.0) ! CCN04(I,K) = max(ccn_diag(2)*1e-6, 0.0) @@ -951,7 +951,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & swparc(K) = zero smaxicer8(K) = zero nheticer8(K) = zero - sc_icer8(K) = 2.0_r8 + sc_icer8(K) = 2.0_kp ! sc_icer8(K) = 1.0d0 naair8(K) = zero npccninr8(K) = zero @@ -968,9 +968,9 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! SMAXL(I,k) = smaxliq(k) * 100.0 ! SMAXI(I,k) = smaxicer8(k) * 100.0 - NHET_NUC(I,k) = nheticer8(k) * 1.0e-6_r8 - NLIM_NUC(I,k) = nlimicer8(k) * 1.0e-6_r8 - SC_ICE(I,k) = min(max(sc_icer8(k),one),2.0_r8) + NHET_NUC(I,k) = nheticer8(k) * 1.0e-6_kp + NLIM_NUC(I,k) = nlimicer8(k) * 1.0e-6_kp + SC_ICE(I,k) = min(max(sc_icer8(k),one),2.0_kp) ! SC_ICE(I,k) = min(max(sc_icer8(k),1.0),1.2) ! if(temp(i,k) < T_ICE_ALL) SC_ICE(i,k) = max(SC_ICE(I,k), 1.2) ! if(temp(i,k) < T_ICE_ALL) SC_ICE(i,k) = max(SC_ICE(I,k), 1.5) @@ -980,13 +980,13 @@ subroutine m_micro_run( im, lm, flipv, dt_i & if (iccn == 0) then if(temp(i,k) < T_ICE_ALL) then ! SC_ICE(i,k) = max(SC_ICE(I,k), 1.2) - SC_ICE(i,k) = max(SC_ICE(I,k), 1.5_r8) + SC_ICE(i,k) = max(SC_ICE(I,k), 1.5_kp) elseif(temp(i,k) > TICE) then SC_ICE(i,k) = rhc(i,k) else ! SC_ICE(i,k) = 1.0 ! tx1 = max(SC_ICE(I,k), 1.2) - tx1 = max(SC_ICE(I,k), 1.5_r8) + tx1 = max(SC_ICE(I,k), 1.5_kp) SC_ICE(i,k) = ((tice-temp(i,k))*tx1 + (temp(i,k)-t_ice_all)*rhc(i,k)) & * t_ice_denom endif @@ -997,12 +997,12 @@ subroutine m_micro_run( im, lm, flipv, dt_i & endif NHET_IMM(I,k) = max(nhet_immr8(k), zero) DNHET_IMM(I,k) = max(dnhet_immr8(k), zero) - NHET_DEP(I,k) = nhet_depr8(k) * 1.0e-6_r8 - NHET_DHF(I,k) = nhet_dhfr8(k) * 1.0e-6_r8 - DUST_IMM(I,k) = max(dust_immr8(k), zero)*1.0e-6_r8 - DUST_DEP(I,k) = max(dust_depr8(k), zero)*1.0e-6_r8 - DUST_DHF(I,k) = max(dust_dhfr8(k), zero)*1.0e-6_r8 - WSUB (I,k) = wparc_ls(k) + swparc(k)*0.8_r8 + NHET_DEP(I,k) = nhet_depr8(k) * 1.0e-6_kp + NHET_DHF(I,k) = nhet_dhfr8(k) * 1.0e-6_kp + DUST_IMM(I,k) = max(dust_immr8(k), zero)*1.0e-6_kp + DUST_DEP(I,k) = max(dust_depr8(k), zero)*1.0e-6_kp + DUST_DHF(I,k) = max(dust_dhfr8(k), zero)*1.0e-6_kp + WSUB (I,k) = wparc_ls(k) + swparc(k)*0.8_kp SIGW_GW (I,k) = wparc_gw(k) * wparc_gw(k) SIGW_CNV (I,k) = wparc_cgw(k) * wparc_cgw(k) SIGW_TURB (I,k) = wparc_turb(k) * wparc_turb(k) @@ -1115,7 +1115,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & do k=1,lm do i=1,im - if (CNV_MFD(i,k) > 1.0e-6_r8) then + if (CNV_MFD(i,k) > 1.0e-6_kp) then tx1 = one / CNV_MFD(i,k) CNV_NDROP(i,k) = CNV_NDROP(i,k) * tx1 CNV_NICE(i,k) = CNV_NICE(i,k) * tx1 @@ -1224,7 +1224,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & do l=1,10 do k=1,lm naconr8(k,l) = zero - rndstr8(k,l) = 2.0e-7_r8 + rndstr8(k,l) = 2.0e-7_kp enddo enddo do k=1,lm @@ -1235,7 +1235,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! tx1 = MIN(CLLS(I,k) + CLCN(I,k), 0.99) tx1 = MIN(CLLS(I,k) + CLCN(I,k), one) if (tx1 > zero) then - cldfr8(k) = min(max(tx1, 0.00001_r8), one) + cldfr8(k) = min(max(tx1, 0.00001_kp), one) else cldfr8(k) = zero endif @@ -1271,7 +1271,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & naair8(k) = INC_NUC(I,k) npccninr8(k) = CDNC_NUC(I,k) - if (cldfr8(k) >= 0.001_r8) then + if (cldfr8(k) >= 0.001_kp) then nimmr8(k) = min(DNHET_IMM(I,k),ncr8(k)/(cldfr8(k)*DT_MOIST)) else nimmr8(k) = zero @@ -1299,11 +1299,11 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! naux = AeroAux_b%nmods ! rnsootr8 (K) = sum(AeroAux_b%dpg(1:naux))/naux - pdelr8(k) = (PLE(I,k) - PLE(I,k-1)) * 100.0_r8 + pdelr8(k) = (PLE(I,k) - PLE(I,k-1)) * 100.0_kp rpdelr8(k) = one / pdelr8(k) - plevr8(k) = 100.0_r8 * PLO(I,k) + plevr8(k) = 100.0_kp * PLO(I,k) zmr8(k) = ZLO(I,k) - ficer8(k) = qir8(k) / (qcr8(k)+qir8(k) + 1.0e-10_r8) + ficer8(k) = qir8(k) / (qcr8(k)+qir8(k) + 1.0e-10_kp) omegr8(k) = WSUB(I,k) ! alphar8(k) = max(alpht_x(i,k)/maxval(alpht_x(i,:))*8.,0.5) ! alphar8(k) = qcvar2 @@ -1311,7 +1311,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & END DO do k=1,lm+1 - pintr8(k) = PLE(I,k-1) * 100.0_r8 + pintr8(k) = PLE(I,k-1) * 100.0_kp kkvhr8(k) = KH(I,k-1) END DO @@ -1358,7 +1358,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & enddo call mmicro_pcond ( ncolmicro, ncolmicro, & - & dt_r8, ter8, ttendr8, & + & dt_kp, ter8, ttendr8, & & ncolmicro, LM , qvr8, & & qtendr8, cwtendr8, qcr8, qir8, ncr8, nir8, & & abs(fprcp), qrr8, qsr8, nrr8, nsr8, & @@ -1396,29 +1396,29 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! if (lprint) write(0,*)' prectr8=',prectr8(1), & ! & ' precir8=',precir8(1) - LS_PRC2(I) = max(1000.0_r8*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0_r8*precir8(1), zero) + LS_PRC2(I) = max(1000.0_kp*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_kp*precir8(1), zero) do k=1,lm - QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 - QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 - Q1(I,k) = Q1(I,k) + qvlatr8(k)*DT_R8 + QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_kp + QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_kp + Q1(I,k) = Q1(I,k) + qvlatr8(k)*DT_kp ! if(lprnt .and. i == ipr) write(0,*)' k=',k,' q1aftm=',q1(i,k) & ! &,' qvlatr8=',qvlatr8(k) - TEMP(I,k) = TEMP(I,k) + tlatr8(k)*DT_R8*onebcp + TEMP(I,k) = TEMP(I,k) + tlatr8(k)*DT_kp*onebcp - NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k) * DT_R8, zero) - NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k) * DT_R8, zero) + NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k) * DT_kp, zero) + NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k) * DT_kp, zero) rnw(I,k) = qrr8(k) snw(I,k) = qsr8(k) NCPR(I,k) = nrr8(k) NCPS(I,k) = nsr8(k) - CLDREFFL(I,k) = min(max(effcr8(k), 10.0_r8), 150.0_r8) - CLDREFFI(I,k) = min(max(effir8(k), 20.0_r8), 150.0_r8) - CLDREFFR(I,k) = max(droutr8(k)*0.5_r8*1.0e6_r8, 150.0_r8) - CLDREFFS(I,k) = max(0.192_r8*dsoutr8(k)*0.5_r8*1.0e6_r8, 250.0_r8) + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kp), 150.0_kp) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_kp), 150.0_kp) + CLDREFFR(I,k) = max(droutr8(k)*0.5_kp*1.0e6_kp, 150.0_kp) + CLDREFFS(I,k) = max(0.192_kp*dsoutr8(k)*0.5_kp*1.0e6_kp, 250.0_kp) enddo ! K loop @@ -1426,7 +1426,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! -------- ! if (lprnt .and. i == ipr) then ! write(0,*)' bef micro_mg_tend ter8= ', ter8(:) -! write(0,*)' bef micro_mg_tend qvr8= ', qvr8(:),'dt_r8=',dt_r8 +! write(0,*)' bef micro_mg_tend qvr8= ', qvr8(:),'dt_kp=',dt_kp ! write(0,*)' bef micro_mg_tend rhr8= ', rhr8(:) ! endif lprint = lprnt .and. i == ipr @@ -1445,7 +1445,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & ! endif call micro_mg_tend2_0 ( & - & ncolmicro, lm, dt_r8, & + & ncolmicro, lm, dt_kp, & & ter8, qvr8, & & qcr8, qir8, & & ncr8, nir8, & @@ -1500,25 +1500,25 @@ subroutine m_micro_run( im, lm, flipv, dt_i & & prer_evap, xlat(i), xlon(i), lprint, iccn, & & lev_sed_strt) ! - LS_PRC2(I) = max(1000.0_r8*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0_r8*precir8(1), zero) + LS_PRC2(I) = max(1000.0_kp*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_kp*precir8(1), zero) do k=1,lm - QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 - QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 - Q1(I,k) = Q1(I,k) + qvlatr8(k)*DT_R8 - TEMP(I,k) = TEMP(I,k) + tlatr8(k)*DT_R8*onebcp - rnw(I,k) = rnw(I,k) + qrtend(k)*dt_r8 - snw(I,k) = snw(I,k) + qstend(k)*dt_r8 - - NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k)*DT_R8, zero) - NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k)*DT_R8, zero) - NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_r8, zero) - NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, zero) - - CLDREFFL(I,k) = min(max(effcr8(k), 10.0_r8), 150.0_r8) - CLDREFFI(I,k) = min(max(effir8(k), 20.0_r8), 150.0_r8) - CLDREFFR(I,k) = max(reff_rain(k), 150.0_r8) - CLDREFFS(I,k) = max(reff_snow(k), 250.0_r8) + QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_kp + QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_kp + Q1(I,k) = Q1(I,k) + qvlatr8(k)*DT_kp + TEMP(I,k) = TEMP(I,k) + tlatr8(k)*DT_kp*onebcp + rnw(I,k) = rnw(I,k) + qrtend(k)*dt_kp + snw(I,k) = snw(I,k) + qstend(k)*dt_kp + + NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k)*DT_kp, zero) + NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k)*DT_kp, zero) + NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_kp, zero) + NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_kp, zero) + + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kp), 150.0_kp) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_kp), 150.0_kp) + CLDREFFR(I,k) = max(reff_rain(k), 150.0_kp) + CLDREFFS(I,k) = max(reff_snow(k), 250.0_kp) enddo ! K loop ! if (lprint) then ! write(0,*)' aft micro_mg_tend temp= ', temp(i,:) @@ -1529,10 +1529,10 @@ subroutine m_micro_run( im, lm, flipv, dt_i & LS_PRC2(I) = zero LS_SNR(I) = zero do k=1,lm - CLDREFFL(I,k) = 10.0_r8 - CLDREFFI(I,k) = 50.0_r8 - CLDREFFR(I,k) = 1000.0_r8 - CLDREFFS(I,k) = 250.0_r8 + CLDREFFL(I,k) = 10.0_kp + CLDREFFI(I,k) = 50.0_kp + CLDREFFR(I,k) = 1000.0_kp + CLDREFFS(I,k) = 250.0_kp enddo ! K loop endif ! @@ -1558,7 +1558,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & !> - Call micro_mg3_0::micro_mg_tend(), which is the main microphysics routine to !! calculate microphysical processes and other utilities. call micro_mg_tend3_0 ( & - & ncolmicro, lm, dt_r8, & + & ncolmicro, lm, dt_kp, & & ter8, qvr8, & & qcr8, qir8, & & ncr8, nir8, & @@ -1637,28 +1637,28 @@ subroutine m_micro_run( im, lm, flipv, dt_i & & prer_evap, xlat(i), xlon(i), lprint, iccn, & & lev_sed_strt) - LS_PRC2(I) = max(1000.0_r8*(prectr8(1)-precir8(1)), zero) - LS_SNR(I) = max(1000.0_r8*precir8(1), zero) + LS_PRC2(I) = max(1000.0_kp*(prectr8(1)-precir8(1)), zero) + LS_SNR(I) = max(1000.0_kp*precir8(1), zero) do k=1,lm - QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_R8 - QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_R8 - Q1(I,k) = Q1(I,k) + qvlatr8(k)*DT_R8 - TEMP(I,k) = TEMP(I,k) + tlatr8(k)*DT_R8*onebcp - rnw(I,k) = rnw(I,k) + qrtend(k)*dt_r8 - snw(I,k) = snw(I,k) + qstend(k)*dt_r8 - qgl(I,k) = qgl(I,k) + qgtend(k)*dt_r8 - - NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k)*DT_R8, zero) - NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k)*DT_R8, zero) - NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_r8, zero) - NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_r8, zero) - NCGL(I,k) = max(NCGL(I,k) + ngtend(k)*dt_r8, zero) - - CLDREFFL(I,k) = min(max(effcr8(k), 10.0_r8), 150.0_r8) - CLDREFFI(I,k) = min(max(effir8(k), 20.0_r8), 150.0_r8) - CLDREFFR(I,k) = max(reff_rain(k), 150.0_r8) - CLDREFFS(I,k) = max(reff_snow(k), 250.0_r8) - CLDREFFG(I,k) = max(reff_grau(k), 250.0_r8) + QL_TOT(I,k) = QL_TOT(I,k) + qctendr8(k)*DT_kp + QI_TOT(I,k) = QI_TOT(I,k) + qitendr8(k)*DT_kp + Q1(I,k) = Q1(I,k) + qvlatr8(k)*DT_kp + TEMP(I,k) = TEMP(I,k) + tlatr8(k)*DT_kp*onebcp + rnw(I,k) = rnw(I,k) + qrtend(k)*dt_kp + snw(I,k) = snw(I,k) + qstend(k)*dt_kp + qgl(I,k) = qgl(I,k) + qgtend(k)*dt_kp + + NCPL(I,k) = MAX(NCPL(I,k) + nctendr8(k)*DT_kp, zero) + NCPI(I,k) = MAX(NCPI(I,k) + nitendr8(k)*DT_kp, zero) + NCPR(I,k) = max(NCPR(I,k) + nrtend(k)*dt_kp, zero) + NCPS(I,k) = max(NCPS(I,k) + nstend(k)*dt_kp, zero) + NCGL(I,k) = max(NCGL(I,k) + ngtend(k)*dt_kp, zero) + + CLDREFFL(I,k) = min(max(effcr8(k), 10.0_kp), 150.0_kp) + CLDREFFI(I,k) = min(max(effir8(k), 20.0_kp), 150.0_kp) + CLDREFFR(I,k) = max(reff_rain(k), 150.0_kp) + CLDREFFS(I,k) = max(reff_snow(k), 250.0_kp) + CLDREFFG(I,k) = max(reff_grau(k), 250.0_kp) enddo ! K loop ! if (lprint) then ! write(0,*)' aft micro_mg_tend temp= ', temp(i,:) @@ -1669,11 +1669,11 @@ subroutine m_micro_run( im, lm, flipv, dt_i & LS_PRC2(I) = zero LS_SNR(I) = zero do k=1,lm - CLDREFFL(I,k) = 10.0_r8 - CLDREFFI(I,k) = 50.0_r8 - CLDREFFR(I,k) = 1000.0_r8 - CLDREFFS(I,k) = 250.0_r8 - CLDREFFG(I,k) = 250.0_r8 + CLDREFFL(I,k) = 10.0_kp + CLDREFFI(I,k) = 50.0_kp + CLDREFFR(I,k) = 1000.0_kp + CLDREFFS(I,k) = 250.0_kp + CLDREFFG(I,k) = 250.0_kp enddo ! K loop endif endif @@ -1701,17 +1701,17 @@ subroutine m_micro_run( im, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_r8), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kp), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif enddo enddo @@ -1741,17 +1741,17 @@ subroutine m_micro_run( im, lm, flipv, dt_i & if (rnw(i,k) <= qc_min(1)) then ncpr(i,k) = zero elseif (ncpr(i,k) <= nmin) then ! make sure NL > 0 if Q >0 - ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_r8), nmin) + ncpr(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0_kp), nmin) endif if (snw(i,k) <= qc_min(2)) then ncps(i,k) = zero elseif (ncps(i,k) <= nmin) then - ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif if (qgl(i,k) <= qc_min(2)) then ncgl(i,k) = zero elseif (ncgl(i,k) <= nmin) then - ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_r8), nmin) + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0_kp), nmin) endif enddo enddo @@ -1843,7 +1843,7 @@ subroutine m_micro_run( im, lm, flipv, dt_i & DO I = 1,IM tx1 = LS_PRC2(i) + LS_SNR(i) - rn_o(i) = tx1 * dt_i * 0.001_r8 + rn_o(i) = tx1 * dt_i * 0.001_kp if (rn_o(i) < rainmin) then sr_o(i) = zero @@ -1896,7 +1896,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & use physcons, grav => con_g, cp => con_cp, rgas => con_rd, & fv => con_fvirt implicit none - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys !----------------------------------------------------------------------- ! Compute profiles of background state quantities for the multiple ! gravity wave drag parameterization. @@ -1920,7 +1920,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & real(kind=kind_phys), intent(out) :: nm(pcols,pver) real(kind=kind_phys), parameter :: r=rgas, cpair=cp, g=grav, & - oneocp=1.0_r8/cp, n2min=1.0e-8_r8 + oneocp=1.0_kp/cp, n2min=1.0e-8_kp !---------------------------Local storage------------------------------- integer :: ix,kx @@ -1936,15 +1936,15 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & kx = 0 do ix = 1, ncol ti(ix,kx) = t(ix,kx+1) - rhoi(ix,kx) = pi(ix,kx) / (r*(ti(ix,kx)*(1.0_r8+fv*sph(ix,kx+1)))) + rhoi(ix,kx) = pi(ix,kx) / (r*(ti(ix,kx)*(1.0_kp+fv*sph(ix,kx+1)))) ni(ix,kx) = sqrt (g*g / (cpair*ti(ix,kx))) end do ! Interior points use centered differences do kx = 1, pver-1 do ix = 1, ncol - ti(ix,kx) = 0.5_r8 * (t(ix,kx) + t(ix,kx+1)) - rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0_r8+0.5_r8*fv*(sph(ix,kx)+sph(ix,kx+1)))) + ti(ix,kx) = 0.5_kp * (t(ix,kx) + t(ix,kx+1)) + rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0_kp+0.5_kp*fv*(sph(ix,kx)+sph(ix,kx+1)))) dtdp = (t(ix,kx+1)-t(ix,kx)) / (pm(ix,kx+1)-pm(ix,kx)) n2 = g*g/ti(ix,kx) * (oneocp - rhoi(ix,kx)*dtdp) ni(ix,kx) = sqrt (max (n2min, n2)) @@ -1956,7 +1956,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & kx = pver do ix = 1, ncol ti(ix,kx) = t(ix,kx) - rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0_r8+fv*sph(ix,kx))) + rhoi(ix,kx) = pi(ix,kx) / (r*ti(ix,kx)*(1.0_kp+fv*sph(ix,kx))) ni(ix,kx) = ni(ix,kx-1) end do @@ -1965,7 +1965,7 @@ subroutine gw_prof (pcols, pver, ncol, t, pm, pi, rhoi, ni, ti, & !----------------------------------------------------------------------------- do kx=1,pver do ix=1,ncol - nm(ix,kx) = 0.5_r8 * (ni(ix,kx-1) + ni(ix,kx)) + nm(ix,kx) = 0.5_kp * (ni(ix,kx-1) + ni(ix,kx)) end do end do diff --git a/physics/moninshoc.f b/physics/moninshoc.f index cb15fa301..275d979fe 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -71,7 +71,7 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! ! locals ! - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys integer i,is,k,kk,km1,kmpbl,kp1, ntloc ! logical pblflg(im), sfcflg(im), flg(im) @@ -92,23 +92,23 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, &, ttend, utend, vtend, qtend &, spdk2, rbint, ri, zol1, robn, bvf2 ! - real(kind=kind_phys), parameter :: one=1.0_r8, zero=0.0_r8 - &, zolcr=0.2_r8, - & zolcru=-0.5_r8, rimin=-100.0_r8, sfcfrac=0.1_r8, - & crbcon=0.25_r8, crbmin=0.15_r8, crbmax=0.35_r8, - & qmin=1.0e-8_r8, zfmin=1.0d-8, qlmin=1.0e-12_r8, - & aphi5=5.0_r8, aphi16=16.0_r8, f0=1.0e-4_r8 - &, dkmin=zero, dkmax=1000.0_r8 + real(kind=kind_phys), parameter :: one=1.0_kp, zero=0.0_kp + &, zolcr=0.2_kp, + & zolcru=-0.5_kp, rimin=-100.0_kp, sfcfrac=0.1_kp, + & crbcon=0.25_kp, crbmin=0.15_kp, crbmax=0.35_kp, + & qmin=1.0e-8_kp, zfmin=1.0d-8, qlmin=1.0e-12_kp, + & aphi5=5.0_kp, aphi16=16.0_kp, f0=1.0e-4_kp + &, dkmin=zero, dkmax=1000.0_kp ! &, dkmin=zero, dkmax=1000., xkzminv=0.3 - &, prmin=0.25_r8, prmax=4.0_r8, vk=0.4_r8, - & cfac=6.5_r8 + &, prmin=0.25_kp, prmax=4.0_kp, vk=0.4_kp, + & cfac=6.5_kp real(kind=kind_phys) :: gravi, cont, conq, gocp, go2 gravi = one / grav cont = cp * gravi conq = hvap * gravi gocp = grav / cp - go2 = grav * 0.5_r8 + go2 = grav * 0.5_kp ! Initialize CCPP error handling variables errmsg = '' @@ -155,7 +155,7 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if (k <= kinver(i)) then ! vertical background diffusivity for heat and momentum tem1 = one - prsi(i,k+1) * tx1(i) - tem1 = min(one, exp(-tem1 * tem1 * 10.0_r8)) + tem1 = min(one, exp(-tem1 * tem1 * 10.0_kp)) xkzo(i,k) = xkzm_h * tem1 xkzmo(i,k) = xkzm_m * tem1 endif @@ -166,9 +166,9 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! do k = 1,kmpbl do i=1,im - if(zi(i,k+1) > 250.0_r8) then + if(zi(i,k+1) > 250.0_kp) then tem1 = (t1(i,k+1)-t1(i,k)) * rdzt(i,k) - if(tem1 > 1.0e-5_r8) then + if(tem1 > 1.0e-5_kp) then xkzo(i,k) = min(xkzo(i,k),xkzminv) endif endif @@ -177,7 +177,7 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! ! do i = 1,im - z0(i) = 0.01_r8 * zorl(i) + z0(i) = 0.01_kp * zorl(i) kpbl(i) = 1 hpbl(i) = zi(i,1) pblflg(i) = .true. @@ -224,8 +224,8 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, thermal(i) = tsea(i)*(one+fv*max(q1(i,1,1),qmin)) tem = max(one, sqrt(u10m(i)*u10m(i) + v10m(i)*v10m(i))) robn = tem / (f0 * z0(i)) - tem1 = 1.0e-7_r8 * robn - crb(i) = max(min(0.16_r8 * (tem1 ** (-0.18_r8)), crbmax), + tem1 = 1.0e-7_kp * robn + crb(i) = max(min(0.16_kp * (tem1 ** (-0.18_kp)), crbmax), & crbmin) endif enddo @@ -272,7 +272,7 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if (sfcflg(i)) then ! phim(i) = (1.-aphi16*zol1)**(-1./4.) ! phih(i) = (1.-aphi16*zol1)**(-1./2.) - tem = one / max(one - aphi16*zol1, 1.0e-8_r8) + tem = one / max(one - aphi16*zol1, 1.0e-8_kp) phih(i) = sqrt(tem) phim(i) = sqrt(phih(i)) else @@ -351,7 +351,7 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, if(ri < zero) then ! unstable regime prnum(i,kp1) = one else - prnum(i,kp1) = min(one + 2.1_r8*ri, prmax) + prnum(i,kp1) = min(one + 2.1_kp*ri, prmax) endif elseif (k > 1) then prnum(i,kp1) = prnum(i,1) diff --git a/physics/rascnv.F90 b/physics/rascnv.F90 index 280ff6386..1c311e4cf 100644 --- a/physics/rascnv.F90 +++ b/physics/rascnv.F90 @@ -10,38 +10,38 @@ module rascnv private logical :: is_initialized = .False. ! - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys integer, parameter :: nrcmax=32 ! Maximum # of random clouds per 1200s integer, parameter :: idnmax=999 - real (kind=kind_phys), parameter :: delt_c=1800.0_r8/3600.0_r8 & + real (kind=kind_phys), parameter :: delt_c=1800.0_kp/3600.0_kp & ! Adjustment time scales in hrs for deep and shallow clouds ! &, adjts_d=3.0, adjts_s=0.5 ! &, adjts_d=2.5, adjts_s=0.5 - &, adjts_d=2.0_r8, adjts_s=0.5_r8 + &, adjts_d=2.0_kp, adjts_s=0.5_kp ! logical, parameter :: fix_ncld_hr=.true. ! - real (kind=kind_phys), parameter :: ZERO=0.0_r8, HALF=0.5_r8 & - &, pt25=0.25_r8, ONE=1.0_r8 & - &, TWO=2.0_r8, FOUR=4.0_r8 & - &, twoo3=two/3.0_r8 & - &, FOUR_P2=4.0e2_r8, ONE_M10=1.0e-10_r8& - &, ONE_M6=1.0e-6_r8, ONE_M5=1.0e-5_r8 & - &, ONE_M2=1.0e-2_r8, ONE_M1=1.0e-1_r8 & - &, oneolog10=one/log(10.0_r8) & - &, facmb = 0.01_r8 & ! conversion factor from Pa to hPa (or mb) - &, cmb2pa = 100.0_r8 ! Conversion from hPa to Pa -! - real(kind=kind_phys), parameter :: frac=0.5_r8, crtmsf=0.0_r8 & - &, rhfacs=0.75_r8, rhfacl=0.75_r8 & - &, face=5.0_r8, delx=10000.0_r8& - &, ddfac=face*delx*0.001_r8 & - &, max_neg_bouy=0.15_r8 & -! &, max_neg_bouy=pt25_r8 & - &, testmb=0.1_r8, testmbi=one/testmb & - &, dpd=0.5_r8, rknob=1.0_r8, eknob=1.0_r8 + real (kind=kind_phys), parameter :: ZERO=0.0_kp, HALF=0.5_kp & + &, pt25=0.25_kp, ONE=1.0_kp & + &, TWO=2.0_kp, FOUR=4.0_kp & + &, twoo3=two/3.0_kp & + &, FOUR_P2=4.0e2_kp, ONE_M10=1.0e-10_kp& + &, ONE_M6=1.0e-6_kp, ONE_M5=1.0e-5_kp & + &, ONE_M2=1.0e-2_kp, ONE_M1=1.0e-1_kp & + &, oneolog10=one/log(10.0_kp) & + &, facmb = 0.01_kp & ! conversion factor from Pa to hPa (or mb) + &, cmb2pa = 100.0_kp ! Conversion from hPa to Pa +! + real(kind=kind_phys), parameter :: frac=0.5_kp, crtmsf=0.0_kp & + &, rhfacs=0.75_kp, rhfacl=0.75_kp & + &, face=5.0_kp, delx=10000.0_kp& + &, ddfac=face*delx*0.001_kp & + &, max_neg_bouy=0.15_kp & +! &, max_neg_bouy=pt25_kp & + &, testmb=0.1_kp, testmbi=one/testmb & + &, dpd=0.5_kp, rknob=1.0_kp, eknob=1.0_kp !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! logical, parameter :: do_aw=.true., cumfrc=.true. & @@ -53,17 +53,17 @@ module rascnv ! &, advcld=.true., advups=.false.,advtvd=.false. - real(kind=kind_phys), parameter :: TF=233.16_r8, TCR=273.16_r8 & - &, TCRF=one/(TCR-TF), TCL=2.0_r8 + real(kind=kind_phys), parameter :: TF=233.16_kp, TCR=273.16_kp & + &, TCRF=one/(TCR-TF), TCL=2.0_kp ! ! For pressure gradient force in momentum mixing ! real (kind=kind_phys), parameter :: pgftop=0.80, pgfbot=0.30 & ! No pressure gradient force in momentum mixing - real (kind=kind_phys), parameter :: pgftop=0.0_r8, pgfbot=0.0_r8 & + real (kind=kind_phys), parameter :: pgftop=0.0_kp, pgfbot=0.0_kp & ! real (kind=kind_phys), parameter :: pgftop=0.55, pgfbot=0.55 & - &, pgfgrad=(pgfbot-pgftop)*0.001_r8& - &, cfmax=0.1_r8 + &, pgfgrad=(pgfbot-pgftop)*0.001_kp& + &, cfmax=0.1_kp ! ! For Tilting Angle Specification ! @@ -121,7 +121,7 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! - real(kind=kind_phys), parameter :: actp=1.7_r8, facm=1.00_r8 + real(kind=kind_phys), parameter :: actp=1.7_kp, facm=1.00_kp ! real(kind=kind_phys) PH(15), A(15) ! @@ -168,7 +168,7 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & ! ! VTP = 36.34*SQRT(1.2)* (0.001)**0.1364 ! - AFC = -(1.01097e-4_r8*DT)*(3600.0_r8/DT)**0.57777778_r8 + AFC = -(1.01097e-4_kp*DT)*(3600.0_kp/DT)**0.57777778_kp ! grav = con_g ; cp = con_cp ; alhl = con_hvap alhf = con_hfus ; rgas = con_rd @@ -180,15 +180,15 @@ subroutine rascnv_init(me, dt, con_g, con_cp, con_rd, & pi = four*atan(one) ; PIINV = one/PI ONEBG = ONE / GRAV ; GRAVCON = cmb2pa * ONEBG onebcp = one / cp ; GRAVFAC = GRAV / CMB2PA - rkap = rgas * onebcp ; deg2rad = pi/180.0_r8 + rkap = rgas * onebcp ; deg2rad = pi/180.0_kp ELOCP = ALHL * onebcp ; ELFOCP = (ALHL+ALHF) * onebcp oneoalhl = one/alhl ; CMPOR = CMB2PA / RGAS - picon = half*pi*onebg ; zfac = 0.28888889e-4_r8 * ONEBG + picon = half*pi*onebg ; zfac = 0.28888889e-4_kp * ONEBG testmboalhl = testmb/alhl ! rvi = one/rv ; facw=CVAP-CLIQ faci = CVAP-CSOL ; hsub=alhl+alhf - tmix = TTP-20.0_r8 ; DEN=one/(TTP-TMIX) + tmix = TTP-20.0_kp ; DEN=one/(TTP-TMIX) ! if (me == 0) write(0,*) ' NO DOWNDRAFT FOR CLOUD TYPES' & @@ -365,7 +365,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & integer, dimension(100) :: ic - real(kind=kind_phys), parameter :: clwmin=1.0e-10_r8 + real(kind=kind_phys), parameter :: clwmin=1.0e-10_kp ! real(kind=kind_phys), allocatable :: ALFINT(:,:), uvi(:,:) & &, trcfac(:,:), rcu(:,:) @@ -392,8 +392,8 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & fscav_(i) = fscav(i) enddo endif - trcmin = -99999.0_r8 - if (ntk-2 > 0) trcmin(ntk-2) = 1.0e-4_r8 + trcmin = -99999.0_kp + if (ntk-2 > 0) trcmin(ntk-2) = 1.0e-4_kp !> - Initialize CCPP error handling variables @@ -487,23 +487,23 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & if (flipv) ll = kp1 -l ! Input variables are bottom to top! SGC = prsl(ipt,ll) * tem sgcs(l,ipt) = sgc - IF (SGC <= 0.050_r8) KRMIN = L -! IF (SGC <= 0.700_r8) KRMAX = L -! IF (SGC <= 0.800_r8) KRMAX = L - IF (SGC <= 0.760_r8) KRMAX = L -! IF (SGC <= 0.930_r8) KFMAX = L - IF (SGC <= 0.970_r8) KFMAX = L ! Commented on 20060202 -! IF (SGC <= 0.700_r8) kblmx = L ! Commented on 20101015 - IF (SGC <= 0.600_r8) kblmx = L ! -! IF (SGC <= 0.650_r8) kblmx = L ! Commented on 20060202 - IF (SGC <= 0.980_r8) kblmn = L ! + IF (SGC <= 0.050_kp) KRMIN = L +! IF (SGC <= 0.700_kp) KRMAX = L +! IF (SGC <= 0.800_kp) KRMAX = L + IF (SGC <= 0.760_kp) KRMAX = L +! IF (SGC <= 0.930_kp) KFMAX = L + IF (SGC <= 0.970_kp) KFMAX = L ! Commented on 20060202 +! IF (SGC <= 0.700_kp) kblmx = L ! Commented on 20101015 + IF (SGC <= 0.600_kp) kblmx = L ! +! IF (SGC <= 0.650_kp) kblmx = L ! Commented on 20060202 + IF (SGC <= 0.980_kp) kblmn = L ! ENDDO krmin = max(krmin,2) ! if (fix_ncld_hr) then !!! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1200) + 0.50001 - NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1800) + 0.10001_r8 + NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1800) + 0.10001_kp ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/1200) + 0.10001 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/900) + 0.50001 ! NCRND = min(nrcmax, (KRMAX-KRMIN+1)) * (DTF/600) + 0.50001 @@ -513,7 +513,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & facdt = delt_c / dt else NCRND = min(nrcmax, (KRMAX-KRMIN+1)) - facdt = one / 3600.0_r8 + facdt = one / 3600.0_kp endif NCRND = min(nrcm,max(NCRND, 1)) ! @@ -537,7 +537,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & IF (NCRND > 0) THEN DO I=1,NCRND II = mod(i-1,nrcm) + 1 - IRND = (RANNUM(ipt,II)-0.0005_r8)*(KCR-KRMIN+1) + IRND = (RANNUM(ipt,II)-0.0005_kp)*(KCR-KRMIN+1) IC(KFX+I) = IRND + KRMIN ENDDO ENDIF @@ -582,7 +582,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & if (ntr > 0) then ! tracers such as O3, dust etc do n=1,ntr uvi(l,n) = ccin(ipt,ll,n+2) - if (abs(uvi(l,n)) < 1.0e-20_r8) uvi(l,n) = zero + if (abs(uvi(l,n)) < 1.0e-20_kp) uvi(l,n) = zero enddo endif enddo @@ -593,7 +593,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & phi_h(LL) = phii(ipt,L) enddo ! - if (ccin(ipt,1,2) <= -998.0_r8) then ! input ice/water are together + if (ccin(ipt,1,2) <= -998.0_kp) then ! input ice/water are together do l=1,k ll = kp1 -l tem = ccin(ipt,ll,1) & @@ -631,7 +631,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & if (ntr > 0) then ! tracers such as O3, dust etc do n=1,ntr uvi(l,n) = ccin(ipt,l,n+2) - if (abs(uvi(l,n)) < 1.0e-20_r8) uvi(l,n) = zero + if (abs(uvi(l,n)) < 1.0e-20_kp) uvi(l,n) = zero enddo endif enddo @@ -641,7 +641,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & phi_h(L) = phii(ipt,L) ENDDO ! - if (ccin(ipt,1,2) <= -998.0_r8) then ! input ice/water are together + if (ccin(ipt,1,2) <= -998.0_kp) then ! input ice/water are together do l=1,k tem = ccin(ipt,l,1) & & * MAX(ZERO, MIN(ONE, (TCR-toi(L))*TCRF)) @@ -688,7 +688,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd=',dtvd(:,1) - if (abs(dtvd(2,1)) > 1.0e-10_r8) then + if (abs(dtvd(2,1)) > 1.0e-10_kp) then tem1 = dtvd(1,1) / dtvd(2,1) tem2 = abs(tem1) alfint(l,1) = one - half*(tem1 + tem2)/(one + tem2) ! for h @@ -702,7 +702,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd2=',dtvd(:,2) - if (abs(dtvd(2,2)) > 1.0e-10_r8) then + if (abs(dtvd(2,2)) > 1.0e-10_kp) then tem1 = dtvd(1,2) / dtvd(2,2) tem2 = abs(tem1) alfint(l,2) = one - half*(tem1 + tem2)/(one + tem2) ! for q @@ -713,7 +713,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd3=',dtvd(:,3) - if (abs(dtvd(2,3)) > 1.0e-10_r8) then + if (abs(dtvd(2,3)) > 1.0e-10_kp) then tem1 = dtvd(1,3) / dtvd(2,3) tem2 = abs(tem1) alfint(l,3) = one - half*(tem1 + tem2)/(one + tem2) ! for ql @@ -724,7 +724,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvd4=',dtvd(:,4) - if (abs(dtvd(2,4)) > 1.0e-10_r8) then + if (abs(dtvd(2,4)) > 1.0e-10_kp) then tem1 = dtvd(1,4) / dtvd(2,4) tem2 = abs(tem1) alfint(l,4) = one - half*(tem1 + tem2)/(one + tem2) ! for qi @@ -741,7 +741,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! write(0,*)' l=',l,' dtvdn=',dtvd(:,1),' n=',n,' l=',l - if (abs(dtvd(2,1)) > 1.0e-10_r8) then + if (abs(dtvd(2,1)) > 1.0e-10_kp) then tem1 = dtvd(1,1) / dtvd(2,1) tem2 = abs(tem1) alfint(l,n+4) = one - half*(tem1 + tem2)/(one + tem2) ! for tracers @@ -850,7 +850,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & FLXD(L) = zero enddo ! - TLA = -10.0_r8 + TLA = -10.0_kp ! qiid = qii(ib) ! cloud top level ice before convection qlid = qli(ib) ! cloud top level water before convection @@ -930,7 +930,7 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! ENDDO ! End of the NC loop! ! - RAINC(ipt) = rain * 0.001_r8 ! Output rain is in meters + RAINC(ipt) = rain * 0.001_kp ! Output rain is in meters ktop(ipt) = kp1 kbot(ipt) = 0 @@ -944,9 +944,9 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & ! clw(i) = max(clw(i), zero) ! cli(i) = max(cli(i), zero) - if (sgcs(l,ipt) < 0.93_r8 .and. abs(tcu(l)) > one_m10) then -! if (sgcs(l,ipt) < 0.90_r8 .and. tcu(l) .ne. zero) then -! if (sgcs(l,ipt) < 0.85_r8 .and. tcu(l) .ne. zero) then + if (sgcs(l,ipt) < 0.93_kp .and. abs(tcu(l)) > one_m10) then +! if (sgcs(l,ipt) < 0.90_kp .and. tcu(l) .ne. zero) then +! if (sgcs(l,ipt) < 0.85_kp .and. tcu(l) .ne. zero) then kcnv(ipt) = 1 endif ! New test for convective clouds ! added in 08/21/96 @@ -972,18 +972,18 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & QLCN(ipt,ll) = max(qli(l)-ccin(ipt,ll,2), zero) QICN(ipt,ll) = max(qii(l)-ccin(ipt,ll,1), zero) CNV_FICE(ipt,ll) = QICN(ipt,ll) & - & / max(1.0e-10_r8,QLCN(ipt,ll)+QICN(ipt,ll)) + & / max(1.0e-10_kp,QLCN(ipt,ll)+QICN(ipt,ll)) else QLCN(ipt,ll) = qli(l) QICN(ipt,ll) = qii(l) - CNV_FICE(ipt,ll) = qii(l)/max(1.0e-10_r8,qii(l)+qli(l)) + CNV_FICE(ipt,ll) = qii(l)/max(1.0e-10_kp,qii(l)+qli(l)) endif - cf_upi(ipt,ll) = max(zero,min(0.02_r8*log(one+ & - & 500.0_r8*ud_mf(ipt,ll)/dt), cfmax)) + cf_upi(ipt,ll) = max(zero,min(0.02_kp*log(one+ & + & 500.0_kp*ud_mf(ipt,ll)/dt), cfmax)) ! & 500*ud_mf(ipt,ll)/dt), 0.60)) CLCN(ipt,ll) = cf_upi(ipt,ll) !downdraft is below updraft w_upi(ipt,ll) = ud_mf(ipt,ll)*toi(l)*rgas / & - & (dt*max(cf_upi(ipt,ll),1.0e-12_r8)*prsl(ipt,ll)) + & (dt*max(cf_upi(ipt,ll),1.0e-12_kp)*prsl(ipt,ll)) endif if (ntr > 0) then @@ -1023,21 +1023,21 @@ subroutine rascnv_run(IM, k, ntr, dt, dtf & QLCN(ipt,l) = max(qli(l)-ccin(ipt,l,2), zero) QICN(ipt,l) = max(qii(l)-ccin(ipt,l,1), zero) CNV_FICE(ipt,l) = QICN(ipt,l) & - & / max(1.0e-10_r8,QLCN(ipt,l)+QICN(ipt,l)) + & / max(1.0e-10_kp,QLCN(ipt,l)+QICN(ipt,l)) else QLCN(ipt,l) = qli(l) QICN(ipt,l) = qii(l) - CNV_FICE(ipt,l) = qii(l)/max(1.0e-10_r8,qii(l)+qli(l)) + CNV_FICE(ipt,l) = qii(l)/max(1.0e-10_kp,qii(l)+qli(l)) endif !! CNV_PRC3(ipt,l) = PCU(l)/dt ! CNV_PRC3(ipt,l) = zero ! if(PCU(l) < zero) write(*,*)"AAA777",PCU(l),ipt,l - cf_upi(ipt,l) = max(zero,min(0.02_r8*log(one+ & - & 500.0_r8*ud_mf(ipt,l)/dt), cfmax)) + cf_upi(ipt,l) = max(zero,min(0.02_kp*log(one+ & + & 500.0_kp*ud_mf(ipt,l)/dt), cfmax)) ! & 500*ud_mf(ipt,l)/dt), 0.60)) CLCN(ipt,l) = cf_upi(ipt,l) !downdraft is below updraft w_upi(ipt,l) = ud_mf(ipt,l)*toi(l)*rgas / & - & (dt*max(cf_upi(ipt,l),1.0e-12_r8)*prsl(ipt,l)) + & (dt*max(cf_upi(ipt,l),1.0e-12_kp)*prsl(ipt,l)) endif if (ntr > 0) then @@ -1140,33 +1140,33 @@ SUBROUTINE CLOUD( & ! IMPLICIT NONE ! - real (kind=kind_phys), parameter :: RHMAX=1.0_r8 & ! MAX RELATIVE HUMIDITY - &, QUAD_LAM=1.0_r8 & ! MASK FOR QUADRATIC LAMBDA - &, RHRAM=0.05_r8 & ! PBL RELATIVE HUMIDITY RAMP -! &, RHRAM=0.15_r8 !& ! PBL RELATIVE HUMIDITY RAMP - &, HCRITD=4000.0_r8 & ! Critical Moist Static Energy for Deep clouds - &, HCRITS=2000.0_r8 & ! Critical Moist Static Energy for Shallow clouds - &, pcrit_lcl=250.0_r8 & ! Critical pressure difference between boundary layer top + real (kind=kind_phys), parameter :: RHMAX=1.0_kp & ! MAX RELATIVE HUMIDITY + &, QUAD_LAM=1.0_kp & ! MASK FOR QUADRATIC LAMBDA + &, RHRAM=0.05_kp & ! PBL RELATIVE HUMIDITY RAMP +! &, RHRAM=0.15_kp !& ! PBL RELATIVE HUMIDITY RAMP + &, HCRITD=4000.0_kp & ! Critical Moist Static Energy for Deep clouds + &, HCRITS=2000.0_kp & ! Critical Moist Static Energy for Shallow clouds + &, pcrit_lcl=250.0_kp & ! Critical pressure difference between boundary layer top ! layer top and lifting condensation level (hPa) -! &, hpert_fac=1.01_r8 !& ! Perturbation on hbl when ctei=.true. -! &, hpert_fac=1.005_r8 !& ! Perturbation on hbl when ctei=.true. +! &, hpert_fac=1.01_kp !& ! Perturbation on hbl when ctei=.true. +! &, hpert_fac=1.005_kp !& ! Perturbation on hbl when ctei=.true. &, qudfac=quad_lam*half & - &, shalfac=3.0_r8 & -! &, qudfac=quad_lam*pt25, shalfac=3.0_r8 !& ! Yogesh's - &, c0ifac=0.07_r8 & ! following Han et al, 2016 MWR - &, dpnegcr = 150.0_r8 -! &, dpnegcr = 100.0_r8 -! &, dpnegcr = 200.0_r8 -! - real(kind=kind_phys), parameter :: ERRMIN=0.0001_r8 & - &, ERRMI2=0.1_r8*ERRMIN & -! &, rainmin=1.0e-9_r8 !& - &, rainmin=1.0e-8_r8 & - &, oneopt9=one/0.09_r8 & - &, oneopt4=one/0.04_r8 - real(kind=kind_phys), parameter :: almax=1.0e-2_r8 & - &, almin1=0.0_r8, almin2=0.0_r8 - real(kind=kind_phys), parameter :: bldmax=300.0_r8, bldmin=25.0_r8 + &, shalfac=3.0_kp & +! &, qudfac=quad_lam*pt25, shalfac=3.0_kp !& ! Yogesh's + &, c0ifac=0.07_kp & ! following Han et al, 2016 MWR + &, dpnegcr = 150.0_kp +! &, dpnegcr = 100.0_kp +! &, dpnegcr = 200.0_kp +! + real(kind=kind_phys), parameter :: ERRMIN=0.0001_kp & + &, ERRMI2=0.1_kp*ERRMIN & +! &, rainmin=1.0e-9_kp !& + &, rainmin=1.0e-8_kp & + &, oneopt9=one/0.09_kp & + &, oneopt4=one/0.04_kp + real(kind=kind_phys), parameter :: almax=1.0e-2_kp & + &, almin1=0.0_kp, almin2=0.0_kp + real(kind=kind_phys), parameter :: bldmax=300.0_kp, bldmin=25.0_kp ! ! INPUT ARGUMENTS @@ -1371,13 +1371,13 @@ SUBROUTINE CLOUD( & ! To determine KBL internally -- If KBL is defined externally ! the following two loop should be skipped ! - if (sgcs(kd) < 0.5_r8) then + if (sgcs(kd) < 0.5_kp) then hcrit = hcritd - elseif (sgcs(kd) > 0.65_r8) then + elseif (sgcs(kd) > 0.65_kp) then hcrit = hcrits else - hcrit = (hcrits*(sgcs(kd)-0.5_r8) + hcritd*(0.65_r8-sgcs(kd)))& - & * (one/0.15_r8) + hcrit = (hcrits*(sgcs(kd)-0.5_kp) + hcritd*(0.65_kp-sgcs(kd)))& + & * (one/0.15_kp) endif IF (CALKBL) THEN KTEM = MAX(KD+1, KBLMX) @@ -1461,7 +1461,7 @@ SUBROUTINE CLOUD( & ii = max(kbl,kd1) kbl = max(klcl,kd1) - tem = min(50.0_r8,max(10.0_r8,(prl(kmaxp1)-prl(kd))*0.10_r8)) + tem = min(50.0_kp,max(10.0_kp,(prl(kmaxp1)-prl(kd))*0.10_kp)) if (prl(kmaxp1) - prl(ii) > tem .and. ii > kbl) kbl = ii @@ -1521,7 +1521,7 @@ SUBROUTINE CLOUD( & ! shal_fac = one ! if (prl(kbl)-prl(kd) < 300.0 .and. kmax == k) shal_fac = shalfac - if (prl(kbl)-prl(kd) < 350.0_r8 .and. kmax == k) shal_fac = shalfac + if (prl(kbl)-prl(kd) < 350.0_kp .and. kmax == k) shal_fac = shalfac DO L=Kmax,KD,-1 IF (L >= KBL) THEN ETA(L) = (PRL(Kmaxp1)-PRL(L)) * PRISM @@ -1583,7 +1583,7 @@ SUBROUTINE CLOUD( & endif enddo ! - if (lcon == kd .or. kbl <= kd .or. prl(kbl)-prsm(lcon) > 150.0_r8) & + if (lcon == kd .or. kbl <= kd .or. prl(kbl)-prsm(lcon) > 150.0_kp) & & return ! TX1 = RHFACS - QBL / TX1 ! Average RH @@ -1593,9 +1593,9 @@ SUBROUTINE CLOUD( & IF (.NOT. cnvflg) RETURN ! - RHC = MAX(ZERO, MIN(ONE, EXP(-20.0_r8*TX1) )) + RHC = MAX(ZERO, MIN(ONE, EXP(-20.0_kp*TX1) )) ! - wcbase = 0.1_r8 + wcbase = 0.1_kp if (ntrc > 0) then DO N=1,NTRC RBL(N) = ROI(Kmax,N) * ETA(Kmax) @@ -1752,13 +1752,13 @@ SUBROUTINE CLOUD( & HSU = HSU - ALM * TX3 ! CLP = ZERO - ALM = -100.0_r8 + ALM = -100.0_kp HOS = HOL(KD) QOS = QOL(KD) QIS = CIL(KD) QLS = CLL(KD) - cnvflg = HBL > HSU .and. abs(tx1) > 1.0e-4_r8 + cnvflg = HBL > HSU .and. abs(tx1) > 1.0e-4_kp !*********************************************************************** @@ -1775,7 +1775,7 @@ SUBROUTINE CLOUD( & if (tx2 == zero) then alm = - st2 / tx1 - if (alm > almax) alm = -100.0_r8 + if (alm > almax) alm = -100.0_kp else x00 = tx2 + tx2 epp = tx1 * tx1 - (x00+x00)*st2 @@ -1784,8 +1784,8 @@ SUBROUTINE CLOUD( & tem = sqrt(epp) tem1 = (-tx1-tem)*x00 tem2 = (-tx1+tem)*x00 - if (tem1 > almax) tem1 = -100.0_r8 - if (tem2 > almax) tem2 = -100.0_r8 + if (tem1 > almax) tem1 = -100.0_kp + if (tem2 > almax) tem2 = -100.0_kp alm = max(tem1,tem2) endif @@ -1856,12 +1856,12 @@ SUBROUTINE CLOUD( & ACR = zero TEM = PRL(KD1) - (PRL(KD1)-PRL(KD)) * CLP * HALF tx1 = PRL(KBL) - TEM - tx2 = min(900.0_r8, max(tx1,100.0_r8)) - tem1 = log(tx2*0.01_r8) * oneolog10 + tx2 = min(900.0_kp, max(tx1,100.0_kp)) + tem1 = log(tx2*0.01_kp) * oneolog10 tem2 = one - tem1 if ( kdt == 1 ) then -! rel_fac = (dt * facdt) / (tem1*12.0_r8 + tem2*3.0) - rel_fac = (dt * facdt) / (tem1*6.0_r8 + tem2*adjts_s) +! rel_fac = (dt * facdt) / (tem1*12.0_kp + tem2*3.0) + rel_fac = (dt * facdt) / (tem1*6.0_kp + tem2*adjts_s) else rel_fac = (dt * facdt) / (tem1*adjts_d + tem2*adjts_s) endif @@ -1870,7 +1870,7 @@ SUBROUTINE CLOUD( & rel_fac = max(zero, min(half,rel_fac)) IF (CRTFUN) THEN - iwk = tem*0.02_r8 - 0.999999999_r8 + iwk = tem*0.02_kp - 0.999999999_kp iwk = MAX(1, MIN(iwk, 16)) ACR = tx1 * (AC(iwk) + tem * AD(iwk)) * CCWF ENDIF @@ -2043,7 +2043,7 @@ SUBROUTINE CLOUD( & ! CALCUP = .FALSE. - TEM = max(0.05_r8, MIN(CD*200.0_r8, MAX_NEG_BOUY)) + TEM = max(0.05_kp, MIN(CD*200.0_kp, MAX_NEG_BOUY)) IF (.not. cnvflg .and. WFN > ACR .and. & & dpneg < dpnegcr .and. AKM <= TEM) CALCUP = .TRUE. @@ -2086,7 +2086,7 @@ SUBROUTINE CLOUD( & ENDIF PL = (PRL(KD1) + PRL(KD))*HALF - IF (TRAIN > 1.0e-4_r8 .AND. PL <= dpd*prl(kp1)) DDFT = .TRUE. + IF (TRAIN > 1.0e-4_kp .AND. PL <= dpd*prl(kp1)) DDFT = .TRUE. ENDIF ! IF (DDFT) THEN ! Downdraft scheme based on (Cheng and Arakawa, 1997) @@ -2401,7 +2401,7 @@ SUBROUTINE CLOUD( & ! sigf(kd) = max(zero, min(one, tx1 * tx1)) ! endif if (do_aw) then - tx1 = (0.2_r8 / max(alm, 1.0e-5_r8)) + tx1 = (0.2_kp / max(alm, 1.0e-5_kp)) tx2 = one - min(one, pi * tx1 * tx1 / area) tx2 = tx2 * tx2 @@ -2525,8 +2525,8 @@ SUBROUTINE CLOUD( & endif enddo tem = tem + amb * dof * sigf(kbl) - tem = tem * (3600.0_r8/dt) - tem1 = sqrt(max(one, min(100.0_r8,(6.25e10_r8/max(area,one))))) ! 20110530 + tem = tem * (3600.0_kp/dt) + tem1 = sqrt(max(one, min(100.0_kp,(6.25e10_kp/max(area,one))))) ! 20110530 clfrac = max(ZERO, min(half, rknob*clf(tem)*tem1)) cldfrd = clfrac @@ -2573,7 +2573,7 @@ SUBROUTINE CLOUD( & tem4 = zero if (tx1 > zero) & - & TEM4 = POTEVAP * (one - EXP( tx4*TX1**0.57777778_r8 )) + & TEM4 = POTEVAP * (one - EXP( tx4*TX1**0.57777778_kp )) ACTEVAP = MIN(TX1, TEM4*CLFRAC) @@ -2581,7 +2581,7 @@ SUBROUTINE CLOUD( & ! tem4 = zero if (tx2 > zero) & - & TEM4 = POTEVAP * (one - EXP( tx4*TX2**0.57777778_r8 )) + & TEM4 = POTEVAP * (one - EXP( tx4*TX2**0.57777778_kp )) TEM4 = min(MIN(TX2, TEM4*CLDFRD), potevap-actevap) if (tx2 < rainmin*dt) tem4 = min(tx2, potevap-actevap) ! @@ -2650,7 +2650,7 @@ SUBROUTINE CLOUD( & ! following Liu et al. [JGR,2001] Eq 1 if (FSCAV_(N) > zero) then - DELZKM = ( PHIL(KD) - PHIH(KD1) ) *(onebg*0.001_r8) + DELZKM = ( PHIL(KD) - PHIH(KD1) ) *(onebg*0.001_kp) FNOSCAV = exp(- FSCAV_(N) * DELZKM) else FNOSCAV = one @@ -2660,7 +2660,7 @@ SUBROUTINE CLOUD( & & * FNOSCAV DO L=KD1,K if (FSCAV_(N) > zero) then - DELZKM = ( PHIL(KD) - PHIH(L+1) ) *(onebg*0.001_r8) + DELZKM = ( PHIL(KD) - PHIH(L+1) ) *(onebg*0.001_kp) FNOSCAV = exp(- FSCAV_(N) * DELZKM) endif lm1 = l - 1 @@ -2779,7 +2779,7 @@ SUBROUTINE DDRFT( & &, IT, KM1, KTEM, KK, KK1, LM1, LL, LP1 & &, IDW, IDH, IDN(K), idnm, itr ! - parameter (ERRMIN=0.0001_r8, ERRMI2=0.1_r8*ERRMIN) + parameter (ERRMIN=0.0001_kp, ERRMI2=0.1_kp*ERRMIN) ! parameter (ERRMIN=0.00001, ERRMI2=0.1*ERRMIN) ! ! real (kind=kind_phys), parameter :: PIINV=one/PI, pio2=half*pi @@ -2789,9 +2789,9 @@ SUBROUTINE DDRFT( & ! parameter (ONPG=1.0+0.5, GMF=1.0/ONPG, RPART=0.5) ! PARAMETER (AA1=1.0, BB1=1.5, CC1=1.1, DD1=0.85, F3=CC1, F5=2.5) ! PARAMETER (AA1=2.0, BB1=1.5, CC1=1.1, DD1=0.85, F3=CC1, F5=2.5) - PARAMETER (AA1=1.0_r8, BB1=1.0_r8, CC1=1.0_r8, DD1=1.0_r8, & - & F3=CC1, F5=1.0_r8) - parameter (QRMIN=1.0e-6_r8, WC2MIN=0.01_r8, GMF1=GMF/AA1, GMF5=GMF/F5) + PARAMETER (AA1=1.0_kp, BB1=1.0_kp, CC1=1.0_kp, DD1=1.0_kp, & + & F3=CC1, F5=1.0_kp) + parameter (QRMIN=1.0e-6_kp, WC2MIN=0.01_kp, GMF1=GMF/AA1, GMF5=GMF/F5) ! parameter (QRMIN=1.0E-6, WC2MIN=1.00, GMF1=GMF/AA1, GMF5=GMF/F5) parameter (WCMIN=sqrt(wc2min)) ! parameter (sialf=0.5) @@ -2800,12 +2800,12 @@ SUBROUTINE DDRFT( & &, itrmin=15, itrmnd=12, numtla=2 ! uncentering for vvel in dd - real(kind=kind_phys), parameter :: ddunc1=0.25_r8 & + real(kind=kind_phys), parameter :: ddunc1=0.25_kp & &, ddunc2=one-ddunc1 & ! &, ddunc1=0.4, ddunc2=one-ddunc1 & ! &, ddunc1=0.3, ddunc2=one-ddunc1 & - &, VTPEXP=-0.3636_r8 & - &, VTP=36.34_r8*SQRT(1.2_r8)*(0.001_r8)**0.1364_r8 + &, VTPEXP=-0.3636_kp & + &, VTP=36.34_kp*SQRT(1.2_kp)*(0.001_kp)**0.1364_kp ! ! real(kind=kind_phys) EM(K*K), ELM(K) real(kind=kind_phys) ELM(K), AA(KD:K,KD:KP1), QW(KD:K,KD:K) & @@ -2830,7 +2830,7 @@ SUBROUTINE DDRFT( & CLDFRD = zero RNTP = zero DOF = zero - ERRQ = 10.0_r8 + ERRQ = 10.0_kp RNB = zero RNT = zero TX2 = PRL(KBL) @@ -2861,7 +2861,7 @@ SUBROUTINE DDRFT( & ENDDO if (kk /= kbl) then do l=kk,kbl - buy(l) = 0.9_r8 * buy(l-1) + buy(l) = 0.9_kp * buy(l-1) enddo endif ! @@ -2869,24 +2869,24 @@ SUBROUTINE DDRFT( & qrpi(l) = buy(l) enddo do l=kd1,kb1 - buy(l) = 0.25_r8 * (qrpi(l-1)+qrpi(l)+qrpi(l)+qrpi(l+1)) + buy(l) = 0.25_kp * (qrpi(l-1)+qrpi(l)+qrpi(l)+qrpi(l+1)) enddo ! ! CALL ANGRAD(TX1, ALM, STLA, CTL2, AL2, PI, TLA, TX2, WFN, TX3) - tx1 = 1000.0_r8 + tx1 - prl(kp1) + tx1 = 1000.0_kp + tx1 - prl(kp1) ! CALL ANGRAD(TX1, ALM, AL2, TLA, TX2, WFN, TX3) CALL ANGRAD(TX1, ALM, AL2, TLA) ! ! Following Ucla approach for rain profile ! - F2 = (BB1+BB1)*ONEBG/(PI*0.2_r8) + F2 = (BB1+BB1)*ONEBG/(PI*0.2_kp) ! WCMIN = SQRT(WC2MIN) ! WCBASE = WCMIN ! ! del_tla = TLA * 0.2 ! del_tla = TLA * 0.25 - del_tla = TLA * 0.3_r8 + del_tla = TLA * 0.3_kp TLA = TLA - DEL_TLA ! DO L=KD,K @@ -2947,7 +2947,7 @@ SUBROUTINE DDRFT( & do ntla=1,numtla ! numtla is the the maximimu number of tilting angle tries ! ------ ! if (errq < 1.0 .or. tla > 45.0) cycle - if (errq < 0.1_r8 .or. tla > 45.0_r8) cycle + if (errq < 0.1_kp .or. tla > 45.0_kp) cycle ! tla = tla + del_tla STLA = SIN(TLA*deg2rad) ! sine of tilting angle @@ -2955,7 +2955,7 @@ SUBROUTINE DDRFT( & ! STLA = F2 * STLA * AL2 CTL2 = DD1 * CTL2 - CTL3 = 0.1364_r8 * CTL2 + CTL3 = 0.1364_kp * CTL2 ! DO L=KD,K RNF(L) = zero @@ -3018,7 +3018,7 @@ SUBROUTINE DDRFT( & VRW(1) = F3*WVL(KD) - CTL2*VT(1) BUD(KD) = STLA * TX6 * QRB(KD) * half RNF(KD) = BUD(KD) - DOF = 1.1364_r8 * BUD(KD) * QRPI(KD) + DOF = 1.1364_kp * BUD(KD) * QRPI(KD) DOFW = -BUD(KD) * STLT(KD) ! RNT = TRW(1) * VRW(1) @@ -3052,7 +3052,7 @@ SUBROUTINE DDRFT( & ! QA(2) = DOF WA(2) = DOFW - DOF = 1.1364_r8 * BUD(L) * QRPI(L) + DOF = 1.1364_kp * BUD(L) * QRPI(L) DOFW = -BUD(L) * STLT(L) ! RNF(LL) = RNF(LL) + QQQ * ST1 @@ -3123,7 +3123,7 @@ SUBROUTINE DDRFT( & QA(2) = DOF WA(2) = DOFW - DOF = 1.1364_r8 * BUD(L) * QRPI(L) + DOF = 1.1364_kp * BUD(L) * QRPI(L) DOFW = -BUD(L) * STLT(L) ! RNF(LL) = RNF(LL) + ST1 @@ -3258,7 +3258,7 @@ SUBROUTINE DDRFT( & ENDDO ! ! tem = 0.5 - if (tx2 > one .and. abs(errq-tx2) > 0.1_r8) then + if (tx2 > one .and. abs(errq-tx2) > 0.1_kp) then tem = half !! elseif (tx2 < 0.1) then !! tem = 1.2 @@ -3281,17 +3281,17 @@ SUBROUTINE DDRFT( & ENDIF ELSE TEM = ERRQ - TX2 -! IF (TEM < ZERO .AND. ERRQ > 0.1_r8) THEN - IF (TEM < ZERO .AND. ERRQ > 0.5_r8) THEN +! IF (TEM < ZERO .AND. ERRQ > 0.1_kp) THEN + IF (TEM < ZERO .AND. ERRQ > 0.5_kp) THEN ! IF (TEM < ZERO .and. & -! & (ntla < numtla .or. ERRQ > 0.5_r8)) THEN +! & (ntla < numtla .or. ERRQ > 0.5_kp)) THEN SKPUP = .TRUE. ! No convergence ! - ERRQ = 10.0_r8 ! No rain profile! + ERRQ = 10.0_kp ! No rain profile! !!!! ELSEIF (ABS(TEM) < ERRMI2 .OR. TX2 < ERRMIN) THEN ELSEIF (TX2 < ERRMIN) THEN SKPUP = .TRUE. ! Converges ! ERRQ = zero ! Rain profile exists! - elseif (tem < zero .and. errq < 0.1_r8) then + elseif (tem < zero .and. errq < 0.1_kp) then skpup = .true. ! if (ntla == numtla .or. tem > -0.003) then errq = zero @@ -3309,7 +3309,7 @@ SUBROUTINE DDRFT( & ! ENDDO ! End of the ITR Loop!! ! - IF (ERRQ < 0.1_r8) THEN + IF (ERRQ < 0.1_kp) THEN DDFT = .TRUE. RNB = - RNB ! do l=kd1,kb1-1 @@ -3330,7 +3330,7 @@ SUBROUTINE DDRFT( & TX1 = TX1 + RNF(L) ENDDO TX1 = TRAIN / (TX1+RNT+RNB) - IF (ABS(TX1-one) < 0.2_r8) THEN + IF (ABS(TX1-one) < 0.2_kp) THEN RNT = MAX(RNT*TX1,ZERO) RNB = RNB * TX1 DO L=KD,KB1 @@ -3340,7 +3340,7 @@ SUBROUTINE DDRFT( & ELSE DDFT = .FALSE. - ERRQ = 10.0_r8 + ERRQ = 10.0_kp ENDIF ENDIF ! @@ -3364,7 +3364,7 @@ SUBROUTINE DDRFT( & WCB(L) = zero ENDDO ! - ERRQ = 10.0_r8 + ERRQ = 10.0_kp ! At this point stlt contains inverse of updraft vertical velocity 1/Wu. KK = MAX(KB1,KD1) @@ -3410,9 +3410,9 @@ SUBROUTINE DDRFT( & IF (RNT > zero) THEN if (TX1 > zero) THEN QRP(KD) = (RPART*RNT / (ROR(KD)*TX1*GMS(KD))) & - & ** (one/1.1364_r8) + & ** (one/1.1364_kp) else - tx1 = RPART*RNT / (ROR(KD)*GMS(KD)*QRP(KD)**1.1364_r8) + tx1 = RPART*RNT / (ROR(KD)*GMS(KD)*QRP(KD)**1.1364_kp) endif RNTP = (one - RPART) * RNT BUY(KD) = - ROR(KD) * TX1 * QRP(KD) @@ -3473,7 +3473,7 @@ SUBROUTINE DDRFT( & VRW(1) = half * (GAM(L-1) + GAM(L)) VRW(2) = one / (VRW(1) + VRW(1)) ! - TX4 = (QRT(L-1)+QRB(L-1))*(ONEBG*FAC*500.0_r8*EKNOB) + TX4 = (QRT(L-1)+QRB(L-1))*(ONEBG*FAC*500.0_kp*EKNOB) ! DOFW = one / (WA(3) * (one + NU*WA(2))) ! 1.0 / TVbar! ! @@ -3481,7 +3481,7 @@ SUBROUTINE DDRFT( & HOD(L) = HOD(L-1) QOD(L) = QOD(L-1) ! - ERRQ = 10.0_r8 + ERRQ = 10.0_kp ! IF (L <= KBL) THEN @@ -3506,7 +3506,7 @@ SUBROUTINE DDRFT( & IF (L == KD1) THEN IF (RNT > zero) THEN TEM = MAX(QRP(L-1),QRP(L)) - WVL(L) = TX1 * TEM * QRB(L-1)*(FACG*5.0_r8) + WVL(L) = TX1 * TEM * QRB(L-1)*(FACG*5.0_kp) ENDIF WVL(L) = MAX(ONE_M2, WVL(L)) TRW(1) = TRW(1) * half @@ -3634,9 +3634,9 @@ SUBROUTINE DDRFT( & ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) TEM2 = ROR(L) * QRP(L) CALL QRABF(TEM2,QRAF,QRBF) - TEM6 = TX5 * (1.6_r8 + 124.9_r8 * QRAF) * QRBF * TX4 + TEM6 = TX5 * (1.6_kp + 124.9_kp * QRAF) * QRBF * TX4 ! - CE = TEM6 * ST2 / ((5.4e5_r8*ST2 + 2.55e6_r8)*(ETD(L)+DDZ)) + CE = TEM6 * ST2 / ((5.4e5_kp*ST2 + 2.55e6_kp)*(ETD(L)+DDZ)) ! TEM2 = - ((one+TEM1)*(QHS+CE) + TEM1*QOD(L)) TEM3 = (one + TEM1) * QHS * (QOD(L)+CE) @@ -3647,7 +3647,7 @@ SUBROUTINE DDRFT( & ! second iteration ! ! ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) - CE = TEM6 * ST2 / ((5.4e5_r8*ST2 + 2.55e6_r8)*(ETD(L)+DDZ)) + CE = TEM6 * ST2 / ((5.4e5_kp*ST2 + 2.55e6_kp)*(ETD(L)+DDZ)) ! CEE = CE * (ETD(L)+DDZ) ! @@ -3668,7 +3668,7 @@ SUBROUTINE DDRFT( & QRP(L) = MAX(TEM,ZERO) ELSEIF (TX5 > zero) THEN QRP(L) = (MAX(ZERO,QA(1)/(ROR(L)*TX5*GMS(L)))) & - & ** (one/1.1364_r8) + & ** (one/1.1364_kp) ELSE QRP(L) = zero ENDIF @@ -3695,7 +3695,7 @@ SUBROUTINE DDRFT( & ! WVL(L) = 0.5*tem1 ! WVL(L) = 0.1*tem1 ! WVL(L) = 0.0 - WVL(L) = 1.0e-10_r8 + WVL(L) = 1.0e-10_kp else WVL(L) = half*(WVL(L)+TEM1) endif @@ -3709,7 +3709,7 @@ SUBROUTINE DDRFT( & ! IF (ITR >= MIN(ITRMIN,ITRMD/2)) THEN IF (ITR >= MIN(ITRMND,ITRMD/2)) THEN - IF (ETD(L-1) == zero .AND. ERRQ > 0.2_r8) THEN + IF (ETD(L-1) == zero .AND. ERRQ > 0.2_kp) THEN ROR(L) = BUD(KD) ETD(L) = zero WVL(L) = zero @@ -3721,7 +3721,7 @@ SUBROUTINE DDRFT( & TX5 = TX9 else TX5 = (STLT(KB1) * QRT(KB1) & - & + STLT(KBL) * QRB(KB1)) * (0.5_r8*FAC) + & + STLT(KBL) * QRB(KB1)) * (0.5_kp*FAC) endif EVP(L-1) = zero @@ -3730,14 +3730,14 @@ SUBROUTINE DDRFT( & ! IF (QA(1) > 0.0) THEN QRP(L) = (QA(1) / (ROR(L)*TX5*GMS(L))) & - & ** (one/1.1364_r8) + & ** (one/1.1364_kp) ! endif BUY(L) = - ROR(L) * TX5 * QRP(L) WCB(L-1) = zero ENDIF ! DEL_ETA = ETD(L) - ETD(L-1) - IF(DEL_ETA < zero .AND. ERRQ > 0.1_r8) THEN + IF(DEL_ETA < zero .AND. ERRQ > 0.1_kp) THEN ROR(L) = BUD(KD) ETD(L) = zero WVL(L) = zero @@ -3764,9 +3764,9 @@ SUBROUTINE DDRFT( & ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) TEM2 = ROR(L) * QRP(L-1) CALL QRABF(TEM2,QRAF,QRBF) - TEM6 = TX5 * (1.6_r8 + 124.9_r8 * QRAF) * QRBF * TX4 + TEM6 = TX5 * (1.6_kp + 124.9_kp * QRAF) * QRBF * TX4 ! - CE = TEM6*ST2/((5.4e5_r8*ST2 + 2.55e6_r8)*(ETD(L)+DDZ)) + CE = TEM6*ST2/((5.4e5_kp*ST2 + 2.55e6_kp)*(ETD(L)+DDZ)) ! TEM2 = - ((one+TEM1)*(QHS+CE) + TEM1*QOD(L)) @@ -3777,7 +3777,7 @@ SUBROUTINE DDRFT( & ! second iteration ! ! ST2 = PRL(L) * (QHS + TEM1 * (QHS-QOD(L))) - CE = TEM6*ST2/((5.4e5_r8*ST2 + 2.55e6_r8)*(ETD(L)+DDZ)) + CE = TEM6*ST2/((5.4e5_kp*ST2 + 2.55e6_kp)*(ETD(L)+DDZ)) ! CEE = CE * (ETD(L)+DDZ) ! @@ -3830,7 +3830,7 @@ SUBROUTINE DDRFT( & ! ENDDO ! End of the iteration loop for a given L! IF (L <= K) THEN - IF (ETD(L-1) == zero .AND. ERRQ > 0.1_r8 .and. l <= kbl) THEN + IF (ETD(L-1) == zero .AND. ERRQ > 0.1_kp .and. l <= kbl) THEN !!! & .AND. ERRQ > ERRMIN*10.0 .and. l <= kbl) THEN ! & .AND. ERRQ > ERRMIN*10.0) THEN ROR(L) = BUD(KD) @@ -3853,7 +3853,7 @@ SUBROUTINE DDRFT( & ! IF (QA(1) > 0.0) THEN QRP(L) = (QA(1) / (ROR(L)*TX5*GMS(L))) & - & ** (one/1.1364_r8) + & ** (one/1.1364_kp) ! ENDIF ETD(L) = zero WVL(L) = zero @@ -3884,7 +3884,7 @@ SUBROUTINE DDRFT( & ! not converge) , no downdraft is assumed ! ! IF (ERRQ > ERRMIN*100.0 .AND. IDN(idnm) == 99) & - IF (ERRQ > 0.1_r8 .AND. IDN(idnm) == idnmax) DDFT = .FALSE. + IF (ERRQ > 0.1_kp .AND. IDN(idnm) == idnmax) DDFT = .FALSE. ! DOF = zero IF (.NOT. DDFT) RETURN @@ -3988,7 +3988,7 @@ SUBROUTINE QSATCN(TT,P,Q,DQDT) real(kind=kind_phys) es, d, hlorv, W ! ! es = 10.0 * fpvs(tt) ! fpvs is in centibars! - es = min(p, 0.01_r8 * fpvs(tt)) ! fpvs is in Pascals! + es = min(p, 0.01_kp * fpvs(tt)) ! fpvs is in Pascals! ! D = one / max(p+epsm1*es,ONE_M10) D = one / (p+epsm1*es) ! @@ -4009,7 +4009,7 @@ SUBROUTINE ANGRAD(PRES, ALM, AL2, TLA) ! integer i ! - IF (TLA < 0.0_r8) THEN + IF (TLA < 0.0_kp) THEN IF (PRES <= PLAC(1)) THEN TLA = TLAC(1) ELSEIF (PRES <= PLAC(2)) THEN @@ -4046,8 +4046,8 @@ SUBROUTINE ANGRAD(PRES, ALM, AL2, TLA) TEM = REFR(6) ENDIF ! - tem = 2.0e-4_r8 / tem - al2 = min(4.0_r8*tem, max(alm, tem)) + tem = 2.0e-4_kp / tem + al2 = min(4.0_kp*tem, max(alm, tem)) ! RETURN end subroutine angrad @@ -4059,18 +4059,18 @@ SUBROUTINE SETQRP integer jx ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! XMIN = 1.0E-6 - XMIN = 0.0_r8 - XMAX = 5.0_r8 + XMIN = 0.0_kp + XMAX = 5.0_kp XINC = (XMAX-XMIN)/(NQRP-1) C2XQRP = one / XINC C1XQRP = one - XMIN*C2XQRP - TEM1 = 0.001_r8 ** 0.2046_r8 - TEM2 = 0.001_r8 ** 0.525_r8 + TEM1 = 0.001_kp ** 0.2046_kp + TEM2 = 0.001_kp ** 0.525_kp DO JX=1,NQRP X = XMIN + (JX-1)*XINC - TBQRP(JX) = X ** 0.1364_r8 - TBQRA(JX) = TEM1 * X ** 0.2046_r8 - TBQRB(JX) = TEM2 * X ** 0.525_r8 + TBQRP(JX) = X ** 0.1364_kp + TBQRA(JX) = TEM1 * X ** 0.2046_kp + TBQRB(JX) = TEM2 * X ** 0.525_kp ENDDO ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RETURN @@ -4095,12 +4095,12 @@ end subroutine qrabf SUBROUTINE SETVTP implicit none - real(kind=kind_phys), parameter :: vtpexp=-0.3636_r8, one=1.0_r8 + real(kind=kind_phys), parameter :: vtpexp=-0.3636_kp, one=1.0_kp real(kind=kind_phys) xinc,x,xmax,xmin integer jx ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XMIN = 0.05_r8 - XMAX = 1.5_r8 + XMIN = 0.05_kp + XMAX = 1.5_kp XINC = (XMAX-XMIN)/(NVTP-1) C2XVTP = one / XINC C1XVTP = one - XMIN*C2XVTP @@ -4147,10 +4147,10 @@ real(kind=kind_phys) FUNCTION CLF(PRATE) implicit none real(kind=kind_phys) PRATE ! - real (kind=kind_phys), parameter :: ccf1=0.30_r8, ccf2=0.09_r8 & - &, ccf3=0.04_r8, ccf4=0.01_r8 & - &, pr1=1.0_r8, pr2=5.0_r8 & - &, pr3=20.0_r8 + real (kind=kind_phys), parameter :: ccf1=0.30_kp, ccf2=0.09_kp & + &, ccf3=0.04_kp, ccf4=0.01_kp & + &, pr1=1.0_kp, pr2=5.0_kp & + &, pr3=20.0_kp ! if (prate < pr1) then clf = ccf1 diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index f84da9bec..b7ef1ea68 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -86,7 +86,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! implicit none ! - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys integer, intent(in) :: im, ivegsrc integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean @@ -131,11 +131,11 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) real(kind=kind_phys) :: tvs, z0, z0max, ztmax ! real(kind=kind_phys), parameter :: - & one=1.0_r8, zero=0.0_r8, half=0.5_r8, qmin=1.0e-8_r8 - &, charnock=.014_r8, z0s_max=.317e-2_r8 &! a limiting value at high winds over sea - &, zmin=1.0e-6_r8 & - &, vis=1.4e-5_r8, rnu=1.51e-5_r8, visi=one/vis & - &, log01=log(0.01_r8), log05=log(0.05_r8), log07=log(0.07_r8) + & one=1.0_kp, zero=0.0_kp, half=0.5_kp, qmin=1.0e-8_kp + &, charnock=.014_kp, z0s_max=.317e-2_kp &! a limiting value at high winds over sea + &, zmin=1.0e-6_kp & + &, vis=1.4e-5_kp, rnu=1.51e-5_kp, visi=one/vis & + &, log01=log(0.01_kp), log05=log(0.05_kp), log07=log(0.07_kp) ! parameter (charnock=.014,ca=.4)!c ca is the von karman constant ! parameter (alpha=5.,a0=-3.975,a1=12.32,b1=-7.755,b2=6.041) @@ -179,7 +179,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) #else tvs = half * (tsurf_lnd(i)+tskin_lnd(i)) * virtfac #endif - z0max = max(zmin, min(0.01_r8 * z0rl_lnd(i), z1(i))) + z0max = max(zmin, min(0.01_kp * z0rl_lnd(i), z1(i))) !** xubin's new z0 over land tem1 = one - shdmax(i) tem2 = tem1 * tem1 @@ -193,10 +193,10 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0max = exp( tem2*log01 + tem1*log05 ) elseif (vegtype(i) == 7) then ! z0max = exp( tem2*log01 + tem1*log01 ) - z0max = 0.01_r8 + z0max = 0.01_kp elseif (vegtype(i) == 16) then ! z0max = exp( tem2*log01 + tem1*log01 ) - z0max = 0.01_r8 + z0max = 0.01_kp else z0max = exp( tem2*log01 + tem1*log(z0max) ) endif @@ -209,10 +209,10 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) z0max = exp( tem2*log01 + tem1*log05 ) elseif (vegtype(i) == 9) then ! z0max = exp( tem2*log01 + tem1*log01 ) - z0max = 0.01_r8 + z0max = 0.01_kp elseif (vegtype(i) == 11) then ! z0max = exp( tem2*log01 + tem1*log01 ) - z0max = 0.01_r8 + z0max = 0.01_kp else z0max = exp( tem2*log01 + tem1*log(z0max) ) endif @@ -220,22 +220,22 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) endif ! mg, sfc-perts: add surface perturbations to z0max over land if (z0pert(i) /= zero ) then - z0max = z0max * (10.0_r8**z0pert(i)) + z0max = z0max * (10.0_kp**z0pert(i)) endif z0max = max(z0max, zmin) ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil - czilc = 0.8_r8 + czilc = 0.8_kp - tem1 = 1.0_r8 - sigmaf(i) + tem1 = 1.0_kp - sigmaf(i) ztmax = z0max*exp( - tem1*tem1 & * czilc*ca*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) ! mg, sfc-perts: add surface perturbations to ztmax/z0max ratio over land if (ztpert(i) /= zero) then - ztmax = ztmax * (10.0_r8**ztpert(i)) + ztmax = ztmax * (10.0_kp**ztpert(i)) endif ztmax = max(ztmax, zmin) ! @@ -250,7 +250,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) if (icy(i)) then ! Some ice tvs = half * (tsurf_ice(i)+tskin_ice(i)) * virtfac - z0max = max(zmin, min(0.01_r8 * z0rl_ice(i), z1(i))) + z0max = max(zmin, min(0.01_kp * z0rl_ice(i), z1(i))) !** xubin's new z0 over land and sea ice tem1 = one - shdmax(i) tem2 = tem1 * tem1 @@ -267,9 +267,9 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height ! dependance of czil - czilc = 0.8_r8 + czilc = 0.8_kp - tem1 = 1.0_r8 - sigmaf(i) + tem1 = 1.0_kp - sigmaf(i) ztmax = z0max*exp( - tem1*tem1 & * czilc*ca*sqrt(ustar_ice(i)*(0.01/1.5e-05))) ztmax = max(ztmax, 1.0e-6) @@ -288,7 +288,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) if (wet(i)) then ! Some open ocean tvs = half * (tsurf_wat(i)+tskin_wat(i)) * virtfac - z0 = 0.01_r8 * z0rl_wat(i) + z0 = 0.01_kp * z0rl_wat(i) z0max = max(zmin, min(z0,z1(i))) ustar_wat(i) = sqrt(grav * z0 / charnock) wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i)) @@ -297,7 +297,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! ztmax = z0max - restar = max(ustar_wat(i)*z0max*visi, 0.000001_r8) + restar = max(ustar_wat(i)*z0max*visi, 0.000001_kp) ! restar = log(restar) ! restar = min(restar,5.) @@ -306,7 +306,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! rat = rat / (1. + (bb2 + cc2*restar) * restar)) ! rat taken from zeng, zhao and dickinson 1997 - rat = min(7.0_r8, 2.67_r8 * sqrt(sqrt(restar)) - 2.57_r8) + rat = min(7.0_kp, 2.67_kp * sqrt(sqrt(restar)) - 2.57_kp) ztmax = max(z0max * exp(-rat), zmin) ! if (sfc_z0_type == 6) then @@ -341,29 +341,29 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! z0 = arnu / (ustar(i) * ff ** pp) if (redrag) then - z0rl_wat(i) = 100.0_r8 * max(min(z0, z0s_max), & - & 1.0e-7_r8) + z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max), & + & 1.0e-7_kp) else - z0rl_wat(i) = 100.0_r8 * max(min(z0,0.1_r8), 1.e-7_r8) + z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.e-7_kp) endif elseif (sfc_z0_type == 6) then ! wang call znot_m_v6(wind10m, z0) ! wind, m/s, z0, m - z0rl_wat(i) = 100.0_r8 * z0 ! cm + z0rl_wat(i) = 100.0_kp * z0 ! cm elseif (sfc_z0_type == 7) then ! wang call znot_m_v7(wind10m, z0) ! wind, m/s, z0, m - z0rl_wat(i) = 100.0_r8 * z0 ! cm + z0rl_wat(i) = 100.0_kp * z0 ! cm else - z0rl_wat(i) = 1.0e-4_r8 + z0rl_wat(i) = 1.0e-4_kp endif - elseif (z0rl_wav(i) <= 1.0e-7_r8) then + elseif (z0rl_wav(i) <= 1.0e-7_kp) then z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i) if (redrag) then - z0rl_wat(i) = 100.0_r8 * max(min(z0, z0s_max),1.0e-7_r8) + z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp) else - z0rl_wat(i) = 100.0_r8 * max(min(z0,0.1_r8), 1.0e-7_r8) + z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp) endif endif @@ -385,7 +385,7 @@ subroutine stability & & rb, fm, fh, fm10, fh2, cm, ch, stress, ustar) !----- - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys ! --- inputs: real(kind=kind_phys), intent(in) :: & & z1, snwdph, thv1, wind, z0max, ztmax, tvs, grav @@ -395,12 +395,12 @@ subroutine stability & & rb, fm, fh, fm10, fh2, cm, ch, stress, ustar ! --- locals: - real(kind=kind_phys), parameter :: alpha=5.0_r8, a0=-3.975_r8 & - &, a1=12.32_r8, alpha4=4.0_r8*alpha & - &, b1=-7.755_r8, b2=6.041, alpha2=alpha+alpha & - &, beta=1.0_r8 & - &, a0p=-7.941_r8, a1p=24.75_r8, b1p=-8.705_r8, b2p=7.899_r8& - &, ztmin1=-999.0_r8, zero=0.0_r8, one=1.0_r8 + real(kind=kind_phys), parameter :: alpha=5.0_kp, a0=-3.975_kp & + &, a1=12.32_kp, alpha4=4.0_kp*alpha & + &, b1=-7.755_kp, b2=6.041_kp, alpha2=alpha+alpha & + &, beta=1.0_kp & + &, a0p=-7.941_kp, a1p=24.75_kp, b1p=-8.705_kp, b2p=7.899_kp& + &, ztmin1=-999.0_kp, zero=0.0_kp, one=1.0_kp real(kind=kind_phys) aa, aa0, bb, bb0, dtv, adtv, & hl1, hl12, pm, ph, pm10, ph2, @@ -412,31 +412,31 @@ subroutine stability & z1i = one / z1 tem1 = z0max/z1 - if (abs(one-tem1) > 1.0e-6_r8) then + if (abs(one-tem1) > 1.0e-6_kp) then ztmax1 = - beta*log(tem1)/(alpha2*(one-tem1)) else - ztmax1 = 99.0_r8 + ztmax1 = 99.0_kp endif - if( z0max < 0.05_r8 .and. snwdph < 10.0_r8 ) ztmax1 = 99.0_r8 + if( z0max < 0.05_kp .and. snwdph < 10.0_kp ) ztmax1 = 99.0_kp ! compute stability indices (rb and hlinf) dtv = thv1 - tvs - adtv = max(abs(dtv),0.001_r8) + adtv = max(abs(dtv),0.001_kp) dtv = sign(1.,dtv) * adtv #ifdef GSD_SURFACE_FLUXES_BUGFIX - rb = max(-5000.0_r8, grav * dtv * z1 + rb = max(-5000.0_kp, grav * dtv * z1 & / (thv1 * wind * wind)) #else - rb = max(-5000.0_r8, (grav+grav) * dtv * z1 + rb = max(-5000.0_kp, (grav+grav) * dtv * z1 & / ((thv1 + tvs) * wind * wind)) #endif tem1 = one / z0max tem2 = one / ztmax fm = log((z0max+z1) * tem1) fh = log((ztmax+z1) * tem2) - fm10 = log((z0max+10.0_r8) * tem1) - fh2 = log((ztmax+2.0_r8) * tem2) + fm10 = log((z0max+10.0_kp) * tem1) + fh2 = log((ztmax+2.0_kp) * tem2) hlinf = rb * fm * fm / fh hlinf = min(max(hlinf,ztmin1),ztmax1) ! @@ -444,7 +444,7 @@ subroutine stability & ! if (dtv >= zero) then hl1 = hlinf - if(hlinf > 0.25_r8) then + if(hlinf > 0.25_kp) then tem1 = hlinf * z1i hl0inf = z0max * tem1 hltinf = ztmax * tem1 @@ -471,7 +471,7 @@ subroutine stability & bb0 = sqrt(one + alpha4 * hlt) pm = aa0 - aa + log( (one+aa)/(one+aa0) ) ph = bb0 - bb + log( (one+bb)/(one+bb0) ) - hl110 = hl1 * 10.0_r8 * z1i + hl110 = hl1 * 10.0_kp * z1i hl110 = min(max(hl110, ztmin1), ztmax1) aa = sqrt(one + alpha4 * hl110) pm10 = aa0 - aa + log( (one+aa)/(one+aa0) ) @@ -485,7 +485,7 @@ subroutine stability & ! else ! dtv < 0 case olinf = z1 / hlinf - tem1 = 50.0_r8 * z0max + tem1 = 50.0_kp * z0max if(abs(olinf) <= tem1) then hlinf = -z1 / tem1 hlinf = min(max(hlinf,ztmin1),ztmax1) @@ -493,11 +493,11 @@ subroutine stability & ! ! get pm and ph ! - if (hlinf >= -0.5_r8) then + if (hlinf >= -0.5_kp) then hl1 = hlinf pm = (a0 + a1*hl1) * hl1 / (one+ (b1+b2*hl1) *hl1) ph = (a0p + a1p*hl1) * hl1 / (one+ (b1p+b2p*hl1)*hl1) - hl110 = hl1 * 10.0_r8 * z1i + hl110 = hl1 * 10.0_kp * z1i hl110 = min(max(hl110, ztmin1), ztmax1) pm10 = (a0 + a1*hl110) * hl110/(one+(b1+b2*hl110)*hl110) hl12 = (hl1+hl1) * z1i @@ -506,17 +506,17 @@ subroutine stability & else ! hlinf < 0.05 hl1 = -hlinf tem1 = one / sqrt(hl1) - pm = log(hl1) + 2.0_r8 * sqrt(tem1) - .8776_r8 - ph = log(hl1) + 0.5_r8 * tem1 + 1.386_r8 + pm = log(hl1) + 2.0_kp * sqrt(tem1) - .8776_kp + ph = log(hl1) + 0.5_kp * tem1 + 1.386_kp ! pm = log(hl1) + 2.0 * hl1 ** (-.25) - .8776 ! ph = log(hl1) + 0.5 * hl1 ** (-.5) + 1.386 - hl110 = hl1 * 10.0_r8 * z1i + hl110 = hl1 * 10.0_kp * z1i hl110 = min(max(hl110, ztmin1), ztmax1) - pm10 = log(hl110) + 2.0_r8/sqrt(sqrt(hl110)) - 0.8776_r8 + pm10 = log(hl110) + 2.0_kp/sqrt(sqrt(hl110)) - 0.8776_kp ! pm10 = log(hl110) + 2. * hl110 ** (-.25) - .8776 hl12 = (hl1+hl1) * z1i hl12 = min(max(hl12, ztmin1), ztmax1) - ph2 = log(hl12) + 0.5_r8 / sqrt(hl12) + 1.386_r8 + ph2 = log(hl12) + 0.5_kp / sqrt(hl12) + 1.386_kp ! ph2 = log(hl12) + .5 * hl12 ** (-.5) + 1.386 endif @@ -530,7 +530,7 @@ subroutine stability & fh2 = fh2 - ph2 cm = ca * ca / (fm * fm) ch = ca * ca / (fm * fh) - tem1 = 0.00001_r8/z1 + tem1 = 0.00001_kp/z1 cm = max(cm, tem1) ch = max(ch, tem1) stress = cm * wind * wind diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index cfe191a85..5920f375c 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -176,13 +176,13 @@ subroutine sfc_nst_run & ! implicit none - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys ! ! --- constant parameters: - real (kind=kind_phys), parameter :: f24 = 24.0_r8 ! hours/day - real (kind=kind_phys), parameter :: f1440 = 1440.0_r8 ! minutes/day - real (kind=kind_phys), parameter :: czmin = 0.0001_r8 ! cos(89.994) - real (kind=kind_phys), parameter :: zero = 0.0_r8, one = 1.0_r8 + real (kind=kind_phys), parameter :: f24 = 24.0_kp ! hours/day + real (kind=kind_phys), parameter :: f1440 = 1440.0_kp ! minutes/day + real (kind=kind_phys), parameter :: czmin = 0.0001_kp ! cos(89.994) + real (kind=kind_phys), parameter :: zero = 0.0_kp, one = 1.0_kp ! --- inputs: @@ -256,7 +256,7 @@ subroutine sfc_nst_run & hvapi = one/hvap elocp = hvap/cp - sss = 34.0_r8 ! temporarily, when sea surface salinity data is not ready + sss = 34.0_kp ! temporarily, when sea surface salinity data is not ready ! ! flag for open water and where the iteration is on ! @@ -297,7 +297,7 @@ subroutine sfc_nst_run & nswsfc(i) = sfcnsw(i) ! net solar radiation at the air-sea surface (positive downward) wndmag(i) = sqrt(u1(i)*u1(i) + v1(i)*v1(i)) - q0(i) = max(q1(i), 1.0e-8_r8) + q0(i) = max(q1(i), 1.0e-8_kp) #ifdef GSD_SURFACE_FLUXES_BUGFIX theta1(i) = t1(i) / prslk1(i) ! potential temperature at the middle of lowest model layer #else @@ -337,8 +337,8 @@ subroutine sfc_nst_run & ! run nst model: dtm + slm ! - zsea1 = 0.001_r8*real(nstf_name4) - zsea2 = 0.001_r8*real(nstf_name5) + zsea1 = 0.001_kp*real(nstf_name4) + zsea2 = 0.001_kp*real(nstf_name5) !> - Call module_nst_water_prop::density() to compute sea water density. !> - Call module_nst_water_prop::rhocoef() to compute thermal expansion @@ -350,20 +350,20 @@ subroutine sfc_nst_run & ulwflx(i) = sfcemis(i) * sbc * t12 * t12 alon = xlon(i)*rad2deg grav = grv(sinlat(i)) - soltim = mod(alon/15.0_r8 + solhr, 24.0_r8)*3600.0_r8 + soltim = mod(alon/15.0_kp + solhr, 24.0_kp)*3600.0_kp call density(tsea,sss,rho_w) ! sea water density call rhocoef(tsea,sss,rho_w,alpha,beta) ! alpha & beta ! !> - Calculate sensible heat flux (\a qrain) due to rainfall. ! - le = (2.501_r8-0.00237_r8*tsea)*1e6_r8 - dwat = 2.11e-5_r8*(t1(i)/t0k)**1.94_r8 ! water vapor diffusivity - dtmp = (one+3.309e-3_r8*(t1(i)-t0k)-1.44e-6_r8*(t1(i)-t0k) - & * (t1(i)-t0k))*0.02411_r8/(rho_a(i)*cp) ! heat diffusivity - wetc = 622.0_r8*le*qss(i)/(rd*t1(i)*t1(i)) + le = (2.501_kp-0.00237_kp*tsea)*1e6_kp + dwat = 2.11e-5_kp*(t1(i)/t0k)**1.94_kp ! water vapor diffusivity + dtmp = (one+3.309e-3_kp*(t1(i)-t0k)-1.44e-6_kp*(t1(i)-t0k) + & * (t1(i)-t0k))*0.02411_kp/(rho_a(i)*cp) ! heat diffusivity + wetc = 622.0_kp*le*qss(i)/(rd*t1(i)*t1(i)) alfac = one / (one + (wetc*le*dwat)/(cp*dtmp)) ! wet bulb factor - tem = (1.0e3_r8 * rain(i) / rho_w) * alfac * cp_w - qrain(i) = tem * (tsea-t1(i)+1.0e3_r8*(qss(i)-q0(i))*le/cp) + tem = (1.0e3_kp * rain(i) / rho_w) * alfac * cp_w + qrain(i) = tem * (tsea-t1(i)+1.0e3_kp*(qss(i)-q0(i))*le/cp) !> - Calculate input non solar heat flux as upward = positive to models here @@ -379,7 +379,7 @@ subroutine sfc_nst_run & ! ! sensitivities of heat flux components to ts ! - rnl_ts = 4.0_r8*sfcemis(i)*sbc*tsea*tsea*tsea ! d(rnl)/d(ts) + rnl_ts = 4.0_kp*sfcemis(i)*sbc*tsea*tsea*tsea ! d(rnl)/d(ts) hs_ts = rch(i) hl_ts = rch(i)*elocp*eps*hvap*qss(i)/(rd*t12) rf_ts = tem * (one+rch(i)*hl_ts) @@ -543,7 +543,7 @@ subroutine sfc_nst_run & ! endif ! if ( xt(i) > 0.0 ) then ! reset dtl at midnight and when solar zenith angle > 89.994 degree - if ( abs(soltim) < 2.0_r8*timestep ) then + if ( abs(soltim) < 2.0_kp*timestep ) then call dtl_reset & (xt(i),xs(i),xu(i),xv(i),xz(i),xzts(i),xtts(i)) endif @@ -556,7 +556,7 @@ subroutine sfc_nst_run & !> - Call get_dtzm_point() to computes \a dtz and \a tsurf. call get_dtzm_point(xt(i),xz(i),dt_cool(i),z_c(i), & zsea1,zsea2,dtz) - tsurf(i) = max(271.2_r8, tref(i) + dtz ) + tsurf(i) = max(271.2_kp, tref(i) + dtz ) ! if (lprnt .and. i == ipr) print *,' tsurf=',tsurf(i),' tref=', ! &tref(i),' xz=',xz(i),' dt_cool=',dt_cool(i) @@ -683,7 +683,7 @@ subroutine sfc_nst_pre_run implicit none - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys ! --- inputs: integer, intent(in) :: im, nthreads @@ -702,10 +702,10 @@ subroutine sfc_nst_pre_run ! --- locals integer :: i - real(kind=kind_phys), parameter :: zero = 0.0_r8, - & one = 1.0_r8, - & half = 0.5_r8, - & omz1 = 2.0_r8 + real(kind=kind_phys), parameter :: zero = 0.0_kp, + & one = 1.0_kp, + & half = 0.5_kp, + & omz1 = 2.0_kp real(kind=kind_phys) :: tem1, tem2, dnsst real(kind=kind_phys), dimension(im) :: dtzm @@ -794,7 +794,7 @@ subroutine sfc_nst_post_run & implicit none - integer, parameter :: r8 = kind_phys + integer, parameter :: kp = kind_phys ! --- inputs: integer, intent(in) :: im, nthreads @@ -837,8 +837,8 @@ subroutine sfc_nst_post_run & ! --- ... run nsst model ... --- if (nstf_name1 > 1) then - zsea1 = 0.001_r8*real(nstf_name4) - zsea2 = 0.001_r8*real(nstf_name5) + zsea1 = 0.001_kp*real(nstf_name4) + zsea2 = 0.001_kp*real(nstf_name5) call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & & im, 1, nthreads, dtzm) do i = 1, im diff --git a/physics/wv_saturation.F b/physics/wv_saturation.F index b19da7b5e..f3047b542 100644 --- a/physics/wv_saturation.F +++ b/physics/wv_saturation.F @@ -9,12 +9,12 @@ !! This module contain some utility functions for saturation vapor pressure. module wv_saturation #ifdef GEOS5 - use MAPL_ConstantsMod, r8 => MAPL_R8 + use MAPL_ConstantsMod, kp => MAPL_kp #endif #ifdef NEMS_GSM use funcphys, only : fpvsl, fpvsi, fpvs ! saturation vapor pressure for water & ice #endif - use machine, only : r8 => kind_phys + use machine, only : kp => kind_phys !++jtb (comm out) @@ -61,37 +61,37 @@ module wv_saturation ! to tmax+1 degrees k in one degree increments. ttrice defines the ! transition region where es is a combination of ice & water values ! - real(r8) estbl(plenest) - real(r8) tmin - real(r8) tmax - real(r8) ttrice - real(r8) pcf(6) - real(r8) epsqs - real(r8) rgasv - real(r8) hlatf - real(r8) hlatv - real(r8) cp - real(r8) tmelt + real(kp) estbl(plenest) + real(kp) tmin + real(kp) tmax + real(kp) ttrice + real(kp) pcf(6) + real(kp) epsqs + real(kp) rgasv + real(kp) hlatf + real(kp) hlatv + real(kp) cp + real(kp) tmelt logical icephs integer, parameter :: iulog=6 contains - real(r8) function estblf( td ) + real(kp) function estblf( td ) ! ! Saturation vapor pressure table lookup ! - real(r8), intent(in) :: td + real(kp), intent(in) :: td ! - real(r8) :: e - real(r8) :: ai + real(kp) :: e + real(kp) :: ai integer :: i ! e = max(min(td,tmax),tmin) i = int(e-tmin)+1 ai = aint(e-tmin) - estblf = (tmin+ai-e+1._r8)* estbl(i)-(tmin+ai-e)* estbl(i+1) + estblf = (tmin+ai-e+1._kp)* estbl(i)-(tmin+ai-e)* estbl(i+1) end function estblf !>\ingroup wv_saturation_mod @@ -110,19 +110,19 @@ subroutine gestbl(tmn ,tmx ,trice ,ip ,epsil , latvap ,latice , & ! ! Input arguments ! - real(r8), intent(in) :: tmn - real(r8), intent(in) :: tmx - real(r8), intent(in) :: epsil - real(r8), intent(in) :: trice - real(r8), intent(in) :: latvap - real(r8), intent(in) :: latice - real(r8), intent(in) :: rh2o - real(r8), intent(in) :: cpair - real(r8), intent(in) :: tmeltx + real(kp), intent(in) :: tmn + real(kp), intent(in) :: tmx + real(kp), intent(in) :: epsil + real(kp), intent(in) :: trice + real(kp), intent(in) :: latvap + real(kp), intent(in) :: latice + real(kp), intent(in) :: rh2o + real(kp), intent(in) :: cpair + real(kp), intent(in) :: tmeltx ! !---------------------------Local variables----------------------------- ! - real(r8) t + real(kp) t integer n integer lentbl integer itype @@ -148,7 +148,7 @@ subroutine gestbl(tmn ,tmx ,trice ,ip ,epsil , latvap ,latice , & cp = cpair tmelt = tmeltx ! - lentbl = INT(tmax-tmin+2.000001_r8) + lentbl = INT(tmax-tmin+2.000001_kp) if (lentbl .gt. plenest) then @@ -162,7 +162,7 @@ subroutine gestbl(tmn ,tmx ,trice ,ip ,epsil , latvap ,latice , & ! If so, set appropriate transition range for temperature ! if (icephs) then - if (ttrice /= 0.0_r8) then + if (ttrice /= 0.0_kp) then itype = -ttrice else itype = 1 @@ -171,14 +171,14 @@ subroutine gestbl(tmn ,tmx ,trice ,ip ,epsil , latvap ,latice , & itype = 0 end if ! - t = tmin - 1.0_r8 + t = tmin - 1.0_kp do n=1,lentbl - t = t + 1.0_r8 + t = t + 1.0_kp call gffgch(t,estbl(n),tmelt,itype) end do ! do n=lentbl+1,plenest - estbl(n) = -99999.0_r8 + estbl(n) = -99999.0_kp end do ! ! Table complete -- Set coefficients for polynomial approximation of @@ -188,11 +188,11 @@ subroutine gestbl(tmn ,tmx ,trice ,ip ,epsil , latvap ,latice , & ! ! --- Degree 5 approximation --- ! - pcf(1) = 5.04469588506e-01_r8 - pcf(2) = -5.47288442819e+00_r8 - pcf(3) = -3.67471858735e-01_r8 - pcf(4) = -8.95963532403e-03_r8 - pcf(5) = -7.78053686625e-05_r8 + pcf(1) = 5.04469588506e-01_kp + pcf(2) = -5.47288442819e+00_kp + pcf(3) = -3.67471858735e-01_kp + pcf(4) = -8.95963532403e-03_kp + pcf(5) = -7.78053686625e-05_kp ! ! --- Degree 6 approximation --- ! @@ -235,35 +235,35 @@ subroutine aqsat(t ,p ,es ,qs ,ii , ilen ,kk ,kstart ,kend ) integer, intent(in) :: ilen integer, intent(in) :: kstart integer, intent(in) :: kend - real(r8), intent(in) :: t(ii,kk) - real(r8), intent(in) :: p(ii,kk) + real(kp), intent(in) :: t(ii,kk) + real(kp), intent(in) :: p(ii,kk) ! ! Output arguments ! - real(r8), intent(out) :: es(ii,kk) - real(r8), intent(out) :: qs(ii,kk) + real(kp), intent(out) :: es(ii,kk) + real(kp), intent(out) :: qs(ii,kk) ! !---------------------------Local workspace----------------------------- ! - real(r8) omeps + real(kp) omeps integer i, k ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs do k=kstart,kend do i=1,ilen es(i,k) = min(estblf(t(i,k)),p(i,k)) ! ! Saturation specific humidity ! - qs(i,k) = min(1.0_r8, epsqs*es(i,k)/(p(i,k)-omeps*es(i,k))) + qs(i,k) = min(1.0_kp, epsqs*es(i,k)/(p(i,k)-omeps*es(i,k))) ! ! The following check is to avoid the generation of negative values ! that can occur in the upper stratosphere and mesosphere ! -! if (qs(i,k) < 0.0_r8) then -! qs(i,k) = 1.0_r8 +! if (qs(i,k) < 0.0_kp) then +! qs(i,k) = 1.0_kp ! es(i,k) = p(i,k) ! end if @@ -291,22 +291,22 @@ subroutine aqsat_water(t, p, es, qs, ii, ilen, kk, kstart,kend) integer, intent(in) :: ilen integer, intent(in) :: kstart integer, intent(in) :: kend - real(r8), intent(in) :: t(ii,kk) - real(r8), intent(in) :: p(ii,kk) + real(kp), intent(in) :: t(ii,kk) + real(kp), intent(in) :: p(ii,kk) ! ! Output arguments ! - real(r8), intent(out) :: es(ii,kk) - real(r8), intent(out) :: qs(ii,kk) + real(kp), intent(out) :: es(ii,kk) + real(kp), intent(out) :: qs(ii,kk) ! !---------------------------Local workspace----------------------------- ! - real(r8) omeps + real(kp) omeps integer i, k ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs do k=kstart,kend do i=1,ilen ! es(i,k) = estblf(t(i,k)) @@ -319,13 +319,13 @@ subroutine aqsat_water(t, p, es, qs, ii, ilen, kk, kstart,kend) ! ! Saturation specific humidity ! - qs(i,k) = min(1.0_r8, epsqs*es(i,k)/(p(i,k)-omeps*es(i,k))) + qs(i,k) = min(1.0_kp, epsqs*es(i,k)/(p(i,k)-omeps*es(i,k))) ! ! The following check is to avoid the generation of negative values ! that can occur in the upper stratosphere and mesosphere ! -! if (qs(i,k) < 0.0_r8) then -! qs(i,k) = 1.0_r8 +! if (qs(i,k) < 0.0_kp) then +! qs(i,k) = 1.0_kp ! es(i,k) = p(i,k) ! end if end do @@ -357,48 +357,48 @@ subroutine aqsatd(t, p, es, qs, gam, ii, ilen, kk, kstart, kend) integer, intent(in) :: kstart integer, intent(in) :: kend - real(r8), intent(in) :: t(ii,kk) - real(r8), intent(in) :: p(ii,kk) + real(kp), intent(in) :: t(ii,kk) + real(kp), intent(in) :: p(ii,kk) ! ! Output arguments ! - real(r8), intent(out) :: es(ii,kk) - real(r8), intent(out) :: qs(ii,kk) - real(r8), intent(out) :: gam(ii,kk) + real(kp), intent(out) :: es(ii,kk) + real(kp), intent(out) :: qs(ii,kk) + real(kp), intent(out) :: gam(ii,kk) ! !---------------------------Local workspace----------------------------- ! logical lflg integer i integer k - real(r8) omeps - real(r8) trinv - real(r8) tc - real(r8) weight - real(r8) hltalt - real(r8) hlatsb - real(r8) hlatvp - real(r8) tterm - real(r8) desdt + real(kp) omeps + real(kp) trinv + real(kp) tc + real(kp) weight + real(kp) hltalt + real(kp) hlatsb + real(kp) hlatvp + real(kp) tterm + real(kp) desdt ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs do k=kstart,kend do i=1,ilen es(i,k) = min(p(i,k), estblf(t(i,k))) ! ! Saturation specific humidity ! - qs(i,k) = min(1.0_r8, epsqs*es(i,k)/(p(i,k)-omeps*es(i,k))) + qs(i,k) = min(1.0_kp, epsqs*es(i,k)/(p(i,k)-omeps*es(i,k))) ! ! The following check is to avoid the generation of negative qs ! values which can occur in the upper stratosphere and mesosphere ! ! -! if (qs(i,k) < 0.0_r8) then -! qs(i,k) = 1.0_r8 +! if (qs(i,k) < 0.0_kp) then +! qs(i,k) = 1.0_kp ! es(i,k) = p(i,k) ! end if end do @@ -407,9 +407,9 @@ subroutine aqsatd(t, p, es, qs, gam, ii, ilen, kk, kstart, kend) ! "generalized" analytic expression for t derivative of es ! accurate to within 1 percent for 173.16 < t < 373.16 ! - trinv = 0.0_r8 - if ((.not. icephs) .or. (ttrice == 0.0_r8)) go to 10 - trinv = 1.0_r8/ttrice + trinv = 0.0_kp + if ((.not. icephs) .or. (ttrice == 0.0_kp)) go to 10 + trinv = 1.0_kp/ttrice ! do k=kstart,kend do i=1,ilen @@ -422,10 +422,10 @@ subroutine aqsatd(t, p, es, qs, gam, ii, ilen, kk, kstart, kend) ! above freezing where constant slope is given by -2369 j/(kg c) =cpv - cw ! tc = t(i,k) - tmelt - lflg = (tc >= -ttrice .and. tc < 0.0_r8) - weight = min(-tc*trinv,1.0_r8) + lflg = (tc >= -ttrice .and. tc < 0.0_kp) + weight = min(-tc*trinv,1.0_kp) hlatsb = hlatv + weight*hlatf - hlatvp = hlatv - 2369.0_r8*tc + hlatvp = hlatv - 2369.0_kp*tc if (t(i,k) < tmelt) then hltalt = hlatsb else @@ -435,12 +435,12 @@ subroutine aqsatd(t, p, es, qs, gam, ii, ilen, kk, kstart, kend) tterm = pcf(1) + tc*(pcf(2) + tc*(pcf(3) + tc*(pcf(4) & & + tc*pcf(5)))) else - tterm = 0.0_r8 + tterm = 0.0_kp end if desdt = hltalt*es(i,k)/(rgasv*t(i,k)*t(i,k)) + tterm*trinv gam(i,k) = hltalt*qs(i,k)*p(i,k)*desdt/(cp*es(i,k)*(p(i,k) & & - omeps*es(i,k))) - if (qs(i,k) == 1.0_r8) gam(i,k) = 0.0_r8 + if (qs(i,k) == 1.0_kp) gam(i,k) = 0.0_kp end do end do ! @@ -454,7 +454,7 @@ subroutine aqsatd(t, p, es, qs, gam, ii, ilen, kk, kstart, kend) ! Account for change of hlatv with t above freezing where ! constant slope is given by -2369 j/(kg c) = cpv - cw ! - hlatvp = hlatv - 2369.0_r8*(t(i,k)-tmelt) + hlatvp = hlatv - 2369.0_kp*(t(i,k)-tmelt) if (icephs) then hlatsb = hlatv + hlatf else @@ -468,7 +468,7 @@ subroutine aqsatd(t, p, es, qs, gam, ii, ilen, kk, kstart, kend) desdt = hltalt*es(i,k)/(rgasv*t(i,k)*t(i,k)) gam(i,k) = hltalt*qs(i,k)*p(i,k)*desdt/(cp*es(i,k)*(p(i,k) & & - omeps*es(i,k))) - if (qs(i,k) == 1.0_r8) gam(i,k) = 0.0_r8 + if (qs(i,k) == 1.0_kp) gam(i,k) = 0.0_kp end do end do ! @@ -488,14 +488,14 @@ subroutine vqsatd(t ,p ,es ,qs ,gam , len ) ! Input arguments ! integer, intent(in) :: len - real(r8), intent(in) :: t(len) - real(r8), intent(in) :: p(len) + real(kp), intent(in) :: t(len) + real(kp), intent(in) :: p(len) ! ! Output arguments ! - real(r8), intent(out) :: es(len) - real(r8), intent(out) :: qs(len) - real(r8), intent(out) :: gam(len) + real(kp), intent(out) :: es(len) + real(kp), intent(out) :: qs(len) + real(kp), intent(out) :: gam(len) ! !--------------------------Local Variables------------------------------ ! @@ -503,20 +503,20 @@ subroutine vqsatd(t ,p ,es ,qs ,gam , len ) ! integer i ! - real(r8) omeps - real(r8) trinv - real(r8) tc - real(r8) weight - real(r8) hltalt + real(kp) omeps + real(kp) trinv + real(kp) tc + real(kp) weight + real(kp) hltalt ! - real(r8) hlatsb - real(r8) hlatvp - real(r8) tterm - real(r8) desdt + real(kp) hlatsb + real(kp) hlatvp + real(kp) tterm + real(kp) desdt ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs do i=1,len es(i) = min(estblf(t(i)), p(i)) ! @@ -527,10 +527,10 @@ subroutine vqsatd(t ,p ,es ,qs ,gam , len ) ! The following check is to avoid the generation of negative ! values that can occur in the upper stratosphere and mesosphere ! - qs(i) = min(1.0_r8,qs(i)) + qs(i) = min(1.0_kp,qs(i)) ! -! if (qs(i) < 0.0_r8) then -! qs(i) = 1.0_r8 +! if (qs(i) < 0.0_kp) then +! qs(i) = 1.0_kp ! es(i) = p(i) ! end if @@ -539,9 +539,9 @@ subroutine vqsatd(t ,p ,es ,qs ,gam , len ) ! "generalized" analytic expression for t derivative of es ! accurate to within 1 percent for 173.16 < t < 373.16 ! - trinv = 0.0_r8 - if ((.not. icephs) .or. (ttrice.eq.0.0_r8)) go to 10 - trinv = 1.0_r8/ttrice + trinv = 0.0_kp + if ((.not. icephs) .or. (ttrice.eq.0.0_kp)) go to 10 + trinv = 1.0_kp/ttrice do i=1,len ! ! Weighting of hlat accounts for transition from water to ice @@ -552,10 +552,10 @@ subroutine vqsatd(t ,p ,es ,qs ,gam , len ) ! above freezing where const slope is given by -2369 j/(kg c) = cpv - cw ! tc = t(i) - tmelt - lflg = (tc >= -ttrice .and. tc < 0.0_r8) - weight = min(-tc*trinv,1.0_r8) + lflg = (tc >= -ttrice .and. tc < 0.0_kp) + weight = min(-tc*trinv,1.0_kp) hlatsb = hlatv + weight*hlatf - hlatvp = hlatv - 2369.0_r8*tc + hlatvp = hlatv - 2369.0_kp*tc if (t(i) < tmelt) then hltalt = hlatsb else @@ -565,11 +565,11 @@ subroutine vqsatd(t ,p ,es ,qs ,gam , len ) tterm = pcf(1) + tc*(pcf(2) + tc*(pcf(3) + tc*(pcf(4) & & + tc*pcf(5)))) else - tterm = 0.0_r8 + tterm = 0.0_kp end if desdt = hltalt*es(i)/(rgasv*t(i)*t(i)) + tterm*trinv gam(i) = hltalt*qs(i)*p(i)*desdt/(cp*es(i)*(p(i) - omeps*es(i))) - if (qs(i) == 1.0_r8) gam(i) = 0.0_r8 + if (qs(i) == 1.0_kp) gam(i) = 0.0_kp end do return ! @@ -580,7 +580,7 @@ subroutine vqsatd(t ,p ,es ,qs ,gam , len ) ! Account for change of hlatv with t above freezing where ! constant slope is given by -2369 j/(kg c) = cpv - cw ! - hlatvp = hlatv - 2369.0_r8*(t(i)-tmelt) + hlatvp = hlatv - 2369.0_kp*(t(i)-tmelt) if (icephs) then hlatsb = hlatv + hlatf else @@ -593,7 +593,7 @@ subroutine vqsatd(t ,p ,es ,qs ,gam , len ) end if desdt = hltalt*es(i)/(rgasv*t(i)*t(i)) gam(i) = hltalt*qs(i)*p(i)*desdt/(cp*es(i)*(p(i) - omeps*es(i))) - if (qs(i) == 1.0_r8) gam(i) = 0.0_r8 + if (qs(i) == 1.0_kp) gam(i) = 0.0_kp end do ! return @@ -610,15 +610,15 @@ subroutine vqsatd_water(t, p, es, qs, gam, len) ! Input arguments ! integer, intent(in) :: len - real(r8), intent(in) :: t(len) - real(r8), intent(in) :: p(len) + real(kp), intent(in) :: t(len) + real(kp), intent(in) :: p(len) ! ! Output arguments ! - real(r8), intent(out) :: es(len) - real(r8), intent(out) :: qs(len) - real(r8), intent(out) :: gam(len) + real(kp), intent(out) :: es(len) + real(kp), intent(out) :: qs(len) + real(kp), intent(out) :: gam(len) ! !--------------------------Local Variables------------------------------ @@ -626,16 +626,16 @@ subroutine vqsatd_water(t, p, es, qs, gam, len) ! integer i ! - real(r8) omeps - real(r8) hltalt + real(kp) omeps + real(kp) hltalt ! - real(r8) hlatsb - real(r8) hlatvp - real(r8) desdt + real(kp) hlatsb + real(kp) hlatvp + real(kp) desdt ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs do i=1,len #ifdef NEMS_GSM es(i) = min(fpvsl(t(i)), p(i)) @@ -645,15 +645,15 @@ subroutine vqsatd_water(t, p, es, qs, gam, len) ! ! Saturation specific humidity ! - qs(i) = min(1.0_r8, epsqs*es(i) / (p(i)-omeps*es(i))) + qs(i) = min(1.0_kp, epsqs*es(i) / (p(i)-omeps*es(i))) ! ! The following check is to avoid the generation of negative ! values that can occur in the upper stratosphere and mesosphere ! -! qs(i) = min(1.0_r8,qs(i)) +! qs(i) = min(1.0_kp,qs(i)) ! -! if (qs(i) < 0.0_r8) then -! qs(i) = 1.0_r8 +! if (qs(i) < 0.0_kp) then +! qs(i) = 1.0_kp ! es(i) = p(i) ! end if @@ -666,7 +666,7 @@ subroutine vqsatd_water(t, p, es, qs, gam, len) ! Account for change of hlatv with t above freezing where ! constant slope is given by -2369 j/(kg c) = cpv - cw ! - hlatvp = hlatv - 2369.0_r8*(t(i)-tmelt) + hlatvp = hlatv - 2369.0_kp*(t(i)-tmelt) hlatsb = hlatv if (t(i) < tmelt) then hltalt = hlatsb @@ -675,7 +675,7 @@ subroutine vqsatd_water(t, p, es, qs, gam, len) end if desdt = hltalt*es(i)/(rgasv*t(i)*t(i)) gam(i) = hltalt*qs(i)*p(i)*desdt/(cp*es(i)*(p(i) - omeps*es(i))) - if (qs(i) == 1.0_r8) gam(i) = 0.0_r8 + if (qs(i) == 1.0_kp) gam(i) = 0.0_kp end do ! return @@ -693,9 +693,9 @@ function polysvp (T,typ) !!DONIFF Changed to Murphy and Koop (2005) (03/04/14) - real(r8) dum + real(kp) dum - real(r8) t,polysvp + real(kp) t,polysvp integer typ @@ -716,19 +716,19 @@ function polysvp (T,typ) - polysvp = 10._r8**(-9.09718_r8*(273.16_r8/t-1._r8)-3.56654_r8* & - & log10(273.16_r8/t)+0.876793_r8*(1._r8-t/273.16_r8)+ & - & log10(6.1071_r8))*100._r8 + polysvp = 10._kp**(-9.09718_kp*(273.16_kp/t-1._kp)-3.56654_kp* & + & log10(273.16_kp/t)+0.876793_kp*(1._kp-t/273.16_kp)+ & + & log10(6.1071_kp))*100._kp end if if (typ.eq.0) then - polysvp = 10._r8**(-7.90298_r8*(373.16_r8/t-1._r8)+ 5.02808_r8* & - &log10(373.16_r8/t)- 1.3816e-7_r8*(10._r8**(11.344_r8*(1._r8-t/ & - &373.16_r8))-1._r8)+ 8.1328e-3_r8*(10._r8**(-3.49149_r8*(373.16_r8/ & - &t-1._r8))-1._r8)+ log10(1013.246_r8))*100._r8 + polysvp = 10._kp**(-7.90298_kp*(373.16_kp/t-1._kp)+ 5.02808_kp* & + &log10(373.16_kp/t)- 1.3816e-7_kp*(10._kp**(11.344_kp*(1._kp-t/ & + &373.16_kp))-1._kp)+ 8.1328e-3_kp*(10._kp**(-3.49149_kp*(373.16_kp/ & + &t-1._kp))-1._kp)+ log10(1013.246_kp))*100._kp end if end if @@ -745,40 +745,40 @@ integer function fqsatd(t ,p ,es ,qs ,gam , len ) integer, intent(in) :: len - real(r8), intent(in) :: t(len) - real(r8), intent(in) :: p(len) + real(kp), intent(in) :: t(len) + real(kp), intent(in) :: p(len) - real(r8), intent(out) :: es(len) - real(r8), intent(out) :: qs(len) - real(r8), intent(out) :: gam(len) + real(kp), intent(out) :: es(len) + real(kp), intent(out) :: qs(len) + real(kp), intent(out) :: gam(len) call vqsatd(t ,p ,es ,qs ,gam , len ) fqsatd = 1 return end function fqsatd - real(r8) function qsat_water(t,p) + real(kp) function qsat_water(t,p) - real(r8) t - real(r8) p - real(r8) es - real(r8) ps, ts, e1, e2, f1, f2, f3, f4, f5, f + real(kp) t + real(kp) p + real(kp) es + real(kp) ps, ts, e1, e2, f1, f2, f3, f4, f5, f - ps = 1013.246_r8 - ts = 373.16_r8 - e1 = 11.344_r8*(1.0_r8 - t/ts) - e2 = -3.49149_r8*(ts/t - 1.0_r8) - f1 = -7.90298_r8*(ts/t - 1.0_r8) - f2 = 5.02808_r8*log10(ts/t) - f3 = -1.3816_r8*(10.0_r8**e1 - 1.0_r8)/10000000.0_r8 - f4 = 8.1328_r8*(10.0_r8**e2 - 1.0_r8)/1000.0_r8 + ps = 1013.246_kp + ts = 373.16_kp + e1 = 11.344_kp*(1.0_kp - t/ts) + e2 = -3.49149_kp*(ts/t - 1.0_kp) + f1 = -7.90298_kp*(ts/t - 1.0_kp) + f2 = 5.02808_kp*log10(ts/t) + f3 = -1.3816_kp*(10.0_kp**e1 - 1.0_kp)/10000000.0_kp + f4 = 8.1328_kp*(10.0_kp**e2 - 1.0_kp)/1000.0_kp f5 = log10(ps) f = f1 + f2 + f3 + f4 + f5 - es = (10.0_r8**f)*100.0_r8 + es = (10.0_kp**f)*100.0_kp qsat_water = epsqs*es/(p-(1.-epsqs)*es) if(qsat_water < 0.) qsat_water = 1. @@ -790,17 +790,17 @@ end function qsat_water subroutine vqsat_water(t,p,qsat_water,len) integer, intent(in) :: len - real(r8) t(len) - real(r8) p(len) - real(r8) qsat_water(len) - real(r8) es - real(r8), parameter :: t0inv = 1._r8/273._r8 - real(r8) coef + real(kp) t(len) + real(kp) p(len) + real(kp) qsat_water(len) + real(kp) es + real(kp), parameter :: t0inv = 1._kp/273._kp + real(kp) coef integer :: i coef = hlatv/rgasv do i=1,len - es = 611._r8*exp(coef*(t0inv-1./t(i))) + es = 611._kp*exp(coef*(t0inv-1./t(i))) qsat_water(i) = epsqs*es/(p(i)-(1.-epsqs)*es) if(qsat_water(i) < 0.) qsat_water(i) = 1. enddo @@ -810,12 +810,12 @@ subroutine vqsat_water(t,p,qsat_water,len) end subroutine vqsat_water !>\ingroup wv_saturation_mod - real(r8) function qsat_ice(t,p) + real(kp) function qsat_ice(t,p) - real(r8) t - real(r8) p - real(r8) es - real(r8), parameter :: t0inv = 1._r8/273._r8 + real(kp) t + real(kp) p + real(kp) es + real(kp), parameter :: t0inv = 1._kp/273._kp es = 611.*exp((hlatv+hlatf)/rgasv*(t0inv-1./t)) qsat_ice = epsqs*es/(p-(1.-epsqs)*es) if(qsat_ice < 0.) qsat_ice = 1. @@ -826,12 +826,12 @@ end function qsat_ice subroutine vqsat_ice(t,p,qsat_ice,len) integer,intent(in) :: len - real(r8) t(len) - real(r8) p(len) - real(r8) qsat_ice(len) - real(r8) es - real(r8), parameter :: t0inv = 1._r8/273._r8 - real(r8) coef + real(kp) t(len) + real(kp) p(len) + real(kp) qsat_ice(len) + real(kp) es + real(kp), parameter :: t0inv = 1._kp/273._kp + real(kp) coef integer :: i coef = (hlatv+hlatf)/rgasv @@ -858,17 +858,17 @@ subroutine vqsatd2_water(t ,p ,es ,qs ,dqsdt , len ) ! Input arguments ! integer, intent(in) :: len - real(r8), intent(in) :: t(len) - real(r8), intent(in) :: p(len) + real(kp), intent(in) :: t(len) + real(kp), intent(in) :: p(len) ! ! Output arguments ! - real(r8), intent(out) :: es(len) - real(r8), intent(out) :: qs(len) + real(kp), intent(out) :: es(len) + real(kp), intent(out) :: qs(len) - real(r8), intent(out) :: dqsdt(len) + real(kp), intent(out) :: dqsdt(len) ! @@ -877,21 +877,21 @@ subroutine vqsatd2_water(t ,p ,es ,qs ,dqsdt , len ) ! integer i ! - real(r8) omeps - real(r8) hltalt + real(kp) omeps + real(kp) hltalt ! - real(r8) hlatsb - real(r8) hlatvp - real(r8) desdt + real(kp) hlatsb + real(kp) hlatvp + real(kp) desdt - real(r8) gam(len) + real(kp) gam(len) ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs do i=1,len #ifdef GEOS5 es(i) = min(polysvp(t(i),0), p(i)) @@ -907,10 +907,10 @@ subroutine vqsatd2_water(t ,p ,es ,qs ,dqsdt , len ) ! The following check is to avoid the generation of negative ! values that can occur in the upper stratosphere and mesosphere ! - qs(i) = min(1.0_r8,qs(i)) + qs(i) = min(1.0_kp,qs(i)) ! -! if (qs(i) < 0.0_r8) then -! qs(i) = 1.0_r8 +! if (qs(i) < 0.0_kp) then +! qs(i) = 1.0_kp ! es(i) = p(i) ! end if @@ -923,7 +923,7 @@ subroutine vqsatd2_water(t ,p ,es ,qs ,dqsdt , len ) ! Account for change of hlatv with t above freezing where ! constant slope is given by -2369 j/(kg c) = cpv - cw ! - hlatvp = hlatv - 2369.0_r8*(t(i)-tmelt) + hlatvp = hlatv - 2369.0_kp*(t(i)-tmelt) hlatsb = hlatv if (t(i) < tmelt) then hltalt = hlatsb @@ -932,7 +932,7 @@ subroutine vqsatd2_water(t ,p ,es ,qs ,dqsdt , len ) end if desdt = hltalt*es(i)/(rgasv*t(i)*t(i)) gam(i) = hltalt*qs(i)*p(i)*desdt/(cp*es(i)*(p(i) - omeps*es(i))) - if (qs(i) == 1.0_r8) gam(i) = 0.0_r8 + if (qs(i) == 1.0_kp) gam(i) = 0.0_kp dqsdt(i) = (cp/hltalt)*gam(i) @@ -950,22 +950,22 @@ subroutine vqsatd2_water_single(t ,p ,es ,qs ,dqsdt) ! Input arguments ! - real(r8), intent(in) :: t, p + real(kp), intent(in) :: t, p ! ! Output arguments ! - real(r8), intent(out) :: es, qs, dqsdt + real(kp), intent(out) :: es, qs, dqsdt ! !--------------------------Local Variables------------------------------ ! ! integer i ! - real(r8) omeps, hltalt, hlatsb, hlatvp, desdt, gam + real(kp) omeps, hltalt, hlatsb, hlatvp, desdt, gam ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs ! do i=1,len #ifdef GEOS5 es = min(p, polysvp(t,0)) @@ -976,13 +976,13 @@ subroutine vqsatd2_water_single(t ,p ,es ,qs ,dqsdt) ! ! Saturation specific humidity ! - qs = min(1.0_r8, epsqs*es/(p-omeps*es)) + qs = min(1.0_kp, epsqs*es/(p-omeps*es)) ! ! The following check is to avoid the generation of negative ! values that can occur in the upper stratosphere and mesosphere ! -! if (qs < 0.0_r8) then -! qs = 1.0_r8 +! if (qs < 0.0_kp) then +! qs = 1.0_kp ! es = p ! end if ! end do @@ -994,7 +994,7 @@ subroutine vqsatd2_water_single(t ,p ,es ,qs ,dqsdt) ! Account for change of hlatv with t above freezing where ! constant slope is given by -2369 j/(kg c) = cpv - cw ! - hlatvp = hlatv - 2369.0_r8*(t-tmelt) + hlatvp = hlatv - 2369.0_kp*(t-tmelt) hlatsb = hlatv if (t < tmelt) then hltalt = hlatsb @@ -1003,7 +1003,7 @@ subroutine vqsatd2_water_single(t ,p ,es ,qs ,dqsdt) end if desdt = hltalt*es/(rgasv*t*t) gam = hltalt*qs*p*desdt/(cp*es*(p - omeps*es)) - if (qs >= 1.0_r8) gam = 0.0_r8 + if (qs >= 1.0_kp) gam = 0.0_kp dqsdt = (cp/hltalt)*gam @@ -1035,16 +1035,16 @@ subroutine vqsatd2(t ,p ,es ,qs ,dqsdt , len ) ! Input arguments ! integer, intent(in) :: len - real(r8), intent(in) :: t(len) - real(r8), intent(in) :: p(len) + real(kp), intent(in) :: t(len) + real(kp), intent(in) :: p(len) ! ! Output arguments ! - real(r8), intent(out) :: es(len) - real(r8), intent(out) :: qs(len) + real(kp), intent(out) :: es(len) + real(kp), intent(out) :: qs(len) - real(r8), intent(out) :: dqsdt(len) + real(kp), intent(out) :: dqsdt(len) ! @@ -1054,24 +1054,24 @@ subroutine vqsatd2(t ,p ,es ,qs ,dqsdt , len ) ! integer i ! - real(r8) omeps - real(r8) trinv - real(r8) tc - real(r8) weight - real(r8) hltalt + real(kp) omeps + real(kp) trinv + real(kp) tc + real(kp) weight + real(kp) hltalt ! - real(r8) hlatsb - real(r8) hlatvp - real(r8) tterm - real(r8) desdt + real(kp) hlatsb + real(kp) hlatvp + real(kp) tterm + real(kp) desdt - real(r8) gam(len) + real(kp) gam(len) ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs do i=1,len #ifdef GEOS5 es(i) = min(p(i), estblf(t(i))) @@ -1087,10 +1087,10 @@ subroutine vqsatd2(t ,p ,es ,qs ,dqsdt , len ) ! The following check is to avoid the generation of negative ! values that can occur in the upper stratosphere and mesosphere ! - qs(i) = min(1.0_r8,qs(i)) + qs(i) = min(1.0_kp,qs(i)) ! -! if (qs(i) < 0.0_r8) then -! qs(i) = 1.0_r8 +! if (qs(i) < 0.0_kp) then +! qs(i) = 1.0_kp ! es(i) = p(i) ! end if end do @@ -1098,9 +1098,9 @@ subroutine vqsatd2(t ,p ,es ,qs ,dqsdt , len ) ! "generalized" analytic expression for t derivative of es ! accurate to within 1 percent for 173.16 < t < 373.16 ! - trinv = 0.0_r8 - if ((.not. icephs) .or. (ttrice == 0.0_r8)) go to 10 - trinv = 1.0_r8/ttrice + trinv = 0.0_kp + if ((.not. icephs) .or. (ttrice == 0.0_kp)) go to 10 + trinv = 1.0_kp/ttrice do i=1,len ! ! Weighting of hlat accounts for transition from water to ice @@ -1111,10 +1111,10 @@ subroutine vqsatd2(t ,p ,es ,qs ,dqsdt , len ) ! above freezing where const slope is given by -2369 j/(kg c) = cpv - cw ! tc = t(i) - tmelt - lflg = (tc >= -ttrice .and. tc < 0.0_r8) - weight = min(-tc*trinv,1.0_r8) + lflg = (tc >= -ttrice .and. tc < 0.0_kp) + weight = min(-tc*trinv,1.0_kp) hlatsb = hlatv + weight*hlatf - hlatvp = hlatv - 2369.0_r8*tc + hlatvp = hlatv - 2369.0_kp*tc if (t(i) < tmelt) then hltalt = hlatsb else @@ -1124,11 +1124,11 @@ subroutine vqsatd2(t ,p ,es ,qs ,dqsdt , len ) tterm = pcf(1) + tc*(pcf(2) + tc*(pcf(3) + tc*(pcf(4) & & + tc*pcf(5)))) else - tterm = 0.0_r8 + tterm = 0.0_kp end if desdt = hltalt*es(i)/(rgasv*t(i)*t(i)) + tterm*trinv gam(i) = hltalt*qs(i)*p(i)*desdt/(cp*es(i)*(p(i) - omeps*es(i))) - if (qs(i) == 1.0_r8) gam(i) = 0.0_r8 + if (qs(i) == 1.0_kp) gam(i) = 0.0_kp dqsdt(i) = (cp/hltalt)*gam(i) @@ -1142,7 +1142,7 @@ subroutine vqsatd2(t ,p ,es ,qs ,dqsdt , len ) ! Account for change of hlatv with t above freezing where ! constant slope is given by -2369 j/(kg c) = cpv - cw ! - hlatvp = hlatv - 2369.0_r8*(t(i)-tmelt) + hlatvp = hlatv - 2369.0_kp*(t(i)-tmelt) if (icephs) then hlatsb = hlatv + hlatf else @@ -1155,7 +1155,7 @@ subroutine vqsatd2(t ,p ,es ,qs ,dqsdt , len ) end if desdt = hltalt*es(i)/(rgasv*t(i)*t(i)) gam(i) = hltalt*qs(i)*p(i)*desdt/(cp*es(i)*(p(i) - omeps*es(i))) - if (qs(i) == 1.0_r8) gam(i) = 0.0_r8 + if (qs(i) == 1.0_kp) gam(i) = 0.0_kp dqsdt(i) = (cp/hltalt)*gam(i) @@ -1189,11 +1189,11 @@ subroutine vqsatd2_single(t ,p ,es ,qs ,dqsdt) ! ! Input arguments ! - real(r8), intent(in) :: t, p + real(kp), intent(in) :: t, p ! ! Output arguments ! - real(r8), intent(out) :: es, qs, dqsdt + real(kp), intent(out) :: es, qs, dqsdt ! !--------------------------Local Variables------------------------------ ! @@ -1201,23 +1201,23 @@ subroutine vqsatd2_single(t ,p ,es ,qs ,dqsdt) ! ! integer i ! index for vector calculations ! - real(r8) omeps - real(r8) trinv - real(r8) tc - real(r8) weight - real(r8) hltalt + real(kp) omeps + real(kp) trinv + real(kp) tc + real(kp) weight + real(kp) hltalt ! - real(r8) hlatsb - real(r8) hlatvp - real(r8) tterm - real(r8) desdt + real(kp) hlatsb + real(kp) hlatvp + real(kp) tterm + real(kp) desdt - real(r8) gam + real(kp) gam ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs ! do i=1,len @@ -1235,10 +1235,10 @@ subroutine vqsatd2_single(t ,p ,es ,qs ,dqsdt) ! The following check is to avoid the generation of negative ! values that can occur in the upper stratosphere and mesosphere ! - qs = min(1.0_r8,qs) + qs = min(1.0_kp,qs) ! -! if (qs < 0.0_r8) then -! qs = 1.0_r8 +! if (qs < 0.0_kp) then +! qs = 1.0_kp ! es = p ! end if @@ -1247,9 +1247,9 @@ subroutine vqsatd2_single(t ,p ,es ,qs ,dqsdt) ! "generalized" analytic expression for t derivative of es ! accurate to within 1 percent for 173.16 < t < 373.16 ! - trinv = 0.0_r8 - if ((.not. icephs) .or. (ttrice == 0.0_r8)) go to 10 - trinv = 1.0_r8/ttrice + trinv = 0.0_kp + if ((.not. icephs) .or. (ttrice == 0.0_kp)) go to 10 + trinv = 1.0_kp/ttrice ! do i=1,len ! @@ -1261,10 +1261,10 @@ subroutine vqsatd2_single(t ,p ,es ,qs ,dqsdt) ! above freezing where const slope is given by -2369 j/(kg c) = cpv - cw ! tc = t - tmelt - lflg = (tc >= -ttrice .and. tc < 0.0_r8) - weight = min(-tc*trinv,1.0_r8) + lflg = (tc >= -ttrice .and. tc < 0.0_kp) + weight = min(-tc*trinv,1.0_kp) hlatsb = hlatv + weight*hlatf - hlatvp = hlatv - 2369.0_r8*tc + hlatvp = hlatv - 2369.0_kp*tc if (t < tmelt) then hltalt = hlatsb else @@ -1274,11 +1274,11 @@ subroutine vqsatd2_single(t ,p ,es ,qs ,dqsdt) tterm = pcf(1) + tc*(pcf(2) + tc*(pcf(3) + tc*(pcf(4) & & + tc*pcf(5)))) else - tterm = 0.0_r8 + tterm = 0.0_kp end if desdt = hltalt*es/(rgasv*t*t) + tterm*trinv gam = hltalt*qs*p*desdt/(cp*es*(p - omeps*es)) - if (qs == 1.0_r8) gam = 0.0_r8 + if (qs == 1.0_kp) gam = 0.0_kp dqsdt = (cp/hltalt)*gam @@ -1295,7 +1295,7 @@ subroutine vqsatd2_single(t ,p ,es ,qs ,dqsdt) ! Account for change of hlatv with t above freezing where ! constant slope is given by -2369 j/(kg c) = cpv - cw ! - hlatvp = hlatv - 2369.0_r8*(t-tmelt) + hlatvp = hlatv - 2369.0_kp*(t-tmelt) if (icephs) then hlatsb = hlatv + hlatf else @@ -1308,7 +1308,7 @@ subroutine vqsatd2_single(t ,p ,es ,qs ,dqsdt) end if desdt = hltalt*es/(rgasv*t*t) gam = hltalt*qs*p*desdt/(cp*es*(p - omeps*es)) - if (qs == 1.0_r8) gam = 0.0_r8 + if (qs == 1.0_kp) gam = 0.0_kp dqsdt = (cp/hltalt)*gam @@ -1360,33 +1360,33 @@ subroutine gffgch(t ,es ,tmelt ,itype ) ! ! Input arguments ! - real(r8), intent(in) :: t ,tmelt + real(kp), intent(in) :: t ,tmelt ! ! Output arguments ! integer, intent(inout) :: itype - real(r8), intent(out) :: es + real(kp), intent(out) :: es ! !---------------------------Local variables----------------------------- ! - real(r8) e1 - real(r8) e2 - real(r8) eswtr - real(r8) f - real(r8) f1 - real(r8) f2 - real(r8) f3 - real(r8) f4 - real(r8) f5 - real(r8) ps - real(r8) t0 - real(r8) term1 - real(r8) term2 - real(r8) term3 - real(r8) tr - real(r8) ts - real(r8) weight + real(kp) e1 + real(kp) e2 + real(kp) eswtr + real(kp) f + real(kp) f1 + real(kp) f2 + real(kp) f3 + real(kp) f4 + real(kp) f5 + real(kp) ps + real(kp) t0 + real(kp) term1 + real(kp) term2 + real(kp) term3 + real(kp) tr + real(kp) ts + real(kp) weight integer itypo ! !----------------------------------------------------------------------- @@ -1394,14 +1394,14 @@ subroutine gffgch(t ,es ,tmelt ,itype ) ! Check on whether there is to be a transition region for es ! if (itype < 0) then - tr = abs(real(itype,r8)) + tr = abs(real(itype,kp)) itypo = itype itype = 1 else - tr = 0.0_r8 + tr = 0.0_kp itypo = itype end if - if (tr > 40.0_r8) then + if (tr > 40.0_kp) then write(iulog,900) tr end if @@ -1410,17 +1410,17 @@ subroutine gffgch(t ,es ,tmelt ,itype ) ! ! Water ! - ps = 1013.246_r8 - ts = 373.16_r8 - e1 = 11.344_r8*(1.0_r8 - t/ts) - e2 = -3.49149_r8*(ts/t - 1.0_r8) - f1 = -7.90298_r8*(ts/t - 1.0_r8) - f2 = 5.02808_r8*log10(ts/t) - f3 = -1.3816_r8*(10.0_r8**e1 - 1.0_r8)/10000000.0_r8 - f4 = 8.1328_r8*(10.0_r8**e2 - 1.0_r8)/1000.0_r8 + ps = 1013.246_kp + ts = 373.16_kp + e1 = 11.344_kp*(1.0_kp - t/ts) + e2 = -3.49149_kp*(ts/t - 1.0_kp) + f1 = -7.90298_kp*(ts/t - 1.0_kp) + f2 = 5.02808_kp*log10(ts/t) + f3 = -1.3816_kp*(10.0_kp**e1 - 1.0_kp)/10000000.0_kp + f4 = 8.1328_kp*(10.0_kp**e2 - 1.0_kp)/1000.0_kp f5 = log10(ps) f = f1 + f2 + f3 + f4 + f5 - es = (10.0_r8**f)*100.0_r8 + es = (10.0_kp**f)*100.0_kp eswtr = es ! if(t >= tmelt .or. itype == 0) go to 20 @@ -1429,17 +1429,17 @@ subroutine gffgch(t ,es ,tmelt ,itype ) ! 10 continue t0 = tmelt - term1 = 2.01889049_r8/(t0/t) - term2 = 3.56654_r8*log(t0/t) - term3 = 20.947031_r8*(t0/t) - es = 575.185606e10_r8*exp(-(term1 + term2 + term3)) + term1 = 2.01889049_kp/(t0/t) + term2 = 3.56654_kp*log(t0/t) + term3 = 20.947031_kp*(t0/t) + es = 575.185606e10_kp*exp(-(term1 + term2 + term3)) ! if (t < (tmelt - tr)) go to 20 ! ! Weighted transition between water and ice ! - weight = min((tmelt - t)/tr,1.0_r8) - es = weight*es + (1.0_r8 - weight)*eswtr + weight = min((tmelt - t)/tr,1.0_kp) + es = weight*es + (1.0_kp - weight)*eswtr ! 20 continue itype = itypo @@ -1455,31 +1455,31 @@ end subroutine gffgch !>\ingroup wv_saturation_mod !!DONIF USe Murphy and Koop (2005) (Written by Andrew Gettelman) function MurphyKoop_svp_water(tx) result(es) - real(r8), intent(in) :: tx - real(r8) :: es - real(r8):: t + real(kp), intent(in) :: tx + real(kp) :: es + real(kp):: t - t=min(tx, 332.0_r8) - t=max(123.0_r8, tx) + t=min(tx, 332.0_kp) + t=max(123.0_kp, tx) - es = exp(54.842763_r8 - (6763.22_r8 / t) - (4.210_r8 * log(t)) + & - & (0.000367_r8 * t) + (tanh(0.0415_r8 * (t - 218.8_r8)) * & - & (53.878_r8 - (1331.22_r8 / t) - (9.44523_r8 * log(t)) + & - & 0.014025_r8 * t))) + es = exp(54.842763_kp - (6763.22_kp / t) - (4.210_kp * log(t)) + & + & (0.000367_kp * t) + (tanh(0.0415_kp * (t - 218.8_kp)) * & + & (53.878_kp - (1331.22_kp / t) - (9.44523_kp * log(t)) + & + & 0.014025_kp * t))) end function MurphyKoop_svp_water function MurphyKoop_svp_ice(tx) result(es) - real(r8), intent(in) :: tx - real(r8) :: t - real(r8) :: es + real(kp), intent(in) :: tx + real(kp) :: t + real(kp) :: es - t=max(100.0_r8, tx) - t=min(274.0_r8, tx) + t=max(100.0_kp, tx) + t=min(274.0_kp, tx) - es = exp(9.550426_r8 - (5723.265_r8 / t) + (3.53068_r8 * & - & log(t)) - (0.00728332_r8 * t)) + es = exp(9.550426_kp - (5723.265_kp / t) + (3.53068_kp * & + & log(t)) - (0.00728332_kp * t)) end function MurphyKoop_svp_ice !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -1490,22 +1490,22 @@ subroutine vqsatd2_ice_single(t ,p ,es ,qs ,dqsdt) ! ! Input arguments ! - real(r8), intent(in) :: t, p + real(kp), intent(in) :: t, p ! ! Output arguments ! - real(r8), intent(out) :: es, qs, dqsdt + real(kp), intent(out) :: es, qs, dqsdt ! !--------------------------Local Variables------------------------------ ! ! integer i ! - real(r8) omeps, hltalt, hlatsb, hlatvp, desdt, gam + real(kp) omeps, hltalt, hlatsb, hlatvp, desdt, gam ! !----------------------------------------------------------------------- ! - omeps = 1.0_r8 - epsqs + omeps = 1.0_kp - epsqs ! do i=1,len #ifdef GEOS5 es = min(polysvp(t,1),p) @@ -1516,13 +1516,13 @@ subroutine vqsatd2_ice_single(t ,p ,es ,qs ,dqsdt) ! ! Saturation specific humidity ! - qs = min(1.0_r8, epsqs*es/(p-omeps*es)) + qs = min(1.0_kp, epsqs*es/(p-omeps*es)) ! ! The following check is to avoid the generation of negative ! values that can occur in the upper stratosphere and mesosphere ! -! if (qs < 0.0_r8) then -! qs = 1.0_r8 +! if (qs < 0.0_kp) then +! qs = 1.0_kp ! es = p ! end if ! end do @@ -1536,10 +1536,10 @@ subroutine vqsatd2_ice_single(t ,p ,es ,qs ,dqsdt) ! hltalt = hlatv + hlatf desdt = hltalt*es/(rgasv*t*t) - if (qs < 1.0_r8) then + if (qs < 1.0_kp) then gam = hltalt*qs*p*desdt/(cp*es*(p - omeps*es)) else - gam = 0.0_r8 + gam = 0.0_kp endif dqsdt = (cp/hltalt)*gam From 1378450792e0327a390fb821af49a559852dbddb Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 4 Aug 2020 13:44:14 -0600 Subject: [PATCH 275/404] Add first set of dependencies to metadata files for testing --- physics/cires_ugwp.meta | 7 +++++++ physics/mp_thompson.meta | 6 ++++++ physics/mp_thompson_pre.meta | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index d323324d2..03c8b9f32 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -1,3 +1,10 @@ +[ccpp-scheme-properties] + name = cires_ugwp + type = properties +# DH* 20200804 - this is a result of the nasty hack to call gwdps from within ugwp! + dependencies = gwdps.f + +######################################################################## [ccpp-arg-table] name = cires_ugwp_init type = scheme diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 5bbd85732..5e502441f 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -1,3 +1,9 @@ +[ccpp-scheme-properties] + name = mp_thompson + type = properties + dependencies = module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90 + +######################################################################## [ccpp-arg-table] name = mp_thompson_init type = scheme diff --git a/physics/mp_thompson_pre.meta b/physics/mp_thompson_pre.meta index 5782c10f6..d0b7809f0 100644 --- a/physics/mp_thompson_pre.meta +++ b/physics/mp_thompson_pre.meta @@ -1,3 +1,7 @@ +[ccpp-scheme-properties] + name = mp_thompson + type = properties + [ccpp-arg-table] name = mp_thompson_pre_run type = scheme From f4353e58058b92f2f195a7b95f6a43d6c012d675 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 4 Aug 2020 15:31:56 -0600 Subject: [PATCH 276/404] Add [ccpp-scheme-properties] section to every metadata table --- physics/GFS_DCNV_generic.meta | 10 +++++ physics/GFS_GWD_generic.meta | 13 +++++-- physics/GFS_MP_generic.meta | 10 +++++ physics/GFS_PBL_generic.meta | 10 +++++ physics/GFS_SCNV_generic.meta | 10 +++++ physics/GFS_debug.meta | 20 ++++++++++ physics/GFS_phys_time_vary.fv3.meta | 5 +++ physics/GFS_phys_time_vary.scm.meta | 5 +++ physics/GFS_rad_time_vary.fv3.meta | 5 +++ physics/GFS_rad_time_vary.scm.meta | 5 +++ physics/GFS_rrtmg_post.meta | 5 +++ physics/GFS_rrtmg_pre.meta | 5 +++ physics/GFS_rrtmg_setup.meta | 5 +++ physics/GFS_rrtmgp_lw_post.meta | 5 +++ physics/GFS_rrtmgp_pre.meta | 5 +++ physics/GFS_rrtmgp_setup.meta | 5 +++ physics/GFS_rrtmgp_sw_post.meta | 5 +++ physics/GFS_rrtmgp_sw_pre.meta | 5 +++ physics/GFS_stochastics.meta | 5 +++ physics/GFS_suite_interstitial.meta | 45 ++++++++++++++++++++++ physics/GFS_surface_composites.meta | 15 ++++++++ physics/GFS_surface_generic.meta | 10 +++++ physics/GFS_surface_loop_control.meta | 10 +++++ physics/GFS_time_vary_pre.fv3.meta | 5 +++ physics/GFS_time_vary_pre.scm.meta | 5 +++ physics/cires_ugwp_post.meta | 5 +++ physics/cnvc90.meta | 5 +++ physics/cs_conv.meta | 15 ++++++++ physics/cs_conv_aw_adj.meta | 5 +++ physics/cu_gf_driver.meta | 5 +++ physics/cu_gf_driver_post.meta | 5 +++ physics/cu_gf_driver_pre.meta | 5 +++ physics/cu_ntiedtke.meta | 5 +++ physics/cu_ntiedtke_post.meta | 5 +++ physics/cu_ntiedtke_pre.meta | 5 +++ physics/dcyc2.meta | 5 +++ physics/drag_suite.meta | 5 +++ physics/flake_driver.meta | 5 +++ physics/gcm_shoc.meta | 5 +++ physics/get_prs_fv3.meta | 10 +++++ physics/gfdl_cloud_microphys.meta | 5 +++ physics/gfdl_fv_sat_adj.meta | 5 +++ physics/gmtb_scm_sfc_flux_spec.meta | 5 +++ physics/gscond.meta | 5 +++ physics/gwdc.meta | 15 ++++++++ physics/gwdps.meta | 5 +++ physics/h2ophys.meta | 5 +++ physics/lsm_ruc_sfc_sice_interstitial.meta | 10 +++++ physics/m_micro.meta | 5 +++ physics/m_micro_interstitial.meta | 10 +++++ physics/machine.meta | 5 +++ physics/maximum_hourly_diagnostics.meta | 5 +++ physics/module_MYJPBL_wrapper.meta | 5 +++ physics/module_MYJSFC_wrapper.meta | 5 +++ physics/module_MYNNPBL_wrapper.meta | 5 +++ physics/module_MYNNSFC_wrapper.meta | 5 +++ physics/module_SGSCloud_RadPost.meta | 5 +++ physics/module_SGSCloud_RadPre.meta | 5 +++ physics/moninedmf.meta | 5 +++ physics/moninedmf_hafs.meta | 5 +++ physics/moninshoc.meta | 5 +++ physics/mp_fer_hires.meta | 5 +++ physics/mp_thompson_post.meta | 5 +++ physics/mp_thompson_pre.meta | 3 +- physics/ozphys.meta | 5 +++ physics/ozphys_2015.meta | 5 +++ physics/phys_tend.meta | 5 +++ physics/precpd.meta | 5 +++ physics/radlw_main.meta | 5 +++ physics/radsw_main.meta | 5 +++ physics/rascnv.meta | 5 +++ physics/rayleigh_damp.meta | 5 +++ physics/rrtmg_lw_post.meta | 5 +++ physics/rrtmg_lw_pre.meta | 5 +++ physics/rrtmg_sw_post.meta | 5 +++ physics/rrtmg_sw_pre.meta | 5 +++ physics/rrtmgp_lw_aerosol_optics.meta | 5 +++ physics/rrtmgp_lw_cloud_optics.meta | 5 +++ physics/rrtmgp_lw_cloud_sampling.meta | 5 +++ physics/rrtmgp_lw_gas_optics.meta | 5 +++ physics/rrtmgp_lw_pre.meta | 5 +++ physics/rrtmgp_lw_rte.meta | 5 +++ physics/rrtmgp_sw_aerosol_optics.meta | 5 +++ physics/rrtmgp_sw_cloud_optics.meta | 5 +++ physics/rrtmgp_sw_cloud_sampling.meta | 5 +++ physics/rrtmgp_sw_gas_optics.meta | 5 +++ physics/rrtmgp_sw_rte.meta | 5 +++ physics/samfdeepcnv.meta | 5 +++ physics/samfshalcnv.meta | 5 +++ physics/sascnvn.meta | 5 +++ physics/satmedmfvdif.meta | 5 +++ physics/satmedmfvdifq.meta | 5 +++ physics/sfc_cice.meta | 5 +++ physics/sfc_diag.meta | 5 +++ physics/sfc_diag_post.meta | 5 +++ physics/sfc_diff.meta | 5 +++ physics/sfc_drv.meta | 5 +++ physics/sfc_drv_ruc.meta | 5 +++ physics/sfc_noahmp_drv.meta | 5 +++ physics/sfc_nst.meta | 33 +++++----------- physics/sfc_ocean.meta | 5 +++ physics/sfc_sice.meta | 5 +++ physics/shalcnv.meta | 5 +++ physics/shinhongvdif.meta | 5 +++ physics/ysuvdif.meta | 5 +++ 105 files changed, 660 insertions(+), 29 deletions(-) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index 85a7cfa74..6d04019bc 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_DCNV_generic_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_DCNV_generic_pre_run type = scheme @@ -148,6 +153,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_DCNV_generic_post + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_DCNV_generic_post_run diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 614184975..0b80ee934 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_GWD_generic_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_GWD_generic_pre_init type = scheme @@ -244,10 +249,10 @@ optional = F ######################################################################## -[ccpp-arg-table] - name = GFS_GWD_generic_pre_finalize - type = scheme - +[ccpp-scheme-properties] + name = GFS_GWD_generic_post + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_GWD_generic_post_run diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 727f735ee..125006cc0 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_MP_generic_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_MP_generic_pre_init type = scheme @@ -138,6 +143,11 @@ name = GFS_MP_generic_pre_finalize type = scheme +######################################################################## +[ccpp-scheme-properties] + name = GFS_MP_generic_post + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_MP_generic_post_init diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 51962c37b..aa1bedd1c 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_PBL_generic_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_PBL_generic_pre_run type = scheme @@ -412,6 +417,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_PBL_generic_post + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_PBL_generic_post_run diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index e11e3fbc3..16e30d224 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_SCNV_generic_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_SCNV_generic_pre_run type = scheme @@ -131,6 +136,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_SCNV_generic_post + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_SCNV_generic_post_run diff --git a/physics/GFS_debug.meta b/physics/GFS_debug.meta index 24d26be7e..5c0c9972a 100644 --- a/physics/GFS_debug.meta +++ b/physics/GFS_debug.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_diagtoscreen + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_diagtoscreen_run type = scheme @@ -123,6 +128,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_interstitialtoscreen + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_interstitialtoscreen_run @@ -249,6 +259,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_abort + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_abort_run @@ -287,6 +302,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_checkland + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_checkland_run diff --git a/physics/GFS_phys_time_vary.fv3.meta b/physics/GFS_phys_time_vary.fv3.meta index 199cc362c..fdf8e6e3e 100644 --- a/physics/GFS_phys_time_vary.fv3.meta +++ b/physics/GFS_phys_time_vary.fv3.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_phys_time_vary + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 57a82ecb0..5087c77dd 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_phys_time_vary + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme diff --git a/physics/GFS_rad_time_vary.fv3.meta b/physics/GFS_rad_time_vary.fv3.meta index c86c81f18..46c536615 100644 --- a/physics/GFS_rad_time_vary.fv3.meta +++ b/physics/GFS_rad_time_vary.fv3.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rad_time_vary + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rad_time_vary_init type = scheme diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index 7e87f1f8a..3a68ba163 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rad_time_vary + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rad_time_vary_init type = scheme diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index 61e89098d..feb0f37c3 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rrtmg_post + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rrtmg_post_init type = scheme diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index a06e718a5..04607f64b 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rrtmg_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rrtmg_pre_init type = scheme diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 3ca93ffd4..dd078dd4d 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rrtmg_setup + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rrtmg_setup_init type = scheme diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index dbe96120d..15be791ab 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rrtmgp_lw_post + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_lw_post_run type = scheme diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index ae94ddf20..92ac1c357 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rrtmgp_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_pre_init type = scheme diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 9165117c5..876490038 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rrtmgp_setup + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_setup_init type = scheme diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 806bd49e4..b01f3fc3d 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rrtmgp_sw_post + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_sw_post_run type = scheme diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 3a96e1522..e0da4948e 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_rrtmgp_sw_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_sw_pre_run type = scheme diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index bd0dbf487..d1e7fa973 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_stochastics + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_stochastics_run type = scheme diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 37c474335..4ec6e43ff 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_suite_interstitial_rad_reset + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_suite_interstitial_rad_reset_run type = scheme @@ -35,6 +40,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_suite_interstitial_phys_reset + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_suite_interstitial_phys_reset_run @@ -73,6 +83,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_suite_interstitial_1 + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_suite_interstitial_1_run @@ -262,6 +277,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_suite_interstitial_2 + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_suite_interstitial_2_run @@ -780,6 +800,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_suite_stateout_reset + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_suite_stateout_reset_run @@ -898,6 +923,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_suite_stateout_update + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_suite_stateout_update_run @@ -1061,6 +1091,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_suite_interstitial_3 + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_suite_interstitial_3_run @@ -1493,6 +1528,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_suite_interstitial_4 + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_suite_interstitial_4_run @@ -1807,6 +1847,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_suite_interstitial_5 + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_suite_interstitial_5_run diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 9b297ca38..a09d38fe6 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_surface_composites_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_surface_composites_pre_run type = scheme @@ -637,6 +642,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_surface_composites_inter + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_surface_composites_inter_run @@ -781,6 +791,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_surface_composites_post + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_surface_composites_post_run diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index d37f7ec64..3cd011f97 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_surface_generic_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_surface_generic_pre_run type = scheme @@ -499,6 +504,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_surface_generic_post + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_surface_generic_post_run diff --git a/physics/GFS_surface_loop_control.meta b/physics/GFS_surface_loop_control.meta index 3fe5878f7..52fa7616e 100644 --- a/physics/GFS_surface_loop_control.meta +++ b/physics/GFS_surface_loop_control.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_surface_loop_control_part1 + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_surface_loop_control_part1_run type = scheme @@ -52,6 +57,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = GFS_surface_loop_control_part2 + type = properties + ######################################################################## [ccpp-arg-table] name = GFS_surface_loop_control_part2_run diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index 04f7f1529..0f92e7dae 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_time_vary_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_time_vary_pre_init type = scheme diff --git a/physics/GFS_time_vary_pre.scm.meta b/physics/GFS_time_vary_pre.scm.meta index 3dc91952e..2c50b215e 100644 --- a/physics/GFS_time_vary_pre.scm.meta +++ b/physics/GFS_time_vary_pre.scm.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = GFS_time_vary_pre + type = properties + +######################################################################## [ccpp-arg-table] name = GFS_time_vary_pre_init type = scheme diff --git a/physics/cires_ugwp_post.meta b/physics/cires_ugwp_post.meta index 1f98aa8a4..2ba9732d4 100644 --- a/physics/cires_ugwp_post.meta +++ b/physics/cires_ugwp_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cires_ugwp_post + type = properties + +######################################################################## [ccpp-arg-table] name = cires_ugwp_post_init type = scheme diff --git a/physics/cnvc90.meta b/physics/cnvc90.meta index 0cf7c22a4..caab909e3 100644 --- a/physics/cnvc90.meta +++ b/physics/cnvc90.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cnvc90 + type = properties + +######################################################################## [ccpp-arg-table] name = cnvc90_init type = scheme diff --git a/physics/cs_conv.meta b/physics/cs_conv.meta index b19a42a5b..9a1eba7a8 100644 --- a/physics/cs_conv.meta +++ b/physics/cs_conv.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cs_conv_pre + type = properties + +######################################################################## [ccpp-arg-table] name = cs_conv_pre_init type = scheme @@ -178,6 +183,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = cs_conv_post + type = properties + ######################################################################## [ccpp-arg-table] name = cs_conv_post_init @@ -252,6 +262,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = cs_conv + type = properties + ######################################################################## [ccpp-arg-table] name = cs_conv_init diff --git a/physics/cs_conv_aw_adj.meta b/physics/cs_conv_aw_adj.meta index fbbe3770c..29053478c 100644 --- a/physics/cs_conv_aw_adj.meta +++ b/physics/cs_conv_aw_adj.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cs_conv_aw_adj + type = properties + +######################################################################## [ccpp-arg-table] name = cs_conv_aw_adj_run type = scheme diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index d684ce331..f4ea2ea64 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cu_gf_driver + type = properties + +######################################################################## [ccpp-arg-table] name = cu_gf_driver_init type = scheme diff --git a/physics/cu_gf_driver_post.meta b/physics/cu_gf_driver_post.meta index 9a28bc719..60faa7a54 100644 --- a/physics/cu_gf_driver_post.meta +++ b/physics/cu_gf_driver_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cu_gf_driver_post + type = properties + +######################################################################## [ccpp-arg-table] name = cu_gf_driver_post_run type = scheme diff --git a/physics/cu_gf_driver_pre.meta b/physics/cu_gf_driver_pre.meta index 353bbe889..10995be4b 100644 --- a/physics/cu_gf_driver_pre.meta +++ b/physics/cu_gf_driver_pre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cu_gf_driver_pre + type = properties + +######################################################################## [ccpp-arg-table] name = cu_gf_driver_pre_run type = scheme diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 0e6a3d4b0..17290da5f 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cu_ntiedtke + type = properties + +######################################################################## [ccpp-arg-table] name = cu_ntiedtke_init type = scheme diff --git a/physics/cu_ntiedtke_post.meta b/physics/cu_ntiedtke_post.meta index a4fea92b3..241adefce 100644 --- a/physics/cu_ntiedtke_post.meta +++ b/physics/cu_ntiedtke_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cu_ntiedtke_post + type = properties + +######################################################################## [ccpp-arg-table] name = cu_ntiedtke_post_run type = scheme diff --git a/physics/cu_ntiedtke_pre.meta b/physics/cu_ntiedtke_pre.meta index 8fd2448a9..ef154c218 100644 --- a/physics/cu_ntiedtke_pre.meta +++ b/physics/cu_ntiedtke_pre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = cu_ntiedtke_pre + type = properties + +######################################################################## [ccpp-arg-table] name = cu_ntiedtke_pre_run type = scheme diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index e946e3c90..4bca64f1f 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = dcyc2t3 + type = properties + +######################################################################## [ccpp-arg-table] name = dcyc2t3_init type = scheme diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index dfcac8582..49dea9339 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = drag_suite + type = properties + +######################################################################## [ccpp-arg-table] name = drag_suite_init type = scheme diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index a40016010..353d174c3 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = flake_driver + type = properties + +######################################################################## [ccpp-arg-table] name = flake_driver_init type = scheme diff --git a/physics/gcm_shoc.meta b/physics/gcm_shoc.meta index c1ed6fbd4..2068428fb 100644 --- a/physics/gcm_shoc.meta +++ b/physics/gcm_shoc.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = shoc + type = properties + +######################################################################## [ccpp-arg-table] name = shoc_run type = scheme diff --git a/physics/get_prs_fv3.meta b/physics/get_prs_fv3.meta index f93d259e1..d1323f182 100644 --- a/physics/get_prs_fv3.meta +++ b/physics/get_prs_fv3.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = get_prs_fv3 + type = properties + +######################################################################## [ccpp-arg-table] name = get_prs_fv3_init type = scheme @@ -104,6 +109,11 @@ name = get_phi_fv3_init type = scheme +######################################################################## +[ccpp-scheme-properties] + name = get_phi_fv3 + type = properties + ######################################################################## [ccpp-arg-table] name = get_phi_fv3_run diff --git a/physics/gfdl_cloud_microphys.meta b/physics/gfdl_cloud_microphys.meta index 3d202722b..89e2e3fe4 100644 --- a/physics/gfdl_cloud_microphys.meta +++ b/physics/gfdl_cloud_microphys.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = gfdl_cloud_microphys + type = properties + +######################################################################## [ccpp-arg-table] name = gfdl_cloud_microphys_init type = scheme diff --git a/physics/gfdl_fv_sat_adj.meta b/physics/gfdl_fv_sat_adj.meta index 18b37a3c5..181fbbe09 100644 --- a/physics/gfdl_fv_sat_adj.meta +++ b/physics/gfdl_fv_sat_adj.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = fv_sat_adj + type = properties + +######################################################################## [ccpp-arg-table] name = fv_sat_adj_init type = scheme diff --git a/physics/gmtb_scm_sfc_flux_spec.meta b/physics/gmtb_scm_sfc_flux_spec.meta index 6424789bc..c480d96c9 100644 --- a/physics/gmtb_scm_sfc_flux_spec.meta +++ b/physics/gmtb_scm_sfc_flux_spec.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = gmtb_scm_sfc_flux_spec + type = properties + +######################################################################## [ccpp-arg-table] name = gmtb_scm_sfc_flux_spec_run type = scheme diff --git a/physics/gscond.meta b/physics/gscond.meta index 57156358f..2fc1c96b9 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = zhaocarr_gscond + type = properties + +######################################################################## [ccpp-arg-table] name = zhaocarr_gscond_run type = scheme diff --git a/physics/gwdc.meta b/physics/gwdc.meta index b9f0b669c..58adc665f 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = gwdc_pre + type = properties + +######################################################################## [ccpp-arg-table] name = gwdc_pre_init type = scheme @@ -168,6 +173,11 @@ name = gwdc_pre_finalize type = scheme +######################################################################## +[ccpp-scheme-properties] + name = gwdc + type = properties + ######################################################################## [ccpp-arg-table] name = gwdc_init @@ -453,6 +463,11 @@ name = gwdc_finalize type = scheme +######################################################################## +[ccpp-scheme-properties] + name = gwdc_post + type = properties + ######################################################################## [ccpp-arg-table] name = gwdc_post_init diff --git a/physics/gwdps.meta b/physics/gwdps.meta index 655c085ac..f22c9e3c4 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = gwdps + type = properties + +######################################################################## [ccpp-arg-table] name = gwdps_init type = scheme diff --git a/physics/h2ophys.meta b/physics/h2ophys.meta index 995e25436..aef950e43 100644 --- a/physics/h2ophys.meta +++ b/physics/h2ophys.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = h2ophys + type = properties + +######################################################################## [ccpp-arg-table] name = h2ophys_init type = scheme diff --git a/physics/lsm_ruc_sfc_sice_interstitial.meta b/physics/lsm_ruc_sfc_sice_interstitial.meta index bc3618703..b7690964a 100644 --- a/physics/lsm_ruc_sfc_sice_interstitial.meta +++ b/physics/lsm_ruc_sfc_sice_interstitial.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = lsm_ruc_sfc_sice_pre + type = properties + +######################################################################## [ccpp-arg-table] name = lsm_ruc_sfc_sice_pre_run type = scheme @@ -94,6 +99,11 @@ intent = out optional = F +######################################################################## +[ccpp-scheme-properties] + name = lsm_ruc_sfc_sice_post + type = properties + ######################################################################## [ccpp-arg-table] name = lsm_ruc_sfc_sice_post_run diff --git a/physics/m_micro.meta b/physics/m_micro.meta index 00b0b39f3..b11d84b63 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = m_micro + type = properties + +######################################################################## [ccpp-arg-table] name = m_micro_init type = scheme diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index 24fccdef0..762d0c6a4 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = m_micro_pre + type = properties + +######################################################################## [ccpp-arg-table] name = m_micro_pre_init type = scheme @@ -293,6 +298,11 @@ name = m_micro_pre_finalize type = scheme +######################################################################## +[ccpp-scheme-properties] + name = m_micro_post + type = properties + ######################################################################## [ccpp-arg-table] name = m_micro_post_init diff --git a/physics/machine.meta b/physics/machine.meta index d93f50e09..aba9f5ec3 100644 --- a/physics/machine.meta +++ b/physics/machine.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = machine + type = properties + +######################################################################## [ccpp-arg-table] name = machine type = module diff --git a/physics/maximum_hourly_diagnostics.meta b/physics/maximum_hourly_diagnostics.meta index 5146ce2f0..7c3e85fa4 100644 --- a/physics/maximum_hourly_diagnostics.meta +++ b/physics/maximum_hourly_diagnostics.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = maximum_hourly_diagnostics + type = properties + +######################################################################## [ccpp-arg-table] name = maximum_hourly_diagnostics_run type = scheme diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index fa1fe17c4..205ceef29 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = myjpbl_wrapper + type = properties + +######################################################################## [ccpp-arg-table] name = myjpbl_wrapper_run type = scheme diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index c26728f0f..76b8d9ec1 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = myjsfc_wrapper + type = properties + +######################################################################## [ccpp-arg-table] name = myjsfc_wrapper_run type = scheme diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 43f14ad5f..05ae2091c 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = mynnedmf_wrapper + type = properties + +######################################################################## [ccpp-arg-table] name = mynnedmf_wrapper_init type = scheme diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 655c65769..91b882178 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = mynnsfc_wrapper + type = properties + +######################################################################## [ccpp-arg-table] name = mynnsfc_wrapper_run type = scheme diff --git a/physics/module_SGSCloud_RadPost.meta b/physics/module_SGSCloud_RadPost.meta index da4191aad..3562e9fdf 100644 --- a/physics/module_SGSCloud_RadPost.meta +++ b/physics/module_SGSCloud_RadPost.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sgscloud_radpost + type = properties + +######################################################################## [ccpp-arg-table] name = sgscloud_radpost_run type = scheme diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 2658e8638..f57926a25 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sgscloud_radpre + type = properties + +######################################################################## [ccpp-arg-table] name = sgscloud_radpre_init type = scheme diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 196862ae6..4ff5826db 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = hedmf + type = properties + +######################################################################## [ccpp-arg-table] name = hedmf_init type = scheme diff --git a/physics/moninedmf_hafs.meta b/physics/moninedmf_hafs.meta index 2883e6847..a5203e802 100644 --- a/physics/moninedmf_hafs.meta +++ b/physics/moninedmf_hafs.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = hedmf_hafs + type = properties + +######################################################################## [ccpp-arg-table] name = hedmf_hafs_init type = scheme diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index e8da8478d..9ba2a4bd3 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = moninshoc + type = properties + +######################################################################## [ccpp-arg-table] name = moninshoc_run type = scheme diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index a7a33378a..aabfc5859 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = mp_fer_hires + type = properties + +######################################################################## [ccpp-arg-table] name = mp_fer_hires_init type = scheme diff --git a/physics/mp_thompson_post.meta b/physics/mp_thompson_post.meta index eeaeeb65d..479018908 100644 --- a/physics/mp_thompson_post.meta +++ b/physics/mp_thompson_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = mp_thompson_post + type = properties + +######################################################################## [ccpp-arg-table] name = mp_thompson_post_init type = scheme diff --git a/physics/mp_thompson_pre.meta b/physics/mp_thompson_pre.meta index d0b7809f0..70e2ec08e 100644 --- a/physics/mp_thompson_pre.meta +++ b/physics/mp_thompson_pre.meta @@ -1,7 +1,8 @@ [ccpp-scheme-properties] - name = mp_thompson + name = mp_thompson_pre type = properties +######################################################################## [ccpp-arg-table] name = mp_thompson_pre_run type = scheme diff --git a/physics/ozphys.meta b/physics/ozphys.meta index 4f0e6aa9d..a7cbf9512 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = ozphys + type = properties + +######################################################################## [ccpp-arg-table] name = ozphys_init type = scheme diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index bfc010358..c5fb94602 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = ozphys_2015 + type = properties + +######################################################################## [ccpp-arg-table] name = ozphys_2015_init type = scheme diff --git a/physics/phys_tend.meta b/physics/phys_tend.meta index 48c189c07..6d34d43ef 100644 --- a/physics/phys_tend.meta +++ b/physics/phys_tend.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = phys_tend + type = properties + +######################################################################## [ccpp-arg-table] name = phys_tend_run type = scheme diff --git a/physics/precpd.meta b/physics/precpd.meta index 6df3f35af..a7419d69f 100644 --- a/physics/precpd.meta +++ b/physics/precpd.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = zhaocarr_precpd + type = properties + +######################################################################## [ccpp-arg-table] name = zhaocarr_precpd_init type = scheme diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index e91fc10df..f2a050ae7 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmg_lw + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmg_lw_run type = scheme diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index c8074cf47..17179ec07 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmg_sw + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmg_sw_run type = scheme diff --git a/physics/rascnv.meta b/physics/rascnv.meta index f83699347..aef381332 100644 --- a/physics/rascnv.meta +++ b/physics/rascnv.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rascnv + type = properties + +######################################################################## [ccpp-arg-table] name = rascnv_init type = scheme diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index 554ac4139..49248e35e 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rayleigh_damp + type = properties + +######################################################################## [ccpp-arg-table] name = rayleigh_damp_init type = scheme diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 8bca0597e..9f86f1833 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmg_lw_post + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmg_lw_post_init type = scheme diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index 6b4488b26..70e1b6184 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmg_lw_pre + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmg_lw_pre_init type = scheme diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 6ed13e830..599ab19c0 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmg_sw_post + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmg_sw_post_init type = scheme diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index 6a68a8cd6..2612dc322 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmg_sw_pre + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmg_sw_pre_init type = scheme diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta index c71a2a97e..4ac39957a 100644 --- a/physics/rrtmgp_lw_aerosol_optics.meta +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_lw_aerosol_optics + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_lw_aerosol_optics_run type = scheme diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 9de19382a..e15c0ce37 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_lw_cloud_optics + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_lw_cloud_optics_init type = scheme diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 87e785a4d..264f7bc5a 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_lw_cloud_sampling + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_lw_cloud_sampling_init type = scheme diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index 36b8067dd..caccfd783 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_lw_gas_optics + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_lw_gas_optics_init type = scheme diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index f49563a49..5e3bacce3 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_lw_pre + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_lw_pre_run type = scheme diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index a8426bc15..dd2c34caa 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_lw_rte + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_lw_rte_run type = scheme diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta index bd02434b6..4dbf6275d 100644 --- a/physics/rrtmgp_sw_aerosol_optics.meta +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_sw_aerosol_optics + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_sw_aerosol_optics_run type = scheme diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index c60ae90d6..c57982be3 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_sw_cloud_optics + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_sw_cloud_optics_init type = scheme diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index c30d4934d..39619eccc 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_sw_cloud_sampling + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_sw_cloud_sampling_init type = scheme diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index fc8e72a9a..019fd4b11 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_sw_gas_optics + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_sw_gas_optics_init type = scheme diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 629ede530..83130acf8 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = rrtmgp_sw_rte + type = properties + +######################################################################## [ccpp-arg-table] name = rrtmgp_sw_rte_run type = scheme diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 9de8036d9..0f17d439b 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = samfdeepcnv + type = properties + +######################################################################## [ccpp-arg-table] name = samfdeepcnv_init type = scheme diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index 09150adb4..58e28a20b 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = samfshalcnv + type = properties + +######################################################################## [ccpp-arg-table] name = samfshalcnv_init type = scheme diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index 2e386bc43..3f543cd86 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sascnvn + type = properties + +######################################################################## [ccpp-arg-table] name = sascnvn_init type = scheme diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index c4230b950..84530f013 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = satmedmfvdif + type = properties + +######################################################################## [ccpp-arg-table] name = satmedmfvdif_init type = scheme diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index 397d71537..14b10f410 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = satmedmfvdifq + type = properties + +######################################################################## [ccpp-arg-table] name = satmedmfvdifq_init type = scheme diff --git a/physics/sfc_cice.meta b/physics/sfc_cice.meta index a1c57d4d9..d8905bccc 100644 --- a/physics/sfc_cice.meta +++ b/physics/sfc_cice.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sfc_cice + type = properties + +######################################################################## [ccpp-arg-table] name = sfc_cice_run type = scheme diff --git a/physics/sfc_diag.meta b/physics/sfc_diag.meta index 0e9699faf..a98d45600 100644 --- a/physics/sfc_diag.meta +++ b/physics/sfc_diag.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sfc_diag + type = properties + +######################################################################## [ccpp-arg-table] name = sfc_diag_run type = scheme diff --git a/physics/sfc_diag_post.meta b/physics/sfc_diag_post.meta index 6c863a6af..61be91b27 100644 --- a/physics/sfc_diag_post.meta +++ b/physics/sfc_diag_post.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sfc_diag_post + type = properties + +######################################################################## [ccpp-arg-table] name = sfc_diag_post_run type = scheme diff --git a/physics/sfc_diff.meta b/physics/sfc_diff.meta index ab99dcb06..6c1285fc5 100644 --- a/physics/sfc_diff.meta +++ b/physics/sfc_diff.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sfc_diff + type = properties + +######################################################################## [ccpp-arg-table] name = sfc_diff_run type = scheme diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index 7728ee375..03e402e99 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = lsm_noah + type = properties + +######################################################################## [ccpp-arg-table] name = lsm_noah_init type = scheme diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 4721418d3..d1355862d 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = lsm_ruc + type = properties + +######################################################################## [ccpp-arg-table] name = lsm_ruc_init type = scheme diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index 4e1c5b334..bd927d1df 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = noahmpdrv + type = properties + +######################################################################## [ccpp-arg-table] name = noahmpdrv_init type = scheme diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 4198af0eb..31fddf45a 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -1,11 +1,6 @@ -[ccpp-arg-table] - name = sfc_nst_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = sfc_nst_finalize - type = scheme +[ccpp-scheme-properties] + name = sfc_nst + type = properties ######################################################################## [ccpp-arg-table] @@ -650,14 +645,9 @@ optional = F ######################################################################## -[ccpp-arg-table] - name = sfc_nst_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = sfc_nst_finalize - type = scheme +[ccpp-scheme-properties] + name = sfc_nst_pre + type = properties ######################################################################## [ccpp-arg-table] @@ -787,14 +777,9 @@ optional = F ######################################################################## -[ccpp-arg-table] - name = sfc_nst_post_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = sfc_nst_post_finalize - type = scheme +[ccpp-scheme-properties] + name = sfc_nst_post + type = properties ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index 733e69f54..588bb4848 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sfc_ocean + type = properties + +######################################################################## [ccpp-arg-table] name = sfc_ocean_init type = scheme diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index f916d09fd..f327f0f98 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = sfc_sice + type = properties + +######################################################################## [ccpp-arg-table] name = sfc_sice_run type = scheme diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index d56e1da3b..1c5266b8e 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = shalcnv + type = properties + +######################################################################## [ccpp-arg-table] name = shalcnv_init type = scheme diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index 08646d7b9..d65727080 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = shinhongvdif + type = properties + +######################################################################## [ccpp-arg-table] name = shinhongvdif_run type = scheme diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index c040233a7..aa83b4c1f 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -1,3 +1,8 @@ +[ccpp-scheme-properties] + name = ysuvdif + type = properties + +######################################################################## [ccpp-arg-table] name = ysuvdif_run type = scheme From 1695333dc3a2b4ca3d0db7a5d285590ef172433c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 4 Aug 2020 16:05:02 -0600 Subject: [PATCH 277/404] Remove empty argument tables from all metadata files --- physics/GFS_GWD_generic.meta | 5 ----- physics/GFS_MP_generic.meta | 19 ------------------ physics/GFS_rad_time_vary.fv3.meta | 9 --------- physics/GFS_rad_time_vary.scm.meta | 9 --------- physics/GFS_rrtmg_post.meta | 9 --------- physics/GFS_rrtmg_pre.meta | 9 --------- physics/GFS_rrtmgp_pre.meta | 4 ---- physics/GFS_rrtmgp_sw_pre.meta | 4 ---- physics/cires_ugwp_post.meta | 9 --------- physics/cnvc90.meta | 9 --------- physics/cs_conv.meta | 30 ----------------------------- physics/cu_gf_driver.meta | 5 ----- physics/cu_ntiedtke.meta | 5 ----- physics/dcyc2.meta | 10 ---------- physics/drag_suite.meta | 9 --------- physics/get_prs_fv3.meta | 19 ------------------ physics/gwdc.meta | 29 ---------------------------- physics/gwdps.meta | 9 --------- physics/h2ophys.meta | 9 --------- physics/m_micro.meta | 5 ----- physics/m_micro_interstitial.meta | 19 ------------------ physics/module_SGSCloud_RadPre.meta | 10 ---------- physics/mp_fer_hires.meta | 4 ---- physics/ozphys.meta | 5 ----- physics/ozphys_2015.meta | 5 ----- physics/precpd.meta | 9 --------- physics/rayleigh_damp.meta | 9 --------- physics/rrtmg_lw_post.meta | 9 --------- physics/rrtmg_lw_pre.meta | 9 --------- physics/rrtmg_sw_post.meta | 9 --------- physics/rrtmg_sw_pre.meta | 9 --------- physics/rrtmgp_lw_cloud_optics.meta | 4 ---- physics/samfdeepcnv.meta | 10 ---------- physics/samfshalcnv.meta | 10 ---------- physics/sascnvn.meta | 5 ----- physics/sfc_ocean.meta | 10 ---------- physics/shalcnv.meta | 5 ----- 37 files changed, 357 deletions(-) diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 0b80ee934..7de421030 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -2,11 +2,6 @@ name = GFS_GWD_generic_pre type = properties -######################################################################## -[ccpp-arg-table] - name = GFS_GWD_generic_pre_init - type = scheme - ######################################################################## [ccpp-arg-table] name = GFS_GWD_generic_pre_run diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 125006cc0..c773aa216 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -2,11 +2,6 @@ name = GFS_MP_generic_pre type = properties -######################################################################## -[ccpp-arg-table] - name = GFS_MP_generic_pre_init - type = scheme - ######################################################################## [ccpp-arg-table] name = GFS_MP_generic_pre_run @@ -138,21 +133,11 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = GFS_MP_generic_pre_finalize - type = scheme - ######################################################################## [ccpp-scheme-properties] name = GFS_MP_generic_post type = properties -######################################################################## -[ccpp-arg-table] - name = GFS_MP_generic_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = GFS_MP_generic_post_run @@ -934,7 +919,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = GFS_MP_generic_post_finalize - type = scheme diff --git a/physics/GFS_rad_time_vary.fv3.meta b/physics/GFS_rad_time_vary.fv3.meta index 46c536615..ea73cb813 100644 --- a/physics/GFS_rad_time_vary.fv3.meta +++ b/physics/GFS_rad_time_vary.fv3.meta @@ -2,11 +2,6 @@ name = GFS_rad_time_vary type = properties -######################################################################## -[ccpp-arg-table] - name = GFS_rad_time_vary_init - type = scheme - ######################################################################## [ccpp-arg-table] name = GFS_rad_time_vary_run @@ -53,7 +48,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = GFS_rad_time_vary_finalize - type = scheme diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index 3a68ba163..74da3417d 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -2,11 +2,6 @@ name = GFS_rad_time_vary type = properties -######################################################################## -[ccpp-arg-table] - name = GFS_rad_time_vary_init - type = scheme - ######################################################################## [ccpp-arg-table] name = GFS_rad_time_vary_run @@ -53,7 +48,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = GFS_rad_time_vary_finalize - type = scheme diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index feb0f37c3..f72b9663b 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -2,11 +2,6 @@ name = GFS_rrtmg_post type = properties -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmg_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = GFS_rrtmg_post_run @@ -211,7 +206,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmg_post_finalize - type = scheme diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 04607f64b..98cff1199 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -2,11 +2,6 @@ name = GFS_rrtmg_pre type = properties -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmg_pre_init - type = scheme - ######################################################################## [ccpp-arg-table] name = GFS_rrtmg_pre_run @@ -586,7 +581,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmg_pre_finalize - type = scheme diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 92ac1c357..17a2cef7e 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -366,7 +366,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmgp_pre_finalize - type = scheme diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index e0da4948e..79a9c7fe8 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -193,7 +193,3 @@ type = integer intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmgp_sw_pre_finalize - type = scheme diff --git a/physics/cires_ugwp_post.meta b/physics/cires_ugwp_post.meta index 2ba9732d4..8dd695553 100644 --- a/physics/cires_ugwp_post.meta +++ b/physics/cires_ugwp_post.meta @@ -2,11 +2,6 @@ name = cires_ugwp_post type = properties -######################################################################## -[ccpp-arg-table] - name = cires_ugwp_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = cires_ugwp_post_run @@ -314,7 +309,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = cires_ugwp_post_finalize - type = scheme diff --git a/physics/cnvc90.meta b/physics/cnvc90.meta index caab909e3..d98d15b73 100644 --- a/physics/cnvc90.meta +++ b/physics/cnvc90.meta @@ -2,11 +2,6 @@ name = cnvc90 type = properties -######################################################################## -[ccpp-arg-table] - name = cnvc90_init - type = scheme - ######################################################################## [ccpp-arg-table] name = cnvc90_run @@ -142,7 +137,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = cnvc90_finalize - type = scheme diff --git a/physics/cs_conv.meta b/physics/cs_conv.meta index 9a1eba7a8..5a5f6a124 100644 --- a/physics/cs_conv.meta +++ b/physics/cs_conv.meta @@ -2,16 +2,6 @@ name = cs_conv_pre type = properties -######################################################################## -[ccpp-arg-table] - name = cs_conv_pre_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = cs_conv_pre_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = cs_conv_pre_run @@ -188,16 +178,6 @@ name = cs_conv_post type = properties -######################################################################## -[ccpp-arg-table] - name = cs_conv_post_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = cs_conv_post_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = cs_conv_post_run @@ -267,16 +247,6 @@ name = cs_conv type = properties -######################################################################## -[ccpp-arg-table] - name = cs_conv_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = cs_conv_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = cs_conv_run diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index f4ea2ea64..6ff5115c7 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -40,11 +40,6 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = cu_gf_driver_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = cu_gf_driver_run diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 17290da5f..1e5b1017b 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -40,11 +40,6 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = cu_ntiedtke_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = cu_ntiedtke_run diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 4bca64f1f..0be613381 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -2,16 +2,6 @@ name = dcyc2t3 type = properties -######################################################################## -[ccpp-arg-table] - name = dcyc2t3_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = dcyc2t3_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = dcyc2t3_run diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index 49dea9339..88088fa33 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -2,11 +2,6 @@ name = drag_suite type = properties -######################################################################## -[ccpp-arg-table] - name = drag_suite_init - type = scheme - ######################################################################## [ccpp-arg-table] name = drag_suite_run @@ -613,7 +608,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = drag_suite_finalize - type = scheme diff --git a/physics/get_prs_fv3.meta b/physics/get_prs_fv3.meta index d1323f182..0a9d1e5fd 100644 --- a/physics/get_prs_fv3.meta +++ b/physics/get_prs_fv3.meta @@ -2,11 +2,6 @@ name = get_prs_fv3 type = properties -######################################################################## -[ccpp-arg-table] - name = get_prs_fv3_init - type = scheme - ######################################################################## [ccpp-arg-table] name = get_prs_fv3_run @@ -99,16 +94,6 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = get_prs_fv3_finalize - type = scheme - -######################################################################## -[ccpp-arg-table] - name = get_phi_fv3_init - type = scheme - ######################################################################## [ccpp-scheme-properties] name = get_phi_fv3 @@ -197,7 +182,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = get_phi_fv3_finalize - type = scheme diff --git a/physics/gwdc.meta b/physics/gwdc.meta index 58adc665f..8c5be8bb1 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -2,11 +2,6 @@ name = gwdc_pre type = properties -######################################################################## -[ccpp-arg-table] - name = gwdc_pre_init - type = scheme - ######################################################################## [ccpp-arg-table] name = gwdc_pre_run @@ -168,21 +163,11 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = gwdc_pre_finalize - type = scheme - ######################################################################## [ccpp-scheme-properties] name = gwdc type = properties -######################################################################## -[ccpp-arg-table] - name = gwdc_init - type = scheme - ######################################################################## [ccpp-arg-table] name = gwdc_run @@ -458,21 +443,11 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = gwdc_finalize - type = scheme - ######################################################################## [ccpp-scheme-properties] name = gwdc_post type = properties -######################################################################## -[ccpp-arg-table] - name = gwdc_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = gwdc_post_run @@ -653,7 +628,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = gwdc_post_finalize - type = scheme diff --git a/physics/gwdps.meta b/physics/gwdps.meta index f22c9e3c4..052ed3623 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -2,11 +2,6 @@ name = gwdps type = properties -######################################################################## -[ccpp-arg-table] - name = gwdps_init - type = scheme - ######################################################################## [ccpp-arg-table] name = gwdps_run @@ -371,7 +366,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = gwdps_finalize - type = scheme diff --git a/physics/h2ophys.meta b/physics/h2ophys.meta index aef950e43..d680386a7 100644 --- a/physics/h2ophys.meta +++ b/physics/h2ophys.meta @@ -2,11 +2,6 @@ name = h2ophys type = properties -######################################################################## -[ccpp-arg-table] - name = h2ophys_init - type = scheme - ######################################################################## [ccpp-arg-table] name = h2ophys_run @@ -122,7 +117,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = h2ophys_finalize - type = scheme diff --git a/physics/m_micro.meta b/physics/m_micro.meta index b11d84b63..8ac70f39d 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -297,11 +297,6 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = m_micro_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = m_micro_run diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index 762d0c6a4..09b208448 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -2,11 +2,6 @@ name = m_micro_pre type = properties -######################################################################## -[ccpp-arg-table] - name = m_micro_pre_init - type = scheme - ######################################################################## [ccpp-arg-table] name = m_micro_pre_run @@ -293,21 +288,11 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = m_micro_pre_finalize - type = scheme - ######################################################################## [ccpp-scheme-properties] name = m_micro_post type = properties -######################################################################## -[ccpp-arg-table] - name = m_micro_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = m_micro_post_run @@ -515,7 +500,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = m_micro_post_finalize - type = scheme diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index f57926a25..5e956fc37 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -2,16 +2,6 @@ name = sgscloud_radpre type = properties -######################################################################## -[ccpp-arg-table] - name = sgscloud_radpre_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = sgscloud_radpre_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = sgscloud_radpre_run diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index aabfc5859..4e6a42d92 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -132,10 +132,6 @@ intent = out optional = F ######################################################################## -[ccpp-arg-table] - name = mp_fer_hires_finalize - type = scheme -######################################################################## [ccpp-arg-table] name = mp_fer_hires_run type = scheme diff --git a/physics/ozphys.meta b/physics/ozphys.meta index a7cbf9512..218ef4655 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -32,11 +32,6 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = ozphys_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = ozphys_run diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index c5fb94602..b90b76adc 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -32,11 +32,6 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = ozphys_2015_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = ozphys_2015_run diff --git a/physics/precpd.meta b/physics/precpd.meta index a7419d69f..921bfd1d6 100644 --- a/physics/precpd.meta +++ b/physics/precpd.meta @@ -2,11 +2,6 @@ name = zhaocarr_precpd type = properties -######################################################################## -[ccpp-arg-table] - name = zhaocarr_precpd_init - type = scheme - ######################################################################## [ccpp-arg-table] name = zhaocarr_precpd_run @@ -196,7 +191,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = zhaocarr_precpd_finalize - type = scheme diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index 49248e35e..1cce87f67 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -2,11 +2,6 @@ name = rayleigh_damp type = properties -######################################################################## -[ccpp-arg-table] - name = rayleigh_damp_init - type = scheme - ######################################################################## [ccpp-arg-table] name = rayleigh_damp_run @@ -195,7 +190,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = rayleigh_damp_finalize - type = scheme diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 9f86f1833..35c162176 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -2,11 +2,6 @@ name = rrtmg_lw_post type = properties -######################################################################## -[ccpp-arg-table] - name = rrtmg_lw_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = rrtmg_lw_post_run @@ -120,7 +115,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = rrtmg_lw_post_finalize - type = scheme diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index 70e1b6184..197eb1865 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -2,11 +2,6 @@ name = rrtmg_lw_pre type = properties -######################################################################## -[ccpp-arg-table] - name = rrtmg_lw_pre_init - type = scheme - ######################################################################## [ccpp-arg-table] name = rrtmg_lw_pre_run @@ -87,7 +82,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = rrtmg_lw_pre_finalize - type = scheme diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 599ab19c0..e31943267 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -2,11 +2,6 @@ name = rrtmg_sw_post type = properties -######################################################################## -[ccpp-arg-table] - name = rrtmg_sw_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = rrtmg_sw_post_run @@ -171,7 +166,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = rrtmg_sw_post_finalize - type = scheme diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index 2612dc322..cf4fb9769 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -2,11 +2,6 @@ name = rrtmg_sw_pre type = properties -######################################################################## -[ccpp-arg-table] - name = rrtmg_sw_pre_init - type = scheme - ######################################################################## [ccpp-arg-table] name = rrtmg_sw_pre_run @@ -148,7 +143,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = rrtmg_sw_pre_finalize - type = scheme diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index e15c0ce37..e26009ced 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -284,7 +284,3 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = rrtmgp_lw_cloud_optics_finalize - type = scheme diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 0f17d439b..5131ac211 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -2,16 +2,6 @@ name = samfdeepcnv type = properties -######################################################################## -[ccpp-arg-table] - name = samfdeepcnv_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = samfdeepcnv_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = samfdeepcnv_run diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index 58e28a20b..c7138862a 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -2,16 +2,6 @@ name = samfshalcnv type = properties -######################################################################## -[ccpp-arg-table] - name = samfshalcnv_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = samfshalcnv_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = samfshalcnv_run diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index 3f543cd86..32d37740a 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -40,11 +40,6 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = sascnvn_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = sascnvn_run diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index 588bb4848..39f59c5c0 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -2,16 +2,6 @@ name = sfc_ocean type = properties -######################################################################## -[ccpp-arg-table] - name = sfc_ocean_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = sfc_ocean_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = sfc_ocean_run diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index 1c5266b8e..1197a04ad 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -56,11 +56,6 @@ intent = out optional = F -######################################################################## -[ccpp-arg-table] - name = shalcnv_finalize - type = scheme - ######################################################################## [ccpp-arg-table] name = shalcnv_run From 17a94800053f3b3f06fc59966cb95439eba4b5f1 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 4 Aug 2020 16:08:05 -0600 Subject: [PATCH 278/404] Remove executable flag from cires_ugwp_post.F90, module_BL_MYJPBL.F90, module_SF_JSFC.F90 --- physics/cires_ugwp_post.F90 | 0 physics/module_BL_MYJPBL.F90 | 0 physics/module_SF_JSFC.F90 | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 physics/cires_ugwp_post.F90 mode change 100755 => 100644 physics/module_BL_MYJPBL.F90 mode change 100755 => 100644 physics/module_SF_JSFC.F90 diff --git a/physics/cires_ugwp_post.F90 b/physics/cires_ugwp_post.F90 old mode 100755 new mode 100644 diff --git a/physics/module_BL_MYJPBL.F90 b/physics/module_BL_MYJPBL.F90 old mode 100755 new mode 100644 diff --git a/physics/module_SF_JSFC.F90 b/physics/module_SF_JSFC.F90 old mode 100755 new mode 100644 From 7469ff4e7ba6581758c678fe65ee3d6ef1118c35 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 5 Aug 2020 14:07:54 -0600 Subject: [PATCH 279/404] Add dependencies to all metadata files --- physics/GFS_DCNV_generic.meta | 2 ++ physics/GFS_GWD_generic.meta | 2 ++ physics/GFS_MP_generic.meta | 2 ++ physics/GFS_PBL_generic.meta | 2 ++ physics/GFS_SCNV_generic.meta | 2 ++ physics/GFS_debug.meta | 4 ++++ physics/GFS_phys_time_vary.fv3.meta | 1 + physics/GFS_phys_time_vary.scm.meta | 1 + physics/GFS_rad_time_vary.fv3.meta | 1 + physics/GFS_rad_time_vary.scm.meta | 1 + physics/GFS_rrtmg_post.meta | 1 + physics/GFS_rrtmg_pre.meta | 1 + physics/GFS_rrtmg_setup.meta | 1 + physics/GFS_rrtmgp_lw_post.meta | 1 + physics/GFS_rrtmgp_pre.meta | 1 + physics/GFS_rrtmgp_setup.meta | 1 + physics/GFS_rrtmgp_sw_post.meta | 1 + physics/GFS_rrtmgp_sw_pre.meta | 1 + physics/GFS_stochastics.meta | 1 + physics/GFS_suite_interstitial.meta | 9 +++++++++ physics/GFS_surface_composites.meta | 3 +++ physics/GFS_surface_generic.meta | 2 ++ physics/GFS_surface_loop_control.meta | 2 ++ physics/GFS_time_vary_pre.fv3.meta | 1 + physics/GFS_time_vary_pre.scm.meta | 1 + physics/cires_ugwp.meta | 2 +- physics/cires_ugwp_post.meta | 1 + physics/cnvc90.meta | 1 + physics/cs_conv.meta | 3 +++ physics/cs_conv_aw_adj.meta | 1 + physics/cu_gf_driver.meta | 1 + physics/cu_gf_driver_post.meta | 1 + physics/cu_gf_driver_pre.meta | 1 + physics/cu_ntiedtke.meta | 1 + physics/cu_ntiedtke_post.meta | 1 + physics/cu_ntiedtke_pre.meta | 1 + physics/dcyc2.meta | 1 + physics/drag_suite.meta | 1 + physics/flake_driver.meta | 1 + physics/gcm_shoc.meta | 1 + physics/get_prs_fv3.meta | 2 ++ physics/gfdl_cloud_microphys.meta | 1 + physics/gfdl_fv_sat_adj.meta | 1 + physics/gmtb_scm_sfc_flux_spec.meta | 1 + physics/gscond.meta | 1 + physics/gwdc.meta | 3 +++ physics/gwdps.meta | 1 + physics/h2ophys.meta | 1 + physics/lsm_ruc_sfc_sice_interstitial.meta | 2 ++ physics/m_micro.meta | 1 + physics/m_micro_interstitial.meta | 2 ++ physics/machine.meta | 1 + physics/maximum_hourly_diagnostics.meta | 1 + physics/module_MYJPBL_wrapper.meta | 1 + physics/module_MYJSFC_wrapper.meta | 1 + physics/module_MYNNPBL_wrapper.meta | 1 + physics/module_MYNNSFC_wrapper.meta | 1 + physics/module_SGSCloud_RadPost.meta | 1 + physics/module_SGSCloud_RadPre.meta | 1 + physics/moninedmf.meta | 1 + physics/moninedmf_hafs.meta | 1 + physics/moninshoc.meta | 1 + physics/mp_fer_hires.meta | 1 + physics/mp_thompson.meta | 2 +- physics/mp_thompson_post.meta | 1 + physics/mp_thompson_pre.meta | 1 + physics/ozphys.meta | 1 + physics/ozphys_2015.meta | 1 + physics/phys_tend.meta | 1 + physics/precpd.meta | 1 + physics/radlw_main.meta | 1 + physics/radsw_main.meta | 1 + physics/rascnv.meta | 1 + physics/rayleigh_damp.meta | 1 + physics/rrtmg_lw_post.meta | 1 + physics/rrtmg_lw_pre.meta | 1 + physics/rrtmg_sw_post.meta | 1 + physics/rrtmg_sw_pre.meta | 1 + physics/rrtmgp_lw_aerosol_optics.meta | 1 + physics/rrtmgp_lw_cloud_optics.meta | 1 + physics/rrtmgp_lw_cloud_sampling.meta | 1 + physics/rrtmgp_lw_gas_optics.meta | 1 + physics/rrtmgp_lw_pre.meta | 1 + physics/rrtmgp_lw_rte.meta | 1 + physics/rrtmgp_sw_aerosol_optics.meta | 1 + physics/rrtmgp_sw_cloud_optics.meta | 1 + physics/rrtmgp_sw_cloud_sampling.meta | 1 + physics/rrtmgp_sw_gas_optics.meta | 1 + physics/rrtmgp_sw_rte.meta | 1 + physics/samfdeepcnv.meta | 1 + physics/samfshalcnv.meta | 1 + physics/sascnvn.meta | 1 + physics/satmedmfvdif.meta | 1 + physics/satmedmfvdifq.meta | 1 + physics/sfc_cice.meta | 1 + physics/sfc_diag.meta | 1 + physics/sfc_diag_post.meta | 1 + physics/sfc_diff.meta | 1 + physics/sfc_drv.meta | 1 + physics/sfc_drv_ruc.meta | 1 + physics/sfc_noahmp_drv.meta | 1 + physics/sfc_nst.meta | 3 +++ physics/sfc_ocean.meta | 1 + physics/sfc_sice.meta | 1 + physics/shalcnv.meta | 1 + physics/shinhongvdif.meta | 1 + physics/ysuvdif.meta | 1 + 107 files changed, 136 insertions(+), 2 deletions(-) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index 6d04019bc..e1156c7fe 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_DCNV_generic_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -157,6 +158,7 @@ [ccpp-scheme-properties] name = GFS_DCNV_generic_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 7de421030..763e848dc 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_GWD_generic_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -247,6 +248,7 @@ [ccpp-scheme-properties] name = GFS_GWD_generic_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index c773aa216..5f79092fb 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_MP_generic_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -137,6 +138,7 @@ [ccpp-scheme-properties] name = GFS_MP_generic_post type = properties + dependencies = calpreciptype.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index aa1bedd1c..7049e8e85 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_PBL_generic_pre type = properties + dependencies = GFS_PBL_generic.F90,machine.F ######################################################################## [ccpp-arg-table] @@ -421,6 +422,7 @@ [ccpp-scheme-properties] name = GFS_PBL_generic_post type = properties + dependencies = GFS_PBL_generic.F90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index 16e30d224..da8388ae7 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_SCNV_generic_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -140,6 +141,7 @@ [ccpp-scheme-properties] name = GFS_SCNV_generic_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_debug.meta b/physics/GFS_debug.meta index 5c0c9972a..6aca658e3 100644 --- a/physics/GFS_debug.meta +++ b/physics/GFS_debug.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_diagtoscreen type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -132,6 +133,7 @@ [ccpp-scheme-properties] name = GFS_interstitialtoscreen type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -263,6 +265,7 @@ [ccpp-scheme-properties] name = GFS_abort type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -306,6 +309,7 @@ [ccpp-scheme-properties] name = GFS_checkland type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_phys_time_vary.fv3.meta b/physics/GFS_phys_time_vary.fv3.meta index fdf8e6e3e..f9c13df40 100644 --- a/physics/GFS_phys_time_vary.fv3.meta +++ b/physics/GFS_phys_time_vary.fv3.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_phys_time_vary type = properties + dependencies = aerclm_def.F,aerinterp.F90,gcycle.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f,namelist_soilveg.f,num_parthds.F,ozinterp.f90,ozne_def.f,sfcsub.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 5087c77dd..3de1febd0 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_phys_time_vary type = properties + dependencies = aerclm_def.F,aerinterp.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f,namelist_soilveg.f,ozinterp.f90,ozne_def.f ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rad_time_vary.fv3.meta b/physics/GFS_rad_time_vary.fv3.meta index ea73cb813..18e9eed75 100644 --- a/physics/GFS_rad_time_vary.fv3.meta +++ b/physics/GFS_rad_time_vary.fv3.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rad_time_vary type = properties + dependencies = machine.F,mersenne_twister.f,physparam.f,radcons.f90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index 74da3417d..8b8a6b878 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rad_time_vary type = properties + dependencies = machine.F,mersenne_twister.f,physparam.f,radcons.f90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index f72b9663b..04febd5d7 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmg_post type = properties + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radlw_param.f,radsw_param.f ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 98cff1199..cd2e9bbb0 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmg_pre type = properties + dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radlw_param.f,radsw_param.f,surface_perturbation.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index dd078dd4d..408b41bf8 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmg_setup type = properties + dependencies = iounitdef.f,module_bfmicrophysics.f,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f,radlw_main.f,radlw_param.f,radsw_main.f,radsw_param.f ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index 15be791ab..d4fcf6547 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmgp_lw_post type = properties + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radlw_param.f,rrtmgp_aux.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_heating_rates.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 17a2cef7e..173f7c4e8 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmgp_pre type = properties + dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f,rrtmg_lw_cloud_optics.F90,rrtmgp_aux.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_constants.F90,surface_perturbation.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 876490038..412094787 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmgp_setup type = properties + dependencies = iounitdef.f,machine.F,module_bfmicrophysics.f,physparam.f,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index b01f3fc3d..9f905cca3 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmgp_sw_post type = properties + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radsw_param.f,rrtmgp_aux.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_heating_rates.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 79a9c7fe8..2851e0d80 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmgp_sw_pre type = properties + dependencies = iounitdef.f,machine.F,physparam.f,radiation_astronomy.f,radiation_surface.f,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,surface_perturbation.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index d1e7fa973..9effaabf2 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_stochastics type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 4ec6e43ff..24ed8f774 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_suite_interstitial_rad_reset type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] @@ -44,6 +45,7 @@ [ccpp-scheme-properties] name = GFS_suite_interstitial_phys_reset type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] @@ -87,6 +89,7 @@ [ccpp-scheme-properties] name = GFS_suite_interstitial_1 type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] @@ -281,6 +284,7 @@ [ccpp-scheme-properties] name = GFS_suite_interstitial_2 type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] @@ -804,6 +808,7 @@ [ccpp-scheme-properties] name = GFS_suite_stateout_reset type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] @@ -927,6 +932,7 @@ [ccpp-scheme-properties] name = GFS_suite_stateout_update type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] @@ -1095,6 +1101,7 @@ [ccpp-scheme-properties] name = GFS_suite_interstitial_3 type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] @@ -1532,6 +1539,7 @@ [ccpp-scheme-properties] name = GFS_suite_interstitial_4 type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] @@ -1851,6 +1859,7 @@ [ccpp-scheme-properties] name = GFS_suite_interstitial_5 type = properties + dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index a09d38fe6..63184dca8 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_surface_composites_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -646,6 +647,7 @@ [ccpp-scheme-properties] name = GFS_surface_composites_inter type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -795,6 +797,7 @@ [ccpp-scheme-properties] name = GFS_surface_composites_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index 3cd011f97..d1d9143b5 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_surface_generic_pre type = properties + dependencies = machine.F,surface_perturbation.F90 ######################################################################## [ccpp-arg-table] @@ -508,6 +509,7 @@ [ccpp-scheme-properties] name = GFS_surface_generic_post type = properties + dependencies = machine.F,surface_perturbation.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_surface_loop_control.meta b/physics/GFS_surface_loop_control.meta index 52fa7616e..16af00db3 100644 --- a/physics/GFS_surface_loop_control.meta +++ b/physics/GFS_surface_loop_control.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_surface_loop_control_part1 type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -61,6 +62,7 @@ [ccpp-scheme-properties] name = GFS_surface_loop_control_part2 type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index 0f92e7dae..d38922c6d 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_time_vary_pre type = properties + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_time_vary_pre.scm.meta b/physics/GFS_time_vary_pre.scm.meta index 2c50b215e..6b84da68c 100644 --- a/physics/GFS_time_vary_pre.scm.meta +++ b/physics/GFS_time_vary_pre.scm.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = GFS_time_vary_pre type = properties + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 03c8b9f32..377620c6a 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -2,7 +2,7 @@ name = cires_ugwp type = properties # DH* 20200804 - this is a result of the nasty hack to call gwdps from within ugwp! - dependencies = gwdps.f + dependencies = cires_ugwp_triggers.F90,cires_ugwp_initialize.F90,cires_ugwp_solvers.F90,cires_ugwp_utils.F90,cires_orowam2017.f,cires_vert_lsatdis.F90,cires_vert_orodis.F90,cires_vert_wmsdis.F90,cires_ugwp_module.F90,gwdps.f,machine.F,ugwp_driver_v0.F ######################################################################## [ccpp-arg-table] diff --git a/physics/cires_ugwp_post.meta b/physics/cires_ugwp_post.meta index 8dd695553..0791d6d9f 100644 --- a/physics/cires_ugwp_post.meta +++ b/physics/cires_ugwp_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cires_ugwp_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/cnvc90.meta b/physics/cnvc90.meta index d98d15b73..71ba19c35 100644 --- a/physics/cnvc90.meta +++ b/physics/cnvc90.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cnvc90 type = properties + dependencies = ######################################################################## [ccpp-arg-table] diff --git a/physics/cs_conv.meta b/physics/cs_conv.meta index 5a5f6a124..28fd28fd2 100644 --- a/physics/cs_conv.meta +++ b/physics/cs_conv.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cs_conv_pre type = properties + dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] @@ -177,6 +178,7 @@ [ccpp-scheme-properties] name = cs_conv_post type = properties + dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] @@ -246,6 +248,7 @@ [ccpp-scheme-properties] name = cs_conv type = properties + dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/cs_conv_aw_adj.meta b/physics/cs_conv_aw_adj.meta index 29053478c..15142e121 100644 --- a/physics/cs_conv_aw_adj.meta +++ b/physics/cs_conv_aw_adj.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cs_conv_aw_adj type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index 6ff5115c7..2f0c999cd 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cu_gf_driver type = properties + dependencies = cu_gf_deep.F90,cu_gf_sh.F90,machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/cu_gf_driver_post.meta b/physics/cu_gf_driver_post.meta index 60faa7a54..8e85ab3a2 100644 --- a/physics/cu_gf_driver_post.meta +++ b/physics/cu_gf_driver_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cu_gf_driver_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/cu_gf_driver_pre.meta b/physics/cu_gf_driver_pre.meta index 10995be4b..fa23bf960 100644 --- a/physics/cu_gf_driver_pre.meta +++ b/physics/cu_gf_driver_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cu_gf_driver_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 1e5b1017b..331abfc14 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cu_ntiedtke type = properties + dependencies = machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/cu_ntiedtke_post.meta b/physics/cu_ntiedtke_post.meta index 241adefce..491febaeb 100644 --- a/physics/cu_ntiedtke_post.meta +++ b/physics/cu_ntiedtke_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cu_ntiedtke_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/cu_ntiedtke_pre.meta b/physics/cu_ntiedtke_pre.meta index ef154c218..b5892ce10 100644 --- a/physics/cu_ntiedtke_pre.meta +++ b/physics/cu_ntiedtke_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = cu_ntiedtke_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 0be613381..e2264a2ff 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = dcyc2t3 type = properties + dependencies = machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index 88088fa33..d57f334f9 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = drag_suite type = properties + dependencies = ######################################################################## [ccpp-arg-table] diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index 353d174c3..037e5b463 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = flake_driver type = properties + dependencies = flake.F90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/gcm_shoc.meta b/physics/gcm_shoc.meta index 2068428fb..a53687eb7 100644 --- a/physics/gcm_shoc.meta +++ b/physics/gcm_shoc.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = shoc type = properties + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/get_prs_fv3.meta b/physics/get_prs_fv3.meta index 0a9d1e5fd..2da5bbe11 100644 --- a/physics/get_prs_fv3.meta +++ b/physics/get_prs_fv3.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = get_prs_fv3 type = properties + dependencies = machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] @@ -98,6 +99,7 @@ [ccpp-scheme-properties] name = get_phi_fv3 type = properties + dependencies = machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/gfdl_cloud_microphys.meta b/physics/gfdl_cloud_microphys.meta index 89e2e3fe4..ef226dbbd 100644 --- a/physics/gfdl_cloud_microphys.meta +++ b/physics/gfdl_cloud_microphys.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = gfdl_cloud_microphys type = properties + dependencies = machine.F,module_mp_radar.F90,module_gfdl_cloud_microphys.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/gfdl_fv_sat_adj.meta b/physics/gfdl_fv_sat_adj.meta index 181fbbe09..7369c34d3 100644 --- a/physics/gfdl_fv_sat_adj.meta +++ b/physics/gfdl_fv_sat_adj.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = fv_sat_adj type = properties + dependencies = machine.F,module_gfdl_cloud_microphys.F90,module_mp_radar.F90,multi_gases.F90,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/gmtb_scm_sfc_flux_spec.meta b/physics/gmtb_scm_sfc_flux_spec.meta index c480d96c9..e73deada0 100644 --- a/physics/gmtb_scm_sfc_flux_spec.meta +++ b/physics/gmtb_scm_sfc_flux_spec.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = gmtb_scm_sfc_flux_spec type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/gscond.meta b/physics/gscond.meta index 2fc1c96b9..f8c524268 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = zhaocarr_gscond type = properties + dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/gwdc.meta b/physics/gwdc.meta index 8c5be8bb1..e0310b4ee 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = gwdc_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -167,6 +168,7 @@ [ccpp-scheme-properties] name = gwdc type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -447,6 +449,7 @@ [ccpp-scheme-properties] name = gwdc_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/gwdps.meta b/physics/gwdps.meta index 052ed3623..024c6781d 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = gwdps type = properties + dependencies = ######################################################################## [ccpp-arg-table] diff --git a/physics/h2ophys.meta b/physics/h2ophys.meta index d680386a7..40ed95848 100644 --- a/physics/h2ophys.meta +++ b/physics/h2ophys.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = h2ophys type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/lsm_ruc_sfc_sice_interstitial.meta b/physics/lsm_ruc_sfc_sice_interstitial.meta index b7690964a..dc06c1a72 100644 --- a/physics/lsm_ruc_sfc_sice_interstitial.meta +++ b/physics/lsm_ruc_sfc_sice_interstitial.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = lsm_ruc_sfc_sice_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -103,6 +104,7 @@ [ccpp-scheme-properties] name = lsm_ruc_sfc_sice_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/m_micro.meta b/physics/m_micro.meta index 8ac70f39d..80dcc4195 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = m_micro type = properties + dependencies = aer_cloud.F,aerclm_def.F,cldmacro.F,cldwat2m_micro.F,machine.F,micro_mg_utils.F90,micro_mg2_0.F90,micro_mg3_0.F90,physcons.F90,wv_saturation.F ######################################################################## [ccpp-arg-table] diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index 09b208448..591dcdc4c 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = m_micro_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] @@ -292,6 +293,7 @@ [ccpp-scheme-properties] name = m_micro_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/machine.meta b/physics/machine.meta index aba9f5ec3..92d09e629 100644 --- a/physics/machine.meta +++ b/physics/machine.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = machine type = properties + dependencies = ######################################################################## [ccpp-arg-table] diff --git a/physics/maximum_hourly_diagnostics.meta b/physics/maximum_hourly_diagnostics.meta index 7c3e85fa4..00a0bbd34 100644 --- a/physics/maximum_hourly_diagnostics.meta +++ b/physics/maximum_hourly_diagnostics.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = maximum_hourly_diagnostics type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index 205ceef29..c396bc991 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = myjpbl_wrapper type = properties + dependencies = module_BL_MYJPBL.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index 76b8d9ec1..aab6a66e4 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = myjsfc_wrapper type = properties + dependencies = module_SF_JSFC.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 05ae2091c..2ce69b270 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = mynnedmf_wrapper type = properties + dependencies = machine.F,module_bl_mynn.F90,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 91b882178..9b62aae52 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = mynnsfc_wrapper type = properties + dependencies = machine.F,module_sf_mynn.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/module_SGSCloud_RadPost.meta b/physics/module_SGSCloud_RadPost.meta index 3562e9fdf..0f4041f10 100644 --- a/physics/module_SGSCloud_RadPost.meta +++ b/physics/module_SGSCloud_RadPost.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sgscloud_radpost type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 5e956fc37..87e77657f 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sgscloud_radpre type = properties + dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,physcons.F90,radcons.f90,radiation_clouds.f ######################################################################## [ccpp-arg-table] diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 4ff5826db..5a41ee2d0 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = hedmf type = properties + dependencies = funcphys.f90,machine.F,mfpbl.f,physcons.F90,tridi.f ######################################################################## [ccpp-arg-table] diff --git a/physics/moninedmf_hafs.meta b/physics/moninedmf_hafs.meta index a5203e802..26a4e4409 100644 --- a/physics/moninedmf_hafs.meta +++ b/physics/moninedmf_hafs.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = hedmf_hafs type = properties + dependencies = funcphys.f90,machine.F,mfpbl.f,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index 9ba2a4bd3..3b7a50ad5 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = moninshoc type = properties + dependencies = funcphys.f90,machine.F,tridi.f ######################################################################## [ccpp-arg-table] diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index 4e6a42d92..3c085600b 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = mp_fer_hires type = properties + dependencies = machine.F,module_MP_FER_HIRES.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 5e502441f..a4f369682 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -1,7 +1,7 @@ [ccpp-scheme-properties] name = mp_thompson type = properties - dependencies = module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90 + dependencies = machine.F,module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/mp_thompson_post.meta b/physics/mp_thompson_post.meta index 479018908..9f6d3e3b6 100644 --- a/physics/mp_thompson_post.meta +++ b/physics/mp_thompson_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = mp_thompson_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/mp_thompson_pre.meta b/physics/mp_thompson_pre.meta index 70e2ec08e..f14340a03 100644 --- a/physics/mp_thompson_pre.meta +++ b/physics/mp_thompson_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = mp_thompson_pre type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/ozphys.meta b/physics/ozphys.meta index 218ef4655..f9c29bd11 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = ozphys type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index b90b76adc..1c2cf364f 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = ozphys_2015 type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/phys_tend.meta b/physics/phys_tend.meta index 6d34d43ef..5362137a5 100644 --- a/physics/phys_tend.meta +++ b/physics/phys_tend.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = phys_tend type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/precpd.meta b/physics/precpd.meta index 921bfd1d6..1435ead20 100644 --- a/physics/precpd.meta +++ b/physics/precpd.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = zhaocarr_precpd type = properties + dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index f2a050ae7..00e390cb9 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmg_lw type = properties + dependencies = mersenne_twister.f,physcons.F90,physparam.f,radlw_datatb.f,radlw_param.f ######################################################################## [ccpp-arg-table] diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 17179ec07..679d3b8ca 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmg_sw type = properties + dependencies = mersenne_twister.f,physcons.F90,physparam.f,radsw_datatb.f,radsw_param.f ######################################################################## [ccpp-arg-table] diff --git a/physics/rascnv.meta b/physics/rascnv.meta index aef381332..d92a6aadd 100644 --- a/physics/rascnv.meta +++ b/physics/rascnv.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rascnv type = properties + dependencies = ######################################################################## [ccpp-arg-table] diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index 1cce87f67..d502e5bd1 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rayleigh_damp type = properties + dependencies = ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 35c162176..2b3c157a5 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmg_lw_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index 197eb1865..2d6aa294f 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmg_lw_pre type = properties + dependencies = iounitdef.f,machine.F,radiation_surface.f ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index e31943267..3ed4600fd 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmg_sw_post type = properties + dependencies = machine.F,radsw_param.f ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index cf4fb9769..55b365334 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmg_sw_pre type = properties + dependencies = iounitdef.f,machine.F,radiation_surface.f ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta index 4ac39957a..5093d66cc 100644 --- a/physics/rrtmgp_lw_aerosol_optics.meta +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_lw_aerosol_optics type = properties + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,rrtmgp_aux.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index e26009ced..147cd7916 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_lw_cloud_optics type = properties + dependencies = machine.F,rrtmg_lw_cloud_optics.F90,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 264f7bc5a..1868c408d 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_lw_cloud_sampling type = properties + dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index caccfd783..dddb93c4c 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_lw_gas_optics type = properties + dependencies = machine.F,rrtmgp_aux.F90,rte-rrtmgp/extensions/mo_compute_bc.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90,rte-rrtmgp/rte/mo_source_functions.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 5e3bacce3..c8f7adc76 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_lw_pre type = properties + dependencies = iounitdef.f,machine.F,physparam.f,radiation_surface.f,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index dd2c34caa..d7488ca4c 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_lw_rte type = properties + dependencies = machine.F,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90,rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_source_functions.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta index 4dbf6275d..a87c9a756 100644 --- a/physics/rrtmgp_sw_aerosol_optics.meta +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_sw_aerosol_optics type = properties + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,rrtmgp_aux.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index c57982be3..b9343a532 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_sw_cloud_optics type = properties + dependencies = machine.F,physparam.f,rrtmg_sw_cloud_optics.F90,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 39619eccc..158cf7c07 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_sw_cloud_sampling type = properties + dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index 019fd4b11..d2196736e 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_sw_gas_optics type = properties + dependencies = iounitdef.f,machine.F,radiation_gases.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/mo_compute_bc.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 83130acf8..e03e6be40 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = rrtmgp_sw_rte type = properties + dependencies = machine.F,radsw_param.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90,rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rte-rrtmgp/rte/mo_rte_sw.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 5131ac211..f852a5002 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = samfdeepcnv type = properties + dependencies = funcphys.f90,machine.F,samfaerosols.F ######################################################################## [ccpp-arg-table] diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index c7138862a..eb41f0ed5 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = samfshalcnv type = properties + dependencies = funcphys.f90,machine.F,samfaerosols.F ######################################################################## [ccpp-arg-table] diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index 32d37740a..2d1a21233 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sascnvn type = properties + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index 84530f013..97f146867 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = satmedmfvdif type = properties + dependencies = funcphys.f90,machine.F,mfpblt.f,mfscu.f,tridi.f ######################################################################## [ccpp-arg-table] diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index 14b10f410..a92f99a22 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = satmedmfvdifq type = properties + dependencies = funcphys.f90,machine.F,mfpbltq.f,mfscuq.f,tridi.f ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_cice.meta b/physics/sfc_cice.meta index d8905bccc..5bce871cc 100644 --- a/physics/sfc_cice.meta +++ b/physics/sfc_cice.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sfc_cice type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_diag.meta b/physics/sfc_diag.meta index a98d45600..cf77201d7 100644 --- a/physics/sfc_diag.meta +++ b/physics/sfc_diag.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sfc_diag type = properties + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_diag_post.meta b/physics/sfc_diag_post.meta index 61be91b27..84c552f8a 100644 --- a/physics/sfc_diag_post.meta +++ b/physics/sfc_diag_post.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sfc_diag_post type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_diff.meta b/physics/sfc_diff.meta index 6c1285fc5..9ff0baaa7 100644 --- a/physics/sfc_diff.meta +++ b/physics/sfc_diff.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sfc_diff type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index 03e402e99..8801ff233 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = lsm_noah type = properties + dependencies = funcphys.f90,machine.F,set_soilveg.f,sflx.f,surface_perturbation.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index d1355862d..09f372c99 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = lsm_ruc type = properties + dependencies = machine.F,module_sf_ruclsm.F90,module_soil_pre.F90,namelist_soilveg_ruc.F90,set_soilveg_ruc.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index bd927d1df..e8787ede8 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = noahmpdrv type = properties + dependencies = funcphys.f90,machine.F,module_sf_noahmp_glacier.f90,module_sf_noahmplsm.f90,noahmp_tables.f90,set_soilveg.f ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 31fddf45a..09d2828a7 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sfc_nst type = properties + dependencies = date_def.f,funcphys.f90,machine.F,module_nst_model.f90,module_nst_parameters.f90,module_nst_water_prop.f90 ######################################################################## [ccpp-arg-table] @@ -648,6 +649,7 @@ [ccpp-scheme-properties] name = sfc_nst_pre type = properties + dependencies = date_def.f,funcphys.f90,machine.F,module_nst_model.f90,module_nst_parameters.f90,module_nst_water_prop.f90 ######################################################################## [ccpp-arg-table] @@ -780,6 +782,7 @@ [ccpp-scheme-properties] name = sfc_nst_post type = properties + dependencies = date_def.f,funcphys.f90,machine.F,module_nst_model.f90,module_nst_parameters.f90,module_nst_water_prop.f90 ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index 39f59c5c0..6e7174d89 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sfc_ocean type = properties + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index f327f0f98..ee17a4fc7 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = sfc_sice type = properties + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index 1197a04ad..15465a583 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = shalcnv type = properties + dependencies = funcphys.f90,machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index d65727080..aff7962a0 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = shinhongvdif type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index aa83b4c1f..d0092569f 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -1,6 +1,7 @@ [ccpp-scheme-properties] name = ysuvdif type = properties + dependencies = machine.F ######################################################################## [ccpp-arg-table] From b14f2d69113d46a84c67d0804c1ca68d9a8f702c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 5 Aug 2020 15:14:51 -0600 Subject: [PATCH 280/404] physics/mp_thompson.meta: add missing dependency on module_mp_radar.F90 --- physics/mp_thompson.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index a4f369682..01f38fa6a 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -1,7 +1,7 @@ [ccpp-scheme-properties] name = mp_thompson type = properties - dependencies = machine.F,module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90 + dependencies = machine.F,module_mp_radar.F90,module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90 ######################################################################## [ccpp-arg-table] From ba80a78582e37b4783c0358834c2fddeabc1d208 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 6 Aug 2020 07:38:46 -0600 Subject: [PATCH 281/404] physics/GFS_rrtmg_pre.meta: add missing dependency on module_mp_radar.F90 --- physics/GFS_rrtmg_pre.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index cd2e9bbb0..5afbdfe30 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -1,7 +1,7 @@ [ccpp-scheme-properties] name = GFS_rrtmg_pre type = properties - dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radlw_param.f,radsw_param.f,surface_perturbation.F90 + dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,module_mp_radar.F90,module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radlw_param.f,radsw_param.f,surface_perturbation.F90 ######################################################################## [ccpp-arg-table] From 4afa3027d3100ad7c26e5f6d9a1d6fe64f86d88c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 6 Aug 2020 07:39:20 -0600 Subject: [PATCH 282/404] CMakeLists.txt: check if file is in list of schemes before applying special optimization flags --- CMakeLists.txt | 55 +++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e0175d0c..06ca63d0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,11 @@ if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) endif(POLICY CMP0042) +# CMP0057: Support new IN_LIST if() operator +if(POLICY CMP0057) + cmake_policy(SET CMP0057 NEW) +endif(POLICY CMP0057) + #------------------------------------------------------------------------------ set(PACKAGE "ccpp-physics") set(AUTHORS "Grant Firl" "Dom Heinzeller" "Man Zhang" "Laurie Carson") @@ -131,6 +136,7 @@ if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") # Set 32-bit floating point precision flags for certain files # that are executed in the dynamics (fast physics part) if (DYN32) + if (${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 IN_LIST SCHEMES) # Reduce floating point precision from 64-bit to 32-bit, if necessary set(CMAKE_Fortran_FLAGS_PREC32 ${CMAKE_Fortran_FLAGS_DEFAULT_PREC}) string(REPLACE "-fdefault-real-8" "" @@ -141,7 +147,8 @@ if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU") APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PREC32} ") # Add all of the above files to the list of schemes with special floating point precision flags list(APPEND SCHEMES_SFX_PREC ${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90) - endif (DYN32) + endif() + endif() # Remove files with special floating point precision flags from list # of files with standard floating point precision flags flags @@ -179,26 +186,30 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90 PROPERTIES COMPILE_FLAGS "-r8 -ftz") - # Reduce optimization for module_sf_mynn.F90 (to avoid an apparent compiler bug with Intel 18 on Hera) - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 - PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_OPT} -O1") - list(APPEND SCHEMES_SFX_OPT ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90) + if (${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 IN_LIST SCHEMES) + # Reduce optimization for module_sf_mynn.F90 (to avoid an apparent compiler bug with Intel 18 on Hera) + SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90 + PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_OPT} -O1") + list(APPEND SCHEMES_SFX_OPT ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90) + endif() - # Replace -xHost or -xCORE-AVX2 with -xCORE-AVX-I for certain files - set(CMAKE_Fortran_FLAGS_LOPT1 ${CMAKE_Fortran_FLAGS_OPT}) - string(REPLACE "-xHOST" "-xCORE-AVX-I" - CMAKE_Fortran_FLAGS_LOPT1 - "${CMAKE_Fortran_FLAGS_LOPT1}") - string(REPLACE "-xCORE-AVX2" "-xCORE-AVX-I" - CMAKE_Fortran_FLAGS_LOPT1 - "${CMAKE_Fortran_FLAGS_LOPT1}") - string(REPLACE "-axSSE4.2,AVX,CORE-AVX2,CORE-AVX512" "-axSSE4.2,AVX,CORE-AVX-I" - CMAKE_Fortran_FLAGS_LOPT1 - "${CMAKE_Fortran_FLAGS_LOPT1}") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f - PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_LOPT1}") - # Add all of the above files to the list of schemes with special compiler flags - list(APPEND SCHEMES_SFX_OPT ${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f) + if (${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f IN_LIST SCHEMES) + # Replace -xHost or -xCORE-AVX2 with -xCORE-AVX-I for certain files + set(CMAKE_Fortran_FLAGS_LOPT1 ${CMAKE_Fortran_FLAGS_OPT}) + string(REPLACE "-xHOST" "-xCORE-AVX-I" + CMAKE_Fortran_FLAGS_LOPT1 + "${CMAKE_Fortran_FLAGS_LOPT1}") + string(REPLACE "-xCORE-AVX2" "-xCORE-AVX-I" + CMAKE_Fortran_FLAGS_LOPT1 + "${CMAKE_Fortran_FLAGS_LOPT1}") + string(REPLACE "-axSSE4.2,AVX,CORE-AVX2,CORE-AVX512" "-axSSE4.2,AVX,CORE-AVX-I" + CMAKE_Fortran_FLAGS_LOPT1 + "${CMAKE_Fortran_FLAGS_LOPT1}") + SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f + PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_LOPT1}") + # Add all of the above files to the list of schemes with special compiler flags + list(APPEND SCHEMES_SFX_OPT ${CMAKE_CURRENT_SOURCE_DIR}/physics/radiation_aerosols.f) + endif() # Remove files with special compiler flags from list of files with standard compiler flags list(REMOVE_ITEM SCHEMES ${SCHEMES_SFX_OPT}) @@ -209,6 +220,7 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") # Set 32-bit floating point precision flags for certain files # that are executed in the dynamics (fast physics part) if (DYN32) + if (${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90 IN_LIST SCHEMES) # Reduce floating point precision from 64-bit to 32-bit, if necessary set(CMAKE_Fortran_FLAGS_PREC32 ${CMAKE_Fortran_FLAGS_DEFAULT_PREC}) string(REPLACE "-real-size 64" "-real-size 32" @@ -217,7 +229,8 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") APPEND_STRING PROPERTY COMPILE_FLAGS " ${CMAKE_Fortran_FLAGS_PREC32} ") # Add all of the above files to the list of schemes with special floating point precision flags list(APPEND SCHEMES_SFX_PREC ${CMAKE_CURRENT_SOURCE_DIR}/physics/gfdl_fv_sat_adj.F90) - endif (DYN32) + endif() + endif() # Remove files with special floating point precision flags from list # of files with standard floating point precision flags flags From fc0144dca99e6ba3571d43084b97753c5e0f63c1 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Thu, 6 Aug 2020 19:44:35 +0000 Subject: [PATCH 283/404] Added missing optional info, per Laurie Carson's request --- physics/GFS_surface_generic.meta | 2 ++ 1 file changed, 2 insertions(+) diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index e8f09274a..7ab6c0000 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -275,6 +275,7 @@ dimensions = (number_of_land_surface_variables_perturbed) type = real kind = kind_phys + optional = F [lndp_var_list] standard_name = variables_to_be_perturbed_for_landperts long_name = variables to be perturbed for landperts @@ -282,6 +283,7 @@ dimensions = (number_of_land_surface_variables_perturbed) type = character kind = len=3 + optional = F [z01d] standard_name = perturbation_of_momentum_roughness_length long_name = perturbation of momentum roughness length From d793511bfffa8d37b7d095d411c0ab80354389d6 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 7 Aug 2020 12:16:56 -0600 Subject: [PATCH 284/404] Add/update ccpp-table-properties section and complete dependencies --- physics/GFS_DCNV_generic.meta | 8 ++--- physics/GFS_GWD_generic.meta | 8 ++--- physics/GFS_MP_generic.meta | 8 ++--- physics/GFS_PBL_generic.meta | 8 ++--- physics/GFS_SCNV_generic.meta | 8 ++--- physics/GFS_debug.meta | 16 +++++----- physics/GFS_phys_time_vary.fv3.meta | 4 +-- physics/GFS_phys_time_vary.scm.meta | 4 +-- physics/GFS_rad_time_vary.fv3.meta | 4 +-- physics/GFS_rad_time_vary.scm.meta | 4 +-- physics/GFS_rrtmg_post.meta | 4 +-- physics/GFS_rrtmg_pre.meta | 4 +-- physics/GFS_rrtmg_setup.meta | 4 +-- physics/GFS_rrtmgp_lw_post.meta | 6 ++-- physics/GFS_rrtmgp_pre.meta | 7 +++-- physics/GFS_rrtmgp_setup.meta | 4 +-- physics/GFS_rrtmgp_sw_post.meta | 7 +++-- physics/GFS_rrtmgp_sw_pre.meta | 6 ++-- physics/GFS_stochastics.meta | 4 +-- physics/GFS_suite_interstitial.meta | 36 +++++++++++----------- physics/GFS_surface_composites.meta | 12 ++++---- physics/GFS_surface_generic.meta | 8 ++--- physics/GFS_surface_loop_control.meta | 8 ++--- physics/GFS_time_vary_pre.fv3.meta | 4 +-- physics/GFS_time_vary_pre.scm.meta | 4 +-- physics/cires_ugwp.meta | 4 +-- physics/cires_ugwp_post.meta | 4 +-- physics/cnvc90.meta | 4 +-- physics/cs_conv.meta | 12 ++++---- physics/cs_conv_aw_adj.meta | 4 +-- physics/cu_gf_driver.meta | 4 +-- physics/cu_gf_driver_post.meta | 4 +-- physics/cu_gf_driver_pre.meta | 4 +-- physics/cu_ntiedtke.meta | 4 +-- physics/cu_ntiedtke_post.meta | 4 +-- physics/cu_ntiedtke_pre.meta | 4 +-- physics/dcyc2.meta | 4 +-- physics/drag_suite.meta | 4 +-- physics/flake_driver.meta | 4 +-- physics/gcm_shoc.meta | 4 +-- physics/get_prs_fv3.meta | 8 ++--- physics/gfdl_cloud_microphys.meta | 4 +-- physics/gfdl_fv_sat_adj.meta | 4 +-- physics/gmtb_scm_sfc_flux_spec.meta | 4 +-- physics/gscond.meta | 4 +-- physics/gwdc.meta | 12 ++++---- physics/gwdps.meta | 4 +-- physics/h2ophys.meta | 4 +-- physics/lsm_ruc_sfc_sice_interstitial.meta | 8 ++--- physics/m_micro.meta | 4 +-- physics/m_micro_interstitial.meta | 8 ++--- physics/machine.meta | 4 +-- physics/maximum_hourly_diagnostics.meta | 4 +-- physics/module_MYJPBL_wrapper.meta | 4 +-- physics/module_MYJSFC_wrapper.meta | 4 +-- physics/module_MYNNPBL_wrapper.meta | 4 +-- physics/module_MYNNSFC_wrapper.meta | 4 +-- physics/module_SGSCloud_RadPost.meta | 4 +-- physics/module_SGSCloud_RadPre.meta | 4 +-- physics/moninedmf.meta | 4 +-- physics/moninedmf_hafs.meta | 4 +-- physics/moninshoc.meta | 4 +-- physics/mp_fer_hires.meta | 4 +-- physics/mp_thompson.meta | 4 +-- physics/mp_thompson_post.meta | 4 +-- physics/mp_thompson_pre.meta | 4 +-- physics/ozphys.meta | 4 +-- physics/ozphys_2015.meta | 4 +-- physics/phys_tend.meta | 4 +-- physics/precpd.meta | 4 +-- physics/radlw_main.meta | 4 +-- physics/radlw_param.meta | 15 +++++++++ physics/radsw_main.meta | 4 +-- physics/radsw_param.meta | 20 ++++++++++++ physics/rascnv.meta | 4 +-- physics/rayleigh_damp.meta | 4 +-- physics/rrtmg_lw_post.meta | 4 +-- physics/rrtmg_lw_pre.meta | 4 +-- physics/rrtmg_sw_post.meta | 4 +-- physics/rrtmg_sw_pre.meta | 4 +-- physics/rrtmgp_lw_aerosol_optics.meta | 6 ++-- physics/rrtmgp_lw_cloud_optics.meta | 6 ++-- physics/rrtmgp_lw_cloud_sampling.meta | 6 ++-- physics/rrtmgp_lw_gas_optics.meta | 7 +++-- physics/rrtmgp_lw_pre.meta | 6 ++-- physics/rrtmgp_lw_rte.meta | 7 +++-- physics/rrtmgp_sw_aerosol_optics.meta | 6 ++-- physics/rrtmgp_sw_cloud_optics.meta | 6 ++-- physics/rrtmgp_sw_cloud_sampling.meta | 6 ++-- physics/rrtmgp_sw_gas_optics.meta | 7 +++-- physics/rrtmgp_sw_rte.meta | 7 +++-- physics/samfdeepcnv.meta | 4 +-- physics/samfshalcnv.meta | 4 +-- physics/sascnvn.meta | 4 +-- physics/satmedmfvdif.meta | 4 +-- physics/satmedmfvdifq.meta | 4 +-- physics/sfc_cice.meta | 4 +-- physics/sfc_diag.meta | 4 +-- physics/sfc_diag_post.meta | 4 +-- physics/sfc_diff.meta | 4 +-- physics/sfc_drv.meta | 4 +-- physics/sfc_drv_ruc.meta | 4 +-- physics/sfc_noahmp_drv.meta | 4 +-- physics/sfc_nst.meta | 12 ++++---- physics/sfc_ocean.meta | 4 +-- physics/sfc_sice.meta | 4 +-- physics/shalcnv.meta | 4 +-- physics/shinhongvdif.meta | 4 +-- physics/ysuvdif.meta | 4 +-- 109 files changed, 328 insertions(+), 287 deletions(-) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index e1156c7fe..507643661 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_DCNV_generic_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -155,9 +155,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_DCNV_generic_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index 763e848dc..ed7cd9629 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_GWD_generic_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -245,9 +245,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_GWD_generic_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 5f79092fb..320727eef 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_MP_generic_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -135,9 +135,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_MP_generic_post - type = properties + type = scheme dependencies = calpreciptype.f90,machine.F ######################################################################## diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 7049e8e85..972af4859 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_PBL_generic_pre - type = properties + type = scheme dependencies = GFS_PBL_generic.F90,machine.F ######################################################################## @@ -419,9 +419,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_PBL_generic_post - type = properties + type = scheme dependencies = GFS_PBL_generic.F90,machine.F ######################################################################## diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index da8388ae7..47fd151af 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_SCNV_generic_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -138,9 +138,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_SCNV_generic_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/GFS_debug.meta b/physics/GFS_debug.meta index 6aca658e3..d93e22328 100644 --- a/physics/GFS_debug.meta +++ b/physics/GFS_debug.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_diagtoscreen - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -130,9 +130,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_interstitialtoscreen - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -262,9 +262,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_abort - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -306,9 +306,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_checkland - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/GFS_phys_time_vary.fv3.meta b/physics/GFS_phys_time_vary.fv3.meta index f9c13df40..bcd4112c2 100644 --- a/physics/GFS_phys_time_vary.fv3.meta +++ b/physics/GFS_phys_time_vary.fv3.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_phys_time_vary - type = properties + type = scheme dependencies = aerclm_def.F,aerinterp.F90,gcycle.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f,namelist_soilveg.f,num_parthds.F,ozinterp.f90,ozne_def.f,sfcsub.F ######################################################################## diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 3de1febd0..556aa80c7 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_phys_time_vary - type = properties + type = scheme dependencies = aerclm_def.F,aerinterp.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f,namelist_soilveg.f,ozinterp.f90,ozne_def.f ######################################################################## diff --git a/physics/GFS_rad_time_vary.fv3.meta b/physics/GFS_rad_time_vary.fv3.meta index 18e9eed75..8ac28be30 100644 --- a/physics/GFS_rad_time_vary.fv3.meta +++ b/physics/GFS_rad_time_vary.fv3.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rad_time_vary - type = properties + type = scheme dependencies = machine.F,mersenne_twister.f,physparam.f,radcons.f90 ######################################################################## diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index 8b8a6b878..b78be178a 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rad_time_vary - type = properties + type = scheme dependencies = machine.F,mersenne_twister.f,physparam.f,radcons.f90 ######################################################################## diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index 04febd5d7..43c25ae2e 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rrtmg_post - type = properties + type = scheme dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radlw_param.f,radsw_param.f ######################################################################## diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 5afbdfe30..0d20b87cc 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rrtmg_pre - type = properties + type = scheme dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,module_mp_radar.F90,module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radlw_param.f,radsw_param.f,surface_perturbation.F90 ######################################################################## diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 408b41bf8..8377807d8 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rrtmg_setup - type = properties + type = scheme dependencies = iounitdef.f,module_bfmicrophysics.f,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f,radlw_main.f,radlw_param.f,radsw_main.f,radsw_param.f ######################################################################## diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index d4fcf6547..24e4314dd 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rrtmgp_lw_post - type = properties - dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radlw_param.f,rrtmgp_aux.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_heating_rates.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 + type = scheme + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radlw_param.f,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rrtmgp_aux.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_heating_rates.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 173f7c4e8..67cc5d3e0 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -1,7 +1,8 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rrtmgp_pre - type = properties - dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f,rrtmg_lw_cloud_optics.F90,rrtmgp_aux.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_constants.F90,surface_perturbation.F90 + type = scheme + dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f + dependencies = radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f,rrtmgp_aux.F90,rrtmg_lw_cloud_optics.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 412094787..c4a1ec4e5 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rrtmgp_setup - type = properties + type = scheme dependencies = iounitdef.f,machine.F,module_bfmicrophysics.f,physparam.f,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f ######################################################################## diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 9f905cca3..34b0dda44 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -1,7 +1,8 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rrtmgp_sw_post - type = properties - dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radsw_param.f,rrtmgp_aux.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_heating_rates.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 + type = scheme + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radsw_param.f,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90 + dependencies = rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_heating_rates.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 2851e0d80..bd42202c9 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_rrtmgp_sw_pre - type = properties - dependencies = iounitdef.f,machine.F,physparam.f,radiation_astronomy.f,radiation_surface.f,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,surface_perturbation.F90 + type = scheme + dependencies = iounitdef.f,machine.F,physparam.f,radiation_astronomy.f,radiation_surface.f ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index 9effaabf2..85aceeee4 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_stochastics - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 24ed8f774..6dce915ac 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_interstitial_rad_reset - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## @@ -42,9 +42,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_interstitial_phys_reset - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## @@ -86,9 +86,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_interstitial_1 - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## @@ -281,9 +281,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_interstitial_2 - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## @@ -805,9 +805,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_stateout_reset - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## @@ -929,9 +929,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_stateout_update - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## @@ -1098,9 +1098,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_interstitial_3 - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## @@ -1536,9 +1536,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_interstitial_4 - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## @@ -1856,9 +1856,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_suite_interstitial_5 - type = properties + type = scheme dependencies = machine.F,module_mp_thompson_make_number_concentrations.F90 ######################################################################## diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 63184dca8..3be253c40 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_surface_composites_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -644,9 +644,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_surface_composites_inter - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -794,9 +794,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_surface_composites_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index d1d9143b5..cc2d6e231 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_surface_generic_pre - type = properties + type = scheme dependencies = machine.F,surface_perturbation.F90 ######################################################################## @@ -506,9 +506,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_surface_generic_post - type = properties + type = scheme dependencies = machine.F,surface_perturbation.F90 ######################################################################## diff --git a/physics/GFS_surface_loop_control.meta b/physics/GFS_surface_loop_control.meta index 16af00db3..a4d62cd29 100644 --- a/physics/GFS_surface_loop_control.meta +++ b/physics/GFS_surface_loop_control.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_surface_loop_control_part1 - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -59,9 +59,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_surface_loop_control_part2 - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index d38922c6d..f1a088245 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_time_vary_pre - type = properties + type = scheme dependencies = funcphys.f90,machine.F ######################################################################## diff --git a/physics/GFS_time_vary_pre.scm.meta b/physics/GFS_time_vary_pre.scm.meta index 6b84da68c..189a5b05b 100644 --- a/physics/GFS_time_vary_pre.scm.meta +++ b/physics/GFS_time_vary_pre.scm.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = GFS_time_vary_pre - type = properties + type = scheme dependencies = funcphys.f90,machine.F ######################################################################## diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 377620c6a..ca1e573ba 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cires_ugwp - type = properties + type = scheme # DH* 20200804 - this is a result of the nasty hack to call gwdps from within ugwp! dependencies = cires_ugwp_triggers.F90,cires_ugwp_initialize.F90,cires_ugwp_solvers.F90,cires_ugwp_utils.F90,cires_orowam2017.f,cires_vert_lsatdis.F90,cires_vert_orodis.F90,cires_vert_wmsdis.F90,cires_ugwp_module.F90,gwdps.f,machine.F,ugwp_driver_v0.F diff --git a/physics/cires_ugwp_post.meta b/physics/cires_ugwp_post.meta index 0791d6d9f..ccb7cf50f 100644 --- a/physics/cires_ugwp_post.meta +++ b/physics/cires_ugwp_post.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cires_ugwp_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/cnvc90.meta b/physics/cnvc90.meta index 71ba19c35..ab487ff22 100644 --- a/physics/cnvc90.meta +++ b/physics/cnvc90.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cnvc90 - type = properties + type = scheme dependencies = ######################################################################## diff --git a/physics/cs_conv.meta b/physics/cs_conv.meta index 28fd28fd2..42201b155 100644 --- a/physics/cs_conv.meta +++ b/physics/cs_conv.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cs_conv_pre - type = properties + type = scheme dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## @@ -175,9 +175,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = cs_conv_post - type = properties + type = scheme dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## @@ -245,9 +245,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = cs_conv - type = properties + type = scheme dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## diff --git a/physics/cs_conv_aw_adj.meta b/physics/cs_conv_aw_adj.meta index 15142e121..626fd6d4b 100644 --- a/physics/cs_conv_aw_adj.meta +++ b/physics/cs_conv_aw_adj.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cs_conv_aw_adj - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index 2f0c999cd..7c86d7952 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cu_gf_driver - type = properties + type = scheme dependencies = cu_gf_deep.F90,cu_gf_sh.F90,machine.F,physcons.F90 ######################################################################## diff --git a/physics/cu_gf_driver_post.meta b/physics/cu_gf_driver_post.meta index 8e85ab3a2..43bc02545 100644 --- a/physics/cu_gf_driver_post.meta +++ b/physics/cu_gf_driver_post.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cu_gf_driver_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/cu_gf_driver_pre.meta b/physics/cu_gf_driver_pre.meta index fa23bf960..bfdebee59 100644 --- a/physics/cu_gf_driver_pre.meta +++ b/physics/cu_gf_driver_pre.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cu_gf_driver_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 331abfc14..8bc067735 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cu_ntiedtke - type = properties + type = scheme dependencies = machine.F,physcons.F90 ######################################################################## diff --git a/physics/cu_ntiedtke_post.meta b/physics/cu_ntiedtke_post.meta index 491febaeb..dfaee692d 100644 --- a/physics/cu_ntiedtke_post.meta +++ b/physics/cu_ntiedtke_post.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cu_ntiedtke_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/cu_ntiedtke_pre.meta b/physics/cu_ntiedtke_pre.meta index b5892ce10..411bb8fab 100644 --- a/physics/cu_ntiedtke_pre.meta +++ b/physics/cu_ntiedtke_pre.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = cu_ntiedtke_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index e2264a2ff..ce406e824 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = dcyc2t3 - type = properties + type = scheme dependencies = machine.F,physcons.F90 ######################################################################## diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index d57f334f9..ba15719c1 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = drag_suite - type = properties + type = scheme dependencies = ######################################################################## diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index 037e5b463..128977e05 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = flake_driver - type = properties + type = scheme dependencies = flake.F90,machine.F ######################################################################## diff --git a/physics/gcm_shoc.meta b/physics/gcm_shoc.meta index a53687eb7..d9a58d8b5 100644 --- a/physics/gcm_shoc.meta +++ b/physics/gcm_shoc.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = shoc - type = properties + type = scheme dependencies = funcphys.f90,machine.F ######################################################################## diff --git a/physics/get_prs_fv3.meta b/physics/get_prs_fv3.meta index 2da5bbe11..2db340300 100644 --- a/physics/get_prs_fv3.meta +++ b/physics/get_prs_fv3.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = get_prs_fv3 - type = properties + type = scheme dependencies = machine.F,physcons.F90 ######################################################################## @@ -96,9 +96,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = get_phi_fv3 - type = properties + type = scheme dependencies = machine.F,physcons.F90 ######################################################################## diff --git a/physics/gfdl_cloud_microphys.meta b/physics/gfdl_cloud_microphys.meta index ef226dbbd..3c9a53606 100644 --- a/physics/gfdl_cloud_microphys.meta +++ b/physics/gfdl_cloud_microphys.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = gfdl_cloud_microphys - type = properties + type = scheme dependencies = machine.F,module_mp_radar.F90,module_gfdl_cloud_microphys.F90 ######################################################################## diff --git a/physics/gfdl_fv_sat_adj.meta b/physics/gfdl_fv_sat_adj.meta index 7369c34d3..d54baf1bb 100644 --- a/physics/gfdl_fv_sat_adj.meta +++ b/physics/gfdl_fv_sat_adj.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = fv_sat_adj - type = properties + type = scheme dependencies = machine.F,module_gfdl_cloud_microphys.F90,module_mp_radar.F90,multi_gases.F90,physcons.F90 ######################################################################## diff --git a/physics/gmtb_scm_sfc_flux_spec.meta b/physics/gmtb_scm_sfc_flux_spec.meta index e73deada0..2dba88b57 100644 --- a/physics/gmtb_scm_sfc_flux_spec.meta +++ b/physics/gmtb_scm_sfc_flux_spec.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = gmtb_scm_sfc_flux_spec - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/gscond.meta b/physics/gscond.meta index f8c524268..9012cc650 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = zhaocarr_gscond - type = properties + type = scheme dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## diff --git a/physics/gwdc.meta b/physics/gwdc.meta index e0310b4ee..30f5fcbfd 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = gwdc_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -165,9 +165,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = gwdc - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -446,9 +446,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = gwdc_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/gwdps.meta b/physics/gwdps.meta index 024c6781d..401024729 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = gwdps - type = properties + type = scheme dependencies = ######################################################################## diff --git a/physics/h2ophys.meta b/physics/h2ophys.meta index 40ed95848..27476ae08 100644 --- a/physics/h2ophys.meta +++ b/physics/h2ophys.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = h2ophys - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/lsm_ruc_sfc_sice_interstitial.meta b/physics/lsm_ruc_sfc_sice_interstitial.meta index dc06c1a72..d78343422 100644 --- a/physics/lsm_ruc_sfc_sice_interstitial.meta +++ b/physics/lsm_ruc_sfc_sice_interstitial.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = lsm_ruc_sfc_sice_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -101,9 +101,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = lsm_ruc_sfc_sice_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/m_micro.meta b/physics/m_micro.meta index 80dcc4195..f61e6511f 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = m_micro - type = properties + type = scheme dependencies = aer_cloud.F,aerclm_def.F,cldmacro.F,cldwat2m_micro.F,machine.F,micro_mg_utils.F90,micro_mg2_0.F90,micro_mg3_0.F90,physcons.F90,wv_saturation.F ######################################################################## diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index 591dcdc4c..ec0944f28 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = m_micro_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## @@ -290,9 +290,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = m_micro_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/machine.meta b/physics/machine.meta index 92d09e629..a000aa469 100644 --- a/physics/machine.meta +++ b/physics/machine.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = machine - type = properties + type = module dependencies = ######################################################################## diff --git a/physics/maximum_hourly_diagnostics.meta b/physics/maximum_hourly_diagnostics.meta index 00a0bbd34..48223113c 100644 --- a/physics/maximum_hourly_diagnostics.meta +++ b/physics/maximum_hourly_diagnostics.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = maximum_hourly_diagnostics - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index c396bc991..356ce74a9 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = myjpbl_wrapper - type = properties + type = scheme dependencies = module_BL_MYJPBL.F90 ######################################################################## diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index aab6a66e4..8938aeccd 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = myjsfc_wrapper - type = properties + type = scheme dependencies = module_SF_JSFC.F90 ######################################################################## diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 2ce69b270..c51b6f0f7 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = mynnedmf_wrapper - type = properties + type = scheme dependencies = machine.F,module_bl_mynn.F90,physcons.F90 ######################################################################## diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 9b62aae52..59df18419 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = mynnsfc_wrapper - type = properties + type = scheme dependencies = machine.F,module_sf_mynn.F90 ######################################################################## diff --git a/physics/module_SGSCloud_RadPost.meta b/physics/module_SGSCloud_RadPost.meta index 0f4041f10..089c770c2 100644 --- a/physics/module_SGSCloud_RadPost.meta +++ b/physics/module_SGSCloud_RadPost.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sgscloud_radpost - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 87e77657f..e74f5f7ee 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sgscloud_radpre - type = properties + type = scheme dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,physcons.F90,radcons.f90,radiation_clouds.f ######################################################################## diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 5a41ee2d0..31a26053f 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = hedmf - type = properties + type = scheme dependencies = funcphys.f90,machine.F,mfpbl.f,physcons.F90,tridi.f ######################################################################## diff --git a/physics/moninedmf_hafs.meta b/physics/moninedmf_hafs.meta index 26a4e4409..d79245330 100644 --- a/physics/moninedmf_hafs.meta +++ b/physics/moninedmf_hafs.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = hedmf_hafs - type = properties + type = scheme dependencies = funcphys.f90,machine.F,mfpbl.f,physcons.F90 ######################################################################## diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index 3b7a50ad5..48754564f 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = moninshoc - type = properties + type = scheme dependencies = funcphys.f90,machine.F,tridi.f ######################################################################## diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index 3c085600b..a0591ade8 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = mp_fer_hires - type = properties + type = scheme dependencies = machine.F,module_MP_FER_HIRES.F90 ######################################################################## diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 01f38fa6a..427b2bc84 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = mp_thompson - type = properties + type = scheme dependencies = machine.F,module_mp_radar.F90,module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90 ######################################################################## diff --git a/physics/mp_thompson_post.meta b/physics/mp_thompson_post.meta index 9f6d3e3b6..2c68fc78a 100644 --- a/physics/mp_thompson_post.meta +++ b/physics/mp_thompson_post.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = mp_thompson_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/mp_thompson_pre.meta b/physics/mp_thompson_pre.meta index f14340a03..2511ba3bc 100644 --- a/physics/mp_thompson_pre.meta +++ b/physics/mp_thompson_pre.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = mp_thompson_pre - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/ozphys.meta b/physics/ozphys.meta index f9c29bd11..b43f7931c 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = ozphys - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index 1c2cf364f..2db91982f 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = ozphys_2015 - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/phys_tend.meta b/physics/phys_tend.meta index 5362137a5..b5637063c 100644 --- a/physics/phys_tend.meta +++ b/physics/phys_tend.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = phys_tend - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/precpd.meta b/physics/precpd.meta index 1435ead20..3d76d18ed 100644 --- a/physics/precpd.meta +++ b/physics/precpd.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = zhaocarr_precpd - type = properties + type = scheme dependencies = funcphys.f90,machine.F,physcons.F90 ######################################################################## diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 00e390cb9..05fcf1de6 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmg_lw - type = properties + type = scheme dependencies = mersenne_twister.f,physcons.F90,physparam.f,radlw_datatb.f,radlw_param.f ######################################################################## diff --git a/physics/radlw_param.meta b/physics/radlw_param.meta index 61aee1d37..05fe5af57 100644 --- a/physics/radlw_param.meta +++ b/physics/radlw_param.meta @@ -1,13 +1,28 @@ +[ccpp-table-properties] + name = topflw_type + type = ddt + dependencies = + [ccpp-arg-table] name = topflw_type type = ddt ######################################################################## +[ccpp-table-properties] + name = sfcflw_type + type = ddt + dependencies = + [ccpp-arg-table] name = sfcflw_type type = ddt ######################################################################## +[ccpp-table-properties] + name = module_radlw_parameters + type = module + dependencies = + [ccpp-arg-table] name = module_radlw_parameters type = module diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 679d3b8ca..30e1d850c 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmg_sw - type = properties + type = scheme dependencies = mersenne_twister.f,physcons.F90,physparam.f,radsw_datatb.f,radsw_param.f ######################################################################## diff --git a/physics/radsw_param.meta b/physics/radsw_param.meta index e0eb5ece8..7f7da3bdd 100644 --- a/physics/radsw_param.meta +++ b/physics/radsw_param.meta @@ -1,18 +1,38 @@ +[ccpp-table-properties] + name = topfsw_type + type = ddt + dependencies = + [ccpp-arg-table] name = topfsw_type type = ddt ######################################################################## +[ccpp-table-properties] + name = sfcfsw_type + type = ddt + dependencies = + [ccpp-arg-table] name = sfcfsw_type type = ddt ######################################################################## +[ccpp-table-properties] + name = cmpfsw_type + type = ddt + dependencies = + [ccpp-arg-table] name = cmpfsw_type type = ddt ######################################################################## +[ccpp-table-properties] + name = module_radsw_parameters + type = module + dependencies = + [ccpp-arg-table] name = module_radsw_parameters type = module diff --git a/physics/rascnv.meta b/physics/rascnv.meta index d92a6aadd..8a8cc0153 100644 --- a/physics/rascnv.meta +++ b/physics/rascnv.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rascnv - type = properties + type = scheme dependencies = ######################################################################## diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index d502e5bd1..9a40ceff1 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rayleigh_damp - type = properties + type = scheme dependencies = ######################################################################## diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 2b3c157a5..4886e600c 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmg_lw_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index 2d6aa294f..fb7b9d3b0 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmg_lw_pre - type = properties + type = scheme dependencies = iounitdef.f,machine.F,radiation_surface.f ######################################################################## diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 3ed4600fd..da2272a54 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmg_sw_post - type = properties + type = scheme dependencies = machine.F,radsw_param.f ######################################################################## diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index 55b365334..9088284bb 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmg_sw_pre - type = properties + type = scheme dependencies = iounitdef.f,machine.F,radiation_surface.f ######################################################################## diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta index 5093d66cc..8df363cb6 100644 --- a/physics/rrtmgp_lw_aerosol_optics.meta +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_lw_aerosol_optics - type = properties - dependencies = iounitdef.f,machine.F,radiation_aerosols.f,rrtmgp_aux.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90 + type = scheme + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 147cd7916..84115675f 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_lw_cloud_optics - type = properties - dependencies = machine.F,rrtmg_lw_cloud_optics.F90,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90 + type = scheme + dependencies = machine.F,rrtmg_lw_cloud_optics.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 1868c408d..1d22e7e1e 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_lw_cloud_sampling - type = properties - dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90 + type = scheme + dependencies = machine.F,mersenne_twister.f,physparam.f,rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index dddb93c4c..56cc7cefa 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -1,7 +1,8 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_lw_gas_optics - type = properties - dependencies = machine.F,rrtmgp_aux.F90,rte-rrtmgp/extensions/mo_compute_bc.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90,rte-rrtmgp/rte/mo_source_functions.F90 + type = scheme + dependencies = machine.F,rte-rrtmgp/extensions/mo_compute_bc.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90 + dependencies = rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_rte_sw.F90,rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index c8f7adc76..4dfc48203 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_lw_pre - type = properties - dependencies = iounitdef.f,machine.F,physparam.f,radiation_surface.f,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 + type = scheme + dependencies = iounitdef.f,machine.F,physparam.f,radiation_surface.f ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index d7488ca4c..e918ea163 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -1,7 +1,8 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_lw_rte - type = properties - dependencies = machine.F,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90,rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_source_functions.F90 + type = scheme + dependencies = machine.F,rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rrtmgp_aux.F90 + dependencies = rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta index a87c9a756..68979ae5b 100644 --- a/physics/rrtmgp_sw_aerosol_optics.meta +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_sw_aerosol_optics - type = properties - dependencies = iounitdef.f,machine.F,radiation_aerosols.f,rrtmgp_aux.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90 + type = scheme + dependencies = iounitdef.f,machine.F,radiation_aerosols.f,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index b9343a532..558d1423c 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_sw_cloud_optics - type = properties - dependencies = machine.F,physparam.f,rrtmg_sw_cloud_optics.F90,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90 + type = scheme + dependencies = machine.F,physparam.f,rrtmg_sw_cloud_optics.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 158cf7c07..f1f3e03cc 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -1,7 +1,7 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_sw_cloud_sampling - type = properties - dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90 + type = scheme + dependencies = machine.F,mersenne_twister.f,physparam.f,rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index d2196736e..1d0c96547 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -1,7 +1,8 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_sw_gas_optics - type = properties - dependencies = iounitdef.f,machine.F,radiation_gases.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/mo_compute_bc.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90 + type = scheme + dependencies = iounitdef.f,machine.F,radiation_gases.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/mo_compute_bc.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90 + dependencies = rte-rrtmgp/rte/mo_rte_lw.F90,rte-rrtmgp/rte/mo_rte_sw.F90,rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index e03e6be40..09fe99512 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -1,7 +1,8 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = rrtmgp_sw_rte - type = properties - dependencies = machine.F,radsw_param.f,rrtmgp_aux.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90,rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90,rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90,rte-rrtmgp/rrtmgp/mo_gas_optics.F90,rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90,rte-rrtmgp/rte/mo_rte_util_array.F90,rte-rrtmgp/rte/mo_rte_kind.F90,rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rte-rrtmgp/rte/mo_rte_sw.F90 + type = scheme + dependencies = machine.F,radsw_param.f,rte-rrtmgp/rte/mo_rte_sw.F90,rte-rrtmgp/rte/mo_fluxes.F90,rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90,rrtmgp_aux.F90 + dependencies = rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90,rte-rrtmgp/extensions/mo_fluxes_byband_kernels.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index f852a5002..7085e6577 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = samfdeepcnv - type = properties + type = scheme dependencies = funcphys.f90,machine.F,samfaerosols.F ######################################################################## diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index eb41f0ed5..6c7eedb82 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = samfshalcnv - type = properties + type = scheme dependencies = funcphys.f90,machine.F,samfaerosols.F ######################################################################## diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index 2d1a21233..3031e8fd7 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sascnvn - type = properties + type = scheme dependencies = funcphys.f90,machine.F ######################################################################## diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index 97f146867..e34d778dc 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = satmedmfvdif - type = properties + type = scheme dependencies = funcphys.f90,machine.F,mfpblt.f,mfscu.f,tridi.f ######################################################################## diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index a92f99a22..75c5fbd3d 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = satmedmfvdifq - type = properties + type = scheme dependencies = funcphys.f90,machine.F,mfpbltq.f,mfscuq.f,tridi.f ######################################################################## diff --git a/physics/sfc_cice.meta b/physics/sfc_cice.meta index 5bce871cc..41d2956aa 100644 --- a/physics/sfc_cice.meta +++ b/physics/sfc_cice.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_cice - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/sfc_diag.meta b/physics/sfc_diag.meta index cf77201d7..6ede745b8 100644 --- a/physics/sfc_diag.meta +++ b/physics/sfc_diag.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_diag - type = properties + type = scheme dependencies = funcphys.f90,machine.F ######################################################################## diff --git a/physics/sfc_diag_post.meta b/physics/sfc_diag_post.meta index 84c552f8a..492a97a0f 100644 --- a/physics/sfc_diag_post.meta +++ b/physics/sfc_diag_post.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_diag_post - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/sfc_diff.meta b/physics/sfc_diff.meta index 9ff0baaa7..3f8c8e9de 100644 --- a/physics/sfc_diff.meta +++ b/physics/sfc_diff.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_diff - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index 8801ff233..2e617fdb1 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = lsm_noah - type = properties + type = scheme dependencies = funcphys.f90,machine.F,set_soilveg.f,sflx.f,surface_perturbation.F90 ######################################################################## diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 09f372c99..2c91a3d59 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = lsm_ruc - type = properties + type = scheme dependencies = machine.F,module_sf_ruclsm.F90,module_soil_pre.F90,namelist_soilveg_ruc.F90,set_soilveg_ruc.F90 ######################################################################## diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index e8787ede8..73382d008 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = noahmpdrv - type = properties + type = scheme dependencies = funcphys.f90,machine.F,module_sf_noahmp_glacier.f90,module_sf_noahmplsm.f90,noahmp_tables.f90,set_soilveg.f ######################################################################## diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 09d2828a7..34e1331b2 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_nst - type = properties + type = scheme dependencies = date_def.f,funcphys.f90,machine.F,module_nst_model.f90,module_nst_parameters.f90,module_nst_water_prop.f90 ######################################################################## @@ -646,9 +646,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_nst_pre - type = properties + type = scheme dependencies = date_def.f,funcphys.f90,machine.F,module_nst_model.f90,module_nst_parameters.f90,module_nst_water_prop.f90 ######################################################################## @@ -779,9 +779,9 @@ optional = F ######################################################################## -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_nst_post - type = properties + type = scheme dependencies = date_def.f,funcphys.f90,machine.F,module_nst_model.f90,module_nst_parameters.f90,module_nst_water_prop.f90 ######################################################################## diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index 6e7174d89..282ae6b89 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_ocean - type = properties + type = scheme dependencies = funcphys.f90,machine.F ######################################################################## diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index ee17a4fc7..84bf7c6e7 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = sfc_sice - type = properties + type = scheme dependencies = funcphys.f90,machine.F ######################################################################## diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index 15465a583..3fe29f5ef 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = shalcnv - type = properties + type = scheme dependencies = funcphys.f90,machine.F ######################################################################## diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index aff7962a0..4a557f253 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = shinhongvdif - type = properties + type = scheme dependencies = machine.F ######################################################################## diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index d0092569f..ae228bfe8 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -1,6 +1,6 @@ -[ccpp-scheme-properties] +[ccpp-table-properties] name = ysuvdif - type = properties + type = scheme dependencies = machine.F ######################################################################## From c751f08975232d19245372702a9d657c69abc513 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 7 Aug 2020 12:17:25 -0600 Subject: [PATCH 285/404] Update .gitmodules and submodule pointer for rte-rrtmgp for code review and testing --- .gitmodules | 6 ++++-- physics/rte-rrtmgp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8421166ca..a49d2434f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,6 @@ [submodule "physics/rte-rrtmgp"] path = physics/rte-rrtmgp - url = https://github.com/RobertPincus/rte-rrtmgp - branch = dtc/ccpp + #url = https://github.com/earth-system-radiation/rte-rrtmgp + #branch = dtc/ccpp + url = https://github.com/climbfuji/rte-rrtmgp + branch = add_ccpp_table_properties_and_dependencies diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 7dfff2025..aedbb6f74 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 7dfff2025cae02c84b12df2402a39d77065f0e62 +Subproject commit aedbb6f74004e06794198111eb2b74e7390c28fc From 14aa89b4d72257374e4f6439b607eb035e6e8efb Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 10 Aug 2020 09:50:39 -0400 Subject: [PATCH 286/404] removingduplicate lines in GFS_suite_interstitial.F90 --- physics/GFS_suite_interstitial.F90 | 38 ------------------------------ 1 file changed, 38 deletions(-) diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 6176edbda..263e316a5 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -294,44 +294,6 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl endif endif - if (frac_grid) then - do i=1,im - tem = (one - frland(i)) * cice(i) ! tem = ice fraction wrt whole cell - if (flag_cice(i)) then - adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & - + ulwsfc_cice(i) * tem & - + adjsfculw_wat(i) * (one - frland(i) - tem) - else - adjsfculw(i) = adjsfculw_lnd(i) * frland(i) & - + adjsfculw_ice(i) * tem & - + adjsfculw_wat(i) * (one - frland(i) - tem) - endif - enddo - else - do i=1,im - if (dry(i)) then ! all land - adjsfculw(i) = adjsfculw_lnd(i) - elseif (icy(i)) then ! ice (and water) - tem = one - cice(i) - if (flag_cice(i)) then - if (wet(i) .and. abs(adjsfculw_wat(i)-huge) > epsln) then - adjsfculw(i) = ulwsfc_cice(i)*cice(i) + adjsfculw_wat(i)*tem - else - adjsfculw(i) = ulwsfc_cice(i) - endif - else - if (wet(i) .and. abs(adjsfculw_wat(i)-huge) > epsln) then - adjsfculw(i) = adjsfculw_ice(i)*cice(i) + adjsfculw_wat(i)*tem - else - adjsfculw(i) = adjsfculw_ice(i) - endif - endif - else ! all water - adjsfculw(i) = adjsfculw_wat(i) - endif - enddo - endif - do i=1,im dlwsfc(i) = dlwsfc(i) + adjsfcdlw(i)*dtf ulwsfc(i) = ulwsfc(i) + adjsfculw(i)*dtf From d3dcae7ea20e27b9f4c774cea52acf7389e6d9e9 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 10 Aug 2020 10:57:47 -0400 Subject: [PATCH 287/404] fixing a typo in sfcsub.F --- physics/sfcsub.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/sfcsub.F b/physics/sfcsub.F index ee4a2ec09..a2d846aee 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -5576,7 +5576,7 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & do i=1,nprt ij = iwk(i) print 8004,rla(ij),rlo(ij),fld(ij),fldsmx - 8004 format(' snow land max. check. lat=',f5.1,i & + 8004 format(' snow land max. check. lat=',f5.1, & & ' lon=',f6.1,' fld=',e11.4, ' to ',e11.4) enddo endif From 2235fb5ec61cb1af47879acd3db6c665c57604af Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 10 Aug 2020 10:00:54 -0600 Subject: [PATCH 288/404] Add tracer sanitizer --- physics/tracer_sanitizer.F90 | 113 ++++++++++++++++++++++++++++++++ physics/tracer_sanitizer.meta | 117 ++++++++++++++++++++++++++++++++++ 2 files changed, 230 insertions(+) create mode 100644 physics/tracer_sanitizer.F90 create mode 100644 physics/tracer_sanitizer.meta diff --git a/physics/tracer_sanitizer.F90 b/physics/tracer_sanitizer.F90 new file mode 100644 index 000000000..ee699b837 --- /dev/null +++ b/physics/tracer_sanitizer.F90 @@ -0,0 +1,113 @@ +module tracer_sanitizer + + use machine, only : kind_phys + + implicit none + + private + + public :: tracer_sanitizer_init, tracer_sanitizer_run, tracer_sanitizer_finalize + + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys + real(kind=kind_phys), parameter :: qvmin = 1.0E-6_kind_phys + +contains + + subroutine tracer_sanitizer_init() + end subroutine tracer_sanitizer_init + +!> \section arg_table_tracer_sanitizer_run Argument Table +!! \htmlinclude tracer_sanitizer_run.html +!! + subroutine tracer_sanitizer_run(tracers, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & + ntlnc, ntinc, ntrnc, ntsnc, ntgnc, errmsg, errflg) + + ! Interface variables + integer, intent(in ) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & + ntlnc, ntinc, ntrnc, ntsnc, ntgnc + real(kind=kind_phys), intent(inout) :: tracers(:,:,:) + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Water vapor specific humidity + if (ntqv>0) then + where (tracers(:,:,ntqv)0) then + where (tracers(:,:,ntcw)0) then + where (tracers(:,:,ntlnc)==zero) + tracers(:,:,ntlnc)=zero + end where + end if + end if + + ! Ice water + if (ntiw>0) then + where (tracers(:,:,ntiw)0) then + where (tracers(:,:,ntinc)==zero) + tracers(:,:,ntinc)=zero + end where + end if + end if + + ! Rain water + if (ntrw>0) then + where (tracers(:,:,ntrw)0) then + where (tracers(:,:,ntrnc)==zero) + tracers(:,:,ntrnc)=zero + end where + end if + end if + + ! Snow + if (ntsw>0) then + where (tracers(:,:,ntsw)0) then + where (tracers(:,:,ntsnc)==zero) + tracers(:,:,ntsnc)=zero + end where + end if + end if + + ! Graupel + if (ntgl>0) then + where (tracers(:,:,ntgl)0) then + where (tracers(:,:,ntgnc)==zero) + tracers(:,:,ntgnc)=zero + end where + end if + end if + + end subroutine tracer_sanitizer_run + + subroutine tracer_sanitizer_finalize() + end subroutine tracer_sanitizer_finalize + +end module tracer_sanitizer \ No newline at end of file diff --git a/physics/tracer_sanitizer.meta b/physics/tracer_sanitizer.meta new file mode 100644 index 000000000..582823fdb --- /dev/null +++ b/physics/tracer_sanitizer.meta @@ -0,0 +1,117 @@ +[ccpp-arg-table] + name = tracer_sanitizer_run + type = scheme +[tracers] + standard_name = tracer_concentration_updated_by_physics + long_name = tracer concentration updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = inout + optional = F +[ntqv] + standard_name = index_for_water_vapor + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntcw] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_for_ice_cloud_condensate + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_for_rain_water + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_for_snow_water + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgl] + standard_name = index_for_graupel + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntlnc] + standard_name = index_for_liquid_cloud_number_concentration + long_name = tracer index for liquid number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntinc] + standard_name = index_for_ice_cloud_number_concentration + long_name = tracer index for ice number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntrnc] + standard_name = index_for_rain_number_concentration + long_name = tracer index for rain number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsnc] + standard_name = index_for_snow_number_concentration + long_name = tracer index for snow number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgnc] + standard_name = index_for_graupel_number_concentration + long_name = tracer index for graupel number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F From c3ddc93d88012e45daca4b115b83074c019fb8bb Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 10 Aug 2020 12:15:15 -0400 Subject: [PATCH 289/404] reverting MAPL_kp back to MAPL_R8 --- physics/wv_saturation.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/wv_saturation.F b/physics/wv_saturation.F index f3047b542..b020096b8 100644 --- a/physics/wv_saturation.F +++ b/physics/wv_saturation.F @@ -9,7 +9,7 @@ !! This module contain some utility functions for saturation vapor pressure. module wv_saturation #ifdef GEOS5 - use MAPL_ConstantsMod, kp => MAPL_kp + use MAPL_ConstantsMod, kp => MAPL_R8 #endif #ifdef NEMS_GSM use funcphys, only : fpvsl, fpvsi, fpvs ! saturation vapor pressure for water & ice From f3b797ffda59e9c0e0fe02b15564f530ef569229 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Mon, 10 Aug 2020 12:47:39 -0400 Subject: [PATCH 290/404] moving definition of kp inside ifdef in wv_saturation.F --- physics/wv_saturation.F | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/physics/wv_saturation.F b/physics/wv_saturation.F index b020096b8..b12b76a91 100644 --- a/physics/wv_saturation.F +++ b/physics/wv_saturation.F @@ -13,9 +13,8 @@ module wv_saturation #endif #ifdef NEMS_GSM use funcphys, only : fpvsl, fpvsi, fpvs ! saturation vapor pressure for water & ice -#endif use machine, only : kp => kind_phys - +#endif !++jtb (comm out) From d7112c29fae6b709b154d61c8080fd4a04180d61 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 10 Aug 2020 16:44:52 -0600 Subject: [PATCH 291/404] Add [ccpp-table-properties] section to new RRTMGP metadata files, update submodule pointer for rte-rrtmgp --- physics/GFS_cloud_diagnostics.meta | 4 ++++ physics/GFS_rrtmgp_gfdlmp_pre.meta | 5 +++++ physics/GFS_rrtmgp_zhaocarr_pre.meta | 5 +++++ physics/rte-rrtmgp | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index f78a76490..3778d6036 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -1,3 +1,7 @@ +[ccpp-table-properties] + name = GFS_cloud_diagnostics + type = scheme + ######################################################################## [ccpp-arg-table] name = GFS_cloud_diagnostics_run diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 932ffeb8f..7e0797538 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -1,3 +1,8 @@ +[ccpp-table-properties] + name = GFS_rrtmgp_gfdlmp_pre + type = scheme + dependencies = rrtmgp_aux.F90 + ######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_gfdlmp_pre_run diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta index 052da5798..11aac8437 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.meta +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -1,3 +1,8 @@ +[ccpp-table-properties] + name = GFS_rrtmgp_zhaocarr_pre + type = scheme + dependencies = rrtmgp_aux.F90 + ######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_zhaocarr_pre_run diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index fb1d5ef53..f4b42d80d 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit fb1d5ef5305144a5d592240e150c7151fddf66f8 +Subproject commit f4b42d80d0ab5f621ab3a69facdf863efbcb37cb From f8ff2c0f0d0d34dc05a5be5dff72a697ff7dcd25 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 10 Aug 2020 17:11:11 -0600 Subject: [PATCH 292/404] Compile against correct version of mo_cloud_sampling.F90, fix name of function in error message --- physics/mo_cloud_sampling.F90 | 10 +++++----- physics/rrtmgp_lw_cloud_sampling.meta | 2 +- physics/rrtmgp_sw_cloud_sampling.meta | 2 +- physics/rte-rrtmgp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/physics/mo_cloud_sampling.F90 b/physics/mo_cloud_sampling.F90 index 02741439f..4d4c8f44b 100644 --- a/physics/mo_cloud_sampling.F90 +++ b/physics/mo_cloud_sampling.F90 @@ -218,24 +218,24 @@ function sampled_mask_exp_ran(randoms,cloud_frac,overlap_param,cloud_mask) resul nlay = size(randoms, 2) ngpt = size(randoms, 1) if(any([ncol,nlay] /= [size(cloud_frac, 1),size(cloud_frac, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" + error_msg = "sampled_mask_exp_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" return end if if(any([ncol,nlay-1] /= [size(overlap_param, 1),size(overlap_param, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and overlap_param(ncol,nlay-1) are inconsistent" + error_msg = "sampled_mask_exp_ran: sizes of randoms(ngpt,nlay,ncol) and overlap_param(ncol,nlay-1) are inconsistent" return end if if(any([ncol,nlay,ngpt] /= [size(cloud_mask, 1),size(cloud_mask, 2), size(cloud_mask,3)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" + error_msg = "sampled_mask_exp_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" return end if if(any(cloud_frac > 1._wp) .or. any(cloud_frac < 0._wp)) then - error_msg = "sampled_mask_max_ran: cloud fraction values out of range [0,1]" + error_msg = "sampled_mask_exp_ran: cloud fraction values out of range [0,1]" return end if if(any(overlap_param > 1._wp) .or. any(overlap_param < -1._wp)) then - error_msg = "sampled_mask_max_ran: overlap_param values out of range [-1,1]" + error_msg = "sampled_mask_exp_ran: overlap_param values out of range [-1,1]" return end if ! diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index a15b99966..7d63b0d99 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmgp_lw_cloud_sampling type = scheme - dependencies = machine.F,mersenne_twister.f,physparam.f,rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90,rrtmgp_aux.F90 + dependencies = machine.F,mersenne_twister.f,physparam.f,mo_cloud_sampling.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 8df83a87d..397a14d12 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmgp_sw_cloud_sampling type = scheme - dependencies = machine.F,mersenne_twister.f,physparam.f,rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90,rrtmgp_aux.F90 + dependencies = machine.F,mersenne_twister.f,physparam.f,mo_cloud_sampling.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index f4b42d80d..51f718adb 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit f4b42d80d0ab5f621ab3a69facdf863efbcb37cb +Subproject commit 51f718adb36aa72bdc9dcc95b986dcbe5125e03a From 408d078d6bfa0d34b180ac321de1685d5e49c771 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 11 Aug 2020 07:20:16 -0600 Subject: [PATCH 293/404] Bug fix in physics/tracer_sanitizer.F90 --- physics/tracer_sanitizer.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/physics/tracer_sanitizer.F90 b/physics/tracer_sanitizer.F90 index ee699b837..668cf6edd 100644 --- a/physics/tracer_sanitizer.F90 +++ b/physics/tracer_sanitizer.F90 @@ -59,7 +59,7 @@ subroutine tracer_sanitizer_run(tracers, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & tracers(:,:,ntiw)=zero end where ! Adjust second moments - if (ntlnc>0) then + if (ntinc>0) then where (tracers(:,:,ntinc)==zero) tracers(:,:,ntinc)=zero end where @@ -72,7 +72,7 @@ subroutine tracer_sanitizer_run(tracers, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & tracers(:,:,ntrw)=zero end where ! Adjust second moments - if (ntlnc>0) then + if (ntrnc>0) then where (tracers(:,:,ntrnc)==zero) tracers(:,:,ntrnc)=zero end where @@ -85,7 +85,7 @@ subroutine tracer_sanitizer_run(tracers, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & tracers(:,:,ntsw)=zero end where ! Adjust second moments - if (ntlnc>0) then + if (ntsnc>0) then where (tracers(:,:,ntsnc)==zero) tracers(:,:,ntsnc)=zero end where @@ -98,7 +98,7 @@ subroutine tracer_sanitizer_run(tracers, ntqv, ntcw, ntiw, ntrw, ntsw, ntgl, & tracers(:,:,ntgl)=zero end where ! Adjust second moments - if (ntlnc>0) then + if (ntgnc>0) then where (tracers(:,:,ntgnc)==zero) tracers(:,:,ntgnc)=zero end where From 2e60cb5ebfe5a4057fc95f3f9ecd98675ee98a0a Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Tue, 11 Aug 2020 15:57:53 +0000 Subject: [PATCH 294/404] rte-rrtmgp submodule update --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 7dfff2025..6ee0b62c1 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 7dfff2025cae02c84b12df2402a39d77065f0e62 +Subproject commit 6ee0b62c1ac6204a89a4e922382b611c16dd5fa7 From e57e4dfc6f15028db881e715579d43c51c1281d7 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Aug 2020 13:38:48 -0600 Subject: [PATCH 295/404] Renamed mo_cloud_sampling. Combined sampling routines. --- physics/mo_cloud_sampling.F90 | 398 --------------------------- physics/rrtmgp_lw_cloud_sampling.F90 | 95 +++---- physics/rrtmgp_sampling.F90 | 204 ++++++++++++++ physics/rrtmgp_sw_cloud_sampling.F90 | 90 +++--- 4 files changed, 274 insertions(+), 513 deletions(-) delete mode 100644 physics/mo_cloud_sampling.F90 create mode 100644 physics/rrtmgp_sampling.F90 diff --git a/physics/mo_cloud_sampling.F90 b/physics/mo_cloud_sampling.F90 deleted file mode 100644 index 02741439f..000000000 --- a/physics/mo_cloud_sampling.F90 +++ /dev/null @@ -1,398 +0,0 @@ -! This code is part of RRTM for GCM Applications - Parallel (RRTMGP) -! -! Contacts: Robert Pincus and Eli Mlawer -! email: rrtmgp@aer.com -! -! Copyright 2015-2019, Atmospheric and Environmental Research and -! Regents of the University of Colorado. All right reserved. -! -! Use and duplication is permitted under the terms of the -! BSD 3-clause license, see http://opensource.org/licenses/BSD-3-Clause -! ------------------------------------------------------------------------------------------------- -! -! This module provides a simple implementation of sampling for the -! Monte Carlo Independent Pixel Approximation (McICA, doi:10.1029/2002jd003322) -! Cloud optical properties, defined by band and assumed homogenous within each cell (column/layer), -! are randomly sampled to preserve the mean cloud fraction and one of several possible overlap assumptions -! Users supply random numbers with order ngpt,nlay,ncol -! These are only accessed if cloud_fraction(icol,ilay) > 0 so many values don't need to be filled in -! -! ------------------------------------------------------------------------------------------------- -module mo_cloud_sampling - use mo_rte_kind, only: wp, wl - use mo_optical_props, only: ty_optical_props_arry, & - ty_optical_props_1scl, & - ty_optical_props_2str, & - ty_optical_props_nstr - implicit none - private - public :: draw_samples, sampled_mask_max_ran, sampled_mask_exp_dcorr, sampled_mask_exp_ran -contains - ! ------------------------------------------------------------------------------------------------- - ! - ! Apply a T/F sampled cloud mask to cloud optical properties defined by band to produce - ! McICA-sampled cloud optical properties - ! - function draw_samples(cloud_mask,clouds,clouds_sampled) result(error_msg) - logical, dimension(:,:,:), intent(in ) :: cloud_mask ! Dimensions ncol,nlay,ngpt - class(ty_optical_props_arry), intent(in ) :: clouds ! Defined by band - class(ty_optical_props_arry), intent(inout) :: clouds_sampled ! Defined by g-point - character(len=128) :: error_msg - ! ------------------------ - integer :: ncol,nlay,nbnd,ngpt - integer :: imom - ! ------------------------ - ! - ! Error checking - ! - error_msg = "" - if(.not. clouds%is_initialized()) then - error_msg = "draw_samples: cloud optical properties are not initialized" - return - end if - if(.not. clouds_sampled%is_initialized()) then - error_msg = "draw_samples: sampled cloud optical properties are not initialized" - return - end if - - ! - ! Variables clouds and clouds_sampled have to be of the same type (have the same set of fields) - ! nstr isn't supported - ! 2str is checked at assignment - ! - select type(clouds) - type is (ty_optical_props_1scl) - select type(clouds_sampled) - type is (ty_optical_props_2str) - error_msg = "draw_samples: by-band and sampled cloud properties need to be the same variable type" - return - type is (ty_optical_props_nstr) - error_msg = "draw_samples: by-band and sampled cloud properties need to be the same variable type" - return - end select - type is (ty_optical_props_nstr) - error_msg = "draw_samples: sampling isn't implemented yet for ty_optical_props_nstr" - return - end select - - ! - ! Spectral discretization - ! - if(.not. clouds%bands_are_equal(clouds_sampled)) then - error_msg = "draw_samples: by-band and sampled cloud properties spectral structure is different" - return - end if - - ! - ! Array extents - ! - ncol = clouds%get_ncol() - nlay = clouds%get_nlay() - nbnd = clouds%get_nband() - ngpt = clouds_sampled%get_ngpt() - if (any([size(cloud_mask,1), size(cloud_mask,2), size(cloud_mask,3)] /= [ncol,nlay,ngpt])) then - error_msg = "draw_samples: cloud mask and cloud optical properties have different ncol and/or nlay" - return - end if - if (any([clouds_sampled%get_ncol(), clouds_sampled%get_nlay()] /= [ncol,nlay])) then - error_msg = "draw_samples: sampled/unsampled cloud optical properties have different ncol and/or nlay" - return - end if - ! ------------------------ - ! - ! Finally - sample fields according to the cloud mask - ! - ! Optical depth assignment works for 1scl, 2str (also nstr) - call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%tau,clouds_sampled%tau) - ! - ! For 2-stream - ! - select type(clouds) - type is (ty_optical_props_2str) - select type(clouds_sampled) - type is (ty_optical_props_2str) - call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%ssa,clouds_sampled%ssa) - call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%g, clouds_sampled%g ) - class default - error_msg = "draw_samples: by-band and sampled cloud properties need to be the same variable type" - end select - end select - end function draw_samples - ! ------------------------------------------------------------------------------------------------- - ! - ! Generate a McICA-sampled cloud mask for maximum-random overlap - ! - function sampled_mask_max_ran(randoms,cloud_frac,cloud_mask) result(error_msg) - real(wp), dimension(:,:,:), intent(in ) :: randoms !ngpt,nlay,ncol - real(wp), dimension(:,:), intent(in ) :: cloud_frac ! ncol,nlay - logical, dimension(:,:,:), intent(out) :: cloud_mask ! ncol,nlay,ngpt - character(len=128) :: error_msg - ! ------------------------ - integer :: ncol, nlay, ngpt, icol, ilay, igpt - integer :: cloud_lay_fst, cloud_lay_lst - real(wp), dimension(size(randoms,1)) :: local_rands - logical, dimension(size(randoms,2)) :: cloud_mask_layer - ! ------------------------ - ! - ! Error checking - ! - error_msg = "" - ncol = size(randoms, 3) - nlay = size(randoms, 2) - ngpt = size(randoms, 1) - if(any([ncol,nlay] /= [size(cloud_frac, 1),size(cloud_frac, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" - return - end if - if(any([ncol,nlay,ngpt] /= [size(cloud_mask, 1),size(cloud_mask, 2), size(cloud_mask,3)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" - return - end if - if(any(cloud_frac > 1._wp) .or. any(cloud_frac < 0._wp)) then - error_msg = "sampled_mask_max_ran: cloud fraction values out of range [0,1]" - return - end if - ! - ! We chould check the random numbers but that would be computationally heavy - ! - ! ------------------------ - ! - ! Construct the cloud mask for each column - ! - do icol = 1, ncol - cloud_mask_layer(1:nlay) = cloud_frac(icol,1:nlay) > 0._wp - if(.not. any(cloud_mask_layer)) then - cloud_mask(icol,1:nlay,1:ngpt) = .false. - cycle - end if - cloud_lay_fst = findloc(cloud_mask_layer, .true., dim=1) - cloud_lay_lst = findloc(cloud_mask_layer, .true., dim=1, back = .true.) - cloud_mask(icol,1:cloud_lay_fst,1:ngpt) = .false. - - ilay = cloud_lay_fst - local_rands(1:ngpt) = randoms(1:ngpt,cloud_lay_fst,icol) - cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) - do ilay = cloud_lay_fst+1, cloud_lay_lst - if(cloud_mask_layer(ilay)) then - ! - ! Max-random overlap: - ! new random deviates if the adjacent layer isn't cloudy - ! same random deviates if the adjacent layer is cloudy - ! - if(.not. cloud_mask_layer(ilay-1)) local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) - cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) - else - cloud_mask(icol,ilay,1:ngpt) = .false. - end if - end do - - cloud_mask(icol,cloud_lay_lst+1:nlay, 1:ngpt) = .false. - end do - - end function sampled_mask_max_ran - ! ------------------------------------------------------------------------------------------------- - ! - ! Generate a McICA-sampled cloud mask for exponential-random overlap - ! The overlap parameter alpha is defined between pairs of layers - ! for layer i, alpha(i) describes the overlap betwen cloud_frac(i) and cloud_frac(i+1) - ! By skipping layers with 0 cloud fraction the code forces alpha(i) = 0 for cloud_frac(i) = 0. - ! - function sampled_mask_exp_ran(randoms,cloud_frac,overlap_param,cloud_mask) result(error_msg) - real(wp), dimension(:,:,:), intent(in ) :: randoms ! ngpt,nlay,ncol - real(wp), dimension(:,:), intent(in ) :: cloud_frac ! ncol,nlay - real(wp), dimension(:,:), intent(in ) :: overlap_param ! ncol,nlay-1 - logical, dimension(:,:,:), intent(out) :: cloud_mask ! ncol,nlay,ngpt - character(len=128) :: error_msg - ! ------------------------ - integer :: ncol, nlay, ngpt, icol, ilay, igpt - integer :: cloud_lay_fst, cloud_lay_lst - real(wp) :: rho ! correlation coefficient - real(wp), dimension(size(randoms,1)) :: local_rands - logical, dimension(size(randoms,2)) :: cloud_mask_layer - ! ------------------------ - ! - ! Error checking - ! - error_msg = "" - ncol = size(randoms, 3) - nlay = size(randoms, 2) - ngpt = size(randoms, 1) - if(any([ncol,nlay] /= [size(cloud_frac, 1),size(cloud_frac, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" - return - end if - if(any([ncol,nlay-1] /= [size(overlap_param, 1),size(overlap_param, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and overlap_param(ncol,nlay-1) are inconsistent" - return - end if - if(any([ncol,nlay,ngpt] /= [size(cloud_mask, 1),size(cloud_mask, 2), size(cloud_mask,3)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" - return - end if - - if(any(cloud_frac > 1._wp) .or. any(cloud_frac < 0._wp)) then - error_msg = "sampled_mask_max_ran: cloud fraction values out of range [0,1]" - return - end if - if(any(overlap_param > 1._wp) .or. any(overlap_param < -1._wp)) then - error_msg = "sampled_mask_max_ran: overlap_param values out of range [-1,1]" - return - end if - ! - ! We chould check the random numbers but that would be computationally heavy - ! - ! ------------------------ - ! Construct the cloud mask for each column - ! - do icol = 1, ncol - cloud_mask_layer(1:nlay) = cloud_frac(icol,1:nlay) > 0._wp - if(.not. any(cloud_mask_layer)) then - cloud_mask(icol,1:nlay,1:ngpt) = .false. - cycle - end if - cloud_lay_fst = findloc(cloud_mask_layer, .true., dim=1) - cloud_lay_lst = findloc(cloud_mask_layer, .true., dim=1, back = .true.) - cloud_mask(icol,1:cloud_lay_fst,1:ngpt) = .false. - - ilay = cloud_lay_fst - local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) - cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) - do ilay = cloud_lay_fst+1, cloud_lay_lst - if(cloud_mask_layer(ilay)) then - ! - ! Exponential-random overlap: - ! new random deviates if the adjacent layer isn't cloudy - ! correlated deviates if the adjacent layer is cloudy - ! - if(cloud_mask_layer(ilay-1)) then - ! - ! Create random deviates correlated between this layer and the previous layer - ! (have to remove mean value before enforcing correlation) - ! - rho = overlap_param(icol,ilay-1) - local_rands(1:ngpt) = rho*(local_rands(1:ngpt) -0.5_wp) + & - sqrt(1._wp-rho*rho)*(randoms(1:ngpt,ilay,icol)-0.5_wp) + 0.5_wp - else - local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) - end if - cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) - end if - end do - - cloud_mask(icol,cloud_lay_lst+1:nlay, 1:ngpt) = .false. - end do - end function sampled_mask_exp_ran - - ! ------------------------------------------------------------------------------------------------- - ! - ! Generate a McICA-sampled cloud mask for exponential-decorrelation overlap - ! The overlap parameter is defined between pairs of layers - ! - function sampled_mask_exp_dcorr(randoms1,randoms2,cloud_frac,overlap_param,cloud_mask) result(error_msg) - real(wp), dimension(:,:,:), intent(in ) :: randoms1,randoms2 ! ngpt,nlay,ncol - real(wp), dimension(:,:), intent(in ) :: cloud_frac ! ncol,nlay - real(wp), dimension(:,:), intent(in ) :: overlap_param ! ncol,nlay-1 - logical, dimension(:,:,:), intent(out) :: cloud_mask ! ncol,nlay,ngpt - character(len=128) :: error_msg - ! ------------------------ - integer :: ncol, nlay, ngpt, icol, ilay, igpt - integer :: cloud_lay_fst, cloud_lay_lst - logical, dimension(size(randoms1,2)) :: cloud_mask_layer - ! ------------------------ - ! - ! Error checking - ! - error_msg = "" - ncol = size(randoms1, 3) - nlay = size(randoms1, 2) - ngpt = size(randoms1, 1) - if(any([ncol,nlay] /= [size(cloud_frac, 1),size(cloud_frac, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms1(ngpt,nlay,ncol) and cloud_frac(ncol,nlay) are inconsistent" - return - end if - if(any([ncol,nlay-1] /= [size(overlap_param, 1),size(overlap_param, 2)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms1(ngpt,nlay,ncol) and overlap_param(ncol,nlay-1) are inconsistent" - return - end if - if(any([ncol,nlay,ngpt] /= [size(cloud_mask, 1),size(cloud_mask, 2), size(cloud_mask,3)])) then - error_msg = "sampled_mask_max_ran: sizes of randoms1(ngpt,nlay,ncol) and cloud_mask(ncol,nlay,ngpt) are inconsistent" - return - end if - - if(any(cloud_frac > 1._wp) .or. any(cloud_frac < 0._wp)) then - error_msg = "sampled_mask_max_ran: cloud fraction values out of range [0,1]" - return - end if - if(any(overlap_param > 1._wp) .or. any(overlap_param < -1._wp)) then - error_msg = "sampled_mask_max_ran: overlap_param values out of range [-1,1]" - return - end if - - ! - do icol = 1, ncol - ! Column cloud-mask - cloud_mask_layer(1:nlay) = cloud_frac(icol,1:nlay) > 0._wp - - ! Skip column if no clouds - if(.not. any(cloud_mask_layer)) then - cloud_mask(icol,1:nlay,1:ngpt) = .false. - cycle - end if - - ! Pull out indices for First/Last cloudy layers - cloud_lay_fst = findloc(cloud_mask_layer, .true., dim=1) - cloud_lay_lst = findloc(cloud_mask_layer, .true., dim=1, back = .true.) - - ! Set cloud-mask in layers above cloud to false - cloud_mask(icol,1:cloud_lay_fst,1:ngpt) = .false. - - ! Loop over cloudy-layers - ! - ! First layer - ! - ilay = cloud_lay_fst - cloud_mask(icol,ilay,1:ngpt) = randoms1(1:ngpt,iLay,iCol) > (1._wp - cloud_frac(iCol,iLay)) - ! - ! Subsequent-layers - ! - do ilay = cloud_lay_fst+1, cloud_lay_lst - !if(cloud_mask_layer(ilay) .and. cloud_mask_layer(ilay-1)) then - where(randoms2(1:nGpt,iLay,iCol) .le. overlap_param(iCol,iLay)) - cloud_mask(iCol,iLay,1:nGpt) = randoms1(1:ngpt,iLay-1,iCol) > (1._wp - cloud_frac(iCol,iLay)) - elsewhere - cloud_mask(iCol,iLay,1:nGpt) = randoms1(1:ngpt,iLay,iCol) > (1._wp - cloud_frac(iCol,iLay)) - endwhere - !else - ! cloud_mask(iCol,iLay,1:nGpt) = .false. - !endif - end do - - ! Set cloud-mask in layer below clouds to false - cloud_mask(icol,cloud_lay_lst+1:nlay, 1:ngpt) = .false. - end do - - end function sampled_mask_exp_dcorr - ! ------------------------------------------------------------------------------------------------- - ! - ! Apply a true/false cloud mask to a homogeneous field - ! This could be a kernel - ! - subroutine apply_cloud_mask(ncol,nlay,nbnd,ngpt,band_lims_gpt,cloud_mask,input_field,sampled_field) - integer, intent(in ) :: ncol,nlay,nbnd,ngpt - integer, dimension(2,nbnd), intent(in ) :: band_lims_gpt - logical, dimension(ncol,nlay,ngpt), intent(in ) :: cloud_mask - real(wp), dimension(ncol,nlay,nbnd), intent(in ) :: input_field - real(wp), dimension(ncol,nlay,ngpt), intent(out) :: sampled_field - - integer :: icol,ilay,ibnd,igpt - - do ibnd = 1, nbnd - do igpt = band_lims_gpt(1,ibnd), band_lims_gpt(2,ibnd) - do ilay = 1, nlay - sampled_field(1:ncol,ilay,igpt) = merge(input_field(1:ncol,ilay,ibnd), 0._wp, cloud_mask(1:ncol,ilay,igpt)) - end do - end do - end do - end subroutine apply_cloud_mask - -end module mo_cloud_sampling diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 1d6cc06a1..35ae3c4a8 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -3,7 +3,7 @@ module rrtmgp_lw_cloud_sampling use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubclw, iovrlw use mo_optical_props, only: ty_optical_props_1scl - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, sampled_mask_exp_ran, draw_samples + use rrtmgp_sampling, only: sampled_mask, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use rrtmgp_aux, only: check_error_msg use netcdf @@ -133,41 +133,30 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, enddo ! Cloud-overlap. - select case ( iovrlw ) - case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D, & - cld_frac, & - cldfracMCICA)) - case(3) ! Exponential decorrelation length overlap + ! Maximum-random + if (iovrlw == 1) then + call sampled_mask(rng3D, cld_frac, cldfracMCICA) + endif + ! Exponential decorrelation length overlap + if (iovrlw == 3) then ! Generate second RNG do iCol=1,ncol call random_setseed(ipseed_lw(icol),rng_stat) call random_number(rng1D,rng_stat) rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D, & - rng3D2, & - cld_frac, & - cloud_overlap_param(:,1:nLev-1), & - cldfracMCICA)) - case(4) ! Exponential overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D, & - cld_frac, & - cloud_overlap_param(:,1:nLev-1), & - cldfracMCICA)) - case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D, & - cld_frac, & - cloud_overlap_param(:,1:nLev-1), & - cldfracMCICA)) - end select - + call sampled_mask(rng3D, cld_frac, cldfracMCICA, & + overlap_param = cloud_overlap_param(:,1:nLev-1), & + randoms2 = rng3D2) + endif + ! Exponential or Exponential-random + if (iovrlw == 4 .or. iovrlw == 5) then + call sampled_mask(rng3D, cld_frac, cldfracMCICA, & + overlap_param = cloud_overlap_param(:,1:nLev-1)) + endif + ! Sampling. Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & + call check_error_msg('rrtmgp_lw_cloud_sampling_run_draw_samples',& draw_samples(cldfracMCICA, & lw_optical_props_cloudsByBand, & lw_optical_props_clouds)) @@ -201,13 +190,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, !enddo ! Precipitation overlap. - select case ( iovrlw ) - case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D, & - precip_frac, & - precipfracSAMP)) - case(3) ! Exponential decorrelation length overlap + ! Maximum-random + if (iovrlw == 1) then + call sampled_mask(rng3D, precip_frac, precipfracSAMP) + endif + ! Exponential decorrelation length overlap + if (iovrlw == 3) then ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Generate second RNG !do iCol=1,ncol @@ -215,30 +203,21 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D, & - rng3D2, & - precip_frac, & - precip_overlap_param(:,1:nLev-1), & - precipfracSAMP)) - case(4) ! Exponential overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D, & - precip_frac, & - precip_overlap_param(:,1:nLev-1), & - precipfracSAMP)) - case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D, & - precip_frac, & - precip_overlap_param(:,1:nLev-1), & - precipfracSAMP)) - end select + call sampled_mask(rng3D, precip_frac, precipfracSAMP, & + overlap_param = precip_overlap_param(:,1:nLev-1), & + randoms2 = rng3D2) + endif + ! Exponential or Exponential-random + if (iovrlw == 4 .or. iovrlw == 5) then + call sampled_mask(rng3D, precip_frac, precipfracSAMP, & + overlap_param = precip_overlap_param(:,1:nLev-1)) + endif + ! Sampling. Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_sampling_run', & - draw_samples(precipfracSAMP, & - lw_optical_props_precipByBand, & + call check_error_msg('rrtmgp_lw_precip_sampling_run_draw_samples',& + draw_samples(precipfracSAMP, & + lw_optical_props_precipByBand, & lw_optical_props_precip)) ! #################################################################################### diff --git a/physics/rrtmgp_sampling.F90 b/physics/rrtmgp_sampling.F90 new file mode 100644 index 000000000..29a9064a2 --- /dev/null +++ b/physics/rrtmgp_sampling.F90 @@ -0,0 +1,204 @@ +! This code is part of RRTM for GCM Applications - Parallel (RRTMGP) +! +! Contacts: Robert Pincus and Eli Mlawer +! email: rrtmgp@aer.com +! +! Copyright 2015-2019, Atmospheric and Environmental Research and +! Regents of the University of Colorado. All right reserved. +! +! Use and duplication is permitted under the terms of the +! BSD 3-clause license, see http://opensource.org/licenses/BSD-3-Clause +! ------------------------------------------------------------------------------------------------- +! +! This module provides a simple implementation of sampling for the +! Monte Carlo Independent Pixel Approximation (McICA, doi:10.1029/2002jd003322) +! Cloud optical properties, defined by band and assumed homogenous within each cell (column/layer), +! are randomly sampled to preserve the mean cloud fraction and one of several possible overlap assumptions +! Users supply random numbers with order ngpt,nlay,ncol +! These are only accessed if cloud_fraction(icol,ilay) > 0 so many values don't need to be filled in +! +! Adapted by Dustin Swales on 8/11/2020 for use in UFS (NOAA-PSL/CU-CIRES) +! +! ------------------------------------------------------------------------------------------------- +module rrtmgp_sampling + use mo_rte_kind, only: wp, wl + use mo_optical_props, only: ty_optical_props_arry, & + ty_optical_props_1scl, & + ty_optical_props_2str, & + ty_optical_props_nstr + implicit none + private + public :: draw_samples, sampled_mask +contains + ! ------------------------------------------------------------------------------------------------- + ! + ! Apply a T/F sampled cloud mask to cloud optical properties defined by band to produce + ! McICA-sampled cloud optical properties + ! + ! ------------------------------------------------------------------------------------------------- + function draw_samples(cloud_mask,clouds,clouds_sampled) result(error_msg) + ! Inputs + logical, dimension(:,:,:), intent(in ) :: cloud_mask ! Dimensions ncol,nlay,ngpt + class(ty_optical_props_arry), intent(in ) :: clouds ! Defined by band + + ! Outputs + class(ty_optical_props_arry), intent(inout) :: clouds_sampled ! Defined by g-point + character(len=128) :: error_msg + + ! Local variables + integer :: ncol,nlay,nbnd,ngpt + integer :: imom + + error_msg = "" + + ! Array extents + ncol = clouds%get_ncol() + nlay = clouds%get_nlay() + nbnd = clouds%get_nband() + ngpt = clouds_sampled%get_ngpt() + + ! Optical depth assignment works for 1scl, 2str (also nstr) + call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%tau,clouds_sampled%tau) + ! + ! For 2-stream + ! + select type(clouds) + type is (ty_optical_props_2str) + select type(clouds_sampled) + type is (ty_optical_props_2str) + call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%ssa,clouds_sampled%ssa) + call apply_cloud_mask(ncol,nlay,nbnd,ngpt,clouds_sampled%get_band_lims_gpoint(),cloud_mask,clouds%g, clouds_sampled%g ) + class default + error_msg = "draw_samples: by-band and sampled cloud properties need to be the same variable type" + end select + end select + end function draw_samples + ! ------------------------------------------------------------------------------------------------- + ! + ! Generate a McICA-sampled cloud mask + ! + ! ------------------------------------------------------------------------------------------------- + subroutine sampled_mask(randoms, cloud_frac, cloud_mask, overlap_param, randoms2) + ! Inputs + real(wp), dimension(:,:,:), intent(in ) :: randoms ! ngpt,nlay,ncol + real(wp), dimension(:,:), intent(in ) :: cloud_frac ! ncol,nlay + + ! Outputs + logical, dimension(:,:,:), intent(out) :: cloud_mask ! ncol,nlay,ngpt + + ! Inputs (optional) + real(wp), dimension(:,:), intent(in ), optional :: overlap_param ! ncol,nlay-1 + real(wp), dimension(:,:,:), intent(in ), optional :: randoms2 ! ngpt,nlay,ncol + + ! Local variables + integer :: ncol, nlay, ngpt, icol, ilay, igpt + integer :: cloud_lay_fst, cloud_lay_lst + real(wp) :: rho + real(wp), dimension(size(randoms,1)) :: local_rands + logical, dimension(size(randoms,2)) :: cloud_mask_layer + logical :: l_use_overlap_param = .false. + logical :: l_use_second_rng = .false. + character(len=128) :: error_msg + + ! Array dimensions + ncol = size(randoms, 3) + nlay = size(randoms, 2) + ngpt = size(randoms, 1) + + ! Using cloud-overlap parameter (alpha)? + if (present(overlap_param)) l_use_overlap_param = .true. + + ! Using a second RNG? + if (present(randoms2)) l_use_second_rng = .true. + + ! Construct the cloud mask for each column + do icol = 1, ncol + cloud_mask_layer(1:nlay) = cloud_frac(icol,1:nlay) > 0._wp + if(.not. any(cloud_mask_layer)) then + cloud_mask(icol,1:nlay,1:ngpt) = .false. + cycle + end if + cloud_lay_fst = findloc(cloud_mask_layer, .true., dim=1) + cloud_lay_lst = findloc(cloud_mask_layer, .true., dim=1, back = .true.) + cloud_mask(icol,1:cloud_lay_fst,1:ngpt) = .false. + + ilay = cloud_lay_fst + local_rands(1:ngpt) = randoms(1:ngpt,cloud_lay_fst,icol) + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + do ilay = cloud_lay_fst+1, cloud_lay_lst + ! ################################################################################ + ! Max-random overlap + ! new random deviates if the adjacent layer isn't cloudy + ! same random deviates if the adjacent layer is cloudy + ! ################################################################################ + if (.not. l_use_overlap_param) then + if(cloud_mask_layer(ilay)) then + if(.not. cloud_mask_layer(ilay-1)) local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + else + cloud_mask(icol,ilay,1:ngpt) = .false. + end if + end if ! END COND: Maximum-random overlap + ! ################################################################################ + ! Exponential-random overlap + ! new random deviates if the adjacent layer isn't cloudy + ! correlated deviates if the adjacent layer is cloudy + ! ################################################################################ + if (l_use_overlap_param) then + if(cloud_mask_layer(ilay)) then + if(cloud_mask_layer(ilay-1)) then + ! Create random deviates correlated between this layer and the previous layer + ! (have to remove mean value before enforcing correlation). + rho = overlap_param(icol,ilay-1) + local_rands(1:ngpt) = rho*(local_rands(1:ngpt) -0.5_wp) + & + sqrt(1._wp-rho*rho)*(randoms(1:ngpt,ilay,icol)-0.5_wp) + 0.5_wp + else + local_rands(1:ngpt) = randoms(1:ngpt,ilay,icol) + end if + cloud_mask(icol,ilay,1:ngpt) = local_rands(1:ngpt) > (1._wp - cloud_frac(icol,ilay)) + endif + endif ! END COND: Exponential/Exponential-random overlap + ! ################################################################################ + ! Exponential-decorrelation overlap + ! new random deviates if the adjacent layer isn't cloudy + ! correlated deviates if the adjacent layer is cloudy and decorrelation-length + ! ################################################################################ + if (l_use_overlap_param .and. l_use_second_rng) then + where(randoms2(1:nGpt,iLay,iCol) .le. overlap_param(iCol,iLay)) + cloud_mask(iCol,iLay,1:nGpt) = randoms(1:ngpt,iLay-1,iCol) > (1._wp - cloud_frac(iCol,iLay)) + elsewhere + cloud_mask(iCol,iLay,1:nGpt) = randoms(1:ngpt,iLay,iCol) > (1._wp - cloud_frac(iCol,iLay)) + end where + endif ! END COND: Exponential decorrelation-length + end do ! END LOOP: Layers + + ! Set cloud-mask in layer below clouds to false + cloud_mask(icol,cloud_lay_lst+1:nlay, 1:ngpt) = .false. + end do ! END LOOP: Columns + + end subroutine sampled_mask + ! ------------------------------------------------------------------------------------------------- + ! + ! Apply a true/false cloud mask to a homogeneous field + ! This could be a kernel + ! + ! ------------------------------------------------------------------------------------------------- + subroutine apply_cloud_mask(ncol,nlay,nbnd,ngpt,band_lims_gpt,cloud_mask,input_field,sampled_field) + integer, intent(in ) :: ncol,nlay,nbnd,ngpt + integer, dimension(2,nbnd), intent(in ) :: band_lims_gpt + logical, dimension(ncol,nlay,ngpt), intent(in ) :: cloud_mask + real(wp), dimension(ncol,nlay,nbnd), intent(in ) :: input_field + real(wp), dimension(ncol,nlay,ngpt), intent(out) :: sampled_field + + integer :: icol,ilay,ibnd,igpt + + do ibnd = 1, nbnd + do igpt = band_lims_gpt(1,ibnd), band_lims_gpt(2,ibnd) + do ilay = 1, nlay + sampled_field(1:ncol,ilay,igpt) = merge(input_field(1:ncol,ilay,ibnd), 0._wp, cloud_mask(1:ncol,ilay,igpt)) + end do + end do + end do + end subroutine apply_cloud_mask + +end module rrtmgp_sampling diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 0a0511bc2..802cad840 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -3,8 +3,7 @@ module rrtmgp_sw_cloud_sampling use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use physparam, only: isubcsw, iovrsw use mo_optical_props, only: ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_dcorr, & - sampled_mask_exp_ran, draw_samples + use rrtmgp_sampling, only: sampled_mask, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use rrtmgp_aux, only: check_error_msg use netcdf @@ -137,40 +136,29 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd enddo ! Cloud overlap. - select case ( iovrsw ) - case(1) ! Maximum-random overlap - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D, & - cld_frac(idxday(1:nDay),:), & - cldfracMCICA)) - case(3) ! Decorrelation-length overlap + ! Maximum-random overlap + if (iovrsw == 1) then + call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA) + endif + ! Decorrelation-length overlap + if (iovrsw == 3) then do iday=1,nday call random_setseed(ipseed_sw(iday),rng_stat) call random_number(rng1D,rng_stat) rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D, & - rng3D2, & - cld_frac(idxday(1:nDay),:), & - cloud_overlap_param(idxday(1:nDay),1:nLev-1), & - cldfracMCICA)) - case(4) ! Exponential overlap - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D, & - cld_frac(idxday(1:nDay),:), & - cloud_overlap_param(idxday(1:nDay),1:nLev-1), & - cldfracMCICA)) - case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D, & - cld_frac(idxday(1:nDay),:), & - cloud_overlap_param(idxday(1:nDay),1:nLev-1), & - cldfracMCICA)) - end select + call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA, & + overlap_param = cloud_overlap_param(idxday(1:nDay),1:nLev-1),& + randoms2 = rng3D2) + endif + ! Exponential overlap + if (iovrsw == 4 .or. iovrsw == 5) then + call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA, & + overlap_param = cloud_overlap_param(idxday(1:nDay),1:nLev-1)) + endif ! Sampling. Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_cloud_sampling_run_draw_samples', & draw_samples(cldfracMCICA, & sw_optical_props_cloudsByBand, & sw_optical_props_clouds)) @@ -204,41 +192,29 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd !enddo ! Precipitation overlap - select case ( iovrsw ) - case(1) ! Maximum-random - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_max_ran(rng3D, & - precip_frac(idxday(1:nDay),:), & - precipfracSAMP)) - case(3) ! Exponential-random + ! Maximum-random + if (iovrsw == 1) then + call sampled_mask(rng3D, precip_frac(idxday(1:nDay),:), precipfracSAMP) + endif + ! Exponential decorrelation length overlap + if (iovrsw == 3) then !! Generate second RNG !do iday=1,nday ! call random_setseed(ipseed_sw(iday),rng_stat) ! call random_number(rng1D,rng_stat) ! rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) !enddo - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_dcorr(rng3D, & - rng3D2, & - precip_frac(idxday(1:nDay),:), & - precip_overlap_param(idxday(1:nDay),1:nLev-1), & - precipfracSAMP)) - case(4) ! Exponential overlap - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D, & - precip_frac(idxday(1:nDay),:), & - precip_overlap_param(idxday(1:nDay),1:nLev-1), & - precipfracSAMP)) - case(5) ! Exponential-random overlap - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & - sampled_mask_exp_ran(rng3D, & - precip_frac(idxday(1:nDay),:), & - precip_overlap_param(idxday(1:nDay),1:nLev-1), & - precipfracSAMP)) - end select - + call sampled_mask(rng3D, precip_frac(idxday(1:nDay),:), precipfracSAMP, & + overlap_param = precip_overlap_param(idxday(1:nDay),1:nLev-1),& + randoms2 = rng3D2) + endif + if (iovrsw == 4 .or. iovrsw == 5) then + call sampled_mask(rng3D, precip_frac(idxday(1:nDay),:),precipfracSAMP, & + overlap_param = precip_overlap_param(idxday(1:nDay),1:nLev-1)) + endif + ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_sampling_run', & + call check_error_msg('rrtmgp_sw_precip_sampling_run_draw_samples', & draw_samples(precipfracSAMP, & sw_optical_props_precipByBand, & sw_optical_props_precip)) From 4c5224a91fa1cef8cf4a4f5950678f04ad729a40 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 11 Aug 2020 14:02:27 -0600 Subject: [PATCH 296/404] Add dummy call to get_alpha_exp to physics/module_SGSCloud_RadPre.F90, merge get_alpha from RRTMG with get_alpha_exp from RRTMGP --- physics/GFS_rrtmgp_zhaocarr_pre.F90 | 2 +- physics/module_SGSCloud_RadPre.F90 | 34 ++++++++++++++++++++++++++--- physics/module_SGSCloud_RadPre.meta | 8 +++++++ physics/radiation_clouds.f | 30 ++++++++++++------------- physics/radlw_main.f | 2 +- physics/radsw_main.f | 2 +- 6 files changed, 57 insertions(+), 21 deletions(-) diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.F90 b/physics/GFS_rrtmgp_zhaocarr_pre.F90 index ac9fb7446..35b404b45 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.F90 +++ b/physics/GFS_rrtmgp_zhaocarr_pre.F90 @@ -6,7 +6,7 @@ module GFS_rrtmgp_zhaocarr_pre use machine, only: kind_phys use rrtmgp_aux, only: check_error_msg use funcphys, only: fpvs - use module_radiation_clouds, only: get_alpha_dcorr + use module_radiation_clouds, only: get_alpha_dcorr ! Zhao-Carr MP parameters. real(kind_phys), parameter :: & diff --git a/physics/module_SGSCloud_RadPre.F90 b/physics/module_SGSCloud_RadPre.F90 index 5a1a2744f..23bc29b11 100644 --- a/physics/module_SGSCloud_RadPre.F90 +++ b/physics/module_SGSCloud_RadPre.F90 @@ -49,6 +49,7 @@ subroutine sgscloud_radpre_run( & nlay, plyr, xlat, dz,de_lgth, & cldsa,mtopa,mbota, & imp_physics, imp_physics_gfdl,& + iovr, & errmsg, errflg ) ! should be moved to inside the mynn: @@ -81,6 +82,7 @@ subroutine sgscloud_radpre_run( & real(kind=kind_phys), dimension(im,nlay), intent(in) :: plyr, dz real(kind=kind_phys), dimension(im,5), intent(inout) :: cldsa integer, dimension(im,3), intent(inout) :: mbota, mtopa + integer, intent(in) :: iovr character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables @@ -93,6 +95,9 @@ subroutine sgscloud_radpre_run( & real(kind=kind_phys), dimension(im) :: rxlat real (kind=kind_phys):: Tc, iwc integer :: i, k, id + ! DH* 20200723 - see comment at the end of this routine around 'gethml' + real(kind=kind_phys), dimension(im,nlay) :: alpha_dummy + ! *DH ! PARAMETERS FOR RANDALL AND XU (1996) CLOUD FRACTION REAL, PARAMETER :: coef_p = 0.25, coef_gamm = 0.49, coef_alph = 100. @@ -123,7 +128,7 @@ subroutine sgscloud_radpre_run( & if (h2oliq > clwt) then onemrh= max( 1.e-10, 1.0-rhgrid ) - tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan + tem1 = min(max((onemrh*qsat)**0.49,0.0001),1.0) !jhan tem1 = 100.0 / tem1 value = max( min( tem1*(h2oliq-clwt), 50.0 ), 0.0 ) tem2 = sqrt( sqrt(rhgrid) ) @@ -304,12 +309,35 @@ subroutine sgscloud_radpre_run( & cldcnv = 0. +! DH* 20200723 +! iovr == 4 or 5 requires alpha, which is computed in GFS_rrmtg_pre, +! which comes after sgscloud_radpre. Computing alpha here requires +! a lot more input variables and computations (dzlay etc.), and +! recomputing it in GFS_rrmtg_pre is a waste of time. Workaround: +! pass a dummy array initialized to zero to gethml for other values of iovr. + if ( iovr == 4 .or. iovr == 5 ) then + errmsg = 'Logic error in sgscloud_radpre: iovr==4 or 5 not implemented' + errflg = 1 + return + end if +!! Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options +! if ( iovr == 4 .or. iovr == 5 ) then +! call get_alpha_exp & +!! --- inputs: +! (im, nlay, dzlay, iovr, latdeg, julian, yearlen, clouds1, & +!! --- outputs: +! alpha & +! ) +! endif + alpha_dummy = 0.0 +! *DH 2020723 + !> - Recompute the diagnostic high, mid, low, total and bl cloud fraction call gethml & ! --- inputs: - ( plyr, ptop1, clouds1, cldcnv, dz, de_lgth, im, nlay, & + ( plyr, ptop1, clouds1, cldcnv, dz, de_lgth, alpha_dummy, & ! --- outputs: - cldsa, mtopa, mbota) + im, nlay, cldsa, mtopa, mbota) !print*,"===Finished adding subgrid clouds to the resolved-scale clouds" !print*,"qc_save:",qc_save(1,1)," qi_save:",qi_save(1,1) diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 2658e8638..857ab884b 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -341,6 +341,14 @@ type = integer intent = in optional = F +[iovr] + standard_name = flag_for_max_random_overlap_clouds_for_radiation + long_name = max-random overlap clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 5e9aa465e..828db4ed0 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -837,9 +837,9 @@ subroutine progcld1 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -1309,9 +1309,9 @@ subroutine progcld2 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -1732,9 +1732,9 @@ subroutine progcld3 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -2095,9 +2095,9 @@ subroutine progcld4 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -2449,9 +2449,9 @@ subroutine progcld4o & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -2817,9 +2817,9 @@ subroutine progcld5 & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -3212,9 +3212,9 @@ subroutine progclduni & enddo endif -!> - Call subroutine get_alpha to define alpha parameter for EXP and ER cloud overlap options +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha & + call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & ! --- outputs: @@ -3761,7 +3761,7 @@ subroutine get_alpha_exp & ! random, and blocks of cloudy layers separated by one or more ! ! clear layers are correlated randomly. ! ! ! -! usage: call get_alpha ! +! usage: call get_alpha_exp ! ! ! ! subprograms called: none ! ! ! diff --git a/physics/radlw_main.f b/physics/radlw_main.f index cdcb91b48..f470ad109 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -2060,7 +2060,7 @@ subroutine mcica_subcol & ! ! NOTE: The code below is identical for case (4) and (5) because the ! distinction in the vertical correlation between EXP and ER is already -! built into the specification of alpha (in subroutine get_alpha). +! built into the specification of alpha (in subroutine get_alpha_exp). ! --- setup 2 sets of random numbers diff --git a/physics/radsw_main.f b/physics/radsw_main.f index d285a8901..3b975313b 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -2181,7 +2181,7 @@ subroutine mcica_subcol & ! ! NOTE: The code below is identical for case (4) and (5) because the ! distinction in the vertical correlation between EXP and ER is already -! built into the specification of alpha (in subroutine get_alpha). +! built into the specification of alpha (in subroutine get_alpha_exp). ! --- setup 2 sets of random numbers From 767f9b577306b0c86a9f867cd036cd4cb0059698 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 13 Aug 2020 08:16:54 -0600 Subject: [PATCH 297/404] Update dependencies for physics/rrtmgp_lw_cloud_sampling.meta and physics/rrtmgp_sw_cloud_sampling.meta --- physics/rrtmgp_lw_cloud_sampling.meta | 2 +- physics/rrtmgp_sw_cloud_sampling.meta | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 7d63b0d99..ff161d902 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmgp_lw_cloud_sampling type = scheme - dependencies = machine.F,mersenne_twister.f,physparam.f,mo_cloud_sampling.F90,rrtmgp_aux.F90 + dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_sampling.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 397a14d12..7890d750e 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmgp_sw_cloud_sampling type = scheme - dependencies = machine.F,mersenne_twister.f,physparam.f,mo_cloud_sampling.F90,rrtmgp_aux.F90 + dependencies = machine.F,mersenne_twister.f,physparam.f,rrtmgp_sampling.F90,rrtmgp_aux.F90 ######################################################################## [ccpp-arg-table] From 1c7b52ab85ecaf370e56f0b5f3e7e4a351c4170f Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Thu, 13 Aug 2020 13:41:21 -0600 Subject: [PATCH 298/404] - Physics changes made for/during HFIP 2020 - All changes in GF (set c0 = 0.02 for mid-clouds, changes water-ice transition temperature to what was used in FIM) --- physics/cu_gf_deep.F90 | 30 ++++++++++++++++++++---------- physics/cu_gf_driver.F90 | 4 ++-- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/physics/cu_gf_deep.F90 b/physics/cu_gf_deep.F90 index 4afad80d1..a07523342 100644 --- a/physics/cu_gf_deep.F90 +++ b/physics/cu_gf_deep.F90 @@ -338,6 +338,7 @@ subroutine cu_gf_deep_run( & integer :: turn,pmin_lev(its:ite),start_level(its:ite),ktopkeep(its:ite) real(kind=kind_phys), dimension (its:ite,kts:kte) :: dtempdz integer, dimension (its:ite,kts:kte) :: k_inv_layers + real(kind=kind_phys) :: c0 ! HCB ! rainevap from sas real(kind=kind_phys) zuh2(40) @@ -383,6 +384,14 @@ subroutine cu_gf_deep_run( & ! sas ! lambau=0. ! pgcon=-.55 +! +!---------------------------------------------------- ! HCB +! Set cloud water to rain water conversion rate (c0) + c0=0.004 + if(imid.eq.1)then + c0=0.002 + endif + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ztexec(:) = 0. zqexec(:) = 0. @@ -937,14 +946,14 @@ subroutine cu_gf_deep_run( & if(imid.eq.1)then call cup_up_moisture('mid',ierr,zo_cup,qco,qrco,pwo,pwavo, & p_cup,kbcon,ktop,dbyo,clw_all,xland1, & - qo,gammao_cup,zuo,qeso_cup,k22,qo_cup, & + qo,gammao_cup,zuo,qeso_cup,k22,qo_cup,c0, & zqexec,ccn,rho,c1d,tn_cup,up_massentr,up_massdetr,psum,psumh, & 1,itf,ktf, & its,ite, kts,kte) else call cup_up_moisture('deep',ierr,zo_cup,qco,qrco,pwo,pwavo, & p_cup,kbcon,ktop,dbyo,clw_all,xland1, & - qo,gammao_cup,zuo,qeso_cup,k22,qo_cup, & + qo,gammao_cup,zuo,qeso_cup,k22,qo_cup,c0, & zqexec,ccn,rho,c1d,tn_cup,up_massentr,up_massdetr,psum,psumh, & 1,itf,ktf, & its,ite, kts,kte) @@ -1266,14 +1275,14 @@ subroutine cu_gf_deep_run( & ! if(imid.eq.1)then ! call cup_up_moisture('mid',ierr,zo_cup,qco,qrco,pwo,pwavo, & ! p_cup,kbcon,ktop,dbyo,clw_all,xland1, & -! qo,gammao_cup,zuo,qeso_cup,k22,qo_cup, & +! qo,gammao_cup,zuo,qeso_cup,k22,qo_cup,c0, & ! zqexec,ccn,rho,c1d,tn_cup,up_massentr,up_massdetr,psum,psumh, & ! 1,itf,ktf, & ! its,ite, kts,kte) ! else ! call cup_up_moisture('deep',ierr,zo_cup,qco,qrco,pwo,pwavo, & ! p_cup,kbcon,ktop,dbyo,clw_all,xland1, & -! qo,gammao_cup,zuo,qeso_cup,k22,qo_cup, & +! qo,gammao_cup,zuo,qeso_cup,k22,qo_cup,c0, & ! zqexec,ccn,rho,c1d,tn_cup,up_massentr,up_massdetr,psum,psumh, & ! 1,itf,ktf, & ! its,ite, kts,kte) @@ -3865,7 +3874,7 @@ end subroutine cup_output_ens_3d !>\ingroup cu_gf_deep_group subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, & p_cup,kbcon,ktop,dby,clw_all,xland1, & - q,gamma_cup,zu,qes_cup,k22,qe_cup, & + q,gamma_cup,zu,qes_cup,k22,qe_cup,c0, & zqexec,ccn,rho,c1d,t, & up_massentr,up_massdetr,psum,psumh, & itest,itf,ktf, & @@ -3904,6 +3913,8 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, & integer, dimension (its:ite) & ,intent (in ) :: & kbcon,ktop,k22,xland1 + real(kind=kind_phys), intent (in ) :: & ! HCB + c0 ! ! input and output ! @@ -3944,7 +3955,7 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, & integer :: start_level(its:ite) real(kind=kind_phys) :: & prop_ave,qrcb_h,bdsp,dp,rhoc,qrch,qaver,clwdet, & - c0,dz,berryc0,q1,berryc + dz,berryc0,q1,berryc real(kind=kind_phys) :: & denom, c0t real(kind=kind_phys), dimension (kts:kte) :: & @@ -3952,7 +3963,6 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, & ! prop_b(kts:kte)=0 iall=0 - c0=.002 clwdet=50. bdsp=bdispm ! @@ -3999,7 +4009,7 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, & enddo do 100 i=its,itf - c0=.004 + !c0=.004 HCB tuning if(ierr(i).eq.0)then ! below lfc, but maybe above lcl @@ -4031,8 +4041,8 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, & !now do the rest ! do k=kbcon(i)+1,ktop(i) - c0=.004 - if(t(i,k).lt.270.)c0=.002 + !c0=.004 HCB tuning + !if(t(i,k).lt.270.)c0=.002 HCB tuning if(t(i,k) > 273.16) then c0t = c0 else diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 5c43709d1..aa3ca977e 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -190,10 +190,10 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv, & real(kind=kind_phys), dimension (im) :: hfx,qfx real(kind=kind_phys) tem,tem1,tf,tcr,tcrf - parameter (tf=243.16, tcr=270.16, tcrf=1.0/(tcr-tf)) + !parameter (tf=243.16, tcr=270.16, tcrf=1.0/(tcr-tf)) ! FV3 original !parameter (tf=263.16, tcr=273.16, tcrf=1.0/(tcr-tf)) !parameter (tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf)) - !parameter (tf=258.16, tcr=273.16, tcrf=1.0/(tcr-tf)) ! as fim + parameter (tf=258.16, tcr=273.16, tcrf=1.0/(tcr-tf)) ! as fim, HCB tuning ! initialize ccpp error handling variables errmsg = '' errflg = 0 From 0249e670919dd32cb7810b57fdf0823e8569c8df Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Tue, 11 Aug 2020 15:57:53 +0000 Subject: [PATCH 299/404] rte-rrtmgp submodule update --- physics/GFS_rrtmgp_sw_pre.F90 | 11 +++++------ physics/rte-rrtmgp | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 2683a637a..f6aac60b1 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -40,17 +40,16 @@ subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_ me, & ! Current MPI rank nCol, & ! Number of horizontal grid points nLev, & ! Number of vertical layers - n_var_lndp & ! Number of surface variables perturbed + n_var_lndp, & ! Number of surface variables perturbed lndp_type ! Type of land perturbations scheme used - character(len=3), dimension(n_var_lndp), intent(in) :: + character(len=3), dimension(n_var_lndp), intent(in) :: & lndp_var_list - real(kind_phys), dimension(n_var_lndp), intent(in) :: + real(kind_phys), dimension(n_var_lndp), intent(in) :: & lndp_prt_list logical,intent(in) :: & - lsswr, ! Call RRTMGP SW radiation? + lsswr ! Call RRTMGP SW radiation? real(kind_phys), intent(in) :: & - solhr ! Time in hours after 00z at the current timestep - lndp_alb ! Magnitude of surface albedo perturbation (frac) + solhr ! Time in hours after 00z at the current timestep real(kind_phys), dimension(nCol), intent(in) :: & lsmask, & ! Landmask: sea/land/ice=0/1/2 lon, & ! Longitude diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 7dfff2025..6ee0b62c1 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 7dfff2025cae02c84b12df2402a39d77065f0e62 +Subproject commit 6ee0b62c1ac6204a89a4e922382b611c16dd5fa7 From 43ba47d015fb6d136ebd503b4d17093ac6a26467 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 18 Aug 2020 17:26:03 -0600 Subject: [PATCH 300/404] fix diagnostic tendencies in moninedmf.f, satmedmfvdifq.F, module_MYNNPBL_wrapper.F90, ysuvdif.F90, shinhongvdif.F90 --- physics/module_MYNNPBL_wrapper.F90 | 62 +++++++----------------- physics/module_bl_mynn.F90 | 2 +- physics/moninedmf.f | 15 ++---- physics/moninedmf.meta | 8 ---- physics/satmedmfvdifq.F | 4 +- physics/shinhongvdif.F90 | 46 +++++++++++++++++- physics/shinhongvdif.meta | 76 ++++++++++++++++++++++++++++++ physics/ysuvdif.F90 | 46 +++++++++++++++++- physics/ysuvdif.meta | 76 ++++++++++++++++++++++++++++++ 9 files changed, 264 insertions(+), 71 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index 8fd727148..f188ebbb7 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -708,16 +708,14 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo enddo endif - if_lsidea: if (lsidea) then - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + RTHBLTEN(i,k)*exner(i,k)*dtf - elseif(ldiag3d) then - do k=1,levs - do i=1,im - tem = RTHBLTEN(i,k)*exner(i,k) - (htrlw(i,k)+htrsw(i,k)*xmu(i)) - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + tem*dtf - enddo - enddo - endif if_lsidea + + if (lsidea .or. ldiag3d) then + do k = 1, levs + do i = 1, im + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + RTHBLTEN(i,k)*exner(i,k)*dtf + enddo + enddo + endif endif accum_duvt3dt !Update T, U and V: !do k = 1, levs @@ -739,13 +737,6 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo - if(lssav .and. ldiag3d .and. qdiag3d) then - do k=1,levs - do i=1,im - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf - enddo - enddo - endif !Update moist species: !do k=1,levs ! do i=1,im @@ -770,13 +761,6 @@ SUBROUTINE mynnedmf_wrapper_run( & dqdt_ice_aer_num_conc(i,k) = RQNIFABLTEN(i,k) enddo enddo - if(lssav .and. ldiag3d .and. qdiag3d) then - do k=1,levs - do i=1,im - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf - enddo - enddo - endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -800,13 +784,6 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo - if(lssav .and. ldiag3d .and. qdiag3d) then - do k=1,levs - do i=1,im - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf - enddo - enddo - endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -830,13 +807,6 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo - if(lssav .and. ldiag3d .and. qdiag3d) then - do k=1,levs - do i=1,im - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf - enddo - enddo - endif !do k=1,levs ! do i=1,im ! qgrs_water_vapor(i,k) = qgrs_water_vapor(i,k) + (RQVBLTEN(i,k)/(1.0+RQVBLTEN(i,k)))*delt @@ -858,15 +828,15 @@ SUBROUTINE mynnedmf_wrapper_run( & !dqdt_ozone(i,k) = 0.0 enddo enddo - if(lssav .and. ldiag3d .and. qdiag3d) then - do k=1,levs - do i=1,im - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf - enddo - enddo - endif endif - + + if(lssav .and. ldiag3d .and. qdiag3d) then + do k=1,levs + do i=1,im + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf + enddo + enddo + endif if (lprnt) then print* diff --git a/physics/module_bl_mynn.F90 b/physics/module_bl_mynn.F90 index 2c1ce9fe0..fa892eba8 100644 --- a/physics/module_bl_mynn.F90 +++ b/physics/module_bl_mynn.F90 @@ -3132,7 +3132,7 @@ SUBROUTINE mynn_tendencies(kts,kte, & & 0.5*dtz(k)*(s_aw(k)-s_aw(k+1)) c(k)= -dtz(k)*khdz(k+1)*rhoinv(k) - 0.5*dtz(k)*s_aw(k+1) d(k)=thl(k) + tcd(k)*delt + dtz(k)*(s_awthl(k)-s_awthl(k+1)) + & - & + diss_heat(k)*delt*dheat_opt + & + & diss_heat(k)*delt*dheat_opt + & & sub_thl(k)*delt + det_thl(k)*delt ENDDO diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 63edc3486..c8bf103fc 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -64,7 +64,7 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & & prsi,del,prsl,prslk,phii,phil,delt,dspheat, & & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & - & xkzminv,moninq_fac,lssav,ldiag3d,qdiag3d,lsidea,ntoz, & + & xkzminv,moninq_fac,lssav,ldiag3d,qdiag3d,ntoz, & & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL, & & flag_for_pbl_generic_tend, errmsg,errflg) ! @@ -76,7 +76,7 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & ! ! arguments ! - logical, intent(in) :: lprnt,lssav,ldiag3d,qdiag3d,lsidea + logical, intent(in) :: lprnt,lssav,ldiag3d,qdiag3d logical, intent(in) :: flag_for_pbl_generic_tend integer, intent(in) :: ipr integer, intent(in) :: im, km, ntrac, ntcw, kinver(im), ntoz @@ -1043,14 +1043,9 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend if(lssav .and. ldiag3d .and. .not. & & flag_for_pbl_generic_tend) then - if(lsidea) then - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*rdt - else - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + & - & ((ttend-hlw(i,k)-swh(i,k)*xmu(i))*rdt) - endif + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*delt if(qdiag3d) then - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*rdt + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*delt endif endif enddo @@ -1071,7 +1066,7 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & is = (kk-1) * km do k = 1, km do i = 1, im - qtend = (a2(i,k+is)-q1(i,k,kk))*rdt + qtend = (a2(i,k+is)-q1(i,k,kk)) do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend enddo enddo diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 196862ae6..b55329717 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -515,14 +515,6 @@ type = logical intent = in optional = F -[lsidea] - standard_name = flag_idealized_physics - long_name = flag for idealized physics - units = flag - dimensions = () - type = logical - intent = in - optional = F [ntoz] standard_name = index_for_ozone long_name = tracer index for ozone mixing ratio diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index f192788fe..28c30e55b 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -1425,14 +1425,14 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & do k = 1,km do i = 1,im ttend = (f1(i,k)-t1(i,k))*rdt - dt3dt(i,k) = dt3dt(i,k)+dspfac*ttend*delt + dt3dt(i,k) = dt3dt(i,k)+ttend*delt enddo enddo if(qdiag3d) then do k = 1,km do i = 1,im qtend = (f2(i,k)-q1(i,k,1))*rdt - dq3dt(i,k) = dq3dt(i,k)+dspfac*qtend*delt + dq3dt(i,k) = dq3dt(i,k)+qtend*delt enddo enddo endif diff --git a/physics/shinhongvdif.F90 b/physics/shinhongvdif.F90 index 83270a08d..4032f1828 100644 --- a/physics/shinhongvdif.F90 +++ b/physics/shinhongvdif.F90 @@ -34,7 +34,9 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & dusfc,dvsfc,dtsfc,dqsfc, & dt,kpbl1d, & u10,v10, & - dx,errmsg,errflg ) + dx,lssav,ldiag3d,qdiag3d, & + flag_for_pbl_generic_tend,ntoz,du3dt_PBL,dv3dt_PBL, & + dt3dt_PBL,dq3dt_PBL,do3dt_PBL,errmsg,errflg ) use machine , only : kind_phys ! @@ -104,8 +106,10 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & real(kind=kind_phys),parameter :: cpent = -0.4,rigsmax = 100. real(kind=kind_phys),parameter :: entfmin = 1.0, entfmax = 5.0 ! 1D in - integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw + integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw,ntoz real(kind=kind_phys), intent(in ) :: g,cp,rd,rv,ep1,ep2,xlv,dt + logical, intent(in ) :: lssav, ldiag3d, qdiag3d, & + flag_for_pbl_generic_tend ! 3D in real(kind=kind_phys), dimension(im, km) , & intent(in ) :: phil, & @@ -127,6 +131,8 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & ttnp real(kind=kind_phys), dimension(im, km, ntrac ) , & intent(inout) :: qtnp + real(kind=kind_phys), dimension(im,km) , & + intent(inout) :: du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL ! 2D in integer, dimension(im) , & intent(in ) :: landmask @@ -956,6 +962,14 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & endif enddo enddo + if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then + do k = kte,kts,-1 + do i = its,ite + ttend = (f1(i,k)-thx(i,k)+300.)*rdt*pi2d(i,k) + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*dtstep + enddo + enddo + endif ! ! compute tridiagonal matrix elements for moisture, clouds, and gases ! @@ -1080,6 +1094,14 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & tvflux_e(i,k) = tflux_e(i,k) + qflux_e(i,k)*ep1*thx(i,k) enddo enddo + if(lssav .and. ldiag3d .and. qdiag3d .and. .not. flag_for_pbl_generic_tend) then + do k = kte,kts,-1 + do i = its,ite + qtend = (f3(i,k,1)-qx(i,k,1))*rdt + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*dtstep + enddo + enddo + endif ! print*,"qtnp:",maxval(qtnp(:,:,1)),minval(qtnp(:,:,1)) ! do k = kts,kte @@ -1109,6 +1131,16 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & enddo endif enddo + if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. & + & .not. flag_for_pbl_generic_tend) then + ic = ntoz + do k = kte,kts,-1 + do i = its,ite + qtend = f3(i,k,ic)-qx(i,k,ic) + do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend + enddo + enddo + endif endif ! ! compute tridiagonal matrix elements for momentum @@ -1200,6 +1232,16 @@ subroutine shinhongvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & dvsfc(i) = dvsfc(i) + vtend*conwrc*del(i,k) enddo enddo + if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then + do k = kte,kts,-1 + do i = its,ite + utend = (f1(i,k)-ux(i,k))*rdt + vtend = (f2(i,k)-vx(i,k))*rdt + du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*dtstep + dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*dtstep + enddo + enddo + endif ! do i = its,ite kpbl1d(i) = kpbl(i) diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index 08646d7b9..5fa62cd27 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -407,6 +407,82 @@ kind = kind_phys intent = in optional = F +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[flag_for_pbl_generic_tend] + standard_name = flag_for_generic_planetary_boundary_layer_tendency + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[du3dt_PBL] + standard_name = cumulative_change_in_x_wind_due_to_PBL + long_name = cumulative change in x wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_PBL] + standard_name = cumulative_change_in_y_wind_due_to_PBL + long_name = cumulative change in y wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dt3dt_PBL] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_PBL] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[do3dt_PBL] + standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL + long_name = cumulative change in ozone mixing ratio due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/ysuvdif.F90 b/physics/ysuvdif.F90 index 51ed599f0..75c0b31d3 100644 --- a/physics/ysuvdif.F90 +++ b/physics/ysuvdif.F90 @@ -33,7 +33,9 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & landmask,heat,evap,wspd,br, & g,rd,cp,rv,ep1,ep2,xlv, & dusfc,dvsfc,dtsfc,dqsfc, & - dt,kpbl1d,u10,v10,errmsg,errflg ) + dt,kpbl1d,u10,v10,lssav,ldiag3d,qdiag3d, & + flag_for_pbl_generic_tend,ntoz,du3dt_PBL,dv3dt_PBL, & + dt3dt_PBL,dq3dt_PBL,do3dt_PBL,errmsg,errflg ) use machine , only : kind_phys ! @@ -59,7 +61,7 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & ! !------------------------------------------------------------------------------------- ! input variables - integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw + integer, intent(in ) :: im,km,ntrac,ndiff,ntcw,ntiw,ntoz real(kind=kind_phys), intent(in ) :: g,cp,rd,rv,ep1,ep2,xlv,dt real(kind=kind_phys), dimension( im,km ), & @@ -76,6 +78,8 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & u10,v10,xmu integer, dimension(im) ,& intent(in ) :: landmask + logical, intent(in ) :: lssav, ldiag3d, qdiag3d, & + flag_for_pbl_generic_tend ! !---------------------------------------------------------------------------------- ! input/output variables @@ -84,6 +88,8 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & intent(inout) :: utnp,vtnp,ttnp real(kind=kind_phys), dimension( im,km,ntrac ) , & intent(inout) :: qtnp + real(kind=kind_phys), dimension(im,km) , & + intent(inout) :: du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL ! !--------------------------------------------------------------------------------- ! output variables @@ -847,6 +853,14 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & dtsfc(i) = dtsfc(i)+ttend*cont*del(i,k) enddo enddo + if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then + do k = km,1,-1 + do i = 1,im + ttend = (f1(i,k)-thx(i,k)+300.)*rdt*pi2d(i,k) + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*dtstep + enddo + enddo + endif ! ! compute tridiagonal matrix elements for moisture, clouds, and gases ! @@ -955,6 +969,14 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & dqsfc(i) = dqsfc(i)+qtend*conq*del(i,k) enddo enddo + if(lssav .and. ldiag3d .and. qdiag3d .and. .not. flag_for_pbl_generic_tend) then + do k = km,1,-1 + do i = 1,im + qtend = (f3(i,k,1)-qx(i,k,1))*rdt + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*dtstep + enddo + enddo + endif ! if(ndiff.ge.2) then do ic = 2,ndiff @@ -965,6 +987,16 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & enddo enddo enddo + if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. & + & .not. flag_for_pbl_generic_tend) then + ic = ntoz + do k = km,1,-1 + do i = 1,im + qtend = f3(i,k,ic)-qx(i,k,ic) + do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend + enddo + enddo + endif endif ! ! compute tridiagonal matrix elements for momentum @@ -1046,6 +1078,16 @@ subroutine ysuvdif_run(im,km,ux,vx,tx,qx,p2d,p2di,pi2d, & dvsfc(i) = dvsfc(i) + vtend*conwrc*del(i,k) enddo enddo + if(lssav .and. ldiag3d .and. .not. flag_for_pbl_generic_tend) then + do k = km,1,-1 + do i = 1,im + utend = (f1(i,k)-ux(i,k))*rdt + vtend = (f2(i,k)-vx(i,k))*rdt + du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*dtstep + dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*dtstep + enddo + enddo + endif ! !---- end of vertical diffusion ! diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index c040233a7..29996c6fb 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -425,6 +425,82 @@ kind = kind_phys intent = in optional = F +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[flag_for_pbl_generic_tend] + standard_name = flag_for_generic_planetary_boundary_layer_tendency + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[du3dt_PBL] + standard_name = cumulative_change_in_x_wind_due_to_PBL + long_name = cumulative change in x wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_PBL] + standard_name = cumulative_change_in_y_wind_due_to_PBL + long_name = cumulative change in y wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dt3dt_PBL] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_PBL] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[do3dt_PBL] + standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL + long_name = cumulative change in ozone mixing ratio due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 38ae970136b1b632a1cec0447f0db0407298c4f1 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 19 Aug 2020 09:34:47 -0600 Subject: [PATCH 301/404] add check for generic PBL tendencies flag within PBL schemes that weren't already doing so --- physics/module_MYNNPBL_wrapper.F90 | 10 ++++++---- physics/module_MYNNPBL_wrapper.meta | 8 ++++++++ physics/satmedmfvdifq.F | 12 ++++++------ physics/satmedmfvdifq.meta | 8 ++++++++ 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/physics/module_MYNNPBL_wrapper.F90 b/physics/module_MYNNPBL_wrapper.F90 index f188ebbb7..6011c203e 100644 --- a/physics/module_MYNNPBL_wrapper.F90 +++ b/physics/module_MYNNPBL_wrapper.F90 @@ -82,6 +82,7 @@ SUBROUTINE mynnedmf_wrapper_run( & & dqdt_ice_cloud, dqdt_ozone, & & dqdt_cloud_droplet_num_conc, dqdt_ice_num_conc, & & dqdt_water_aer_num_conc, dqdt_ice_aer_num_conc, & + & flag_for_pbl_generic_tend, & & du3dt_PBL, du3dt_OGWD, dv3dt_PBL, dv3dt_OGWD, & & do3dt_PBL, dq3dt_PBL, dt3dt_PBL, & & htrsw, htrlw, xmu, & @@ -190,7 +191,8 @@ SUBROUTINE mynnedmf_wrapper_run( & ! NAMELIST OPTIONS (INPUT): LOGICAL, INTENT(IN) :: bl_mynn_tkeadvect, ltaerosol, & - lprnt, do_mynnsfclay + lprnt, do_mynnsfclay, & + flag_for_pbl_generic_tend INTEGER, INTENT(IN) :: & & bl_mynn_cloudpdf, & & bl_mynn_mixlength, & @@ -700,7 +702,7 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo enddo accum_duvt3dt: if(lssav) then - if(ldiag3d) then + if(ldiag3d .and. .not. flag_for_pbl_generic_tend) then do k = 1, levs do i = 1, im du3dt_PBL(i,k) = du3dt_PBL(i,k) + RUBLTEN(i,k)*dtf @@ -709,7 +711,7 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo endif - if (lsidea .or. ldiag3d) then + if (lsidea .or. (ldiag3d .and. .not. flag_for_pbl_generic_tend)) then do k = 1, levs do i = 1, im dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + RTHBLTEN(i,k)*exner(i,k)*dtf @@ -830,7 +832,7 @@ SUBROUTINE mynnedmf_wrapper_run( & enddo endif - if(lssav .and. ldiag3d .and. qdiag3d) then + if(lssav .and. (ldiag3d .and. qdiag3d .and. .not. flag_for_pbl_generic_tend)) then do k=1,levs do i=1,im dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + dqdt_water_vapor(i,k)*dtf diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 43f14ad5f..552a95133 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -997,6 +997,14 @@ kind = kind_phys intent = inout optional = F +[flag_for_pbl_generic_tend] + standard_name = flag_for_generic_planetary_boundary_layer_tendency + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in + optional = F [du3dt_PBL] standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index 28c30e55b..63a67c810 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -65,7 +65,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & prsi,del,prsl,prslk,phii,phil,delt, & & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & & kinver,xkzm_m,xkzm_h,xkzm_s,dspfac,bl_upfr,bl_dnfr, & - & ntoz,du3dt,dv3dt,dt3dt,dq3dt,do3dt,ldiag3d,qdiag3d, & + & ntoz,du3dt,dv3dt,dt3dt,dq3dt,do3dt,gen_tend,ldiag3d,qdiag3d, & & errmsg,errflg) ! use machine , only : kind_phys @@ -78,7 +78,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & integer, intent(in) :: kinver(im) integer, intent(in) :: islimsk(im) integer, intent(out) :: kpbl(im) - logical, intent(in) :: ldiag3d,qdiag3d + logical, intent(in) :: gen_tend,ldiag3d,qdiag3d ! real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, & & eps,epsm1 @@ -1421,7 +1421,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend enddo enddo - if(ldiag3d) then + if(ldiag3d .and. .not. gen_tend) then do k = 1,km do i = 1,im ttend = (f1(i,k)-t1(i,k))*rdt @@ -1448,7 +1448,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & enddo enddo enddo - if(ldiag3d .and. qdiag3d .and. ntoz>0) then + if(ldiag3d .and. .not. gen_tend .and. qdiag3d .and. ntoz>0) then kk=ntoz is = (kk-1) * km do k = 1, km @@ -1471,7 +1471,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & tdt(i,k) = tdt(i,k) + dspfac * ttend enddo enddo - if(ldiag3d) then + if(ldiag3d .and. .not. gen_tend) then do k = 1,km1 do i = 1,im ttend = diss(i,k) / cp @@ -1555,7 +1555,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & dvsfc(i) = dvsfc(i)+conw*del(i,k)*vtend enddo enddo - if(ldiag3d) then + if(ldiag3d .and. .not. gen_tend) then do k = 1,km do i = 1,im utend = (f1(i,k)-u1(i,k))*rdt diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index 397d71537..6adc7292a 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -640,6 +640,14 @@ kind = kind_phys intent = inout optional = F +[gen_tend] + standard_name = flag_for_generic_planetary_boundary_layer_tendency + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields From 1ce44ad9cac5cd201d9f9da53a3439806f608f4b Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 19 Aug 2020 09:43:49 -0600 Subject: [PATCH 302/404] check for generic PBL tendencies in satmedmfvdif and remove tests for diagnostic calculation outside of loops --- physics/satmedmfvdif.F | 40 +++++++++++++++++++++++++++------------ physics/satmedmfvdif.meta | 8 ++++++++ 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/physics/satmedmfvdif.F b/physics/satmedmfvdif.F index f00fb3776..ec6add8a5 100644 --- a/physics/satmedmfvdif.F +++ b/physics/satmedmfvdif.F @@ -62,7 +62,7 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & & kinver,xkzm_m,xkzm_h,xkzm_s, & & dt3dt_PBL,du3dt_PBL,dv3dt_PBL,dq3dt_PBL,do3dt_PBL, & - & ldiag3d,qdiag3d,errmsg,errflg) + & gen_tend,ldiag3d,qdiag3d,errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -74,7 +74,7 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & integer, intent(in) :: kinver(im) integer, intent(out) :: kpbl(im) ! - logical, intent(in) :: ldiag3d, qdiag3d + logical, intent(in) :: gen_tend, ldiag3d, qdiag3d real(kind=kind_phys), intent(inout), dimension(:,:) :: & & dt3dt_PBL,du3dt_PBL,dv3dt_PBL,dq3dt_PBL,do3dt_PBL ! @@ -1397,14 +1397,24 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & rtg(i,k,1) = rtg(i,k,1)+qtend dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend - if(ldiag3d) then - dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*delt - if(qdiag3d) then - dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*delt - endif - endif enddo enddo + if (ldiag3d .and. .not. gen_tend) then + do k = 1,km + do i = 1,im + ttend = (f1(i,k)-t1(i,k))*rdt + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend*delt + enddo + enddo + if (qdiag3d) then + do k = 1,km + do i = 1,im + qtend = (f2(i,k)-q1(i,k,1))*rdt + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend*delt + enddo + enddo + endif + endif ! if(ntrac1 >= 2) then do kk = 2, ntrac1 @@ -1503,12 +1513,18 @@ subroutine satmedmfvdif_run(im,km,ntrac,ntcw,ntiw,ntke, & dv(i,k) = dv(i,k)+vtend dusfc(i) = dusfc(i)+conw*del(i,k)*utend dvsfc(i) = dvsfc(i)+conw*del(i,k)*vtend - if(ldiag3d) then - du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*delt - dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*delt - endif enddo enddo + if (ldiag3d .and. .not. gen_tend) then + do k = 1,km + do i = 1,im + utend = (f1(i,k)-u1(i,k))*rdt + vtend = (f2(i,k)-v1(i,k))*rdt + du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend*delt + dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend*delt + enddo + enddo + endif ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !> -# Save PBL height for diagnostic purpose diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index c4230b950..1695d56e3 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -588,6 +588,14 @@ kind = kind_phys intent = inout optional = F +[gen_tend] + standard_name = flag_for_generic_planetary_boundary_layer_tendency + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in + optional = F [ldiag3d] standard_name = flag_diagnostics_3D long_name = flag for 3d diagnostic fields From 0f6528b03babcfe530d0295107e0ceb3b5afe14b Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 19 Aug 2020 13:52:56 -0600 Subject: [PATCH 303/404] add PBL tendencies to MYJ and SHOC schemes --- physics/module_MYJPBL_wrapper.F90 | 26 ++++++++++- physics/module_MYJPBL_wrapper.meta | 53 ++++++++++++++++++++++ physics/moninshoc.f | 47 +++++++++++++++++++- physics/moninshoc.meta | 70 ++++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+), 4 deletions(-) diff --git a/physics/module_MYJPBL_wrapper.F90 b/physics/module_MYJPBL_wrapper.F90 index d239013b4..5924de96f 100644 --- a/physics/module_MYJPBL_wrapper.F90 +++ b/physics/module_MYJPBL_wrapper.F90 @@ -40,7 +40,9 @@ SUBROUTINE myjpbl_wrapper_run( & & dusfc,dvsfc,dtsfc,dqsfc, & & dkt,xkzm_m, xkzm_h,xkzm_s, gamt,gamq, & & con_cp,con_g,con_rd, & - & me, lprnt, errmsg, errflg ) + & me, lprnt, dt3dt_PBL, du3dt_PBL, dv3dt_PBL, & + & dq3dt_PBL, gen_tend, ldiag3d, qdiag3d, & + & errmsg, errflg ) ! @@ -79,7 +81,7 @@ SUBROUTINE myjpbl_wrapper_run( & integer,intent(in) :: im, levs integer,intent(in) :: kdt, me integer,intent(in) :: ntrac,ntke,ntcw,ntiw,ntrw,ntsw,ntgl - logical,intent(in) :: restart,do_myjsfc,lprnt + logical,intent(in) :: restart,do_myjsfc,lprnt,ldiag3d,qdiag3d,gen_tend real(kind=kind_phys),intent(in) :: con_cp, con_g, con_rd real(kind=kind_phys),intent(in) :: dt_phs, xkzm_m, xkzm_h, xkzm_s @@ -111,6 +113,8 @@ SUBROUTINE myjpbl_wrapper_run( & dudt, dvdt, dtdt real(kind=kind_phys),dimension(im,levs-1),intent(out) :: & dkt + real(kind=kind_phys),dimension(:,:),intent(inout) :: & + du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL !MYJ-4D real(kind=kind_phys),dimension(im,levs,ntrac),intent(inout) :: & @@ -576,6 +580,24 @@ SUBROUTINE myjpbl_wrapper_run( & dqdt(i,k,ntcw)=dqdt(i,k,ntcw)+rqcblten(i,k1) end do end do + if (ldiag3d .and. .not. gen_tend) then + do k=1,levs + k1=levs+1-k + do i=1,im + du3dt_PBL(i,k) = rublten(i,k1)*dt_phs + dv3dt_PBL(i,k) = rvblten(i,k1)*dt_phs + dt3dt_PBL(i,k) = rthblten(i,k1)*exner(i,k1)*dt_phs + end do + end do + if (qdiag3d) then + do k=1,levs + k1=levs+1-k + do i=1,im + dq3dt_PBL(i,k) = rqvblten(i,k1)*dt_phs + end do + end do + end if + end if if (lprnt1) then diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index fa1fe17c4..d3ae21545 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -624,6 +624,59 @@ type = logical intent = in optional = F +[dt3dt_PBL] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[du3dt_PBL] + standard_name = cumulative_change_in_x_wind_due_to_PBL + long_name = cumulative change in x wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_PBL] + standard_name = cumulative_change_in_y_wind_due_to_PBL + long_name = cumulative change in y wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_PBL] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[gen_tend] + standard_name = flag_for_generic_planetary_boundary_layer_tendency + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/moninshoc.f b/physics/moninshoc.f index 275d979fe..eb9a5d963 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -31,7 +31,9 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, & prsi,del,prsl,prslk,phii,phil,delt, & dusfc,dvsfc,dtsfc,dqsfc,dkt,hpbl, & kinver,xkzm_m,xkzm_h,xkzm_s,xkzminv, - & grav, rd, cp, hvap, fv, + & grav,rd,cp,hvap,fv,ntoz,dt3dt_PBL, + & du3dt_PBL,dv3dt_PBL,dq3dt_PBL,do3dt_PBL, + & gen_tend,ldiag3d,qdiag3d, & errmsg,errflg) ! use machine , only : kind_phys @@ -42,7 +44,7 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! arguments ! integer, intent(in) :: im, - & km, ntrac, ntcw, ncnd, ntke + & km, ntrac, ntcw, ncnd, ntke, ntoz integer, dimension(im), intent(in) :: kinver real(kind=kind_phys), intent(in) :: delt, @@ -60,6 +62,11 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, & tau real(kind=kind_phys), dimension(im,km,ntrac), intent(inout) :: rtg + real(kind=kind_phys), dimension(:,:), intent(inout) :: + & du3dt_PBL, dv3dt_PBL, dt3dt_PBL, dq3dt_PBL, do3dt_PBL + logical, intent(in) :: ldiag3d, + & qdiag3d, gen_tend + integer, dimension(im), intent(out) :: kpbl real(kind=kind_phys), dimension(im), intent(out) :: dusfc, & dvsfc, dtsfc, dqsfc, hpbl @@ -441,6 +448,22 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, dqsfc(i) = dqsfc(i) + del(i,k)*qtend enddo enddo + if(ldiag3d .and. .not. gen_tend) then + do k = 1,km + do i = 1,im + ttend = (a1(i,k)-t1(i,k)) + dt3dt_PBL(i,k) = dt3dt_PBL(i,k) + ttend + enddo + enddo + if(qdiag3d) then + do k = 1,km + do i = 1,im + qtend = (a2(i,k)-q1(i,k,1)) + dq3dt_PBL(i,k) = dq3dt_PBL(i,k) + qtend + enddo + enddo + endif + endif do i = 1,im dtsfc(i) = dtsfc(i) * cont dqsfc(i) = dqsfc(i) * conq @@ -458,6 +481,16 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, enddo endif enddo + if(ldiag3d .and. ntoz>0 .and. qdiag3d .and. .not. gen_tend) then + kk = ntoz + is = (kk-1) * km + do k = 1, km + do i = 1, im + qtend = (a2(i,k+is)-q1(i,k,kk)) + do3dt_PBL(i,k) = do3dt_PBL(i,k)+qtend + enddo + enddo + endif endif ! ! compute tridiagonal matrix elements for momentum @@ -503,6 +536,16 @@ subroutine moninshoc_run (im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, dvsfc(i) = dvsfc(i) + tem * vtend enddo enddo + if (ldiag3d .and. .not. gen_tend) then + do k = 1,km + do i = 1,im + utend = (a1(i,k)-u1(i,k)) + vtend = (a2(i,k)-v1(i,k)) + du3dt_PBL(i,k) = du3dt_PBL(i,k) + utend + dv3dt_PBL(i,k) = dv3dt_PBL(i,k) + vtend + enddo + enddo + endif ! if (ntke > 0) then ! solve tridiagonal problem for momentum and tke ! diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index e8da8478d..197e50ec4 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -461,6 +461,76 @@ kind = kind_phys intent = in optional = F +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[dt3dt_PBL] + standard_name = cumulative_change_in_temperature_due_to_PBL + long_name = cumulative change in temperature due to PBL + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[du3dt_PBL] + standard_name = cumulative_change_in_x_wind_due_to_PBL + long_name = cumulative change in x wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dv3dt_PBL] + standard_name = cumulative_change_in_y_wind_due_to_PBL + long_name = cumulative change in y wind due to PBL + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[dq3dt_PBL] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + long_name = cumulative change in water vapor specific humidity due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout +[do3dt_PBL] + standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL + long_name = cumulative change in ozone mixing ratio due to PBL + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[gen_tend] + standard_name = flag_for_generic_planetary_boundary_layer_tendency + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 06939031fbb138a44e34be54d02c94aad27adc09 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 19 Aug 2020 14:07:33 -0600 Subject: [PATCH 304/404] change horizontal_dimension to horizontal_loop_extent for PBL tendency variables --- physics/module_MYJPBL_wrapper.meta | 8 ++++---- physics/module_MYNNPBL_wrapper.meta | 10 +++++----- physics/moninedmf.meta | 10 +++++----- physics/moninshoc.meta | 10 +++++----- physics/satmedmfvdif.meta | 10 +++++----- physics/satmedmfvdifq.meta | 10 +++++----- physics/shinhongvdif.meta | 10 +++++----- physics/ysuvdif.meta | 10 +++++----- 8 files changed, 39 insertions(+), 39 deletions(-) diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index d3ae21545..1168f7f2a 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -628,7 +628,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -636,7 +636,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -644,7 +644,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -652,7 +652,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 552a95133..53a76d520 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -1009,7 +1009,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1027,7 +1027,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1045,7 +1045,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1054,7 +1054,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1063,7 +1063,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index b55329717..daf5c94e4 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -527,7 +527,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -536,7 +536,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -545,7 +545,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -554,7 +554,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -563,7 +563,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index 197e50ec4..003c20db0 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -473,7 +473,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -481,7 +481,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -489,7 +489,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -497,7 +497,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -505,7 +505,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index 1695d56e3..bfab56403 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -547,7 +547,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -556,7 +556,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -565,7 +565,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -574,7 +574,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -583,7 +583,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index 6adc7292a..0ee0a7e5d 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -599,7 +599,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -608,7 +608,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -617,7 +617,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -626,7 +626,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -635,7 +635,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index 5fa62cd27..5c8ee992d 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -447,7 +447,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -455,7 +455,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -463,7 +463,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -471,7 +471,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -479,7 +479,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index 29996c6fb..ca9327b3d 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -465,7 +465,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -473,7 +473,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -481,7 +481,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -489,7 +489,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -497,7 +497,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout From fd8304a9d467ef17fb334d55f5a961b8f61e3c0c Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 19 Aug 2020 17:22:03 -0600 Subject: [PATCH 305/404] fix bug in cu_gf_driver tendencies --- physics/cu_gf_driver.F90 | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 5c43709d1..150f9f6c0 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -868,11 +868,13 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv, & if(ishallow_g3.eq.1 .and. .not.flag_for_scnv_generic_tend) then do k=kts,ktf do i=its,itf - du3dt_SCNV(i,k) = du3dt_SCNV(i,k) + outus(i,k) * dt - dv3dt_SCNV(i,k) = dv3dt_SCNV(i,k) + outvs(i,k) * dt - dt3dt_SCNV(i,k) = dt3dt_SCNV(i,k) + outts(i,k) * dt + du3dt_SCNV(i,k) = du3dt_SCNV(i,k) + cutens(i)*outus(i,k) * dt + dv3dt_SCNV(i,k) = dv3dt_SCNV(i,k) + cutens(i)*outvs(i,k) * dt + dt3dt_SCNV(i,k) = dt3dt_SCNV(i,k) + cutens(i)*outts(i,k) * dt if(qdiag3d) then - dq3dt_SCNV(i,k) = dq3dt_SCNV(i,k) + outqs(i,k) * dt + tem = cutens(i)*outqs(i,k)* dt + tem = tem/(1.0_kind_phys+tem) + dq3dt_SCNV(i,k) = dq3dt_SCNV(i,k) + tem endif enddo enddo @@ -880,11 +882,13 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,cactiv, & if((ideep.eq.1. .or. imid_gf.eq.1) .and. .not.flag_for_dcnv_generic_tend) then do k=kts,ktf do i=its,itf - du3dt_DCNV(i,k) = du3dt_DCNV(i,k) + (outu(i,k)+outum(i,k)) * dt - dv3dt_DCNV(i,k) = dv3dt_DCNV(i,k) + (outv(i,k)+outvm(i,k)) * dt - dt3dt_DCNV(i,k) = dt3dt_DCNV(i,k) + (outt(i,k)+outtm(i,k)) * dt + du3dt_DCNV(i,k) = du3dt_DCNV(i,k) + (cuten(i)*outu(i,k)+cutenm(i)*outum(i,k)) * dt + dv3dt_DCNV(i,k) = dv3dt_DCNV(i,k) + (cuten(i)*outv(i,k)+cutenm(i)*outvm(i,k)) * dt + dt3dt_DCNV(i,k) = dt3dt_DCNV(i,k) + (cuten(i)*outt(i,k)+cutenm(i)*outtm(i,k)) * dt if(qdiag3d) then - dq3dt_DCNV(i,k) = dq3dt_DCNV(i,k) + (outq(i,k)+outqm(i,k)) * dt + tem = (cuten(i)*outq(i,k) + cutenm(i)*outqm(i,k))* dt + tem = tem/(1.0_kind_phys+tem) + dq3dt_DCNV(i,k) = dq3dt_DCNV(i,k) + tem endif enddo enddo From 8617587edb95aa097b7bbc2735990393bc6d9b90 Mon Sep 17 00:00:00 2001 From: ericaligo-NOAA <48365233+ericaligo-NOAA@users.noreply.github.com> Date: Thu, 20 Aug 2020 13:03:21 -0400 Subject: [PATCH 306/404] Diagnostic instantaneous 3D cloud fractions added. (#484) Description (Instructions: this, and all subsequent sections of text should be removed and filled in as appropriate.) Diagnostic cldfra array outputs 3D instantaneous cloud fractions. Works with WSM6, Thompson and GFDL mp schemes. No results changed. UPDATE: Provided a bug fix to GFS_restart.F90 with an if condition added in the ifdef CCPP block to test for reflectivity flag. RTs have been updated. Test run in 3-km FV3 LAM was successful and plots looked good. Issue(s) addressed ufs-community/ufs-weather-model#158 NOAA-EMC/fv3atm#154 #484 Testing How were these changes tested? Tested on hera with the SAR configuration. Evaluated fields from run with Thompson microphyics and GFDL microphysics. Full RTs performed on hera. Dependencies FV3 ccpp/physics --- physics/GFS_rrtmg_pre.F90 | 5 +++-- physics/GFS_rrtmg_pre.meta | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index ca7695528..6dc14497a 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -32,7 +32,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input faersw1, faersw2, faersw3, & faerlw1, faerlw2, faerlw3, aerodp, & clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & - clouds7, clouds8, clouds9, cldsa, & + clouds7, clouds8, clouds9, cldsa, cldfra, & mtopa, mbota, de_lgth, alb1d, errmsg, errflg) use machine, only: kind_phys @@ -123,7 +123,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(inout) :: clouds1, & clouds2, clouds3, clouds4, clouds5 real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: clouds6, & - clouds7, clouds8, clouds9 + clouds7, clouds8, clouds9, cldfra real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota, mtopa @@ -922,6 +922,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input clouds7(i,k) = clouds(i,k,7) clouds8(i,k) = clouds(i,k,8) clouds9(i,k) = clouds(i,k,9) + cldfra(i,k) = clouds(i,k,1) enddo enddo diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index a06e718a5..9d51e708d 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -529,6 +529,15 @@ kind = kind_phys intent = out optional = F +[cldfra] + standard_name = instantaneous_3d_cloud_fraction + long_name = instantaneous 3D cloud fraction for all MPs + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F [mtopa] standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops From 4a2ea3f7a5f972ebebe987fdaa03c69e6f080551 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 21 Aug 2020 17:37:56 -0600 Subject: [PATCH 307/404] swap aero_in for iaerclm in GFS_phys_time_vary.scm --- physics/GFS_phys_time_vary.scm.F90 | 4 ++-- physics/GFS_phys_time_vary.scm.meta | 6 +++--- physics/rrtmgp_lw_pre.F90 | 6 ------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index d353a7d08..53ca82651 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -33,7 +33,7 @@ module GFS_phys_time_vary !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, aero_in, & + subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & iccn, iflip, idate, nblks, blksz, nx, ny, xlat_d, xlon_d, levh2o_int, & levozp_int, ozpl, h2opl, aer_nm, jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, & jindx2_h, ddy_h, jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, & @@ -48,7 +48,7 @@ subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, aero_in, & integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int integer, dimension(4), intent(in) :: idate integer, dimension(nblks), intent(in) :: blksz - logical, intent(in) :: h2o_phys, aero_in, iccn + logical, intent(in) :: h2o_phys, iaerclm, iccn real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl real(kind=kind_phys), dimension(:,:,:), intent(in) :: h2opl diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 30b8bce46..1e2dc2d0a 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -33,9 +33,9 @@ type = logical intent = in optional = F -[aero_in] - standard_name = flag_for_aerosol_input_MG - long_name = flag for using aerosols in Morrison-Gettelman MP +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation units = flag dimensions = () type = logical diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index 1148c6705..7ad8bd30d 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -2,12 +2,6 @@ module rrtmgp_lw_pre use physparam use machine, only: & kind_phys ! Working type - use GFS_typedefs, only: & - GFS_control_type, & ! - GFS_sfcprop_type, & ! Surface fields - GFS_grid_type, & ! Grid and interpolation related data - GFS_statein_type, & ! - GFS_radtend_type ! Radiation tendencies needed in physics use module_radiation_surface, only: & setemis ! Routine to compute surface-emissivity use mo_gas_optics_rrtmgp, only: & From b76bb2cc797116be54561dcce3fe27d662cdb7db Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 21 Aug 2020 18:23:55 -0600 Subject: [PATCH 308/404] revert some changes in meta files accidentally merged in --- physics/GFS_phys_time_vary.scm.meta | 18 +++++++++--------- physics/rrtmg_lw_post.meta | 4 ++-- physics/rrtmg_lw_pre.meta | 4 ++-- physics/rrtmg_sw_post.meta | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 1e2dc2d0a..86b91e8c3 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -44,9 +44,9 @@ [iccn] standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics long_name = flag for IN and CCN forcing for morrison gettelman microphysics - units = flag + units = none dimensions = () - type = logical + type = integer intent = in optional = F [iflip] @@ -66,7 +66,7 @@ intent = in optional = F [nblks] - standard_name = number_of_blocks + standard_name = ccpp_block_count long_name = for explicit data blocking: number of blocks units = count dimensions = () @@ -74,10 +74,10 @@ intent = in optional = F [blksz] - standard_name = horizontal_block_size + standard_name = ccpp_block_sizes long_name = for explicit data blocking: block sizes of all blocks units = count - dimensions = (number_of_blocks) + dimensions = (ccpp_block_count) type = integer intent = in optional = F @@ -106,18 +106,18 @@ intent = in optional = F [xlat_d] - standard_name = latitude_degree + standard_name = latitude_in_degree long_name = latitude in degrees - units = degree + units = degree_north dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F [xlon_d] - standard_name = longitude_degree + standard_name = longitude_in_degree long_name = longitude in degrees - units = degree + units = degree_east dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 5108e8eb2..447e3a066 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -107,7 +107,7 @@ intent = inout optional = F [htrlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -116,7 +116,7 @@ intent = inout optional = F [lwhc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky lw heating rates units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index 481850494..d4054cc0b 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -25,7 +25,7 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -34,7 +34,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 00687e055..ba1739e44 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -247,7 +247,7 @@ intent = inout optional = F [htrsw] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -256,7 +256,7 @@ intent = inout optional = F [swhc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_timestep + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky sw heating rates units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) From ea71b1fcb8aba590c1f57e3e90adb23fdf02fbe2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 24 Aug 2020 10:43:48 -0600 Subject: [PATCH 309/404] Update submodule pointer for RTE-RRTMGP --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 51f718adb..88a43f797 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 51f718adb36aa72bdc9dcc95b986dcbe5125e03a +Subproject commit 88a43f797ab3eb3c5c978485bd108a8386a6cdfd From eea20edd2db63ba93a32648ad88d524188f86353 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 25 Aug 2020 10:48:35 -0600 Subject: [PATCH 310/404] remove DDTs from GFS_phys_time_vary_init (SCM), GFS_rad_time_vary (SCM), GFS_rrtmg_post --- physics/GFS_phys_time_vary.scm.F90 | 8 +- physics/GFS_rad_time_vary.scm.F90 | 69 +++++---- physics/GFS_rad_time_vary.scm.meta | 234 +++++++++++++++++++++++++++-- physics/GFS_rrtmg_post.F90 | 152 +++++++++---------- physics/GFS_rrtmg_post.meta | 185 ++++++++++++++++++----- physics/gscond.meta | 24 +-- 6 files changed, 496 insertions(+), 176 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index 53ca82651..f2a913982 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -45,10 +45,10 @@ subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & implicit none ! Interface variables - integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int + integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int, iccn integer, dimension(4), intent(in) :: idate integer, dimension(nblks), intent(in) :: blksz - logical, intent(in) :: h2o_phys, iaerclm, iccn + logical, intent(in) :: h2o_phys, iaerclm real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl real(kind=kind_phys), dimension(:,:,:), intent(in) :: h2opl @@ -135,7 +135,7 @@ subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & ntrcaer = size(aer_nm, dim=3) endif - if (iccn) then + if (iccn == 1) then call read_cidata (me, master) ! No consistency check needed for in/ccn data, all values are ! hardcoded in module iccn_def.F and GFS_typedefs.F90 @@ -172,7 +172,7 @@ subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & me, master) endif !--- read in and initialize IN and CCN - if (iccn) then + if (iccn == 1) then call setindxci (blksz(nb), xlat_d, jindx1_ci, & jindx2_ci, ddy_ci, xlon_d, & iindx1_ci, iindx2_ci, ddx_ci) diff --git a/physics/GFS_rad_time_vary.scm.F90 b/physics/GFS_rad_time_vary.scm.F90 index 13ae5e14b..738065cfc 100644 --- a/physics/GFS_rad_time_vary.scm.F90 +++ b/physics/GFS_rad_time_vary.scm.F90 @@ -21,29 +21,46 @@ end subroutine GFS_rad_time_vary_init !> \section arg_table_GFS_rad_time_vary_run Argument Table !! \htmlinclude GFS_rad_time_vary_run.html !! - subroutine GFS_rad_time_vary_run (Model, Statein, Tbd, errmsg, errflg) + subroutine GFS_rad_time_vary_run (cnx, cny, lsswr, lslwr, isubc_sw, & + isubc_lw, sec, nblks, blksz, isc, jsc, imp_physics, & + imp_physics_zhao_carr, kdt, tgrs, qgrs_wv, prsi, imap, jmap, & + icsdsw, icsdlw, t_minus_two_delt, qv_minus_two_delt, & + t_minus_delt, qv_minus_delt, ps_minus_two_delt, ps_minus_delt, & + errmsg, errflg) use physparam, only: ipsd0, ipsdlim, iaerflg use mersenne_twister, only: random_setseed, random_index, random_stat use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type use radcons, only: qmin, con_100 implicit none - type(GFS_control_type), intent(inout) :: Model - type(GFS_statein_type), intent(in) :: Statein - type(GFS_tbd_type), intent(inout) :: Tbd + integer, intent(in) :: cnx, cny, isubc_sw, isubc_lw, & + nblks, isc, jsc, imp_physics,& + imp_physics_zhao_carr, kdt + logical, intent(in) :: lsswr, lslwr + real(kind=kind_phys), intent(in) :: sec + + integer, dimension(nblks), intent(in) :: blksz + integer, dimension(:), intent(in) :: imap, jmap + + integer, dimension(:), intent(inout) :: icsdsw, icsdlw + + real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, qgrs_wv + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi + + real(kind=kind_phys), dimension(:,:), intent(inout) :: t_minus_two_delt, & + qv_minus_two_delt, t_minus_delt, qv_minus_delt + real(kind=kind_phys), dimension(:), intent(inout) :: ps_minus_two_delt,& + ps_minus_delt + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !--- local variables type (random_stat) :: stat - integer :: ix, nb, j, i, nblks, ipseed - integer :: numrdm(Model%cnx*Model%cny*2) + integer :: ix, nb, j, i, ipseed + integer :: numrdm(cnx*cny*2) ! Initialize CCPP error handling variables errmsg = '' @@ -51,34 +68,34 @@ subroutine GFS_rad_time_vary_run (Model, Statein, Tbd, errmsg, errflg) nb = 1 - if (Model%lsswr .or. Model%lslwr) then + if (lsswr .or. lslwr) then !--- call to GFS_radupdate_run is now in GFS_rrtmg_setup_run !--- set up random seed index in a reproducible way for entire cubed-sphere face (lat-lon grid) - if ((Model%isubc_lw==2) .or. (Model%isubc_sw==2)) then - ipseed = mod(nint(con_100*sqrt(Model%sec)), ipsdlim) + 1 + ipsd0 + if ((isubc_lw==2) .or. (isubc_sw==2)) then + ipseed = mod(nint(con_100*sqrt(sec)), ipsdlim) + 1 + ipsd0 call random_setseed (ipseed, stat) call random_index (ipsdlim, numrdm, stat) !--- set the random seeds for each column in a reproducible way - do ix=1,Model%blksz(nb) - j = Tbd%jmap(ix) - i = Tbd%imap(ix) + do ix=1,blksz(nb) + j = jmap(ix) + i = imap(ix) !--- for testing purposes, replace numrdm with '100' - Tbd%icsdsw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx) - Tbd%icsdlw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + Model%cnx*Model%cny) + icsdsw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx) + icsdlw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx + cnx*cny) enddo endif ! isubc_lw and isubc_sw - if (Model%imp_physics == 99) then - if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,1) = Statein%tgrs - Tbd%phy_f3d(:,:,2) = max(qmin,Statein%qgrs(:,:,1)) - Tbd%phy_f3d(:,:,3) = Statein%tgrs - Tbd%phy_f3d(:,:,4) = max(qmin,Statein%qgrs(:,:,1)) - Tbd%phy_f2d(:,1) = Statein%prsi(:,1) - Tbd%phy_f2d(:,2) = Statein%prsi(:,1) + if (imp_physics == imp_physics_zhao_carr) then + if (kdt == 1) then + t_minus_two_delt(:,:) = tgrs + qv_minus_two_delt(:,:) = max(qmin,qgrs_wv(:,:)) + t_minus_delt(:,:) = tgrs + qv_minus_delt(:,:) = max(qmin,qgrs_wv(:,:)) + ps_minus_two_delt(:) = prsi(:,1) + ps_minus_delt(:) = prsi(:,1) endif endif diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index 7e87f1f8a..b5de5ed12 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -6,28 +6,230 @@ [ccpp-arg-table] name = GFS_rad_time_vary_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[cnx] + standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face + long_name = number of points in x direction for this cubed sphere face + units = count dimensions = () - type = GFS_control_type - intent = inout + type = integer + intent = in + optional = F +[cny] + standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face + long_name = number of points in y direction for this cubed sphere face + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore - units = DDT +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[isubc_sw] + standard_name = flag_for_sw_clouds_without_sub_grid_approximation + long_name = flag for sw clouds without sub-grid approximation + units = flag dimensions = () - type = GFS_statein_type + type = integer + intent = in + optional = F +[isubc_lw] + standard_name = flag_for_lw_clouds_without_sub_grid_approximation + long_name = flag for lw clouds without sub-grid approximation + units = flag + dimensions = () + type = integer intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container - units = DDT +[sec] + standard_name = seconds_elapsed_since_model_initialization + long_name = seconds elapsed since model initialization + units = s dimensions = () - type = GFS_tbd_type + type = real + kind = kind_phys + intent = in + optional = F +[nblks] + standard_name = ccpp_block_count + long_name = for explicit data blocking: number of blocks + units = count + dimensions = () + type = integer + intent = in + optional = F +[blksz] + standard_name = ccpp_block_sizes + long_name = for explicit data blocking: block sizes of all blocks + units = count + dimensions = (ccpp_block_count) + type = integer + intent = in + optional = F +[isc] + standard_name = starting_x_index_for_this_MPI_rank + long_name = starting index in the x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[jsc] + standard_name = starting_y_index_for_this_MPI_rank + long_name = starting index in the y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr] + standard_name = flag_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qgrs_wv] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[icsdsw] + standard_name = seed_random_numbers_sw + long_name = random seeds for sub-column cloud generators sw + units = none + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[icsdlw] + standard_name = seed_random_numbers_lw + long_name = random seeds for sub-column cloud generators lw + units = none + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[t_minus_two_delt] + standard_name = air_temperature_two_timesteps_back + long_name = air temperature two timesteps back + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qv_minus_two_delt] + standard_name = water_vapor_specific_humidity_two_timesteps_back + long_name = water vapor specific humidity two timesteps back + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[t_minus_delt] + standard_name = air_temperature_at_previous_timestep + long_name = air temperature at previous timestep + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qv_minus_delt] + standard_name = water_vapor_specific_humidity_at_previous_timestep + long_name = water vapor specific humidity at previous timestep + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ps_minus_two_delt] + standard_name = surface_air_pressure_two_timesteps_back + long_name = surface air pressure two timesteps back + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ps_minus_delt] + standard_name = surface_air_pressure_at_previous_timestep + long_name = surface air pressure at previous timestep + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys intent = inout optional = F [errmsg] diff --git a/physics/GFS_rrtmg_post.F90 b/physics/GFS_rrtmg_post.F90 index 7f80ca4c3..aacf9aaf5 100644 --- a/physics/GFS_rrtmg_post.F90 +++ b/physics/GFS_rrtmg_post.F90 @@ -13,43 +13,41 @@ end subroutine GFS_rrtmg_post_init !> \section arg_table_GFS_rrtmg_post_run Argument Table !! \htmlinclude GFS_rrtmg_post_run.html !! - subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & - Coupling, scmpsw, im, lm, ltp, kt, kb, kd, raddt, aerodp, & + subroutine GFS_rrtmg_post_run (lsswr, lslwr, lssav, fhlwr, fhswr, prsi, tgrs, sfcflw, sfcfsw, topflw, topfsw, coszen, coszdg, fluxr, & + scmpsw, nspc1, nfxr, im, km, kmp1, lm, ltp, kt, kb, kd, raddt, aerodp, & cldsa, mtopa, mbota, clouds1, cldtaulw, cldtausw, nday, & errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type - use module_radiation_aerosols, only: NSPC1 - use module_radsw_parameters, only: cmpfsw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, cmpfsw_type use module_radlw_parameters, only: topflw_type, sfcflw_type - use module_radsw_parameters, only: topfsw_type, sfcfsw_type implicit none ! Interface variables - type(GFS_control_type), intent(in) :: Model - type(GFS_grid_type), intent(in) :: Grid - type(GFS_statein_type), intent(in) :: Statein - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_radtend_type), intent(in) :: Radtend - type(GFS_diag_type), intent(inout) :: Diag - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(in) :: scmpsw - - integer, intent(in) :: im, lm, ltp, kt, kb, kd, nday - real(kind=kind_phys), intent(in) :: raddt - - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: aerodp - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(in) :: mbota, mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: clouds1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: cldtausw - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: cldtaulw + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw + type(cmpfsw_type), dimension(im), intent(in) :: scmpsw + type(topflw_type), dimension(im), intent(in) :: topflw + type(topfsw_type), dimension(im), intent(in) :: topfsw + + integer, intent(in) :: nspc1, nfxr, im, km, kmp1, lm, ltp, kt, kb, kd, nday + real(kind=kind_phys), intent(in) :: raddt, fhlwr, fhswr + logical, intent(in) :: lsswr, lslwr, lssav + + real(kind=kind_phys), dimension(im), intent(in) :: coszen, coszdg + + real(kind=kind_phys), dimension(im,kmp1), intent(in) :: prsi + real(kind=kind_phys), dimension(im,km), intent(in) :: tgrs + + real(kind=kind_phys), dimension(im,NSPC1), intent(in) :: aerodp + real(kind=kind_phys), dimension(im,5), intent(in) :: cldsa + integer, dimension(im,3), intent(in) :: mbota, mtopa + real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: clouds1 + real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtausw + real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtaulw + + real(kind=kind_phys), dimension(im,nfxr), intent(inout) :: fluxr character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -62,7 +60,7 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & errmsg = '' errflg = 0 - if (.not. (Model%lsswr .or. Model%lslwr)) return + if (.not. (lsswr .or. lslwr)) return !> - For time averaged output quantities (including total-sky and !! clear-sky SW and LW fluxes at TOA and surface; conventional @@ -72,77 +70,77 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & ! --- ... collect the fluxr data for wrtsfc - if (Model%lssav) then - if (Model%lsswr) then + if (lssav) then + if (lsswr) then do i=1,im -! Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm -! Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm -! Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm -! Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm -! Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm -! Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm - Diag%fluxr(i,34) = aerodp(i,1) ! total aod at 550nm - Diag%fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm - Diag%fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm - Diag%fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm - Diag%fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm - Diag%fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm +! fluxr(i,34) = fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm +! fluxr(i,35) = fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm +! fluxr(i,36) = fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm +! fluxr(i,37) = fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm +! fluxr(i,38) = fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm +! fluxr(i,39) = fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm + fluxr(i,34) = aerodp(i,1) ! total aod at 550nm + fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm + fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm + fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm + fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm + fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm enddo endif ! --- save lw toa and sfc fluxes - if (Model%lslwr) then + if (lslwr) then do i=1,im ! --- lw total-sky fluxes - Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up - Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn - Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up + fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * topflw(i)%upfxc ! total sky top lw up + fluxr(i,19) = fluxr(i,19) + fhlwr * sfcflw(i)%dnfxc ! total sky sfc lw dn + fluxr(i,20) = fluxr(i,20) + fhlwr * sfcflw(i)%upfxc ! total sky sfc lw up ! --- lw clear-sky fluxes - Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up - Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn - Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up + fluxr(i,28) = fluxr(i,28) + fhlwr * topflw(i)%upfx0 ! clear sky top lw up + fluxr(i,30) = fluxr(i,30) + fhlwr * sfcflw(i)%dnfx0 ! clear sky sfc lw dn + fluxr(i,33) = fluxr(i,33) + fhlwr * sfcflw(i)%upfx0 ! clear sky sfc lw up enddo endif ! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight ! part of sw calling interval, while coszdg= mean cosz over entire interval - if (Model%lsswr) then + if (lsswr) then do i = 1, IM - if (Radtend%coszen(i) > 0.) then + if (coszen(i) > 0.) then ! --- sw total-sky fluxes ! ------------------- - tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + tem0d = fhswr * coszdg(i) / coszen(i) + fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up + fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up + fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn ! --- sw uv-b fluxes ! -------------- - Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn + fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn ! --- sw toa incoming fluxes ! ---------------------- - Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn + fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn ! --- sw sfc flux components ! ---------------------- - Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn - Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn - Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn - Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn + fluxr(i,24) = fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn + fluxr(i,25) = fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn + fluxr(i,26) = fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn + fluxr(i,27) = fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn ! --- sw clear-sky fluxes ! ------------------- - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up - Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up - Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d ! clear sky top sw up + fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up + fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn endif enddo endif ! --- save total and boundary layer clouds - if (Model%lsswr .or. Model%lslwr) then + if (lsswr .or. lslwr) then do i=1,im - Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) - Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) + fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) + fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) enddo ! --- save cld frac,toplyr,botlyr and top temp, note that the order @@ -154,15 +152,15 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & tem0d = raddt * cldsa(i,j) itop = mtopa(i,j) - kd ibtc = mbota(i,j) - kd - Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d - Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop+kt) - Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc+kb) - Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) + fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d + fluxr(i,11-j) = fluxr(i,11-j) + tem0d * prsi(i,itop+kt) + fluxr(i,14-j) = fluxr(i,14-j) + tem0d * prsi(i,ibtc+kb) + fluxr(i,17-j) = fluxr(i,17-j) + tem0d * tgrs(i,itop) enddo enddo ! Anning adds optical depth and emissivity output - if (Model%lsswr .and. (nday > 0)) then + if (lsswr .and. (nday > 0)) then do j = 1, 3 do i = 1, IM tem0d = raddt * cldsa(i,j) @@ -172,12 +170,12 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & do k=ibtc,itop tem1 = tem1 + cldtausw(i,k) ! approx .55 um channel enddo - Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 + fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 enddo enddo endif - if (Model%lslwr) then + if (lslwr) then do j = 1, 3 do i = 1, IM tem0d = raddt * cldsa(i,j) @@ -187,7 +185,7 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & do k=ibtc,itop tem2 = tem2 + cldtaulw(i,k) ! approx 10. um channel enddo - Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) enddo enddo endif diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index 61e89098d..e996236ab 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -6,62 +6,149 @@ [ccpp-arg-table] name = GFS_rrtmg_post_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_control_type + type = logical intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_grid_type + type = logical intent = in optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = Fortran DDT containing FV3-GFS diagnotics data - units = DDT +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag dimensions = () - type = GFS_diag_type - intent = inout + type = logical + intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS radiation tendencies - units = DDT +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s dimensions = () - type = GFS_radtend_type + type = real + kind = kind_phys intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore - units = DDT +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s dimensions = () - type = GFS_statein_type + type = real + kind = kind_phys intent = in optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components - units = DDT - dimensions = () - type = GFS_coupling_type +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfcflw] + standard_name = lw_fluxes_sfc + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcflw_type + intent = in + optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcfsw_type + intent = in + optional = F +[topflw] + standard_name = lw_fluxes_top_atmosphere + long_name = lw radiation fluxes at top + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topflw_type + intent = in + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topfsw_type + intent = in + optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = various + dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + type = real + kind = kind_phys intent = inout optional = F [scmpsw] standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = in optional = F +[nspc1] + standard_name = number_of_species_for_aerosol_optical_depth + long_name = number of species for output aerosol optical depth plus total + units = count + dimensions = () + type = integer + intent = in + optional = F +[nfxr] + standard_name = number_of_radiation_diagnostic_variables + long_name = number of variables stored in the fluxr array + units = count + dimensions = () + type = integer + intent = in + optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -70,6 +157,22 @@ type = integer intent = in optional = F +[km] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[kmp1] + standard_name = vertical_dimension_plus_one + long_name = number of vertical levels plus one + units = count + dimensions = () + type = integer + intent = in + optional = F [lm] standard_name = number_of_vertical_layers_for_radiation_calculations long_name = number of vertical layers for radiation calculation @@ -123,7 +226,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -132,7 +235,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -141,7 +244,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -149,7 +252,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -157,7 +260,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -166,7 +269,7 @@ standard_name = cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -175,7 +278,7 @@ standard_name = cloud_optical_depth_layers_at_0p55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -209,4 +312,4 @@ ######################################################################## [ccpp-arg-table] name = GFS_rrtmg_post_finalize - type = scheme + type = scheme \ No newline at end of file diff --git a/physics/gscond.meta b/physics/gscond.meta index 57156358f..d8c27c878 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -99,8 +99,8 @@ intent = inout optional = F [tp] - standard_name = air_temperature_two_time_steps_back - long_name = air temperature two time steps back + standard_name = air_temperature_two_timesteps_back + long_name = air temperature two timesteps back units = K dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -108,8 +108,8 @@ intent = inout optional = F [qp] - standard_name = water_vapor_specific_humidity_two_time_steps_back - long_name = water vapor specific humidity two time steps back + standard_name = water_vapor_specific_humidity_two_timesteps_back + long_name = water vapor specific humidity two timesteps back units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -117,8 +117,8 @@ intent = inout optional = F [psp] - standard_name = surface_air_pressure_two_time_steps_back - long_name = surface air pressure two time steps back + standard_name = surface_air_pressure_two_timesteps_back + long_name = surface air pressure two timesteps back units = Pa dimensions = (horizontal_dimension) type = real @@ -126,8 +126,8 @@ intent = inout optional = F [tp1] - standard_name = air_temperature_at_previous_time_step - long_name = air temperature at previous time step + standard_name = air_temperature_at_previous_timestep + long_name = air temperature at previous timestep units = K dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -135,8 +135,8 @@ intent = inout optional = F [qp1] - standard_name = water_vapor_specific_humidity_at_previous_time_step - long_name = water vapor specific humidity at previous time step + standard_name = water_vapor_specific_humidity_at_previous_timestep + long_name = water vapor specific humidity at previous timestep units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -144,8 +144,8 @@ intent = inout optional = F [psp1] - standard_name = surface_air_pressure_at_previous_time_step - long_name = surface air surface pressure at previous time step + standard_name = surface_air_pressure_at_previous_timestep + long_name = surface air surface pressure at previous timestep units = Pa dimensions = (horizontal_dimension) type = real From e05c676744e9592688c9cc0b8f989fc6d578e735 Mon Sep 17 00:00:00 2001 From: ClaraDraper-NOAA Date: Tue, 25 Aug 2020 22:15:52 +0000 Subject: [PATCH 311/404] added missing 'intent = in' to meta files --- physics/GFS_rrtmgp_sw_pre.meta | 2 ++ physics/GFS_surface_generic.meta | 2 ++ 2 files changed, 4 insertions(+) diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index b2330237b..543c56bbf 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -48,6 +48,7 @@ dimensions = (number_of_land_surface_variables_perturbed) type = real kind = kind_phys + intent = in optional = F [lndp_var_list] standard_name = variables_to_be_perturbed_for_landperts @@ -56,6 +57,7 @@ dimensions = (number_of_land_surface_variables_perturbed) type = character kind = len=3 + intent = in optional = F [lsswr] standard_name = flag_to_calc_sw diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index 7ab6c0000..86b52b87c 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -275,6 +275,7 @@ dimensions = (number_of_land_surface_variables_perturbed) type = real kind = kind_phys + intent = in optional = F [lndp_var_list] standard_name = variables_to_be_perturbed_for_landperts @@ -283,6 +284,7 @@ dimensions = (number_of_land_surface_variables_perturbed) type = character kind = len=3 + intent = in optional = F [z01d] standard_name = perturbation_of_momentum_roughness_length From b1e393d980cc8da76bd4b1dde14aae8c9b5ad900 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 09:26:40 -0600 Subject: [PATCH 312/404] cleanup GFS_phys_time_vary.scm --- physics/GFS_phys_time_vary.scm.F90 | 208 ++++---- physics/GFS_phys_time_vary.scm.meta | 777 ++++++++++++++++++++++------ physics/GFS_time_vary_pre.fv3.meta | 2 +- physics/GFS_time_vary_pre.scm.meta | 2 +- 4 files changed, 739 insertions(+), 250 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index f2a913982..2bb04ebb6 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -33,30 +33,36 @@ module GFS_phys_time_vary !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & - iccn, iflip, idate, nblks, blksz, nx, ny, xlat_d, xlon_d, levh2o_int, & - levozp_int, ozpl, h2opl, aer_nm, jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, & - jindx2_h, ddy_h, jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, & - ddx_aer, jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, & - oz_pres_int, h2o_pres_int, imap, jmap, errmsg, errflg) + subroutine GFS_phys_time_vary_init (im, nx, ny, me, master, nblks, ntoz, iflip, & + iccn, levh2o_int, levozp_int, idate, blksz, h2o_phys, iaerclm, xlat_d, xlon_d,& + ozpl, h2opl, aer_nm, imap, jmap, jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, & + jindx1_aer, jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, & + iindx1_ci, iindx2_ci, ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, ddx_ci, & + oz_pres_int, h2o_pres_int, errmsg, errflg) use machine, only: kind_phys implicit none ! Interface variables - integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int, iccn - integer, dimension(4), intent(in) :: idate - integer, dimension(nblks), intent(in) :: blksz - logical, intent(in) :: h2o_phys, iaerclm - real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d - real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl - real(kind=kind_phys), dimension(:,:,:), intent(in) :: h2opl - real(kind=kind_phys), dimension(:,:,:), intent(in) :: aer_nm - - integer, dimension(im), intent(inout) :: imap, jmap - integer, dimension(:), intent(inout) :: jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, jindx1_aer, jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, iindx1_ci, iindx2_ci - real(kind=kind_phys), dimension(:), intent(inout) :: ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, ddx_ci + integer, intent(in) :: im, nx, ny, me, master, & + nblks, ntoz, iflip, iccn,& + levh2o_int, levozp_int + integer, dimension(4), intent(in) :: idate + integer, dimension(nblks), intent(in) :: blksz + logical, intent(in) :: h2o_phys, iaerclm + real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d + real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl, h2opl, aer_nm + + integer, dimension(im), intent(inout) :: imap, jmap + integer, dimension(:), intent(inout) :: jindx1_o3, jindx2_o3, & + jindx1_h, jindx2_h, & + jindx1_aer, jindx2_aer, & + iindx1_aer, iindx2_aer, & + jindx1_ci, jindx2_ci, & + iindx1_ci, iindx2_ci + real(kind=kind_phys), dimension(:), intent(inout) :: ddy_o3, ddy_h, ddy_aer, & + ddx_aer, ddy_ci, ddx_ci real(kind=kind_phys), dimension(levozp_int), intent(inout) :: oz_pres_int real(kind=kind_phys), dimension(levh2o_int), intent(inout) :: h2o_pres_int @@ -241,25 +247,53 @@ end subroutine GFS_phys_time_vary_finalize !> \section arg_table_GFS_phys_time_vary_run Argument Table !! \htmlinclude GFS_phys_time_vary_run.html !! - subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, Diag, first_time_step, errmsg, errflg) + subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & + ntoz, iccn, nrcm, nsswr, nszero, kdt, imfdeepcnv, seed0, first_time_step,& + lsswr, cal_pre, random_clds, h2o_phys, iaerclm, fhswr, fhlwr, fhour, & + fhzero, dtp, idate, jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, jindx1_aer,& + jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, iindx1_ci, & + iindx2_ci, blksz, imap, jmap, ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, & + ddx_ci, slmsk, vtype, weasd, prsl, Model, clstp, sncovr, rann, in_nm, & + ccn_nm, ozpl, h2opl, aer_nm, Diag, errmsg, errflg) use mersenne_twister, only: random_setseed, random_number use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & - GFS_Tbd_type, GFS_sfcprop_type, & - GFS_cldprop_type, GFS_diag_type, & - GFS_statein_type - + use GFS_typedefs, only: GFS_control_type, GFS_diag_type + implicit none - type(GFS_grid_type), intent(in) :: Grid - type(GFS_statein_type), intent(in) :: Statein - type(GFS_control_type), intent(inout) :: Model - type(GFS_tbd_type), intent(inout) :: Tbd - type(GFS_sfcprop_type), intent(inout) :: Sfcprop - type(GFS_cldprop_type), intent(inout) :: Cldprop + integer, intent(in) :: levs, cnx, cny, isc, jsc, & + me, master, ntoz, iccn, & + nrcm, nsswr, nszero, kdt, & + imfdeepcnv, seed0 + logical, intent(in) :: first_time_step, lsswr, & + cal_pre, random_clds, & + h2o_phys, iaerclm + real(kind=kind_phys), intent(in) :: fhswr, fhlwr, fhour, & + fhzero, dtp + + integer, dimension(4), intent(in) :: idate + integer, dimension(:), intent(in) :: jindx1_o3, jindx2_o3, & + jindx1_h, jindx2_h, & + jindx1_aer, jindx2_aer, & + iindx1_aer, iindx2_aer, & + jindx1_ci, jindx2_ci, & + iindx1_ci, iindx2_ci, & + blksz, imap, jmap + real(kind=kind_phys), dimension(:), intent(in) :: ddy_o3, ddy_h, ddy_aer, & + ddx_aer, ddy_ci, ddx_ci, & + slmsk, vtype, weasd + real(kind=kind_phys), dimension(:,:), intent(in) :: prsl + + type(GFS_control_type), intent(in) :: Model + + real(kind=kind_phys), intent(inout) :: clstp + real(kind=kind_phys), dimension(:), intent(inout) :: sncovr + real(kind=kind_phys), dimension(:,:), intent(inout) :: rann, in_nm, ccn_nm + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: ozpl, h2opl, aer_nm + type(GFS_diag_type), intent(inout) :: Diag - logical, intent(in) :: first_time_step + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -270,8 +304,8 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, integer :: i, j, k, iseed, iskip, ix, nb, kdt_rad, vegtyp real(kind=kind_phys) :: sec_zero, rsnow real(kind=kind_phys) :: wrk(1) - real(kind=kind_phys) :: rannie(Model%cny) - real(kind=kind_phys) :: rndval(Model%cnx*Model%cny*Model%nrcm) + real(kind=kind_phys) :: rannie(cny) + real(kind=kind_phys) :: rndval(cnx*cny*nrcm) ! Initialize CCPP error handling variables errmsg = '' @@ -288,98 +322,98 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, !--- switch for saving convective clouds - cnvc90.f !--- aka Ken Campana/Yu-Tai Hou legacy - if ((mod(Model%kdt,Model%nsswr) == 0) .and. (Model%lsswr)) then + if ((mod(kdt,nsswr) == 0) .and. (lsswr)) then !--- initialize,accumulate,convert - Model%clstp = 1100 + min(Model%fhswr/con_hr,Model%fhour,con_99) - elseif (mod(Model%kdt,Model%nsswr) == 0) then + clstp = 1100 + min(fhswr/con_hr,fhour,con_99) + elseif (mod(kdt,nsswr) == 0) then !--- accumulate,convert - Model%clstp = 0100 + min(Model%fhswr/con_hr,Model%fhour,con_99) - elseif (Model%lsswr) then + clstp = 0100 + min(fhswr/con_hr,fhour,con_99) + elseif (lsswr) then !--- initialize,accumulate - Model%clstp = 1100 + clstp = 1100 else !--- accumulate - Model%clstp = 0100 + clstp = 0100 endif !--- random number needed for RAS and old SAS and when cal_pre=.true. - if ( (Model%imfdeepcnv <= 0 .or. Model%cal_pre) .and. Model%random_clds ) then - iseed = mod(con_100*sqrt(Model%fhour*con_hr),1.0d9) + Model%seed0 + if ( (imfdeepcnv <= 0 .or. cal_pre) .and. random_clds ) then + iseed = mod(con_100*sqrt(fhour*con_hr),1.0d9) + seed0 call random_setseed(iseed) call random_number(wrk) - do i = 1,Model%cnx*Model%nrcm + do i = 1,cnx*nrcm iseed = iseed + nint(wrk(1)*1000.0) * i call random_setseed(iseed) call random_number(rannie) - rndval(1+(i-1)*Model%cny:i*Model%cny) = rannie(1:Model%cny) + rndval(1+(i-1)*cny:i*cny) = rannie(1:cny) enddo - do k = 1,Model%nrcm - iskip = (k-1)*Model%cnx*Model%cny - do ix=1,Model%blksz(nb) - j = Tbd%jmap(ix) - i = Tbd%imap(ix) - Tbd%rann(ix,k) = rndval(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + iskip) + do k = 1,nrcm + iskip = (k-1)*cnx*cny + do ix=1,blksz(nb) + j = jmap(ix) + i = imap(ix) + rann(ix,k) = rndval(i+isc-1 + (j+jsc-2)*cnx + iskip) enddo enddo endif ! imfdeepcnv, cal_re, random_clds !--- o3 interpolation - if (Model%ntoz > 0) then - call ozinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_o3, Grid%jindx2_o3, Tbd%ozpl, Grid%ddy_o3) + if (ntoz > 0) then + call ozinterpol (me, blksz(nb), idate, fhour, & + jindx1_o3, jindx2_o3, ozpl, ddy_o3) endif !--- h2o interpolation - if (Model%h2o_phys) then - call h2ointerpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_h, Grid%jindx2_h, Tbd%h2opl, Grid%ddy_h) + if (h2o_phys) then + call h2ointerpol (me, blksz(nb), idate, fhour, & + jindx1_h, jindx2_h, h2opl, ddy_h) endif !--- aerosol interpolation - if (Model%iaerclm) then - call aerinterpol (Model%me, Model%master, Model%blksz(nb), & - Model%idate, Model%fhour, & - Grid%jindx1_aer, Grid%jindx2_aer, & - Grid%ddy_aer,Grid%iindx1_aer, & - Grid%iindx2_aer,Grid%ddx_aer, & - Model%levs,Statein%prsl, & - Tbd%aer_nm) + if (iaerclm) then + call aerinterpol (me, master, blksz(nb), & + idate, fhour, & + jindx1_aer, jindx2_aer, & + ddy_aer,iindx1_aer, & + iindx2_aer,ddx_aer, & + levs,prsl, & + aer_nm) endif !--- ICCN interpolation - if (Model%iccn == 1) then - call ciinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_ci, Grid%jindx2_ci, & - Grid%ddy_ci,Grid%iindx1_ci, & - Grid%iindx2_ci,Grid%ddx_ci, & - Model%levs,Statein%prsl, & - Tbd%in_nm, Tbd%ccn_nm) + if (iccn == 1) then + call ciinterpol (me, blksz(nb), idate, fhour, & + jindx1_ci, jindx2_ci, & + ddy_ci,iindx1_ci, & + iindx2_ci,ddx_ci, & + levs,prsl, & + in_nm, ccn_nm) endif !--- original FV3 code, not needed for SCM; also not compatible with the way ! the time vary steps are run (over each block) --> cannot use !--- repopulate specific time-varying sfc properties for AMIP/forecast runs !if (Model%nscyc > 0) then - ! if (mod(Model%kdt,Model%nscyc) == 1) THEN + ! if (mod(kdt,Model%nscyc) == 1) THEN ! call gcycle (nblks, Model, Grid(:), Sfcprop(:), Cldprop(:)) ! endif !endif !--- determine if diagnostics buckets need to be cleared - sec_zero = nint(Model%fhzero*con_hr) - if (sec_zero >= nint(max(Model%fhswr,Model%fhlwr))) then - if (mod(Model%kdt,Model%nszero) == 1) then + sec_zero = nint(fhzero*con_hr) + if (sec_zero >= nint(max(fhswr,fhlwr))) then + if (mod(kdt,nszero) == 1) then call Diag%rad_zero (Model) call Diag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif else - if (mod(Model%kdt,Model%nszero) == 1) then + if (mod(kdt,nszero) == 1) then call Diag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif - kdt_rad = nint(min(Model%fhswr,Model%fhlwr)/Model%dtp) - if (mod(Model%kdt, kdt_rad) == 1) then + kdt_rad = nint(min(fhswr,fhlwr)/dtp) + if (mod(kdt, kdt_rad) == 1) then call Diag%rad_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif @@ -388,19 +422,19 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, #if 0 !Calculate sncovr if it was read in but empty (from FV3/io/FV3GFS_io.F90/sfc_prop_restart_read) if (first_time_step) then - if (nint(Sfcprop%sncovr(1)) == -9999) then + if (nint(sncovr(1)) == -9999) then !--- compute sncovr from existing variables !--- code taken directly from read_fix.f - do ix = 1, Model%blksz(nb) - Sfcprop%sncovr(ix) = 0.0 - if (Sfcprop%slmsk(ix) > 0.001) then - vegtyp = Sfcprop%vtype(ix) + do ix = 1, blksz(nb) + sncovr(ix) = 0.0 + if (slmsk(ix) > 0.001) then + vegtyp = vtype(ix) if (vegtyp == 0) vegtyp = 7 - rsnow = 0.001*Sfcprop%weasd(ix)/snupx(vegtyp) - if (0.001*Sfcprop%weasd(ix) < snupx(vegtyp)) then - Sfcprop%sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) + rsnow = 0.001*weasd(ix)/snupx(vegtyp) + if (0.001*weasd(ix) < snupx(vegtyp)) then + sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) else - Sfcprop%sncovr(ix) = 1.0 + sncovr(ix) = 1.0 endif endif enddo diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 86b91e8c3..fd450c336 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,10 +1,26 @@ [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme -[ntoz] - standard_name = index_for_ozone - long_name = tracer index for ozone mixing ratio - units = index +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nx] + standard_name = number_of_points_in_x_direction_for_this_MPI_rank + long_name = number of points in x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[ny] + standard_name = number_of_points_in_y_direction_for_this_MPI_rank + long_name = number of points in y direction for this MPI rank + units = count dimensions = () type = integer intent = in @@ -25,20 +41,28 @@ type = integer intent = in optional = F -[h2o_phys] - standard_name = flag_for_stratospheric_water_vapor_physics - long_name = flag for stratospheric water vapor physics - units = flag +[nblks] + standard_name = ccpp_block_count + long_name = for explicit data blocking: number of blocks + units = count dimensions = () - type = logical + type = integer intent = in optional = F -[iaerclm] - standard_name = flag_for_aerosol_input_MG_radiation - long_name = flag for using aerosols in Morrison-Gettelman MP_radiation +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[iflip] + standard_name = flag_for_vertical_index_direction_control + long_name = iflip - is not the same as flipv units = flag dimensions = () - type = logical + type = integer intent = in optional = F [iccn] @@ -49,10 +73,18 @@ type = integer intent = in optional = F -[iflip] - standard_name = flag_for_vertical_index_direction_control - long_name = iflip - is not the same as flipv - units = flag +[levh2o_int] + standard_name = vertical_dimension_of_h2o_forcing_data + long_name = number of vertical layers in h2o forcing data + units = count + dimensions = () + type = integer + intent = in + optional = F +[levozp_int] + standard_name = vertical_dimension_of_ozone_forcing_data + long_name = number of vertical layers in ozone forcing data + units = count dimensions = () type = integer intent = in @@ -65,14 +97,6 @@ type = integer intent = in optional = F -[nblks] - standard_name = ccpp_block_count - long_name = for explicit data blocking: number of blocks - units = count - dimensions = () - type = integer - intent = in - optional = F [blksz] standard_name = ccpp_block_sizes long_name = for explicit data blocking: block sizes of all blocks @@ -81,28 +105,20 @@ type = integer intent = in optional = F -[nx] - standard_name = number_of_points_in_x_direction_for_this_MPI_rank - long_name = number of points in x direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[ny] - standard_name = number_of_points_in_y_direction_for_this_MPI_rank - long_name = number of points in y direction for this MPI rank - units = count +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag dimensions = () - type = integer + type = logical intent = in optional = F -[im] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation + units = flag dimensions = () - type = integer + type = logical intent = in optional = F [xlat_d] @@ -123,22 +139,6 @@ kind = kind_phys intent = in optional = F -[levh2o_int] - standard_name = vertical_dimension_of_h2o_forcing_data - long_name = number of vertical layers in h2o forcing data - units = count - dimensions = () - type = integer - intent = in - optional = F -[levozp_int] - standard_name = vertical_dimension_of_ozone_forcing_data - long_name = number of vertical layers in ozone forcing data - units = count - dimensions = () - type = integer - intent = in - optional = F [ozpl] standard_name = ozone_forcing long_name = ozone forcing data @@ -166,6 +166,22 @@ kind = kind_phys intent = in optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F [jindx1_o3] standard_name = lower_ozone_interpolation_index long_name = interpolation low index for ozone @@ -182,15 +198,6 @@ type = integer intent = inout optional = F -[ddy_o3] - standard_name = ozone_interpolation_weight - long_name = interpolation high index for ozone - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [jindx1_h] standard_name = lower_water_vapor_interpolation_index long_name = interpolation low index for stratospheric water vapor @@ -207,15 +214,6 @@ type = integer intent = inout optional = F -[ddy_h] - standard_name = water_vapor_interpolation_weight - long_name = interpolation high index for stratospheric water vapor - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [jindx1_aer] standard_name = lower_aerosol_y_interpolation_index long_name = interpolation low index for prescribed aerosols in the y direction @@ -232,15 +230,6 @@ type = integer intent = inout optional = F -[ddy_aer] - standard_name = aerosol_y_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [iindx1_aer] standard_name = lower_aerosol_x_interpolation_index long_name = interpolation low index for prescribed aerosols in the x direction @@ -257,15 +246,6 @@ type = integer intent = inout optional = F -[ddx_aer] - standard_name = aerosol_x_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [jindx1_ci] standard_name = lower_cloud_nuclei_y_interpolation_index long_name = interpolation low index for ice and cloud condensation nuclei in the y direction @@ -282,15 +262,6 @@ type = integer intent = inout optional = F -[ddy_ci] - standard_name = cloud_nuclei_y_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [iindx1_ci] standard_name = lower_cloud_nuclei_x_interpolation_index long_name = interpolation low index for ice and cloud condensation nuclei in the x direction @@ -307,6 +278,51 @@ type = integer intent = inout optional = F +[ddy_o3] + standard_name = ozone_interpolation_weight + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ddy_h] + standard_name = water_vapor_interpolation_weight + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ddy_aer] + standard_name = aerosol_y_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ddx_aer] + standard_name = aerosol_x_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ddy_ci] + standard_name = cloud_nuclei_y_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [ddx_ci] standard_name = cloud_nuclei_x_interpolation_weight long_name = interpolation high index for ice and cloud condensation nuclei in the x direction @@ -334,22 +350,6 @@ kind = kind_phys intent = inout optional = F -[imap] - standard_name = map_of_block_column_number_to_global_i_index - long_name = map of local index ix to global index i for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jmap] - standard_name = map_of_block_column_number_to_global_j_index - long_name = map of local index ix to global index j for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -394,61 +394,125 @@ [ccpp-arg-table] name = GFS_phys_time_vary_run type = scheme -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[cnx] + standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face + long_name = number of points in x direction for this cubed sphere face + units = count dimensions = () - type = GFS_statein_type + type = integer intent = in optional = F -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[cny] + standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face + long_name = number of points in y direction for this cubed sphere face + units = count dimensions = () - type = GFS_control_type - intent = inout + type = integer + intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS miscellaneous data - units = DDT +[isc] + standard_name = starting_x_index_for_this_MPI_rank + long_name = starting index in the x direction for this MPI rank + units = count dimensions = () - type = GFS_tbd_type - intent = inout + type = integer + intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT +[jsc] + standard_name = starting_y_index_for_this_MPI_rank + long_name = starting index in the y direction for this MPI rank + units = count dimensions = () - type = GFS_sfcprop_type - intent = inout + type = integer + intent = in optional = F -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = Fortran DDT containing FV3-GFS cloud fields - units = DDT +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () - type = GFS_cldprop_type - intent = inout + type = integer + intent = in optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = Fortran DDT containing FV3-GFS fields targeted for diagnostic output - units = DDT +[master] + standard_name = mpi_root + long_name = master MPI-rank + units = index dimensions = () - type = GFS_diag_type - intent = inout + type = integer + intent = in + optional = F +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[iccn] + standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics + long_name = flag for IN and CCN forcing for morrison gettelman microphysics + units = none + dimensions = () + type = integer + intent = in + optional = F +[nrcm] + standard_name = array_dimension_of_random_number + long_name = second dimension of random number stream for RAS + units = count + dimensions = () + type = integer + intent = in + optional = F +[nsswr] + standard_name = number_of_timesteps_between_shortwave_radiation_calls + long_name = number of timesteps between shortwave radiation calls + units = + dimensions = () + type = integer + intent = in + optional = F +[nszero] + standard_name = number_of_timesteps_between_diagnostic_clearing + long_name = number of timesteps between calls to clear diagnostic variables + units = count + dimensions = () + type = integer + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv] + standard_name = flag_for_mass_flux_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[seed0] + standard_name = seed_random_numbers_RAS + long_name = random number seed for the RAS scheme + units = none + dimensions = () + type = integer + intent = in optional = F [first_time_step] standard_name = flag_for_first_time_step @@ -458,6 +522,397 @@ type = logical intent = in optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[cal_pre] + standard_name = flag_for_precipitation_type_algorithm + long_name = flag controls precip type algorithm + units = flag + dimensions = () + type = logical + intent = in + optional = F +[random_clds] + standard_name = flag_for_random_clouds_for_RAS + long_name = flag for using random clouds with the RAS scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhour] + standard_name = forecast_time + long_name = current forecast time + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhzero] + standard_name = frequency_for_diagnostic_clearing + long_name = frequency for clearing diagnostic fields + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[dtp] + standard_name = time_step_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[idate] + standard_name = date_and_time_at_model_initialization_reordered + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer + intent = in + optional = F +[jindx1_o3] + standard_name = lower_ozone_interpolation_index + long_name = interpolation low index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_o3] + standard_name = upper_ozone_interpolation_index + long_name = interpolation high index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx1_h] + standard_name = lower_water_vapor_interpolation_index + long_name = interpolation low index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_h] + standard_name = upper_water_vapor_interpolation_index + long_name = interpolation high index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx1_aer] + standard_name = lower_aerosol_y_interpolation_index + long_name = interpolation low index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_aer] + standard_name = upper_aerosol_y_interpolation_index + long_name = interpolation high index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx1_aer] + standard_name = lower_aerosol_x_interpolation_index + long_name = interpolation low index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx2_aer] + standard_name = upper_aerosol_x_interpolation_index + long_name = interpolation high index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx1_ci] + standard_name = lower_cloud_nuclei_y_interpolation_index + long_name = interpolation low index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_ci] + standard_name = upper_cloud_nuclei_y_interpolation_index + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx1_ci] + standard_name = lower_cloud_nuclei_x_interpolation_index + long_name = interpolation low index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx2_ci] + standard_name = upper_cloud_nuclei_x_interpolation_index + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[blksz] + standard_name = ccpp_block_sizes + long_name = for explicit data blocking: block sizes of all blocks + units = count + dimensions = (ccpp_block_count) + type = integer + intent = in + optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddy_o3] + standard_name = ozone_interpolation_weight + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddy_h] + standard_name = water_vapor_interpolation_weight + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddy_aer] + standard_name = aerosol_y_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddx_aer] + standard_name = aerosol_x_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddy_ci] + standard_name = cloud_nuclei_y_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddx_ci] + standard_name = cloud_nuclei_x_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[vtype] + standard_name = vegetation_type_classification_real + long_name = vegetation type for lsm + units = index + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[weasd] + standard_name = water_equivalent_accumulated_snow_depth + long_name = water equiv of acc snow depth over land and sea ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[Model] + standard_name = GFS_control_type_instance + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[clstp] + standard_name = convective_cloud_switch + long_name = index used by cnvc90 (for convective clouds) + units = none + dimensions = () + type = real + kind = kind_phys + intent = inout + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rann] + standard_name = random_number_array + long_name = random number array (0-1) + units = none + dimensions = (horizontal_dimension,array_dimension_of_random_number) + type = real + kind = kind_phys + intent = inout + optional = F +[in_nm] + standard_name = in_number_concentration + long_name = IN number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ccn_nm] + standard_name = ccn_number_concentration + long_name = CCN number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ozpl] + standard_name = ozone_forcing + long_name = ozone forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[h2opl] + standard_name = h2o_forcing + long_name = water forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[aer_nm] + standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + long_name = GOCART aerosol climatology number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = inout + optional = F +[Diag] + standard_name = GFS_diag_type_instance + long_name = Fortran DDT containing FV3-GFS fields targeted for diagnostic output + units = DDT + dimensions = () + type = GFS_diag_type + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -474,4 +929,4 @@ dimensions = () type = integer intent = out - optional = F + optional = F \ No newline at end of file diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index 04f7f1529..8341b3992 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -153,7 +153,7 @@ [nscyc] standard_name = number_of_timesteps_between_surface_cycling_calls long_name = number of timesteps between surface cycling calls - units = + units = count dimensions = () type = integer intent = in diff --git a/physics/GFS_time_vary_pre.scm.meta b/physics/GFS_time_vary_pre.scm.meta index 3dc91952e..d3474e457 100644 --- a/physics/GFS_time_vary_pre.scm.meta +++ b/physics/GFS_time_vary_pre.scm.meta @@ -137,7 +137,7 @@ [nscyc] standard_name = number_of_timesteps_between_surface_cycling_calls long_name = number of timesteps between surface cycling calls - units = + units = count dimensions = () type = integer intent = in From cd06bbd3877b382cd1703a44a6c98a31fcfb1aed Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 10:18:53 -0600 Subject: [PATCH 313/404] clean up GFS_rrtmg_post --- physics/GFS_rrtmg_post.F90 | 37 +++-- physics/GFS_rrtmg_post.meta | 298 ++++++++++++++++++------------------ 2 files changed, 169 insertions(+), 166 deletions(-) diff --git a/physics/GFS_rrtmg_post.F90 b/physics/GFS_rrtmg_post.F90 index aacf9aaf5..6bd329921 100644 --- a/physics/GFS_rrtmg_post.F90 +++ b/physics/GFS_rrtmg_post.F90 @@ -13,32 +13,29 @@ end subroutine GFS_rrtmg_post_init !> \section arg_table_GFS_rrtmg_post_run Argument Table !! \htmlinclude GFS_rrtmg_post_run.html !! - subroutine GFS_rrtmg_post_run (lsswr, lslwr, lssav, fhlwr, fhswr, prsi, tgrs, sfcflw, sfcfsw, topflw, topfsw, coszen, coszdg, fluxr, & - scmpsw, nspc1, nfxr, im, km, kmp1, lm, ltp, kt, kb, kd, raddt, aerodp, & - cldsa, mtopa, mbota, clouds1, cldtaulw, cldtausw, nday, & - errmsg, errflg) + subroutine GFS_rrtmg_post_run (im, km, kmp1, lm, ltp, kt, kb, kd, nspc1, & + nfxr, nday, lsswr, lslwr, lssav, fhlwr, fhswr, raddt, coszen, & + coszdg, prsi, tgrs, aerodp, cldsa, mtopa, mbota, clouds1, & + cldtaulw, cldtausw, sfcflw, sfcfsw, topflw, topfsw, scmpsw, & + fluxr, errmsg, errflg) use machine, only: kind_phys - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, cmpfsw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & + cmpfsw_type use module_radlw_parameters, only: topflw_type, sfcflw_type implicit none ! Interface variables - type(sfcflw_type), dimension(im), intent(in) :: sfcflw - type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw - type(cmpfsw_type), dimension(im), intent(in) :: scmpsw - type(topflw_type), dimension(im), intent(in) :: topflw - type(topfsw_type), dimension(im), intent(in) :: topfsw - - integer, intent(in) :: nspc1, nfxr, im, km, kmp1, lm, ltp, kt, kb, kd, nday - real(kind=kind_phys), intent(in) :: raddt, fhlwr, fhswr + integer, intent(in) :: im, km, kmp1, lm, ltp, kt, kb, kd, & + nspc1, nfxr, nday logical, intent(in) :: lsswr, lslwr, lssav + real(kind=kind_phys), intent(in) :: raddt, fhlwr, fhswr + + real(kind=kind_phys), dimension(im), intent(in) :: coszen, coszdg - real(kind=kind_phys), dimension(im), intent(in) :: coszen, coszdg - - real(kind=kind_phys), dimension(im,kmp1), intent(in) :: prsi - real(kind=kind_phys), dimension(im,km), intent(in) :: tgrs + real(kind=kind_phys), dimension(im,kmp1), intent(in) :: prsi + real(kind=kind_phys), dimension(im,km), intent(in) :: tgrs real(kind=kind_phys), dimension(im,NSPC1), intent(in) :: aerodp real(kind=kind_phys), dimension(im,5), intent(in) :: cldsa @@ -47,6 +44,12 @@ subroutine GFS_rrtmg_post_run (lsswr, lslwr, lssav, fhlwr, fhswr, prsi, tgrs, sf real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtausw real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtaulw + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw + type(cmpfsw_type), dimension(im), intent(in) :: scmpsw + type(topflw_type), dimension(im), intent(in) :: topflw + type(topfsw_type), dimension(im), intent(in) :: topfsw + real(kind=kind_phys), dimension(im,nfxr), intent(inout) :: fluxr character(len=*), intent(out) :: errmsg diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index e996236ab..a90791796 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -6,149 +6,6 @@ [ccpp-arg-table] name = GFS_rrtmg_post_run type = scheme -[lsswr] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lssav] - standard_name = flag_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[fhlwr] - standard_name = frequency_for_longwave_radiation - long_name = frequency for longwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fhswr] - standard_name = frequency_for_shortwave_radiation - long_name = frequency for shortwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[prsi] - standard_name = air_pressure_at_interface - long_name = air pressure at model layer interfaces - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sfcflw] - standard_name = lw_fluxes_sfc - long_name = lw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_loop_extent) - type = sfcflw_type - intent = in - optional = F -[sfcfsw] - standard_name = sw_fluxes_sfc - long_name = sw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_loop_extent) - type = sfcfsw_type - intent = in - optional = F -[topflw] - standard_name = lw_fluxes_top_atmosphere - long_name = lw radiation fluxes at top - units = W m-2 - dimensions = (horizontal_loop_extent) - type = topflw_type - intent = in - optional = F -[topfsw] - standard_name = sw_fluxes_top_atmosphere - long_name = sw radiation fluxes at toa - units = W m-2 - dimensions = (horizontal_loop_extent) - type = topfsw_type - intent = in - optional = F -[coszen] - standard_name = cosine_of_zenith_angle - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[coszdg] - standard_name = daytime_mean_cosz_over_rad_call_period - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[fluxr] - standard_name = cumulative_radiation_diagnostic - long_name = time-accumulated 2D radiation-related diagnostic fields - units = various - dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) - type = real - kind = kind_phys - intent = inout - optional = F -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_loop_extent) - type = cmpfsw_type - intent = in - optional = F -[nspc1] - standard_name = number_of_species_for_aerosol_optical_depth - long_name = number of species for output aerosol optical depth plus total - units = count - dimensions = () - type = integer - intent = in - optional = F -[nfxr] - standard_name = number_of_radiation_diagnostic_variables - long_name = number of variables stored in the fluxr array - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -213,6 +70,72 @@ type = integer intent = in optional = F +[nspc1] + standard_name = number_of_species_for_aerosol_optical_depth + long_name = number of species for output aerosol optical depth plus total + units = count + dimensions = () + type = integer + intent = in + optional = F +[nfxr] + standard_name = number_of_radiation_diagnostic_variables + long_name = number of variables stored in the fluxr array + units = count + dimensions = () + type = integer + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step @@ -222,6 +145,42 @@ kind = kind_phys intent = in optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [aerodp] standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species @@ -283,14 +242,55 @@ kind = kind_phys intent = in optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer +[sfcflw] + standard_name = lw_fluxes_sfc + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcflw_type + intent = in + optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcfsw_type intent = in optional = F +[topflw] + standard_name = lw_fluxes_top_atmosphere + long_name = lw radiation fluxes at top + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topflw_type + intent = in + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topfsw_type + intent = in + optional = F +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_loop_extent) + type = cmpfsw_type + intent = in + optional = F +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = various + dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From f7e6770d2a20317beb0f86ccb247a71a91704b58 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 10:30:23 -0600 Subject: [PATCH 314/404] clean upu rrtmg_lw_post --- physics/rrtmg_lw_post.F90 | 8 +++++--- physics/rrtmg_lw_post.meta | 18 +++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/physics/rrtmg_lw_post.F90 b/physics/rrtmg_lw_post.F90 index 50d735f75..9a482e53e 100644 --- a/physics/rrtmg_lw_post.F90 +++ b/physics/rrtmg_lw_post.F90 @@ -17,7 +17,7 @@ end subroutine rrtmg_lw_post_init !! #endif subroutine rrtmg_lw_post_run (im, levs, ltp, lm, kd, lslwr, lwhtr, & - tsfa, htlwc, htlw0, sfcflw, tsflw, htrlw, lwhc, sfcdlw, & + tsfa, htlwc, htlw0, sfcflw, tsflw, sfcdlw, htrlw, lwhc, & errmsg, errflg) use machine, only: kind_phys @@ -25,12 +25,14 @@ subroutine rrtmg_lw_post_run (im, levs, ltp, lm, kd, lslwr, lwhtr, & implicit none - integer, intent(in) :: im, ltp, LM, kd, levs + integer, intent(in) :: im, levs, ltp, lm, kd logical, intent(in) :: lslwr, lwhtr + real(kind=kind_phys), dimension(im), intent(in) :: tsfa real(kind=kind_phys), dimension(im, LM+LTP), intent(in) :: htlwc real(kind=kind_phys), dimension(im, LM+LTP), intent(in) :: htlw0 - real(kind=kind_phys), dimension(im), intent(in) :: tsfa + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + real(kind=kind_phys), dimension(im), intent(inout) :: tsflw, sfcdlw real(kind=kind_phys), dimension(im, levs), intent(inout) :: htrlw, lwhc character(len=*), intent(out) :: errmsg diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 447e3a066..9fdef489f 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -106,6 +106,15 @@ kind = kind_phys intent = inout optional = F +[sfcdlw] + standard_name = surface_downwelling_longwave_flux_on_radiation_time_step + long_name = total sky sfc downward lw flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [htrlw] standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate @@ -124,15 +133,6 @@ kind = kind_phys intent = inout optional = F -[sfcdlw] - standard_name = surface_downwelling_longwave_flux_on_radiation_time_step - long_name = total sky sfc downward lw flux - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 5fe8234cae90457f68f4f06ae5248602db32e187 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 10:47:54 -0600 Subject: [PATCH 315/404] cleanup rrtmg_[sw,lw]_[pre,post] --- physics/rrtmg_lw_pre.F90 | 2 +- physics/rrtmg_sw_post.F90 | 27 ++++++++----- physics/rrtmg_sw_post.meta | 80 +++++++++++++++++++------------------- physics/rrtmg_sw_pre.F90 | 17 ++++---- 4 files changed, 68 insertions(+), 58 deletions(-) diff --git a/physics/rrtmg_lw_pre.F90 b/physics/rrtmg_lw_pre.F90 index c14053a10..b8f1d52e1 100644 --- a/physics/rrtmg_lw_pre.F90 +++ b/physics/rrtmg_lw_pre.F90 @@ -25,7 +25,7 @@ subroutine rrtmg_lw_pre_run (im, lslwr, xlat, xlon, slmsk, snowd, sncovr,& integer, intent(in) :: im logical, intent(in) :: lslwr real(kind=kind_phys), dimension(im), intent(in) :: xlat, xlon, slmsk, & - snowd, sncovr, zorl, hprime, tsfa, tsfg + snowd, sncovr, zorl, hprime, tsfg, tsfa real(kind=kind_phys), dimension(im), intent(out) :: semis character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/rrtmg_sw_post.F90 b/physics/rrtmg_sw_post.F90 index d234e7ef6..546395f02 100644 --- a/physics/rrtmg_sw_post.F90 +++ b/physics/rrtmg_sw_post.F90 @@ -16,10 +16,10 @@ end subroutine rrtmg_sw_post_init !! #endif subroutine rrtmg_sw_post_run (im, levr, levs, ltp, nday, lm, kd, lsswr, & - swhtr, htswc, htsw0, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & - scmpsw, sfcfsw, topfsw, nirbmdi, nirdfdi, visbmdi, visdfdi, & - nirbmui, nirdfui, visbmui, visdfui, sfcdsw, sfcnsw, htrsw, & - swhc, errmsg, errflg) + swhtr, sfcalb1, sfcalb2, sfcalb3, sfcalb4, htswc, htsw0, & + nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui,& + visdfui, sfcdsw, sfcnsw, htrsw, swhc, scmpsw, sfcfsw, topfsw, & + errmsg, errflg) use machine, only: kind_phys use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & @@ -27,17 +27,24 @@ subroutine rrtmg_sw_post_run (im, levr, levs, ltp, nday, lm, kd, lsswr, & implicit none - integer, intent(in) :: im, lm, kd, nday, levr, levs, ltp + integer, intent(in) :: im, levr, levs, & + ltp, nday, lm, kd logical, intent(in) :: lsswr, swhtr + real(kind=kind_phys), dimension(im), intent(in) :: sfcalb1, sfcalb2, & + sfcalb3, sfcalb4 real(kind=kind_phys), dimension(im, levr+LTP), intent(in) :: htswc, htsw0 - real(kind=kind_phys), dimension(im), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + + real(kind=kind_phys), dimension(im), intent(inout) :: nirbmdi, nirdfdi, & + visbmdi, visdfdi, & + nirbmui, nirdfui, & + visbmui, visdfui, & + sfcdsw, sfcnsw + real(kind=kind_phys), dimension(im,levs), intent(inout) :: htrsw, swhc + type(cmpfsw_type), dimension(im), intent(inout) :: scmpsw type(sfcfsw_type), dimension(im), intent(inout) :: sfcfsw type(topfsw_type), dimension(im), intent(inout) :: topfsw - real(kind=kind_phys), dimension(im), intent(inout) :: nirbmdi, nirdfdi, visbmdi, & - visdfdi, nirbmui, nirdfui, & - visbmui, visdfui, sfcdsw, sfcnsw - real(kind=kind_phys), dimension(im,levs), intent(inout) :: htrsw, swhc + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index ba1739e44..093a4e290 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -78,24 +78,6 @@ type = logical intent = in optional = F -[htswc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels - long_name = total sky heating rate due to shortwave radiation - units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in - optional = F -[htsw0] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels - long_name = clear sky heating rates due to shortwave radiation - units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in - optional = F [sfcalb1] standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam @@ -132,29 +114,23 @@ kind = kind_phys intent = in optional = F -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_dimension) - type = cmpfsw_type - intent = inout - optional = F -[sfcfsw] - standard_name = sw_fluxes_sfc - long_name = sw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_dimension) - type = sfcfsw_type - intent = inout +[htswc] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels + long_name = total sky heating rate due to shortwave radiation + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in optional = F -[topfsw] - standard_name = sw_fluxes_top_atmosphere - long_name = sw radiation fluxes at toa - units = W m-2 - dimensions = (horizontal_dimension) - type = topfsw_type - intent = inout +[htsw0] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels + long_name = clear sky heating rates due to shortwave radiation + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in optional = F [nirbmdi] standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step @@ -264,6 +240,30 @@ kind = kind_phys intent = inout optional = F +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = inout + optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcfsw_type + intent = inout + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_dimension) + type = topfsw_type + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index 09e00019a..6cbeddf53 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -28,17 +28,20 @@ subroutine rrtmg_sw_pre_run (im, lsswr, pertalb, tsfg, tsfa, coszen, & integer, intent(in) :: im logical, intent(in) :: lsswr real(kind=kind_phys), dimension(5), intent(in) :: pertalb - real(kind=kind_phys), dimension(im), intent(in) :: tsfa, tsfg, coszen + real(kind=kind_phys), dimension(im), intent(in) :: tsfg, tsfa, coszen real(kind=kind_phys), dimension(im), intent(in) :: alb1d - real(kind=kind_phys), dimension(im), intent(in) :: slmsk, snowd, & - sncovr, snoalb, zorl, & - hprime, alvsf, alnsf, & - alvwf, alnwf, facsf, & - facwf, fice, tisfc + real(kind=kind_phys), dimension(im), intent(in) :: slmsk, snowd, & + sncovr, snoalb, & + zorl, hprime, & + alvsf, alnsf, & + alvwf, alnwf, & + facsf, facwf, & + fice, tisfc real(kind=kind_phys), dimension(im), intent(inout) :: sfalb integer, intent(out) :: nday integer, dimension(im), intent(out) :: idxday - real(kind=kind_phys), dimension(im), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + real(kind=kind_phys), dimension(im), intent(out) :: sfcalb1, sfcalb2, & + sfcalb3, sfcalb4 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables From 7349ae593b1be6e5293b4bb961da46fda6ede699 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 21:52:08 -0600 Subject: [PATCH 316/404] remove GFS DDTs and physcons from GFS_rrtmg_pre --- physics/GFS_rrtmg_pre.F90 | 519 ++++++++++--------- physics/GFS_rrtmg_pre.meta | 1009 +++++++++++++++++++++++++++--------- 2 files changed, 1040 insertions(+), 488 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 6dc14497a..9b2faaf02 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -18,41 +18,30 @@ end subroutine GFS_rrtmg_pre_init !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine - subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input - Tbd, Cldprop, Coupling, & - Radtend, & ! input/output - imfdeepcnv, imfdeepcnv_gf, & - f_ice, f_rain, f_rimef, flgmin, cwm, & ! F-A mp scheme only - lm, im, lmk, lmp, & ! input - kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output - tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & - gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, & - gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, & - gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, & - faersw1, faersw2, faersw3, & - faerlw1, faerlw2, faerlw3, aerodp, & - clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & - clouds7, clouds8, clouds9, cldsa, cldfra, & - mtopa, mbota, de_lgth, alb1d, errmsg, errflg) + subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, imfdeepcnv, & + imfdeepcnv_gf, me, ncnd, ntrac, num_p3d, npdf3d, ncnvcld3d, ntqv, ntcw,& + ntiw, ntlnc, ntinc, ncld, ntrw, ntsw, ntgl, ntwa, ntoz, ntclamt, & + nleffr, nieffr, nseffr, kdt, imp_physics, imp_physics_thompson, & + imp_physics_gfdl, imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, & + imp_physics_mg, imp_physics_wsm6, imp_physics_fer_hires, lsswr, lslwr, & + ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, & + lmfdeep2, do_sfcperts, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & + rog, rocp, con_rd, pertalb, xlat, xlon, coslat, sinlat, tsfc, slmsk, & + prsi, prsl, prslk, tgrs, sfc_wts, phy_f3d_mg_cld, phy_f3d_reffr, & + phy_f3d_cnvw, phy_f3d_cnvc, f_ice, f_rain, f_rimef, qgrs, aer_nm, & !inputs from here and above + coszen, coszdg, phy_f3d_leffr, phy_f3d_ieffr, phy_f3d_seffr, & + clouds1, clouds2, clouds3, clouds4, clouds5, & !in/out from here and above + kd, kt, kb, mtopa, mbota, raddt, tsfg, tsfa, de_lgth, alb1d, delp, dz, & !output from here and below + plvl, plyr, tlvl, tlyr, qlyr, olyr, gasvmr_co2, gasvmr_n2o, gasvmr_ch4,& + gasvmr_o2, gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, gasvmr_cfc22, & + gasvmr_ccl4, gasvmr_cfc113, aerodp, clouds6, clouds7, clouds8, & + clouds9, cldsa, cldfra, faersw1, faersw2, faersw3, faerlw1, faerlw2, & + faerlw3, errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_stateout_type, & - GFS_sfcprop_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type, & - GFS_cldprop_type, & - GFS_radtend_type, & - GFS_diag_type + use physparam - use physcons, only: eps => con_eps, & - & epsm1 => con_epsm1, & - & fvirt => con_fvirt & - &, rog => con_rog & - &, rocp => con_rocp & - &, con_rd + use radcons, only: itsfc,ltp, lextop, qmin, & qme5, qme6, epsq, prsmin use funcphys, only: fpvs @@ -81,85 +70,126 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_grid_type), intent(in) :: Grid - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_statein_type), intent(in) :: Statein - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_tbd_type), intent(in) :: Tbd - type(GFS_cldprop_type), intent(in) :: Cldprop - type(GFS_coupling_type), intent(in) :: Coupling - - integer, intent(in) :: im, lm, lmk, lmp - integer, intent(in) :: imfdeepcnv, imfdeepcnv_gf - integer, intent(out) :: kd, kt, kb - -! F-A mp scheme only - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: f_ice, & - f_rain, f_rimef - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: cwm - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: flgmin - real(kind=kind_phys), intent(out) :: raddt - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: delp, & - dz, plyr, tlyr, qlyr, olyr - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+1+LTP), intent(out) :: plvl, tlvl - - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfg, tsfa - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: gasvmr_co2, & - gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & - gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDSW), intent(out) :: faersw1, & - faersw2, faersw3 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDLW), intent(out) :: faerlw1, & - faerlw2, faerlw3 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(inout) :: clouds1, & - clouds2, clouds3, clouds4, clouds5 - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: clouds6, & - clouds7, clouds8, clouds9, cldfra - - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota, mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth, alb1d - + integer, intent(in) :: im, levs, lm, lmk, lmp, imfdeepcnv, & + imfdeepcnv_gf, me, ncnd, ntrac, & + num_p3d, npdf3d, ncnvcld3d, ntqv, & + ntcw, ntiw, ntlnc, ntinc, ncld, & + ntrw, ntsw, ntgl, ntwa, ntoz, & + ntclamt, nleffr, nieffr, nseffr, & + kdt, imp_physics, & + imp_physics_thompson, & + imp_physics_gfdl, & + imp_physics_zhao_carr, & + imp_physics_zhao_carr_pdf, & + imp_physics_mg, imp_physics_wsm6, & + imp_physics_fer_hires + + logical, intent(in) :: lsswr, lslwr, ltaerosol, lgfdlmprad, & + uni_cld, effr_in, do_mynnedmf, & + lmfshal, lmfdeep2, do_sfcperts + + real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup + real(kind=kind_phys), intent(in) :: eps, epsm1, fvirt, rog, rocp, con_rd + + real(kind=kind_phys), dimension(:), intent(in) :: pertalb, xlat, xlon, & + coslat, sinlat, tsfc, & + slmsk + + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsl, prslk, & + tgrs, sfc_wts, & + phy_f3d_mg_cld, & + phy_f3d_reffr, & + phy_f3d_cnvw, & + phy_f3d_cnvc + ! F-A mp scheme only + real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: f_ice, f_rain, & + f_rimef + + real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs, aer_nm + + real(kind=kind_phys), dimension(:), intent(inout) :: coszen, coszdg + + real(kind=kind_phys), dimension(:,:), intent(inout) :: phy_f3d_leffr, & + phy_f3d_ieffr, & + phy_f3d_seffr + real(kind=kind_phys), dimension(im,lm+LTP), intent(inout) :: clouds1, & + clouds2, clouds3, & + clouds4, clouds5 + + integer, intent(out) :: kd, kt, kb + + integer, dimension(im,3), intent(out) :: mbota, mtopa + + real(kind=kind_phys), intent(out) :: raddt + + real(kind=kind_phys), dimension(im), intent(out) :: tsfg, tsfa + real(kind=kind_phys), dimension(im), intent(out) :: de_lgth, & + alb1d + + real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: delp, dz, & + plyr, tlyr, & + qlyr, olyr + + real(kind=kind_phys), dimension(im,lm+1+LTP), intent(out) :: plvl, tlvl + + + + real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: gasvmr_co2, & + gasvmr_n2o, & + gasvmr_ch4, & + gasvmr_o2, & + gasvmr_co, & + gasvmr_cfc11,& + gasvmr_cfc12,& + gasvmr_cfc22,& + gasvmr_ccl4,& + gasvmr_cfc113 + real(kind=kind_phys), dimension(im,NSPC1), intent(out) :: aerodp + real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: clouds6, & + clouds7, & + clouds8, & + clouds9, & + cldfra + real(kind=kind_phys), dimension(im,5), intent(out) :: cldsa + + real(kind=kind_phys), dimension(im,lm+LTP,NBDSW), intent(out) :: faersw1,& + faersw2,& + faersw3 + + real(kind=kind_phys), dimension(im,lm+LTP,NBDLW), intent(out) :: faerlw1,& + faerlw2,& + faerlw3 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables - integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl, ncndl, ntlnc, ntinc, ntwa + integer :: ncndl - integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb + integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya,lyb real(kind=kind_phys) :: es, qs, delt, tem0d - real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn + real(kind=kind_phys), dimension(im) :: cvt1, cvb1, tem1d, tskn - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP) :: & + real(kind=kind_phys), dimension(im,lm+LTP) :: & htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & cldcov, deltaq, cnvc, cnvw, & effrl, effri, effrr, effrs, rho, orho ! for Thompson MP - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP) :: & + real(kind=kind_phys), dimension(im,lm+LTP) :: & re_cloud, re_ice, re_snow, qv_mp, qc_mp, & qi_mp, qs_mp, nc_mp, ni_mp, nwfa - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP+1) :: tem2db -! real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP+1) :: hz + real(kind=kind_phys), dimension(im,lm+LTP+1) :: tem2db +! real(kind=kind_phys), dimension(im,lm+LTP+1) :: hz - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,min(4,Model%ncnd)) :: ccnd - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,2:Model%ntrac) :: tracer1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NF_CLDS) :: clouds - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NF_VGAS) :: gasvmr - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDSW,NF_AESW) ::faersw - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDLW,NF_AELW) ::faerlw + real(kind=kind_phys), dimension(im,lm+LTP,min(4,ncnd)) :: ccnd + real(kind=kind_phys), dimension(im,lm+LTP,2:ntrac) :: tracer1 + real(kind=kind_phys), dimension(im,lm+LTP,NF_CLDS) :: clouds + real(kind=kind_phys), dimension(im,lm+LTP,NF_VGAS) :: gasvmr + real(kind=kind_phys), dimension(im,lm+LTP,NBDSW,NF_AESW) :: faersw + real(kind=kind_phys), dimension(im,lm+LTP,NBDLW,NF_AELW) :: faerlw real(kind=kind_phys) :: qvs ! @@ -169,22 +199,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input errmsg = '' errflg = 0 - if (.not. (Model%lsswr .or. Model%lslwr)) return + if (.not. (lsswr .or. lslwr)) return !--- set commonly used integers - me = Model%me - NFXR = Model%nfxr - NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) - ntcw = Model%ntcw - ntiw = Model%ntiw - ntlnc = Model%ntlnc - ntinc = Model%ntinc - ncld = Model%ncld - ntrw = Model%ntrw - ntsw = Model%ntsw - ntgl = Model%ntgl - ntwa = Model%ntwa - ncndl = min(Model%ncnd,4) + ncndl = min(ncnd,4) LP1 = LM + 1 ! num of in/out levels @@ -221,7 +239,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif ! end if_ivflip_block endif ! end if_lextop_block - raddt = min(Model%fhswr, Model%fhlwr) + raddt = min(fhswr, fhlwr) ! print *,' in grrad : raddt=',raddt @@ -230,13 +248,13 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp do i = 1, IM - tskn(i) = Sfcprop%tsfc(i) - tsfg(i) = Sfcprop%tsfc(i) + tskn(i) = tsfc(i) + tsfg(i) = tsfc(i) enddo else ! use diff sfc skin-air/ground temp do i = 1, IM - tskn(i) = Sfcprop%tsfc(i) - tsfg(i) = Sfcprop%tsfc(i) + tskn(i) = tsfc(i) + tsfg(i) = tsfc(i) enddo endif @@ -245,34 +263,34 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! lsk = 0 - if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm + if (ivflip == 0 .and. lm < levs) lsk = levs - lm ! convert pressure unit from pa to mb do k = 1, LM k1 = k + kd k2 = k + lsk do i = 1, IM - plvl(i,k1+kb) = Statein%prsi(i,k2+kb) * 0.01 ! pa to mb (hpa) - plyr(i,k1) = Statein%prsl(i,k2) * 0.01 ! pa to mb (hpa) - tlyr(i,k1) = Statein%tgrs(i,k2) - prslk1(i,k1) = Statein%prslk(i,k2) + plvl(i,k1+kb) = prsi(i,k2+kb) * 0.01 ! pa to mb (hpa) + plyr(i,k1) = prsl(i,k2) * 0.01 ! pa to mb (hpa) + tlyr(i,k1) = tgrs(i,k2) + prslk1(i,k1) = prslk(i,k2) rho(i,k1) = plyr(i,k1)/(con_rd*tlyr(i,k1)) orho(i,k1) = 1.0/rho(i,k1) !> - Compute relative humidity. - es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) - rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, Statein%qgrs(i,k2,1))/qs ) ) + es = min( prsl(i,k2), fpvs( tgrs(i,k2) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (prsl(i,k2) + epsm1*es) ) + rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, qgrs(i,k2,ntqv))/qs ) ) qstl(i,k1) = qs enddo enddo !--- recast remaining all tracers (except sphum) forcing them all to be positive - do j = 2, NTRAC + do j = 2, ntrac do k = 1, LM k1 = k + kd k2 = k + lsk - tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) + tracer1(:,k1,j) = max(0.0, qgrs(:,k2,j)) enddo enddo ! @@ -281,28 +299,28 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input k1 = 1 + kd k2 = k1 + kb do i = 1, IM - plvl(i,k2) = 0.01 * Statein%prsi(i,1+kb) ! pa to mb (hpa) + plvl(i,k2) = 0.01 * prsi(i,1+kb) ! pa to mb (hpa) plyr(i,k1) = 0.5 * (plvl(i,k2+1) + plvl(i,k2)) prslk1(i,k1) = (plyr(i,k1)*0.001) ** rocp enddo else k1 = 1 + kd do i = 1, IM - plvl(i,k1) = Statein%prsi(i,1) * 0.01 ! pa to mb (hpa) + plvl(i,k1) = prsi(i,1) * 0.01 ! pa to mb (hpa) enddo endif else ! input data from sfc to top - if (Model%levs > lm) then + if (levs > lm) then k1 = lm + kd do i = 1, IM - plvl(i,k1+1) = 0.01 * Statein%prsi(i,Model%levs+1) ! pa to mb (hpa) + plvl(i,k1+1) = 0.01 * prsi(i,levs+1) ! pa to mb (hpa) plyr(i,k1) = 0.5 * (plvl(i,k1+1) + plvl(i,k1)) prslk1(i,k1) = (plyr(i,k1)*0.001) ** rocp enddo else k1 = lp1 + kd do i = 1, IM - plvl(i,k1) = Statein%prsi(i,lp1) * 0.01 ! pa to mb (hpa) + plvl(i,k1) = prsi(i,lp1) * 0.01 ! pa to mb (hpa) enddo endif endif @@ -326,22 +344,21 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input !> - Get layer ozone mass mixing ratio (if use ozone climatology data, !! call getozn()). - if (Model%ntoz > 0) then ! interactive ozone generation + if (ntoz > 0) then ! interactive ozone generation do k=1,lmk do i=1,im - olyr(i,k) = max( QMIN, tracer1(i,k,Model%ntoz) ) + olyr(i,k) = max( QMIN, tracer1(i,k,ntoz) ) enddo enddo else ! climatological ozone - call getozn (prslk1, Grid%xlat, IM, LMK, & ! --- inputs - olyr) ! --- outputs + call getozn (prslk1, xlat, im, lmk, & ! --- inputs + olyr) ! --- outputs endif ! end_if_ntoz !> - Call coszmn(), to compute cosine of zenith angle (only when SW is called) - if (Model%lsswr) then - call coszmn (Grid%xlon,Grid%sinlat, & ! --- inputs - Grid%coslat,Model%solhr, IM, me, & - Radtend%coszen, Radtend%coszdg) ! --- outputs + if (lsswr) then + call coszmn (xlon,sinlat,coslat,solhr,im,me, & ! --- inputs + coszen, coszdg) ! --- outputs endif !> - Call getgases(), to set up non-prognostic gas volume mixing @@ -359,8 +376,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! --- ... set up non-prognostic gas volume mixing ratioes - call getgases (plvl, Grid%xlon, Grid%xlat, IM, LMK, & ! --- inputs - gasvmr) ! --- outputs + call getgases (plvl, xlon, xlat, IM, LMK, & ! --- inputs + gasvmr) ! --- outputs !CCPP: re-assign gasvmr(:,:,NF_VGAS) to gasvmr_X(:,:) do k = 1, LMK @@ -400,9 +417,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do k = 1, LM k1 = k + kd do i = 1, IM - qlyr(i,k1) = max( tem1d(i), Statein%qgrs(i,k,1) ) + qlyr(i,k1) = max( tem1d(i), qgrs(i,k,ntqv) ) tem1d(i) = min( QME5, qlyr(i,k1) ) - tvly(i,k1) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) + tvly(i,k1) = tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) delp(i,k1) = plvl(i,k1+1) - plvl(i,k1) enddo enddo @@ -451,9 +468,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do k = LM, 1, -1 do i = 1, IM - qlyr(i,k) = max( tem1d(i), Statein%qgrs(i,k,1) ) + qlyr(i,k) = max( tem1d(i), qgrs(i,k,ntqv) ) tem1d(i) = min( QME5, qlyr(i,k) ) - tvly(i,k) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) + tvly(i,k) = tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) delp(i,k) = plvl(i,k) - plvl(i,k+1) enddo enddo @@ -495,11 +512,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input !check print *,' in grrad : calling setaer ' - call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, & ! --- inputs - tracer1, Tbd%aer_nm, & - Grid%xlon, Grid%xlat, IM, LMK, LMP, & - Model%lsswr,Model%lslwr, & - faersw,faerlw,aerodp) ! --- outputs + call setaer (plvl, plyr, prslk1, tvly, rhly, slmsk, & ! --- inputs + tracer1, aer_nm, xlon, xlat, IM, LMK, LMP,& + lsswr,lslwr, & + faersw,faerlw,aerodp) ! --- outputs ! CCPP do j = 1,NBDSW @@ -537,20 +553,20 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! if (ntcw > 0) then ! prognostic cloud schemes ccnd = 0.0_kind_phys - if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist + if (ncnd == 1) then ! Zhao_Carr_Sundqvist do k=1,LMK do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice enddo enddo - elseif (Model%ncnd == 2) then ! MG or F-A + elseif (ncnd == 2) then ! MG or F-A do k=1,LMK do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water - ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water + ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water enddo enddo - elseif (Model%ncnd == 4) then ! MG2 + elseif (ncnd == 4) then ! MG2 do k=1,LMK do i=1,IM ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water @@ -559,7 +575,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(i,k,4) = tracer1(i,k,ntsw) ! snow water enddo enddo - elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 + elseif (ncnd == 5) then ! GFDL MP, Thompson, MG3 do k=1,LMK do i=1,IM ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water @@ -569,10 +585,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo ! for Thompson MP - prepare variables for calc_effr - if (Model%imp_physics == Model%imp_physics_thompson .and. Model%ltaerosol) then + if (imp_physics == imp_physics_thompson .and. ltaerosol) then do k=1,LMK do i=1,IM - qvs = Statein%qgrs(i,k,1) + qvs = qgrs(i,k,ntqv) qv_mp (i,k) = qvs/(1.-qvs) qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) @@ -582,10 +598,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input nwfa (i,k) = tracer1(i,k,ntwa) enddo enddo - elseif (Model%imp_physics == Model%imp_physics_thompson) then + elseif (imp_physics == imp_physics_thompson) then do k=1,LMK do i=1,IM - qvs = Statein%qgrs(i,k,1) + qvs = qgrs(i,k,ntqv) qv_mp (i,k) = qvs/(1.-qvs) qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) @@ -603,17 +619,17 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo enddo - if (Model%imp_physics == Model%imp_physics_gfdl ) then - if (.not. Model%lgfdlmprad) then + if (imp_physics == imp_physics_gfdl ) then + if (.not. lgfdlmprad) then ! rsun the summation methods and order make the difference in calculation -! clw(:,:) = clw(:,:) + tracer1(:,1:LMK,Model%ntcw) & -! + tracer1(:,1:LMK,Model%ntiw) & -! + tracer1(:,1:LMK,Model%ntrw) & -! + tracer1(:,1:LMK,Model%ntsw) & -! + tracer1(:,1:LMK,Model%ntgl) +! clw(:,:) = clw(:,:) + tracer1(:,1:LMK,ntcw) & +! + tracer1(:,1:LMK,ntiw) & +! + tracer1(:,1:LMK,ntrw) & +! + tracer1(:,1:LMK,ntsw) & +! + tracer1(:,1:LMK,ntgl) ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntrw) ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) @@ -621,7 +637,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) ! else -! do j=1,Model%ncld +! do j=1,ncld ! ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntcw+j-1) ! cloud condensate amount ! enddo endif @@ -632,34 +648,34 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo endif ! - if (Model%uni_cld) then - if (Model%effr_in) then + if (uni_cld) then + if (effr_in) then do k=1,lm k1 = k + kd do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - effrl(i,k1) = Tbd%phy_f3d(i,k,2) - effri(i,k1) = Tbd%phy_f3d(i,k,3) - effrr(i,k1) = Tbd%phy_f3d(i,k,4) - effrs(i,k1) = Tbd%phy_f3d(i,k,5) + cldcov(i,k1) = phy_f3d_mg_cld(i,k) + effrl(i,k1) = phy_f3d_leffr(i,k) + effri(i,k1) = phy_f3d_ieffr(i,k) + effrr(i,k1) = phy_f3d_reffr(i,k) + effrs(i,k1) = phy_f3d_seffr(i,k) enddo enddo else do k=1,lm k1 = k + kd do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + cldcov(i,k1) = phy_f3d_mg_cld(i,k) enddo enddo endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - if (Model%do_mynnedmf .and. Model%kdt>1) THEN + elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP + if (do_mynnedmf .and. kdt>1) THEN do k=1,lm k1 = k + kd do i=1,im if (tracer1(i,k1,ntrw)>1.0e-7 .OR. tracer1(i,k1,ntsw)>1.0e-7) then ! GFDL cloud fraction - cldcov(i,k1) = tracer1(I,k1,Model%ntclamt) + cldcov(i,k1) = tracer1(I,k1,ntclamt) else ! MYNN sub-grid cloud fraction cldcov(i,k1) = clouds1(i,k1) @@ -668,37 +684,37 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo else ! GFDL cloud fraction - cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,ntclamt) endif - if(Model%effr_in) then + if(effr_in) then do k=1,lm k1 = k + kd do i=1,im - effrl(i,k1) = Tbd%phy_f3d(i,k,1) - effri(i,k1) = Tbd%phy_f3d(i,k,2) - effrr(i,k1) = Tbd%phy_f3d(i,k,3) - effrs(i,k1) = Tbd%phy_f3d(i,k,4) -! if(Model%me==0) then + effrl(i,k1) = phy_f3d_leffr(i,k) + effri(i,k1) = phy_f3d_ieffr(i,k) + effrr(i,k1) = phy_f3d_reffr(i,k) + effrs(i,k1) = phy_f3d_seffr(i,k) +! if(me==0) then ! if(effrl(i,k1)> 5.0) then -! write(6,*) 'rad driver:cloud radii:',Model%kdt, i,k1, & +! write(6,*) 'rad driver:cloud radii:',kdt, i,k1, & ! effrl(i,k1) ! endif ! if(effrs(i,k1)==0.0) then -! write(6,*) 'rad driver:snow mixing ratio:',Model%kdt, i,k1, & +! write(6,*) 'rad driver:snow mixing ratio:',kdt, i,k1, & ! tracer1(i,k,ntsw) ! endif ! endif enddo enddo endif - elseif (Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP + elseif (imp_physics == imp_physics_thompson) then ! Thompson MP ! ! Compute effective radii for QC, QI, QS with (GF, MYNN) or without (all others) sub-grid clouds ! ! Update number concentration, consistent with sub-grid clouds (GF, MYNN) or without (all others) do k=1,lm do i=1,im - if (Model%ltaerosol .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then + if (ltaerosol .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then nc_mp(i,k) = make_DropletNumber(qc_mp(i,k)*rho(i,k), nwfa(i,k)) * orho(i,k) endif if (qi_mp(i,k)>1.e-12 .and. ni_mp(i,k)<100.) then @@ -737,9 +753,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do k=1,lm k1 = k + kd do i=1,im - Tbd%phy_f3d(i,k,Model%nleffr) = effrl(i,k1) - Tbd%phy_f3d(i,k,Model%nieffr) = effri(i,k1) - Tbd%phy_f3d(i,k,Model%nseffr) = effrs(i,k1) + phy_f3d_leffr(i,k) = effrl(i,k1) + phy_f3d_ieffr(i,k) = effri(i,k1) + phy_f3d_seffr(i,k) = effrs(i,k1) enddo enddo else ! all other cases @@ -753,25 +769,27 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! for zhao/moorthi's (imp_phys=99) & ! ferrier's (imp_phys=5) microphysics schemes - if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 + if ((num_p3d == 4) .and. (npdf3d == 3)) then ! same as imp_physics = 98 do k=1,lm k1 = k + kd do i=1,im - deltaq(i,k1) = Tbd%phy_f3d(i,k,5) - cnvw (i,k1) = Tbd%phy_f3d(i,k,6) - cnvc (i,k1) = Tbd%phy_f3d(i,k,7) + !GJF: this is not consistent with GFS_typedefs, + ! but it looks like the Zhao-Carr-PDF scheme is not in the CCPP + deltaq(i,k1) = 0.0!Tbd%phy_f3d(i,k,5) !GJF: this variable is not in phy_f3d anymore + cnvw (i,k1) = phy_f3d_cnvw(i,k) + cnvc (i,k1) = phy_f3d_cnvc(i,k) enddo enddo - elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 + elseif ((npdf3d == 0) .and. (ncnvcld3d == 1)) then ! same as imp_physics=99 do k=1,lm k1 = k + kd do i=1,im deltaq(i,k1) = 0.0 - cnvw (i,k1) = Tbd%phy_f3d(i,k,Model%num_p3d+1) + cnvw (i,k1) = phy_f3d_cnvw(i,k) cnvc (i,k1) = 0.0 enddo enddo - else ! all the rest + else ! all the rest do k=1,lmk do i=1,im deltaq(i,k) = 0.0 @@ -788,7 +806,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cnvw (i,lyb) = cnvw (i,lya) cnvc (i,lyb) = cnvc (i,lya) enddo - if (Model%effr_in) then + if (effr_in) then do i=1,im effrl(i,lyb) = effrl(i,lya) effri(i,lyb) = effri(i,lya) @@ -798,86 +816,78 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif endif - if (Model%imp_physics == 99) then + if (imp_physics == imp_physics_zhao_carr) then ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) endif - if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme + if (imp_physics == imp_physics_zhao_carr .or. imp_physics == imp_physics_mg) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics - if (Model%uni_cld .and. Model%ncld >= 2) then + if (uni_cld .and. ncld >= 2) then call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & + xlat, xlon, slmsk, dz, delp, & IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & + effrl, effri, effrr, effrs, effr_in, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else - call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & - Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & - Model%uni_cld, Model%lmfshal, & - Model%lmfdeep2, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), xlat, xlon, slmsk, dz, & + delp, IM, LMK, LMP, uni_cld, lmfshal, lmfdeep2,& + cldcov, effrl, effri, effrr, effrs, effr_in, & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 98) then ! zhao/moorthi's prognostic cloud+pdfcld + elseif(imp_physics == imp_physics_zhao_carr_pdf) then ! zhao/moorthi's prognostic cloud+pdfcld - call progcld3 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), & - cnvw, cnvc, Grid%xlat, Grid%xlon, & - Sfcprop%slmsk, dz, delp, im, lmk, lmp, deltaq, & - Model%sup, Model%kdt, me, & + call progcld3 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), cnvw, cnvc, xlat, xlon, & + slmsk, dz, delp, im, lmk, lmp, deltaq, sup, kdt, & + me, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - elseif (Model%imp_physics == 11) then ! GFDL cloud scheme + elseif (imp_physics == imp_physics_gfdl) then ! GFDL cloud scheme - if (.not.Model%lgfdlmprad) then + if (.not. lgfdlmprad) then call progcld4 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), cnvw, cnvc, & - Grid%xlat, Grid%xlon, Sfcprop%slmsk, & - cldcov, dz, delp, im, lmk, lmp, & + ccnd(1:IM,1:LMK,1), cnvw, cnvc, xlat, xlon, & + slmsk, cldcov, dz, delp, im, lmk, lmp, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else - call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, xlat, & ! --- inputs + xlon, slmsk, dz,delp, IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, effr_in, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs ! call progcld4o (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs -! tracer1, Grid%xlat, Grid%xlon, Sfcprop%slmsk, & -! dz, delp, & -! ntrac-1, Model%ntcw-1,Model%ntiw-1,Model%ntrw-1,& -! Model%ntsw-1,Model%ntgl-1,Model%ntclamt-1, & +! tracer1, xlat, xlon, slmsk, dz, delp, & +! ntrac-1, ntcw-1,ntiw-1,ntrw-1, & +! ntsw-1,ntgl-1,ntclamt-1, & ! im, lmk, lmp, & ! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 6 .or. Model%imp_physics == 15) then - if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,Model%nleffr) = 10. - Tbd%phy_f3d(:,:,Model%nieffr) = 50. - Tbd%phy_f3d(:,:,Model%nseffr) = 250. + elseif(imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_fer_hires) then + if (kdt == 1) then + phy_f3d_leffr(:,:) = 10. + phy_f3d_ieffr(:,:) = 50. + phy_f3d_seffr(:,:) = 250. endif call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + xlat,xlon,slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, & + cldcov(:,1:LMK),phy_f3d_leffr(:,:), & + phy_f3d_ieffr(:,:), phy_f3d_seffr(:,:), & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs - elseif(Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP + elseif(imp_physics == imp_physics_thompson) then ! Thompson MP - if(Model%do_mynnedmf .or. & - Model%imfdeepcnv == Model%imfdeepcnv_gf ) then ! MYNN PBL or GF conv + if(do_mynnedmf .or. imfdeepcnv == imfdeepcnv_gf ) then ! MYNN PBL or GF conv !-- MYNN PBL or convective GF !-- use cloud fractions with SGS clouds do k=1,lmk @@ -889,27 +899,26 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! --- use clduni as with the GFDL microphysics. ! --- make sure that effr_in=.true. in the input.nml! call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & - IM, LMK, LMP, clouds(:,1:LMK,1), & - effrl, effri, effrr, effrs, Model%effr_in , & + xlat, xlon, slmsk, dz, delp, IM, LMK, LMP, & + clouds(:,1:LMK,1), & + effrl, effri, effrr, effrs, effr_in , & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else ! MYNN PBL or GF convective are not used call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + xlat,xlon,slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, & + cldcov(:,1:LMK), phy_f3d_leffr(:,:), & + phy_f3d_ieffr(:,:), phy_f3d_seffr(:,:), & + clouds, cldsa, mtopa ,mbota, de_lgth) ! --- outputs endif ! MYNN PBL or GF endif ! end if_imp_physics -! endif ! end_if_ntcw +! endif ! end_if_ntcw do k = 1, LMK do i = 1, IM @@ -931,10 +940,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! perturbation size ! --- turn vegetation fraction pattern into percentile pattern alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then + if (do_sfcperts) then + if (pertalb(1) > 0.) then do i=1,im - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + call cdfnor(sfc_wts(i,5),alb1d(i)) enddo endif endif diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 9d51e708d..dd021df6d 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -6,69 +6,615 @@ [ccpp-arg-table] name = GFS_rrtmg_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT +[lm] + standard_name = number_of_vertical_layers_for_radiation_calculations + long_name = number of vertical layers for radiation calculation + units = count dimensions = () - type = GFS_sfcprop_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore - units = DDT +[lmk] + standard_name = adjusted_vertical_layer_dimension_for_radiation + long_name = number of vertical layers for radiation + units = count dimensions = () - type = GFS_statein_type + type = integer intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container - units = DDT +[lmp] + standard_name = adjusted_vertical_level_dimension_for_radiation + long_name = number of vertical levels for radiation + units = count dimensions = () - type = GFS_tbd_type + type = integer intent = in optional = F -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics - units = DDT +[imfdeepcnv] + standard_name = flag_for_mass_flux_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag dimensions = () - type = GFS_cldprop_type + type = integer intent = in optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields needed for coupling - units = DDT +[imfdeepcnv_gf] + standard_name = flag_for_gf_deep_convection_scheme + long_name = flag for Grell-Freitas deep convection scheme + units = flag dimensions = () - type = GFS_coupling_type + type = integer intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS radiation tendencies - units = DDT +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () - type = GFS_radtend_type - intent = inout + type = integer + intent = in + optional = F +[ncnd] + standard_name = number_of_cloud_condensate_types + long_name = number of cloud condensate types + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[num_p3d] + standard_name = array_dimension_of_3d_arrays_for_microphysics + long_name = number of 3D arrays needed for microphysics + units = count + dimensions = () + type = integer + intent = in + optional = F +[npdf3d] + standard_name = number_of_3d_arrays_associated_with_pdf_based_clouds + long_name = number of 3d arrays associated with pdf based clouds/mp + units = count + dimensions = () + type = integer + intent = in + optional = F +[ncnvcld3d] + standard_name = number_of_convective_3d_cloud_fields + long_name = number of convective 3d clouds fields + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntqv] + standard_name = index_for_water_vapor + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntcw] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_for_ice_cloud_condensate + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntlnc] + standard_name = index_for_liquid_cloud_number_concentration + long_name = tracer index for liquid number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntinc] + standard_name = index_for_ice_cloud_number_concentration + long_name = tracer index for ice number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ncld] + standard_name = number_of_hydrometeors + long_name = choice of cloud scheme / number of hydrometeors + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_for_rain_water + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_for_snow_water + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgl] + standard_name = index_for_graupel + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntwa] + standard_name = index_for_water_friendly_aerosols + long_name = tracer index for water friendly aerosol + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntclamt] + standard_name = index_for_cloud_amount + long_name = tracer index for cloud amount integer + units = index + dimensions = () + type = integer + intent = in + optional = F +[nleffr] + standard_name = index_for_cloud_liquid_water_effective_radius + long_name = the index of cloud liquid water effective radius in phy_f3d + units = + dimensions = () + type = integer + intent = in + optional = F +[nieffr] + standard_name = index_for_ice_effective_radius + long_name = the index of ice effective radius in phy_f3d + units = + dimensions = () + type = integer + intent = in + optional = F +[nseffr] + standard_name = index_for_snow_effective_radius + long_name = the index of snow effective radius in phy_f3d + units = + dimensions = () + type = integer + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_thompson] + standard_name = flag_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_gfdl] + standard_name = flag_for_gfdl_microphysics_scheme + long_name = choice of GFDL microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr] + standard_name = flag_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr_pdf] + standard_name = flag_for_zhao_carr_pdf_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme with PDF clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_mg] + standard_name = flag_for_morrison_gettelman_microphysics_scheme + long_name = choice of Morrison-Gettelman microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_wsm6] + standard_name = flag_for_wsm6_microphysics_scheme + long_name = choice of WSM6 microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_fer_hires] + standard_name = flag_for_fer_hires_microphysics_scheme + long_name = choice of Ferrier-Aligo microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ltaerosol] + standard_name = flag_for_aerosol_physics + long_name = flag for aerosol physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lgfdlmprad] + standard_name = flag_for_GFDL_microphysics_radiation_interaction + long_name = flag for GFDL microphysics-radiation interaction + units = flag + dimensions = () + type = logical + intent = in + optional = F +[uni_cld] + standard_name = flag_for_uni_cld + long_name = flag for uni_cld + units = flag + dimensions = () + type = logical + intent = in + optional = F +[effr_in] + standard_name = flag_for_cloud_effective_radii + long_name = flag for cloud effective radii calculations in GFDL microphysics + units = + dimensions = () + type = logical + intent = in + optional = F +[do_mynnedmf] + standard_name = do_mynnedmf + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lmfshal] + standard_name = flag_for_lmfshal + long_name = flag for lmfshal + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lmfdeep2] + standard_name = flag_for_scale_aware_mass_flux_convection + long_name = flag for some scale-aware mass-flux convection scheme active + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_sfcperts] + standard_name = flag_for_stochastic_surface_perturbations + long_name = flag for stochastic surface perturbations option + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[solhr] + standard_name = forecast_hour_of_the_day + long_name = time in hours after 00z at the current timestep + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[sup] + standard_name = ice_supersaturation_threshold + long_name = ice supersaturation parameter for PDF clouds + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[epsm1] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + long_name = (rd/rv) - 1 + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fvirt] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rog] + standard_name = ratio_of_gas_constant_dry_air_to_gravitational_acceleration + long_name = (rd/g) + units = J s2 K-1 kg-1 m-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rocp] + standard_name = ratio_of_gas_constant_dry_air_to_specific_heat_of_dry_air_at_constant_pressure + long_name = (rd/cp) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[pertalb] + standard_name = magnitude_of_surface_albedo_perturbation + long_name = magnitude of surface albedo perturbation + units = frac + dimensions = (5) + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = latitude + units = radian + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[xlon] + standard_name = longitude + long_name = longitude + units = radian + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[coslat] + standard_name = cosine_of_latitude + long_name = cosine of latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sinlat] + standard_name = sine_of_latitude + long_name = sine of latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prslk] + standard_name = dimensionless_exner_function_at_model_layers + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_wts] + standard_name = weights_for_stochastic_surface_physics_perturbation + long_name = weights for stochastic surface physics perturbation + units = none + dimensions = (horizontal_dimension,number_of_surface_perturbations) + type = real + kind = kind_phys + intent = in + optional = F +[phy_f3d_mg_cld] + standard_name = cloud_fraction_for_MG + long_name = cloud fraction used by Morrison-Gettelman MP + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phy_f3d_reffr] + standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um + long_name = effective radius of cloud rain particle in micrometers + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phy_f3d_cnvw] + standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d + long_name = convective cloud water mixing ratio in the phy_f3d array + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phy_f3d_cnvc] + standard_name = convective_cloud_cover_in_phy_f3d + long_name = convective cloud cover in the phy_f3d array + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in optional = F [f_ice] standard_name = fraction_of_ice_water_cloud @@ -97,55 +643,113 @@ kind = kind_phys intent = in optional = F -[flgmin] - standard_name = minimum_large_ice_fraction - long_name = minimum large ice fraction in F-A mp scheme - units = frac - dimensions = (2) +[qgrs] + standard_name = tracer_concentration + long_name = model layer mean tracer concentration + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F -[cwm] - standard_name = total_cloud_condensate_mixing_ratio_updated_by_physics - long_name = total cloud condensate mixing ratio (except water vapor) updated by physics - units = kg kg-1 +[aer_nm] + standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + long_name = GOCART aerosol climatology number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = in + optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[phy_f3d_leffr] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F -[lm] - standard_name = number_of_vertical_layers_for_radiation_calculations - long_name = number of vertical layers for radiation calculation - units = count - dimensions = () - type = integer - intent = in +[phy_f3d_ieffr] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in +[phy_f3d_seffr] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometers + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout optional = F -[lmk] - standard_name = adjusted_vertical_layer_dimension_for_radiation - long_name = number of vertical layers for radiation - units = count - dimensions = () - type = integer - intent = in +[clouds1] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout optional = F -[lmp] - standard_name = adjusted_vertical_level_dimension_for_radiation - long_name = number of vertical levels for radiation - units = count - dimensions = () - type = integer - intent = in +[clouds2] + standard_name = cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds3] + standard_name = mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds4] + standard_name = cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds5] + standard_name = mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout optional = F [kd] standard_name = vertical_index_difference_between_inout_and_local @@ -171,6 +775,22 @@ type = integer intent = out optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step @@ -180,6 +800,42 @@ kind = kind_phys intent = out optional = F +[tsfg] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tsfa] + standard_name = surface_air_temperature_for_radiation + long_name = lowest model layer air temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[alb1d] + standard_name = surface_albedo_perturbation + long_name = surface albedo perturbation + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [delp] standard_name = layer_pressure_thickness_for_radiation long_name = layer pressure thickness on radiation levels @@ -234,24 +890,6 @@ kind = kind_phys intent = out optional = F -[tsfg] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[tsfa] - standard_name = surface_air_temperature_for_radiation - long_name = lowest model layer air temperature for radiation - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [qlyr] standard_name = water_vapor_specific_humidity_at_layer_for_radiation long_name = water vapor specific humidity at vertical layer for radiation calculation @@ -270,22 +908,6 @@ kind = kind_phys intent = out optional = F -[imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme - long_name = flag for mass-flux deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imfdeepcnv_gf] - standard_name = flag_for_gf_deep_convection_scheme - long_name = flag for Grell-Freitas deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [gasvmr_co2] standard_name = volume_mixing_ratio_co2 long_name = CO2 volume mixing ratio @@ -376,60 +998,6 @@ kind = kind_phys intent = out optional = F -[faersw1] - standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 - long_name = aerosol optical depth for shortwave bands 01-16 - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faersw2] - standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 - long_name = aerosol single scattering albedo for shortwave bands 01-16 - units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faersw3] - standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 - long_name = aerosol asymmetry parameter for shortwave bands 01-16 - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faerlw1] - standard_name = aerosol_optical_depth_for_longwave_bands_01_16 - long_name = aerosol optical depth for longwave bands 01-16 - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faerlw2] - standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 - long_name = aerosol single scattering albedo for longwave bands 01-16 - units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faerlw3] - standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 - long_name = aerosol asymmetry parameter for longwave bands 01-16 - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F [aerodp] standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species @@ -439,51 +1007,6 @@ kind = kind_phys intent = out optional = F -[clouds1] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[clouds2] - standard_name = cloud_liquid_water_path - long_name = layer cloud liquid water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[clouds3] - standard_name = mean_effective_radius_for_liquid_cloud - long_name = mean effective radius for liquid cloud - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[clouds4] - standard_name = cloud_ice_water_path - long_name = layer cloud ice water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[clouds5] - standard_name = mean_effective_radius_for_ice_cloud - long_name = mean effective radius for ice cloud - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [clouds6] standard_name = cloud_rain_water_path long_name = cloud rain water path @@ -538,36 +1061,56 @@ kind = kind_phys intent = out optional = F -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_dimension,3) - type = integer +[faersw1] + standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 + long_name = aerosol optical depth for shortwave bands 01-16 + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys intent = out optional = F -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_dimension,3) - type = integer +[faersw2] + standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 + long_name = aerosol single scattering albedo for shortwave bands 01-16 + units = frac + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys intent = out optional = F -[de_lgth] - standard_name = cloud_decorrelation_length - long_name = cloud decorrelation length - units = km - dimensions = (horizontal_dimension) +[faersw3] + standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 + long_name = aerosol asymmetry parameter for shortwave bands 01-16 + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out optional = F -[alb1d] - standard_name = surface_albedo_perturbation - long_name = surface albedo perturbation +[faerlw1] + standard_name = aerosol_optical_depth_for_longwave_bands_01_16 + long_name = aerosol optical depth for longwave bands 01-16 + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[faerlw2] + standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 + long_name = aerosol single scattering albedo for longwave bands 01-16 units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[faerlw3] + standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 + long_name = aerosol asymmetry parameter for longwave bands 01-16 + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out From d4d823e919d80a010866414b79b0a6a3643c6910 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 27 Aug 2020 09:36:57 -0600 Subject: [PATCH 317/404] add fluxr and uncomment radiation diagnostics for rrtmgp_[sw,lw]_post --- physics/GFS_rrtmgp_lw_post.F90 | 80 +++++++++++----------- physics/GFS_rrtmgp_lw_post.meta | 9 +++ physics/GFS_rrtmgp_sw_post.F90 | 118 ++++++++++++++++---------------- physics/GFS_rrtmgp_sw_post.meta | 71 ++++++++++--------- 4 files changed, 150 insertions(+), 128 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index a6b37acfc..537ce8879 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -26,8 +26,8 @@ end subroutine GFS_rrtmgp_lw_post_init !! subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag, fhlwr, & p_lev, t_lay, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & - fluxlwDOWN_clrsky, raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, sfcdlw, & - sfcflw, tsflw, htrlw, topflw, flxprf_lw, htrlwc, errmsg, errflg) + fluxlwDOWN_clrsky, raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, fluxr, & + sfcdlw, sfcflw, tsflw, htrlw, topflw, flxprf_lw, htrlwc, errmsg, errflg) ! Inputs integer, intent(in) :: & @@ -61,7 +61,9 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag real(kind_phys), dimension(nCol,nLev), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtaulw ! approx 10.mu band layer cloud optical depth - + + real(kind=kind_phys), dimension(:,:), intent(inout) :: fluxr + ! Outputs (mandatory) real(kind_phys), dimension(nCol), intent(out) :: & sfcdlw, & ! Total sky sfc downward lw flux (W/m2) @@ -168,42 +170,42 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag ! - Collect the fluxr data for wrtsfc ! ####################################################################################### if (save_diag) then -! do i=1,nCol -! ! LW all-sky fluxes -! Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up -! Diag%fluxr(i,19) = Diag%fluxr(i,19) + fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn -! Diag%fluxr(i,20) = Diag%fluxr(i,20) + fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up -! ! LW clear-sky fluxes -! Diag%fluxr(i,28) = Diag%fluxr(i,28) + fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up -! Diag%fluxr(i,30) = Diag%fluxr(i,30) + fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn -! Diag%fluxr(i,33) = Diag%fluxr(i,33) + fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up -! enddo -! -! do i=1,nCol -! Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) -! Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) -! enddo -! -! ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud is reversed for -! ! the fluxr output. save interface pressure (pa) of top/bot -! do j = 1, 3 -! do i = 1, nCol -! tem0d = raddt * cldsa(i,j) -! itop = mtopa(i,j) -! ibtc = mbota(i,j) -! Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d -! Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * p_lev(i,itop) -! Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * p_lev(i,ibtc) -! Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * t_lay(i,itop) -! -! ! Add optical depth and emissivity output -! tem2 = 0. -! do k=ibtc,itop -! tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel -! enddo -! Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) -! enddo -! enddo + do i=1,nCol + ! LW all-sky fluxes + fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up + fluxr(i,19) = fluxr(i,19) + fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn + fluxr(i,20) = fluxr(i,20) + fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up + ! LW clear-sky fluxes + fluxr(i,28) = fluxr(i,28) + fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up + fluxr(i,30) = fluxr(i,30) + fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn + fluxr(i,33) = fluxr(i,33) + fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up + enddo + + do i=1,nCol + fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) + fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) + enddo + + ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud is reversed for + ! the fluxr output. save interface pressure (pa) of top/bot + do j = 1, 3 + do i = 1, nCol + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) + ibtc = mbota(i,j) + fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d + fluxr(i,11-j) = fluxr(i,11-j) + tem0d * p_lev(i,itop) + fluxr(i,14-j) = fluxr(i,14-j) + tem0d * p_lev(i,ibtc) + fluxr(i,17-j) = fluxr(i,17-j) + tem0d * t_lay(i,itop) + + ! Add optical depth and emissivity output + tem2 = 0. + do k=ibtc,itop + tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel + enddo + fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + enddo + enddo endif end subroutine GFS_rrtmgp_lw_post_run diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index c261a7797..c2fba7cea 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -174,6 +174,15 @@ kind = kind_phys intent = in optional = F +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = various + dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + type = real + kind = kind_phys + intent = inout + optional = F [sfcdlw] standard_name = surface_downwelling_longwave_flux_on_radiation_time_step long_name = total sky sfc downward lw flux diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 0d3991fcf..3a9871a5c 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -28,7 +28,7 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky save_diag, fhswr, coszen, coszdg, t_lay, p_lev, sfc_alb_nir_dir, sfc_alb_nir_dif, & sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sw_gas_props, fluxswUP_allsky, & fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & - mtopa, cld_frac, cldtausw, & + mtopa, cld_frac, cldtausw, fluxr, & nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, & sfcdsw, htrsw, sfcfsw, topfsw, htrswc, flxprf_sw, scmpsw, errmsg, errflg) @@ -85,7 +85,9 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky ! nirdf - downward nir diffused flux (W/m2) ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) - + + real(kind=kind_phys), dimension(:,:), intent(inout) :: fluxr + ! Outputs (mandatory) real(kind_phys), dimension(nCol), intent(out) :: & nirbmdi, & ! sfc nir beam sw downward flux (W/m2) @@ -253,62 +255,62 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky ! - Collect the fluxr data for wrtsfc ! ####################################################################################### if (save_diag) then -! do i=1,nCol -! Diag%fluxr(i,34) = Diag%fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm -! Diag%fluxr(i,35) = Diag%fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm -! Diag%fluxr(i,36) = Diag%fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm -! Diag%fluxr(i,37) = Diag%fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm -! Diag%fluxr(i,38) = Diag%fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm -! Diag%fluxr(i,39) = Diag%fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm -! if (coszen(i) > 0.) then -! ! SW all-sky fluxes -! tem0d = fhswr * coszdg(i) / coszen(i) -! Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up -! Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + sfcfsw(i)%upfxc * tem0d -! Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn -! ! SW uv-b fluxes -! Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn -! Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn -! ! SW TOA incoming fluxes -! Diag%fluxr(i,23) = Diag%fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn -! ! SW SFC flux components -! Diag%fluxr(i,24) = Diag%fluxr(i,24) + visbmdi(i) * tem0d ! uv/vis beam sw dn -! Diag%fluxr(i,25) = Diag%fluxr(i,25) + visdfdi(i) * tem0d ! uv/vis diff sw dn -! Diag%fluxr(i,26) = Diag%fluxr(i,26) + nirbmdi(i) * tem0d ! nir beam sw dn -! Diag%fluxr(i,27) = Diag%fluxr(i,27) + nirdfdi(i) * tem0d ! nir diff sw dn -! ! SW clear-sky fluxes -! Diag%fluxr(i,29) = Diag%fluxr(i,29) + topfsw(i)%upfx0 * tem0d -! Diag%fluxr(i,31) = Diag%fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d -! Diag%fluxr(i,32) = Diag%fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d -! endif -! enddo -! -! ! Save total and boundary-layer clouds -! do i=1,nCol -! Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) -! Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) -! enddo -! -! ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud -! ! is reversed for the fluxr output. save interface pressure (pa) of top/bot -! do j = 1, 3 -! do i = 1, nCol -! tem0d = raddt * cldsa(i,j) -! itop = mtopa(i,j) -! ibtc = mbota(i,j) -! Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d -! Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * p_lev(i,itop) -! Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * p_lev(i,ibtc) -! Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * p_lev(i,itop) -! -! ! Add optical depth and emissivity output -! tem1 = 0. -! do k=ibtc,itop -! tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel -! enddo -! Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 -! enddo -! enddo + do i=1,nCol + fluxr(i,34) = fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm + fluxr(i,35) = fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm + fluxr(i,36) = fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm + fluxr(i,37) = fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm + fluxr(i,38) = fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm + fluxr(i,39) = fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm + if (coszen(i) > 0.) then + ! SW all-sky fluxes + tem0d = fhswr * coszdg(i) / coszen(i) + fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up + fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d + fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + ! SW uv-b fluxes + fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn + ! SW TOA incoming fluxes + fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn + ! SW SFC flux components + fluxr(i,24) = fluxr(i,24) + visbmdi(i) * tem0d ! uv/vis beam sw dn + fluxr(i,25) = fluxr(i,25) + visdfdi(i) * tem0d ! uv/vis diff sw dn + fluxr(i,26) = fluxr(i,26) + nirbmdi(i) * tem0d ! nir beam sw dn + fluxr(i,27) = fluxr(i,27) + nirdfdi(i) * tem0d ! nir diff sw dn + ! SW clear-sky fluxes + fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d + fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d + fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d + endif + enddo + + ! Save total and boundary-layer clouds + do i=1,nCol + fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) + fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) + enddo + + ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud + ! is reversed for the fluxr output. save interface pressure (pa) of top/bot + do j = 1, 3 + do i = 1, nCol + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) + ibtc = mbota(i,j) + fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d + fluxr(i,11-j) = fluxr(i,11-j) + tem0d * p_lev(i,itop) + fluxr(i,14-j) = fluxr(i,14-j) + tem0d * p_lev(i,ibtc) + fluxr(i,17-j) = fluxr(i,17-j) + tem0d * p_lev(i,itop) + + ! Add optical depth and emissivity output + tem1 = 0. + do k=ibtc,itop + tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel + enddo + fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 + enddo + enddo endif end subroutine GFS_rrtmgp_sw_post_run diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 94f2cbf5f..cd2512e58 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -138,6 +138,14 @@ kind = kind_phys intent = in optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F [fluxswUP_allsky] standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile @@ -201,17 +209,17 @@ kind = kind_phys intent = in optional = F -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases units = index dimensions = (horizontal_dimension,3) type = integer intent = in optional = F -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops units = index dimensions = (horizontal_dimension,3) type = integer @@ -235,13 +243,14 @@ kind = kind_phys intent = in optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = various + dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + type = real + kind = kind_phys + intent = inout optional = F [nirbmdi] standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step @@ -333,14 +342,6 @@ kind = kind_phys intent = out optional = F -[sfcfsw] - standard_name = sw_fluxes_sfc - long_name = sw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_dimension) - type = sfcfsw_type - intent = out - optional = F [htrsw] standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate @@ -350,6 +351,14 @@ kind = kind_phys intent = out optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcfsw_type + intent = out + optional = F [topfsw] standard_name = sw_fluxes_top_atmosphere long_name = sw radiation fluxes at toa @@ -366,15 +375,7 @@ type = real kind = kind_phys intent = out - optional = T -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_dimension) - type = cmpfsw_type - intent = in - optional = T + optional = T [flxprf_sw] standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels @@ -382,7 +383,15 @@ dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_plus_one) type = profsw_type intent = out - optional = T + optional = T +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = in + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 6e1d8484b79c5e82ac0a5fc1d708c96f0c65075d Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 27 Aug 2020 10:38:35 -0600 Subject: [PATCH 318/404] switch to horizontal_loop_extent in radiation interstitials that were touched --- physics/GFS_rrtmg_post.meta | 2 +- physics/GFS_rrtmg_pre.meta | 134 ++++++++++++++++---------------- physics/GFS_rrtmgp_lw_post.meta | 42 +++++----- physics/GFS_rrtmgp_sw_post.meta | 72 ++++++++--------- physics/rrtmg_lw_post.meta | 20 ++--- physics/rrtmg_lw_pre.meta | 20 ++--- physics/rrtmg_sw_post.meta | 46 +++++------ physics/rrtmg_sw_pre.meta | 52 ++++++------- 8 files changed, 194 insertions(+), 194 deletions(-) diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index a90791796..2ecebfcf0 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -286,7 +286,7 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index dd021df6d..853560df5 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -485,7 +485,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -494,7 +494,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -503,7 +503,7 @@ standard_name = cosine_of_latitude long_name = cosine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -512,7 +512,7 @@ standard_name = sine_of_latitude long_name = sine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -521,7 +521,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -530,7 +530,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -539,7 +539,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -548,7 +548,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -557,7 +557,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -566,7 +566,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -575,7 +575,7 @@ standard_name = weights_for_stochastic_surface_physics_perturbation long_name = weights for stochastic surface physics perturbation units = none - dimensions = (horizontal_dimension,number_of_surface_perturbations) + dimensions = (horizontal_loop_extent,number_of_surface_perturbations) type = real kind = kind_phys intent = in @@ -584,7 +584,7 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -593,7 +593,7 @@ standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -602,7 +602,7 @@ standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -611,7 +611,7 @@ standard_name = convective_cloud_cover_in_phy_f3d long_name = convective cloud cover in the phy_f3d array units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -620,7 +620,7 @@ standard_name = fraction_of_ice_water_cloud long_name = fraction of ice water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -629,7 +629,7 @@ standard_name = fraction_of_rain_water_cloud long_name = fraction of rain water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -638,7 +638,7 @@ standard_name = rime_factor long_name = rime factor units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -647,7 +647,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -656,7 +656,7 @@ standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in @@ -665,7 +665,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -674,7 +674,7 @@ standard_name = daytime_mean_cosz_over_rad_call_period long_name = daytime mean cosz over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -683,7 +683,7 @@ standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -692,7 +692,7 @@ standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -701,7 +701,7 @@ standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -710,7 +710,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -719,7 +719,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -728,7 +728,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -737,7 +737,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -746,7 +746,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -779,7 +779,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = out optional = F @@ -787,7 +787,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = out optional = F @@ -804,7 +804,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -813,7 +813,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -822,7 +822,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -831,7 +831,7 @@ standard_name = surface_albedo_perturbation long_name = surface albedo perturbation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -840,7 +840,7 @@ standard_name = layer_pressure_thickness_for_radiation long_name = layer pressure thickness on radiation levels units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -849,7 +849,7 @@ standard_name = layer_thickness_for_radiation long_name = layer thickness on radiation levels units = km - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -858,7 +858,7 @@ standard_name = air_pressure_at_interface_for_radiation_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -867,7 +867,7 @@ standard_name = air_pressure_at_layer_for_radiation_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -876,7 +876,7 @@ standard_name = air_temperature_at_interface_for_radiation long_name = air temperature at vertical interface for radiation calculation units = K - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -885,7 +885,7 @@ standard_name = air_temperature_at_layer_for_radiation long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -894,7 +894,7 @@ standard_name = water_vapor_specific_humidity_at_layer_for_radiation long_name = water vapor specific humidity at vertical layer for radiation calculation units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -903,7 +903,7 @@ standard_name = ozone_concentration_at_layer_for_radiation long_name = ozone concentration units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -912,7 +912,7 @@ standard_name = volume_mixing_ratio_co2 long_name = CO2 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -921,7 +921,7 @@ standard_name = volume_mixing_ratio_n2o long_name = N2O volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -930,7 +930,7 @@ standard_name = volume_mixing_ratio_ch4 long_name = CH4 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -939,7 +939,7 @@ standard_name = volume_mixing_ratio_o2 long_name = O2 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -948,7 +948,7 @@ standard_name = volume_mixing_ratio_co long_name = CO volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -957,7 +957,7 @@ standard_name = volume_mixing_ratio_cfc11 long_name = CFC11 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -966,7 +966,7 @@ standard_name = volume_mixing_ratio_cfc12 long_name = CFC12 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -975,7 +975,7 @@ standard_name = volume_mixing_ratio_cfc22 long_name = CFC22 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -984,7 +984,7 @@ standard_name = volume_mixing_ratio_ccl4 long_name = CCL4 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -993,7 +993,7 @@ standard_name = volume_mixing_ratio_cfc113 long_name = CFC113 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -1002,7 +1002,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = out @@ -1011,7 +1011,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1020,7 +1020,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1029,7 +1029,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1038,7 +1038,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1047,7 +1047,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle,high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = out @@ -1056,7 +1056,7 @@ standard_name = instantaneous_3d_cloud_fraction long_name = instantaneous 3D cloud fraction for all MPs units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1065,7 +1065,7 @@ standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 long_name = aerosol optical depth for shortwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -1074,7 +1074,7 @@ standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 long_name = aerosol single scattering albedo for shortwave bands 01-16 units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -1083,7 +1083,7 @@ standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 long_name = aerosol asymmetry parameter for shortwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -1092,7 +1092,7 @@ standard_name = aerosol_optical_depth_for_longwave_bands_01_16 long_name = aerosol optical depth for longwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out @@ -1101,7 +1101,7 @@ standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 long_name = aerosol single scattering albedo for longwave bands 01-16 units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out @@ -1110,7 +1110,7 @@ standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 long_name = aerosol asymmetry parameter for longwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index c2fba7cea..8ba985ee2 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -54,7 +54,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -99,7 +99,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -108,7 +108,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -126,7 +126,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -144,7 +144,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -152,7 +152,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -160,7 +160,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -169,7 +169,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -178,7 +178,7 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) type = real kind = kind_phys intent = inout @@ -187,7 +187,7 @@ standard_name = surface_downwelling_longwave_flux_on_radiation_time_step long_name = total sky sfc downward lw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -196,7 +196,7 @@ standard_name = lw_fluxes_sfc long_name = lw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcflw_type intent = out optional = F @@ -204,7 +204,7 @@ standard_name = surface_midlayer_air_temperature_in_longwave_radiation long_name = surface air temp during lw calculation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -213,7 +213,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -222,7 +222,7 @@ standard_name = lw_fluxes_top_atmosphere long_name = lw radiation fluxes at top units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topflw_type intent = out optional = F @@ -230,7 +230,7 @@ standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = proflw_type intent = out optional = T @@ -238,7 +238,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = longwave clear sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index cd2512e58..16c5928e2 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -29,7 +29,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -70,7 +70,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -79,7 +79,7 @@ standard_name = daytime_mean_cosz_over_rad_call_period long_name = daytime mean cosz over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -88,7 +88,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -97,7 +97,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -106,7 +106,7 @@ standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -115,7 +115,7 @@ standard_name = surface_albedo_nearIR_diffuse long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -124,7 +124,7 @@ standard_name = surface_albedo_uvvis_dir long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -133,7 +133,7 @@ standard_name = surface_albedo_uvvis_dif long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -150,7 +150,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -159,7 +159,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -168,7 +168,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -177,7 +177,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -195,7 +195,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -204,7 +204,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -213,7 +213,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -221,7 +221,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -229,7 +229,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -238,7 +238,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -247,7 +247,7 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) type = real kind = kind_phys intent = inout @@ -256,7 +256,7 @@ standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -265,7 +265,7 @@ standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -274,7 +274,7 @@ standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -283,7 +283,7 @@ standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -292,7 +292,7 @@ standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -301,7 +301,7 @@ standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -310,7 +310,7 @@ standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -319,7 +319,7 @@ standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -328,7 +328,7 @@ standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc netsw flx into ground units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -337,7 +337,7 @@ standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -346,7 +346,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -355,7 +355,7 @@ standard_name = sw_fluxes_sfc long_name = sw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcfsw_type intent = out optional = F @@ -363,7 +363,7 @@ standard_name = sw_fluxes_top_atmosphere long_name = sw radiation fluxes at toa units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topfsw_type intent = out optional = F @@ -371,7 +371,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky sw heating rates units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -380,7 +380,7 @@ standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_plus_one) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_plus_one) type = profsw_type intent = out optional = T @@ -388,7 +388,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = in optional = T diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 9fdef489f..417537a9f 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -7,8 +7,8 @@ name = rrtmg_lw_post_run type = scheme [im] - standard_name = horizontal_dimension - long_name = horizontal dimension + standard_name = horizontal_loop_extent + long_name = horizontal loop extent units = count dimensions = () type = integer @@ -66,7 +66,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -75,7 +75,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levels long_name = total sky heating rate due to longwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -84,7 +84,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = clear sky heating rate due to longwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -93,7 +93,7 @@ standard_name = lw_fluxes_sfc long_name = lw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcflw_type intent = in optional = F @@ -101,7 +101,7 @@ standard_name = surface_midlayer_air_temperature_in_longwave_radiation long_name = surface air temp during lw calculation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -110,7 +110,7 @@ standard_name = surface_downwelling_longwave_flux_on_radiation_time_step long_name = total sky sfc downward lw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -119,7 +119,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -128,7 +128,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky lw heating rates units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index d4054cc0b..5f75df65c 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -26,7 +26,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -35,7 +35,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -44,7 +44,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -53,7 +53,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -62,7 +62,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -80,7 +80,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -89,7 +89,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -98,7 +98,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = surface_longwave_emissivity long_name = surface lw emissivity in fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 093a4e290..b7b06b255 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -7,8 +7,8 @@ name = rrtmg_sw_post_run type = scheme [im] - standard_name = horizontal_dimension - long_name = horizontal dimension + standard_name = horizontal_loop_extent + long_name = horizontal loop extents units = count dimensions = () type = integer @@ -82,7 +82,7 @@ standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -91,7 +91,7 @@ standard_name = surface_albedo_due_to_near_IR_diffused long_name = surface albedo due to near IR diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -100,7 +100,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_direct long_name = surface albedo due to UV+VIS direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -109,7 +109,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_diffused long_name = surface albedo due to UV+VIS diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -118,7 +118,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels long_name = total sky heating rate due to shortwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = clear sky heating rates due to shortwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -145,7 +145,7 @@ standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -154,7 +154,7 @@ standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -163,7 +163,7 @@ standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -172,7 +172,7 @@ standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -181,7 +181,7 @@ standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -190,7 +190,7 @@ standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -199,7 +199,7 @@ standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -208,7 +208,7 @@ standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -217,7 +217,7 @@ standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc netsw flx into ground units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -226,7 +226,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -235,7 +235,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky sw heating rates units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -244,7 +244,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = inout optional = F @@ -252,7 +252,7 @@ standard_name = sw_fluxes_sfc long_name = sw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcfsw_type intent = inout optional = F @@ -260,7 +260,7 @@ standard_name = sw_fluxes_top_atmosphere long_name = sw radiation fluxes at toa units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topfsw_type intent = inout optional = F diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index 76c3e6f97..a302c959f 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -7,8 +7,8 @@ name = rrtmg_sw_pre_run type = scheme [im] - standard_name = horizontal_dimension - long_name = horizontal dimension + standard_name = horizontal_loop_extent + long_name = horizontal loop extent units = count dimensions = () type = integer @@ -35,7 +35,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -44,7 +44,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -53,7 +53,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -62,7 +62,7 @@ standard_name = surface_albedo_perturbation long_name = surface albedo perturbation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -80,7 +80,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -89,7 +89,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -98,7 +98,7 @@ standard_name = upper_bound_on_max_albedo_over_deep_snow long_name = maximum snow albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -116,7 +116,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -125,7 +125,7 @@ standard_name = mean_vis_albedo_with_strong_cosz_dependency long_name = mean vis albedo with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -134,7 +134,7 @@ standard_name = mean_nir_albedo_with_strong_cosz_dependency long_name = mean nir albedo with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -143,7 +143,7 @@ standard_name = mean_vis_albedo_with_weak_cosz_dependency long_name = mean vis albedo with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -152,7 +152,7 @@ standard_name = mean_nir_albedo_with_weak_cosz_dependency long_name = mean nir albedo with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -161,7 +161,7 @@ standard_name = fractional_coverage_with_strong_cosz_dependency long_name = fractional coverage with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -170,7 +170,7 @@ standard_name = fractional_coverage_with_weak_cosz_dependency long_name = fractional coverage with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -179,7 +179,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -188,7 +188,7 @@ standard_name = sea_ice_temperature long_name = sea ice surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -197,7 +197,7 @@ standard_name = surface_diffused_shortwave_albedo long_name = mean surface diffused sw albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -214,7 +214,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -222,7 +222,7 @@ standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -231,7 +231,7 @@ standard_name = surface_albedo_due_to_near_IR_diffused long_name = surface albedo due to near IR diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -240,7 +240,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_direct long_name = surface albedo due to UV+VIS direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -249,7 +249,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_diffused long_name = surface albedo due to UV+VIS diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out From b378619c7f60f8488c9d7c43ee63a62646e109c1 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 27 Aug 2020 10:43:00 -0600 Subject: [PATCH 319/404] revert changes to time_vary.scm files --- physics/GFS_phys_time_vary.scm.F90 | 289 ++++----- physics/GFS_phys_time_vary.scm.meta | 890 ++-------------------------- physics/GFS_rad_time_vary.scm.F90 | 69 +-- physics/GFS_rad_time_vary.scm.meta | 234 +------- 4 files changed, 221 insertions(+), 1261 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index 2bb04ebb6..5fcc9ed84 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -33,39 +33,18 @@ module GFS_phys_time_vary !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (im, nx, ny, me, master, nblks, ntoz, iflip, & - iccn, levh2o_int, levozp_int, idate, blksz, h2o_phys, iaerclm, xlat_d, xlon_d,& - ozpl, h2opl, aer_nm, imap, jmap, jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, & - jindx1_aer, jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, & - iindx1_ci, iindx2_ci, ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, ddx_ci, & - oz_pres_int, h2o_pres_int, errmsg, errflg) + subroutine GFS_phys_time_vary_init (Grid, Model, Interstitial, Tbd, errmsg, errflg) - use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & + GFS_Tbd_type, GFS_interstitial_type implicit none ! Interface variables - integer, intent(in) :: im, nx, ny, me, master, & - nblks, ntoz, iflip, iccn,& - levh2o_int, levozp_int - integer, dimension(4), intent(in) :: idate - integer, dimension(nblks), intent(in) :: blksz - logical, intent(in) :: h2o_phys, iaerclm - real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d - real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl, h2opl, aer_nm - - integer, dimension(im), intent(inout) :: imap, jmap - integer, dimension(:), intent(inout) :: jindx1_o3, jindx2_o3, & - jindx1_h, jindx2_h, & - jindx1_aer, jindx2_aer, & - iindx1_aer, iindx2_aer, & - jindx1_ci, jindx2_ci, & - iindx1_ci, iindx2_ci - real(kind=kind_phys), dimension(:), intent(inout) :: ddy_o3, ddy_h, ddy_aer, & - ddx_aer, ddy_ci, ddx_ci - real(kind=kind_phys), dimension(levozp_int), intent(inout) :: oz_pres_int - real(kind=kind_phys), dimension(levh2o_int), intent(inout) :: h2o_pres_int - + type(GFS_grid_type), intent(inout) :: Grid + type(GFS_control_type), intent(in) :: Model + type(GFS_interstitial_type), intent(inout) :: Interstitial + type(GFS_tbd_type), intent(in) :: Tbd character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -81,121 +60,121 @@ subroutine GFS_phys_time_vary_init (im, nx, ny, me, master, nblks, ntoz, iflip, nb = 1 nt = 1 - call read_o3data (ntoz, me, master) + call read_o3data (Model%ntoz, Model%me, Model%master) ! Consistency check that the hardcoded values for levozp and ! oz_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%ozpl (IM,levozp,oz_coeff)) - if (size(ozpl, dim=2).ne.levozp) then + if (size(Tbd%ozpl, dim=2).ne.levozp) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levozp from read_o3data does not match value in GFS_typedefs.F90: ", & - levozp, " /= ", size(ozpl, dim=2) + levozp, " /= ", size(Tbd%ozpl, dim=2) errflg = 1 end if - if (size(ozpl, dim=3).ne.oz_coeff) then + if (size(Tbd%ozpl, dim=3).ne.oz_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "oz_coeff from read_o3data does not match value in GFS_typedefs.F90: ", & - oz_coeff, " /= ", size(ozpl, dim=3) + oz_coeff, " /= ", size(Tbd%ozpl, dim=3) errflg = 1 end if - call read_h2odata (h2o_phys, me, master) + call read_h2odata (Model%h2o_phys, Model%me, Model%master) ! Consistency check that the hardcoded values for levh2o and ! h2o_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%h2opl (IM,levh2o,h2o_coeff)) - if (size(h2opl, dim=2).ne.levh2o) then + if (size(Tbd%h2opl, dim=2).ne.levh2o) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levh2o from read_h2odata does not match value in GFS_typedefs.F90: ", & - levh2o, " /= ", size(h2opl, dim=2) + levh2o, " /= ", size(Tbd%h2opl, dim=2) errflg = 1 end if - if (size(h2opl, dim=3).ne.h2o_coeff) then + if (size(Tbd%h2opl, dim=3).ne.h2o_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "h2o_coeff from read_h2odata does not match value in GFS_typedefs.F90: ", & - h2o_coeff, " /= ", size(h2opl, dim=3) + h2o_coeff, " /= ", size(Tbd%h2opl, dim=3) errflg = 1 end if - if (iaerclm) then + if (Model%iaerclm) then ! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90 ! and used to allocate Tbd%aer_nm matches the value defined in aerclm_def - if (size(aer_nm, dim=3).ne.ntrcaerm) then + if (size(Tbd%aer_nm, dim=3).ne.ntrcaerm) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: ", & - ntrcaerm, " /= ", size(aer_nm, dim=3) + ntrcaerm, " /= ", size(Tbd%aer_nm, dim=3) errflg = 1 else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If iaerclm is .true., then ntrcaer == ntrcaerm - ntrcaer = size(aer_nm, dim=3) + ! If Model%iaerclm is .true., then ntrcaer == ntrcaerm + ntrcaer = size(Tbd%aer_nm, dim=3) ! Read aerosol climatology - call read_aerdata (me, master, iflip, idate, errmsg, errflg) + call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate,errmsg,errflg) if (errflg/=0) return endif else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If iaerclm is .false., then ntrcaer == 1 - ntrcaer = size(aer_nm, dim=3) + ! If Model%iaerclm is .false., then ntrcaer == 1 + ntrcaer = size(Tbd%aer_nm, dim=3) endif - if (iccn == 1) then - call read_cidata (me, master) + if (Model%iccn == 1) then + call read_cidata ( Model%me, Model%master) ! No consistency check needed for in/ccn data, all values are ! hardcoded in module iccn_def.F and GFS_typedefs.F90 endif ! Update values of oz_pres in Interstitial data type for all threads - if (ntoz > 0) then - oz_pres_int = oz_pres + if (Model%ntoz > 0) then + Interstitial%oz_pres = oz_pres end if ! Update values of h2o_pres in Interstitial data type for all threads - if (h2o_phys) then - h2o_pres_int = h2o_pres + if (Model%h2o_phys) then + Interstitial%h2o_pres = h2o_pres end if !--- read in and initialize ozone - if (ntoz > 0) then - call setindxoz (blksz(nb), xlat_d, jindx1_o3, & - jindx2_o3, ddy_o3) + if (Model%ntoz > 0) then + call setindxoz (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_o3, & + Grid%jindx2_o3, Grid%ddy_o3) endif !--- read in and initialize stratospheric water - if (h2o_phys) then - call setindxh2o (blksz(nb), xlat_d, jindx1_h, & - jindx2_h, ddy_h) + if (Model%h2o_phys) then + call setindxh2o (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_h, & + Grid%jindx2_h, Grid%ddy_h) endif !--- read in and initialize aerosols - if (iaerclm) then - call setindxaer (blksz(nb), xlat_d, jindx1_aer, & - jindx2_aer, ddy_aer, xlon_d, & - iindx1_aer, iindx2_aer, ddx_aer, & - me, master) + if (Model%iaerclm) then + call setindxaer (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_aer, & + Grid%jindx2_aer, Grid%ddy_aer, Grid%xlon_d, & + Grid%iindx1_aer, Grid%iindx2_aer, Grid%ddx_aer, & + Model%me, Model%master) endif !--- read in and initialize IN and CCN - if (iccn == 1) then - call setindxci (blksz(nb), xlat_d, jindx1_ci, & - jindx2_ci, ddy_ci, xlon_d, & - iindx1_ci, iindx2_ci, ddx_ci) + if (Model%iccn == 1) then + call setindxci (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_ci, & + Grid%jindx2_ci, Grid%ddy_ci, Grid%xlon_d, & + Grid%iindx1_ci, Grid%iindx2_ci, Grid%ddx_ci) endif !--- initial calculation of maps local ix -> global i and j, store in Tbd ix = 0 nb = 1 - do j = 1, ny - do i = 1, nx + do j = 1,Model%ny + do i = 1,Model%nx ix = ix + 1 - if (ix .gt. blksz(nb)) then + if (ix .gt. Model%blksz(nb)) then ix = 1 nb = nb + 1 endif - jmap(ix) = j - imap(ix) = i + Tbd%jmap(ix) = j + Tbd%imap(ix) = i enddo enddo @@ -247,53 +226,25 @@ end subroutine GFS_phys_time_vary_finalize !> \section arg_table_GFS_phys_time_vary_run Argument Table !! \htmlinclude GFS_phys_time_vary_run.html !! - subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & - ntoz, iccn, nrcm, nsswr, nszero, kdt, imfdeepcnv, seed0, first_time_step,& - lsswr, cal_pre, random_clds, h2o_phys, iaerclm, fhswr, fhlwr, fhour, & - fhzero, dtp, idate, jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, jindx1_aer,& - jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, iindx1_ci, & - iindx2_ci, blksz, imap, jmap, ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, & - ddx_ci, slmsk, vtype, weasd, prsl, Model, clstp, sncovr, rann, in_nm, & - ccn_nm, ozpl, h2opl, aer_nm, Diag, errmsg, errflg) + subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, Diag, first_time_step, errmsg, errflg) use mersenne_twister, only: random_setseed, random_number use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_diag_type - + use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & + GFS_Tbd_type, GFS_sfcprop_type, & + GFS_cldprop_type, GFS_diag_type, & + GFS_statein_type + implicit none - integer, intent(in) :: levs, cnx, cny, isc, jsc, & - me, master, ntoz, iccn, & - nrcm, nsswr, nszero, kdt, & - imfdeepcnv, seed0 - logical, intent(in) :: first_time_step, lsswr, & - cal_pre, random_clds, & - h2o_phys, iaerclm - real(kind=kind_phys), intent(in) :: fhswr, fhlwr, fhour, & - fhzero, dtp - - integer, dimension(4), intent(in) :: idate - integer, dimension(:), intent(in) :: jindx1_o3, jindx2_o3, & - jindx1_h, jindx2_h, & - jindx1_aer, jindx2_aer, & - iindx1_aer, iindx2_aer, & - jindx1_ci, jindx2_ci, & - iindx1_ci, iindx2_ci, & - blksz, imap, jmap - real(kind=kind_phys), dimension(:), intent(in) :: ddy_o3, ddy_h, ddy_aer, & - ddx_aer, ddy_ci, ddx_ci, & - slmsk, vtype, weasd - real(kind=kind_phys), dimension(:,:), intent(in) :: prsl - - type(GFS_control_type), intent(in) :: Model - - real(kind=kind_phys), intent(inout) :: clstp - real(kind=kind_phys), dimension(:), intent(inout) :: sncovr - real(kind=kind_phys), dimension(:,:), intent(inout) :: rann, in_nm, ccn_nm - real(kind=kind_phys), dimension(:,:,:), intent(inout) :: ozpl, h2opl, aer_nm - + type(GFS_grid_type), intent(in) :: Grid + type(GFS_statein_type), intent(in) :: Statein + type(GFS_control_type), intent(inout) :: Model + type(GFS_tbd_type), intent(inout) :: Tbd + type(GFS_sfcprop_type), intent(inout) :: Sfcprop + type(GFS_cldprop_type), intent(inout) :: Cldprop type(GFS_diag_type), intent(inout) :: Diag - + logical, intent(in) :: first_time_step character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -304,8 +255,8 @@ subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & integer :: i, j, k, iseed, iskip, ix, nb, kdt_rad, vegtyp real(kind=kind_phys) :: sec_zero, rsnow real(kind=kind_phys) :: wrk(1) - real(kind=kind_phys) :: rannie(cny) - real(kind=kind_phys) :: rndval(cnx*cny*nrcm) + real(kind=kind_phys) :: rannie(Model%cny) + real(kind=kind_phys) :: rndval(Model%cnx*Model%cny*Model%nrcm) ! Initialize CCPP error handling variables errmsg = '' @@ -322,98 +273,98 @@ subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & !--- switch for saving convective clouds - cnvc90.f !--- aka Ken Campana/Yu-Tai Hou legacy - if ((mod(kdt,nsswr) == 0) .and. (lsswr)) then + if ((mod(Model%kdt,Model%nsswr) == 0) .and. (Model%lsswr)) then !--- initialize,accumulate,convert - clstp = 1100 + min(fhswr/con_hr,fhour,con_99) - elseif (mod(kdt,nsswr) == 0) then + Model%clstp = 1100 + min(Model%fhswr/con_hr,Model%fhour,con_99) + elseif (mod(Model%kdt,Model%nsswr) == 0) then !--- accumulate,convert - clstp = 0100 + min(fhswr/con_hr,fhour,con_99) - elseif (lsswr) then + Model%clstp = 0100 + min(Model%fhswr/con_hr,Model%fhour,con_99) + elseif (Model%lsswr) then !--- initialize,accumulate - clstp = 1100 + Model%clstp = 1100 else !--- accumulate - clstp = 0100 + Model%clstp = 0100 endif !--- random number needed for RAS and old SAS and when cal_pre=.true. - if ( (imfdeepcnv <= 0 .or. cal_pre) .and. random_clds ) then - iseed = mod(con_100*sqrt(fhour*con_hr),1.0d9) + seed0 + if ( (Model%imfdeepcnv <= 0 .or. Model%cal_pre) .and. Model%random_clds ) then + iseed = mod(con_100*sqrt(Model%fhour*con_hr),1.0d9) + Model%seed0 call random_setseed(iseed) call random_number(wrk) - do i = 1,cnx*nrcm + do i = 1,Model%cnx*Model%nrcm iseed = iseed + nint(wrk(1)*1000.0) * i call random_setseed(iseed) call random_number(rannie) - rndval(1+(i-1)*cny:i*cny) = rannie(1:cny) + rndval(1+(i-1)*Model%cny:i*Model%cny) = rannie(1:Model%cny) enddo - do k = 1,nrcm - iskip = (k-1)*cnx*cny - do ix=1,blksz(nb) - j = jmap(ix) - i = imap(ix) - rann(ix,k) = rndval(i+isc-1 + (j+jsc-2)*cnx + iskip) + do k = 1,Model%nrcm + iskip = (k-1)*Model%cnx*Model%cny + do ix=1,Model%blksz(nb) + j = Tbd%jmap(ix) + i = Tbd%imap(ix) + Tbd%rann(ix,k) = rndval(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + iskip) enddo enddo endif ! imfdeepcnv, cal_re, random_clds !--- o3 interpolation - if (ntoz > 0) then - call ozinterpol (me, blksz(nb), idate, fhour, & - jindx1_o3, jindx2_o3, ozpl, ddy_o3) + if (Model%ntoz > 0) then + call ozinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & + Grid%jindx1_o3, Grid%jindx2_o3, Tbd%ozpl, Grid%ddy_o3) endif !--- h2o interpolation - if (h2o_phys) then - call h2ointerpol (me, blksz(nb), idate, fhour, & - jindx1_h, jindx2_h, h2opl, ddy_h) + if (Model%h2o_phys) then + call h2ointerpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & + Grid%jindx1_h, Grid%jindx2_h, Tbd%h2opl, Grid%ddy_h) endif !--- aerosol interpolation - if (iaerclm) then - call aerinterpol (me, master, blksz(nb), & - idate, fhour, & - jindx1_aer, jindx2_aer, & - ddy_aer,iindx1_aer, & - iindx2_aer,ddx_aer, & - levs,prsl, & - aer_nm) + if (Model%iaerclm) then + call aerinterpol (Model%me, Model%master, Model%blksz(nb), & + Model%idate, Model%fhour, & + Grid%jindx1_aer, Grid%jindx2_aer, & + Grid%ddy_aer,Grid%iindx1_aer, & + Grid%iindx2_aer,Grid%ddx_aer, & + Model%levs,Statein%prsl, & + Tbd%aer_nm) endif !--- ICCN interpolation - if (iccn == 1) then - call ciinterpol (me, blksz(nb), idate, fhour, & - jindx1_ci, jindx2_ci, & - ddy_ci,iindx1_ci, & - iindx2_ci,ddx_ci, & - levs,prsl, & - in_nm, ccn_nm) + if (Model%iccn == 1) then + call ciinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & + Grid%jindx1_ci, Grid%jindx2_ci, & + Grid%ddy_ci,Grid%iindx1_ci, & + Grid%iindx2_ci,Grid%ddx_ci, & + Model%levs,Statein%prsl, & + Tbd%in_nm, Tbd%ccn_nm) endif !--- original FV3 code, not needed for SCM; also not compatible with the way ! the time vary steps are run (over each block) --> cannot use !--- repopulate specific time-varying sfc properties for AMIP/forecast runs !if (Model%nscyc > 0) then - ! if (mod(kdt,Model%nscyc) == 1) THEN + ! if (mod(Model%kdt,Model%nscyc) == 1) THEN ! call gcycle (nblks, Model, Grid(:), Sfcprop(:), Cldprop(:)) ! endif !endif !--- determine if diagnostics buckets need to be cleared - sec_zero = nint(fhzero*con_hr) - if (sec_zero >= nint(max(fhswr,fhlwr))) then - if (mod(kdt,nszero) == 1) then + sec_zero = nint(Model%fhzero*con_hr) + if (sec_zero >= nint(max(Model%fhswr,Model%fhlwr))) then + if (mod(Model%kdt,Model%nszero) == 1) then call Diag%rad_zero (Model) call Diag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif else - if (mod(kdt,nszero) == 1) then + if (mod(Model%kdt,Model%nszero) == 1) then call Diag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif - kdt_rad = nint(min(fhswr,fhlwr)/dtp) - if (mod(kdt, kdt_rad) == 1) then + kdt_rad = nint(min(Model%fhswr,Model%fhlwr)/Model%dtp) + if (mod(Model%kdt, kdt_rad) == 1) then call Diag%rad_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif @@ -422,19 +373,19 @@ subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & #if 0 !Calculate sncovr if it was read in but empty (from FV3/io/FV3GFS_io.F90/sfc_prop_restart_read) if (first_time_step) then - if (nint(sncovr(1)) == -9999) then + if (nint(Sfcprop%sncovr(1)) == -9999) then !--- compute sncovr from existing variables !--- code taken directly from read_fix.f - do ix = 1, blksz(nb) - sncovr(ix) = 0.0 - if (slmsk(ix) > 0.001) then - vegtyp = vtype(ix) + do ix = 1, Model%blksz(nb) + Sfcprop%sncovr(ix) = 0.0 + if (Sfcprop%slmsk(ix) > 0.001) then + vegtyp = Sfcprop%vtype(ix) if (vegtyp == 0) vegtyp = 7 - rsnow = 0.001*weasd(ix)/snupx(vegtyp) - if (0.001*weasd(ix) < snupx(vegtyp)) then - sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) + rsnow = 0.001*Sfcprop%weasd(ix)/snupx(vegtyp) + if (0.001*Sfcprop%weasd(ix) < snupx(vegtyp)) then + Sfcprop%sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) else - sncovr(ix) = 1.0 + Sfcprop%sncovr(ix) = 1.0 endif endif enddo diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index fd450c336..57a82ecb0 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,355 +1,38 @@ [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme -[im] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[nx] - standard_name = number_of_points_in_x_direction_for_this_MPI_rank - long_name = number of points in x direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[ny] - standard_name = number_of_points_in_y_direction_for_this_MPI_rank - long_name = number of points in y direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[me] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[master] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[nblks] - standard_name = ccpp_block_count - long_name = for explicit data blocking: number of blocks - units = count - dimensions = () - type = integer - intent = in - optional = F -[ntoz] - standard_name = index_for_ozone - long_name = tracer index for ozone mixing ratio - units = index - dimensions = () - type = integer - intent = in - optional = F -[iflip] - standard_name = flag_for_vertical_index_direction_control - long_name = iflip - is not the same as flipv - units = flag - dimensions = () - type = integer - intent = in - optional = F -[iccn] - standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics - long_name = flag for IN and CCN forcing for morrison gettelman microphysics - units = none - dimensions = () - type = integer - intent = in - optional = F -[levh2o_int] - standard_name = vertical_dimension_of_h2o_forcing_data - long_name = number of vertical layers in h2o forcing data - units = count +[Grid] + standard_name = GFS_grid_type_instance + long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + units = DDT dimensions = () - type = integer - intent = in + type = GFS_grid_type + intent = inout optional = F -[levozp_int] - standard_name = vertical_dimension_of_ozone_forcing_data - long_name = number of vertical layers in ozone forcing data - units = count +[Model] + standard_name = GFS_control_type_instance + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT dimensions = () - type = integer - intent = in - optional = F -[idate] - standard_name = date_and_time_at_model_initialization_reordered - long_name = initial date with different size and ordering - units = none - dimensions = (4) - type = integer - intent = in - optional = F -[blksz] - standard_name = ccpp_block_sizes - long_name = for explicit data blocking: block sizes of all blocks - units = count - dimensions = (ccpp_block_count) - type = integer + type = GFS_control_type intent = in optional = F -[h2o_phys] - standard_name = flag_for_stratospheric_water_vapor_physics - long_name = flag for stratospheric water vapor physics - units = flag +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = Fortran DDT containing FV3-GFS interstitial data + units = DDT dimensions = () - type = logical - intent = in + type = GFS_interstitial_type + intent = inout optional = F -[iaerclm] - standard_name = flag_for_aerosol_input_MG_radiation - long_name = flag for using aerosols in Morrison-Gettelman MP_radiation - units = flag +[Tbd] + standard_name = GFS_tbd_type_instance + long_name = Fortran DDT containing FV3-GFS miscellaneous data + units = DDT dimensions = () - type = logical - intent = in - optional = F -[xlat_d] - standard_name = latitude_in_degree - long_name = latitude in degrees - units = degree_north - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[xlon_d] - standard_name = longitude_in_degree - long_name = longitude in degrees - units = degree_east - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ozpl] - standard_name = ozone_forcing - long_name = ozone forcing data - units = various - dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) - type = real - kind = kind_phys + type = GFS_tbd_type intent = in optional = F -[h2opl] - standard_name = h2o_forcing - long_name = water forcing data - units = various - dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) - type = real - kind = kind_phys - intent = in - optional = F -[aer_nm] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology - long_name = GOCART aerosol climatology number concentration - units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) - type = real - kind = kind_phys - intent = in - optional = F -[imap] - standard_name = map_of_block_column_number_to_global_i_index - long_name = map of local index ix to global index i for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jmap] - standard_name = map_of_block_column_number_to_global_j_index - long_name = map of local index ix to global index j for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx1_o3] - standard_name = lower_ozone_interpolation_index - long_name = interpolation low index for ozone - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx2_o3] - standard_name = upper_ozone_interpolation_index - long_name = interpolation high index for ozone - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx1_h] - standard_name = lower_water_vapor_interpolation_index - long_name = interpolation low index for stratospheric water vapor - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx2_h] - standard_name = upper_water_vapor_interpolation_index - long_name = interpolation high index for stratospheric water vapor - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx1_aer] - standard_name = lower_aerosol_y_interpolation_index - long_name = interpolation low index for prescribed aerosols in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx2_aer] - standard_name = upper_aerosol_y_interpolation_index - long_name = interpolation high index for prescribed aerosols in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[iindx1_aer] - standard_name = lower_aerosol_x_interpolation_index - long_name = interpolation low index for prescribed aerosols in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[iindx2_aer] - standard_name = upper_aerosol_x_interpolation_index - long_name = interpolation high index for prescribed aerosols in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx1_ci] - standard_name = lower_cloud_nuclei_y_interpolation_index - long_name = interpolation low index for ice and cloud condensation nuclei in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx2_ci] - standard_name = upper_cloud_nuclei_y_interpolation_index - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[iindx1_ci] - standard_name = lower_cloud_nuclei_x_interpolation_index - long_name = interpolation low index for ice and cloud condensation nuclei in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[iindx2_ci] - standard_name = upper_cloud_nuclei_x_interpolation_index - long_name = interpolation high index for ice and cloud condensation nuclei in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[ddy_o3] - standard_name = ozone_interpolation_weight - long_name = interpolation high index for ozone - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddy_h] - standard_name = water_vapor_interpolation_weight - long_name = interpolation high index for stratospheric water vapor - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddy_aer] - standard_name = aerosol_y_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddx_aer] - standard_name = aerosol_x_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddy_ci] - standard_name = cloud_nuclei_y_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddx_ci] - standard_name = cloud_nuclei_x_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[oz_pres_int] - standard_name = natural_log_of_ozone_forcing_data_pressure_levels - long_name = natural log of ozone forcing data pressure levels - units = log(Pa) - dimensions = (vertical_dimension_of_ozone_forcing_data) - type = real - kind = kind_phys - intent = inout - optional = F -[h2o_pres_int] - standard_name = natural_log_of_h2o_forcing_data_pressure_levels - long_name = natural log of h2o forcing data pressure levels - units = log(Pa) - dimensions = (vertical_dimension_of_h2o_forcing_data) - type = real - kind = kind_phys - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -394,435 +77,20 @@ [ccpp-arg-table] name = GFS_phys_time_vary_run type = scheme -[levs] - standard_name = vertical_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in - optional = F -[cnx] - standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face - long_name = number of points in x direction for this cubed sphere face - units = count - dimensions = () - type = integer - intent = in - optional = F -[cny] - standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face - long_name = number of points in y direction for this cubed sphere face - units = count - dimensions = () - type = integer - intent = in - optional = F -[isc] - standard_name = starting_x_index_for_this_MPI_rank - long_name = starting index in the x direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[jsc] - standard_name = starting_y_index_for_this_MPI_rank - long_name = starting index in the y direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[me] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[master] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntoz] - standard_name = index_for_ozone - long_name = tracer index for ozone mixing ratio - units = index - dimensions = () - type = integer - intent = in - optional = F -[iccn] - standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics - long_name = flag for IN and CCN forcing for morrison gettelman microphysics - units = none - dimensions = () - type = integer - intent = in - optional = F -[nrcm] - standard_name = array_dimension_of_random_number - long_name = second dimension of random number stream for RAS - units = count - dimensions = () - type = integer - intent = in - optional = F -[nsswr] - standard_name = number_of_timesteps_between_shortwave_radiation_calls - long_name = number of timesteps between shortwave radiation calls - units = - dimensions = () - type = integer - intent = in - optional = F -[nszero] - standard_name = number_of_timesteps_between_diagnostic_clearing - long_name = number of timesteps between calls to clear diagnostic variables - units = count - dimensions = () - type = integer - intent = in - optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in - optional = F -[imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme - long_name = flag for mass-flux deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[seed0] - standard_name = seed_random_numbers_RAS - long_name = random number seed for the RAS scheme - units = none - dimensions = () - type = integer - intent = in - optional = F -[first_time_step] - standard_name = flag_for_first_time_step - long_name = flag for first time step for time integration loop (cold/warmstart) - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[cal_pre] - standard_name = flag_for_precipitation_type_algorithm - long_name = flag controls precip type algorithm - units = flag - dimensions = () - type = logical - intent = in - optional = F -[random_clds] - standard_name = flag_for_random_clouds_for_RAS - long_name = flag for using random clouds with the RAS scheme - units = flag - dimensions = () - type = logical - intent = in - optional = F -[h2o_phys] - standard_name = flag_for_stratospheric_water_vapor_physics - long_name = flag for stratospheric water vapor physics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[iaerclm] - standard_name = flag_for_aerosol_input_MG_radiation - long_name = flag for using aerosols in Morrison-Gettelman MP_radiation - units = flag - dimensions = () - type = logical - intent = in - optional = F -[fhswr] - standard_name = frequency_for_shortwave_radiation - long_name = frequency for shortwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fhlwr] - standard_name = frequency_for_longwave_radiation - long_name = frequency for longwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fhour] - standard_name = forecast_time - long_name = current forecast time - units = h - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fhzero] - standard_name = frequency_for_diagnostic_clearing - long_name = frequency for clearing diagnostic fields - units = h +[Grid] + standard_name = GFS_grid_type_instance + long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + units = DDT dimensions = () - type = real - kind = kind_phys + type = GFS_grid_type intent = in optional = F -[dtp] - standard_name = time_step_for_physics - long_name = physics timestep - units = s +[Statein] + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type + units = DDT dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[idate] - standard_name = date_and_time_at_model_initialization_reordered - long_name = initial date with different size and ordering - units = none - dimensions = (4) - type = integer - intent = in - optional = F -[jindx1_o3] - standard_name = lower_ozone_interpolation_index - long_name = interpolation low index for ozone - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx2_o3] - standard_name = upper_ozone_interpolation_index - long_name = interpolation high index for ozone - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx1_h] - standard_name = lower_water_vapor_interpolation_index - long_name = interpolation low index for stratospheric water vapor - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx2_h] - standard_name = upper_water_vapor_interpolation_index - long_name = interpolation high index for stratospheric water vapor - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx1_aer] - standard_name = lower_aerosol_y_interpolation_index - long_name = interpolation low index for prescribed aerosols in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx2_aer] - standard_name = upper_aerosol_y_interpolation_index - long_name = interpolation high index for prescribed aerosols in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[iindx1_aer] - standard_name = lower_aerosol_x_interpolation_index - long_name = interpolation low index for prescribed aerosols in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[iindx2_aer] - standard_name = upper_aerosol_x_interpolation_index - long_name = interpolation high index for prescribed aerosols in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx1_ci] - standard_name = lower_cloud_nuclei_y_interpolation_index - long_name = interpolation low index for ice and cloud condensation nuclei in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx2_ci] - standard_name = upper_cloud_nuclei_y_interpolation_index - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[iindx1_ci] - standard_name = lower_cloud_nuclei_x_interpolation_index - long_name = interpolation low index for ice and cloud condensation nuclei in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[iindx2_ci] - standard_name = upper_cloud_nuclei_x_interpolation_index - long_name = interpolation high index for ice and cloud condensation nuclei in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[blksz] - standard_name = ccpp_block_sizes - long_name = for explicit data blocking: block sizes of all blocks - units = count - dimensions = (ccpp_block_count) - type = integer - intent = in - optional = F -[imap] - standard_name = map_of_block_column_number_to_global_i_index - long_name = map of local index ix to global index i for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jmap] - standard_name = map_of_block_column_number_to_global_j_index - long_name = map of local index ix to global index j for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[ddy_o3] - standard_name = ozone_interpolation_weight - long_name = interpolation high index for ozone - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddy_h] - standard_name = water_vapor_interpolation_weight - long_name = interpolation high index for stratospheric water vapor - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddy_aer] - standard_name = aerosol_y_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddx_aer] - standard_name = aerosol_x_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddy_ci] - standard_name = cloud_nuclei_y_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddx_ci] - standard_name = cloud_nuclei_x_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[vtype] - standard_name = vegetation_type_classification_real - long_name = vegetation type for lsm - units = index - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[weasd] - standard_name = water_equivalent_accumulated_snow_depth - long_name = water equiv of acc snow depth over land and sea ice - units = mm - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[prsl] - standard_name = air_pressure - long_name = mean layer pressure - units = Pa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys + type = GFS_statein_type intent = in optional = F [Model] @@ -831,78 +99,30 @@ units = DDT dimensions = () type = GFS_control_type - intent = in - optional = F -[clstp] - standard_name = convective_cloud_switch - long_name = index used by cnvc90 (for convective clouds) - units = none - dimensions = () - type = real - kind = kind_phys - intent = inout - optional = F -[sncovr] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys intent = inout optional = F -[rann] - standard_name = random_number_array - long_name = random number array (0-1) - units = none - dimensions = (horizontal_dimension,array_dimension_of_random_number) - type = real - kind = kind_phys - intent = inout - optional = F -[in_nm] - standard_name = in_number_concentration - long_name = IN number concentration - units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ccn_nm] - standard_name = ccn_number_concentration - long_name = CCN number concentration - units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ozpl] - standard_name = ozone_forcing - long_name = ozone forcing data - units = various - dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) - type = real - kind = kind_phys +[Tbd] + standard_name = GFS_tbd_type_instance + long_name = Fortran DDT containing FV3-GFS miscellaneous data + units = DDT + dimensions = () + type = GFS_tbd_type intent = inout optional = F -[h2opl] - standard_name = h2o_forcing - long_name = water forcing data - units = various - dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) - type = real - kind = kind_phys +[Sfcprop] + standard_name = GFS_sfcprop_type_instance + long_name = Fortran DDT containing FV3-GFS surface fields + units = DDT + dimensions = () + type = GFS_sfcprop_type intent = inout optional = F -[aer_nm] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology - long_name = GOCART aerosol climatology number concentration - units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) - type = real - kind = kind_phys +[Cldprop] + standard_name = GFS_cldprop_type_instance + long_name = Fortran DDT containing FV3-GFS cloud fields + units = DDT + dimensions = () + type = GFS_cldprop_type intent = inout optional = F [Diag] @@ -913,6 +133,14 @@ type = GFS_diag_type intent = inout optional = F +[first_time_step] + standard_name = flag_for_first_time_step + long_name = flag for first time step for time integration loop (cold/warmstart) + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -929,4 +157,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/GFS_rad_time_vary.scm.F90 b/physics/GFS_rad_time_vary.scm.F90 index 738065cfc..13ae5e14b 100644 --- a/physics/GFS_rad_time_vary.scm.F90 +++ b/physics/GFS_rad_time_vary.scm.F90 @@ -21,46 +21,29 @@ end subroutine GFS_rad_time_vary_init !> \section arg_table_GFS_rad_time_vary_run Argument Table !! \htmlinclude GFS_rad_time_vary_run.html !! - subroutine GFS_rad_time_vary_run (cnx, cny, lsswr, lslwr, isubc_sw, & - isubc_lw, sec, nblks, blksz, isc, jsc, imp_physics, & - imp_physics_zhao_carr, kdt, tgrs, qgrs_wv, prsi, imap, jmap, & - icsdsw, icsdlw, t_minus_two_delt, qv_minus_two_delt, & - t_minus_delt, qv_minus_delt, ps_minus_two_delt, ps_minus_delt, & - errmsg, errflg) + subroutine GFS_rad_time_vary_run (Model, Statein, Tbd, errmsg, errflg) use physparam, only: ipsd0, ipsdlim, iaerflg use mersenne_twister, only: random_setseed, random_index, random_stat use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_tbd_type use radcons, only: qmin, con_100 implicit none - integer, intent(in) :: cnx, cny, isubc_sw, isubc_lw, & - nblks, isc, jsc, imp_physics,& - imp_physics_zhao_carr, kdt - logical, intent(in) :: lsswr, lslwr - real(kind=kind_phys), intent(in) :: sec - - integer, dimension(nblks), intent(in) :: blksz - integer, dimension(:), intent(in) :: imap, jmap - - integer, dimension(:), intent(inout) :: icsdsw, icsdlw - - real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, qgrs_wv - real(kind=kind_phys), dimension(:,:), intent(in) :: prsi - - real(kind=kind_phys), dimension(:,:), intent(inout) :: t_minus_two_delt, & - qv_minus_two_delt, t_minus_delt, qv_minus_delt - real(kind=kind_phys), dimension(:), intent(inout) :: ps_minus_two_delt,& - ps_minus_delt - + type(GFS_control_type), intent(inout) :: Model + type(GFS_statein_type), intent(in) :: Statein + type(GFS_tbd_type), intent(inout) :: Tbd character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !--- local variables type (random_stat) :: stat - integer :: ix, nb, j, i, ipseed - integer :: numrdm(cnx*cny*2) + integer :: ix, nb, j, i, nblks, ipseed + integer :: numrdm(Model%cnx*Model%cny*2) ! Initialize CCPP error handling variables errmsg = '' @@ -68,34 +51,34 @@ subroutine GFS_rad_time_vary_run (cnx, cny, lsswr, lslwr, isubc_sw, & nb = 1 - if (lsswr .or. lslwr) then + if (Model%lsswr .or. Model%lslwr) then !--- call to GFS_radupdate_run is now in GFS_rrtmg_setup_run !--- set up random seed index in a reproducible way for entire cubed-sphere face (lat-lon grid) - if ((isubc_lw==2) .or. (isubc_sw==2)) then - ipseed = mod(nint(con_100*sqrt(sec)), ipsdlim) + 1 + ipsd0 + if ((Model%isubc_lw==2) .or. (Model%isubc_sw==2)) then + ipseed = mod(nint(con_100*sqrt(Model%sec)), ipsdlim) + 1 + ipsd0 call random_setseed (ipseed, stat) call random_index (ipsdlim, numrdm, stat) !--- set the random seeds for each column in a reproducible way - do ix=1,blksz(nb) - j = jmap(ix) - i = imap(ix) + do ix=1,Model%blksz(nb) + j = Tbd%jmap(ix) + i = Tbd%imap(ix) !--- for testing purposes, replace numrdm with '100' - icsdsw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx) - icsdlw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx + cnx*cny) + Tbd%icsdsw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx) + Tbd%icsdlw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + Model%cnx*Model%cny) enddo endif ! isubc_lw and isubc_sw - if (imp_physics == imp_physics_zhao_carr) then - if (kdt == 1) then - t_minus_two_delt(:,:) = tgrs - qv_minus_two_delt(:,:) = max(qmin,qgrs_wv(:,:)) - t_minus_delt(:,:) = tgrs - qv_minus_delt(:,:) = max(qmin,qgrs_wv(:,:)) - ps_minus_two_delt(:) = prsi(:,1) - ps_minus_delt(:) = prsi(:,1) + if (Model%imp_physics == 99) then + if (Model%kdt == 1) then + Tbd%phy_f3d(:,:,1) = Statein%tgrs + Tbd%phy_f3d(:,:,2) = max(qmin,Statein%qgrs(:,:,1)) + Tbd%phy_f3d(:,:,3) = Statein%tgrs + Tbd%phy_f3d(:,:,4) = max(qmin,Statein%qgrs(:,:,1)) + Tbd%phy_f2d(:,1) = Statein%prsi(:,1) + Tbd%phy_f2d(:,2) = Statein%prsi(:,1) endif endif diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index b5de5ed12..7e87f1f8a 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -6,230 +6,28 @@ [ccpp-arg-table] name = GFS_rad_time_vary_run type = scheme -[cnx] - standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face - long_name = number of points in x direction for this cubed sphere face - units = count +[Model] + standard_name = GFS_control_type_instance + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT dimensions = () - type = integer - intent = in - optional = F -[cny] - standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face - long_name = number of points in y direction for this cubed sphere face - units = count - dimensions = () - type = integer - intent = in - optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[isubc_sw] - standard_name = flag_for_sw_clouds_without_sub_grid_approximation - long_name = flag for sw clouds without sub-grid approximation - units = flag - dimensions = () - type = integer - intent = in - optional = F -[isubc_lw] - standard_name = flag_for_lw_clouds_without_sub_grid_approximation - long_name = flag for lw clouds without sub-grid approximation - units = flag - dimensions = () - type = integer - intent = in - optional = F -[sec] - standard_name = seconds_elapsed_since_model_initialization - long_name = seconds elapsed since model initialization - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[nblks] - standard_name = ccpp_block_count - long_name = for explicit data blocking: number of blocks - units = count - dimensions = () - type = integer - intent = in - optional = F -[blksz] - standard_name = ccpp_block_sizes - long_name = for explicit data blocking: block sizes of all blocks - units = count - dimensions = (ccpp_block_count) - type = integer - intent = in - optional = F -[isc] - standard_name = starting_x_index_for_this_MPI_rank - long_name = starting index in the x direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[jsc] - standard_name = starting_y_index_for_this_MPI_rank - long_name = starting index in the y direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in + type = GFS_control_type + intent = inout optional = F -[imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme - long_name = choice of Zhao-Carr microphysics scheme - units = flag +[Statein] + standard_name = GFS_statein_type_instance + long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + units = DDT dimensions = () - type = integer + type = GFS_statein_type intent = in optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index +[Tbd] + standard_name = GFS_tbd_type_instance + long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container + units = DDT dimensions = () - type = integer - intent = in - optional = F -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[qgrs_wv] - standard_name = water_vapor_specific_humidity - long_name = water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[prsi] - standard_name = air_pressure_at_interface - long_name = air pressure at model layer interfaces - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[imap] - standard_name = map_of_block_column_number_to_global_i_index - long_name = map of local index ix to global index i for this block - units = none - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[jmap] - standard_name = map_of_block_column_number_to_global_j_index - long_name = map of local index ix to global index j for this block - units = none - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[icsdsw] - standard_name = seed_random_numbers_sw - long_name = random seeds for sub-column cloud generators sw - units = none - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[icsdlw] - standard_name = seed_random_numbers_lw - long_name = random seeds for sub-column cloud generators lw - units = none - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[t_minus_two_delt] - standard_name = air_temperature_two_timesteps_back - long_name = air temperature two timesteps back - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qv_minus_two_delt] - standard_name = water_vapor_specific_humidity_two_timesteps_back - long_name = water vapor specific humidity two timesteps back - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[t_minus_delt] - standard_name = air_temperature_at_previous_timestep - long_name = air temperature at previous timestep - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qv_minus_delt] - standard_name = water_vapor_specific_humidity_at_previous_timestep - long_name = water vapor specific humidity at previous timestep - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ps_minus_two_delt] - standard_name = surface_air_pressure_two_timesteps_back - long_name = surface air pressure two timesteps back - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[ps_minus_delt] - standard_name = surface_air_pressure_at_previous_timestep - long_name = surface air pressure at previous timestep - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys + type = GFS_tbd_type intent = inout optional = F [errmsg] From 427ce1edf760d80d24b8e11a154da76db16f70a9 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Thu, 27 Aug 2020 19:43:25 +0000 Subject: [PATCH 320/404] The first draft of change to mode RUC LSM soil variables initialization to the ;sm_ruc_init. Several issues: 1. soil and vegetation types needed for initialization are not assigned yet. Therefore, some parts of the code that use soil types is turned off. 2. There seems to ne inconsistency of land=true/false with the Noah smc, stc, slc variables. At this stage the limited verison of initialization code causes a crash in Thompson MP. --- physics/module_sf_ruclsm.F90 | 135 +++++++++--------- physics/sfc_drv_ruc.F90 | 242 ++++++++++++++++++++++---------- physics/sfc_drv_ruc.meta | 264 +++++++++++++++++++++++++++++++++++ 3 files changed, 492 insertions(+), 149 deletions(-) diff --git a/physics/module_sf_ruclsm.F90 b/physics/module_sf_ruclsm.F90 index 7345f2667..e02e1edb0 100644 --- a/physics/module_sf_ruclsm.F90 +++ b/physics/module_sf_ruclsm.F90 @@ -7022,8 +7022,8 @@ END SUBROUTINE SOILVEGIN !> This subroutine computes liquid and forezen soil moisture from the !! total soil moisture, and also computes soil moisture availability in !! the top soil layer. - SUBROUTINE RUCLSMINIT( debug_print, landmask, & - nzs, isltyp, ivgtyp, xice, mavail, & + SUBROUTINE RUCLSMINIT( debug_print, frac_grid, land, icy, & + nzs, isltyp, ivgtyp, mavail, & sh2o, smfr3d, tslb, smois, & ims,ime, jms,jme, kms,kme, & its,ite, jts,jte, kts,kte ) @@ -7035,35 +7035,33 @@ SUBROUTINE RUCLSMINIT( debug_print, landmask, & #endif IMPLICIT NONE LOGICAL, INTENT(IN ) :: debug_print - + LOGICAL, INTENT(IN ) :: frac_grid + LOGICAL, DIMENSION( ims:ime), INTENT(IN ) :: land, icy INTEGER, INTENT(IN ) :: & ims,ime, jms,jme, kms,kme, & its,ite, jts,jte, kts,kte, & nzs - REAL, DIMENSION( ims:ime, 1:nzs, jms:jme ) , & - INTENT(IN) :: TSLB, & - SMOIS - - REAL, DIMENSION( ims:ime, jms:jme ) , & - INTENT(IN) :: LANDMASK + REAL, DIMENSION( ims:ime, 1:nzs, jms:jme ) , & + INTENT(IN) :: TSLB, & + SMOIS - INTEGER, DIMENSION( ims:ime, jms:jme ) , & - INTENT(INOUT) :: ISLTYP,IVGTYP + INTEGER, DIMENSION( ims:ime, jms:jme ) , & + INTENT(INOUT) :: ISLTYP,IVGTYP - REAL, DIMENSION( ims:ime, 1:nzs, jms:jme ) , & - INTENT(INOUT) :: SMFR3D, & - SH2O + REAL, DIMENSION( ims:ime, 1:nzs, jms:jme ) , & + INTENT(OUT) :: SMFR3D, & + SH2O - REAL, DIMENSION( ims:ime, jms:jme ) , & - INTENT(INOUT) :: XICE,MAVAIL + REAL, DIMENSION( ims:ime, jms:jme ) , & + INTENT(OUT) :: MAVAIL - REAL, DIMENSION ( 1:nzs ) :: SOILIQW + !-- local + REAL, DIMENSION ( 1:nzs ) :: SOILIQW -! - INTEGER :: I,J,L,itf,jtf - REAL :: RIW,XLMELT,TLN,DQM,REF,PSIS,QMIN,BCLH + INTEGER :: I,J,L,itf,jtf + REAL :: RIW,XLMELT,TLN,DQM,REF,PSIS,QMIN,BCLH INTEGER :: errflag @@ -7077,9 +7075,6 @@ SUBROUTINE RUCLSMINIT( debug_print, landmask, & errflag = 0 DO j = jts,jtf DO i = its,itf - ! land-only version - IF ( LANDMASK( i,j ) .NE. 1 ) CYCLE - ! IF ( ISLTYP( i,j ) .LT. 0 ) THEN errflag = 1 print *, & @@ -7096,65 +7091,61 @@ SUBROUTINE RUCLSMINIT( debug_print, landmask, & DO J=jts,jtf DO I=its,itf - ! land-only version - IF ( LANDMASK( i,j ) .NE. 1 ) CYCLE - -!--- Computation of volumetric content of ice in soil -!--- and initialize MAVAIL - if(ISLTYP(I,J) > 0) then - DQM = MAXSMC (ISLTYP(I,J)) - & - DRYSMC (ISLTYP(I,J)) - REF = REFSMC (ISLTYP(I,J)) - PSIS = - SATPSI (ISLTYP(I,J)) - QMIN = DRYSMC (ISLTYP(I,J)) - BCLH = BB (ISLTYP(I,J)) - endif + ! in Zobler classification isltyp=0 for water. Statsgo classification + ! has isltyp=14 for water + if (isltyp(i,j) == 0) isltyp(i,j)=14 + + if(land(i) ) then + !--- Computation of volumetric content of ice in soil + !--- and initialize MAVAIL + DQM = MAXSMC (ISLTYP(I,J)) - & + DRYSMC (ISLTYP(I,J)) + REF = REFSMC (ISLTYP(I,J)) + PSIS = - SATPSI (ISLTYP(I,J)) + QMIN = DRYSMC (ISLTYP(I,J)) + BCLH = BB (ISLTYP(I,J)) + + mavail(i,j) = max(0.00001,min(1.,(smois(i,1,j)-qmin)/(ref-qmin))) -! in Zobler classification isltyp=0 for water. Statsgo classification -! has isltyp=14 for water - if (isltyp(i,j) == 0) isltyp(i,j)=14 + DO L=1,NZS + !-- for land points initialize soil ice + tln=log(TSLB(i,l,j)/273.15) + + if(tln.lt.0.) then + soiliqw(l)=(dqm+qmin)*(XLMELT* & + (tslb(i,l,j)-273.15)/tslb(i,l,j)/9.81/psis) & + **(-1./bclh) + !**(-1./bclh)-qmin + soiliqw(l)=max(0.,soiliqw(l)) + soiliqw(l)=min(soiliqw(l),smois(i,l,j)) + sh2o(i,l,j)=soiliqw(l) + smfr3d(i,l,j)=(smois(i,l,j)-soiliqw(l))/RIW + + else + smfr3d(i,l,j)=0. + sh2o(i,l,j)=smois(i,l,j) + endif + ENDDO - IF(xice(i,j).gt.0.) THEN -!-- for ice + elseif(icy(i) .and. .not. frac_grid ) then + !-- ice DO L=1,NZS smfr3d(i,l,j)=1. sh2o(i,l,j)=0. mavail(i,j) = 1. ENDDO - ELSE - if(isltyp(i,j).ne.14 ) then -!-- land - mavail(i,j) = max(0.00001,min(1.,(smois(i,1,j)-qmin)/(ref-qmin))) - DO L=1,NZS -!-- for land points initialize soil ice - tln=log(TSLB(i,l,j)/273.15) - - if(tln.lt.0.) then - soiliqw(l)=(dqm+qmin)*(XLMELT* & - (tslb(i,l,j)-273.15)/tslb(i,l,j)/9.81/psis) & - **(-1./bclh) -! **(-1./bclh)-qmin - soiliqw(l)=max(0.,soiliqw(l)) - soiliqw(l)=min(soiliqw(l),smois(i,l,j)) - sh2o(i,l,j)=soiliqw(l) - smfr3d(i,l,j)=(smois(i,l,j)-soiliqw(l))/RIW - - else - smfr3d(i,l,j)=0. - sh2o(i,l,j)=smois(i,l,j) - endif - ENDDO + endif ! land - else + !else !-- for water ISLTYP=14 - DO L=1,NZS - smfr3d(i,l,j)=0. - sh2o(i,l,j)=1. - mavail(i,j) = 1. - ENDDO - endif - ENDIF + ! DO L=1,NZS + ! smfr3d(i,l,j)=0. + ! sh2o(i,l,j)=1. + ! mavail(i,j) = 1. + ! ENDDO + !endif + !ENDIF ENDDO ENDDO diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 65935ef1c..db1ad00b4 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -23,22 +23,118 @@ module lsm_ruc !! \section arg_table_lsm_ruc_init Argument Table !! \htmlinclude lsm_ruc_init.html !! - subroutine lsm_ruc_init (me, isot, ivegsrc, nlunit, & - & errmsg, errflg) + subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & + flag_restart, flag_init, & + im, lsoil_ruc, lsoil, kice, nlev, & ! in + lsm_ruc, lsm, & ! in + soiltyp, vegtype, frac_grid, land, icy, & ! in + fice, tsfc_lnd, tsfc_wat, tice, & + tg3, smc, slc, stc, & ! in + smcref2, smcwlt2, & ! inout + sh2o, smfrkeep, tslb, smois, wetness, & ! out + tsice, errmsg, errflg) implicit none +! --- in + integer, intent(in) :: me, master, isot, ivegsrc, nlunit + logical, intent(in) :: flag_restart + logical, intent(in) :: flag_init + logical, intent(in) :: frac_grid + integer, intent(in) :: im + integer, intent(in) :: lsoil_ruc + integer, intent(in) :: lsoil + integer, intent(in) :: kice + integer, intent(in) :: nlev + integer, intent(in) :: lsm_ruc, lsm + integer,dimension(im),intent(inout) :: soiltyp, vegtype + + logical, dimension(im), intent(in) :: land, icy + + real (kind=kind_phys), dimension(im), intent(in ) :: fice + real (kind=kind_phys), dimension(im), intent(in ) :: tsfc_lnd + real (kind=kind_phys), dimension(im), intent(in ) :: tsfc_wat + real (kind=kind_phys), dimension(im), intent(in ) :: tice + real (kind=kind_phys), dimension(im), intent(in) :: tg3 + + real (kind=kind_phys), dimension(im,lsoil), intent(in) :: smc,slc,stc + +! --- in/out: + real (kind=kind_phys), dimension(im), intent(inout) :: wetness + real (kind=kind_phys), dimension(im), intent(inout) :: smcref2, smcwlt2 + +! --- out + real (kind=kind_phys), dimension(im,lsoil_ruc), intent(out) :: sh2o, smfrkeep + real (kind=kind_phys), dimension(im,lsoil_ruc), intent(out) :: tslb, smois + real (kind=kind_phys), dimension(im,kice), intent(out) :: tsice - integer, intent(in) :: me, isot, ivegsrc, nlunit character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg +! --- local + integer :: ipr, i, k + logical :: debug_print + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + ipr = 10 + debug_print = .true. + +!> - Call rucinit() to initialize soil/ice/water variables + + if ( debug_print) then + write (0,*) 'RUC LSM initialization' + write (0,*) 'lsoil_ruc, lsoil',lsoil_ruc, lsoil + write (0,*) 'noah soil temp',stc(:,1) + write (0,*) 'noah soil mois',smc(:,1) + write (0,*) 'noah mois(ipr)',ipr,smc(ipr,:) + write (0,*) 'soiltyp=',soiltyp(:) + write (0,*) 'vegtype=',vegtype(:) + write (0,*) 'fice=',fice(:) + write (0,*) 'tice=',tice(:) + write (0,*) 'tsfc_lnd=',tsfc_lnd(:) + write (0,*) 'tsfc_wat=',tsfc_wat(:) + write (0,*) 'tg3=',tg3(:) + write (0,*) 'land=',land(:) + write (0,*) 'icy=',icy(:) + write (0,*) 'flag_init =',flag_init + write (0,*) 'flag_restart =',flag_restart + endif + !--- initialize soil vegetation call set_soilveg_ruc(me, isot, ivegsrc, nlunit) + if( .not. flag_restart) then + call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in + me, master, isot, ivegsrc, nlunit, & ! in + lsm_ruc, lsm, & ! in + frac_grid, land, icy, & ! in + soiltyp, vegtype, fice, & ! in + tsfc_lnd, tsfc_wat, tice, tg3, & ! in + smc, slc, stc, & ! in + smcref2, smcwlt2, & ! inout + sh2o, smfrkeep, tslb, smois, & ! out + wetness, errmsg, errflg) + + do i = 1, im ! i - horizontal loop + do k = 1, min(kice,lsoil_ruc) + ! - at initial time set sea ice T (tsice) + ! equal to TSLB, initialized from the Noah STC variable + tsice (i,k) = tslb(i,k) + enddo + enddo ! i + + endif ! flag_restart +!-- end of initialization + + if ( debug_print) then + write (0,*) 'ruc soil tslb',tslb(:,1) + write (0,*) 'ruc soil tsice',tsice(:,1) + write (0,*) 'ruc soil smois',smois(:,1) + write (0,*) 'ruc wetness',wetness(:) + endif + end subroutine lsm_ruc_init !! \section arg_table_lsm_ruc_finalize Argument Table @@ -303,25 +399,9 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'flag_restart =',flag_restart endif -!> - Call rucinit() at the first time step and the first interation -!! for RUC initialization,then overwrite Noah soil fields -!! with initialized RUC soil fields for output. if(flag_init .and. iter==1) then - if (debug_print) write (0,'(a,i0,a,l)') 'RUC LSM initialization, kdt = ', kdt, ', flag_restart = ', flag_restart - - call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in - isot, soiltyp, vegtype, fice, & ! in - land, tskin, tskin_wat, tg3, & ! in - smc, slc, stc, & ! in - smcref2, smcwlt2, & ! inout - lsm_ruc, lsm, & ! in - zs, sh2o, smfrkeep, tslb, smois, wetness, & ! out - me, master, errmsg, errflg) - xlai = 0. - endif ! flag_init=.true.,iter=1 -!-- end of initialization ims = 1 its = 1 @@ -692,7 +772,7 @@ subroutine lsm_ruc_run & ! inputs z0(i,j) = zorl(i)/100. znt(i,j) = zorl(i)/100. - if(debug_print) then + !if(debug_print) then if(me==0 .and. i==ipr) then write (0,*)'before RUC smsoil = ',smsoil(i,:,j), i,j write (0,*)'stsoil = ',stsoil(i,:,j), i,j @@ -788,7 +868,7 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'shdmax1d(i,j) =',i,j,shdmax1d(i,j) write (0,*)'rdlai2d =',rdlai2d endif - endif + !endif !> - Call RUC LSM lsmruc(). call lsmruc( delt, flag_init, flag_restart, kdt, iter, nsoil, & @@ -825,7 +905,9 @@ subroutine lsm_ruc_run & ! inputs & ims,ime, jms,jme, kms,kme, & & its,ite, jts,jte, kts,kte ) - if(debug_print) then + !if(debug_print) then + if(me==0.and.i==ipr) then + write (0,*)'after RUC smsoil = ',smsoil(i,:,j), i, j write (0,*)'after sneqv(i,j) =',i,j,sneqv(i,j) write (0,*)'after snowh(i,j) =',i,j,snowh(i,j) write (0,*)'after sncovr(i,j) =',i,j,sncovr(i,j) @@ -860,6 +942,7 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'after acsn(i,j) =',i,j,acsn(i,j) write (0,*)'after snomlt(i,j) =',i,j,snomlt(i,j) endif + !endif !> - RUC LSM: prepare variables for return to parent model and unit conversion. @@ -871,16 +954,6 @@ subroutine lsm_ruc_run & ! inputs !!\n \a runoff2 - subsurface runoff (\f$m s^{-1}\f$), drainage out bottom !!\n \a snoh - phase-change heat flux from snowmelt (w m-2) ! - if(debug_print) then - !if(me==0.and.i==ipr) then - write (0,*)'after RUC smsoil = ',smsoil(i,:,j), i, j - write (0,*)'stsoil = ',stsoil(i,:,j), i,j - write (0,*)'soilt = ',soilt(i,j), i,j - write (0,*)'wet = ',wet(i,j), i,j - write (0,*)'soilt1 = ',soilt1(i,j), i,j - write (0,*)'rhosnfr = ',rhosnfr(i,j), i,j - !endif - endif ! Interstitial evap(i) = qfx(i,j) / rho(i) ! kinematic @@ -1035,14 +1108,16 @@ end subroutine lsm_ruc_run !>\ingroup lsm_ruc_group !! This subroutine contains RUC LSM initialization. - subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in - isot, soiltyp, vegtype, fice, & ! in - land, tsurf, tsurf_wat, & ! in - tg3, smc, slc, stc, & ! in - smcref2, smcwlt2, & ! inout - lsm_ruc, lsm, & ! in - zs, sh2o, smfrkeep, tslb, smois, & ! out - wetness, me, master, errmsg, errflg) + subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in + me, master, isot, ivegsrc, nlunit, & ! in + lsm_ruc, lsm, & ! in + frac_grid, land, icy, & ! in + soiltyp, vegtype, fice, & ! in + tskin_lnd, tskin_wat, tice, tg3, & ! !in + smc, slc, stc, & ! in + smcref2, smcwlt2, & ! inout + sh2o, smfrkeep, tslb, smois, & ! out + wetness, errmsg, errflg) implicit none @@ -1050,11 +1125,13 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in integer, intent(in ) :: lsm integer, intent(in ) :: lsm_ruc integer, intent(in ) :: isot + integer, intent(in ) :: ivegsrc, nlunit integer, intent(in ) :: im, nlev integer, intent(in ) :: lsoil_ruc integer, intent(in ) :: lsoil - logical, dimension(im), intent(in ) :: land - real (kind=kind_phys), dimension(im), intent(in ) :: tsurf, tsurf_wat + logical, intent(in ) :: frac_grid + logical, dimension(im), intent(in ) :: land, icy + real (kind=kind_phys), dimension(im), intent(in ) :: tskin_lnd, tskin_wat, tice real (kind=kind_phys), dimension(im), intent(inout) :: smcref2 real (kind=kind_phys), dimension(im), intent(inout) :: smcwlt2 real (kind=kind_phys), dimension(im), intent(in ) :: tg3 @@ -1065,14 +1142,12 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in integer, dimension(im), intent(inout) :: soiltyp integer, dimension(im), intent(inout) :: vegtype real (kind=kind_phys), dimension(im), intent(inout) :: wetness - real (kind=kind_phys), dimension(im), intent(inout) :: fice + real (kind=kind_phys), dimension(im), intent(in ) :: fice real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: smois! ruc real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb ! ruc real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: sh2o ! ruc real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: smfrkeep ! ruc - real (kind=kind_phys), dimension(1:lsoil_ruc), intent (out) :: zs - integer, intent(in ) :: me integer, intent(in ) :: master character(len=*), intent(out) :: errmsg @@ -1085,6 +1160,7 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in integer :: flag_soil_layers, flag_soil_levels, flag_sst real (kind=kind_phys), dimension(1:lsoil_ruc) :: factorsm + real (kind=kind_phys), dimension(1:lsoil_ruc) :: zs integer , dimension( 1:im , 1:1 ) :: ivgtyp integer , dimension( 1:im , 1:1) :: isltyp @@ -1175,8 +1251,8 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in flag_soil_levels = 1 ! =1 for input from RUC LSM else ! for Noah input set smadj and swi_init to .true. - smadj = .true. - swi_init = .true. + smadj = .false. + swi_init = .false. flag_soil_layers = 1 ! =1 for input from the Noah LSM flag_soil_levels = 0 ! =1 for input from RUC LSM endif @@ -1198,25 +1274,29 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in endif - if(debug_print) then + !if(debug_print) then write (0,*)'smc(ipr,:) ==', ipr, smc(ipr,:) write (0,*)'stc(ipr,:) ==', ipr, stc(ipr,:) - write (0,*)'vegtype(ipr) ==', ipr, vegtype(ipr) - write (0,*)'soiltyp(ipr) ==', ipr, soiltyp(ipr) + !write (0,*)'vegtype(ipr) ==', ipr, vegtype(ipr) + !write (0,*)'soiltyp(ipr) ==', ipr, soiltyp(ipr) + write (0,*)'tskin_lnd(:)=',tskin_lnd(:) + write (0,*)'tskin_wat(:)=',tskin_wat(:) write (0,*)'its,ite,jts,jte ',its,ite,jts,jte - endif + !endif do j=jts,jte ! do i=its,ite ! i = horizontal loop + sst(i,j) = tskin_wat(i) + tbot(i,j)= tg3(i) ! land only version if (land(i)) then - tsk(i,j) = tsurf(i) - sst(i,j) = tsurf_wat(i) - tbot(i,j)= tg3(i) + tsk(i,j) = tskin_lnd(i) ivgtyp(i,j)=vegtype(i) isltyp(i,j)=soiltyp(i) + !ivgtyp(i,j )= 12 + !isltyp(i,j) = 3 landmask(i,j)=1. xice(i,j)=0. else @@ -1236,14 +1316,13 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in st_input(i,1,j)=tsk(i,j) sm_input(i,1,j)=0. - !--- initialize smcwlt2 and smcref2 with Noah values - smcref2 (i) = REFSMCnoah(soiltyp(i)) - smcwlt2 (i) = WLTSMCnoah(soiltyp(i)) - do k=1,lsoil st_input(i,k+1,j)=stc(i,k) ! convert volumetric soil moisture to SWI (soil wetness index) if(swi_init) then + !--- initialize smcwlt2 and smcref2 with Noah values + smcref2 (i) = REFSMCnoah(soiltyp(i)) + smcwlt2 (i) = WLTSMCnoah(soiltyp(i)) sm_input(i,k+1,j)=min(1.,max(0.,(smc(i,k) - smcwlt2(i))/ & (smcref2(i) - smcwlt2(i)))) else @@ -1299,7 +1378,7 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in if(debug_print) then write (0,*)'tsk(i,j),tbot(i,j),sst(i,j),landmask(i,j)' & ,ipr,1,tsk(ipr,1),tbot(ipr,1),sst(ipr,1),landmask(ipr,1) - write (0,*)'tsurf(ipr)=',ipr,tsurf(ipr) + write (0,*)'tskin_lnd(ipr)=',ipr,tskin_lnd(ipr) write (0,*)'stc(ipr)=',ipr,stc(ipr,:) write (0,*)'smc(ipr)=',ipr,smc(ipr,:) write (0,*)'soilt(1,:,ipr)',ipr,soiltemp(ipr,:,1) @@ -1390,29 +1469,34 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in ! Initialize liquid and frozen soil moisture from total soil moisture ! and soil temperature, and also soil moisture availability in the top ! layer - call ruclsminit( debug_print, landmask, & - lsoil_ruc, isltyp, ivgtyp, xice, mavail, & - soilh2o, smfr, soiltemp, soilm, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte ) + !call ruclsminit( debug_print, frac_grid, land, icy, & + ! lsoil_ruc, isltyp, ivgtyp, mavail, & + ! soilh2o, smfr, soiltemp, soilm, & + ! ims,ime, jms,jme, kms,kme, & + ! its,ite, jts,jte, kts,kte ) do j=jts,jte do i=its,ite - if (land(i)) then - wetness(i) = mavail(i,j) - do k = 1, lsoil_ruc - smois(i,k) = soilm(i,k,j) - tslb(i,k) = soiltemp(i,k,j) - sh2o(i,k) = soilh2o(i,k,j) - smfrkeep(i,k) = smfr(i,k,j) - enddo - endif ! land(i) + if (land(i)) then + wetness(i) = soilm(i,1,j)/0.5 + !wetness(i) = mavail(i,j) + do k = 1, lsoil_ruc + smois(i,k) = soilm(i,k,j) + tslb(i,k) = soiltemp(i,k,j) + sh2o(i,k) = soilm(i,k,j) + smfrkeep(i,k) = soilm(i,k,j) + !sh2o(i,k) = soilh2o(i,k,j) + !smfrkeep(i,k) = smfr(i,k,j) + enddo + endif ! land(i) enddo enddo ! For non-land points, set RUC LSM fields to input (Noah or RUC) fields + if (.not. frac_grid) then do i=1,im if (.not.land(i)) then + wetness (i) = 1. do k=1,min(lsoil,lsoil_ruc) smois(i,k) = smc(i,k) tslb(i,k) = stc(i,k) @@ -1420,12 +1504,16 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in enddo endif enddo + endif ! frac_grid - if(debug_print) then + !if(debug_print) then + do i=1,im write (0,*)'End of RUC LSM initialization' - write (0,*)'tslb(ipr)=',ipr,tslb(ipr,:) - write (0,*)'smois(ipr)=',ipr,smois(ipr,:) - endif ! debug_print + write (0,*)'tslb(i)=',i,land(i),icy(i),tslb(i,:) + write (0,*)'smois(i)=',i,land(i),icy(i),smois(i,:) + write (0,*)'wetness(i)=',i,land(i),icy(i),wetness(i) + enddo + !endif ! debug_print end subroutine rucinit diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 4721418d3..730bcd8c0 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -9,6 +9,14 @@ type = integer intent = in optional = F +[master] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F [isot] standard_name = soil_type_dataset_choice long_name = soil type dataset choice @@ -33,6 +41,262 @@ type = integer intent = in optional = F +[flag_restart] + standard_name = flag_for_restart + long_name = flag for restart (warmstart) or coldstart + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_init] + standard_name = flag_for_first_time_step + long_name = flag signaling first time step for time integration loop + units = flag + dimensions = () + type = logical + intent = in + optional = F +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsoil_ruc] + standard_name = soil_vertical_dimension_for_land_surface_model + long_name = number of soil layers internal to land surface model + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsoil] + standard_name = soil_vertical_dimension + long_name = soil vertical layer dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer + intent = in + optional = F +[nlev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsm_ruc] + standard_name = flag_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsm] + standard_name = flag_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in + optional = F +[soiltyp] + standard_name = soil_type_classification + long_name = soil type at each grid cell + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[vegtype] + standard_name = vegetation_type_classification + long_name = vegetation type at each grid cell + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[frac_grid] + standard_name = flag_for_fractional_grid + long_name = flag for fractional grid + units = flag + dimensions = () + type = logical + intent = in + optional = F +[land] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_dimension) + type = logical + intent = in + optional = F +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc_lnd] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tsfc_wat] + standard_name = sea_surface_temperature + long_name = sea surface temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tice] + standard_name = sea_ice_temperature_interstitial + long_name = sea ice surface skin temperature use as interstitial + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tg3] + standard_name = deep_soil_temperature + long_name = deep soil temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[smc] + standard_name = volume_fraction_of_soil_moisture + long_name = total soil moisture + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slc] + standard_name = volume_fraction_of_unfrozen_soil_moisture + long_name = liquid soil moisture + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[smcref2] + standard_name = threshold_volume_fraction_of_condensed_water_in_soil + long_name = soil moisture threshold + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[smcwlt2] + standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point + long_name = soil water fraction at wilting point + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sh2o] + standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model + long_name = volume fraction of unfrozen soil moisture for lsm + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + type = real + kind = kind_phys + intent = out + optional = F +[smfrkeep] + standard_name = volume_fraction_of_frozen_soil_moisture_for_land_surface_model + long_name = volume fraction of frozen soil moisture for lsm + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + type = real + kind = kind_phys + intent = out + optional = F +[tslb] + standard_name = soil_temperature_for_land_surface_model + long_name = soil temperature for land surface model + units = K + dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + type = real + kind = kind_phys + intent = out + optional = F +[smois] + standard_name = volume_fraction_of_soil_moisture_for_land_surface_model + long_name = volumetric fraction of soil moisture for lsm + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + type = real + kind = kind_phys + intent = out + optional = F +[wetness] + standard_name = normalized_soil_wetness_for_land_surface_model + long_name = normalized soil wetness + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tsice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,ice_vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From c85072fb3484e94d22c8f3fd124b827e8040bd56 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 29 Aug 2020 16:36:23 -0600 Subject: [PATCH 321/404] physics/cires_ugwp.F90: fix bug in call to gwdps_run --- physics/cires_ugwp.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index df0116cd0..f24ae39ae 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -261,7 +261,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & - ugrs, vgrs, tgrs, qgrs, & + ugrs, vgrs, tgrs, qgrs(:,:,1), & kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & hprime, oc, oa4, clx, theta, sigma, gamma, & elvmax, dusfcg, dvsfcg, & From 5bf8978f02d9672e3776106a6bfdcf8f3fb1fcb9 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Mon, 31 Aug 2020 17:57:23 +0000 Subject: [PATCH 322/404] A typo is corrected --- physics/sfcsub.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/sfcsub.F b/physics/sfcsub.F index a78ac650f..3ceded5bc 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -384,7 +384,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & parameter(snwmin=5.0,snwmax=100.) real (kind=kind_io8), parameter :: ten=10.0, one=1.0 ! -! coeficients of blending forecast and interpolated clim +! coefficients of blending forecast and interpolated clim ! (or analyzed) fields over sea or land(l) (not for clouds) !tgs -- important ! 1.0 = use of forecast From 915f71a0b5741a9d02057d86eea1aff6886152af Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 31 Aug 2020 12:34:08 -0600 Subject: [PATCH 323/404] remove do_sfcperts and pertabl from GFS_rrtmg_pre --- physics/GFS_rrtmg_pre.F90 | 8 ++++---- physics/GFS_rrtmg_pre.meta | 17 ----------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 0759ce596..05442d0be 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -26,8 +26,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & imp_physics_zhao_carr_pdf, imp_physics_mg, imp_physics_wsm6, & imp_physics_fer_hires, lndp_var_list, lsswr, lslwr, & ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, & - lmfdeep2, do_sfcperts, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & - rog, rocp, con_rd, pertalb, xlat, xlon, coslat, sinlat, tsfc, slmsk, & + lmfdeep2, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & + rog, rocp, con_rd, xlat, xlon, coslat, sinlat, tsfc, slmsk, & prsi, prsl, prslk, tgrs, sfc_wts, phy_f3d_mg_cld, phy_f3d_reffr, & phy_f3d_cnvw, phy_f3d_cnvc, f_ice, f_rain, f_rimef, qgrs, aer_nm, & !inputs from here and above coszen, coszdg, phy_f3d_leffr, phy_f3d_ieffr, phy_f3d_seffr, & @@ -91,12 +91,12 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & logical, intent(in) :: lsswr, lslwr, ltaerosol, lgfdlmprad, & uni_cld, effr_in, do_mynnedmf, & - lmfshal, lmfdeep2, do_sfcperts + lmfshal, lmfdeep2 real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup real(kind=kind_phys), intent(in) :: eps, epsm1, fvirt, rog, rocp, con_rd - real(kind=kind_phys), dimension(:), intent(in) :: pertalb, xlat, xlon, & + real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & coslat, sinlat, tsfc, & slmsk diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index d602834a4..6cee57101 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -399,14 +399,6 @@ type = logical intent = in optional = F -[do_sfcperts] - standard_name = flag_for_stochastic_surface_perturbations - long_name = flag for stochastic surface perturbations option - units = flag - dimensions = () - type = logical - intent = in - optional = F [fhswr] standard_name = frequency_for_shortwave_radiation long_name = frequency for shortwave radiation @@ -497,15 +489,6 @@ kind = kind_phys intent = in optional = F -[pertalb] - standard_name = magnitude_of_surface_albedo_perturbation - long_name = magnitude of surface albedo perturbation - units = frac - dimensions = (5) - type = real - kind = kind_phys - intent = in - optional = F [xlat] standard_name = latitude long_name = latitude From ff2d8c2298265d32153979f0a5757500f481b230 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Mon, 31 Aug 2020 22:16:42 +0000 Subject: [PATCH 324/404] Added index k to printed out names of variables at K soil level. --- physics/sfcsub.F | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/physics/sfcsub.F b/physics/sfcsub.F index 3ceded5bc..ade25055b 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -581,6 +581,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & character*500 fndclm,fndanl ! logical lanom + character(len=10) :: message ! namelist/namsfc/fnglac,fnmxic, @@ -1240,7 +1241,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call getsmc(wetclm,len,lsoil,smcclm,me) endif do k=1,lsoil - call qcmxmn('smc ',smcclm(1,k),sliclm,snoclm,icefl1, + call qcmxmn(message('stc',k),smcclm(1,k),sliclm,snoclm,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) @@ -1250,7 +1251,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call getstc(tsfclm,tg3clm,sliclm,len,lsoil,stcclm,tsfimx) endif do k=1,lsoil - call qcmxmn('stc ',stcclm(1,k),sliclm,snoclm,icefl1, + call qcmxmn(message('stc',k),stcclm(1,k),sliclm,snoclm,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) @@ -1314,8 +1315,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('snoclm',snoclm,sliclm,snoclm,len) call monitr('scvclm',scvclm,sliclm,snoclm,len) do k=1,lsoil - call monitr('smcclm1',smcclm(1,k),sliclm,snoclm,len) - call monitr('stcclm1',stcclm(1,k),sliclm,snoclm,len) + call monitr(message('smcclm',k),smcclm(1,k),sliclm,snoclm,len) + call monitr(message('stcclm',k),stcclm(1,k),sliclm,snoclm,len) enddo call monitr('tg3clm',tg3clm,sliclm,snoclm,len) call monitr('zorclm',zorclm,sliclm,snoclm,len) @@ -1610,7 +1611,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & endif !-- soil moisture do k=1,lsoil - call qcmxmn('smca ',smcanl(1,1),slianl,snoanl,icefl1, + call qcmxmn(message('smca',k),smcanl(1,1),slianl,snoanl,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) @@ -1620,7 +1621,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call getstc(tsfanl,tg3anl,slianl,len,lsoil,stcanl,tsfimx) endif do k=1,lsoil - call qcmxmn('stca ',stcanl(1,1),slianl,snoanl,icefl1, + call qcmxmn(message('stca',k),stcanl(1,1),slianl,snoanl,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) @@ -1671,8 +1672,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('snoanl',snoanl,slianl,snoanl,len) call monitr('scvanl',scvanl,slianl,snoanl,len) do k=1,lsoil - call monitr('smcanl',smcanl(1,k),slianl,snoanl,len) - call monitr('stcanl',stcanl(1,k),slianl,snoanl,len) + call monitr(message('smcanl',k),smcanl(1,k),slianl,snoanl,len) + call monitr(message('stcanl',k),stcanl(1,k),slianl,snoanl,len) enddo call monitr('tg3anl',tg3anl,slianl,snoanl,len) call monitr('zoranl',zoranl,slianl,snoanl,len) @@ -1844,14 +1845,14 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & rla,rlo,len,kqcm,percrit,lgchek,me) !-- soil moisture forecast do k=1,lsoil - call qcmxmn('smcf ',smcfcs(1,k),slifcs,snofcs,icefl1, + call qcmxmn(message('smcfcw',k),smcfcs(1,k),slifcs,snofcs,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) enddo !-- soil temperature forecast do k=1,lsoil - call qcmxmn('stcf ',stcfcs(1,k),slifcs,snofcs,icefl1, + call qcmxmn(message('stcf',k),stcfcs(1,k),slifcs,snofcs,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) @@ -1902,8 +1903,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('aisfcs',aisfcs,slifcs,snofcs,len) call monitr('snofcs',snofcs,slifcs,snofcs,len) do k=1,lsoil - call monitr('smcfcs',smcfcs(1,k),slifcs,snofcs,len) - call monitr('stcfcs',stcfcs(1,k),slifcs,snofcs,len) + call monitr(message('smcfcs',k),smcfcs(1,k),slifcs,snofcs,len) + call monitr(message('stcfcs',k),stcfcs(1,k),slifcs,snofcs,len) enddo call monitr('tg3fcs',tg3fcs,slifcs,snofcs,len) call monitr('zorfcs',zorfcs,slifcs,snofcs,len) @@ -2048,13 +2049,13 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & ! & rla,rlo,len,kqcm,percrit,lgchek,me) ! endif do k=1,lsoil - call qcmxmn('stcm ',stcanl(1,k),slianl,snoanl,icefl1, + call qcmxmn(message('stcm',k),stcanl(1,k),slianl,snoanl,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) enddo do k=1,lsoil - call qcmxmn('smcm ',smcanl(1,k),slianl,snoanl,icefl1, + call qcmxmn(message('smcm',k),smcanl(1,k),slianl,snoanl,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) @@ -2142,7 +2143,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('aisanl',aisanl,slianl,snoanl,len) call monitr('snoanl',snoanl,slianl,snoanl,len) do k=1,lsoil - call monitr('smcanl',smcanl(1,k),slianl,snoanl,len) + call monitr(message('smcanl',k),smcanl(1,k),slianl,snoanl,len) call monitr('stcanl',stcanl(1,k),slianl,snoanl,len) enddo call monitr('tg3anl',tg3anl,slianl,snoanl,len) @@ -2221,8 +2222,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & call monitr('aisdif',aisfcs,slianl,snoanl,len) call monitr('snodif',snofcs,slianl,snoanl,len) do k=1,lsoil - call monitr('smcanl',smcfcs(1,k),slianl,snoanl,len) - call monitr('stcanl',stcfcs(1,k),slianl,snoanl,len) + call monitr(message('smcanl',k),smcfcs(1,k),slianl,snoanl,len) + call monitr('stcanl(k)',stcfcs(1,k),slianl,snoanl,len) enddo call monitr('tg3dif',tg3fcs,slianl,snoanl,len) call monitr('zordif',zorfcs,slianl,snoanl,len) @@ -8605,4 +8606,14 @@ subroutine snodpth2(glacir,snwmax,snoanl, len, me) enddo return end + function message(prefix,index) + implicit none + character(len=*), intent(in) :: prefix + integer, intent(in) :: index + character(len=10) :: message + ! + ! probably need to implement a check that len(prefix) + '-' + length of + ! string representation of index <= len(message) + write(message,fmt='(a,a,i0)') trim(prefix), '-', index + end function message !>@} From 98e378f0f7f50a3a72cf9eb4ed4c7085de8cccbb Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Tue, 1 Sep 2020 00:09:46 +0000 Subject: [PATCH 325/404] Removed the message definition. --- physics/rte-rrtmgp | 2 +- physics/sfcsub.F | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 6ee0b62c1..7dfff2025 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 6ee0b62c1ac6204a89a4e922382b611c16dd5fa7 +Subproject commit 7dfff2025cae02c84b12df2402a39d77065f0e62 diff --git a/physics/sfcsub.F b/physics/sfcsub.F index ade25055b..41110c7c5 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -581,7 +581,6 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & character*500 fndclm,fndanl ! logical lanom - character(len=10) :: message ! namelist/namsfc/fnglac,fnmxic, From e2d663f3cd1c4cc81b094aceadddf563793f20d9 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 1 Sep 2020 07:31:33 -0600 Subject: [PATCH 326/404] Number of threads used in sfcsub.F is now coming in via the argument list --- physics/GFS_phys_time_vary.fv3.F90 | 2 +- physics/GFS_phys_time_vary.fv3.meta | 2 +- physics/gcycle.F90 | 9 +++---- physics/num_parthds.F | 23 ----------------- physics/sfcsub.F | 40 +++++++++++++---------------- 5 files changed, 24 insertions(+), 52 deletions(-) delete mode 100644 physics/num_parthds.F diff --git a/physics/GFS_phys_time_vary.fv3.F90 b/physics/GFS_phys_time_vary.fv3.F90 index bed8e14e1..3c894b777 100644 --- a/physics/GFS_phys_time_vary.fv3.F90 +++ b/physics/GFS_phys_time_vary.fv3.F90 @@ -468,7 +468,7 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, first_time_step, errmsg, !> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs if (Model%nscyc > 0) then if (mod(Model%kdt,Model%nscyc) == 1) THEN - call gcycle (nblks, Model, Data(:)%Grid, Data(:)%Sfcprop, Data(:)%Cldprop) + call gcycle (nblks, nthrds, Model, Data(:)%Grid, Data(:)%Sfcprop, Data(:)%Cldprop) endif endif diff --git a/physics/GFS_phys_time_vary.fv3.meta b/physics/GFS_phys_time_vary.fv3.meta index bcd4112c2..72a7ce207 100644 --- a/physics/GFS_phys_time_vary.fv3.meta +++ b/physics/GFS_phys_time_vary.fv3.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_phys_time_vary type = scheme - dependencies = aerclm_def.F,aerinterp.F90,gcycle.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f,namelist_soilveg.f,num_parthds.F,ozinterp.f90,ozne_def.f,sfcsub.F + dependencies = aerclm_def.F,aerinterp.F90,gcycle.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f,namelist_soilveg.f,ozinterp.f90,ozne_def.f,sfcsub.F ######################################################################## [ccpp-arg-table] diff --git a/physics/gcycle.F90 b/physics/gcycle.F90 index 56d774afd..8b3555826 100644 --- a/physics/gcycle.F90 +++ b/physics/gcycle.F90 @@ -5,8 +5,7 @@ !>\ingroup mod_GFS_phys_time_vary !! This subroutine repopulates specific time-varying surface properties for !! atmospheric forecast runs. -# 1 "physics/gcycle.F90" - SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) + SUBROUTINE GCYCLE (nblks, nthrds, Model, Grid, Sfcprop, Cldprop) ! ! USE MACHINE, only: kind_phys @@ -15,7 +14,7 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) GFS_sfcprop_type, GFS_cldprop_type implicit none - integer, intent(in) :: nblks + integer, intent(in) :: nblks, nthrds type(GFS_control_type), intent(in) :: Model type(GFS_grid_type), intent(in) :: Grid(nblks) type(GFS_sfcprop_type), intent(inout) :: Sfcprop(nblks) @@ -194,8 +193,8 @@ SUBROUTINE GCYCLE (nblks, Model, Grid, Sfcprop, Cldprop) SNOFCS, ZORFCS, ALBFC1, TG3FCS, CNPFCS, & SMCFC1, STCFC1, SLIFCS, AISFCS, & VEGFCS, VETFCS, SOTFCS, ALFFC1, CVFCS, & - CVBFCS, CVTFCS, Model%me, Model%nlunit, & - size(Model%input_nml_file), & + CVBFCS, CVTFCS, Model%me, nthrds, & + Model%nlunit, size(Model%input_nml_file), & Model%input_nml_file, & lake, Model%min_lakeice, Model%min_seaice, & Model%ialb, Model%isot, Model%ivegsrc, & diff --git a/physics/num_parthds.F b/physics/num_parthds.F deleted file mode 100644 index 922ae4a4f..000000000 --- a/physics/num_parthds.F +++ /dev/null @@ -1,23 +0,0 @@ - function num_parthds() -#ifdef _OPENMP -#include -!$OMP PARALLEL - num_parthds=omp_get_num_threads() -!$OMP END PARALLEL -#else -! num_parthds=8 - num_parthds=1 -#endif - return - end - -!GFDL function num_parthds() -!GFDL integer:: number_of_openMP_threads -!GFDL character(2) :: omp_threads -!GFDL integer :: stat -!GFDL call get_environment_variable("OMP_NUM_THREADS",omp_threads) -!GFDL read(omp_threads,*,iostat=stat)number_of_openMP_threads -!GFDL num_parthds = number_of_openMP_threads -!GFDL return -!GFDL end - diff --git a/physics/sfcsub.F b/physics/sfcsub.F index a2d846aee..6984602bc 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -35,6 +35,7 @@ module sfccyc_module integer, parameter :: xdata=5000, ydata=2500, mdata=xdata*ydata integer :: veg_type_landice integer :: soil_type_landice + integer :: num_threads ! end module sfccyc_module @@ -67,7 +68,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & &, tsffcs,snofcs,zorfcs,albfcs,tg3fcs & &, cnpfcs,smcfcs,stcfcs,slifcs,aisfcs & &, vegfcs,vetfcs,sotfcs,alffcs & - &, cvfcs,cvbfcs,cvtfcs,me,nlunit & + &, cvfcs,cvbfcs,cvtfcs,me,nthrds,nlunit & &, sz_nml,input_nml_file & &, lake, min_lakeice, min_seaice & &, ialb,isot,ivegsrc,tile_num_ch,i_index,j_index) @@ -76,7 +77,8 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & use sfccyc_module implicit none character(len=*), intent(in) :: tile_num_ch - integer, intent(in) :: i_index(len), j_index(len) + integer, intent(in) :: i_index(len), j_index(len), & + & me, nthrds logical, intent(in) :: use_ufo, nst_anl logical, intent(in) :: lake(len) real (kind=kind_io8), intent(in) :: min_lakeice, min_seaice @@ -156,13 +158,11 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & irtwet,k,iprnt,kk,irttsf,iret,i,igrdbg,iy,im,id, & & icalbl,icalbs,icalfl,ictsfs,lugb,len,lsoil,ih, & & ictsfl,iczors,icplrl,icplrs,iczorl,icalfs,icsnol, & - & icsnos,irttg3,me,kqcm,nlunit,sz_nml,ialb & + & icsnos,irttg3,kqcm,nlunit,sz_nml,ialb & &, irtvmn, irtvmx, irtslp, irtabs, isot, ivegsrc logical gausm, deads, qcmsk, znlst, monclm, monanl, & & monfcs, monmer, mondif, landice character(len=*), intent(in) :: input_nml_file(sz_nml) - - integer num_parthds ! !> This is a limited point version of surface program. !! @@ -760,6 +760,9 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & &, imsk, jmsk, slmskh, blnmsk, bltmsk &, glacir, amxice, tsfcl0 &, caisl, caiss, cvegs +! Set number of threads num_threads in sfccyc_module for later use +! to the value received from the calling routine (nthrds) + num_threads = nthrds ! lprnt = .false. iprnt = 1 @@ -3083,6 +3086,7 @@ subroutine la2ga(regin,imxin,jmxin,rinlon,rinlat,rlon,rlat,inttyp,& & gauout,len,lmask,rslmsk,slmask & &, outlat, outlon,me) use machine , only : kind_io8,kind_io4 + use sfccyc_module , only : num_threads implicit none real (kind=kind_io8) wei4,wei3,wei2,sum2,sum1,sum3,wei1,sum4, & & wsum,tem,wsumiv,sums,sumn,wi2j2,x,y,wi1j1, & @@ -3106,15 +3110,12 @@ subroutine la2ga(regin,imxin,jmxin,rinlon,rinlat,rlon,rlat,inttyp,& logical lmask ! logical first - integer num_threads data first /.true./ - save num_threads, first + save first ! integer len_thread_m, len_thread, i1_t, i2_t - integer num_parthds ! if (first) then - num_threads = num_parthds() first = .false. if (.not. allocated(imxnx)) allocate (imxnx(num_threads)) endif @@ -4714,7 +4715,8 @@ subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & & irtvmn,irtvmx,irtslp,irtabs, & & irtvet,irtsot,irtalf, landice, me) use machine , only : kind_io8,kind_io4 - use sfccyc_module, only : veg_type_landice, soil_type_landice + use sfccyc_module, only : veg_type_landice, soil_type_landice, & + & num_threads implicit none integer k,i,im,id,iy,len,lsoil,ih,irtacn,irtsmc,irtscv,irtais, & & irttg3,irtstc,irtalf,me,irtsot,irtveg,irtvet, irtzor, & @@ -4766,15 +4768,12 @@ subroutine merge(len,lsoil,iy,im,id,ih,fh,deltsfc, & real (kind=kind_io8) qsmcl(lsoil), qsmcs(lsoil), & & qstcl(lsoil), qstcs(lsoil) logical first - integer num_threads data first /.true./ - save num_threads, first + save first ! integer len_thread_m, i1_t, i2_t, it - integer num_parthds ! if (first) then - num_threads = num_parthds() first = .false. endif ! @@ -5426,6 +5425,7 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & & rla,rlo,len,mode,percrit,lgchek,me) ! use machine , only : kind_io8,kind_io4 + use sfccyc_module , only : num_threads implicit none integer, intent(in) :: len, mode, me real (kind=kind_io8), intent(in) :: fldimx,fldimn,fldjmx,fldomn, & @@ -5439,18 +5439,16 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & logical lgchek ! logical first - integer num_threads real (kind=kind_io8) permax, per data first /.true./ - save num_threads, first + save first ! - integer :: len_thread_m, i1_t, i2_t, it, num_parthds, & + integer :: len_thread_m, i1_t, i2_t, it, & & kmaxi,kmini,kmaxj,kmino,kmaxl,kminl,kmaxo,kminj, & & ij,nprt,kmaxs,kmins,i integer :: islimsk(len), iwk(len) ! if (first) then - num_threads = num_parthds() first = .false. endif do it=1,len @@ -6656,6 +6654,7 @@ subroutine setrmsk(kpds5,slmask,igaul,jgaul,wlon,rnlat, & subroutine ga2la(gauin,imxin,jmxin,regout,imxout,jmxout, & & wlon,rnlat,rlnout,rltout,gaus,blno, blto) use machine , only : kind_io8,kind_io4 + use sfccyc_module , only : num_threads implicit none integer i1,i2,j2,ishft,i,jj,j1,jtem,jmxout,imxin,jmxin,imxout, & & j,iret @@ -6681,15 +6680,12 @@ subroutine ga2la(gauin,imxin,jmxin,regout,imxout,jmxout, & ! ! logical first - integer num_threads data first /.true./ - save num_threads, first + save first ! integer len_thread_m, j1_t, j2_t, it - integer num_parthds ! if (first) then - num_threads = num_parthds() first = .false. endif ! From 096ce3acbc0469d9f6d53f3bfac91763c533d44c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 1 Sep 2020 09:35:19 -0600 Subject: [PATCH 327/404] Update GFS_debug.F90 to prepare for further debugging capabilities, add more inline documentation --- physics/GFS_debug.F90 | 1763 +++++++++++++++++++++++++---------------- 1 file changed, 1086 insertions(+), 677 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index aba480382..e889d94df 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -1,37 +1,313 @@ !> \file GFS_debug.F90 - module GFS_diagtoscreen - - private - public GFS_diagtoscreen_init, GFS_diagtoscreen_run, GFS_diagtoscreen_finalize - - public print_my_stuff, chksum_int, chksum_real, print_var +!! +!! This is the place to switch between different debug outputs. +!! - The default behavior for Intel (or any compiler other than GNU) +!! is to print mininmum, maximum and 32-bit Adler checksum for arrays. +!! - The default behavior for GNU is to mininmum, maximum and +!! mean value of arrays, because calculating the checksum leads +!! to segmentation faults with gfortran (bug in malloc?). +!! - If none of the #define preprocessor statements is used, +!! arrays are printed in full (this is often unpractical). +!! - All output to stdout/stderr from these routines are prefixed +!! with 'XXX: ' so that they can be easily removed from the log files +!! using "grep -ve 'XXX: ' ..." if needed. +!! - Only one #define statement can be active at any time +!! +!! Available options for debug output: +!! +!! #define PRINT_SUM: print mininmum, maximum and mean value of arrays +!! +!! #define PRINT_CHKSUM: mininmum, maximum and 32-bit Adler checksum for arrays +!! -! Calculating the checksum leads to segmentation faults with gfortran (bug in malloc?), -! thus print the sum of the array instead of the checksum. #ifdef __GFORTRAN__ #define PRINT_SUM #else #define PRINT_CHKSUM #endif +!! +!! +!! + + module print_var_chksum + + use machine, only: kind_phys + + implicit none + + private + + public chksum_int, chksum_real, print_var + interface print_var module procedure print_logic_0d module procedure print_logic_1d module procedure print_int_0d module procedure print_int_1d + module procedure print_int_2d module procedure print_real_0d module procedure print_real_1d module procedure print_real_2d module procedure print_real_3d + module procedure print_real_4d end interface - integer, parameter :: ISTART = 1 - integer, parameter :: IEND = 9999999 + contains + + subroutine print_logic_0d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + logical, intent(in) :: var + + write(0,'(2a,3i6,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, var + + end subroutine print_logic_0d + + subroutine print_logic_1d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + logical, intent(in) :: var(:) + + integer :: i + +#ifdef PRINT_SUM + write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) +#else + do i=lbound(var,1),ubound(var,1) + write(0,'(2a,3i6,i6,2e16.7,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, lat_d(i), lon_d(i), var(i) + end do +#endif + + end subroutine print_logic_1d + + subroutine print_int_0d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + integer, intent(in) :: var + + write(0,'(2a,3i6,i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, var + + end subroutine print_int_0d + + subroutine print_int_1d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + integer, intent(in) :: var(:) + + integer :: i + +#ifdef PRINT_SUM + write(0,'(2a,3i6,3i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,i20,2i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_int(size(var),var), minval(var), maxval(var) +#else + do i=lbound(var,1),ubound(var,1) + write(0,'(2a,3i6,i6,2e16.7,i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, lat_d(i), lon_d(i), var(i) + end do +#endif + + end subroutine print_int_1d + + subroutine print_int_2d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + integer, intent(in) :: var(:,:) + + integer :: i, k + +#ifdef PRINT_SUM + write(0,'(2a,3i6,3i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,i20,2i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_int(size(var),var), minval(var), maxval(var) +#else + do i=lbound(var,1),ubound(var,1) + do k=lbound(var,2),ubound(var,2) + write(0,'(2a,3i6,2i6,2e16.7,i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, lat_d(i), lon_d(i), var(i,k) + end do + end do +#endif + + end subroutine print_int_2d + + subroutine print_real_0d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + real(kind_phys), intent(in) :: var + + write(0,'(2a,3i6,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, var + + end subroutine print_real_0d + + subroutine print_real_1d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + real(kind_phys), intent(in) :: var(:) + + integer :: i + +#ifdef PRINT_SUM + write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),var), minval(var), maxval(var) +#else + do i=lbound(var,1),ubound(var,1) + write(0,'(2a,3i6,i6,2e16.7,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, lat_d(i), lon_d(i), var(i) + end do +#endif + + end subroutine print_real_1d + + subroutine print_real_2d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + real(kind_phys), intent(in) :: var(:,:) + + integer :: k, i + +#ifdef PRINT_SUM + write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),reshape(var,(/size(var)/))), minval(var), maxval(var) +#else + do i=lbound(var,1),ubound(var,1) + do k=lbound(var,2),ubound(var,2) + write(0,'(2a,3i6,2i6,2e16.7,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, lat_d(i), lon_d(i), var(i,k) + end do + end do +#endif + + end subroutine print_real_2d + + subroutine print_real_3d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + real(kind_phys), intent(in) :: var(:,:,:) + + integer :: k, i, l + +#ifdef PRINT_SUM + write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),reshape(var,(/size(var)/))), minval(var), maxval(var) +#else + do i=lbound(var,1),ubound(var,1) + do k=lbound(var,2),ubound(var,2) + do l=lbound(var,3),ubound(var,3) + write(0,'(2a,3i6,3i6,2e16.7,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, l, lat_d(i), lon_d(i), var(i,k,l) + end do + end do + end do +#endif + + end subroutine print_real_3d + + subroutine print_real_4d(mpirank, omprank, blkno, lat_d, lon_d, name, var) + + integer, intent(in) :: mpirank, omprank, blkno + real(kind_phys), intent(in) :: lat_d(:), lon_d(:) + character(len=*), intent(in) :: name + real(kind_phys), intent(in) :: var(:,:,:,:) + + integer :: k, i, l, m + +#ifdef PRINT_SUM + write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) +#elif defined(PRINT_CHKSUM) + write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),reshape(var,(/size(var)/))), minval(var), maxval(var) +#else + do i=lbound(var,1),ubound(var,1) + do k=lbound(var,2),ubound(var,2) + do l=lbound(var,3),ubound(var,3) + do m=lbound(var,4),ubound(var,4) + write(0,'(2a,3i6,4i6,2e16.7,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, l, m, lat_d(i), lon_d(i), var(i,k,l,m) + end do + end do + end do + end do +#endif + + end subroutine print_real_4d + + function chksum_int(N, var) result(hash) + + integer, intent(in) :: N + integer, dimension(1:N), intent(in) :: var + integer*8, dimension(1:N) :: int_var + integer*8 :: a, b, i, hash + integer*8, parameter :: mod_adler=65521 + + a=1 + b=0 + i=1 + hash = 0 + int_var = TRANSFER(var, a, N) + + do i= 1, N + a = MOD(a + int_var(i), mod_adler) + b = MOD(b+a, mod_adler) + end do + + hash = ior(b * 65536, a) + + end function chksum_int + + function chksum_real(N, var) result(hash) + + integer, intent(in) :: N + real(kind_phys), dimension(1:N), intent(in) :: var + integer*8, dimension(1:N) :: int_var + integer*8 :: a, b, i, hash + integer*8, parameter :: mod_adler=65521 + + a=1 + b=0 + i=1 + hash = 0 + int_var = TRANSFER(var, a, N) + + do i= 1, N + a = MOD(a + int_var(i), mod_adler) + b = MOD(b+a, mod_adler) + end do + + hash = ior(b * 65536, a) + + end function chksum_real + + end module print_var_chksum + + module GFS_diagtoscreen + + use print_var_chksum, only: print_var + + implicit none - integer, parameter :: KSTART = 1 - integer, parameter :: KEND = 9999999 + private + + public GFS_diagtoscreen_init, GFS_diagtoscreen_run, GFS_diagtoscreen_finalize contains @@ -117,405 +393,407 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, do impi=0,mpisize-1 do iomp=0,ompsize-1 if (mpirank==impi .and. omprank==iomp) then - call print_var(mpirank,omprank, blkno, 'Model%kdt' , Model%kdt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Model%kdt' , Model%kdt) ! Sfcprop - call print_var(mpirank,omprank, blkno, 'Sfcprop%slmsk' , Sfcprop%slmsk) - call print_var(mpirank,omprank, blkno, 'Sfcprop%oceanfrac', Sfcprop%oceanfrac) - call print_var(mpirank,omprank, blkno, 'Sfcprop%landfrac' , Sfcprop%landfrac) - call print_var(mpirank,omprank, blkno, 'Sfcprop%lakefrac' , Sfcprop%lakefrac) - call print_var(mpirank,omprank, blkno, 'Sfcprop%tsfc' , Sfcprop%tsfc) - call print_var(mpirank,omprank, blkno, 'Sfcprop%tsfco' , Sfcprop%tsfco) - call print_var(mpirank,omprank, blkno, 'Sfcprop%tsfcl' , Sfcprop%tsfcl) - call print_var(mpirank,omprank, blkno, 'Sfcprop%tisfc' , Sfcprop%tisfc) - call print_var(mpirank,omprank, blkno, 'Sfcprop%snowd' , Sfcprop%snowd) - call print_var(mpirank,omprank, blkno, 'Sfcprop%zorl' , Sfcprop%zorl) - call print_var(mpirank,omprank, blkno, 'Sfcprop%zorlo' , Sfcprop%zorlo) - call print_var(mpirank,omprank, blkno, 'Sfcprop%zorll' , Sfcprop%zorll) - call print_var(mpirank,omprank, blkno, 'Sfcprop%fice' , Sfcprop%fice) - call print_var(mpirank,omprank, blkno, 'Sfcprop%hprime' , Sfcprop%hprime) - call print_var(mpirank,omprank, blkno, 'Sfcprop%sncovr' , Sfcprop%sncovr) - call print_var(mpirank,omprank, blkno, 'Sfcprop%snoalb' , Sfcprop%snoalb) - call print_var(mpirank,omprank, blkno, 'Sfcprop%alvsf' , Sfcprop%alvsf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%alnsf' , Sfcprop%alnsf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%alvwf' , Sfcprop%alvwf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%alnwf' , Sfcprop%alnwf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%facsf' , Sfcprop%facsf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%facwf' , Sfcprop%facwf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%slope' , Sfcprop%slope) - call print_var(mpirank,omprank, blkno, 'Sfcprop%shdmin' , Sfcprop%shdmin) - call print_var(mpirank,omprank, blkno, 'Sfcprop%shdmax' , Sfcprop%shdmax) - call print_var(mpirank,omprank, blkno, 'Sfcprop%tg3' , Sfcprop%tg3) - call print_var(mpirank,omprank, blkno, 'Sfcprop%vfrac' , Sfcprop%vfrac) - call print_var(mpirank,omprank, blkno, 'Sfcprop%vtype' , Sfcprop%vtype) - call print_var(mpirank,omprank, blkno, 'Sfcprop%stype' , Sfcprop%stype) - call print_var(mpirank,omprank, blkno, 'Sfcprop%uustar' , Sfcprop%uustar) - call print_var(mpirank,omprank, blkno, 'Sfcprop%oro' , Sfcprop%oro) - call print_var(mpirank,omprank, blkno, 'Sfcprop%oro_uf' , Sfcprop%oro_uf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%hice' , Sfcprop%hice) - call print_var(mpirank,omprank, blkno, 'Sfcprop%weasd' , Sfcprop%weasd) - call print_var(mpirank,omprank, blkno, 'Sfcprop%canopy' , Sfcprop%canopy) - call print_var(mpirank,omprank, blkno, 'Sfcprop%ffmm' , Sfcprop%ffmm) - call print_var(mpirank,omprank, blkno, 'Sfcprop%ffhh' , Sfcprop%ffhh) - call print_var(mpirank,omprank, blkno, 'Sfcprop%f10m' , Sfcprop%f10m) - call print_var(mpirank,omprank, blkno, 'Sfcprop%tprcp' , Sfcprop%tprcp) - call print_var(mpirank,omprank, blkno, 'Sfcprop%srflag' , Sfcprop%srflag) - call print_var(mpirank,omprank, blkno, 'Sfcprop%slc' , Sfcprop%slc) - call print_var(mpirank,omprank, blkno, 'Sfcprop%smc' , Sfcprop%smc) - call print_var(mpirank,omprank, blkno, 'Sfcprop%stc' , Sfcprop%stc) - call print_var(mpirank,omprank, blkno, 'Sfcprop%t2m' , Sfcprop%t2m) - call print_var(mpirank,omprank, blkno, 'Sfcprop%q2m' , Sfcprop%q2m) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%slmsk' , Sfcprop%slmsk) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%oceanfrac', Sfcprop%oceanfrac) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%landfrac' , Sfcprop%landfrac) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%lakefrac' , Sfcprop%lakefrac) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsfc' , Sfcprop%tsfc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsfco' , Sfcprop%tsfco) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsfcl' , Sfcprop%tsfcl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tisfc' , Sfcprop%tisfc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowd' , Sfcprop%snowd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorl' , Sfcprop%zorl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorlo' , Sfcprop%zorlo) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorll' , Sfcprop%zorll) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%fice' , Sfcprop%fice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%hprime' , Sfcprop%hprime) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sncovr' , Sfcprop%sncovr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snoalb' , Sfcprop%snoalb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%alvsf' , Sfcprop%alvsf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%alnsf' , Sfcprop%alnsf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%alvwf' , Sfcprop%alvwf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%alnwf' , Sfcprop%alnwf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%facsf' , Sfcprop%facsf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%facwf' , Sfcprop%facwf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%slope' , Sfcprop%slope) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%shdmin' , Sfcprop%shdmin) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%shdmax' , Sfcprop%shdmax) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tg3' , Sfcprop%tg3) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%vfrac' , Sfcprop%vfrac) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%vtype' , Sfcprop%vtype) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%stype' , Sfcprop%stype) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%uustar' , Sfcprop%uustar) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%oro' , Sfcprop%oro) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%oro_uf' , Sfcprop%oro_uf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%hice' , Sfcprop%hice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%weasd' , Sfcprop%weasd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%canopy' , Sfcprop%canopy) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%ffmm' , Sfcprop%ffmm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%ffhh' , Sfcprop%ffhh) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%f10m' , Sfcprop%f10m) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tprcp' , Sfcprop%tprcp) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%srflag' , Sfcprop%srflag) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%slc' , Sfcprop%slc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%smc' , Sfcprop%smc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%stc' , Sfcprop%stc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%t2m' , Sfcprop%t2m) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%q2m' , Sfcprop%q2m) if (Model%nstf_name(1)>0) then - call print_var(mpirank,omprank, blkno, 'Sfcprop%tref ', Sfcprop%tref) - call print_var(mpirank,omprank, blkno, 'Sfcprop%z_c ', Sfcprop%z_c) - call print_var(mpirank,omprank, blkno, 'Sfcprop%c_0 ', Sfcprop%c_0) - call print_var(mpirank,omprank, blkno, 'Sfcprop%c_d ', Sfcprop%c_d) - call print_var(mpirank,omprank, blkno, 'Sfcprop%w_0 ', Sfcprop%w_0) - call print_var(mpirank,omprank, blkno, 'Sfcprop%w_d ', Sfcprop%w_d) - call print_var(mpirank,omprank, blkno, 'Sfcprop%xt ', Sfcprop%xt) - call print_var(mpirank,omprank, blkno, 'Sfcprop%xs ', Sfcprop%xs) - call print_var(mpirank,omprank, blkno, 'Sfcprop%xu ', Sfcprop%xu) - call print_var(mpirank,omprank, blkno, 'Sfcprop%xv ', Sfcprop%xv) - call print_var(mpirank,omprank, blkno, 'Sfcprop%xz ', Sfcprop%xz) - call print_var(mpirank,omprank, blkno, 'Sfcprop%zm ', Sfcprop%zm) - call print_var(mpirank,omprank, blkno, 'Sfcprop%xtts ', Sfcprop%xtts) - call print_var(mpirank,omprank, blkno, 'Sfcprop%xzts ', Sfcprop%xzts) - call print_var(mpirank,omprank, blkno, 'Sfcprop%d_conv ', Sfcprop%d_conv) - call print_var(mpirank,omprank, blkno, 'Sfcprop%ifd ', Sfcprop%ifd) - call print_var(mpirank,omprank, blkno, 'Sfcprop%dt_cool ', Sfcprop%dt_cool) - call print_var(mpirank,omprank, blkno, 'Sfcprop%qrain ', Sfcprop%qrain) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tref ', Sfcprop%tref) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%z_c ', Sfcprop%z_c) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%c_0 ', Sfcprop%c_0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%c_d ', Sfcprop%c_d) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%w_0 ', Sfcprop%w_0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%w_d ', Sfcprop%w_d) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xt ', Sfcprop%xt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xs ', Sfcprop%xs) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xu ', Sfcprop%xu) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xv ', Sfcprop%xv) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xz ', Sfcprop%xz) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zm ', Sfcprop%zm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xtts ', Sfcprop%xtts) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xzts ', Sfcprop%xzts) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%d_conv ', Sfcprop%d_conv) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%ifd ', Sfcprop%ifd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%dt_cool ', Sfcprop%dt_cool) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qrain ', Sfcprop%qrain) end if ! CCPP/RUC only if (Model%lsm == Model%lsm_ruc) then - call print_var(mpirank,omprank, blkno, 'Sfcprop%sh2o', Sfcprop%sh2o) - call print_var(mpirank,omprank, blkno, 'Sfcprop%smois', Sfcprop%smois) - call print_var(mpirank,omprank, blkno, 'Sfcprop%tslb', Sfcprop%tslb) - call print_var(mpirank,omprank, blkno, 'Sfcprop%zs', Sfcprop%zs) - call print_var(mpirank,omprank, blkno, 'Sfcprop%clw_surf', Sfcprop%clw_surf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%qwv_surf', Sfcprop%qwv_surf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%cndm_surf', Sfcprop%cndm_surf) - call print_var(mpirank,omprank, blkno, 'Sfcprop%flag_frsoil', Sfcprop%flag_frsoil) - call print_var(mpirank,omprank, blkno, 'Sfcprop%rhofr', Sfcprop%rhofr) - call print_var(mpirank,omprank, blkno, 'Sfcprop%tsnow', Sfcprop%tsnow) - call print_var(mpirank,omprank, blkno, 'Sfcprop%snowfallac ', Sfcprop%snowfallac) - call print_var(mpirank,omprank, blkno, 'Sfcprop%acsnow ', Sfcprop%acsnow) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sh2o', Sfcprop%sh2o) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%smois', Sfcprop%smois) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tslb', Sfcprop%tslb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zs', Sfcprop%zs) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf', Sfcprop%clw_surf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf', Sfcprop%qwv_surf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%cndm_surf', Sfcprop%cndm_surf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%flag_frsoil', Sfcprop%flag_frsoil) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%rhofr', Sfcprop%rhofr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow', Sfcprop%tsnow) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac ', Sfcprop%snowfallac) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%acsnow ', Sfcprop%acsnow) end if ! Radtend - call print_var(mpirank,omprank, blkno, 'Radtend%sfcfsw%upfxc', Radtend%sfcfsw(:)%upfxc) - call print_var(mpirank,omprank, blkno, 'Radtend%sfcfsw%dnfxc', Radtend%sfcfsw(:)%dnfxc) - call print_var(mpirank,omprank, blkno, 'Radtend%sfcfsw%upfx0', Radtend%sfcfsw(:)%upfx0) - call print_var(mpirank,omprank, blkno, 'Radtend%sfcfsw%dnfx0', Radtend%sfcfsw(:)%dnfx0) - call print_var(mpirank,omprank, blkno, 'Radtend%sfcflw%upfxc', Radtend%sfcflw(:)%upfxc) - call print_var(mpirank,omprank, blkno, 'Radtend%sfcflw%upfx0', Radtend%sfcflw(:)%upfx0) - call print_var(mpirank,omprank, blkno, 'Radtend%sfcflw%dnfxc', Radtend%sfcflw(:)%dnfxc) - call print_var(mpirank,omprank, blkno, 'Radtend%sfcflw%dnfx0', Radtend%sfcflw(:)%dnfx0) - call print_var(mpirank,omprank, blkno, 'Radtend%htrsw', Radtend%htrsw) - call print_var(mpirank,omprank, blkno, 'Radtend%htrlw', Radtend%htrlw) - call print_var(mpirank,omprank, blkno, 'Radtend%sfalb', Radtend%sfalb) - call print_var(mpirank,omprank, blkno, 'Radtend%coszen', Radtend%coszen) - call print_var(mpirank,omprank, blkno, 'Radtend%tsflw', Radtend%tsflw) - call print_var(mpirank,omprank, blkno, 'Radtend%semis', Radtend%semis) - call print_var(mpirank,omprank, blkno, 'Radtend%coszdg', Radtend%coszdg) - call print_var(mpirank,omprank, blkno, 'Radtend%swhc', Radtend%swhc) - call print_var(mpirank,omprank, blkno, 'Radtend%lwhc', Radtend%lwhc) - call print_var(mpirank,omprank, blkno, 'Radtend%lwhd', Radtend%lwhd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%upfxc', Radtend%sfcfsw(:)%upfxc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%dnfxc', Radtend%sfcfsw(:)%dnfxc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%upfx0', Radtend%sfcfsw(:)%upfx0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%dnfx0', Radtend%sfcfsw(:)%dnfx0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcflw%upfxc', Radtend%sfcflw(:)%upfxc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcflw%upfx0', Radtend%sfcflw(:)%upfx0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcflw%dnfxc', Radtend%sfcflw(:)%dnfxc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcflw%dnfx0', Radtend%sfcflw(:)%dnfx0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%htrsw', Radtend%htrsw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%htrlw', Radtend%htrlw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfalb', Radtend%sfalb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%coszen', Radtend%coszen) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%tsflw', Radtend%tsflw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%semis', Radtend%semis) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%coszdg', Radtend%coszdg) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%swhc', Radtend%swhc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%lwhc', Radtend%lwhc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%lwhd', Radtend%lwhd) ! Tbd - call print_var(mpirank,omprank, blkno, 'Tbd%icsdsw' , Tbd%icsdsw) - call print_var(mpirank,omprank, blkno, 'Tbd%icsdlw' , Tbd%icsdlw) - call print_var(mpirank,omprank, blkno, 'Tbd%ozpl' , Tbd%ozpl) - call print_var(mpirank,omprank, blkno, 'Tbd%h2opl' , Tbd%h2opl) - call print_var(mpirank,omprank, blkno, 'Tbd%rann' , Tbd%rann) - call print_var(mpirank,omprank, blkno, 'Tbd%acv' , Tbd%acv) - call print_var(mpirank,omprank, blkno, 'Tbd%acvb' , Tbd%acvb) - call print_var(mpirank,omprank, blkno, 'Tbd%acvt' , Tbd%acvt) - call print_var(mpirank,omprank, blkno, 'Tbd%hpbl' , Tbd%hpbl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%icsdsw' , Tbd%icsdsw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%icsdlw' , Tbd%icsdlw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%ozpl' , Tbd%ozpl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%h2opl' , Tbd%h2opl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%rann' , Tbd%rann) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%acv' , Tbd%acv) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%acvb' , Tbd%acvb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%acvt' , Tbd%acvt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%hpbl' , Tbd%hpbl) if (Model%do_sppt) then - call print_var(mpirank,omprank, blkno, 'Tbd%dtdtr' , Tbd%dtdtr) - call print_var(mpirank,omprank, blkno, 'Tbd%dtotprcp' , Tbd%dtotprcp) - call print_var(mpirank,omprank, blkno, 'Tbd%dcnvprcp' , Tbd%dcnvprcp) - call print_var(mpirank,omprank, blkno, 'Tbd%drain_cpl' , Tbd%drain_cpl) - call print_var(mpirank,omprank, blkno, 'Tbd%dsnow_cpl' , Tbd%dsnow_cpl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtdtr' , Tbd%dtdtr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtotprcp' , Tbd%dtotprcp) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dcnvprcp' , Tbd%dcnvprcp) + end if + if (Model%cplflx .or. Model%cplchm) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%drain_cpl' , Tbd%drain_cpl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dsnow_cpl' , Tbd%dsnow_cpl) end if if (Model%nctp > 0 .and. Model%cscnv) then - call print_var(mpirank,omprank, blkno, 'Tbd%phy_fctd' , Tbd%phy_fctd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%phy_fctd' , Tbd%phy_fctd) end if - call print_var(mpirank,omprank, blkno, 'Tbd%phy_f2d' , Tbd%phy_f2d) - call print_var(mpirank,omprank, blkno, 'Tbd%phy_f3d' , Tbd%phy_f3d) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%phy_f2d' , Tbd%phy_f2d) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%phy_f3d' , Tbd%phy_f3d) do n=1,size(Tbd%phy_f3d(1,1,:)) - call print_var(mpirank,omprank, blkno, 'Tbd%phy_f3d_n' , Tbd%phy_f3d(:,:,n)) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%phy_f3d_n' , Tbd%phy_f3d(:,:,n)) end do - call print_var(mpirank,omprank, blkno, 'Tbd%in_nm' , Tbd%in_nm) - call print_var(mpirank,omprank, blkno, 'Tbd%ccn_nm' , Tbd%ccn_nm) - call print_var(mpirank,omprank, blkno, 'Tbd%aer_nm' , Tbd%aer_nm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%in_nm' , Tbd%in_nm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%ccn_nm' , Tbd%ccn_nm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%aer_nm' , Tbd%aer_nm) ! Diag - !call print_var(mpirank,omprank, blkno, 'Diag%fluxr ', Diag%fluxr) + !call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%fluxr ', Diag%fluxr) !do n=1,size(Diag%fluxr(1,:)) - ! call print_var(mpirank,omprank, blkno, 'Diag%fluxr_n ', Diag%fluxr(:,n)) + ! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%fluxr_n ', Diag%fluxr(:,n)) !end do - call print_var(mpirank,omprank, blkno, 'Diag%srunoff ', Diag%srunoff) - call print_var(mpirank,omprank, blkno, 'Diag%evbsa ', Diag%evbsa) - call print_var(mpirank,omprank, blkno, 'Diag%evcwa ', Diag%evcwa) - call print_var(mpirank,omprank, blkno, 'Diag%snohfa ', Diag%snohfa) - call print_var(mpirank,omprank, blkno, 'Diag%transa ', Diag%transa) - call print_var(mpirank,omprank, blkno, 'Diag%sbsnoa ', Diag%sbsnoa) - call print_var(mpirank,omprank, blkno, 'Diag%snowca ', Diag%snowca) - call print_var(mpirank,omprank, blkno, 'Diag%soilm ', Diag%soilm) - call print_var(mpirank,omprank, blkno, 'Diag%tmpmin ', Diag%tmpmin) - call print_var(mpirank,omprank, blkno, 'Diag%tmpmax ', Diag%tmpmax) - call print_var(mpirank,omprank, blkno, 'Diag%dusfc ', Diag%dusfc) - call print_var(mpirank,omprank, blkno, 'Diag%dvsfc ', Diag%dvsfc) - call print_var(mpirank,omprank, blkno, 'Diag%dtsfc ', Diag%dtsfc) - call print_var(mpirank,omprank, blkno, 'Diag%dqsfc ', Diag%dqsfc) - call print_var(mpirank,omprank, blkno, 'Diag%totprcp ', Diag%totprcp) - call print_var(mpirank,omprank, blkno, 'Diag%totice ', Diag%totice) - call print_var(mpirank,omprank, blkno, 'Diag%totsnw ', Diag%totsnw) - call print_var(mpirank,omprank, blkno, 'Diag%totgrp ', Diag%totgrp) - call print_var(mpirank,omprank, blkno, 'Diag%totprcpb ', Diag%totprcpb) - call print_var(mpirank,omprank, blkno, 'Diag%toticeb ', Diag%toticeb) - call print_var(mpirank,omprank, blkno, 'Diag%totsnwb ', Diag%totsnwb) - call print_var(mpirank,omprank, blkno, 'Diag%totgrpb ', Diag%totgrpb) - call print_var(mpirank,omprank, blkno, 'Diag%suntim ', Diag%suntim) - call print_var(mpirank,omprank, blkno, 'Diag%runoff ', Diag%runoff) - call print_var(mpirank,omprank, blkno, 'Diag%ep ', Diag%ep) - call print_var(mpirank,omprank, blkno, 'Diag%cldwrk ', Diag%cldwrk) - call print_var(mpirank,omprank, blkno, 'Diag%dugwd ', Diag%dugwd) - call print_var(mpirank,omprank, blkno, 'Diag%dvgwd ', Diag%dvgwd) - call print_var(mpirank,omprank, blkno, 'Diag%psmean ', Diag%psmean) - call print_var(mpirank,omprank, blkno, 'Diag%cnvprcp ', Diag%cnvprcp) - call print_var(mpirank,omprank, blkno, 'Diag%cnvprcpb ', Diag%cnvprcpb) - call print_var(mpirank,omprank, blkno, 'Diag%spfhmin ', Diag%spfhmin) - call print_var(mpirank,omprank, blkno, 'Diag%spfhmax ', Diag%spfhmax) - call print_var(mpirank,omprank, blkno, 'Diag%u10mmax ', Diag%u10mmax) - call print_var(mpirank,omprank, blkno, 'Diag%v10mmax ', Diag%v10mmax) - call print_var(mpirank,omprank, blkno, 'Diag%wind10mmax ', Diag%wind10mmax) - call print_var(mpirank,omprank, blkno, 'Diag%rain ', Diag%rain) - call print_var(mpirank,omprank, blkno, 'Diag%rainc ', Diag%rainc) - call print_var(mpirank,omprank, blkno, 'Diag%ice ', Diag%ice) - call print_var(mpirank,omprank, blkno, 'Diag%snow ', Diag%snow) - call print_var(mpirank,omprank, blkno, 'Diag%graupel ', Diag%graupel) - call print_var(mpirank,omprank, blkno, 'Diag%u10m ', Diag%u10m) - call print_var(mpirank,omprank, blkno, 'Diag%v10m ', Diag%v10m) - call print_var(mpirank,omprank, blkno, 'Diag%dpt2m ', Diag%dpt2m) - call print_var(mpirank,omprank, blkno, 'Diag%zlvl ', Diag%zlvl) - call print_var(mpirank,omprank, blkno, 'Diag%psurf ', Diag%psurf) - call print_var(mpirank,omprank, blkno, 'Diag%pwat ', Diag%pwat) - call print_var(mpirank,omprank, blkno, 'Diag%t1 ', Diag%t1) - call print_var(mpirank,omprank, blkno, 'Diag%q1 ', Diag%q1) - call print_var(mpirank,omprank, blkno, 'Diag%u1 ', Diag%u1) - call print_var(mpirank,omprank, blkno, 'Diag%v1 ', Diag%v1) - call print_var(mpirank,omprank, blkno, 'Diag%chh ', Diag%chh) - call print_var(mpirank,omprank, blkno, 'Diag%cmm ', Diag%cmm) - call print_var(mpirank,omprank, blkno, 'Diag%epi ', Diag%epi) - call print_var(mpirank,omprank, blkno, 'Diag%smcwlt2 ', Diag%smcwlt2) - call print_var(mpirank,omprank, blkno, 'Diag%smcref2 ', Diag%smcref2) - call print_var(mpirank,omprank, blkno, 'Diag%sr ', Diag%sr) - call print_var(mpirank,omprank, blkno, 'Diag%tdomr ', Diag%tdomr) - call print_var(mpirank,omprank, blkno, 'Diag%tdomzr ', Diag%tdomzr) - call print_var(mpirank,omprank, blkno, 'Diag%tdomip ', Diag%tdomip) - call print_var(mpirank,omprank, blkno, 'Diag%tdoms ', Diag%tdoms) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%srunoff ', Diag%srunoff) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%evbsa ', Diag%evbsa) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%evcwa ', Diag%evcwa) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%snohfa ', Diag%snohfa) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%transa ', Diag%transa) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sbsnoa ', Diag%sbsnoa) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%snowca ', Diag%snowca) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%soilm ', Diag%soilm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tmpmin ', Diag%tmpmin) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tmpmax ', Diag%tmpmax) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dusfc ', Diag%dusfc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvsfc ', Diag%dvsfc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dtsfc ', Diag%dtsfc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dqsfc ', Diag%dqsfc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totprcp ', Diag%totprcp) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totice ', Diag%totice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totsnw ', Diag%totsnw) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totgrp ', Diag%totgrp) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totprcpb ', Diag%totprcpb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%toticeb ', Diag%toticeb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totsnwb ', Diag%totsnwb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totgrpb ', Diag%totgrpb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%suntim ', Diag%suntim) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%runoff ', Diag%runoff) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ep ', Diag%ep) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cldwrk ', Diag%cldwrk) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dugwd ', Diag%dugwd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvgwd ', Diag%dvgwd) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%psmean ', Diag%psmean) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cnvprcp ', Diag%cnvprcp) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cnvprcpb ', Diag%cnvprcpb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%spfhmin ', Diag%spfhmin) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%spfhmax ', Diag%spfhmax) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%u10mmax ', Diag%u10mmax) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%v10mmax ', Diag%v10mmax) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%wind10mmax ', Diag%wind10mmax) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%rain ', Diag%rain) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%rainc ', Diag%rainc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ice ', Diag%ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%snow ', Diag%snow) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%graupel ', Diag%graupel) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%u10m ', Diag%u10m) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%v10m ', Diag%v10m) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dpt2m ', Diag%dpt2m) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%zlvl ', Diag%zlvl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%psurf ', Diag%psurf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%pwat ', Diag%pwat) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%t1 ', Diag%t1) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%q1 ', Diag%q1) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%u1 ', Diag%u1) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%v1 ', Diag%v1) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%chh ', Diag%chh) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cmm ', Diag%cmm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%epi ', Diag%epi) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%smcwlt2 ', Diag%smcwlt2) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%smcref2 ', Diag%smcref2) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sr ', Diag%sr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tdomr ', Diag%tdomr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tdomzr ', Diag%tdomzr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tdomip ', Diag%tdomip) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tdoms ', Diag%tdoms) ! CCPP/RUC only if (Model%lsm == Model%lsm_ruc) then - call print_var(mpirank,omprank, blkno, 'Diag%wet1 ', Sfcprop%wetness) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%wet1 ', Sfcprop%wetness) else - call print_var(mpirank,omprank, blkno, 'Diag%wet1 ', Diag%wet1) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%wet1 ', Diag%wet1) end if - call print_var(mpirank,omprank, blkno, 'Diag%skebu_wts ', Diag%skebu_wts) - call print_var(mpirank,omprank, blkno, 'Diag%skebv_wts ', Diag%skebv_wts) - call print_var(mpirank,omprank, blkno, 'Diag%sppt_wts ', Diag%sppt_wts) - call print_var(mpirank,omprank, blkno, 'Diag%shum_wts ', Diag%shum_wts) - call print_var(mpirank,omprank, blkno, 'Diag%zmtnblck ', Diag%zmtnblck) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%skebu_wts ', Diag%skebu_wts) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%skebv_wts ', Diag%skebv_wts) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sppt_wts ', Diag%sppt_wts) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%shum_wts ', Diag%shum_wts) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%zmtnblck ', Diag%zmtnblck) if (Model%ldiag3d) then - call print_var(mpirank,omprank, blkno, 'Diag%du3dt ', Diag%du3dt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du3dt ', Diag%du3dt) do n=1,size(Diag%du3dt(1,1,:)) - call print_var(mpirank,omprank, blkno, 'Diag%du3dt_n ', Diag%du3dt(:,:,n)) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du3dt_n ', Diag%du3dt(:,:,n)) end do - call print_var(mpirank,omprank, blkno, 'Diag%dv3dt ', Diag%dv3dt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv3dt ', Diag%dv3dt) do n=1,size(Diag%dv3dt(1,1,:)) - call print_var(mpirank,omprank, blkno, 'Diag%dv3dt_n ', Diag%dv3dt(:,:,n)) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv3dt_n ', Diag%dv3dt(:,:,n)) end do - call print_var(mpirank,omprank, blkno, 'Diag%dt3dt ', Diag%dt3dt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dt3dt ', Diag%dt3dt) do n=1,size(Diag%dt3dt(1,1,:)) - call print_var(mpirank,omprank, blkno, 'Diag%dt3dt_n ', Diag%dt3dt(:,:,n)) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dt3dt_n ', Diag%dt3dt(:,:,n)) end do - call print_var(mpirank,omprank, blkno, 'Diag%dq3dt ', Diag%dq3dt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dq3dt ', Diag%dq3dt) do n=1,size(Diag%dq3dt(1,1,:)) - call print_var(mpirank,omprank, blkno, 'Diag%dq3dt_n ', Diag%dq3dt(:,:,n)) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dq3dt_n ', Diag%dq3dt(:,:,n)) end do - call print_var(mpirank,omprank, blkno, 'Diag%upd_mf ', Diag%upd_mf) - call print_var(mpirank,omprank, blkno, 'Diag%dwn_mf ', Diag%dwn_mf) - call print_var(mpirank,omprank, blkno, 'Diag%det_mf ', Diag%det_mf) - call print_var(mpirank,omprank, blkno, 'Diag%cldcov ', Diag%cldcov) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%upd_mf ', Diag%upd_mf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dwn_mf ', Diag%dwn_mf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_mf ', Diag%det_mf) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cldcov ', Diag%cldcov) end if if(Model%lradar) then - call print_var(mpirank,omprank, blkno, 'Diag%refl_10cm ', Diag%refl_10cm) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%refl_10cm ', Diag%refl_10cm) end if ! CCPP/MYNNPBL only if (Model%do_mynnedmf) then if (Model%bl_mynn_output .ne. 0) then - call print_var(mpirank,omprank, blkno, 'Diag%edmf_a ', Diag%edmf_a) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_w ', Diag%edmf_w) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_qt ', Diag%edmf_qt) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_thl ', Diag%edmf_thl) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_ent ', Diag%edmf_ent) - call print_var(mpirank,omprank, blkno, 'Diag%edmf_qc ', Diag%edmf_qc) - call print_var(mpirank,omprank, blkno, 'Diag%sub_thl ', Diag%sub_thl) - call print_var(mpirank,omprank, blkno, 'Diag%sub_sqv ', Diag%sub_sqv) - call print_var(mpirank,omprank, blkno, 'Diag%det_thl ', Diag%det_thl) - call print_var(mpirank,omprank, blkno, 'Diag%det_sqv ', Diag%det_sqv) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_a ', Diag%edmf_a) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_w ', Diag%edmf_w) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_qt ', Diag%edmf_qt) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_thl ', Diag%edmf_thl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_ent ', Diag%edmf_ent) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_qc ', Diag%edmf_qc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sub_thl ', Diag%sub_thl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sub_sqv ', Diag%sub_sqv) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_thl ', Diag%det_thl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_sqv ', Diag%det_sqv) end if - call print_var(mpirank,omprank, blkno, 'Diag%nupdraft ', Diag%nupdraft) - call print_var(mpirank,omprank, blkno, 'Diag%maxMF ', Diag%maxMF) - call print_var(mpirank,omprank, blkno, 'Diag%ktop_plume ', Diag%ktop_plume) - call print_var(mpirank,omprank, blkno, 'Diag%exch_h ', Diag%exch_h) - call print_var(mpirank,omprank, blkno, 'Diag%exch_m ', Diag%exch_m) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%nupdraft ', Diag%nupdraft) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%maxMF ', Diag%maxMF) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ktop_plume ', Diag%ktop_plume) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_h ', Diag%exch_h) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_m ', Diag%exch_m) end if ! Statein - call print_var(mpirank,omprank, blkno, 'Statein%phii' , Statein%phii) - call print_var(mpirank,omprank, blkno, 'Statein%prsi' , Statein%prsi) - call print_var(mpirank,omprank, blkno, 'Statein%prsik' , Statein%prsik) - call print_var(mpirank,omprank, blkno, 'Statein%phil' , Statein%phil) - call print_var(mpirank,omprank, blkno, 'Statein%prsl' , Statein%prsl) - call print_var(mpirank,omprank, blkno, 'Statein%prslk' , Statein%prslk) - call print_var(mpirank,omprank, blkno, 'Statein%pgr' , Statein%pgr) - call print_var(mpirank,omprank, blkno, 'Statein%ugrs' , Statein%ugrs) - call print_var(mpirank,omprank, blkno, 'Statein%vgrs' , Statein%vgrs) - call print_var(mpirank,omprank, blkno, 'Statein%vvl' , Statein%vvl) - call print_var(mpirank,omprank, blkno, 'Statein%tgrs' , Statein%tgrs) - call print_var(mpirank,omprank, blkno, 'Statein%qgrs' , Statein%qgrs) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%phii' , Statein%phii) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prsi' , Statein%prsi) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prsik' , Statein%prsik) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%phil' , Statein%phil) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prsl' , Statein%prsl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prslk' , Statein%prslk) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%pgr' , Statein%pgr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%ugrs' , Statein%ugrs) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%vgrs' , Statein%vgrs) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%vvl' , Statein%vvl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%tgrs' , Statein%tgrs) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%qgrs' , Statein%qgrs) do n=1,size(Statein%qgrs(1,1,:)) - call print_var(mpirank,omprank, blkno, 'Statein%qgrs_n', Statein%qgrs(:,:,n)) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%qgrs_n', Statein%qgrs(:,:,n)) end do - call print_var(mpirank,omprank, blkno, 'Statein%diss_est', Statein%diss_est) - call print_var(mpirank,omprank, blkno, 'Statein%smc' , Statein%smc) - call print_var(mpirank,omprank, blkno, 'Statein%stc' , Statein%stc) - call print_var(mpirank,omprank, blkno, 'Statein%slc' , Statein%slc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%diss_est', Statein%diss_est) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%smc' , Statein%smc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%stc' , Statein%stc) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%slc' , Statein%slc) ! Stateout - call print_var(mpirank,omprank, blkno, 'Stateout%gu0', Stateout%gu0) - call print_var(mpirank,omprank, blkno, 'Stateout%gv0', Stateout%gv0) - call print_var(mpirank,omprank, blkno, 'Stateout%gt0', Stateout%gt0) - call print_var(mpirank,omprank, blkno, 'Stateout%gq0', Stateout%gq0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gu0', Stateout%gu0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gv0', Stateout%gv0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gt0', Stateout%gt0) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gq0', Stateout%gq0) do n=1,size(Stateout%gq0(1,1,:)) - call print_var(mpirank,omprank, blkno, 'Stateout%gq0_n', Stateout%gq0(:,:,n)) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gq0_n', Stateout%gq0(:,:,n)) end do ! Coupling - call print_var(mpirank,omprank, blkno, 'Coupling%nirbmdi', Coupling%nirbmdi) - call print_var(mpirank,omprank, blkno, 'Coupling%nirdfdi', Coupling%nirdfdi) - call print_var(mpirank,omprank, blkno, 'Coupling%visbmdi', Coupling%visbmdi) - call print_var(mpirank,omprank, blkno, 'Coupling%visdfdi', Coupling%visdfdi) - call print_var(mpirank,omprank, blkno, 'Coupling%nirbmui', Coupling%nirbmui) - call print_var(mpirank,omprank, blkno, 'Coupling%nirdfui', Coupling%nirdfui) - call print_var(mpirank,omprank, blkno, 'Coupling%visbmui', Coupling%visbmui) - call print_var(mpirank,omprank, blkno, 'Coupling%visdfui', Coupling%visdfui) - call print_var(mpirank,omprank, blkno, 'Coupling%sfcdsw ', Coupling%sfcdsw ) - call print_var(mpirank,omprank, blkno, 'Coupling%sfcnsw ', Coupling%sfcnsw ) - call print_var(mpirank,omprank, blkno, 'Coupling%sfcdlw ', Coupling%sfcdlw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nirbmdi', Coupling%nirbmdi) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nirdfdi', Coupling%nirdfdi) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%visbmdi', Coupling%visbmdi) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%visdfdi', Coupling%visdfdi) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nirbmui', Coupling%nirbmui) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nirdfui', Coupling%nirdfui) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%visbmui', Coupling%visbmui) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%visdfui', Coupling%visdfui) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sfcdsw ', Coupling%sfcdsw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sfcnsw ', Coupling%sfcnsw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sfcdlw ', Coupling%sfcdlw ) if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm) then - call print_var(mpirank,omprank, blkno, 'Coupling%rain_cpl', Coupling%rain_cpl) - call print_var(mpirank,omprank, blkno, 'Coupling%snow_cpl', Coupling%snow_cpl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%rain_cpl', Coupling%rain_cpl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%snow_cpl', Coupling%snow_cpl) end if ! if (Model%cplwav2atm) then -! call print_var(mpirank,omprank, blkno, 'Coupling%zorlwav_cpl' , Coupling%zorlwav_cpl ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%zorlwav_cpl' , Coupling%zorlwav_cpl ) ! end if if (Model%cplflx) then - call print_var(mpirank,omprank, blkno, 'Coupling%oro_cpl' , Coupling%oro_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%slmsk_cpl' , Coupling%slmsk_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%slimskin_cpl', Coupling%slimskin_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dusfcin_cpl ', Coupling%dusfcin_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dvsfcin_cpl ', Coupling%dvsfcin_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dtsfcin_cpl ', Coupling%dtsfcin_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dqsfcin_cpl ', Coupling%dqsfcin_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%ulwsfcin_cpl', Coupling%ulwsfcin_cpl ) -! call print_var(mpirank,omprank, blkno, 'Coupling%tseain_cpl ', Coupling%tseain_cpl ) -! call print_var(mpirank,omprank, blkno, 'Coupling%tisfcin_cpl ', Coupling%tisfcin_cpl ) -! call print_var(mpirank,omprank, blkno, 'Coupling%ficein_cpl ', Coupling%ficein_cpl ) -! call print_var(mpirank,omprank, blkno, 'Coupling%hicein_cpl ', Coupling%hicein_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%hsnoin_cpl ', Coupling%hsnoin_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dusfc_cpl ', Coupling%dusfc_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dvsfc_cpl ', Coupling%dvsfc_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dtsfc_cpl ', Coupling%dtsfc_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dqsfc_cpl ', Coupling%dqsfc_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dlwsfc_cpl ', Coupling%dlwsfc_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dswsfc_cpl ', Coupling%dswsfc_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dnirbm_cpl ', Coupling%dnirbm_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dnirdf_cpl ', Coupling%dnirdf_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dvisbm_cpl ', Coupling%dvisbm_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dvisdf_cpl ', Coupling%dvisdf_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nlwsfc_cpl ', Coupling%nlwsfc_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nswsfc_cpl ', Coupling%nswsfc_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nnirbm_cpl ', Coupling%nnirbm_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nnirdf_cpl ', Coupling%nnirdf_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nvisbm_cpl ', Coupling%nvisbm_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nvisdf_cpl ', Coupling%nvisdf_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dusfci_cpl ', Coupling%dusfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dvsfci_cpl ', Coupling%dvsfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dtsfci_cpl ', Coupling%dtsfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dqsfci_cpl ', Coupling%dqsfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dlwsfci_cpl ', Coupling%dlwsfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dswsfci_cpl ', Coupling%dswsfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dnirbmi_cpl ', Coupling%dnirbmi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dnirdfi_cpl ', Coupling%dnirdfi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dvisbmi_cpl ', Coupling%dvisbmi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%dvisdfi_cpl ', Coupling%dvisdfi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nlwsfci_cpl ', Coupling%nlwsfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nswsfci_cpl ', Coupling%nswsfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nnirbmi_cpl ', Coupling%nnirbmi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nnirdfi_cpl ', Coupling%nnirdfi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nvisbmi_cpl ', Coupling%nvisbmi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%nvisdfi_cpl ', Coupling%nvisdfi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%t2mi_cpl ', Coupling%t2mi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%q2mi_cpl ', Coupling%q2mi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%u10mi_cpl ', Coupling%u10mi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%v10mi_cpl ', Coupling%v10mi_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%tsfci_cpl ', Coupling%tsfci_cpl ) - call print_var(mpirank,omprank, blkno, 'Coupling%psurfi_cpl ', Coupling%psurfi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%oro_cpl' , Coupling%oro_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%slmsk_cpl' , Coupling%slmsk_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%slimskin_cpl', Coupling%slimskin_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dusfcin_cpl ', Coupling%dusfcin_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvsfcin_cpl ', Coupling%dvsfcin_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dtsfcin_cpl ', Coupling%dtsfcin_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dqsfcin_cpl ', Coupling%dqsfcin_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ulwsfcin_cpl', Coupling%ulwsfcin_cpl ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%tseain_cpl ', Coupling%tseain_cpl ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%tisfcin_cpl ', Coupling%tisfcin_cpl ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ficein_cpl ', Coupling%ficein_cpl ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%hicein_cpl ', Coupling%hicein_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%hsnoin_cpl ', Coupling%hsnoin_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dusfc_cpl ', Coupling%dusfc_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvsfc_cpl ', Coupling%dvsfc_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dtsfc_cpl ', Coupling%dtsfc_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dqsfc_cpl ', Coupling%dqsfc_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dlwsfc_cpl ', Coupling%dlwsfc_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dswsfc_cpl ', Coupling%dswsfc_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dnirbm_cpl ', Coupling%dnirbm_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dnirdf_cpl ', Coupling%dnirdf_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvisbm_cpl ', Coupling%dvisbm_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvisdf_cpl ', Coupling%dvisdf_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nlwsfc_cpl ', Coupling%nlwsfc_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nswsfc_cpl ', Coupling%nswsfc_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nnirbm_cpl ', Coupling%nnirbm_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nnirdf_cpl ', Coupling%nnirdf_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nvisbm_cpl ', Coupling%nvisbm_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nvisdf_cpl ', Coupling%nvisdf_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dusfci_cpl ', Coupling%dusfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvsfci_cpl ', Coupling%dvsfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dtsfci_cpl ', Coupling%dtsfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dqsfci_cpl ', Coupling%dqsfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dlwsfci_cpl ', Coupling%dlwsfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dswsfci_cpl ', Coupling%dswsfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dnirbmi_cpl ', Coupling%dnirbmi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dnirdfi_cpl ', Coupling%dnirdfi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvisbmi_cpl ', Coupling%dvisbmi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvisdfi_cpl ', Coupling%dvisdfi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nlwsfci_cpl ', Coupling%nlwsfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nswsfci_cpl ', Coupling%nswsfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nnirbmi_cpl ', Coupling%nnirbmi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nnirdfi_cpl ', Coupling%nnirdfi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nvisbmi_cpl ', Coupling%nvisbmi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nvisdfi_cpl ', Coupling%nvisdfi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%t2mi_cpl ', Coupling%t2mi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%q2mi_cpl ', Coupling%q2mi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%u10mi_cpl ', Coupling%u10mi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%v10mi_cpl ', Coupling%v10mi_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%tsfci_cpl ', Coupling%tsfci_cpl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%psurfi_cpl ', Coupling%psurfi_cpl ) end if if (Model%cplchm) then - call print_var(mpirank,omprank, blkno, 'Coupling%rainc_cpl', Coupling%rainc_cpl) - call print_var(mpirank,omprank, blkno, 'Coupling%ushfsfci ', Coupling%ushfsfci ) - call print_var(mpirank,omprank, blkno, 'Coupling%dkt ', Coupling%dkt ) - call print_var(mpirank,omprank, blkno, 'Coupling%dqdti ', Coupling%dqdti ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%rainc_cpl', Coupling%rainc_cpl) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ushfsfci ', Coupling%ushfsfci ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dkt ', Coupling%dkt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dqdti ', Coupling%dqdti ) end if if (Model%do_sppt) then - call print_var(mpirank,omprank, blkno, 'Coupling%sppt_wts', Coupling%sppt_wts) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sppt_wts', Coupling%sppt_wts) end if if (Model%do_shum) then - call print_var(mpirank,omprank, blkno, 'Coupling%shum_wts', Coupling%shum_wts) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%shum_wts', Coupling%shum_wts) end if if (Model%do_skeb) then - call print_var(mpirank,omprank, blkno, 'Coupling%skebu_wts', Coupling%skebu_wts ) - call print_var(mpirank,omprank, blkno, 'Coupling%skebv_wts', Coupling%skebv_wts ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%skebu_wts', Coupling%skebu_wts ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%skebv_wts', Coupling%skebv_wts ) end if - if (Model%lndp_type .NE. 0) then - call print_var(mpirank,omprank, blkno, 'Coupling%sfc_wts' , Coupling%sfc_wts ) + if (Model%lndp_type /= 0) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sfc_wts' , Coupling%sfc_wts ) end if if (Model%do_ca) then - call print_var(mpirank,omprank, blkno, 'Coupling%ca1 ', Coupling%ca1 ) - call print_var(mpirank,omprank, blkno, 'Coupling%ca_deep ', Coupling%ca_deep ) - call print_var(mpirank,omprank, blkno, 'Coupling%ca_turb ', Coupling%ca_turb ) - call print_var(mpirank,omprank, blkno, 'Coupling%ca_shal ', Coupling%ca_shal ) - call print_var(mpirank,omprank, blkno, 'Coupling%ca_rad ', Coupling%ca_rad ) - call print_var(mpirank,omprank, blkno, 'Coupling%ca_micro ', Coupling%ca_micro ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca1 ', Coupling%ca1 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_deep ', Coupling%ca_deep ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_turb ', Coupling%ca_turb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_shal ', Coupling%ca_shal ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_rad ', Coupling%ca_rad ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_micro ', Coupling%ca_micro ) end if if(Model%imp_physics == Model%imp_physics_thompson .and. Model%ltaerosol) then - call print_var(mpirank,omprank, blkno, 'Coupling%nwfa2d', Coupling%nwfa2d) - call print_var(mpirank,omprank, blkno, 'Coupling%nifa2d', Coupling%nifa2d) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nwfa2d', Coupling%nwfa2d) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nifa2d', Coupling%nifa2d) end if ! Grid - call print_var(mpirank,omprank, blkno, 'Grid%xlon ', Grid%xlon ) - call print_var(mpirank,omprank, blkno, 'Grid%xlat ', Grid%xlat ) - call print_var(mpirank,omprank, blkno, 'Grid%xlat_d', Grid%xlat_d) - call print_var(mpirank,omprank, blkno, 'Grid%sinlat', Grid%sinlat) - call print_var(mpirank,omprank, blkno, 'Grid%coslat', Grid%coslat) - call print_var(mpirank,omprank, blkno, 'Grid%area ', Grid%area ) - call print_var(mpirank,omprank, blkno, 'Grid%dx ', Grid%dx ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%xlon ', Grid%xlon ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%xlat ', Grid%xlat ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%xlat_d', Grid%xlat_d) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%sinlat', Grid%sinlat) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%coslat', Grid%coslat) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%area ', Grid%area ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%dx ', Grid%dx ) if (Model%ntoz > 0) then - call print_var(mpirank,omprank, blkno, 'Grid%ddy_o3 ', Grid%ddy_o3 ) - call print_var(mpirank,omprank, blkno, 'Grid%jindx1_o3', Grid%jindx1_o3) - call print_var(mpirank,omprank, blkno, 'Grid%jindx2_o3', Grid%jindx2_o3) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_o3 ', Grid%ddy_o3 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx1_o3', Grid%jindx1_o3) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_o3', Grid%jindx2_o3) endif if (Model%h2o_phys) then - call print_var(mpirank,omprank, blkno, 'Grid%ddy_h ', Grid%ddy_h ) - call print_var(mpirank,omprank, blkno, 'Grid%jindx1_h', Grid%jindx1_h) - call print_var(mpirank,omprank, blkno, 'Grid%jindx2_h', Grid%jindx2_h) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_h ', Grid%ddy_h ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx1_h', Grid%jindx1_h) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_h', Grid%jindx2_h) endif ! Model/Control ! not yet @@ -538,251 +816,15 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, end subroutine GFS_diagtoscreen_run - subroutine print_logic_0d(mpirank,omprank,blkno,name,var) - - implicit none - - integer, intent(in) :: mpirank, omprank, blkno - character(len=*), intent(in) :: name - logical, intent(in) :: var - - write(0,'(2a,3i6,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, var - - end subroutine print_logic_0d - - subroutine print_int_0d(mpirank,omprank,blkno,name,var) - - implicit none - - integer, intent(in) :: mpirank, omprank, blkno - character(len=*), intent(in) :: name - integer, intent(in) :: var - - write(0,'(2a,3i6,i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, var - - end subroutine print_int_0d - - subroutine print_logic_1d(mpirank,omprank,blkno,name,var) - - use machine, only: kind_phys - - implicit none - - integer, intent(in) :: mpirank, omprank, blkno - character(len=*), intent(in) :: name - logical, intent(in) :: var(:) - - integer :: i - -#ifdef PRINT_SUM - write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) -#else - do i=ISTART,min(IEND,size(var(:))) - write(0,'(2a,3i6,i6,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, var(i) - end do -#endif - - end subroutine print_logic_1d - - subroutine print_int_1d(mpirank,omprank,blkno,name,var) - - use machine, only: kind_phys - - implicit none - - integer, intent(in) :: mpirank, omprank, blkno - character(len=*), intent(in) :: name - integer, intent(in) :: var(:) - - integer :: i - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_int(size(var),var), minval(var), maxval(var) -#else - do i=ISTART,min(IEND,size(var(:))) - write(0,'(2a,3i6,i6,i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, var(i) - end do -#endif - - end subroutine print_int_1d - - subroutine print_real_0d(mpirank,omprank,blkno,name,var) - - use machine, only: kind_phys - - implicit none - - integer, intent(in) :: mpirank, omprank, blkno - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var - - write(0,'(2a,3i6,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, var - - end subroutine print_real_0d - - subroutine print_real_1d(mpirank,omprank,blkno,name,var) - - use machine, only: kind_phys - - implicit none - - integer, intent(in) :: mpirank, omprank, blkno - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var(:) - - integer :: i - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),var), minval(var), maxval(var) -#else - do i=ISTART,min(IEND,size(var(:))) - write(0,'(2a,3i6,i6,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, var(i) - end do -#endif - - end subroutine print_real_1d - - subroutine print_real_2d(mpirank,omprank,blkno,name,var) - - use machine, only: kind_phys - - implicit none - - integer, intent(in) :: mpirank, omprank, blkno - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var(:,:) - - integer :: k, i - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),reshape(var,(/size(var)/))), minval(var), maxval(var) -#else - do i=ISTART,min(IEND,size(var(:,1))) - do k=KSTART,min(KEND,size(var(1,:))) - write(0,'(2a,3i6,2i6,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, var(i,k) - end do - end do -#endif - - end subroutine print_real_2d - - subroutine print_real_3d(mpirank,omprank,blkno,name,var) - - use machine, only: kind_phys - - implicit none - - integer, intent(in) :: mpirank, omprank, blkno - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var(:,:,:) - - integer :: k, i, l - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),reshape(var,(/size(var)/))), minval(var), maxval(var) -#else - do i=ISTART,min(IEND,size(var(:,1,1))) - do k=KSTART,min(KEND,size(var(1,:,1))) - do l=1,size(var(1,1,:)) - write(0,'(2a,3i6,3i6,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, l, var(i,k,l) - end do - end do - end do -#endif - - end subroutine print_real_3d - - function chksum_int(N, var) result(hash) - implicit none - integer, intent(in) :: N - integer, dimension(1:N), intent(in) :: var - integer*8, dimension(1:N) :: int_var - integer*8 :: a, b, i, hash - integer*8, parameter :: mod_adler=65521 - - a=1 - b=0 - i=1 - hash = 0 - int_var = TRANSFER(var, a, N) - - do i= 1, N - a = MOD(a + int_var(i), mod_adler) - b = MOD(b+a, mod_adler) - end do - - hash = ior(b * 65536, a) - - end function chksum_int - - function chksum_real(N, var) result(hash) - use machine, only: kind_phys - implicit none - integer, intent(in) :: N - real(kind_phys), dimension(1:N), intent(in) :: var - integer*8, dimension(1:N) :: int_var - integer*8 :: a, b, i, hash - integer*8, parameter :: mod_adler=65521 - - a=1 - b=0 - i=1 - hash = 0 - int_var = TRANSFER(var, a, N) - - do i= 1, N - a = MOD(a + int_var(i), mod_adler) - b = MOD(b+a, mod_adler) - end do - - hash = ior(b * 65536, a) - - end function chksum_real - - function print_my_stuff(mpitoprint,omptoprint) result(flag) -#ifdef MPI - use mpi -#endif -#ifdef OPENMP - use omp_lib -#endif - implicit none - integer, intent(in) :: mpitoprint, omptoprint - logical :: flag - integer :: ompthread, mpirank, ierr -#ifdef MPI - call MPI_COMM_RANK(MPI_COMM_WORLD, mpirank, ierr) -#else - mpirank = 0 -#endif -#ifdef OPENMP - ompthread = OMP_GET_THREAD_NUM() -#else - ompthread = 0 -#endif - - if (mpitoprint==mpirank .and. omptoprint==ompthread) then - flag = .true. - else - flag = .false. - end if - end function print_my_stuff - end module GFS_diagtoscreen module GFS_interstitialtoscreen + use print_var_chksum, only: print_var + + implicit none + private public GFS_interstitialtoscreen_init, GFS_interstitialtoscreen_run, GFS_interstitialtoscreen_finalize @@ -839,6 +881,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup integer :: impi, iomp, ierr integer :: mpirank, mpisize, mpicomm integer :: omprank, ompsize + integer :: istart, iend, kstart, kend ! Initialize CCPP error handling variables errmsg = '' @@ -871,7 +914,373 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup do impi=0,mpisize-1 do iomp=0,ompsize-1 if (mpirank==impi .and. omprank==iomp) then - call Interstitial%mprint(Model,mpirank,omprank,blkno) + ! Print static variables + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%h2o_coeff ', Interstitial%h2o_coeff ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'sum(Interstitial%h2o_pres) ', Interstitial%h2o_pres ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ipr ', Interstitial%ipr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%itc ', Interstitial%itc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%latidxprnt ', Interstitial%latidxprnt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%levi ', Interstitial%levi ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%levh2o ', Interstitial%levh2o ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%levozp ', Interstitial%levozp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%lmk ', Interstitial%lmk ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%lmp ', Interstitial%lmp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nbdlw ', Interstitial%nbdlw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nbdsw ', Interstitial%nbdsw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nf_aelw ', Interstitial%nf_aelw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nf_aesw ', Interstitial%nf_aesw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nsamftrac ', Interstitial%nsamftrac ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nscav ', Interstitial%nscav ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nspc1 ', Interstitial%nspc1 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ntiwx ', Interstitial%ntiwx ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nvdiff ', Interstitial%nvdiff ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%oz_coeff ', Interstitial%oz_coeff ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'sum(Interstitial%oz_pres) ', Interstitial%oz_pres ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%phys_hydrostatic ', Interstitial%phys_hydrostatic ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%skip_macro ', Interstitial%skip_macro ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%trans_aero ', Interstitial%trans_aero ) + ! Print all other variables + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_land ', Interstitial%adjsfculw_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_ice ', Interstitial%adjsfculw_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_ocean ', Interstitial%adjsfculw_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirbmd ', Interstitial%adjnirbmd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirbmu ', Interstitial%adjnirbmu ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirdfd ', Interstitial%adjnirdfd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirdfu ', Interstitial%adjnirdfu ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjvisbmd ', Interstitial%adjvisbmd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjvisbmu ', Interstitial%adjvisbmu ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjvisdfu ', Interstitial%adjvisdfu ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjvisdfd ', Interstitial%adjvisdfd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%aerodp ', Interstitial%aerodp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%alb1d ', Interstitial%alb1d ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%bexp1d ', Interstitial%bexp1d ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd ', Interstitial%cd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_ice ', Interstitial%cd_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_land ', Interstitial%cd_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_ocean ', Interstitial%cd_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq ', Interstitial%cdq ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_ice ', Interstitial%cdq_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_land ', Interstitial%cdq_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_ocean ', Interstitial%cdq_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_ice ', Interstitial%chh_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_land ', Interstitial%chh_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_ocean ', Interstitial%chh_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldf ', Interstitial%cldf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldsa ', Interstitial%cldsa ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldtaulw ', Interstitial%cldtaulw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldtausw ', Interstitial%cldtausw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld1d ', Interstitial%cld1d ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clw ', Interstitial%clw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clx ', Interstitial%clx ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clouds ', Interstitial%clouds ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_ice ', Interstitial%cmm_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_land ', Interstitial%cmm_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_ocean ', Interstitial%cmm_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnvc ', Interstitial%cnvc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnvw ', Interstitial%cnvw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ctei_r ', Interstitial%ctei_r ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ctei_rml ', Interstitial%ctei_rml ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cumabs ', Interstitial%cumabs ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dd_mf ', Interstitial%dd_mf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%de_lgth ', Interstitial%de_lgth ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%del ', Interstitial%del ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%del_gz ', Interstitial%del_gz ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%delr ', Interstitial%delr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dkt ', Interstitial%dkt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dlength ', Interstitial%dlength ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dqdt ', Interstitial%dqdt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dqsfc1 ', Interstitial%dqsfc1 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%drain ', Interstitial%drain ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtdt ', Interstitial%dtdt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtdtc ', Interstitial%dtdtc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtsfc1 ', Interstitial%dtsfc1 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtzm ', Interstitial%dtzm ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dt_mf ', Interstitial%dt_mf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt ', Interstitial%dudt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dusfcg ', Interstitial%dusfcg ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dusfc1 ', Interstitial%dusfc1 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvdftra ', Interstitial%dvdftra ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvdt ', Interstitial%dvdt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvsfcg ', Interstitial%dvsfcg ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvsfc1 ', Interstitial%dvsfc1 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dzlyr ', Interstitial%dzlyr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%elvmax ', Interstitial%elvmax ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d ', Interstitial%ep1d ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_ice ', Interstitial%ep1d_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_land ', Interstitial%ep1d_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_ocean ', Interstitial%ep1d_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evapq ', Interstitial%evapq ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_ice ', Interstitial%evap_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_land ', Interstitial%evap_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_ocean ', Interstitial%evap_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evbs ', Interstitial%evbs ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evcw ', Interstitial%evcw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%faerlw ', Interstitial%faerlw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%faersw ', Interstitial%faersw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_ice ', Interstitial%ffhh_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_land ', Interstitial%ffhh_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_ocean ', Interstitial%ffhh_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2 ', Interstitial%fh2 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_ice ', Interstitial%fh2_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_land ', Interstitial%fh2_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_ocean ', Interstitial%fh2_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_cice ', Interstitial%flag_cice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_guess ', Interstitial%flag_guess ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_iter ', Interstitial%flag_iter ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_ice ', Interstitial%ffmm_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_land ', Interstitial%ffmm_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_ocean ', Interstitial%ffmm_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10 ', Interstitial%fm10 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_ice ', Interstitial%fm10_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_land ', Interstitial%fm10_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_ocean ', Interstitial%fm10_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%frain ', Interstitial%frain ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%frland ', Interstitial%frland ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fscav ', Interstitial%fscav ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fswtr ', Interstitial%fswtr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw ', Interstitial%gabsbdlw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_ice ', Interstitial%gabsbdlw_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_land ', Interstitial%gabsbdlw_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_ocean ', Interstitial%gabsbdlw_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamma ', Interstitial%gamma ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamq ', Interstitial%gamq ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamt ', Interstitial%gamt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gasvmr ', Interstitial%gasvmr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx ', Interstitial%gflx ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_ice ', Interstitial%gflx_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_land ', Interstitial%gflx_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_ocean ', Interstitial%gflx_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gwdcu ', Interstitial%gwdcu ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gwdcv ', Interstitial%gwdcv ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hefac ', Interstitial%hefac ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hffac ', Interstitial%hffac ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflxq ', Interstitial%hflxq ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_ice ', Interstitial%hflx_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_land ', Interstitial%hflx_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_ocean ', Interstitial%hflx_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htlwc ', Interstitial%htlwc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htlw0 ', Interstitial%htlw0 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htswc ', Interstitial%htswc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htsw0 ', Interstitial%htsw0 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dry(:)==.true. ', Interstitial%dry ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%idxday ', Interstitial%idxday ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icy(:)==.true. ', Interstitial%icy ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%lake(:)==.true. ', Interstitial%lake ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ocean(:)==.true. ', Interstitial%ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%islmsk ', Interstitial%islmsk ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%islmsk_cice ', Interstitial%islmsk_cice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wet(:)==.true. ', Interstitial%wet ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kb ', Interstitial%kb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kbot ', Interstitial%kbot ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kcnv ', Interstitial%kcnv ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kd ', Interstitial%kd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kinver ', Interstitial%kinver ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kpbl ', Interstitial%kpbl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kt ', Interstitial%kt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ktop ', Interstitial%ktop ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%mbota ', Interstitial%mbota ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%mtopa ', Interstitial%mtopa ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nday ', Interstitial%nday ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%oa4 ', Interstitial%oa4 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%oc ', Interstitial%oc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%olyr ', Interstitial%olyr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%plvl ', Interstitial%plvl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%plyr ', Interstitial%plyr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%prcpmp ', Interstitial%prcpmp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%prnum ', Interstitial%prnum ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qlyr ', Interstitial%qlyr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_ice ', Interstitial%qss_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_land ', Interstitial%qss_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_ocean ', Interstitial%qss_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%radar_reset ', Interstitial%radar_reset ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%raddt ', Interstitial%raddt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%raincd ', Interstitial%raincd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%raincs ', Interstitial%raincs ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rainmcadj ', Interstitial%rainmcadj ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rainp ', Interstitial%rainp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb ', Interstitial%rb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_ice ', Interstitial%rb_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_land ', Interstitial%rb_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_ocean ', Interstitial%rb_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%reset ', Interstitial%reset ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rhc ', Interstitial%rhc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%runoff ', Interstitial%runoff ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_q ', Interstitial%save_q ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_t ', Interstitial%save_t ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_tcp ', Interstitial%save_tcp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_u ', Interstitial%save_u ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_v ', Interstitial%save_v ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sbsno ', Interstitial%sbsno ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%uvbfc ', Interstitial%scmpsw%uvbfc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%uvbf0 ', Interstitial%scmpsw%uvbf0 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%nirbm ', Interstitial%scmpsw%nirbm ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%nirdf ', Interstitial%scmpsw%nirdf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%visbm ', Interstitial%scmpsw%visbm ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%visdf ', Interstitial%scmpsw%visdf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_ice ', Interstitial%semis_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_land ', Interstitial%semis_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_ocean ', Interstitial%semis_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sfcalb ', Interstitial%sfcalb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigma ', Interstitial%sigma ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigmaf ', Interstitial%sigmaf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigmafrac ', Interstitial%sigmafrac ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigmatot ', Interstitial%sigmatot ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%slopetype ', Interstitial%slopetype ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowc ', Interstitial%snowc ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_ice ', Interstitial%snowd_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_land ', Interstitial%snowd_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_ocean ', Interstitial%snowd_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snohf ', Interstitial%snohf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowmt ', Interstitial%snowmt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%soiltype ', Interstitial%soiltype ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress ', Interstitial%stress ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_ice ', Interstitial%stress_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_land ', Interstitial%stress_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_ocean ', Interstitial%stress_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%theta ', Interstitial%theta ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tice ', Interstitial%tice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tlvl ', Interstitial%tlvl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tlyr ', Interstitial%tlyr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_ice ', Interstitial%tprcp_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_land ', Interstitial%tprcp_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_ocean ', Interstitial%tprcp_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%trans ', Interstitial%trans ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tseal ', Interstitial%tseal ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfa ', Interstitial%tsfa ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfc_ice ', Interstitial%tsfc_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfc_land ', Interstitial%tsfc_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfc_ocean ', Interstitial%tsfc_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfg ', Interstitial%tsfg ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf ', Interstitial%tsurf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_ice ', Interstitial%tsurf_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_land ', Interstitial%tsurf_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_ocean ', Interstitial%tsurf_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ud_mf ', Interstitial%ud_mf ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_ice ', Interstitial%uustar_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_land ', Interstitial%uustar_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_ocean ', Interstitial%uustar_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vdftra ', Interstitial%vdftra ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vegf1d ', Interstitial%vegf1d ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vegtype ', Interstitial%vegtype ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wcbmax ', Interstitial%wcbmax ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_ice ', Interstitial%weasd_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_land ', Interstitial%weasd_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_ocean ', Interstitial%weasd_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wind ', Interstitial%wind ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work1 ', Interstitial%work1 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work2 ', Interstitial%work2 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work3 ', Interstitial%work3 ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%xcosz ', Interstitial%xcosz ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%xlai1d ', Interstitial%xlai1d ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%xmu ', Interstitial%xmu ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%z01d ', Interstitial%z01d ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zorl_ice ', Interstitial%zorl_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zorl_land ', Interstitial%zorl_land ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zorl_ocean ', Interstitial%zorl_ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zt1d ', Interstitial%zt1d ) + ! CIRES UGWP v0 + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gw_dudt ', Interstitial%gw_dudt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gw_dvdt ', Interstitial%gw_dvdt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gw_dtdt ', Interstitial%gw_dtdt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gw_kdis ', Interstitial%gw_kdis ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_mtb ', Interstitial%tau_mtb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_ogw ', Interstitial%tau_ogw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_tofd ', Interstitial%tau_tofd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_ngw ', Interstitial%tau_ngw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zmtb ', Interstitial%zmtb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zlwb ', Interstitial%zlwb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zogw ', Interstitial%zogw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_mtb ', Interstitial%dudt_mtb ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_ogw ', Interstitial%dudt_ogw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_tms ', Interstitial%dudt_tms ) + !-- GSD drag suite + if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%varss ', Interstitial%varss ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ocss ', Interstitial%ocss ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%oa4ss ', Interstitial%oa4ss ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clxss ', Interstitial%clxss ) + end if + ! GFDL and Thompson MP + if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%graupelmp ', Interstitial%graupelmp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icemp ', Interstitial%icemp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rainmp ', Interstitial%rainmp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowmp ', Interstitial%snowmp ) + ! Ferrier-Aligo + else if (Model%imp_physics == Model%imp_physics_fer_hires) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%f_ice ', Interstitial%f_ice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%f_rain ', Interstitial%f_rain ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%f_rimef ', Interstitial%f_rimef ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cwm ', Interstitial%cwm ) + ! Morrison-Gettelman + else if (Model%imp_physics == Model%imp_physics_mg) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncgl ', Interstitial%ncgl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncpr ', Interstitial%ncpr ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncps ', Interstitial%ncps ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qgl ', Interstitial%qgl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qrn ', Interstitial%qrn ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qsnw ', Interstitial%qsnw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qlcn ', Interstitial%qlcn ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qicn ', Interstitial%qicn ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%w_upi ', Interstitial%w_upi ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cf_upi ', Interstitial%cf_upi ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_mfd ', Interstitial%cnv_mfd ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_dqldt ', Interstitial%cnv_dqldt ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clcn ', Interstitial%clcn ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_fice ', Interstitial%cnv_fice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_ndrop ', Interstitial%cnv_ndrop ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_nice ', Interstitial%cnv_nice ) + end if + ! SHOC + if (Model%do_shoc) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncgl ', Interstitial%ncgl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qrn ', Interstitial%qrn ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qsnw ', Interstitial%qsnw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qgl ', Interstitial%qgl ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncpi ', Interstitial%ncpi ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncpl ', Interstitial%ncpl ) + end if + ! Noah MP + if (Model%lsm == Model%lsm_noahmp) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%t2mmp ', Interstitial%t2mmp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%q2mp ', Interstitial%q2mp ) + end if + ! RRTMGP + if (Model%do_RRTMGP) then + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%aerosolslw ', Interstitial%aerosolslw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%aerosolssw ', Interstitial%aerosolssw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_frac ', Interstitial%cld_frac ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_lwp ', Interstitial%cld_lwp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_reliq ', Interstitial%cld_reliq ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_iwp ', Interstitial%cld_iwp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_reice ', Interstitial%cld_reice ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_swp ', Interstitial%cld_swp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_resnow ', Interstitial%cld_resnow ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_rwp ', Interstitial%cld_rwp ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld_rerain ', Interstitial%cld_rerain ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%precip_frac ', Interstitial%precip_frac ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icseed_lw ', Interstitial%icseed_lw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icseed_sw ', Interstitial%icseed_sw ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwUP_allsky ', Interstitial%fluxlwUP_allsky ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwDOWN_allsky ', Interstitial%fluxlwDOWN_allsky ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwUP_clrsky ', Interstitial%fluxlwUP_clrsky ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwDOWN_clrsky ', Interstitial%fluxlwDOWN_clrsky ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswUP_allsky ', Interstitial%fluxswUP_allsky ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswDOWN_allsky ', Interstitial%fluxswDOWN_allsky ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswUP_clrsky ', Interstitial%fluxswUP_clrsky ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswDOWN_clrsky ', Interstitial%fluxswDOWN_clrsky ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%relhum ', Interstitial%relhum ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%q_lay ', Interstitial%q_lay ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qs_lay ', Interstitial%qs_lay ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%deltaZ ', Interstitial%deltaZ ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%p_lay ', Interstitial%p_lay ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%p_lev ', Interstitial%p_lev ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%t_lay ', Interstitial%t_lay ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%t_lev ', Interstitial%t_lev ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tv_lay ', Interstitial%tv_lay ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cloud_overlap_param ', Interstitial%cloud_overlap_param ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%precip_overlap_param', Interstitial%precip_overlap_param ) + end if end if #ifdef OPENMP !$OMP BARRIER @@ -927,8 +1336,8 @@ subroutine GFS_abort_run (Model, blkno, errmsg, errflg) errmsg = '' errflg = 0 - if (Model%kdt==1 .and. blkno==4) then - if (Model%me==0) write(0,*) "GFS_abort_run: ABORTING MODEL" + if (Model%kdt==1 .and. blkno==size(Model%blksz)) then + if (Model%me==Model%master) write(0,*) "GFS_abort_run: ABORTING MODEL" call sleep(10) stop end if @@ -939,104 +1348,104 @@ end module GFS_abort module GFS_checkland - private + private - public GFS_checkland_init, GFS_checkland_run, GFS_checkland_finalize + public GFS_checkland_init, GFS_checkland_run, GFS_checkland_finalize - contains + contains - subroutine GFS_checkland_init () - end subroutine GFS_checkland_init + subroutine GFS_checkland_init () + end subroutine GFS_checkland_init - subroutine GFS_checkland_finalize () - end subroutine GFS_checkland_finalize + subroutine GFS_checkland_finalize () + end subroutine GFS_checkland_finalize !> \section arg_table_GFS_checkland_run Argument Table !! \htmlinclude GFS_checkland_run.html !! - subroutine GFS_checkland_run (me, master, blkno, im, kdt, iter, flag_iter, flag_guess, & - flag_init, flag_restart, frac_grid, isot, ivegsrc, stype, vtype, slope, & - soiltyp, vegtype, slopetyp, dry, icy, wet, lake, ocean, & - oceanfrac, landfrac, lakefrac, slmsk, islmsk, errmsg, errflg ) - - use machine, only: kind_phys - - implicit none - - ! Interface variables - integer, intent(in ) :: me - integer, intent(in ) :: master - integer, intent(in ) :: blkno - integer, intent(in ) :: im - integer, intent(in ) :: kdt - integer, intent(in ) :: iter - logical, intent(in ) :: flag_iter(im) - logical, intent(in ) :: flag_guess(im) - logical, intent(in ) :: flag_init - logical, intent(in ) :: flag_restart - logical, intent(in ) :: frac_grid - integer, intent(in ) :: isot - integer, intent(in ) :: ivegsrc - real(kind_phys), intent(in ) :: stype(im) - real(kind_phys), intent(in ) :: vtype(im) - real(kind_phys), intent(in ) :: slope(im) - integer, intent(in ) :: soiltyp(im) - integer, intent(in ) :: vegtype(im) - integer, intent(in ) :: slopetyp(im) - logical, intent(in ) :: dry(im) - logical, intent(in ) :: icy(im) - logical, intent(in ) :: wet(im) - logical, intent(in ) :: lake(im) - logical, intent(in ) :: ocean(im) - real(kind_phys), intent(in ) :: oceanfrac(im) - real(kind_phys), intent(in ) :: landfrac(im) - real(kind_phys), intent(in ) :: lakefrac(im) - real(kind_phys), intent(in ) :: slmsk(im) - integer, intent(in ) :: islmsk(im) - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Local variables - integer :: i - - errflg = 0 - errmsg = '' - - write(0,'(a,i5)') 'YYY: me :', me - write(0,'(a,i5)') 'YYY: master :', master - write(0,'(a,i5)') 'YYY: blkno :', blkno - write(0,'(a,i5)') 'YYY: im :', im - write(0,'(a,i5)') 'YYY: kdt :', kdt - write(0,'(a,i5)') 'YYY: iter :', iter - write(0,'(a,1x,l)') 'YYY: flag_init :', flag_init - write(0,'(a,1x,l)') 'YYY: flag_restart :', flag_restart - write(0,'(a,1x,l)') 'YYY: frac_grid :', frac_grid - write(0,'(a,i5)') 'YYY: isot :', isot - write(0,'(a,i5)') 'YYY: ivegsrc :', ivegsrc - - do i=1,im - !if (vegtype(i)==15) then - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, flag_iter(i) :', i, blkno, flag_iter(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, flag_guess(i) :', i, blkno, flag_guess(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, stype(i) :', i, blkno, stype(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, vtype(i) :', i, blkno, vtype(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, slope(i) :', i, blkno, slope(i) - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, soiltyp(i) :', i, blkno, soiltyp(i) - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, vegtype(i) :', i, blkno, vegtype(i) - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, slopetyp(i) :', i, blkno, slopetyp(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, dry(i) :', i, blkno, dry(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, icy(i) :', i, blkno, icy(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, wet(i) :', i, blkno, wet(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, lake(i) :', i, blkno, lake(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, ocean(i) :', i, blkno, ocean(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, oceanfrac(i) :', i, blkno, oceanfrac(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, landfrac(i) :', i, blkno, landfrac(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, lakefrac(i) :', i, blkno, lakefrac(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, slmsk(i) :', i, blkno, slmsk(i) - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, islmsk(i) :', i, blkno, islmsk(i) - !end if - end do - - end subroutine GFS_checkland_run + subroutine GFS_checkland_run (me, master, blkno, im, kdt, iter, flag_iter, flag_guess, & + flag_init, flag_restart, frac_grid, isot, ivegsrc, stype, vtype, slope, & + soiltyp, vegtype, slopetyp, dry, icy, wet, lake, ocean, & + oceanfrac, landfrac, lakefrac, slmsk, islmsk, errmsg, errflg ) + + use machine, only: kind_phys + + implicit none + + ! Interface variables + integer, intent(in ) :: me + integer, intent(in ) :: master + integer, intent(in ) :: blkno + integer, intent(in ) :: im + integer, intent(in ) :: kdt + integer, intent(in ) :: iter + logical, intent(in ) :: flag_iter(im) + logical, intent(in ) :: flag_guess(im) + logical, intent(in ) :: flag_init + logical, intent(in ) :: flag_restart + logical, intent(in ) :: frac_grid + integer, intent(in ) :: isot + integer, intent(in ) :: ivegsrc + real(kind_phys), intent(in ) :: stype(im) + real(kind_phys), intent(in ) :: vtype(im) + real(kind_phys), intent(in ) :: slope(im) + integer, intent(in ) :: soiltyp(im) + integer, intent(in ) :: vegtype(im) + integer, intent(in ) :: slopetyp(im) + logical, intent(in ) :: dry(im) + logical, intent(in ) :: icy(im) + logical, intent(in ) :: wet(im) + logical, intent(in ) :: lake(im) + logical, intent(in ) :: ocean(im) + real(kind_phys), intent(in ) :: oceanfrac(im) + real(kind_phys), intent(in ) :: landfrac(im) + real(kind_phys), intent(in ) :: lakefrac(im) + real(kind_phys), intent(in ) :: slmsk(im) + integer, intent(in ) :: islmsk(im) + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Local variables + integer :: i + + errflg = 0 + errmsg = '' + + write(0,'(a,i5)') 'YYY: me :', me + write(0,'(a,i5)') 'YYY: master :', master + write(0,'(a,i5)') 'YYY: blkno :', blkno + write(0,'(a,i5)') 'YYY: im :', im + write(0,'(a,i5)') 'YYY: kdt :', kdt + write(0,'(a,i5)') 'YYY: iter :', iter + write(0,'(a,1x,l)') 'YYY: flag_init :', flag_init + write(0,'(a,1x,l)') 'YYY: flag_restart :', flag_restart + write(0,'(a,1x,l)') 'YYY: frac_grid :', frac_grid + write(0,'(a,i5)') 'YYY: isot :', isot + write(0,'(a,i5)') 'YYY: ivegsrc :', ivegsrc + + do i=1,im + !if (vegtype(i)==15) then + write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, flag_iter(i) :', i, blkno, flag_iter(i) + write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, flag_guess(i) :', i, blkno, flag_guess(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, stype(i) :', i, blkno, stype(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, vtype(i) :', i, blkno, vtype(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, slope(i) :', i, blkno, slope(i) + write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, soiltyp(i) :', i, blkno, soiltyp(i) + write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, vegtype(i) :', i, blkno, vegtype(i) + write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, slopetyp(i) :', i, blkno, slopetyp(i) + write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, dry(i) :', i, blkno, dry(i) + write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, icy(i) :', i, blkno, icy(i) + write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, wet(i) :', i, blkno, wet(i) + write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, lake(i) :', i, blkno, lake(i) + write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, ocean(i) :', i, blkno, ocean(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, oceanfrac(i) :', i, blkno, oceanfrac(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, landfrac(i) :', i, blkno, landfrac(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, lakefrac(i) :', i, blkno, lakefrac(i) + write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, slmsk(i) :', i, blkno, slmsk(i) + write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, islmsk(i) :', i, blkno, islmsk(i) + !end if + end do + + end subroutine GFS_checkland_run end module GFS_checkland From 2245a5dd66b88f5b35352963b8fbea848d50377f Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 1 Sep 2020 09:57:16 -0600 Subject: [PATCH 328/404] Correct typos in comment in GFS_debug.F90 --- physics/GFS_debug.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index e889d94df..35b44ca0e 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -916,7 +916,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup if (mpirank==impi .and. omprank==iomp) then ! Print static variables call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%h2o_coeff ', Interstitial%h2o_coeff ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'sum(Interstitial%h2o_pres) ', Interstitial%h2o_pres ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%h2o_pres ', Interstitial%h2o_pres ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ipr ', Interstitial%ipr ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%itc ', Interstitial%itc ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%latidxprnt ', Interstitial%latidxprnt ) @@ -1062,14 +1062,14 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htlw0 ', Interstitial%htlw0 ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htswc ', Interstitial%htswc ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htsw0 ', Interstitial%htsw0 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dry(:)==.true. ', Interstitial%dry ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dry ', Interstitial%dry ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%idxday ', Interstitial%idxday ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icy(:)==.true. ', Interstitial%icy ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%lake(:)==.true. ', Interstitial%lake ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ocean(:)==.true. ', Interstitial%ocean ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icy ', Interstitial%icy ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%lake ', Interstitial%lake ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ocean ', Interstitial%ocean ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%islmsk ', Interstitial%islmsk ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%islmsk_cice ', Interstitial%islmsk_cice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wet(:)==.true. ', Interstitial%wet ) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wet ', Interstitial%wet ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kb ', Interstitial%kb ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kbot ', Interstitial%kbot ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kcnv ', Interstitial%kcnv ) From 58aecc785a02322035abf1fe1697243e44f51b16 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 2 Sep 2020 09:59:07 -0600 Subject: [PATCH 329/404] Revert change to .gitmodules and update submodule pointer for rte-rrtmgp --- .gitmodules | 6 ++---- physics/rte-rrtmgp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index a49d2434f..5bcc65869 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,4 @@ [submodule "physics/rte-rrtmgp"] path = physics/rte-rrtmgp - #url = https://github.com/earth-system-radiation/rte-rrtmgp - #branch = dtc/ccpp - url = https://github.com/climbfuji/rte-rrtmgp - branch = add_ccpp_table_properties_and_dependencies + url = https://github.com/earth-system-radiation/rte-rrtmgp + branch = dtc/ccpp diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 88a43f797..566bee9cd 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 88a43f797ab3eb3c5c978485bd108a8386a6cdfd +Subproject commit 566bee9cd6f9977e82d75d9b4964b20b1ff6163d From 361cc15b6328f6754127aad337de2e7f93c9f8a7 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Wed, 2 Sep 2020 16:59:25 +0000 Subject: [PATCH 330/404] Syntax errors corrected. Still has an issue in compilation with the use 0f function message. --- physics/sfcsub.F | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/physics/sfcsub.F b/physics/sfcsub.F index 41110c7c5..a9328f9bf 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -1844,14 +1844,16 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc & & rla,rlo,len,kqcm,percrit,lgchek,me) !-- soil moisture forecast do k=1,lsoil - call qcmxmn(message('smcfcw',k),smcfcs(1,k),slifcs,snofcs,icefl1, + call qcmxmn(message('smcfcw',k),smcfcs(1,k),slifcs, + & snofcs,icefl1, & smclmx,smclmn,smcomx,smcomn,smcimx,smcimn, & smcjmx,smcjmn,smcsmx,smcsmn,epssmc, & rla,rlo,len,kqcm,percrit,lgchek,me) enddo !-- soil temperature forecast do k=1,lsoil - call qcmxmn(message('stcf',k),stcfcs(1,k),slifcs,snofcs,icefl1, + call qcmxmn(message('stcf',k),stcfcs(1,k),slifcs, + & snofcs,icefl1, & stclmx,stclmn,stcomx,stcomn,stcimx,stcimn, & stcjmx,stcjmn,stcsmx,stcsmn,eptsfc, & rla,rlo,len,kqcm,percrit,lgchek,me) @@ -8605,6 +8607,8 @@ subroutine snodpth2(glacir,snwmax,snoanl, len, me) enddo return end + +!>\ingroup mod_sfcsub function message(prefix,index) implicit none character(len=*), intent(in) :: prefix @@ -8615,4 +8619,5 @@ function message(prefix,index) ! string representation of index <= len(message) write(message,fmt='(a,a,i0)') trim(prefix), '-', index end function message + !>@} From cc1d5bdaea82a880e695f19205a2203ac2eb751d Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 2 Sep 2020 13:35:58 -0600 Subject: [PATCH 331/404] Revert change to rte-rrtmgp submodule pointer --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 7dfff2025..6ee0b62c1 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 7dfff2025cae02c84b12df2402a39d77065f0e62 +Subproject commit 6ee0b62c1ac6204a89a4e922382b611c16dd5fa7 From 922c05f452ee3f8c58410672002d371fd1eb0838 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 2 Sep 2020 13:36:20 -0600 Subject: [PATCH 332/404] physics/sfcsub.F: move message into sfccyc_module --- physics/sfcsub.F | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/physics/sfcsub.F b/physics/sfcsub.F index a9328f9bf..30f663ec5 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -36,6 +36,20 @@ module sfccyc_module integer :: veg_type_landice integer :: soil_type_landice ! +! + contains + + function message(prefix,index) + implicit none + character(len=*), intent(in) :: prefix + integer, intent(in) :: index + character(len=10) :: message + ! + ! probably need to implement a check that len(prefix) + '-' + length of + ! string representation of index <= len(message) + write(message,fmt='(a,a,i0)') trim(prefix), '-', index + end function message + end module sfccyc_module !>\ingroup mod_GFS_phys_time_vary @@ -8608,16 +8622,4 @@ subroutine snodpth2(glacir,snwmax,snoanl, len, me) return end -!>\ingroup mod_sfcsub - function message(prefix,index) - implicit none - character(len=*), intent(in) :: prefix - integer, intent(in) :: index - character(len=10) :: message - ! - ! probably need to implement a check that len(prefix) + '-' + length of - ! string representation of index <= len(message) - write(message,fmt='(a,a,i0)') trim(prefix), '-', index - end function message - !>@} From 45cfe52756e7bd7a839e56ce2574840cbb8349b8 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Wed, 2 Sep 2020 22:09:32 +0000 Subject: [PATCH 333/404] 1st attempt - Sept. 2 --- physics/GFS_GWD_generic.F90 | 2 +- physics/cires_orowam2017.F90 | 347 +++++++ physics/cires_ugwp_initialize_v1.F90 | 799 ++++++++++++++++ physics/cires_ugwp_module_v1.F90 | 666 +++++++++++++ physics/cires_ugwp_ngw_utils.F90 | 73 ++ physics/cires_ugwp_orolm97_v1.F90 | 985 ++++++++++++++++++++ physics/cires_ugwp_solv2_v1_mod.F90 | 810 ++++++++++++++++ physics/cires_ugwp_triggers_v1.F90 | 576 ++++++++++++ physics/cires_vert_orodis.F90 | 8 + physics/drag_suite.F90 | 67 +- physics/drag_suite.meta | 24 + physics/unified_ugwp.F90 | 686 ++++++++++++++ physics/unified_ugwp.meta | 1296 ++++++++++++++++++++++++++ physics/unified_ugwp_post.F90 | 83 ++ physics/unified_ugwp_post.meta | 315 +++++++ 15 files changed, 6708 insertions(+), 29 deletions(-) create mode 100644 physics/cires_orowam2017.F90 create mode 100644 physics/cires_ugwp_initialize_v1.F90 create mode 100644 physics/cires_ugwp_module_v1.F90 create mode 100644 physics/cires_ugwp_ngw_utils.F90 create mode 100644 physics/cires_ugwp_orolm97_v1.F90 create mode 100644 physics/cires_ugwp_solv2_v1_mod.F90 create mode 100644 physics/cires_ugwp_triggers_v1.F90 create mode 100644 physics/unified_ugwp.F90 create mode 100644 physics/unified_ugwp.meta create mode 100644 physics/unified_ugwp_post.F90 create mode 100644 physics/unified_ugwp_post.meta diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index 09c969162..ed3ff4484 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -83,7 +83,7 @@ subroutine GFS_GWD_generic_pre_run( & clx(:,2) = 0.0 clx(:,3) = 0.0 clx(:,4) = 0.0 - elseif (nmtvr == 24) then ! GSD_drag_suite + elseif (nmtvr == 24) then ! GSD_drag_suite and unified_ugwp oc(:) = mntvar(:,2) oa4(:,1) = mntvar(:,3) oa4(:,2) = mntvar(:,4) diff --git a/physics/cires_orowam2017.F90 b/physics/cires_orowam2017.F90 new file mode 100644 index 000000000..752c6f84e --- /dev/null +++ b/physics/cires_orowam2017.F90 @@ -0,0 +1,347 @@ +module cires_orowam2017 + + +contains + + + subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, + & dtp,dxres, taub, u1, v1, t1, xn, yn, bn2, rho, prsi, prsL, + & del, sigma, hprime, gamma, theta, + & sinlat, xlatd, taup, taud, pkdis) +! + USE MACHINE , ONLY : kind_phys + use ugwp_common , only : grav, omega2 +! + implicit none + + integer :: im, levs + integer :: npt + integer :: kdt, me, master + integer :: kref(im), ipt(im) + real(kind=kind_phys), intent(in) :: dtp, dxres + real(kind=kind_phys), intent(in) :: taub(im) + + real(kind=kind_phys), intent(in) :: sinlat(im), xlatd(im) + real(kind=kind_phys), intent(in), dimension(im) :: sigma, + & hprime, gamma, theta + + real(kind=kind_phys), intent(in), dimension(im) :: xn, yn + + real(kind=kind_phys), intent(in), dimension(im, levs) :: + & u1, v1, t1, bn2, rho, prsl, del + + real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi +! +! out : taup, taud, pkdis +! + real(kind=kind_phys), intent(inout), dimension(im, levs+1) :: taup + real(kind=kind_phys), intent(inout), dimension(im, levs) :: taud + real(kind=kind_phys), intent(inout), dimension(im, levs) :: pkdis + real(kind=kind_phys) :: belps, aelps, nhills, selps +! +! multiwave oro-spectra +! locals +! + integer :: i, j, k, isp, iw + + integer, parameter :: nworo = 30 + real(kind=kind_phys), parameter :: fc_flag = 0.0 + real(kind=kind_phys), parameter :: mkzmin = 6.28e-3/50.0 + real(kind=kind_phys), parameter :: mkz2min = mkzmin* mkzmin + real(kind=kind_phys), parameter :: kedmin = 1.e-3 + real(kind=kind_phys), parameter :: kedmax = 350.,axmax=250.e-5 + real(kind=kind_phys), parameter :: rtau = 0.01 ! nonlin-OGW scale 1/10sec + real(kind=kind_phys), parameter :: Linsat2 =0.5 + real(kind=kind_phys), parameter :: kxmin = 6.28e-3/100. + real(kind=kind_phys), parameter :: kxmax = 6.28e-3/5.0 + real(kind=kind_phys), parameter :: dkx = (kxmax -kxmin)/(nworo-1) + real(kind=kind_phys), parameter :: kx_slope= -5./3. + real(kind=kind_phys), parameter :: hps =7000., rhp2 = .5/hps + real(kind=kind_phys), parameter :: cxmin=0.5, cxmin2=cxmin*cxmin + + real :: akx(nworo), cxoro(nworo), akx2(nworo) + real :: aspkx(nworo), c2f2(nworo) , cdf2(nworo) + real :: tau_sp(nworo,levs+1), wkdis(nworo, levs+1) + real :: tau_kx(nworo),taub_kx(nworo) + real, dimension(nworo, levs+1) :: wrms, akzw + + real :: tauz(levs+1), rms_wind(levs+1) + real :: wave_act(nworo,levs+1) + + real :: kxw, kzw, kzw2, kzw3, kzi, dzmet, rhoint + real :: rayf, kturb + real :: uz, bv, bv2,kxsp, fcor2, cf2 + + real :: fdis + real :: wfdm, wfdt, wfim, wfit + real :: betadis, betam, betat, kds, cx, rhofac + real :: etwk, etws, tauk, cx2sat + real :: cdf1, tau_norm +! +! mean flow +! + real, dimension(levs+1) :: uzi,rhoi,ktur, kalp, dzi + + integer :: nw, nzi, ksrc + taud (:, :) = 0.0 ; pkdis(:,:) = 0.0 ; taup (:,:) = 0.0 + tau_sp (:,:) = 0.0 ; wrms(:,:) = 0.0 + nw = nworo + nzi = levs+1 + + do iw = 1, nw +! !kxw = 0.25/(dxres)*iw + kxw = kxmin+(iw-1)*dkx + akx(iw) = kxw + akx2(iw) = kxw*kxw + aspkx(iw) = kxw ** (kx_slope) + tau_kx(iw) = aspkx(iw)*dkx + enddo + + tau_norm = sum(tau_kx) + tau_kx(:) = tau_kx(:)/tau_norm + + if (kdt == 1) then +771 format( 'vay-oro19 ', 3(2x,F8.3)) + write(6,771) + & maxval(tau_kx)*maxval(taub)*1.e3, + & minval(tau_kx), maxval(tau_kx) + endif +! +! main loop over oro-points +! + do i =1, npt + j = ipt(i) + +! +! estimate "nhills" => stochastic choices for OGWs +! + if (taub(i) > 0.) then +! +! max_kxridge =min( .5*sigma(j)/hprime(j), kmax) +! ridge-dependent dkx = (max_kxridge -kxmin)/(nw-1) +! option to make grid-box variable kx-spectra kxw = kxmin+(iw-1)*dkx +! + wave_act(1:nw, 1:levs+1) = 1.0 + ksrc = kref(i) + tauz(1:ksrc) = taub(i) + taub_kx(1:nw) = tau_kx(1:nw) * taub(i) + wkdis(:,:) = kedmin + + call oro_meanflow(levs, nzi, u1(j,:), v1(j,:), t1(j,:), + & prsi(j,:), prsL(j,:), del(j,:), rho(i,:), + & bn2(i,:), uzi, rhoi,ktur, kalp,dzi, + & xn(i), yn(i)) + + fcor2 = (omega2*sinlat(j))*(omega2*sinlat(j))*fc_flag + + k = ksrc + + bv2 = bn2(i,k) + uz = uzi(k) !u1(j,ksrc)*xn(i)+v1(j,ksrc)*yn(i)! + kturb = ktur(k) + rayf = kalp(k) + rhoint = rhoi(k) + dzmet = dzi(k) + kzw = max(sqrt(bv2)/max(cxmin, uz), mkzmin) +! +! specify oro-kx spectra and related variables k=ksrc +! + do iw = 1, nw + kxw = akx(iw) + cxoro(iw) = 0.0 - uz + c2f2(iw) = fcor2/akx2(iw) + wrms(iw,k)= taub_kx(iw)/rhoint*kzw/kxw + tau_sp(iw, k) = taub_kx(iw) +! +! + if (cxoro(iw) > cxmin) then + wave_act(iw,k:levs+1) = 0. ! crit-level + else + cdf2(iw) = cxoro(iw)*cxoro(iw) -c2f2(iw) + if ( cdf2(iw) < cxmin2) then + wave_act(iw,k:levs+1) = 0. ! coriolis cut-off + else + kzw2 = max(Bv2/Cdf2(iw) - akx2(iw), mkz2min) + kzw = sqrt(kzw2) + akzw(iw,k)= kzw + wrms(iw,k)= taub_kx(iw)/rhoint * kzw/kxw + endif + endif + enddo ! nw-spectral loop +! +! defined abobe, k = ksrc: akx(nworo), cxoro(nworo), tau_sp(ksrc, nworo) +! propagate upward multiwave-spectra are filtered by dissipation & instability +! +! tau_sp(:,ksrc+1:levs+1) = tau_sp(:, ksrc) + do k= ksrc+1, levs + uz = uzi(k) + bv2 =bn2(i,k) + bv = sqrt(bv2) + rayf = kalp(k) + rhoint= rhoi(k) + dzmet = dzi(k) + rhofac = rhoi(k-1)/rhoi(k) + + do iw = 1, nworo +! + if (wave_act(iw, k-1) <= 0.0) cycle + cxoro(iw)= 0.0 - uz + if ( cxoro(iw) > cxmin) then + wave_act(iw,k:levs+1) = 0.0 ! crit-level + else + cdf2(iw) = cxoro(iw)*cxoro(iw) -c2f2(iw) + if ( cdf2(iw) < cxmin2) wave_act(iw,k:levs+1) = 0.0 + endif + if ( wave_act(iw,k) <= 0.0) cycle +! +! upward propagation +! + kzw2 = Bv2/Cdf2(iw) - akx2(iw) + + if (kzw2 < mkz2min) then + wave_act(iw,k:levs+1) = 0.0 + else +! +! upward propagation w/o reflection +! + kxw = akx(iw) + kzw = sqrt(kzw2) + akzw(iw,k) = kzw + kzw3 = kzw2*kzw + + cx = cxoro(iw) + betadis = cdf2(iw) / (Cx*Cx+c2f2(iw)) + betaM = 1.0 / (1.0+betadis) + betaT = 1.0 - BetaM + kds = wkdis(iw,k-1) + + etws = wrms(iw,k-1)*rhofac * kzw/akzw(iw,k-1) + + kturb = ktur(k)+pkdis(j,k-1) + wfiM = kturb*kzw2 +rayf + wfiT = wfiM ! do updates with Pr-numbers Kv/Kt + cdf1 = sqrt(Cdf2(iw)) + wfdM = wfiM/(kxw*Cdf1)*BetaM + wfdT = wfiT/(kxw*Cdf1)*BetaT + kzi = 2.*kzw*(wfdM+wfdT)*dzmet + Fdis = exp(-kzi) + + etwk = etws*Fdis + Cx2sat = Linsat2*Cdf2(iw) + + if (etwk > cx2sat) then + Kds = kxw*Cdf1*rhp2/kzw3 + etwk = cx2sat + wfiM = kds*kzw2 + wfdM = wfiM/(kxw*Cdf1) + kzi = 2.*kzw*(wfdm + wfdm)*dzmet + etwk = cx2sat*exp(-kzi) + endif +! if( lat(j) eq 40.5 ) then stop + wkdis(iw,k) = kds + wrms(iw,k) = etwk + tauk = etwk*kxw/kzw + tau_sp(iw,k) = tauk *rhoint + if ( tau_sp(iw,k) > tau_sp(iw,k-1)) + & tau_sp(iw,k) = tau_sp(iw,k-1) + + ENDIF ! upward + ENDDO ! spectral + +!......... do spectral sum of rms, wkdis, tau + + tauz(k) = sum( tau_sp(:,k)*wave_act(:,k) ) + rms_wind(k) = sum( wrms(:,k)*wave_act(:,k) ) + + pkdis(j,k) = sum(wkdis(:,k)*wave_act(:,k))+rms_wind(k)*rtau + + if (pkdis(j,k) > kedmax) pkdis(j,k) = kedmax + + ENDDO ! k=ksrc+1, levs + + k = ksrc + tauz(k) = sum(tau_sp(:,k)*wave_act(:,k)) + tauz(k) = tauz(k+1) ! zero momentum dep-n at k=ksrc + + pkdis(j,k) = sum(wkdis(:,k)*wave_act(:,k)) + rms_wind(k) = sum(wrms(:,k)*wave_act(:,k)) + tauz(levs+1) = tauz(levs) + taup(i, 1:levs+1) = tauz(1:levs+1) + do k=ksrc, levs + taud(i,k) = ( tauz(k+1) - tauz(k))*grav/del(j,k) +! if (taud(i,k) .gt. 0)taud(i,k)=taud(i,k)*.01 +! if (abs(taud(i,k)).ge.axmax)taud(i,k)=sign(taud(i,k),axmax) + enddo + endif ! taub > 0 + enddo ! oro-points (i, j, ipt) +!23456 + end subroutine oro_wam_2017 +!------------------------------------------------------------- +! +! define mean flow and dissipation for OGW-kx spectrum +! +!------------------------------------------------------------- + subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, + & delp, rho, bn2, uzi, rhoi, ktur, kalp, dzi, xn, yn) + + use ugwp_common , only : grav, rgrav, rdi, velmin, dw2min + implicit none + + integer :: nz, nzi + real, dimension(nz ) :: u1, v1, t1, delp, rho, pmid + real, dimension(nz ) :: bn2 ! define at the interfaces + real, dimension(nz+1) :: pint + real :: xn, yn +! output + + real, dimension(nz+1) :: dzi, uzi, rhoi, ktur, kalp + +! locals + integer :: i, j, k + real :: ui, vi, ti, uz, vz, shr2, rdz, kamp + real :: zgrow, zmet, rdpm, ritur, kmol, w1 +! paremeters + real, parameter :: hps = 7000., rpspa = 1.e-5 + real, parameter :: rhps=1.0/hps + real, parameter :: h4= 0.25/hps + real, parameter :: rimin = 1.0/8.0, kedmin = 0.01 + real, parameter :: lturb = 30. , uturb = 150.0 + real, parameter :: lsc2 = lturb*lturb,usc2 = uturb*uturb + kalp(1:nzi) = 2.e-7 ! radiative damping + + do k=2, nz + rdpm = grav/(pmid(k-1)-pmid(k)) + ui = .5*(u1(k-1)+u1(k)) + vi = .5*(v1(k-1)+v1(k)) + uzi(k) = Ui*xn + Vi*yn + ti = .5*(t1(k-1)+t1(k)) + rhoi(k) = rdi*pint(k)/ti + rdz = rdpm *rhoi(k) + dzi(k) = 1./rdz + uz = u1(k)-u1(k-1) + vz = v1(k)-v1(k-1) + shr2 = rdz*rdz*(max(uz*uz+vz*vz, dw2min)) + zmet = -hps*alog(pint(k)*rpspa) + zgrow = exp(zmet*h4) + kmol = 2.e-5*exp(zmet*rhps)+kedmin + ritur = max(bn2(k)/shr2, rimin) + kamp = sqrt(shr2)*lsc2 *zgrow + w1 = 1./(1. + 5*ritur) + ktur(k) = kamp * w1 * w1 +kmol + enddo + + k = 1 + uzi(k) = uzi(k+1) + ktur(k) = ktur(k+1) + rhoi(k) = rdi*pint(k)/t1(k+1) + dzi(k) = rgrav*delp(k)/rhoi(k) + + k = nzi + uzi(k) = uzi(k-1) + ktur(k) = ktur(k-1) + rhoi(k) = rhoi(k-1)*.5 + dzi(k) = dzi(k-1) + + end subroutine oro_meanflow + +end module cires_orowam2017 diff --git a/physics/cires_ugwp_initialize_v1.F90 b/physics/cires_ugwp_initialize_v1.F90 new file mode 100644 index 000000000..eef5cc04e --- /dev/null +++ b/physics/cires_ugwp_initialize_v1.F90 @@ -0,0 +1,799 @@ +!=============================== +! cu-cires ugwp-scheme +! initialization of selected +! init gw-solvers (1,2,3,4) +! init gw-source specifications +! init gw-background dissipation +!============================== +! +! Part-0 specifications of common constants, limiters and "criiical" values +! +! + + module ugwp_common +! +! use machine, only : kind_phys +! use physcons, only : pi => con_pi, grav => con_g, rd => con_rd, & +! rv => con_rv, cpd => con_cp, fv => con_fvirt,& +! arad => con_rerth + implicit none + + real, parameter :: grav =9.81, cpd = 1004. + real, parameter :: rd = 287.0 , rv =461.5 + real, parameter :: grav2 = grav + grav + real, parameter :: rgrav = 1.0/grav, rgrav2= rgrav*rgrav + + real, parameter :: fv = rv/rd - 1.0 + real, parameter :: rdi = 1.0 / rd, rcpd = 1./cpd, rcpd2 = 0.5/cpd + real, parameter :: gor = grav/rd + real, parameter :: gr2 = grav*gor + real, parameter :: grcp = grav*rcpd, gocp = grcp + real, parameter :: rcpdl = cpd*rgrav ! 1/[g/cp] == cp/g + real, parameter :: grav2cpd = grav*grcp ! g*(g/cp)= g^2/cp + + real, parameter :: pi = 4.*atan(1.0), pi2 = 2.*pi, pih = .5*pi + real, parameter :: rad_to_deg=180.0/pi, deg_to_rad=pi/180.0 + + real, parameter :: arad = 6370.e3 +! + real, parameter :: bnv2min = (pi2/1800.)*(pi2/1800.) + real, parameter :: bnv2max = (pi2/30.)*(pi2/30.) + + real, parameter :: dw2min=1.0, velmin=sqrt(dw2min), minvel = 0.5 + real, parameter :: omega1 = pi2/86400. + real, parameter :: omega2 = 2.*omega1, omega3 = 3.*omega1 + real, parameter :: hpscale= 7000., rhp=1./hpscale, rhp2=.5*rhp, rh4 = 0.25*rhp + real, parameter :: mkzmin = pi2/80.0e3, mkz2min = mkzmin*mkzmin + real, parameter :: mkzmax = pi2/500., mkz2max = mkzmax*mkzmax + real, parameter :: cdmin = 2.e-2/mkzmax + end module ugwp_common +! +! +!=================================================== +! +!Part-1 init => wave dissipation + RFriction +! +!=================================================== + subroutine init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) + + use ugwp_common, only : pih + + + implicit none + integer , intent(in) :: me, master + integer , intent(in) :: levs + real, intent(in) :: pa_rf, tau_rf + real, intent(in) :: zkm(levs), pmb(levs) ! in km-Pa + real, intent(out), dimension(levs+1) :: kvg, ktg, krad, kion +! +!locals + data +! + integer :: k + real, parameter :: vusurf = 2.e-5 + real, parameter :: musurf = vusurf/1.95 + real, parameter :: hpmol = 8.5 +! + real, parameter :: kzmin = 0.1 + real, parameter :: kturbo = 100. + real, parameter :: zturbo = 130. + real, parameter :: zturw = 30. + real, parameter :: inv_pra = 3. !kt/kv =inv_pr +! + real, parameter :: alpha = 1./86400./15. ! height variable see Zhu-1993 from 60-days => 6 days + real :: pa_alp = 750. ! super-RF parameters + real :: tau_alp = 10. ! days (750 Pa /10days) +! + real, parameter :: kdrag = 1./86400./30. !parametrization for WAM for FV3GFS SuperRF + real, parameter :: zdrag = 100. + real, parameter :: zgrow = 50. +! + real :: vumol, mumol, keddy, ion_drag + real :: rf_fv3, rtau_fv3, ptop, pih_dlog +! + real :: ae1 ,ae2 + pa_alp = pa_rf + tau_alp = tau_rf + + ptop = pmb(levs) + rtau_fv3 = 1./86400./tau_alp + pih_dlog = pih/log(pa_alp/ptop) + + do k=1, levs + ae1 = -zkm(k)/hpmol + vumol = vusurf*exp(ae1) + mumol = musurf*exp(ae1) + ae2 = -((zkm(k)-zturbo) /zturw)**2 + keddy = kturbo*exp(ae2) + + kvg(k) = vumol + keddy + ktg(k) = mumol + keddy*inv_pra + + krad(k) = alpha +! + ion_drag = kdrag +! + kion(k) = ion_drag! +! add Rayleigh_Super of FV3 for pmb < pa_alp +! + if (pmb(k) .le. pa_alp) then + rf_fv3=rtau_fv3*sin(pih_dlog*log(pa_alp/pmb(k)))**2 + krad(k) = krad(k) + rf_fv3 + kion(k) = kion(k) + rf_fv3 + + endif + +! write(6,132) zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k) + enddo + + k= levs+1 + kion(k) = kion(k-1) + krad(k) = krad(k-1) + kvg(k) = kvg(k-1) + ktg(k) = ktg(k-1) + if (me == master) then + write(6, * ) ' zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k) ' + do k=1, levs, 1 + write(6,132) zkm(k), kvg(k), kvg(k)*(6.28/5000.)**2, kion(k), pmb(k) + enddo + endif +! + 132 format( 2x, F8.3,' dis-scales:', 4(2x, E10.3)) + + end subroutine init_global_gwdis +! +! + subroutine rf_damp_init(levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) + implicit none + + integer :: levs + real :: pa_rf, tau_rf + real :: dtp + + real :: pmb(levs) + real :: rfdis(levs), rfdist(levs) + integer :: levs_rf + + real :: krf, krfz + integer :: k +! + rfdis(1:levs) = 1.0 + rfdist(1:levs) = 0.0 + levs_rf = levs + if (tau_rf <= 0.0 .or. pa_rf == 0.0) return + + krf = 1.0/(tau_rf*86400.0) + + do k=levs, 1, -1 + if(pmb(k) < pa_rf ) then ! applied only on constant pressure surfaces fixed pmb in "Pa" + krfz = krf*log(pa_rf/pmb(k)) + rfdis(k) = 1.0/(1.+krfz*dtp) + rfdist(k) = (rfdis(k) -1.0)/dtp ! du/dtp + levs_rf = k + endif + enddo + + end subroutine rf_damp_init +! ======================================================================== +! Part 2 - sources +! wave sources +! ======================================================================== +! +! ugwp_oro_init +! +!========================================================================= + module ugwp_oro_init + + use ugwp_common, only : bnv2min, grav, grcp, fv, grav, cpd, grcp, pi + use ugwp_common, only : mkzmin, mkz2min + implicit none +! +! constants and "crirtical" values to run oro-mtb_gw physics +! +! choice of oro-scheme: strver = 'vay_2018' , 'gfs_2018', 'kdn_2005', 'smc_2000' +! +! + real, parameter :: hncrit=9000. ! max value in meters for elvmax + real, parameter :: hminmt=50. ! min mtn height (*j*) + real, parameter :: sigfac=4.0 ! mb3a expt test for elvmax factor +! +! + real, parameter :: minwnd=1.0 ! min wind component (*j*) + real, parameter :: dpmin=5000.0 ! minimum thickness of the reference layer in pa + real, parameter :: hpmax=2400.0, hpmin=25.0 + + character(len=8) :: strver = 'gfs_2018' + character(len=8) :: strbase = 'gfs_2018' + real, parameter :: rimin=-10., ric=0.25 + +! + real, parameter :: efmin=0.5, efmax=10.0 + + + real, parameter :: sigma_std=1./100., gamm_std=1.0 + + real, parameter :: frmax=10., frc =1.0, frmin =0.01 +! + + real, parameter :: ce=0.8, ceofrc=ce/frc, cg=0.5 + real, parameter :: gmax=1.0, veleps=1.0, factop=0.5 +! + real, parameter :: rlolev=50000.0 +! + + +! hncrit set to 8000m and sigfac added to enhance elvmax mtn hgt + + + + real, parameter :: kxoro=6.28e-3/200. ! + real, parameter :: coro = 0.0 + integer, parameter :: nridge=2 + + real :: cdmb ! scale factors for mtb + real :: cleff ! scale factors for orogw + integer :: nworo ! number of waves + integer :: nazoro ! number of azimuths + integer :: nstoro ! flag for stochastic launch above SG-peak + + integer, parameter :: mdir = 8 + real, parameter :: fdir=.5*mdir/pi + + integer nwdir(mdir) + data nwdir/6,7,5,8,2,3,1,4/ + save nwdir + + real, parameter :: odmin = 0.1, odmax = 10.0 +!------------------------------------------------------------------------------ +! small-scale orography parameters for TOFD of Beljaars et al., 2004, QJRMS +!------------------------------------------------------------------------------ + + integer, parameter :: n_tofd = 2 ! depth of SSO for TOFD compared with Zpbl + real, parameter :: const_tofd = 0.0759 ! alpha*beta*Cmd*Ccorr*2.109 = 12.*1.*0.005*0.6*2.109 = 0.0759 + real, parameter :: ze_tofd = 1500.0 ! BJ's z-decay in meters + real, parameter :: a12_tofd = 0.0002662*0.005363 ! BJ's k-spect const for sigf2 * a1*a2*exp(-[z/zdec]**1.5] + real, parameter :: ztop_tofd = 10.*ze_tofd ! no TOFD > this height too higher 15 km +!------------------------------------------------------------------------------ +! + real, parameter :: fcrit_sm = 0.7, fcrit_sm2 = fcrit_sm * fcrit_sm + real, parameter :: fcrit_gfs = 0.7 + real, parameter :: fcrit_mtb = 0.7 + + real, parameter :: zbr_pi = (1.0/2.0)*pi + real, parameter :: zbr_ifs = 0.5*pi + + contains +! + subroutine init_oro_gws(nwaves, nazdir, nstoch, effac, & + lonr, kxw, cdmbgwd ) +! +! + integer :: nwaves, nazdir, nstoch + integer :: lonr + real :: cdmbgwd(2) ! scaling factors for MTb (1) & (2) for cleff = cleff * cdmbgwd(2) + ! high res-n "larger" MTB and "less-active" cleff in GFS-2018 + real :: cdmbX + real :: kxw + real :: effac ! it is analog of cdmbgwd(2) for GWs, off for now +!-----------------------------! GFS-setup for cdmb & cleff +! cdmb = 4.0 * (192.0/IMX) +! cleff = 0.5E-5 / SQRT(IMX/192.0) = 0.5E-5*SQRT(192./IMX) +! + real, parameter :: lonr_refmb = 4.0 * 192.0 + real, parameter :: lonr_refgw = 192.0 + +! copy to "ugwp_oro_init" => nwaves, nazdir, nstoch + + nworo = nwaves + nazoro = nazdir + nstoro = nstoch + + cdmbX = lonr_refmb/float(lonr) + cdmb = cdmbX + if (cdmbgwd(1) >= 0.0) cdmb = cdmb * cdmbgwd(1) + + cleff = 0.5e-5 * sqrt(lonr_refgw/float(lonr)) !* effac + +!!! cleff = kxw * sqrt(lonr_refgw/float(lonr)) !* effac + + if (cdmbgwd(2) >= 0.0) cleff = cleff * cdmbgwd(2) +! +!.................................................................... +! higher res => smaller h' ..&.. higher kx +! flux_gwd ~ 'u'^2*kx/kz ~kxu/n ~1/dx *u/n tau ~ h'*h'*kx*kx = const (h'-less kx-grow) +!.................................................................... +! +! print *, ' init_oro_gws 2-1cdmb', cdmbgwd(2), cdmbgwd(1) + end subroutine init_oro_gws +! + + end module ugwp_oro_init +! ========================================================================= +! +! ugwp_conv_init +! +!========================================================================= + module ugwp_conv_init + + implicit none + real :: eff_con ! scale factors for conv GWs + integer :: nwcon ! number of waves + integer :: nazcon ! number of azimuths + integer :: nstcon ! flag for stochastic choice of launch level above Conv-cloud + real :: con_dlength + real :: con_cldf + + real, parameter :: cmin = 5 !2.5 + real, parameter :: cmax = 95. !82.5 + real, parameter :: cmid = 22.5 + real, parameter :: cwid = cmid + real, parameter :: bns = 2.e-2, bns2 = bns*bns, bns4=bns2*bns2 + real, parameter :: mstar = 6.28e-3/2. ! 2km + real :: dc + + real, allocatable :: ch_conv(:), spf_conv(:) + real, allocatable :: xaz_conv(:), yaz_conv(:) + contains +! + subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, & + lonr, kxw, cgwf) + use ugwp_common, only : pi2, arad + implicit none + + integer :: nwaves, nazdir, nstoch + integer :: lonr + real :: cgwf(2) + real :: kxw, effac + real :: work1 = 0.5 + real :: chk, tn4, snorm + integer :: k + + nwcon = nwaves + nazcon = nazdir + nstcon = nstoch + eff_con = effac + + con_dlength = pi2*arad/float(lonr) + con_cldf = cgwf(1) * work1 + cgwf(2) *(1.-work1) +! +! allocate & define spectra in "selected direction": "dc" "ch(nwaves)" +! + if (.not. allocated(ch_conv)) allocate (ch_conv(nwaves)) + if (.not. allocated(spf_conv)) allocate (spf_conv(nwaves)) + if (.not. allocated(xaz_conv)) allocate (xaz_conv(nazdir)) + if (.not. allocated(yaz_conv)) allocate (yaz_conv(nazdir)) + + dc = (cmax-cmin)/float(nwaves-1) +! +! we may use different spectral "shapes" +! for example FVS-93 "Desabeius" +! E(s=1, t=3,m, w, k) ~ m^s/(m*^4 + m^4) ~ m^-3 saturated tail +! + do k = 1,nwaves + chk = cmin + (k-1)*dc + tn4 = (mstar*chk)**4 + ch_conv(k) = chk + spf_conv(k) = bns4*chk/(bns4+tn4) + enddo + + snorm = sum(spf_conv) + spf_conv = spf_conv/snorm*1.5 + + call init_nazdir(nazdir, xaz_conv, yaz_conv) + end subroutine init_conv_gws + + + end module ugwp_conv_init +!========================================================================= +! +! ugwp_fjet_init +! +!========================================================================= + + module ugwp_fjet_init + implicit none + real :: eff_fj ! scale factors for conv GWs + integer :: nwfj ! number of waves + integer :: nazfj ! number of azimuths + integer :: nstfj ! flag for stochastic choice of launch level above Conv-cloud +! + real, parameter :: fjet_trig=0. ! if ( abs(frgf) > fjet_trig ) launch GW-packet + + + real, parameter :: cmin = 2.5 + real, parameter :: cmax = 67.5 + real :: dc + real, allocatable :: ch_fjet(:) , spf_fjet(:) + real, allocatable :: xaz_fjet(:), yaz_fjet(:) + contains + subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) + use ugwp_common, only : pi2, arad + implicit none + + integer :: nwaves, nazdir, nstoch + integer :: lonr + real :: kxw, effac , chk + + integer :: k + + nwfj = nwaves + nazfj = nazdir + nstfj = nstoch + eff_fj = effac + + if (.not. allocated(ch_fjet)) allocate (ch_fjet(nwaves)) + if (.not. allocated(spf_fjet)) allocate (spf_fjet(nwaves)) + if (.not. allocated(xaz_fjet)) allocate (xaz_fjet(nazdir)) + if (.not. allocated(yaz_fjet)) allocate (yaz_fjet(nazdir)) + + dc = (cmax-cmin)/float(nwaves-1) + do k = 1,nwaves + chk = cmin + (k-1)*dc + ch_fjet(k) = chk + spf_fjet(k) = 1.0 + enddo + call init_nazdir(nazdir, xaz_fjet, yaz_fjet) + + end subroutine init_fjet_gws + + end module ugwp_fjet_init +! +!========================================================================= +! +! + module ugwp_okw_init +!========================================================================= + implicit none + + real :: eff_okw ! scale factors for conv GWs + integer :: nwokw ! number of waves + integer :: nazokw ! number of azimuths + integer :: nstokw ! flag for stochastic choice of launch level above Conv-cloud +! + real, parameter :: okw_trig=0. ! if ( abs(okwp) > okw_trig ) launch GW-packet + + real, parameter :: cmin = 2.5 + real, parameter :: cmax = 67.5 + real :: dc + real, allocatable :: ch_okwp(:), spf_okwp(:) + real, allocatable :: xaz_okwp(:), yaz_okwp(:) + + contains +! + subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) + + use ugwp_common, only : pi2, arad + implicit none + + integer :: nwaves, nazdir, nstoch + integer :: lonr + real :: kxw, effac , chk + + integer :: k + + nwokw = nwaves + nazokw = nazdir + nstokw = nstoch + eff_okw = effac + + if (.not. allocated(ch_okwp)) allocate (ch_okwp(nwaves)) + if (.not. allocated(spf_okwp)) allocate (spf_okwp(nwaves)) + if (.not. allocated(xaz_okwp)) allocate (xaz_okwp(nazdir)) + if (.not. allocated(yaz_okwp)) allocate (yaz_okwp(nazdir)) + dc = (cmax-cmin)/float(nwaves-1) + do k = 1,nwaves + chk = cmin + (k-1)*dc + ch_okwp(k) = chk + spf_okwp(k) = 1. + enddo + + call init_nazdir(nazdir, xaz_okwp, yaz_okwp) + + end subroutine init_okw_gws + + end module ugwp_okw_init + +!=============================== end of GW sources +! +! init specific gw-solvers (1,2,3,4) +! + +!=============================== +! Part -3 init wave solvers +!=============================== + + module ugwp_lsatdis_init + implicit none + + integer :: nwav, nazd + integer :: nst + real :: eff + integer, parameter :: incdim = 4, iazdim = 4 +! + contains + + subroutine initsolv_lsatdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) + + implicit none +! + integer :: me, master + integer :: nwaves, nazdir + integer :: nstoch + real :: effac + logical :: do_physb + real :: kxw +! +!locals: define azimuths and Ch(nwaves) - domain when physics-based soureces +! are not actibve +! + integer :: inc, jk, jl, iazi, i, j, k + + if( nwaves == 0 .or. nstoch == 1 ) then +! redefine from the default + nwav = incdim + nazd = iazdim + nst = 0 + eff = 1.0 + else +! from input_nml multi-wave spectra + nwav = nwaves + nazd = nazdir + nst = nstoch + eff = effac + endif +! + end subroutine initsolv_lsatdis +! + end module ugwp_lsatdis_init +! +! + module ugwp_wmsdis_init + + use ugwp_common, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4, omega2 + use ugwp_common, only : bnv2max, bnv2min, minvel + use ugwp_common, only : mkzmin, mkz2min, mkzmax, mkz2max, cdmin + implicit none + + real, parameter :: maxdudt = 250.e-5, maxdtdt=15.e-2 + real, parameter :: dked_min =0.01, dked_max=250.0 + + real, parameter :: gptwo=2.0 + + real , parameter :: bnfix = pi2/300., bnfix2= bnfix * bnfix + real , parameter :: bnfix4 = bnfix2 * bnfix2 + real , parameter :: bnfix3 = bnfix2 * bnfix +! +! make parameter list that will be passed to SOLVER +! +! integer, parameter :: klaunch=55 ! 32 - ~ 1km ;55 - 5.5 km ; 52 4.7km ; 60-7km index for selecting launch level +! integer, parameter :: ilaunch=klaunch + + integer , parameter :: iazidim=4 ! number of azimuths + integer , parameter :: incdim=25 ! number of discrete cx - spectral elements in launch spectrum + real , parameter :: ucrit=cdmin + + real , parameter :: zcimin = 2.5 + real , parameter :: zcimax = 125.0 + real , parameter :: zgam = 0.25 +! +! Verical spectra +! + real , parameter :: pind_wd = 5./3. + real , parameter :: sind_kz = 1. + real , parameter :: tind_kz = 3. + real , parameter :: stind_kz = sind_kz + tind_kz +! +! from kmob_ugwp namelist +! + real :: nslope ! the GW sprctral slope at small-m + real :: lzstar + real :: lzmin + real :: lzmax + real :: lhmet + real :: tamp_mpa !amplitude for GEOS-5/MERRA-2 + real :: tau_min ! min of GW MF 0.25 mPa + integer :: ilaunch + real :: gw_eff + + real :: v_kxw, rv_kxw, v_kxw2 + + + +!=========================================================================== + integer :: nwav, nazd, nst + real :: eff + + real :: zaz_fct, zms + real, allocatable :: zci(:), zci4(:), zci3(:),zci2(:), zdci(:) + real, allocatable :: zcosang(:), zsinang(:) + real, allocatable :: lzmet(:), czmet(:), mkzmet(:), dczmet(:), dmkz(:) + +! +! GW-eddy constants for wave-mode dissipation by background and stability of +! "final" flow after application of GW-effects +! + real, parameter :: iPr_pt = 0.5 + real, parameter :: lturb = 30., sc2 = lturb*lturb ! stable on 80-km TL lmix ~ 500 met. + real, parameter :: ulturb=150., sc2u = ulturb* ulturb ! unstable + real, parameter :: ric =0.25 + real, parameter :: rimin = -10., prmin = 0.25 + real, parameter :: prmax = 4.0 +! + contains +!============================================================================ + subroutine initsolv_wmsdis(me, master, nwaves, nazdir, nstoch, effac, do_physb, kxw) + +! call initsolv_wmsdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & +! knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw) +! + implicit none +! +!input -control for solvers: +! nwaves, nazdir, nstoch, effac, do_physb, kxw +! +! + integer :: me, master, nwaves, nazdir, nstoch + real :: effac, kxw + logical :: do_physb + real :: dlzmet +! +!locals +! + integer :: inc, jk, jl, iazi +! + real :: zang, zang1, znorm + real :: zx1, zx2, ztx, zdx, zxran, zxmin, zxmax, zx, zpexp + real :: fpc, fpc_dc + real :: ae1,ae2 + if( nwaves == 0) then +! +! redefine from the deafault +! + nwav = incdim + nazd = iazidim + nst = 0 + eff = 1.0 + gw_eff = eff + else +! +! from input.nml +! + nwav = nwaves + nazd = nazdir + nst = nstoch + gw_eff = effac + endif + + + v_kxw = pi2/lhmet ; v_kxw2 = v_kxw*v_kxw + rv_kxw = 1./v_kxw + + allocate ( zci(nwav), zci4(nwav), zci3(nwav),zci2(nwav), zdci(nwav) ) + allocate ( zcosang(nazd), zsinang(nazd) ) + allocate (lzmet(nwav), czmet(nwav), mkzmet(nwav), dczmet(nwav), dmkz(nwav) ) + + if (me == master) then + print *, 'ugwp_v1: init_gw_wmsdis_control ' +! + print *, 'ugwp_v1: WMS_DIS launch layer ', ilaunch + print *, 'ugwp_v1: WMS_DIS tot_mflux in mpa', tamp_mpa*1000. + print *, 'ugwp_v1: WMS_DIS lhmet in km ' , lhmet*1.e-3 + endif + + zpexp = gptwo * 0.5 ! gptwo=2 , zpexp = 1. + +! +! set up azimuth directions and some trig factors +! +! + zang = pi2 / float(nazd) + +! get normalization factor to ensure that the same amount of momentum +! flux is directed (n,s,e,w) no mater how many azimuths are selected. +! + znorm = 0.0 + do iazi=1, nazd + zang1 = (iazi-1)*zang + zcosang(iazi) = cos(zang1) + zsinang(iazi) = sin(zang1) + znorm = znorm + abs(zcosang(iazi)) + enddo +! zaz_fct = 1.0 + zaz_fct = 2.0 / znorm ! correction factor for azimuthal sums + +! define coordinate transform for "Ch" ....x = 1/c stretching transform +! ----------------------------------------------- +! +! x=1/Cphase transform +! see eq. 28-30 Scinocca 2003. x = 1/c stretching transform +! + zxmax = 1.0 / zcimin + zxmin = 1.0 / zcimax + zxran = zxmax - zxmin + zdx = zxran / real(nwav-1) ! dkz +! + ae1=zxran/zgam + zx1 = zxran/(exp(ae1)-1.0 ) ! zgam =1./4. + zx2 = zxmin - zx1 + +! +! computations for zci =1/zx, stretching "accuracy" is not "accurate" spectra transform +! it represents additional "empirical" redistribution of "spectral" mode in C-space +! + zms = pi2 / lzstar + + do inc=1, nwav + ztx = real(inc-1)*zdx+zxmin + ae1 = (ztx-zxmin)/zgam + zx = zx1*exp(ae1)+zx2 !eq.(29-30),Scinocca-2003 + zci(inc) = 1.0 /zx ! + zdci(inc) = zci(inc)**2*(zx1/zgam)*exp(ae1)*zdx ! + zci4(inc) = (zms*zci(inc))**4 + zci2(inc) = (zms*zci(inc))**2 + zci3(inc) = (zms*zci(inc))**3 + enddo +! +! +! alternatuve lzmax-lzmin +! +! + dlzmet = (lzmax-lzmin)/ real(nwav-1) + do inc=1, nwav + lzmet(inc) = lzmin + (inc-1)*dlzmet + mkzmet(inc) = pi2/lzmet(inc) + zci(inc) =lzmet(inc)/(pi2/bnfix) + zci4(inc) = (zms*zci(inc))**4 + zci2(inc) = (zms*zci(inc))**2 + zci3(inc) = (zms*zci(inc))**3 + + enddo + + zdx = (zci(nwav)-zci(1))/ real(nwav-1) + + + if (me == master) then + print * + print *, 'ugwp_v0: zcimin=' , zcimin + print *, 'ugwp_v0: zcimax=' , zcimax + print *, 'ugwp_v0: zgam= ', zgam + print * + +! print *, ' ugwp_v1 nslope=', nslope + print * + print *, 'ugwp_v1: zcimin/zci=' , maxval(zci) + print *, 'ugwp_v1: zcimax/zci=' , minval(zci) + print *, 'ugwp_v1: cd_crit=', ucrit + print *, 'ugwp_v1: launch_level', ilaunch + print *, ' ugwp_v1 lzstar=', lzstar + print *, ' ugwp_v1 nslope=', nslope + + print * + do inc=1, nwav + zdci(inc) = zdx + if (nslope == 1) fpc = bnfix4*zci(inc)/ (bnfix4+zci4(inc)) + if (nslope == 0) fpc = bnfix3*zci(inc)/ (bnfix3+zci3(inc)) + fpc_dc = fpc * zdci(inc) + write(6,111) inc, zci(inc), zdci(inc),ucrit, fpc, fpc_dc, 6.28e-3/bnfix*zci(inc) + enddo + endif + 111 format( 'wms-zci', i4, 7 (3x, F8.3)) + + end subroutine initsolv_wmsdis +! +! make a list of all-initilized parameters needed for "gw_solver_wmsdis" +! + + end module ugwp_wmsdis_init +!========================================================================= +! +! work TODO for 2-extra WAM-solvers: +! DSPDIS (Hines)+ADODIS (Alexander-Dunkerton-Ortland) +! +!========================================================================= + subroutine init_dspdis + implicit none + end subroutine init_dspdis + + subroutine init_adodis + implicit none + end subroutine init_adodis + diff --git a/physics/cires_ugwp_module_v1.F90 b/physics/cires_ugwp_module_v1.F90 new file mode 100644 index 000000000..ecc00ecfb --- /dev/null +++ b/physics/cires_ugwp_module_v1.F90 @@ -0,0 +1,666 @@ + +module cires_ugwp_module_v1 + +! +! driver is called after pbl & before chem-parameterizations +! it uses ugwp_common (like phys_cons) and some module-param od solvers/sources init-modules +!.................................................................................... +! order = dry-adj=>conv=mp-aero=>radiation -sfc/land- chem -> vertdiff-> [rf-gws]=> ion-re +!................................................................................... +! +! + use ugwp_common, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4 + implicit none + logical :: module_is_initialized +!logical :: do_ugwp = .false. ! control => true - ugwp false old gws + rayeleigh friction + character(len=8) :: strsolver='pss-1986' + logical :: do_physb_gwsrcs = .false. ! control for physics-based GW-sources + logical :: do_rfdamp = .false. ! control for Rayleigh friction inside ugwp_driver + integer, parameter :: idebug_gwrms=1 ! control for diag computaions pw wind-temp GW-rms and MF fluxs + logical, parameter :: do_adjoro = .false. + real, parameter :: max_kdis = 250. ! 400 m2/s + real, parameter :: max_axyz = 250.e-5 ! 400 m/s/day + real, parameter :: max_eps = max_kdis*4.e-7 ! ~16 K/day max_kdis*BN2/cp + real, parameter :: maxdudt = max_axyz + real, parameter :: maxdtdt = max_eps + real, parameter :: dked_min = 0.01 + real, parameter :: dked_max = max_kdis + + + real, parameter :: hps = hpscale + real, parameter :: hpskm = hps/1000. +! + + real, parameter :: ricrit = 0.25 + real, parameter :: frcrit = 0.50 + real, parameter :: linsat = 1.00 + real, parameter :: linsat2 = linsat*linsat +! +! integer :: curday_ugwp ! yyyymmdd 20150101 +! integer :: ddd_ugwp ! ddd of year from 1-366 + + integer :: knob_ugwp_solver=1 ! 1, 2, 3, 4 - (linsat, ifs_2010, ad_gfdl, dsp_dis) + integer, dimension(4) :: knob_ugwp_source ! [1,1,1,0] - (oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_wvspec ! number of waves for- (oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_azdir ! number of wave azimuths for- (oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_stoch ! 1 - deterministic ; 0 - stochastic + real, dimension(4) :: knob_ugwp_effac ! efficiency factors for- (oro, fronts, conv, imbf-owp] + + integer :: knob_ugwp_doaxyz=1 ! 1 -gwdrag + integer :: knob_ugwp_doheat=1 ! 1 -gwheat + integer :: knob_ugwp_dokdis=0 ! 1 -gwmixing + integer :: knob_ugwp_ndx4lh = 2 ! n-number of "unresolved" "n*dx" for lh_gw + integer :: knob_ugwp_nslope = 1 ! spectral"growth" S-slope of GW-energy spectra mkz^S + + real :: knob_ugwp_palaunch = 500.e2 ! fixed pressure layer in Pa for "launch" of NGWs + real :: knob_ugwp_lzmax = 12.5e3 ! 12.5 km max-VERT-WL of GW-spectra + real :: knob_ugwp_lzstar = 2.0e3 ! UTLS mstar = 6.28/lzstar 2-2.5 km + real :: knob_ugwp_lzmin = 1.5e3 ! 1.5 km min-VERT-WL of GW-spectra + real :: knob_ugwp_taumin = 0.25e-3 + real :: knob_ugwp_tauamp = 7.75e-3 ! range from 30.e-3 to 3.e-3 ( space-borne values) + real :: knob_ugwp_lhmet = 200.e3 ! 200 km + real :: knob_ugwp_tlimb = .true. +! + real :: kxw = pi2/200.e3 ! single horizontal wavenumber of ugwp schemes +! +! tune-ups for qbo +! + real :: knob_ugwp_qbolev = 500.e2 ! fixed pressure layer in Pa for "launch" of conv-GWs + real :: knob_ugwp_qbosin = 1.86 ! semiannual cycle of tau_qbo_src in radians + real :: knob_ugwp_qbotav = 2.285e-3 ! additional to "climate" for QBO-sg forcing + real :: knob_ugwp_qboamp = 1.191e-3 ! additional to "climate" QBO + real :: knob_ugwp_qbotau = 10. ! relaxation time scale in days + real :: knob_ugwp_qbolat = 15. ! qbo-domain for extra-forcing + real :: knob_ugwp_qbowid = 7.5 ! qbo-attenuation for extra-forcing + character(len=8) :: knob_ugwp_orosolv='pss-1986' + + character(len=255) :: ugwp_qbofile = 'qbo_zmf_2009_2018.nc' + character(len=255) :: ugwp_taufile = 'ugwp_limb_tau.nc' + +! character(len=250) :: knob_ugwp_qbofile='qbo_zmf_2009_2018.nc'! +! character(len=250) :: knob_ugwp_amffile='mern_zmf_amf_12month.nc' +! character(len=255) :: file_limb_tab='ugwp_limb_tau.nc' + +! integer, parameter :: ny_tab=73, nt_tab=14 +! real, parameter :: rdy_tab = 1./2.5, rdd_tab = 1./30. +! real :: days_tab(nt_tab), lat_tab(ny_tab) +! real :: abmf_tab(ny_tab,nt_tab) + + integer :: ugwp_azdir + integer :: ugwp_stoch + + integer :: ugwp_src + integer :: ugwp_nws + real :: ugwp_effac + +! + data knob_ugwp_source / 1,0, 1, 0 / ! oro-conv-fjet-okw-taub_lat: 1-active 0-off + data knob_ugwp_wvspec /1,32,32,32/ ! number of waves for- (oro, fronts, conv, imbf-owp, taulat] + data knob_ugwp_azdir /2, 4, 4,4/ ! number of wave azimuths for- (oro, fronts, conv, imbf-okwp] + data knob_ugwp_stoch /0, 0, 0,0/ ! 0 - deterministic ; 1 - stochastic, non-activated option + data knob_ugwp_effac /1.,1.,1.,1./ ! efficiency factors for- (oro, fronts, conv, imbf-owp] + integer :: knob_ugwp_version = 0 + integer :: launch_level = 55 +! + namelist /cires_ugwp_nml/ knob_ugwp_solver, knob_ugwp_source,knob_ugwp_wvspec, knob_ugwp_azdir, & + knob_ugwp_stoch, knob_ugwp_effac,knob_ugwp_doaxyz, knob_ugwp_doheat, knob_ugwp_dokdis, & + knob_ugwp_ndx4lh, knob_ugwp_version, knob_ugwp_palaunch, knob_ugwp_nslope, knob_ugwp_lzmax, & + knob_ugwp_lzmin, knob_ugwp_lzstar, knob_ugwp_lhmet, knob_ugwp_tauamp, knob_ugwp_taumin, & + knob_ugwp_qbolev, knob_ugwp_qbosin, knob_ugwp_qbotav, knob_ugwp_qboamp, knob_ugwp_qbotau, & + knob_ugwp_qbolat, knob_ugwp_qbowid, knob_ugwp_tlimb, knob_ugwp_orosolv + +!&cires_ugwp_nml +! knob_ugwp_solver=2 +! knob_ugwp_source=1,1,1,0 +! knob_ugwp_wvspec=1,32,32,32 +! knob_ugwp_azdir =2, 4, 4,4 +! knob_ugwp_stoch =0, 0, 0,0 +! knob_ugwp_effac=1, 1, 1,1 +! knob_ugwp_doaxyz=1 +! knob_ugwp_doheat=1 +! knob_ugwp_dokdis=0 +! knob_ugwp_ndx4lh=4 +!/ +! +! allocatable arrays, initilized during "cires_ugwp_init" & +! released during "cires_ugwp_finalize" +! + real, allocatable :: kvg(:), ktg(:), krad(:), kion(:) + real, allocatable :: zkm(:), pmb(:) + real, allocatable :: rfdis(:), rfdist(:) + integer :: levs_rf + real :: pa_rf, tau_rf +! +! tabulated GW-sources +! + integer :: ntau_d1y, ntau_d2t, nqbo_d1y, nqbo_d2z, nqbo_d3t + real, allocatable :: ugwp_taulat(:), ugwp_qbolat(:) + real, allocatable :: tau_limb(:,:), days_limb(:) + real, allocatable :: uzmf_merra(:,:,:), days_merra(:), pmb127(:) + real, allocatable :: uqboe(:,:) + real, allocatable :: days_y4ddd(:), zkm127(:) + real, allocatable :: tau_qbo(:), stau_qbo(:) + integer,allocatable :: days_y4md(:) + real, allocatable :: vert_qbo(:) + +! +! limiters +! + real, parameter :: latqbo =20., widqbo=15., taurel = 21600. + integer, parameter :: kz2 = 127-7, kz1= 127-49, kz5=5 ! 64km - 18km +! + +!====================================================================== + real, parameter :: F_coriol=1 ! Coriolis effects + real, parameter :: F_nonhyd=1 ! Nonhydrostatic waves + real, parameter :: F_kds =0 ! Eddy mixing due to GW-unstable below + real, parameter :: iPr_ktgw =1./3., iPr_spgw=iPr_ktgw + real, parameter :: iPr_turb =1./3., iPr_mol =1.95 + real, parameter :: rhp1=1./hps, rh2=0.5*rhp1, rhp4 = rh2*rh2 + real, parameter :: khp = 0.287*rhp1 ! R/Cp/Hp + real, parameter :: cd_ulim = 1.0 ! critical level precision or Lz ~ 0 ~dz of model + + contains +! +! ----------------------------------------------------------------------- +! +! init of cires_ugwp (_init) called from CCPP cap file +! +! ----------------------------------------------------------------------- + + + + subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & + lonr, latr, levs, ak, bk, pref, dtp, cdmvgwd, cgwf, & + pa_rf_in, tau_rf_in) +! +! input_nml_file ='input.nml'=fn_nml ..... OLD_namelist and cdmvgwd(4) Corrected Bug Oct 4 +! + ! use netcdf + use ugwp_oro_init, only : init_oro_gws + use ugwp_conv_init, only : init_conv_gws + use ugwp_fjet_init, only : init_fjet_gws + use ugwp_okw_init, only : init_okw_gws + use ugwp_wmsdis_init, only : initsolv_wmsdis + + use ugwp_lsatdis_init, only : initsolv_lsatdis + + + use ugwp_wmsdis_init, only : ilaunch, nslope, lhmet, lzmax, lzmin, lzstar + use ugwp_wmsdis_init, only : tau_min, tamp_mpa + implicit none + + integer, intent (in) :: me + integer, intent (in) :: master + integer, intent (in) :: nlunit + integer, intent (in) :: logunit + integer, intent (in) :: lonr + integer, intent (in) :: levs + integer, intent (in) :: latr + integer, intent (in) :: jdat_gfs(8) + real, intent (in) :: ak(levs+1), bk(levs+1), pref + real, intent (in) :: dtp + real, intent (in) :: cdmvgwd(2), cgwf(2) ! "scaling" controls for "old" GFS-GW dims(2) !!! + real, intent (in) :: pa_rf_in, tau_rf_in + + character(len=64), intent (in) :: fn_nml2 + character(len=64), parameter :: fn_nml='input.nml' + +! character, intent (in) :: input_nml_file +! integer, parameter :: logunit = 6 + integer :: ios + logical :: exists + real :: dxsg + + integer :: ncid, iernc, vid, dimid, status + integer :: k + integer :: ddd_ugwp, curday_ugwp + real :: avqbo(6) + avqbo = [0.05, 0.1, 0.25, 0.5, 0.75, 0.95] +! + if (me == master) print *, trim (fn_nml), ' GW-namelist file ' + inquire (file =trim (fn_nml) , exist = exists) +! + if (.not. exists) then + if (me == master) & + write (6, *) 'separate ugwp :: namelist file: ', trim (fn_nml), ' does not exist' + else + open (unit = nlunit, file = trim(fn_nml), action = 'read', status = 'old', iostat = ios) + endif + rewind (nlunit) + read (nlunit, nml = cires_ugwp_nml) + close (nlunit) +! + strsolver= knob_ugwp_orosolv + pa_rf = pa_rf_in + tau_rf = tau_rf_in + + curday_ugwp = jdat_gfs(1)*10000 + jdat_gfs(2)*100 +jdat_gfs(3) + call calendar_ugwp(jdat_gfs(1), jdat_gfs(2), jdat_gfs(3), ddd_ugwp) + +! write version number and namelist to log file + if (me == master) then + write (logunit, *) " ================================================================== " + write (logunit, *) "cires_ugwp_namelist_extended_v1" + write (logunit, nml = cires_ugwp_nml) + write (logunit, *) " ================================================================== " + + write (6, *) " ================================================================== " + write (6, *) "cires_ugwp_namelist_extended_v1" + write (6, nml = cires_ugwp_nml) + write (6, *) " ================================================================== " + write (6, *) "calendar_ugwp ddd_ugwp=", ddd_ugwp + write (6, *) "calendar_ugwp curday_ugwp=", curday_ugwp + write (6, *) " ================================================================== " + write (6, *) ddd_ugwp, ' jdat_gfs ddd of year ' + endif +! +! effective kxw - resolution-aware +! + dxsg = pi2*arad/float(lonr) * knob_ugwp_ndx4lh + kxw = pi2/knob_ugwp_lhmet +! +! kxw = pi2/dxsg +! +! init global background dissipation for ugwp -> 4d-variable for fv3wam linked with pbl-vert_diff +! + +! allocate(fcor(latr), fcor2(latr) ) +! + allocate( kvg(levs+1), ktg(levs+1) ) + allocate( krad(levs+1), kion(levs+1) ) + allocate( zkm(levs), pmb(levs) ) + allocate( rfdis(levs), rfdist(levs) ) + + allocate (vert_qbo(levs)) + +! +! ak -pa bk-dimensionless from surf => tol_lid_pressure =0 +! + + do k=1, levs + pmb(k) = 1.e0*(ak(k) + pref*bk(k)) ! Pa -unit Pref = 1.e5, pmb = Pa + zkm(k) = -hpskm*alog(pmb(k)/pref) + enddo + vert_qbo(1:levs) = 0. + + do k=kz1, kz2 + vert_qbo(k)=1. + if (k.le.(kz1+kz5)) vert_qbo(k) = avqbo(k+1-kz1) + if (k.ge.(kz2-kz5)) vert_qbo(k) = avqbo(kz2+1-k) + if (me == master) print *, 'vertqbo', vert_qbo(k), zkm(k) + enddo + +! +! find ilaunch +! + + do k=levs, 1, -1 + if (pmb(k) .gt. knob_ugwp_palaunch ) exit + enddo + + launch_level = max(k-1, 5) ! above 5-layers from the surface + +! +! Part-1 :init_global_gwdis +! + call init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) + call rf_damp_init (levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) +! +! Part-2 :init_SOURCES_gws +! + +! +! call init-solver for "stationary" multi-wave spectra and sub-grid oro +! + call init_oro_gws( knob_ugwp_wvspec(1), knob_ugwp_azdir(1), & + knob_ugwp_stoch(1), knob_ugwp_effac(1), lonr, kxw, cdmvgwd ) +! +! call init-sources for "non-sationary" multi-wave spectra +! + do_physb_gwsrcs=.true. + + IF (do_physb_gwsrcs) THEN + + if (me == master) print *, ' do_physb_gwsrcs ', do_physb_gwsrcs, ' in cires_ugwp_init ' + if (knob_ugwp_wvspec(4) > 0) then +! okw + call init_okw_gws(knob_ugwp_wvspec(4), knob_ugwp_azdir(4), & + knob_ugwp_stoch(4), knob_ugwp_effac(4), lonr, kxw ) + if (me == master) print *, ' init_okw_gws ' + endif + + if (knob_ugwp_wvspec(3) > 0) then +! fronts + call init_fjet_gws(knob_ugwp_wvspec(3), knob_ugwp_azdir(3), & + knob_ugwp_stoch(3), knob_ugwp_effac(3), lonr, kxw ) + if (me == master) print *, ' init_fjet_gws ' + endif + + if (knob_ugwp_wvspec(2) > 0) then +! conv + call init_conv_gws(knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & + knob_ugwp_stoch(2), knob_ugwp_effac(2), lonr, kxw, cgwf ) + if (me == master) & + print *, ' init_convective GWs cgwf', knob_ugwp_wvspec(2), knob_ugwp_azdir(2) + + endif + + ENDIF !IF (do_physb_gwsrcs) +! +! +! Tabulated sources +! +! goto 121 + + iernc=NF90_OPEN(trim(ugwp_taufile), nf90_nowrite, ncid) + + if(iernc.ne.0) then + write(6,*) + write(6,*) ' cannot open file_limb_tab data-file', trim(ugwp_taufile) + write(6,*) + stop + else + + + status = nf90_inq_dimid(ncid, "lat", DimID) +! if (status /= nf90_noerr) call handle_err(status) +! + status = nf90_inquire_dimension(ncid, DimID, len =ntau_d1y ) + + status = nf90_inq_dimid(ncid, "days", DimID) + status = nf90_inquire_dimension(ncid, DimID, len =ntau_d2t ) + if (me == master) print *, ntau_d1y, ntau_d2t, ' dimd-tlimb ' + allocate (ugwp_taulat(ntau_d1y ), days_limb(ntau_d2t)) + allocate ( tau_limb (ntau_d1y, ntau_d2t )) + + iernc=nf90_inq_varid( ncid, 'DAYS', vid ) + iernc= nf90_get_var( ncid, vid, days_limb) + iernc=nf90_inq_varid( ncid, 'LATS', vid ) + iernc= nf90_get_var( ncid, vid, ugwp_taulat) + iernc=nf90_inq_varid( ncid, 'ABSMF', vid ) + iernc= nf90_get_var( ncid, vid, tau_limb) + + iernc=nf90_close(ncid) + + endif +! + iernc=NF90_OPEN(trim(ugwp_qbofile), nf90_nowrite, ncid) + + if(iernc.ne.0) then + write(6,*) + write(6,*) ' cannot open qbofile data-file', trim(ugwp_qbofile) + write(6,*) + stop + else + + status = nf90_inq_dimid(ncid, "lat", DimID) + status = nf90_inquire_dimension(ncid, DimID, len =nqbo_d1y ) + status = nf90_inq_dimid(ncid, "lev", DimID) + status = nf90_inquire_dimension(ncid, DimID, len =nqbo_d2z) + status = nf90_inq_dimid(ncid, "days", DimID) + status = nf90_inquire_dimension(ncid, DimID, len =nqbo_d3t ) + if (me == master) print *, nqbo_d1y, nqbo_d2z, nqbo_d3t, ' dims tauqbo ' + allocate (ugwp_qbolat(nqbo_d1y ), days_merra(nqbo_d3t) ) + allocate (zkm127(nqbo_d2z), pmb127(nqbo_d2z)) + allocate ( uzmf_merra (nqbo_d1y, nqbo_d2z, nqbo_d3t )) + allocate ( uqboe (nqbo_d2z, nqbo_d3t )) + allocate (days_y4ddd(nqbo_d3t), days_y4md(nqbo_d3t) ) + allocate (tau_qbo(nqbo_d3t), stau_qbo(nqbo_d3t) ) + + iernc=nf90_inq_varid( ncid, 'DAYS', vid ) + iernc= nf90_get_var( ncid, vid, days_merra) + + iernc=nf90_inq_varid( ncid, 'Y4MD', vid ) + iernc= nf90_get_var( ncid, vid, days_y4md) + + iernc=nf90_inq_varid( ncid, 'Y4DDD', vid ) + iernc= nf90_get_var( ncid, vid, days_y4ddd) + + iernc=nf90_inq_varid( ncid, 'LATS', vid ) + iernc= nf90_get_var( ncid, vid, ugwp_qbolat) + + iernc=nf90_inq_varid( ncid, 'LEVS', vid ) + iernc= nf90_get_var( ncid, vid, zkm127) + + + iernc=nf90_inq_varid( ncid, 'UQBO', vid ) + iernc= nf90_get_var( ncid, vid, uzmf_merra) + + iernc=nf90_inq_varid( ncid, 'TAUQBO', vid ) + iernc= nf90_get_var( ncid, vid, tau_qbo) + + iernc=nf90_inq_varid( ncid, 'STAUQBO', vid ) + iernc= nf90_get_var( ncid, vid, stau_qbo) + iernc=nf90_inq_varid( ncid, 'UQBOE', vid ) + iernc= nf90_get_var( ncid, vid, uqboe) + iernc=nf90_close(ncid) + endif + + if (me == master) then + print * + print *, ' ugwp_tabulated files input ' + print *, ' ugwp_taulat ', ugwp_taulat + print *, ' days ', days_limb + print *, ' TAU-limb ', maxval(tau_limb)*1.e3, minval(tau_limb)*1.e3 + print *, ' TAU-qbo ', maxval(stau_qbo)*1.e3, minval(stau_qbo)*1.e3 + print *, ' YMD-qbo ', maxval(days_y4md), minval(days_y4md) + print *, ' YDDD-qbo ', maxval(days_y4ddd), minval(days_y4ddd) + print *, ' uzmf_merra ',maxval(uzmf_merra), minval(uzmf_merra) + print *, ' uEq_merra ',maxval(uqboe), minval(uqboe) + print * + endif + +! +121 continue +! endif ! tabulated sources SABER/HIRDLS/QBO + +!====================== +! Part-3 :init_SOLVERS +! ===================== +! +! call init-solvers for "broad" non-stationary multi-wave spectra +! + if (knob_ugwp_solver==1) then +! + call initsolv_lsatdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & + knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw ) + endif + if (knob_ugwp_solver==2) then +! +! re-assign from namelists +! + nslope = knob_ugwp_nslope ! the GW sprctral slope at small-m + lzstar = knob_ugwp_lzstar + lzmax = knob_ugwp_lzmax + lzmin = knob_ugwp_lzmin + lhmet = knob_ugwp_lhmet + tamp_mpa =knob_ugwp_tauamp !amplitude for GEOS-5/MERRA-2 + tau_min =knob_ugwp_taumin ! min of GW MF 0.25 mPa + ilaunch = launch_level + kxw = pi2/lhmet + call initsolv_wmsdis(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & + knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw) + endif +! +! other solvers not yet tested for fv3gfs +! +!< if (knob_ugwp_solver==3) call init_dspdis +!< if (knob_ugwp_solver==4) call init_adodis +! + +!====================== + module_is_initialized = .true. + if (me == master) print *, ' CIRES-ugwp-V1 is initialized ', module_is_initialized + + end subroutine cires_ugwp_init_v1 + + +!============================================= + + + subroutine cires_ugwp_advance +!----------------------------------------------------------------------- +! +! options for the day-to-day variable sources/spectra + diagnostics +! for stochastic "triggers" +! diagnose GW-source functions * FGF + OKWP + SGO/CONV from IAU-fields +! or use for stochastic GWP-sources "memory" +!----------------------------------------------------------------------- + implicit none +! +! update sources +! a) physics-based triggers for multi-wave +! b) stochastic-based spectra and amplitudes +! c) use "memory" on GW-spectra from previous time-step +! d) update "background" GW dissipation as needed +! + end subroutine cires_ugwp_advance + +! +! ----------------------------------------------------------------------- +! finalize of cires_ugwp (_finalize) +! ----------------------------------------------------------------------- + + + subroutine cires_ugwp_finalize +! +! deallocate sources/spectra & some diagnostics need to find where "deaalocate them" +! before "end" of the FV3GFS +! + implicit none +! +! deallocate arrays employed in: +! cires_ugwp_advance / cires_ugwp_driver / cires_ugwp_init +! + deallocate( kvg, ktg ) + deallocate( krad, kion ) + deallocate( zkm, pmb ) + deallocate( rfdis, rfdist) + deallocate(ugwp_taulat, ugwp_qbolat) + deallocate(tau_limb, uzmf_merra) + deallocate(days_limb, days_merra, pmb127) + + end subroutine cires_ugwp_finalize + +! +! +! +! + subroutine calendar_ugwp(yr, mm, dd, ddd_ugwp) +! +! computes day of year to get tau_limb forcing written with 1-day precision +! + implicit none + integer, intent(in) :: yr, mm, dd + integer :: ddd_ugwp + + integer :: iw3jdn + integer :: jd1, jddd + jd1 = iw3jdn(yr,1,1) + jddd = iw3jdn(yr,mm,dd) + ddd_ugwp = jddd-jd1+1 + + end subroutine calendar_ugwp + + + subroutine cires_indx_ugwp (npts, me, master, dlat,j1_tau,j2_tau, w1_j1tau, w2_j2tau, & + j1_qbo,j2_qbo, w1_j1qbo, w2_j2qbo, dexp_latqbo ) + + implicit none +! +! ntau_d1y, ntau_d2t, nqbo_d1y, nqbo_d2z, nqbo_d3t +! ugwp_taulat(:), ugwp_qbolat(:), ugwp_merlat(:) +! + integer :: npts, me, master + integer, dimension(npts) :: j1_tau,j2_tau, j1_qbo, j2_qbo + real , dimension(npts) :: dlat, w1_j1tau, w2_j2tau, w1_j1qbo, w2_j2qbo + real , dimension(npts) :: dexp_latqbo + real :: widqbo2, xabs +! + integer i,j, j1, j2 +! +! weights for tau_limb w1_j1tau, w2_j2tau +! + do j=1,npts + j2_qbo(j) = nqbo_d1y + do i=1, nqbo_d1y + if (dlat(j) < ugwp_qbolat(i)) then + j2_qbo(j) = i + exit + endif + enddo + + + j2_qbo(j) = min(j2_qbo(j),nqbo_d1y) + j1_qbo(j) = max(j2_qbo(j)-1,1) + + if (j1_qbo(j) /= j2_qbo(j) ) then + w2_j2qbo(j) = (dlat(j) - ugwp_qbolat(j1_qbo(j))) & + / (ugwp_qbolat(j2_qbo(j))-ugwp_qbolat(j1_qbo(j))) + + else + w2_j2qbo(j) = 1.0 + endif + w1_j1qbo(j) = 1.0 - w2_j2qbo(j) + +! + enddo +! +! weights for tau_limb w1_j1tau, w2_j2tau +! + do j=1,npts + j2_tau(j) = ntau_d1y + do i=1,ntau_d1y + if (dlat(j) < ugwp_taulat(i)) then + j2_tau(j) = i + exit + endif + enddo + + + j2_tau(j) = min(j2_tau(j),ntau_d1y) + j1_tau(j) = max(j2_tau(j)-1,1) + + if (j1_tau(j) /= j2_tau(j) ) then + w2_j2tau(j) = (dlat(j) - ugwp_taulat(j1_tau(j))) & + / (ugwp_taulat(j2_tau(j))-ugwp_taulat(j1_tau(j))) + + else + w2_j2tau(j) = 1.0 + endif + w1_j1tau(j) = 1.0 - w2_j2tau(j) + + enddo + widqbo2 =1./widqbo/widqbo + do j=1,npts + dexp_latqbo(j) =0. + xabs =abs(dlat(j)) + if (xabs .le. latqbo) then + dexp_latqbo(j) = exp(-xabs*xabs*widqbo2) + if (xabs .le. 4.0 ) dexp_latqbo(j) =1. +! print *, ' indx_ugwp dexp=', dexp_latqbo(j), nint(dlat(j)) + endif + enddo + + if (me == master ) then +222 format( 2x, 'vay-wqbo', I4, 5(2x, F10.3)) +223 format( 2x, 'vay-limb', I4, 5(2x, F10.3)) + print *, 'vay_indx_ugwp ', size(dlat), ' npts ', npts + do j=1,npts + j1 = j1_tau(j) + j2 = j2_tau(j) + write(6,223) j, ugwp_taulat(j1), dlat(j), ugwp_taulat(j2), w2_j2tau(j), w1_j1tau(j) + enddo + print * + do j=1,npts + j1 = j1_qbo(j) + j2 = j2_qbo(j) + write(6,222) j, ugwp_qbolat(j1), dlat(j), ugwp_qbolat(j2), w2_j2qbo(j), w1_j1qbo(j) + enddo + endif + end subroutine cires_indx_ugwp + +! + end module cires_ugwp_module_v1 + diff --git a/physics/cires_ugwp_ngw_utils.F90 b/physics/cires_ugwp_ngw_utils.F90 new file mode 100644 index 000000000..4b2a19884 --- /dev/null +++ b/physics/cires_ugwp_ngw_utils.F90 @@ -0,0 +1,73 @@ +module cires_ugwp_ngw_utils + + +contains + + + subroutine tau_limb_advance(me, master, im, levs, ddd, curdate, & + j1_tau, j2_tau, ddy_j1tau, ddy_j2tau, tau_sat, kdt ) + + + + + use machine, only : kind_phys + + use cires_ugwp_module_v1, only : ntau_d1y, ntau_d2t + use cires_ugwp_module_v1, only : ugwp_taulat, days_limb, tau_limb + +! use cires_ugwp_module, only : ugwp_qbolat, days_merra, pmb127, days_y4md, days_y4ddd +! use cires_ugwp_module, only : tau_qbo, stau_qbo, uqboe, u2 => uzmf_merra + + implicit none + + integer, intent(in) :: me, master, im, levs, ddd, curdate, kdt + integer, intent(in), dimension(im) :: j1_tau, j2_tau + + real , intent(in), dimension(im) :: ddy_j1tau, ddy_j2tau + + real, intent(out) :: tau_sat(im) + + integer :: i, j1, j2, k, it1, it2, iday + real :: tem, tx1, tx2, w1, w2, day2, day1, ddx + integer :: yr1, yr2 +! + integer :: iqbo1=1 +! + + + + it1 = 2 + do iday=1, ntau_d2t + if (float(ddd) .lt. days_limb(iday) ) then + it2 = iday + exit + endif + enddo + it2 = min(it2,ntau_d2t) + it1 = max(it2-1,1) + if (it2 > ntau_d2t ) then + print *, ' it1, it2, ntau_d2t ', it1, it2, ntau_d2t + stop + endif + w2 = (float(ddd)-days_limb(it1))/(days_limb(it2)-days_limb(it1)) + w1 = 1.0-w2 + do i=1, im + j1 = j1_tau(i) + j2 = j2_tau(i) + tx1 = tau_limb(j1, it1)*ddy_j1tau(i)+tau_limb(j2, it1)*ddy_j2tau(i) + tx2 = tau_limb(j1, it2)*ddy_j1tau(i)+tau_limb(j2, it2)*ddy_j2tau(i) + tau_sat(i) = tx1*w1 + w2*tx2 + enddo + + if (me == master ) then + print*, maxval(tau_limb), minval(tau_limb), ' tau_limb ' + print*, ntau_d2t + print*, days_limb(1) , days_limb(ntau_d2t) , ddd, ' days-taulimb ' + print*, 'curdate ', curdate + print*, maxval(tau_sat), minval(tau_sat), ' tau_sat_fv3 ' + endif + return + + end subroutine tau_limb_advance + +end module cires_ugwp_ngw_utils diff --git a/physics/cires_ugwp_orolm97_v1.F90 b/physics/cires_ugwp_orolm97_v1.F90 new file mode 100644 index 000000000..1a6cedcb3 --- /dev/null +++ b/physics/cires_ugwp_orolm97_v1.F90 @@ -0,0 +1,985 @@ +module cires_ugwp_orolm97_v1 + + +contains + + + + subroutine gwdps_oro_v1(im, km, imx, do_tofd, & + pdvdt, pdudt, pdtdt, pkdis, u1,v1,t1,q1,kpbl, & + prsi,del,prsl,prslk, zmeti, zmet, dtp, kdt, hprime, & + oc, oa4, clx4, theta, sigma, gamma, elvmaxd, sgh30, & + dusfc, dvsfc, xlatd, sinlat, coslat, sparea, & + cdmbgwd, me, master, rdxzb, & + zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & + dudt_mtb, dudt_ogw, dudt_tms) +!---------------------------------------- +! ugwp_v1: gwdps_oro_v1 following recent updates of Lott & Miller 1997 +! eventually will be replaced with more "advanced"LLWB +! and multi-wave solver that produce competitive FV3GFS-skills +! +! computation of kref for ogw + coorde diagnostics +! all constants/parameters inside cires_ugwp_initialize.f90 +!---------------------------------------- + + use machine , only : kind_phys + use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2, & + pi, rad_to_deg, deg_to_rad, pi2, & + rdi, gor, grcp, gocp, fv, gr2, & + bnv2min, dw2min, velmin, arad + + use ugwp_oro_init, only : rimin, ric, efmin, efmax , & + hpmax, hpmin, sigfaci => sigfac , & + dpmin, minwnd, hminmt, hncrit , & + rlolev, gmax, veleps, factop , & + frc, ce, ceofrc, frmax, cg, & + fdir, mdir, nwdir, & + cdmb, cleff, fcrit_gfs, fcrit_mtb, & + n_tofd, ze_tofd, ztop_tofd + + use cires_ugwp_module, only : kxw, max_kdis, max_axyz + + use cires_orowam2017, only : oro_wam_2017 + + use cires_vert_orodis, only : ugwp_tofd1d + + +! use sso_coorde, only : pgwd, pgwd4 +!---------------------------------------- + implicit none + real(kind=kind_phys), parameter :: pgwd=1, pgwd4= pgwd + real(kind=kind_phys), parameter :: sigfac = 3, sigfacs = 0.5 + character(len=8) :: strsolver='pss-1986' ! current operational solver or 'wam-2017' + real(kind=kind_phys) :: gammin = 0.00999999 + real(kind=kind_phys), parameter :: nhilmax = 25. + real(kind=kind_phys), parameter :: sso_min = 3000. + logical, parameter :: do_adjoro = .false. +!---------------------------------------- + + integer, intent(in) :: im, km, imx, kdt + integer, intent(in) :: me, master + logical, intent(in) :: do_tofd + + + + integer, intent(in) :: kpbl(im) ! index for the pbl top layer! + real(kind=kind_phys), intent(in) :: dtp ! time step + real(kind=kind_phys), intent(in) :: cdmbgwd(2) + + real(kind=kind_phys), intent(in) :: hprime(im), oc(im), oa4(im,4), & + clx4(im,4), theta(im), sigma(im), & + gamma(im), elvmaxd(im) + + real(kind=kind_phys), intent(in) :: sgh30(im) + real(kind=kind_phys), intent(in), dimension(im,km) :: & + u1, v1, t1, q1,del, prsl, prslk, zmet + + real(kind=kind_phys), intent(in),dimension(im,km+1):: prsi, zmeti + real(kind=kind_phys), intent(in) :: xlatd(im),sinlat(im), coslat(im) + real(kind=kind_phys), intent(in) :: sparea(im) + +! +!output -phys-tend + real(kind=kind_phys),dimension(im,km),intent(out) :: & + pdvdt, pdudt, pkdis, pdtdt +! output - diag-coorde + real(kind=kind_phys),dimension(im,km),intent(out) :: & + dudt_mtb, dudt_ogw, dudt_tms +! + real(kind=kind_phys),dimension(im) :: rdxzb, zmtb, zogw , & + tau_ogw, tau_mtb, tau_tofd, dusfc, dvsfc + +! +!--------------------------------------------------------------------- +! # of permissible sub-grid orography hills for "any" resolution < 25 +! correction for "elliptical" hills based on shilmin-area =sgrid/25 +! 4.*gamma*b_ell*b_ell >= shilmin +! give us limits on [b_ell & gamma *b_ell] > 5 km =sso_min +! gamma_min = 1/4*shilmin/sso_min/sso_min +!23.01.2019: cdmb = 4.*192/768_c192=1 x 0.5 +! 192: cdmbgwd = 0.5, 2.5 +! cleff = 2.5*0.5e-5 * sqrt(192./768.) => lh_eff = 1004. km +! 6*dx = 240 km 8*dx = 320. ~ 3-5 more effective OGW-lin +!--------------------------------------------------------------------- +! +! locals SSO +! + real(kind=kind_phys) :: vsigma(im), vgamma(im) + + real(kind=kind_phys) :: ztoph,zlowh,ph_blk, dz_blk + real(kind=kind_phys) :: shilmin, sgrmax, sgrmin + real(kind=kind_phys) :: belpmin, dsmin, dsmax +! real(kind=kind_phys) :: arhills(im) ! not used why do we need? + real(kind=kind_phys) :: xlingfs + +! +! locals mean flow ...etc +! + real(kind=kind_phys), dimension(im,km) :: ri_n, bnv2, ro + real(kind=kind_phys), dimension(im,km) :: vtk, vtj, velco +!mtb + real(kind=kind_phys), dimension(im) :: oa, clx , elvmax, wk + real(kind=kind_phys), dimension(im) :: pe, ek, up + + real(kind=kind_phys), dimension(im,km) :: db, ang, uds + + real(kind=kind_phys) :: zlen, dbtmp, r, phiang, dbim, zr + real(kind=kind_phys) :: eng0, eng1, cosang2, sinang2 + real(kind=kind_phys) :: bgam, cgam, gam2, rnom, rdem +! +! tofd +! some constants now in "use ugwp_oro_init" + "use ugwp_common" +! +!================== + real(kind=kind_phys) :: unew, vnew, zpbl, sigflt, zsurf + real(kind=kind_phys), dimension(km) :: utofd1, vtofd1 + real(kind=kind_phys), dimension(km) :: epstofd1, krf_tofd1 + real(kind=kind_phys), dimension(km) :: up1, vp1, zpm + + real(kind=kind_phys),dimension(im, km) :: axtms, aytms +! +! ogw +! + logical icrilv(im) +! + real(kind=kind_phys), dimension(im) :: xn, yn, ubar, vbar, ulow, & + roll, bnv2bar, scor, dtfac, xlinv, delks, delks1 +! + real(kind=kind_phys) :: taup(im,km+1), taud(im,km) + real(kind=kind_phys) :: taub(im), taulin(im), heff, hsat, hdis + + integer, dimension(im) :: kref, idxzb, ipt, kreflm, iwklm, iwk, izlow + +! +!check what we need +! + real(kind=kind_phys) :: bnv, fr, ri_gw, brvf + real(kind=kind_phys) :: tem, tem1, tem2, temc, temv + real(kind=kind_phys) :: ti, rdz, dw2, shr2, bvf2 + real(kind=kind_phys) :: rdelks, efact, coefm, gfobnv + real(kind=kind_phys) :: scork, rscor, hd, fro, sira + real(kind=kind_phys) :: dtaux, dtauy, zmetp, zmetk + + real(kind=kind_phys) :: grav2, rcpdt, windik, wdir + real(kind=kind_phys) :: sigmin, dxres,sigres,hdxres, cdmb4, mtbridge + + real(kind=kind_phys) :: kxridge, inv_b2eff, zw1, zw2 + real(kind=kind_phys) :: belps, aelps, nhills, selps +! +! various integers +! + integer :: kmm1, kmm2, lcap, lcapp1 + integer :: npt, kbps, kbpsp1,kbpsm1 + integer :: kmps, idir, nwd, klcap, kp1, kmpbl, kmll + integer :: k_mtb, k_zlow, ktrial, klevm1 + integer :: i, j, k +! + rcpdt = 1.0 / (cpd*dtp) + grav2 = grav + grav +! +! mtb-blocking sigma_min and dxres => cires_initialize +! + sgrmax = maxval(sparea) ; sgrmin = minval(sparea) + dsmax = sqrt(sgrmax) ; dsmin = sqrt(sgrmin) + + dxres = pi2*arad/float(imx) + hdxres = 0.5*dxres +! shilmin = sgrmin/nhilmax ! not used - moorthi + +! gammin = min(sso_min/dsmax, 1.) ! moorthi - with this results are not reproducible + gammin = min(sso_min/dxres, 1.) ! moorthi + +! sigmin = 2.*hpmin/dsmax !dxres ! moorthi - this will not reproduce + sigmin = 2.*hpmin/dxres !dxres + +! if (kdt == 1) then +! print *, sgrmax, sgrmin , ' min-max sparea ' +! print *, 'sigmin-hpmin-dsmax', sigmin, hpmin, dsmax +! print *, 'dxres/dsmax ', dxres, dsmax +! print *, ' shilmin gammin ', shilmin, gammin +! endif + + kxridge = float(imx)/arad * cdmbgwd(2) + + if (me == master .and. kdt == 1) then + print *, ' gwdps_v0 kxridge ', kxridge + print *, ' gwdps_v0 scale2 ', cdmbgwd(2) + print *, ' gwdps_v0 imx ', imx + print *, ' gwdps_v0 gam_min ', gammin + print *, ' gwdps_v0 sso_min ', sso_min + endif + + do i=1,im + idxzb(i) = 0 + zmtb(i) = 0.0 + zogw(i) = 0.0 + rdxzb(i) = 0.0 + tau_ogw(i) = 0.0 + tau_mtb(i) = 0.0 + dusfc(i) = 0.0 + dvsfc(i) = 0.0 + tau_tofd(i) = 0.0 +! + ipt(i) = 0 +! + enddo + + do k=1,km + do i=1,im + pdvdt(i,k) = 0.0 + pdudt(i,k) = 0.0 + pdtdt(i,k) = 0.0 + pkdis(i,k) = 0.0 + dudt_mtb(i,k) = 0.0 + dudt_ogw(i,k) = 0.0 + dudt_tms(i,k) = 0.0 + enddo + enddo + +! ---- for lm and gwd calculation points +!cires_ugwp_initialize.F90: real, parameter :: hpmax=2400.0, hpmin=25.0 +!cires_ugwp_initialize.F90: real, parameter :: hminmt=50. ! min mtn height (*j*) +!---- for lm and gwd calculation points + + + npt = 0 + + do i = 1,im + if ( elvmaxd(i) >= hminmt .and. hprime(i) >= hpmin ) then + npt = npt + 1 + ipt(npt) = i + endif + enddo + + if (npt == 0) then +! print *, 'oro-npt = 0 elvmax ', maxval(elvmaxd), hminmt +! print *, 'oro-npt = 0 hprime ', maxval(hprime), hpmin + return ! no gwd/mb calculation done + endif +!======================================================== + +! + if (do_adjoro ) then + + do i = 1,im +! arhills(i) = 1.0 +! + sigres = max(sigmin, sigma(i)) +! if (sigma(i) < sigmin) sigma(i)= sigmin + dxres = sqrt(sparea(i)) + if (2.*hprime(i)/sigres > dxres) sigres=2.*hprime(i)/dxres + aelps = min(2.*hprime(i)/sigres, 0.5*dxres) + if (gamma(i) > 0.0 ) belps = min(aelps/gamma(i),.5*dxres) +! +! small-scale "turbulent" oro-scales < sso_min +! + if( aelps < sso_min ) then + +! a, b > sso_min upscale ellipse a/b > 0.1 a>sso_min & h/b=>new_sigm +! + aelps = sso_min + if (belps < sso_min ) then + gamma(i) = 1.0 + belps = aelps*gamma(i) + else + gamma(i) = min(aelps/belps, 1.0) + endif + + sigma(i) = 2.*hprime(i)/aelps + gamma(i) = min(aelps/belps, 1.0) + + endif + + selps = belps*belps*gamma(i)*4. ! ellipse area of the el-c hill + nhills = min(nhilmax, sparea(i)/selps) +! arhills(i) = max(nhills, 1.0) + +!333 format( ' nhil: ', i6, 4(2x, f9.3), 2(2x, e9.3)) +! if (kdt==1 ) +! & write(6,333) nint(nhills)+1,xlatd(i), hprime(i),aelps*1.e-3, +! & belps*1.e-3, sigma(i),gamma(i) + + + enddo + endif !(do_adjoro ) + + + + do i=1,npt + iwklm(i) = 2 + idxzb(i) = 0 + kreflm(i) = 0 + enddo + + do k=1,km + do i=1,im + db(i,k) = 0.0 + ang(i,k) = 0.0 + uds(i,k) = 0.0 + enddo + enddo + + kmm1 = km - 1 ; kmm2 = km - 2 ; kmll = kmm1 + lcap = km ; lcapp1 = lcap + 1 + + cdmb4 = 0.25*cdmb + + do i = 1, npt + j = ipt(i) + elvmax(j) = min (elvmaxd(j)*0. + sigfac * hprime(j), hncrit) + izlow(i) = 1 ! surface-level + enddo +! + do k = 1, kmm1 + do i = 1, npt + j = ipt(i) + ztoph = sigfac * hprime(j) + zlowh = sigfacs* hprime(j) + zmetp = zmet(j,k+1) + zmetk = zmet(j,k) +! if (( elvmax(j) <= zmetp) .and. (elvmax(j).ge.zmetk) ) +! & iwklm(i) = max(iwklm(i), k+1 ) + if (( ztoph <= zmetp) .and. (ztoph >= zmetk) ) iwklm(i) = max(iwklm(i), k+1 ) + if (zlowh <= zmetp .and. zlowh >= zmetk) izlow(i) = max(izlow(i),k) + + enddo + enddo +! + do k = 1,km + do i =1,npt + j = ipt(i) + vtj(i,k) = t1(j,k) * (1.+fv*q1(j,k)) + vtk(i,k) = vtj(i,k) / prslk(j,k) + ro(i,k) = rdi * prsl(j,k) / vtj(i,k) ! density mid-levels + taup(i,k) = 0.0 + enddo + enddo +! +! check ri_n or ri_mf computation +! + do k = 1,kmm1 + do i =1,npt + j = ipt(i) + rdz = 1. / (zmet(j,k+1) - zmet(j,k)) + tem1 = u1(j,k) - u1(j,k+1) + tem2 = v1(j,k) - v1(j,k+1) + dw2 = tem1*tem1 + tem2*tem2 + shr2 = max(dw2,dw2min) * rdz * rdz +! ti = 2.0 / (t1(j,k)+t1(j,k+1)) +! bvf2 = grav*(gocp+rdz*(vtj(i,k+1)-vtj(i,k)))* ti +! ri_n(i,k) = max(bvf2/shr2,rimin) ! richardson number +! + bvf2 = grav2 * rdz * (vtk(i,k+1)-vtk(i,k))/ (vtk(i,k+1)+vtk(i,k)) + + bnv2(i,k+1) = max( bvf2, bnv2min ) + ri_n(i,k+1) = bnv2(i,k)/shr2 ! richardson number consistent with bnv2 +! +! add here computation for ktur and ogw-dissipation fro ve-gfs +! + enddo + enddo + k = 1 + do i = 1, npt + bnv2(i,k) = bnv2(i,k+1) + enddo +! +! level iwklm => zmet(j,k) < sigfac * hprime(j) < zmet(j,k+1) +! + do i = 1, npt + j = ipt(i) + k_zlow = izlow(i) + if (k_zlow == iwklm(i)) k_zlow = 1 + delks(i) = 1.0 / (prsi(j,k_zlow) - prsi(j,iwklm(i))) +! delks1(i) = 1.0 /(prsl(j,k_zlow) - prsl(j,iwklm(i))) + ubar (i) = 0.0 + vbar (i) = 0.0 + roll (i) = 0.0 + pe (i) = 0.0 + ek (i) = 0.0 + bnv2bar(i) = 0.0 + enddo +! + do i = 1, npt + k_zlow = izlow(i) + if (k_zlow == iwklm(i)) k_zlow = 1 + do k = k_zlow, iwklm(i)-1 ! kreflm(i)= iwklm(i)-1 + j = ipt(i) ! laye-aver rho, u, v + rdelks = del(j,k) * delks(i) + ubar(i) = ubar(i) + rdelks * u1(j,k) ! trial mean u below + vbar(i) = vbar(i) + rdelks * v1(j,k) ! trial mean v below + roll(i) = roll(i) + rdelks * ro(i,k) ! trial mean ro below +! + bnv2bar(i) = bnv2bar(i) + .5*(bnv2(i,k)+bnv2(i,k+1))* rdelks + enddo + enddo +! + do i = 1, npt + j = ipt(i) +! +! integrate from ztoph = sigfac*hprime down to zblk if exists +! find ph_blk, dz_blk like in LM-97 and ifs +! + ph_blk =0. + do k = iwklm(i), 1, -1 + phiang = atan2(v1(j,k),u1(j,k))*rad_to_deg + ang(i,k) = ( theta(j) - phiang ) + if ( ang(i,k) > 90. ) ang(i,k) = ang(i,k) - 180. + if ( ang(i,k) < -90. ) ang(i,k) = ang(i,k) + 180. + ang(i,k) = ang(i,k) * deg_to_rad + uds(i,k) = max(sqrt(u1(j,k)*u1(j,k) + v1(j,k)*v1(j,k)), velmin) +! + if (idxzb(i) == 0 ) then + dz_blk = zmeti(j,k+1) - zmeti(j,k) + pe(i) = pe(i) + bnv2(i,k) *( elvmax(j) - zmet(j,k) ) * dz_blk + + up(i) = max(uds(i,k) * cos(ang(i,k)), velmin) + ek(i) = 0.5 * up(i) * up(i) + + ph_blk = ph_blk + dz_blk*sqrt(bnv2(i,k))/up(i) + +! --- dividing stream lime is found when pe =exceeds ek. oper-l gfs +! if ( pe(i) >= ek(i) ) then + if ( ph_blk >= fcrit_gfs ) then + idxzb(i) = k + zmtb (j) = zmet(j, k) + rdxzb(j) = real(k, kind=kind_phys) + endif + + endif + enddo +! +! alternative expression: zmtb = max(heff*(1. -fcrit_gfs/fr), 0) +! fcrit_gfs/fr +! + goto 788 + + bnv = sqrt( bnv2bar(i) ) + heff = 2.*min(hprime(j),hpmax) + zw2 = ubar(i)*ubar(i)+vbar(i)*vbar(i) + ulow(i) = sqrt(max(zw2,dw2min)) + fr = heff*bnv/ulow(i) + zw1 = max(heff*(1. -fcrit_gfs/fr), 0.0) + zw2 = zmet(j,2) + if (fr > fcrit_gfs .and. zw1 > zw2 ) then + do k=2, kmm1 + zmetp = zmet(j,k+1) + zmetk = zmet(j,k) + if (zw1 <= zmetp .and. zw1 >= zmetk) exit + enddo + idxzb(i) = k + zmtb (j) = zmet(j, k) + else + zmtb (j) = 0. + idxzb(i) = 0 + endif + +788 continue +! +! --- the drag for mtn blocked flow +! + if ( idxzb(i) > 0 ) then + +! (4.16)-ifs + gam2 = gamma(j)*gamma(j) + bgam = 1.0 - 0.18*gamma(j) - 0.04*gam2 + cgam = 0.48*gamma(j) + 0.30*gam2 + + do k = idxzb(i)-1, 1, -1 + zlen = sqrt( (zmtb(j)-zmet(j,k) )/(zmet(j,k ) + hprime(j)) ) + tem = cos(ang(i,k)) + cosang2 = tem * tem + sinang2 = 1.0 - cosang2 +! +! cos =1 sin =0 => 1/r= gam zr = 2.-gam +! cos =0 sin =1 => 1/r= 1/gam zr = 2.- 1/gam +! + rdem = cosang2 + gam2 * sinang2 + rnom = cosang2*gam2 + sinang2 +! +! metoffice dec 2010 +! correction of h. wells & a. zadra for the +! aspect ratio of the hill seen by mean flow +! (1/r , r-inverse below: 2-r) + + rdem = max(rdem, 1.e-6) + r = sqrt(rnom/rdem) + zr = max( 2. - r, 0. ) + + sigres = max(sigmin, sigma(j)) + if (hprime(j)/sigres > dxres) sigres = hprime(j)/dxres + mtbridge = zr * sigres*zlen / hprime(j) +! (4.15)-ifs +! dbtmp = cdmb4 * mtbridge * & +! & max(cos(ang(i,k)), gamma(j)*sin(ang(i,k))) +! (4.16)-ifs + dbtmp = cdmb4*mtbridge*(bgam* cosang2 +cgam* sinang2) + db(i,k)= dbtmp * uds(i,k) + enddo +! + endif + enddo +!............................. +!............................. +! end mtn blocking section +!............................. +!............................. +! +!--- orographic gravity wave drag section +! +! scale cleff between im=384*2 and 192*2 for t126/t170 and t62 +! inside "cires_ugwp_initialize.f90" now +! + kmpbl = km / 2 + iwk(1:npt) = 2 +! +! meto/UK-scheme: +! k_mtb = max(k_zmtb, k_n*hprime/2] to reduce diurnal variations taub_ogw +! + do k=3,kmpbl + do i=1,npt + j = ipt(i) + tem = (prsi(j,1) - prsi(j,k)) + if (tem < dpmin) iwk(i) = k ! dpmin=50 mb + +!=============================================================== +! lev=111 t=311.749 hkm=0.430522 ps-p(iwk)=52.8958 +! below "hprime" - source of ogws and below zblk !!! +! 27 2 kpbl ~ 1-2 km < hprime +!=============================================================== + enddo + enddo +! +! iwk - adhoc gfs-parameter to select ogw-launch level between +! level ~0.4-0.5 km from surface or/and pbl-top +! in ugwp-v1: options to modify as htop ~ (2-3)*hprime > zmtb +! in ugwp-v0 we ensured that : zogw > zmtb +! + + kbps = 1 + kmps = km + k_mtb = 1 + do i=1,npt + j = ipt(i) + k_mtb = max(1, idxzb(i)) + + kref(i) = max(iwk(i), kpbl(j)+1 ) ! reference level pbl or smt-else ???? + kref(i) = max(kref(i), iwklm(i) ) ! iwklm => sigfac*hprime + + if (kref(i) <= k_mtb) kref(i) = k_mtb + 1 ! layer above zmtb + kbps = max(kbps, kref(i)) + kmps = min(kmps, kref(i)) +! + delks(i) = 1.0 / (prsi(j,k_mtb) - prsi(j,kref(i))) + ubar (i) = 0.0 + vbar (i) = 0.0 + roll (i) = 0.0 + bnv2bar(i)= 0.0 + enddo +! + kbpsp1 = kbps + 1 + kbpsm1 = kbps - 1 + k_mtb = 1 +! + do i = 1,npt + k_mtb = max(1, idxzb(i)) + do k = k_mtb,kbps !kbps = max(kref) ;kmps= min(kref) + if (k < kref(i)) then + j = ipt(i) + rdelks = del(j,k) * delks(i) + ubar(i) = ubar(i) + rdelks * u1(j,k) ! mean u below kref + vbar(i) = vbar(i) + rdelks * v1(j,k) ! mean v below kref + roll(i) = roll(i) + rdelks * ro(i,k) ! mean ro below kref + bnv2bar(i) = bnv2bar(i) + .5*(bnv2(i,k)+bnv2(i,k+1))* rdelks + endif + enddo + enddo +! +! orographic asymmetry parameter (oa), and (clx) + do i = 1,npt + j = ipt(i) + wdir = atan2(ubar(i),vbar(i)) + pi + idir = mod(nint(fdir*wdir),mdir) + 1 + nwd = nwdir(idir) + oa(i) = (1-2*int( (nwd-1)/4 )) * oa4(j,mod(nwd-1,4)+1) + clx(i) = clx4(j,mod(nwd-1,4)+1) + enddo +! + do i = 1,npt + dtfac(i) = 1.0 + icrilv(i) = .false. ! initialize critical level control vector + ulow(i) = max(sqrt(ubar(i)*ubar(i)+vbar(i)*vbar(i)),velmin) + xn(i) = ubar(i) / ulow(i) + yn(i) = vbar(i) / ulow(i) + enddo +! + do k = 1, kmm1 + do i = 1,npt + j = ipt(i) + velco(i,k) = 0.5 * ((u1(j,k)+u1(j,k+1))*xn(i)+ (v1(j,k)+v1(j,k+1))*yn(i)) + + enddo + enddo +! +!------------------ +! v0: incorporates latest modifications for kxridge and heff/hsat +! and taulin for fr <=fcrit_gfs +! and concept of "clipped" hill if zmtb > 0. to make +! the integrated "tau_sso = tau_ogw +tau_mtb" close to reanalysis data +! it is still used the "single-orowave"-approach along ulow-upwind +! +! in contrast to the 2-orthogonal wave (2otw) schemes of ifs/meto/e-canada +! 2otw scheme requires "aver angle" and wind projections on 2 axes of ellipse a-b +! with 2-stresses: taub_a & taub_b as of Phillips (1984) +!------------------ + taub(:) = 0. ; taulin(:)= 0. + do i = 1,npt + j = ipt(i) + bnv = sqrt( bnv2bar(i) ) + heff = min(hprime(j),hpmax) + + if( zmtb(j) > 0.) heff = max(sigfac*heff-zmtb(j), 0.)/sigfac + if (heff <= 0) cycle + + hsat = fcrit_gfs*ulow(i)/bnv + heff = min(heff, hsat) + + fr = min(bnv * heff /ulow(i), frmax) +! + efact = (oa(i) + 2.) ** (ceofrc*fr) + efact = min( max(efact,efmin), efmax ) +! + coefm = (1. + clx(i)) ** (oa(i)+1.) +! + xlinv(i) = coefm * cleff ! effective kxw for lin-wave + xlingfs = coefm * cleff +! + tem = fr * fr * oc(j) + gfobnv = gmax * tem / ((tem + cg)*bnv) +! +!new specification of xlinv(i) & taulin(i) + + sigres = max(sigmin, sigma(j)) + if (heff/sigres > hdxres) sigres = heff/hdxres + inv_b2eff = 0.5*sigres/heff + kxridge = 1.0 / sqrt(sparea(j)) + xlinv(i) = xlingfs !or max(kxridge, inv_b2eff) ! 6.28/lx ..0.5*sigma(j)/heff = 1./lridge + taulin(i) = 0.5*roll(i)*xlinv(i)*bnv*ulow(i)*heff*heff*pgwd4 + + if ( fr > fcrit_gfs ) then + taub(i) = xlinv(i) * roll(i) * ulow(i) * ulow(i) & + * ulow(i) * gfobnv * efact ! nonlinear flux tau0...xlinv(i) +! + else +! taub(i) = taulin(i) ! linear flux for fr <= fcrit_gfs + taub(i) = xlinv(i) * roll(i) * ulow(i) * ulow(i) & + * ulow(i) * gfobnv * efact +! + endif +! +! + k = max(1, kref(i)-1) + tem = max(velco(i,k)*velco(i,k), dw2min) + scor(i) = bnv2(i,k) / tem ! scorer parameter below kref level +! +! diagnostics for zogw > zmtb +! + zogw(j) = zmeti(j, kref(i) ) + enddo +! +!----set up bottom values of stress +! + do k = 1, kbps + do i = 1,npt + if (k <= kref(i)) taup(i,k) = taub(i) + enddo + enddo + + if (strsolver == 'pss-1986') then + +!====================================================== +! v0-gfs orogw-solver of palmer et al 1986 -"pss-1986" +! in v1-orogw linsatdis of "wam-2017" +! with llwb-mechanism for +! rotational/non-hydrostat ogws important for +! highres-fv3gfs with dx < 10 km +!====================================================== + + do k = kmps, kmm1 ! vertical level loop from min(kref) + kp1 = k + 1 + do i = 1, npt +! + if (k >= kref(i)) then + icrilv(i) = icrilv(i) .or. ( ri_n(i,k) < ric).or. (velco(i,k) <= 0. ) + endif + enddo +! + do i = 1,npt + if (k >= kref(i)) then + if (.not.icrilv(i) .and. taup(i,k) > 0.0 ) then + temv = 1.0 / max(velco(i,k), velmin) +! + if (oa(i) > 0. .and. kp1 < kref(i)) then +! + scork = bnv2(i,k) * temv * temv + rscor = min(1.0, scork / scor(i)) + scor(i) = scork + else + rscor = 1. + endif +! + brvf = sqrt(bnv2(i,k)) ! brent-vaisala frequency interface +! tem1 = xlinv(i)*(ro(i,kp1)+ro(i,k))*brvf*velco(i,k)*0.5 + + tem1 = xlinv(i)*(ro(i,kp1)+ro(i,k))*brvf*0.5 & + * max(velco(i,k), velmin) + hd = sqrt(taup(i,k) / tem1) + fro = brvf * hd * temv +! +! rim is the "wave"-richardson number by palmer,shutts, swinbank 1986 +! + + tem2 = sqrt(ri_n(i,k)) + tem = 1. + tem2 * fro + ri_gw = ri_n(i,k) * (1.0-fro) / (tem * tem) +! +! check stability to employ the 'dynamical saturation hypothesis' +! of palmer,shutts, swinbank 1986 +! + if (ri_gw <= ric .and.(oa(i) <= 0. .or. kp1 >= kref(i) )) then + temc = 2.0 + 1.0 / tem2 + hd = velco(i,k) * (2.*sqrt(temc)-temc) / brvf + taup(i,kp1) = tem1 * hd * hd + else + taup(i,kp1) = taup(i,k) * rscor + endif +! + taup(i,kp1) = min(taup(i,kp1), taup(i,k)) + endif + endif + enddo + enddo +! +! zero momentum deposition at the top model layer +! + taup(1:npt,km+1) = taup(1:npt,km) +! +! calculate wave acc-n: - (grav)*d(tau)/d(p) = taud +! + do k = 1,km + do i = 1,npt + taud(i,k) = grav*(taup(i,k+1) - taup(i,k))/del(ipt(i),k) + enddo + enddo + +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!------if the gravity wave drag would force a critical line in the +!------layers below sigma=rlolev during the next deltim timestep, +!------then only apply drag until that critical line is reached. +! empirical implementation of the llwb-mechanism: lower level wave breaking +! by limiting "ax = dtfac*ax" due to possible llwb around kref and 500 mb +! critical line [v - ax*dtp = 0.] is smt like "llwb" for stationary ogws +!2019: this option limits sensitivity of taux/tauy to increase/decrease of taub +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + do k = 1,kmm1 + do i = 1,npt + if (k >= kref(i) .and. prsi(ipt(i),k) >= rlolev) then + + if(taud(i,k) /= 0.) then + tem = dtp * taud(i,k) ! tem = du/dt-oro*dt => U/dU vs 1 + dtfac(i) = min(dtfac(i),abs(velco(i,k)/tem)) ! reduce Ax= Ax*(1, or U/dU <=1) +! dtfac(i) = 1.0 + endif + endif + enddo + enddo +! +!--------------------------- orogw-solver of gfs pss-1986 +! + else +! +!-----------Unified orogw-solver of wam2017 +! +! sigres = max(sigmin, sigma(j)) +! if (heff/sigres.gt.dxres) sigres=heff/dxres +! inv_b2eff = 0.5*sigres/heff +! xlinv(i) = max(kxridge, inv_b2eff) ! 0.5*sigma(j)/heff = 1./lridge + + dtfac(:) = 1.0 + + call oro_wam_2017(im, km, npt, ipt, kref, kdt, me, master, & + dtp, dxres, taub, u1, v1, t1, xn, yn, bnv2, ro, prsi,prsl, & + del, sigma, hprime, gamma, theta, sinlat, xlatd, taup, taud, pkdis) + + endif ! oro_wam_2017 - linsatdis-solver of wam-2017 +! +!---- above orogw-solver of wam2017 +! +! tofd as in beljaars-2004 +! +! --------------------------- + if( do_tofd ) then + axtms(:,:) = 0.0 ; aytms(:,:) = 0.0 + if ( kdt == 1 .and. me == 0) then + print *, 'vay do_tofd from surface to ', ztop_tofd + endif + do i = 1,npt + j = ipt(i) + zpbl = zmet( j, kpbl(j) ) + + sigflt = min(sgh30(j), 0.3*hprime(j)) ! cannot exceed 30% of ls-sso + + zsurf = zmeti(j,1) + do k=1,km + zpm(k) = zmet(j,k) + up1(k) = u1(j,k) + vp1(k) = v1(j,k) + enddo + + call ugwp_tofd1d(km, sigflt, elvmaxd(j), zsurf, zpbl, & + up1, vp1, zpm, utofd1, vtofd1, epstofd1, krf_tofd1) + + do k=1,km + axtms(j,k) = utofd1(k) + aytms(j,k) = vtofd1(k) +! +! add tofd to gw-tendencies +! + pdvdt(j,k) = pdvdt(j,k) + aytms(j,k) + pdudt(j,k) = pdudt(j,k) + axtms(j,k) + enddo +!2018-diag + tau_tofd(j) = sum( utofd1(1:km)* del(j,1:km)) + enddo + endif ! do_tofd + +!-------------------------------------------- +! combine oro-drag effects MB +TOFD + OGWs +!-------------------------------------------- +! + diag-3d + + dudt_tms = axtms + tau_ogw = 0. + tau_mtb = 0. + + do k = 1,km + do i = 1,npt + j = ipt(i) +! + eng0 = 0.5*(u1(j,k)*u1(j,k)+v1(j,k)*v1(j,k)) +! + if ( k < idxzb(i) .and. idxzb(i) /= 0 ) then +! +! if blocking layers -- no ogws +! + dbim = db(i,k) / (1.+db(i,k)*dtp) + pdvdt(j,k) = - dbim * v1(j,k) +pdvdt(j,k) + pdudt(j,k) = - dbim * u1(j,k) +pdudt(j,k) + eng1 = eng0*(1.0-dbim*dtp)*(1.-dbim*dtp) + + dusfc(j) = dusfc(j) - dbim * u1(j,k) * del(j,k) + dvsfc(j) = dvsfc(j) - dbim * v1(j,k) * del(j,k) +!2018-diag + dudt_mtb(j,k) = -dbim * u1(j,k) + tau_mtb(j) = tau_mtb(j) + dudt_mtb(j,k)* del(j,k) + + else +! +! ogw-s above blocking height +! + taud(i,k) = taud(i,k) * dtfac(i) + dtaux = taud(i,k) * xn(i) * pgwd + dtauy = taud(i,k) * yn(i) * pgwd + + pdvdt(j,k) = dtauy +pdvdt(j,k) + pdudt(j,k) = dtaux +pdudt(j,k) + + unew = u1(j,k) + dtaux*dtp ! pdudt(j,k)*dtp + vnew = v1(j,k) + dtauy*dtp ! pdvdt(j,k)*dtp + eng1 = 0.5*(unew*unew + vnew*vnew) +! + dusfc(j) = dusfc(j) + dtaux * del(j,k) + dvsfc(j) = dvsfc(j) + dtauy * del(j,k) +!2018-diag + dudt_ogw(j,k) = dtaux + tau_ogw(j) = tau_ogw(j) +dtaux*del(j,k) + endif +! +! local energy deposition sso-heat +! + pdtdt(j,k) = max(eng0-eng1,0.)*rcpdt + enddo + enddo +! dusfc w/o tofd sign as in the era-i, merra and cfsr + do i = 1,npt + j = ipt(i) + dusfc(j) = -rgrav * dusfc(j) + dvsfc(j) = -rgrav * dvsfc(j) + tau_mtb(j) = -rgrav * tau_mtb(j) + tau_ogw(j) = -rgrav * tau_ogw(j) + tau_tofd(j) = -rgrav * tau_tofd(j) + enddo + + return + + +!============ debug ------------------------------------------------ + if (kdt <= 2 .and. me == 0) then + print *, 'vgw-oro done gwdps_v0 in ugwp-v0 step-proc ', kdt, me +! + print *, maxval(pdudt)*86400., minval(pdudt)*86400, 'vgw_axoro' + print *, maxval(pdvdt)*86400., minval(pdvdt)*86400, 'vgw_ayoro' +! print *, maxval(kdis), minval(kdis), 'vgw_kdispro m2/sec' + print *, maxval(pdtdt)*86400., minval(pdtdt)*86400,'vgw_epsoro' + print *, maxval(zmtb), ' z_mtb ', maxval(tau_mtb), ' tau_mtb ' + print *, maxval(zogw), ' z_ogw ', maxval(tau_ogw), ' tau_ogw ' +! print *, maxval(tau_tofd), ' tau_tofd ' +! print *, maxval(axtms)*86400., minval(axtms)*86400, 'vgw_axtms' +! print *,maxval(dudt_mtb)*86400.,minval(dudt_mtb)*86400,'vgw_axmtb' + if (maxval(abs(pdudt))*86400. > 100.) then + + print *, maxval(u1), minval(u1), ' u1 gwdps-v0 ' + print *, maxval(v1), minval(v1), ' v1 gwdps-v0 ' + print *, maxval(t1), minval(t1), ' t1 gwdps-v0 ' + print *, maxval(q1), minval(q1), ' q1 gwdps-v0 ' + print *, maxval(del), minval(del), ' del gwdps-v0 ' + print *, maxval(zmet),minval(zmet), 'zmet' + print *, maxval(zmeti),minval(zmeti), 'zmeti' + print *, maxval(prsi), minval(prsi), ' prsi ' + print *, maxval(prsl), minval(prsl), ' prsl ' + print *, maxval(ro), minval(ro), ' ro-dens ' + print *, maxval(bnv2(1:npt,:)), minval(bnv2(1:npt,:)),' bnv2 ' + print *, maxval(kpbl), minval(kpbl), ' kpbl ' + print *, maxval(sgh30), maxval(hprime), maxval(elvmax),'oro-d' + print * + do i =1, npt + j= ipt(i) + print *,zogw(j)/hprime(j), zmtb(j)/hprime(j), & + zmet(j,1)*1.e-3, nint(hprime(j)/sigma(j)) +! +!.................................................................... +! +! zogw/hp=5.9 zblk/hp=10.7 zm=11.1m ridge/2=2,489m/9,000m +! from 5 to 20 km , we need to count for "ridges" > dx/4 ~ 15 km +! we must exclude blocking by small ridges +! vay-kref < iblk zogw-lev 15 block-level: 39 +! +! velmin => 1.0, 0.01, 0.1 etc.....unification of wind limiters +! max(sqrt(u1(j,k)*u1(j,k) + v1(j,k)*v1(j,k)), minwnd) +! max(dw2,dw2min) * rdz * rdz +! ulow(i) = max(sqrt(ubar(i)*ubar(i) + vbar(i)*vbar(i)), 1.0) +! tem = max(velco(i,k)*velco(i,k), 0.1) +! temv = 1.0 / max(velco(i,k), 0.01) +! & * max(velco(i,k),0.01) +!.................................................................... + enddo + print * + stop + endif + endif + +!cires_ugwp_solv2_v1.f90 + return + end subroutine gwdps_oro_v1 + + +end module cires_ugwp_orolm97_v1 diff --git a/physics/cires_ugwp_solv2_v1_mod.F90 b/physics/cires_ugwp_solv2_v1_mod.F90 new file mode 100644 index 000000000..ec2ec7bf2 --- /dev/null +++ b/physics/cires_ugwp_solv2_v1_mod.F90 @@ -0,0 +1,810 @@ +module cires_ugwp_solv2_v1_mod + + +contains + + +!--------------------------------------------------- +! Broad spectrum FVS-1993, mkz^nSlope with nSlope = 0, 1,2 +! dissipative solver with NonHyd/ROT-effects +! reflected GWs treated as waves with "negligible" flux, +! they are out of given column +!--------------------------------------------------- + subroutine cires_ugwp_solv2_v1(im, levs, dtp , & + tm , um, vm, qm, prsl, prsi, zmet, zmeti, & + prslk, xlatd, sinlat, coslat, & + pdudt, pdvdt, pdtdt, dked, tauabs, wrms, trms, & + tau_ngw, mpi_id, master, kdt) +! +!-------------------------------------------------------------------------------- +! nov 2015 alternative gw-solver for nggps-wam +! nov 2017 nh/rotational gw-modes for nh-fv3gfs +! oct 2019 adding empirical satellite-based +! source function and *F90 CIRES-style of the code +! -------------------------------------------------------------------------------- +! + + use machine, only : kind_phys + + use cires_ugwp_module,only : krad, kvg, kion, ktg + + use cires_ugwp_module,only : knob_ugwp_doheat, knob_ugwp_dokdis, idebug_gwrms + + use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpdl, grav2cpd, & + omega2, rcpd, rcpd2, pi, pi2, fv, & + rad_to_deg, deg_to_rad, & + rdi, gor, grcp, gocp, & + bnv2min, bnv2max, dw2min, velmin, gr2, & + hpscale, rhp, rh4, grav2, rgrav2, mkzmin, mkz2min +! + use ugwp_wmsdis_init, only : v_kxw, rv_kxw, v_kxw2, tamp_mpa, tau_min, ucrit, & + maxdudt, gw_eff, dked_min, dked_max, maxdtdt, & + nslope, ilaunch, zms, & + zci, zdci, zci4, zci3, zci2, & + zaz_fct, zcosang, zsinang, nwav, nazd, & + zcimin, zcimax, rimin, sc2, sc2u, ric +! + implicit none +!23456 + + integer, intent(in) :: levs ! vertical level + integer, intent(in) :: im ! horiz tiles + + real ,intent(in) :: dtp ! model time step + real ,intent(in) :: vm(im,levs) ! meridional wind + real ,intent(in) :: um(im,levs) ! zonal wind + real ,intent(in) :: qm(im,levs) ! spec. humidity + real ,intent(in) :: tm(im,levs) ! kinetic temperature + + real ,intent(in) :: prsl(im,levs) ! mid-layer pressure + real ,intent(in) :: prslk(im,levs) ! mid-layer exner function + real ,intent(in) :: zmet(im,levs) ! meters now !!!!! phil =philg/grav + real ,intent(in) :: prsi(im,levs+1) ! interface pressure + real ,intent(in) :: zmeti(im,levs+1) ! interface geopi/meters + real ,intent(in) :: xlatd(im) ! lat was in radians, now with xlat_d in degrees + real ,intent(in) :: sinlat(im) + real ,intent(in) :: coslat(im) + real ,intent(in) :: tau_ngw(im) + + integer, intent(in):: mpi_id, master, kdt +! +! +! out-gw effects +! + real ,intent(out) :: pdudt(im,levs) ! zonal momentum tendency + real ,intent(out) :: pdvdt(im,levs) ! meridional momentum tendency + real ,intent(out) :: pdtdt(im,levs) ! gw-heating (u*ax+v*ay)/cp + real ,intent(out) :: dked(im,levs) ! gw-eddy diffusion +! +! GW diagnostics => next move it to "module_gw_diag" +! + real ,intent(out) :: tauabs(im,levs) ! + real ,intent(out) :: wrms(im,levs) ! + real ,intent(out) :: trms(im,levs) ! + + real :: zwrms(nwav,nazd), wrk1(levs), wrk2(levs) + real :: atrms(nazd, levs),awrms(nazd, levs), akzw(nwav,nazd, levs+1) +! +! local =========================================================================================== + real :: taux(levs+1) ! EW component of vertical momentum flux (pa) + real :: tauy(levs+1) ! NS component of vertical momentum flux (pa) + real :: fpu(nazd, levs+1) ! az-momentum flux + real :: ui(nazd, levs+1) ! azimuthal wind + + real :: fden_bn(levs+1) ! density/brent + real :: flux_z(nwav,levs+1) + real :: flux(nwav, nazd) +! +! =============================================================================================== +! ilaunch:levs ....... MOORTHI's improvements +! all computations of GW-effects include interface layers from ilaunch+1 to levs +1 +! at k=levs+1, extrapolation of MF-state has been made, "ideally" all spectral modes should +! be absorbed; 2-options for this "ideal" requirement +! a) properly truncate GW-spectra ; b) dissipate all GW-energy in the top layers ( GW-sponge) +!===================================================================================================== +! + real :: bn(levs+1) ! interface BV-frequency + real :: bn2(levs+1) ! interface BV*BV-frequency + real :: rhoint(levs+1) ! interface density + real :: uint(levs+1) ! interface zonal wind + real :: vint(levs+1) ! meridional wind + + real :: irhodz_mid(levs), dzdt(levs+1), bnk(levs+1), rhobnk(levs+1) + + real :: v_zmet(levs+1) + real :: vueff(levs+1) + real :: dfdz_v(nazd, levs) ! axj = -df*rho/dz directional momentum deposition + + + real :: suprf(levs+1) ! RF-super linear dissipation + + real, dimension(levs) :: atm , aum, avm, aqm, aprsl, azmet + real, dimension(levs+1) :: aprsi, azmeti + + real :: wrk3(levs) + real, dimension(levs) :: uold, vold, told, unew, vnew, tnew + real, dimension(levs) :: dktur, rho, rhomid, adif, cdif + + real :: rdci(nwav), rci(nwav) + real :: wave_act(nwav, nazd) ! active waves at given vert-level + real :: ul(nazd) ! velocity in azimuthal direction at launch level + real :: bvi, bvi2, bvi3, bvi4, rcms ! BV at launch level + real :: c2f2, cf1 + + + real :: flux_norm ! norm-factor + real :: taub_src, rho_src +! +! scalars +! + real :: zthm, dtau, cgz, ucrit_maxdc + real :: vm_zflx_mode, vc_zflx_mode + real :: kzw2, kzw3, kdsat, cdf2, cdf1, wdop2,v_cdp2 + real :: ucrit_max + real :: pwrms, ptrms + real :: zu, zcin, zcin2, zcin3, zcin4, zcinc + real :: zatmp, fluxs, zdep, ze1, ze2 + +! + real :: zdelp, zdelm, taud_min + real :: tvc, tvm, ptc, ptm + real :: umfp, umfm, umfc, ucrit3 + real :: fmode, expdis, fdis + real :: v_kzi, v_kzw, v_cdp, v_wdp, tx1, fcorsat, dzcrit + real :: v_wdi, v_wdpc + real :: ugw, vgw, ek1, ek2, rdtp, rdtp2 + + integer :: j, jj, k, kk, inc, jk, jkp, jl, iaz + integer :: ksrc, km2, km1, kp1, ktop +! +! Kturb-part +! + + real :: uz, vz, shr2 , ritur, ktur + + real :: kamp, zmetk, zgrow + real :: stab, stab_dt, dtstab + integer :: nstab, ist, anstab(levs) + real :: w1, w2, w3, dtdif + + real :: dzmetm, dzmetp, dzmetf, bdif, kturp + real :: bnrh_src +!-------------------------------------------------------------------------- +! + + if (mpi_id == master .and. kdt < 2) then + print *, im, levs, dtp, kdt, ' vay-solv2-v1' + print *, minval(tm), maxval(tm), ' min-max-tm ' + print *, minval(vm), maxval(vm), ' min-max-vm ' + print *, minval(um), maxval(um), ' min-max-um ' + print *, minval(qm), maxval(qm), ' min-max-qm ' + print *, minval(prsl), maxval(prsl), ' min-max-Pmid ' + print *, minval(prsi), maxval(prsi), ' min-max-Pint ' + print *, minval(zmet), maxval(zmet), ' min-max-Zmid ' + print *, minval(zmeti), maxval(zmeti), ' min-max-Zint ' + print *, minval(prslk), maxval(prslk), ' min-max-Exner ' + print *, minval(tau_ngw), maxval(tau_ngw), ' min-max-taungw ' + print *, tau_min, ' tau_min ', tamp_mpa, ' tamp_mpa ' +! + endif + + if (idebug_gwrms == 1) then + tauabs=0.0; wrms =0.0 ; trms =0.0 + endif + +! grav2 = grav + grav +! rgrav2 = rgrav*rgrav + + rci(:) = 1./zci(:) + rdci(:) = 1./zdci(:) + + rdtp = 1./dtp + rdtp2 = 0.5*rdtp +! +! launch level control ksrc > 2 +! + + ksrc= max(ilaunch, 3) + km2 = ksrc - 2 + km1 = ksrc - 1 + kp1 = ksrc + 1 + ktop= levs+1 + + do k=1,levs + suprf(k) = kion(k) ! approximate 1-st order damping with Fast super-RF of FV3 + pdvdt(:,k) = 0.0 + pdudt(:,k) = 0.0 + pdtdt(:,k) = 0.0 + dked(: ,k) = 0.0 + enddo + +!----------------------------------------------------------- +! column-based j=1,im pjysics with 1D-arrays +!----------------------------------------------------------- + DO j=1, im + + jl =j + tx1 = omega2 * sinlat(j) *rv_kxw + cf1 = abs(tx1) + c2f2 = tx1 * tx1 + ucrit_max = max(ucrit, cf1) + ucrit3 = ucrit_max*ucrit_max*ucrit_max +! +! ngw-fluxes at all gridpoints (with tau_min at least) +! + taub_src = max(tau_ngw(jl), tau_min) + aum(km2:levs) = um(jl,km2:levs) + avm(km2:levs) = vm(jl,km2:levs) + atm(km2:levs) = tm(jl,km2:levs) + aqm(km2:levs) = qm(jl,km2:levs) + aprsl(km2:levs) = prsl(jl,km2:levs) + azmet(km2:levs) = zmet(jl,km2:levs) + aprsi(km2:levs+1) = prsi(jl,km2:levs+1) + azmeti(km2:levs+1) = zmeti(jl,km2:levs+1) + + rho_src = aprsl(ksrc)*rdi/atm(ksrc) + +! --------------------------------------------- +! interface mean flow parameters launch -> levs+1 +! --------------------------------------------- + do jk= km1,levs + tvc = atm(jk) * (1. +fv*aqm(jk)) + tvm = atm(jk-1) * (1. +fv*aqm(jk-1)) + ptc = tvc/ prslk(jl, jk) + ptm = tvm/prslk(jl,jk-1) +! + zthm = 2.0 / (tvc+tvm) +! + uint(jk) = 0.5 *(aum(jk-1)+aum(jk)) + vint(jk) = 0.5 *(avm(jk-1)+avm(jk)) + rhomid(jk) = aprsl(jk)*rdi/atm(jk) + rhoint(jk) = aprsi(jk)*rdi*zthm ! rho = p/(RTv) + zdelp = azmeti(jk+1)-azmeti(jk) ! >0 ...... dz-meters + zdelm = 1./(azmet(jk)-azmet(jk-1)) ! 1/dz ...... 1/meters + dzdt(jk) = dtp/zdelp +! +! bvf2 = grav2 * zdelm * (ptc-ptm)/ (ptc + ptm) ! N2=[g/PT]*(dPT/dz) +! + bn2(jk) = grav2cpd*zthm * (1.0+rcpdl*(tvc-tvm)*zdelm) + bn2(jk) = max(min(bn2(jk), bnv2max), bnv2min) + bn(jk) = sqrt(bn2(jk)) + bnk(jk) = bn(jk)*v_kxw + rhobnk(jk)=rhoint(jk)/bnk(jk)*v_kxw + wrk3(jk)= 1./zdelp/rhomid(jk) ! 1/rho_mid(k)/[Z_int(k+1)-Z_int(k)] + irhodz_mid(jk) = rdtp*zdelp*rhomid(jk)/rho_src + + v_zmet(jk) = 2.*zdelp ! 2*kzi*[Z_int(k+1)-Z_int(k)] +! +! +! diagnostics -Kzz above PBL +! + uz = aum(jk) - aum(jk-1) + vz = avm(jk) - avm(jk-1) + shr2 = (max(uz*uz+vz*vz, dw2min)) * zdelm *zdelm + + zmetk = azmet(jk)* rh4 ! mid-layer height k_int => k_int+1 + zgrow = exp(zmetk) + ritur = bn2(jk)/shr2 + kamp = sqrt(shr2)*sc2 *zgrow + w1 = 1./(1. + 5*ritur) + ktur= min(max(kamp * w1 * w1, dked_min)+kvg(k), dked_max) + zmetk = azmet(jk)* rhp + vueff(jk) = ktur*0. + 2.e-5*exp( zmetk) + enddo + + if (idebug_gwrms == 1) then + do jk= km1,levs + wrk1(jk) = rv_kxw/rhoint(jk) + wrk2(jk)= rgrav2*zthm*zthm*bn2(jk) ! dimension [K*K]*(c2/m2) + enddo + endif + +! +! extrapolating values for ktop = levs+1 (lev-interface for prsi(levs+1) =/= 0) +! + jk = levs + + suprf(ktop) = kion(jk) + + rhoint(ktop) = aprsi(ktop)*rdi/atm(jk) + + uint(ktop) = aum(jk) + vint(ktop) = avm(jk) + + v_zmet(ktop) = v_zmet(jk) + vueff(ktop) = vueff(jk) + bn2(ktop) = bn2(jk) + bn(ktop) = bn(jk) + bnk(ktop) = bn(ktop)*v_kxw + + rhobnk(ktop) = rhoint(ktop)/bnk(ktop)*v_kxw + + bvi = bn(ksrc); bvi2 = bvi * bvi; + bvi3 = bvi2*bvi; bvi4 = bvi2 * bvi2; rcms = zms/bvi + bnrh_src = bvi/rhoint(ksrc) +! +! define intrinsic velocity (relative to ilaunch) u(z)-u(zo), and coefficinets +! ------------------------------------------------------------------------------------------ + do iaz=1, nazd + ul(iaz) = zcosang(iaz) *uint(ksrc) + zsinang(iaz) *vint(ksrc) + enddo +! + do jk=ksrc, ktop + do iaz=1, nazd + zu = zcosang(iaz)*uint(jk) + zsinang(iaz)*vint(jk) + ui(iaz, jk) = zu !- ul(iaz)*0. + enddo + enddo +! ----------------------------------------- +! set launch momentum flux spectral density +! ----------------------------------------- + + fpu(1, ksrc) =0. + do inc=1,nwav + zcin = zci(inc) + zcin4 = zci4(inc)/bvi4 +! + if(nslope == 0) then + zcin3 = zci3(inc)/bvi3 + flux(inc,1) = zcin/(1.+zcin3) + endif + + if(nslope == 1) flux(inc,1) = zcin/(1.+zcin4) + if(nslope == 2) flux(inc,1)= zcin/(1.+zcin4*zcin*rcms) + +! integrate (flux x dx) + fpu(1,ksrc) = fpu(1,ksrc) + flux(inc,1)*zdci(inc) + + do iaz=1,nazd + akzw(inc, iaz,ksrc:ktop) = bvi*rci(inc) + enddo + + enddo +! + flux_norm = taub_src / fpu(1, ksrc) +! + do iaz=1,nazd + fpu(iaz, ksrc) = taub_src + enddo + +! adjust rho/bn vertical factors for saturated fluxes (E(m) ~m^-3) + bnrh_src=bnrh_src*flux_norm + do jk=ksrc, ktop + fden_bn(jk) = bnrh_src*rhoint(jk) / bn(jk) !*bvi/rhoint(ksrc) + enddo + +! + do inc=1, nwav + flux(inc,1) = flux_norm*flux(inc,1) + enddo + + if (idebug_gwrms == 1) then + pwrms =0. + ptrms =0. + tx1 = real(nazd)/rhoint(ksrc)*rv_kxw + ze2 = wrk2(ksrc) ! (bvi*atm(ksrc)*rgrav)**2 + do inc=1, nwav + v_kzw = bvi*rci(inc) + ze1 = flux(inc,1)*zdci(inc)*tx1*v_kzw + pwrms = pwrms + ze1 + ptrms = ptrms + ze1 * ze2 + enddo + wrms(jl, ksrc) = pwrms + trms(jl, ksrc) = ptrms + endif + +! copy flux-1 into other azimuths +! -------------------------------- + do iaz=2, nazd + do inc=1,nwav + flux(inc,iaz) = flux(inc,1) + enddo + enddo + +! constant flux below ilaunch + do jk=km1, ksrc + do inc=1, nwav + flux_z(inc,jk)=flux(inc,1) + enddo + enddo + + wave_act(:,:) = 1.0 +! vertical do-loop + do jk=ksrc, levs + jkp = jk+1 +! azimuth do-loop + do iaz=1, nazd + + umfp = ui(iaz, jkp) + umfm = ui(iaz, jk) + umfc = .5*(umfm + umfp) +! wave-cin loop + do inc=1, nwav + + zcin = zci(inc) ! zcin =/0 by definition + zcinc = rci(inc) + + if(wave_act(inc,iaz) == 1.0) then +!======================================================================= +! discrete mode +! saturated limit wfit = kzw*kzw*kt; wfdt = wfit/(kxw*cx)*betat +! & dissipative kzi = 2.*kzw*(wfdm+wfdt)*dzpi(k) +!======================================================================= + + v_cdp = zcin - umfp + + if (v_cdp .le. ucrit_max) then +! +! between layer [k-1,k or jk-jkp] (Chi - Uk) -> ucrit_max ; wave's absorption +! + wave_act(inc,iaz) =0. + akzw(inc, iaz, jkp) = pi/v_zmet(jk) ! pi2/dzmet + fluxs = 0.0 !max(0., rhobnk(jkp)*ucrit3)*rdci(inc) + flux(inc,iaz) = fluxs + flux_z(inc,jkp) = fluxs +! ucrit_maxdc =0. + else + + v_wdp = v_kxw*v_cdp + wdop2 = v_wdp* v_wdp + v_cdp2=v_cdp*v_cdp +! +! rotational cut-off +! + cdf2 = v_cdp2 - c2f2 + + if (cdf2 > 0.0) then + kzw2 = (bn2(jkp)-wdop2)/Cdf2 + else + kzw2 = mkz2min + endif + + if ( kzw2 > mkz2min ) then + v_kzw = sqrt(kzw2) + akzw(inc, iaz, jkp) = v_kzw +! +!linsatdis: kzw2, kzw3, kdsat, c2f2, cdf2, cdf1 +! +!kzw2 = (bn2(k)-wdop2)/Cdf2 - rhp4 - v_kx2w ! full lin DS-NGW (N2-wd2)*k2=(m2+k2+[1/2H]^2)*(wd2-f2) +! Kds = kxw*Cdf1*rhp2/kzw3 +! + v_cdp = sqrt( cdf2 ) + v_wdp = v_kxw * v_cdp + v_wdi = kzw2*vueff(jk) + supRF(jk) ! supRF - diss due to FRF-FV3dycore for "all" vars + v_wdpc = sqrt(v_wdp*v_wdp +v_wdi*v_wdi) + v_kzi = v_kzw*v_wdi/v_wdpc +! + ze1 = v_kzi*v_zmet(jk) + + if (ze1 .ge. 1.e-2) then + expdis = max(exp(-ze1), 0.01) + else + expdis = 1./(1.+ ze1) + endif + +! + wave_act(inc,iaz) = 1.0 + fmode = flux(inc,iaz) + + else ! kzw2 <= mkz2min large "Lz"-reflection + + expdis = 1.0 + v_kzw = mkzmin + + v_cdp = 0. ! no effects of reflected waves + wave_act(inc,iaz) = 0.0 + akzw(inc, iaz, jkp) = v_kzw + fmode = 0. + endif + + fdis = fmode*expdis +! +! saturated flux + wave dissipation - Keddy_gwsat in UGWP-V1 +! linsatdis = 1.0 , here: u'^2 ~ linsatdis* [v_cdp*v_cdp] +! +! fluxs= fden_bn(jkp)*cdf2*zcinc + fluxs= fden_bn(jkp)*sqrt(cdf2) + +! +! S2003 fluxs= fden_bn(jk)*(zcin-ui(jk,iaz))**2/zcin +! WM2001 fluxs= fden_bn(jk)*(zcin-ui(jk,iaz)) +! + zdep = wave_act(inc,iaz)* (fdis-fluxs) + if(zdep > 0.0 ) then +! subs on sat-limit + flux(inc,iaz) = fluxs + flux_z(inc,jkp) = fluxs + else +! assign dis-ve flux + flux(inc,iaz) = fdis + flux_z(inc,jkp) = fdis + endif + +! cgz = bnk(jk)/max(mkz2min, kzw2) + + dtau = flux_z(inc,jk)-flux_z(inc,jkp) + if (dtau .lt. 0) flux_z(inc,jkp) = flux_z(inc,jk) + +! if (dtau .ge. ucrit_maxdc) then +! flux_z(inc,jkp) = max(flux_z(inc,jk)-ucrit_maxdc, 0.) +! ze1 = zci(inc)-umfc-ucrit_maxdc +! write(6,287) dzdt(jk)/cgz, dtau/ucrit_maxdc, flux_z(inc,jkp)*1.e3, fluxs*1.e3, jk, zci(inc), ze1 +! +! endif +! 287 format(' dtau >ucrit_max', 4(2x, F12.7), I4, 2x, 2(2x,F8.3)) +! + + endif ! coriolis or CL condition-checkif => (v_cdp .le. ucrit_max) then + endif ! only for waves w/o CL-absorption wave_act=1 + + +! + enddo ! wave-inc-loop +! +! integrate over spectral modes fpu(y, z, azimuth) wave_act(jl,inc,iaz)*flux(jl,inc,iaz)*[d("zcinc")] +! + if (idebug_gwrms == 1) then + pwrms =0. + ptrms =0. +! new arrays + + do inc=1, nwav + if (wave_act(inc,iaz) > 0.) then + v_kzw =akzw(inc, iaz, jk) + ze1 = flux(inc,iaz)*v_kzw*zdci(inc)*wrk1(jk) + pwrms = pwrms + ze1 + ptrms = ptrms + ze1*wrk2(jk) + endif + enddo + Awrms(iaz, jk) = pwrms + Atrms(iaz, jk) = ptrms + endif + + + dfdz_v(iaz, jk) = 0.0 + fpu(iaz, jkp) = 0.0 + + do inc=1, nwav + if (wave_act(inc,iaz) > 0.) then + + zcinc =zdci(inc) + vc_zflx_mode = flux(inc,iaz) + fpu(iaz, jkp) = fpu(iaz,jkp) + vc_zflx_mode*zcinc + +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +! (heat deposition integration over spectral mode for each azimuth +! later sum over selected azimuths as "non-negative" scalars) +! cdf1 = sqrt( (zci(inc)-umfc)**2-c2f2) +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +! zdelp = wrk3(jk)*cdf1 *zcinc + zdelp = wrk3(jk)*abs(zci(inc)-umfc) *zcinc + vm_zflx_mode = flux_z(inc,jk) + dfdz_v(iaz, jk) = dfdz_v(iaz,jk) +(vm_zflx_mode-vc_zflx_mode)*zdelp ! heating >0 + endif + enddo !waves inc=1,nwav + + ze1 =fpu(iaz, jk) + if (fpu(iaz, jkp) > ze1 ) fpu(iaz, jkp) = ze1 +! -------------- + enddo ! end Azimuth do-loop + +! +! extra- eddy wave dissipation to limit GW-rms +! tx1 = sum(abs(dfdz_v(jk,1:nazd)))/bn2(jk) +! ze1=max(dked_min, tx1) +! ze2=min(dked_max, ze1) +! vueff(jkp) = ze2 + vueff(jkp) +! + + + enddo ! end Vertical do-loop +! +! top-layers constant interface-fluxes and zero-heat +! + fpu(1:nazd,ktop) = fpu(1:nazd, levs) + dfdz_v(1:nazd, levs) = 0.0 + +! --------------------------------------------------------------------- +! sum contribution for total zonal and meridional fluxes + +! energy dissipation +! --------------------------------------------------- +! +!======================================================================== +! at the source level and below taux = 0 (taux_E=-taux_W by assumption) +!======================================================================== + + + + do jk=ksrc, levs + taux(jk) = 0.0 + tauy(jk) = 0.0 + do iaz=1,nazd + taux(jk) = taux(jk) + fpu(iaz,jk)*zcosang(iaz) + tauy(jk) = tauy(jk) + fpu(iaz,jk)*zsinang(iaz) + pdtdt(jl,jk) = pdtdt(jl,jk)+ dfdz_v(iaz,jk) + enddo + enddo + jk = ktop; taux(jk)=0.; tauy(jk)=0. + do iaz=1,nazd + taux(jk) = taux(jk) + fpu(iaz,jk)*zcosang(iaz) + tauy(jk) = tauy(jk) + fpu(iaz,jk)*zsinang(iaz) + enddo + + if (idebug_gwrms == 1) then + + do jk=kp1, levs + do iaz=1,nazd + wrms(jl,jk) =wrms(jl,jk) + Awrms(iaz,jk) + trms(jl,jk) =trms(jl,jk) + Atrms(iaz,jk) + tauabs(jl,jk)=tauabs(jl,jk) + fpu(iaz,jk) + enddo + enddo + + endif +! + + do jk=ksrc,levs + jkp = jk + 1 + zdelp = wrk3(jk)*gw_eff + ze1 = (taux(jkp)-taux(jk))* zdelp + ze2 = (tauy(jkp)-tauy(jk))* zdelp + + if (abs(ze1) >= maxdudt ) then + ze1 = sign(maxdudt, ze1) + endif + if (abs(ze2) >= maxdudt ) then + ze2 = sign(maxdudt, ze2) + endif + pdudt(jl,jk) = -ze1 + pdvdt(jl,jk) = -ze2 +! +! Cx =0 based Cx=/= 0. above +! +! + if (knob_ugwp_doheat == 1) then +! +! ek1 =aum(jk)*aum(jk) +avm(jk)*avm(jk) +! ugw = aum(jk)- ze1*dtp; vgw = avm(jk)- ze2*dtp +! ek2 = ugw*ugw +vgw*vgw +! pdtdt(jl,jk) = rdtp2*max(ek1-ek2, 0.0) !=ze1*um + 0.5*ze1^2*dtp +! pdtdt(jl,jk) = max(ze1*aum(jk) + ze2*avm(jk), 0.) ! gw_eff => in "ze1 and ze2" + pdtdt(jl,jk) = max(pdtdt(jl,jk) , 0.)*gw_eff + endif + + if (abs(pdtdt(jl,jk)) >= maxdtdt ) pdtdt(jl,jk) = maxdtdt + ze1 = max(dked_min, pdtdt(jl,jk)/bn2(jk)) + dked(jl,jk) = min(dked_max, ze1) + + enddo +! +! add limiters/efficiency for "unbalanced ics" if it is needed +! + do jk=ksrc,levs + pdtdt(jl,jk) = pdtdt(jl,jk)*rcpd + enddo +! + dktur(1:levs) = dked(jl,1:levs) +! + do ist= 1, 3 + do jk=ksrc,levs-1 + adif(jk) = .25*(dktur(jk-1)+ dktur(jk+1)) + .5*dktur(jk) + enddo + dktur(ksrc:levs-1) = adif(ksrc:levs-1) + enddo + +! dked(jl, ksrc:levs-1) = dktur(ksrc:levs-1) +! dked(jl, levs) =dked(jl, levs-1) + +! +! perform "diffusive" 3-point smoothing of "u-v-t" +! from the surface to the "top" +! + if (knob_ugwp_dokdis == 2) then + + uold(1:levs) = aum(1:levs)+pdudt(jl,1:levs)*dtp + vold(1:levs) = avm(1:levs)+pdvdt(jl,1:levs)*dtp + told(1:levs) = atm(1:levs)+pdtdt(jl,1:levs)*dtp + + do jk=1,levs + zmetk= azmet(jk)*rhp + ktur = kvg(k) + 2.e-5*exp( zmetk) + dktur(jk) = dked(jl,jk) + ktur + enddo + + dzmetm= azmet(ksrc)- azmet(ksrc-1) + + do jk=2,levs-1 + dzmetf = (azmeti(jk+1)- azmeti(jk))*rhomid(jk) + ktur = .5*(dktur(jk-1)+dktur(jk)) *rhoint(jk)/dzmetf + kturp = .5*(dktur(jk+1)+dktur(jk))*rhoint(jk+1)/dzmetf + + dzmetp = azmet(jk+1)-azmet(jk) + Adif(jk) = ktur/dzmetm + Cdif(jk) = kturp/dzmetp + bdif = adif(jk)+cdif(jk) + if (rdtp < bdif ) then + Anstab(jk) = nint( bdif/rdtp + 1) + else + Anstab(jk) = 1 + endif + dzmetm = dzmetp + enddo + + nstab = maxval( Anstab(ksrc:levs-1)) + if (nstab .ge. 2) print *, 'nstab ', nstab + dtdif = dtp/real(nstab) + do ist= 1, nstab + do k=ksrc,levs-1 + Bdif = nstab*rdtp-Adif(k)-Cdif(k) + unew(k) = uold(k)*Bdif+ uold(k-1)*Adif(k) + uold(k)*Cdif(k) + vnew(k) = vold(k)*Bdif+ vold(k-1)*Adif(k) + vold(k)*Cdif(k) + tnew(k) = told(k)*Bdif+ told(k-1)*Adif(k) + told(k)*Cdif(k) + enddo + uold = unew*dtdif + vold = vnew*dtdif + told = tnew*dtdif + enddo +! +! create "smoothed" tendencies by molecular + GW-eddy diffusion +! + do k=ksrc,levs-1 + pdtdt(jl,jk)= rdtp*(told(k) - tm(jl,k)) + ze2 = rdtp*(uold(k) - aum(k)) + ze1 = rdtp*(vold(k) - avm(k)) + if (abs(pdtdt(jl,jk)) >= maxdtdt ) pdtdt(jl,jk) = maxdtdt + if (abs(ze1) >= maxdudt ) then + ze1 = sign(maxdudt, ze1) + endif + if (abs(ze2) >= maxdudt ) then + ze2 = sign(maxdudt, ze2) + endif + pdudt(jl, k) = ze2 + pdvdt(jl, k) = ze1 +! +! add eddy viscosity heating +! pdtdt(jl,jk) = pdtdt(jl,jk) - max(ze1*aum(jk) + ze2*avm(jk), 0.) *rcpd +! + enddo + + + ENDIF ! dissipative IF-loop for "abrupt" tendencies + + enddo ! J-loop +! + + + RETURN + +! +! Print/Debugging ----------------------------------------------------------------------- +! + 239 continue + if (kdt ==1 .and. mpi_id == master) then +! + print *, 'ugwp-vay: nazd-nw-ilaunch=', nazd, nwav,ilaunch, maxval(kvg), ' kvg ' + print *, 'ugwp-vay: zdci(inc)=' , maxval(zdci), minval(zdci) + print *, 'ugwp-vay: zcimax=' , maxval(zci) ,' zcimin=' , minval(zci) +! print *, 'ugwp-vay: tau_ngw=' , maxval(taub_src)*1.e3, minval(taub_src)*1.e3, tau_min + + print * + + endif + + if (kdt == 1 .and. mpi_id == master) then + print *, 'vgw done nstab ', nstab +! + print *, maxval(pdudt)*86400., minval(pdudt)*86400, 'vgw ax ugwp' + print *, maxval(pdvdt)*86400., minval(pdvdt)*86400, 'vgw ay ugwp' + print *, maxval(dked)*1., minval(dked)*1, 'vgw keddy m2/sec ugwp' + print *, maxval(pdtdt)*86400., minval(pdtdt)*86400,'vgw eps ugwp' +! +! print *, ' ugwp -heating rates ' + endif + + + + return + end subroutine cires_ugwp_solv2_v1 + + +end module cires_ugwp_solv2_v1_mod diff --git a/physics/cires_ugwp_triggers_v1.F90 b/physics/cires_ugwp_triggers_v1.F90 new file mode 100644 index 000000000..058003b3b --- /dev/null +++ b/physics/cires_ugwp_triggers_v1.F90 @@ -0,0 +1,576 @@ +module cires_ugwp_triggers_v1 + + +contains + + + subroutine ugwp_triggers + implicit none + write(6,*) ' physics-based triggers for UGWP ' + end subroutine ugwp_triggers +! + SUBROUTINE subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & + cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) + use ugwp_common , only : deg_to_rad + + implicit none + integer :: nx, ny + real :: lon(nx), lat(ny) + real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) + real :: rlatc(ny-1), brcos(ny), brcos2(ny) + real :: earth_r, ra1, ra2, dx, dy, dlat + real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) + integer :: j +! +! specify common constants and +! geometric factors to compute deriv-es etc ... +! coriolis coslat tan etc... +! + earth_r = 6370.e3 + ra1 = 1.0 / earth_r + ra2 = ra1*ra1 +! + rlat = lat*deg_to_rad + rlon = lon*deg_to_rad + tanlat = atan(rlat) + cosv = cos(rlat) + dy = rlat(2)-rlat(1) + dx = rlon(2)-rlon(1) +! + do j=1, ny-1 + rlatc(j) = 0.5 * (rlat(j)+rlat(j+1)) + enddo +! + do j=2, ny-1 + brcos(j) = 1.0 / cos(rlat(j))*ra1 + enddo + + brcos(1) = brcos(2) + brcos(ny) = brcos(ny-1) + brcos2 = brcos*brcos +! + dlam1 = brcos / (dx+dx) + dlam2 = brcos2 / (dx*dx) + + dlat = ra1 / (dy+dy) + + divJp = dlat*cosv + divJM = dlat*cosv +! + do j=2, ny-1 + divJp(j) = dlat*cosv(j+1)/cosv(j) + divJM(j) = dlat*cosv(j-1)/cosv(j) + enddo + divJp(1) = divjp(2) !*divjp(1)/divjp(2) + divJp(ny) = divjp(1) + divJM(1) = divjM(2) !*divjM(1)/divjM(2) + divJM(ny) = divjM(1) +! + return + end SUBROUTINE subs_diag_geo +! + subroutine get_xy_pt(V, Vx, Vy, nx, ny, dlam1, dlat) +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +! compute for each Vert-column: grad(V) +! periodic in X and central diff ... +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + implicit none + integer :: nx, ny + real :: V(nx, ny), dlam1(ny), dlat + real :: Vx(nx, ny), Vy(nx, ny) + integer :: i, j + do i=2, nx-1 + Vx(i,:) = dlam1(:)*(V(i+1,:)-V(i-1,:)) + enddo + Vx(1,:) = dlam1(:)*(V(2,:)-V(nx,:)) + Vx(nx,:) = dlam1(:)*(V(1,:)-V(nx-1,:)) + + do j=2, ny-1 + Vy(:,j) = dlat*(V(:,j+1)-V(:, j-1)) + enddo + Vy(:, 1) = dlat*2.*(V(:,2)-V(:,1)) + Vy(:,ny) = dlat*2.*(V(:,ny)-V(:,ny-1)) + + end subroutine get_xy_pt + + subroutine get_xyd_wind( V, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) +! +! compute for each Vert-column: grad(V) +!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + implicit none + integer :: nx, ny + real :: V(nx, ny), dlam1(ny), dlat + real :: Divjp(ny), Divjm(ny) + real :: Vx(nx, ny), Vy(nx, ny), Vyd(nx, ny) + integer :: i, j + do i=2, nx-1 + Vx(i,:) = dlam1(:)*(V(i+1,:)-V(i-1,:)) + enddo + Vx(1,:) = dlam1(:)*(V(2,:)-V(nx,:)) + Vx(nx,:) = dlam1(:)*(V(1,:)-V(nx-1,:)) + + do j=2, ny-1 + Vy(:,j) = dlat*(V(:,j+1)-V(:, j-1)) + enddo + Vy(:, 1) = dlat*2.*(V(:,2)-V(:,1)) + Vy(:,ny) = dlat*2.*(V(:,ny)-V(:,ny-1)) +!~~~~~~~~~~~~~~~~~~~~ +! 1/cos*d(vcos)/dy +!~~~~~~~~~~~~~~~~~~~~ + do j=2, ny-1 + Vyd(:,j) = divJP(j)*V(:,j+1)-V(:, j-1)*divJM(j) + enddo + Vyd(:, 1) = Vyd(:,2) + Vyd(:,ny) = Vyd(:,ny-1) + + end subroutine get_xyd_wind + + subroutine trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_fgf) + implicit none + integer :: nx, ny, nz + real :: lon(nx), lat(ny) +! + real, dimension(nz) :: pmid + real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d + real, dimension(nx, ny ) :: PS + real, dimension(nx, ny, nz) :: trig3d_fgf +! +! locals +! + real, dimension(nx, ny) :: ux, uy, uyd, vy, vx, vyd, ptx, pty + integer :: k, i, j + + real, parameter :: cappa=2./7., pref=1.e5 + real, dimension(nx, ny) :: pt, w1, w2 + + real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) + real :: rlatc(ny-1), brcos(ny), brcos2(ny) + + real :: dx, dy, dlat + real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) + + + call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & + cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) + + do k=1, nz + w1(:,:) = P3d(:,:,k) + w2(:,:) = T(:,:,k) + + pt = w2*(pref/w1)**cappa + call get_xy_pt(Pt, ptx, pty, nx, ny, dlam1, dlat) + w1(:,:) = V(:,:, K) + call get_xyd_wind( w1, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) + w1(:,:) = U(:,:, K) + call get_xyd_wind( w1, Ux, Uy, Uyd, nx, ny, dlam1, dlat, divJp, divJm) + + trig3d_fgf(:,:,k) = -ptx*ptx*ux - pty*pty*vy -(vx+uyd)*ptx*pty + + enddo + end subroutine trig3d_fjets + + subroutine trig3d_okubo( nx, ny, nz, U, V, T, Q, P3d, PS, delp, delz, lon, lat, pmid, trig3d_okw) + implicit none + integer :: nx, ny, nz + real :: lon(nx), lat(ny) +! + real, dimension(nz) :: pmid + real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d + real, dimension(nx, ny ) :: PS + real, dimension(nx, ny, nz) :: trig3d_okw +! +! locals +! + real, dimension(nx, ny) :: ux, uy, uyd, vy, vx, vyd, ptx, pty + integer :: k, i, j + + real, parameter :: cappa=2./7., pref=1.e5 + real, dimension(nx, ny) :: pt, w1, w2, d1 + + real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) + real :: rlatc(ny-1), brcos(ny), brcos2(ny) + + real :: dx, dy, dlat + real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) + + call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & + cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) + + do k=1, nz + w1(:,:) = P3d(:,:,k) + w2(:,:) = T(:,:,k) + + pt = w2*(pref/w1)**cappa + call get_xy_pt(Pt, ptx, pty, nx, ny, dlam1, dlat) + w1(:,:) = V(:,:, K) + call get_xyd_wind( w1, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) + w1(:,:) = U(:,:, K) + call get_xyd_wind( w1, Ux, Uy, Uyd, nx, ny, dlam1, dlat, divJp, divJm) + + trig3d_okw(:,:,k) = -ptx*ptx*ux - pty*pty*vy -(vx+uyd)*ptx*pty + w1 = (Ux -Vy)*(Ux-Vy) + (Vx +Uy)*(Vx+Uy) ! S2 + W2 = (Vx - Uyd)*(Vx - Uyd) + D1 = Ux + Vyd + trig3d_okw(:,:,k) = W1 -W2 +! trig3d_okw(:, :, k) =S2 -W2 +! trig3d_okw(:, :, k) =D1*D1 + 4*(Vx*Uyd -Ux*Vyd) ! ocean +! trig3d_okw(:, :, k) = trig3d_okw(:,:,k) + D1*D1 + 2.*D1*sqrt(abs(W1-W2)) ! S2 =W1Ted-luk + enddo + end subroutine trig3d_okubo +! + subroutine trig3d_dconv(nx, ny, nz, U, V, T, Q, P3d, PS, delp, delz, lon, lat, pmid, trig3d_conv, & + dcheat3d, precip2d, cld_klevs2d, scheat3d) + + implicit none + integer :: nx, ny, nz + real :: lon(nx), lat(ny) +! + real, dimension(nz) :: pmid + real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d + real, dimension(nx, ny ) :: PS + real, dimension(nx, ny, nz) :: trig3d_conv + + real, dimension(nx, ny, nz) :: dcheat3d, scheat3d + real, dimension(nx, ny ) :: precip2d + integer,dimension(nx, ny, 3 ):: cld_klevs2d + integer :: k + end subroutine trig3d_dconv + + subroutine cires_3d_triggers( nx, ny, nz, lon, lat, pmid, & + U, V, W, T, Q, delp, delz, p3d, PS, HS, Hyam, Hybm, Hyai, Hybi, & + trig3d_okw, trig3d_fgf, trig3d_conv, & + dcheat3d, precip2d, cld_klevs2d, scheat3d) + + implicit none + integer :: nx, ny, nz + real :: lon(nx), lat(ny) +! +! reversed ??? Hyai, Hybi , pmid +! + real, dimension(nz+2) :: Hyai, Hybi + real, dimension(nz+1) :: Hyam, Hybm +! + real, dimension(nz) :: pmid + real, dimension(nx, ny, nz) :: U, V, W, T, Q, delp, delz, p3d + real, dimension(nx, ny ) :: PS, HS + real, dimension(nx, ny, nz) :: trig3d_okw, trig3d_fgf, trig3d_conv + real, dimension(nx, ny, nz) :: dcheat3d, scheat3d + real, dimension(nx, ny ) :: precip2d + integer,dimension(nx, ny, 3 ):: cld_klevs2d + real :: dzkm, zkm + integer :: k +!================================================================================== +! fgf and OW-triggers +! read PRECIP + SH/DC conv heating + cloud-top-bot-middle from "separate" file !!! +! +!=================================================================================== + + call trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_fgf) + call trig3d_okubo( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_okw) + call trig3d_dconv(nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_conv, & + dcheat3d, precip2d, cld_klevs2d, scheat3d) +!===================================================================================================== +! output of triggers: trig3d_fgf, trig3d_okw, trig3d_conv, cheat3d, precip2d, cld_klevs2d, scheat3d +! +! Bulk momentum flux=/ 0 and levels for launches +! +!===================================================================================================== + 111 format(i6, 4(3x, F8.3), ' trigger-grid ') + + do k=1, nz-1 + zkm = -7.*alog(pmid(k)*1.e-3) + dzkm = zkm +7.*alog(pmid(k+1)*1.e-3) + write(6,111) k, hybi(k), pmid(k), zkm, dzkm !' triggers ' + enddo + + end subroutine cires_3d_triggers +!================================================================================== +! tot-flux launch 0 or 1 # of Launches +! specify time-dep bulk sources: taub, klev, if_src, nf_src +! +!================================================================================== + subroutine get_spectra_tau_convgw & + (nw, im, levs, dcheat, scheat, precip, icld, xlatd, sinlat, coslat,taub, klev, if_src, nf_src) +! +! temporarily can put GEOS-5/MERRA-2 GW-lat dependent function +! + integer :: nw, im, levs + integer,dimension(im,3) :: icld + real, dimension(im, levs) :: dcheat, scheat + real, dimension(im) :: precip, xlatd, sinlat, coslat + real, dimension(im) :: taub + integer, dimension(im) :: klev, if_src + integer :: nf_src +! +! locals + real, parameter :: precip_max = 100. ! mm/day + real, parameter :: tau_amp = 35.e-3 ! 35 mPa + + integer :: i, k, klow, ktop, kmid + real :: dtot, dmax, daver +! + nf_src = 0 + if_src(1:im) = 0 + taub(1:im) = 0.0 + do i=1, im + klow = icld(i,1) + ktop = icld(i,2) + kmid= icld(i,3) + if (klow == -99 .and. ktop == -99) then + cycle + else + klev(i) = ktop + k = klow + klev(i) = k + dmax = abs(dcheat(i,k) + scheat(i,k)) + do k=klow+1, ktop + dtot =abs(dcheat(i,k) + scheat(i,k)) + if ( dtot > dmax) then + klev(i) = k + dmax = dtot + endif + enddo +! +! klev as max( dcheat(i,k) + scheat) +! vertical width of conv-heating +! +! counts/triiger=1 & taub(i) +! + nf_src = nf_src +1 + if_src(i) = 1 + taub(i) = tau_amp* precip(i)/precip_max*coslat(i) + endif + + enddo +! +! 100 mb launch and MERRA-2 slat-forcing +! + call Slat_geos5(im, xlatd, taub) + nf_src =im + do i=1, im + if_src(i) = 1 + klev(i) = 127-45 + enddo + +! with info on precip/clouds/dc_heat create Bulk +! taub(im), klev(im) +! +! print *, ' get_spectra_tau_convgw ' + end subroutine get_spectra_tau_convgw +! + subroutine get_spectra_tau_nstgw(nw, im, levs, trig_fgf, xlatd, sinlat, coslat, taub, klev, if_src, nf_src) + integer :: nw, im, levs + real, dimension(im, levs) :: trig_fgf +! real, dimension(im, levs+1) :: pint + real, dimension(im) :: xlatd, sinlat, coslat + real, dimension(im) :: taub + integer, dimension(im) :: klev, if_src + integer :: nf_src +! locals + real, parameter :: tlim_fgf = 100. ! trig_fgf > tlim_fgf, launch waves should scale-dependent + real, parameter :: tau_amp = 35.e-3 ! 35 mPa + real, parameter :: pmax = 750.e2, pmin = 100.e2 + integer, parameter :: klow =127-92, ktop=127-45 + integer, parameter :: kwidth = ktop-klow+1 + integer :: i, k, kex + real :: dtot, dmax, daver + real :: fnorm, tau_min + nf_src = 0 + if_src(1:im) = 0 + taub(1:im) = 0.0 + fnorm = 1.0 / float(kwidth) + tau_min = tau_amp*fnorm + do i=1, im +! +! only trop-c fjets so find max(trig_fgf) => klev +! use abs-values to scale tau_amp +! + + k = klow + klev(i) = k + dmax = abs(trig_fgf(i,k)) + kex = 0 + if (dmax >= tlim_fgf) kex = kex+1 + do k=klow+1, ktop + dtot = abs(trig_fgf(i,k)) + if (dtot >= tlim_fgf) kex = kex+1 + if ( dtot > dmax) then + klev(i) = k + dmax = dtot + endif + enddo + + if (dmax .ge. tlim_fgf) then + nf_src = nf_src +1 + if_src(i) = 1 + taub(i) = tau_min*float(kex) !* precip(i)/precip_max*coslat(i) + endif + + enddo +! +! print *, ' get_spectra_tau_nstgw ' + call Slat_geos5(im, xlatd, taub) + nf_src =im + do i=1, im + if_src(i) = 1 + klev(i) = 127-45 + enddo +! + end subroutine get_spectra_tau_nstgw +! + subroutine get_spectra_tau_okw(nw, im, levs, trig_okw, xlatd, sinlat, coslat, taub, klev, if_src, nf_src) + integer :: nw, im, levs + real, dimension(im, levs) :: trig_okw +! real, dimension(im, levs+1) :: pint + real, dimension(im) :: xlatd, sinlat, coslat + real, dimension(im) :: taub + integer, dimension(im) :: klev, if_src + integer :: nf_src +! locals + real, parameter :: tlim_okw = 100. ! trig_fgf > tlim_fgf, launch waves should scale-dependent + real, parameter :: tau_amp = 35.e-3 ! 35 mPa + real, parameter :: pmax = 750.e2, pmin = 100.e2 + integer, parameter :: klow =127-92, ktop=127-45 + integer, parameter :: kwidth = ktop-klow+1 + integer :: i, k, kex + real :: dtot, dmax, daver + real :: fnorm, tau_min + + nf_src = 0 + if_src(1:im) = 0 + taub(1:im) = 0.0 + fnorm = 1./float(kwidth) + tau_min = tau_amp*fnorm + print *, ' get_spectra_tau_okwgw ' + do i=1, im + k = klow + klev(i) = k + dmax = abs(trig_okw(i,k)) + kex = 0 + if (dmax >= tlim_okw) kex = kex+1 + do k=klow+1, ktop + dtot = abs(trig_okw(i,k)) + if (dtot >= tlim_fgf ) kex = kex+1 + if ( dtot > dmax) then + klev(i) = k + dmax = dtot + endif + enddo +! + if (dmax >= tlim_okw) then + nf_src = nf_src + 1 + if_src(i) = 1 + taub(i) = tau_min*float(kex) !* precip(i)/precip_max*coslat(i) + endif + + enddo + print *, ' get_spectra_tau_okwgw ' + end subroutine get_spectra_tau_okw +! +! +! +!>\ingroup cires_ugwp_run +!> @{ +!! +!! + subroutine slat_geos5_tamp_v1(im, tau_amp, xlatdeg, tau_gw) +!================= +! GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) =rho* +!================= + implicit none + integer :: im + real :: tau_amp, xlatdeg(im), tau_gw(im) + real :: latdeg, flat_gw, tem + integer :: i + +! +! if-lat +! + do i=1, im + latdeg = abs(xlatdeg(i)) + if (latdeg < 15.3) then + tem = (latdeg-3.0) / 8.0 + flat_gw = 0.75 * exp(-tem * tem) + if (flat_gw < 1.2 .and. latdeg <= 3.0) flat_gw = 0.75 + elseif (latdeg < 31.0 .and. latdeg >= 15.3) then + flat_gw = 0.10 + elseif (latdeg < 60.0 .and. latdeg >= 31.0) then + tem = (latdeg-60.0) / 23.0 + flat_gw = 0.50 * exp(- tem * tem) + elseif (latdeg >= 60.0) then + tem = (latdeg-60.0) / 70.0 + flat_gw = 0.50 * exp(- tem * tem) + endif + tau_gw(i) = tau_amp*flat_gw + enddo +! + end subroutine slat_geos5_tamp_v1 + + subroutine slat_geos5(im, xlatdeg, tau_gw) +!================= +! GEOS-5 & MERRA-2 lat-dependent GW-source function tau(z=Zlaunch) =rho* +!================= + implicit none + integer :: im + real :: xlatdeg(im) + real :: tau_gw(im) + real :: latdeg + real, parameter :: tau_amp = 100.e-3 + real :: trop_gw, flat_gw + integer :: i +! +! if-lat +! + trop_gw = 0.75 + do i=1, im + latdeg = xlatdeg(i) + if (-15.3 < latdeg .and. latdeg < 15.3) then + flat_gw = trop_gw*exp(-( (abs(latdeg)-3.)/8.0)**2) + if (flat_gw < 1.2 .and. abs(latdeg) <= 3.) flat_gw = trop_gw + else if (latdeg > -31. .and. latdeg <= -15.3) then + flat_gw = 0.10 + else if (latdeg < 31. .and. latdeg >= 15.3) then + flat_gw = 0.10 + else if (latdeg > -60. .and. latdeg <= -31.) then + flat_gw = 0.50*exp(-((abs(latdeg)-60.)/23.)**2) + else if (latdeg < 60. .and. latdeg >= 31.) then + flat_gw = 0.50*exp(-((abs(latdeg)-60.)/23.)**2) + else if (latdeg <= -60.) then + flat_gw = 0.50*exp(-((abs(latdeg)-60.)/70.)**2) + else if (latdeg >= 60.) then + flat_gw = 0.50*exp(-((abs(latdeg)-60.)/70.)**2) + end if + tau_gw(i) = tau_amp*flat_gw + enddo +! + end subroutine slat_geos5 + subroutine init_nazdir(naz, xaz, yaz) + use ugwp_common , only : pi2 + implicit none + integer :: naz + real, dimension(naz) :: xaz, yaz + integer :: idir + real :: phic, drad + drad = pi2/float(naz) + if (naz.ne.4) then + do idir =1, naz + Phic = drad*(float(idir)-1.0) + xaz(idir) = cos(Phic) + yaz(idir) = sin(Phic) + enddo + else +! if (naz.eq.4) then + xaz(1) = 1.0 !E + yaz(1) = 0.0 + xaz(2) = 0.0 + yaz(2) = 1.0 !N + xaz(3) =-1.0 !W + yaz(3) = 0.0 + xaz(4) = 0.0 + yaz(4) =-1.0 !S + endif + end subroutine init_nazdir + + +end module cires_ugwp_triggers_v1 + diff --git a/physics/cires_vert_orodis.F90 b/physics/cires_vert_orodis.F90 index 0d3cce194..8b3550500 100644 --- a/physics/cires_vert_orodis.F90 +++ b/physics/cires_vert_orodis.F90 @@ -1,3 +1,9 @@ +module cires_vert_orodis + + +contains + + ! subroutine ugwp_drag_mtb ! subroutine ugwp_taub_oro ! subroutine ugwp_oro_lsatdis @@ -1016,3 +1022,5 @@ subroutine ugwp_tofd1d(levs, sigflt, elvmax, zsurf, zpbl, u, v, & enddo ! end subroutine ugwp_tofd1d + +end module cires_vert_orodis diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 55ef9c268..76c2a85aa 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -186,13 +186,6 @@ end subroutine drag_suite_init !! !> \section det_drag_suite GFS Orographic GWD Scheme Detailed Algorithm !> @{ -! subroutine drag_suite_run( & -! & IM,IX,KM,A,B,C,U1,V1,T1,Q1,KPBL, & -! & PRSI,DEL,PRSL,PRSLK,PHII, PHIL,DELTIM,KDT, & -! & HPRIME,OC,OA4,CLX4,THETA,SIGMA,GAMMA,ELVMAX, & -! & DUSFC,DVSFC,G, CP, RD, RV, IMX, & -! & nmtvr, cdmbgwd, me, lprnt, ipr, rdxzb, errmsg, errflg) -! subroutine drag_suite_run( & & IM,KM,dvdt,dudt,dtdt,U1,V1,T1,Q1,KPBL, & & PRSI,DEL,PRSL,PRSLK,PHII,PHIL,DELTIM,KDT, & @@ -206,6 +199,7 @@ subroutine drag_suite_run( & & dusfc_ss,dvsfc_ss,dusfc_fd,dvsfc_fd, & & slmsk,br1,hpbl, & & g, cp, rd, rv, fv, pi, imx, cdmbgwd, me, master, & + & do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, & & lprnt, ipr, rdxzb, dx, gwd_opt, errmsg, errflg ) ! ******************************************************************** @@ -243,6 +237,15 @@ subroutine drag_suite_run( & ! 2017-09-25 Michael Toy (from NCEP GFS model) added dissipation heating ! gsd_diss_ht_opt = 0: dissipation heating off ! gsd_diss_ht_opt = 1: dissipation heating on +! 2020-08-25 Michael Toy changed logic control for drag component selection +! for CCPP. +! Namelist options: +! do_gsl_drag_ls_bl - logical flag for large-scale GWD + blocking +! do_gsl_drag_ss - logical flag for small-scale GWD +! do_gsl_drag_tofd - logical flag for turbulent form drag +! Compile-time options (same as before): +! gwd_opt_ls = 0 or 1: large-scale GWD +! gwd_opt_bl = 0 or 1: blocking drag ! ! References: ! Hong et al. (2008), wea. and forecasting @@ -363,12 +366,16 @@ subroutine drag_suite_run( & !------------------------------------------------------------------------- ! Flags to regulate the activation of specific components of drag suite: ! Each component is tapered off automatically as a function of dx, so best to -! keep them activated (=1). - integer, parameter :: & - gwd_opt_ls = 1, & ! large-scale gravity wave drag - gwd_opt_bl = 1, & ! blocking drag - gwd_opt_ss = 1, & ! small-scale gravity wave drag (Steeneveld et al. 2008) - gwd_opt_fd = 1, & ! form drag (Beljaars et al. 2004, QJRMS) +! keep them activated (.true.). + logical, intent(in) :: & + do_gsl_drag_ls_bl, & ! large-scale gravity wave drag and blocking + do_gsl_drag_ss, & ! small-scale gravity wave drag (Steeneveld et al. 2008) + do_gsl_drag_tofd ! form drag (Beljaars et al. 2004, QJRMS) + +! Additional flags + integer, parameter :: & + gwd_opt_ls = 1, & ! large-scale gravity wave drag + gwd_opt_bl = 1, & ! blocking drag gsd_diss_ht_opt = 0 ! Parameters for bounding the scale-adaptive variability: @@ -616,7 +623,7 @@ subroutine drag_suite_run( & enddo enddo ! - if (gwd_opt == 33) then + if ( (gwd_opt == 33).or.(gwd_opt == 22) ) then do i = its,im dusfc_ls(i) = 0.0 dvsfc_ls(i) = 0.0 @@ -759,7 +766,8 @@ subroutine drag_suite_run( & ! ! END INITIALIZATION; BEGIN GWD CALCULATIONS: ! -IF ( ((gwd_opt_ls .EQ. 1).or.(gwd_opt_bl .EQ. 1)).and. & +IF ( (do_gsl_drag_ls_bl).and. & + ((gwd_opt_ls .EQ. 1).or.(gwd_opt_bl .EQ. 1)).and. & (ls_taper .GT. 1.E-02) ) THEN !==== ! !--- saving richardson number in usqj for migwdi @@ -895,7 +903,7 @@ subroutine drag_suite_run( & endif enddo -ENDIF ! (gwd_opt_ls .EQ. 1).or.(gwd_opt_bl .EQ. 1) +ENDIF ! (do_gsl_drag_ls_bl).and.((gwd_opt_ls .EQ. 1).or.(gwd_opt_bl .EQ. 1)) !========================================================= ! add small-scale wavedrag for stable boundary layer @@ -907,7 +915,7 @@ subroutine drag_suite_run( & utendwave=0. vtendwave=0. ! - IF ( (gwd_opt_ss .EQ. 1).and.(ss_taper.GT.1.E-02) ) THEN + IF ( (do_gsl_drag_ss).and.(ss_taper.GT.1.E-02) ) THEN ! if (me==master) print *,"in Drag Suite: Running small-scale gravity wave drag" ! ! declaring potential temperature @@ -1008,7 +1016,7 @@ subroutine drag_suite_run( & dvsfc(i) = dvsfc(i) + vtendwave(i,k) * del(i,k) enddo enddo - if (gwd_opt == 33) then + if ( (gwd_opt == 33).or.(gwd_opt == 22) ) then do k = kts,km do i = its,im dusfc_ss(i) = dusfc_ss(i) + utendwave(i,k) * del(i,k) @@ -1019,12 +1027,12 @@ subroutine drag_suite_run( & enddo endif -ENDIF ! end if gwd_opt_ss == 1 +ENDIF ! if (do_gsl_drag_ss) !================================================================ ! Topographic Form Drag from Beljaars et al. (2004, QJRMS, equ. 16): !================================================================ -IF ( (gwd_opt_fd .EQ. 1).and.(ss_taper.GT.1.E-02) ) THEN +IF ( (do_gsl_drag_tofd).and.(ss_taper.GT.1.E-02) ) THEN ! if (me==master) print *,"in Drag Suite: Running form drag" utendform=0. @@ -1066,7 +1074,7 @@ subroutine drag_suite_run( & dvsfc(i) = dvsfc(i) + vtendform(i,k) * del(i,k) enddo enddo - if (gwd_opt == 33) then + if ( (gwd_opt == 33).or.(gwd_opt == 22) ) then do k = kts,km do i = its,im dtaux2d_fd(i,k) = utendform(i,k) @@ -1077,10 +1085,11 @@ subroutine drag_suite_run( & enddo endif -ENDIF ! end if gwd_opt_fd == 1 +ENDIF ! if (do_gsl_drag_tofd) !======================================================= ! More for the large-scale gwd component -IF ( (gwd_opt_ls .EQ. 1).and.(ls_taper.GT.1.E-02) ) THEN +IF ( (do_gsl_drag_ls_bl).and. & + (gwd_opt_ls .EQ. 1).and.(ls_taper.GT.1.E-02) ) THEN ! if (me==master) print *,"in Drag Suite: Running large-scale gravity wave drag" ! ! now compute vertical structure of the stress. @@ -1148,7 +1157,8 @@ subroutine drag_suite_run( & !=============================================================== !COMPUTE BLOCKING COMPONENT !=============================================================== -IF ( (gwd_opt_bl .EQ. 1) .and. (ls_taper .GT. 1.E-02) ) THEN +IF ( (do_gsl_drag_ls_bl) .and. & + (gwd_opt_bl .EQ. 1) .and. (ls_taper .GT. 1.E-02) ) THEN ! if (me==master) print *,"in Drag Suite: Running blocking drag" do i = its,im @@ -1194,7 +1204,8 @@ subroutine drag_suite_run( & ENDIF ! end blocking drag !=========================================================== -IF ( (gwd_opt_ls .EQ. 1 .OR. gwd_opt_bl .EQ. 1) .and. (ls_taper .GT. 1.E-02) ) THEN +IF ( (do_gsl_drag_ls_bl) .and. & + (gwd_opt_ls .EQ. 1 .OR. gwd_opt_bl .EQ. 1) .and. (ls_taper .GT. 1.E-02) ) THEN ! ! calculate - (g)*d(tau)/d(pressure) and deceleration terms dtaux, dtauy ! @@ -1264,7 +1275,7 @@ subroutine drag_suite_run( & dvsfc(i) = (-1./g*rcs) * dvsfc(i) enddo - if (gwd_opt == 33) then + if ( (gwd_opt == 33).or.(gwd_opt == 22) ) then do k = kts,km do i = its,im dtaux2d_ls(i,k) = taud_ls(i,k) * xn(i) @@ -1279,9 +1290,9 @@ subroutine drag_suite_run( & enddo endif -ENDIF +ENDIF ! (do_gsl_drag_ls_bl).and.(gwd_opt_ls.EQ.1 .OR. gwd_opt_bl.EQ.1) -if (gwd_opt == 33) then +if ( (gwd_opt == 33).or.(gwd_opt == 22) ) then ! Finalize dusfc and dvsfc diagnostics do i = its,im dusfc_ls(i) = (-1./g*rcs) * dusfc_ls(i) diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index dfcac8582..73a397938 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -590,6 +590,30 @@ type = integer intent = in optional = F +[do_gsl_drag_ls_bl] + standard_name = do_gsl_drag_ls_bl + long_name = flag to activate GSL drag suite - large-scale GWD and blocking + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ss] + standard_name = do_gsl_drag_ss + long_name = flag to activate GSL drag suite - small-scale GWD + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_tofd] + standard_name = do_gsl_drag_tofd + long_name = flag to activate GSL drag suite - turb orog form drag + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 new file mode 100644 index 000000000..58872057e --- /dev/null +++ b/physics/unified_ugwp.F90 @@ -0,0 +1,686 @@ +!> \file unified_ugwp.F90 +!! This file contains the Unified Gravity Wave Physics (UGWP) scheme by Valery Yudin (University of Colorado, CIRES) +!! See Valery Yudin's presentation at 2017 NGGPS PI meeting: +!! Gravity waves (GWs): Mesoscale GWs transport momentum, energy (heat) , and create eddy mixing in the whole atmosphere domain; Breaking and dissipating GWs deposit: (a) momentum; (b) heat (energy); and create (c) turbulent mixing of momentum, heat, and tracers +!! To properly incorporate GW effects (a-c) unresolved by DYCOREs we need GW physics +!! "Unified": a) all GW effects due to both dissipation/breaking; b) identical GW solvers for all GW sources; c) ability to replace solvers. +!! Unified Formalism: +!! 1. GW Sources: Stochastic and physics based mechanisms for GW-excitations in the lower atmosphere, calibrated by the high-res analyses/forecasts, and observations (3 types of GW sources: orography, convection, fronts/jets). +!! 2. GW Propagation: Unified solver for "propagation, dissipation and breaking" excited from all type of GW sources. +!! 3. GW Effects: Unified representation of GW impacts on the "resolved" flow for all sources (energy-balanced schemes for momentum, heat and mixing). +!! https://www.weather.gov/media/sti/nggps/Presentations%202017/02%20NGGPS_VYUDIN_2017_.pdf + +module unified_ugwp + + use machine, only: kind_phys + + use cires_ugwp_module, only: knob_ugwp_version, cires_ugwp_mod_init, cires_ugwp_mod_finalize + + use cires_ugwp_module_v1, only: cires_ugwp_init_v1, cires_ugwp_finalize, calendar_ugwp + + use gwdps, only: gwdps_run + + use drag_suite, only: drag_suite_run + + use cires_ugwp_orolm97_v1, only: gwdps_oro_v1 + + use cires_ugwp_triggers_v1, only: slat_geos5_tamp_v1 + + ! use cires_ugwp_ngw_utils, only: tau_limb_advance + + use cires_ugwp_solv2_v1_mod, only: cires_ugwp_solv2_v1 + + implicit none + + private + + public unified_ugwp_init, unified_ugwp_run, unified_ugwp_finalize + + logical :: is_initialized = .False. + +contains + +! ------------------------------------------------------------------------ +! CCPP entry points for CIRES Unified Gravity Wave Physics (UGWP) scheme v0 +! ------------------------------------------------------------------------ +!>@brief The subroutine initializes the CIRES UGWP +!> \section arg_table_unified_ugwp_init Argument Table +!! \htmlinclude unified_ugwp_init.html +!! +! ----------------------------------------------------------------------- +! + subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & + fn_nml2, jdat, lonr, latr, levs, ak, bk, dtp, cdmbgwd, cgwf, & + pa_rf_in, tau_rf_in, con_p0, do_ugwp, do_ugwp_v0, & + do_ugwp_v0_orog_only, do_gsl_drag_ls_bl, do_gsl_drag_ss, & + do_gsl_drag_tofd, do_ugwp_v1, do_ugwp_v1_orog_only, & + errmsg, errflg) + +!---- initialization of unified_ugwp + implicit none + + integer, intent (in) :: me + integer, intent (in) :: master + integer, intent (in) :: nlunit + character(len=*), intent (in) :: input_nml_file(:) + integer, intent (in) :: logunit + integer, intent(in) :: jdat(8) + integer, intent (in) :: lonr + integer, intent (in) :: levs + integer, intent (in) :: latr + real(kind=kind_phys), intent (in) :: ak(:), bk(:) + real(kind=kind_phys), intent (in) :: dtp + real(kind=kind_phys), intent (in) :: cdmbgwd(4), cgwf(2) ! "scaling" controls for "old" GFS-GW schemes + real(kind=kind_phys), intent (in) :: pa_rf_in, tau_rf_in + real(kind=kind_phys), intent (in) :: con_p0 + logical, intent (in) :: do_ugwp + logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, & + do_gsl_drag_ls_bl, do_gsl_drag_ss, & + do_gsl_drag_tofd, do_ugwp_v1, & + do_ugwp_v1_orog_only + + character(len=*), intent (in) :: fn_nml2 + !character(len=*), parameter :: fn_nml='input.nml' + + integer :: ios + logical :: exists + real :: dxsg + integer :: k + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + + ! Test to make sure that at most only one large-scale/blocking + ! orographic drag scheme is chosen + if ( (do_ugwp_v0.and.(do_ugwp_v0_orog_only.or.do_gsl_drag_ls_bl.or. & + do_ugwp_v1.or.do_ugwp_v1_orog_only)) .or. & + (do_ugwp_v0_orog_only.and.(do_gsl_drag_ls_bl.or.do_ugwp_v1.or. & + do_ugwp_v1_orog_only)) .or. & + (do_gsl_drag_ls_bl.and.(do_ugwp_v1.or.do_ugwp_v1_orog_only)) .or. & + (do_ugwp_v1.and.do_ugwp_v1_orog_only) ) then + + write(errmsg,'(*(a))') "Logic error: Only one large-scale& + &/blocking scheme (do_ugwp_v0,do_ugwp_v0_orog_only,& + do_gsl_drag_ls_bl,do_ugwp_v1 or& + &do_ugwp_v1_orog_only) can be chosen" + errflg = 1 + return + + end if + + + if (is_initialized) return + + + if ( do_ugwp_v0 .and. (do_ugwp .or. cdmbgwd(3) > 0.0) ) then + if (do_ugwp .or. cdmbgwd(3) > 0.0) then + call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & + fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & + cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) + else + write(errmsg,'(*(a))') "Logic error: cires_ugwp_init called but do_ugwp is false and cdmbgwd(3) <= 0" + errflg = 1 + return + end if + + + if ( do_ugwp_v1 ) then + call cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat, & + fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & + cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) + end if + + is_initialized = .true. + + end subroutine unified_ugwp_init + + +! ----------------------------------------------------------------------- +! finalize of unified_ugwp (_finalize) +! ----------------------------------------------------------------------- + +!>@brief The subroutine finalizes the CIRES UGWP +#if 0 +!> \section arg_table_unified_ugwp_finalize Argument Table +!! \htmlinclude unified_ugwp_finalize.html +!! +#endif + subroutine unified_ugwp_finalize(errmsg, errflg) + + implicit none +! + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + +! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not.is_initialized) return + + call cires_ugwp_finalize() + + is_initialized = .false. + + end subroutine unified_ugwp_finalize + + +! ----------------------------------------------------------------------- +! originally from ugwp_driver_v0.f +! driver of cires_ugwp (_driver) +! ----------------------------------------------------------------------- +! driver is called after pbl & before chem-parameterizations +! ----------------------------------------------------------------------- +! order = dry-adj=>conv=mp-aero=>radiation -sfc/land- chem -> vertdiff-> [rf-gws]=> ion-re +! ----------------------------------------------------------------------- +!>@brief These subroutines and modules execute the CIRES UGWP Version 0 +!>\defgroup unified_ugwp_run Unified Gravity Wave Physics General Algorithm +!> @{ +!! The physics of NGWs in the UGWP framework (Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, which is introduced in Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003. The major modification of these GW solvers is represented by the addition of the background dissipation of temperature and winds to the saturation criteria for wave breaking. This feature is important in the mesosphere and thermosphere for WAM applications and it considers appropriate scale-dependent dissipation of waves near the model top lid providing the momentum and energy conservation in the vertical column physics (Shaw and Shepherd 2009 \cite shaw_and_shepherd_2009). In the UGWP-v0, the modification of Scinocca (2003) \cite scinocca_2003 scheme for NGWs with non-hydrostatic and rotational effects for GW propagations and background dissipation is represented by the subroutine \ref fv3_ugwp_solv2_v0. In the next release of UGWP, additional GW-solvers will be implemented along with physics-based triggering of waves and stochastic approaches for selection of GW modes characterized by horizontal phase velocities, azimuthal directions and magnitude of the vertical momentum flux (VMF). +!! +!! In UGWP-v0, the specification for the VMF function is adopted from the GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2 reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran subroutine \ref slat_geos5_tamp describes the latitudinal shape of VMF-function as displayed in Figure 3 of Molod et al. (2015) \cite molod_et_al_2015. It shows that the enhanced values of VMF in the equatorial region gives opportunity to simulate the QBO-like oscillations in the equatorial zonal winds and lead to more realistic simulations of the equatorial dynamics in GEOS-5 operational and MERRA-2 reanalysis products. For the first vertically extended version of FV3GFS in the stratosphere and mesosphere, this simplified function of VMF allows us to tune the model climate and to evaluate multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis products, along with temperature, ozone, and water vapor observations of current satellite missions. After delivery of the UGWP-code, the EMC group developed and tested approach to modulate the zonal mean NGW forcing by 3D-distributions of the total precipitation as a proxy for the excitation of NGWs by convection and the vertically-integrated (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification scores with updated NGW forcing, as reported elsewhere by EMC researchers, display noticeable improvements in the forecast scores produced by FV3GFS configuration extended into the mesosphere. +!! +!> \section arg_table_unified_ugwp_run Argument Table +!! \htmlinclude unified_ugwp_run.html +!! +!> \section gen_unified_ugwp CIRES UGWP Scheme General Algorithm +!! @{ + subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, & + lonr, oro, oro_uf, hprime, nmtvr, oc, theta, sigma, gamma, elvmax, clx, oa4, & + do_tofd, ldiag_ugwp, cdmbgwd, jdat, xlat, xlat_d, sinlat, coslat, area, & + ugrs, vgrs, tgrs, q1, prsi, prsl, prslk, phii, phil, & + del, kpbl, dusfcg, dvsfcg, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & + tau_tofd, tau_mtb, tau_ogw, tau_ngw, zmtb, zlwb, zogw, & + dudt_mtb,dudt_ogw, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & + dudt, dvdt, dtdt, rdxzb, con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, & + rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & + ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & + ldiag3d, lssav, flag_for_gwd_generic_tend, do_ugwp_v0, do_ugwp_v0_orog_only, & + do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, & + do_ugwp_v1_orog_only, errmsg, errflg) + + implicit none + + ! interface variables + integer, intent(in) :: me, master, im, levs, ntrac, kdt, lonr, nmtvr + integer, intent(in) :: gwd_opt + integer, intent(in), dimension(im) :: kpbl + real(kind=kind_phys), intent(in), dimension(im) :: oro, oro_uf, hprime, oc, theta, sigma, gamma + real(kind=kind_phys), intent(in), dimension(im) :: varss,oc1ss,oa4ss,ol4ss,dx + logical, intent(in) :: flag_for_gwd_generic_tend + ! elvmax is intent(in) for CIRES UGWP, but intent(inout) for GFS GWDPS + real(kind=kind_phys), intent(inout), dimension(im) :: elvmax + real(kind=kind_phys), intent(in), dimension(im, 4) :: clx, oa4 + real(kind=kind_phys), intent(in), dimension(im) :: xlat, xlat_d, sinlat, coslat, area + real(kind=kind_phys), intent(in), dimension(im, levs) :: del, ugrs, vgrs, tgrs, prsl, prslk, phil + real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi, phii + real(kind=kind_phys), intent(in), dimension(im, levs) :: q1 + real(kind=kind_phys), intent(in) :: dtp, fhzero, cdmbgwd(4) + integer, intent(in) :: jdat(8) + logical, intent(in) :: do_tofd, ldiag_ugwp + +!Output (optional): + real(kind=kind_phys), intent(out) :: & + & dusfc_ls(:),dvsfc_ls(:), & + & dusfc_bl(:),dvsfc_bl(:), & + & dusfc_ss(:),dvsfc_ss(:), & + & dusfc_fd(:),dvsfc_fd(:) + real(kind=kind_phys), intent(out) :: & + & dtaux2d_ls(:,:),dtauy2d_ls(:,:), & + & dtaux2d_bl(:,:),dtauy2d_bl(:,:), & + & dtaux2d_ss(:,:),dtauy2d_ss(:,:), & + & dtaux2d_fd(:,:),dtauy2d_fd(:,:) + + real(kind=kind_phys), intent(in) :: br1(im), & + & hpbl(im), & + & slmsk(im) + + real(kind=kind_phys), intent(out), dimension(im) :: dusfcg, dvsfcg + real(kind=kind_phys), intent(out), dimension(im) :: zmtb, zlwb, zogw, rdxzb + real(kind=kind_phys), intent(out), dimension(im) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw + real(kind=kind_phys), intent(out), dimension(im, levs):: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis + real(kind=kind_phys), intent(out), dimension(im, levs):: dudt_mtb, dudt_ogw, dudt_tms + + ! These arrays are only allocated if ldiag=.true. + real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw + real(kind=kind_phys), intent(inout), dimension(:,:) :: ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw + logical, intent(in) :: ldiag3d, lssav + + ! These arrays only allocated if ldiag_ugwp = .true. + real(kind=kind_phys), intent(out), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms + + real(kind=kind_phys), intent(inout), dimension(im, levs):: dudt, dvdt, dtdt + + real(kind=kind_phys), intent(in) :: con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt + + real(kind=kind_phys), intent(in), dimension(im) :: rain + + integer, intent(in) :: ntke + real(kind=kind_phys), intent(in), dimension(:,:) :: q_tke, dqdt_tke + + logical, intent(in) :: lprnt + integer, intent(in) :: ipr + + ! flags for choosing combination of GW drag schemes to run + logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, & + do_gsl_drag_ls_bl, do_gsl_drag_ss, & + do_gsl_drag_tofd, do_ugwp_v1, & + do_ugwp_v1_orog_only + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! local variables + integer :: i, k + real(kind=kind_phys), dimension(im) :: sgh30 + real(kind=kind_phys), dimension(im, levs) :: Pdvdt, Pdudt + real(kind=kind_phys), dimension(im, levs) :: Pdtdt, Pkdis + real(kind=kind_phys), dimension(im, levs) :: ed_dudt, ed_dvdt, ed_dtdt + ! from ugwp_driver_v0.f -> cires_ugwp_initialize.F90 -> module ugwp_wmsdis_init + real(kind=kind_phys), parameter :: tamp_mpa=30.e-3 + ! switches that activate impact of OGWs and NGWs (WL* how to deal with them? *WL) + real(kind=kind_phys), parameter :: pogw=1., pngw=1., pked=1. + real(kind=kind_phys), parameter :: fw1_tau=1.0 + + real(kind=kind_phys), dimension(:,:), allocatable :: tke + real(kind=kind_phys), dimension(:), allocatable :: turb_fac, tem + real(kind=kind_phys) :: rfac, tx1 + + real(kind=kind_phys) :: inv_g + real(kind=kind_phys), dimension(im, levs) :: zmet ! geopotential height at model Layer centers + real(kind=kind_phys), dimension(im, levs+1) :: zmeti ! geopotential height at model layer interfaces + + + ! ugwp_v1 local variables + integer :: y4, month, day, ddd_ugwp, curdate, curday + integer :: hour + real(kind=kind_phys) :: hcurdate, hcurday, fhour, fhrday + integer :: kdtrest + integer :: curday_ugwp + integer :: curday_save=20150101 + logical :: first_qbo=.true. + real :: hcurday_save =20150101.00 + save first_qbo, curday_save, hcurday_save + + + ! ugwp_v1 temporary (local) diagnostic variables from cires_ugwp_solv2_v1 + real(kind=kind_phys) :: tauabs(im,levs), wrms(im,levs), trms(im,levs) + + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! 1) ORO stationary GWs + ! ------------------ + + zlwb(:) = 0. + + ! Run the appropriate large-scale (large-scale GWD + blocking) scheme + ! Note: In case of GSL drag_suite, this includes ss and tofd + + if ( do_gsl_drag_ls_bl.or.do_gsl_drag_ss.or.do_gsl_drag_tofd ) then + + call drag_suite_run(im,levs,dvdt,dudt,dtdt,ugrs,vgrs,tgrs,q1, & + kpbl,prsi,del,prsl,prslk,phii,phil,dtp, & + kdt,hprime,oc,oa4,clx,varss,oc1ss,oa4ss, & + ol4ss,theta,sigma,gamma,elvmax,dtaux2d_ls, & + dtauy2d_ls,dtaux2d_bl,dtauy2d_bl,dtaux2d_ss, & + dtauy2d_ss,dtaux2d_fd,dtauy2d_fd,dusfc, & + dvsfc,dusfc_ls,dvsfc_ls,dusfc_bl,dvsfc_bl, & + dusfc_ss,dvsfc_ss,dusfc_fd,dvsfc_fd, & + slmsk,br1,hpbl,con_g,con_cp,con_rd,con_rv, & + con_fvirt,con_pi,lonr, & + cdmbgwd(1:2),me,master,do_gsl_drag_ls_bl, & + do_gsl_drag_ss,do_gsl_drag_tofd,lprnt,ipr,rdxzb,dx, & + gwd_opt,errmsg,errflg) + + else if ( do_ugwp_v1.or.do_ugwp_v1_orog_only ) then + + ! Valery's TOFD + ! topo paras + ! w/ orographic effects + if(nmtvr == 14)then + ! calculate sgh30 for TOFD + sgh30 = abs(oro - oro_uf) + ! w/o orographic effects + else + sgh30 = 0. + endif + + inv_g = 1./con_g + zmeti = phii*inv_g + zmet = phil*inv_g + + call gwdps_oro_v1 (im, levs, lonr, do_tofd, & + Pdvdt, Pdudt, Pdtdt, Pkdis, & + ugrs , vgrs, tgrs, q1, KPBL, prsi,del,prsl, & + prslk, zmeti, zmet, dtp, kdt, hprime, oc, oa4, & + clx, theta, sigma, gamma, elvmax, & + sgh30, DUSFCg, DVSFCg, xlat_d, sinlat, coslat, & + spgrid,cdmbgwd(1:2), me, master, rdxzb, & + zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & + du3dt_mtb, du3dt_ogw, du3dt_tms) + + else if ( do_ugwp_v0.or.do_ugwp_v0_orog_only ) then + + do k=1,levs + do i=1,im + Pdvdt(i,k) = 0.0 + Pdudt(i,k) = 0.0 + Pdtdt(i,k) = 0.0 + Pkdis(i,k) = 0.0 + enddo + enddo + + if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then + call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & + ugrs, vgrs, tgrs, q1, & + kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & + hprime, oc, oa4, clx, theta, sigma, gamma, & + elvmax, dusfcg, dvsfcg, & + con_g, con_cp, con_rd, con_rv, lonr, & + nmtvr, cdmbgwd, me, lprnt, ipr, rdxzb, & + errmsg, errflg) + if (errflg/=0) return + endif + + tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 + if (ldiag_ugwp) then + du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 + end if + + + if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then + do k=1,levs + do i=1,im + ldu3dt_ogw(i,k) = ldu3dt_ogw(i,k) + Pdudt(i,k)*dtp + ldv3dt_ogw(i,k) = ldv3dt_ogw(i,k) + Pdvdt(i,k)*dtp + ldt3dt_ogw(i,k) = ldt3dt_ogw(i,k) + Pdtdt(i,k)*dtp + enddo + enddo + endif + + end if + + + + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ! Begin non-stationary GW schemes + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + ! + ! ugwp_v0 non-stationary GW drag + ! + if (do_ugwp_v0) then + + if (cdmbgwd(3) > 0.0) then + + ! 2) non-stationary GW-scheme with GMAO/MERRA GW-forcing + call slat_geos5_tamp(im, tamp_mpa, xlat_d, tau_ngw) + + if (abs(1.0-cdmbgwd(3)) > 1.0e-6) then + if (cdmbgwd(4) > 0.0) then + allocate(turb_fac(im)) + do i=1,im + turb_fac(i) = 0.0 + enddo + if (ntke > 0) then + allocate(tke(im,levs)) + allocate(tem(im)) + tke(:,:) = q_tke(:,:) + dqdt_tke(:,:) * dtp + tem(:) = 0.0 + do k=1,(levs+levs)/3 + do i=1,im + turb_fac(i) = turb_fac(i) + del(i,k) * tke(i,k) + tem(i) = tem(i) + del(i,k) + enddo + enddo + do i=1,im + turb_fac(i) = turb_fac(i) / tem(i) + enddo + deallocate(tke) + deallocate(tem) + endif + rfac = 86400000 / dtp + do i=1,im + tx1 = cdmbgwd(4)*min(10.0, max(turb_fac(i),rain(i)*rfac)) + tau_ngw(i) = tau_ngw(i) * max(0.1, min(5.0, tx1)) + enddo + deallocate(turb_fac) + endif + do i=1,im + tau_ngw(i) = tau_ngw(i) * cdmbgwd(3) + enddo + endif + + call fv3_ugwp_solv2_v0(im, levs, dtp, tgrs, ugrs, vgrs, q1, & + prsl, prsi, phil, xlat_d, sinlat, coslat, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & + tau_ngw, me, master, kdt) + + do k=1,levs + do i=1,im + gw_dtdt(i,k) = pngw*gw_dtdt(i,k)+ pogw*Pdtdt(i,k) + gw_dudt(i,k) = pngw*gw_dudt(i,k)+ pogw*Pdudt(i,k) + gw_dvdt(i,k) = pngw*gw_dvdt(i,k)+ pogw*Pdvdt(i,k) + gw_kdis(i,k) = pngw*gw_kdis(i,k)+ pogw*Pkdis(i,k) + ! accumulation of tendencies for CCPP to replicate EMC-physics updates (!! removed in latest code commit to VLAB) + !dudt(i,k) = dudt(i,k) +gw_dudt(i,k) + !dvdt(i,k) = dvdt(i,k) +gw_dvdt(i,k) + !dtdt(i,k) = dtdt(i,k) +gw_dtdt(i,k) + enddo + enddo + + else ! .not.(cdmbgwd(3) > 0.0) + + do k=1,levs + do i=1,im + gw_dtdt(i,k) = Pdtdt(i,k) + gw_dudt(i,k) = Pdudt(i,k) + gw_dvdt(i,k) = Pdvdt(i,k) + gw_kdis(i,k) = Pkdis(i,k) + enddo + enddo + + endif ! cdmbgwd(3) > 0.0 + + if (pogw == 0.0) then + tau_mtb = 0. ; tau_ogw = 0. ; tau_tofd = 0. + dudt_mtb = 0. ; dudt_ogw = 0. ; dudt_tms = 0. + endif + +#if 0 + !============================================================================= + ! make "ugwp eddy-diffusion" update for gw_dtdt/gw_dudt/gw_dvdt by solving + ! vert diffusion equations & update "Statein%tgrs, Statein%ugrs, Statein%vgrs" + !============================================================================= + ! 3) application of "eddy"-diffusion to "smooth" UGWP-related tendencies + !------------------------------------------------------------------------------ + do k=1,levs + do i=1,im + ed_dudt(i,k) = 0.0 ; ed_dvdt(i,k) = 0.0 ; ed_dtdt(i,k) = 0.0 + enddo + enddo + + call edmix_ugwp_v0(im, levs, dtp, tgrs, ugrs, vgrs, q1, & + del, prsl, prsi, phil, prslk, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & + ed_dudt, ed_dvdt, ed_dtdt, me, master, kdt) + gw_dtdt = gw_dtdt*(1.-pked) + ed_dtdt*pked + gw_dvdt = gw_dvdt*(1.-pked) + ed_dvdt*pked + gw_dudt = gw_dudt*(1.-pked) + ed_dudt*pked +#endif + + if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then + do k=1,levs + do i=1,im + ldu3dt_cgw(i,k) = ldu3dt_cgw(i,k) + (gw_dudt(i,k) - Pdudt(i,k))*dtp + ldv3dt_cgw(i,k) = ldv3dt_cgw(i,k) + (gw_dvdt(i,k) - Pdvdt(i,k))*dtp + ldt3dt_cgw(i,k) = ldt3dt_cgw(i,k) + (gw_dtdt(i,k) - Pdtdt(i,k))*dtp + enddo + enddo + endif + + end if ! do_ugwp_v0 + + + ! + ! ugwp_v1 non-stationary GW drag + ! + if (do_ugwp_v1) then + +! -------- +! 2) non-stationary GWs with GEOS-5/MERRA GW-forcing +! ---------------------------------------------- +!-------- +! GMAO GEOS-5/MERRA GW-forcing lat-dep +!-------- + call slat_geos5_tamp_v1(im, tamp_mpa, xlat_d, tau_ngw) + + y4 = jdat(1); month = jdat(2); day = jdat(3) ; hour = jdat(5) + + ! fhour = float(hour)+float(jdat(6))/60. + float(jdat(7))/3600. + fhour = (kdt-1)*dtp/3600. + fhrday = fhour/24. - nint(fhour/24.) + fhour = fhrday*24. + + call calendar_ugwp(y4, month, day, ddd_ugwp) + curdate = y4*1000 + ddd_ugwp + curday = y4*10000 + month*100 + day + hcurdate = float(curdate) + fhrday + hcurday = float(curday) + fhrday +! + if (mod(fhour,fhzero) == 0 .or. first_qbo) then + + ! call tau_limb_advance(me, master, im, levs, ddd_ugwp, curdate, & + ! j1_tau, j2_tau, ddy_j1tau, ddy_j2tau, tau_sat, kdt ) + + if (first_qbo) kdtrest = kdt + first_qbo = .false. + curday_save = curday + hcurday_save= hcurday + endif + + ! tau_ngw = fw1_tau*tau_ngw + tau_sat*(1.-fw1_tau) + +! goto 111 +! if (mod(fhour,fhzero) == 0 .or. first_qbo) then + +! call tau_qbo_advance(me, master, im, levs, ddd_ugwp, curdate, & +! j1_tau, j2_tau, ddy_j1tau, ddy_j2tau, j1_qbo, j2_qbo, & +! ddy_j1qbo, ddy_j2qbo, tau_sat, tau_qbo, uqbo, ax_qbo, kdt ) + + +! if (me == master) then +! print *, ' curday_save first_qbo ', curday, curday_save, kdt +! print *, ' hcurdays ', hcurdate, float(hour)/24. +! print *, jdat(5), jdat(6), jdat(7), (kdt-1)*dtp/3600., ' calendar ' +!! print *, ' curday curday_ugwp first_qbo ', hcurday, first_qbo +!! print *, ' vay_tau-limb U' , maxval(uqbo), minval(uqbo) +!! print *, ' vay_tau-limb TS' , maxval(tau_sat), minval(tau_sat) +!! print *, ' vay_tau-limb TQ' , maxval(tau_qbo), minval(tau_qbo) +! endif + + +! if (first_qbo) kdtrest = kdt +! first_qbo = .false. +! curday_save = curday +! hcurday_save= hcurday +! endif + + + + +! if (mod(kdt, 720) == 0 .and. me == master ) then +! print *, ' vay_qbo_U' , maxval(uqbo), minval(uqbo) , kdt +! endif + +! wqbo = dtp/taurel +! do k =1, levs +!! sdexpz = wqbo*vert_qbo(k) +! sdexpz = 0.25*vert_qbo(k) +! do i=1, im +!! if (dexpy(i) > 0.0) then +! dforc = 0.25 +!! ugrs(i,k) = ugrs(i,k)*(1.-dforc) + dforc*uqbo(i,levs+1-k) +!! tgrs(i,k) = tgrs(i,k)*(1.-dforc) + dforc*tqbo(i,levs+1-k) +!! endif +! enddo +! enddo + +! 111 continue + + + call cires_ugwp_solv2_v1(im, levs, dtp, & + tgrs, ugrs, vgrs, q1, prsl, prsi, & + zmet, zmeti,prslk, xlat_d, sinlat, coslat, & + gw_dudt, gw_dvdt, gw_dTdt, gw_kdis, & + tauabs, wrms, trms, tau_ngw, me, master, kdt) + + if (me == master .and. kdt < 2) then + print * + write(6,*)'FV3GFS finished fv3_ugwp_solv2_v1 in ugwp_driver_v0 ' + write(6,*) ' non-stationary GWs with GMAO/MERRA GW-forcing ' + print * + endif + + do k=1,levs + do i=1,im + gw_dtdt(i,k) = pngw*gw_dtdt(i,k) + pogw*Pdtdt(i,k) + gw_dudt(i,k) = pngw*gw_dudt(i,k) + pogw*Pdudt(i,k) + !+(uqbo(i,levs+1-k)-ugrs(i,k))/21600. + gw_dvdt(i,k) = pngw*gw_dvdt(i,k) + pogw*Pdvdt(i,k) + gw_kdis(i,k) = pngw*gw_kdis(i,k) ! + pogw*Pkdis(i,k) + enddo + enddo + + + + + if (pogw == 0.0) then +! zmtb = 0.; zogw =0. + tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 + du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 + endif + +! return + +!============================================================================= +! make "ugwp eddy-diffusion" update for gw_dtdt/gw_dudt/gw_dvdt by solving +! vert diffusion equations & update "Statein%tgrs, Statein%ugrs, Statein%vgrs" +!============================================================================= +! +! 3) application of "eddy"-diffusion to "smooth" UGWP-related tendencies +!------------------------------------------------------------------------------ + +! ed_dudt(:,:) = 0.0 ; ed_dvdt(:,:) = 0.0 ; ed_dtdt(:,:) = 0.0 + + + +! call edmix_ugwp_v1(im, levs, dtp, & +! tgrs, ugrs, vgrs, q1, del, & +! prsl, prsi, phil, prslk, & +! gw_dudt, gw_dvdt, gw_dTdt, gw_kdis, & +! ed_dudt, ed_dvdt, ed_dTdt, +! me, master, kdt ) + +! do k=1,levs +! do i=1,im +! gw_dtdt(i,k) = gw_dtdt(i,k) + ed_dtdt(i,k)*pked +! gw_dvdt(i,k) = gw_dvdt(i,k) + ed_dvdt(i,k)*pked +! gw_dudt(i,k) = gw_dudt(i,k) + ed_dudt(i,k)*pked +! enddo +! enddo + + + end if ! do_ugwp_v1 + + + end subroutine unified_ugwp_run +!! @} +!>@} +end module unified_ugwp diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta new file mode 100644 index 000000000..5c0eb458b --- /dev/null +++ b/physics/unified_ugwp.meta @@ -0,0 +1,1296 @@ +[ccpp-arg-table] + name = unified_ugwp_init + type = scheme +[me] + standard_name = mpi_rank + long_name = MPI rank of current process + units = index + dimensions = () + type = integer + intent = in + optional = F +[master] + standard_name = mpi_root + long_name = MPI rank of master process + units = index + dimensions = () + type = integer + intent = in + optional = F +[nlunit] + standard_name = iounit_namelist + long_name = fortran unit number for opening namelist file + units = none + dimensions = () + type = integer + intent = in + optional = F +[input_nml_file] + standard_name = namelist_filename_for_internal_file_reads + long_name = character string to store full namelist contents + units = none + dimensions = (number_of_lines_of_namelist_filename_for_internal_file_reads) + type = character + kind = len=* + intent = in + optional = F +[logunit] + standard_name = iounit_log + long_name = fortran unit number for writing logfile + units = none + dimensions = () + type = integer + intent = in + optional = F +[fn_nml2] + standard_name = namelist_filename + long_name = namelist filename for ugwp + units = none + dimensions = () + type = character + kind = len=* + intent = in + optional = F +[lonr] + standard_name = number_of_equatorial_longitude_points + long_name = number of global points in x-dir (i) along the equator + units = count + dimensions = () + type = integer + intent = in + optional = F +[latr] + standard_name = number_of_latitude_points + long_name = number of global points in y-dir (j) along the meridian + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ak] + standard_name = a_parameter_of_the_hybrid_coordinate + long_name = a parameter for sigma pressure level calculations + units = Pa + dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[bk] + standard_name = b_parameter_of_the_hybrid_coordinate + long_name = b parameter for sigma pressure level calculations + units = none + dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[dtp] + standard_name = time_step_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[cdmbgwd] + standard_name = multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + long_name = multiplication factors for cdmb and gwd + units = none + dimensions = (4) + type = real + kind = kind_phys + intent = in + optional = F +[jdat] + standard_name = forecast_date_and_time + long_name = current forecast date and time + units = none + dimensions = (8) + type = integer +[cgwf] + standard_name = multiplication_factors_for_convective_gravity_wave_drag + long_name = multiplication factor for convective GWD + units = none + dimensions = (2) + type = real + kind = kind_phys + intent = in + optional = F +[pa_rf_in] + standard_name = pressure_cutoff_for_rayleigh_damping + long_name = pressure level from which Rayleigh Damping is applied + units = Pa + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[tau_rf_in] + standard_name = time_scale_for_rayleigh_damping + long_name = time scale for Rayleigh damping in days + units = d + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_p0] + standard_name = standard_atmospheric_pressure + long_name = standard atmospheric pressure + units = Pa + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[do_ugwp] + standard_name = do_ugwp + long_name = flag to activate CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v0] + standard_name = do_ugwp_v0 + long_name = flag to activate ver 0 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v0_orog_only] + standard_name = do_ugwp_v0_orog_only + long_name = flag to activate ver 0 CIRES UGWP - orographic GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ls_bl] + standard_name = do_gsl_drag_ls_bl + long_name = flag to activate GSL drag suite - large-scale GWD and blocking + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ss] + standard_name = do_gsl_drag_ss + long_name = flag to activate GSL drag suite - small-scale GWD + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_tofd] + standard_name = do_gsl_drag_tofd + long_name = flag to activate GSL drag suite - turb orog form drag + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1] + standard_name = do_ugwp_v1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1_orog_only] + standard_name = do_ugwp_v1_orog_only + long_name = flag to activate ver 1 CIRES UGWP - orographic GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = unified_ugwp_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = unified_ugwp_run + type = scheme +[do_ugwp] + standard_name = do_ugwp + long_name = flag to activate CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[me] + standard_name = mpi_rank + long_name = MPI rank of current process + units = index + dimensions = () + type = integer + intent = in + optional = F +[master] + standard_name = mpi_root + long_name = MPI rank of master process + units = index + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_loop_extent + long_name = horizontal + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[dtp] + standard_name = time_step_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhzero] + standard_name = hours_between_clearing_of_diagnostic_buckets + long_name = hours between clearing of diagnostic buckets + units = h + dimensions = () + type = real + kind = kind_phys +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[lonr] + standard_name = number_of_equatorial_longitude_points + long_name = number of global points in x-dir (i) along the equator + units = count + dimensions = () + type = integer + intent = in + optional = F +[oro] + standard_name = orography + long_name = orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[oro_uf] + standard_name = orography_unfiltered + long_name = unfiltered orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[nmtvr] + standard_name = number_of_statistical_measures_of_subgrid_orography + long_name = number of topographic variables in GWD + units = count + dimensions = () + type = integer + intent = in + optional = F +[oc] + standard_name = convexity_of_subgrid_orography + long_name = convexity of subgrid orography + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[theta] + standard_name = angle_from_east_of_maximum_subgrid_orographic_variations + long_name = angle with_respect to east of maximum subgrid orographic variations + units = degree + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sigma] + standard_name = slope_of_subgrid_orography + long_name = slope of subgrid orography + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[gamma] + standard_name = anisotropy_of_subgrid_orography + long_name = anisotropy of subgrid orography + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[elvmax] + standard_name = maximum_subgrid_orography + long_name = maximum of subgrid orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dtaux2d_ls] + standard_name = x_momentum_tendency_from_large_scale_gwd + long_name = x momentum tendency from large scale gwd + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtauy2d_ls] + standard_name = y_momentum_tendency_from_large_scale_gwd + long_name = y momentum tendency from large scale gwd + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtaux2d_bl] + standard_name = x_momentum_tendency_from_blocking_drag + long_name = x momentum tendency from blocking drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtauy2d_bl] + standard_name = y_momentum_tendency_from_blocking_drag + long_name = y momentum tendency from blocking drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtaux2d_ss] + standard_name = x_momentum_tendency_from_small_scale_gwd + long_name = x momentum tendency from small scale gwd + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtauy2d_ss] + standard_name = y_momentum_tendency_from_small_scale_gwd + long_name = y momentum tendency from small scale gwd + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtaux2d_fd] + standard_name = x_momentum_tendency_from_form_drag + long_name = x momentum tendency from form drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dtauy2d_fd] + standard_name = y_momentum_tendency_from_form_drag + long_name = y momentum tendency from form drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[clx] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height + long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height + units = frac + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[oa4] + standard_name = asymmetry_of_subgrid_orography + long_name = asymmetry of subgrid orography + units = none + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[varss] + standard_name = standard_deviation_of_subgrid_orography_small_scale + long_name = standard deviation of subgrid orography small scale + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[oc1ss] + standard_name = convexity_of_subgrid_orography_small_scale + long_name = convexity of subgrid orography small scale + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[oa4ss] + standard_name = asymmetry_of_subgrid_orography_small_scale + long_name = asymmetry of subgrid orography small scale + units = none + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[ol4ss] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale + long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale + units = frac + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[do_tofd] + standard_name = turb_oro_form_drag_flag + long_name = flag for turbulent orographic form drag + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ldiag_ugwp] + standard_name = diag_ugwp_flag + long_name = flag for CIRES UGWP Diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[cdmbgwd] + standard_name = multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + long_name = multiplication factors for cdmb and gwd + units = none + dimensions = (4) + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = grid latitude + units = radian + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[xlat_d] + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sinlat] + standard_name = sine_of_latitude + long_name = sine of the grid latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[coslat] + standard_name = cosine_of_latitude + long_name = cosine of the grid latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[area] + standard_name = cell_area + long_name = area of the grid cell + units = m2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ugrs] + standard_name = x_wind + long_name = zonal wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[vgrs] + standard_name = y_wind + long_name = meridional wind + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[q1] + standard_name = water_vapor_specific_humidity + long_name = mid-layer specific humidity of water vapor + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prslk] + standard_name = dimensionless_exner_function_at_model_layers + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phii] + standard_name = geopotential_at_interface + long_name = geopotential at model layer interfaces + units = m2 s-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[phil] + standard_name = geopotential + long_name = geopotential at model layer centers + units = m2 s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[del] + standard_name = air_pressure_difference_between_midlayers + long_name = air pressure difference between midlayers + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[kpbl] + standard_name = vertical_index_at_top_of_atmosphere_boundary_layer + long_name = vertical index at top atmospheric boundary layer + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[dusfcg] + standard_name = instantaneous_x_stress_due_to_gravity_wave_drag + long_name = zonal surface stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfcg] + standard_name = instantaneous_y_stress_due_to_gravity_wave_drag + long_name = meridional surface stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dusfc_ls] + standard_name = integrated_x_momentum_flux_from_large_scale_gwd + long_name = integrated x momentum flux from large scale gwd + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc_ls] + standard_name = integrated_y_momentum_flux_from_large_scale_gwd + long_name = integrated y momentum flux from large scale gwd + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dusfc_bl] + standard_name = integrated_x_momentum_flux_from_blocking_drag + long_name = integrated x momentum flux from blocking drag + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc_bl] + standard_name = integrated_y_momentum_flux_from_blocking_drag + long_name = integrated y momentum flux from blocking drag + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dusfc_ss] + standard_name = integrated_x_momentum_flux_from_small_scale_gwd + long_name = integrated x momentum flux from small scale gwd + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc_ss] + standard_name = integrated_y_momentum_flux_from_small_scale_gwd + long_name = integrated y momentum flux from small scale gwd + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dusfc_fd] + standard_name = integrated_x_momentum_flux_from_form_drag + long_name = integrated x momentum flux from form drag + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc_fd] + standard_name = integrated_y_momentum_flux_from_form_drag + long_name = integrated y momentum flux from form drag + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[br1] + standard_name = bulk_richardson_number_at_lowest_model_level + long_name = bulk Richardson number at the surface + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hpbl] + standard_name = atmosphere_boundary_layer_thickness + long_name = PBL thickness + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[gw_dudt] + standard_name = tendency_of_x_wind_due_to_ugwp + long_name = zonal wind tendency due to UGWP + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[gw_dvdt] + standard_name = tendency_of_y_wind_due_to_ugwp + long_name = meridional wind tendency due to UGWP + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[gw_dtdt] + standard_name = tendency_of_air_temperature_due_to_ugwp + long_name = air temperature tendency due to UGWP + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[gw_kdis] + standard_name = eddy_mixing_due_to_ugwp + long_name = eddy mixing due to UGWP + units = m2 s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tau_tofd] + standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag + long_name = momentum flux or stress due to TOFD + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tau_mtb] + standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag + long_name = momentum flux or stress due to mountain blocking drag + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tau_ogw] + standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag + long_name = momentum flux or stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tau_ngw] + standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave + long_name = momentum flux or stress due to nonstationary gravity waves + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[zmtb] + standard_name = height_of_mountain_blocking + long_name = height of mountain blocking drag + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[zlwb] + standard_name = height_of_low_level_wave_breaking + long_name = height of low level wave breaking + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[zogw] + standard_name = height_of_launch_level_of_orographic_gravity_wave + long_name = height of launch level of orographic gravity wave + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dudt_mtb] + standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag + long_name = instantaneous change in x wind due to mountain blocking drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dudt_ogw] + standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = instantaneous change in x wind due to orographic gw drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dudt_tms] + standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag + long_name = instantaneous change in x wind due to TOFD + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[du3dt_mtb] + standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag + long_name = time integral of change in x wind due to mountain blocking drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_ogw] + standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = time integral of change in x wind due to orographic gw drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_tms] + standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag + long_name = time integral of change in x wind due to TOFD + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dudt] + standard_name = tendency_of_x_wind_due_to_model_physics + long_name = zonal wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dvdt] + standard_name = tendency_of_y_wind_due_to_model_physics + long_name = meridional wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dtdt] + standard_name = tendency_of_air_temperature_due_to_model_physics + long_name = air temperature tendency due to model physics + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rdxzb] + standard_name = level_of_dividing_streamline + long_name = level of the dividing streamline + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dx] + standard_name = cell_size + long_name = size of the grid cell + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[gwd_opt] + standard_name = gwd_opt + long_name = flag to choose gwd scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[con_g] + standard_name = gravitational_acceleration + long_name = gravitational acceleration + units = m s-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_pi] + standard_name = pi + long_name = ratio of a circle's circumference to its diameter + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat !of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rv] + standard_name = gas_constant_water_vapor + long_name = ideal gas constant for water vapor + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_fvirt] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = rv/rd - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rain] + standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep + long_name = total rain at this time step + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ntke] + standard_name = index_for_turbulent_kinetic_energy + long_name = tracer index for turbulent kinetic energy + units = index + dimensions = () + type = integer + intent = in + optional = F +[q_tke] + standard_name = turbulent_kinetic_energy + long_name = turbulent kinetic energy + units = J + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dqdt_tke] + standard_name = tendency_of_turbulent_kinetic_energy_due_to_model_physics + long_name = turbulent kinetic energy tendency due to model physics + units = J s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lprnt] + standard_name = flag_print + long_name = control flag for diagnostic print out + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ipr] + standard_name = horizontal_index_of_printed_column + long_name = horizontal index of printed column + units = index + dimensions = () + type = integer + intent = in + optional = F +[ldu3dt_ogw] + standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = cumulative change in x wind due to orographic gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ldv3dt_ogw] + standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag + long_name = cumulative change in y wind due to orographic gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ldt3dt_ogw] + standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag + long_name = cumulative change in temperature due to orographic gravity wave drag + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ldu3dt_cgw] + standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag + long_name = cumulative change in x wind due to convective gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ldv3dt_cgw] + standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag + long_name = cumulative change in y wind due to convective gravity wave drag + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ldt3dt_cgw] + standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag + long_name = cumulative change in temperature due to convective gravity wave drag + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ldiag3d] + standard_name = flag_diagnostics_3D + long_name = flag for 3d diagnostic fields + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[flag_for_gwd_generic_tend] + standard_name = flag_for_generic_gravity_wave_drag_tendency + long_name = true if GFS_GWD_generic should calculate tendencies + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v0] + standard_name = do_ugwp_v0 + long_name = flag to activate ver 0 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v0_orog_only] + standard_name = do_ugwp_v0_orog_only + long_name = flag to activate ver 0 CIRES UGWP - orographic GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ls_bl] + standard_name = do_gsl_drag_ls_bl + long_name = flag to activate GSL drag suite - large-scale GWD and blocking + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_ss] + standard_name = do_gsl_drag_ss + long_name = flag to activate GSL drag suite - small-scale GWD + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_gsl_drag_tofd] + standard_name = do_gsl_drag_tofd + long_name = flag to activate GSL drag suite - turb orog form drag + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1] + standard_name = do_ugwp_v1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1_orog_only] + standard_name = do_ugwp_v1_orog_only + long_name = flag to activate ver 1 CIRES UGWP - orographic GWD only + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/unified_ugwp_post.F90 b/physics/unified_ugwp_post.F90 new file mode 100644 index 000000000..ac11b4eb1 --- /dev/null +++ b/physics/unified_ugwp_post.F90 @@ -0,0 +1,83 @@ +!> \file unified_ugwp_post.F90 +!! This file contains +module unified_ugwp_post + +contains + +!>\defgroup unified_ugwp_post CIRES UGWP Scheme Post +!! @{ +!> \section arg_table_unified_ugwp_post_init Argument Table +!! + subroutine unified_ugwp_post_init () + end subroutine unified_ugwp_post_init + +!>@brief The subroutine initializes the CIRES UGWP +#if 0 +!> \section arg_table_unified_ugwp_post_run Argument Table +!! \htmlinclude unified_ugwp_post_run.html +!! +#endif + + + subroutine unified_ugwp_post_run (ldiag_ugwp, dtf, im, levs, & + gw_dtdt, gw_dudt, gw_dvdt, tau_tofd, tau_mtb, tau_ogw, & + tau_ngw, zmtb, zlwb, zogw, dudt_mtb, dudt_ogw, dudt_tms, & + tot_zmtb, tot_zlwb, tot_zogw, & + tot_tofd, tot_mtb, tot_ogw, tot_ngw, & + du3dt_mtb,du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw, & + dtdt, dudt, dvdt, errmsg, errflg) + + use machine, only: kind_phys + + implicit none + + ! Interface variables + integer, intent(in) :: im, levs + real(kind=kind_phys), intent(in) :: dtf + logical, intent(in) :: ldiag_ugwp !< flag for CIRES UGWP Diagnostics + + real(kind=kind_phys), intent(in), dimension(:) :: zmtb, zlwb, zogw + real(kind=kind_phys), intent(in), dimension(:) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw + real(kind=kind_phys), intent(inout), dimension(:) :: tot_mtb, tot_ogw, tot_tofd, tot_ngw + real(kind=kind_phys), intent(inout), dimension(:) :: tot_zmtb, tot_zlwb, tot_zogw + real(kind=kind_phys), intent(in), dimension(:,:) :: gw_dtdt, gw_dudt, gw_dvdt, dudt_mtb, dudt_ogw, dudt_tms + real(kind=kind_phys), intent(inout), dimension(:,:) :: du3dt_mtb, du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw + real(kind=kind_phys), intent(inout), dimension(:,:) :: dtdt, dudt, dvdt + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (ldiag_ugwp) then + tot_zmtb = tot_zmtb + dtf *zmtb + tot_zlwb = tot_zlwb + dtf *zlwb + tot_zogw = tot_zogw + dtf *zogw + + tot_tofd = tot_tofd + dtf *tau_tofd + tot_mtb = tot_mtb + dtf *tau_mtb + tot_ogw = tot_ogw + dtf *tau_ogw + tot_ngw = tot_ngw + dtf *tau_ngw + + du3dt_mtb = du3dt_mtb + dtf *dudt_mtb + du3dt_tms = du3dt_tms + dtf *dudt_tms + du3dt_ogw = du3dt_ogw + dtf *dudt_ogw + du3dt_ngw = du3dt_ngw + dtf *gw_dudt + dv3dt_ngw = dv3dt_ngw + dtf *gw_dvdt + endif + + dtdt = dtdt + gw_dtdt + dudt = dudt + gw_dudt + dvdt = dvdt + gw_dvdt + + end subroutine unified_ugwp_post_run + +!> \section arg_table_unified_ugwp_post_finalize Argument Table +!! + subroutine unified_ugwp_post_finalize () + end subroutine unified_ugwp_post_finalize + +!! @} +end module unified_ugwp_post diff --git a/physics/unified_ugwp_post.meta b/physics/unified_ugwp_post.meta new file mode 100644 index 000000000..807584e94 --- /dev/null +++ b/physics/unified_ugwp_post.meta @@ -0,0 +1,315 @@ +[ccpp-arg-table] + name = unified_ugwp_post_init + type = scheme + +######################################################################## +[ccpp-arg-table] + name = unified_ugwp_post_run + type = scheme +[ldiag_ugwp] + standard_name = diag_ugwp_flag + long_name = flag for CIRES UGWP Diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[dtf] + standard_name = time_step_for_dynamics + long_name = dynamics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[gw_dtdt] + standard_name = tendency_of_air_temperature_due_to_ugwp + long_name = air temperature tendency due to UGWP + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[gw_dudt] + standard_name = tendency_of_x_wind_due_to_ugwp + long_name = zonal wind tendency due to UGWP + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[gw_dvdt] + standard_name = tendency_of_y_wind_due_to_ugwp + long_name = meridional wind tendency due to UGWP + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tau_tofd] + standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag + long_name = momentum flux or stress due to TOFD + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tau_mtb] + standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag + long_name = momentum flux or stress due to mountain blocking drag + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tau_ogw] + standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag + long_name = momentum flux or stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tau_ngw] + standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave + long_name = momentum flux or stress due to nonstationary gravity waves + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zmtb] + standard_name = height_of_mountain_blocking + long_name = height of mountain blocking drag + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zlwb] + standard_name = height_of_low_level_wave_breaking + long_name = height of low level wave breaking + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zogw] + standard_name = height_of_launch_level_of_orographic_gravity_wave + long_name = height of launch level of orographic gravity wave + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dudt_mtb] + standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag + long_name = instantaneous change in x wind due to mountain blocking drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dudt_ogw] + standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = instantaneous change in x wind due to orographic gw drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dudt_tms] + standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag + long_name = instantaneous change in x wind due to TOFD + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tot_zmtb] + standard_name = time_integral_of_height_of_mountain_blocking + long_name = time integral of height of mountain blocking drag + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_zlwb] + standard_name = time_integral_of_height_of_low_level_wave_breaking + long_name = time integral of height of drag due to low level wave breaking + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_zogw] + standard_name = time_integral_of_height_of_launch_level_of_orographic_gravity_wave + long_name = time integral of height of launch level of orographic gravity wave + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_tofd] + standard_name = time_integral_of_momentum_flux_due_to_turbulent_orographic_form_drag + long_name = time integral of momentum flux due to TOFD + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_mtb] + standard_name = time_integral_of_momentum_flux_due_to_mountain_blocking_drag + long_name = time integral of momentum flux due to mountain blocking drag + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_ogw] + standard_name = time_integral_of_momentum_flux_due_to_orographic_gravity_wave_drag + long_name = time integral of momentum flux due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[tot_ngw] + standard_name = time_integral_of_momentum_flux_due_to_nonstationary_gravity_wave + long_name = time integral of momentum flux due to nonstationary gravity waves + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_mtb] + standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag + long_name = time integral of change in x wind due to mountain blocking drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_ogw] + standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag + long_name = time integral of change in x wind due to orographic gw drag + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_tms] + standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag + long_name = time integral of change in x wind due to TOFD + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[du3dt_ngw] + standard_name = time_integral_of_change_in_x_wind_due_to_nonstationary_gravity_wave + long_name = time integral of change in x wind due to NGW + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dv3dt_ngw] + standard_name = time_integral_of_change_in_y_wind_due_to_nonstationary_gravity_wave + long_name = time integral of change in y wind due to NGW + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dtdt] + standard_name = tendency_of_air_temperature_due_to_model_physics + long_name = air temperature tendency due to model physics + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dudt] + standard_name = tendency_of_x_wind_due_to_model_physics + long_name = zonal wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[dvdt] + standard_name = tendency_of_y_wind_due_to_model_physics + long_name = meridional wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = unified_ugwp_post_finalize + type = scheme From e19d00da14a774ad970f519a055b2a4718c442ac Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 2 Sep 2020 17:29:34 -0600 Subject: [PATCH 334/404] Increase length of message and update declaration in qcmxmn to avoid writing out of bounds --- physics/sfcsub.F | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/physics/sfcsub.F b/physics/sfcsub.F index 30f663ec5..57aff87d4 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -43,10 +43,8 @@ function message(prefix,index) implicit none character(len=*), intent(in) :: prefix integer, intent(in) :: index - character(len=10) :: message - ! - ! probably need to implement a check that len(prefix) + '-' + length of - ! string representation of index <= len(message) + ! Safety measure: prevent writing out of bounds, use a longer string + character(len=128) :: message write(message,fmt='(a,a,i0)') trim(prefix), '-', index end function message @@ -5234,7 +5232,7 @@ subroutine qcmxmn(ttl,fld,slimsk,sno,iceflg, & & ij,nprt,kmaxs,kmins,i,me,len,mode parameter(mmprt=2) ! - character*8 ttl + character(len=*) ttl logical iceflg(len) real (kind=kind_io8) fld(len),slimsk(len),sno(len), & & rla(len), rlo(len) From 317c5cd465bedbba939295d59e0503eea8d057c1 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 3 Sep 2020 15:10:19 -0600 Subject: [PATCH 335/404] physics/sfcsub.F: reduce length of message string for prettier output --- physics/sfcsub.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfcsub.F b/physics/sfcsub.F index 57aff87d4..b0fe168bd 100644 --- a/physics/sfcsub.F +++ b/physics/sfcsub.F @@ -43,8 +43,8 @@ function message(prefix,index) implicit none character(len=*), intent(in) :: prefix integer, intent(in) :: index - ! Safety measure: prevent writing out of bounds, use a longer string - character(len=128) :: message + ! Safety measure: prevent writing out of bounds, use a longer string than 8 characters + character(len=16) :: message write(message,fmt='(a,a,i0)') trim(prefix), '-', index end function message From 3a727b952107b6d27d4ebf129dcd75a0b627c189 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Fri, 4 Sep 2020 03:02:17 +0000 Subject: [PATCH 336/404] 2nd try -- Sept. 3 -- two scheme test --- physics/cires_orowam2017.F90 | 28 +- physics/cires_ugwp_initialize_v1.F90 | 54 +- physics/cires_ugwp_module_v1.F90 | 22 +- physics/cires_ugwp_orolm97_v1.F90 | 21 +- physics/cires_ugwp_solv2_v1_mod.F90 | 8 +- physics/cires_ugwp_triggers_v1.F90 | 4 +- physics/cires_vert_orodis.F90 | 8 - physics/cires_vert_orodis_v1.F90 | 1026 ++++++++++++++++++++++++++ physics/unified_ugwp.F90 | 12 +- 9 files changed, 1105 insertions(+), 78 deletions(-) create mode 100644 physics/cires_vert_orodis_v1.F90 diff --git a/physics/cires_orowam2017.F90 b/physics/cires_orowam2017.F90 index 752c6f84e..d5568bb9d 100644 --- a/physics/cires_orowam2017.F90 +++ b/physics/cires_orowam2017.F90 @@ -4,13 +4,13 @@ module cires_orowam2017 contains - subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, - & dtp,dxres, taub, u1, v1, t1, xn, yn, bn2, rho, prsi, prsL, - & del, sigma, hprime, gamma, theta, + subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & + & dtp,dxres, taub, u1, v1, t1, xn, yn, bn2, rho, prsi, prsL, & + & del, sigma, hprime, gamma, theta, & & sinlat, xlatd, taup, taud, pkdis) ! USE MACHINE , ONLY : kind_phys - use ugwp_common , only : grav, omega2 + use ugwp_common_v1 , only : grav, omega2 ! implicit none @@ -22,12 +22,12 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, real(kind=kind_phys), intent(in) :: taub(im) real(kind=kind_phys), intent(in) :: sinlat(im), xlatd(im) - real(kind=kind_phys), intent(in), dimension(im) :: sigma, + real(kind=kind_phys), intent(in), dimension(im) :: sigma, & & hprime, gamma, theta real(kind=kind_phys), intent(in), dimension(im) :: xn, yn - real(kind=kind_phys), intent(in), dimension(im, levs) :: + real(kind=kind_phys), intent(in), dimension(im, levs) :: & & u1, v1, t1, bn2, rho, prsl, del real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi @@ -102,8 +102,8 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, if (kdt == 1) then 771 format( 'vay-oro19 ', 3(2x,F8.3)) - write(6,771) - & maxval(tau_kx)*maxval(taub)*1.e3, + write(6,771) & + & maxval(tau_kx)*maxval(taub)*1.e3, & & minval(tau_kx), maxval(tau_kx) endif ! @@ -127,9 +127,9 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, taub_kx(1:nw) = tau_kx(1:nw) * taub(i) wkdis(:,:) = kedmin - call oro_meanflow(levs, nzi, u1(j,:), v1(j,:), t1(j,:), - & prsi(j,:), prsL(j,:), del(j,:), rho(i,:), - & bn2(i,:), uzi, rhoi,ktur, kalp,dzi, + call oro_meanflow(levs, nzi, u1(j,:), v1(j,:), t1(j,:), & + & prsi(j,:), prsL(j,:), del(j,:), rho(i,:), & + & bn2(i,:), uzi, rhoi,ktur, kalp,dzi, & & xn(i), yn(i)) fcor2 = (omega2*sinlat(j))*(omega2*sinlat(j))*fc_flag @@ -242,7 +242,7 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, wrms(iw,k) = etwk tauk = etwk*kxw/kzw tau_sp(iw,k) = tauk *rhoint - if ( tau_sp(iw,k) > tau_sp(iw,k-1)) + if ( tau_sp(iw,k) > tau_sp(iw,k-1)) & & tau_sp(iw,k) = tau_sp(iw,k-1) ENDIF ! upward @@ -281,10 +281,10 @@ end subroutine oro_wam_2017 ! define mean flow and dissipation for OGW-kx spectrum ! !------------------------------------------------------------- - subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, + subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, & & delp, rho, bn2, uzi, rhoi, ktur, kalp, dzi, xn, yn) - use ugwp_common , only : grav, rgrav, rdi, velmin, dw2min + use ugwp_common_v1 , only : grav, rgrav, rdi, velmin, dw2min implicit none integer :: nz, nzi diff --git a/physics/cires_ugwp_initialize_v1.F90 b/physics/cires_ugwp_initialize_v1.F90 index eef5cc04e..174a871d1 100644 --- a/physics/cires_ugwp_initialize_v1.F90 +++ b/physics/cires_ugwp_initialize_v1.F90 @@ -10,7 +10,7 @@ ! ! - module ugwp_common + module ugwp_common_v1 ! ! use machine, only : kind_phys ! use physcons, only : pi => con_pi, grav => con_g, rd => con_rd, & @@ -46,7 +46,7 @@ module ugwp_common real, parameter :: mkzmin = pi2/80.0e3, mkz2min = mkzmin*mkzmin real, parameter :: mkzmax = pi2/500., mkz2max = mkzmax*mkzmax real, parameter :: cdmin = 2.e-2/mkzmax - end module ugwp_common + end module ugwp_common_v1 ! ! !=================================================== @@ -56,7 +56,7 @@ end module ugwp_common !=================================================== subroutine init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) - use ugwp_common, only : pih + use ugwp_common_v1, only : pih implicit none @@ -178,13 +178,13 @@ end subroutine rf_damp_init ! wave sources ! ======================================================================== ! -! ugwp_oro_init +! ugwp_oro_init_v1 ! !========================================================================= - module ugwp_oro_init + module ugwp_oro_init_v1 - use ugwp_common, only : bnv2min, grav, grcp, fv, grav, cpd, grcp, pi - use ugwp_common, only : mkzmin, mkz2min + use ugwp_common_v1, only : bnv2min, grav, grcp, fv, grav, cpd, grcp, pi + use ugwp_common_v1, only : mkzmin, mkz2min implicit none ! ! constants and "crirtical" values to run oro-mtb_gw physics @@ -281,7 +281,7 @@ subroutine init_oro_gws(nwaves, nazdir, nstoch, effac, & real, parameter :: lonr_refmb = 4.0 * 192.0 real, parameter :: lonr_refgw = 192.0 -! copy to "ugwp_oro_init" => nwaves, nazdir, nstoch +! copy to "ugwp_oro_init_v1" => nwaves, nazdir, nstoch nworo = nwaves nazoro = nazdir @@ -306,13 +306,13 @@ subroutine init_oro_gws(nwaves, nazdir, nstoch, effac, & end subroutine init_oro_gws ! - end module ugwp_oro_init + end module ugwp_oro_init_v1 ! ========================================================================= ! -! ugwp_conv_init +! ugwp_conv_init_v1 ! !========================================================================= - module ugwp_conv_init + module ugwp_conv_init_v1 implicit none real :: eff_con ! scale factors for conv GWs @@ -336,7 +336,7 @@ module ugwp_conv_init ! subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, & lonr, kxw, cgwf) - use ugwp_common, only : pi2, arad + use ugwp_common_v1, only : pi2, arad implicit none integer :: nwaves, nazdir, nstoch @@ -382,14 +382,14 @@ subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, & end subroutine init_conv_gws - end module ugwp_conv_init + end module ugwp_conv_init_v1 !========================================================================= ! -! ugwp_fjet_init +! ugwp_fjet_init_v1 ! !========================================================================= - module ugwp_fjet_init + module ugwp_fjet_init_v1 implicit none real :: eff_fj ! scale factors for conv GWs integer :: nwfj ! number of waves @@ -406,7 +406,7 @@ module ugwp_fjet_init real, allocatable :: xaz_fjet(:), yaz_fjet(:) contains subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) - use ugwp_common, only : pi2, arad + use ugwp_common_v1, only : pi2, arad implicit none integer :: nwaves, nazdir, nstoch @@ -435,12 +435,12 @@ subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) end subroutine init_fjet_gws - end module ugwp_fjet_init + end module ugwp_fjet_init_v1 ! !========================================================================= ! ! - module ugwp_okw_init + module ugwp_okw_init_v1 !========================================================================= implicit none @@ -461,7 +461,7 @@ module ugwp_okw_init ! subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) - use ugwp_common, only : pi2, arad + use ugwp_common_v1, only : pi2, arad implicit none integer :: nwaves, nazdir, nstoch @@ -490,7 +490,7 @@ subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) end subroutine init_okw_gws - end module ugwp_okw_init + end module ugwp_okw_init_v1 !=============================== end of GW sources ! @@ -501,7 +501,7 @@ end module ugwp_okw_init ! Part -3 init wave solvers !=============================== - module ugwp_lsatdis_init + module ugwp_lsatdis_init_v1 implicit none integer :: nwav, nazd @@ -543,14 +543,14 @@ subroutine initsolv_lsatdis(me, master, nwaves, nazdir, nstoch, effac, do_physb ! end subroutine initsolv_lsatdis ! - end module ugwp_lsatdis_init + end module ugwp_lsatdis_init_v1 ! ! - module ugwp_wmsdis_init + module ugwp_wmsdis_init_v1 - use ugwp_common, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4, omega2 - use ugwp_common, only : bnv2max, bnv2min, minvel - use ugwp_common, only : mkzmin, mkz2min, mkzmax, mkz2max, cdmin + use ugwp_common_v1, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4, omega2 + use ugwp_common_v1, only : bnv2max, bnv2min, minvel + use ugwp_common_v1, only : mkzmin, mkz2min, mkzmax, mkz2max, cdmin implicit none real, parameter :: maxdudt = 250.e-5, maxdtdt=15.e-2 @@ -782,7 +782,7 @@ end subroutine initsolv_wmsdis ! make a list of all-initilized parameters needed for "gw_solver_wmsdis" ! - end module ugwp_wmsdis_init + end module ugwp_wmsdis_init_v1 !========================================================================= ! ! work TODO for 2-extra WAM-solvers: diff --git a/physics/cires_ugwp_module_v1.F90 b/physics/cires_ugwp_module_v1.F90 index ecc00ecfb..dc586c6bd 100644 --- a/physics/cires_ugwp_module_v1.F90 +++ b/physics/cires_ugwp_module_v1.F90 @@ -9,7 +9,7 @@ module cires_ugwp_module_v1 !................................................................................... ! ! - use ugwp_common, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4 + use ugwp_common_v1, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4 implicit none logical :: module_is_initialized !logical :: do_ugwp = .false. ! control => true - ugwp false old gws + rayeleigh friction @@ -176,18 +176,18 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & ! ! input_nml_file ='input.nml'=fn_nml ..... OLD_namelist and cdmvgwd(4) Corrected Bug Oct 4 ! - ! use netcdf - use ugwp_oro_init, only : init_oro_gws - use ugwp_conv_init, only : init_conv_gws - use ugwp_fjet_init, only : init_fjet_gws - use ugwp_okw_init, only : init_okw_gws - use ugwp_wmsdis_init, only : initsolv_wmsdis + use netcdf + use ugwp_oro_init_v1, only : init_oro_gws + use ugwp_conv_init_v1, only : init_conv_gws + use ugwp_fjet_init_v1, only : init_fjet_gws + use ugwp_okw_init_v1, only : init_okw_gws + use ugwp_wmsdis_init_v1, only : initsolv_wmsdis - use ugwp_lsatdis_init, only : initsolv_lsatdis + use ugwp_lsatdis_init_v1, only : initsolv_lsatdis - use ugwp_wmsdis_init, only : ilaunch, nslope, lhmet, lzmax, lzmin, lzstar - use ugwp_wmsdis_init, only : tau_min, tamp_mpa + use ugwp_wmsdis_init_v1, only : ilaunch, nslope, lhmet, lzmax, lzmin, lzstar + use ugwp_wmsdis_init_v1, only : tau_min, tamp_mpa implicit none integer, intent (in) :: me @@ -322,7 +322,7 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & IF (do_physb_gwsrcs) THEN - if (me == master) print *, ' do_physb_gwsrcs ', do_physb_gwsrcs, ' in cires_ugwp_init ' + if (me == master) print *, ' do_physb_gwsrcs ', do_physb_gwsrcs, ' in cires_ugwp_init_v1 ' if (knob_ugwp_wvspec(4) > 0) then ! okw call init_okw_gws(knob_ugwp_wvspec(4), knob_ugwp_azdir(4), & diff --git a/physics/cires_ugwp_orolm97_v1.F90 b/physics/cires_ugwp_orolm97_v1.F90 index 1a6cedcb3..e6c3a1ea0 100644 --- a/physics/cires_ugwp_orolm97_v1.F90 +++ b/physics/cires_ugwp_orolm97_v1.F90 @@ -8,7 +8,7 @@ module cires_ugwp_orolm97_v1 subroutine gwdps_oro_v1(im, km, imx, do_tofd, & pdvdt, pdudt, pdtdt, pkdis, u1,v1,t1,q1,kpbl, & prsi,del,prsl,prslk, zmeti, zmet, dtp, kdt, hprime, & - oc, oa4, clx4, theta, sigma, gamma, elvmaxd, sgh30, & + oc, oa4, clx4, theta, sigmad, gammad, elvmaxd, sgh30, & dusfc, dvsfc, xlatd, sinlat, coslat, sparea, & cdmbgwd, me, master, rdxzb, & zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & @@ -23,12 +23,12 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & !---------------------------------------- use machine , only : kind_phys - use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2, & + use ugwp_common_v1, only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2, & pi, rad_to_deg, deg_to_rad, pi2, & rdi, gor, grcp, gocp, fv, gr2, & bnv2min, dw2min, velmin, arad - use ugwp_oro_init, only : rimin, ric, efmin, efmax , & + use ugwp_oro_init_v1, only : rimin, ric, efmin, efmax , & hpmax, hpmin, sigfaci => sigfac , & dpmin, minwnd, hminmt, hncrit , & rlolev, gmax, veleps, factop , & @@ -37,11 +37,11 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & cdmb, cleff, fcrit_gfs, fcrit_mtb, & n_tofd, ze_tofd, ztop_tofd - use cires_ugwp_module, only : kxw, max_kdis, max_axyz + use cires_ugwp_module_v1, only : kxw, max_kdis, max_axyz use cires_orowam2017, only : oro_wam_2017 - use cires_vert_orodis, only : ugwp_tofd1d + use cires_vert_orodis_v1, only : ugwp_tofd1d ! use sso_coorde, only : pgwd, pgwd4 @@ -67,8 +67,8 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & real(kind=kind_phys), intent(in) :: cdmbgwd(2) real(kind=kind_phys), intent(in) :: hprime(im), oc(im), oa4(im,4), & - clx4(im,4), theta(im), sigma(im), & - gamma(im), elvmaxd(im) + clx4(im,4), theta(im), sigmad(im), & + gammad(im), elvmaxd(im) real(kind=kind_phys), intent(in) :: sgh30(im) real(kind=kind_phys), intent(in), dimension(im,km) :: & @@ -118,7 +118,8 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & real(kind=kind_phys), dimension(im,km) :: ri_n, bnv2, ro real(kind=kind_phys), dimension(im,km) :: vtk, vtj, velco !mtb - real(kind=kind_phys), dimension(im) :: oa, clx , elvmax, wk + real(kind=kind_phys), dimension(im) :: oa, clx , sigma, gamma, & + elvmax, wk real(kind=kind_phys), dimension(im) :: pe, ek, up real(kind=kind_phys), dimension(im,km) :: db, ang, uds @@ -174,6 +175,10 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & integer :: k_mtb, k_zlow, ktrial, klevm1 integer :: i, j, k ! +! initialize gamma and sigma + gamma(:) = gammad(:) + sigma(:) = sigmad(:) +! rcpdt = 1.0 / (cpd*dtp) grav2 = grav + grav ! diff --git a/physics/cires_ugwp_solv2_v1_mod.F90 b/physics/cires_ugwp_solv2_v1_mod.F90 index ec2ec7bf2..c84028199 100644 --- a/physics/cires_ugwp_solv2_v1_mod.F90 +++ b/physics/cires_ugwp_solv2_v1_mod.F90 @@ -26,18 +26,18 @@ subroutine cires_ugwp_solv2_v1(im, levs, dtp , & use machine, only : kind_phys - use cires_ugwp_module,only : krad, kvg, kion, ktg + use cires_ugwp_module_v1,only : krad, kvg, kion, ktg - use cires_ugwp_module,only : knob_ugwp_doheat, knob_ugwp_dokdis, idebug_gwrms + use cires_ugwp_module_v1,only : knob_ugwp_doheat, knob_ugwp_dokdis, idebug_gwrms - use ugwp_common , only : rgrav, grav, cpd, rd, rv, rcpdl, grav2cpd, & + use ugwp_common_v1 , only : rgrav, grav, cpd, rd, rv, rcpdl, grav2cpd, & omega2, rcpd, rcpd2, pi, pi2, fv, & rad_to_deg, deg_to_rad, & rdi, gor, grcp, gocp, & bnv2min, bnv2max, dw2min, velmin, gr2, & hpscale, rhp, rh4, grav2, rgrav2, mkzmin, mkz2min ! - use ugwp_wmsdis_init, only : v_kxw, rv_kxw, v_kxw2, tamp_mpa, tau_min, ucrit, & + use ugwp_wmsdis_init_v1, only : v_kxw, rv_kxw, v_kxw2, tamp_mpa, tau_min, ucrit, & maxdudt, gw_eff, dked_min, dked_max, maxdtdt, & nslope, ilaunch, zms, & zci, zdci, zci4, zci3, zci2, & diff --git a/physics/cires_ugwp_triggers_v1.F90 b/physics/cires_ugwp_triggers_v1.F90 index 058003b3b..44911e1d5 100644 --- a/physics/cires_ugwp_triggers_v1.F90 +++ b/physics/cires_ugwp_triggers_v1.F90 @@ -11,7 +11,7 @@ end subroutine ugwp_triggers ! SUBROUTINE subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) - use ugwp_common , only : deg_to_rad + use ugwp_common_v1 , only : deg_to_rad implicit none integer :: nx, ny @@ -545,7 +545,7 @@ subroutine slat_geos5(im, xlatdeg, tau_gw) ! end subroutine slat_geos5 subroutine init_nazdir(naz, xaz, yaz) - use ugwp_common , only : pi2 + use ugwp_common_v1 , only : pi2 implicit none integer :: naz real, dimension(naz) :: xaz, yaz diff --git a/physics/cires_vert_orodis.F90 b/physics/cires_vert_orodis.F90 index 8b3550500..0d3cce194 100644 --- a/physics/cires_vert_orodis.F90 +++ b/physics/cires_vert_orodis.F90 @@ -1,9 +1,3 @@ -module cires_vert_orodis - - -contains - - ! subroutine ugwp_drag_mtb ! subroutine ugwp_taub_oro ! subroutine ugwp_oro_lsatdis @@ -1022,5 +1016,3 @@ subroutine ugwp_tofd1d(levs, sigflt, elvmax, zsurf, zpbl, u, v, & enddo ! end subroutine ugwp_tofd1d - -end module cires_vert_orodis diff --git a/physics/cires_vert_orodis_v1.F90 b/physics/cires_vert_orodis_v1.F90 new file mode 100644 index 000000000..c328a3fb6 --- /dev/null +++ b/physics/cires_vert_orodis_v1.F90 @@ -0,0 +1,1026 @@ +module cires_vert_orodis_v1 + + +contains + + +! subroutine ugwp_drag_mtb +! subroutine ugwp_taub_oro +! subroutine ugwp_oro_lsatdis +! + subroutine ugwp_drag_mtb( iemax, nz, & + elvpd, elvp, hprime , sigma, theta, oc, oa4, clx4, gam, zpbl, & + up, vp, tp, qp, dp, zpm, zpi, pmid, pint, idxzb, drmtb,taumtb) + + use ugwp_common_v1, only : bnv2min, grav, grcp, fv, rad_to_deg, dw2min, velmin, rdi + use ugwp_oro_init_v1, only : nridge, cdmb, fcrit_mtb, frmax, frmin, strver + + implicit none +!======================== +! several versions for drmtb => high froude mountain blocking +! version 1 => vay_2018 ; +! version 2 => kdn_2005 ; Kim & Doyle in NRL-2005 +! version 3 => ncep/gfs-2017 -gfs_2017 with lm1997 +!======================== +! real, parameter :: Fcrit_mtb = 0.7 + + integer, intent(in) :: nz + integer, intent(in) :: iemax ! standard ktop z=elvpd + 4 * hprime + real , intent(out) :: taumtb + + integer , intent(out) :: idxzb + real, dimension(nz), intent(out) :: drmtb + + real, intent(in) :: elvp, elvpd !elvp = min (elvpd + sigfac * hprime(j), hncrit=10000meters) + real, intent(in) :: hprime , sigma, theta, oc, oa4(4), clx4(4), gam + real, intent(in) :: zpbl + + real, dimension(nz), intent(in) :: up, vp, tp, qp, dp, zpm, pmid + real, dimension(nz+1), intent(in) :: zpi, pint +! + real, dimension(nz+1) :: zpi_zero + real, dimension(nz) :: zpm_zero + real :: vtj, rhok, bnv2, rdz, vtkp, vtk, dzp + + real, dimension(nz) :: bn2, uds, umf, cosang, sinang + + integer :: k, klow, ktop, kpbl + real :: uhm, vhm, bn2hm, rhohm, & + mtb_fix, umag, bnmag, frd_src, & + zblk, who_iz_normal, rlm97, & + phiang, ang, pe, ek, & + cang, sang, ss2, cs2, zlen, dbtmp, & + hamp, bgamm, cgamm + +!================================================== +! +! elvp + hprime <=>elvp + nridge*hprime, ns =2 +! ns = sigfac +! tau_parel & tau_normal along major "axes" +! +! options to block the "flow", choices for [klow, ktop] +! +! 1-directional (normal) & 2-directional "blocking" +! +!================================================== +! no - blocking: drmtb(1:nz) = 0.0 +!================= + idxzb = -1 + drmtb(1:nz) = 0.0 + taumtb = 0.0 + klow = 2 + + ktop = iemax + hamp = nridge*hprime + +! reminder: cdmb = 4.0 * 192.0/float(imx)*cdmbgwd(1) Lellipse= a/2=sigma/hprime + + mtb_fix = cdmb*sigma/hamp !hamp ~ 2*hprime and 1/sigfac = 0.25 is inside 1/hamp + + if (mtb_fix == 0.) then + print *, cdmb, sigma, hamp + print *, ' MTB == 0' + stop + endif + + if (strver == 'vay_2018') then + + zpm_zero = zpm - zpi(1) + zpi_zero = zpi - zpi(1) + + do k=1, nz-1 + if (hamp .le. zpi_zero(k+1) .and. (hamp .gt. zpi_zero(k) ) ) then + ktop = k+1 !......simply k+1 next interface level + exit + endif + enddo +! print *, klow, ktop, ' klow-ktop ' + call um_flow(nz, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & + bn2, uhm, vhm, bn2hm, rhohm) + + umag = max(sqrt(uhm*uhm + vhm*vhm), velmin) !velmin=dw2min =1.0 m/s + if (bn2hm .le. 0.0) then + print *, ' unstable MF for MTB -RETURN ' + RETURN ! unstable PBL + endif + bnmag =sqrt(bn2hm) + + frd_src = min(hamp*bnmag/umag, frmax) ! frmax =10. + +! print *, frd_src, Fcrit_mtb/frd_src, ' no-Blocking > 1 ' +! + if ( frd_src .le. Fcrit_mtb) RETURN ! no-blocking, although on small ridges with weak winds can be blocking +! +! zblk > 0 +! Fcrit_mtb > Fcrit_ogw h_clip = Fr_mtb*U/N ! h_hill minus h_clip = zblk +! + zblk = hamp*(1. - Fcrit_mtb/frd_src) + idxzb =1 + do k = 2, ktop + + if ( zblk < zpm_zero(k) .and. zblk >= zpm_zero(k-1)) then + idxzb = k + exit + endif + enddo +! + if (idxzb == 1) RETURN ! first surface level block is not "important" + + if (idxzb > 1) then ! let start with idxzb = 2....and up with LM1997 +! +! several options to compute MTB-drag: a) IFS_1997 ; b) WRF_KD05 ; c) SJM_2000 +! + bgamm = 1.0 - 0.18*gam -0.04*gam*gam + cgamm = 0.48*gam +0.3*gam*gam + + do k = 1, idxzb-1 + zlen = sqrt( (zblk - zpm_zero(k) ) / ( zpm_zero(k) +hprime )) + + umag = max(sqrt(up(k)*up(k) + vp(k)*vp(k)), velmin) + + phiang = atan(vp(k)/umag) +! theta -90/90 + ang = theta - phiang + cang = cos(ang) ; sang = sin(ang) + + who_iz_normal = max(cang, gam*sang ) !gfs-2018 + + cs2 = cang* cang ; ss2 = 1.-cs2 + + rlm97 =(gam * cs2 + ss2)/ (cs2 + gam * ss2) ! ... (cs2 + gam * ss2) / (gam * cs2 + ss2) ! check it +! + if (rlm97 > 2.0 ) rlm97 = 2.0 ! zero mtb-friction at this level +! + + who_iz_normal = bgamm*cs2 + cgamm*ss2 ! LM1997/IFS + + dbtmp = mtb_fix* max(0., 2.- rlm97)*zlen*who_iz_normal + if (dbtmp < 0) dbtmp = 0.0 +! +! several approximation can be made to implement MTB-drag +! as a "nonlinear level dependent"-drag or "constant"-drag +! uds(k) == umag = const between the 1-layer and idxzb +! + + drmtb(k) = dbtmp * abs(umag) ! full mtb-drag = -drmtb(k) * uds = -kr*u + taumtb = taumtb - drmtb(k)*umag *rdi * pmid(k)/tp(k)*(zpi(k+1)-zpi(k)) +! +! 2-wave appr for anisotropic drmtb_Bellipse(k) and drmtb_Aell(k) can be used +! with Umag-projections on A & B ellipse axes +! mtb_fix =0.25*cdmb*sigma/hprime, +! in SM-2000 mtb_fix~ 1/8*[cdmb_A, cdmb_B]*sigma/hprimesum ( A+B) = 1/4. +! +!333 format(i4, 7(2x, F10.3)) +! write(6,333) , k, zpm_zero(k), zblk, hamp*Fcrit_mtb/frd_src, taumtb*1.e3, drmtb(k) , -drmtb(k)*up(k)*1.e5 + enddo +! + endif + endif ! strver=='vay_2018' +! +! +! + if (strver == 'kdn_2005' .or. strver == 'wrf_2018' ) then + + print *, ' kdn_2005 with # of hills ' +! +! compute flow-blocking stress based on WRF 'gwdo2d' +! + endif +! +! + if (strver == 'gfs_2018') then + + ktop = iemax; klow = 2 + + call um_flow(nz, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & + bn2, uhm, vhm, bn2hm, rhohm) + if (bn2hm <= 0.0) RETURN ! unstable PBL +!--------------------------------------------- +! +!'gfs_2018' .... does not rely on Fr_crit +! and Fr-regimes +!----gfs17 for mtn ignores "averaging of the flow" +! for MTB-part it is only works with "angles" +! no projections on [uhm, vhm] -direction +! kpbl can be used for getting high values of iemax-hill +!----------------------------------------------------------- + zpm_zero = zpm - zpi(1) + zpi_zero = zpi - zpi(1) + do k=1, nz-1 + if (zpbl .le. zpm_zero(k+1) .and. (zpbl .ge. zpm_zero(k) ) ) then + kpbl = k+1 + exit + endif + enddo + + do k = iemax, 1, -1 + + uds(k) = max(sqrt(up(k)*up(k) + vp(k)*vp(k)), velmin) + phiang = atan(vp(k)/uds(k)) + ang = theta - phiang + cosang(k) = cos(ang) + sinang(k) = sin(ang) + + if (idxzb == 0) then + pe = pe + bn2(k) * (elvp - zpm(k)) *(zpi(k+1) - zpi(k)) + umf(k) = uds(k) * cosang(k) ! normal to main axis + ek = 0.5 * umf(k) * umf(k) +! +! --- dividing stream lime is found when pe =>exceeds ek first from the "top" +! + if (pe >= ek) idxzb = k + exit + endif + enddo + +! idxzb = min(kpbl, idxzb) +! +! +! +! last: mtb-drag +! + if (idxzb > 1) then + zblk = zpm(idxzb) + print *, zpm(idxzb)*1.e-3, ' mtb-gfs18 block-lev km ', idxzb, iemax, int(elvp) + do k = idxzb-1, 1, -1 +! + zlen = sqrt( (zblk - zpm_zero(k) ) / ( zpm_zero(k) +hprime )) + cs2 = cosang(k)* cosang(k) + ss2 = 1.-cs2 + rlm97 =(gam * cs2 + ss2)/ (cs2 + gam * ss2) ! (cs2 + gam * ss2) / (gam * cs2 + ss2) ! check it + + who_iz_normal = max(cosang(k), gam*sinang(k)) +! +! high res-n higher mtb 0.125 => 3.5 ; (negative of db -- see sign at tendency) +! + dbtmp = mtb_fix* max(0., 2.- rlm97)*zlen*who_iz_normal + + drmtb(k) = dbtmp * abs(uds(k)) ! full mtb-drag = -drmtb(k) * uds = -kr*u +! + taumtb = taumtb - drmtb(k) * uds(k) *rdi * pmid(k)/tp(k)*(zpi(k+1)-zpi(k)) +! + enddo + endif + endif ! strver=='gfs17' +! +! + end subroutine ugwp_drag_mtb +! +! +! ugwp_taub_oro - Computes [taulin, taufrb, drlee(levs) ] +! +! + subroutine ugwp_taub_oro(levs, izb, kxw, tau_izb, fcor, & + hprime , sigma, theta, oc, oa4, clx4, gamm, & + elvp, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, xn, yn, umag, & + tautot, tauogw, taulee, drlee, tau_src, kxridge, kdswj, krefj, kotr) +! + use ugwp_common_v1, only : bnv2min, grav, pi, pi2, dw2min, velmin + use ugwp_common_v1, only : mkz2min, mkzmin + use cires_ugwp_module_v1, only : frcrit, ricrit, linsat + use ugwp_oro_init_v1, only : hpmax, cleff, frmax + use ugwp_oro_init_v1, only : nwdir, mdir, fdir + use ugwp_oro_init_v1, only : efmin, efmax , gmax, cg, ceofrc + use ugwp_oro_init_v1, only : fcrit_sm, fcrit_gfs, frmin, frmax + use ugwp_oro_init_v1, only : coro, nridge, odmin, odmax + use ugwp_oro_init_v1, only : strver +! + use ugwp_oro_init_v1, only : zbr_pi +! --- +! +! define oro-GW fluxes: taulin, taufrb amd if kdswj > 0 (LWB-lee wave breaking) +! approximate for drlee-momentum tendency +! --- + implicit none +! + integer, intent(in) :: levs, izb + real , intent(in) :: tau_izb ! integrated (1:izb) drag -Kr_mtb*U, or Zero + integer, intent(out) :: kdswj, krefj, kotr + integer :: klwb + real, intent(in) :: kxw, fcor + real, intent(in) :: hprime, sigma, theta, oc, gamm, elvp + +! + real, intent(in) :: oa4(4), clx4(4) + + real, dimension(levs), intent(in) :: up, vp, tp, qp, dp + real, dimension(levs+1), intent(in) :: zpi, pint + real, dimension(levs ), intent(in) :: zpm, pmid +! + real,dimension(levs), intent(out) :: drlee + real,dimension(levs+1), intent(out) :: tau_src +! + real, intent(out) :: tauogw, tautot, taulee + real :: taulin, tauhcr, taumtb + real, intent(out) :: xn, yn, umag, kxridge +! +! +! locals +! four possible versions to compute "taubase as a function of Fr-number" +! character :: strver='smc_2000' ! 'kd_2005', 'gfs_2017', 'vay_2018' +! + real, dimension(levs+1) :: zpi_zero + + real :: oa, clx, odir, cl4p(4), clxp + + real :: uhm, vhm, bn2hm, rhohm, bnv + + real :: elvpMTB, wdir + real :: tem, efact, coefm, kxlinv, gfobnv + + real :: fr, frlin, frlin2, frlin3, frlocal, dfr + real :: betamax, betaf, frlwb, frmtb + integer :: klow, ktop, kph + + integer :: i, j, k, nwd, ind4, idir + + real :: sg_ridge, kx2, umd2 + real :: mkz, mkz2, zbr_mkz, mkzi + + real :: hamp ! clipped hprime*elvmax/elv_clip > hprime + real :: hogw ! hprime or hamp for free-prop OGWs z > z(krefj) + real :: hdsw ! empirical like DNS amplitudes for Lee-dsw trapped waves + real :: hcrit + real :: hblk ! blocking div-stream height + + real :: coef_h2, frnorm + + + real, dimension(levs) :: bn2 + real :: rho(levs) + real, dimension(levs+1) :: ui, vi, ti, bn2i, bvi, rhoi + real, dimension(levs+1) :: umd, phmkz + real :: c2f2, umag2, dzwidth, udir + real :: hogwi, hdswi, hogwz, hdswz ! height*height wave-amp + real :: uogwi, udswi, uogwz, udswz ! wind2 wave-rms + real, dimension(levs+1) :: dtrans, deff + real :: pdtrans + logical :: do_klwb_phase = .false. ! phase-crireria for LLWB of SM00 + logical :: do_dtrans = .true. ! dissipative saturation to deposit momentum + ! between ZMTB => ZHILL +!----------------------------------------------------------------------------- +! +! downslope/lee/GW wave regimes kdswj: between ZMTB and ZOGW(krefj) +! ZMTB < ZOGW = ns*HPRIME < ELVP +! define krefj as a level for OGWs above ZMTB and "2-3-4*hprime" + ZMTB +! we rely on the concept of the "CLIPPED-SG" mountain above ZMTB & new +! inverse Froude number for the "mean flow" averaged from ZMTB to ZOGW +! here we can use "elvp" as only for hprime adjustment ...elvp/elvp_MTB +! +!"empirical" specification of tauwave = taulee+tauogw in [ZMTB : ns*HPRIME] +! can be based on numerical runs like WRF-model +! for Frc < Fr< [Frc : 2.5-3 Frc] +! see suggestions proposed in SM-2000 and Eckermann et al. (2010) +!----------------------------------------------------------------------------- + tautot = 0. ; taulin = 0. ; taulee = 0. ; drlee(1:levs) = 0. ; tau_src = 0.0 + krefj = 1 ; kotr = levs+1; kdswj = 1 + xn = 1.0 ; yn = 0. ; umag = velmin; kxridge = kxw + + dtrans = 0. ; deff =0. + klow = 2 + elvpMTB = elvp +! +! clipped mountain H-zmtb for estimating wave-regimes new Fr and MF above ZMTB +! + if (izb > 0 ) then + klow = izb + elvpMTB = max(elvp - zpi(izb), 0.0) + endif + if (elvpMTB <=0 ) print *, ' blocked flow ' + if (elvpMTB <=0 ) return ! "blocked flow" from the surface to elvMAX + + zpi_zero(:) = zpi(:) - zpi(1) + hblk = zpi_zero(klow) + + sg_ridge = max( nridge*hprime * (elvp/elvpMTB), hblk+hprime*0.333) + +! +! enhance sg_ridge by elvp/elvpMTB >1 and H_clip = H-hiilnew - zblk later for hamp +! + sg_ridge = min(sg_ridge, hpmax) + +! print *, 'sg_ridge ', sg_ridge + + do k=1, levs + if (sg_ridge .gt. zpi_zero(k) .and. ( sg_ridge .le. zpi_zero(k+1) ) ) then + ktop = k+1 + exit + endif + enddo + + krefj = ktop ! the mountain top index for sg_ridge = ns*hprime + +! if ( izb > 0 .and. krefj .le. izb) then +! print *, izb, krefj, sg_ridge, zpi_zero(izb), ' izb >ktop ' +! endif + +! +! here ktop displays sg_ridge-position not elvP !!!! klow =2 to avoid for 127-126L +! instability due to extreme "thin" layer...128L-model needs cruder vertical resolution +! + call um_flow(levs, klow, ktop, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & + bn2, uhm, vhm, bn2hm, rhohm) + + call get_unit_vector(uhm, vhm, xn, yn, umag) + + if (bn2hm <= 0.0) RETURN ! "unstable/neutral" hill need different treatment + bnv = sqrt(bn2hm) + hamp = sg_ridge-zpi_zero(klow) ! hamp >= nridge*hprime due higher SG-elevations - zblk or first layer + hogw = hamp + hdsw = hamp + + + fr = bnv * hamp /umag + fr = min(fr, frmax) + kxridge = max(sigma/hamp, kxw) ! to get rid from "SSO-errors" kxw-provides max-value for kx + kx2 = kxridge*kxridge + umag = max( umag, velmin) + c2f2 = fcor*fcor/kx2 + umag2 = umag*umag - c2f2 + + if (umag2 <= 0.0) RETURN ! Coriolis cut-off at high-mid latitudes for low kx + + mkz2 = bn2hm/umag2 - kx2 ! we add Coriolis corrections for crude model resolutions "low-kx" + ! and non-stationary waves coro, fcor for small umag + ! bn2hm/[(coro-umag)^2 -fc2/kx2] - kx2, cf = fc/kx => 2 m/s to 11 m/s for 60deg + IF (mkz2 < mkz2min .or. krefj <= 2 ) THEN +! +! case then no effects of wave-orography +! + krefj = 1 ; kdswj = 1; kotr = levs ; klwb = 1 + tautot = 0. + tauogw = 0. + taulee = 0. + drlee = 0. ; tau_src(1:levs+1) = 0. + return + ENDIF +!========================================================================= +! find orographic asymmetry and convexity :'oa/clx' for clipped SG-hill +! nwd 1 2 3 4 5 6 7 8 +! wd w s sw nw e n ne se +! make sure that SM_00 and KD_05 oro-characteristics can match each other +! OD-KDO5 = Gamma=a/b [0:2] ; hsg = 2.*hprime +! OC-KD05 mount sharpness sigma^4 "height to half-width"[0:1] +! alph-SM00 fraction of h2d contributed to hprime [0:1] +! +! OA-KDO5 OA > dwstream OA=0 sym OA < 0 upstram [-1. 0. 1] +! delt-SM00 dw/up asymmetry -1 < delta < 1 +! Gamma-LM97 anisotropy of the orography g2 =(dh/dx)^2/(dh/dy)^2 +!.. +!A parametrization of low-level wave breaking which includes a dependence on +!the degree of 2-dimensionality of SG; it is active over a finite range of Fr +!========================================================================= + wdir = atan2(uhm,vhm) + pi + idir = mod( int(fdir*wdir),mdir) + 1 + + nwd = nwdir(idir) + ind4 = mod(nwd-1,4) + 1 + if (ind4 < 1 ) ind4 = 1 + if (ind4 > 4 ) ind4 = 4 + + oa = ( 1-2*int( (nwd-1)/4 )) * oa4(ind4) + clx = clx4(ind4) + cl4p(1) = clx4(2) + cl4p(2) = clx4(1) + cl4p(3) = clx4(4) + cl4p(4) = clx4(3) + clxp = cl4p(ind4) + + odir = clxp/max(clx, 1.e-5) ! WRF-based definition for "odir" + + odir = min(odmax, odir) + odir = max(odmin, odir) + + + if (strver == 'smc_2000' .or. strver == 'vay_2018') then +!========================================================================= +! +! thrree-piece def-n for tautot(Fr): 0-Fr_lin - Fr_lee -Fr_mtb +! taulin/tauogw taulee taumtb +! here tau_src(levs+1): approximate wave flux from surface to LLWB +! Following attempts of Scinocca +McFarlane, 2000 & Eckermann etal.(2010) +!========================================================================= +! +! if (mkz2 < 0)... mkzi = sqrt(-mkz2) trapped wave regime don't a case in UGWP-V1 +! wave flux ~ rho_src*kx_src/mkz_src*wind_rms +! bn2, uhm, vhm, bn2hm, rhohm +! +! IF (mkz2.ge. mkz2min .and. krefj > 2 ) THEN +! +! wave regimes +! + mkz = sqrt(mkz2) + frlwb = fcrit_sm ! should be higher than LOGW to get zblk < zlwb + frlin = fcrit_sm + frlin2 = 1.5*fcrit_sm + frlin3 = 3.0*fcrit_sm + + hcrit = fcrit_sm*umag/bnv + hogw = min(hamp, hcrit) + hdsw = min(hamp, frlwb*umag/bnv) ! no trapped-wave solution + + coef_h2 = kxridge * rhohm * bnv * umag + + taulin = coef_h2 * hamp*hamp + tauhcr = coef_h2 * hcrit*hcrit + + IF (fr < frlin ) then + tauogw = taulin + taulee = 0.0 + taumtb = 0.0 + else if (fr .ge. frlin ) then + tauogw = tauhcr + taulin = coef_h2 * hamp*hamp + taumtb = tau_izb ! integrated form MTB +! +! SM-2000 approach for taulee, shall we put limits on BetaMax_max ~ 20 or Betaf ?? +! + frnorm = fr/fcrit_sm ! frnorm below [1.0 to 3.0] + BetaMax = 1.0 + 2.0*OC ! alpha of SM00 or OC-mountain sharphess KD05 OC=[10, 0] + + if ( fr <= frlin2 ) then + Betaf= 2.*BetaMax*(frNorm-1.0) + taulee = (1. + Betaf )*taulin - tauhcr + else if ( (fr > frlin2).and.(fr <= frlin3))then + Betaf=-1.+ 1./frnorm/frnorm + & + (BetaMax + 0.555556)*(2.0 - 0.666*frnorm)* (2.0 - 0.666*frnorm) + taulee = (1. + Betaf )*taulin - tauhcr +!============== +! Eck-2010 WRF-alternatve through Dp_surf = P'*grad(h(x,y)) +! 1 < Fr < 2.5 tauwave = taulee+tauogw = tau_dp*(fr)**(-0.9) +! Fr > 2.5 tauwave = tau_dp*(2.5)**(-0.9) +! to apply it need tabulated Dp(fr, Dlin) Dp=function(Dlin, U, N, h) +! +!============== + else + taulee = 0.0 + hdsw = 0.0 + endif + ENDIF + + tautot = tauogw + taulee + taumtb*0. + + IF (taulee > 0.0 ) THEN + + hdsw = sqrt(tautot/coef_h2) ! averaged value for hdsw - mixture of lee+ogw with mkz/kxridge +! +! compute vertical profile "drlee" with the low-level wave breaking & "locally" trapped waves +! make "empirical" height above elvp that may represent DSW-wave breaking & trapping +! here we will assign tau_sso(z) profile between: zblk(zsurf) - zlwb - ztop_sso = ns*sridge +! + call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & + pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) + + kph = max(izb, 2) ! kph marks the low-level of wave solutions + klwb = kph ! klwb above blocking marks wave-breaking + kotr = levs+1 ! kotr marks mkz2(z) <= 0., reflection level + + if (do_dtrans) pdtrans = log(tautot/tauogw)/(zpi(krefj) - zpi(kph)) + + udir = max(ui(krefj)*xn +vi(krefj)*yn, velmin) + hogwi = hogw*hogw* rhohm/rhoi(krefj) * umag/udir * bnv/bvi(krefj) + umd(krefj) = udir + + udir = max(ui(kph)*xn +vi(kph)*yn, velmin) + hdswi = hdsw*hdsw* rhohm/rhoi(kph) * umag/udir * bnv/bvi(kph) + umd(kph) = udir + ! what we can put between k =[kph:krefj] + phmkz(:) = 0.0 ! + phmkz(kph-1) = fr ! initial Phase of the low-level wave +! +! now transfer tau_layer => tau_level assuming tau_layer = tau_level +! kx*rho_layer*bn_layer*u_layer* HL*HL = kx*rho_top*bn_top*u_top * HT*HT +! apply it for both hdsw & hogw with linear saturation-solver for Cx =0 +! + loop_lwb_otr: do k=kph+1, krefj ! levs + + umd(k) = max(ui(k)*xn +vi(k)*yn, velmin) + umd2 =(coro- umd(k))*(coro- umd(k)) + umd2 = max(umd2, dw2min) -c2f2 + + + if (umd2 <= 0.0) then +! +! critical layer +! + klwb = k + kotr = k + exit loop_lwb_otr + endif + + mkz2 = bn2i(k)/umd2 - kx2 + + if ( mkz2 >= mkz2min ) then +! +! find klwb having some "kinematic" phase "break-down" crireria SM00 or LM97 +! at finest vertical resolution we can meet "abrupt" mkz +! mkzmax = 6.28/(2*dz), mkzmin = 6.28/ztrop=18km +! to regularize SG-solution mkz = max(mkzmax, min(mkz,in, mkz)) +! + mkz = sqrt(mkz2) + hdswz = hdswi* rhoi(k-1)/rhoi(k) * umd(k-1)/umd(k) * bvi(k-1)/bvi(k) + udswz = hdswz *bn2i(k) +!=========================================================================================== +!linsat wave ampl.: mkz*sqrt(hdswz) <= 1.0 or udswz <= linsat2*umd2 +! +! tautot = tausat = rhoi(k) *udswz_sat * kxridge/mkz +! by k = krefj tautot = tauogw(krefj) +!=========================================================================================== + if (do_klwb_phase) then + phmkz(k) = phmkz(k-1) + mkz*(zpm(k)-zpm(k-1)) + if( ( phmkz(k) .ge. zbr_pi).and.(klwb == kph)) then + klwb = min(k, krefj) + exit loop_lwb_otr + endif + endif + else ! mkz2 < mkz2min + kotr = k ! trapped/reflected waves / + exit loop_lwb_otr + endif + enddo loop_lwb_otr +! +! define tau_src(1:zblk:klwb) = sum(tau_oro+tau_dsw+tau_ogw) and define drlee +! tau_trapped ??? +! + if (do_klwb_phase) then + do k=kph, kotr-1 + + if (klwb > kph .and. k < klwb) then + drlee(k) = (tautot -tauogw)/(zpi(kph) - zpi(klwb)) ! negative Ax*rho + tau_src(k) = tautot + (zpi(k) - zpi(klwb))*drlee(k) + drlee(k) = drlee(k)/rho(k) + else if ( k >= klwb .and. k < kotr) then + tau_src(k) = tauogw + drlee(k) = 0.0 + endif + enddo + kdswj = klwb ! assign to the "low-level" wave breaking + endif +! +! simplest exponential transmittance d(tau)/dz = - pdtrans *tau(z) +! more complicated is dissipative saturation pdtrans =/= constant +! + if (do_dtrans) then + do k=kph, krefj + tau_src(k)= tautot*exp(-pdtrans*(zpi(k)-zpi(kph))) + drlee(k) = -tau_src(k)/rho(k) * pdtrans + enddo + endif + + + ENDIF !taulee > 0.0 + + + endif !strver +! + +!========================================================================= + if (strver == 'gfs_2018' .or. strver == 'kd_2005') then +!========================================================================= +! +! orowaves: OGW+DSW/Lee +! + efact = (oa + 2.0) ** (ceofrc*fr) + efact = min( max(efact,efmin), efmax ) + coefm = (1. + clx) ** (oa+1.) + + kxlinv = min (kxw, coefm * cleff) ! does not exceed 42km ~4*dx + kxlinv = coefm * cleff + tem = fr * fr * oc + gfobnv = gmax * tem / ((tem + cg)*bnv) ! g/n0 +!========================================================================= +! source fluxes: taulin, taufrb +!========================================================================= + tautot = kxlinv * rhohm * umag * umag *umag* gfobnv * efact + + coef_h2 = kxlinv *rhohm * bnv*umag + taulin = coef_h2 *hamp*hamp + hcrit = fcrit_gfs*umag/bnv + tauhcr = coef_h2 *hcrit*hcrit + + IF (fr <= fcrit_gfs) then + tauogw = taulin + tautot = taulin + taulee = 0. + drlee(:) = 0. + ELSE !fr > fcrit_gfs + tauogw = tauhcr + taulee = max(tautot - tauogw, 0.0) + if (taulee > 0.0 ) hdsw = sqrt(taulee/coef_h2) +! approximate drlee(k) between [izb, klwb] +! find klwb and decrease taulee(izb) => taulee(klwb) = 0. +! above izb tau + if (mkz2 > mkz2min.and. krefj > 2 .and. taulee > 0.0) then + + mkz = sqrt(mkz2) + call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & + pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) + + kph = max(izb, 2) + phmkz(:) = 0.0 + klwb = max(izb, 1) + kotr = levs+1 + phmkz(kph-1) = fr ! initial Phase of the Lee-OGW + + loop_lwb_gfs18: do k=kph, levs + + umd(k) = max(ui(k)*xn +vi(k)*yn, velmin) + umd2 =(coro- umd(k))*(coro- umd(k)) + umd2 = max(umd2, velmin*velmin) + mkz2 = bn2i(k)/umd2 - kx2 + if ( mkz2 > mkz2min ) then + mkz = sqrt(mkz2) + frlocal = max(hdsw*bvi(k)/umd(k), frlwb) + phmkz(k) = phmkz(k-1) + mkz*(zpm(k)-zpm(k-1)) + if( ( phmkz(k) >= zbr_pi ) .and. (frlocal > frlin)) klwb = k + else + kotr = k + exit loop_lwb_gfs18 + endif + enddo loop_lwb_gfs18 +! +! + do k=kph, kotr-1 + + if (klwb > kph .and. k < klwb) then + drlee(k) = -(tautot -tauogw)/(zpi(kph) - zpi(klwb)) + tau_src(k) = tautot + (zpi(k) - zpi(klwb))*drlee(k) + drlee(k) = drlee(k)/rho(k) + else if ( k >= klwb .and. k < kotr) then + tau_src(k) = tauogw + drlee(k) = 0.0 + endif + enddo + kdswj = klwb ! assign to the "low-level" wave breaking + endif ! mkz2 > mkz2min.and. krefj > 2 .and. taulee > 0.0 + ENDIF !fr > fcrit_gfs + + + ENDIF !strbase='gfs2017' .or. strbase='kd_2005' + + +! output : taulin, taufrb, taulee, xn, yn, umag, kxw/kxridge +! print *, krefj, levs, tauogw, tautot , ' ugwp_taub_oro ' +! + end subroutine ugwp_taub_oro +! +!-------------------------------------- +! +! call ugwp_oro_lsatdis( krefj, levs, tauogw(j), tautot(j), tau_src, kxw, & +! fcor(j), c2f2(j), up, vp, tp, qp, dp, zpm, zpi, pmid1, pint1, & +! xn, yn, umag, drtau, kdis_oro) + + subroutine ugwp_oro_lsatdis( krefj, levs, tauogw, tautot, tau_src, & + kxw, fcor, kxridge, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & + xn, yn, umag, drtau, kdis) + + use ugwp_common_v1, only : bnv2min, grav, pi, pi2, dw2min, velmin, rgrav + use cires_ugwp_module_v1, only : frcrit, ricrit, linsat, hps, rhp1, rhp2 + use cires_ugwp_module_v1, only : kvg, ktg, krad, kion + use ugwp_oro_init_v1, only : coro , fcrit_sm , fcrit_sm2 + implicit none +! + integer, intent(in) :: krefj, levs + real , intent(in) :: tauogw, tautot, kxw + real , intent(in) :: fcor + + real , dimension(levs+1) :: tau_src + + real, dimension(levs) , intent(in) :: up, vp, tp, qp, dp, zpm + real, dimension(levs+1), intent(in) :: zpi, pmid, pint + real , intent(in) :: xn, yn, umag + real , intent(in) :: kxridge + + + real, dimension(levs), intent(out) :: drtau, kdis +! +! locals +! + real :: uref, udir, uf2, ufd, uf2p + real, dimension(levs+1) :: tauz + real, dimension(levs) :: rho + real, dimension(levs+1) :: ui, vi, ti, bn2i, bvi, rhoi + + integer :: i, j, k, kcrit, kref + real :: kx2, kx2w, kxs + real :: mkzm, mkz, dkz, mkz2, ch, kzw3 + real :: wfdM, wfdT, wfiM, wfiT + real :: fdis, mkzi, keff_m, keff_t + real :: betadis, betam, betat, cdfm, cdft + real :: fsat, hsat, hsat2, kds , c2f2 + + drtau(1:levs) = 0.0 + kdis (1:levs) = 0.0 + + ch = coro + + kx2w = kxw*kxw + kx2 = kxridge*kxridge + if( kx2 < kx2w ) kx2 = kx2w + kxs = sqrt(kx2) + c2f2 = fcor*fcor/kx2 +! +! non-hydrostatic LinSatDis for Ch = 0 (with set of horizontal wavenumber kxw) +! +! print *, krefj, levs, tauogw, tautot , ' orolsatdis ' + call mflow_tauz(levs, up, vp, tp, qp, dp, zpm, zpi, & + pmid, pint, rho, ui, vi, ti, bn2i, bvi, rhoi) +!=============================================================================== +! for stationary oro-GWs only "single"-azimuth cd = 0 -(-Udir) = Udir > 0 +! rotational/non-hyrostatic effects are important only for high-res runs +! Udir = 0, Udir < 0 are not +! future"revisions" shear effects for d mkz /dt = -kxw*dU/dz +! horizontal wavelength spectra mkz2 = l2 -kxw(n)*kxw(n) +! stochastic "tauogw'-setup+ sigma_tau ; +! 3D-wave effects 1+ (k/l)^2 and NS vs EW orowaves +! target is to get "multiple"-saturation levels for OGWs +!=============================================================================== + tauz(1:krefj) = tauogw ! constant flux for OGW-packet or single mode + ! sign of tauz > 0...and its attenuate with Z + k = krefj + uref = ui(k)*xn +vi(k)*yn - ch ! stationary waves + uf2 = uref*uref - c2f2 + if (uf2 > 0) then + mkz2 = bn2i(k)/uf2 -kx2 + if (mkz2.gt.0) then + mkzm = sqrt(mkz2) + else + return ! wave reflection mkz2 <=0. + endif + else + return ! wave absorption uf2 <= 0. + endif +! +! upward solver for single "mode" with tauz(levs+1) =0. at the top +! + kds = 0.1* kvg(krefj) ! eddy wave diffusion from the previous layer + kcrit = levs + do k= krefj+1, levs +! +! 2D-wave propagation along reference-wind direction +! udir = 0 critical wind for coro =0 +! cdop = -uref .... upwind waves travel against MF +! + udir = ui(k)*xn +vi(k)*yn + uf2 = udir*udir - c2f2 + + + if (uf2 < dw2min .or. udir <= 0.0) then + kcrit =K + tauz(kcrit:levs) = 0. + exit ! vert-level loop + endif +! +! wave-based solution +! + mkz2 = bn2i(k)/uf2 -kx2 + if (mkz2 > 0) then + mkzm = sqrt(mkz2) +! +! do dissipative flux vs saturation: kvg, ktg, krad, kion +! + kzw3 = mkzm*mkz2 +! + keff_m = kvg(k)*mkz2 + kion(k) +! keff_t = kturb(k)*iPr_turb + kmol(k)*iPr_mol + keff_t = ktg(k)*mkz2 + krad(k) +! +! + uf2p = uf2 + 2.0*c2f2 + betadis = uf2/uf2p + betaM = 1.0 / (1.0+betadis) ! if c2f2 = 0. betaM = betaT =0.5 ekw = epw + betaT = 1.0- BetaM + +! +!imaginary frequencies of momentum and heat with "kds at (k-1) level" +! + wfiM = kds*mkz2 + keff_m + wfiT = kds*mkz2 + keff_t +! + cdfm = sqrt(uf2)*kxs + cdft = abs(udir)*kxs + wfdM = wfiM/cdfm *BetaM + wfdT = wfiT/Cdft *BetaT + mkzi = 2.0*mkzm*(wfdM+wfdT) + + fdis = tauz(k-1)*exp(-mkzi*(zpi(k)-zpi(k-1)) ) + tauz(k) = fdis + hsat2 = fcrit_sm2 * uf2 *bn2i(k) + fsat = rhoi(k)* hsat2 * sqrt(uf2) * bvi(k) + if (fdis > fsat) then + tauz(k) = min(fsat, tauz(k-1)) +!================================================================= +! two definitions for eddy mixing of MF: +! a) wave damping-Lindzen : Ked ~ kx/(2H)*(u-c)^4/N^3 +! b) heat-based turbulence: 4/3 Richardson Ked ~eps^1/3 *Lt^4/3 +!================================================================= + kds = rhp2*kxs*uf2*uf2/bn2i(k)/bvi(k) + kdis(k) = kds + endif + else + tauz(k:levs) = 0. ! wave is reflected above + kds = 0. + endif + enddo + + do k=krefj+1, kcrit + drtau(k) = rgrav*(tauz(k+1)-tauz(k))/dp(k) + enddo +! +! + end subroutine ugwp_oro_lsatdis +! +! + subroutine ugwp_tofd(im, levs, sigflt, elvmax, zpbl, u, v, zmid, & + utofd, vtofd, epstofd, krf_tofd) + use machine , only : kind_phys + use ugwp_common_v1 , only : rcpd2 + use ugwp_oro_init_v1, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd +! + implicit none +! + integer :: im, levs + real(kind_phys), dimension(im, levs) :: u, v, zmid + real(kind_phys), dimension(im) :: sigflt, elvmax, zpbl + real(kind_phys), dimension(im, levs) :: utofd, vtofd, epstofd, krf_tofd +! +! locals +! + integer :: i, k + real :: sgh = 30. + real :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, zexp, krf +! + utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 +! + + do i=1, im + + zdec = max(n_tofd*sigflt(i), zpbl(i)) + zdec = min(ze_tofd, zdec) + rzdec = 1.0/zdec + sgh2 = max(sigflt(i)*sigflt(i), sgh*sgh) + + do k=1, levs + zmet = zmid(i,k) + if (zmet > ztop_tofd) cycle + ekin = u(i,k)*u(i,k) + v(i,k)*v(i,k) + umag = sqrt(ekin) + zarg = zmet*rzdec + zexp = exp(-zarg*sqrt(zarg)) + krf = const_tofd* a12_tofd *sgh2* zmet ** (-1.2) *zexp + utofd(i,k) = -krf*u(i,k) + vtofd(i,k) = -krf*v(i,k) + epstofd(i,k)= rcpd2*krf*ekin ! more accurate heat/mom form using "implicit tend-solver" + ! to update momentum and temp-re + krf_tofd(i,k) = krf + enddo + enddo +! + end subroutine ugwp_tofd +! +! + subroutine ugwp_tofd1d(levs, sigflt, elvmax, zsurf, zpbl, u, v, & + zmid, utofd, vtofd, epstofd, krf_tofd) + use machine , only : kind_phys + use ugwp_common_v1 , only : rcpd2 + use ugwp_oro_init_v1, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd +! + implicit none + integer :: levs + real(kind_phys), dimension(levs) :: u, v, zmid + real(kind_phys) :: sigflt, elvmax, zpbl, zsurf + real(kind_phys), dimension(levs) :: utofd, vtofd, epstofd, krf_tofd +! +! locals +! + integer :: i, k + real :: sghmax = 5. + real :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, ztexp, krf +! + utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 +! + zdec = max(n_tofd*sigflt, zpbl) ! ntimes*sgh_turb or Zpbl + zdec = min(ze_tofd, zdec) ! cannot exceed 18 km + rzdec = 1.0/zdec + sgh2 = max(sigflt*sigflt, sghmax*sghmax) ! 25 meters dz-of the first layer + + do k=1, levs + zmet = zmid(k)-zsurf + if (zmet > ztop_tofd) cycle + ekin = u(k)*u(k) + v(k)*v(k) + umag = sqrt(ekin) + zarg = zmet*rzdec + ztexp = exp(-zarg*sqrt(zarg)) + krf = const_tofd* a12_tofd *sgh2* zmet ** (-1.2) *ztexp + + utofd(k) = -krf*u(k) + vtofd(k) = -krf*v(k) + epstofd(k) = rcpd2*krf*ekin ! more accurate heat/mom form using "implicit tend-solver" + ! to update momentum and temp-re; epstofd(k) can be skipped + krf_tofd(k) = krf + enddo +! + end subroutine ugwp_tofd1d + + +end module cires_vert_orodis_v1 diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index 58872057e..de1b147a9 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -122,6 +122,7 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) + end if else write(errmsg,'(*(a))') "Logic error: cires_ugwp_init called but do_ugwp is false and cdmbgwd(3) <= 0" errflg = 1 @@ -192,6 +193,9 @@ end subroutine unified_ugwp_finalize !! @{ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, & lonr, oro, oro_uf, hprime, nmtvr, oc, theta, sigma, gamma, elvmax, clx, oa4, & + varss,oc1ss,oa4ss,ol4ss,dx,dusfc_ls,dvsfc_ls,dusfc_bl,dvsfc_bl,dusfc_ss, & + dvsfc_ss,dusfc_fd,dvsfc_fd,dtaux2d_ls,dtauy2d_ls,dtaux2d_bl,dtauy2d_bl, & + dtaux2d_ss,dtauy2d_ss,dtaux2d_fd,dtauy2d_fd,br1,hpbl,slmsk, & do_tofd, ldiag_ugwp, cdmbgwd, jdat, xlat, xlat_d, sinlat, coslat, area, & ugrs, vgrs, tgrs, q1, prsi, prsl, prslk, phii, phil, & del, kpbl, dusfcg, dvsfcg, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & @@ -202,7 +206,7 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & ldiag3d, lssav, flag_for_gwd_generic_tend, do_ugwp_v0, do_ugwp_v0_orog_only, & do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, & - do_ugwp_v1_orog_only, errmsg, errflg) + do_ugwp_v1_orog_only, gwd_opt, errmsg, errflg) implicit none @@ -331,8 +335,8 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, kdt,hprime,oc,oa4,clx,varss,oc1ss,oa4ss, & ol4ss,theta,sigma,gamma,elvmax,dtaux2d_ls, & dtauy2d_ls,dtaux2d_bl,dtauy2d_bl,dtaux2d_ss, & - dtauy2d_ss,dtaux2d_fd,dtauy2d_fd,dusfc, & - dvsfc,dusfc_ls,dvsfc_ls,dusfc_bl,dvsfc_bl, & + dtauy2d_ss,dtaux2d_fd,dtauy2d_fd,dusfcg, & + dvsfcg,dusfc_ls,dvsfc_ls,dusfc_bl,dvsfc_bl, & dusfc_ss,dvsfc_ss,dusfc_fd,dvsfc_fd, & slmsk,br1,hpbl,con_g,con_cp,con_rd,con_rv, & con_fvirt,con_pi,lonr, & @@ -363,7 +367,7 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, prslk, zmeti, zmet, dtp, kdt, hprime, oc, oa4, & clx, theta, sigma, gamma, elvmax, & sgh30, DUSFCg, DVSFCg, xlat_d, sinlat, coslat, & - spgrid,cdmbgwd(1:2), me, master, rdxzb, & + area,cdmbgwd(1:2), me, master, rdxzb, & zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & du3dt_mtb, du3dt_ogw, du3dt_tms) From 8f8dd2e8e00145027568e3e34b8bd5dc2fe680ec Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 4 Sep 2020 08:53:05 -0600 Subject: [PATCH 337/404] physics/tracer_sanitizer.meta: add [ccpp-table-properties] section --- physics/tracer_sanitizer.meta | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/physics/tracer_sanitizer.meta b/physics/tracer_sanitizer.meta index 582823fdb..0378911ed 100644 --- a/physics/tracer_sanitizer.meta +++ b/physics/tracer_sanitizer.meta @@ -1,3 +1,10 @@ +[ccpp-table-properties] + name = tracer_sanitizer + type = scheme + dependencies = machine.F + +######################################################################## + [ccpp-arg-table] name = tracer_sanitizer_run type = scheme From a05e096db0c1176140ef49032a71178c4cbe7089 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Fri, 4 Sep 2020 21:43:01 +0000 Subject: [PATCH 338/404] Some progress made but still the model crashes. The changes include: 1. Use the same logic as in GFS_surface_composites_pre_run to define variables: land, icy and wet. 2. Use real stype and vtype that are defined in the INIT step. The land points are initialized now correctly, but the crash happens in the GF scheme presumably over water or ice point. --- physics/module_sf_ruclsm.F90 | 21 ++-- physics/sfc_drv_ruc.F90 | 233 +++++++++++++++++++++++------------ physics/sfc_drv_ruc.meta | 75 +++++++---- 3 files changed, 212 insertions(+), 117 deletions(-) diff --git a/physics/module_sf_ruclsm.F90 b/physics/module_sf_ruclsm.F90 index e02e1edb0..1a7037cf7 100644 --- a/physics/module_sf_ruclsm.F90 +++ b/physics/module_sf_ruclsm.F90 @@ -7075,6 +7075,7 @@ SUBROUTINE RUCLSMINIT( debug_print, frac_grid, land, icy, & errflag = 0 DO j = jts,jtf DO i = its,itf + IF ( ISLTYP( i,j ) .LT. 0 ) THEN errflag = 1 print *, & @@ -7128,23 +7129,23 @@ SUBROUTINE RUCLSMINIT( debug_print, frac_grid, land, icy, & endif ENDDO - elseif(icy(i) .and. .not. frac_grid ) then + elseif( icy(i) .and. .not. frac_grid ) then !-- ice DO L=1,NZS smfr3d(i,l,j)=1. sh2o(i,l,j)=0. mavail(i,j) = 1. ENDDO - endif ! land - !else -!-- for water ISLTYP=14 - ! DO L=1,NZS - ! smfr3d(i,l,j)=0. - ! sh2o(i,l,j)=1. - ! mavail(i,j) = 1. - ! ENDDO - !endif + elseif( .not. frac_grid) then + !-- water ISLTYP=14 + DO L=1,NZS + smfr3d(i,l,j)=0. + sh2o(i,l,j)=1. + mavail(i,j) = 1. + ENDDO + + endif ! land !ENDIF ENDDO diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index db1ad00b4..3b84f6bf9 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -16,6 +16,8 @@ module lsm_ruc public :: lsm_ruc_init, lsm_ruc_run, lsm_ruc_finalize + real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0, epsln = 1.0d-10 + contains !> This subroutine calls set_soilveg_ruc() to specify vegetation and soil parameters for @@ -26,9 +28,10 @@ module lsm_ruc subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & flag_restart, flag_init, & im, lsoil_ruc, lsoil, kice, nlev, & ! in - lsm_ruc, lsm, & ! in - soiltyp, vegtype, frac_grid, land, icy, & ! in - fice, tsfc_lnd, tsfc_wat, tice, & + lsm_ruc, lsm, slmsk, landfrac, & ! in + stype, vtype, frac_grid, & ! in + flag_cice, min_seaice, min_lakeice, & + fice, tsfc_lnd, tsfc_wat, & tg3, smc, slc, stc, & ! in smcref2, smcwlt2, & ! inout sh2o, smfrkeep, tslb, smois, wetness, & ! out @@ -46,19 +49,22 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & integer, intent(in) :: kice integer, intent(in) :: nlev integer, intent(in) :: lsm_ruc, lsm - integer,dimension(im),intent(inout) :: soiltyp, vegtype - logical, dimension(im), intent(in) :: land, icy - real (kind=kind_phys), dimension(im), intent(in ) :: fice + real (kind=kind_phys), dimension(im), intent(in ) :: slmsk + real (kind=kind_phys), dimension(im), intent(in ) :: landfrac + real (kind=kind_phys), dimension(im), intent(in ) :: stype + real (kind=kind_phys), dimension(im), intent(in ) :: vtype + logical, dimension(im), intent(in ) :: flag_cice + real (kind=kind_phys), intent(in ) :: min_lakeice, min_seaice real (kind=kind_phys), dimension(im), intent(in ) :: tsfc_lnd real (kind=kind_phys), dimension(im), intent(in ) :: tsfc_wat - real (kind=kind_phys), dimension(im), intent(in ) :: tice real (kind=kind_phys), dimension(im), intent(in) :: tg3 real (kind=kind_phys), dimension(im,lsoil), intent(in) :: smc,slc,stc ! --- in/out: + real (kind=kind_phys), dimension(im), intent(inout) :: fice real (kind=kind_phys), dimension(im), intent(inout) :: wetness real (kind=kind_phys), dimension(im), intent(inout) :: smcref2, smcwlt2 @@ -73,31 +79,32 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & ! --- local integer :: ipr, i, k logical :: debug_print + logical, dimension(im) :: land, icy, wet + integer, dimension(im) :: soiltyp, vegtype + real (kind=kind_phys), dimension(im) :: frland ! Initialize CCPP error handling variables errmsg = '' errflg = 0 ipr = 10 - debug_print = .true. + debug_print = .false. !> - Call rucinit() to initialize soil/ice/water variables if ( debug_print) then write (0,*) 'RUC LSM initialization' write (0,*) 'lsoil_ruc, lsoil',lsoil_ruc, lsoil - write (0,*) 'noah soil temp',stc(:,1) - write (0,*) 'noah soil mois',smc(:,1) + write (0,*) 'me, isot, ivegsrc, nlunit ',me, isot, ivegsrc, nlunit + write (0,*) 'noah soil temp',stc(ipr,:) write (0,*) 'noah mois(ipr)',ipr,smc(ipr,:) - write (0,*) 'soiltyp=',soiltyp(:) - write (0,*) 'vegtype=',vegtype(:) - write (0,*) 'fice=',fice(:) - write (0,*) 'tice=',tice(:) - write (0,*) 'tsfc_lnd=',tsfc_lnd(:) - write (0,*) 'tsfc_wat=',tsfc_wat(:) - write (0,*) 'tg3=',tg3(:) - write (0,*) 'land=',land(:) - write (0,*) 'icy=',icy(:) + write (0,*) 'stype=',stype(ipr) + write (0,*) 'vtype=',vtype(ipr) + write (0,*) 'fice=',fice(ipr) + write (0,*) 'tsfc_lnd=',tsfc_lnd(ipr) + write (0,*) 'tsfc_wat=',tsfc_wat(ipr) + write (0,*) 'tg3=',tg3(ipr) + write (0,*) 'slmsk=',slmsk(ipr) write (0,*) 'flag_init =',flag_init write (0,*) 'flag_restart =',flag_restart endif @@ -105,13 +112,89 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & !--- initialize soil vegetation call set_soilveg_ruc(me, isot, ivegsrc, nlunit) + soiltyp(:) = 0 + vegtype(:) = 0 + land (:) = .false. + icy (:) = .false. + wet (:) = .false. + + if (frac_grid) then ! fice is ice fraction wrt water area + do i=1,im + frland(i) = landfrac(i) + if (frland(i) > zero) land(i) = .true. + if (frland(i) < one) then + if (flag_cice(i)) then + if (fice(i) >= min_seaice) then + icy(i) = .true. + else + fice(i) = zero + endif + else + if (fice(i) >= min_lakeice) then + icy(i) = .true. + else + fice(i) = zero + endif + endif + if (fice(i) < one ) then + wet(i)=.true. ! some open ocean/lake water exists + end if + else + fice(i) = zero + endif + enddo + + else + + do i = 1, IM + frland(i) = zero + if (slmsk(i) == 0) then + wet(i) = .true. + fice(i) = zero + elseif (slmsk(i) == 1) then + land(i) = .true. + frland(i) = one + fice(i) = zero + else + icy(i) = .true. + if (fice(i) < one) then + wet(i) = .true. + endif + endif + enddo + + endif + + do i = 1, im ! i - horizontal loop + if( land(i) ) then + !-- land + soiltyp(i) = int( stype(i)+0.5 ) + vegtype(i) = int( vtype(i)+0.5 ) + elseif( icy(i) > 0. ) then + !-- ice + if (isot == 1) then + soiltyp(i) = 16 + else + soiltyp(i) = 9 + endif + if (ivegsrc == 1) then + vegtype(i) = 15 + elseif(ivegsrc == 2) then + vegtype(i) = 13 + endif + elseif ( wet(i) ) then + !-- water + if (soiltyp(i) < 1) soiltyp(i) = 14 + if (vegtype(i) < 1) vegtype(i) = 17 + endif + enddo + if( .not. flag_restart) then call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in - me, master, isot, ivegsrc, nlunit, & ! in - lsm_ruc, lsm, & ! in + me, master, lsm_ruc, lsm, slmsk, & ! in frac_grid, land, icy, & ! in soiltyp, vegtype, fice, & ! in - tsfc_lnd, tsfc_wat, tice, tg3, & ! in + tsfc_lnd, tsfc_wat, tg3, & ! in smc, slc, stc, & ! in smcref2, smcwlt2, & ! inout sh2o, smfrkeep, tslb, smois, & ! out @@ -400,6 +483,8 @@ subroutine lsm_ruc_run & ! inputs endif if(flag_init .and. iter==1) then + ! Initialize the RUC soil levels, needed for cold starts and warm starts + CALL init_soil_depth_3 ( zs , dzs , lsoil_ruc ) xlai = 0. endif ! flag_init=.true.,iter=1 @@ -773,7 +858,7 @@ subroutine lsm_ruc_run & ! inputs znt(i,j) = zorl(i)/100. !if(debug_print) then - if(me==0 .and. i==ipr) then + !if(i==ipr) then write (0,*)'before RUC smsoil = ',smsoil(i,:,j), i,j write (0,*)'stsoil = ',stsoil(i,:,j), i,j write (0,*)'soilt = ',soilt(i,j), i,j @@ -849,25 +934,12 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'stsoil(i,:,j)=',i,j,stsoil(i,:,j) write (0,*)'smfrsoil(i,:,j)=',i,j,smfrsoil(i,:,j) write (0,*)'keepfrsoil(i,:,j)=',i,j,keepfrsoil(i,:,j) - write (0,*)'soilm(i,j) =',i,j,soilm(i,j) - write (0,*)'smmax(i,j) =',i,j,smmax(i,j) - write (0,*)'hfx(i,j) =',i,j,hfx(i,j) - write (0,*)'qfx(i,j) =',i,j,qfx(i,j) - write (0,*)'lh(i,j) =',i,j,lh(i,j) - write (0,*)'infiltr(i,j) =',i,j,infiltr(i,j) - write (0,*)'runoff1(i,j) =',i,j,runoff1(i,j) - write (0,*)'runoff2(i,j) =',i,j,runoff2(i,j) write (0,*)'acrunoff(i,j) =',i,j,acrunoff(i,j) - write (0,*)'sfcexc(i,j) =',i,j,sfcexc(i,j) - write (0,*)'acceta(i,j) =',i,j,acceta(i,j) - write (0,*)'ssoil(i,j) =',i,j,ssoil(i,j) - write (0,*)'snfallac(i,j) =',i,j,snfallac(i,j) write (0,*)'acsn(i,j) =',i,j,acsn(i,j) - write (0,*)'snomlt(i,j) =',i,j,snomlt(i,j) write (0,*)'shdmin1d(i,j) =',i,j,shdmin1d(i,j) write (0,*)'shdmax1d(i,j) =',i,j,shdmax1d(i,j) write (0,*)'rdlai2d =',rdlai2d - endif + !endif !endif !> - Call RUC LSM lsmruc(). @@ -906,7 +978,7 @@ subroutine lsm_ruc_run & ! inputs & its,ite, jts,jte, kts,kte ) !if(debug_print) then - if(me==0.and.i==ipr) then + !if(i==ipr) then write (0,*)'after RUC smsoil = ',smsoil(i,:,j), i, j write (0,*)'after sneqv(i,j) =',i,j,sneqv(i,j) write (0,*)'after snowh(i,j) =',i,j,snowh(i,j) @@ -941,7 +1013,7 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'after snfallac(i,j) =',i,j,snfallac(i,j) write (0,*)'after acsn(i,j) =',i,j,acsn(i,j) write (0,*)'after snomlt(i,j) =',i,j,snomlt(i,j) - endif + !endif !endif @@ -1109,11 +1181,10 @@ end subroutine lsm_ruc_run !>\ingroup lsm_ruc_group !! This subroutine contains RUC LSM initialization. subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in - me, master, isot, ivegsrc, nlunit, & ! in - lsm_ruc, lsm, & ! in + me, master, lsm_ruc, lsm, slmsk, & ! in frac_grid, land, icy, & ! in soiltyp, vegtype, fice, & ! in - tskin_lnd, tskin_wat, tice, tg3, & ! !in + tskin_lnd, tskin_wat, tg3, & ! !in smc, slc, stc, & ! in smcref2, smcwlt2, & ! inout sh2o, smfrkeep, tslb, smois, & ! out @@ -1124,14 +1195,13 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in logical, intent(in ) :: restart integer, intent(in ) :: lsm integer, intent(in ) :: lsm_ruc - integer, intent(in ) :: isot - integer, intent(in ) :: ivegsrc, nlunit integer, intent(in ) :: im, nlev integer, intent(in ) :: lsoil_ruc integer, intent(in ) :: lsoil logical, intent(in ) :: frac_grid logical, dimension(im), intent(in ) :: land, icy - real (kind=kind_phys), dimension(im), intent(in ) :: tskin_lnd, tskin_wat, tice + real (kind=kind_phys), dimension(im), intent(in ) :: slmsk + real (kind=kind_phys), dimension(im), intent(in ) :: tskin_lnd, tskin_wat real (kind=kind_phys), dimension(im), intent(inout) :: smcref2 real (kind=kind_phys), dimension(im), intent(inout) :: smcwlt2 real (kind=kind_phys), dimension(im), intent(in ) :: tg3 @@ -1165,7 +1235,6 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in integer , dimension( 1:im , 1:1 ) :: ivgtyp integer , dimension( 1:im , 1:1) :: isltyp real (kind=kind_phys), dimension( 1:im , 1:1 ) :: mavail - real (kind=kind_phys), dimension( 1:im , 1:1 ) :: xice real (kind=kind_phys), dimension( 1:im , 1:1 ) :: sst real (kind=kind_phys), dimension( 1:im , 1:1 ) :: landmask real (kind=kind_phys), dimension( 1:im , 1:1 ) :: tsk @@ -1274,15 +1343,15 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in endif - !if(debug_print) then + if(debug_print) then write (0,*)'smc(ipr,:) ==', ipr, smc(ipr,:) write (0,*)'stc(ipr,:) ==', ipr, stc(ipr,:) - !write (0,*)'vegtype(ipr) ==', ipr, vegtype(ipr) - !write (0,*)'soiltyp(ipr) ==', ipr, soiltyp(ipr) write (0,*)'tskin_lnd(:)=',tskin_lnd(:) write (0,*)'tskin_wat(:)=',tskin_wat(:) + write (0,*)'vegtype(ipr) ==', ipr, vegtype(ipr) + write (0,*)'soiltyp(ipr) ==', ipr, soiltyp(ipr) write (0,*)'its,ite,jts,jte ',its,ite,jts,jte - !endif + endif do j=jts,jte ! @@ -1290,16 +1359,15 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in sst(i,j) = tskin_wat(i) tbot(i,j)= tg3(i) - ! land only version - if (land(i)) then - tsk(i,j) = tskin_lnd(i) ivgtyp(i,j)=vegtype(i) isltyp(i,j)=soiltyp(i) - !ivgtyp(i,j )= 12 - !isltyp(i,j) = 3 + if (land(i) .or. icy(i)) then + !-- land or ice + tsk(i,j) = tskin_lnd(i) landmask(i,j)=1. - xice(i,j)=0. else + !-- water + tsk(i,j) = tskin_wat(i) landmask(i,j)=0. endif ! land(i) @@ -1311,15 +1379,13 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in do j=jts,jte ! do i=its,ite ! i = horizontal loop - if (land(i)) then - st_input(i,1,j)=tsk(i,j) sm_input(i,1,j)=0. do k=1,lsoil st_input(i,k+1,j)=stc(i,k) ! convert volumetric soil moisture to SWI (soil wetness index) - if(swi_init) then + if(land(i) .and. swi_init) then !--- initialize smcwlt2 and smcref2 with Noah values smcref2 (i) = REFSMCnoah(soiltyp(i)) smcwlt2 (i) = WLTSMCnoah(soiltyp(i)) @@ -1334,8 +1400,6 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in sm_input(i,k,j)=0. enddo - endif ! land(i) - enddo ! i - horizontal loop enddo ! jme @@ -1360,17 +1424,21 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in do j=jts,jte do i=its,ite if (land(i)) then - do k=1,lsoil_ruc + do k=1,lsoil_ruc ! convert from SWI to RUC volumetric soil moisture - if(swi_init) then + if(swi_init) then soilm(i,k,j)= dumsm(i,k,j) * & (refsmc(isltyp(i,j))-drysmc(isltyp(i,j))) & + drysmc(isltyp(i,j)) - else - soilm(i,k,j)= dumsm(i,k,j) - endif + else + soilm(i,k,j)= dumsm(i,k,j) + endif soiltemp(i,k,j) = dumt(i,k,j) - enddo + enddo ! k + elseif (icy(i)) then + do k=1,lsoil_ruc + soiltemp(i,k,j) = dumt(i,k,j) + enddo ! k endif ! land(i) enddo enddo @@ -1469,33 +1537,38 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in ! Initialize liquid and frozen soil moisture from total soil moisture ! and soil temperature, and also soil moisture availability in the top ! layer - !call ruclsminit( debug_print, frac_grid, land, icy, & - ! lsoil_ruc, isltyp, ivgtyp, mavail, & - ! soilh2o, smfr, soiltemp, soilm, & - ! ims,ime, jms,jme, kms,kme, & - ! its,ite, jts,jte, kts,kte ) + + call ruclsminit( debug_print, frac_grid, land, icy, & + lsoil_ruc, isltyp, ivgtyp, mavail, & + soilh2o, smfr, soiltemp, soilm, & + ims,ime, jms,jme, kms,kme, & + its,ite, jts,jte, kts,kte ) do j=jts,jte do i=its,ite if (land(i)) then - wetness(i) = soilm(i,1,j)/0.5 - !wetness(i) = mavail(i,j) + wetness(i) = mavail(i,j) do k = 1, lsoil_ruc smois(i,k) = soilm(i,k,j) tslb(i,k) = soiltemp(i,k,j) - sh2o(i,k) = soilm(i,k,j) - smfrkeep(i,k) = soilm(i,k,j) - !sh2o(i,k) = soilh2o(i,k,j) - !smfrkeep(i,k) = smfr(i,k,j) + sh2o(i,k) = soilh2o(i,k,j) + smfrkeep(i,k) = smfr(i,k,j) enddo + elseif (icy(i)) then + wetness (i) = 1. + do k = 1, lsoil_ruc + smois(i,k) = 1. + tslb(i,k) = soiltemp(i,k,j) + sh2o(i,k) = 0. + smfrkeep(i,k) = 1. + enddo endif ! land(i) enddo enddo - ! For non-land points, set RUC LSM fields to input (Noah or RUC) fields if (.not. frac_grid) then do i=1,im - if (.not.land(i)) then + if (.not.land(i) .and. .not.icy(i)) then wetness (i) = 1. do k=1,min(lsoil,lsoil_ruc) smois(i,k) = smc(i,k) diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 730bcd8c0..3441111e5 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -113,20 +113,40 @@ type = integer intent = in optional = F -[soiltyp] - standard_name = soil_type_classification - long_name = soil type at each grid cell +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[landfrac] + standard_name = land_area_fraction + long_name = fraction of horizontal grid area occupied by land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[stype] + standard_name = soil_type_classification_real + long_name = soil type for lsm units = index dimensions = (horizontal_dimension) - type = integer - intent = inout + type = real + kind = kind_phys + intent = in optional = F -[vegtype] - standard_name = vegetation_type_classification - long_name = vegetation type at each grid cell +[vtype] + standard_name = vegetation_type_classification_real + long_name = vegetation type for lsm units = index dimensions = (horizontal_dimension) - type = integer + type = real + kind = kind_phys intent = inout optional = F [frac_grid] @@ -137,20 +157,30 @@ type = logical intent = in optional = F -[land] - standard_name = flag_nonzero_land_surface_fraction - long_name = flag indicating presence of some land surface area fraction +[flag_cice] + standard_name = flag_for_cice + long_name = flag for cice units = flag dimensions = (horizontal_dimension) type = logical intent = in optional = F -[icy] - standard_name = flag_nonzero_sea_ice_surface_fraction - long_name = flag indicating presence of some sea ice surface area fraction - units = flag - dimensions = (horizontal_dimension) - type = logical +[min_seaice] + standard_name = sea_ice_minimum + long_name = minimum sea ice value + units = ??? + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[min_lakeice] + standard_name = lake_ice_minimum + long_name = minimum lake ice value + units = ??? + dimensions = () + type = real + kind = kind_phys intent = in optional = F [fice] @@ -180,15 +210,6 @@ kind = kind_phys intent = inout optional = F -[tice] - standard_name = sea_ice_temperature_interstitial - long_name = sea ice surface skin temperature use as interstitial - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [tg3] standard_name = deep_soil_temperature long_name = deep soil temperature From f868281cb4f8359869eaa11f530a0e081127c125 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Tue, 8 Sep 2020 19:05:17 +0000 Subject: [PATCH 339/404] Removed prints and some clean-up. --- physics/sfc_drv_ruc.F90 | 50 +++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 3b84f6bf9..6debf4522 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -209,7 +209,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & enddo ! i endif ! flag_restart -!-- end of initialization + !-- end of initialization if ( debug_print) then write (0,*) 'ruc soil tslb',tslb(:,1) @@ -857,8 +857,8 @@ subroutine lsm_ruc_run & ! inputs z0(i,j) = zorl(i)/100. znt(i,j) = zorl(i)/100. - !if(debug_print) then - !if(i==ipr) then + if(debug_print) then + if(i==ipr) then write (0,*)'before RUC smsoil = ',smsoil(i,:,j), i,j write (0,*)'stsoil = ',stsoil(i,:,j), i,j write (0,*)'soilt = ',soilt(i,j), i,j @@ -939,8 +939,8 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'shdmin1d(i,j) =',i,j,shdmin1d(i,j) write (0,*)'shdmax1d(i,j) =',i,j,shdmax1d(i,j) write (0,*)'rdlai2d =',rdlai2d - !endif - !endif + endif + endif !> - Call RUC LSM lsmruc(). call lsmruc( delt, flag_init, flag_restart, kdt, iter, nsoil, & @@ -977,8 +977,8 @@ subroutine lsm_ruc_run & ! inputs & ims,ime, jms,jme, kms,kme, & & its,ite, jts,jte, kts,kte ) - !if(debug_print) then - !if(i==ipr) then + if(debug_print) then + if(i==ipr) then write (0,*)'after RUC smsoil = ',smsoil(i,:,j), i, j write (0,*)'after sneqv(i,j) =',i,j,sneqv(i,j) write (0,*)'after snowh(i,j) =',i,j,snowh(i,j) @@ -1013,8 +1013,8 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'after snfallac(i,j) =',i,j,snfallac(i,j) write (0,*)'after acsn(i,j) =',i,j,acsn(i,j) write (0,*)'after snomlt(i,j) =',i,j,snomlt(i,j) - !endif - !endif + endif + endif !> - RUC LSM: prepare variables for return to parent model and unit conversion. @@ -1320,8 +1320,8 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in flag_soil_levels = 1 ! =1 for input from RUC LSM else ! for Noah input set smadj and swi_init to .true. - smadj = .false. - swi_init = .false. + smadj = .true. + swi_init = .true. flag_soil_layers = 1 ! =1 for input from the Noah LSM flag_soil_levels = 0 ! =1 for input from RUC LSM endif @@ -1358,18 +1358,18 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in do i=its,ite ! i = horizontal loop sst(i,j) = tskin_wat(i) - tbot(i,j)= tg3(i) - ivgtyp(i,j)=vegtype(i) - isltyp(i,j)=soiltyp(i) + tbot(i,j) = tg3(i) + ivgtyp(i,j) = vegtype(i) + isltyp(i,j) = soiltyp(i) if (land(i) .or. icy(i)) then !-- land or ice tsk(i,j) = tskin_lnd(i) landmask(i,j)=1. - else - !-- water + else + !-- water tsk(i,j) = tskin_wat(i) landmask(i,j)=0. - endif ! land(i) + endif ! land(i) enddo enddo @@ -1382,13 +1382,19 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in st_input(i,1,j)=tsk(i,j) sm_input(i,1,j)=0. + !--- initialize smcwlt2 and smcref2 with Noah values + if(land(i)) then + smcref2 (i) = REFSMCnoah(soiltyp(i)) + smcwlt2 (i) = WLTSMCnoah(soiltyp(i)) + else + smcref2 (i) = 1. + smcwlt2 (i) = 0. + endif + do k=1,lsoil st_input(i,k+1,j)=stc(i,k) ! convert volumetric soil moisture to SWI (soil wetness index) if(land(i) .and. swi_init) then - !--- initialize smcwlt2 and smcref2 with Noah values - smcref2 (i) = REFSMCnoah(soiltyp(i)) - smcwlt2 (i) = WLTSMCnoah(soiltyp(i)) sm_input(i,k+1,j)=min(1.,max(0.,(smc(i,k) - smcwlt2(i))/ & (smcref2(i) - smcwlt2(i)))) else @@ -1579,14 +1585,14 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in enddo endif ! frac_grid - !if(debug_print) then + if(debug_print) then do i=1,im write (0,*)'End of RUC LSM initialization' write (0,*)'tslb(i)=',i,land(i),icy(i),tslb(i,:) write (0,*)'smois(i)=',i,land(i),icy(i),smois(i,:) write (0,*)'wetness(i)=',i,land(i),icy(i),wetness(i) enddo - !endif ! debug_print + endif ! debug_print end subroutine rucinit From 088fcd4a5436adde3bf6297568f2904b8e65dc71 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Wed, 9 Sep 2020 14:48:45 +0000 Subject: [PATCH 340/404] 1st success -- Sept. 9 --- physics/cires_ugwp_initialize_v1.F90 | 16 +- physics/cires_ugwp_module_v1.F90 | 6 +- physics/unified_ugwp.meta | 332 +++++++++++++-------------- 3 files changed, 177 insertions(+), 177 deletions(-) diff --git a/physics/cires_ugwp_initialize_v1.F90 b/physics/cires_ugwp_initialize_v1.F90 index 174a871d1..ef6c2c7d1 100644 --- a/physics/cires_ugwp_initialize_v1.F90 +++ b/physics/cires_ugwp_initialize_v1.F90 @@ -54,7 +54,7 @@ end module ugwp_common_v1 !Part-1 init => wave dissipation + RFriction ! !=================================================== - subroutine init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) + subroutine init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) use ugwp_common_v1, only : pih @@ -139,10 +139,10 @@ subroutine init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf ! 132 format( 2x, F8.3,' dis-scales:', 4(2x, E10.3)) - end subroutine init_global_gwdis + end subroutine init_global_gwdis_v1 ! ! - subroutine rf_damp_init(levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) + subroutine rf_damp_init_v1(levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) implicit none integer :: levs @@ -172,7 +172,7 @@ subroutine rf_damp_init(levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) endif enddo - end subroutine rf_damp_init + end subroutine rf_damp_init_v1 ! ======================================================================== ! Part 2 - sources ! wave sources @@ -789,11 +789,11 @@ end module ugwp_wmsdis_init_v1 ! DSPDIS (Hines)+ADODIS (Alexander-Dunkerton-Ortland) ! !========================================================================= - subroutine init_dspdis + subroutine init_dspdis_v1 implicit none - end subroutine init_dspdis + end subroutine init_dspdis_v1 - subroutine init_adodis + subroutine init_adodis_v1 implicit none - end subroutine init_adodis + end subroutine init_adodis_v1 diff --git a/physics/cires_ugwp_module_v1.F90 b/physics/cires_ugwp_module_v1.F90 index dc586c6bd..a25854097 100644 --- a/physics/cires_ugwp_module_v1.F90 +++ b/physics/cires_ugwp_module_v1.F90 @@ -302,10 +302,10 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & launch_level = max(k-1, 5) ! above 5-layers from the surface ! -! Part-1 :init_global_gwdis +! Part-1 :init_global_gwdis_v1 ! - call init_global_gwdis(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) - call rf_damp_init (levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) + call init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) + call rf_damp_init_v1 (levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) ! ! Part-2 :init_SOURCES_gws ! diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 5c0eb458b..e45625e9e 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -51,6 +51,12 @@ kind = len=* intent = in optional = F +[jdat] + standard_name = forecast_date_and_time + long_name = current forecast date and time + units = none + dimensions = (8) + type = integer [lonr] standard_name = number_of_equatorial_longitude_points long_name = number of global points in x-dir (i) along the equator @@ -111,12 +117,6 @@ kind = kind_phys intent = in optional = F -[jdat] - standard_name = forecast_date_and_time - long_name = current forecast date and time - units = none - dimensions = (8) - type = integer [cgwf] standard_name = multiplication_factors_for_convective_gravity_wave_drag long_name = multiplication factor for convective GWD @@ -261,14 +261,6 @@ [ccpp-arg-table] name = unified_ugwp_run type = scheme -[do_ugwp] - standard_name = do_ugwp - long_name = flag to activate CIRES UGWP - units = flag - dimensions = () - type = logical - intent = in - optional = F [me] standard_name = mpi_rank long_name = MPI rank of current process @@ -421,6 +413,141 @@ kind = kind_phys intent = inout optional = F +[clx] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height + long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height + units = frac + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[oa4] + standard_name = asymmetry_of_subgrid_orography + long_name = asymmetry of subgrid orography + units = none + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[varss] + standard_name = standard_deviation_of_subgrid_orography_small_scale + long_name = standard deviation of subgrid orography small scale + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[oc1ss] + standard_name = convexity_of_subgrid_orography_small_scale + long_name = convexity of subgrid orography small scale + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[oa4ss] + standard_name = asymmetry_of_subgrid_orography_small_scale + long_name = asymmetry of subgrid orography small scale + units = none + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[ol4ss] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale + long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale + units = frac + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys + intent = in + optional = F +[dx] + standard_name = cell_size + long_name = size of the grid cell + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[dusfc_ls] + standard_name = integrated_x_momentum_flux_from_large_scale_gwd + long_name = integrated x momentum flux from large scale gwd + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc_ls] + standard_name = integrated_y_momentum_flux_from_large_scale_gwd + long_name = integrated y momentum flux from large scale gwd + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dusfc_bl] + standard_name = integrated_x_momentum_flux_from_blocking_drag + long_name = integrated x momentum flux from blocking drag + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc_bl] + standard_name = integrated_y_momentum_flux_from_blocking_drag + long_name = integrated y momentum flux from blocking drag + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dusfc_ss] + standard_name = integrated_x_momentum_flux_from_small_scale_gwd + long_name = integrated x momentum flux from small scale gwd + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc_ss] + standard_name = integrated_y_momentum_flux_from_small_scale_gwd + long_name = integrated y momentum flux from small scale gwd + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dusfc_fd] + standard_name = integrated_x_momentum_flux_from_form_drag + long_name = integrated x momentum flux from form drag + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[dvsfc_fd] + standard_name = integrated_y_momentum_flux_from_form_drag + long_name = integrated y momentum flux from form drag + units = Pa s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [dtaux2d_ls] standard_name = x_momentum_tendency_from_large_scale_gwd long_name = x momentum tendency from large scale gwd @@ -493,60 +620,33 @@ kind = kind_phys intent = out optional = F -[clx] - standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height - units = frac - dimensions = (horizontal_dimension,4) - type = real - kind = kind_phys - intent = in - optional = F -[oa4] - standard_name = asymmetry_of_subgrid_orography - long_name = asymmetry of subgrid orography +[br1] + standard_name = bulk_richardson_number_at_lowest_model_level + long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[varss] - standard_name = standard_deviation_of_subgrid_orography_small_scale - long_name = standard deviation of subgrid orography small scale +[hpbl] + standard_name = atmosphere_boundary_layer_thickness + long_name = PBL thickness units = m dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[oc1ss] - standard_name = convexity_of_subgrid_orography_small_scale - long_name = convexity of subgrid orography small scale - units = none +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F -[oa4ss] - standard_name = asymmetry_of_subgrid_orography_small_scale - long_name = asymmetry of subgrid orography small scale - units = none - dimensions = (horizontal_dimension,4) - type = real - kind = kind_phys - intent = in - optional = F -[ol4ss] - standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale - long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale - units = frac - dimensions = (horizontal_dimension,4) - type = real - kind = kind_phys - intent = in - optional = F [do_tofd] standard_name = turb_oro_form_drag_flag long_name = flag for turbulent orographic form drag @@ -572,6 +672,12 @@ kind = kind_phys intent = in optional = F +[jdat] + standard_name = forecast_date_and_time + long_name = current forecast date and time + units = none + dimensions = (8) + type = integer [xlat] standard_name = latitude long_name = grid latitude @@ -733,105 +839,8 @@ kind = kind_phys intent = out optional = F -[dusfc_ls] - standard_name = integrated_x_momentum_flux_from_large_scale_gwd - long_name = integrated x momentum flux from large scale gwd - units = Pa s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dvsfc_ls] - standard_name = integrated_y_momentum_flux_from_large_scale_gwd - long_name = integrated y momentum flux from large scale gwd - units = Pa s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dusfc_bl] - standard_name = integrated_x_momentum_flux_from_blocking_drag - long_name = integrated x momentum flux from blocking drag - units = Pa s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dvsfc_bl] - standard_name = integrated_y_momentum_flux_from_blocking_drag - long_name = integrated y momentum flux from blocking drag - units = Pa s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dusfc_ss] - standard_name = integrated_x_momentum_flux_from_small_scale_gwd - long_name = integrated x momentum flux from small scale gwd - units = Pa s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dvsfc_ss] - standard_name = integrated_y_momentum_flux_from_small_scale_gwd - long_name = integrated y momentum flux from small scale gwd - units = Pa s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dusfc_fd] - standard_name = integrated_x_momentum_flux_from_form_drag - long_name = integrated x momentum flux from form drag - units = Pa s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[dvsfc_fd] - standard_name = integrated_y_momentum_flux_from_form_drag - long_name = integrated y momentum flux from form drag - units = Pa s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys intent = out optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[br1] - standard_name = bulk_richardson_number_at_lowest_model_level - long_name = bulk Richardson number at the surface - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[hpbl] - standard_name = atmosphere_boundary_layer_thickness - long_name = PBL thickness - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [gw_dudt] standard_name = tendency_of_x_wind_due_to_ugwp long_name = zonal wind tendency due to UGWP @@ -1021,23 +1030,6 @@ kind = kind_phys intent = out optional = F -[dx] - standard_name = cell_size - long_name = size of the grid cell - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[gwd_opt] - standard_name = gwd_opt - long_name = flag to choose gwd scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [con_g] standard_name = gravitational_acceleration long_name = gravitational acceleration @@ -1277,6 +1269,14 @@ type = logical intent = in optional = F +[gwd_opt] + standard_name = gwd_opt + long_name = flag to choose gwd scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 8396ef71276cead582f31c8002a730d2024d9600 Mon Sep 17 00:00:00 2001 From: Xia Sun Date: Wed, 9 Sep 2020 11:45:06 -0600 Subject: [PATCH 341/404] change horizontal_dimension to horizontal_loop_extent in _run section of meta files in ccpp-physics --- physics/GFS_DCNV_generic.meta | 70 ++-- physics/GFS_GWD_generic.meta | 56 ++-- physics/GFS_MP_generic.meta | 128 ++++---- physics/GFS_PBL_generic.meta | 152 ++++----- physics/GFS_SCNV_generic.meta | 60 ++-- physics/GFS_cloud_diagnostics.meta | 22 +- physics/GFS_debug.meta | 36 +- physics/GFS_rrtmg_post.meta | 16 +- physics/GFS_rrtmg_pre.meta | 92 +++--- physics/GFS_rrtmgp_gfdlmp_pre.meta | 46 +-- physics/GFS_rrtmgp_lw_post.meta | 40 +-- physics/GFS_rrtmgp_pre.meta | 34 +- physics/GFS_rrtmgp_sw_post.meta | 70 ++-- physics/GFS_rrtmgp_sw_pre.meta | 64 ++-- physics/GFS_rrtmgp_zhaocarr_pre.meta | 52 +-- physics/GFS_stochastics.meta | 62 ++-- physics/GFS_suite_interstitial.meta | 208 ++++++------ physics/GFS_surface_composites.meta | 364 ++++++++++----------- physics/GFS_surface_generic.meta | 258 +++++++-------- physics/GFS_surface_loop_control.meta | 16 +- physics/cires_ugwp.meta | 116 +++---- physics/cires_ugwp_post.meta | 56 ++-- physics/cnvc90.meta | 20 +- physics/cs_conv.meta | 80 ++--- physics/cs_conv_aw_adj.meta | 20 +- physics/cu_gf_driver.meta | 78 ++--- physics/cu_gf_driver_post.meta | 12 +- physics/cu_gf_driver_pre.meta | 16 +- physics/cu_ntiedtke.meta | 54 +-- physics/cu_ntiedtke_post.meta | 8 +- physics/cu_ntiedtke_pre.meta | 12 +- physics/dcyc2.meta | 96 +++--- physics/drag_suite.meta | 98 +++--- physics/flake_driver.meta | 54 +-- physics/gcm_shoc.meta | 34 +- physics/get_prs_fv3.meta | 26 +- physics/gfdl_cloud_microphys.meta | 58 ++-- physics/gmtb_scm_sfc_flux_spec.meta | 52 +-- physics/gscond.meta | 28 +- physics/gwdc.meta | 78 ++--- physics/gwdps.meta | 50 +-- physics/h2ophys.meta | 6 +- physics/lsm_ruc_sfc_sice_interstitial.meta | 20 +- physics/m_micro.meta | 108 +++--- physics/m_micro_interstitial.meta | 76 ++--- physics/maximum_hourly_diagnostics.meta | 34 +- physics/module_MYJPBL_wrapper.meta | 100 +++--- physics/module_MYJSFC_wrapper.meta | 144 ++++---- physics/module_MYNNPBL_wrapper.meta | 216 ++++++------ physics/module_MYNNSFC_wrapper.meta | 178 +++++----- physics/module_SGSCloud_RadPost.meta | 8 +- physics/module_SGSCloud_RadPre.meta | 56 ++-- physics/moninedmf.meta | 88 ++--- physics/moninedmf_hafs.meta | 80 ++--- physics/moninshoc.meta | 72 ++-- physics/mp_fer_hires.meta | 36 +- physics/mp_thompson.meta | 54 +-- physics/mp_thompson_post.meta | 6 +- physics/mp_thompson_pre.meta | 4 +- physics/ozphys.meta | 18 +- physics/ozphys_2015.meta | 18 +- physics/phys_tend.meta | 70 ++-- physics/precpd.meta | 20 +- physics/radlw_main.meta | 74 ++--- physics/radsw_main.meta | 86 ++--- physics/rascnv.meta | 68 ++-- physics/rayleigh_damp.meta | 20 +- physics/rrtmg_lw_post.meta | 6 +- physics/rrtmg_lw_pre.meta | 4 +- physics/rrtmg_sw_post.meta | 14 +- physics/rrtmg_sw_pre.meta | 16 +- physics/rrtmgp_lw_aerosol_optics.meta | 22 +- physics/rrtmgp_lw_cloud_optics.meta | 28 +- physics/rrtmgp_lw_cloud_sampling.meta | 10 +- physics/rrtmgp_lw_gas_optics.meta | 10 +- physics/rrtmgp_lw_pre.meta | 20 +- physics/rrtmgp_lw_rte.meta | 22 +- physics/rrtmgp_sw_aerosol_optics.meta | 24 +- physics/rrtmgp_sw_cloud_optics.meta | 24 +- physics/rrtmgp_sw_cloud_sampling.meta | 12 +- physics/rrtmgp_sw_gas_optics.meta | 12 +- physics/rrtmgp_sw_rte.meta | 30 +- physics/samfdeepcnv.meta | 68 ++-- physics/samfshalcnv.meta | 42 +-- physics/sascnvn.meta | 64 ++-- physics/satmedmfvdif.meta | 84 ++--- physics/satmedmfvdifq.meta | 88 ++--- physics/sfc_cice.meta | 44 +-- physics/sfc_diag.meta | 36 +- physics/sfc_diag_post.meta | 32 +- physics/sfc_diff.meta | 120 +++---- physics/sfc_drv.meta | 118 +++---- physics/sfc_drv_ruc.meta | 152 ++++----- physics/sfc_noahmp_drv.meta | 204 ++++++------ physics/sfc_nst.meta | 146 ++++----- physics/sfc_ocean.meta | 38 +-- physics/sfc_sice.meta | 70 ++-- physics/shalcnv.meta | 46 +-- physics/shinhongvdif.meta | 64 ++-- physics/ysuvdif.meta | 68 ++-- 100 files changed, 3145 insertions(+), 3145 deletions(-) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index 507643661..c3388c44b 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -59,7 +59,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -68,7 +68,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -77,7 +77,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -86,7 +86,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -95,7 +95,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -104,7 +104,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -113,7 +113,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -122,7 +122,7 @@ standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -131,7 +131,7 @@ standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection long_name = instantaneous moisture tendency due to convection units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -233,7 +233,7 @@ standard_name = lwe_thickness_of_deep_convective_precipitation_amount long_name = deep convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -251,7 +251,7 @@ standard_name = cloud_work_function long_name = cloud work function units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -260,7 +260,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -269,7 +269,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -278,7 +278,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -287,7 +287,7 @@ standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -296,7 +296,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -305,7 +305,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -314,7 +314,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -323,7 +323,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -332,7 +332,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -341,7 +341,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -350,7 +350,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -392,7 +392,7 @@ standard_name = lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep long_name = convective rain at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -401,7 +401,7 @@ standard_name = cumulative_cloud_work_function long_name = cumulative cloud work function (valid only with sas) units = m2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -410,7 +410,7 @@ standard_name = cumulative_change_in_temperature_due_to_deep_convection long_name = cumulative change in temperature due to deep conv. units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -419,7 +419,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection long_name = cumulative change in water vapor specific humidity due to deep conv. units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -428,7 +428,7 @@ standard_name = cumulative_change_in_x_wind_due_to_deep_convection long_name = cumulative change in x wind due to deep convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -437,7 +437,7 @@ standard_name = cumulative_change_in_y_wind_due_to_deep_convection long_name = cumulative change in y wind due to deep convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -446,7 +446,7 @@ standard_name = cumulative_atmosphere_updraft_convective_mass_flux long_name = cumulative updraft mass flux units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -455,7 +455,7 @@ standard_name = cumulative_atmosphere_downdraft_convective_mass_flux long_name = cumulative downdraft mass flux units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -464,7 +464,7 @@ standard_name = cumulative_atmosphere_detrainment_convective_mass_flux long_name = cumulative detrainment mass flux units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -473,7 +473,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -482,7 +482,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -491,7 +491,7 @@ standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -500,7 +500,7 @@ standard_name = convective_cloud_cover_in_phy_f3d long_name = convective cloud cover in the phy_f3d array units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index ed7cd9629..dc7ed7a70 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -35,7 +35,7 @@ standard_name = statistical_measures_of_subgrid_orography long_name = array of statistical measures of subgrid orography units = various - dimensions = (horizontal_dimension,number_of_statistical_measures_of_subgrid_orography) + dimensions = (horizontal_loop_extent,number_of_statistical_measures_of_subgrid_orography) type = real kind = kind_phys intent = in @@ -44,7 +44,7 @@ standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -53,7 +53,7 @@ standard_name = asymmetry_of_subgrid_orography long_name = asymmetry of subgrid orography units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = out @@ -62,7 +62,7 @@ standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height units = frac - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = out @@ -71,7 +71,7 @@ standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with_respect to east of maximum subgrid orographic variations units = degree - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -80,7 +80,7 @@ standard_name = standard_deviation_of_subgrid_orography_small_scale long_name = standard deviation of subgrid orography small scale units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -89,7 +89,7 @@ standard_name = convexity_of_subgrid_orography_small_scale long_name = convexity of subgrid orography small scale units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -98,7 +98,7 @@ standard_name = asymmetry_of_subgrid_orography_small_scale long_name = asymmetry of subgrid orography small scale units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = out @@ -107,7 +107,7 @@ standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale units = frac - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = out @@ -116,7 +116,7 @@ standard_name = slope_of_subgrid_orography long_name = slope of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -125,7 +125,7 @@ standard_name = anisotropy_of_subgrid_orography long_name = anisotropy of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -134,7 +134,7 @@ standard_name = maximum_subgrid_orography long_name = maximum of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -159,7 +159,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -168,7 +168,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -177,7 +177,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -186,7 +186,7 @@ standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in x wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -195,7 +195,7 @@ standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -204,7 +204,7 @@ standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -283,7 +283,7 @@ standard_name = instantaneous_x_stress_due_to_gravity_wave_drag long_name = zonal surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -292,7 +292,7 @@ standard_name = instantaneous_y_stress_due_to_gravity_wave_drag long_name = meridional surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -301,7 +301,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -310,7 +310,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -319,7 +319,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -328,7 +328,7 @@ standard_name = time_integral_of_x_stress_due_to_gravity_wave_drag long_name = integral over time of zonal stress due to gravity wave drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -337,7 +337,7 @@ standard_name = time_integral_of_y_stress_due_to_gravity_wave_drag long_name = integral over time of meridional stress due to gravity wave drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -346,7 +346,7 @@ standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in zonal wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -355,7 +355,7 @@ standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in meridional wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -364,7 +364,7 @@ standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 1850a6759..981f5478d 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -75,7 +75,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -84,7 +84,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -93,7 +93,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -102,7 +102,7 @@ standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -111,7 +111,7 @@ standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -327,7 +327,7 @@ standard_name = lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep long_name = convective rain at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -336,7 +336,7 @@ standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -345,7 +345,7 @@ standard_name = random_number_array long_name = random number array (0-1) units = none - dimensions = (horizontal_dimension,array_dimension_of_random_number) + dimensions = (horizontal_loop_extent,array_dimension_of_random_number) type = real kind = kind_phys intent = in @@ -354,7 +354,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -363,7 +363,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -372,7 +372,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -381,7 +381,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -390,7 +390,7 @@ standard_name = air_pressure long_name = layer mean pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -399,7 +399,7 @@ standard_name = air_pressure_at_interface long_name = pressure at layer interface units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -408,7 +408,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -417,7 +417,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -426,7 +426,7 @@ standard_name = lwe_thickness_of_ice_amount_on_dynamics_timestep long_name = ice fall at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -435,7 +435,7 @@ standard_name = lwe_thickness_of_snow_amount_on_dynamics_timestep long_name = snow fall at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -444,7 +444,7 @@ standard_name = lwe_thickness_of_graupel_amount_on_dynamics_timestep long_name = graupel fall at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -453,7 +453,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -462,7 +462,7 @@ standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -471,7 +471,7 @@ standard_name = lwe_thickness_of_explicit_rain_amount long_name = explicit rain on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -480,7 +480,7 @@ standard_name = lwe_thickness_of_ice_amount long_name = ice fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -489,7 +489,7 @@ standard_name = lwe_thickness_of_snow_amount long_name = snow fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -498,7 +498,7 @@ standard_name = lwe_thickness_of_graupel_amount long_name = graupel fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -507,7 +507,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -516,7 +516,7 @@ standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total rain at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -525,7 +525,7 @@ standard_name = dominant_rain_type long_name = dominant rain type units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -534,7 +534,7 @@ standard_name = dominant_freezing_rain_type long_name = dominant freezing rain type units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -543,7 +543,7 @@ standard_name = dominant_sleet_type long_name = dominant sleet type units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -552,7 +552,7 @@ standard_name = dominant_snow_type long_name = dominant snow type units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -561,7 +561,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -570,7 +570,7 @@ standard_name = flag_for_precipitation_type long_name = snow/rain flag for precipitation units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -579,7 +579,7 @@ standard_name = ratio_of_snowfall_to_rainfall long_name = snow ratio: ratio of snow to total precipitation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -588,7 +588,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount long_name = cumulative convective precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -597,7 +597,7 @@ standard_name = accumulated_lwe_thickness_of_precipitation_amount long_name = accumulated total precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -606,7 +606,7 @@ standard_name = accumulated_lwe_thickness_of_ice_amount long_name = accumulated ice precipitation units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -615,7 +615,7 @@ standard_name = accumulated_lwe_thickness_of_snow_amount long_name = accumulated snow precipitation units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -624,7 +624,7 @@ standard_name = accumulated_lwe_thickness_of_graupel_amount long_name = accumulated graupel precipitation units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -633,7 +633,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket long_name = cumulative convective precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -642,7 +642,7 @@ standard_name = accumulated_lwe_thickness_of_precipitation_amount_in_bucket long_name = accumulated total precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -651,7 +651,7 @@ standard_name = accumulated_lwe_thickness_of_ice_amount_in_bucket long_name = accumulated ice precipitation in bucket units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -660,7 +660,7 @@ standard_name = accumulated_lwe_thickness_of_snow_amount_in_bucket long_name = accumulated snow precipitation in bucket units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -669,7 +669,7 @@ standard_name = accumulated_lwe_thickness_of_graupel_amount_in_bucket long_name = accumulated graupel precipitation in bucket units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -678,7 +678,7 @@ standard_name = cumulative_change_in_temperature_due_to_microphysics long_name = cumulative change in temperature due to microphysics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -687,7 +687,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_microphysics long_name = cumulative change in water vapor specific humidity due to microphysics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -696,7 +696,7 @@ standard_name = lwe_thickness_of_precipitation_amount_for_coupling long_name = total rain precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -705,7 +705,7 @@ standard_name = lwe_thickness_of_convective_precipitation_amount_for_coupling long_name = total convective precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -714,7 +714,7 @@ standard_name = lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -723,7 +723,7 @@ standard_name = column_precipitable_water long_name = precipitable water units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -748,7 +748,7 @@ standard_name = tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step long_name = temp. change due to radiative heating per time step units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -757,7 +757,7 @@ standard_name = tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky long_name = clear sky radiative (shortwave + longwave) heating rate at current time units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -766,7 +766,7 @@ standard_name = tendency_of_lwe_thickness_of_precipitation_amount_for_coupling long_name = change in rain_cpl (coupling_type) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -775,7 +775,7 @@ standard_name = tendency_of_lwe_thickness_of_snow_amount_for_coupling long_name = change in show_cpl (coupling_type) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -808,7 +808,7 @@ standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep long_name = convective_precipitation_amount from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -817,7 +817,7 @@ standard_name = lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep long_name = explicit rainfall from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -826,7 +826,7 @@ standard_name = lwe_thickness_of_ice_amount_from_previous_timestep long_name = ice amount from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -835,7 +835,7 @@ standard_name = lwe_thickness_of_snow_amount_from_previous_timestep long_name = snow amount from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -844,7 +844,7 @@ standard_name = lwe_thickness_of_graupel_amount_from_previous_timestep long_name = graupel amount from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -853,7 +853,7 @@ standard_name = convective_precipitation_rate_from_previous_timestep long_name = convective precipitation rate from previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -862,7 +862,7 @@ standard_name = explicit_rainfall_rate_from_previous_timestep long_name = explicit rainfall rate previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -871,7 +871,7 @@ standard_name = ice_precipitation_rate_from_previous_timestep long_name = ice precipitation rate from previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -880,7 +880,7 @@ standard_name = snow_precipitation_rate_from_previous_timestep long_name = snow precipitation rate from previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -889,7 +889,7 @@ standard_name = graupel_precipitation_rate_from_previous_timestep long_name = graupel precipitation rate from previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 972af4859..5e83b8ad4 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -299,7 +299,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -308,7 +308,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -317,7 +317,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -326,7 +326,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -335,7 +335,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -344,7 +344,7 @@ standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = out @@ -377,7 +377,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -386,7 +386,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -395,7 +395,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -784,7 +784,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in @@ -793,7 +793,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = surface momentum flux in the x-direction valid for current call units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -802,7 +802,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = surface momentum flux in the y-direction valid for current call units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -811,7 +811,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux valid for current call units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -820,7 +820,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux valid for current call units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -838,7 +838,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -847,7 +847,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -856,7 +856,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -865,7 +865,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -874,7 +874,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -883,7 +883,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -892,7 +892,7 @@ standard_name = tendency_of_tracers_due_to_model_physics long_name = updated tendency of the tracers due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -901,7 +901,7 @@ standard_name = cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc u momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -910,7 +910,7 @@ standard_name = cumulative_surface_y_momentum_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc v momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -919,7 +919,7 @@ standard_name = cumulative_surface_upward_sensible_heat_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc sensible heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -928,7 +928,7 @@ standard_name = cumulative_surface_upward_latent_heat_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc latent heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -937,7 +937,7 @@ standard_name = instantaneous_surface_x_momentum_flux_for_coupling long_name = instantaneous sfc u momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -946,7 +946,7 @@ standard_name = instantaneous_surface_y_momentum_flux_for_coupling long_name = instantaneous sfc v momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -955,7 +955,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux_for_coupling long_name = instantaneous sfc sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -964,7 +964,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux_for_coupling long_name = instantaneous sfc latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -973,7 +973,7 @@ standard_name = cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc x momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -982,7 +982,7 @@ standard_name = cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc y momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -991,7 +991,7 @@ standard_name = cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc sensible heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1000,7 +1000,7 @@ standard_name = cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc latent heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1009,7 +1009,7 @@ standard_name = instantaneous_surface_x_momentum_flux_for_diag long_name = instantaneous sfc x momentum flux multiplied by timestep units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1018,7 +1018,7 @@ standard_name = instantaneous_surface_y_momentum_flux_for_diag long_name = instantaneous sfc y momentum flux multiplied by timestep units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1027,7 +1027,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux_for_diag long_name = instantaneous sfc sensible heat flux multiplied by timestep units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1036,7 +1036,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux_for_diag long_name = instantaneous sfc latent heat flux multiplied by timestep units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1045,7 +1045,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1054,7 +1054,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1063,7 +1063,7 @@ standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in x wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1072,7 +1072,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1081,7 +1081,7 @@ standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1090,7 +1090,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1099,7 +1099,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1144,7 +1144,7 @@ standard_name = air_temperature_at_lowest_model_layer_for_diag long_name = layer 1 temperature for diag units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1153,7 +1153,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer_for_diag long_name = layer 1 specific humidity for diag units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1162,7 +1162,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1171,7 +1171,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1180,7 +1180,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux_for_chemistry_coupling long_name = instantaneous upward sensible heat flux for chemistry coupling units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1189,7 +1189,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1198,7 +1198,7 @@ standard_name = flag_for_cice long_name = flag for cice units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -1206,7 +1206,7 @@ standard_name = surface_x_momentum_flux_for_coupling long_name = sfc x momentum flux for coupling units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1215,7 +1215,7 @@ standard_name = surface_y_momentum_flux_for_coupling long_name = sfc y momentum flux for coupling units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1224,7 +1224,7 @@ standard_name = surface_upward_sensible_heat_flux_for_coupling long_name = sfc sensible heat flux for coupling units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1233,7 +1233,7 @@ standard_name = surface_upward_latent_heat_flux_for_coupling long_name = sfc latent heat flux for coupling units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1242,7 +1242,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -1250,7 +1250,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -1258,7 +1258,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -1266,7 +1266,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1275,7 +1275,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1284,7 +1284,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1293,7 +1293,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1302,7 +1302,7 @@ standard_name = x_wind_at_lowest_model_layer long_name = zonal wind at lowest model layer units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1311,7 +1311,7 @@ standard_name = y_wind_at_lowest_model_layer long_name = meridional wind at lowest model layer units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1320,7 +1320,7 @@ standard_name = instantaneous_atmosphere_heat_diffusivity long_name = instantaneous atmospheric heat diffusivity units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1329,7 +1329,7 @@ standard_name = atmosphere_heat_diffusivity long_name = diffusivity for heat units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension_minus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) type = real kind = kind_phys intent = in @@ -1338,7 +1338,7 @@ standard_name = surface_upward_latent_heat_flux_reduction_factor long_name = surface upward latent heat flux reduction factor from canopy heat storage units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1347,7 +1347,7 @@ standard_name = surface_upward_sensible_heat_flux_reduction_factor long_name = surface upward sensible heat flux reduction factor from canopy heat storage units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1356,7 +1356,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1365,7 +1365,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1374,7 +1374,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1383,7 +1383,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -1392,7 +1392,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1401,7 +1401,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1410,7 +1410,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1419,7 +1419,7 @@ standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index 47fd151af..a3122da71 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -43,7 +43,7 @@ standard_name = x_wind_updated_by_physics long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -52,7 +52,7 @@ standard_name = y_wind_updated_by_physics long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -61,7 +61,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -70,7 +70,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -79,7 +79,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -88,7 +88,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -97,7 +97,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -106,7 +106,7 @@ standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -216,7 +216,7 @@ standard_name = x_wind_updated_by_physics long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -225,7 +225,7 @@ standard_name = y_wind_updated_by_physics long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -234,7 +234,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -243,7 +243,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ standard_name = x_wind_save long_name = x-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -261,7 +261,7 @@ standard_name = y_wind_save long_name = y-wind before entering a physics scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -270,7 +270,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -279,7 +279,7 @@ standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -288,7 +288,7 @@ standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection long_name = instantaneous moisture tendency due to convection units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -297,7 +297,7 @@ standard_name = cumulative_change_in_x_wind_due_to_shallow_convection long_name = cumulative change in x wind due to shallow convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -306,7 +306,7 @@ standard_name = cumulative_change_in_y_wind_due_to_shallow_convection long_name = cumulative change in y wind due to shallow convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -315,7 +315,7 @@ standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shal conv. units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -324,7 +324,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection long_name = cumulative change in water vapor specific humidity due to shal conv. units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -333,7 +333,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -350,7 +350,7 @@ standard_name = lwe_thickness_of_shallow_convective_precipitation_amount long_name = shallow convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -383,7 +383,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -392,7 +392,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -401,7 +401,7 @@ standard_name = lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep long_name = convective rain at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -410,7 +410,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount long_name = cumulative convective precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -419,7 +419,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket long_name = cumulative convective precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -428,7 +428,7 @@ standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -437,7 +437,7 @@ standard_name = convective_cloud_cover_in_phy_f3d long_name = convective cloud cover in the phy_f3d array units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index 3778d6036..840b3b21a 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -42,7 +42,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real intent = in kind = kind_phys @@ -51,7 +51,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -60,7 +60,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -69,7 +69,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = out optional = F @@ -86,7 +86,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = out optional = F @@ -94,7 +94,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -103,7 +103,7 @@ standard_name = layer_thickness long_name = layer_thickness units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -112,7 +112,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -121,7 +121,7 @@ standard_name = precip_overlap_param long_name = precipitation overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -139,7 +139,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = out diff --git a/physics/GFS_debug.meta b/physics/GFS_debug.meta index d93e22328..2595da086 100644 --- a/physics/GFS_debug.meta +++ b/physics/GFS_debug.meta @@ -367,7 +367,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -375,7 +375,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -423,7 +423,7 @@ standard_name = soil_type_classification_real long_name = soil type for lsm units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -432,7 +432,7 @@ standard_name = vegetation_type_classification_real long_name = vegetation type for lsm units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -441,7 +441,7 @@ standard_name = surface_slope_classification_real long_name = sfc slope type for lsm units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -450,7 +450,7 @@ standard_name = soil_type_classification long_name = soil type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -458,7 +458,7 @@ standard_name = vegetation_type_classification long_name = vegetation type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -466,7 +466,7 @@ standard_name = surface_slope_classification long_name = surface slope type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -474,7 +474,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -482,7 +482,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -490,7 +490,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -498,7 +498,7 @@ standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating some lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -506,7 +506,7 @@ standard_name = flag_nonzero_ocean_surface_fraction long_name = flag indicating some ocean surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -514,7 +514,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -523,7 +523,7 @@ standard_name = land_area_fraction long_name = fraction of horizontal grid area occupied by land units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -532,7 +532,7 @@ standard_name = lake_area_fraction long_name = fraction of horizontal grid area occupied by lake units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -541,7 +541,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -550,7 +550,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index 43c25ae2e..44cd22d5c 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -59,7 +59,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = in optional = F @@ -124,7 +124,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -133,7 +133,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -142,7 +142,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -150,7 +150,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -158,7 +158,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -167,7 +167,7 @@ standard_name = cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = cloud_optical_depth_layers_at_0p55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index dd1825e08..30b219aaf 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -75,7 +75,7 @@ standard_name = fraction_of_ice_water_cloud long_name = fraction of ice water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -84,7 +84,7 @@ standard_name = fraction_of_rain_water_cloud long_name = fraction of rain water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -93,7 +93,7 @@ standard_name = rime_factor long_name = rime factor units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -111,7 +111,7 @@ standard_name = total_cloud_condensate_mixing_ratio_updated_by_physics long_name = total cloud condensate mixing ratio (except water vapor) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -185,7 +185,7 @@ standard_name = layer_pressure_thickness_for_radiation long_name = layer pressure thickness on radiation levels units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -194,7 +194,7 @@ standard_name = layer_thickness_for_radiation long_name = layer thickness on radiation levels units = km - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -203,7 +203,7 @@ standard_name = air_pressure_at_interface_for_radiation_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -212,7 +212,7 @@ standard_name = air_pressure_at_layer_for_radiation_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -221,7 +221,7 @@ standard_name = air_temperature_at_interface_for_radiation long_name = air temperature at vertical interface for radiation calculation units = K - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -230,7 +230,7 @@ standard_name = air_temperature_at_layer_for_radiation long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -239,7 +239,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -248,7 +248,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -257,7 +257,7 @@ standard_name = water_vapor_specific_humidity_at_layer_for_radiation long_name = water vapor specific humidity at vertical layer for radiation calculation units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -266,7 +266,7 @@ standard_name = ozone_concentration_at_layer_for_radiation long_name = ozone concentration units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -291,7 +291,7 @@ standard_name = volume_mixing_ratio_co2 long_name = CO2 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -300,7 +300,7 @@ standard_name = volume_mixing_ratio_n2o long_name = N2O volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -309,7 +309,7 @@ standard_name = volume_mixing_ratio_ch4 long_name = CH4 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -318,7 +318,7 @@ standard_name = volume_mixing_ratio_o2 long_name = O2 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -327,7 +327,7 @@ standard_name = volume_mixing_ratio_co long_name = CO volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -336,7 +336,7 @@ standard_name = volume_mixing_ratio_cfc11 long_name = CFC11 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -345,7 +345,7 @@ standard_name = volume_mixing_ratio_cfc12 long_name = CFC12 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -354,7 +354,7 @@ standard_name = volume_mixing_ratio_cfc22 long_name = CFC22 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -363,7 +363,7 @@ standard_name = volume_mixing_ratio_ccl4 long_name = CCL4 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -372,7 +372,7 @@ standard_name = volume_mixing_ratio_cfc113 long_name = CFC113 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -381,7 +381,7 @@ standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 long_name = aerosol optical depth for shortwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -390,7 +390,7 @@ standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 long_name = aerosol single scattering albedo for shortwave bands 01-16 units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -399,7 +399,7 @@ standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 long_name = aerosol asymmetry parameter for shortwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -408,7 +408,7 @@ standard_name = aerosol_optical_depth_for_longwave_bands_01_16 long_name = aerosol optical depth for longwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out @@ -417,7 +417,7 @@ standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 long_name = aerosol single scattering albedo for longwave bands 01-16 units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out @@ -426,7 +426,7 @@ standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 long_name = aerosol asymmetry parameter for longwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out @@ -435,7 +435,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = out @@ -444,7 +444,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -453,7 +453,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -462,7 +462,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -471,7 +471,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -480,7 +480,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -489,7 +489,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -498,7 +498,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -507,7 +507,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -516,7 +516,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -525,7 +525,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle,high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = out @@ -534,7 +534,7 @@ standard_name = instantaneous_3d_cloud_fraction long_name = instantaneous 3D cloud fraction for all MPs units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -543,7 +543,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = out optional = F @@ -551,7 +551,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = out optional = F @@ -559,7 +559,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -568,7 +568,7 @@ standard_name = surface_albedo_perturbation long_name = surface albedo perturbation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 7e0797538..7720bdc1d 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -115,7 +115,7 @@ standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -124,7 +124,7 @@ standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -133,7 +133,7 @@ standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -142,7 +142,7 @@ standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -168,7 +168,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real intent = in kind = kind_phys @@ -177,7 +177,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -186,7 +186,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -195,7 +195,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -204,7 +204,7 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -249,7 +249,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -258,7 +258,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -267,7 +267,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -276,7 +276,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -285,7 +285,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -294,7 +294,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -303,7 +303,7 @@ standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -312,7 +312,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -321,7 +321,7 @@ standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -330,7 +330,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -339,7 +339,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -348,7 +348,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -357,7 +357,7 @@ standard_name = precip_overlap_param long_name = precipitation overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -366,7 +366,7 @@ standard_name = layer_thickness long_name = layer_thickness units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index a786da2e8..51a6c4c41 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -60,7 +60,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -69,7 +69,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -87,7 +87,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -96,7 +96,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -105,7 +105,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -114,7 +114,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -132,7 +132,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -141,7 +141,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -150,7 +150,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -158,7 +158,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -166,7 +166,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -175,7 +175,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -184,7 +184,7 @@ standard_name = surface_downwelling_longwave_flux_on_radiation_time_step long_name = total sky sfc downward lw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -193,7 +193,7 @@ standard_name = lw_fluxes_sfc long_name = lw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcflw_type intent = out optional = F @@ -201,7 +201,7 @@ standard_name = surface_midlayer_air_temperature_in_longwave_radiation long_name = surface air temp during lw calculation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -210,7 +210,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -219,7 +219,7 @@ standard_name = lw_fluxes_top_atmosphere long_name = lw radiation fluxes at top units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topflw_type intent = out optional = F @@ -227,7 +227,7 @@ standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = proflw_type intent = out optional = T @@ -235,7 +235,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = longwave clear sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 2e27f46ac..7fa69c0f6 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -134,7 +134,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -143,7 +143,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -152,7 +152,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -161,7 +161,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -170,7 +170,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -179,7 +179,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -188,7 +188,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -197,7 +197,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -260,7 +260,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -269,7 +269,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -278,7 +278,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -287,7 +287,7 @@ standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature at vertical interface for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -296,7 +296,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -305,7 +305,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -314,7 +314,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -323,7 +323,7 @@ standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -332,7 +332,7 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 128e66fac..0610537fd 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -36,7 +36,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -77,7 +77,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -86,7 +86,7 @@ standard_name = daytime_mean_cosz_over_rad_call_period long_name = daytime mean cosz over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -95,7 +95,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -104,7 +104,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -113,7 +113,7 @@ standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -122,7 +122,7 @@ standard_name = surface_albedo_nearIR_diffuse long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -131,7 +131,7 @@ standard_name = surface_albedo_uvvis_dir long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -140,7 +140,7 @@ standard_name = surface_albedo_uvvis_dif long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -149,7 +149,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -158,7 +158,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -167,7 +167,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -203,7 +203,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -212,7 +212,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -220,7 +220,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -228,7 +228,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -237,7 +237,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -254,7 +254,7 @@ standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -263,7 +263,7 @@ standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -272,7 +272,7 @@ standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -281,7 +281,7 @@ standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -290,7 +290,7 @@ standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -299,7 +299,7 @@ standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -308,7 +308,7 @@ standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -317,7 +317,7 @@ standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -326,7 +326,7 @@ standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc netsw flx into ground units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -335,7 +335,7 @@ standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -344,7 +344,7 @@ standard_name = sw_fluxes_sfc long_name = sw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcfsw_type intent = out optional = F @@ -352,7 +352,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -361,7 +361,7 @@ standard_name = sw_fluxes_top_atmosphere long_name = sw radiation fluxes at toa units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topfsw_type intent = out optional = F @@ -369,7 +369,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky sw heating rates units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -378,7 +378,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = in optional = T @@ -386,7 +386,7 @@ standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_plus_one) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_plus_one) type = profsw_type intent = out optional = T diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 81ed3137e..91e875c00 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -86,7 +86,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -95,7 +95,7 @@ standard_name = cosine_of_latitude long_name = cosine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -104,7 +104,7 @@ standard_name = sine_of_latitude long_name = sine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -113,7 +113,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -122,7 +122,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -131,7 +131,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -140,7 +140,7 @@ standard_name = upper_bound_on_max_albedo_over_deep_snow long_name = maximum snow albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -149,7 +149,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -158,7 +158,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -167,7 +167,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = mean_vis_albedo_with_strong_cosz_dependency long_name = mean vis albedo with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = mean_nir_albedo_with_strong_cosz_dependency long_name = mean nir albedo with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = mean_vis_albedo_with_weak_cosz_dependency long_name = mean vis albedo with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -203,7 +203,7 @@ standard_name = mean_nir_albedo_with_weak_cosz_dependency long_name = mean nir albedo with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -212,7 +212,7 @@ standard_name =fractional_coverage_with_strong_cosz_dependency long_name = fractional coverage with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -221,7 +221,7 @@ standard_name = fractional_coverage_with_weak_cosz_dependency long_name = fractional coverage with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -230,7 +230,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -239,7 +239,7 @@ standard_name = sea_ice_temperature long_name = sea ice surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -248,7 +248,7 @@ standard_name = weights_for_stochastic_surface_physics_perturbation long_name = weights for stochastic surface physics perturbation units = none - dimensions = (horizontal_dimension,number_of_surface_perturbations) + dimensions = (horizontal_loop_extent,number_of_surface_perturbations) type = real kind = kind_phys intent = in @@ -257,7 +257,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -266,7 +266,7 @@ standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -275,7 +275,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -284,7 +284,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -301,7 +301,7 @@ standard_name = surface_albedo_perturbation long_name = surface albedo perturbation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -310,7 +310,7 @@ standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -319,7 +319,7 @@ standard_name = surface_albedo_nearIR_diffuse long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -328,7 +328,7 @@ standard_name = surface_albedo_uvvis_dir long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -337,7 +337,7 @@ standard_name = surface_albedo_uvvis_dif long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -354,7 +354,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -362,7 +362,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -371,7 +371,7 @@ standard_name = daytime_mean_cosz_over_rad_call_period long_name = daytime mean cosz over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -380,7 +380,7 @@ standard_name = surface_diffused_shortwave_albedo long_name = mean surface diffused sw albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta index 11aac8437..06bff5eb1 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.meta +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -91,7 +91,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real intent = in kind = kind_phys @@ -99,7 +99,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -108,7 +108,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -117,7 +117,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -126,7 +126,7 @@ standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -144,7 +144,7 @@ standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -153,7 +153,7 @@ standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -162,7 +162,7 @@ standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -171,7 +171,7 @@ standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -180,7 +180,7 @@ standard_name = subgrid_scale_cloud_fraction_from_shoc long_name = subgrid-scale cloud fraction from the SHOC scheme units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -189,7 +189,7 @@ standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -198,7 +198,7 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -207,7 +207,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -288,7 +288,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -297,7 +297,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -306,7 +306,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -315,7 +315,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -324,7 +324,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -333,7 +333,7 @@ standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -342,7 +342,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -351,7 +351,7 @@ standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -360,7 +360,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -369,7 +369,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -378,7 +378,7 @@ standard_name = layer_thickness long_name = layer_thickness units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -387,7 +387,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index c729a3980..43c7b2d42 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -83,7 +83,7 @@ standard_name = cellular_automata_global_pattern long_name = cellular automata global pattern units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -110,7 +110,7 @@ standard_name = level_of_dividing_streamline long_name = level of the dividing streamline units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -119,7 +119,7 @@ standard_name = weights_for_stochastic_sppt_perturbation long_name = weights for stochastic sppt perturbation units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -128,7 +128,7 @@ standard_name = weights_for_stochastic_skeb_perturbation_of_x_wind long_name = weights for stochastic skeb perturbation of x wind units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -137,7 +137,7 @@ standard_name = weights_for_stochastic_skeb_perturbation_of_y_wind long_name = weights for stochastic skeb perturbation of y wind units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -146,7 +146,7 @@ standard_name = weights_for_stochastic_shum_perturbation long_name = weights for stochastic shum perturbation units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -155,7 +155,7 @@ standard_name = weights_for_stochastic_sppt_perturbation_flipped long_name = weights for stochastic sppt perturbation, flipped units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -164,7 +164,7 @@ standard_name = weights_for_stochastic_skeb_perturbation_of_x_wind_flipped long_name = weights for stochastic skeb perturbation of x wind, flipped units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -173,7 +173,7 @@ standard_name = weights_for_stochastic_skeb_perturbation_of_y_wind_flipped long_name = weights for stochastic skeb perturbation of y wind, flipped units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -182,7 +182,7 @@ standard_name = weights_for_stochastic_shum_perturbation_flipped long_name = weights for stochastic shum perturbation, flipped units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -191,7 +191,7 @@ standard_name = dissipation_estimate_of_air_temperature_at_model_layers long_name = dissipation estimate model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -200,7 +200,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -209,7 +209,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -218,7 +218,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -227,7 +227,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -236,7 +236,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -245,7 +245,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -254,7 +254,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -263,7 +263,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -272,7 +272,7 @@ standard_name = tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step long_name = temp. change due to radiative heating per time step units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -281,7 +281,7 @@ standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total rain at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -290,7 +290,7 @@ standard_name = lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep long_name = convective rain at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -299,7 +299,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -308,7 +308,7 @@ standard_name = accumulated_lwe_thickness_of_precipitation_amount long_name = accumulated total precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -317,7 +317,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount long_name = cumulative convective precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -326,7 +326,7 @@ standard_name = accumulated_lwe_thickness_of_precipitation_amount_in_bucket long_name = accumulated total precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -335,7 +335,7 @@ standard_name = cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket long_name = cumulative convective precipitation in bucket units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -352,7 +352,7 @@ standard_name = lwe_thickness_of_precipitation_amount_for_coupling long_name = total rain precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -361,7 +361,7 @@ standard_name = lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -370,7 +370,7 @@ standard_name = tendency_of_lwe_thickness_of_precipitation_amount_for_coupling long_name = change in rain_cpl (coupling_type) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -379,7 +379,7 @@ standard_name = tendency_of_lwe_thickness_of_snow_amount_for_coupling long_name = change in show_cpl (coupling_type) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index 823874a0d..1e8849251 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -141,7 +141,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -150,7 +150,7 @@ standard_name = cell_area long_name = area of the grid cell units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -177,7 +177,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -186,7 +186,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -194,7 +194,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes long_name = grid size related coefficient used in scale-sensitive schemes units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -203,7 +203,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes_complement long_name = complement to work1 units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -212,7 +212,7 @@ standard_name = surface_air_pressure_diag long_name = surface air pressure diagnostic units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -221,7 +221,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -230,7 +230,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -239,7 +239,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -248,7 +248,7 @@ standard_name = tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky long_name = clear sky radiative (shortwave + longwave) heating rate at current time units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -257,7 +257,7 @@ standard_name = tendency_of_tracers_due_to_model_physics long_name = updated tendency of the tracers units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = out @@ -342,7 +342,7 @@ standard_name = flag_for_cice long_name = flag for cice units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -407,7 +407,7 @@ standard_name = instantaneous_cosine_of_zenith_angle long_name = cosine of zenith angle at current time units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -416,7 +416,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -425,7 +425,7 @@ standard_name = surface_downwelling_longwave_flux long_name = surface downwelling longwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -434,7 +434,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -443,7 +443,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -452,7 +452,7 @@ standard_name = surface_upwelling_longwave_flux_for_coupling long_name = surface upwelling longwave flux for coupling units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -461,7 +461,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_for_idea long_name = idea sky lw heating rates units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,6) + dimensions = (horizontal_loop_extent,vertical_dimension,6) type = real kind = kind_phys intent = in @@ -470,7 +470,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -479,7 +479,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -488,7 +488,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave fluxes units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -506,7 +506,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes long_name = grid size related coefficient used in scale-sensitive schemes units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -515,7 +515,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes_complement long_name = complement to work1 units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -524,7 +524,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -533,7 +533,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -542,7 +542,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -551,7 +551,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -560,7 +560,7 @@ standard_name = cloud_condensed_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -587,7 +587,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -596,7 +596,7 @@ standard_name = duration_of_sunshine long_name = sunshine duration time units = s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -605,7 +605,7 @@ standard_name = surface_upwelling_longwave_flux long_name = surface upwelling longwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -614,7 +614,7 @@ standard_name = surface_upwelling_longwave_flux_over_land_interstitial long_name = surface upwelling longwave flux at current time over land (temporary use as interstitial) units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -623,7 +623,7 @@ standard_name = surface_upwelling_longwave_flux_over_ice_interstitial long_name = surface upwelling longwave flux at current time over ice (temporary use as interstitial) units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -632,7 +632,7 @@ standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -641,7 +641,7 @@ standard_name = cumulative_surface_downwelling_longwave_flux_multiplied_by_timestep long_name = cumulative surface downwelling LW flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -650,7 +650,7 @@ standard_name = cumulative_surface_upwelling_longwave_flux_multiplied_by_timestep long_name = cumulative surface upwelling LW flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -659,7 +659,7 @@ standard_name = cumulative_surface_pressure_multiplied_by_timestep long_name = cumulative surface pressure multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -668,7 +668,7 @@ standard_name = cumulative_change_in_temperature_due_to_longwave_radiation long_name = cumulative change in temperature due to longwave radiation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -677,7 +677,7 @@ standard_name = cumulative_change_in_temperature_due_to_shortwave_radiation long_name = cumulative change in temperature due to shortwave radiation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -686,7 +686,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -695,7 +695,7 @@ standard_name = cumulative_change_in_temperature_due_to_deep_convection long_name = cumulative change in temperature due to deep conv. units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -704,7 +704,7 @@ standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shal conv. units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -713,7 +713,7 @@ standard_name = cumulative_change_in_temperature_due_to_microphysics long_name = cumulative change in temperature due to microphysics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -722,7 +722,7 @@ standard_name = grid_sensitive_critical_cloud_top_entrainment_instability_criteria long_name = grid sensitive critical cloud top entrainment instability criteria units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -731,7 +731,7 @@ standard_name = cloud_top_entrainment_instability_value long_name = cloud top entrainment instability value units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -740,7 +740,7 @@ standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -748,7 +748,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -756,7 +756,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -764,7 +764,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -772,7 +772,7 @@ standard_name = land_area_fraction_for_microphysics long_name = land area fraction used in microphysics schemes units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -798,7 +798,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = air temperature at lowest model layer units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -807,7 +807,7 @@ standard_name = surface_skin_temperature_at_previous_time_step long_name = surface skin temperature at previous time step units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -816,7 +816,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -825,7 +825,7 @@ standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward long_name = RRTMGP Jacobian upward longwave flux profile units = W m-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -886,7 +886,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -895,7 +895,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -904,7 +904,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -913,7 +913,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -922,7 +922,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -931,7 +931,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -940,7 +940,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -949,7 +949,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = out @@ -1019,7 +1019,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1028,7 +1028,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1037,7 +1037,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1046,7 +1046,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -1055,7 +1055,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1064,7 +1064,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1073,7 +1073,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1082,7 +1082,7 @@ standard_name = tendency_of_tracers_due_to_model_physics long_name = updated tendency of the tracers units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -1091,7 +1091,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1100,7 +1100,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1109,7 +1109,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1118,7 +1118,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = out @@ -1299,7 +1299,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1308,7 +1308,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1317,7 +1317,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1326,7 +1326,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -1399,7 +1399,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -1408,7 +1408,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1417,7 +1417,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1462,7 +1462,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -1470,7 +1470,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes long_name = grid size related coefficient used in scale-sensitive schemes units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1479,7 +1479,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes_complement long_name = complement to work1 units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1488,7 +1488,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = vertical index at top atmospheric boundary layer units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -1496,7 +1496,7 @@ standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -1520,7 +1520,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -1529,7 +1529,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1538,7 +1538,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1547,7 +1547,7 @@ standard_name = ice_water_mixing_ratio_save long_name = cloud ice water mixing ratio before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1556,7 +1556,7 @@ standard_name = air_temperature_save_from_convective_parameterization long_name = air temperature after cumulus parameterization units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1786,7 +1786,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1795,7 +1795,7 @@ standard_name = ice_water_mixing_ratio_save long_name = cloud ice water mixing ratio before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1813,7 +1813,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -1822,7 +1822,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -1831,7 +1831,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1840,7 +1840,7 @@ standard_name = air_temperature_save_from_convective_parameterization long_name = air temperature after cumulus parameterization units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1858,7 +1858,7 @@ standard_name = water_friendly_aerosol_number_concentration long_name = number concentration of water-friendly aerosols units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1867,7 +1867,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1876,7 +1876,7 @@ standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection long_name = instantaneous moisture tendency due to convection units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1961,7 +1961,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -1970,7 +1970,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index e3c46d20e..71765b9a2 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -35,7 +35,7 @@ standard_name = flag_for_cice long_name = flag for cice units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -59,7 +59,7 @@ standard_name = land_area_fraction long_name = fraction of horizontal grid area occupied by land units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -68,7 +68,7 @@ standard_name = lake_area_fraction long_name = fraction of horizontal grid area occupied by lake units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -77,7 +77,7 @@ standard_name = lake_depth long_name = lake depth units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -86,7 +86,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -95,7 +95,7 @@ standard_name = land_area_fraction_for_microphysics long_name = land area fraction used in microphysics schemes units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -104,7 +104,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -112,7 +112,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -120,7 +120,7 @@ standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -128,7 +128,7 @@ standard_name = flag_nonzero_ocean_surface_fraction long_name = flag indicating presence of some ocean surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -136,7 +136,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -144,7 +144,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -162,7 +162,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -171,7 +171,7 @@ standard_name = surface_roughness_length_over_ocean long_name = surface roughness length over ocean units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -180,7 +180,7 @@ standard_name = surface_roughness_length_over_land long_name = surface roughness length over land units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -189,7 +189,7 @@ standard_name = surface_roughness_length_over_ice long_name = surface roughness length over ice units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -198,7 +198,7 @@ standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -207,7 +207,7 @@ standard_name = surface_roughness_length_over_land_interstitial long_name = surface roughness length over land (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -216,7 +216,7 @@ standard_name = surface_roughness_length_over_ice_interstitial long_name = surface roughness length over ice (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -225,7 +225,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -234,7 +234,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ocean long_name = water equivalent snow depth over ocean units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -243,7 +243,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -252,7 +252,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -261,7 +261,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -270,7 +270,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean long_name = total precipitation amount in each time step over ocean units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -279,7 +279,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land long_name = total precipitation amount in each time step over land units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -288,7 +288,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice long_name = total precipitation amount in each time step over ice units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -297,7 +297,7 @@ standard_name = surface_friction_velocity long_name = boundary layer parameter units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -306,7 +306,7 @@ standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -315,7 +315,7 @@ standard_name = surface_friction_velocity_over_land long_name = surface friction velocity over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -324,7 +324,7 @@ standard_name = surface_friction_velocity_over_ice long_name = surface friction velocity over ice units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -333,7 +333,7 @@ standard_name = water_equivalent_accumulated_snow_depth long_name = water equiv of acc snow depth over land and sea ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -342,7 +342,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_ocean long_name = water equiv of acc snow depth over ocean units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -351,7 +351,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_land long_name = water equiv of acc snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -360,7 +360,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_ice long_name = water equiv of acc snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -369,7 +369,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ice long_name = surface upward potential latent heat flux over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -378,7 +378,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -387,7 +387,7 @@ standard_name = sea_surface_temperature long_name = sea surface temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -396,7 +396,7 @@ standard_name = surface_skin_temperature_over_land long_name = surface skin temperature over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -405,7 +405,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -414,7 +414,7 @@ standard_name = surface_skin_temperature_over_land_interstitial long_name = surface skin temperature over land (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -423,7 +423,7 @@ standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -432,7 +432,7 @@ standard_name = sea_ice_temperature long_name = sea ice surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -441,7 +441,7 @@ standard_name = sea_ice_temperature_interstitial long_name = sea ice surface skin temperature use as interstitial units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -450,7 +450,7 @@ standard_name = surface_skin_temperature_after_iteration long_name = surface skin temperature after iteration units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -459,7 +459,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -468,7 +468,7 @@ standard_name = surface_skin_temperature_after_iteration_over_land long_name = surface skin temperature after iteration over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -477,7 +477,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ice long_name = surface skin temperature after iteration over ice units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -486,7 +486,7 @@ standard_name = upward_heat_flux_in_soil_over_ice long_name = soil heat flux over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -504,7 +504,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -512,7 +512,7 @@ standard_name = surface_longwave_emissivity long_name = surface lw emissivity in fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -521,7 +521,7 @@ standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -530,7 +530,7 @@ standard_name = surface_longwave_emissivity_over_land_interstitial long_name = surface lw emissivity in fraction over land (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -539,7 +539,7 @@ standard_name = surface_longwave_emissivity_over_ice_interstitial long_name = surface lw emissivity in fraction over ice (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -548,7 +548,7 @@ standard_name = surface_specific_humidity long_name = surface air saturation specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -557,7 +557,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -566,7 +566,7 @@ standard_name = surface_specific_humidity_over_land long_name = surface air saturation specific humidity over land units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -575,7 +575,7 @@ standard_name = surface_specific_humidity_over_ice long_name = surface air saturation specific humidity over ice units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -584,7 +584,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -593,7 +593,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -602,7 +602,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_land long_name = kinematic surface upward sensible heat flux over land units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -611,7 +611,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice long_name = kinematic surface upward sensible heat flux over ice units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -674,7 +674,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -682,7 +682,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -690,7 +690,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -698,7 +698,7 @@ standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -707,7 +707,7 @@ standard_name = surface_longwave_emissivity_over_land_interstitial long_name = surface lw emissivity in fraction over land (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -716,7 +716,7 @@ standard_name = surface_longwave_emissivity_over_ice_interstitial long_name = surface lw emissivity in fraction over ice (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -725,7 +725,7 @@ standard_name = surface_downwelling_longwave_flux long_name = surface downwelling longwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -734,7 +734,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_land long_name = total sky surface downward longwave flux absorbed by the ground over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -743,7 +743,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ice long_name = total sky surface downward longwave flux absorbed by the ground over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -752,7 +752,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean long_name = total sky surface downward longwave flux absorbed by the ground over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -761,7 +761,7 @@ standard_name = surface_upwelling_shortwave_flux long_name = surface upwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -770,7 +770,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -779,7 +779,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = surface net downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -864,7 +864,7 @@ standard_name = flag_for_cice long_name = flag for cice units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -872,7 +872,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -880,7 +880,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -888,7 +888,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -896,7 +896,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -904,7 +904,7 @@ standard_name = land_area_fraction long_name = fraction of horizontal grid area occupied by land units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -913,7 +913,7 @@ standard_name = lake_area_fraction long_name = fraction of horizontal grid area occupied by lake units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -922,7 +922,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -931,7 +931,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -940,7 +940,7 @@ standard_name = surface_roughness_length_over_ocean long_name = surface roughness length over ocean units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -949,7 +949,7 @@ standard_name = surface_roughness_length_over_land long_name = surface roughness length over land units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -958,7 +958,7 @@ standard_name = surface_roughness_length_over_ice long_name = surface roughness length over ice units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -967,7 +967,7 @@ standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -976,7 +976,7 @@ standard_name = surface_roughness_length_over_land_interstitial long_name = surface roughness length over land (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -985,7 +985,7 @@ standard_name = surface_roughness_length_over_ice_interstitial long_name = surface roughness length over ice (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -994,7 +994,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air long_name = surface exchange coeff for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1003,7 +1003,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1012,7 +1012,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_land long_name = surface exchange coeff for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1021,7 +1021,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice long_name = surface exchange coeff for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1030,7 +1030,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air long_name = surface exchange coeff heat & moisture units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1039,7 +1039,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1048,7 +1048,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land long_name = surface exchange coeff heat & moisture over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1057,7 +1057,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice long_name = surface exchange coeff heat & moisture over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1066,7 +1066,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1075,7 +1075,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean long_name = bulk Richardson number at the surface over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1084,7 +1084,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_land long_name = bulk Richardson number at the surface over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1093,7 +1093,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_ice long_name = bulk Richardson number at the surface over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1102,7 +1102,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1111,7 +1111,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1120,7 +1120,7 @@ standard_name = surface_wind_stress_over_land long_name = surface wind stress over land units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1129,7 +1129,7 @@ standard_name = surface_wind_stress_over_ice long_name = surface wind stress over ice units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1138,7 +1138,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1147,7 +1147,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity function for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1156,7 +1156,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_land long_name = Monin-Obukhov similarity function for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1165,7 +1165,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ice long_name = Monin-Obukhov similarity function for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1174,7 +1174,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1183,7 +1183,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean long_name = Monin-Obukhov similarity function for heat over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1192,7 +1192,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_land long_name = Monin-Obukhov similarity function for heat over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1201,7 +1201,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_ice long_name = Monin-Obukhov similarity function for heat over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1210,7 +1210,7 @@ standard_name = surface_friction_velocity long_name = boundary layer parameter units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1219,7 +1219,7 @@ standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1228,7 +1228,7 @@ standard_name = surface_friction_velocity_over_land long_name = surface friction velocity over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1237,7 +1237,7 @@ standard_name = surface_friction_velocity_over_ice long_name = surface friction velocity over ice units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1246,7 +1246,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m long_name = Monin-Obukhov similarity parameter for momentum at 10m units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1255,7 +1255,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1264,7 +1264,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_land long_name = Monin-Obukhov similarity parameter for momentum at 10m over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1273,7 +1273,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ice long_name = Monin-Obukhov similarity parameter for momentum at 10m over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1282,7 +1282,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m long_name = Monin-Obukhov similarity parameter for heat at 2m units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1291,7 +1291,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1300,7 +1300,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_land long_name = Monin-Obukhov similarity parameter for heat at 2m over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1309,7 +1309,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ice long_name = Monin-Obukhov similarity parameter for heat at 2m over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1318,7 +1318,7 @@ standard_name = surface_skin_temperature_after_iteration long_name = surface skin temperature after iteration units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1327,7 +1327,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1336,7 +1336,7 @@ standard_name = surface_skin_temperature_after_iteration_over_land long_name = surface skin temperature after iteration over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1345,7 +1345,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ice long_name = surface skin temperature after iteration over ice units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1354,7 +1354,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air long_name = momentum exchange coefficient units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1363,7 +1363,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1372,7 +1372,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land long_name = momentum exchange coefficient over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1381,7 +1381,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ice long_name = momentum exchange coefficient over ice units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1390,7 +1390,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air long_name = thermal exchange coefficient units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1399,7 +1399,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1408,7 +1408,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land long_name = thermal exchange coefficient over land units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1417,7 +1417,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice long_name = thermal exchange coefficient over ice units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1426,7 +1426,7 @@ standard_name = upward_heat_flux_in_soil long_name = soil heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1435,7 +1435,7 @@ standard_name = upward_heat_flux_in_soil_over_ocean long_name = soil heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1444,7 +1444,7 @@ standard_name = upward_heat_flux_in_soil_over_land long_name = soil heat flux over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1453,7 +1453,7 @@ standard_name = upward_heat_flux_in_soil_over_ice long_name = soil heat flux over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1462,7 +1462,7 @@ standard_name = surface_upward_potential_latent_heat_flux long_name = surface upward potential latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1471,7 +1471,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ocean long_name = surface upward potential latent heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1480,7 +1480,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_land long_name = surface upward potential latent heat flux over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1489,7 +1489,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ice long_name = surface upward potential latent heat flux over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1498,7 +1498,7 @@ standard_name = water_equivalent_accumulated_snow_depth long_name = water equiv of acc snow depth over land and sea ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1507,7 +1507,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_ocean long_name = water equiv of acc snow depth over ocean units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1516,7 +1516,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_land long_name = water equiv of acc snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1525,7 +1525,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_ice long_name = water equiv of acc snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1534,7 +1534,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1543,7 +1543,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ocean long_name = water equivalent snow depth over ocean units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1552,7 +1552,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1561,7 +1561,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1570,7 +1570,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1579,7 +1579,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean long_name = total precipitation amount in each time step over ocean units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1588,7 +1588,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land long_name = total precipitation amount in each time step over land units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1597,7 +1597,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice long_name = total precipitation amount in each time step over ice units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1606,7 +1606,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1615,7 +1615,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1624,7 +1624,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_land long_name = kinematic surface upward latent heat flux over land units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1633,7 +1633,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ice long_name = kinematic surface upward latent heat flux over ice units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1642,7 +1642,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1651,7 +1651,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1660,7 +1660,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_land long_name = kinematic surface upward sensible heat flux over land units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1669,7 +1669,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice long_name = kinematic surface upward sensible heat flux over ice units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1678,7 +1678,7 @@ standard_name = surface_specific_humidity long_name = surface air saturation specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1687,7 +1687,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1696,7 +1696,7 @@ standard_name = surface_specific_humidity_over_land long_name = surface air saturation specific humidity over land units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1705,7 +1705,7 @@ standard_name = surface_specific_humidity_over_ice long_name = surface air saturation specific humidity over ice units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1714,7 +1714,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1723,7 +1723,7 @@ standard_name = sea_surface_temperature long_name = sea surface temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1732,7 +1732,7 @@ standard_name = surface_skin_temperature_over_land long_name = surface skin temperature over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1741,7 +1741,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1750,7 +1750,7 @@ standard_name = surface_skin_temperature_over_land_interstitial long_name = surface skin temperature over land (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1759,7 +1759,7 @@ standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1768,7 +1768,7 @@ standard_name = sea_ice_temperature long_name = sea ice surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1777,7 +1777,7 @@ standard_name = sea_ice_temperature_interstitial long_name = sea ice surface skin temperature use as interstitial units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1786,7 +1786,7 @@ standard_name = sea_ice_thickness long_name = sea ice thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1795,7 +1795,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1812,7 +1812,7 @@ standard_name = internal_ice_temperature long_name = sea ice internal temperature units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) + dimensions = (horizontal_loop_extent,ice_vertical_dimension) type = real kind = kind_phys intent = inout @@ -1821,7 +1821,7 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index f5c73db13..68713ab19 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -27,7 +27,7 @@ standard_name = vegetation_area_fraction long_name = areal fractional cover of green vegetation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -60,7 +60,7 @@ standard_name = soil_type_classification_real long_name = soil type for lsm units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -69,7 +69,7 @@ standard_name = vegetation_type_classification_real long_name = vegetation type for lsm units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = surface_slope_classification_real long_name = sfc slope type for lsm units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -87,7 +87,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at lowest model interface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -96,7 +96,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_layer long_name = dimensionless Exner function at lowest model layer units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -105,7 +105,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -114,7 +114,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -132,7 +132,7 @@ standard_name = bounded_vegetation_area_fraction long_name = areal fractional cover of green vegetation bounded on the bottom units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -141,7 +141,7 @@ standard_name = soil_type_classification long_name = soil type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -149,7 +149,7 @@ standard_name = vegetation_type_classification long_name = vegetation type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -157,7 +157,7 @@ standard_name = surface_slope_classification long_name = surface slope type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -165,7 +165,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -174,7 +174,7 @@ standard_name = surface_skin_temperature_after_iteration long_name = surface skin temperature after iteration units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -183,7 +183,7 @@ standard_name = height_above_ground_at_lowest_model_layer long_name = layer 1 height above ground (not MSL) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -208,7 +208,7 @@ standard_name = tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step long_name = temp. change due to radiative heating per time step units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -217,7 +217,7 @@ standard_name = tendency_of_lwe_thickness_of_precipitation_amount_for_coupling long_name = change in rain_cpl (coupling_type) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -226,7 +226,7 @@ standard_name = tendency_of_lwe_thickness_of_snow_amount_for_coupling long_name = change in show_cpl (coupling_type) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -235,7 +235,7 @@ standard_name = lwe_thickness_of_precipitation_amount_for_coupling long_name = total rain precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -244,7 +244,7 @@ standard_name = lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -269,7 +269,7 @@ standard_name = weights_for_stochastic_surface_physics_perturbation long_name = weights for stochastic surface physics perturbation units = none - dimensions = (horizontal_dimension,number_of_land_surface_variables_perturbed) + dimensions = (horizontal_loop_extent,number_of_land_surface_variables_perturbed) type = real kind = kind_phys intent = in @@ -296,7 +296,7 @@ standard_name = perturbation_of_momentum_roughness_length long_name = perturbation of momentum roughness length units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -305,7 +305,7 @@ standard_name = perturbation_of_heat_to_momentum_roughness_length_ratio long_name = perturbation of heat to momentum roughness length ratio units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -314,7 +314,7 @@ standard_name = perturbation_of_soil_type_b_parameter long_name = perturbation of soil type "b" parameter units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -323,7 +323,7 @@ standard_name = perturbation_of_leaf_area_index long_name = perturbation of leaf area index units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -332,7 +332,7 @@ standard_name = perturbation_of_vegetation_fraction long_name = perturbation of vegetation fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -358,7 +358,7 @@ standard_name = flag_for_cice long_name = flag for cice units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -366,7 +366,7 @@ standard_name = sea_land_ice_mask_cice long_name = sea/land/ice mask cice (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -374,7 +374,7 @@ standard_name = sea_land_ice_mask_in long_name = sea/land/ice mask input (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -383,7 +383,7 @@ standard_name = sea_ice_temperature long_name = sea-ice surface temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -392,7 +392,7 @@ standard_name = sea_surface_temperature long_name = sea surface temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -401,7 +401,7 @@ standard_name = sea_ice_concentration long_name = sea-ice concentration [0,1] units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -410,7 +410,7 @@ standard_name = sea_ice_thickness long_name = sea-ice thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -419,7 +419,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -428,7 +428,7 @@ standard_name = x_wind_at_lowest_model_layer long_name = zonal wind at lowest model layer units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -437,7 +437,7 @@ standard_name = y_wind_at_lowest_model_layer long_name = meridional wind at lowest model layer units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -446,7 +446,7 @@ standard_name = surface_wind_enhancement_due_to_convection long_name = surface wind enhancement due to convection units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -455,7 +455,7 @@ standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point long_name = wilting point (volumetric) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -464,7 +464,7 @@ standard_name = threshold_volume_fraction_of_condensed_water_in_soil long_name = soil moisture threshold (volumetric) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -533,7 +533,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -541,7 +541,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -558,7 +558,7 @@ standard_name = surface_upward_potential_latent_heat_flux long_name = surface upward potential latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -567,7 +567,7 @@ standard_name = upward_heat_flux_in_soil long_name = upward soil heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -576,7 +576,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = mean temperature at lowest model layer units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -585,7 +585,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = specific humidity at lowest model layer units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -594,7 +594,7 @@ standard_name = x_wind_at_lowest_model_layer long_name = zonal wind at lowest model layer units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -603,7 +603,7 @@ standard_name = y_wind_at_lowest_model_layer long_name = meridional wind at lowest model layer units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -612,7 +612,7 @@ standard_name = surface_downwelling_longwave_flux long_name = surface downwelling longwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -621,7 +621,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -630,7 +630,7 @@ standard_name = surface_downwelling_direct_near_infrared_shortwave_flux long_name = surface downwelling beam near-infrared shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -639,7 +639,7 @@ standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux long_name = surface downwelling diffuse near-infrared shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -648,7 +648,7 @@ standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux long_name = surface downwelling beam ultraviolet plus visible shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -657,7 +657,7 @@ standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux long_name = surface downwelling diffuse ultraviolet plus visible shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -666,7 +666,7 @@ standard_name = surface_upwelling_longwave_flux long_name = surface upwelling longwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -675,7 +675,7 @@ standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -684,7 +684,7 @@ standard_name = surface_upwelling_direct_near_infrared_shortwave_flux long_name = surface upwelling beam near-infrared shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -693,7 +693,7 @@ standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux long_name = surface upwelling diffuse near-infrared shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -702,7 +702,7 @@ standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux long_name = surface upwelling beam ultraviolet plus visible shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -711,7 +711,7 @@ standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux long_name = surface upwelling diffuse ultraviolet plus visible shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -720,7 +720,7 @@ standard_name = temperature_at_2m long_name = 2 meter temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -729,7 +729,7 @@ standard_name = specific_humidity_at_2m long_name = 2 meter specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -738,7 +738,7 @@ standard_name = x_wind_at_10m long_name = 10 meter u wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -747,7 +747,7 @@ standard_name = y_wind_at_10m long_name = 10 meter v wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -756,7 +756,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -765,7 +765,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -774,7 +774,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -783,7 +783,7 @@ standard_name = instantaneous_cosine_of_zenith_angle long_name = cosine of zenith angle at current time units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -792,7 +792,7 @@ standard_name = soil_upward_latent_heat_flux long_name = soil upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -801,7 +801,7 @@ standard_name = canopy_upward_latent_heat_flux long_name = canopy upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -810,7 +810,7 @@ standard_name = transpiration_flux long_name = total plant transpiration rate units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -819,7 +819,7 @@ standard_name = snow_deposition_sublimation_upward_latent_heat_flux long_name = latent heat flux from snow depo/subl units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -828,7 +828,7 @@ standard_name = surface_snow_area_fraction long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -837,7 +837,7 @@ standard_name = snow_freezing_rain_upward_latent_heat_flux long_name = latent heat flux due to snow and frz rain units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -846,7 +846,7 @@ standard_name = instantaneous_surface_potential_evaporation long_name = instantaneous sfc potential evaporation units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -855,7 +855,7 @@ standard_name = instantaneous_surface_ground_heat_flux long_name = instantaneous sfc ground heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -864,7 +864,7 @@ standard_name = air_temperature_at_lowest_model_layer_for_diag long_name = layer 1 temperature for diag units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -873,7 +873,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer_for_diag long_name = layer 1 specific humidity for diag units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -882,7 +882,7 @@ standard_name = x_wind_at_lowest_model_layer_for_diag long_name = layer 1 x wind for diag units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -891,7 +891,7 @@ standard_name = y_wind_at_lowest_model_layer_for_diag long_name = layer 1 y wind for diag units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -900,7 +900,7 @@ standard_name = instantaneous_surface_downwelling_longwave_flux_for_coupling long_name = instantaneous sfc downward lw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -909,7 +909,7 @@ standard_name = instantaneous_surface_downwelling_shortwave_flux_for_coupling long_name = instantaneous sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -918,7 +918,7 @@ standard_name = cumulative_surface_downwelling_longwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc downward lw flux mulitplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -927,7 +927,7 @@ standard_name = cumulative_surface_downwelling_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc downward sw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -936,7 +936,7 @@ standard_name = instantaneous_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling long_name = instantaneous sfc nir beam downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -945,7 +945,7 @@ standard_name = instantaneous_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling long_name = instantaneous sfc nir diff downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -954,7 +954,7 @@ standard_name = instantaneous_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling long_name = instantaneous sfc uv+vis beam downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -963,7 +963,7 @@ standard_name = instantaneous_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling long_name = instantaneous sfc uv+vis diff downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -972,7 +972,7 @@ standard_name = cumulative_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc nir beam downward sw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -981,7 +981,7 @@ standard_name = cumulative_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc nir diff downward sw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -990,7 +990,7 @@ standard_name = cumulative_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc uv+vis beam dnwd sw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -999,7 +999,7 @@ standard_name = cumulative_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc uv+vis diff dnwd sw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1008,7 +1008,7 @@ standard_name = instantaneous_surface_net_downward_longwave_flux_for_coupling long_name = instantaneous net sfc downward lw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1017,7 +1017,7 @@ standard_name = cumulative_surface_net_downward_longwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net downward lw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1026,7 +1026,7 @@ standard_name = instantaneous_temperature_at_2m_for_coupling long_name = instantaneous T2m units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1035,7 +1035,7 @@ standard_name = instantaneous_specific_humidity_at_2m_for_coupling long_name = instantaneous Q2m units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1044,7 +1044,7 @@ standard_name = instantaneous_x_wind_at_10m_for_coupling long_name = instantaneous U10m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1053,7 +1053,7 @@ standard_name = instantaneous_y_wind_at_10m_for_coupling long_name = instantaneous V10m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1062,7 +1062,7 @@ standard_name = instantaneous_surface_skin_temperature_for_coupling long_name = instantaneous sfc temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1071,7 +1071,7 @@ standard_name = instantaneous_surface_air_pressure_for_coupling long_name = instantaneous sfc pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1080,7 +1080,7 @@ standard_name = instantaneous_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling long_name = instantaneous net nir beam sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1089,7 +1089,7 @@ standard_name = instantaneous_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling long_name = instantaneous net nir diff sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1098,7 +1098,7 @@ standard_name = instantaneous_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling long_name = instantaneous net uv+vis beam downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1107,7 +1107,7 @@ standard_name = instantaneous_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling long_name = instantaneous net uv+vis diff downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1116,7 +1116,7 @@ standard_name = instantaneous_surface_net_downward_shortwave_flux_for_coupling long_name = instantaneous net sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1125,7 +1125,7 @@ standard_name = cumulative_surface_net_downward_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net downward sw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1134,7 +1134,7 @@ standard_name = cumulative_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net nir beam downward sw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1143,7 +1143,7 @@ standard_name = cumulative_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net nir diff downward sw flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1152,7 +1152,7 @@ standard_name = cumulative_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net uv+vis beam downward sw rad flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1161,7 +1161,7 @@ standard_name = cumulative_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep long_name = cumulative net uv+vis diff downward sw rad flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1170,7 +1170,7 @@ standard_name = cumulative_surface_ground_heat_flux_multiplied_by_timestep long_name = cumulative groud conductive heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1179,7 +1179,7 @@ standard_name = cumulative_soil_upward_latent_heat_flux_multiplied_by_timestep long_name = cumulative soil upward latent heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1188,7 +1188,7 @@ standard_name = cumulative_canopy_upward_latent_heat_flu_multiplied_by_timestep long_name = cumulative canopy upward latent heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1197,7 +1197,7 @@ standard_name = cumulative_transpiration_flux_multiplied_by_timestep long_name = cumulative total plant transpiration rate multiplied by timestep units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1206,7 +1206,7 @@ standard_name = cumulative_snow_deposition_sublimation_upward_latent_heat_flux_multiplied_by_timestep long_name = cumulative latent heat flux from snow depo/subl multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1215,7 +1215,7 @@ standard_name = cumulative_surface_snow_area_fraction_multiplied_by_timestep long_name = cumulative surface snow area fraction multiplied by timestep units = s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1224,7 +1224,7 @@ standard_name = cumulative_snow_freezing_rain_upward_latent_heat_flux_multiplied_by_timestep long_name = cumulative latent heat flux due to snow and frz rain multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1233,7 +1233,7 @@ standard_name = cumulative_surface_upward_potential_latent_heat_flux_multiplied_by_timestep long_name = cumulative surface upward potential latent heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1242,7 +1242,7 @@ standard_name = total_runoff long_name = total water runoff units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1251,7 +1251,7 @@ standard_name = surface_runoff long_name = surface water runoff (from lsm) units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1260,7 +1260,7 @@ standard_name = surface_runoff_flux long_name = surface runoff flux units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1269,7 +1269,7 @@ standard_name = subsurface_runoff_flux long_name = subsurface runoff flux units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1304,7 +1304,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1313,7 +1313,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1322,7 +1322,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1331,7 +1331,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1340,7 +1340,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1349,7 +1349,7 @@ standard_name = surface_upward_latent_heat_flux_reduction_factor long_name = surface upward latent heat flux reduction factor from canopy heat storage units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1358,7 +1358,7 @@ standard_name = surface_upward_sensible_heat_flux_reduction_factor long_name = surface upward sensible heat flux reduction factor from canopy heat storage units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/GFS_surface_loop_control.meta b/physics/GFS_surface_loop_control.meta index a4d62cd29..569500a94 100644 --- a/physics/GFS_surface_loop_control.meta +++ b/physics/GFS_surface_loop_control.meta @@ -27,7 +27,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -88,7 +88,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -97,7 +97,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -105,7 +105,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -113,7 +113,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -121,7 +121,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -129,7 +129,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index ca1e573ba..3dda6a07c 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -283,7 +283,7 @@ standard_name = orography long_name = orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -292,7 +292,7 @@ standard_name = orography_unfiltered long_name = unfiltered orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -301,7 +301,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -318,7 +318,7 @@ standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -327,7 +327,7 @@ standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with_respect to east of maximum subgrid orographic variations units = degree - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -336,7 +336,7 @@ standard_name = slope_of_subgrid_orography long_name = slope of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -345,7 +345,7 @@ standard_name = anisotropy_of_subgrid_orography long_name = anisotropy of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -354,7 +354,7 @@ standard_name = maximum_subgrid_orography long_name = maximum of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -363,7 +363,7 @@ standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height units = frac - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -372,7 +372,7 @@ standard_name = asymmetry_of_subgrid_orography long_name = asymmetry of subgrid orography units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -406,7 +406,7 @@ standard_name = latitude long_name = grid latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -415,7 +415,7 @@ standard_name = latitude_in_degree long_name = latitude in degree north units = degree_north - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -424,7 +424,7 @@ standard_name = sine_of_latitude long_name = sine of the grid latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -433,7 +433,7 @@ standard_name = cosine_of_latitude long_name = cosine of the grid latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -442,7 +442,7 @@ standard_name = cell_area long_name = area of the grid cell units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -451,7 +451,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -460,7 +460,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -469,7 +469,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -478,7 +478,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -487,7 +487,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -496,7 +496,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -505,7 +505,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -514,7 +514,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -523,7 +523,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -532,7 +532,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -541,7 +541,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = vertical index at top atmospheric boundary layer units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -549,7 +549,7 @@ standard_name = instantaneous_x_stress_due_to_gravity_wave_drag long_name = zonal surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -558,7 +558,7 @@ standard_name = instantaneous_y_stress_due_to_gravity_wave_drag long_name = meridional surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -567,7 +567,7 @@ standard_name = tendency_of_x_wind_due_to_ugwp long_name = zonal wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -576,7 +576,7 @@ standard_name = tendency_of_y_wind_due_to_ugwp long_name = meridional wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -585,7 +585,7 @@ standard_name = tendency_of_air_temperature_due_to_ugwp long_name = air temperature tendency due to UGWP units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -594,7 +594,7 @@ standard_name = eddy_mixing_due_to_ugwp long_name = eddy mixing due to UGWP units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -603,7 +603,7 @@ standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag long_name = momentum flux or stress due to TOFD units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -612,7 +612,7 @@ standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag long_name = momentum flux or stress due to mountain blocking drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -621,7 +621,7 @@ standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag long_name = momentum flux or stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -630,7 +630,7 @@ standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave long_name = momentum flux or stress due to nonstationary gravity waves units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -639,7 +639,7 @@ standard_name = height_of_mountain_blocking long_name = height of mountain blocking drag units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -648,7 +648,7 @@ standard_name = height_of_low_level_wave_breaking long_name = height of low level wave breaking units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -657,7 +657,7 @@ standard_name = height_of_launch_level_of_orographic_gravity_wave long_name = height of launch level of orographic gravity wave units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -666,7 +666,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag long_name = instantaneous change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -675,7 +675,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = instantaneous change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -684,7 +684,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = instantaneous change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -693,7 +693,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag long_name = time integral of change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -702,7 +702,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = time integral of change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -711,7 +711,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = time integral of change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -720,7 +720,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -729,7 +729,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -738,7 +738,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -747,7 +747,7 @@ standard_name = level_of_dividing_streamline long_name = level of the dividing streamline units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -810,7 +810,7 @@ standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total rain at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -827,7 +827,7 @@ standard_name = turbulent_kinetic_energy long_name = turbulent kinetic energy units = J - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -836,7 +836,7 @@ standard_name = tendency_of_turbulent_kinetic_energy_due_to_model_physics long_name = turbulent kinetic energy tendency due to model physics units = J s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -861,7 +861,7 @@ standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in x wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -870,7 +870,7 @@ standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -879,7 +879,7 @@ standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -888,7 +888,7 @@ standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in x wind due to convective gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -897,7 +897,7 @@ standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in y wind due to convective gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -906,7 +906,7 @@ standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag long_name = cumulative change in temperature due to convective gravity wave drag units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/cires_ugwp_post.meta b/physics/cires_ugwp_post.meta index ccb7cf50f..80b8ce1ca 100644 --- a/physics/cires_ugwp_post.meta +++ b/physics/cires_ugwp_post.meta @@ -44,7 +44,7 @@ standard_name = tendency_of_air_temperature_due_to_ugwp long_name = air temperature tendency due to UGWP units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -53,7 +53,7 @@ standard_name = tendency_of_x_wind_due_to_ugwp long_name = zonal wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -62,7 +62,7 @@ standard_name = tendency_of_y_wind_due_to_ugwp long_name = meridional wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag long_name = momentum flux or stress due to TOFD units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -80,7 +80,7 @@ standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag long_name = momentum flux or stress due to mountain blocking drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -89,7 +89,7 @@ standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag long_name = momentum flux or stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -98,7 +98,7 @@ standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave long_name = momentum flux or stress due to nonstationary gravity waves units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = height_of_mountain_blocking long_name = height of mountain blocking drag units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -116,7 +116,7 @@ standard_name = height_of_low_level_wave_breaking long_name = height of low level wave breaking units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -125,7 +125,7 @@ standard_name = height_of_launch_level_of_orographic_gravity_wave long_name = height of launch level of orographic gravity wave units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -134,7 +134,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag long_name = instantaneous change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -143,7 +143,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = instantaneous change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -152,7 +152,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = instantaneous change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -161,7 +161,7 @@ standard_name = time_integral_of_height_of_mountain_blocking long_name = time integral of height of mountain blocking drag units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -170,7 +170,7 @@ standard_name = time_integral_of_height_of_low_level_wave_breaking long_name = time integral of height of drag due to low level wave breaking units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -179,7 +179,7 @@ standard_name = time_integral_of_height_of_launch_level_of_orographic_gravity_wave long_name = time integral of height of launch level of orographic gravity wave units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -188,7 +188,7 @@ standard_name = time_integral_of_momentum_flux_due_to_turbulent_orographic_form_drag long_name = time integral of momentum flux due to TOFD units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -197,7 +197,7 @@ standard_name = time_integral_of_momentum_flux_due_to_mountain_blocking_drag long_name = time integral of momentum flux due to mountain blocking drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -206,7 +206,7 @@ standard_name = time_integral_of_momentum_flux_due_to_orographic_gravity_wave_drag long_name = time integral of momentum flux due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -215,7 +215,7 @@ standard_name = time_integral_of_momentum_flux_due_to_nonstationary_gravity_wave long_name = time integral of momentum flux due to nonstationary gravity waves units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -224,7 +224,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag long_name = time integral of change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -233,7 +233,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = time integral of change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -242,7 +242,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = time integral of change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -251,7 +251,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_nonstationary_gravity_wave long_name = time integral of change in x wind due to NGW units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -260,7 +260,7 @@ standard_name = time_integral_of_change_in_y_wind_due_to_nonstationary_gravity_wave long_name = time integral of change in y wind due to NGW units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -269,7 +269,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -278,7 +278,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -287,7 +287,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/cnvc90.meta b/physics/cnvc90.meta index ab487ff22..169f6b221 100644 --- a/physics/cnvc90.meta +++ b/physics/cnvc90.meta @@ -28,7 +28,7 @@ standard_name = lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep long_name = convective rainfall amount on dynamics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -37,7 +37,7 @@ standard_name = vertical_index_at_cloud_base long_name = vertical index at cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -45,7 +45,7 @@ standard_name = vertical_index_at_cloud_top long_name = vertical index at cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -61,7 +61,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -70,7 +70,7 @@ standard_name = accumulated_lwe_thickness_of_convective_precipitation_amount_cnvc90 long_name = accumulated convective rainfall amount for cnvc90 only units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -79,7 +79,7 @@ standard_name = smallest_cloud_base_vertical_index_encountered_thus_far long_name = smallest cloud base vertical index encountered thus far units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -88,7 +88,7 @@ standard_name = largest_cloud_top_vertical_index_encountered_thus_far long_name = largest cloud top vertical index encountered thus far units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -97,7 +97,7 @@ standard_name = fraction_of_convective_cloud long_name = fraction of convective cloud units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -106,7 +106,7 @@ standard_name = pressure_at_bottom_of_convective_cloud long_name = pressure at bottom of convective cloud units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -115,7 +115,7 @@ standard_name = pressure_at_top_of_convective_cloud long_name = pressure at top of convective cloud units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/cs_conv.meta b/physics/cs_conv.meta index 42201b155..14a0d5bf2 100644 --- a/physics/cs_conv.meta +++ b/physics/cs_conv.meta @@ -8,7 +8,7 @@ name = cs_conv_pre_run type = scheme [im] - standard_name = horizontal_dimension + standard_name = horizontal_loop_extent long_name = horizontal dimension units = count dimensions = () @@ -43,7 +43,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -52,7 +52,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -61,7 +61,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -70,7 +70,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes long_name = grid size related coefficient used in scale-sensitive schemes units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -79,7 +79,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes_complement long_name = complement to work1 units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -106,7 +106,7 @@ standard_name = maximum_updraft_velocity_at_cloud_base long_name = maximum updraft velocity at cloud base units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -133,7 +133,7 @@ standard_name = water_vapor_specific_humidity_save long_name = water vapor specific humidity before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -142,7 +142,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -151,7 +151,7 @@ standard_name = ice_water_mixing_ratio_save long_name = cloud ice water mixing ratio before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -185,7 +185,7 @@ name = cs_conv_post_run type = scheme [im] - standard_name = horizontal_dimension + standard_name = horizontal_loop_extent long_name = horizontal dimension units = count dimensions = () @@ -212,7 +212,7 @@ standard_name = convective_updraft_area_fraction_at_model_interfaces long_name = convective updraft area fraction at model interfaces units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -221,7 +221,7 @@ standard_name = convective_updraft_area_fraction long_name = convective updraft area fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -330,7 +330,7 @@ standard_name = air_temperature_updated_by_physics long_name = mid-layer temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -339,7 +339,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -348,7 +348,7 @@ standard_name = lwe_thickness_of_deep_convective_precipitation_amount long_name = deep convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -357,7 +357,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -366,7 +366,7 @@ standard_name = geopotential long_name = mid-layer geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -375,7 +375,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -384,7 +384,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -393,7 +393,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -420,7 +420,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -429,7 +429,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -438,7 +438,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -447,7 +447,7 @@ standard_name = x_wind_updated_by_physics long_name = mid-layer zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -456,7 +456,7 @@ standard_name = y_wind_updated_by_physics long_name = mid-layer meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -483,7 +483,7 @@ standard_name = cloud_base_mass_flux long_name = cloud base mass flux units = kg m-2 s-1 - dimensions = (horizontal_dimension,number_of_cloud_types_CS) + dimensions = (horizontal_loop_extent,number_of_cloud_types_CS) type = real kind = kind_phys intent = inout @@ -500,7 +500,7 @@ standard_name = maximum_updraft_velocity_at_cloud_base long_name = maximum updraft velocity at cloud base units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -536,7 +536,7 @@ standard_name = convective_updraft_area_fraction_at_model_interfaces long_name = convective updraft area fraction at model interfaces units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -585,7 +585,7 @@ standard_name = flag_deep_convection long_name = flag indicating whether convection occurs in column units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -593,7 +593,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -602,7 +602,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -611,7 +611,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -620,7 +620,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -629,7 +629,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -638,7 +638,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -647,7 +647,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -656,7 +656,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -665,7 +665,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -674,7 +674,7 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/cs_conv_aw_adj.meta b/physics/cs_conv_aw_adj.meta index 626fd6d4b..720330c50 100644 --- a/physics/cs_conv_aw_adj.meta +++ b/physics/cs_conv_aw_adj.meta @@ -8,7 +8,7 @@ name = cs_conv_aw_adj_run type = scheme [im] - standard_name = horizontal_dimension + standard_name = horizontal_loop_extent long_name = horizontal dimension units = count dimensions = () @@ -100,7 +100,7 @@ standard_name = convective_updraft_area_fraction long_name = convective updraft area fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -109,7 +109,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -118,7 +118,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -127,7 +127,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = tracer_concentration_save long_name = tracer concentration before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -145,7 +145,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -154,7 +154,7 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -163,7 +163,7 @@ standard_name = subgrid_scale_cloud_fraction_from_shoc long_name = subgrid-scale cloud fraction from the SHOC scheme units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -172,7 +172,7 @@ standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index 7c86d7952..f27b2cc91 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -57,7 +57,7 @@ standard_name = cell_area long_name = grid cell area units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -91,7 +91,7 @@ standard_name = conv_activity_counter long_name = convective activity memory units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -99,7 +99,7 @@ standard_name = temperature_tendency_due_to_dynamics long_name = temperature tendency due to dynamics only units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -108,7 +108,7 @@ standard_name = moisture_tendency_due_to_dynamics long_name = moisture tendency due to dynamics only units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -117,7 +117,7 @@ standard_name = geopotential long_name = layer geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -126,7 +126,7 @@ standard_name = lwe_thickness_of_deep_convective_precipitation_amount long_name = deep convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -135,7 +135,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -144,7 +144,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -153,7 +153,7 @@ standard_name = cloud_work_function long_name = cloud work function units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -162,7 +162,7 @@ standard_name = x_wind_updated_by_physics long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -171,7 +171,7 @@ standard_name = y_wind_updated_by_physics long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -180,7 +180,7 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -189,7 +189,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -198,7 +198,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -207,7 +207,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -216,7 +216,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -225,7 +225,7 @@ standard_name = vertical_index_at_cloud_base long_name = index for cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -233,7 +233,7 @@ standard_name = vertical_index_at_cloud_top long_name = index for cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -241,7 +241,7 @@ standard_name = flag_deep_convection long_name = deep convection: 0=no, 1=yes units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -249,7 +249,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -257,7 +257,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -266,7 +266,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -275,7 +275,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -284,7 +284,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -293,7 +293,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -302,7 +302,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -311,7 +311,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -320,7 +320,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -329,7 +329,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -338,7 +338,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -371,7 +371,7 @@ standard_name = cumulative_change_in_x_wind_due_to_shallow_convection long_name = cumulative change in x wind due to shallow convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -380,7 +380,7 @@ standard_name = cumulative_change_in_y_wind_due_to_shallow_convection long_name = cumulative change in y wind due to shallow convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -389,7 +389,7 @@ standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shallow convection units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -398,7 +398,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection long_name = cumulative change in water vapor specific humidity due to shallow convection units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -407,7 +407,7 @@ standard_name = cumulative_change_in_x_wind_due_to_deep_convection long_name = cumulative change in x wind due to deep convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -416,7 +416,7 @@ standard_name = cumulative_change_in_y_wind_due_to_deep_convection long_name = cumulative change in y wind due to deep convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -425,7 +425,7 @@ standard_name = cumulative_change_in_temperature_due_to_deep_convection long_name = cumulative change in temperature due to deep convection units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -434,7 +434,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection long_name = cumulative change in water vapor specific humidity due to deep convection units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -459,7 +459,7 @@ standard_name = convective_cloud_condesate_after_rainout long_name = convective cloud condesate after rainout units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/cu_gf_driver_post.meta b/physics/cu_gf_driver_post.meta index 43bc02545..152409fbd 100644 --- a/physics/cu_gf_driver_post.meta +++ b/physics/cu_gf_driver_post.meta @@ -19,7 +19,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -28,7 +28,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -37,7 +37,7 @@ standard_name = temperature_from_previous_timestep long_name = temperature from previous time step units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -46,7 +46,7 @@ standard_name = moisture_from_previous_timestep long_name = moisture from previous time step units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -55,7 +55,7 @@ standard_name = conv_activity_counter long_name = convective activity memory units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -63,7 +63,7 @@ standard_name = gf_memory_counter long_name = Memory counter for GF units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/cu_gf_driver_pre.meta b/physics/cu_gf_driver_pre.meta index bfdebee59..1a7fbe4a3 100644 --- a/physics/cu_gf_driver_pre.meta +++ b/physics/cu_gf_driver_pre.meta @@ -53,7 +53,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -62,7 +62,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = temperature_from_previous_timestep long_name = temperature from previous time step units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -80,7 +80,7 @@ standard_name = moisture_from_previous_timestep long_name = moisture from previous time step units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -89,7 +89,7 @@ standard_name = temperature_tendency_due_to_dynamics long_name = temperature tendency due to dynamics only units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -98,7 +98,7 @@ standard_name = moisture_tendency_due_to_dynamics long_name = moisture tendency due to dynamics only units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -107,7 +107,7 @@ standard_name = conv_activity_counter long_name = convective activity memory units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -115,7 +115,7 @@ standard_name = gf_memory_counter long_name = Memory counter for GF units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 8bc067735..70e977eed 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -49,7 +49,7 @@ standard_name = x_wind_updated_by_physics long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -58,7 +58,7 @@ standard_name = y_wind_updated_by_physics long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -67,7 +67,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -76,7 +76,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -85,7 +85,7 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -94,7 +94,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -103,7 +103,7 @@ standard_name = moisture_tendency_due_to_dynamics long_name = moisture tendency due to dynamics only units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -112,7 +112,7 @@ standard_name = temperature_tendency_due_to_dynamics long_name = temperature tendency due to dynamics only units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -121,7 +121,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -130,7 +130,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -139,7 +139,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -148,7 +148,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -157,7 +157,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -166,7 +166,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -175,7 +175,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -184,7 +184,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -193,7 +193,7 @@ standard_name = lwe_thickness_of_deep_convective_precipitation_amount long_name = deep convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -202,7 +202,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -235,7 +235,7 @@ standard_name = cell_size long_name = size of the grid cell units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -244,7 +244,7 @@ standard_name = vertical_index_at_cloud_base long_name = index for cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -252,7 +252,7 @@ standard_name = vertical_index_at_cloud_top long_name = index for cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -260,7 +260,7 @@ standard_name = flag_deep_convection long_name = deep convection: 0=no, 1=yes units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -276,7 +276,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -285,7 +285,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -294,7 +294,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -303,7 +303,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = convective cloud water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -312,7 +312,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/cu_ntiedtke_post.meta b/physics/cu_ntiedtke_post.meta index dfaee692d..543ebae16 100644 --- a/physics/cu_ntiedtke_post.meta +++ b/physics/cu_ntiedtke_post.meta @@ -11,7 +11,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -20,7 +20,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -29,7 +29,7 @@ standard_name = temperature_from_previous_timestep long_name = temperature from previous time step units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -38,7 +38,7 @@ standard_name = moisture_from_previous_timestep long_name = moisture from previous time step units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/cu_ntiedtke_pre.meta b/physics/cu_ntiedtke_pre.meta index 411bb8fab..c2670ee09 100644 --- a/physics/cu_ntiedtke_pre.meta +++ b/physics/cu_ntiedtke_pre.meta @@ -53,7 +53,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -62,7 +62,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = temperature_from_previous_timestep long_name = temperature from previous time step units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -80,7 +80,7 @@ standard_name = moisture_from_previous_timestep long_name = moisture from previous time step units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -89,7 +89,7 @@ standard_name = temperature_tendency_due_to_dynamics long_name = temperature tendency due to dynamics only units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -98,7 +98,7 @@ standard_name = moisture_tendency_due_to_dynamics long_name = moisture tendency due to dynamics only units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index ce406e824..6fbc7f8b6 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -47,7 +47,7 @@ standard_name = sine_of_latitude long_name = sine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -56,7 +56,7 @@ standard_name = cosine_of_latitude long_name = cosine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -65,7 +65,7 @@ standard_name = longitude long_name = longitude of grid box units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -74,7 +74,7 @@ standard_name = cosine_of_zenith_angle long_name = average of cosine of zenith angle over daytime shortwave call time interval units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -83,7 +83,7 @@ standard_name = surface_skin_temperature_over_land_interstitial long_name = surface skin temperature over land (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -92,7 +92,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -110,7 +110,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = air temperature at lowest model layer units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -119,7 +119,7 @@ standard_name = surface_midlayer_air_temperature_in_longwave_radiation long_name = surface (first layer) air temperature saved in longwave radiation call units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -128,7 +128,7 @@ standard_name = surface_longwave_emissivity_over_land_interstitial long_name = surface lw emissivity in fraction over land (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -137,7 +137,7 @@ standard_name = surface_longwave_emissivity_over_ice_interstitial long_name = surface lw emissivity in fraction over ice (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -146,7 +146,7 @@ standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -155,7 +155,7 @@ standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky surface downwelling shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -164,7 +164,7 @@ standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky surface net downwelling shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -173,7 +173,7 @@ standard_name = surface_downwelling_longwave_flux_on_radiation_time_step long_name = total sky surface downwelling longwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -182,7 +182,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky shortwave heating rate on radiation time step units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -191,7 +191,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky shortwave heating rate on radiation time step units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -200,7 +200,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky longwave heating rate on radiation time step units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -209,7 +209,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky longwave heating rate on radiation time step units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -218,7 +218,7 @@ standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = total sky surface upwelling beam near-infrared shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -227,7 +227,7 @@ standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = total sky surface upwelling diffuse near-infrared shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -236,7 +236,7 @@ standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = total sky surface upwelling beam ultraviolet plus visible shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -245,7 +245,7 @@ standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = total sky surface upwelling diffuse ultraviolet plus visible shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -254,7 +254,7 @@ standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = total sky surface downwelling beam near-infrared shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -263,7 +263,7 @@ standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = total sky surface downwelling diffuse near-infrared shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -272,7 +272,7 @@ standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = total sky surface downwelling beam ultraviolet plus visible shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -281,7 +281,7 @@ standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = total sky surface downwelling diffuse ultraviolet plus visible shortwave flux on radiation time step units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -324,7 +324,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -332,7 +332,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -340,7 +340,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -348,7 +348,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = total radiative heating rate at current time units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -357,7 +357,7 @@ standard_name = tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky long_name = clear sky radiative (shortwave + longwave) heating rate at current time units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -366,7 +366,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -375,7 +375,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = surface net downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -384,7 +384,7 @@ standard_name = surface_downwelling_longwave_flux long_name = surface downwelling longwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -393,7 +393,7 @@ standard_name = surface_upwelling_longwave_flux_over_land_interstitial long_name = surface upwelling longwave flux at current time over land (temporary use as interstitial) units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -402,7 +402,7 @@ standard_name = surface_upwelling_longwave_flux_over_ice_interstitial long_name = surface upwelling longwave flux at current time over ice (temporary use as interstitial) units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -411,7 +411,7 @@ standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial) units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -420,7 +420,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave fluxes units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -429,7 +429,7 @@ standard_name = instantaneous_cosine_of_zenith_angle long_name = cosine of zenith angle at current time units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -438,7 +438,7 @@ standard_name = surface_upwelling_direct_near_infrared_shortwave_flux long_name = surface upwelling beam near-infrared shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -447,7 +447,7 @@ standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux long_name = surface upwelling diffuse near-infrared shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -456,7 +456,7 @@ standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux long_name = surface upwelling beam ultraviolet plus visible shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -465,7 +465,7 @@ standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux long_name = surface upwelling diffuse ultraviolet plus visible shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -474,7 +474,7 @@ standard_name = surface_downwelling_direct_near_infrared_shortwave_flux long_name = surface downwelling beam near-infrared shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -483,7 +483,7 @@ standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux long_name = surface downwelling diffuse near-infrared shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -492,7 +492,7 @@ standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux long_name = surface downwelling beam ultraviolet plus visible shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -501,7 +501,7 @@ standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux long_name = surface downwelling diffuse ultraviolet plus visible shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index ba15719c1..f78259e82 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -27,7 +27,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -36,7 +36,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -45,7 +45,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -54,7 +54,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = water_vapor_specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = vertical index at top atmospheric boundary layer units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -98,7 +98,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -116,7 +116,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -125,7 +125,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = mid-layer Exner function units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -134,7 +134,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -143,7 +143,7 @@ standard_name = geopotential long_name = mid-layer geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -169,7 +169,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -178,7 +178,7 @@ standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -187,7 +187,7 @@ standard_name = asymmetry_of_subgrid_orography long_name = asymmetry of subgrid orography units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -196,7 +196,7 @@ standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height units = frac - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -205,7 +205,7 @@ standard_name = standard_deviation_of_subgrid_orography_small_scale long_name = standard deviation of subgrid orography small scale units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -214,7 +214,7 @@ standard_name = convexity_of_subgrid_orography_small_scale long_name = convexity of subgrid orography small scale units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -223,7 +223,7 @@ standard_name = asymmetry_of_subgrid_orography_small_scale long_name = asymmetry of subgrid orography small scale units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -232,7 +232,7 @@ standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale units = frac - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -241,7 +241,7 @@ standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with respect to east of maximum subgrid orographic variations units = degree - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -250,7 +250,7 @@ standard_name = slope_of_subgrid_orography long_name = slope of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -259,7 +259,7 @@ standard_name = anisotropy_of_subgrid_orography long_name = anisotropy of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -268,7 +268,7 @@ standard_name = maximum_subgrid_orography long_name = maximum of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -277,7 +277,7 @@ standard_name = x_momentum_tendency_from_large_scale_gwd long_name = x momentum tendency from large scale gwd units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -286,7 +286,7 @@ standard_name = y_momentum_tendency_from_large_scale_gwd long_name = y momentum tendency from large scale gwd units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -295,7 +295,7 @@ standard_name = x_momentum_tendency_from_blocking_drag long_name = x momentum tendency from blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -304,7 +304,7 @@ standard_name = y_momentum_tendency_from_blocking_drag long_name = y momentum tendency from blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -313,7 +313,7 @@ standard_name = x_momentum_tendency_from_small_scale_gwd long_name = x momentum tendency from small scale gwd units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -322,7 +322,7 @@ standard_name = y_momentum_tendency_from_small_scale_gwd long_name = y momentum tendency from small scale gwd units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -331,7 +331,7 @@ standard_name = x_momentum_tendency_from_form_drag long_name = x momentum tendency from form drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -340,7 +340,7 @@ standard_name = y_momentum_tendency_from_form_drag long_name = y momentum tendency from form drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -349,7 +349,7 @@ standard_name = instantaneous_x_stress_due_to_gravity_wave_drag long_name = zonal surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -358,7 +358,7 @@ standard_name = instantaneous_y_stress_due_to_gravity_wave_drag long_name = meridional surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -367,7 +367,7 @@ standard_name = integrated_x_momentum_flux_from_large_scale_gwd long_name = integrated x momentum flux from large scale gwd units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -376,7 +376,7 @@ standard_name = integrated_y_momentum_flux_from_large_scale_gwd long_name = integrated y momentum flux from large scale gwd units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -385,7 +385,7 @@ standard_name = integrated_x_momentum_flux_from_blocking_drag long_name = integrated x momentum flux from blocking drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -394,7 +394,7 @@ standard_name = integrated_y_momentum_flux_from_blocking_drag long_name = integrated y momentum flux from blocking drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -403,7 +403,7 @@ standard_name = integrated_x_momentum_flux_from_small_scale_gwd long_name = integrated x momentum flux from small scale gwd units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -412,7 +412,7 @@ standard_name = integrated_y_momentum_flux_from_small_scale_gwd long_name = integrated y momentum flux from small scale gwd units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -421,7 +421,7 @@ standard_name = integrated_x_momentum_flux_from_form_drag long_name = integrated x momentum flux from form drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -430,7 +430,7 @@ standard_name = integrated_y_momentum_flux_from_form_drag long_name = integrated y momentum flux from form drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -439,7 +439,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -448,7 +448,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -457,7 +457,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -569,7 +569,7 @@ standard_name = level_of_dividing_streamline long_name = level of the dividing streamline units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -578,7 +578,7 @@ standard_name = cell_size long_name = size of the grid cell units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index 128977e05..2b857e509 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -63,7 +63,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = mean temperature at lowest model layer units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = water vapor specific humidity at lowest model layer units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -99,7 +99,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean long_name = total sky surface downward longwave flux absorbed by the ground over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -108,7 +108,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -117,7 +117,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_ocean long_name = water equiv of acc snow depth over ocean units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -126,7 +126,7 @@ standard_name = lake_depth long_name = lake depth units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -143,7 +143,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -161,7 +161,7 @@ standard_name = height_above_ground_at_lowest_model_layer long_name = layer 1 height above ground (not MSL) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -170,7 +170,7 @@ standard_name = orography long_name = orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -179,7 +179,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -187,7 +187,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -220,7 +220,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ocean long_name = water equivalent snow depth over ocean units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -229,7 +229,7 @@ standard_name = sea_ice_thickness long_name = sea ice thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -238,7 +238,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -247,7 +247,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -256,7 +256,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -265,7 +265,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -274,7 +274,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -283,7 +283,7 @@ standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -292,7 +292,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -301,7 +301,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -310,7 +310,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -319,7 +319,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -328,7 +328,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/gcm_shoc.meta b/physics/gcm_shoc.meta index d9a58d8b5..8cb03727d 100644 --- a/physics/gcm_shoc.meta +++ b/physics/gcm_shoc.meta @@ -126,7 +126,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -144,7 +144,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -153,7 +153,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -162,7 +162,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -171,7 +171,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -180,7 +180,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -189,7 +189,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -261,7 +261,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -270,7 +270,7 @@ standard_name = prandtl_number long_name = turbulent Prandtl number units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -279,7 +279,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -288,7 +288,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -369,7 +369,7 @@ standard_name = subgrid_scale_cloud_fraction_from_shoc long_name = subgrid-scale cloud fraction from the SHOC scheme units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -378,7 +378,7 @@ standard_name = turbulent_kinetic_energy_convective_transport_tracer long_name = turbulent kinetic energy in the convectively transported tracer array units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -387,7 +387,7 @@ standard_name = atmosphere_heat_diffusivity_from_shoc long_name = diffusivity for heat from the SHOC scheme units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -396,7 +396,7 @@ standard_name = kinematic_buoyancy_flux_from_shoc long_name = upward kinematic buoyancy flux from the SHOC scheme units = K m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/get_prs_fv3.meta b/physics/get_prs_fv3.meta index 2db340300..82b6a00d6 100644 --- a/physics/get_prs_fv3.meta +++ b/physics/get_prs_fv3.meta @@ -8,7 +8,7 @@ name = get_prs_fv3_run type = scheme [ix] - standard_name = horizontal_dimension + standard_name = horizontal_loop_extent long_name = horizontal dimension units = count dimensions = () @@ -27,7 +27,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -45,7 +45,7 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -54,7 +54,7 @@ standard_name = water_vapor_specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -72,7 +72,7 @@ standard_name = geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature long_name = difference between mid-layer geopotentials divided by mid-layer virtual temperature units = m2 s-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -106,7 +106,7 @@ name = get_phi_fv3_run type = scheme [ix] - standard_name = horizontal_dimension + standard_name = horizontal_loop_extent long_name = horizontal dimension units = count dimensions = () @@ -125,7 +125,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -134,7 +134,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -143,7 +143,7 @@ standard_name = geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature long_name = difference between mid-layer geopotentials divided by mid-layer virtual temperature units = m2 s-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = inout @@ -152,7 +152,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -161,7 +161,7 @@ standard_name = geopotential long_name = mid-layer geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/gfdl_cloud_microphys.meta b/physics/gfdl_cloud_microphys.meta index 3c9a53606..60da43272 100644 --- a/physics/gfdl_cloud_microphys.meta +++ b/physics/gfdl_cloud_microphys.meta @@ -172,7 +172,7 @@ standard_name = land_area_fraction_for_microphysics long_name = land area fraction used in microphysics schemes units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -181,7 +181,7 @@ standard_name = cell_area long_name = area of grid cell units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -198,7 +198,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -207,7 +207,7 @@ standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics long_name = cloud condensed water mixing ratio updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -216,7 +216,7 @@ standard_name = rain_water_mixing_ratio_updated_by_physics long_name = moist mixing ratio of rain updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -225,7 +225,7 @@ standard_name = ice_water_mixing_ratio_updated_by_physics long_name = moist mixing ratio of cloud ice updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -234,7 +234,7 @@ standard_name = snow_water_mixing_ratio_updated_by_physics long_name = moist mixing ratio of snow updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -243,7 +243,7 @@ standard_name = graupel_mixing_ratio_updated_by_physics long_name = moist ratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -252,7 +252,7 @@ standard_name = cloud_fraction_updated_by_physics long_name = cloud fraction updated by physics units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -261,7 +261,7 @@ standard_name = air_temperature_updated_by_physics long_name = air temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -270,7 +270,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -279,7 +279,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -288,7 +288,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -297,7 +297,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -306,7 +306,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -315,7 +315,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between mid-layers units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -324,7 +324,7 @@ standard_name = lwe_thickness_of_explicit_rain_amount long_name = explicit rain on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -333,7 +333,7 @@ standard_name = lwe_thickness_of_ice_amount long_name = ice fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -342,7 +342,7 @@ standard_name = lwe_thickness_of_snow_amount long_name = snow fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -351,7 +351,7 @@ standard_name = lwe_thickness_of_graupel_amount long_name = graupel fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -360,7 +360,7 @@ standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit precipitation (rain, ice, snow, graupel) on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -369,7 +369,7 @@ standard_name = ratio_of_snowfall_to_rainfall long_name = snow ratio: ratio of snow to total precipitation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -411,7 +411,7 @@ standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm units = dBZ - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -436,7 +436,7 @@ standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -445,7 +445,7 @@ standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -454,7 +454,7 @@ standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -463,7 +463,7 @@ standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -472,7 +472,7 @@ standard_name = effective_radius_of_stratiform_cloud_graupel_particle_in_um long_name = eff. radius of cloud graupel particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/gmtb_scm_sfc_flux_spec.meta b/physics/gmtb_scm_sfc_flux_spec.meta index 2dba88b57..71ddff22a 100644 --- a/physics/gmtb_scm_sfc_flux_spec.meta +++ b/physics/gmtb_scm_sfc_flux_spec.meta @@ -11,7 +11,7 @@ standard_name = x_wind_at_lowest_model_layer long_name = x component of 1st model layer wind units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -20,7 +20,7 @@ standard_name = y_wind_at_lowest_model_layer long_name = y component of 1st model layer wind units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -29,7 +29,7 @@ standard_name = height_above_ground_at_lowest_model_layer long_name = height above ground at 1st model layer units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -38,7 +38,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = 1st model layer air temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -47,7 +47,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = 1st model layer specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -56,7 +56,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = Model layer 1 mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -65,7 +65,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -74,7 +74,7 @@ standard_name = specified_kinematic_surface_upward_sensible_heat_flux long_name = specified kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -83,7 +83,7 @@ standard_name = specified_kinematic_surface_upward_latent_heat_flux long_name = specified kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -92,7 +92,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -164,7 +164,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -173,7 +173,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux long_name = surface upward evaporation flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -182,7 +182,7 @@ standard_name = surface_friction_velocity long_name = boundary layer parameter units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -191,7 +191,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -200,7 +200,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air long_name = surface exchange coeff for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -209,7 +209,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air long_name = surface exchange coeff heat & moisture units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -218,7 +218,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -227,7 +227,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -236,7 +236,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -245,7 +245,7 @@ standard_name = x_wind_at_10m long_name = 10 meter u wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -254,7 +254,7 @@ standard_name = y_wind_at_10m long_name = 10 meter v wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -263,7 +263,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -272,7 +272,7 @@ standard_name = surface_specific_humidity long_name = surface air saturation specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -281,7 +281,7 @@ standard_name = temperature_at_2m long_name = 2 meter temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -290,7 +290,7 @@ standard_name = specific_humidity_at_2m long_name = 2 meter specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/gscond.meta b/physics/gscond.meta index 9012cc650..7cab7298d 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -45,7 +45,7 @@ standard_name = air_pressure long_name = layer mean air pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -54,7 +54,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -72,7 +72,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics long_name = moist cloud condensed water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -99,7 +99,7 @@ standard_name = air_temperature_updated_by_physics long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -108,7 +108,7 @@ standard_name = air_temperature_two_time_steps_back long_name = air temperature two time steps back units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -117,7 +117,7 @@ standard_name = water_vapor_specific_humidity_two_time_steps_back long_name = water vapor specific humidity two time steps back units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -126,7 +126,7 @@ standard_name = surface_air_pressure_two_time_steps_back long_name = surface air pressure two time steps back units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -135,7 +135,7 @@ standard_name = air_temperature_at_previous_time_step long_name = air temperature at previous time step units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -144,7 +144,7 @@ standard_name = water_vapor_specific_humidity_at_previous_time_step long_name = water vapor specific humidity at previous time step units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -153,7 +153,7 @@ standard_name = surface_air_pressure_at_previous_time_step long_name = surface air surface pressure at previous time step units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -162,7 +162,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/gwdc.meta b/physics/gwdc.meta index 30f5fcbfd..5c3fa63d6 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -28,7 +28,7 @@ standard_name = cell_size long_name = grid size in zonal direction units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -37,7 +37,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes long_name = grid size related coefficient used in scale-sensitive schemes units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -46,7 +46,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes_complement long_name = complement to work1 units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -55,7 +55,7 @@ standard_name = characteristic_grid_length_scale long_name = representative horizontal length scale of grid box units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -64,7 +64,7 @@ standard_name = cloud_area_fraction long_name = fraction of grid box area in which updrafts occur units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -81,7 +81,7 @@ standard_name = vertical_index_at_cloud_base long_name = vertical index at cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -89,7 +89,7 @@ standard_name = vertical_index_at_cloud_top long_name = vertical index at cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -106,7 +106,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -115,7 +115,7 @@ standard_name = air_temperature_save long_name = air temperature before entering convection scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -124,7 +124,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -133,7 +133,7 @@ standard_name = maximum_column_heating_rate long_name = maximum heating rate in column units = K s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -202,7 +202,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -211,7 +211,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -220,7 +220,7 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -229,7 +229,7 @@ standard_name = water_vapor_specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -247,7 +247,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -256,7 +256,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -265,7 +265,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -274,7 +274,7 @@ standard_name = maximum_column_heating_rate long_name = maximum heating rate in column units = K s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -283,7 +283,7 @@ standard_name = vertical_index_at_cloud_top long_name = vertical index at cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -291,7 +291,7 @@ standard_name = vertical_index_at_cloud_base long_name = vertical index at cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -299,7 +299,7 @@ standard_name = flag_deep_convection long_name = flag indicating whether convection occurs in column (0 or 1) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -307,7 +307,7 @@ standard_name = cloud_area_fraction long_name = fraction of grid box area in which updrafts occur units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -361,7 +361,7 @@ standard_name = characteristic_grid_length_scale long_name = representative horizontal length scale of grid box units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -395,7 +395,7 @@ standard_name = tendency_of_x_wind_due_to_convective_gravity_wave_drag long_name = zonal wind tendency due to convective gravity wave drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -404,7 +404,7 @@ standard_name = tendency_of_y_wind_due_to_convective_gravity_wave_drag long_name = meridional wind tendency due to convective gravity wave drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -413,7 +413,7 @@ standard_name = instantaneous_x_stress_due_to_gravity_wave_drag long_name = zonal stress at cloud top due to convective gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -422,7 +422,7 @@ standard_name = instantaneous_y_stress_due_to_gravity_wave_drag long_name = meridional stress at cloud top due to convective gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -518,7 +518,7 @@ standard_name = instantaneous_x_stress_due_to_gravity_wave_drag long_name = zonal stress at cloud top due to convective gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -527,7 +527,7 @@ standard_name = instantaneous_y_stress_due_to_gravity_wave_drag long_name = meridional stress at cloud top due to convective gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -536,7 +536,7 @@ standard_name = tendency_of_x_wind_due_to_convective_gravity_wave_drag long_name = zonal wind tendency due to convective gravity wave drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -545,7 +545,7 @@ standard_name = tendency_of_y_wind_due_to_convective_gravity_wave_drag long_name = meridional wind tendency due to convective gravity wave drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -554,7 +554,7 @@ standard_name = time_integral_of_x_stress_due_to_gravity_wave_drag long_name = integral over time of zonal stress due to gravity wave drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -563,7 +563,7 @@ standard_name = time_integral_of_y_stress_due_to_gravity_wave_drag long_name = integral over time of meridional stress due to gravity wave drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -572,7 +572,7 @@ standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in zonal wind due to convective gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -581,7 +581,7 @@ standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in meridional wind due to convective gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -590,7 +590,7 @@ standard_name = x_wind_updated_by_physics long_name = updated zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -599,7 +599,7 @@ standard_name = y_wind_updated_by_physics long_name = updated meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -608,7 +608,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/gwdps.meta b/physics/gwdps.meta index 401024729..1935e9991 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -27,7 +27,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -36,7 +36,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -45,7 +45,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -54,7 +54,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = air_temperature long_name = mid-layer temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = water_vapor_specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = vertical index at top atmospheric boundary layer units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -98,7 +98,7 @@ standard_name = air_pressure_at_interface long_name = interface pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -116,7 +116,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -125,7 +125,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = mid-layer Exner function units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -134,7 +134,7 @@ standard_name = geopotential_at_interface long_name = interface geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -143,7 +143,7 @@ standard_name = geopotential long_name = mid-layer geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -169,7 +169,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -178,7 +178,7 @@ standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -187,7 +187,7 @@ standard_name = asymmetry_of_subgrid_orography long_name = asymmetry of subgrid orography units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -196,7 +196,7 @@ standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height units = frac - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -205,7 +205,7 @@ standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with respect to east of maximum subgrid orographic variations units = degree - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -214,7 +214,7 @@ standard_name = slope_of_subgrid_orography long_name = slope of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -223,7 +223,7 @@ standard_name = anisotropy_of_subgrid_orography long_name = anisotropy of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -232,7 +232,7 @@ standard_name = maximum_subgrid_orography long_name = maximum of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -241,7 +241,7 @@ standard_name = instantaneous_x_stress_due_to_gravity_wave_drag long_name = zonal surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -250,7 +250,7 @@ standard_name = instantaneous_y_stress_due_to_gravity_wave_drag long_name = meridional surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -344,7 +344,7 @@ standard_name = level_of_dividing_streamline long_name = level of the dividing streamline units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/h2ophys.meta b/physics/h2ophys.meta index 27476ae08..62db330f4 100644 --- a/physics/h2ophys.meta +++ b/physics/h2ophys.meta @@ -44,7 +44,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -62,7 +62,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = h2o_forcing long_name = water forcing data units = various - dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + dimensions = (horizontal_loop_extent,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) type = real kind = kind_phys intent = in diff --git a/physics/lsm_ruc_sfc_sice_interstitial.meta b/physics/lsm_ruc_sfc_sice_interstitial.meta index d78343422..d7a5736a5 100644 --- a/physics/lsm_ruc_sfc_sice_interstitial.meta +++ b/physics/lsm_ruc_sfc_sice_interstitial.meta @@ -43,7 +43,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -51,7 +51,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -59,7 +59,7 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -68,7 +68,7 @@ standard_name = soil_temperature_for_land_surface_model long_name = soil temperature for land surface model units = K - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys intent = in @@ -77,7 +77,7 @@ standard_name = internal_ice_temperature long_name = sea ice internal temperature units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) + dimensions = (horizontal_loop_extent,ice_vertical_dimension) type = real kind = kind_phys intent = inout @@ -146,7 +146,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -154,7 +154,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = inout optional = F @@ -162,7 +162,7 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = in @@ -171,7 +171,7 @@ standard_name = soil_temperature_for_land_surface_model long_name = soil temperature for land surface model units = K - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys intent = inout @@ -180,7 +180,7 @@ standard_name = internal_ice_temperature long_name = sea ice internal temperature units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) + dimensions = (horizontal_loop_extent,ice_vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/m_micro.meta b/physics/m_micro.meta index f61e6511f..8acd23cda 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -339,7 +339,7 @@ standard_name = air_pressure long_name = layer mean pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -348,7 +348,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -357,7 +357,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -366,7 +366,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -375,7 +375,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -384,7 +384,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -393,7 +393,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -402,7 +402,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -411,7 +411,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -420,7 +420,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -429,7 +429,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -438,7 +438,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -447,7 +447,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -456,7 +456,7 @@ standard_name = land_area_fraction_for_microphysics long_name = land area fraction used in microphysics schemes units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -465,7 +465,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = pbl height units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -474,7 +474,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -483,7 +483,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -492,7 +492,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -501,7 +501,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -510,7 +510,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -519,7 +519,7 @@ standard_name = cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc x momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -528,7 +528,7 @@ standard_name = cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc y momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -537,7 +537,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -546,7 +546,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -555,7 +555,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -564,7 +564,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -573,7 +573,7 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -582,7 +582,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -591,7 +591,7 @@ standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -600,7 +600,7 @@ standard_name = ice_water_mixing_ratio_updated_by_physics long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -609,7 +609,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -618,7 +618,7 @@ standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -627,7 +627,7 @@ standard_name = ratio_of_snowfall_to_rainfall long_name = snow ratio: ratio of snow to total precipitation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -636,7 +636,7 @@ standard_name = cloud_droplet_number_concentration_updated_by_physics long_name = number concentration of cloud droplets updated by physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -645,7 +645,7 @@ standard_name = ice_number_concentration_updated_by_physics long_name = number concentration of ice updated by physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -662,7 +662,7 @@ standard_name = local_rain_water_mixing_ratio long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -671,7 +671,7 @@ standard_name = local_snow_water_mixing_ratio long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -680,7 +680,7 @@ standard_name = local_graupel_mixing_ratio long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -689,7 +689,7 @@ standard_name = local_rain_number_concentration long_name = number concentration of rain local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -698,7 +698,7 @@ standard_name = local_snow_number_concentration long_name = number concentration of snow local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -707,7 +707,7 @@ standard_name = local_graupel_number_concentration long_name = number concentration of graupel local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -716,7 +716,7 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -725,7 +725,7 @@ standard_name = vertical_index_at_cloud_base long_name = vertical index at cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -733,7 +733,7 @@ standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = effective radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -742,7 +742,7 @@ standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = effective radius of cloud ice water particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -751,7 +751,7 @@ standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -760,7 +760,7 @@ standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -769,7 +769,7 @@ standard_name = effective_radius_of_stratiform_cloud_graupel_particle_in_um long_name = effective radius of cloud graupel particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -778,7 +778,7 @@ standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in @@ -787,7 +787,7 @@ standard_name = in_number_concentration long_name = IN number concentration units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -796,7 +796,7 @@ standard_name = ccn_number_concentration long_name = CCN number concentration units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -855,7 +855,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -864,7 +864,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -873,7 +873,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index ec0944f28..7961cb2db 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -59,7 +59,7 @@ standard_name = ice_water_mixing_ratio_updated_by_physics long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -68,7 +68,7 @@ standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -77,7 +77,7 @@ standard_name = rain_water_mixing_ratio_updated_by_physics long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -86,7 +86,7 @@ standard_name = snow_water_mixing_ratio_updated_by_physics long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -95,7 +95,7 @@ standard_name = graupel_mixing_ratio_updated_by_physics long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -104,7 +104,7 @@ standard_name = rain_number_concentration_updated_by_physics long_name = number concentration of rain updated by physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -113,7 +113,7 @@ standard_name = snow_number_concentration_updated_by_physics long_name = number concentration of snow updated by physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -122,7 +122,7 @@ standard_name = graupel_number_concentration_updated_by_physics long_name = number concentration of graupel updated by physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -131,7 +131,7 @@ standard_name = subgrid_scale_cloud_fraction_from_shoc long_name = subgrid-scale cloud fraction from the SHOC scheme units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -140,7 +140,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -149,7 +149,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = local_rain_water_mixing_ratio long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -194,7 +194,7 @@ standard_name = local_snow_water_mixing_ratio long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -203,7 +203,7 @@ standard_name = local_graupel_mixing_ratio long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -212,7 +212,7 @@ standard_name = local_rain_number_concentration long_name = number concentration of rain local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -221,7 +221,7 @@ standard_name = local_snow_number_concentration long_name = number concentration of snow local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -230,7 +230,7 @@ standard_name = local_graupel_number_concentration long_name = number concentration of graupel local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -239,7 +239,7 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -248,7 +248,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -257,7 +257,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -266,7 +266,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -335,7 +335,7 @@ standard_name = local_rain_number_concentration long_name = number concentration of rain local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -344,7 +344,7 @@ standard_name = local_snow_number_concentration long_name = number concentration of snow local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -353,7 +353,7 @@ standard_name = local_graupel_number_concentration long_name = number concentration of graupel local to physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -362,7 +362,7 @@ standard_name = local_rain_water_mixing_ratio long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -371,7 +371,7 @@ standard_name = local_snow_water_mixing_ratio long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -380,7 +380,7 @@ standard_name = local_graupel_mixing_ratio long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -389,7 +389,7 @@ standard_name = ice_water_mixing_ratio_updated_by_physics long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -398,7 +398,7 @@ standard_name = rain_water_mixing_ratio_updated_by_physics long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -407,7 +407,7 @@ standard_name = snow_water_mixing_ratio_updated_by_physics long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -416,7 +416,7 @@ standard_name = graupel_mixing_ratio_updated_by_physics long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -425,7 +425,7 @@ standard_name = rain_number_concentration_updated_by_physics long_name = number concentration of rain updated by physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -434,7 +434,7 @@ standard_name = snow_number_concentration_updated_by_physics long_name = number concentration of snow updated by physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -443,7 +443,7 @@ standard_name = graupel_number_concentration_updated_by_physics long_name = number concentration of graupel updated by physics units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -452,7 +452,7 @@ standard_name = lwe_thickness_of_ice_amount_on_dynamics_timestep long_name = ice fall at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -461,7 +461,7 @@ standard_name = lwe_thickness_of_snow_amount_on_dynamics_timestep long_name = snow fall at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -470,7 +470,7 @@ standard_name = lwe_thickness_of_graupel_amount_on_dynamics_timestep long_name = graupel fall at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/maximum_hourly_diagnostics.meta b/physics/maximum_hourly_diagnostics.meta index 48223113c..67b3df039 100644 --- a/physics/maximum_hourly_diagnostics.meta +++ b/physics/maximum_hourly_diagnostics.meta @@ -84,7 +84,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -93,7 +93,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -102,7 +102,7 @@ standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm units = dBZ - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -111,7 +111,7 @@ standard_name = maximum_reflectivity_at_1km_agl_over_maximum_hourly_time_interval long_name = maximum reflectivity at 1km agl over maximum hourly time interval units = dBZ - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -120,7 +120,7 @@ standard_name = maximum_reflectivity_at_minus10c_over_maximum_hourly_time_interval long_name = maximum reflectivity at minus10c over maximum hourly time interval units = dBZ - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -129,7 +129,7 @@ standard_name = x_wind_at_10m long_name = 10 meter u wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -138,7 +138,7 @@ standard_name = y_wind_at_10m long_name = 10 meter v wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -147,7 +147,7 @@ standard_name = maximum_u_wind_at_10m_over_maximum_hourly_time_interval long_name = maximum u wind at 10m over maximum hourly time interval units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -156,7 +156,7 @@ standard_name = maximum_v_wind_at_10m_over_maximum_hourly_time_interval long_name = maximum v wind at 10m over maximum hourly time interval units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -165,7 +165,7 @@ standard_name = maximum_wind_at_10m_over_maximum_hourly_time_interval long_name = maximum wind at 10m over maximum hourly time interval units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -174,7 +174,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -183,7 +183,7 @@ standard_name = temperature_at_2m long_name = 2 meter temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -192,7 +192,7 @@ standard_name = specific_humidity_at_2m long_name = 2 meter specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -201,7 +201,7 @@ standard_name = maximum_temperature_at_2m_over_maximum_hourly_time_interval long_name = maximum temperature at 2m over maximum hourly time interval units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -210,7 +210,7 @@ standard_name = minimum_temperature_at_2m_over_maximum_hourly_time_interval long_name = minumum temperature at 2m over maximum hourly time interval units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -219,7 +219,7 @@ standard_name = maximum_relative_humidity_at_2m_over_maximum_hourly_time_interval long_name = maximum relative humidity at 2m over maximum hourly time interval units = % - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -228,7 +228,7 @@ standard_name = minimum_relative_humidity_at_2m_over_maximum_hourly_time_interval long_name = minumum relative humidity at 2m over maximum hourly time interval units = % - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index 356ce74a9..6d34ef64e 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -116,7 +116,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -125,7 +125,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -134,7 +134,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -143,7 +143,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -152,7 +152,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -161,7 +161,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -170,7 +170,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -179,7 +179,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -188,7 +188,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at lowest model interface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -197,7 +197,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_layer long_name = dimensionless Exner function at lowest model layer units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -206,7 +206,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -215,7 +215,7 @@ standard_name = surface_skin_temperature long_name = surface temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -224,7 +224,7 @@ standard_name = surface_specific_humidity long_name = surface air saturation specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -233,7 +233,7 @@ standard_name = surface_specific_humidity_for_MYJ_schemes long_name = surface air saturation specific humidity for MYJ schem units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -242,7 +242,7 @@ standard_name = potential_temperature_at_viscous_sublayer_top long_name = potential temperat at viscous sublayer top over water units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -251,7 +251,7 @@ standard_name = specific_humidity_at_viscous_sublayer_top long_name = specific humidity at_viscous sublayer top over water units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -260,7 +260,7 @@ standard_name = u_wind_component_at_viscous_sublayer_top long_name = u wind component at viscous sublayer top over water units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -269,7 +269,7 @@ standard_name = v_wind_component_at_viscous_sublayer_top long_name = v wind component at viscous sublayer top over water units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -278,7 +278,7 @@ standard_name = baseline_surface_roughness_length long_name = baseline surface roughness length for momentum in mete units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -287,7 +287,7 @@ standard_name = heat_exchange_coefficient_for_MYJ_schemes long_name = surface heat exchange_coefficient for MYJ schemes units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -296,7 +296,7 @@ standard_name = momentum_exchange_coefficient_for_MYJ_schemes long_name = surface momentum exchange_coefficient for MYJ schemes units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -305,7 +305,7 @@ standard_name = surface_layer_evaporation_switch long_name = surface layer evaporation switch units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -314,7 +314,7 @@ standard_name = kinematic_surface_latent_heat_flux long_name = kinematic surface latent heat flux units = m s-1 kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -323,7 +323,7 @@ standard_name = weight_for_momentum_at_viscous_sublayer_top long_name = Weight for momentum at viscous layer top units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -332,7 +332,7 @@ standard_name = weight_for_potental_temperature_at_viscous_sublayer_top long_name = Weight for potental temperature at viscous layer top units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -341,7 +341,7 @@ standard_name = weight_for_specific_humidity_at_viscous_sublayer_top long_name = Weight for Specfic Humidity at viscous layer top units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -350,7 +350,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -359,7 +359,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -367,7 +367,7 @@ standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -375,7 +375,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -384,7 +384,7 @@ standard_name = cell_area long_name = area of the grid cell units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -393,7 +393,7 @@ standard_name = surface_friction_velocity long_name = boundary layer parameter units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -402,7 +402,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air long_name = surface exchange coeff for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -411,7 +411,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air long_name = surface exchange coeff heat & moisture units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -420,7 +420,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -429,7 +429,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -438,7 +438,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -447,7 +447,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -456,7 +456,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -465,7 +465,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -474,7 +474,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -483,7 +483,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -492,7 +492,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers PBL vertical diff units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -501,7 +501,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -510,7 +510,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -519,7 +519,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -528,7 +528,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -537,7 +537,7 @@ standard_name = atmosphere_heat_diffusivity long_name = diffusivity for heat units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension_minus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) type = real kind = kind_phys intent = out @@ -573,7 +573,7 @@ standard_name = countergradient_mixing_term_for_temperature long_name = countergradient mixing term for temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -582,7 +582,7 @@ standard_name = countergradient_mixing_term_for_water_vapor long_name = countergradient mixing term for water vapor units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index 8938aeccd..e1e6ab2b9 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -107,7 +107,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -115,7 +115,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -124,7 +124,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -133,7 +133,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -142,7 +142,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -151,7 +151,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -160,7 +160,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -169,7 +169,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -178,7 +178,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at lowest model interface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -187,7 +187,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_layer long_name = dimensionless Exner function at lowest model layer units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -196,7 +196,7 @@ standard_name = surface_skin_temperature long_name = surface temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -205,7 +205,7 @@ standard_name = surface_specific_humidity long_name = surface air saturation specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -214,7 +214,7 @@ standard_name = surface_specific_humidity_for_MYJ_schemes long_name = surface air saturation specific humidity for MYJ schem units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -223,7 +223,7 @@ standard_name = potential_temperature_at_viscous_sublayer_top long_name = potential temperat at viscous sublayer top over water units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -232,7 +232,7 @@ standard_name = specific_humidity_at_viscous_sublayer_top long_name = specific humidity at_viscous sublayer top over water units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -241,7 +241,7 @@ standard_name = u_wind_component_at_viscous_sublayer_top long_name = u wind component at viscous sublayer top over water units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -250,7 +250,7 @@ standard_name = v_wind_component_at_viscous_sublayer_top long_name = v wind component at viscous sublayer top over water units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -259,7 +259,7 @@ standard_name = baseline_surface_roughness_length long_name = baseline surface roughness length for momentum in mete units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -268,7 +268,7 @@ standard_name = heat_exchange_coefficient_for_MYJ_schemes long_name = surface heat exchange_coefficient for MYJ schemes units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -277,7 +277,7 @@ standard_name = momentum_exchange_coefficient_for_MYJ_schemes long_name = surface momentum exchange_coefficient for MYJ schemes units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -286,7 +286,7 @@ standard_name = surface_layer_evaporation_switch long_name = surface layer evaporation switch units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -295,7 +295,7 @@ standard_name = kinematic_surface_latent_heat_flux long_name = kinematic surface latent heat flux units = m s-1 kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -304,7 +304,7 @@ standard_name = weight_for_momentum_at_viscous_sublayer_top long_name = Weight for momentum at viscous layer top units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -313,7 +313,7 @@ standard_name = weight_for_potental_temperature_at_viscous_sublayer_top long_name = Weight for potental temperature at viscous layer top units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -322,7 +322,7 @@ standard_name = weight_for_specific_humidity_at_viscous_sublayer_top long_name = Weight for Specfic Humidity at viscous layer top units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -331,7 +331,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -340,7 +340,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -349,7 +349,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -358,7 +358,7 @@ standard_name = surface_friction_velocity long_name = boundary layer parameter units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -367,7 +367,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -376,7 +376,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air long_name = surface exchange coeff for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -385,7 +385,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air long_name = surface exchange coeff heat & moisture units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -394,7 +394,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -403,7 +403,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin_Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -412,7 +412,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin_Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -421,7 +421,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m long_name = Monin_Obukhov similarity parameter for momentum at 10m units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -430,7 +430,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m long_name = Monin_Obukhov similarity parameter for heat at 2m units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -439,7 +439,7 @@ standard_name = land_area_fraction long_name = fraction of horizontal grid area occupied by land units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -448,7 +448,7 @@ standard_name = lake_area_fraction long_name = fraction of horizontal grid area occupied by lake units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -457,7 +457,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -466,7 +466,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -475,7 +475,7 @@ standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -484,7 +484,7 @@ standard_name = surface_roughness_length_over_land_interstitial long_name = surface roughness length over land (interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -493,7 +493,7 @@ standard_name = surface_roughness_length_over_ice_interstitial long_name = surface roughness length over ice (interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -502,7 +502,7 @@ standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -511,7 +511,7 @@ standard_name = surface_friction_velocity_over_land long_name = surface friction velocity over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -520,7 +520,7 @@ standard_name = surface_friction_velocity_over_ice long_name = surface friction velocity over ice units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -529,7 +529,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -538,7 +538,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_land long_name = surface exchange coeff for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -547,7 +547,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice long_name = surface exchange coeff for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -556,7 +556,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -565,7 +565,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land long_name = surface exchange coeff heat & moisture over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -574,7 +574,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice long_name = surface exchange coeff heat & moisture over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -583,7 +583,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean long_name = bulk Richardson number at the surface over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -592,7 +592,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_land long_name = bulk Richardson number at the surface over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -601,7 +601,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_ice long_name = bulk Richardson number at the surface over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -610,7 +610,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -619,7 +619,7 @@ standard_name = surface_wind_stress_over_land long_name = surface wind stress over land units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -628,7 +628,7 @@ standard_name = surface_wind_stress_over_ice long_name = surface wind stress over ice units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -637,7 +637,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity funct for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -646,7 +646,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_land long_name = Monin-Obukhov similarity funct for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -655,7 +655,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ice long_name = Monin-Obukhov similarity funct for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -664,7 +664,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean long_name = Monin-Obukhov similarity function for heat over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -673,7 +673,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_land long_name = Monin-Obukhov similarity function for heat over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -682,7 +682,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_ice long_name = Monin-Obukhov similarity function for heat over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -691,7 +691,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean long_name = Monin-Obukhov parameter for momentum at 10m over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -700,7 +700,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_land long_name = Monin-Obukhov parameter for momentum at 10m over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -709,7 +709,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ice long_name = Monin-Obukhov parameter for momentum at 10m over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -718,7 +718,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean long_name = Monin-Obukhov parameter for heat at 2m over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -727,7 +727,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_land long_name = Monin-Obukhov parameter for heat at 2m over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -736,7 +736,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ice long_name = Monin-Obukhov parameter for heat at 2m over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -745,7 +745,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index c51b6f0f7..4f2bc5cea 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -131,7 +131,7 @@ standard_name = cell_size long_name = size of the grid cell units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -140,7 +140,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -149,7 +149,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -158,7 +158,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -167,7 +167,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -203,7 +203,7 @@ standard_name = cloud_condensed_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -212,7 +212,7 @@ standard_name = ice_water_mixing_ratio long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -221,7 +221,7 @@ standard_name = cloud_droplet_number_concentration long_name = number concentration of cloud droplets (liquid) units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -230,7 +230,7 @@ standard_name = ice_number_concentration long_name = number concentration of ice units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -239,7 +239,7 @@ standard_name = ozone_mixing_ratio long_name = ozone mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -248,7 +248,7 @@ standard_name = water_friendly_aerosol_number_concentration long_name = number concentration of water-friendly aerosols units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -257,7 +257,7 @@ standard_name = ice_friendly_aerosol_number_concentration long_name = number concentration of ice-friendly aerosols units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -266,7 +266,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -275,7 +275,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -284,7 +284,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -293,7 +293,7 @@ standard_name = surface_skin_temperature long_name = surface temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -302,7 +302,7 @@ standard_name = surface_specific_humidity long_name = surface air saturation specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -311,7 +311,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -320,7 +320,7 @@ standard_name = surface_friction_velocity long_name = boundary layer parameter units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -329,7 +329,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air long_name = momentum exchange coefficient units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -338,7 +338,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -347,7 +347,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -356,7 +356,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -365,7 +365,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -374,7 +374,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux valid for current call units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -383,7 +383,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux valid for current call units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -392,7 +392,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = surface momentum flux in the x-direction valid for current call units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -401,7 +401,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = surface momentum flux in the y-direction valid for current call units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -410,7 +410,7 @@ standard_name = instantaneous_surface_x_momentum_flux_for_diag long_name = instantaneous sfc x momentum flux multiplied by timestep units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -419,7 +419,7 @@ standard_name = instantaneous_surface_y_momentum_flux_for_diag long_name = instantaneous sfc y momentum flux multiplied by timestep units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -428,7 +428,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux_for_diag long_name = instantaneous sfc sensible heat flux multiplied by timestep units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -437,7 +437,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux_for_diag long_name = instantaneous sfc latent heat flux multiplied by timestep units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -446,7 +446,7 @@ standard_name = cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc x momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -455,7 +455,7 @@ standard_name = cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc y momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -464,7 +464,7 @@ standard_name = cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc sensible heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -473,7 +473,7 @@ standard_name = cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestep long_name = cumulative sfc latent heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -482,7 +482,7 @@ standard_name = surface_x_momentum_flux_for_coupling long_name = sfc x momentum flux for coupling units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -491,7 +491,7 @@ standard_name = surface_y_momentum_flux_for_coupling long_name = sfc y momentum flux for coupling units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -500,7 +500,7 @@ standard_name = surface_upward_sensible_heat_flux_for_coupling long_name = sfc sensible heat flux for coupling units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -509,7 +509,7 @@ standard_name = surface_upward_latent_heat_flux_for_coupling long_name = sfc latent heat flux for coupling units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -518,7 +518,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -527,7 +527,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -536,7 +536,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -545,7 +545,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -554,7 +554,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -563,7 +563,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -571,7 +571,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -579,7 +579,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -587,7 +587,7 @@ standard_name = instantaneous_surface_x_momentum_flux_for_coupling long_name = instantaneous sfc u momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -596,7 +596,7 @@ standard_name = instantaneous_surface_y_momentum_flux_for_coupling long_name = instantaneous sfc v momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -605,7 +605,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux_for_coupling long_name = instantaneous sfc sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -614,7 +614,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux_for_coupling long_name = instantaneous sfc latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -623,7 +623,7 @@ standard_name = cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc u momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -632,7 +632,7 @@ standard_name = cumulative_surface_y_momentum_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc v momentum flux multiplied by timestep units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -641,7 +641,7 @@ standard_name = cumulative_surface_upward_sensible_heat_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc sensible heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -650,7 +650,7 @@ standard_name = cumulative_surface_upward_latent_heat_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc latent heat flux multiplied by timestep units = W m-2 s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -659,7 +659,7 @@ standard_name = reciprocal_of_obukhov_length long_name = one over obukhov length units = m-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -668,7 +668,7 @@ standard_name = tke_at_mass_points long_name = 2 x tke at mass points units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -677,7 +677,7 @@ standard_name = turbulent_kinetic_energy long_name = turbulent kinetic energy units = J - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -686,7 +686,7 @@ standard_name = t_prime_squared long_name = temperature fluctuation squared units = K2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -695,7 +695,7 @@ standard_name = q_prime_squared long_name = water vapor fluctuation squared units = kg2 kg-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -704,7 +704,7 @@ standard_name = t_prime_q_prime long_name = covariance of temperature and moisture units = K kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -713,7 +713,7 @@ standard_name = mixing_length long_name = mixing length in meters units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -722,7 +722,7 @@ standard_name = stability_function_for_heat long_name = stability function for heat units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -731,7 +731,7 @@ standard_name = atmosphere_heat_diffusivity_for_mynnpbl long_name = diffusivity for heat for MYNN PBL (defined for all mass levels) units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -740,7 +740,7 @@ standard_name = atmosphere_momentum_diffusivity_for_mynnpbl long_name = diffusivity for momentum for MYNN PBL (defined for all mass levels) units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -749,7 +749,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -758,7 +758,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -766,7 +766,7 @@ standard_name = subgrid_cloud_water_mixing_ratio_pbl long_name = subgrid cloud water mixing ratio from PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -775,7 +775,7 @@ standard_name = subgrid_cloud_ice_mixing_ratio_pbl long_name = subgrid cloud ice mixing ratio from PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -784,7 +784,7 @@ standard_name = subgrid_cloud_fraction_pbl long_name = subgrid cloud fraction from PBL scheme units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -793,7 +793,7 @@ standard_name = emdf_updraft_area long_name = updraft area from mass flux scheme units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -802,7 +802,7 @@ standard_name = emdf_updraft_vertical_velocity long_name = updraft vertical velocity from mass flux scheme units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -811,7 +811,7 @@ standard_name = emdf_updraft_total_water long_name = updraft total water from mass flux scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -820,7 +820,7 @@ standard_name = emdf_updraft_theta_l long_name = updraft theta-l from mass flux scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -829,7 +829,7 @@ standard_name = emdf_updraft_entrainment_rate long_name = updraft entrainment rate from mass flux scheme units = s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -838,7 +838,7 @@ standard_name = emdf_updraft_cloud_water long_name = updraft cloud water from mass flux scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -847,7 +847,7 @@ standard_name = theta_subsidence_tendency long_name = updraft theta subsidence tendency units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -856,7 +856,7 @@ standard_name = water_vapor_subsidence_tendency long_name = updraft water vapor subsidence tendency units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -865,7 +865,7 @@ standard_name = theta_detrainment_tendency long_name = updraft theta detrainment tendency units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -874,7 +874,7 @@ standard_name = water_vapor_detrainment_tendency long_name = updraft water vapor detrainment tendency units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -883,7 +883,7 @@ standard_name = number_of_plumes long_name = number of plumes per grid column units = count - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -891,7 +891,7 @@ standard_name = maximum_mass_flux long_name = maximum mass flux within a column units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -900,7 +900,7 @@ standard_name = k_level_of_highest_plume long_name = k-level of highest plume units = count - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -908,7 +908,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -917,7 +917,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -926,7 +926,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -935,7 +935,7 @@ standard_name = tendency_of_water_vapor_specific_humidity_due_to_model_physics long_name = water vapor specific humidity tendency due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -944,7 +944,7 @@ standard_name = tendency_of_liquid_cloud_water_mixing_ratio_due_to_model_physics long_name = cloud condensed water mixing ratio tendency due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -953,7 +953,7 @@ standard_name = tendency_of_ice_cloud_water_mixing_ratio_due_to_model_physics long_name = cloud condensed water mixing ratio tendency due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -962,7 +962,7 @@ standard_name = tendency_of_ozone_mixing_ratio_due_to_model_physics long_name = ozone mixing ratio tendency due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -971,7 +971,7 @@ standard_name = tendency_of_cloud_droplet_number_concentration_due_to_model_physics long_name = number conc. of cloud droplets (liquid) tendency due to model physics units = kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -980,7 +980,7 @@ standard_name = tendency_of_ice_number_concentration_due_to_model_physics long_name = number conc. of ice tendency due to model physics units = kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -989,7 +989,7 @@ standard_name = tendency_of_water_friendly_aerosol_number_concentration_due_to_model_physics long_name = number conc. of water-friendly aerosols tendency due to model physics units = kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -998,7 +998,7 @@ standard_name = tendency_of_ice_friendly_aerosol_number_concentration_due_to_model_physics long_name = number conc. of ice-friendly aerosols tendency due to model physics units = kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1007,7 +1007,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1016,7 +1016,7 @@ standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in x wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1025,7 +1025,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1034,7 +1034,7 @@ standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1043,7 +1043,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1052,7 +1052,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1061,7 +1061,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1070,7 +1070,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1079,7 +1079,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1088,7 +1088,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 59df18419..6a410c297 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -67,7 +67,7 @@ standard_name = bounded_vegetation_area_fraction long_name = areal fractional cover of green vegetation bounded on the bottom units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -76,7 +76,7 @@ standard_name = vegetation_type_classification long_name = vegetation type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -84,7 +84,7 @@ standard_name = maximum_vegetation_area_fraction long_name = max fractnl cover of green veg units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = perturbation_of_momentum_roughness_length long_name = perturbation of momentum roughness length units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -110,7 +110,7 @@ standard_name = perturbation_of_heat_to_momentum_roughness_length_ratio long_name = perturbation of heat to momentum roughness length ratio units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -144,7 +144,7 @@ standard_name = cell_size long_name = size of the grid cell units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -153,7 +153,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -162,7 +162,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -171,7 +171,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -180,7 +180,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -189,7 +189,7 @@ standard_name = cloud_condensed_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -198,7 +198,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -207,7 +207,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -216,7 +216,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -225,7 +225,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -234,7 +234,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -243,7 +243,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -260,7 +260,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -268,7 +268,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -276,7 +276,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -285,7 +285,7 @@ standard_name = surface_skin_temperature_over_land_interstitial long_name = surface skin temperature over land (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -294,7 +294,7 @@ standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -303,7 +303,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -312,7 +312,7 @@ standard_name = surface_skin_temperature_after_iteration_over_land long_name = surface skin temperature after iteration over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -321,7 +321,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ice long_name = surface skin temperature after iteration over ice units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -330,7 +330,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -339,7 +339,7 @@ standard_name = surface_specific_humidity_over_land long_name = surface air saturation specific humidity over land units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -348,7 +348,7 @@ standard_name = surface_specific_humidity_over_ice long_name = surface air saturation specific humidity over ice units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -357,7 +357,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ocean long_name = water equivalent snow depth over ocean units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -366,7 +366,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -375,7 +375,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -384,7 +384,7 @@ standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -393,7 +393,7 @@ standard_name = surface_roughness_length_over_land_interstitial long_name = surface roughness length over land (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -402,7 +402,7 @@ standard_name = surface_roughness_length_over_ice_interstitial long_name = surface roughness length over ice (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -411,7 +411,7 @@ standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -420,7 +420,7 @@ standard_name = surface_friction_velocity_over_land long_name = surface friction velocity over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -429,7 +429,7 @@ standard_name = surface_friction_velocity_over_ice long_name = surface friction velocity over ice units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -438,7 +438,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -447,7 +447,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_land long_name = surface exchange coeff for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -456,7 +456,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice long_name = surface exchange coeff for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -465,7 +465,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -474,7 +474,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land long_name = surface exchange coeff heat & moisture over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -483,7 +483,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice long_name = surface exchange coeff heat & moisture over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -492,7 +492,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean long_name = bulk Richardson number at the surface over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -501,7 +501,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_land long_name = bulk Richardson number at the surface over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -510,7 +510,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_ice long_name = bulk Richardson number at the surface over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -519,7 +519,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -528,7 +528,7 @@ standard_name = surface_wind_stress_over_land long_name = surface wind stress over land units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -537,7 +537,7 @@ standard_name = surface_wind_stress_over_ice long_name = surface wind stress over ice units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -546,7 +546,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity function for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -555,7 +555,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_land long_name = Monin-Obukhov similarity function for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -564,7 +564,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ice long_name = Monin-Obukhov similarity function for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -573,7 +573,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean long_name = Monin-Obukhov similarity function for heat over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -582,7 +582,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_land long_name = Monin-Obukhov similarity function for heat over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -591,7 +591,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_ice long_name = Monin-Obukhov similarity function for heat over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -600,7 +600,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -609,7 +609,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_land long_name = Monin-Obukhov similarity parameter for momentum at 10m over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -618,7 +618,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ice long_name = Monin-Obukhov similarity parameter for momentum at 10m over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -627,7 +627,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -636,7 +636,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_land long_name = Monin-Obukhov similarity parameter for heat at 2m over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -645,7 +645,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ice long_name = Monin-Obukhov similarity parameter for heat at 2m over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -654,7 +654,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -663,7 +663,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_land long_name = kinematic surface upward sensible heat flux over land units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -672,7 +672,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice long_name = kinematic surface upward sensible heat flux over ice units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -681,7 +681,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -690,7 +690,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_land long_name = kinematic surface upward latent heat flux over land units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -699,7 +699,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ice long_name = kinematic surface upward latent heat flux over ice units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -708,7 +708,7 @@ standard_name = surface_specific_humidity long_name = surface air saturation specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -717,7 +717,7 @@ standard_name = water_vapor_mixing_ratio_at_surface long_name = water vapor mixing ratio at surface units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -726,7 +726,7 @@ standard_name = surface_friction_velocity_drag long_name = friction velocity isolated for momentum only units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -735,7 +735,7 @@ standard_name = surface_stability_parameter long_name = monin obukhov surface stability parameter units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -744,7 +744,7 @@ standard_name = theta_star long_name = temperature flux divided by ustar (temperature scale) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -753,7 +753,7 @@ standard_name = reciprocal_of_obukhov_length long_name = one over obukhov length units = m-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -762,7 +762,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -771,7 +771,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air long_name = momentum exchange coefficient units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -780,7 +780,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -789,7 +789,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -798,7 +798,7 @@ standard_name = surface_latent_heat long_name = latent heating at the surface (pos = up) units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -807,7 +807,7 @@ standard_name = surface_exchange_coefficient_for_heat long_name = surface exchange coefficient for heat units = W m-2 K-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -816,7 +816,7 @@ standard_name = surface_exchange_coefficient_for_moisture long_name = surface exchange coefficient for moisture units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -825,7 +825,7 @@ standard_name = x_wind_at_10m long_name = 10 meter u wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -834,7 +834,7 @@ standard_name = y_wind_at_10m long_name = 10 meter v wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -843,7 +843,7 @@ standard_name = potential_temperature_at_2m long_name = 2 meter potential temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -852,7 +852,7 @@ standard_name = temperature_at_2m long_name = 2 meter temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -861,7 +861,7 @@ standard_name = specific_humidity_at_2m long_name = 2 meter specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -870,7 +870,7 @@ standard_name = surface_wind_enhancement_due_to_convection long_name = surface wind enhancement due to convection units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -879,7 +879,7 @@ standard_name = surface_exchange_coefficient_for_heat_at_2m long_name = exchange coefficient for heat at 2 meters units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -888,7 +888,7 @@ standard_name = surface_exchange_coefficient_for_moisture_at_2m long_name = exchange coefficient for moisture at 2 meters units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/module_SGSCloud_RadPost.meta b/physics/module_SGSCloud_RadPost.meta index 089c770c2..06df85da7 100644 --- a/physics/module_SGSCloud_RadPost.meta +++ b/physics/module_SGSCloud_RadPost.meta @@ -43,7 +43,7 @@ standard_name = cloud_condensed_water_mixing_ratio long_name = no condensates) ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -52,7 +52,7 @@ standard_name = ice_water_mixing_ratio long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -61,7 +61,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -70,7 +70,7 @@ standard_name = ice_water_mixing_ratio_save long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index e74f5f7ee..d8b5fd5da 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -43,7 +43,7 @@ standard_name = cloud_condensed_water_mixing_ratio long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -52,7 +52,7 @@ standard_name = ice_water_mixing_ratio long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -61,7 +61,7 @@ standard_name = water_vapor_specific_humidity long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -70,7 +70,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -79,7 +79,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -88,7 +88,7 @@ standard_name = rain_water_mixing_ratio long_name = moist (dry+vapor, no condensates) mixing ratio of rain water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -97,7 +97,7 @@ standard_name = snow_water_mixing_ratio long_name = moist (dry+vapor, no condensates) mixing ratio of snow water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -106,7 +106,7 @@ standard_name = graupel_mixing_ratio long_name = graupel mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -115,7 +115,7 @@ standard_name = convective_cloud_condesate_after_rainout long_name = convective cloud condesate after rainout units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -140,7 +140,7 @@ standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -149,7 +149,7 @@ standard_name = ice_water_mixing_ratio_save long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) before entering a physics scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -158,7 +158,7 @@ standard_name = subgrid_cloud_water_mixing_ratio_pbl long_name = subgrid cloud water mixing ratio from PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -167,7 +167,7 @@ standard_name = subgrid_cloud_ice_mixing_ratio_pbl long_name = subgrid cloud ice mixing ratio from PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = subgrid_cloud_fraction_pbl long_name = subgrid cloud fraction from PBL scheme units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = layer_pressure_thickness_for_radiation long_name = layer pressure thickness on radiation levels units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -203,7 +203,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -212,7 +212,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -221,7 +221,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -230,7 +230,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -239,7 +239,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -256,7 +256,7 @@ standard_name = air_pressure_at_layer_for_radiation_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -265,7 +265,7 @@ standard_name = latitude long_name = grid latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -274,7 +274,7 @@ standard_name = layer_thickness_for_radiation long_name = layer thickness on radiation levels units = km - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -283,7 +283,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -292,7 +292,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle,high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = inout @@ -301,7 +301,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = inout optional = F @@ -309,7 +309,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = inout optional = F diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 31a26053f..1dfef6e9e 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -74,7 +74,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -83,7 +83,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -92,7 +92,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -101,7 +101,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -110,7 +110,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -119,7 +119,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -128,7 +128,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -137,7 +137,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in @@ -146,7 +146,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -155,7 +155,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -164,7 +164,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -173,7 +173,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the surface interface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -182,7 +182,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -191,7 +191,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -200,7 +200,7 @@ standard_name = x_wind_at_10m long_name = x component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -209,7 +209,7 @@ standard_name = y_wind_at_10m long_name = y component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -218,7 +218,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -227,7 +227,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -236,7 +236,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -245,7 +245,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -254,7 +254,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -263,7 +263,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -272,7 +272,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -281,7 +281,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -289,7 +289,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -298,7 +298,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -307,7 +307,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -316,7 +316,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -325,7 +325,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -334,7 +334,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -360,7 +360,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -369,7 +369,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -378,7 +378,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -387,7 +387,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -396,7 +396,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -405,7 +405,7 @@ standard_name = countergradient_mixing_term_for_temperature long_name = countergradient mixing term for temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -414,7 +414,7 @@ standard_name = countergradient_mixing_term_for_water_vapor long_name = countergradient mixing term for water vapor units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -423,7 +423,7 @@ standard_name = atmosphere_heat_diffusivity long_name = diffusivity for heat units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension_minus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) type = real kind = kind_phys intent = out @@ -432,7 +432,7 @@ standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -541,7 +541,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -550,7 +550,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -559,7 +559,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -568,7 +568,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -577,7 +577,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/moninedmf_hafs.meta b/physics/moninedmf_hafs.meta index d79245330..d6872cf7f 100644 --- a/physics/moninedmf_hafs.meta +++ b/physics/moninedmf_hafs.meta @@ -74,7 +74,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -83,7 +83,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -92,7 +92,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -101,7 +101,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -110,7 +110,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -119,7 +119,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -128,7 +128,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -137,7 +137,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in @@ -146,7 +146,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -155,7 +155,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -164,7 +164,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -173,7 +173,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the surface interface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -182,7 +182,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -191,7 +191,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -200,7 +200,7 @@ standard_name = x_wind_at_10m long_name = x component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -209,7 +209,7 @@ standard_name = y_wind_at_10m long_name = y component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -218,7 +218,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -227,7 +227,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -236,7 +236,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -245,7 +245,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -254,7 +254,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -263,7 +263,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -272,7 +272,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -281,7 +281,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -289,7 +289,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -298,7 +298,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -307,7 +307,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -316,7 +316,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -325,7 +325,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -334,7 +334,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -360,7 +360,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -369,7 +369,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -378,7 +378,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -387,7 +387,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -396,7 +396,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -405,7 +405,7 @@ standard_name = countergradient_mixing_term_for_temperature long_name = countergradient mixing term for temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -414,7 +414,7 @@ standard_name = countergradient_mixing_term_for_water_vapor long_name = countergradient mixing term for water vapor units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -423,7 +423,7 @@ standard_name = atmosphere_heat_diffusivity long_name = diffusivity for heat units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension_minus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) type = real kind = kind_phys intent = out @@ -432,7 +432,7 @@ standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -501,7 +501,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index 48754564f..2bcd2a872 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -51,7 +51,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -60,7 +60,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -69,7 +69,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -78,7 +78,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -87,7 +87,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -96,7 +96,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -105,7 +105,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -114,7 +114,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in @@ -123,7 +123,7 @@ standard_name = atmosphere_heat_diffusivity_from_shoc long_name = diffusivity for heat from the SHOC scheme units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -132,7 +132,7 @@ standard_name = prandtl_number long_name = turbulent Prandtl number units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -149,7 +149,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the surface interface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -158,7 +158,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -167,7 +167,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = x_wind_at_10m long_name = x component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = y_wind_at_10m long_name = y component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -203,7 +203,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -212,7 +212,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -221,7 +221,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -230,7 +230,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -239,7 +239,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -248,7 +248,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -257,7 +257,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -265,7 +265,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -274,7 +274,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -283,7 +283,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -292,7 +292,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -301,7 +301,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -310,7 +310,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -328,7 +328,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -337,7 +337,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -346,7 +346,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -355,7 +355,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -364,7 +364,7 @@ standard_name = atmosphere_heat_diffusivity long_name = diffusivity for heat units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension_minus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) type = real kind = kind_phys intent = out @@ -373,7 +373,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -382,7 +382,7 @@ standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index a0591ade8..0e790d71c 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -173,7 +173,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind= kind_phys intent = in @@ -182,7 +182,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -191,7 +191,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -200,7 +200,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -209,7 +209,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -218,7 +218,7 @@ standard_name = total_cloud_condensate_mixing_ratio_updated_by_physics long_name = total cloud condensate mixing ratio (except water vapor) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -227,7 +227,7 @@ standard_name = accumulated_change_of_air_temperature_due_to_FA_scheme long_name = accumulated change of air temperature due to FA MP scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -236,7 +236,7 @@ standard_name = ratio_of_snowfall_to_rainfall long_name = snow ratio: ratio of snow to total precipitation (explicit only) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -245,7 +245,7 @@ standard_name = fraction_of_ice_water_cloud long_name = fraction of ice water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -254,7 +254,7 @@ standard_name = fraction_of_rain_water_cloud long_name = fraction of rain water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -263,7 +263,7 @@ standard_name = rime_factor long_name = rime factor units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -272,7 +272,7 @@ standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -281,7 +281,7 @@ standard_name = ice_water_mixing_ratio_updated_by_physics long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -290,7 +290,7 @@ standard_name = rain_water_mixing_ratio_updated_by_physics long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -299,7 +299,7 @@ standard_name = mass_weighted_rime_factor_updated_by_physics long_name = mass weighted rime factor updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -308,7 +308,7 @@ standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit precipitation ( rain, ice, snow, graupel, ...) on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -341,7 +341,7 @@ standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm units = dBZ - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -359,7 +359,7 @@ standard_name = cell_size long_name = relative dx for the grid cell units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 427b2bc84..f290639a6 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -345,7 +345,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -354,7 +354,7 @@ standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics long_name = cloud water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -363,7 +363,7 @@ standard_name = rain_water_mixing_ratio_updated_by_physics long_name = rain water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -372,7 +372,7 @@ standard_name = ice_water_mixing_ratio_updated_by_physics long_name = ice water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -381,7 +381,7 @@ standard_name = snow_water_mixing_ratio_updated_by_physics long_name = snow water mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -390,7 +390,7 @@ standard_name = graupel_mixing_ratio_updated_by_physics long_name = graupel mixing ratio wrt dry+vapor (no condensates) units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -399,7 +399,7 @@ standard_name = ice_number_concentration_updated_by_physics long_name = ice number concentration units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -408,7 +408,7 @@ standard_name = rain_number_concentration_updated_by_physics long_name = rain number concentration units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -425,7 +425,7 @@ standard_name = cloud_droplet_number_concentration_updated_by_physics long_name = cloud droplet number concentration units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -434,7 +434,7 @@ standard_name = water_friendly_aerosol_number_concentration_updated_by_physics long_name = number concentration of water-friendly aerosols units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -443,7 +443,7 @@ standard_name = ice_friendly_aerosol_number_concentration_updated_by_physics long_name = number concentration of ice-friendly aerosols units = kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -452,7 +452,7 @@ standard_name = tendency_of_water_friendly_aerosols_at_surface long_name = instantaneous fake water-friendly surface aerosol source units = kg-1 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -461,7 +461,7 @@ standard_name = tendency_of_ice_friendly_aerosols_at_surface long_name = instantaneous fake ice-friendly surface aerosol source units = kg-1 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -470,7 +470,7 @@ standard_name = air_temperature_updated_by_physics long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -479,7 +479,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -488,7 +488,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -497,7 +497,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -515,7 +515,7 @@ standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit precipitation (rain, ice, snow, graupel) on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -524,7 +524,7 @@ standard_name = lwe_thickness_of_explicit_rain_amount long_name = explicit rain fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -533,7 +533,7 @@ standard_name = lwe_thickness_of_graupel_amount long_name = graupel fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -542,7 +542,7 @@ standard_name = lwe_thickness_of_ice_amount long_name = ice fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -551,7 +551,7 @@ standard_name = lwe_thickness_of_snow_amount long_name = snow fall on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -560,7 +560,7 @@ standard_name = ratio_of_snowfall_to_rainfall long_name = ratio of snowfall to large-scale rainfall units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -569,7 +569,7 @@ standard_name = radar_reflectivity_10cm long_name = instantaneous refl_10cm units = dBZ - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -594,7 +594,7 @@ standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer (meter here) units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -603,7 +603,7 @@ standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer (meter here) units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -612,7 +612,7 @@ standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometer (meter here) units = m - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/mp_thompson_post.meta b/physics/mp_thompson_post.meta index 2c68fc78a..248705b30 100644 --- a/physics/mp_thompson_post.meta +++ b/physics/mp_thompson_post.meta @@ -58,7 +58,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -67,7 +67,7 @@ standard_name = air_temperature_updated_by_physics long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -76,7 +76,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/mp_thompson_pre.meta b/physics/mp_thompson_pre.meta index 2511ba3bc..e695d0a11 100644 --- a/physics/mp_thompson_pre.meta +++ b/physics/mp_thompson_pre.meta @@ -27,7 +27,7 @@ standard_name = air_temperature_updated_by_physics long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = air_temperature_save long_name = air temperature before entering a physics scheme units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/ozphys.meta b/physics/ozphys.meta index b43f7931c..2edfc04e8 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -74,7 +74,7 @@ standard_name = ozone_concentration_updated_by_physics long_name = ozone concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -83,7 +83,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -110,7 +110,7 @@ standard_name = ozone_forcing long_name = ozone forcing coefficients units = various - dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + dimensions = (horizontal_loop_extent,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -152,7 +152,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate long_name = cumulative change in ozone concentration due to production and loss rate units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -161,7 +161,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio long_name = cumulative change in ozone concentration due to ozone mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -170,7 +170,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_temperature long_name = cumulative change in ozone concentration due to temperature units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -179,7 +179,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column long_name = cumulative change in ozone concentration due to overhead ozone column units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index 2db91982f..11f1dfa0c 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -74,7 +74,7 @@ standard_name = ozone_concentration_updated_by_physics long_name = ozone concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -83,7 +83,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -110,7 +110,7 @@ standard_name = ozone_forcing long_name = ozone forcing data units = various - dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + dimensions = (horizontal_loop_extent,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = difference between mid-layer pressures units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -152,7 +152,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate long_name = cumulative change in ozone concentration due to production and loss rate units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -161,7 +161,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio long_name = cumulative change in ozone concentration due to ozone mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -170,7 +170,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_temperature long_name = cumulative change in ozone concentration due to temperature units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -179,7 +179,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column long_name = cumulative change in ozone concentration due to overhead ozone column units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/phys_tend.meta b/physics/phys_tend.meta index b5637063c..3af255148 100644 --- a/physics/phys_tend.meta +++ b/physics/phys_tend.meta @@ -27,7 +27,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in x wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -45,7 +45,7 @@ standard_name = cumulative_change_in_x_wind_due_to_deep_convection long_name = cumulative change in x wind due to deep convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -54,7 +54,7 @@ standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in x wind due to convective gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = cumulative_change_in_x_wind_due_to_rayleigh_damping long_name = cumulative change in x wind due to Rayleigh damping units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = cumulative_change_in_x_wind_due_to_shallow_convection long_name = cumulative change in x wind due to shallow convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = cumulative_change_in_x_wind_due_to_physics long_name = cumulative change in x wind due to physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -90,7 +90,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -99,7 +99,7 @@ standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -108,7 +108,7 @@ standard_name = cumulative_change_in_y_wind_due_to_deep_convection long_name = cumulative change in y wind due to deep convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -117,7 +117,7 @@ standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in y wind due to convective gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -126,7 +126,7 @@ standard_name = cumulative_change_in_y_wind_due_to_rayleigh_damping long_name = cumulative change in y wind due to Rayleigh damping units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = cumulative_change_in_y_wind_due_to_shallow_convection long_name = cumulative change in y wind due to shallow convection units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -144,7 +144,7 @@ standard_name = cumulative_change_in_y_wind_due_to_physics long_name = cumulative change in y wind due to physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -153,7 +153,7 @@ standard_name = cumulative_change_in_temperature_due_to_longwave_radiation long_name = cumulative change in temperature due to longwave radiation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -162,7 +162,7 @@ standard_name = cumulative_change_in_temperature_due_to_shortwave_radiation long_name = cumulative change in temperature due to shortwave radiation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -171,7 +171,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -180,7 +180,7 @@ standard_name = cumulative_change_in_temperature_due_to_deep_convection long_name = cumulative change in temperature due to deep convection units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -189,7 +189,7 @@ standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shallow convection units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -198,7 +198,7 @@ standard_name = cumulative_change_in_temperature_due_to_microphysics long_name = cumulative change in temperature due to microphysics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -207,7 +207,7 @@ standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -216,7 +216,7 @@ standard_name = cumulative_change_in_temperature_due_to_rayleigh_damping long_name = cumulative change in temperature due to Rayleigh damping units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -225,7 +225,7 @@ standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag long_name = cumulative change in temperature due to convective gravity wave drag units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -234,7 +234,7 @@ standard_name = cumulative_change_in_temperature_due_to_physics long_name = cumulative change in temperature due to physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -243,7 +243,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection long_name = cumulative change in water vapor specific humidity due to deep convection units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -261,7 +261,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection long_name = cumulative change in water vapor specific humidity due to shallow convection units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -270,7 +270,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_microphysics long_name = cumulative change in water vapor specific humidity due to microphysics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -279,7 +279,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -288,7 +288,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate long_name = cumulative change in ozone concentration due to production and loss rate units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -297,7 +297,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio long_name = cumulative change in ozone concentration due to ozone mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -306,7 +306,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_temperature long_name = cumulative change in ozone concentration due to temperature units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -315,7 +315,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column long_name = cumulative change in ozone concentration due to overhead ozone column units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -324,7 +324,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_physics long_name = cumulative change in water vapor specific humidity due to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -333,7 +333,7 @@ standard_name = cumulative_change_in_ozone_concentration_due_to_physics long_name = cumulative change in ozone concentration due to physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/precpd.meta b/physics/precpd.meta index 3d76d18ed..715991990 100644 --- a/physics/precpd.meta +++ b/physics/precpd.meta @@ -36,7 +36,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pressure level thickness units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -45,7 +45,7 @@ standard_name = air_pressure long_name = layer mean pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -54,7 +54,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -63,7 +63,7 @@ standard_name = cloud_condensed_water_mixing_ratio_updated_by_physics long_name = moist cloud condensed water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -72,7 +72,7 @@ standard_name = air_temperature_updated_by_physics long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -81,7 +81,7 @@ standard_name = lwe_thickness_of_explicit_precipitation_amount long_name = explicit precipitation amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -90,7 +90,7 @@ standard_name = ratio_of_snowfall_to_rainfall long_name = ratio of snowfall to large-scale rainfall units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -99,7 +99,7 @@ standard_name = tendency_of_rain_water_mixing_ratio_due_to_microphysics long_name = tendency of rain water mixing ratio due to microphysics units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -108,7 +108,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -153,7 +153,7 @@ standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes long_name = grid size related coefficient used in scale-sensitive schemes units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 05fcf1de6..15347f363 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -11,7 +11,7 @@ standard_name = air_pressure_at_layer_for_radiation_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -20,7 +20,7 @@ standard_name = air_pressure_at_interface_for_radiation_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -29,7 +29,7 @@ standard_name = air_temperature_at_layer_for_radiation long_name = air temperature layer units = K - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -38,7 +38,7 @@ standard_name = air_temperature_at_interface_for_radiation long_name = air temperature level units = K - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -47,7 +47,7 @@ standard_name = water_vapor_specific_humidity_at_layer_for_radiation long_name = specific humidity layer units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -56,7 +56,7 @@ standard_name = ozone_concentration_at_layer_for_radiation long_name = ozone concentration layer units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -65,7 +65,7 @@ standard_name = volume_mixing_ratio_co2 long_name = volume mixing ratio co2 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -74,7 +74,7 @@ standard_name = volume_mixing_ratio_n2o long_name = volume mixing ratio no2 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -83,7 +83,7 @@ standard_name = volume_mixing_ratio_ch4 long_name = volume mixing ratio ch4 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -92,7 +92,7 @@ standard_name = volume_mixing_ratio_o2 long_name = volume mixing ratio o2 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = volume_mixing_ratio_co long_name = volume mixing ratio co units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -110,7 +110,7 @@ standard_name = volume_mixing_ratio_cfc11 long_name = volume mixing ratio cfc11 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -119,7 +119,7 @@ standard_name = volume_mixing_ratio_cfc12 long_name = volume mixing ratio cfc12 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -128,7 +128,7 @@ standard_name = volume_mixing_ratio_cfc22 long_name = volume mixing ratio cfc22 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -137,7 +137,7 @@ standard_name = volume_mixing_ratio_ccl4 long_name = volume mixing ratio ccl4 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -146,7 +146,7 @@ standard_name = seed_random_numbers_lw long_name = seed for random number generation for longwave radiation units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -154,7 +154,7 @@ standard_name = aerosol_optical_depth_for_longwave_bands_01_16 long_name = aerosol optical depth for longwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = in @@ -163,7 +163,7 @@ standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 long_name = aerosol single scattering albedo for longwave bands 01-16 units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = in @@ -172,7 +172,7 @@ standard_name = surface_longwave_emissivity long_name = surface emissivity units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -181,7 +181,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = layer_thickness_for_radiation long_name = layer thickness units = km - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -199,7 +199,7 @@ standard_name = layer_pressure_thickness_for_radiation long_name = layer pressure thickness units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -208,7 +208,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -249,7 +249,7 @@ standard_name = total_cloud_fraction long_name = total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -266,7 +266,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levels long_name = longwave total sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -275,7 +275,7 @@ standard_name = lw_fluxes_top_atmosphere long_name = longwave total sky fluxes at the top of the atm units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topflw_type intent = inout optional = F @@ -283,7 +283,7 @@ standard_name = lw_fluxes_sfc long_name = longwave total sky fluxes at the Earth surface units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcflw_type intent = inout optional = F @@ -291,7 +291,7 @@ standard_name = cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -300,7 +300,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = longwave clear sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -309,7 +309,7 @@ standard_name = cloud_liquid_water_path long_name = cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -318,7 +318,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -327,7 +327,7 @@ standard_name = cloud_ice_water_path long_name = cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -336,7 +336,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -345,7 +345,7 @@ standard_name = cloud_rain_water_path long_name = cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -354,7 +354,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -363,7 +363,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -372,7 +372,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 30e1d850c..b379b36f4 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -11,7 +11,7 @@ standard_name = air_pressure_at_layer_for_radiation_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -20,7 +20,7 @@ standard_name = air_pressure_at_interface_for_radiation_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -29,7 +29,7 @@ standard_name = air_temperature_at_layer_for_radiation long_name = air temperature layer units = K - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -38,7 +38,7 @@ standard_name = air_temperature_at_interface_for_radiation long_name = air temperature level units = K - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -47,7 +47,7 @@ standard_name = water_vapor_specific_humidity_at_layer_for_radiation long_name = specific humidity layer units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -56,7 +56,7 @@ standard_name = ozone_concentration_at_layer_for_radiation long_name = ozone concentration layer units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -65,7 +65,7 @@ standard_name = volume_mixing_ratio_co2 long_name = volume mixing ratio co2 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -74,7 +74,7 @@ standard_name = volume_mixing_ratio_n2o long_name = volume mixing ratio no2 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -83,7 +83,7 @@ standard_name = volume_mixing_ratio_ch4 long_name = volume mixing ratio ch4 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -92,7 +92,7 @@ standard_name = volume_mixing_ratio_o2 long_name = volume mixing ratio o2 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -101,7 +101,7 @@ standard_name = volume_mixing_ratio_co long_name = volume mixing ratio co units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -110,7 +110,7 @@ standard_name = volume_mixing_ratio_cfc11 long_name = volume mixing ratio cfc11 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -119,7 +119,7 @@ standard_name = volume_mixing_ratio_cfc12 long_name = volume mixing ratio cfc12 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -128,7 +128,7 @@ standard_name = volume_mixing_ratio_cfc22 long_name = volume mixing ratio cfc22 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -137,7 +137,7 @@ standard_name = volume_mixing_ratio_ccl4 long_name = volume mixing ratio ccl4 units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -146,7 +146,7 @@ standard_name = seed_random_numbers_sw long_name = seed for random number generation for shortwave radiation units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -154,7 +154,7 @@ standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 long_name = aerosol optical depth for shortwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = in @@ -163,7 +163,7 @@ standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 long_name = aerosol single scattering albedo for shortwave bands 01-16 units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = in @@ -172,7 +172,7 @@ standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 long_name = aerosol asymmetry paramter for shortwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = in @@ -181,7 +181,7 @@ standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = surface_albedo_due_to_near_IR_diffused long_name = surface albedo due to near IR diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -199,7 +199,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_direct long_name = surface albedo due to UV+VIS direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -208,7 +208,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_diffused long_name = surface albedo due to UV+VIS diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -217,7 +217,7 @@ standard_name = layer_thickness_for_radiation long_name = layer thickness units = km - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -226,7 +226,7 @@ standard_name = layer_pressure_thickness_for_radiation long_name = layer pressure thickness units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -235,7 +235,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -244,7 +244,7 @@ standard_name = cosine_of_zenith_angle long_name = cosine of the solar zenit angle units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -270,7 +270,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -310,7 +310,7 @@ standard_name = total_cloud_fraction long_name = total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -327,7 +327,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels long_name = shortwave total sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -336,7 +336,7 @@ standard_name = sw_fluxes_top_atmosphere long_name = shortwave total sky fluxes at the top of the atm units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topfsw_type intent = inout optional = F @@ -344,7 +344,7 @@ standard_name = sw_fluxes_sfc long_name = shortwave total sky fluxes at the Earth surface units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcfsw_type intent = inout optional = F @@ -352,7 +352,7 @@ standard_name = cloud_optical_depth_layers_at_0p55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -361,7 +361,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = shortwave clear sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -370,7 +370,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = inout optional = T @@ -378,7 +378,7 @@ standard_name = cloud_liquid_water_path long_name = cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -387,7 +387,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -396,7 +396,7 @@ standard_name = cloud_ice_water_path long_name = cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -405,7 +405,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -414,7 +414,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -423,7 +423,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -432,7 +432,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -441,7 +441,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/rascnv.meta b/physics/rascnv.meta index 8a8cc0153..f0ab36f19 100644 --- a/physics/rascnv.meta +++ b/physics/rascnv.meta @@ -249,7 +249,7 @@ standard_name = cell_area long_name = area of the grid cell units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -328,7 +328,7 @@ standard_name = random_number_array long_name = random number array (0-1) units = none - dimensions = (horizontal_dimension,array_dimension_of_random_number) + dimensions = (horizontal_loop_extent,array_dimension_of_random_number) type = real kind = kind_phys intent = in @@ -377,7 +377,7 @@ standard_name = critical_relative_humidity long_name = critical relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -386,7 +386,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -395,7 +395,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = updated vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -404,7 +404,7 @@ standard_name = x_wind_updated_by_physics long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -413,7 +413,7 @@ standard_name = y_wind_updated_by_physics long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -422,7 +422,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,tracer_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension,tracer_dimension) type = real kind = kind_phys intent = inout @@ -440,7 +440,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -449,7 +449,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -458,7 +458,7 @@ standard_name = dimensionless_exner_function_at_model_interfaces long_name = dimensionless Exner function at model layer interfaces units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -467,7 +467,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -476,7 +476,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -485,7 +485,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -494,7 +494,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = vertical index at top atmospheric boundary layer units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -502,7 +502,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air long_name = surface exchange coeff for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -511,7 +511,7 @@ standard_name = lwe_thickness_of_deep_convective_precipitation_amount long_name = deep convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -520,7 +520,7 @@ standard_name = vertical_index_at_cloud_base long_name = index for cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -528,7 +528,7 @@ standard_name = vertical_index_at_cloud_top long_name = index for cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -536,7 +536,7 @@ standard_name = flag_deep_convection long_name = deep convection: 0=no, 1=yes units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -544,7 +544,7 @@ standard_name = surface_wind_enhancement_due_to_convection long_name = surface wind enhancement due to convection units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -553,7 +553,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * dt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -562,7 +562,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * dt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -571,7 +571,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * dt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -580,7 +580,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -589,7 +589,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -598,7 +598,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -607,7 +607,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -616,7 +616,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -625,7 +625,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -634,7 +634,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -643,7 +643,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -652,7 +652,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -661,7 +661,7 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index 9a40ceff1..e53cfa75d 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -35,7 +35,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -44,7 +44,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -53,7 +53,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -62,7 +62,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -106,7 +106,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -115,7 +115,7 @@ standard_name = air_pressure long_name = mid-layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -150,7 +150,7 @@ standard_name = cumulative_change_in_x_wind_due_to_rayleigh_damping long_name = cumulative change in zonal wind due to Rayleigh damping units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -159,7 +159,7 @@ standard_name = cumulative_change_in_y_wind_due_to_rayleigh_damping long_name = cumulative change in meridional wind due to Rayleigh damping units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -168,7 +168,7 @@ standard_name = cumulative_change_in_temperature_due_to_rayleigh_damping long_name = cumulative change in temperature due to Rayleigh damping units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 4886e600c..6225d9ea0 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -75,7 +75,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -84,7 +84,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levels long_name = total sky heating rate due to longwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -93,7 +93,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = clear sky heating rate due to longwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index fb7b9d3b0..ba7dcf99e 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -51,7 +51,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -60,7 +60,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index da2272a54..82c737e32 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -91,7 +91,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels long_name = total sky heating rate due to shortwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -100,7 +100,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = clear sky heating rates due to shortwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -109,7 +109,7 @@ standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -118,7 +118,7 @@ standard_name = surface_albedo_due_to_near_IR_diffused long_name = surface albedo due to near IR diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_direct long_name = surface albedo due to UV+VIS direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_diffused long_name = surface albedo due to UV+VIS diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -145,7 +145,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = inout optional = F diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index 9088284bb..cf1dae24e 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -59,7 +59,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -67,7 +67,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -76,7 +76,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -85,7 +85,7 @@ standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -94,7 +94,7 @@ standard_name = surface_albedo_due_to_near_IR_diffused long_name = surface albedo due to near IR diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -103,7 +103,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_direct long_name = surface albedo due to UV+VIS direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -112,7 +112,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_diffused long_name = surface albedo due to UV+VIS diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -121,7 +121,7 @@ standard_name = surface_albedo_perturbation long_name = surface albedo perturbation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta index 8df363cb6..26d548144 100644 --- a/physics/rrtmgp_lw_aerosol_optics.meta +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -51,7 +51,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -60,7 +60,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -69,7 +69,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -87,7 +87,7 @@ standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -96,7 +96,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -105,7 +105,7 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -114,7 +114,7 @@ standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in @@ -123,7 +123,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -132,7 +132,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -157,7 +157,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = inout diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 34ce77ad3..ca0054be7 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -171,7 +171,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -179,7 +179,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -187,7 +187,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -195,7 +195,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -203,7 +203,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -211,7 +211,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -219,7 +219,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -227,7 +227,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -235,7 +235,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real intent = in kind = kind_phys @@ -243,7 +243,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -277,7 +277,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -286,7 +286,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -295,7 +295,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index ff161d902..35699efb6 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -81,7 +81,7 @@ standard_name = seed_random_numbers_lw long_name = seed for random number generation for longwave radiation units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -89,7 +89,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -98,7 +98,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -116,7 +116,7 @@ standard_name = precip_overlap_param long_name = precipitation overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index 56cc7cefa..92d475d24 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -133,7 +133,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -142,7 +142,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -151,7 +151,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -160,7 +160,7 @@ standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature level units = K - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -169,7 +169,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 4dfc48203..8084ecf90 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -27,7 +27,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -45,7 +45,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -54,7 +54,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = surface_longwave_emissivity long_name = surface lw emissivity in fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -116,7 +116,7 @@ standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band units = none - dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_lw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index cf11fcc64..857ab834c 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -60,7 +60,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -69,7 +69,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -87,7 +87,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -96,7 +96,7 @@ standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band units = none - dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_lw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -145,7 +145,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -154,7 +154,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -163,7 +163,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -172,7 +172,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -181,7 +181,7 @@ standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward long_name = RRTMGP Jacobian upward longwave flux profile units = W m-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out @@ -190,7 +190,7 @@ standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward long_name = RRTMGP Jacobian downward of longwave flux profile units = W m-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = out diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta index 68979ae5b..be472fdaf 100644 --- a/physics/rrtmgp_sw_aerosol_optics.meta +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -59,7 +59,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -67,7 +67,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -76,7 +76,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -85,7 +85,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -94,7 +94,7 @@ standard_name = virtual_temperature long_name = layer virtual temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -103,7 +103,7 @@ standard_name = relative_humidity long_name = layer relative humidity units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -112,7 +112,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -121,7 +121,7 @@ standard_name = chemical_tracers long_name = chemical tracers units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -130,7 +130,7 @@ standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in @@ -139,7 +139,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -148,7 +148,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -173,7 +173,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = inout diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 08fd7f3fd..6c8b3c20e 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -171,7 +171,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -180,7 +180,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -189,7 +189,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -198,7 +198,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -207,7 +207,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -216,7 +216,7 @@ standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -225,7 +225,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -234,7 +234,7 @@ standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -243,7 +243,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -285,7 +285,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -309,7 +309,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 7890d750e..082704462 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -89,7 +89,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -97,7 +97,7 @@ standard_name = seed_random_numbers_sw long_name = seed for random number generation for shortwave radiation units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -105,7 +105,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -114,7 +114,7 @@ standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -123,7 +123,7 @@ standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -132,7 +132,7 @@ standard_name = precip_overlap_param long_name = precipitation overlap parameter units = km - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index 1d0c96547..75bcde0c8 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -133,7 +133,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -149,7 +149,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -158,7 +158,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -167,7 +167,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature level units = K - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = toa_incident_sw_flux_by_spectral_point long_name = TOA shortwave incident flux at each spectral points units = W m-2 - dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) + dimensions = (horizontal_loop_extent,number_of_sw_spectral_points_rrtmgp) type = real kind = kind_phys intent = out diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 302221ce3..43febcd92 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -52,7 +52,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -60,7 +60,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -69,7 +69,7 @@ standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer units = hPa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -78,7 +78,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -87,7 +87,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -128,7 +128,7 @@ standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -137,7 +137,7 @@ standard_name = surface_albedo_nearIR_diffuse long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -146,7 +146,7 @@ standard_name = surface_albedo_uvvis_dir long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -155,7 +155,7 @@ standard_name = surface_albedo_uvvis_dif long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -164,7 +164,7 @@ standard_name = toa_incident_sw_flux_by_spectral_point long_name = TOA shortwave incident flux at each spectral points units = W m-2 - dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) + dimensions = (horizontal_loop_extent,number_of_sw_spectral_points_rrtmgp) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = inout optional = T @@ -198,7 +198,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = inout @@ -207,7 +207,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = inout @@ -216,7 +216,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = inout @@ -225,7 +225,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = inout diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index 7085e6577..8000fb90c 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -167,7 +167,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = geopotential long_name = layer geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -203,7 +203,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -212,7 +212,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = updated vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -221,7 +221,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -230,7 +230,7 @@ standard_name = x_wind_updated_by_physics long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -239,7 +239,7 @@ standard_name = y_wind_updated_by_physics long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -265,7 +265,7 @@ standard_name = cloud_work_function long_name = cloud work function units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -274,7 +274,7 @@ standard_name = lwe_thickness_of_deep_convective_precipitation_amount long_name = deep convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -283,7 +283,7 @@ standard_name = vertical_index_at_cloud_base long_name = index for cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -291,7 +291,7 @@ standard_name = vertical_index_at_cloud_top long_name = index for cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -299,7 +299,7 @@ standard_name = flag_deep_convection long_name = deep convection: 0=no, 1=yes units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -307,7 +307,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -315,7 +315,7 @@ standard_name = cell_area long_name = grid cell area units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -324,7 +324,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -341,7 +341,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -350,7 +350,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -359,7 +359,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -368,7 +368,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -377,7 +377,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -386,7 +386,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -395,7 +395,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -404,7 +404,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -413,7 +413,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -422,7 +422,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -431,7 +431,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -440,7 +440,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -449,7 +449,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -458,7 +458,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -467,7 +467,7 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -614,7 +614,7 @@ standard_name = fraction_of_cellular_automata_for_deep_convection long_name = fraction of cellular automata for deep convection units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -623,7 +623,7 @@ standard_name = physics_field_for_coupling long_name = physics_field_for_coupling units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index 6c7eedb82..7f5421b70 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -167,7 +167,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = geopotential long_name = layer geopotential units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -203,7 +203,7 @@ standard_name = convective_transportable_tracers long_name = array to contain cloud water and other convective trans. tracers units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers_for_convective_transport) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers_for_convective_transport) type = real kind = kind_phys intent = inout @@ -212,7 +212,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = updated vapor specific humidity units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -221,7 +221,7 @@ standard_name = air_temperature_updated_by_physics long_name = updated temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -230,7 +230,7 @@ standard_name = x_wind_updated_by_physics long_name = updated x-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -239,7 +239,7 @@ standard_name = y_wind_updated_by_physics long_name = updated y-direction wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -257,7 +257,7 @@ standard_name = lwe_thickness_of_shallow_convective_precipitation_amount long_name = shallow convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -266,7 +266,7 @@ standard_name = vertical_index_at_cloud_base long_name = index at cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -274,7 +274,7 @@ standard_name = vertical_index_at_cloud_top long_name = index at cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -282,7 +282,7 @@ standard_name = flag_deep_convection long_name = deep convection: 0=no, 1=yes units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -290,7 +290,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -298,7 +298,7 @@ standard_name = cell_area long_name = grid cell area units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -307,7 +307,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -324,7 +324,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL top height units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -333,7 +333,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -342,7 +342,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -351,7 +351,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -360,7 +360,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index 3031e8fd7..d49d287e1 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -181,7 +181,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -199,7 +199,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -208,7 +208,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -217,7 +217,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -226,7 +226,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -235,7 +235,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -244,7 +244,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -253,7 +253,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -262,7 +262,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -271,7 +271,7 @@ standard_name = cloud_work_function long_name = cloud work function units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -280,7 +280,7 @@ standard_name = lwe_thickness_of_deep_convective_precipitation_amount long_name = deep convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -289,7 +289,7 @@ standard_name = vertical_index_at_cloud_base long_name = index for cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -297,7 +297,7 @@ standard_name = vertical_index_at_cloud_top long_name = index for cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -305,7 +305,7 @@ standard_name = flag_deep_convection long_name = deep convection: 0=no, 1=yes units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -313,7 +313,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -321,7 +321,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -338,7 +338,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -347,7 +347,7 @@ standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux long_name = (downdraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -356,7 +356,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -365,7 +365,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -374,7 +374,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -383,7 +383,7 @@ standard_name = mass_fraction_of_convective_cloud_liquid_water long_name = mass fraction of convective cloud liquid water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -392,7 +392,7 @@ standard_name = mass_fraction_of_convective_cloud_ice long_name = mass fraction of convective cloud ice water units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -401,7 +401,7 @@ standard_name = vertical_velocity_for_updraft long_name = vertical velocity for updraft units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -410,7 +410,7 @@ standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -419,7 +419,7 @@ standard_name = detrained_mass_flux long_name = detrained mass flux units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -428,7 +428,7 @@ standard_name = tendency_of_cloud_water_due_to_convective_microphysics long_name = tendency of cloud water due to convective microphysics units = kg m-2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -437,7 +437,7 @@ standard_name = convective_cloud_volume_fraction long_name = convective cloud volume fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -446,7 +446,7 @@ standard_name = ice_fraction_in_convective_tower long_name = ice fraction in convective tower units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -455,7 +455,7 @@ standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment long_name = droplet number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -464,7 +464,7 @@ standard_name = number_concentration_of_ice_crystals_for_detrainment long_name = crystal number concentration in convective detrainment units = m-3 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index e34d778dc..93597f0e3 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -178,7 +178,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -187,7 +187,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -196,7 +196,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -205,7 +205,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -214,7 +214,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -223,7 +223,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -232,7 +232,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -241,7 +241,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in @@ -250,7 +250,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -259,7 +259,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -268,7 +268,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -277,7 +277,7 @@ standard_name = cell_area long_name = area of the grid cell units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -286,7 +286,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the surface interface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -295,7 +295,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -304,7 +304,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -313,7 +313,7 @@ standard_name = x_wind_at_10m long_name = x component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -322,7 +322,7 @@ standard_name = y_wind_at_10m long_name = y component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -331,7 +331,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -340,7 +340,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -349,7 +349,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -358,7 +358,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -367,7 +367,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -376,7 +376,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -385,7 +385,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -394,7 +394,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -402,7 +402,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -411,7 +411,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -420,7 +420,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -429,7 +429,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -438,7 +438,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -447,7 +447,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -473,7 +473,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -482,7 +482,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -491,7 +491,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -500,7 +500,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -509,7 +509,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -518,7 +518,7 @@ standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -553,7 +553,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -562,7 +562,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -571,7 +571,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -580,7 +580,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -589,7 +589,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index 75c5fbd3d..210bd34bf 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -178,7 +178,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -187,7 +187,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -196,7 +196,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -205,7 +205,7 @@ standard_name = tendency_of_vertically_diffused_tracer_concentration long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = inout @@ -214,7 +214,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -223,7 +223,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -232,7 +232,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -241,7 +241,7 @@ standard_name = vertically_diffused_tracer_concentration long_name = tracer concentration diffused by PBL scheme units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_vertical_diffusion_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) type = real kind = kind_phys intent = in @@ -250,7 +250,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -259,7 +259,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -268,7 +268,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -277,7 +277,7 @@ standard_name = cell_area long_name = area of the grid cell units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -286,7 +286,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -294,7 +294,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -303,7 +303,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the surface interface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -312,7 +312,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -321,7 +321,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -330,7 +330,7 @@ standard_name = x_wind_at_10m long_name = x component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -339,7 +339,7 @@ standard_name = y_wind_at_10m long_name = y component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -348,7 +348,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -357,7 +357,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -366,7 +366,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -375,7 +375,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -384,7 +384,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -393,7 +393,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -402,7 +402,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -411,7 +411,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -419,7 +419,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -428,7 +428,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = pres(k) - pres(k+1) units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -437,7 +437,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -446,7 +446,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -455,7 +455,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -464,7 +464,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -490,7 +490,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -499,7 +499,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -508,7 +508,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -517,7 +517,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -526,7 +526,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -535,7 +535,7 @@ standard_name = index_of_highest_temperature_inversion long_name = index of highest temperature inversion units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -605,7 +605,7 @@ standard_name = cumulative_change_in_x_wind_due_to_PBL long_name = cumulative change in x wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -614,7 +614,7 @@ standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -623,7 +623,7 @@ standard_name = cumulative_change_in_temperature_due_to_PBL long_name = cumulative change in temperature due to PBL units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -632,7 +632,7 @@ standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -641,7 +641,7 @@ standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL long_name = cumulative change in ozone mixing ratio due to PBL units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/sfc_cice.meta b/physics/sfc_cice.meta index ffb49b530..fc0361ec1 100644 --- a/physics/sfc_cice.meta +++ b/physics/sfc_cice.meta @@ -63,7 +63,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = surface layer mean temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = surface layer mean specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice long_name = surface exchange coeff for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice long_name = surface exchange coeff heat & moisture over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -99,7 +99,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = surface layer mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -108,7 +108,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -117,7 +117,7 @@ standard_name = flag_for_cice long_name = flag for cice units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -125,7 +125,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -133,7 +133,7 @@ standard_name = surface_upward_latent_heat_flux_for_coupling long_name = sfc latent heat flux for coupling units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -142,7 +142,7 @@ standard_name = surface_upward_sensible_heat_flux_for_coupling long_name = sfc sensible heat flux for coupling units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -151,7 +151,7 @@ standard_name = surface_x_momentum_flux_for_coupling long_name = sfc x momentum flux for coupling units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -160,7 +160,7 @@ standard_name = surface_y_momentum_flux_for_coupling long_name = sfc y momentum flux for coupling units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -169,7 +169,7 @@ standard_name = surface_snow_thickness_for_coupling long_name = sfc snow depth in meters over sea ice for coupling units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -178,7 +178,7 @@ standard_name = surface_specific_humidity_over_ice long_name = surface air saturation specific humidity over ice units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -187,7 +187,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ice long_name = momentum exchange coefficient over ice units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -196,7 +196,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice long_name = thermal exchange coefficient over ice units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -205,7 +205,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ice long_name = kinematic surface upward latent heat flux over ice units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -214,7 +214,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice long_name = kinematic surface upward sensible heat flux over ice units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -223,7 +223,7 @@ standard_name = surface_wind_stress_over_ice long_name = surface wind stress over ice units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -232,7 +232,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_ice long_name = water equiv of acc snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -241,7 +241,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -250,7 +250,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ice long_name = surface upward potential latent heat flux over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/sfc_diag.meta b/physics/sfc_diag.meta index 6ede745b8..deebf23df 100644 --- a/physics/sfc_diag.meta +++ b/physics/sfc_diag.meta @@ -55,7 +55,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -64,7 +64,7 @@ standard_name = x_wind_at_lowest_model_layer_updated_by_physics long_name = x component of 1st model layer wind units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -73,7 +73,7 @@ standard_name = y_wind_at_lowest_model_layer_updated_by_physics long_name = y component of 1st model layer wind units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -82,7 +82,7 @@ standard_name = air_temperature_at_lowest_model_layer_updated_by_physics long_name = 1st model layer air temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -91,7 +91,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer_updated_by_physics long_name = 1st model layer specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -100,7 +100,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -109,7 +109,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux long_name = surface upward evaporation flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -118,7 +118,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity parameter for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity parameter for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m long_name = Monin-Obukhov similarity parameter for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -145,7 +145,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m long_name = Monin-Obukhov similarity parameter for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -154,7 +154,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -163,7 +163,7 @@ standard_name = surface_specific_humidity long_name = surface specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -172,7 +172,7 @@ standard_name = ratio_of_wind_at_lowest_model_layer_and_wind_at_10m long_name = ratio of fm10 and fm units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -181,7 +181,7 @@ standard_name = x_wind_at_10m long_name = x component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -190,7 +190,7 @@ standard_name = y_wind_at_10m long_name = y component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -199,7 +199,7 @@ standard_name = temperature_at_2m long_name = temperature at 2 m units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -208,7 +208,7 @@ standard_name = specific_humidity_at_2m long_name = specific humidity at 2 m units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/sfc_diag_post.meta b/physics/sfc_diag_post.meta index 492a97a0f..1da5bb2ea 100644 --- a/physics/sfc_diag_post.meta +++ b/physics/sfc_diag_post.meta @@ -35,7 +35,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -78,7 +78,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -87,7 +87,7 @@ standard_name = temperature_at_2m_from_noahmp long_name = 2 meter temperature from noahmp units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -96,7 +96,7 @@ standard_name = specific_humidity_at_2m_from_noahmp long_name = 2 meter specific humidity from noahmp units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -105,7 +105,7 @@ standard_name = temperature_at_2m long_name = 2 meter temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -114,7 +114,7 @@ standard_name = specific_humidity_at_2m long_name = 2 meter specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -123,7 +123,7 @@ standard_name = x_wind_at_10m long_name = 10 meter u wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -132,7 +132,7 @@ standard_name = y_wind_at_10m long_name = 10 meter v wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -141,7 +141,7 @@ standard_name = minimum_temperature_at_2m long_name = min temperature at 2m height units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -150,7 +150,7 @@ standard_name = maximum_temperature_at_2m long_name = max temperature at 2m height units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -159,7 +159,7 @@ standard_name = minimum_specific_humidity_at_2m long_name = minimum specific humidity at 2m height units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -168,7 +168,7 @@ standard_name = maximum_specific_humidity_at_2m long_name = maximum specific humidity at 2m height units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -177,7 +177,7 @@ standard_name = maximum_wind_at_10m long_name = maximum wind speed at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -186,7 +186,7 @@ standard_name = maximum_x_wind_at_10m long_name = maximum x wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -195,7 +195,7 @@ standard_name = maximum_y_wind_at_10m long_name = maximum y wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -204,7 +204,7 @@ standard_name = dewpoint_temperature_at_2m long_name = 2 meter dewpoint temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/sfc_diff.meta b/physics/sfc_diff.meta index 8db932a68..9f03b3bf1 100644 --- a/physics/sfc_diff.meta +++ b/physics/sfc_diff.meta @@ -55,7 +55,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -64,7 +64,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = 1st model layer air temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -73,7 +73,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = 1st model layer specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -82,7 +82,7 @@ standard_name = height_above_ground_at_lowest_model_layer long_name = height above ground at 1st model layer units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -91,7 +91,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -100,7 +100,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = Model layer 1 mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -109,7 +109,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -118,7 +118,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the ground surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_layer long_name = dimensionless Exner function at the lowest model layer units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = bounded_vegetation_area_fraction long_name = areal fractional cover of green vegetation bounded on the bottom units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -145,7 +145,7 @@ standard_name = vegetation_type_classification long_name = vegetation type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -153,7 +153,7 @@ standard_name = maximum_vegetation_area_fraction long_name = max fractnl cover of green veg units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -170,7 +170,7 @@ standard_name = perturbation_of_momentum_roughness_length long_name = perturbation of momentum roughness length units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -179,7 +179,7 @@ standard_name = perturbation_of_heat_to_momentum_roughness_length_ratio long_name = perturbation of heat to momentum roughness length ratio units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -188,7 +188,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -204,7 +204,7 @@ standard_name = x_wind_at_10m long_name = 10 meter u wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -213,7 +213,7 @@ standard_name = y_wind_at_10m long_name = 10 meter v wind speed units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -230,7 +230,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -238,7 +238,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -246,7 +246,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -254,7 +254,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -263,7 +263,7 @@ standard_name = surface_skin_temperature_over_land_interstitial long_name = surface skin temperature over land (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -272,7 +272,7 @@ standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -281,7 +281,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -290,7 +290,7 @@ standard_name = surface_skin_temperature_after_iteration_over_land long_name = surface skin temperature after iteration over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -299,7 +299,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ice long_name = surface skin temperature after iteration over ice units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -308,7 +308,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ocean long_name = water equivalent snow depth over ocean units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -317,7 +317,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -326,7 +326,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -335,7 +335,7 @@ standard_name = surface_roughness_length_over_ocean_interstitial long_name = surface roughness length over ocean (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -344,7 +344,7 @@ standard_name = surface_roughness_length_over_land_interstitial long_name = surface roughness length over land (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -353,7 +353,7 @@ standard_name = surface_roughness_length_over_ice_interstitial long_name = surface roughness length over ice (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -362,7 +362,7 @@ standard_name = surface_roughness_length_from_wave_model long_name = surface roughness length from wave model units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -371,7 +371,7 @@ standard_name = surface_friction_velocity_over_ocean long_name = surface friction velocity over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -380,7 +380,7 @@ standard_name = surface_friction_velocity_over_land long_name = surface friction velocity over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -389,7 +389,7 @@ standard_name = surface_friction_velocity_over_ice long_name = surface friction velocity over ice units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -398,7 +398,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -407,7 +407,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_land long_name = surface exchange coeff for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -416,7 +416,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice long_name = surface exchange coeff for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -425,7 +425,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -434,7 +434,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land long_name = surface exchange coeff heat & moisture over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -443,7 +443,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice long_name = surface exchange coeff heat & moisture over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -452,7 +452,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_ocean long_name = bulk Richardson number at the surface over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -461,7 +461,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_land long_name = bulk Richardson number at the surface over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -470,7 +470,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level_over_ice long_name = bulk Richardson number at the surface over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -479,7 +479,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -488,7 +488,7 @@ standard_name = surface_wind_stress_over_land long_name = surface wind stress over land units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -497,7 +497,7 @@ standard_name = surface_wind_stress_over_ice long_name = surface wind stress over ice units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -506,7 +506,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity function for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -515,7 +515,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_land long_name = Monin-Obukhov similarity function for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -524,7 +524,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ice long_name = Monin-Obukhov similarity function for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -533,7 +533,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_ocean long_name = Monin-Obukhov similarity function for heat over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -542,7 +542,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_land long_name = Monin-Obukhov similarity function for heat over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -551,7 +551,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_over_ice long_name = Monin-Obukhov similarity function for heat over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -560,7 +560,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ocean long_name = Monin-Obukhov similarity parameter for momentum at 10m over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -569,7 +569,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_land long_name = Monin-Obukhov similarity parameter for momentum at 10m over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -578,7 +578,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ice long_name = Monin-Obukhov similarity parameter for momentum at 10m over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -587,7 +587,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ocean long_name = Monin-Obukhov similarity parameter for heat at 2m over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -596,7 +596,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_land long_name = Monin-Obukhov similarity parameter for heat at 2m over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -605,7 +605,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ice long_name = Monin-Obukhov similarity parameter for heat at 2m over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index b397e0f4c..eb3f77a98 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -166,7 +166,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -175,7 +175,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = 1st model layer air temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -184,7 +184,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = 1st model layer specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -193,7 +193,7 @@ standard_name = soil_type_classification long_name = soil type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -201,7 +201,7 @@ standard_name = vegetation_type_classification long_name = vegetation type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -209,7 +209,7 @@ standard_name = bounded_vegetation_area_fraction long_name = areal fractional cover of green vegetation bounded on the bottom units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -218,7 +218,7 @@ standard_name = surface_longwave_emissivity_over_land_interstitial long_name = surface lw emissivity in fraction over land (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -227,7 +227,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_land long_name = total sky surface downward longwave flux absorbed by the ground over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -236,7 +236,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = total sky surface downward shortwave flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -245,7 +245,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = total sky surface net shortwave flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -263,7 +263,7 @@ standard_name = deep_soil_temperature long_name = bottom soil temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -272,7 +272,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_land long_name = surface exchange coeff for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -281,7 +281,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land long_name = surface exchange coeff heat & moisture over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -290,7 +290,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = Model layer 1 mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -299,7 +299,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -308,7 +308,7 @@ standard_name = height_above_ground_at_lowest_model_layer long_name = height above ground at 1st model layer units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -317,7 +317,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -325,7 +325,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -334,7 +334,7 @@ standard_name = surface_slope_classification long_name = surface slope type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -342,7 +342,7 @@ standard_name = minimum_vegetation_area_fraction long_name = min fractional coverage of green veg units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -351,7 +351,7 @@ standard_name = maximum_vegetation_area_fraction long_name = max fractnl cover of green veg (not used) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -360,7 +360,7 @@ standard_name = upper_bound_on_max_albedo_over_deep_snow long_name = upper bound on max albedo over deep snow units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -369,7 +369,7 @@ standard_name = surface_diffused_shortwave_albedo long_name = mean surface diffused shortwave albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -378,7 +378,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -386,7 +386,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -418,7 +418,7 @@ standard_name = perturbation_of_soil_type_b_parameter long_name = perturbation of soil type "b" parameter units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -427,7 +427,7 @@ standard_name = perturbation_of_leaf_area_index long_name = perturbation of leaf area index units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -436,7 +436,7 @@ standard_name = perturbation_of_vegetation_fraction long_name = perturbation of vegetation fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -454,7 +454,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_land long_name = water equiv of acc snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -463,7 +463,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -472,7 +472,7 @@ standard_name = surface_skin_temperature_over_land_interstitial long_name = surface skin temperature over land (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -481,7 +481,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land long_name = total precipitation amount in each time step over land units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -490,7 +490,7 @@ standard_name = flag_for_precipitation_type long_name = flag for snow or rain precipitation units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -499,7 +499,7 @@ standard_name = volume_fraction_of_soil_moisture long_name = volumetric fraction of soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -508,7 +508,7 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -517,7 +517,7 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture long_name = volume fraction of unfrozen soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -526,7 +526,7 @@ standard_name = canopy_water_amount long_name = canopy moisture content units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -535,7 +535,7 @@ standard_name = transpiration_flux long_name = total plant transpiration rate units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -544,7 +544,7 @@ standard_name = surface_skin_temperature_after_iteration_over_land long_name = surface skin temperature after iteration over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -553,7 +553,7 @@ standard_name = surface_roughness_length_over_land_interstitial long_name = surface roughness length over land (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -562,7 +562,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -571,7 +571,7 @@ standard_name = surface_specific_humidity_over_land long_name = surface air saturation specific humidity over land units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -580,7 +580,7 @@ standard_name = upward_heat_flux_in_soil_over_land long_name = soil heat flux over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -589,7 +589,7 @@ standard_name = subsurface_runoff_flux long_name = subsurface runoff flux units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -598,7 +598,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_land long_name = kinematic surface upward latent heat flux over land units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -607,7 +607,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_land long_name = kinematic surface upward sensible heat flux over land units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -616,7 +616,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_land long_name = surface upward potential latent heat flux over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -625,7 +625,7 @@ standard_name = surface_runoff_flux long_name = surface runoff flux units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -634,7 +634,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land long_name = momentum exchange coefficient over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -643,7 +643,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land long_name = thermal exchange coefficient over land units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -652,7 +652,7 @@ standard_name = soil_upward_latent_heat_flux long_name = soil upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -661,7 +661,7 @@ standard_name = canopy_upward_latent_heat_flux long_name = canopy upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -670,7 +670,7 @@ standard_name = snow_deposition_sublimation_upward_latent_heat_flux long_name = latent heat flux from snow depo/subl units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -679,7 +679,7 @@ standard_name = surface_snow_area_fraction long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -688,7 +688,7 @@ standard_name = soil_moisture_content long_name = soil moisture content units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -697,7 +697,7 @@ standard_name = snow_freezing_rain_upward_latent_heat_flux long_name = latent heat flux due to snow and frz rain units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -706,7 +706,7 @@ standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point long_name = soil water fraction at wilting point units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -715,7 +715,7 @@ standard_name = threshold_volume_fraction_of_condensed_water_in_soil long_name = soil moisture threshold units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -724,7 +724,7 @@ standard_name = normalized_soil_wetness long_name = normalized soil wetness units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 2c91a3d59..a8c39defe 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -160,7 +160,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = mean temperature at lowest model layer units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -169,7 +169,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = water vapor specific humidity at lowest model layer units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -178,7 +178,7 @@ standard_name = cloud_condensed_water_mixing_ratio_at_lowest_model_layer long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water at lowest model layer units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -187,7 +187,7 @@ standard_name = soil_type_classification long_name = soil type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -195,7 +195,7 @@ standard_name = vegetation_type_classification long_name = vegetation type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -203,7 +203,7 @@ standard_name = vegetation_area_fraction long_name = areal fractional cover of green vegetation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -212,7 +212,7 @@ standard_name = leaf_area_index long_name = leaf area index units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -221,7 +221,7 @@ standard_name = surface_longwave_emissivity_over_land_interstitial long_name = surface lw emissivity in fraction over land (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -230,7 +230,7 @@ standard_name = surface_downwelling_longwave_flux long_name = surface downwelling longwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -239,7 +239,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -248,7 +248,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = surface net downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -266,7 +266,7 @@ standard_name = deep_soil_temperature long_name = deep soil temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -275,7 +275,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_land long_name = surface exchange coeff for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -284,7 +284,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land long_name = surface exchange coeff heat & moisture over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -293,7 +293,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = mean pressure at lowest model layer units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -302,7 +302,7 @@ standard_name = height_above_ground_at_lowest_model_layer long_name = layer 1 height above ground (not MSL) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -311,7 +311,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -320,7 +320,7 @@ standard_name = minimum_vegetation_area_fraction long_name = min fractional coverage of green vegetation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -329,7 +329,7 @@ standard_name = maximum_vegetation_area_fraction long_name = max fractional coverage of green vegetation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -338,7 +338,7 @@ standard_name = mean_vis_albedo_with_weak_cosz_dependency long_name = mean vis albedo with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -347,7 +347,7 @@ standard_name = mean_nir_albedo_with_weak_cosz_dependency long_name = mean nir albedo with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -356,7 +356,7 @@ standard_name = upper_bound_on_max_albedo_over_deep_snow long_name = maximum snow albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -365,7 +365,7 @@ standard_name = surface_diffused_shortwave_albedo long_name = mean surface diffused sw albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -374,7 +374,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -382,7 +382,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -406,7 +406,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -415,7 +415,7 @@ standard_name = volume_fraction_of_soil_moisture long_name = total soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -424,7 +424,7 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -433,7 +433,7 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture long_name = liquid soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -458,7 +458,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -466,7 +466,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -506,7 +506,7 @@ standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point long_name = soil water fraction at wilting point units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -515,7 +515,7 @@ standard_name = threshold_volume_fraction_of_condensed_water_in_soil long_name = soil moisture threshold units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -595,7 +595,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_land long_name = water equiv of acc snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -604,7 +604,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -613,7 +613,7 @@ standard_name = surface_skin_temperature_over_land_interstitial long_name = surface skin temperature over land use as interstitial units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -622,7 +622,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -631,7 +631,7 @@ standard_name = lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep long_name = explicit rainfall from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -640,7 +640,7 @@ standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep long_name = convective_precipitation_amount from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -649,7 +649,7 @@ standard_name = lwe_thickness_of_ice_amount_from_previous_timestep long_name = ice amount from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -658,7 +658,7 @@ standard_name = lwe_thickness_of_snow_amount_from_previous_timestep long_name = snow amount from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -667,7 +667,7 @@ standard_name = lwe_thickness_of_graupel_amount_from_previous_timestep long_name = graupel amount from previous timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -676,7 +676,7 @@ standard_name = flag_for_precipitation_type long_name = snow/rain flag for precipitation units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -685,7 +685,7 @@ standard_name = volume_fraction_of_soil_moisture_for_land_surface_model long_name = volumetric fraction of soil moisture for lsm units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys intent = inout @@ -694,7 +694,7 @@ standard_name = soil_temperature_for_land_surface_model long_name = soil temperature for land surface model units = K - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys intent = inout @@ -703,7 +703,7 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model long_name = volume fraction of unfrozen soil moisture for lsm units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys intent = inout @@ -712,7 +712,7 @@ standard_name = flag_for_frozen_soil_physics long_name = flag for frozen soil physics (RUC) units = flag - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys intent = inout @@ -721,7 +721,7 @@ standard_name = volume_fraction_of_frozen_soil_moisture_for_land_surface_model long_name = volume fraction of frozen soil moisture for lsm units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys intent = inout @@ -730,7 +730,7 @@ standard_name = canopy_water_amount long_name = canopy water amount units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -739,7 +739,7 @@ standard_name = transpiration_flux long_name = total plant transpiration rate units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -748,7 +748,7 @@ standard_name = surface_skin_temperature_after_iteration_over_land long_name = surface skin temperature after iteration over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -757,7 +757,7 @@ standard_name = snow_temperature_bottom_first_layer long_name = snow temperature at the bottom of first snow layer units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -766,7 +766,7 @@ standard_name = surface_roughness_length_over_land_interstitial long_name = surface roughness length over land (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -775,7 +775,7 @@ standard_name = cloud_condensed_water_mixing_ratio_at_surface long_name = moist cloud water mixing ratio at surface units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -784,7 +784,7 @@ standard_name = surface_condensation_mass long_name = surface condensation mass units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -793,7 +793,7 @@ standard_name = sea_ice_temperature_interstitial long_name = sea ice surface skin temperature use as interstitial units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -802,7 +802,7 @@ standard_name = water_vapor_mixing_ratio_at_surface long_name = water vapor mixing ratio at surface units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -811,7 +811,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -820,7 +820,7 @@ standard_name = surface_specific_humidity_over_land long_name = surface air saturation specific humidity over land units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -829,7 +829,7 @@ standard_name = upward_heat_flux_in_soil_over_land long_name = soil heat flux over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -838,7 +838,7 @@ standard_name = subsurface_runoff_flux long_name = subsurface runoff flux units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -847,7 +847,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_land long_name = kinematic surface upward evaporation flux over land units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -856,7 +856,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_land long_name = kinematic surface upward sensible heat flux over land units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -865,7 +865,7 @@ standard_name = density_of_frozen_precipitation long_name = density of frozen precipitation units = kg m-3 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -874,7 +874,7 @@ standard_name = surface_runoff_flux long_name = surface runoff flux units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -883,7 +883,7 @@ standard_name = total_runoff long_name = total water runoff units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -892,7 +892,7 @@ standard_name = surface_runoff long_name = surface water runoff (from lsm) units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -901,7 +901,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land long_name = thermal exchange coefficient over land units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -910,7 +910,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land long_name = momentum exchange coefficient over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -919,7 +919,7 @@ standard_name = soil_upward_latent_heat_flux long_name = soil upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -928,7 +928,7 @@ standard_name = canopy_upward_latent_heat_flux long_name = canopy upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -937,7 +937,7 @@ standard_name = snow_deposition_sublimation_upward_latent_heat_flux long_name = latent heat flux from snow depo/subl units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -946,7 +946,7 @@ standard_name = soil_moisture_content long_name = soil moisture content units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -955,7 +955,7 @@ standard_name = normalized_soil_wetness_for_land_surface_model long_name = normalized soil wetness units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -964,7 +964,7 @@ standard_name = accumulated_water_equivalent_of_frozen_precip long_name = snow water equivalent of run-total frozen precip units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -973,7 +973,7 @@ standard_name = total_accumulated_snowfall long_name = run-total snow accumulation on the ground units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index 73382d008..ecfd3e09f 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -62,7 +62,7 @@ name = noahmpdrv_run type = scheme [im] - standard_name = horizontal_dimension + standard_name = horizontal_loop_extent long_name = horizontal dimension units = count dimensions = () @@ -89,7 +89,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -98,7 +98,7 @@ standard_name = x_wind_at_lowest_model_layer long_name = zonal wind at lowest model layer units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = y_wind_at_lowest_model_layer long_name = meridional wind at lowest model layer units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent= in @@ -116,7 +116,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = mean temperature at lowest model layer units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent= in @@ -125,7 +125,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = water vapor specific humidity at lowest model layer units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent= in @@ -134,7 +134,7 @@ standard_name = soil_type_classification long_name = soil type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent= in optional = F @@ -142,7 +142,7 @@ standard_name = vegetation_type_classification long_name = vegetation type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent= in optional = F @@ -150,7 +150,7 @@ standard_name = bounded_vegetation_area_fraction long_name = areal fractional cover of green vegetation bounded on the bottom units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent= in @@ -159,7 +159,7 @@ standard_name = surface_longwave_emissivity_over_land_interstitial long_name = surface lw emissivity in fraction over land (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -168,7 +168,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_land long_name = total sky surface downward longwave flux absorbed by the ground over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -177,7 +177,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = surface downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent= in @@ -186,7 +186,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = surface net downwelling shortwave flux at current time units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -204,7 +204,7 @@ standard_name = deep_soil_temperature long_name = deep soil temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -213,7 +213,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_land long_name = surface exchange coeff for momentum over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -222,7 +222,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land long_name = surface exchange coeff heat & moisture over land units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -231,7 +231,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = mean pressure at lowest model layer units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -240,7 +240,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -249,7 +249,7 @@ standard_name = height_above_ground_at_lowest_model_layer long_name = layer 1 height above ground (not MSL) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -258,7 +258,7 @@ standard_name = flag_nonzero_land_surface_fraction long_name = flag indicating presence of some land surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -266,7 +266,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -275,7 +275,7 @@ standard_name = surface_slope_classification long_name = surface slope type at each grid cell units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -283,7 +283,7 @@ standard_name = minimum_vegetation_area_fraction long_name = min fractional coverage of green vegetation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -292,7 +292,7 @@ standard_name = maximum_vegetation_area_fraction long_name = max fractional coverage of green vegetation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -301,7 +301,7 @@ standard_name = upper_bound_on_max_albedo_over_deep_snow long_name = maximum snow albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -310,7 +310,7 @@ standard_name = surface_diffused_shortwave_albedo long_name = mean surface diffused sw albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -319,7 +319,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -327,7 +327,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -431,7 +431,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -440,7 +440,7 @@ standard_name = instantaneous_cosine_of_zenith_angle long_name = cosine of zenith angle at current time units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -466,7 +466,7 @@ standard_name = explicit_rainfall_rate_from_previous_timestep long_name = explicit rainfall rate previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -475,7 +475,7 @@ standard_name = convective_precipitation_rate_from_previous_timestep long_name = convective precipitation rate from previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -484,7 +484,7 @@ standard_name = snow_precipitation_rate_from_previous_timestep long_name = snow precipitation rate from previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -493,7 +493,7 @@ standard_name = graupel_precipitation_rate_from_previous_timestep long_name = graupel precipitation rate from previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -502,7 +502,7 @@ standard_name = ice_precipitation_rate_from_previous_timestep long_name = ice precipitation rate from previous timestep units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -592,7 +592,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_land long_name = water equiv of acc snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -601,7 +601,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_land long_name = water equivalent snow depth over land units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -610,7 +610,7 @@ standard_name = surface_skin_temperature_over_land_interstitial long_name = surface skin temperature over land (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -619,7 +619,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land long_name = total precipitation amount in each time step over land units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -628,7 +628,7 @@ standard_name = flag_for_precipitation_type long_name = snow/rain flag for precipitation units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -637,7 +637,7 @@ standard_name = volume_fraction_of_soil_moisture long_name = total soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -646,7 +646,7 @@ standard_name = soil_temperature long_name = soil temperature units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -655,7 +655,7 @@ standard_name = volume_fraction_of_unfrozen_soil_moisture long_name = liquid soil moisture units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) + dimensions = (horizontal_loop_extent,soil_vertical_dimension) type = real kind = kind_phys intent = inout @@ -664,7 +664,7 @@ standard_name = canopy_water_amount long_name = canopy water amount units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -673,7 +673,7 @@ standard_name = transpiration_flux long_name = total plant transpiration rate units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -682,7 +682,7 @@ standard_name = surface_skin_temperature_after_iteration_over_land long_name = surface skin temperature after iteration over land units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -691,7 +691,7 @@ standard_name = surface_roughness_length_over_land_interstitial long_name = surface roughness length over land (temporary use as interstitial) units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -700,7 +700,7 @@ standard_name = number_of_snow_layers long_name = number of snow layers units = count - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -709,7 +709,7 @@ standard_name = vegetation_temperature long_name = vegetation temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -718,7 +718,7 @@ standard_name = ground_temperature_for_noahmp long_name = ground temperature for noahmp units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -727,7 +727,7 @@ standard_name = canopy_intercepted_ice_mass long_name = canopy intercepted ice mass units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -736,7 +736,7 @@ standard_name = canopy_intercepted_liquid_water long_name = canopy intercepted liquid water units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -745,7 +745,7 @@ standard_name = canopy_air_vapor_pressure long_name = canopy air vapor pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -754,7 +754,7 @@ standard_name = canopy_air_temperature long_name = canopy air temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -763,7 +763,7 @@ standard_name = surface_drag_coefficient_for_momentum_for_noahmp long_name = surface drag coefficient for momentum for noahmp units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -772,7 +772,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_for_noahmp long_name = surface exchange coeff heat & moisture for noahmp units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -781,7 +781,7 @@ standard_name = area_fraction_of_wet_canopy long_name = area fraction of canopy that is wetted/snowed units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -790,7 +790,7 @@ standard_name = snow_mass_at_previous_time_step long_name = snow mass at previous time step units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -799,7 +799,7 @@ standard_name = snow_albedo_at_previous_time_step long_name = snow albedo at previous time step units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -808,7 +808,7 @@ standard_name = snow_precipitation_rate_at_surface long_name = snow precipitation rate at surface units = mm s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -817,7 +817,7 @@ standard_name = lake_water_storage long_name = lake water storage units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -826,7 +826,7 @@ standard_name = water_table_depth long_name = water table depth units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -835,7 +835,7 @@ standard_name = water_storage_in_aquifer long_name = water storage in aquifer units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -844,7 +844,7 @@ standard_name = water_storage_in_aquifer_and_saturated_soil long_name = water storage in aquifer and saturated soil units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -853,7 +853,7 @@ standard_name = snow_temperature long_name = snow_temperature units = K - dimensions = (horizontal_dimension, -2:0) + dimensions = (horizontal_loop_extent, -2:0) type = real kind = kind_phys intent = inout @@ -862,7 +862,7 @@ standard_name = layer_bottom_depth_from_snow_surface long_name = depth from the top of the snow surface at the bottom of the layer units = m - dimensions = (horizontal_dimension, -2:4) + dimensions = (horizontal_loop_extent, -2:4) type = real kind = kind_phys intent = inout @@ -871,7 +871,7 @@ standard_name = snow_layer_ice long_name = snow_layer_ice units = mm - dimensions = (horizontal_dimension, -2:0) + dimensions = (horizontal_loop_extent, -2:0) type = real kind = kind_phys intent = inout @@ -880,7 +880,7 @@ standard_name = snow_layer_liquid_water long_name = snow layer liquid water units = mm - dimensions = (horizontal_dimension, -2:0) + dimensions = (horizontal_loop_extent, -2:0) type = real kind = kind_phys intent = inout @@ -889,7 +889,7 @@ standard_name = leaf_mass long_name = leaf mass units = g m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -898,7 +898,7 @@ standard_name = fine_root_mass long_name = fine root mass units = g m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -907,7 +907,7 @@ standard_name = stem_mass long_name = stem mass units = g m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -916,7 +916,7 @@ standard_name = wood_mass long_name = wood mass including woody roots units = g m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -925,7 +925,7 @@ standard_name = slow_soil_pool_mass_content_of_carbon long_name = stable carbon in deep soil units = g m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -934,7 +934,7 @@ standard_name = fast_soil_pool_mass_content_of_carbon long_name = short-lived carbon in shallow soil units = g m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -943,7 +943,7 @@ standard_name = leaf_area_index long_name = leaf area index units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -952,7 +952,7 @@ standard_name = stem_area_index long_name = stem area index units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -961,7 +961,7 @@ standard_name = nondimensional_snow_age long_name = non-dimensional snow age units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -970,7 +970,7 @@ standard_name = equilibrium_soil_water_content long_name = equilibrium soil water content units = m3 m-3 - dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) + dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys intent = inout @@ -979,7 +979,7 @@ standard_name = soil_water_content_between_soil_bottom_and_water_table long_name = soil water content between the bottom of the soil and the water table units = m3 m-3 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -988,7 +988,7 @@ standard_name = water_table_recharge_when_deep long_name = recharge to or from the water table when deep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -997,7 +997,7 @@ standard_name = water_table_recharge_when_shallow long_name = recharge to or from the water table when shallow units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -1006,7 +1006,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1015,7 +1015,7 @@ standard_name = surface_specific_humidity_over_land long_name = surface air saturation specific humidity over land units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1024,7 +1024,7 @@ standard_name = upward_heat_flux_in_soil_over_land long_name = soil heat flux over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1033,7 +1033,7 @@ standard_name = subsurface_runoff_flux long_name = subsurface runoff flux units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1042,7 +1042,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_land long_name = kinematic surface upward latent heat flux over land units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1051,7 +1051,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_land long_name = kinematic surface upward sensible heat flux over land units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1060,7 +1060,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_land long_name = surface upward potential latent heat flux over land units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1069,7 +1069,7 @@ standard_name = surface_runoff_flux long_name = surface runoff flux units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1078,7 +1078,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land long_name = momentum exchange coefficient over land units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1087,7 +1087,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land long_name = thermal exchange coefficient over land units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1096,7 +1096,7 @@ standard_name = soil_upward_latent_heat_flux long_name = soil upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1105,7 +1105,7 @@ standard_name = canopy_upward_latent_heat_flux long_name = canopy upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1114,7 +1114,7 @@ standard_name = snow_deposition_sublimation_upward_latent_heat_flux long_name = latent heat flux from snow depo/subl units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1123,7 +1123,7 @@ standard_name = surface_snow_area_fraction long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1132,7 +1132,7 @@ standard_name = soil_moisture_content long_name = soil moisture units = kg m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1141,7 +1141,7 @@ standard_name = snow_freezing_rain_upward_latent_heat_flux long_name = latent heat flux due to snow and frz rain units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1150,7 +1150,7 @@ standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point long_name = wilting point (volumetric) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1159,7 +1159,7 @@ standard_name = threshold_volume_fraction_of_condensed_water_in_soil long_name = soil moisture threshold (volumetric) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1168,7 +1168,7 @@ standard_name = normalized_soil_wetness long_name = normalized soil wetness units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1177,7 +1177,7 @@ standard_name = temperature_at_2m_from_noahmp long_name = 2 meter temperature from noahmp units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1186,7 +1186,7 @@ standard_name = specific_humidity_at_2m_from_noahmp long_name = 2 meter specific humidity from noahmp units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 44e132293..2c32ca106 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -118,7 +118,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = x_wind_at_lowest_model_layer long_name = x component of surface layer wind units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = y_wind_at_lowest_model_layer long_name = y component of surface layer wind units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -145,7 +145,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = surface layer mean temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -154,7 +154,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = surface layer mean specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -163,7 +163,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -172,7 +172,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -181,7 +181,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -190,7 +190,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = surface layer mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -199,7 +199,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -208,7 +208,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the ground surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -217,7 +217,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_layer long_name = dimensionless Exner function at the lowest model layer units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -226,7 +226,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -234,7 +234,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -243,7 +243,7 @@ standard_name = sine_of_latitude long_name = sine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ standard_name = surface_wind_stress_over_ocean long_name = surface wind stress over ocean units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -261,7 +261,7 @@ standard_name = surface_longwave_emissivity_over_ocean_interstitial long_name = surface lw emissivity in fraction over ocean (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -270,7 +270,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ocean long_name = total sky surface downward longwave flux absorbed by the ground over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -279,7 +279,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = total sky sfc net sw flx into ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -288,7 +288,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean long_name = total precipitation amount in each time step over ocean units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -323,7 +323,7 @@ standard_name = instantaneous_cosine_of_zenith_angle long_name = cosine of solar zenith angle units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -332,7 +332,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -341,7 +341,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -349,7 +349,7 @@ standard_name = flag_for_guess_run long_name = flag for guess run units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -397,7 +397,7 @@ standard_name = surface_skin_temperature_for_nsst long_name = ocean surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -406,7 +406,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -415,7 +415,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -424,7 +424,7 @@ standard_name = sea_water_salinity long_name = salinity content in diurnal thermocline layer units = ppt m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -433,7 +433,7 @@ standard_name = diurnal_thermocline_layer_x_current long_name = u-current content in diurnal thermocline layer units = m2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -442,7 +442,7 @@ standard_name = diurnal_thermocline_layer_y_current long_name = v-current content in diurnal thermocline layer units = m2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -451,7 +451,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -460,7 +460,7 @@ standard_name = ocean_mixed_layer_thickness long_name = mixed layer thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -469,7 +469,7 @@ standard_name = sensitivity_of_dtl_heat_content_to_surface_temperature long_name = d(xt)/d(ts) units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -478,7 +478,7 @@ standard_name = sensitivity_of_dtl_thickness_to_surface_temperature long_name = d(xz)/d(ts) units = m K-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -487,7 +487,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -496,7 +496,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -505,7 +505,7 @@ standard_name = coefficient_c_0 long_name = coefficient1 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -514,7 +514,7 @@ standard_name = coefficient_c_d long_name = coefficient2 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -523,7 +523,7 @@ standard_name = coefficient_w_0 long_name = coefficient3 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -532,7 +532,7 @@ standard_name = coefficient_w_d long_name = coefficient4 to calculate d(tz)/d(ts) units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -541,7 +541,7 @@ standard_name = free_convection_layer_thickness long_name = thickness of free convection layer units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -550,7 +550,7 @@ standard_name = index_of_dtlm_start long_name = index to start dtlm run or not units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -559,7 +559,7 @@ standard_name = sensible_heat_flux_due_to_rainfall long_name = sensible heat flux due to rainfall units = W - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -568,7 +568,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -577,7 +577,7 @@ standard_name = upward_heat_flux_in_soil_over_ocean long_name = soil heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -586,7 +586,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -595,7 +595,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -604,7 +604,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -613,7 +613,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -622,7 +622,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ocean long_name = surface upward potential latent heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -667,7 +667,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -675,7 +675,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -684,7 +684,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -693,7 +693,7 @@ standard_name = surface_skin_temperature_for_nsst long_name = ocean surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -702,7 +702,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -711,7 +711,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -720,7 +720,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -729,7 +729,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -738,7 +738,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -755,7 +755,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -826,7 +826,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -834,7 +834,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -842,7 +842,7 @@ standard_name = orography long_name = orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -851,7 +851,7 @@ standard_name = orography_unfiltered long_name = unfiltered orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -884,7 +884,7 @@ standard_name = diurnal_thermocline_layer_heat_content long_name = heat content in diurnal thermocline layer units = K m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -893,7 +893,7 @@ standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -902,7 +902,7 @@ standard_name = sub_layer_cooling_amount long_name = sub-layer cooling amount units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -911,7 +911,7 @@ standard_name = sub_layer_cooling_thickness long_name = sub-layer cooling thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -920,7 +920,7 @@ standard_name = sea_surface_reference_temperature long_name = reference/foundation temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -929,7 +929,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -938,7 +938,7 @@ standard_name = surface_skin_temperature_after_iteration_over_ocean long_name = surface skin temperature after iteration over ocean units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -947,7 +947,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -964,7 +964,7 @@ standard_name = mean_change_over_depth_in_sea_water_temperature long_name = mean of dT(z) (zsea1 to zsea2) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index 95b9aa37d..afdea6c3f 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -55,7 +55,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -64,7 +64,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = surface layer mean temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -73,7 +73,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = surface layer mean specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -82,7 +82,7 @@ standard_name = surface_skin_temperature_over_ocean_interstitial long_name = surface skin temperature over ocean (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -91,7 +91,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ocean long_name = surface exchange coeff for momentum over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -100,7 +100,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean long_name = surface exchange coeff heat & moisture over ocean units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -109,7 +109,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = surface layer mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -118,7 +118,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = flag_nonzero_wet_surface_fraction long_name = flag indicating presence of some ocean or lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -135,7 +135,7 @@ standard_name = flag_nonzero_lake_surface_fraction long_name = flag indicating presence of some lake surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -143,7 +143,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -152,7 +152,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -160,7 +160,7 @@ standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -169,7 +169,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -178,7 +178,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean long_name = thermal exchange coefficient over ocean units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -187,7 +187,7 @@ standard_name = upward_heat_flux_in_soil_over_ocean long_name = soil heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -196,7 +196,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -205,7 +205,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -214,7 +214,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ocean long_name = surface upward potential latent heat flux over ocean units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index 10fcfb6ab..4ce931bac 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -117,7 +117,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -126,7 +126,7 @@ standard_name = air_temperature_at_lowest_model_layer long_name = surface layer mean temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = water_vapor_specific_humidity_at_lowest_model_layer long_name = surface layer mean specific humidity units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -153,7 +153,7 @@ standard_name = surface_longwave_emissivity_over_ice_interstitial long_name = surface lw emissivity in fraction over ice (temporary use as interstitial) units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -162,7 +162,7 @@ standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ice long_name = total sky surface downward longwave flux absorbed by the ground over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -171,7 +171,7 @@ standard_name = surface_net_downwelling_shortwave_flux long_name = total sky sfc netsw flx into ground units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -180,7 +180,7 @@ standard_name = surface_downwelling_shortwave_flux long_name = total sky sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -189,7 +189,7 @@ standard_name = flag_for_precipitation_type long_name = snow/rain flag for precipitation units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -198,7 +198,7 @@ standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice long_name = surface exchange coeff for momentum over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -207,7 +207,7 @@ standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice long_name = surface exchange coeff heat & moisture over ice units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -216,7 +216,7 @@ standard_name = air_pressure_at_lowest_model_layer long_name = surface layer mean pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -225,7 +225,7 @@ standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer long_name = Exner function ratio bt midlayer and interface at 1st layer units = ratio - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -234,7 +234,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_interface long_name = dimensionless Exner function at the ground surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -243,7 +243,7 @@ standard_name = dimensionless_exner_function_at_lowest_model_layer long_name = dimensionless Exner function at the lowest model layer units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -252,7 +252,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -261,7 +261,7 @@ standard_name = flag_for_iteration long_name = flag for iteration units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -285,7 +285,7 @@ standard_name = sea_ice_thickness long_name = sea-ice thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -294,7 +294,7 @@ standard_name = sea_ice_concentration long_name = sea-ice concentration [0,1] units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -303,7 +303,7 @@ standard_name = sea_ice_temperature_interstitial long_name = sea-ice surface temperature use as interstitial units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -312,7 +312,7 @@ standard_name = water_equivalent_accumulated_snow_depth_over_ice long_name = water equiv of acc snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -321,7 +321,7 @@ standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -330,7 +330,7 @@ standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice long_name = total precipitation amount in each time step over ice units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -339,7 +339,7 @@ standard_name = internal_ice_temperature long_name = sea ice internal temperature units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) + dimensions = (horizontal_loop_extent,ice_vertical_dimension) type = real kind = kind_phys intent = inout @@ -348,7 +348,7 @@ standard_name = surface_upward_potential_latent_heat_flux_over_ice long_name = surface upward potential latent heat flux over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -357,7 +357,7 @@ standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -366,7 +366,7 @@ standard_name = surface_specific_humidity_over_ice long_name = surface air saturation specific humidity over ice units = kg kg-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -375,7 +375,7 @@ standard_name = surface_snow_melt long_name = snow melt during timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -384,7 +384,7 @@ standard_name = upward_heat_flux_in_soil_over_ice long_name = soil heat flux over ice units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -393,7 +393,7 @@ standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ice long_name = momentum exchange coefficient over ice units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -402,7 +402,7 @@ standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice long_name = thermal exchange coefficient over ice units = kg m-2 s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -411,7 +411,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_over_ice long_name = kinematic surface upward latent heat flux over ice units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -420,7 +420,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice long_name = kinematic surface upward sensible heat flux over ice units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -437,7 +437,7 @@ standard_name = flag_nonzero_sea_ice_surface_fraction long_name = flag indicating presence of some sea ice surface area fraction units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = logical intent = in optional = F @@ -445,7 +445,7 @@ standard_name = sea_land_ice_mask_cice long_name = sea/land/ice mask cice (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -471,7 +471,7 @@ standard_name = sea_area_fraction long_name = fraction of horizontal grid area occupied by ocean units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index 3fe29f5ef..7986d28f8 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -197,7 +197,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -206,7 +206,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -215,7 +215,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -224,7 +224,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -233,7 +233,7 @@ standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -242,7 +242,7 @@ standard_name = ice_water_mixing_ratio_convective_transport_tracer long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -251,7 +251,7 @@ standard_name = water_vapor_specific_humidity_updated_by_physics long_name = water vapor specific humidity updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -260,7 +260,7 @@ standard_name = air_temperature_updated_by_physics long_name = temperature updated by physics units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -269,7 +269,7 @@ standard_name = x_wind_updated_by_physics long_name = zonal wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -278,7 +278,7 @@ standard_name = y_wind_updated_by_physics long_name = meridional wind updated by physics units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -287,7 +287,7 @@ standard_name = lwe_thickness_of_shallow_convective_precipitation_amount long_name = shallow convective rainfall amount on physics timestep units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -296,7 +296,7 @@ standard_name = vertical_index_at_cloud_base long_name = index for cloud base units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -304,7 +304,7 @@ standard_name = vertical_index_at_cloud_top long_name = index for cloud top units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -312,7 +312,7 @@ standard_name = flag_deep_convection long_name = deep convection: 0=no, 1=yes units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = inout optional = F @@ -320,7 +320,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -328,7 +328,7 @@ standard_name = omega long_name = layer mean vertical velocity units = Pa s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -345,7 +345,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = pbl height units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -354,7 +354,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -363,7 +363,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -372,7 +372,7 @@ standard_name = instantaneous_atmosphere_updraft_convective_mass_flux long_name = (updraft mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -381,7 +381,7 @@ standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux long_name = (detrainment mass flux) * delt units = kg m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -390,7 +390,7 @@ standard_name = convective_cloud_water_mixing_ratio long_name = moist convective cloud water mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -399,7 +399,7 @@ standard_name = convective_cloud_cover long_name = convective cloud cover units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index 4a557f253..d4b7b3c5e 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -27,7 +27,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -45,7 +45,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -54,7 +54,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -99,7 +99,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -108,7 +108,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -117,7 +117,7 @@ standard_name = tendency_of_tracers_due_to_model_physics long_name = updated tendency of the tracers due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -158,7 +158,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -167,7 +167,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -176,7 +176,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -203,7 +203,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -212,7 +212,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -221,7 +221,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -230,7 +230,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -238,7 +238,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -247,7 +247,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -256,7 +256,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -265,7 +265,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -337,7 +337,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -346,7 +346,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -355,7 +355,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -364,7 +364,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -382,7 +382,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -390,7 +390,7 @@ standard_name = x_wind_at_10m long_name = x component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -399,7 +399,7 @@ standard_name = y_wind_at_10m long_name = y component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -408,7 +408,7 @@ standard_name = cell_size long_name = size of the grid cell units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index ae228bfe8..64212b0ac 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -27,7 +27,7 @@ standard_name = x_wind long_name = x component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -36,7 +36,7 @@ standard_name = y_wind long_name = y component of layer wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -45,7 +45,7 @@ standard_name = air_temperature long_name = layer mean air temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -54,7 +54,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = Exner function at layers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = updated tendency of the y wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -99,7 +99,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = updated tendency of the x wind units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -108,7 +108,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = updated tendency of the temperature units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -117,7 +117,7 @@ standard_name = tendency_of_tracers_due_to_model_physics long_name = updated tendency of the tracers due to model physics units = kg kg-1 s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = inout @@ -126,7 +126,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky shortwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky longwave heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -144,7 +144,7 @@ standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes long_name = zenith angle temporal adjustment factor for shortwave units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -185,7 +185,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -194,7 +194,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -203,7 +203,7 @@ standard_name = surface_air_pressure long_name = surface pressure units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -212,7 +212,7 @@ standard_name = surface_roughness_length long_name = surface roughness length in cm units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -221,7 +221,7 @@ standard_name = surface_wind_stress long_name = surface wind stress units = m2 s-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -230,7 +230,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -239,7 +239,7 @@ standard_name = Monin_Obukhov_similarity_function_for_momentum long_name = Monin-Obukhov similarity function for momentum units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -248,7 +248,7 @@ standard_name = Monin_Obukhov_similarity_function_for_heat long_name = Monin-Obukhov similarity function for heat units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -257,7 +257,7 @@ standard_name = sea_land_ice_mask long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -265,7 +265,7 @@ standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward sensible heat flux units = K m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -274,7 +274,7 @@ standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness long_name = kinematic surface upward latent heat flux units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -283,7 +283,7 @@ standard_name = wind_speed_at_lowest_model_layer long_name = wind speed at lowest model level units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -292,7 +292,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -364,7 +364,7 @@ standard_name = instantaneous_surface_x_momentum_flux long_name = x momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -373,7 +373,7 @@ standard_name = instantaneous_surface_y_momentum_flux long_name = y momentum flux units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -382,7 +382,7 @@ standard_name = instantaneous_surface_upward_sensible_heat_flux long_name = surface upward sensible heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -391,7 +391,7 @@ standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -409,7 +409,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = PBL top model level index units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -417,7 +417,7 @@ standard_name = x_wind_at_10m long_name = x component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -426,7 +426,7 @@ standard_name = y_wind_at_10m long_name = y component of wind at 10 m units = m s-1 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in From 28f96f925488d201395699b3a8b080c3a244a60c Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 10 Sep 2020 09:01:26 -0600 Subject: [PATCH 342/404] initialize correct_unit branch --- physics/GFS_DCNV_generic.meta | 6 +++--- physics/GFS_rrtmg_pre.meta | 20 ++++++++++---------- physics/GFS_rrtmg_setup.meta | 16 ++++++++-------- physics/GFS_rrtmgp_setup.meta | 16 ++++++++-------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index 507643661..ac632b09c 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -445,7 +445,7 @@ [upd_mf] standard_name = cumulative_atmosphere_updraft_convective_mass_flux long_name = cumulative updraft mass flux - units = Pa + units = kg m-1 s-2 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -454,7 +454,7 @@ [dwn_mf] standard_name = cumulative_atmosphere_downdraft_convective_mass_flux long_name = cumulative downdraft mass flux - units = Pa + units = kg m-1 s-2 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -463,7 +463,7 @@ [det_mf] standard_name = cumulative_atmosphere_detrainment_convective_mass_flux long_name = cumulative detrainment mass flux - units = Pa + units = kg m-1 s-2 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index dd1825e08..245d97d18 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -444,7 +444,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -453,7 +453,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -462,7 +462,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -471,7 +471,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -480,7 +480,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = inout @@ -489,7 +489,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -498,7 +498,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -507,7 +507,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -516,7 +516,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -534,7 +534,7 @@ standard_name = instantaneous_3d_cloud_fraction long_name = instantaneous 3D cloud fraction for all MPs units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 8377807d8..8793f7393 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -113,32 +113,32 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation - long_name = sw: max-random overlap clouds + standard_name = flag_for_cloud_overlapping_method_for_shortwave_radiation + long_name = control flag for cloud overlapping method for SW units = flag dimensions = () type = integer intent = in optional = F [iovr_lw] - standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation - long_name = lw: max-random overlap clouds + standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation + long_name = control flag for cloud overlapping method for LW units = flag dimensions = () type = integer intent = in optional = F [isubc_sw] - standard_name = flag_for_sw_clouds_without_sub_grid_approximation - long_name = flag for sw clouds without sub-grid approximation + standard_name = flag_for_subcolumn_cloud_approximation_for_shortwave_radiation + long_name = flag for subcolumn cloud approximation for shortwave radiation units = flag dimensions = () type = integer intent = in optional = F [isubc_lw] - standard_name = flag_for_lw_clouds_without_sub_grid_approximation - long_name = flag for lw clouds without sub-grid approximation + standard_name = flag_for_subcolumn_cloud_approximation_for_longwave_radiation + long_name = flag for subcolumn cloud approximation for longwave radiation units = flag dimensions = () type = integer diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 430226dbc..c0c192c62 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -161,32 +161,32 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation - long_name = sw: max-random overlap clouds + standard_name = flag_for_cloud_overlapping_method_for_shortwave_radiation + long_name = control flag for cloud overlapping method for SW units = flag dimensions = () type = integer intent = in optional = F [iovr_lw] - standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation - long_name = lw: max-random overlap clouds + standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation + long_name = control flag for cloud overlapping method for SW units = flag dimensions = () type = integer intent = in optional = F [isubc_sw] - standard_name = flag_for_sw_clouds_without_sub_grid_approximation - long_name = flag for sw clouds without sub-grid approximation + standard_name = flag_for_subcolumn_cloud_approximation_for_shortwave_radiation + long_name = flag for subcolumn cloud approximation for shortwave radiation units = flag dimensions = () type = integer intent = in optional = F [isubc_lw] - standard_name = flag_for_lw_clouds_without_sub_grid_approximation - long_name = flag for lw clouds without sub-grid approximation + standard_name = flag_for_subcolumn_cloud_approximation_for_longwave_radiation + long_name = flag for subcolumn cloud approximation for longwave radiation units = flag dimensions = () type = integer From 3204a42d25317ae84cded60d8b10f4f79ea05097 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Thu, 10 Sep 2020 21:34:37 +0000 Subject: [PATCH 343/404] Bug fix -- Sept. 10 --- physics/drag_suite.F90 | 3 ++- physics/unified_ugwp.F90 | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 76c2a85aa..0b0ef03a0 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -199,8 +199,9 @@ subroutine drag_suite_run( & & dusfc_ss,dvsfc_ss,dusfc_fd,dvsfc_fd, & & slmsk,br1,hpbl, & & g, cp, rd, rv, fv, pi, imx, cdmbgwd, me, master, & + & lprnt, ipr, rdxzb, dx, gwd_opt, & & do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, & - & lprnt, ipr, rdxzb, dx, gwd_opt, errmsg, errflg ) + & errmsg, errflg ) ! ******************************************************************** ! -----> I M P L E M E N T A T I O N V E R S I O N <---------- diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index de1b147a9..cff34ab8c 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -340,9 +340,9 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, dusfc_ss,dvsfc_ss,dusfc_fd,dvsfc_fd, & slmsk,br1,hpbl,con_g,con_cp,con_rd,con_rv, & con_fvirt,con_pi,lonr, & - cdmbgwd(1:2),me,master,do_gsl_drag_ls_bl, & - do_gsl_drag_ss,do_gsl_drag_tofd,lprnt,ipr,rdxzb,dx, & - gwd_opt,errmsg,errflg) + cdmbgwd(1:2),me,master,lprnt,ipr,rdxzb,dx,gwd_opt, & + do_gsl_drag_ls_bl,do_gsl_drag_ss,do_gsl_drag_tofd, & + errmsg,errflg) else if ( do_ugwp_v1.or.do_ugwp_v1_orog_only ) then From 5ee932a5c672a1654bda8b654c94845b893aba24 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Sun, 13 Sep 2020 03:03:40 +0000 Subject: [PATCH 344/404] Sept. 12 bug fix --- physics/unified_ugwp.F90 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index cff34ab8c..203bf9c48 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -106,7 +106,7 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & write(errmsg,'(*(a))') "Logic error: Only one large-scale& &/blocking scheme (do_ugwp_v0,do_ugwp_v0_orog_only,& - do_gsl_drag_ls_bl,do_ugwp_v1 or& + &do_gsl_drag_ls_bl,do_ugwp_v1 or & &do_ugwp_v1_orog_only) can be chosen" errflg = 1 return @@ -117,16 +117,18 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if (is_initialized) return - if ( do_ugwp_v0 .and. (do_ugwp .or. cdmbgwd(3) > 0.0) ) then - if (do_ugwp .or. cdmbgwd(3) > 0.0) then + if ( do_ugwp_v0 ) then + ! if (do_ugwp .or. cdmbgwd(3) > 0.0) then (deactivate effect of do_ugwp) + if (cdmbgwd(3) > 0.0) then call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) + else + write(errmsg,'(*(a))') "Logic error: cires_ugwp_mod_init called but & + &do_ugwp_v0 is true and cdmbgwd(3) <= 0" + errflg = 1 + return end if - else - write(errmsg,'(*(a))') "Logic error: cires_ugwp_init called but do_ugwp is false and cdmbgwd(3) <= 0" - errflg = 1 - return end if From b38a49a08d332e091407bb8ca6105ab8358a5cc7 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Mon, 14 Sep 2020 09:37:19 -0600 Subject: [PATCH 345/404] unit fix --- physics/GFS_rrtmg_pre.F90 | 5 +--- physics/GFS_rrtmg_pre.meta | 44 +++------------------------- physics/GFS_rrtmgp_gfdlmp_pre.meta | 12 ++++---- physics/GFS_rrtmgp_zhaocarr_pre.meta | 12 ++++---- physics/GFS_time_vary_pre.fv3.meta | 2 +- physics/gfdl_cloud_microphys.meta | 2 +- physics/module_SGSCloud_RadPre.meta | 4 +-- physics/mp_fer_hires.F90 | 5 ++-- physics/mp_fer_hires.meta | 9 ------ physics/radlw_main.meta | 8 ++--- physics/radsw_main.meta | 8 ++--- physics/rrtmgp_lw_cloud_optics.meta | 8 ++--- physics/rrtmgp_sw_cloud_optics.meta | 8 ++--- 13 files changed, 39 insertions(+), 88 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 31099819c..bdc1e7544 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -22,7 +22,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input Tbd, Cldprop, Coupling, & Radtend, & ! input/output imfdeepcnv, imfdeepcnv_gf, & - f_ice, f_rain, f_rimef, flgmin, cwm, & ! F-A mp scheme only + flgmin, & ! F-A mp scheme only lm, im, lmk, lmp, & ! input kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & @@ -95,9 +95,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer, intent(out) :: kd, kt, kb ! F-A mp scheme only - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: f_ice, & - f_rain, f_rimef - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: cwm real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: flgmin real(kind=kind_phys), intent(out) :: raddt diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 245d97d18..e9b6229f6 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -71,33 +71,6 @@ type = GFS_radtend_type intent = inout optional = F -[f_ice] - standard_name = fraction_of_ice_water_cloud - long_name = fraction of ice water cloud - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[f_rain] - standard_name = fraction_of_rain_water_cloud - long_name = fraction of rain water cloud - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[f_rimef] - standard_name = rime_factor - long_name = rime factor - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F [flgmin] standard_name = minimum_large_ice_fraction long_name = minimum large ice fraction in F-A mp scheme @@ -107,15 +80,6 @@ kind = kind_phys intent = in optional = F -[cwm] - standard_name = total_cloud_condensate_mixing_ratio_updated_by_physics - long_name = total cloud condensate mixing ratio (except water vapor) updated by physics - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F [lm] standard_name = number_of_vertical_layers_for_radiation_calculations long_name = number of vertical layers for radiation calculation @@ -461,7 +425,7 @@ [clouds3] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud - units = micron + units = um dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys @@ -479,7 +443,7 @@ [clouds5] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud - units = micron + units = um dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys @@ -497,7 +461,7 @@ [clouds7] standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop - units = micron + units = um dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys @@ -515,7 +479,7 @@ [clouds9] standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake - units = micron + units = um dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 7e0797538..033e723d2 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -58,7 +58,7 @@ [effr_in] standard_name = flag_for_cloud_effective_radii long_name = flag for cloud effective radii calculations in GFDL microphysics - units = + units = flag dimensions = () type = logical intent = in @@ -275,7 +275,7 @@ [cld_reliq] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -293,7 +293,7 @@ [cld_reice] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -311,7 +311,7 @@ [cld_resnow] standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -329,7 +329,7 @@ [cld_rerain] standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -387,4 +387,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta index 11aac8437..e13b79d79 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.meta +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -58,7 +58,7 @@ [effr_in] standard_name = flag_for_cloud_effective_radii long_name = flag for cloud effective radii calculations in GFDL microphysics - units = + units = flag dimensions = () type = logical intent = in @@ -305,7 +305,7 @@ [cld_reliq] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -323,7 +323,7 @@ [cld_reice] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -341,7 +341,7 @@ [cld_resnow] standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -359,7 +359,7 @@ [cld_rerain] standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -408,4 +408,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index f1a088245..d5dd57020 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -228,7 +228,7 @@ [ipt] standard_name = index_for_diagnostic_printout long_name = horizontal index for point used for diagnostic printout - units = + units = index dimensions = () type = integer intent = out diff --git a/physics/gfdl_cloud_microphys.meta b/physics/gfdl_cloud_microphys.meta index 3c9a53606..d5b8fddbc 100644 --- a/physics/gfdl_cloud_microphys.meta +++ b/physics/gfdl_cloud_microphys.meta @@ -427,7 +427,7 @@ [effr_in] standard_name = flag_for_cloud_effective_radii long_name = flag for cloud effective radii calculations in GFDL microphysics - units = + units = flag dimensions = () type = logical intent = in diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index e74f5f7ee..5e1b9cae9 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -211,7 +211,7 @@ [clouds3] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -229,7 +229,7 @@ [clouds5] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index 95e521141..c4ed18977 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -121,7 +121,7 @@ end subroutine mp_fer_hires_init SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ,SLMSK & ,PRSI,P_PHY & - ,T,Q,CWM & + ,T,Q & ,TRAIN,SR & ,F_ICE,F_RAIN,F_RIMEF & ,QC,QR,QI,QG & ! wet mixing ratio @@ -159,7 +159,6 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & real(kind_phys), intent(in ) :: epsq,r_d,p608,cp,g real(kind_phys), intent(inout) :: t(1:ncol,1:nlev) real(kind_phys), intent(inout) :: q(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: cwm(1:ncol,1:nlev) real(kind_phys), intent(inout) :: train(1:ncol,1:nlev) real(kind_phys), intent(out ) :: sr(1:ncol) real(kind_phys), intent(inout) :: f_ice(1:ncol,1:nlev) @@ -185,7 +184,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & integer :: I,J,K,N integer :: lowlyr(1:ncol) integer :: dx1 - !real(kind_phys) :: mprates(1:ncol,1:nlev,d_ss) + real(kind_phys) :: cwm(1:ncol,1:nlev) real(kind_phys) :: DTPHS,PCPCOL,RDTPHS,TNEW real(kind_phys) :: ql(1:nlev),tl(1:nlev) real(kind_phys) :: rainnc(1:ncol),rainncv(1:ncol) diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index a0591ade8..17b164766 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -214,15 +214,6 @@ kind = kind_phys intent = inout optional = F -[cwm] - standard_name = total_cloud_condensate_mixing_ratio_updated_by_physics - long_name = total cloud condensate mixing ratio (except water vapor) updated by physics - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [train] standard_name = accumulated_change_of_air_temperature_due_to_FA_scheme long_name = accumulated change of air temperature due to FA MP scheme diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 05fcf1de6..1bc1d5e00 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -317,7 +317,7 @@ [cld_ref_liq] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -335,7 +335,7 @@ [cld_ref_ice] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -353,7 +353,7 @@ [cld_ref_rain] standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -371,7 +371,7 @@ [cld_ref_snow] standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 30e1d850c..ee4a88686 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -386,7 +386,7 @@ [cld_ref_liq] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -404,7 +404,7 @@ [cld_ref_ice] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -422,7 +422,7 @@ [cld_ref_rain] standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -440,7 +440,7 @@ [cld_ref_snow] standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 34ce77ad3..e03133985 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -186,7 +186,7 @@ [cld_reliq] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in @@ -202,7 +202,7 @@ [cld_reice] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in @@ -218,7 +218,7 @@ [cld_resnow] standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in @@ -234,7 +234,7 @@ [cld_rerain] standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 08fd7f3fd..d750990fa 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -188,7 +188,7 @@ [cld_reliq] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -206,7 +206,7 @@ [cld_reice] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -224,7 +224,7 @@ [cld_resnow] standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys @@ -242,7 +242,7 @@ [cld_rerain] standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud - units = micron + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys From 278b70660f5b53e6d34c97b7b467ed520737cac3 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Mon, 14 Sep 2020 15:49:25 +0000 Subject: [PATCH 346/404] Sept. 14 state --- physics/unified_ugwp.F90 | 7 +++++-- physics/unified_ugwp.meta | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index 203bf9c48..aa9be0492 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -153,10 +153,11 @@ end subroutine unified_ugwp_init !! \htmlinclude unified_ugwp_finalize.html !! #endif - subroutine unified_ugwp_finalize(errmsg, errflg) + subroutine unified_ugwp_finalize(do_ugwp_v0,do_ugwp_v1,errmsg, errflg) implicit none ! + logical, intent (in) :: do_ugwp_v0, do_ugwp_v1 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -166,7 +167,9 @@ subroutine unified_ugwp_finalize(errmsg, errflg) if (.not.is_initialized) return - call cires_ugwp_finalize() + if ( do_ugwp_v0 ) call cires_ugwp_mod_finalize() + + if ( do_ugwp_v1 ) call cires_ugwp_finalize() is_initialized = .false. diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index e45625e9e..23610f99c 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -239,6 +239,22 @@ [ccpp-arg-table] name = unified_ugwp_finalize type = scheme +[do_ugwp_v0] + standard_name = do_ugwp_v0 + long_name = flag to activate ver 0 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_ugwp_v1] + standard_name = do_ugwp_v1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 6e33a576148174ac89559bbc0d44a3a32cc26f1e Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Mon, 14 Sep 2020 20:10:52 +0000 Subject: [PATCH 347/404] A syntax error is corrected. --- physics/sfc_drv_ruc.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 6debf4522..8004bc7f9 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -170,7 +170,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & !-- land soiltyp(i) = int( stype(i)+0.5 ) vegtype(i) = int( vtype(i)+0.5 ) - elseif( icy(i) > 0. ) then + elseif( icy(i) ) then !-- ice if (isot == 1) then soiltyp(i) = 16 From 985ca4fcf164a0c5cfb529faaf4b9b3cfdea4ecd Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Tue, 15 Sep 2020 19:16:05 +0000 Subject: [PATCH 348/404] Fractional grid is removed from the RUC soil initialization, since the goal here is just a vertical interpolation from 4-layer t0 9-level data. --- physics/module_sf_ruclsm.F90 | 22 ++--- physics/sfc_drv_ruc.F90 | 184 ++++++++++------------------------- physics/sfc_drv_ruc.meta | 70 ------------- 3 files changed, 61 insertions(+), 215 deletions(-) diff --git a/physics/module_sf_ruclsm.F90 b/physics/module_sf_ruclsm.F90 index 1a7037cf7..024f97772 100644 --- a/physics/module_sf_ruclsm.F90 +++ b/physics/module_sf_ruclsm.F90 @@ -7022,7 +7022,7 @@ END SUBROUTINE SOILVEGIN !> This subroutine computes liquid and forezen soil moisture from the !! total soil moisture, and also computes soil moisture availability in !! the top soil layer. - SUBROUTINE RUCLSMINIT( debug_print, frac_grid, land, icy, & + SUBROUTINE RUCLSMINIT( debug_print, slmsk, & nzs, isltyp, ivgtyp, mavail, & sh2o, smfr3d, tslb, smois, & ims,ime, jms,jme, kms,kme, & @@ -7035,8 +7035,7 @@ SUBROUTINE RUCLSMINIT( debug_print, frac_grid, land, icy, & #endif IMPLICIT NONE LOGICAL, INTENT(IN ) :: debug_print - LOGICAL, INTENT(IN ) :: frac_grid - LOGICAL, DIMENSION( ims:ime), INTENT(IN ) :: land, icy + REAL, DIMENSION( ims:ime), INTENT(IN ) :: slmsk INTEGER, INTENT(IN ) :: & ims,ime, jms,jme, kms,kme, & @@ -7095,11 +7094,11 @@ SUBROUTINE RUCLSMINIT( debug_print, frac_grid, land, icy, & ! in Zobler classification isltyp=0 for water. Statsgo classification ! has isltyp=14 for water if (isltyp(i,j) == 0) isltyp(i,j)=14 - - if(land(i) ) then - !--- Computation of volumetric content of ice in soil - !--- and initialize MAVAIL + if(slmsk(i) == 1. ) then + !-- land + !-- Computate volumetric content of ice in soil + !-- and initialize MAVAIL DQM = MAXSMC (ISLTYP(I,J)) - & DRYSMC (ISLTYP(I,J)) REF = REFSMC (ISLTYP(I,J)) @@ -7129,24 +7128,23 @@ SUBROUTINE RUCLSMINIT( debug_print, frac_grid, land, icy, & endif ENDDO - elseif( icy(i) .and. .not. frac_grid ) then + elseif( slmsk(i) == 2.) then !-- ice + mavail(i,j) = 1. DO L=1,NZS smfr3d(i,l,j)=1. sh2o(i,l,j)=0. - mavail(i,j) = 1. ENDDO - elseif( .not. frac_grid) then + else !-- water ISLTYP=14 + mavail(i,j) = 1. DO L=1,NZS smfr3d(i,l,j)=0. sh2o(i,l,j)=1. - mavail(i,j) = 1. ENDDO endif ! land - !ENDIF ENDDO ENDDO diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 8004bc7f9..5370cd763 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -28,12 +28,9 @@ module lsm_ruc subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & flag_restart, flag_init, & im, lsoil_ruc, lsoil, kice, nlev, & ! in - lsm_ruc, lsm, slmsk, landfrac, & ! in - stype, vtype, frac_grid, & ! in - flag_cice, min_seaice, min_lakeice, & - fice, tsfc_lnd, tsfc_wat, & + lsm_ruc, lsm, slmsk, stype, vtype, & ! in + tsfc_lnd, tsfc_wat, & ! in tg3, smc, slc, stc, & ! in - smcref2, smcwlt2, & ! inout sh2o, smfrkeep, tslb, smois, wetness, & ! out tsice, errmsg, errflg) @@ -42,7 +39,6 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & integer, intent(in) :: me, master, isot, ivegsrc, nlunit logical, intent(in) :: flag_restart logical, intent(in) :: flag_init - logical, intent(in) :: frac_grid integer, intent(in) :: im integer, intent(in) :: lsoil_ruc integer, intent(in) :: lsoil @@ -52,11 +48,8 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & real (kind=kind_phys), dimension(im), intent(in ) :: slmsk - real (kind=kind_phys), dimension(im), intent(in ) :: landfrac real (kind=kind_phys), dimension(im), intent(in ) :: stype real (kind=kind_phys), dimension(im), intent(in ) :: vtype - logical, dimension(im), intent(in ) :: flag_cice - real (kind=kind_phys), intent(in ) :: min_lakeice, min_seaice real (kind=kind_phys), dimension(im), intent(in ) :: tsfc_lnd real (kind=kind_phys), dimension(im), intent(in ) :: tsfc_wat real (kind=kind_phys), dimension(im), intent(in) :: tg3 @@ -64,9 +57,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & real (kind=kind_phys), dimension(im,lsoil), intent(in) :: smc,slc,stc ! --- in/out: - real (kind=kind_phys), dimension(im), intent(inout) :: fice real (kind=kind_phys), dimension(im), intent(inout) :: wetness - real (kind=kind_phys), dimension(im), intent(inout) :: smcref2, smcwlt2 ! --- out real (kind=kind_phys), dimension(im,lsoil_ruc), intent(out) :: sh2o, smfrkeep @@ -79,9 +70,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & ! --- local integer :: ipr, i, k logical :: debug_print - logical, dimension(im) :: land, icy, wet integer, dimension(im) :: soiltyp, vegtype - real (kind=kind_phys), dimension(im) :: frland ! Initialize CCPP error handling variables errmsg = '' @@ -100,7 +89,6 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & write (0,*) 'noah mois(ipr)',ipr,smc(ipr,:) write (0,*) 'stype=',stype(ipr) write (0,*) 'vtype=',vtype(ipr) - write (0,*) 'fice=',fice(ipr) write (0,*) 'tsfc_lnd=',tsfc_lnd(ipr) write (0,*) 'tsfc_wat=',tsfc_wat(ipr) write (0,*) 'tg3=',tg3(ipr) @@ -114,63 +102,9 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & soiltyp(:) = 0 vegtype(:) = 0 - land (:) = .false. - icy (:) = .false. - wet (:) = .false. - - if (frac_grid) then ! fice is ice fraction wrt water area - do i=1,im - frland(i) = landfrac(i) - if (frland(i) > zero) land(i) = .true. - if (frland(i) < one) then - if (flag_cice(i)) then - if (fice(i) >= min_seaice) then - icy(i) = .true. - else - fice(i) = zero - endif - else - if (fice(i) >= min_lakeice) then - icy(i) = .true. - else - fice(i) = zero - endif - endif - if (fice(i) < one ) then - wet(i)=.true. ! some open ocean/lake water exists - end if - else - fice(i) = zero - endif - enddo - - else - - do i = 1, IM - frland(i) = zero - if (slmsk(i) == 0) then - wet(i) = .true. - fice(i) = zero - elseif (slmsk(i) == 1) then - land(i) = .true. - frland(i) = one - fice(i) = zero - else - icy(i) = .true. - if (fice(i) < one) then - wet(i) = .true. - endif - endif - enddo - - endif do i = 1, im ! i - horizontal loop - if( land(i) ) then - !-- land - soiltyp(i) = int( stype(i)+0.5 ) - vegtype(i) = int( vtype(i)+0.5 ) - elseif( icy(i) ) then + if (slmsk(i) == 2.) then !-- ice if (isot == 1) then soiltyp(i) = 16 @@ -182,8 +116,10 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & elseif(ivegsrc == 2) then vegtype(i) = 13 endif - elseif ( wet(i) ) then - !-- water + else + !-- land or water + soiltyp(i) = int( stype(i)+0.5 ) + vegtype(i) = int( vtype(i)+0.5 ) if (soiltyp(i) < 1) soiltyp(i) = 14 if (vegtype(i) < 1) vegtype(i) = 17 endif @@ -192,11 +128,9 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & if( .not. flag_restart) then call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in me, master, lsm_ruc, lsm, slmsk, & ! in - frac_grid, land, icy, & ! in - soiltyp, vegtype, fice, & ! in + soiltyp, vegtype, & ! in tsfc_lnd, tsfc_wat, tg3, & ! in smc, slc, stc, & ! in - smcref2, smcwlt2, & ! inout sh2o, smfrkeep, tslb, smois, & ! out wetness, errmsg, errflg) @@ -1182,11 +1116,9 @@ end subroutine lsm_ruc_run !! This subroutine contains RUC LSM initialization. subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in me, master, lsm_ruc, lsm, slmsk, & ! in - frac_grid, land, icy, & ! in - soiltyp, vegtype, fice, & ! in + soiltyp, vegtype, & ! in tskin_lnd, tskin_wat, tg3, & ! !in smc, slc, stc, & ! in - smcref2, smcwlt2, & ! inout sh2o, smfrkeep, tslb, smois, & ! out wetness, errmsg, errflg) @@ -1198,12 +1130,8 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in integer, intent(in ) :: im, nlev integer, intent(in ) :: lsoil_ruc integer, intent(in ) :: lsoil - logical, intent(in ) :: frac_grid - logical, dimension(im), intent(in ) :: land, icy real (kind=kind_phys), dimension(im), intent(in ) :: slmsk real (kind=kind_phys), dimension(im), intent(in ) :: tskin_lnd, tskin_wat - real (kind=kind_phys), dimension(im), intent(inout) :: smcref2 - real (kind=kind_phys), dimension(im), intent(inout) :: smcwlt2 real (kind=kind_phys), dimension(im), intent(in ) :: tg3 real (kind=kind_phys), dimension(im,lsoil), intent(in ) :: smc ! Noah real (kind=kind_phys), dimension(im,lsoil), intent(in ) :: stc ! Noah @@ -1212,7 +1140,6 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in integer, dimension(im), intent(inout) :: soiltyp integer, dimension(im), intent(inout) :: vegtype real (kind=kind_phys), dimension(im), intent(inout) :: wetness - real (kind=kind_phys), dimension(im), intent(in ) :: fice real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: smois! ruc real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb ! ruc real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: sh2o ! ruc @@ -1229,8 +1156,10 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in logical :: swi_init ! for initialization in terms of SWI (soil wetness index) integer :: flag_soil_layers, flag_soil_levels, flag_sst - real (kind=kind_phys), dimension(1:lsoil_ruc) :: factorsm + real (kind=kind_phys), dimension(1:lsoil_ruc) :: factorsm real (kind=kind_phys), dimension(1:lsoil_ruc) :: zs + real (kind=kind_phys), dimension(im) :: smcref2 + real (kind=kind_phys), dimension(im) :: smcwlt2 integer , dimension( 1:im , 1:1 ) :: ivgtyp integer , dimension( 1:im , 1:1) :: isltyp @@ -1361,14 +1290,14 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in tbot(i,j) = tg3(i) ivgtyp(i,j) = vegtype(i) isltyp(i,j) = soiltyp(i) - if (land(i) .or. icy(i)) then - !-- land or ice - tsk(i,j) = tskin_lnd(i) - landmask(i,j)=1. - else + if (slmsk(i) == 0.) then !-- water tsk(i,j) = tskin_wat(i) landmask(i,j)=0. + else + !-- land or ice + tsk(i,j) = tskin_lnd(i) + landmask(i,j)=1. endif ! land(i) enddo @@ -1383,18 +1312,18 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in sm_input(i,1,j)=0. !--- initialize smcwlt2 and smcref2 with Noah values - if(land(i)) then - smcref2 (i) = REFSMCnoah(soiltyp(i)) - smcwlt2 (i) = WLTSMCnoah(soiltyp(i)) + if(slmsk(i) == 1.) then + smcref2 (i) = REFSMCnoah(soiltyp(i)) + smcwlt2 (i) = WLTSMCnoah(soiltyp(i)) else - smcref2 (i) = 1. - smcwlt2 (i) = 0. + smcref2 (i) = 1. + smcwlt2 (i) = 0. endif do k=1,lsoil st_input(i,k+1,j)=stc(i,k) ! convert volumetric soil moisture to SWI (soil wetness index) - if(land(i) .and. swi_init) then + if(slmsk(i) == 1. .and. swi_init) then sm_input(i,k+1,j)=min(1.,max(0.,(smc(i,k) - smcwlt2(i))/ & (smcref2(i) - smcwlt2(i)))) else @@ -1429,23 +1358,26 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in do j=jts,jte do i=its,ite - if (land(i)) then + if (slmsk(i) == 1.) then + !-- land do k=1,lsoil_ruc ! convert from SWI to RUC volumetric soil moisture if(swi_init) then - soilm(i,k,j)= dumsm(i,k,j) * & + soilm(i,k,j) = dumsm(i,k,j) * & (refsmc(isltyp(i,j))-drysmc(isltyp(i,j))) & + drysmc(isltyp(i,j)) else - soilm(i,k,j)= dumsm(i,k,j) + soilm(i,k,j) = dumsm(i,k,j) endif soiltemp(i,k,j) = dumt(i,k,j) enddo ! k - elseif (icy(i)) then + else + !-- ice or water do k=1,lsoil_ruc + soilm(i,k,j) = 1. soiltemp(i,k,j) = dumt(i,k,j) enddo ! k - endif ! land(i) + endif ! land enddo enddo @@ -1467,7 +1399,7 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in do j=jts,jte do i=its,ite - if (land(i)) then + if (slmsk(i) == 1.) then ! initialize factor do k=1,lsoil_ruc @@ -1544,7 +1476,7 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in ! and soil temperature, and also soil moisture availability in the top ! layer - call ruclsminit( debug_print, frac_grid, land, icy, & + call ruclsminit( debug_print, slmsk, & lsoil_ruc, isltyp, ivgtyp, mavail, & soilh2o, smfr, soiltemp, soilm, & ims,ime, jms,jme, kms,kme, & @@ -1552,45 +1484,31 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in do j=jts,jte do i=its,ite - if (land(i)) then - wetness(i) = mavail(i,j) - do k = 1, lsoil_ruc - smois(i,k) = soilm(i,k,j) - tslb(i,k) = soiltemp(i,k,j) - sh2o(i,k) = soilh2o(i,k,j) - smfrkeep(i,k) = smfr(i,k,j) - enddo - elseif (icy(i)) then - wetness (i) = 1. - do k = 1, lsoil_ruc - smois(i,k) = 1. - tslb(i,k) = soiltemp(i,k,j) - sh2o(i,k) = 0. - smfrkeep(i,k) = 1. - enddo - endif ! land(i) + wetness(i) = mavail(i,j) + do k = 1, lsoil_ruc + smois(i,k) = soilm(i,k,j) + tslb(i,k) = soiltemp(i,k,j) + sh2o(i,k) = soilh2o(i,k,j) + smfrkeep(i,k) = smfr(i,k,j) + enddo enddo enddo - if (.not. frac_grid) then - do i=1,im - if (.not.land(i) .and. .not.icy(i)) then - wetness (i) = 1. - do k=1,min(lsoil,lsoil_ruc) - smois(i,k) = smc(i,k) - tslb(i,k) = stc(i,k) - sh2o(i,k) = slc(i,k) - enddo - endif - enddo - endif ! frac_grid + !do i=1,im + ! wetness (i) = 1. + ! do k=1,min(lsoil,lsoil_ruc) + ! smois(i,k) = smc(i,k) + ! tslb(i,k) = stc(i,k) + ! sh2o(i,k) = slc(i,k) + ! enddo + !enddo if(debug_print) then do i=1,im write (0,*)'End of RUC LSM initialization' - write (0,*)'tslb(i)=',i,land(i),icy(i),tslb(i,:) - write (0,*)'smois(i)=',i,land(i),icy(i),smois(i,:) - write (0,*)'wetness(i)=',i,land(i),icy(i),wetness(i) + write (0,*)'tslb(i)=',i,tslb(i,:) + write (0,*)'smois(i)=',i,smois(i,:) + write (0,*)'wetness(i)=',i,wetness(i) enddo endif ! debug_print diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 3441111e5..53bc48fdd 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -122,15 +122,6 @@ kind = kind_phys intent = in optional = F -[landfrac] - standard_name = land_area_fraction - long_name = fraction of horizontal grid area occupied by land - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [stype] standard_name = soil_type_classification_real long_name = soil type for lsm @@ -149,49 +140,6 @@ kind = kind_phys intent = inout optional = F -[frac_grid] - standard_name = flag_for_fractional_grid - long_name = flag for fractional grid - units = flag - dimensions = () - type = logical - intent = in - optional = F -[flag_cice] - standard_name = flag_for_cice - long_name = flag for cice - units = flag - dimensions = (horizontal_dimension) - type = logical - intent = in - optional = F -[min_seaice] - standard_name = sea_ice_minimum - long_name = minimum sea ice value - units = ??? - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[min_lakeice] - standard_name = lake_ice_minimum - long_name = minimum lake ice value - units = ??? - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fice] - standard_name = sea_ice_concentration - long_name = ice fraction over open water - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [tsfc_lnd] standard_name = surface_skin_temperature long_name = surface skin temperature @@ -246,24 +194,6 @@ kind = kind_phys intent = in optional = F -[smcref2] - standard_name = threshold_volume_fraction_of_condensed_water_in_soil - long_name = soil moisture threshold - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[smcwlt2] - standard_name = volume_fraction_of_condensed_water_in_soil_at_wilting_point - long_name = soil water fraction at wilting point - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [sh2o] standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model long_name = volume fraction of unfrozen soil moisture for lsm From 4c2d7588ca7d47b62646de833ffc0cdb8b6cee56 Mon Sep 17 00:00:00 2001 From: Xia Sun Date: Tue, 15 Sep 2020 20:18:50 -0600 Subject: [PATCH 349/404] change from horizontal_loop_content to horizontal_dimension in init section --- physics/mp_fer_hires.meta | 4 ++-- physics/mp_thompson.meta | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index 0e790d71c..702015adc 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -8,8 +8,8 @@ name = mp_fer_hires_init type = scheme [ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent + standard_name = horizontal_dimension + long_name = horizontal dimension units = count dimensions = () type = integer diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index f290639a6..4cfee6afc 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -8,8 +8,8 @@ name = mp_thompson_init type = scheme [ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent + standard_name = horizontal_dimension + long_name = horizontal dimension units = count dimensions = () type = integer From 862b4644cd8101901a1758b67e494d1fa5ee11d0 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Wed, 16 Sep 2020 09:41:32 -0600 Subject: [PATCH 350/404] unit fix --- physics/m_micro.meta | 14 +++++++------- physics/rrtmgp_lw_aerosol_optics.meta | 2 +- physics/rrtmgp_sw_aerosol_optics.meta | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/physics/m_micro.meta b/physics/m_micro.meta index f61e6511f..8b16276f1 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -777,25 +777,25 @@ [aerfld_i] standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration - units = kg-1? + units = kg-1 dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in optional = F [naai_i] - standard_name = in_number_concentration - long_name = IN number concentration - units = kg-1? + standard_name = ice_nucleation_number + long_name = ice nucleation number in MG MP + units = kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [npccn_i] - standard_name = ccn_number_concentration - long_name = CCN number concentration - units = kg-1? + standard_name = tendency_of_ccn_activated_number + long_name = tendency of ccn activated number + units = kg-1 s-1 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta index 8df363cb6..e182dc45e 100644 --- a/physics/rrtmgp_lw_aerosol_optics.meta +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -113,7 +113,7 @@ [aerfld] standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration - units = kg-1? + units = kg-1 dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta index 68979ae5b..8acfc0611 100644 --- a/physics/rrtmgp_sw_aerosol_optics.meta +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -129,7 +129,7 @@ [aerfld] standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration - units = kg-1? + units = kg-1 dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys From f6fd209bc0199f5996a9f9092e87035d85d69c05 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Thu, 17 Sep 2020 23:18:12 +0000 Subject: [PATCH 351/404] Sept. 17 -- debugging --- physics/cires_ugwp.F90 | 33 +++++++++++++++++++++++ physics/gwdps.f | 6 +++++ physics/unified_ugwp.F90 | 57 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 95 insertions(+), 1 deletion(-) diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index df0116cd0..51f2b9504 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -77,6 +77,8 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if (is_initialized) return if (do_ugwp .or. cdmbgwd(3) > 0.0) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in cires_ugwp_init calling cires_ugwp_mod_init" call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) @@ -224,6 +226,9 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr errmsg = '' errflg = 0 + ! Temporary line + if ( me == master ) write (41,*) "ahoj svete: qgrs(:,:,1) = ", qgrs(:,:,1) + ! 1) ORO stationary GWs ! ------------------ ! wrap everything in a do_ugwp 'if test' in order not to break the namelist functionality @@ -241,6 +246,9 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr zlwb(:) = 0. + ! Temporary line + if ( me == master ) print *, "ahoj svete: in cires_ugwp_run calling GWDPS_V0" + call GWDPS_V0(im, levs, lonr, do_tofd, Pdvdt, Pdudt, Pdtdt, Pkdis, & ugrs, vgrs, tgrs, qgrs(:,:,1), kpbl, prsi,del,prsl, prslk, phii, phil, & dtp, kdt, sgh30, hprime, oc, oa4, clx, theta, sigma, gamma, elvmax, & @@ -250,6 +258,9 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr else ! calling old GFS gravity wave drag as is + ! Temporary line + if ( me == master ) print *, "ahoj svete: in cires_ugwp_run possibly about to call gwdps_run" + do k=1,levs do i=1,im Pdvdt(i,k) = 0.0 @@ -260,6 +271,8 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr enddo if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in cires_ugwp_run calling gwdps_run" call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & ugrs, vgrs, tgrs, qgrs, & kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & @@ -271,6 +284,17 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr if (errflg/=0) return endif + if ( me == master ) write (51,*) "ahoj svete: in cires after & + &gwdps_run ", kdt, " Pdudt = ", Pdudt + if ( me == master ) write (53,*) "ahoj svete: in cires after & + &gwdps_run ", kdt, " Pdvdt = ", Pdvdt + if ( me == master ) write (55,*) "ahoj svete: in cires after & + &gwdps_run ", kdt, " Pdtdt = ", Pdtdt + if ( me == master ) write (57,*) "ahoj svete: in cires after & + &gwdps_run ", kdt, " hprime =", hprime + if ( me == master ) write (59,*) "ahoj svete: in cires after & + &gwdps_run ", kdt, " elvmax =", elvmax + tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 if (ldiag_ugwp) then du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 @@ -292,6 +316,9 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr if (cdmbgwd(3) > 0.0) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in cires_ugwp_run calling slat_geos5_tamp" + ! 2) non-stationary GW-scheme with GMAO/MERRA GW-forcing call slat_geos5_tamp(im, tamp_mpa, xlat_d, tau_ngw) @@ -330,6 +357,9 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr enddo endif + ! Temporary line + if ( me == master ) print *, "ahoj svete: in cires_ugwp_run calling fv3_ugwp_solv2_v0" + call fv3_ugwp_solv2_v0(im, levs, dtp, tgrs, ugrs, vgrs,qgrs(:,:,1), & prsl, prsi, phil, xlat_d, sinlat, coslat, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & tau_ngw, me, master, kdt) @@ -349,6 +379,9 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr else + ! Temporary line + if ( me == master ) print *, "ahoj svete: in cires_ugwp_run, didn't call ngw schemes" + do k=1,levs do i=1,im gw_dtdt(i,k) = Pdtdt(i,k) diff --git a/physics/gwdps.f b/physics/gwdps.f index b09413f02..63e9a7f7b 100644 --- a/physics/gwdps.f +++ b/physics/gwdps.f @@ -443,6 +443,9 @@ subroutine gwdps_run( & LCAP = KM LCAPP1 = LCAP + 1 ! +! Temporary line + if ( me == 0 ) print *, "ahoj svete: in gwdps_run, nmtvr =", nmtvr +! ! IF ( NMTVR == 14) then ! ---- for lm and gwd calculation points @@ -456,6 +459,9 @@ subroutine gwdps_run( & if (ipr == i) npr = npt ENDIF ENDDO + ! Temporary line + if (npt == 0 .and. me==0) print *, "ahoj svete: in gwdps_run ", + & kdt, " npt =", npt IF (npt == 0) RETURN ! No gwd/mb calculation done! ! ! if (lprnt) print *,' npt=',npt,' npr=',npr,' ipr=',ipr,' im=',im diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index aa9be0492..f97e218d1 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -120,6 +120,8 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if ( do_ugwp_v0 ) then ! if (do_ugwp .or. cdmbgwd(3) > 0.0) then (deactivate effect of do_ugwp) if (cdmbgwd(3) > 0.0) then + ! Temporary line + if ( me==master ) print *, "ahoj svete: in unified_ugwp_init calling cires_ugwp_mod_init" call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) @@ -133,6 +135,8 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if ( do_ugwp_v1 ) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in unified_ugwp_init calling cires_ugwp_init_v1" call cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) @@ -295,6 +299,7 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ! switches that activate impact of OGWs and NGWs (WL* how to deal with them? *WL) real(kind=kind_phys), parameter :: pogw=1., pngw=1., pked=1. real(kind=kind_phys), parameter :: fw1_tau=1.0 + integer :: nmtvr_temp real(kind=kind_phys), dimension(:,:), allocatable :: tke real(kind=kind_phys), dimension(:), allocatable :: turb_fac, tem @@ -330,11 +335,25 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, zlwb(:) = 0. + ! Temporary lines + if ( me == master ) write (80,*) "ahoj svete: in unified beginning ", & + kdt, " elvmax =", elvmax + if ( me == master ) write (81,*) "ahoj svete: in unified beginning ", & + kdt, " sigma =", sigma + if ( me == master ) write (82,*) "ahoj svete: in unified beginning ", & + kdt, " oc =", oc + + + ! Temporary line + if ( me == master ) write (40,*) "ahoj svete: q1 = ", q1 + ! Run the appropriate large-scale (large-scale GWD + blocking) scheme ! Note: In case of GSL drag_suite, this includes ss and tofd if ( do_gsl_drag_ls_bl.or.do_gsl_drag_ss.or.do_gsl_drag_tofd ) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in unified_ugwp_run calling drag_suite_run" call drag_suite_run(im,levs,dvdt,dudt,dtdt,ugrs,vgrs,tgrs,q1, & kpbl,prsi,del,prsl,prslk,phii,phil,dtp, & kdt,hprime,oc,oa4,clx,varss,oc1ss,oa4ss, & @@ -351,6 +370,9 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, else if ( do_ugwp_v1.or.do_ugwp_v1_orog_only ) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in unified_ugwp_run calling gwdps_oro_v1" + ! Valery's TOFD ! topo paras ! w/ orographic effects @@ -378,6 +400,9 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, else if ( do_ugwp_v0.or.do_ugwp_v0_orog_only ) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in unified_ugwp_run getting ready to call something" + do k=1,levs do i=1,im Pdvdt(i,k) = 0.0 @@ -388,17 +413,37 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, enddo if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in unified_ugwp_run calling gwdps_run" + + ! Override nmtvr with nmtvr_temp = 14 for passing into gwdps_run if necessary + if ( nmtvr == 24 ) then ! gwd_opt = 2, 22, 3, or 33 + nmtvr_temp = 14 + else + nmtvr_temp = nmtvr + end if call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & ugrs, vgrs, tgrs, q1, & kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & hprime, oc, oa4, clx, theta, sigma, gamma, & elvmax, dusfcg, dvsfcg, & con_g, con_cp, con_rd, con_rv, lonr, & - nmtvr, cdmbgwd, me, lprnt, ipr, rdxzb, & + nmtvr_temp, cdmbgwd, me, lprnt, ipr, rdxzb, & errmsg, errflg) if (errflg/=0) return endif + if ( me == master ) write (52,*) "ahoj svete: in unified after & + &gwdps_run ", kdt, " Pdudt = ", Pdudt + if ( me == master ) write (54,*) "ahoj svete: in unified after & + &gwdps_run ", kdt, " Pdvdt = ", Pdvdt + if ( me == master ) write (56,*) "ahoj svete: in unified after & + &gwdps_run ", kdt, " Pdtdt = ", Pdtdt + if ( me == master ) write (58,*) "ahoj svete: in unified after & + &gwdps_run ", kdt, " hprime =", hprime + if ( me == master ) write (60,*) "ahoj svete: in unified after & + &gwdps_run ", kdt, " elvmax =", elvmax + tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 if (ldiag_ugwp) then du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 @@ -430,6 +475,10 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, if (cdmbgwd(3) > 0.0) then + ! Temporary line + if ( me == master ) print *, "ahoj svete: in unified_drag_run calling slat_geos5_tamp" + + ! 2) non-stationary GW-scheme with GMAO/MERRA GW-forcing call slat_geos5_tamp(im, tamp_mpa, xlat_d, tau_ngw) @@ -468,6 +517,9 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, enddo endif + ! Temporary line + if ( me == master ) print *, "ahoj svete: in unified_drag_run calling fv3_ugwp_solv2_v0" + call fv3_ugwp_solv2_v0(im, levs, dtp, tgrs, ugrs, vgrs, q1, & prsl, prsi, phil, xlat_d, sinlat, coslat, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & tau_ngw, me, master, kdt) @@ -487,6 +539,9 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, else ! .not.(cdmbgwd(3) > 0.0) + ! Temporary line + if ( me == master ) print *, "ahoj svete: in unified_ugwp_run not calling slat_geos5_tamp" + do k=1,levs do i=1,im gw_dtdt(i,k) = Pdtdt(i,k) From bd921f53aadce0afe0a9744afc4042ff027accd1 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Fri, 18 Sep 2020 17:17:41 +0000 Subject: [PATCH 352/404] Bug fixes -- Sept. 18 --- physics/GFS_GWD_generic.F90 | 4 +++ physics/cires_ugwp.F90 | 33 ------------------------ physics/gwdps.f | 6 ----- physics/unified_ugwp.F90 | 50 ++----------------------------------- 4 files changed, 6 insertions(+), 87 deletions(-) diff --git a/physics/GFS_GWD_generic.F90 b/physics/GFS_GWD_generic.F90 index ed3ff4484..2ab0fb37a 100644 --- a/physics/GFS_GWD_generic.F90 +++ b/physics/GFS_GWD_generic.F90 @@ -93,6 +93,10 @@ subroutine GFS_GWD_generic_pre_run( & clx(:,2) = mntvar(:,8) clx(:,3) = mntvar(:,9) clx(:,4) = mntvar(:,10) + theta(:) = mntvar(:,11) + gamma(:) = mntvar(:,12) + sigma(:) = mntvar(:,13) + elvmax(:) = mntvar(:,14) varss(:) = mntvar(:,15) ocss(:) = mntvar(:,16) oa4ss(:,1) = mntvar(:,17) diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index 51f2b9504..df0116cd0 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -77,8 +77,6 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if (is_initialized) return if (do_ugwp .or. cdmbgwd(3) > 0.0) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in cires_ugwp_init calling cires_ugwp_mod_init" call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) @@ -226,9 +224,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr errmsg = '' errflg = 0 - ! Temporary line - if ( me == master ) write (41,*) "ahoj svete: qgrs(:,:,1) = ", qgrs(:,:,1) - ! 1) ORO stationary GWs ! ------------------ ! wrap everything in a do_ugwp 'if test' in order not to break the namelist functionality @@ -246,9 +241,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr zlwb(:) = 0. - ! Temporary line - if ( me == master ) print *, "ahoj svete: in cires_ugwp_run calling GWDPS_V0" - call GWDPS_V0(im, levs, lonr, do_tofd, Pdvdt, Pdudt, Pdtdt, Pkdis, & ugrs, vgrs, tgrs, qgrs(:,:,1), kpbl, prsi,del,prsl, prslk, phii, phil, & dtp, kdt, sgh30, hprime, oc, oa4, clx, theta, sigma, gamma, elvmax, & @@ -258,9 +250,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr else ! calling old GFS gravity wave drag as is - ! Temporary line - if ( me == master ) print *, "ahoj svete: in cires_ugwp_run possibly about to call gwdps_run" - do k=1,levs do i=1,im Pdvdt(i,k) = 0.0 @@ -271,8 +260,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr enddo if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in cires_ugwp_run calling gwdps_run" call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & ugrs, vgrs, tgrs, qgrs, & kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & @@ -284,17 +271,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr if (errflg/=0) return endif - if ( me == master ) write (51,*) "ahoj svete: in cires after & - &gwdps_run ", kdt, " Pdudt = ", Pdudt - if ( me == master ) write (53,*) "ahoj svete: in cires after & - &gwdps_run ", kdt, " Pdvdt = ", Pdvdt - if ( me == master ) write (55,*) "ahoj svete: in cires after & - &gwdps_run ", kdt, " Pdtdt = ", Pdtdt - if ( me == master ) write (57,*) "ahoj svete: in cires after & - &gwdps_run ", kdt, " hprime =", hprime - if ( me == master ) write (59,*) "ahoj svete: in cires after & - &gwdps_run ", kdt, " elvmax =", elvmax - tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 if (ldiag_ugwp) then du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 @@ -316,9 +292,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr if (cdmbgwd(3) > 0.0) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in cires_ugwp_run calling slat_geos5_tamp" - ! 2) non-stationary GW-scheme with GMAO/MERRA GW-forcing call slat_geos5_tamp(im, tamp_mpa, xlat_d, tau_ngw) @@ -357,9 +330,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr enddo endif - ! Temporary line - if ( me == master ) print *, "ahoj svete: in cires_ugwp_run calling fv3_ugwp_solv2_v0" - call fv3_ugwp_solv2_v0(im, levs, dtp, tgrs, ugrs, vgrs,qgrs(:,:,1), & prsl, prsi, phil, xlat_d, sinlat, coslat, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & tau_ngw, me, master, kdt) @@ -379,9 +349,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr else - ! Temporary line - if ( me == master ) print *, "ahoj svete: in cires_ugwp_run, didn't call ngw schemes" - do k=1,levs do i=1,im gw_dtdt(i,k) = Pdtdt(i,k) diff --git a/physics/gwdps.f b/physics/gwdps.f index 63e9a7f7b..b09413f02 100644 --- a/physics/gwdps.f +++ b/physics/gwdps.f @@ -443,9 +443,6 @@ subroutine gwdps_run( & LCAP = KM LCAPP1 = LCAP + 1 ! -! Temporary line - if ( me == 0 ) print *, "ahoj svete: in gwdps_run, nmtvr =", nmtvr -! ! IF ( NMTVR == 14) then ! ---- for lm and gwd calculation points @@ -459,9 +456,6 @@ subroutine gwdps_run( & if (ipr == i) npr = npt ENDIF ENDDO - ! Temporary line - if (npt == 0 .and. me==0) print *, "ahoj svete: in gwdps_run ", - & kdt, " npt =", npt IF (npt == 0) RETURN ! No gwd/mb calculation done! ! ! if (lprnt) print *,' npt=',npt,' npr=',npr,' ipr=',ipr,' im=',im diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index f97e218d1..2c4c2a856 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -120,8 +120,6 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if ( do_ugwp_v0 ) then ! if (do_ugwp .or. cdmbgwd(3) > 0.0) then (deactivate effect of do_ugwp) if (cdmbgwd(3) > 0.0) then - ! Temporary line - if ( me==master ) print *, "ahoj svete: in unified_ugwp_init calling cires_ugwp_mod_init" call cires_ugwp_mod_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) @@ -135,8 +133,6 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if ( do_ugwp_v1 ) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in unified_ugwp_init calling cires_ugwp_init_v1" call cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat, & fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) @@ -335,25 +331,11 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, zlwb(:) = 0. - ! Temporary lines - if ( me == master ) write (80,*) "ahoj svete: in unified beginning ", & - kdt, " elvmax =", elvmax - if ( me == master ) write (81,*) "ahoj svete: in unified beginning ", & - kdt, " sigma =", sigma - if ( me == master ) write (82,*) "ahoj svete: in unified beginning ", & - kdt, " oc =", oc - - - ! Temporary line - if ( me == master ) write (40,*) "ahoj svete: q1 = ", q1 - ! Run the appropriate large-scale (large-scale GWD + blocking) scheme ! Note: In case of GSL drag_suite, this includes ss and tofd if ( do_gsl_drag_ls_bl.or.do_gsl_drag_ss.or.do_gsl_drag_tofd ) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in unified_ugwp_run calling drag_suite_run" call drag_suite_run(im,levs,dvdt,dudt,dtdt,ugrs,vgrs,tgrs,q1, & kpbl,prsi,del,prsl,prslk,phii,phil,dtp, & kdt,hprime,oc,oa4,clx,varss,oc1ss,oa4ss, & @@ -370,9 +352,6 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, else if ( do_ugwp_v1.or.do_ugwp_v1_orog_only ) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in unified_ugwp_run calling gwdps_oro_v1" - ! Valery's TOFD ! topo paras ! w/ orographic effects @@ -400,9 +379,6 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, else if ( do_ugwp_v0.or.do_ugwp_v0_orog_only ) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in unified_ugwp_run getting ready to call something" - do k=1,levs do i=1,im Pdvdt(i,k) = 0.0 @@ -413,15 +389,14 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, enddo if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in unified_ugwp_run calling gwdps_run" ! Override nmtvr with nmtvr_temp = 14 for passing into gwdps_run if necessary if ( nmtvr == 24 ) then ! gwd_opt = 2, 22, 3, or 33 nmtvr_temp = 14 else - nmtvr_temp = nmtvr + nmtvr_temp = nmtvr end if + call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & ugrs, vgrs, tgrs, q1, & kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & @@ -433,17 +408,6 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, if (errflg/=0) return endif - if ( me == master ) write (52,*) "ahoj svete: in unified after & - &gwdps_run ", kdt, " Pdudt = ", Pdudt - if ( me == master ) write (54,*) "ahoj svete: in unified after & - &gwdps_run ", kdt, " Pdvdt = ", Pdvdt - if ( me == master ) write (56,*) "ahoj svete: in unified after & - &gwdps_run ", kdt, " Pdtdt = ", Pdtdt - if ( me == master ) write (58,*) "ahoj svete: in unified after & - &gwdps_run ", kdt, " hprime =", hprime - if ( me == master ) write (60,*) "ahoj svete: in unified after & - &gwdps_run ", kdt, " elvmax =", elvmax - tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 if (ldiag_ugwp) then du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 @@ -475,10 +439,6 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, if (cdmbgwd(3) > 0.0) then - ! Temporary line - if ( me == master ) print *, "ahoj svete: in unified_drag_run calling slat_geos5_tamp" - - ! 2) non-stationary GW-scheme with GMAO/MERRA GW-forcing call slat_geos5_tamp(im, tamp_mpa, xlat_d, tau_ngw) @@ -517,9 +477,6 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, enddo endif - ! Temporary line - if ( me == master ) print *, "ahoj svete: in unified_drag_run calling fv3_ugwp_solv2_v0" - call fv3_ugwp_solv2_v0(im, levs, dtp, tgrs, ugrs, vgrs, q1, & prsl, prsi, phil, xlat_d, sinlat, coslat, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & tau_ngw, me, master, kdt) @@ -539,9 +496,6 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, else ! .not.(cdmbgwd(3) > 0.0) - ! Temporary line - if ( me == master ) print *, "ahoj svete: in unified_ugwp_run not calling slat_geos5_tamp" - do k=1,levs do i=1,im gw_dtdt(i,k) = Pdtdt(i,k) From a8d1b6bc4aa989baba622025add3b6f47e694bdb Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 23 Sep 2020 11:20:21 -0600 Subject: [PATCH 353/404] Update standard names for flags/controls of cloud overlap methods --- physics/GFS_rrtmg_setup.meta | 4 ++-- physics/GFS_rrtmgp_setup.meta | 4 ++-- physics/module_SGSCloud_RadPre.meta | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 8377807d8..fec7e32d0 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -113,7 +113,7 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation + standard_name = flag_for_cloud_overlap_method_for_shortwave_radiation long_name = sw: max-random overlap clouds units = flag dimensions = () @@ -121,7 +121,7 @@ intent = in optional = F [iovr_lw] - standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation + standard_name = flag_for_cloud_overlap_method_for_longwave_radiation long_name = lw: max-random overlap clouds units = flag dimensions = () diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 430226dbc..45e9d65a2 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -161,7 +161,7 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation + standard_name = flag_for_cloud_overlap_method_for_shortwave_radiation long_name = sw: max-random overlap clouds units = flag dimensions = () @@ -169,7 +169,7 @@ intent = in optional = F [iovr_lw] - standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation + standard_name = flag_for_cloud_overlap_method_for_longwave_radiation long_name = lw: max-random overlap clouds units = flag dimensions = () diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 94c9e78e9..f7db379d7 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -338,7 +338,7 @@ intent = in optional = F [iovr] - standard_name = flag_for_max_random_overlap_clouds_for_radiation + standard_name = flag_for_cloud_overlap_method_for_radiation long_name = max-random overlap clouds units = flag dimensions = () From 44e298aa7c3b0275c71450588fad0837a1b7f895 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Thu, 24 Sep 2020 16:29:40 +0000 Subject: [PATCH 354/404] Removed if(.not. restart) around the call to rucinit. --- physics/sfc_drv_ruc.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 5370cd763..d54561d21 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -125,7 +125,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & endif enddo - if( .not. flag_restart) then + !if( .not. flag_restart) then call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in me, master, lsm_ruc, lsm, slmsk, & ! in soiltyp, vegtype, & ! in @@ -142,7 +142,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & enddo enddo ! i - endif ! flag_restart + !endif ! flag_restart !-- end of initialization if ( debug_print) then From e177dca0e3e79220939367580ce0c15b61e72089 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 28 Sep 2020 09:11:14 -0600 Subject: [PATCH 355/404] add CMakeLists.txt change from @climbfuji --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06ca63d0b..a18f0b0f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,7 +212,9 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel") endif() # Remove files with special compiler flags from list of files with standard compiler flags - list(REMOVE_ITEM SCHEMES ${SCHEMES_SFX_OPT}) + if (SCHEMES_SFX_OPT) + list(REMOVE_ITEM SCHEMES ${SCHEMES_SFX_OPT}) + endif(SCHEMES_SFX_OPT) # Assign standard compiler flags to all remaining schemes and caps SET_SOURCE_FILES_PROPERTIES(${SCHEMES} ${CAPS} PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_OPT}") From a96775edd755b13ed28f2d9f700eb3283372bb24 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Tue, 29 Sep 2020 14:37:18 +0000 Subject: [PATCH 356/404] Sept. 28 bug fix --- physics/unified_ugwp.F90 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index 2c4c2a856..bdd0fbb70 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -350,7 +350,9 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, do_gsl_drag_ls_bl,do_gsl_drag_ss,do_gsl_drag_tofd, & errmsg,errflg) - else if ( do_ugwp_v1.or.do_ugwp_v1_orog_only ) then + end if + + if ( do_ugwp_v1.or.do_ugwp_v1_orog_only ) then ! Valery's TOFD ! topo paras @@ -377,7 +379,9 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & du3dt_mtb, du3dt_ogw, du3dt_tms) - else if ( do_ugwp_v0.or.do_ugwp_v0_orog_only ) then + end if + + if ( do_ugwp_v0.or.do_ugwp_v0_orog_only ) then do k=1,levs do i=1,im From 423c6bd0e932a463818096ce16051fb498d38291 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 1 Oct 2020 09:24:30 -0600 Subject: [PATCH 357/404] revert some changes per Doms comments --- physics/GFS_rrtmg_setup.meta | 16 ++++++++-------- physics/GFS_rrtmgp_setup.meta | 16 ++++++++-------- physics/mp_fer_hires.F90 | 5 +++-- physics/mp_fer_hires.meta | 9 +++++++++ 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 8793f7393..8377807d8 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -113,32 +113,32 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_cloud_overlapping_method_for_shortwave_radiation - long_name = control flag for cloud overlapping method for SW + standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation + long_name = sw: max-random overlap clouds units = flag dimensions = () type = integer intent = in optional = F [iovr_lw] - standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation - long_name = control flag for cloud overlapping method for LW + standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation + long_name = lw: max-random overlap clouds units = flag dimensions = () type = integer intent = in optional = F [isubc_sw] - standard_name = flag_for_subcolumn_cloud_approximation_for_shortwave_radiation - long_name = flag for subcolumn cloud approximation for shortwave radiation + standard_name = flag_for_sw_clouds_without_sub_grid_approximation + long_name = flag for sw clouds without sub-grid approximation units = flag dimensions = () type = integer intent = in optional = F [isubc_lw] - standard_name = flag_for_subcolumn_cloud_approximation_for_longwave_radiation - long_name = flag for subcolumn cloud approximation for longwave radiation + standard_name = flag_for_lw_clouds_without_sub_grid_approximation + long_name = flag for lw clouds without sub-grid approximation units = flag dimensions = () type = integer diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index c0c192c62..430226dbc 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -161,32 +161,32 @@ intent = in optional = F [iovr_sw] - standard_name = flag_for_cloud_overlapping_method_for_shortwave_radiation - long_name = control flag for cloud overlapping method for SW + standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation + long_name = sw: max-random overlap clouds units = flag dimensions = () type = integer intent = in optional = F [iovr_lw] - standard_name = flag_for_cloud_overlapping_method_for_longwave_radiation - long_name = control flag for cloud overlapping method for SW + standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation + long_name = lw: max-random overlap clouds units = flag dimensions = () type = integer intent = in optional = F [isubc_sw] - standard_name = flag_for_subcolumn_cloud_approximation_for_shortwave_radiation - long_name = flag for subcolumn cloud approximation for shortwave radiation + standard_name = flag_for_sw_clouds_without_sub_grid_approximation + long_name = flag for sw clouds without sub-grid approximation units = flag dimensions = () type = integer intent = in optional = F [isubc_lw] - standard_name = flag_for_subcolumn_cloud_approximation_for_longwave_radiation - long_name = flag for subcolumn cloud approximation for longwave radiation + standard_name = flag_for_lw_clouds_without_sub_grid_approximation + long_name = flag for lw clouds without sub-grid approximation units = flag dimensions = () type = integer diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index c4ed18977..95e521141 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -121,7 +121,7 @@ end subroutine mp_fer_hires_init SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ,SLMSK & ,PRSI,P_PHY & - ,T,Q & + ,T,Q,CWM & ,TRAIN,SR & ,F_ICE,F_RAIN,F_RIMEF & ,QC,QR,QI,QG & ! wet mixing ratio @@ -159,6 +159,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & real(kind_phys), intent(in ) :: epsq,r_d,p608,cp,g real(kind_phys), intent(inout) :: t(1:ncol,1:nlev) real(kind_phys), intent(inout) :: q(1:ncol,1:nlev) + real(kind_phys), intent(inout) :: cwm(1:ncol,1:nlev) real(kind_phys), intent(inout) :: train(1:ncol,1:nlev) real(kind_phys), intent(out ) :: sr(1:ncol) real(kind_phys), intent(inout) :: f_ice(1:ncol,1:nlev) @@ -184,7 +185,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & integer :: I,J,K,N integer :: lowlyr(1:ncol) integer :: dx1 - real(kind_phys) :: cwm(1:ncol,1:nlev) + !real(kind_phys) :: mprates(1:ncol,1:nlev,d_ss) real(kind_phys) :: DTPHS,PCPCOL,RDTPHS,TNEW real(kind_phys) :: ql(1:nlev),tl(1:nlev) real(kind_phys) :: rainnc(1:ncol),rainncv(1:ncol) diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index 17b164766..a0591ade8 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -214,6 +214,15 @@ kind = kind_phys intent = inout optional = F +[cwm] + standard_name = total_cloud_condensate_mixing_ratio_updated_by_physics + long_name = total cloud condensate mixing ratio (except water vapor) updated by physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [train] standard_name = accumulated_change_of_air_temperature_due_to_FA_scheme long_name = accumulated change of air temperature due to FA MP scheme From 52c4f54ef093836d73c664780274deb999b402e2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 1 Oct 2020 15:41:39 -0600 Subject: [PATCH 358/404] Remove switch between WRFv3.8.1 and v4+ in module_mp_thompson.F90 --- physics/module_mp_thompson.F90 | 65 +++------------------------------- 1 file changed, 4 insertions(+), 61 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 304afc6d5..14604e625 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -1,12 +1,6 @@ !>\file module_mp_thompson.F90 !! This file contains the entity of GSD Thompson MP scheme. -! DH* 2020-06-05 -! Use the following preprocessor directive to roll back -! to the WRFv3.8.1, used in RAPv5/HRRRv4 for more reasonable -! representation of mesoscale storms and reflectivity values -!#define WRF381 - !>\ingroup aathompson !! This module computes the moisture tendencies of water vapor, @@ -463,13 +457,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & if (.NOT. ALLOCATED(tcg_racg) ) then ALLOCATE(tcg_racg(ntb_g1,ntb_g,ntb_r1,ntb_r)) micro_init = .TRUE. - if (mpirank==mpiroot) then -#ifdef WRF381 - write(0,*) "Using Thompson MP from WRFv3.8.1 (RAPv5/HRRRv4)" -#else - write(0,*) "Using Thompson MP from WRFv4.0+" -#endif - endif endif if (.NOT. ALLOCATED(tmr_racg)) ALLOCATE(tmr_racg(ntb_g1,ntb_g,ntb_r1,ntb_r)) @@ -2715,13 +2702,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !! supersat again. sump = pri_inu(k) + pri_ide(k) + prs_ide(k) & + prs_sde(k) + prg_gde(k) + pri_iha(k) -! DH* 2020-06-02 I believe that the WRF381 version -! is wrong, because the units do not match. -#ifdef WRF381 - rate_max = (qv(k)-qvsi(k))*odts*0.999 -#else rate_max = (qv(k)-qvsi(k))*rho(k)*odts*0.999 -#endif if ( (sump.gt. eps .and. sump.gt. rate_max) .or. & (sump.lt. -eps .and. sump.lt. rate_max) ) then ratio = rate_max/sump @@ -3598,7 +3579,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(1)) enddo -#ifdef WRF381 +#if 1 if (rr(kts).gt.R1*10.) & #else if (rr(kts).gt.R1*1000.) & @@ -3653,7 +3634,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(2)) enddo -#ifdef WRF381 +#if 1 if (ri(kts).gt.R1*10.) & #else if (ri(kts).gt.R1*1000.) & @@ -3684,7 +3665,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(3)) enddo -#ifdef WRF381 +#if 1 if (rs(kts).gt.R1*10.) & #else if (rs(kts).gt.R1*1000.) & @@ -3715,7 +3696,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & *odzq*DT*onstep(4)) enddo -#ifdef WRF381 +#if 1 if (rg(kts).gt.R1*10.) & #else if (rg(kts).gt.R1*1000.) & @@ -3760,21 +3741,10 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & qv1d(k) = MAX(1.E-10, qv1d(k) + qvten(k)*DT) qc1d(k) = qc1d(k) + qcten(k)*DT nc1d(k) = MAX(2./rho(k), MIN(nc1d(k) + ncten(k)*DT, Nt_c_max)) -! DH* 2020-06-05 I believe WRF381 is wrong in terms of units; -! dividing by rho turns number concentration per volume into -! number concentration per mass. -#ifdef WRF381 nwfa1d(k) = MAX(11.1E6/rho(k), MIN(9999.E6/rho(k), & (nwfa1d(k)+nwfaten(k)*DT))) nifa1d(k) = MAX(naIN1*0.01, MIN(9999.E6/rho(k), & (nifa1d(k)+nifaten(k)*DT))) -#else - nwfa1d(k) = MAX(11.1E6, MIN(9999.E6, & - (nwfa1d(k)+nwfaten(k)*DT))) - nifa1d(k) = MAX(naIN1*0.01, MIN(9999.E6, & - (nifa1d(k)+nifaten(k)*DT))) -#endif - if (qc1d(k) .le. R1) then qc1d(k) = 0.0 nc1d(k) = 0.0 @@ -5275,31 +5245,14 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & ! are consistent with the WRFv3.8.1 settings, but inconsistent ! with the WRFv4+ settings. In order to apply the same bounds ! as before this change, use the WRF v3.8.1 settings throughout. -#if 1 -!ifdef WRF381 re_qc1d(:) = 2.49E-6 re_qi1d(:) = 4.99E-6 re_qs1d(:) = 9.99E-6 -#else - re_qc1d(:) = 2.49E-6 - re_qi1d(:) = 2.49E-6 - re_qs1d(:) = 4.99E-6 -#endif do k = kts, kte rho(k) = 0.622*p1d(k)/(R*t1d(k)*(qv1d(k)+0.622)) rc(k) = MAX(R1, qc1d(k)*rho(k)) -#ifdef WRF381 - nc(k) = MAX(R2, MIN(nc1d(k)*rho(k), Nt_c_max)) -#else - ! DH* 2020-06-05 is using 2.0 instead of R2 - ! a bug in the WRFv4.0+ version of Thompson? - ! For ni(k) a few lines below, it is still R2. - ! Note that R2 is defined as R2 = 1.E-6, and is - ! used in other parts of Thompson MP for ni/nr - ! calculations (but not for nc calculations) nc(k) = MAX(2., MIN(nc1d(k)*rho(k), Nt_c_max)) -#endif if (.NOT. is_aerosol_aware) nc(k) = Nt_c if (rc(k).gt.R1 .and. nc(k).gt.R2) has_qc = .true. ri(k) = MAX(R1, qi1d(k)*rho(k)) @@ -5328,12 +5281,7 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & do k = kts, kte if (ri(k).le.R1 .or. ni(k).le.R2) CYCLE lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi -#if 1 -!ifdef WRF381 re_qi1d(k) = MAX(5.01E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6)) -#else - re_qi1d(k) = MAX(2.51E-6, MIN(SNGL(0.5D0 * DBLE(3.+mu_i)/lami), 125.E-6)) -#endif enddo endif @@ -5373,12 +5321,7 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & & + sb(7)*tc0*tc0*cse(1) + sb(8)*tc0*cse(1)*cse(1) & & + sb(9)*tc0*tc0*tc0 + sb(10)*cse(1)*cse(1)*cse(1) smoc = a_ * smo2**b_ -#if 1 -!ifdef WRF381 re_qs1d(k) = MAX(10.E-6, MIN(0.5*(smoc/smob), 999.E-6)) -#else - re_qs1d(k) = MAX(5.01E-6, MIN(0.5*(smoc/smob), 999.E-6)) -#endif enddo endif From 0f08d1e693423e1925e1eaf0ef49c0bd35c42976 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 2 Oct 2020 17:31:59 -0600 Subject: [PATCH 359/404] Fix legacy warnings: remove old CCPP arg table hooks for empty subroutines without entries in the metadata files --- physics/GFS_MP_generic.F90 | 21 ++++--------- physics/GFS_rad_time_vary.fv3.F90 | 5 +-- physics/GFS_rad_time_vary.scm.F90 | 4 --- physics/GFS_rrtmg_post.F90 | 4 --- physics/GFS_rrtmg_pre.F90 | 4 --- physics/GFS_rrtmg_pre.meta | 2 +- physics/cires_ugwp_post.F90 | 8 ----- physics/cnvc90.f | 7 ----- physics/cs_conv.F90 | 14 --------- physics/cu_gf_driver.F90 | 5 --- physics/cu_ntiedtke.F90 | 5 --- physics/dcyc2.f | 7 ----- physics/drag_suite.F90 | 5 +-- physics/get_prs_fv3.F90 | 16 ---------- physics/gwdc.f | 51 ++++++++++++------------------- physics/gwdc.meta | 35 ++++++++++++++++----- physics/gwdps.f | 5 --- physics/h2ophys.f | 8 ----- physics/m_micro.F90 | 4 --- physics/m_micro_interstitial.F90 | 18 ----------- physics/mp_fer_hires.F90 | 2 -- physics/ozphys.f | 5 --- physics/ozphys_2015.f | 5 --- physics/precpd.f | 7 ----- physics/radlw_main.meta | 2 +- physics/radsw_main.meta | 2 +- physics/rayleigh_damp.f | 6 ---- physics/rrtmg_lw_post.F90 | 7 ----- physics/rrtmg_lw_pre.F90 | 4 --- physics/rrtmg_sw_post.F90 | 8 +---- physics/rrtmg_sw_pre.F90 | 4 --- physics/samfdeepcnv.f | 9 ------ physics/samfshalcnv.f | 10 ------ physics/sascnvn.F | 6 +--- physics/sfc_nst.f | 11 ------- physics/sfc_ocean.F | 4 --- physics/shalcnv.F | 6 +--- 37 files changed, 62 insertions(+), 264 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 8810cc7cf..435a80509 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -6,13 +6,9 @@ module GFS_MP_generic_pre contains - -!! \section arg_table_GFS_MP_generic_pre_init Argument Table -!! - subroutine GFS_MP_generic_pre_init + subroutine GFS_MP_generic_pre_init() end subroutine GFS_MP_generic_pre_init - !> \section arg_table_GFS_MP_generic_pre_run Argument Table !! \htmlinclude GFS_MP_generic_pre_run.html !! @@ -64,9 +60,7 @@ subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, end subroutine GFS_MP_generic_pre_run -!> \section arg_table_GFS_MP_generic_pre_finalize Argument Table -!! - subroutine GFS_MP_generic_pre_finalize + subroutine GFS_MP_generic_pre_finalize() end subroutine GFS_MP_generic_pre_finalize end module GFS_MP_generic_pre @@ -77,9 +71,7 @@ end module GFS_MP_generic_pre module GFS_MP_generic_post contains -!! \section arg_table_GFS_MP_generic_post_init Argument Table -!! - subroutine GFS_MP_generic_post_init + subroutine GFS_MP_generic_post_init() end subroutine GFS_MP_generic_post_init !>\defgroup gfs_calpreciptype GFS Precipitation Type Diagnostics Module @@ -405,11 +397,10 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, dtdtr(1:im,:) = dtdtr(1:im,:) + dtdtc(1:im,:)*dtf endif - end subroutine GFS_MP_generic_post_run + end subroutine GFS_MP_generic_post_run !> @} -!> \section arg_table_GFS_MP_generic_post_finalize Argument Table -!! - subroutine GFS_MP_generic_post_finalize + subroutine GFS_MP_generic_post_finalize() end subroutine GFS_MP_generic_post_finalize + end module GFS_MP_generic_post diff --git a/physics/GFS_rad_time_vary.fv3.F90 b/physics/GFS_rad_time_vary.fv3.F90 index 9a4583dc4..f30bf93f9 100644 --- a/physics/GFS_rad_time_vary.fv3.F90 +++ b/physics/GFS_rad_time_vary.fv3.F90 @@ -10,8 +10,6 @@ module GFS_rad_time_vary contains -!! \section arg_table_GFS_rad_time_vary_init Argument Table -!! subroutine GFS_rad_time_vary_init end subroutine GFS_rad_time_vary_init @@ -100,8 +98,7 @@ subroutine GFS_rad_time_vary_run (Model, Data, nthrds, errmsg, errflg) end subroutine GFS_rad_time_vary_run !> @} -!> \section arg_table_GFS_rad_time_vary_finalize Argument Table -!! subroutine GFS_rad_time_vary_finalize() end subroutine GFS_rad_time_vary_finalize + end module GFS_rad_time_vary diff --git a/physics/GFS_rad_time_vary.scm.F90 b/physics/GFS_rad_time_vary.scm.F90 index 13ae5e14b..9d7302beb 100644 --- a/physics/GFS_rad_time_vary.scm.F90 +++ b/physics/GFS_rad_time_vary.scm.F90 @@ -13,8 +13,6 @@ module GFS_rad_time_vary !>\defgroup GFS_rad_time_vary GFS RRTMG Update !!\ingroup RRTMG !! @{ -!! \section arg_table_GFS_rad_time_vary_init Argument Table -!! subroutine GFS_rad_time_vary_init end subroutine GFS_rad_time_vary_init @@ -86,8 +84,6 @@ subroutine GFS_rad_time_vary_run (Model, Statein, Tbd, errmsg, errflg) end subroutine GFS_rad_time_vary_run -!> \section arg_table_GFS_rad_time_vary_finalize Argument Table -!! subroutine GFS_rad_time_vary_finalize() end subroutine GFS_rad_time_vary_finalize !! @} diff --git a/physics/GFS_rrtmg_post.F90 b/physics/GFS_rrtmg_post.F90 index 7f80ca4c3..bcc336fa7 100644 --- a/physics/GFS_rrtmg_post.F90 +++ b/physics/GFS_rrtmg_post.F90 @@ -5,8 +5,6 @@ module GFS_rrtmg_post !>\defgroup GFS_rrtmg_post GFS RRTMG Scheme Post !! @{ -!> \section arg_table_GFS_rrtmg_post_init Argument Table -!! subroutine GFS_rrtmg_post_init () end subroutine GFS_rrtmg_post_init @@ -198,8 +196,6 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & ! end subroutine GFS_rrtmg_post_run -!> \section arg_table_GFS_rrtmg_post_finalize Argument Table -!! subroutine GFS_rrtmg_post_finalize () end subroutine GFS_rrtmg_post_finalize diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 9c5b84d5f..623508407 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -8,8 +8,6 @@ module GFS_rrtmg_pre !> \defgroup GFS_rrtmg_pre GFS RRTMG Scheme Pre !! @{ -!! \section arg_table_GFS_rrtmg_pre_init Argument Table -!! subroutine GFS_rrtmg_pre_init () end subroutine GFS_rrtmg_pre_init @@ -982,8 +980,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input end subroutine GFS_rrtmg_pre_run -!> \section arg_table_GFS_rrtmg_pre_finalize Argument Table -!! subroutine GFS_rrtmg_pre_finalize () end subroutine GFS_rrtmg_pre_finalize diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 6b2097322..a3c4e3972 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -568,7 +568,7 @@ standard_name = cloud_overlap_decorrelation_parameter long_name = cloud overlap decorrelation parameter units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out diff --git a/physics/cires_ugwp_post.F90 b/physics/cires_ugwp_post.F90 index 612db2c0e..68c90bc55 100644 --- a/physics/cires_ugwp_post.F90 +++ b/physics/cires_ugwp_post.F90 @@ -6,19 +6,13 @@ module cires_ugwp_post !>\defgroup cires_ugwp_post CIRES UGWP Scheme Post !! @{ -!> \section arg_table_cires_ugwp_post_init Argument Table -!! subroutine cires_ugwp_post_init () end subroutine cires_ugwp_post_init !>@brief The subroutine initializes the CIRES UGWP -#if 0 !> \section arg_table_cires_ugwp_post_run Argument Table !! \htmlinclude cires_ugwp_post_run.html !! -#endif - - subroutine cires_ugwp_post_run (ldiag_ugwp, dtf, im, levs, & gw_dtdt, gw_dudt, gw_dvdt, tau_tofd, tau_mtb, tau_ogw, & tau_ngw, zmtb, zlwb, zogw, dudt_mtb, dudt_ogw, dudt_tms, & @@ -74,8 +68,6 @@ subroutine cires_ugwp_post_run (ldiag_ugwp, dtf, im, levs, & end subroutine cires_ugwp_post_run -!> \section arg_table_cires_ugwp_post_finalize Argument Table -!! subroutine cires_ugwp_post_finalize () end subroutine cires_ugwp_post_finalize diff --git a/physics/cnvc90.f b/physics/cnvc90.f index 9bef0ebf9..fe3601ce2 100644 --- a/physics/cnvc90.f +++ b/physics/cnvc90.f @@ -6,9 +6,6 @@ module cnvc90 contains - -!! \section arg_table_cnvc90_init Argument Table -!! subroutine cnvc90_init() end subroutine cnvc90_init @@ -130,12 +127,8 @@ SUBROUTINE cnvc90_run(CLSTP,IM,RN,KBOT,KTOP,KM,PRSI, & END SUBROUTINE cnvc90_run !> @} - -!! \section arg_table_cnvc90_finalize Argument Table -!! subroutine cnvc90_finalize() end subroutine cnvc90_finalize - end module cnvc90 diff --git a/physics/cs_conv.F90 b/physics/cs_conv.F90 index 386349422..a7b03d387 100644 --- a/physics/cs_conv.F90 +++ b/physics/cs_conv.F90 @@ -4,21 +4,15 @@ module cs_conv_pre contains -!! \section arg_table_cs_conv_pre_init Argument Table -!! subroutine cs_conv_pre_init() end subroutine cs_conv_pre_init -!! \section arg_table_cs_conv_pre_finalize Argument Table -!! subroutine cs_conv_pre_finalize() end subroutine cs_conv_pre_finalize -#if 0 !! \section arg_table_cs_conv_pre_run Argument Table !! \htmlinclude cs_conv_pre_run.html !! -#endif subroutine cs_conv_pre_run(im, levs, ntrac, ncld, q, clw1, clw2, & & work1, work2, cs_parm1, cs_parm2, wcbmax, & & fswtr, fscav, save_q1, save_q2, save_q3, & @@ -78,13 +72,9 @@ end module cs_conv_pre module cs_conv_post contains -!! \section arg_table_cs_conv_post_init Argument Table -!! subroutine cs_conv_post_init() end subroutine cs_conv_post_init -!! \section arg_table_cs_conv_post_finalize Argument Table -!! subroutine cs_conv_post_finalize() end subroutine cs_conv_post_finalize @@ -218,13 +208,9 @@ module cs_conv contains -!> \section arg_table_cs_conv_init Argument Table -!! subroutine cs_conv_init() end subroutine cs_conv_init -!> \section arg_table_cs_conv_finalize Argument Table -!! subroutine cs_conv_finalize() end subroutine cs_conv_finalize diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 150f9f6c0..8e81cf8ab 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -46,11 +46,6 @@ subroutine cu_gf_driver_init(mpirank, mpiroot, errmsg, errflg) end subroutine cu_gf_driver_init - -!> \brief Brief description of the subroutine -!! -!! \section arg_table_cu_gf_driver_finalize Argument Table -!! subroutine cu_gf_driver_finalize() end subroutine cu_gf_driver_finalize ! diff --git a/physics/cu_ntiedtke.F90 b/physics/cu_ntiedtke.F90 index a824c6af4..a39930d77 100644 --- a/physics/cu_ntiedtke.F90 +++ b/physics/cu_ntiedtke.F90 @@ -129,11 +129,6 @@ subroutine cu_ntiedtke_init(mpirank, mpiroot, errmsg, errflg) end subroutine cu_ntiedtke_init - -!> \brief Brief description of the subroutine -!! -!! \section arg_table_cu_ntiedtke_finalize Argument Table -!! subroutine cu_ntiedtke_finalize() end subroutine cu_ntiedtke_finalize ! diff --git a/physics/dcyc2.f b/physics/dcyc2.f index 6dca65cf5..22eece516 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -16,19 +16,12 @@ module dcyc2t3 contains -!! \section arg_table_dcyc2t3_init Argument Table -!! subroutine dcyc2t3_init() end subroutine dcyc2t3_init -!! \section arg_table_dcyc2t3_finalize Argument Table -!! subroutine dcyc2t3_finalize() end subroutine dcyc2t3_finalize - - - ! ===================================================================== ! ! description: ! ! ! diff --git a/physics/drag_suite.F90 b/physics/drag_suite.F90 index 55ef9c268..66bf7fcb5 100644 --- a/physics/drag_suite.F90 +++ b/physics/drag_suite.F90 @@ -7,8 +7,6 @@ module drag_suite contains -!> \section arg_table_drag_suite_init Argument Table -!! subroutine drag_suite_init() end subroutine drag_suite_init @@ -1299,8 +1297,7 @@ subroutine drag_suite_run( & end subroutine drag_suite_run !------------------------------------------------------------------- ! -!> \section arg_table_drag_suite_finalize Argument Table -!! + subroutine drag_suite_finalize() end subroutine drag_suite_finalize diff --git a/physics/get_prs_fv3.F90 b/physics/get_prs_fv3.F90 index 352a61895..224c8c853 100644 --- a/physics/get_prs_fv3.F90 +++ b/physics/get_prs_fv3.F90 @@ -12,13 +12,9 @@ module get_prs_fv3 contains - -!! \section arg_table_get_prs_fv3_init Argument Table -!! subroutine get_prs_fv3_init() end subroutine get_prs_fv3_init - !! \section arg_table_get_prs_fv3_run Argument Table !! \htmlinclude get_prs_fv3_run.html !! @@ -56,17 +52,12 @@ subroutine get_prs_fv3_run(ix, levs, phii, prsi, tgrs, qgrs1, del, del_gz, errms end subroutine get_prs_fv3_run - -!! \section arg_table_get_prs_fv3_finalize Argument Table -!! subroutine get_prs_fv3_finalize() end subroutine get_prs_fv3_finalize - end module get_prs_fv3 - module get_phi_fv3 use machine, only: kind_phys @@ -82,12 +73,9 @@ module get_phi_fv3 contains -!! \section arg_table_get_phi_fv3_init Argument Table -!! subroutine get_phi_fv3_init() end subroutine get_phi_fv3_init - !! \section arg_table_get_phi_fv3_run Argument Table !! \htmlinclude get_phi_fv3_run.html !! @@ -127,13 +115,9 @@ subroutine get_phi_fv3_run(ix, levs, gt0, gq01, del_gz, phii, phil, errmsg, errf end subroutine get_phi_fv3_run - -!! \section arg_table_get_phi_fv3_finalize Argument Table -!! subroutine get_phi_fv3_finalize() end subroutine get_phi_fv3_finalize - end module get_phi_fv3 diff --git a/physics/gwdc.f b/physics/gwdc.f index 5c6f8ecd7..fc81373ce 100644 --- a/physics/gwdc.f +++ b/physics/gwdc.f @@ -7,10 +7,6 @@ module gwdc_pre contains -! \brief Brief description of the subroutine -! -!> \section arg_table_gwdc_pre_init Argument Table -!! subroutine gwdc_pre_init() end subroutine gwdc_pre_init @@ -22,7 +18,7 @@ end subroutine gwdc_pre_init subroutine gwdc_pre_run ( & & im, cgwf, dx, work1, work2, dlength, cldf, & & levs, kbot, ktop, dtp, gt0, gt0_init, del, cumabs, & - & do_cnvgwd, errmsg, errflg ) + & errmsg, errflg ) use machine, only : kind_phys implicit none @@ -38,7 +34,6 @@ subroutine gwdc_pre_run ( & real(kind=kind_phys), intent(out) :: & & dlength(:), cldf(:), cumabs(:) - logical, intent(in) :: do_cnvgwd character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -50,14 +45,6 @@ subroutine gwdc_pre_run ( & errmsg = '' errflg = 0 - ! DH* - if (.not. do_cnvgwd) then - write(0,*) "ERROR: , GWDC_PRE CALLED BUT DO_CNVGWD FALSE" - call sleep(5) - stop - end if - ! *DH - do i = 1, im tem1 = dx(i) tem2 = tem1 @@ -85,10 +72,6 @@ subroutine gwdc_pre_run ( & end subroutine gwdc_pre_run -! \brief Brief description of the subroutine -! -!> \section arg_table_gwdc_pre_finalize Argument Table -!! subroutine gwdc_pre_finalize () end subroutine gwdc_pre_finalize @@ -103,8 +86,26 @@ module gwdc ! \brief Brief description of the subroutine ! !> \section arg_table_gwdc_init Argument Table +!! \htmlinclude gwdc_init.html !! - subroutine gwdc_init() + subroutine gwdc_init(do_cnvgwd, errmsg, errflg) + + implicit none + + logical, intent(in) :: do_cnvgwd + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. do_cnvgwd) then + errmsg = "Logic error: gwdc called but do_cnvgwd is false" + errflg = 1 + return + end if + end subroutine gwdc_init !> \defgroup GFS_gwdc_run GFS Convective Gravity Wave Drag Scheme Module @@ -1437,10 +1438,6 @@ subroutine gwdc_run (im,km,lat,u1,v1,t1,q1,deltim, & end subroutine gwdc_run !> @} -! \brief Brief description of the subroutine -! -!> \section arg_table_gwdc_finalize Argument Table -!! subroutine gwdc_finalize() end subroutine gwdc_finalize @@ -1452,10 +1449,6 @@ module gwdc_post contains -! \brief Brief description of the subroutine -! -!> \section arg_table_gwdc_post_init Argument Table -!! subroutine gwdc_post_init() end subroutine gwdc_post_init @@ -1522,10 +1515,6 @@ subroutine gwdc_post_run( & end subroutine gwdc_post_run -! \brief Brief description of the subroutine -! -!> \section arg_table_gwdc_post_finalize Argument Table -!! subroutine gwdc_post_finalize() end subroutine gwdc_post_finalize diff --git a/physics/gwdc.meta b/physics/gwdc.meta index 5c3fa63d6..2fde9c2aa 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -138,6 +138,34 @@ kind = kind_phys intent = out optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-table-properties] + name = gwdc + type = scheme + dependencies = machine.F + +######################################################################## +[ccpp-arg-table] + name = gwdc_init + type = scheme [do_cnvgwd] standard_name = flag_for_convective_gravity_wave_drag long_name = flag for convective gravity wave drag (gwd) @@ -164,12 +192,6 @@ intent = out optional = F -######################################################################## -[ccpp-table-properties] - name = gwdc - type = scheme - dependencies = machine.F - ######################################################################## [ccpp-arg-table] name = gwdc_run @@ -630,4 +652,3 @@ type = integer intent = out optional = F - diff --git a/physics/gwdps.f b/physics/gwdps.f index b09413f02..c6d9ab584 100644 --- a/physics/gwdps.f +++ b/physics/gwdps.f @@ -7,8 +7,6 @@ module gwdps contains -!> \section arg_table_gwdps_init Argument Table -!! subroutine gwdps_init() end subroutine gwdps_init @@ -1309,9 +1307,6 @@ subroutine gwdps_run( & end subroutine gwdps_run !> @} -! -!> \section arg_table_gwdps_finalize Argument Table -!! subroutine gwdps_finalize() end subroutine gwdps_finalize diff --git a/physics/h2ophys.f b/physics/h2ophys.f index b3bdd279f..8222638ae 100644 --- a/physics/h2ophys.f +++ b/physics/h2ophys.f @@ -12,10 +12,6 @@ module h2ophys contains -! \brief Brief description of the subroutine -! -!> \section arg_table_h2ophys_init Argument Table -!! subroutine h2ophys_init() end subroutine h2ophys_init @@ -136,10 +132,6 @@ subroutine h2ophys_run(im, levs, kh2o, dt, h2o, ph2o, prsl, & end subroutine h2ophys_run !> @} -! \brief Brief description of the subroutine -! -!> \section arg_table_h2ophys_finalize Argument Table -!! subroutine h2ophys_finalize() end subroutine h2ophys_finalize diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index 69690d52e..77b51ed62 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -95,10 +95,6 @@ subroutine m_micro_init(imp_physics, imp_physics_mg, fprcp, gravit, rair, rh2o, end subroutine m_micro_init -! \brief Brief description of the subroutine -! -!> \section arg_table_m_micro_finalize Argument Table -!! subroutine m_micro_finalize end subroutine m_micro_finalize diff --git a/physics/m_micro_interstitial.F90 b/physics/m_micro_interstitial.F90 index 930b32b3d..55b2bbe93 100644 --- a/physics/m_micro_interstitial.F90 +++ b/physics/m_micro_interstitial.F90 @@ -7,20 +7,14 @@ module m_micro_pre contains -! \brief Brief description of the subroutine -! -!> \section arg_table_m_micro_pre_init Argument Table -!! subroutine m_micro_pre_init() end subroutine m_micro_pre_init ! \brief Brief description of the subroutine !! -#if 0 !! \section arg_table_m_micro_pre_run Argument Table !! \htmlinclude m_micro_pre_run.html !! -#endif subroutine m_micro_pre_run (im, levs, do_shoc, skip_macro, fprcp, mg3_as_mg2, gq0_ice, gq0_water, gq0_rain, & gq0_snow, gq0_graupel, gq0_rain_nc, gq0_snow_nc, gq0_graupel_nc, cld_shoc, cnvc, cnvw, tcr, tcrf, gt0, & qrn, qsnw, qgl, ncpr, ncps, ncgl, cld_frc_MG, clw_water, clw_ice, clcn, errmsg, errflg ) @@ -143,10 +137,6 @@ subroutine m_micro_pre_run (im, levs, do_shoc, skip_macro, fprcp, mg3_as_mg2, gq end subroutine m_micro_pre_run -! \brief Brief description of the subroutine -! -!> \section arg_table_m_micro_pre_finalize Argument Table -!! subroutine m_micro_pre_finalize () end subroutine m_micro_pre_finalize @@ -160,10 +150,6 @@ module m_micro_post contains -! \brief Brief description of the subroutine -! -!> \section arg_table_m_micro_post_init Argument Table -!! subroutine m_micro_post_init() end subroutine m_micro_post_init @@ -285,10 +271,6 @@ subroutine m_micro_post_run( & end subroutine m_micro_post_run -! \brief Brief description of the subroutine -! -!> \section arg_table_m_micro_post_finalize Argument Table -!! subroutine m_micro_post_finalize() end subroutine m_micro_post_finalize diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index 95e521141..0330afe47 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -393,8 +393,6 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & end subroutine mp_fer_hires_run -!> \section arg_table_mp_fer_hires_finalize Argument Table -!! subroutine mp_fer_hires_finalize () end subroutine mp_fer_hires_finalize diff --git a/physics/ozphys.f b/physics/ozphys.f index f8da58760..3d3c1d004 100644 --- a/physics/ozphys.f +++ b/physics/ozphys.f @@ -31,14 +31,9 @@ subroutine ozphys_init(oz_phys, errmsg, errflg) end subroutine ozphys_init -! \brief Brief description of the subroutine -! -!> \section arg_table_ozphys_finalize Argument Table -!! subroutine ozphys_finalize() end subroutine ozphys_finalize - !>\defgroup GFS_ozphys GFS ozphys Main !! \brief The operational GFS currently parameterizes ozone production and !! destruction based on monthly mean coefficients (\c global_o3prdlos.f77) provided by Naval diff --git a/physics/ozphys_2015.f b/physics/ozphys_2015.f index 238a8fb21..cc60ed2b4 100644 --- a/physics/ozphys_2015.f +++ b/physics/ozphys_2015.f @@ -29,14 +29,9 @@ subroutine ozphys_2015_init(oz_phys_2015, errmsg, errflg) end subroutine ozphys_2015_init -! \brief Brief description of the subroutine -! -!> \section arg_table_ozphys_2015_finalize Argument Table -!! subroutine ozphys_2015_finalize() end subroutine ozphys_2015_finalize - !>\defgroup GFS_ozphys_2015 GFS Ozone Photochemistry (2015) Scheme Module !! \brief The operational GFS currently parameterizes ozone production and !! destruction based on monthly mean coefficients ( diff --git a/physics/precpd.f b/physics/precpd.f index 0e330558b..c64474c01 100644 --- a/physics/precpd.f +++ b/physics/precpd.f @@ -6,10 +6,6 @@ module zhaocarr_precpd contains -!! \brief Brief description of the subroutine -!! -!! \section arg_table_zhaocarr_precpd_init Argument Table -!! subroutine zhaocarr_precpd_init () end subroutine zhaocarr_precpd_init @@ -702,10 +698,7 @@ subroutine zhaocarr_precpd_run (im,km,dt,del,prsl,q,cwm,t,rn & end subroutine zhaocarr_precpd_run !> @} -!! \section arg_table_zhaocarr_precpd_finalize Argument Table -!! subroutine zhaocarr_precpd_finalize end subroutine zhaocarr_precpd_finalize - end module zhaocarr_precpd diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 47d852031..48e7b8581 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -217,7 +217,7 @@ standard_name = cloud_overlap_decorrelation_parameter long_name = cloud overlap decorrelation parameter units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 3b94dc19b..b2f1b5eec 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -244,7 +244,7 @@ standard_name = cloud_overlap_decorrelation_parameter long_name = cloud overlap decorrelation parameter units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in diff --git a/physics/rayleigh_damp.f b/physics/rayleigh_damp.f index a56a85e8c..8d05f8b0b 100644 --- a/physics/rayleigh_damp.f +++ b/physics/rayleigh_damp.f @@ -6,8 +6,6 @@ module rayleigh_damp contains -!> \section arg_table_rayleigh_damp_init Argument Table -!! subroutine rayleigh_damp_init () end subroutine rayleigh_damp_init @@ -135,11 +133,7 @@ subroutine rayleigh_damp_run ( & end subroutine rayleigh_damp_run !> @} - -!! \section arg_table_rayleigh_damp_finalize Argument Table -!! subroutine rayleigh_damp_finalize () end subroutine rayleigh_damp_finalize - end module rayleigh_damp diff --git a/physics/rrtmg_lw_post.F90 b/physics/rrtmg_lw_post.F90 index af83c5cc7..815de4975 100644 --- a/physics/rrtmg_lw_post.F90 +++ b/physics/rrtmg_lw_post.F90 @@ -5,17 +5,12 @@ module rrtmg_lw_post !>\defgroup rrtmg_lw_post GFS RRTMG scheme post !! @{ -!> \section arg_table_rrtmg_lw_post_init Argument Table -!! subroutine rrtmg_lw_post_init() end subroutine rrtmg_lw_post_init -! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing -#ifndef __PGI !> \section arg_table_rrtmg_lw_post_run Argument Table !! \htmlinclude rrtmg_lw_post_run.html !! -#endif subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & im, ltp, lm, kd, tsfa, htlwc, htlw0, errmsg, errflg) @@ -78,8 +73,6 @@ subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & end subroutine rrtmg_lw_post_run -!> \section arg_table_rrtmg_lw_post_finalize Argument Table -!! subroutine rrtmg_lw_post_finalize () end subroutine rrtmg_lw_post_finalize diff --git a/physics/rrtmg_lw_pre.F90 b/physics/rrtmg_lw_pre.F90 index 7de02eed1..29a039a89 100644 --- a/physics/rrtmg_lw_pre.F90 +++ b/physics/rrtmg_lw_pre.F90 @@ -6,8 +6,6 @@ module rrtmg_lw_pre !>\defgroup rrtmg_lw_pre GFS RRTMG scheme pre !! @{ -!> \section arg_table_rrtmg_lw_pre_init Argument Table -!! subroutine rrtmg_lw_pre_init () end subroutine rrtmg_lw_pre_init @@ -49,8 +47,6 @@ subroutine rrtmg_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errm end subroutine rrtmg_lw_pre_run -!> \section arg_table_rrtmg_lw_pre_finalize Argument Table -!! subroutine rrtmg_lw_pre_finalize () end subroutine rrtmg_lw_pre_finalize !! @} diff --git a/physics/rrtmg_sw_post.F90 b/physics/rrtmg_sw_post.F90 index b0ab31129..122b16b02 100644 --- a/physics/rrtmg_sw_post.F90 +++ b/physics/rrtmg_sw_post.F90 @@ -5,16 +5,12 @@ module rrtmg_sw_post !>\defgroup rrtmg_sw_post GFS RRTMG scheme post !! @{ -!> \section arg_table_rrtmg_sw_post_init Argument Table -!! subroutine rrtmg_sw_post_init () end subroutine rrtmg_sw_post_init -! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing -#ifndef __PGI + !> \section arg_table_rrtmg_sw_post_run Argument Table !! \htmlinclude rrtmg_sw_post_run.html !! -#endif subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & im, ltp, nday, lm, kd, htswc, htsw0, & sfcalb1, sfcalb2, sfcalb3, sfcalb4, scmpsw, errmsg, errflg) @@ -126,8 +122,6 @@ subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & end subroutine rrtmg_sw_post_run -!> \section arg_table_rrtmg_sw_post_finalize Argument Table -!! subroutine rrtmg_sw_post_finalize () end subroutine rrtmg_sw_post_finalize !! @} diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index 5bdaab56b..25c4e34ba 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -6,8 +6,6 @@ module rrtmg_sw_pre !>\defgroup rrtmg_sw_pre GFS RRTMG scheme Pre !! @{ -!> \section arg_table_rrtmg_sw_pre_init Argument Table -!! subroutine rrtmg_sw_pre_init () end subroutine rrtmg_sw_pre_init @@ -104,8 +102,6 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & end subroutine rrtmg_sw_pre_run -!> \section arg_table_rrtmg_sw_pre_finalize Argument Table -!! subroutine rrtmg_sw_pre_finalize () end subroutine rrtmg_sw_pre_finalize diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 67576af15..7e31abd9c 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -10,18 +10,9 @@ module samfdeepcnv contains -!> \brief Brief description of the subroutine -!! -!! \section arg_table_samfdeepcnv_init Argument Table -!! subroutine samfdeepcnv_init() end subroutine samfdeepcnv_init - -!> \brief Brief description of the subroutine -!! -!! \section arg_table_samfdeepcnv_finalize Argument Table -!! subroutine samfdeepcnv_finalize() end subroutine samfdeepcnv_finalize diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index e48962822..ce6ae62c4 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -9,22 +9,12 @@ module samfshalcnv contains -!> \brief Brief description of the subroutine -!! -!! \section arg_table_samfshalcnv_init Argument Table -!! subroutine samfshalcnv_init() end subroutine samfshalcnv_init - -!> \brief Brief description of the subroutine -!! -!! \section arg_table_samfshalcnv_finalize Argument Table -!! subroutine samfshalcnv_finalize() end subroutine samfshalcnv_finalize - !> \defgroup SAMF_shal GFS Scale-Aware Mass-Flux Shallow Convection Scheme Module !! @{ !> \brief This subroutine contains the entirety of the SAMF shallow convection diff --git a/physics/sascnvn.F b/physics/sascnvn.F index ac59b9c5c..f9d91578b 100644 --- a/physics/sascnvn.F +++ b/physics/sascnvn.F @@ -44,11 +44,7 @@ subroutine sascnvn_init(imfdeepcnv,imfdeepcnv_sas,errmsg,errflg) ! end subroutine sascnvn_init -! \brief This subroutine is empty since there are no procedures that need to be done to finalize the sascnvn code. -!! -!! \section arg_table_sascnvn_finalize Argument Table -!! - subroutine sascnvn_finalize + subroutine sascnvn_finalize() end subroutine sascnvn_finalize !> \brief This subroutine contains the entirety of the SAS deep convection scheme. diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index 5920f375c..9e6a1c0cc 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -8,15 +8,12 @@ module sfc_nst ! \brief This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. !! This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. -!! -!! \section arg_table_sfc_nst_init Argument Table !! subroutine sfc_nst_init end subroutine sfc_nst_init ! \brief This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. !! This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. -!! \section arg_table_sfc_nst_finalize Argument Table !! subroutine sfc_nst_finalize end subroutine sfc_nst_finalize @@ -658,14 +655,10 @@ module sfc_nst_pre !! The NSST scheme is one of the three schemes used to represent the !! surface in the GFS physics suite. The other two are the Noah land !! surface model and the sice simplified ice model. -!! -!! \section arg_table_sfc_nst_init Argument Table !! subroutine sfc_nst_pre_init end subroutine sfc_nst_pre_init -!! \section arg_table_sfc_nst_finalize Argument Table -!! subroutine sfc_nst_pre_finalize end subroutine sfc_nst_pre_finalize @@ -761,15 +754,11 @@ module sfc_nst_post ! \defgroup GFS_NSST_POST GFS Near-Surface Sea Temperature Post !! \brief Brief description of the parameterization -!! -!! \section arg_table_sfc_nst_post_init Argument Table !! subroutine sfc_nst_post_init end subroutine sfc_nst_post_init ! \brief Brief description of the subroutine -!! -!! \section arg_table_sfc_nst_post_finalize Argument Table !! subroutine sfc_nst_post_finalize end subroutine sfc_nst_post_finalize diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index 20c8cdf02..8da60bb01 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -11,13 +11,9 @@ module sfc_ocean contains -!! \section arg_table_sfc_ocean_init Argument Table -!! subroutine sfc_ocean_init() end subroutine sfc_ocean_init -!! \section arg_table_sfc_ocean_finalize Argument Table -!! subroutine sfc_ocean_finalize() end subroutine sfc_ocean_finalize diff --git a/physics/shalcnv.F b/physics/shalcnv.F index 2a8918985..4cb485548 100644 --- a/physics/shalcnv.F +++ b/physics/shalcnv.F @@ -47,11 +47,7 @@ subroutine shalcnv_init(do_shoc,shal_cnv,imfshalcnv, & ! end subroutine shalcnv_init -! \brief This subroutine is empty since there are no procedures that need to be done to finalize the shalcnv code. -!! -!! \section arg_table_shalcnv_finalize Argument Table -!! - subroutine shalcnv_finalize + subroutine shalcnv_finalize() end subroutine shalcnv_finalize !> \brief This subroutine contains the entirety of the SAS shallow convection scheme. From a2728b5ee1ae08519a76155aa39f5d66aede55fc Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Tue, 6 Oct 2020 01:59:28 +0000 Subject: [PATCH 360/404] updating tasks 1 --- physics/unified_ugwp.meta | 6 ++++++ physics/unified_ugwp_post.meta | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 23610f99c..038384044 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -1,3 +1,9 @@ +[ccpp-table-properties] + name = unified_ugwp + type = scheme + dependencies = machine.F + +######################################################################## [ccpp-arg-table] name = unified_ugwp_init type = scheme diff --git a/physics/unified_ugwp_post.meta b/physics/unified_ugwp_post.meta index 807584e94..501e91b8f 100644 --- a/physics/unified_ugwp_post.meta +++ b/physics/unified_ugwp_post.meta @@ -1,3 +1,9 @@ +[ccpp-table-properties] + name = unified_ugwp_post + type = scheme + dependencies = machine.F + +######################################################################## [ccpp-arg-table] name = unified_ugwp_post_init type = scheme From 5aaa8db7889c9ac8f7bb41dcd0100c262276c86b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 5 Oct 2020 20:47:32 -0600 Subject: [PATCH 361/404] Add missing arguments to physics/GFS_rrtmg_pre.* after merge --- physics/GFS_rrtmg_pre.F90 | 11 ++++++----- physics/GFS_rrtmg_pre.meta | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 79f34bbce..5168f113b 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -22,10 +22,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ntclamt, nleffr, nieffr, nseffr, lndp_type, kdt, imp_physics, & imp_physics_thompson, imp_physics_gfdl, imp_physics_zhao_carr, & imp_physics_zhao_carr_pdf, imp_physics_mg, imp_physics_wsm6, & - imp_physics_fer_hires, lndp_var_list, lsswr, lslwr, & + imp_physics_fer_hires, julian, yearlen, lndp_var_list, lsswr, lslwr, & ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, & lmfdeep2, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & - rog, rocp, con_rd, xlat, xlon, coslat, sinlat, tsfc, slmsk, & + rog, rocp, con_rd, xlat_d, xlat, xlon, coslat, sinlat, tsfc, slmsk, & prsi, prsl, prslk, tgrs, sfc_wts, phy_f3d_mg_cld, phy_f3d_reffr, & phy_f3d_cnvw, phy_f3d_cnvc, qgrs, aer_nm, & !inputs from here and above coszen, coszdg, phy_f3d_leffr, phy_f3d_ieffr, phy_f3d_seffr, & @@ -83,7 +83,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & imp_physics_zhao_carr, & imp_physics_zhao_carr_pdf, & imp_physics_mg, imp_physics_wsm6, & - imp_physics_fer_hires + imp_physics_fer_hires, & + yearlen character(len=3), dimension(:), intent(in) :: lndp_var_list @@ -91,10 +92,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & uni_cld, effr_in, do_mynnedmf, & lmfshal, lmfdeep2 - real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup + real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup, julian real(kind=kind_phys), intent(in) :: eps, epsm1, fvirt, rog, rocp, con_rd - real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & + real(kind=kind_phys), dimension(:), intent(in) :: xlat_d, xlat, xlon, & coslat, sinlat, tsfc, & slmsk diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 6b6799314..49caca6a0 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -321,6 +321,23 @@ type = integer intent = in optional = F +[julian] + standard_name = julian_day + long_name = julian day + units = days + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[yearlen] + standard_name = number_of_days_in_year + long_name = number of days in a year + units = days + dimensions = () + type = integer + intent = in + optional = F [lndp_var_list] standard_name = variables_to_be_perturbed_for_landperts long_name = variables to be perturbed for landperts @@ -492,6 +509,15 @@ kind = kind_phys intent = in optional = F +[xlat_d] + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F [xlat] standard_name = latitude long_name = latitude From 8ee53ccd15671deeb580cc4217b1fc0f48407b1c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 6 Oct 2020 14:56:14 -0600 Subject: [PATCH 362/404] Bugfixes in physics/GFS_rrtmg_pre.meta that creeped in during the merge --- physics/GFS_rrtmg_pre.meta | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index bdf873bab..e9b301d33 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -220,7 +220,7 @@ [nleffr] standard_name = index_for_cloud_liquid_water_effective_radius long_name = the index of cloud liquid water effective radius in phy_f3d - units = + units = index dimensions = () type = integer intent = in @@ -228,7 +228,7 @@ [nieffr] standard_name = index_for_ice_effective_radius long_name = the index of ice effective radius in phy_f3d - units = + units = index dimensions = () type = integer intent = in @@ -236,7 +236,7 @@ [nseffr] standard_name = index_for_snow_effective_radius long_name = the index of snow effective radius in phy_f3d - units = + units = index dimensions = () type = integer intent = in @@ -390,7 +390,7 @@ [effr_in] standard_name = flag_for_cloud_effective_radii long_name = flag for cloud effective radii calculations in GFDL microphysics - units = + units = flag dimensions = () type = logical intent = in @@ -665,7 +665,7 @@ [aer_nm] standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration - units = kg-1? + units = kg-1 dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys From 807dd0b0aa72d071451082144dac7218a7f0fb86 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 7 Oct 2020 08:55:55 -0600 Subject: [PATCH 363/404] Update HWRF physics (except FA) after merge, add CCPP dependencies to metadata --- physics/GFS_rrtmg_pre.F90 | 11 +++++++---- physics/GFS_rrtmg_setup.meta | 2 +- physics/gfdl_sfc_layer.meta | 10 ++++++++-- physics/radiation_clouds.f | 2 +- physics/sfc_noah_wrfv4.meta | 6 ++++++ physics/sfc_noah_wrfv4_interstitial.meta | 14 +++++++++++++- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 3b57878bb..9852a77b8 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -172,6 +172,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDSW,NF_AESW) ::faersw real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDLW,NF_AELW) ::faerlw + integer :: ids, ide, jds, jde, kds, kde, & + ims, ime, jms, jme, kms, kme, & + its, ite, jts, jte, kts, kte real(kind=kind_phys) :: qvs ! !===> ... begin here @@ -937,7 +940,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 6 .or. Model%imp_physics == 15) then + elseif(Model%imp_physics == 15) then if (Model%kdt == 1) then Tbd%phy_f3d(:,:,Model%nleffr) = 10. Tbd%phy_f3d(:,:,Model%nieffr) = 50. @@ -947,12 +950,12 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input call progcld5 (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,tracer1, & ! --- inputs Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & +!mz ntsw-1,ntgl-1, & im, lmk, lmp, Model%icloud,Model%uni_cld, & Model%lmfshal,Model%lmfdeep2, & cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs - + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs elseif(Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP @@ -975,7 +978,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input else ! MYNN PBL or GF convective are not used - call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index 8f7b650dc..03e2bd602 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = GFS_rrtmg_setup type = scheme - dependencies = iounitdef.f,module_bfmicrophysics.f,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f,radlw_main.f,radlw_param.f,radsw_main.f,radsw_param.f + dependencies = iounitdef.f,module_bfmicrophysics.f,physparam.f,radcons.f90,radiation_aerosols.f,radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_surface.f,radlw_main.F90,radlw_param.f,radsw_main.F90,radsw_param.f ######################################################################## [ccpp-arg-table] diff --git a/physics/gfdl_sfc_layer.meta b/physics/gfdl_sfc_layer.meta index 5a245cd69..77024c813 100644 --- a/physics/gfdl_sfc_layer.meta +++ b/physics/gfdl_sfc_layer.meta @@ -1,3 +1,9 @@ +[ccpp-table-properties] + name = gfdl_sfc_layer + type = scheme + dependencies = machine.F,module_sf_exchcoef.f90,namelist_soilveg_ruc.F90,noahmp_tables.f90 + +######################################################################## [ccpp-arg-table] name = gfdl_sfc_layer_init type = scheme @@ -98,7 +104,7 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_loop_extent) type = real kind = kind_phys @@ -107,7 +113,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_loop_extent) type = real kind = kind_phys diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index b9dc9f9da..9f80824f1 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -246,7 +246,7 @@ module module_radiation_clouds public progcld1, progcld2, progcld3, progcld4, progclduni, & & cld_init, progcld5, progcld6, progcld4o, cal_cldfra3, & & find_cloudLayers, adjust_cloudIce, adjust_cloudH2O, & - & adjust_cloudFinal, get_alpha_dcorr, get_alpha_exp + & adjust_cloudFinal, gethml, get_alpha_dcorr, get_alpha_exp ! ================= diff --git a/physics/sfc_noah_wrfv4.meta b/physics/sfc_noah_wrfv4.meta index 781a21d3b..1895c56bf 100644 --- a/physics/sfc_noah_wrfv4.meta +++ b/physics/sfc_noah_wrfv4.meta @@ -1,3 +1,9 @@ +[ccpp-table-properties] + name = sfc_noah_wrfv4 + type = scheme + dependencies = machine.F,module_sf_noahlsm_glacial_only.F90,module_sf_noahlsm.F90 + +######################################################################## [ccpp-arg-table] name = sfc_noah_wrfv4_init type = scheme diff --git a/physics/sfc_noah_wrfv4_interstitial.meta b/physics/sfc_noah_wrfv4_interstitial.meta index e993780fd..b6ebcfe39 100644 --- a/physics/sfc_noah_wrfv4_interstitial.meta +++ b/physics/sfc_noah_wrfv4_interstitial.meta @@ -1,3 +1,9 @@ +[ccpp-table-properties] + name = sfc_noah_wrfv4_pre + type = scheme + dependencies = machine.F + +######################################################################## [ccpp-arg-table] name = sfc_noah_wrfv4_pre_init type = scheme @@ -683,7 +689,13 @@ type = integer intent = out optional = F - + +######################################################################## +[ccpp-table-properties] + name = sfc_noah_wrfv4_post + type = scheme + dependencies = machine.F + ######################################################################## [ccpp-arg-table] name = sfc_noah_wrfv4_post_run From 06b7a076c76d777bce22ba80f817e756041b4a1d Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Wed, 7 Oct 2020 15:08:28 +0000 Subject: [PATCH 364/404] Updated unified_ugwp.meta to include dependencies. --- physics/unified_ugwp.meta | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 038384044..80a4f56d6 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -1,7 +1,10 @@ [ccpp-table-properties] name = unified_ugwp type = scheme - dependencies = machine.F + dependencies = machine.F,cires_ugwp_module.F90,cires_ugwp_module_v1.F90,gwdps.f,drag_suite.F90 + dependencies = cires_ugwp_orolm97_v1.F90,cires_ugwp_triggers_v1.F90,cires_ugwp_solv2_v1_mod.F90 + dependencies = cires_ugwp_module.F90,cires_ugwp_module_v1.F90,cires_ugwp_initialize_v1.F90 + dependencies = cires_ugwp_initialize.F90,cires_orowam2017.F90,cires_vert_orodis_v1.F90 ######################################################################## [ccpp-arg-table] From 94aa9b1ce6b11e01ff526db070c5493ddc71ec4f Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Wed, 7 Oct 2020 18:00:55 +0000 Subject: [PATCH 365/404] Finalized unified_ugwp.meta dependencies --- physics/unified_ugwp.meta | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 80a4f56d6..96eb8b97e 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -3,8 +3,9 @@ type = scheme dependencies = machine.F,cires_ugwp_module.F90,cires_ugwp_module_v1.F90,gwdps.f,drag_suite.F90 dependencies = cires_ugwp_orolm97_v1.F90,cires_ugwp_triggers_v1.F90,cires_ugwp_solv2_v1_mod.F90 - dependencies = cires_ugwp_module.F90,cires_ugwp_module_v1.F90,cires_ugwp_initialize_v1.F90 - dependencies = cires_ugwp_initialize.F90,cires_orowam2017.F90,cires_vert_orodis_v1.F90 + dependencies = cires_ugwp_initialize_v1.F90,cires_ugwp_initialize.F90 + dependencies = cires_orowam2017.F90,cires_vert_orodis_v1.F90,cires_ugwp_utils.F90 + dependencies = cires_ugwp_triggers.F90,cires_ugwp_solvers.F90 ######################################################################## [ccpp-arg-table] From a33954bd628e4fb48643a12e244949e2ab5fd607 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 7 Oct 2020 14:48:40 -0600 Subject: [PATCH 366/404] Change names of phy_f3d variables in physics/GFS_rrtmg_pre.* --- physics/GFS_rrtmg_pre.F90 | 64 ++++++++++++++++++-------------------- physics/GFS_rrtmg_pre.meta | 14 ++++----- 2 files changed, 38 insertions(+), 40 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 5168f113b..1fcdd2a29 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -26,9 +26,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, & lmfdeep2, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & rog, rocp, con_rd, xlat_d, xlat, xlon, coslat, sinlat, tsfc, slmsk, & - prsi, prsl, prslk, tgrs, sfc_wts, phy_f3d_mg_cld, phy_f3d_reffr, & - phy_f3d_cnvw, phy_f3d_cnvc, qgrs, aer_nm, & !inputs from here and above - coszen, coszdg, phy_f3d_leffr, phy_f3d_ieffr, phy_f3d_seffr, & + prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, & + cnvw_in, cnvc_in, qgrs, aer_nm, & !inputs from here and above + coszen, coszdg, effrl_inout, effri_inout, effrs_inout, & clouds1, clouds2, clouds3, clouds4, clouds5, & !in/out from here and above kd, kt, kb, mtopa, mbota, raddt, tsfg, tsfa, de_lgth, alb1d, delp, dz, & !output from here and below plvl, plyr, tlvl, tlyr, qlyr, olyr, gasvmr_co2, gasvmr_n2o, gasvmr_ch4,& @@ -101,18 +101,16 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsl, prslk, & tgrs, sfc_wts, & - phy_f3d_mg_cld, & - phy_f3d_reffr, & - phy_f3d_cnvw, & - phy_f3d_cnvc + mg_cld, effrr_in, & + cnvw_in, cnvc_in real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs, aer_nm real(kind=kind_phys), dimension(:), intent(inout) :: coszen, coszdg - real(kind=kind_phys), dimension(:,:), intent(inout) :: phy_f3d_leffr, & - phy_f3d_ieffr, & - phy_f3d_seffr + real(kind=kind_phys), dimension(:,:), intent(inout) :: effrl_inout, & + effri_inout, & + effrs_inout real(kind=kind_phys), dimension(im,lm+LTP), intent(inout) :: clouds1, & clouds2, clouds3, & clouds4, clouds5 @@ -683,18 +681,18 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & do k=1,lm k1 = k + kd do i=1,im - cldcov(i,k1) = phy_f3d_mg_cld(i,k) - effrl(i,k1) = phy_f3d_leffr(i,k) - effri(i,k1) = phy_f3d_ieffr(i,k) - effrr(i,k1) = phy_f3d_reffr(i,k) - effrs(i,k1) = phy_f3d_seffr(i,k) + cldcov(i,k1) = mg_cld(i,k) + effrl(i,k1) = effrl_inout(i,k) + effri(i,k1) = effri_inout(i,k) + effrr(i,k1) = effrr_in(i,k) + effrs(i,k1) = effrs_inout(i,k) enddo enddo else do k=1,lm k1 = k + kd do i=1,im - cldcov(i,k1) = phy_f3d_mg_cld(i,k) + cldcov(i,k1) = mg_cld(i,k) enddo enddo endif @@ -720,10 +718,10 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & do k=1,lm k1 = k + kd do i=1,im - effrl(i,k1) = phy_f3d_leffr(i,k) - effri(i,k1) = phy_f3d_ieffr(i,k) - effrr(i,k1) = phy_f3d_reffr(i,k) - effrs(i,k1) = phy_f3d_seffr(i,k) + effrl(i,k1) = effrl_inout(i,k) + effri(i,k1) = effri_inout(i,k) + effrr(i,k1) = effrr_in(i,k) + effrs(i,k1) = effrs_inout(i,k) ! if(me==0) then ! if(effrl(i,k1)> 5.0) then ! write(6,*) 'rad driver:cloud radii:',kdt, i,k1, & @@ -783,9 +781,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & do k=1,lm k1 = k + kd do i=1,im - phy_f3d_leffr(i,k) = effrl(i,k1) - phy_f3d_ieffr(i,k) = effri(i,k1) - phy_f3d_seffr(i,k) = effrs(i,k1) + effrl_inout(i,k) = effrl(i,k1) + effri_inout(i,k) = effri(i,k1) + effrs_inout(i,k) = effrs(i,k1) enddo enddo else ! all other cases @@ -806,8 +804,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & !GJF: this is not consistent with GFS_typedefs, ! but it looks like the Zhao-Carr-PDF scheme is not in the CCPP deltaq(i,k1) = 0.0!Tbd%phy_f3d(i,k,5) !GJF: this variable is not in phy_f3d anymore - cnvw (i,k1) = phy_f3d_cnvw(i,k) - cnvc (i,k1) = phy_f3d_cnvc(i,k) + cnvw (i,k1) = cnvw_in(i,k) + cnvc (i,k1) = cnvc_in(i,k) enddo enddo elseif ((npdf3d == 0) .and. (ncnvcld3d == 1)) then ! same as imp_physics=99 @@ -815,7 +813,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & k1 = k + kd do i=1,im deltaq(i,k1) = 0.0 - cnvw (i,k1) = phy_f3d_cnvw(i,k) + cnvw (i,k1) = cnvw_in(i,k) cnvc (i,k1) = 0.0 enddo enddo @@ -904,9 +902,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & elseif(imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_fer_hires) then if (kdt == 1) then - phy_f3d_leffr(:,:) = 10. - phy_f3d_ieffr(:,:) = 50. - phy_f3d_seffr(:,:) = 250. + effrl_inout(:,:) = 10. + effri_inout(:,:) = 50. + effrs_inout(:,:) = 250. endif call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs @@ -914,8 +912,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, & - cldcov(:,1:LMK),phy_f3d_leffr(:,:), & - phy_f3d_ieffr(:,:), phy_f3d_seffr(:,:), & + cldcov(:,1:LMK),effrl_inout(:,:), & + effri_inout(:,:), effrs_inout(:,:), & dzb, xlat_d, julian, yearlen, & clouds,cldsa,mtopa,mbota, de_lgth, alpha) ! --- outputs @@ -946,8 +944,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, & - cldcov(:,1:LMK), phy_f3d_leffr(:,:), & - phy_f3d_ieffr(:,:), phy_f3d_seffr(:,:), & + cldcov(:,1:LMK), effrl_inout(:,:), & + effri_inout(:,:), effrs_inout(:,:), & dzb, xlat_d, julian, yearlen, & clouds, cldsa, mtopa ,mbota, de_lgth, alpha) ! --- outputs endif ! MYNN PBL or GF diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index e9b301d33..0ffa78ee5 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -617,7 +617,7 @@ kind = kind_phys intent = in optional = F -[phy_f3d_mg_cld] +[mg_cld] standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac @@ -626,7 +626,7 @@ kind = kind_phys intent = in optional = F -[phy_f3d_reffr] +[effrr_in] standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um long_name = effective radius of cloud rain particle in micrometers units = um @@ -635,7 +635,7 @@ kind = kind_phys intent = in optional = F -[phy_f3d_cnvw] +[cnvw_in] standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 @@ -644,7 +644,7 @@ kind = kind_phys intent = in optional = F -[phy_f3d_cnvc] +[cnvc_in] standard_name = convective_cloud_cover_in_phy_f3d long_name = convective cloud cover in the phy_f3d array units = frac @@ -689,7 +689,7 @@ kind = kind_phys intent = inout optional = F -[phy_f3d_leffr] +[effrl_inout] standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer units = um @@ -698,7 +698,7 @@ kind = kind_phys intent = inout optional = F -[phy_f3d_ieffr] +[effri_inout] standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer units = um @@ -707,7 +707,7 @@ kind = kind_phys intent = inout optional = F -[phy_f3d_seffr] +[effrs_inout] standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometers units = um From d6cd89caf61195be12d480ef0c1b6c03ea48cadc Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Thu, 8 Oct 2020 03:20:40 +0000 Subject: [PATCH 367/404] Another unified_ugwp.meta bugfix --- physics/unified_ugwp.meta | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 96eb8b97e..28aa196d3 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -1,11 +1,13 @@ [ccpp-table-properties] name = unified_ugwp type = scheme - dependencies = machine.F,cires_ugwp_module.F90,cires_ugwp_module_v1.F90,gwdps.f,drag_suite.F90 - dependencies = cires_ugwp_orolm97_v1.F90,cires_ugwp_triggers_v1.F90,cires_ugwp_solv2_v1_mod.F90 - dependencies = cires_ugwp_initialize_v1.F90,cires_ugwp_initialize.F90 - dependencies = cires_orowam2017.F90,cires_vert_orodis_v1.F90,cires_ugwp_utils.F90 - dependencies = cires_ugwp_triggers.F90,cires_ugwp_solvers.F90 + dependencies = machine.F,cires_ugwp_module.F90,ugwp_driver_v0.F,cires_ugwp_triggers.F90 + dependencies = cires_ugwp_initialize.F90,cires_ugwp_solvers.F90,cires_ugwp_utils.F90 + dependencies = cires_orowam2017.f,cires_vert_lsatdis.F90,cires_vert_orodis.F90 + dependencies = cires_vert_wmsdis.F90,cires_ugwp_module_v1.F90,cires_ugwp_triggers_v1.F90 + dependencies = cires_ugwp_initialize_v1.F90,cires_ugwp_solv2_v1_mod.F90 + dependencies = cires_ugwp_orolm97_v1.F90,cires_orowam2017.F90,cires_vert_orodis_v1.F90 + dependencies = gwdps.f,drag_suite.F90 ######################################################################## [ccpp-arg-table] From 2ad28e61cf226a86dc006fceeec1130f1f629094 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 10 Oct 2020 15:08:54 -0600 Subject: [PATCH 368/404] Apply boundds to znt_ocn in physics/gfdl_sfc_layer.F90 before trying to divide by it --- physics/gfdl_sfc_layer.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/physics/gfdl_sfc_layer.F90 b/physics/gfdl_sfc_layer.F90 index 6bd969ac3..b74d16161 100644 --- a/physics/gfdl_sfc_layer.F90 +++ b/physics/gfdl_sfc_layer.F90 @@ -617,6 +617,9 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & !GJF: or WRF module_sf_gfdl.F: !tstrc(i) = tskin_ocn(i) + ! DH* 20201009: these bounds on ocean roughness lengths are from Chunxi Zhang's module_sf_sfclayrev.f90 (in cm) + znt_ocn(i)=min(2.85e-1,max(znt_ocn(i),1.27e-5)) + !GJF: from WRF's module_sf_gfdl.F if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then wind10(i)=wspd(i)*alog(10.0/(0.01*znt_ocn(i)))/alog(z1(i)/(0.01*znt_ocn(i))) From fce80a170a02f85c0ced5412768a5badb2090133 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 10 Oct 2020 15:14:54 -0600 Subject: [PATCH 369/404] physics/module_mp_thompson.F90: adjust lower bounds of cloud effective radii to work with HWRF RRTMG settings --- physics/module_mp_thompson.F90 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 304afc6d5..5c2a2acb5 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -1452,17 +1452,17 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & IF (has_reqc.ne.0 .and. has_reqi.ne.0 .and. has_reqs.ne.0) THEN do k = kts, kte - re_qc1d(k) = 2.49E-6 - re_qi1d(k) = 4.99E-6 - re_qs1d(k) = 9.99E-6 + re_qc1d(k) = 2.50E-6 ! 2.49E-6 + re_qi1d(k) = 5.00E-6 ! 4.99E-6 + re_qs1d(k) = 1.00E-5 ! 9.99E-6 enddo !> - Call calc_effectrad() call calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & re_qc1d, re_qi1d, re_qs1d, kts, kte) do k = kts, kte - re_cloud(i,k,j) = MAX(2.49E-6, MIN(re_qc1d(k), 50.E-6)) - re_ice(i,k,j) = MAX(4.99E-6, MIN(re_qi1d(k), 125.E-6)) - re_snow(i,k,j) = MAX(9.99E-6, MIN(re_qs1d(k), 999.E-6)) + re_cloud(i,k,j) = MAX(2.50E-6, MIN(re_qc1d(k), 50.E-6)) ! MAX(2.49E-6, MIN(re_qc1d(k), 50.E-6)) + re_ice(i,k,j) = MAX(5.00E-6, MIN(re_qi1d(k), 125.E-6)) ! MAX(4.99E-6, MIN(re_qi1d(k), 125.E-6)) + re_snow(i,k,j) = MAX(1.00E-5, MIN(re_qs1d(k), 999.E-6)) ! MAX(9.99E-6, MIN(re_qs1d(k), 999.E-6)) enddo ENDIF @@ -5277,9 +5277,9 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & ! as before this change, use the WRF v3.8.1 settings throughout. #if 1 !ifdef WRF381 - re_qc1d(:) = 2.49E-6 - re_qi1d(:) = 4.99E-6 - re_qs1d(:) = 9.99E-6 + re_qc1d(:) = 2.50E-6 ! 2.49E-6 + re_qi1d(:) = 5.00E-6 ! 4.99E-6 + re_qs1d(:) = 1.00E-5 ! 9.99E-6 #else re_qc1d(:) = 2.49E-6 re_qi1d(:) = 2.49E-6 @@ -5375,7 +5375,7 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, & smoc = a_ * smo2**b_ #if 1 !ifdef WRF381 - re_qs1d(k) = MAX(10.E-6, MIN(0.5*(smoc/smob), 999.E-6)) + re_qs1d(k) = MAX(1.01E-5, MIN(0.5*(smoc/smob), 999.E-6)) #else re_qs1d(k) = MAX(5.01E-6, MIN(0.5*(smoc/smob), 999.E-6)) #endif From 030dcfd2cb3fd95a38c7f720d300af13543e635c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 10 Oct 2020 15:17:00 -0600 Subject: [PATCH 370/404] Add CCPP dependencies to physics/radlw_main.meta and physics/radsw_main.meta; remove trailing whitespaces in physics/mp_fer_hires.F90 --- physics/mp_fer_hires.F90 | 46 ++++++++++++++++++++-------------------- physics/radlw_main.meta | 2 +- physics/radsw_main.meta | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/physics/mp_fer_hires.F90 b/physics/mp_fer_hires.F90 index cebf53b74..576f7fdab 100644 --- a/physics/mp_fer_hires.F90 +++ b/physics/mp_fer_hires.F90 @@ -1,9 +1,9 @@ !>\file mp_fer_hires.F90 -!! This file contains the Ferrier-Aligo microphysics scheme driver. +!! This file contains the Ferrier-Aligo microphysics scheme driver. ! module mp_fer_hires - + use machine, only : kind_phys use module_mp_fer_hires, only : ferrier_init_hr, FER_HIRES, & @@ -12,11 +12,11 @@ module mp_fer_hires implicit none public :: mp_fer_hires_init, mp_fer_hires_run, mp_fer_hires_finalize - + private logical :: is_initialized = .False. - + ! * T_ICE - temperature (C) threshold at which all remaining liquid water ! is glaciated to ice ! * T_ICE_init - maximum temperature (C) at which ice nucleation occurs @@ -66,7 +66,7 @@ subroutine mp_fer_hires_init(ncol, nlev, dtp, imp_physics, & ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 - + if (is_initialized) return ! Set internal dimensions @@ -74,7 +74,7 @@ subroutine mp_fer_hires_init(ncol, nlev, dtp, imp_physics, & ime = ncol lm = nlev - ! MZ* temporary + ! MZ* temporary if (mpirank==mpiroot) then write(0,*) ' -----------------------------------------------' write(0,*) ' --- !!! WARNING !!! ---' @@ -90,9 +90,9 @@ subroutine mp_fer_hires_init(ncol, nlev, dtp, imp_physics, & errflg = 1 return end if - + !MZ: fer_hires_init() in HWRF - if (mpirank==mpiroot) write (0,*) 'F-A: F_ICE,F_RAIN AND F_RIMEF IS REINITIALIZED' + if (mpirank==mpiroot) write (0,*) 'F-A: F_ICE, F_RAIN AND F_RIMEF ARE REINITIALIZED' DO K = 1,lm DO I= ims,ime F_ICE(i,k)=0. @@ -101,16 +101,16 @@ subroutine mp_fer_hires_init(ncol, nlev, dtp, imp_physics, & ENDDO ENDDO !MZ: fer_hires_init() in HWRF - + if (mpirank==mpiroot) write (0,*) 'F-A: calling FERRIER_INIT_HR ...' CALL FERRIER_INIT_HR(dtp,mpicomm,mpirank,mpiroot,threads,errmsg,errflg) if (mpirank==mpiroot) write (0,*)'F-A: FERRIER_INIT_HR finished ...' if (errflg /= 0 ) return - + is_initialized = .true. - + end subroutine mp_fer_hires_init !>\defgroup hafs_famp HWRF Ferrier-Aligo Microphysics Scheme @@ -124,8 +124,8 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ,T,Q,CWM & ,TRAIN,SR & ,F_ICE,F_RAIN,F_RIMEF & - ,QC,QR,QI,QG & - ,PREC & + ,QC,QR,QI,QG & + ,PREC & ,mpirank, mpiroot, threads & ,refl_10cm & ,RHGRD,dx & @@ -162,7 +162,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & real(kind_phys), intent(inout) :: train(1:ncol,1:nlev) real(kind_phys), intent(out ) :: sr(1:ncol) real(kind_phys), intent(inout) :: f_ice(1:ncol,1:nlev) - real(kind_phys), intent(inout) :: f_rain(1:ncol,1:nlev) + real(kind_phys), intent(inout) :: f_rain(1:ncol,1:nlev) real(kind_phys), intent(inout) :: f_rimef(1:ncol,1:nlev) real(kind_phys), intent(inout) :: qc(1:ncol,1:nlev) real(kind_phys), intent(inout) :: qr(1:ncol,1:nlev) @@ -205,7 +205,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & write(errmsg, fmt='((a))') 'mp_fer_hires_run called before mp_fer_hires_init' errflg = 1 return - end if + end if ! Set internal dimensions ims = 1 @@ -248,7 +248,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !----------------------------------------------------------------------- ! DO K=LM,1,-1 !mz* We are moving down from the top in the flipped arrays - + !*** CALL MICROPHYSICS !MZ* in HWRF @@ -274,8 +274,8 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !--------------------------------------------------------------------- !aligo - DO K = 1, LM - DO I= IMS, IME + DO K = 1, LM + DO I= IMS, IME cwm(i,k) = cwm(i,k)/(1.0_kind_phys-q(i,k)) qr(i,k) = qr(i,k)/(1.0_kind_phys-q(i,k)) qi(i,k) = qi(i,k)/(1.0_kind_phys-q(i,k)) @@ -284,7 +284,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ENDDO !aligo !--------------------------------------------------------------------- - + CALL FER_HIRES( & DT=DT,RHgrd=RHGRD & ,PRSI=prsi,P_PHY=p_phy,T_PHY=t & @@ -311,7 +311,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & qi(i,k) = qi(i,k)/(1.0_kind_phys+q(i,k)) qr(i,k) = qr(i,k)/(1.0_kind_phys+q(i,k)) ENDDO - ENDDO + ENDDO !----------------------------------------------------------- DO K=1,LM @@ -321,7 +321,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & !*** Calculate graupel from total ice array and rime factor !--------------------------------------------------------------------- -!MZ +!MZ IF (SPEC_ADV) then QG(I,K)=QI(I,K)*F_RIMEF(I,K) ENDIF @@ -345,7 +345,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & DO I=IMS,IME PCPCOL=RAINNCV(I)*1.E-3 !MZ:unit:m PREC(I)=PREC(I)+PCPCOL -!MZ ACPREC(I)=ACPREC(I)+PCPCOL !MZ: not used +!MZ ACPREC(I)=ACPREC(I)+PCPCOL !MZ: not used ! ! NOTE: RAINNC IS ACCUMULATED INSIDE MICROPHYSICS BUT NMM ZEROES IT OUT ABOVE ! SINCE IT IS ONLY A LOCAL ARRAY FOR NOW @@ -353,7 +353,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & ENDDO !----------------------------------------------------------------------- ! - end subroutine mp_fer_hires_run + end subroutine mp_fer_hires_run !> \section arg_table_mp_fer_hires_finalize Argument Table diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index d857f665b..ef7d72c9b 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmg_lw type = scheme - dependencies = mersenne_twister.f,physcons.F90,physparam.f,radlw_datatb.f,radlw_param.f + dependencies = mersenne_twister.f,physcons.F90,physparam.f,radlw_datatb.f,radlw_param.f,HWRF_mcica_random_numbers.F90,HWRF_mersenne_twister.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 9a8b1ce91..d32688ad1 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = rrtmg_sw type = scheme - dependencies = mersenne_twister.f,physcons.F90,physparam.f,radsw_datatb.f,radsw_param.f + dependencies = mersenne_twister.f,physcons.F90,physparam.f,radsw_datatb.f,radsw_param.f,HWRF_mcica_random_numbers.F90,HWRF_mersenne_twister.F90 ######################################################################## [ccpp-arg-table] From 3c012843dc5626377313af4748d29e6facc923dd Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 10 Oct 2020 15:17:24 -0600 Subject: [PATCH 371/404] Bugfix in physics/samfdeepcnv.f for uninitialized variable crtlame --- physics/samfdeepcnv.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 67576af15..47ffbb1c3 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -423,10 +423,10 @@ subroutine samfdeepcnv_run (im,km,itc,ntc,cliq,cp,cvap, & cxlamu = 1.0e-3 else aafac = .05 - crtlame = 1.0e-4 cxlame = 1.0e-4 endif crtlamd = 1.0e-4 + crtlame = 1.0e-4 cxlamd = 1.0e-4 xlamde = 1.0e-4 xlamdd = 1.0e-4 From afa335fcaaee3722183056165cfd240153f5dfa6 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 10 Oct 2020 15:19:19 -0600 Subject: [PATCH 372/404] physics/module_MP_FER_HIRES.F90: bugfixes for MPI calls in init routine --- physics/module_MP_FER_HIRES.F90 | 65 +++++++++++++++------------------ 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/physics/module_MP_FER_HIRES.F90 b/physics/module_MP_FER_HIRES.F90 index 776898f93..092a2f941 100644 --- a/physics/module_MP_FER_HIRES.F90 +++ b/physics/module_MP_FER_HIRES.F90 @@ -2405,7 +2405,7 @@ END SUBROUTINE EGCP01COLUMN_hr !----------------------------------------------------------------------- !>\ingroup hafs_famp - SUBROUTINE FERRIER_INIT_hr (GSMDT,MPI_COMM_COMP,MYPE,mpiroot,THREADS, & + SUBROUTINE FERRIER_INIT_hr (GSMDT,MPI_COMM_COMP,MPIRANK,MPIROOT,THREADS, & errmsg,errflg) !----------------------------------------------------------------------- !------------------------------------------------------------------------------- @@ -2463,7 +2463,7 @@ SUBROUTINE FERRIER_INIT_hr (GSMDT,MPI_COMM_COMP,MYPE,mpiroot,THREADS, & ! ! VARIABLES PASSED IN REAL, INTENT(IN) :: GSMDT - INTEGER, INTENT(IN) :: MYPE + INTEGER, INTENT(IN) :: MPIRANK INTEGER, INTENT(IN) :: MPIROOT INTEGER, INTENT(IN) :: MPI_COMM_COMP INTEGER, INTENT(IN) :: THREADS @@ -2479,21 +2479,18 @@ SUBROUTINE FERRIER_INIT_hr (GSMDT,MPI_COMM_COMP,MYPE,mpiroot,THREADS, & LOGICAL :: opened INTEGER :: IRTN,rc CHARACTER*80 errmess - INTEGER :: mpi_communicator,ierr - INTEGER :: good + INTEGER :: ierr, good LOGICAL :: lexist,lopen, force_read_ferhires ! !----------------------------------------------------------------------- ! - ! Assign mpicomm to module variable - mpi_communicator= mpi_comm_comp - DTPH=GSMDT !-- Time step in s + DTPH=GSMDT !-- Time step in s ! !--- Create lookup tables for saturation vapor pressure w/r/t water & ice ! - CALL GPVS_hr + CALL GPVS_hr ! !zhang: if (.NOT. ALLOCATED(ventr1)) ALLOCATE(ventr1(MDRmin:MDRmax)) @@ -2509,16 +2506,15 @@ SUBROUTINE FERRIER_INIT_hr (GSMDT,MPI_COMM_COMP,MYPE,mpiroot,THREADS, & if (.NOT. ALLOCATED(vsnowi)) ALLOCATE(vsnowi(MDImin:MDImax)) if (.NOT. ALLOCATED(vel_rf)) ALLOCATE(vel_rf(2:9,0:Nrime)) +#ifdef MPI + call MPI_BARRIER(MPI_COMM_COMP,ierr) +#endif - + only_root_reads: if (MPIRANK==MPIROOT) then force_read_ferhires = .true. good = 0 INQUIRE(FILE="DETAMPNEW_DATA.expanded_rain_LE",EXIST=lexist) -#ifdef MPI - call MPI_BARRIER(mpi_communicator,ierr) -#endif - IF (lexist) THEN OPEN(63,FILE="DETAMPNEW_DATA.expanded_rain_LE", & & FORM="UNFORMATTED",STATUS="OLD",ERR=1234) @@ -2543,17 +2539,19 @@ SUBROUTINE FERRIER_INIT_hr (GSMDT,MPI_COMM_COMP,MYPE,mpiroot,THREADS, & INQUIRE(63,opened=lopen) IF (lopen) THEN IF( force_read_ferhires ) THEN - write(0,*) "Error reading DETAMPNEW_DATA.expanded_rain_LE. Aborting because force_read_ferhires is .true." + errmsg = "Error reading DETAMPNEW_DATA.expanded_rain_LE. Aborting because force_read_ferhires is .true." + errflg = 1 return ENDIF CLOSE(63) ELSE IF( force_read_ferhires ) THEN - write(0,*) "Error opening DETAMPNEW_DATA.expanded_rain_LE. Aborting because force_read_ferhires is .true." + errmsg = "Error opening DETAMPNEW_DATA.expanded_rain_LE. Aborting because force_read_ferhires is .true." + errflg = 1 return ENDIF ENDIF - ELSE + ELSE INQUIRE(63,opened=lopen) IF (lopen) THEN CLOSE(63) @@ -2561,25 +2559,26 @@ SUBROUTINE FERRIER_INIT_hr (GSMDT,MPI_COMM_COMP,MYPE,mpiroot,THREADS, & ENDIF ELSE IF( force_read_ferhires ) THEN - write(0,*) "Non-existent DETAMPNEW_DATA.expanded_rain_LE. Aborting because force_read_ferhires is .true." + errmsg = "Non-existent DETAMPNEW_DATA.expanded_rain_LE. Aborting because force_read_ferhires is .true." + errflg = 1 return ENDIF ENDIF - + endif only_root_reads ! #ifdef MPI - CALL MPI_BCAST(VENTR1,SIZE(VENTR1),MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(VENTR2,SIZE(VENTR2),MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(ACCRR,SIZE(ACCRR) ,MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(MASSR,SIZE(MASSR) ,MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(VRAIN,SIZE(VRAIN) ,MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(RRATE,SIZE(RRATE) ,MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(VENTI1,SIZE(VENTI1),MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(VENTI2,SIZE(VENTI2),MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(ACCRI,SIZE(ACCRI) ,MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(MASSI,SIZE(MASSI) ,MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(VSNOWI,SIZE(VSNOWI),MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) - CALL MPI_BCAST(VEL_RF,SIZE(VEL_RF),MPI_DOUBLE_PRECISION,0,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(VENTR1,SIZE(VENTR1),MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(VENTR2,SIZE(VENTR2),MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(ACCRR, SIZE(ACCRR), MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(MASSR, SIZE(MASSR), MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(VRAIN, SIZE(VRAIN), MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(RRATE, SIZE(RRATE), MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(VENTI1,SIZE(VENTI1),MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(VENTI2,SIZE(VENTI2),MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(ACCRI, SIZE(ACCRI), MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(MASSI, SIZE(MASSI), MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(VSNOWI,SIZE(VSNOWI),MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) + CALL MPI_BCAST(VEL_RF,SIZE(VEL_RF),MPI_DOUBLE_PRECISION,MPIROOT,MPI_COMM_COMP,IRTN) #endif ! @@ -2721,12 +2720,6 @@ SUBROUTINE FERRIER_INIT_hr (GSMDT,MPI_COMM_COMP,MYPE,mpiroot,THREADS, & RETURN ! -!----------------------------------------------------------------------- -! -9061 CONTINUE - WRITE(0,*)' module_mp_etanew: error opening ETAMPNEW_DATA.expanded_rain on unit ',etampnew_unit1 - STOP -! !----------------------------------------------------------------------- END SUBROUTINE FERRIER_INIT_hr ! From b871fb9287a13bdef8047ee143e700e49a369a82 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 10 Oct 2020 15:34:31 -0600 Subject: [PATCH 373/404] Remove trailing whitespaces from physics/gfdl_sfc_layer.F90 --- physics/gfdl_sfc_layer.F90 | 366 ++++++++++++++++++------------------- 1 file changed, 183 insertions(+), 183 deletions(-) diff --git a/physics/gfdl_sfc_layer.F90 b/physics/gfdl_sfc_layer.F90 index b74d16161..93e38c982 100644 --- a/physics/gfdl_sfc_layer.F90 +++ b/physics/gfdl_sfc_layer.F90 @@ -16,57 +16,57 @@ module gfdl_sfc_layer !> \section arg_table_gfdl_sfc_layer_init Argument Table !! \htmlinclude gfdl_sfc_layer_init.html -!! +!! subroutine gfdl_sfc_layer_init (icoef_sf, cplwav, cplwav2atm, lcurr_sf, & pert_cd, ntsflg, errmsg, errflg) - + implicit none - + integer, intent(in) :: icoef_sf, ntsflg logical, intent(in) :: cplwav, cplwav2atm, lcurr_sf, pert_cd - + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - + #if HWRF==1 write(errmsg,'(*(a))') 'The GFDL surface layer scheme does not support '& //'use of the HWRF preprocessor flag in gfdl_sfc_layer.F90' errflg = 1 return -#endif - +#endif + if (icoef_sf < 0 .or. icoef_sf > 8) then write(errmsg,'(*(a))') 'The value of icoef_sf is outside of the ' & //'supported range (0-8) in gfdl_sfc_layer.F90' errflg = 1 return end if - + if (cplwav .or. cplwav2atm) then write(errmsg,'(*(a))') 'The GFDL surface layer scheme is not set up ' & //'to be coupled to waves in gfdl_sfc_layer.F90' errflg = 1 return end if - + if (lcurr_sf) then write(errmsg,'(*(a))') 'The GFDL surface layer scheme is not set up ' & //'to be used with the lcurr_sf option in gfdl_sfc_layer.F90' errflg = 1 return end if - + if (pert_cd) then write(errmsg,'(*(a))') 'The GFDL surface layer scheme is not set up ' & //'to be used with the pert_cd option in gfdl_sfc_layer.F90' errflg = 1 return end if - + if (ntsflg > 0) then !GJF: In order to enable ntsflg > 0, the variable 'tstrc' passed into MFLUX2 should be set ! to the surface_skin_temperature_over_X_interstitial rather than the average of it and @@ -75,8 +75,8 @@ subroutine gfdl_sfc_layer_init (icoef_sf, cplwav, cplwav2atm, lcurr_sf, & //' in gfdl_sfc_layer.F90' errflg = 1 return - end if - + end if + !GJF: Initialization notes: In WRF, the subroutine module_sf_myjsfc/myjsfcinit ! is called for initialization of the GFDL surface layer scheme from ! the module_physics_init subroutine. It contains the following @@ -90,7 +90,7 @@ subroutine gfdl_sfc_layer_init (icoef_sf, cplwav, cplwav2atm, lcurr_sf, & ! ENDDO ! ENDIF !also initialize surface roughness length - + end subroutine gfdl_sfc_layer_init subroutine gfdl_sfc_layer_finalize () @@ -99,7 +99,7 @@ end subroutine gfdl_sfc_layer_finalize !> \section arg_table_gfdl_sfc_layer_run Argument Table !! \htmlinclude gfdl_sfc_layer_run.html !! - subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & + subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & lsm_noah, lsm_noahmp, lsm_ruc, lsm_noah_wrfv4, icoef_sf, cplwav, & cplwav2atm, lcurr_sf, pert_Cd, ntsflg, sfenth, z1, shdmax, ivegsrc, & vegtype, sigmaf, dt, wet, dry, icy, isltyp, rd, grav, ep1, ep2, smois, & @@ -110,9 +110,9 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & fm_ocn, fm_lnd, fm_ice, fh_ocn, fh_lnd, fh_ice, fh2_ocn, fh2_lnd, & fh2_ice, ch_ocn, ch_lnd, ch_ice, fm10_ocn, fm10_lnd, fm10_ice, qss_ocn, & qss_lnd, qss_ice, errmsg, errflg) - + use funcphys, only: fpvs - + !#### GJF: temporarily grab parameters from LSM-specific modules -- should go through CCPP #### ! (fixing this involves replacing the functionality of set_soilveg and namelist_soilveg) use namelist_soilveg, only: maxsmc_noah => maxsmc, drysmc_noah => drysmc @@ -120,7 +120,7 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & use noahmp_tables, only: maxsmc_noahmp => smcmax_table, drysmc_noahmp => smcdry_table use module_sf_noahlsm, only: maxsmc_noah_wrfv4 => maxsmc, drysmc_noah_wrfv4 => drysmc !################################################################################################ - + implicit none integer, intent(in) :: im, nsoil, km, ivegsrc @@ -138,53 +138,53 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & real(kind=kind_phys), dimension(im), intent(in) :: psfc, prsl1, & q1, t1, u1, v1, wspd, u10, v10, gsw, glw, z1, shdmax, sigmaf, xlat, & xlon, tsurf_ocn, tsurf_lnd, tsurf_ice - - real(kind=kind_phys), intent(inout), dimension(im) :: tskin_ocn, & + + real(kind=kind_phys), intent(inout), dimension(im) :: tskin_ocn, & tskin_lnd, tskin_ice, ustar_ocn, ustar_lnd, ustar_ice, & znt_ocn, znt_lnd, znt_ice, cdm_ocn, cdm_lnd, cdm_ice, & stress_ocn, stress_lnd, stress_ice, rib_ocn, rib_lnd, rib_ice, & fm_ocn, fm_lnd, fm_ice, fh_ocn, fh_lnd, fh_ice, fh2_ocn, fh2_lnd, & fh2_ice, ch_ocn, ch_lnd, ch_ice, fm10_ocn, fm10_lnd, fm10_ice, & qss_ocn, qss_lnd, qss_ice - + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - + !local variables - + integer :: i, its, ite, ims, ime - + logical :: ch_bound_excursion - + !GJF: the vonKarman constant should come in through the CCPP and be defined by the host model real (kind=kind_phys), parameter :: karman = 0.4 real (kind=kind_phys), parameter :: log01=log(0.01), log05=log(0.05), & log07=log(0.07) - + !GJF: if the following variables will be used, they should be turned into intent(in) namelist options integer :: iwavecpl, ens_random_seed, issflx logical :: diag_wind10m, diag_qss real(kind=kind_phys) :: ens_Cdamp - + real(kind=kind_phys), dimension(im) :: wetc, pspc, pkmax, tstrc, upc, & vpc, mznt, slwdc, wind10, qfx, qgh, zkmax, z1_cm, z0max, ztmax real(kind=kind_phys), dimension(im) :: u10_lnd, u10_ocn, u10_ice, & v10_lnd, v10_ocn, v10_ice - + !GJF: the following variables are identified as: !"SCURX" "Surface Currents(X)" "m s-1" !"SCURY" "Surface Currents(Y)" "m s-1 !"CHARN" "Charnock Coeff" " " !"MSANG" "Wind/Stress Angle" "Radian" real(kind=kind_phys), dimension(im) :: charn, msang, scurx, scury - + real(kind=kind_phys), dimension(im) :: fxh, fxe, fxmx, fxmy, xxfh, & xxfh2, tzot real(kind=kind_phys), dimension(1:30) :: maxsmc, drysmc real(kind=kind_phys) :: smcmax, smcdry, zhalf, cd10, & esat, fm_lnd_old, fh_lnd_old, tem1, tem2, czilc, cd_low_limit, & cd_high_limit, ch_low_limit, ch_high_limit, fh2_fh_ratio - + !#### This block will become unnecessary when maxsmc and drysmc come through the CCPP #### if (lsm == lsm_noah) then maxsmc = maxsmc_noah @@ -215,88 +215,88 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000/ end if !######################################################################## - - !GJF: This code has not been tested with iwavecpl = 1; the variables 'charn' and 'msang' (and others?) need to be input in order to use this + + !GJF: This code has not been tested with iwavecpl = 1; the variables 'charn' and 'msang' (and others?) need to be input in order to use this ! if (cplwav .or. cplwav2atm) then ! iwavecpl = 1 ! else ! iwavecpl = 0 ! end if iwavecpl = 0 - + !GJF: temporary setting of variables that should be moved to namelist is they are used ens_random_seed = 0 !used for HWRF ensemble? ens_Cdamp = 0.0 !used for HWRF ensemble? issflx = 0 !GJF: 1 = calculate surface fluxes, 0 = don't - diag_wind10m = .false. !GJF: if one wants 10m wind speeds to come from this scheme, set this to True, + diag_wind10m = .false. !GJF: if one wants 10m wind speeds to come from this scheme, set this to True, ! put [u,v]10_[lnd/ocn/ice] in the scheme argument list (and metadata), and modify ! GFS_surface_compsites to receive the individual components and calculate an all-grid value diag_qss = .false. !GJF: saturation specific humidities are calculated by LSM, sea surface, and sea ice schemes in ! GFS-based suites - + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - + its = 1 ims = 1 ite = im ime = im - + do i=its, ite if (flag_iter(i)) then !GJF: Perform data preparation that is the same for all surface types - + pspc(i) = psfc(i)*10. ! convert from Pa to cgs pkmax(i) = prsl1(i)*10. ! convert from Pa to cgs upc(i) = u1(i)*100. ! convert from m s-1 to cm s-1 vpc(i) = v1(i)*100. ! convert from m s-1 to cm s-1 - + !Wang: use previous u10 v10 to compute wind10, input to MFLUX2 to compute z0 (for first time step, u10 and v10 may be zero) wind10(i)=sqrt(u10(i)*u10(i)+v10(i)*v10(i)) !m s-1 - + !Wang: calulate height of the first half level ! if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then ! zhalf = -rd*t1(i)*alog(pkmax(i)/pspc(i))/grav !m ! endif - + !GJF: rather than calculate the height of the first half level, if it is precalculated ! in a different scheme, pass it in and use it; note that in FV3, calculating via the hypsometric equation ! occasionally produced values much shallower than those passed in !zkmax(i) = -rd*t1(i)*alog(pkmax(i)/pspc(i))/grav !m zkmax(i) = z1(i) z1_cm(i) = 100.0*z1(i) - + !GJF: these drag coefficient limits were suggested by Chunxi Zhang via his module_sf_sfclayrev.f90 cd_low_limit = 1.0e-5/zkmax(i) cd_high_limit = 0.1 - !GJF: use the lower of 0.1 from Chunxi Zhang or 0.05/wspd from WRF's module_sf_gfdl.F + !GJF: use the lower of 0.1 from Chunxi Zhang or 0.05/wspd from WRF's module_sf_gfdl.F ! (this will always be the latter if wspd has a minimum of 1.0 m s-1 from above) ch_low_limit = cd_low_limit ch_high_limit = min(0.1,0.05/wspd(i)) - + !slwdc... GFDL downward net flux in units of cal/(cm**2/min) !also divide by 10**4 to convert from /m**2 to /cm**2 slwdc(i)=gsw(i)+glw(i) slwdc(i)=0.239*60.*slwdc(i)*1.e-4 - + !GJF: these variables should be passed in if these options are used charn(i) = 0.0 !used with wave coupling (iwavecpl == 1) msang(i) = 0.0 !used with wave coupling (iwavecpl == 1) scurx(i) = 0.0 !used with ocean currents? (lcurr_sf == T) scury(i) = 0.0 !used with ocean currents? (lcurr_sf == T) - + if (diag_qss) then esat = fpvs(t1(i)) qgh(i) = ep2*esat/(psfc(i)-esat) end if - + !GJF: these vars are not needed in a GFS-based suite !rho1(i)=prsl1(i)/(rd*t1(i)*(1.+ep1*q1(i))) !cpm(i)=cp*(1.+0.8*q1(i)) - + !GJF: perform data preparation that depends on surface types and call the mflux2 subroutine for each surface type ! Note that this is different than the original WRF module_sf_gfdl.F where mflux2 is called once for all surface ! types, with negative roughness lengths denoting open ocean. @@ -306,24 +306,24 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & smcmax=maxsmc(isltyp(i)) wetc(i)=(smois(i,1)-smcdry)/(smcmax-smcdry) wetc(i)=amin1(1.,amax1(wetc(i),0.)) - + !GJF: the lower boundary temperature passed in to MFLUX2 either follows GFS: tstrc(i) = 0.5*(tskin_lnd(i) + tsurf_lnd(i)) !averaging tskin_lnd and tsurf_lnd as in GFS surface layer breaks ntsflg functionality !GJF: or WRF module_sf_gfdl.F: !tstrc(i) = tskin_lnd(i) - + !GJF: Roughness Length Limitation section ! The WRF version of module_sf_gfdl.F has no checks on the roughness lengths prior to entering MFLUX2. ! The following limits were placed on roughness lengths from the GFS surface layer scheme at the suggestion ! of Chunxi Zhang. Using the GFDL surface layer without such checks can lead to instability in the UFS. - + !znt_lnd is in cm, z0max/ztmax are in m at this point z0max(i) = max(1.0e-6, min(0.01 * znt_lnd(i), zkmax(i))) - + tem1 = 1.0 - shdmax(i) tem2 = tem1 * tem1 tem1 = 1.0 - tem2 - + if( ivegsrc == 1 ) then if (vegtype(i) == 10) then z0max(i) = exp( tem2*log01 + tem1*log07 ) @@ -353,7 +353,7 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & z0max(i) = exp( tem2*log01 + tem1*log(z0max(i)) ) endif endif - + z0max(i) = max(z0max(i), 1.0e-6) ! czilc = 10.0 ** (- (0.40/0.07) * z0) ! fei's canopy height dependance of czil @@ -363,16 +363,16 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ztmax(i) = z0max(i)*exp( - tem1*tem1 & & * czilc*karman*sqrt(ustar_lnd(i)*(0.01/1.5e-05))) ztmax(i) = max(ztmax(i), 1.0e-6) - + !GJF: from WRF's module_sf_gfdl.F if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then wind10(i)=wspd(i)*alog(10.0/z0max(i))/alog(z1(i)/z0max(i)) !m s-1 end if wind10(i)=wind10(i)*100.0 !convert from m/s to cm/s - + ztmax(i) = ztmax(i)*100.0 !convert from m to cm z0max(i) = z0max(i)*100.0 !convert from m to cm - + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_lnd(i), rib_lnd(i), & xxfh(i), ztmax(i), z0max(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & @@ -380,62 +380,62 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & errflg) if (errflg /= 0) return - + !GJF: this is broken when tstrc is set to an average of two variables if (ntsflg==1) then - tskin_lnd(i) = tstrc(i) ! gopal's doing + tskin_lnd(i) = tstrc(i) ! gopal's doing end if - + if (diag_wind10m) then u10_lnd(i) = u1(i)*(0.01*wind10(i)/wspd(i)) v10_lnd(i) = v1(i)*(0.01*wind10(i)/wspd(i)) end if - + !GJF: these variables are not needed in a GFS-based suite, but are found in WRF's module_sf_gfdl.F and kept in comments for legacy - !gz1oz0(i) = alog(zkmax(i)/(0.01*znt_lnd(i))) + !gz1oz0(i) = alog(zkmax(i)/(0.01*znt_lnd(i))) !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling - + cdm_lnd(i) = max(cdm_lnd(i), cd_low_limit) cdm_lnd(i) = min(cdm_lnd(i), cd_high_limit) fm_lnd(i) = karman/sqrt(cdm_lnd(i)) - + !1) try fh_lnd from MFLUX2 fh_lnd(i) = karman*xxfh(i) - + !2) calc ch_lnd from fm_lnd and fh_lnd ch_lnd(i) = karman*karman/(fm_lnd(i) * fh_lnd(i)) - + !3) check if ch_lnd is out of bounds (if so, recalculate fh_lnd from bounded value) ch_bound_excursion = .false. - if (ch_lnd(i) < ch_low_limit) then + if (ch_lnd(i) < ch_low_limit) then ch_bound_excursion = .true. ch_lnd(i) = ch_low_limit else if (ch_lnd(i) > ch_high_limit) then ch_bound_excursion = .true. ch_lnd(i) = ch_high_limit end if - + fh2_lnd(i) = karman*xxfh2(i) - + if (ch_bound_excursion) then fh2_fh_ratio = min(xxfh2(i)/xxfh(i), 1.0) fh_lnd(i) = karman*karman/(fm_lnd(i)*ch_lnd(i)) fh2_lnd(i) = fh2_fh_ratio*fh_lnd(i) end if - + !GJF: Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih !psim_lnd(i)=gz1oz0(i)-fm_lnd(i) !psih_lnd(i)=gz1oz0(i)-fh_lnd(i) - + !GJF: from WRF's module_sf_gfdl.F ustar_lnd(i) = 0.01*sqrt(cdm_lnd(i)* & (upc(i)*upc(i) + vpc(i)*vpc(i))) !GJF: from Chunxi Zhang's module_sf_sfclayrev.f90 (I'm not sure it's necessary.) ustar_lnd(i) = amax1(ustar_lnd(i),0.001) - + stress_lnd(i) = cdm_lnd(i)*wspd(i)*wspd(i) - + !GJF: from WRF's module_sf_gfdl.F ! convert cd, ch to values at 10m, for output cd10 = cdm_lnd(i) @@ -446,48 +446,48 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ! (alog(zkmax(i)/tmp9)/alog(10.0/tmp9)) end if fm10_lnd(i) = karman/sqrt(cd10) - - !GJF: conductances aren't used in other CCPP schemes, but this limit + + !GJF: conductances aren't used in other CCPP schemes, but this limit ! might be able to replace the limits on drag coefficients above - + !chs_lnd(i)=ch_lnd(i)*wspd (i) !conductance !chs2_lnd(i)=ustar_lnd(i)*karman/fh2_lnd(i) !2m conductance - + !!!2014-0922 cap CHS over land points ! chs_lnd(i)=amin1(chs_lnd(i), 0.05) ! chs2_lnd(i)=amin1(chs2_lnd(i), 0.05) ! if (chs2_lnd(i) < 0) chs2_lnd(i)=1.0e-6 - + if (diag_qss) then esat = fpvs(tskin_lnd(i)) qss_lnd(i) = ep2*esat/(psfc(i)-esat) end if - + !GJF: not used in CCPP !flhc_lnd(i)=cpm(i)*rho1(i)*chs_lnd(i) !flqc_lnd(i)=rho1(i)*chs_lnd(i) !cqs2_lnd(i)=chs2_lnd(i) end if !dry - + if (icy(i)) then !GJF: from WRF's module_sf_gfdl.F smcdry=drysmc(isltyp(i)) smcmax=maxsmc(isltyp(i)) wetc(i)=(smois(i,1)-smcdry)/(smcmax-smcdry) wetc(i)=amin1(1.,amax1(wetc(i),0.)) - - + + !GJF: the lower boundary temperature passed in to MFLUX2 either follows GFS: tstrc(i) = 0.5*(tskin_ice(i) + tsurf_ice(i)) !averaging tskin_ice and tsurf_ice as in GFS surface layer breaks ntsflg functionality !GJF: or WRF module_sf_gfdl.F: !tstrc(i) = tskin_ice(i) !averaging tskin_ice and tsurf_ice as in GFS surface layer breaks ntsflg functionality - + !GJF: Roughness Length Limitation section ! The WRF version of module_sf_gfdl.F has no checks on the roughness lengths prior to entering MFLUX2. ! The following limits were placed on roughness lengths from the GFS surface layer scheme at the suggestion ! of Chunxi Zhang. Using the GFDL surface layer without such checks can lead to instability in the UFS. - + !znt_ice is in cm, z0max/ztmax are in m at this point z0max(i) = max(1.0e-6, min(0.01 * znt_ice(i), zkmax(i))) !** xubin's new z0 over land and sea ice @@ -511,17 +511,17 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ztmax(i) = z0max(i)*exp( - tem1*tem1 & & * czilc*karman*sqrt(ustar_ice(i)*(0.01/1.5e-05))) ztmax(i) = max(ztmax(i), 1.0e-6) - - + + !GJF: from WRF's module_sf_gfdl.F if (wind10(i) <= 1.0e-10 .or. wind10(i) > 150.0) then wind10(i)=wspd(i)*alog(10.0/z0max(i))/alog(z1(i)/z0max(i)) end if wind10(i)=wind10(i)*100.0 !! m/s to cm/s - + ztmax(i) = ztmax(i)*100.0 !m to cm z0max(i) = z0max(i)*100.0 !m to cm - + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ice(i), rib_ice(i), & xxfh(i), ztmax(i), z0max(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & @@ -529,61 +529,61 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & errflg) if (errflg /= 0) return - + !GJF: this is broken when tstrc is set to an average of two variables if (ntsflg==1) then - tskin_ice(i) = tstrc(i) ! gopal's doing + tskin_ice(i) = tstrc(i) ! gopal's doing end if - + if (diag_wind10m) then u10_ice(i) = u1(i)*(0.01*wind10(i)/wspd(i)) v10_ice(i) = v1(i)*(0.01*wind10(i)/wspd(i)) end if - + !GJF: these variables are not needed in a GFS-based suite, but are found in WRF's module_sf_gfdl.F and kept in comments for legacy !gz1oz0(i) = alog(zkmax(i)/znt_ice(i)) !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling - + cdm_ice(i) = max(cdm_ice(i), cd_low_limit) cdm_ice(i) = min(cdm_ice(i), cd_high_limit) fm_ice(i) = karman/sqrt(cdm_ice(i)) - + !1) try fh_ice from MFLUX2 fh_ice(i) = karman*xxfh(i) - + !2) calc ch_ice from fm_ice and fh_ice ch_ice(i) = karman*karman/(fm_ice(i) * fh_ice(i)) - + !3) check if ch_ice is out of bounds (if so, recalculate fh_ice from bounded value) ch_bound_excursion = .false. - if (ch_ice(i) < ch_low_limit) then + if (ch_ice(i) < ch_low_limit) then ch_bound_excursion = .true. ch_ice(i) = ch_low_limit else if (ch_ice(i) > ch_high_limit) then ch_bound_excursion = .true. ch_ice(i) = ch_high_limit end if - + fh2_ice(i) = karman*xxfh2(i) - + if (ch_bound_excursion) then fh2_fh_ratio = min(xxfh2(i)/xxfh(i), 1.0) fh_ice(i) = karman*karman/(fm_ice(i)*ch_ice(i)) fh2_ice(i) = fh2_fh_ratio*fh_ice(i) end if - + !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih !psim_ice(i)=gz1oz0(i)-fm_ice(i) !psih_ice(i)=gz1oz0(i)-fh_ice(i) - + ustar_ice(i) = 0.01*sqrt(cdm_ice(i)* & (upc(i)*upc(i) + vpc(i)*vpc(i))) !GJF: from Chunxi Zhang's module_sf_sfclayrev.f90 (I'm not sure it's necessary.) ustar_ice(i) = amax1(ustar_ice(i),0.001) - + stress_ice(i) = cdm_ice(i)*wspd(i)*wspd(i) - + !GJF: from WRF's module_sf_gfdl.F !!! convert cd, ch to values at 10m, for output cd10 = cdm_ice(i) @@ -594,29 +594,29 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ! (alog(zkmax(i)/tmp9)/alog(10.0/tmp9)) end if fm10_ice(i) = karman/sqrt(cd10) - + !GJF: conductances aren't used in other CCPP schemes !chs_ice(i)=ch_ice(i)*wspd (i) !conductance !chs2_ice(i)=ustar_ice(i)*karman/fh2_ice(i) !2m conductance - + if (diag_qss) then esat = fpvs(tskin_ice(i)) qss_ice(i) = ep2*esat/(psfc(i)-esat) end if - + !flhc_ice(i)=cpm(i)*rho1(i)*chs_ice(i) !flqc_ice(i)=rho1(i)*chs_ice(i) !cqs2_ice(i)=chs2_ice(i) end if !ice - + if (wet(i)) then wetc(i) = 1.0 - + !GJF: the lower boundary temperature passed in to MFLUX2 either follows GFS: tstrc(i) = 0.5*(tskin_ocn(i) + tsurf_ocn(i)) !averaging tskin_ocn and tsurf_ocn as in GFS surface layer breaks ntsflg functionality !GJF: or WRF module_sf_gfdl.F: !tstrc(i) = tskin_ocn(i) - + ! DH* 20201009: these bounds on ocean roughness lengths are from Chunxi Zhang's module_sf_sfclayrev.f90 (in cm) znt_ocn(i)=min(2.85e-1,max(znt_ocn(i),1.27e-5)) @@ -625,10 +625,10 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & wind10(i)=wspd(i)*alog(10.0/(0.01*znt_ocn(i)))/alog(z1(i)/(0.01*znt_ocn(i))) end if wind10(i)=wind10(i)*100.0 !! m/s to cm/s - + !GJF: mflux2 expects negative roughness length for ocean points znt_ocn(i) = -znt_ocn(i) - + call mflux2 (fxh(i), fxe(i), fxmx(i), fxmy(i), cdm_ocn(i), rib_ocn(i), & xxfh(i), znt_ocn(i), mznt(i), tstrc(i), & pspc(i), pkmax(i), wetc(i), slwdc(i), z1_cm(i), icoef_sf, iwavecpl, lcurr_sf, charn(i), msang(i), & @@ -636,67 +636,67 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & dt, wind10(i), xxfh2(i), ntsflg, sfenth, tzot(i), errmsg, & errflg) if (errflg /= 0) return - + !GJF: this is broken when tstrc is set to an average of two variables if (ntsflg==1) then - tskin_ocn(i) = tstrc(i) ! gopal's doing + tskin_ocn(i) = tstrc(i) ! gopal's doing end if - + znt_ocn(i)= abs(znt_ocn(i)) mznt(i)= abs(mznt(i)) - + !GJF: these bounds on ocean roughness lengths are from Chunxi Zhang's module_sf_sfclayrev.f90 (in cm) znt_ocn(i)=min(2.85e-1,max(znt_ocn(i),1.27e-5)) - + if (diag_wind10m) then u10_ocn(i) = u1(i)*(0.01*wind10(i)/wspd(i)) v10_ocn(i) = v1(i)*(0.01*wind10(i)/wspd(i)) end if - + !GJF: these variables are not needed in a GFS-based suite, but are found in WRF's module_sf_gfdl.F and kept in comments for legacy !gz1oz0(i) = alog(zkmax(i)/znt_ocn(i)) !taux(i) = fxmx(i)/10. ! gopal's doing for Ocean coupling !tauy(i) = fxmy(i)/10. ! gopal's doing for Ocean coupling - + cdm_ocn(i) = max(cdm_ocn(i), cd_low_limit) cdm_ocn(i) = min(cdm_ocn(i), cd_high_limit) fm_ocn(i) = karman/sqrt(cdm_ocn(i)) - + !1) try fh_ocn from MFLUX2 fh_ocn(i) = karman*xxfh(i) - + !2) calc ch_ocn from fm_ocn and fh_ocn ch_ocn(i) = karman*karman/(fm_ocn(i) * fh_ocn(i)) - + !3) check if ch_lnd is out of bounds (if so, recalculate fh_lnd from bounded value) ch_bound_excursion = .false. - if (ch_ocn(i) < ch_low_limit) then + if (ch_ocn(i) < ch_low_limit) then ch_bound_excursion = .true. ch_ocn(i) = ch_low_limit else if (ch_ocn(i) > ch_high_limit) then ch_bound_excursion = .true. ch_ocn(i) = ch_high_limit end if - + fh2_ocn(i) = karman*xxfh2(i) - + if (ch_bound_excursion) then fh2_fh_ratio = min(xxfh2(i)/xxfh(i), 1.0) fh_ocn(i) = karman*karman/(fm_ocn(i)*ch_ocn(i)) fh2_ocn(i) = fh2_fh_ratio*fh_ocn(i) end if - + !Other CCPP schemes (PBL) ask for fm/fh instead of psim/psih !psim_ocn(i)=gz1oz0(i)-fm_ocn(i) !psih_ocn(i)=gz1oz0(i)-fh_ocn(i) - + ustar_ocn(i) = 0.01*sqrt(cdm_ocn(i)* & (upc(i)*upc(i) + vpc(i)*vpc(i))) !GJF: from Chunxi Zhang's module_sf_sfclayrev.f90 (I'm not sure it's necessary.) ustar_ocn(i) = amax1(ustar_ocn(i),0.001) - + stress_ocn(i) = cdm_ocn(i)*wspd(i)*wspd(i) - + !GJF: from WRF's module_sf_gfdl.F !!! convert cd, ch to values at 10m, for output cd10 = cdm_ocn(i) @@ -707,23 +707,23 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ! (alog(zkmax(i)/tmp9)/alog(10.0/tmp9)) end if fm10_ocn(i) = karman/sqrt(cd10) - + !GJF: conductances aren't used in other CCPP schemes !chs_ocn(i)=ch_ocn(i)*wspd (i) !conductance !chs2_ocn(i)=ustar_ocn(i)*karman/fh2_ocn(i) !2m conductance - + if (diag_qss) then esat = fpvs(tskin_ocn(i)) qss_ocn(i) = ep2*esat/(psfc(i)-esat) end if end if !wet - + !flhc_ocn(i)=cpm(i)*rho1(i)*chs_ocn(i) !flqc_ocn(i)=rho1(i)*chs_ocn(i) !cqs2_ocn(i)=chs2_ocn(i) end if !flag_iter end do - + !GJF: this code has not been updated since GFS suites don't require this; one would need to have different values of hfx, qfx, lh for each surface type ! if (isfflx.eq.0) then ! do i=its,ite @@ -737,7 +737,7 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ! !water ! hfx(i)= -10.*cp*fxh(i) ! else if (islmsk == 1) then - ! hfx(i)= -10.*cp*fxh(i) + ! hfx(i)= -10.*cp*fxh(i) ! hfx(i)=amax1(hfx(i),-250.) ! end if ! qfx(j)=-10.*fxe(i) @@ -745,8 +745,8 @@ subroutine gfdl_sfc_layer_run (im, nsoil, km, xlat, xlon, flag_iter, lsm, & ! lh(i)=xlv*qfx(i) ! enddo ! endif - - + + end subroutine gfdl_sfc_layer_run !--------------------------------- @@ -757,13 +757,13 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m pert_Cd, ens_random_seed, ens_Cdamp, & upc,vpc,tpc,rpc,dt,wind10,xxfh2,ntsflg,sfenth, & tzot, errmsg, errflg) - + !------------------------------------------------------------------------ ! -! MFLUX2 computes surface fluxes of momentum, heat,and moisture -! using monin-obukhov. the roughness length "z0" is prescribed +! MFLUX2 computes surface fluxes of momentum, heat,and moisture +! using monin-obukhov. the roughness length "z0" is prescribed ! over land and over ocean "z0" is computed using charnocks formula. -! the universal functions (from similarity theory approach) are +! the universal functions (from similarity theory approach) are ! those of hicks. This is Bob's doing. ! !------------------------------------------------------------------------ @@ -785,7 +785,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m integer,intent(in) :: icoef_sf integer,intent(in) :: iwavecpl logical,intent(in) :: lcurr_sf - logical,intent(in) :: pert_Cd + logical,intent(in) :: pert_Cd integer,intent(in) :: ens_random_seed real(kind=kind_phys),intent(in) :: ens_Cdamp @@ -818,7 +818,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: vpc real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: tpc real(kind=kind_phys), intent ( in), dimension (ims :ime ) :: rpc - + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -844,7 +844,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m real(kind=kind_phys), dimension(1 :ime) :: estsop real(kind=kind_phys), dimension(1 :ime) :: fmz1 real(kind=kind_phys), dimension(1 :ime) :: fmz10 - real(kind=kind_phys), dimension(1 :ime) :: fmz2 + real(kind=kind_phys), dimension(1 :ime) :: fmz2 real(kind=kind_phys), dimension(1 :ime) :: fmzo1 real(kind=kind_phys), dimension(1 :ime) :: foft real(kind=kind_phys), dimension(1 :ime) :: foftm @@ -858,7 +858,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m real(kind=kind_phys), dimension(1 :ime) :: rstso real(kind=kind_phys), dimension(1 :ime) :: rstsop real(kind=kind_phys), dimension(1 :ime) :: sf10 - real(kind=kind_phys), dimension(1 :ime) :: sf2 + real(kind=kind_phys), dimension(1 :ime) :: sf2 real(kind=kind_phys), dimension(1 :ime) :: sfm real(kind=kind_phys), dimension(1 :ime) :: sfzo real(kind=kind_phys), dimension(1 :ime) :: sgzm @@ -879,7 +879,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m real(kind=kind_phys), dimension(1 :ime) :: tss real(kind=kind_phys), dimension(1 :ime) :: ucom real(kind=kind_phys), dimension(1 :ime) :: uf10 - real(kind=kind_phys), dimension(1 :ime) :: uf2 + real(kind=kind_phys), dimension(1 :ime) :: uf2 real(kind=kind_phys), dimension(1 :ime) :: ufh real(kind=kind_phys), dimension(1 :ime) :: ufm real(kind=kind_phys), dimension(1 :ime) :: ufzo @@ -897,7 +897,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m real(kind=kind_phys), dimension(1 :ime) :: xxfm real(kind=kind_phys), dimension(1 :ime) :: xxsh real(kind=kind_phys), dimension(1 :ime) :: z10 - real(kind=kind_phys), dimension(1 :ime) :: z2 + real(kind=kind_phys), dimension(1 :ime) :: z2 real(kind=kind_phys), dimension(1 :ime) :: zeta real(kind=kind_phys), dimension(1 :ime) :: zkmax @@ -913,7 +913,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m real(kind=kind_phys) :: ux13, yo, y,xo,x,ux21,ugzzo,ux11,ux12,uzetao,xnum,alll real(kind=kind_phys) :: ux1,ugz,x10,uzo,uq,ux2,ux3,xtan,xden,y10,uzet1o,ugz10 - real(kind=kind_phys) :: szet2, zal2,ugz2 + real(kind=kind_phys) :: szet2, zal2,ugz2 real(kind=kind_phys) :: rovcp,boycon,cmo2,psps1,zog,enrca,rca,cmo1,amask,en,ca,a,c real(kind=kind_phys) :: sgz,zal10,szet10,fmz,szo,sq,fmzo,rzeta1,zal1g,szetao,rzeta2,zal2g real(kind=kind_phys) :: hcap,xks,pith,teps,diffot,delten,alevp,psps2,alfus,nstep @@ -928,7 +928,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m ! internal variables !----------------------------------------------------------------------- - real(kind=kind_phys), dimension (223) :: tab + real(kind=kind_phys), dimension (223) :: tab real(kind=kind_phys), dimension (223) :: table real(kind=kind_phys), dimension (101) :: tab11 real(kind=kind_phys), dimension (41) :: table4 @@ -950,7 +950,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m data amask/ -98.0/ !----------------------------------------------------------------------- -! tables used to obtain the vapor pressures or saturated vapor +! tables used to obtain the vapor pressures or saturated vapor ! pressure !----------------------------------------------------------------------- @@ -1006,7 +1006,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m data table3/.7520e+03,.7980e+03,.8470e+03,.8980e+03,.9520e+03, & &.1008e+04,.1067e+04,.1129e+04,.1194e+04,.1263e+04,.1334e+04, & &.1409e+04,.1488e+04,.1569e+04,.1656e+04,.1745e+04,.1840e+04, & - &.1937e+04,.2041e+04,.2147e+04,.2259e+04,.2375e+04,.2497e+04, & + &.1937e+04,.2041e+04,.2147e+04,.2259e+04,.2375e+04,.2497e+04, & &.2624e+04,.2756e+04,.2893e+04,.3036e+04,.3186e+04,.3340e+04, & &.3502e+04,.3670e+04,.3843e+04,.4025e+04,.4213e+04,.4408e+04, & &.4611e+04,.4821e+04,.5035e+04,.5270e+04,.5500e+04,.5740e+04, & @@ -1030,7 +1030,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m real,parameter :: rgas = 2.87e6 real,parameter :: og = 1./g integer :: ntstep = 0 - + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -1075,7 +1075,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m ! routine = 'mflux2' ! !------------------------------------------------------------------------ -! set water availability constant "ecof" and land mask "land". +! set water availability constant "ecof" and land mask "land". ! limit minimum wind speed to 100 cm/s !------------------------------------------------------------------------ ! constants for 10 m winds (correction for knots @@ -1165,13 +1165,13 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m enddo !------------------------------------------------------------------------ -! define constants: -! a and c = constants used in evaluating universal function for -! stable case -! ca = karmen constant -! cm01 = constant part of vertical integral of universal -! function; stable case ( 0.5 < zeta < or = 10.0) -! cm02 = constant part of vertical integral of universal +! define constants: +! a and c = constants used in evaluating universal function for +! stable case +! ca = karmen constant +! cm01 = constant part of vertical integral of universal +! function; stable case ( 0.5 < zeta < or = 10.0) +! cm02 = constant part of vertical integral of universal ! function; stable case ( zeta > 10.0) !------------------------------------------------------------------------ @@ -1207,14 +1207,14 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m if(psps1 .EQ. 0.0)then psps1 = .1 endif - rstso(i) = 0.622*estso(i)/psps1 + rstso(i) = 0.622*estso(i)/psps1 vrts (i) = 1. + boycon*ecof(i)*rstso(i) enddo !------------------------------------------------------------------------ ! check if consideration of virtual temperature changes stability. -! if so, set "dthetav" to near neutral value (1.0e-4). also check -! for very small lapse rates; if ABS(tempa1) <1.0e-4 then +! if so, set "dthetav" to near neutral value (1.0e-4). also check +! for very small lapse rates; if ABS(tempa1) <1.0e-4 then ! tempa1=1.0e-4 !------------------------------------------------------------------------ @@ -1241,13 +1241,13 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m enddo !------------------------------------------------------------------------ -! begin looping through points on line, solving wegsteins iteration +! begin looping through points on line, solving wegsteins iteration ! for zeta at each point, and using hicks functions !------------------------------------------------------------------------ !------------------------------------------------------------------------ -! set initial guess of zeta=non - dimensional height "szeta" for -! stable points +! set initial guess of zeta=non - dimensional height "szeta" for +! stable points !------------------------------------------------------------------------ rca = 1./ca @@ -1349,14 +1349,14 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m if (szet2 .LE. 0.5) then fmz2 (i) = (zal2 + a*szet2 )*rca else if (szet2 .GT. 0.5 .AND. szet2 .LE. 2.) then - rzeta2 = 1./szet2 + rzeta2 = 1./szet2 fmz2 (i) = (8.*zal2 + 4.25*rzeta2 - & 0.5*rzeta2*rzeta2 + cmo1)*rca else if (szet2 .GT. 2.) then fmz2 (i) = (c*szet2 + cmo2)*rca endif sf2 (i) = fmz2 (i) - fmzo1(i) - + sfm(i) = fmz1(i) - fmzo1(i) sfh(i) = fmz1(i) - fhzo1(i) sgz = ca*rib(istb(i))*sfm(i)*sfm(i)/ & @@ -1388,7 +1388,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m go to 130 110 continue - + write(errmsg,'(*(a))') 'NON-CONVERGENCE FOR STABLE ZETA IN gfdl_sfc_layer.F90/MFLUX2' errflg = 1 return @@ -1397,7 +1397,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m !------------------------------------------------------------------------ ! update "zo" for ocean points. "zo"cannot be updated within the ! wegsteins iteration as the scheme (for the near neutral case) -! can become unstable +! can become unstable !------------------------------------------------------------------------ 130 continue @@ -1419,7 +1419,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m ustar = sqrt( -szo / zog) restar = -ustar * szo / vis - restar = max(restar,cons_p000001) + restar = max(restar,cons_p000001) ! Rat taken from Zeng, Zhao and Dickinson 1997 rat = 2.67 * restar ** .25 - 2.57 rat = min(rat ,cons_7) !constant @@ -1428,7 +1428,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m else zot(istb(i)) = zoc(istb(i)) endif - + ! in hwrf thermal znot is loaded back into the zoc array for next step zoc(istb(i)) = szo enddo @@ -1453,7 +1453,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m endif ! the above correction done by GFDL in centi-kts!!!-change back wind10(istb(i)) = wind10(istb(i)) / 1.944 - enddo + enddo !------------------------------------------------------------------------ ! unstable points @@ -1540,7 +1540,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m ugz2 = ALOG(z2 (iutb(i))/ABS(zoc(iutb(i)))) uzet1o = ABS(z2 (iutb(i)))/zkmax(iutb(i))*uzeta(i) uzetao = ABS(zoc(iutb(i)))/zkmax(iutb(i))*uzeta(i) - ux11 = 1. - 16.*uzet1o + ux11 = 1. - 16.*uzet1o ux12 = 1. - 16.*uzetao y = SQRT(ux11) yo = SQRT(ux12) @@ -1582,7 +1582,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m 'uq is 1 ',ux2,ugz,ugzm(i),uzeta(i),uzetam(i) errflg = 1 return - + ! call MPI_CLOSE(1,routine) !------------------------------------------------------------------------ @@ -1594,7 +1594,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m !------------------------------------------------------------------------ ! update "zo" for ocean points. zo cannot be updated within the ! wegsteins iteration as the scheme (for the near neutral case) -! can become unstable. +! can become unstable. !------------------------------------------------------------------------ do i = 1,iq @@ -1639,7 +1639,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m endif ! the above correction done by GFDL in centi-kts!!!-change back wind10(iutb(i)) = wind10(iutb(i)) / 1.944 - enddo + enddo do i = 1,iq xxfm(iutb(i)) = ufm(i) @@ -1664,7 +1664,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m enddo ! do land sfc temperature prediction if ntsflg=1 -! ntsflg = 1 ! gopal's doing +! ntsflg = 1 ! gopal's doing if (ntsflg .EQ. 0) go to 370 alll = 600. @@ -1674,7 +1674,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m alfus = alll/2.39e-8 teps = 0.1 ! slwdc... in units of cal/min ???? -! slwa... in units of ergs/sec/cm*2 +! slwa... in units of ergs/sec/cm*2 ! 1 erg=2.39e-8 cal !------------------------------------------------------------------------ ! pack land and sea ice points @@ -1735,7 +1735,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m if(psps2 .EQ. 0.0)then psps2 = .1 endif - rstsop(i) = 0.622*estsop(i)/psps2 + rstsop(i) = 0.622*estsop(i)/psps2 rdiff (i) = amin1(0.0,(rkmaxp(i) - rstsop(i))) foft(i) = tss(i) + delsrad(i)*(slwa(i) - aap(i)*tsp(i)**4 - & @@ -1745,7 +1745,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m frac(i) = ABS((foft(i) - tsp(i))/tsp(i)) !------------------------------------------------------------------------ -! check for convergence of all points use wegstein iteration +! check for convergence of all points use wegstein iteration !------------------------------------------------------------------------ if (frac(i) .GE. teps) then @@ -1773,7 +1773,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m ! call MPI_CLOSE(1,routine) endif enddo - + do i = 1,ip ii = indx(i) tstrc(ii) = tsp (i) @@ -1785,7 +1785,7 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m 370 continue do i = its,ite -!!! +!!! if ( iwavecpl .eq. 1 .and. zoc(i) .le. 0.0 ) then windmks = wind10(i) * 0.01 call znot_wind10m(windmks,znott,znotm,icoef_sf) @@ -1819,5 +1819,5 @@ SUBROUTINE MFLUX2( fxh,fxe,fxmx,fxmy,cdm,rib,xxfh,zoc,mzoc,tstrc, & !m ntstep = ntstep + 1 return end subroutine MFLUX2 - + end module gfdl_sfc_layer From d2573475a773ce3cece181d5b86af676229fdcce Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 10 Oct 2020 15:34:48 -0600 Subject: [PATCH 374/404] Fix error handling in physics/radlw_main.F90 --- physics/radlw_main.F90 | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index f5278ed33..b7e93d06b 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -1213,8 +1213,10 @@ subroutine rrtmg_lw_run & call cldprmc(nlay, inflglw, iceflglw, liqflglw, & & cldfmc, ciwpmc, & & clwpmc, cswpmc, reicmc, relqmc, resnmc, & - & ncbands, taucmc) - endif + & ncbands, taucmc, errmsg, errflg) + ! return immediately if cldprmc throws an error + if (errflg/=0) return + endif ! if (lprnt) then ! print *,' after cldprop' @@ -7959,7 +7961,7 @@ end subroutine rtrnmc_mcica ! ------------------------------------------------------------------------------ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & - & ciwpmc, clwpmc, cswpmc, reicmc, relqmc, resnmc, ncbands, taucmc) + & ciwpmc, clwpmc, cswpmc, reicmc, relqmc, resnmc, ncbands, taucmc, errmsg, errflg) ! ------------------------------------------------------------------------------ ! Purpose: Compute the cloud optical depth(s) for each cloudy layer. @@ -7998,9 +8000,11 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & ! ------- Output ------- - integer(kind=im), intent(out) :: ncbands ! number of cloud spectral bands - real(kind=rb), intent(inout) :: taucmc(:,:) ! cloud optical depth [mcica] + integer(kind=im), intent(out) :: ncbands ! number of cloud spectral bands + real(kind=rb), intent(inout) :: taucmc(:,:) ! cloud optical depth [mcica] ! Dimensions: (ngptlw,nlayers) + character(len=*), intent(inout) :: errmsg + integer, intent(inout) :: errflg ! ------- Local ------- @@ -8027,7 +8031,6 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & real(kind=rb) :: radsno ! cloud snow effective size (microns) real(kind=rb), parameter :: eps = 1.e-6_rb ! epsilon real(kind=rb), parameter :: cldmin = 1.e-20_rb ! minimum value for cloud quantities - character*80 errmess ! ------- Definitions ------- @@ -8784,10 +8787,11 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & elseif (iceflag .ge. 3) then if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) then - write(errmess,'(A,i5,i5,f8.2,f8.2)' ) & + write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & & 'ERROR: ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' & - & ,ig, lay, ciwpmc(ig,lay), radice - !mz call wrf_error_fatal(errmess) + & ,ig, lay, ciwpmc(ig,lay), radice + errflg = 1 + return end if ncbands = 16 factor = (radice - 2._rb)/3._rb @@ -8806,10 +8810,11 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & if (cswpmc(ig,lay).gt.0.0_rb .and. iceflag .eq. 5) then radsno = resnmc(lay) if (radsno .lt. 5.0_rb .or. radsno .gt. 140.0_rb) then - write(errmess,'(A,i5,i5,f8.2,f8.2)' ) & + write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & & 'ERROR: SNOW GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS' & & ,ig, lay, cswpmc(ig,lay), radsno - !mz call wrf_error_fatal(errmess) + errflg = 1 + return end if ncbands = 16 factor = (radsno - 2._rb)/3._rb @@ -8833,8 +8838,13 @@ subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, & elseif (liqflag .eq. 1) then radliq = relqmc(lay) - if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) stop & - & 'LIQUID EFFECTIVE RADIUS OUT OF BOUNDS' + if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) then + write(errmsg,'(a,i5,i5,f8.2,f8.2)' ) & +& 'ERROR: LIQUID EFFECTIVE SIZE OUT OF BOUNDS' & +& ,ig, lay, clwpmc(ig,lay), radliq + errflg = 1 + return + end if index = int(radliq - 1.5_rb) if (index .eq. 0) index = 1 if (index .eq. 58) index = 57 From b018da0982bd92bc2880eda43c861566e6631957 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Tue, 13 Oct 2020 15:27:51 +0000 Subject: [PATCH 375/404] Updated unified_ugwp documentation. --- physics/docs/library.bib | 41 +++++++++++++++++++++++++++++++++++ physics/unified_ugwp.F90 | 27 +++++++++++++++++++++-- physics/unified_ugwp_post.F90 | 4 ++-- 3 files changed, 68 insertions(+), 4 deletions(-) diff --git a/physics/docs/library.bib b/physics/docs/library.bib index dd2b2042e..b96226e04 100644 --- a/physics/docs/library.bib +++ b/physics/docs/library.bib @@ -3197,3 +3197,44 @@ @inproceedings{yudin_et_al_2019 Booktitle = {Space Weather Workshop}, Title = {Longitudinal Variability of Wave Dynamics in Weather Models Extended into the Mesosphere and Thermosphere}, Year = {2019}} + +@article{kim_and_doyle_2005, + Author = {Y.-J. Kim and J.D. Arakawa}, + Doi = {10.1256/qj.04.160}, + Url = {https://doi.org/10.1256/qj.04.160}, + Journal = {Quarterly Journal of the Royal Meteorological Society}, + Pages = {1893-1921}, + Title = {Extension of an orographic-drag parametrization scheme to incorporate orographic inisotropy and flow blocking}, + Volume = {131}, + Year = {2005}} + +@article{steeneveld_et_al_2008, + Author = {Steeneveld, G. J.,A.A. M. Holtslag, C. J. Nappo, B. J. H. van de Wiel, and L. Mahrt}, + Doi = {10.1175/2008JAMC1816.1}, + Url = {https://doi.org/10.1175/2008JAMC1816.1}, + Journal = {J. Appl. Meteor.}, + Pages = {2518-2530}, + Title = {Exploring the possible role of small-scale terrain drag on stable boundary layers over land}, + Volume = {47}, + Year = {2008}} + +@article{tsiringakis_et_al_2017, + Author = {Tsiringakis,A., G. J. Steeneveld, and A.A. M. Holtslag}, + Doi = {10.1002/qj.3021}, + Url = {https://doi.org/10.1002/qj.3021}, + Journal = {Quarterly Journal of the Royal Meteorological Society}, + Pages = {1504-1516}, + Title = {Small-scale orographic gravity wave drag in stable boundary layers and its impact on synoptic systems and near-surface meteorology}, + Volume = {143}, + Year = {2017}} + +@article{beljaars_et_al_2004, + Author = {Beljaars, A.C.M., A.R.Brown, and N.Wood}, + Doi = {10.1256/qj.03.73}, + Url = {https://doi.org/10.1256/qj.03.73}, + Journal = {Quarterly Journal of the Royal Meteorological Society}, + Pages = {1327-1347}, + Title = {A new parametrization of turbulent orographic form drag}, + Volume = {130}, + Year = {2004}} + diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index bdd0fbb70..13b9f9193 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -1,5 +1,16 @@ !> \file unified_ugwp.F90 -!! This file contains the Unified Gravity Wave Physics (UGWP) scheme by Valery Yudin (University of Colorado, CIRES) +!! This file combines three gravity wave drag schemes under one ("unified_ugwp") suite: +!! 1) The "V0 CIRES UGWP" scheme (cires_ugwp.F90) as implemented in the FV3GFSv16 atmosphere model, which includes: +!! a) the "traditional" EMC orograhic gravity wave drag and flow blocking scheme of gwdps.f +!! b) the v0 cires ugwp non-stationary GWD scheme +!! 2) The GSL orographic drag suite (drag_suite.F90), as implmeneted in the RAP/HRRR, which includes: +!! a) large-scale gravity wave drag and low-level flow blocking -- active at horizontal scales +!! down to ~5km (Kim and Arakawa, 1995 \cite kim_and_arakawa_1995; Kim and Doyle, 2005 \cite kim_and_doyle_2005) +!! b) small-scale gravity wave drag scheme -- active typically in stable PBL at horizontal grid resolutions down to ~1km +!! (Steeneveld et al, 2008 \cite steeneveld_et_al_2008; Tsiringakis et al, 2017 \cite tsiringakis_et_al_2017) +!! c) turbulent orographic form drag -- active at horizontal grid ersolutions down to ~1km +!! (Beljaars et al, 2004 \cite beljaars_et_al_2004) +!! 3) The "V1 CIRES UGWP" scheme developed by Valery Yudin (University of Colorado, CIRES) !! See Valery Yudin's presentation at 2017 NGGPS PI meeting: !! Gravity waves (GWs): Mesoscale GWs transport momentum, energy (heat) , and create eddy mixing in the whole atmosphere domain; Breaking and dissipating GWs deposit: (a) momentum; (b) heat (energy); and create (c) turbulent mixing of momentum, heat, and tracers !! To properly incorporate GW effects (a-c) unresolved by DYCOREs we need GW physics @@ -9,6 +20,18 @@ !! 2. GW Propagation: Unified solver for "propagation, dissipation and breaking" excited from all type of GW sources. !! 3. GW Effects: Unified representation of GW impacts on the "resolved" flow for all sources (energy-balanced schemes for momentum, heat and mixing). !! https://www.weather.gov/media/sti/nggps/Presentations%202017/02%20NGGPS_VYUDIN_2017_.pdf +!! +!! The unified_ugwp scheme is activated by gwd_opt = 2 in the namelist. +!! The choice of schemes is activated at runtime by the following namelist options (boolean): +!! do_ugwp_v0 -- activates V0 CIRES UGWP scheme - both orographic and non-stationary GWD +!! do_ugwp_v0_orog_only -- activates V0 CIRES UGWP scheme - orographic GWD only +!! do_gsl_drag_ls_bl -- activates RAP/HRRR (GSL) large-scale GWD and blocking +!! do_gsl_drag_ss -- activates RAP/HRRR (GSL) small-scale GWD +!! do_gsl_drag_tofd -- activates RAP/HRRR (GSL) turbulent orographic drag +!! do_ugwp_v1 -- activates V1 CIRES UGWP scheme - both orographic and non-stationary GWD +!! do_ugwp_v1_orog_only -- activates V1 CIRES UGWP scheme - orographic GWD only +!! Note that only one "large-scale" scheme can be activated at a time. +!! module unified_ugwp @@ -43,7 +66,7 @@ module unified_ugwp ! ------------------------------------------------------------------------ ! CCPP entry points for CIRES Unified Gravity Wave Physics (UGWP) scheme v0 ! ------------------------------------------------------------------------ -!>@brief The subroutine initializes the CIRES UGWP +!>@brief The subroutine initializes the unified UGWP !> \section arg_table_unified_ugwp_init Argument Table !! \htmlinclude unified_ugwp_init.html !! diff --git a/physics/unified_ugwp_post.F90 b/physics/unified_ugwp_post.F90 index ac11b4eb1..5e43f2830 100644 --- a/physics/unified_ugwp_post.F90 +++ b/physics/unified_ugwp_post.F90 @@ -4,14 +4,14 @@ module unified_ugwp_post contains -!>\defgroup unified_ugwp_post CIRES UGWP Scheme Post +!>\defgroup unified_ugwp_post unified_UGWP Scheme Post !! @{ !> \section arg_table_unified_ugwp_post_init Argument Table !! subroutine unified_ugwp_post_init () end subroutine unified_ugwp_post_init -!>@brief The subroutine initializes the CIRES UGWP +!>@brief The subroutine initializes the unified UGWP #if 0 !> \section arg_table_unified_ugwp_post_run Argument Table !! \htmlinclude unified_ugwp_post_run.html From 2b4141930ce13c2f8e5e750c9bbe5da622f45a3e Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Tue, 13 Oct 2020 19:30:43 +0000 Subject: [PATCH 376/404] If restart=.true. do not set XLAI=0 in the initialization. --- physics/sfc_drv_ruc.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index d54561d21..a8f975aa2 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -419,7 +419,7 @@ subroutine lsm_ruc_run & ! inputs if(flag_init .and. iter==1) then ! Initialize the RUC soil levels, needed for cold starts and warm starts CALL init_soil_depth_3 ( zs , dzs , lsoil_ruc ) - xlai = 0. + if (.not. restart) !xlai = 0. endif ! flag_init=.true.,iter=1 ims = 1 From 762beebb2337d94ba455837a1467b8f5f1857ba3 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Tue, 13 Oct 2020 19:35:08 +0000 Subject: [PATCH 377/404] Corrected syntax error. --- physics/sfc_drv_ruc.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index a8f975aa2..6626d8fb6 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -419,7 +419,7 @@ subroutine lsm_ruc_run & ! inputs if(flag_init .and. iter==1) then ! Initialize the RUC soil levels, needed for cold starts and warm starts CALL init_soil_depth_3 ( zs , dzs , lsoil_ruc ) - if (.not. restart) !xlai = 0. + if (.not. restart) xlai = 0. endif ! flag_init=.true.,iter=1 ims = 1 From 57d1b4d9f4a77bc5c0b8dcc797c0bfa7249a78cb Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 13 Oct 2020 20:14:21 -0600 Subject: [PATCH 378/404] Bugfixes following update from master --- physics/GFS_rrtmg_pre.F90 | 10 +- physics/GFS_rrtmg_pre.meta | 10 +- physics/moninedmf.f | 4 +- physics/radiation_clouds.f | 883 +++++++++++++++++++------------------ physics/radlw_main.F90 | 2 +- 5 files changed, 466 insertions(+), 443 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 9bde61c62..109df3b65 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -27,7 +27,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & lmfdeep2, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & rog, rocp, con_rd, xlat_d, xlat, xlon, coslat, sinlat, tsfc, slmsk, & prsi, prsl, prslk, tgrs, sfc_wts, mg_cld, effrr_in, & - cnvw_in, cnvc_in, qgrs, aer_nm, dx, & !inputs from here and above + cnvw_in, cnvc_in, qgrs, aer_nm, dx, icloud, & !inputs from here and above coszen, coszdg, effrl_inout, effri_inout, effrs_inout, & clouds1, clouds2, clouds3, clouds4, clouds5, & !in/out from here and above kd, kt, kb, mtopa, mbota, raddt, tsfg, tsfa, de_lgth, alb1d, delp, dz, & !output from here and below @@ -91,7 +91,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & imp_physics_zhao_carr_pdf, & imp_physics_mg, imp_physics_wsm6, & imp_physics_fer_hires, & - yearlen + yearlen, icloud character(len=3), dimension(:), intent(in) :: lndp_var_list @@ -104,7 +104,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & real(kind=kind_phys), dimension(:), intent(in) :: xlat_d, xlat, xlon, & coslat, sinlat, tsfc, & - slmsk + slmsk, dx real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsl, prslk, & tgrs, sfc_wts, & @@ -846,7 +846,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & endif !mz HWRF physics: icloud=3 - if(Model%icloud == 3) then + if(icloud == 3) then ! Set internal dimensions ids = 1 @@ -1023,7 +1023,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & else ! MYNN PBL or GF convective are not used - call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + call progcld6 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs xlat,xlon,slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index f3571b49d..2876f295d 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -675,11 +675,19 @@ standard_name = cell_size long_name = relative dx for the grid cell units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in optional = F +[icloud] + standard_name = cloud_effect_to_optical_depth_and_cloud_fraction + long_name = cloud effect to the optical depth and cloud fraction in radiation + units = flag + dimensions = () + type = integer + intent = in + optional = F [coszen] standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period diff --git a/physics/moninedmf.f b/physics/moninedmf.f index 4951c7056..d5cb2ded3 100644 --- a/physics/moninedmf.f +++ b/physics/moninedmf.f @@ -65,7 +65,7 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & & xkzminv,moninq_fac,hurr_pbl,islimsk,var_ric, & - & coef_ric_l,coef_ric_s,lssav,ldiag3d,qdiag3d,lsidea,ntoz, & + & coef_ric_l,coef_ric_s,lssav,ldiag3d,qdiag3d,ntoz, & & du3dt_PBL,dv3dt_PBL,dt3dt_PBL,dq3dt_PBL,do3dt_PBL, & & flag_for_pbl_generic_tend,errmsg,errflg) ! @@ -82,7 +82,7 @@ subroutine hedmf_run (im,km,ntrac,ntcw,dv,du,tau,rtg, & ! arguments ! logical, intent(in) :: lprnt, hurr_pbl, lssav, ldiag3d, qdiag3d - logical, intent(in) :: lsidea, flag_for_pbl_generic_tend + logical, intent(in) :: flag_for_pbl_generic_tend integer, intent(in) :: ipr, islimsk(im) integer, intent(in) :: im, km, ntrac, ntcw, kinver(im), ntoz integer, intent(out) :: kpbl(im) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 160b47167..552037da2 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -198,7 +198,7 @@ !! !! Sub-grid cloud approximation (namelist control parameter - \b ISUBC_LW=2, \b ISUBC_SW=2) !!\n ISUBC=0: grid averaged quantities, without sub-grid cloud approximation -!!\n ISUBC=1: with McICA sub-grid approximation (use prescribed permutation seeds) +!!\n ISUBC=1: with McICA sub-grid approximation (use prescribed permutation seeds) !!\n ISUBC=2: with McICA sub-grid approximation (use random permutation seeds) !! !!\version NCEP-Radiation_clouds v5.1 Nov 2012 @@ -206,7 +206,7 @@ !! @} !> This module computes cloud related quantities for radiation computations. - module module_radiation_clouds + module module_radiation_clouds ! use physparam, only : icldflg, iovrsw, iovrlw, & & lcrick, lcnorm, lnoprec, & @@ -657,7 +657,7 @@ subroutine progcld1 & enddo endif -!> - Compute SFC/low/middle/high cloud top pressure for each cloud +!> - Compute SFC/low/middle/high cloud top pressure for each cloud !! domain for given latitude. ! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; ! --- i=1,2 are low-lat (<45 degree) and pole regions) @@ -786,14 +786,14 @@ subroutine progcld1 & enddo endif -!> - Compute effective ice cloud droplet radius following Heymsfield +!> - Compute effective ice cloud droplet radius following Heymsfield !! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. if(.not.effr_in) then do k = 1, NLAY do i = 1, IX tem2 = tlyr(i,k) - con_ttp - + if (cip(i,k) > 0.0) then tem3 = gord * cip(i,k) * plyr(i,k) / (delp(i,k)*tvly(i,k)) @@ -840,7 +840,7 @@ subroutine progcld1 & endif !> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then + if ( iovr == 4 .or. iovr == 5 ) then call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & @@ -851,8 +851,8 @@ subroutine progcld1 & !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, -!! and high clouds. The three cloud domain boundaries are defined by -!! ptopc. The cloud overlapping method is defined by control flag +!! and high clouds. The three cloud domain boundaries are defined by +!! ptopc. The cloud overlapping method is defined by control flag !! 'iovr', which may be different for lw and sw radiation programs. call gethml & ! --- inputs: @@ -893,7 +893,7 @@ end subroutine progcld1 !!\param delp (IX,NLAY), model layer pressure thickness in mb (100Pa) !!\param IX horizontal dimention !!\param NLAY,NLP1 vertical layer/level dimensions -!!\param lmfshal flag for mass-flux shallow convection scheme in the cloud fraction calculation +!!\param lmfshal flag for mass-flux shallow convection scheme in the cloud fraction calculation !!\param lmfdeep2 flag for mass-flux deep convection scheme in the cloud fraction calculation !!\param dzlay(ix,nlay) distance between model layer centers !!\param latdeg(ix) latitude (in degrees 90 -> -90) @@ -917,9 +917,9 @@ end subroutine progcld1 !> @{ subroutine progcld2 & & ( plyr,plvl,tlyr,qlyr,qstl,rhly,tvly,clw, & ! --- inputs: - & xlat,xlon,slmsk,dz,delp, & + & xlat,xlon,slmsk,dz,delp, & & ntrac, ntcw, ntiw, ntrw, & - & IX, NLAY, NLP1, lmfshal, lmfdeep2, & + & IX, NLAY, NLP1, lmfshal, lmfdeep2, & & dzlay, latdeg, julian, yearlen, & & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) @@ -1111,7 +1111,7 @@ subroutine progcld2 & enddo !> - Compute cloud ice effective radii - + do k = 1, NLAY do i = 1, IX tem2 = tlyr(i,k) - con_ttp @@ -1219,7 +1219,7 @@ subroutine progcld2 & clouds(i,k,3) = rew(i,k) clouds(i,k,4) = cip(i,k) clouds(i,k,5) = rei(i,k) - clouds(i,k,6) = crp(i,k) ! added for Thompson + clouds(i,k,6) = crp(i,k) ! added for Thompson clouds(i,k,7) = rer(i,k) clouds(i,k,8) = csp(i,k) ! added for Thompson clouds(i,k,9) = res(i,k) @@ -1236,7 +1236,7 @@ subroutine progcld2 & endif !> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then + if ( iovr == 4 .or. iovr == 5 ) then call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & @@ -1295,7 +1295,7 @@ end subroutine progcld2 !!\param nlay,nlp1 vertical layer/level dimensions !!\param deltaq (ix,nlay), half total water distribution width !!\param sup supersaturation -!!\param kdt +!!\param kdt !!\param me print control flag !!\param dzlay(ix,nlay) distance between model layer centers !!\param latdeg(ix) latitude (in degrees 90 -> -90) @@ -1663,7 +1663,7 @@ subroutine progcld3 & endif !> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then + if ( iovr == 4 .or. iovr == 5 ) then call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & @@ -1699,7 +1699,7 @@ end subroutine progcld3 !----------------------------------- !> \ingroup module_radiation_clouds -!> This subroutine computes cloud related quantities using +!> This subroutine computes cloud related quantities using !! GFDL Lin MP prognostic cloud microphysics scheme. !!\param plyr (ix,nlay), model layer mean pressure in mb (100Pa) !!\param plvl (ix,nlp1), model level pressure in mb (100Pa) @@ -1726,7 +1726,7 @@ end subroutine progcld3 !!\param julian day of the year (fractional julian day) !!\param yearlen current length of the year (365/366 days) !!\param clouds (ix,nlay,nf_clds), cloud profiles -!!\n clouds(:,:,1) - layer total cloud fraction +!!\n clouds(:,:,1) - layer total cloud fraction !!\n clouds(:,:,2) - layer cloud liquid water path (\f$g m^{-2}\f$) !!\n clouds(:,:,3) - mean effective radius for liquid cloud (micron) !!\n clouds(:,:,4) - layer cloud ice water path (\f$g m^{-2}\f$) @@ -1742,10 +1742,10 @@ end subroutine progcld3 !!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld4 progcld4 General Algorithm !! @{ - subroutine progcld4 & + subroutine progcld4 & & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, & ! --- inputs: & xlat,xlon,slmsk,cldtot, dz, delp, & - & IX, NLAY, NLP1, & + & IX, NLAY, NLP1, & & dzlay, latdeg, julian, yearlen, & & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) @@ -2026,7 +2026,7 @@ subroutine progcld4 & endif !> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then + if ( iovr == 4 .or. iovr == 5 ) then call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & @@ -2102,9 +2102,9 @@ end subroutine progcld4 !!\n clouds(:,:,8) - layer snow flake water path (\f$g m^{-2}\f$) !!\n clouds(:,:,9) - mean effective radius for snow flake (micron) !>\param clds (ix,5), fraction of clouds for low, mid, hi, tot, bl -!>\param mtop (ix,3), vertical indices for low, mid, hi cloud tops +!>\param mtop (ix,3), vertical indices for low, mid, hi cloud tops !>\param mbot (ix,3), vertical indices for low, mid, hi cloud bases -!>\param de_lgth clouds decorrelation length (km) +!>\param de_lgth clouds decorrelation length (km) !!\param alpha (IX,NLAY), alpha decorrelation parameter !>\section gen_progcld4o progcld4o General Algorithm !! @{ @@ -2363,7 +2363,7 @@ subroutine progcld4o & clouds(i,k,3) = rew(i,k) clouds(i,k,4) = cip(i,k) clouds(i,k,5) = rei(i,k) - clouds(i,k,6) = crp(i,k) + clouds(i,k,6) = crp(i,k) clouds(i,k,7) = rer(i,k) clouds(i,k,8) = csp(i,k) clouds(i,k,9) = rei(i,k) @@ -2380,7 +2380,7 @@ subroutine progcld4o & endif !> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then + if ( iovr == 4 .or. iovr == 5 ) then call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & @@ -2513,12 +2513,12 @@ subroutine progcld5 & ! --- inputs integer, intent(in) :: IX, NLAY, NLP1, ICLOUD - integer, intent(in) :: ntrac, ntcw, ntiw, ntrw + integer, intent(in) :: ntrac, ntcw, ntiw, ntrw logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, tvly, qlyr, qstl, rhly, cldcov, delp, dz + & tlyr, tvly, qlyr, qstl, rhly, cldcov, delp, dz, dzlay real (kind=kind_phys), dimension(:,:), intent(inout) :: & & re_cloud, re_ice, re_snow @@ -2577,9 +2577,9 @@ subroutine progcld5 & crp (i,k) = 0.0 csp (i,k) = 0.0 rew (i,k) = re_cloud(i,k) - rei (i,k) = re_ice(i,k) + rei (i,k) = re_ice(i,k) rer (i,k) = rrain_def ! default rain radius to 1000 micron - res (i,k) = re_snow(i,K) + res (i,k) = re_snow(i,K) ! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) ) clwf(i,k) = 0.0 enddo @@ -2605,7 +2605,7 @@ subroutine progcld5 & do k = 1, NLAY do i = 1, IX - clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) enddo enddo !> - Find top pressure for each cloud domain for given latitude. @@ -2726,7 +2726,7 @@ subroutine progcld5 & enddo enddo endif -!mz +!mz if (icloud .ne. 0) then ! assign/calculate efective radii for cloud water, ice, rain, snow @@ -2748,7 +2748,7 @@ subroutine progcld5 & endif enddo -!> -# Compute effective ice cloud droplet radius following Heymsfield +!> -# Compute effective ice cloud droplet radius following Heymsfield !! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. do k = 1, NLAY @@ -2770,13 +2770,13 @@ subroutine progcld5 & rei(i,k) = max(25.,rei(i,k)) !mz* HWRF endif rei(i,k) = min(rei(i,k), 135.72) !- 1.0315*rei<= 140 microns - enddo - enddo + enddo + enddo -!mz +!mz !> -# Compute effective snow cloud droplet radius - do k = 1, NLAY - do i = 1, IX + do k = 1, NLAY + do i = 1, IX res(i,k) = 10.0 enddo enddo @@ -2790,14 +2790,14 @@ subroutine progcld5 & clouds(i,k,3) = rew(i,k) clouds(i,k,4) = cip(i,k) clouds(i,k,5) = rei(i,k) - clouds(i,k,6) = crp(i,k) ! added for Thompson + clouds(i,k,6) = crp(i,k) ! added for Thompson clouds(i,k,7) = rer(i,k) !mz inflg .ne.5 - clouds(i,k,8) = 0. + clouds(i,k,8) = 0. clouds(i,k,9) = 10. !mz for diagnostics? re_cloud(i,k) = rew(i,k) - re_ice(i,k) = rei(i,k) + re_ice(i,k) = rei(i,k) re_snow(i,k) = 10. enddo @@ -2813,7 +2813,7 @@ subroutine progcld5 & endif !> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then + if ( iovr == 4 .or. iovr == 5 ) then call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & @@ -2856,7 +2856,8 @@ subroutine progcld6 & & IX, NLAY, NLP1, & & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & - & clouds,clds,mtop,mbot,de_lgth & ! --- outputs: + & dzlay, latdeg, julian, yearlen, & + & clouds,clds,mtop,mbot,de_lgth,alpha & ! --- outputs: & ) ! ================= subprogram documentation block ================ ! @@ -2876,296 +2877,301 @@ subroutine progcld6 & ! subprograms called: gethml ! ! ! ! attributes: ! -! language: fortran 90 ! -! machine: ibm-sp, sgi ! -! ! -! ! -! ==================== definition of variables ==================== ! -! ! -! ! -! input variables: ! -! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! -! plvl (IX,NLP1) : model level pressure in mb (100Pa) ! -! tlyr (IX,NLAY) : model layer mean temperature in k ! -! tvly (IX,NLAY) : model layer virtual temperature in k ! -! qlyr (IX,NLAY) : layer specific humidity in gm/gm ! -! qstl (IX,NLAY) : layer saturate humidity in gm/gm ! -! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) ! -! clw (IX,NLAY,ntrac) : layer cloud condensate amount ! -! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2! -! range, otherwise see in-line comment ! -! xlon (IX) : grid longitude in radians (not used) ! -! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! -! dz (ix,nlay) : layer thickness (km) ! -! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! -! IX : horizontal dimention ! -! NLAY,NLP1 : vertical layer/level dimensions ! -! uni_cld : logical - true for cloud fraction from shoc ! -! lmfshal : logical - true for mass flux shallow convection ! -! lmfdeep2 : logical - true for mass flux deep convection ! -! cldcov : layer cloud fraction (used when uni_cld=.true. ! -! ! -! output variables: ! -! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! -! clouds(:,:,1) - layer total cloud fraction ! -! clouds(:,:,2) - layer cloud liq water path (g/m**2) ! -! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! -! clouds(:,:,4) - layer cloud ice water path (g/m**2) ! -! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! -! clouds(:,:,6) - layer rain drop water path not assigned ! -! clouds(:,:,7) - mean eff radius for rain drop (micron) ! -! *** clouds(:,:,8) - layer snow flake water path not assigned ! -! clouds(:,:,9) - mean eff radius for snow flake (micron) ! -! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) ! -! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! -! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! -! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! -! de_lgth(ix) : clouds decorrelation length (km) ! -! ! -! module variables: ! -! ivflip : control flag of vertical index direction ! -! =0: index from toa to surface ! -! =1: index from surface to toa ! -! lmfshal : mass-flux shallow conv scheme flag ! -! lmfdeep2 : scale-aware mass-flux deep conv scheme flag ! -! lcrick : control flag for eliminating CRICK ! -! =t: apply layer smoothing to eliminate CRICK ! -! =f: do not apply layer smoothing ! -! lcnorm : control flag for in-cld condensate ! -! =t: normalize cloud condensate ! -! =f: not normalize cloud condensate ! -! ! -! ==================== end of description ===================== ! -! +! language: fortran 90 ! +! machine: ibm-sp, sgi ! +! ! +! ! +! ==================== definition of variables ==================== ! +! ! +! ! +! input variables: ! +! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! +! plvl (IX,NLP1) : model level pressure in mb (100Pa) ! +! tlyr (IX,NLAY) : model layer mean temperature in k ! +! tvly (IX,NLAY) : model layer virtual temperature in k ! +! qlyr (IX,NLAY) : layer specific humidity in gm/gm ! +! qstl (IX,NLAY) : layer saturate humidity in gm/gm ! +! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) ! +! clw (IX,NLAY,ntrac) : layer cloud condensate amount ! +! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2! +! range, otherwise see in-line comment ! +! xlon (IX) : grid longitude in radians (not used) ! +! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! +! dz (ix,nlay) : layer thickness (km) ! +! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! +! IX : horizontal dimention ! +! NLAY,NLP1 : vertical layer/level dimensions ! +! uni_cld : logical - true for cloud fraction from shoc ! +! lmfshal : logical - true for mass flux shallow convection ! +! lmfdeep2 : logical - true for mass flux deep convection ! +! cldcov : layer cloud fraction (used when uni_cld=.true. ! +! ! +! output variables: ! +! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! +! clouds(:,:,1) - layer total cloud fraction ! +! clouds(:,:,2) - layer cloud liq water path (g/m**2) ! +! clouds(:,:,3) - mean eff radius for liq cloud (micron) ! +! clouds(:,:,4) - layer cloud ice water path (g/m**2) ! +! clouds(:,:,5) - mean eff radius for ice cloud (micron) ! +! clouds(:,:,6) - layer rain drop water path not assigned ! +! clouds(:,:,7) - mean eff radius for rain drop (micron) ! +! *** clouds(:,:,8) - layer snow flake water path not assigned ! +! clouds(:,:,9) - mean eff radius for snow flake (micron) ! +! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) ! +! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! +! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! +! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! +! de_lgth(ix) : clouds decorrelation length (km) ! +! ! +! module variables: ! +! ivflip : control flag of vertical index direction ! +! =0: index from toa to surface ! +! =1: index from surface to toa ! +! lmfshal : mass-flux shallow conv scheme flag ! +! lmfdeep2 : scale-aware mass-flux deep conv scheme flag ! +! lcrick : control flag for eliminating CRICK ! +! =t: apply layer smoothing to eliminate CRICK ! +! =f: do not apply layer smoothing ! +! lcnorm : control flag for in-cld condensate ! +! =t: normalize cloud condensate ! +! =f: not normalize cloud condensate ! +! ! +! ==================== end of description ===================== ! +! implicit none ! --- inputs integer, intent(in) :: IX, NLAY, NLP1 integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl - logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 - - real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & - & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, & - & re_cloud, re_ice, re_snow - - real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw - - real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & - & slmsk - -! --- outputs - real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds - - real (kind=kind_phys), dimension(:,:), intent(out) :: clds - real (kind=kind_phys), dimension(:), intent(out) :: de_lgth - - integer, dimension(:,:), intent(out) :: mtop,mbot - -! --- local variables: - real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, & - & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf - - real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix) + logical, intent(in) :: uni_cld, lmfshal, lmfdeep2 + + real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & + & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, dzlay, & + & re_cloud, re_ice, re_snow + + real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw + + real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & + & slmsk + + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian + integer, intent(in) :: yearlen + +! --- outputs + real (kind=kind_phys), dimension(:,:,:), intent(out) :: clouds + + real (kind=kind_phys), dimension(:,:), intent(out) :: clds + real (kind=kind_phys), dimension(:), intent(out) :: de_lgth + real (kind=kind_phys), dimension(:,:), intent(out) :: alpha + + integer, dimension(:,:), intent(out) :: mtop,mbot + +! --- local variables: + real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, & + & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf + + real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix) real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, & & tem1, tem2, tem3 integer :: i, k, id, nf - -! --- constant values -! real (kind=kind_phys), parameter :: xrc3 = 200. - real (kind=kind_phys), parameter :: xrc3 = 100. - -! -!===> ... begin here - -! - do nf=1,nf_clds - do k=1,nlay - do i=1,ix - clouds(i,k,nf) = 0.0 - enddo - enddo - enddo -! clouds(:,:,:) = 0.0 - - do k = 1, NLAY - do i = 1, IX - cldtot(i,k) = 0.0 - cldcnv(i,k) = 0.0 - cwp (i,k) = 0.0 - cip (i,k) = 0.0 - crp (i,k) = 0.0 - csp (i,k) = 0.0 - rew (i,k) = re_cloud(i,k) - rei (i,k) = re_ice(i,k) - rer (i,k) = rrain_def ! default rain radius to 1000 micron - res (i,k) = re_snow(i,K) -! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) ) - clwf(i,k) = 0.0 - enddo - enddo -! -! -! if ( lcrick ) then -! do i = 1, IX -! clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2) -! clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1) -! enddo -! do k = 2, NLAY-1 -! do i = 1, IX -! clwf(i,K) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1) -! enddo -! enddo -! else -! do k = 1, NLAY -! do i = 1, IX -! clwf(i,k) = clw(i,k) -! enddo -! enddo -! endif - - do k = 1, NLAY - do i = 1, IX - clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) - enddo - enddo -!> - Find top pressure for each cloud domain for given latitude. -!! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; -!! i=1,2 are low-lat (<45 degree) and pole regions) - - do i =1, IX - rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range -! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range - enddo - - do id = 1, 4 - tem1 = ptopc(id,2) - ptopc(id,1) - - do i =1, IX - ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) - enddo - enddo - -!> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . - - do k = 1, NLAY - do i = 1, IX - cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k)) - cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k)) - crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) - csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * & - & gfac * delp(i,k)) - enddo - enddo - - if (uni_cld) then ! use unified sgs clouds generated outside - do k = 1, NLAY - do i = 1, IX - cldtot(i,k) = cldcov(i,k) - enddo - enddo - - else - + +! --- constant values +! real (kind=kind_phys), parameter :: xrc3 = 200. + real (kind=kind_phys), parameter :: xrc3 = 100. + +! +!===> ... begin here + +! + do nf=1,nf_clds + do k=1,nlay + do i=1,ix + clouds(i,k,nf) = 0.0 + enddo + enddo + enddo +! clouds(:,:,:) = 0.0 + + do k = 1, NLAY + do i = 1, IX + cldtot(i,k) = 0.0 + cldcnv(i,k) = 0.0 + cwp (i,k) = 0.0 + cip (i,k) = 0.0 + crp (i,k) = 0.0 + csp (i,k) = 0.0 + rew (i,k) = re_cloud(i,k) + rei (i,k) = re_ice(i,k) + rer (i,k) = rrain_def ! default rain radius to 1000 micron + res (i,k) = re_snow(i,K) +! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) ) + clwf(i,k) = 0.0 + enddo + enddo +! +! +! if ( lcrick ) then +! do i = 1, IX +! clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2) +! clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1) +! enddo +! do k = 2, NLAY-1 +! do i = 1, IX +! clwf(i,K) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1) +! enddo +! enddo +! else +! do k = 1, NLAY +! do i = 1, IX +! clwf(i,k) = clw(i,k) +! enddo +! enddo +! endif + + do k = 1, NLAY + do i = 1, IX + clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) + enddo + enddo +!> - Find top pressure for each cloud domain for given latitude. +!! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; +!! i=1,2 are low-lat (<45 degree) and pole regions) + + do i =1, IX + rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range +! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range + enddo + + do id = 1, 4 + tem1 = ptopc(id,2) - ptopc(id,1) + + do i =1, IX + ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) + enddo + enddo + +!> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . + + do k = 1, NLAY + do i = 1, IX + cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k)) + cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k)) + crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) + csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * & + & gfac * delp(i,k)) + enddo + enddo + + if (uni_cld) then ! use unified sgs clouds generated outside + do k = 1, NLAY + do i = 1, IX + cldtot(i,k) = cldcov(i,k) + enddo + enddo + + else + !> - Calculate layer cloud fraction. - clwmin = 0.0 - if (.not. lmfshal) then - do k = 1, NLAY - do i = 1, IX - clwt = 1.0e-6 * (plyr(i,k)*0.001) -! clwt = 2.0e-6 * (plyr(i,k)*0.001) - - if (clwf(i,k) > clwt) then - - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 - -! tem1 = 1000.0 / tem1 - - value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - - cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - else - do k = 1, NLAY - do i = 1, IX - clwt = 1.0e-6 * (plyr(i,k)*0.001) -! clwt = 2.0e-6 * (plyr(i,k)*0.001) - - if (clwf(i,k) > clwt) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) -! - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan - if (lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif -! - value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - - cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - endif - - endif ! if (uni_cld) then - - do k = 1, NLAY - do i = 1, IX - if (cldtot(i,k) < climit) then - cldtot(i,k) = 0.0 - cwp(i,k) = 0.0 - cip(i,k) = 0.0 - crp(i,k) = 0.0 - csp(i,k) = 0.0 - endif - enddo - enddo - - if ( lcnorm ) then - do k = 1, NLAY - do i = 1, IX - if (cldtot(i,k) >= climit) then - tem1 = 1.0 / max(climit2, cldtot(i,k)) - cwp(i,k) = cwp(i,k) * tem1 - cip(i,k) = cip(i,k) * tem1 - crp(i,k) = crp(i,k) * tem1 - csp(i,k) = csp(i,k) * tem1 - endif - enddo - enddo - endif - -! - do k = 1, NLAY - do i = 1, IX - clouds(i,k,1) = cldtot(i,k) - clouds(i,k,2) = cwp(i,k) - clouds(i,k,3) = rew(i,k) - clouds(i,k,4) = cip(i,k) - clouds(i,k,5) = rei(i,k) - clouds(i,k,6) = crp(i,k) ! added for Thompson - clouds(i,k,7) = rer(i,k) - clouds(i,k,8) = csp(i,k) ! added for Thompson - clouds(i,k,9) = res(i,k) - enddo - enddo - -! --- ... estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later + clwmin = 0.0 + if (.not. lmfshal) then + do k = 1, NLAY + do i = 1, IX + clwt = 1.0e-6 * (plyr(i,k)*0.001) +! clwt = 2.0e-6 * (plyr(i,k)*0.001) + + if (clwf(i,k) > clwt) then + + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) + + tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + tem1 = 2000.0 / tem1 + +! tem1 = 1000.0 / tem1 + + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + + cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + else + do k = 1, NLAY + do i = 1, IX + clwt = 1.0e-6 * (plyr(i,k)*0.001) +! clwt = 2.0e-6 * (plyr(i,k)*0.001) + + if (clwf(i,k) > clwt) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) +! + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + if (lmfdeep2) then + tem1 = xrc3 / tem1 + else + tem1 = 100.0 / tem1 + endif +! + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + + cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + endif + + endif ! if (uni_cld) then + + do k = 1, NLAY + do i = 1, IX + if (cldtot(i,k) < climit) then + cldtot(i,k) = 0.0 + cwp(i,k) = 0.0 + cip(i,k) = 0.0 + crp(i,k) = 0.0 + csp(i,k) = 0.0 + endif + enddo + enddo + + if ( lcnorm ) then + do k = 1, NLAY + do i = 1, IX + if (cldtot(i,k) >= climit) then + tem1 = 1.0 / max(climit2, cldtot(i,k)) + cwp(i,k) = cwp(i,k) * tem1 + cip(i,k) = cip(i,k) * tem1 + crp(i,k) = crp(i,k) * tem1 + csp(i,k) = csp(i,k) * tem1 + endif + enddo + enddo + endif + +! + do k = 1, NLAY + do i = 1, IX + clouds(i,k,1) = cldtot(i,k) + clouds(i,k,2) = cwp(i,k) + clouds(i,k,3) = rew(i,k) + clouds(i,k,4) = cip(i,k) + clouds(i,k,5) = rei(i,k) + clouds(i,k,6) = crp(i,k) ! added for Thompson + clouds(i,k,7) = rer(i,k) + clouds(i,k,8) = csp(i,k) ! added for Thompson + clouds(i,k,9) = res(i,k) + enddo + enddo + +! --- ... estimate clouds decorrelation length in km +! this is only a tentative test, need to consider change later if ( iovr == 3 ) then do i = 1, ix @@ -3173,9 +3179,19 @@ subroutine progcld6 & enddo endif +!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options + if ( iovr == 4 .or. iovr == 5 ) then + call get_alpha_exp & +! --- inputs: + & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & +! --- outputs: + & alpha & + & ) + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer -!! cloud fractions and clouds top/bottom layer indices for low, mid, -!! and high clouds. +!! cloud fractions and clouds top/bottom layer indices for low, mid, +!! and high clouds. ! --- compute low, mid, high, total, and boundary layer cloud fractions ! and clouds top/bottom layer indices for low, mid, and high clouds. ! The three cloud domain boundaries are defined by ptopc. The cloud @@ -3184,15 +3200,14 @@ subroutine progcld6 & call gethml & ! --- inputs: - & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, & + & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & & IX,NLAY, & ! --- outputs: & clds, mtop, mbot & & ) - ! - return + return !............................................ end subroutine progcld6 @@ -3233,9 +3248,9 @@ end subroutine progcld6 !!\n (:,:,3) - mean eff radius for liq cloud (micron) !!\n (:,:,4) - layer cloud ice water path \f$(g/m^2)\f$ !!\n (:,:,5) - mean eff radius for ice cloud (micron) -!!\n (:,:,6) - layer rain drop water path +!!\n (:,:,6) - layer rain drop water path !!\n (:,:,7) - mean eff radius for rain drop (micron) -!!\n (:,:,8) - layer snow flake water path +!!\n (:,:,8) - layer snow flake water path !!\n (:,:,9) - mean eff radius for snow flake (micron) !!\param clds (IX,5), fraction of clouds for low, mid, hi, tot, bl !!\param mtop (IX,3), vertical indices for low, mid, hi cloud tops @@ -3494,7 +3509,7 @@ subroutine progclduni & endif enddo -!> -# Compute effective ice cloud droplet radius following Heymsfield +!> -# Compute effective ice cloud droplet radius following Heymsfield !! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. do k = 1, NLAY @@ -3562,7 +3577,7 @@ subroutine progclduni & endif !> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then + if ( iovr == 4 .or. iovr == 5 ) then call get_alpha_exp & ! --- inputs: & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & @@ -4034,18 +4049,18 @@ end subroutine gethml ! ######################################################################################### subroutine get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, & & de_lgth, cloud_overlap_param) - + integer, intent(in) :: nCol, nLev real(kind_phys), intent(in) :: con_pi real(kind_phys), dimension(nCol), intent(in) :: lat real(kind_phys), dimension(nCol,nLev),intent(in) :: deltaZ - real(kind_phys), dimension(nCol),intent(out) :: de_lgth + real(kind_phys), dimension(nCol),intent(out) :: de_lgth real(kind_phys), dimension(nCol,nLev),intent(out) :: & & cloud_overlap_param - + ! Local - integer :: iCol, iLay - + integer :: iCol, iLay + do iCol =1,nCol de_lgth(iCol) = max( 0.6, 2.78-4.6*abs(lat(iCol)/con_pi) ) do iLay=nLev,2,-1 @@ -4057,7 +4072,7 @@ subroutine get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, & enddo enddo end subroutine get_alpha_dcorr - + ! ######################################################################################### !> \ingroup module_radiation_clouds !! This program derives the exponential transition, alpha, from maximum to @@ -4065,10 +4080,10 @@ end subroutine get_alpha_dcorr !! for the exponential (EXP, iovrlp=4) or the exponential-random (ER, iovrlp=5) !! cloud overlap options for RRTMG/RRTMGP. For exponential, the transition from !! maximum to random with distance through model layers occurs without regard -!! to the configuration of clear and cloudy layers. For the ER method, each +!! to the configuration of clear and cloudy layers. For the ER method, each !! block of adjacent cloudy layers is treated with a separate transition from !! maximum to random, and blocks of cloudy layers separated by one or more -!! clear layers are correlated randomly. +!! clear layers are correlated randomly. !> /param nlon : number of model longitude points !> /param nlay : vertical layer dimension !> /param dzlay(nlon,nlay) : distance between the center of model layers @@ -4188,21 +4203,21 @@ subroutine get_alpha_exp & ! !===> ... begin here ! -! If exponential or exponential-random cloud overlap is used: +! If exponential or exponential-random cloud overlap is used: ! derive day-of-year and latitude-varying decorrelation lendth if requested; ! otherwise use the constant decorrelation length, decorr_con, specified in physcons.F90 do i = 1, nlon if (iovrlp == 4 .or. iovrlp == 5) then - if (idcor .eq. 1) then + if (idcor .eq. 1) then if (juldat .gt. 181._kind_phys) then am3 = -4._kind_phys * amr * (juldat - 272._kind_phys) & / yearlen else - am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) + am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) & / yearlen endif ! For latitude in degrees, decorr_len in km - decorr_len(i) = am1 + am2 * exp( -(latdeg(i) - am3)**2 + decorr_len(i) = am1 + am2 * exp( -(latdeg(i) - am3)**2 & / am4**2) else decorr_len(i) = decorr_con @@ -4294,17 +4309,17 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, & !+---+ !..First cut scale-aware. Higher resolution should require closer to -!.. saturated grid box for higher cloud fraction. Simple functions -!.. chosen based on Mocko and Cotton (1995) starting point and desire -!.. to get near 100% RH as grid spacing moves toward 1.0km, but higher -!.. RH over ocean required as compared to over land. - - RH_00L = 0.7 + SQRT(1./(25.0+gridkm*gridkm*gridkm)) - RH_00O = 0.81 + SQRT(1./(50.0+gridkm*gridkm*gridkm)) +!.. saturated grid box for higher cloud fraction. Simple functions +!.. chosen based on Mocko and Cotton (1995) starting point and desire +!.. to get near 100% RH as grid spacing moves toward 1.0km, but higher +!.. RH over ocean required as compared to over land. + + RH_00L = 0.7 + SQRT(1./(25.0+gridkm*gridkm*gridkm)) + RH_00O = 0.81 + SQRT(1./(50.0+gridkm*gridkm*gridkm)) DO j = jts,jte DO k = kts,kte - DO i = its,ite + DO i = its,ite RHI_max = 0.0 CLDFRA(I,K,J) = 0.0 @@ -4377,11 +4392,11 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, & ENDDO ! if (debug_flag) then -! WRITE (dbg_msg,*) 'DEBUG-GT: finding cloud layers at point (', i, ', ', j, ')' +! WRITE (dbg_msg,*) 'DEBUG-GT: finding cloud layers at point (', i, ', ', j, ')' ! CALL wrf_debug (150, dbg_msg) -! endif +! endif call find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & - & debug_flag, qc1d, qi1d, qs1d, kts,kte) + & debug_flag, qc1d, qi1d, qs1d, kts,kte) DO k = kts,kte cldfra(i,k,j) = cfr1d(k) @@ -4399,7 +4414,7 @@ END SUBROUTINE cal_cldfra3 !.. unless existing LWC/IWC is already there. SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & - & debugfl, qc1d, qi1d, qs1d, kts,kte) + & debugfl, qc1d, qi1d, qs1d, kts,kte) ! IMPLICIT NONE @@ -4439,8 +4454,8 @@ SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & dz(kts) = dz(kts+1) !..Find tropopause height, best surrogate, because we would not really -!.. wish to put fake clouds into the stratosphere. The 10/1500 ratio -!.. d(Theta)/d(Z) approximates a vertical line on typical SkewT chart +!.. wish to put fake clouds into the stratosphere. The 10/1500 ratio +!.. d(Theta)/d(Z) approximates a vertical line on typical SkewT chart !.. near typical (mid-latitude) tropopause height. Since messy data !.. could give us a false signal of such a transition, do the check over !.. three K-level change, not just a level-to-level check. This method @@ -4504,103 +4519,103 @@ SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, R1d, entrmnt, & in_cloud = .true. k_cldt = MAX(k_cldt, k) endif - if (in_cloud) then - DO k2 = k_cldt-1, k_m12C, -1 - if (cfr1d(k2).lt.0.01 .or. k2.eq.k_m12C) then - k_cldb = k2+1 - goto 87 - endif - ENDDO - 87 continue - in_cloud = .false. - endif - if ((k_cldt - k_cldb + 1) .ge. 2) then -! if (debugfl) then + if (in_cloud) then + DO k2 = k_cldt-1, k_m12C, -1 + if (cfr1d(k2).lt.0.01 .or. k2.eq.k_m12C) then + k_cldb = k2+1 + goto 87 + endif + ENDDO + 87 continue + in_cloud = .false. + endif + if ((k_cldt - k_cldb + 1) .ge. 2) then +! if (debugfl) then ! print*, 'An ice cloud layer is found between ', k_cldt, ! k_cldb, P1d(k_cldt)*0.01, P1d(k_cldb)*0.01 ! WRITE (dbg_msg,*) 'DEBUG-GT: An ice cloud layer is found between ! ', k_cldt, k_cldb, P1d(k_cldt)*0.01, P1d(k_cldb)*0.01 -! CALL wrf_debug (150, dbg_msg) -! endif +! CALL wrf_debug (150, dbg_msg) +! endif call adjust_cloudIce(cfr1d, qi1d, qs1d, qvs1d, T1d,R1d,dz, & - & entrmnt, k_cldb,k_cldt,kts,kte) - k = k_cldb - else + & entrmnt, k_cldb,k_cldt,kts,kte) + k = k_cldb + else if (cfr1d(k_cldb).gt.0.and.qi1d(k_cldb).lt.1.E-6) & - & qi1d(k_cldb)=1.E-5*cfr1d(k_cldb) - endif - - - k = k - 1 - ENDDO - - - - k_cldb = k_tropo - in_cloud = .false. - k = k_m12C + 2 - DO WHILE (.not. in_cloud .AND. k.gt.kbot) - k_cldt = 0 - if (cfr1d(k).ge.0.01) then - in_cloud = .true. - k_cldt = MAX(k_cldt, k) - endif - if (in_cloud) then - DO k2 = k_cldt-1, kbot, -1 - if (cfr1d(k2).lt.0.01 .or. k2.eq.kbot) then - k_cldb = k2+1 - goto 88 - endif - ENDDO - 88 continue - in_cloud = .false. - endif - if ((k_cldt - k_cldb + 1) .ge. 2) then -! if (debugfl) then + & qi1d(k_cldb)=1.E-5*cfr1d(k_cldb) + endif + + + k = k - 1 + ENDDO + + + + k_cldb = k_tropo + in_cloud = .false. + k = k_m12C + 2 + DO WHILE (.not. in_cloud .AND. k.gt.kbot) + k_cldt = 0 + if (cfr1d(k).ge.0.01) then + in_cloud = .true. + k_cldt = MAX(k_cldt, k) + endif + if (in_cloud) then + DO k2 = k_cldt-1, kbot, -1 + if (cfr1d(k2).lt.0.01 .or. k2.eq.kbot) then + k_cldb = k2+1 + goto 88 + endif + ENDDO + 88 continue + in_cloud = .false. + endif + if ((k_cldt - k_cldb + 1) .ge. 2) then +! if (debugfl) then ! print*, 'A water cloud layer is found between ', k_cldt, ! k_cldb, P1d(k_cldt)*0.01, P1d(k_cldb)*0.01 ! WRITE (dbg_msg,*) 'DEBUG-GT: A water cloud layer is found ! between ', k_cldt, k_cldb, P1d(k_cldt)*0.01, P1d(k_cldb)*0.01 -! CALL wrf_debug (150, dbg_msg) -! endif +! CALL wrf_debug (150, dbg_msg) +! endif call adjust_cloudH2O(cfr1d, qc1d, qvs1d, T1d,R1d,dz, & - & entrmnt, k_cldb,k_cldt,kts,kte) - k = k_cldb - else + & entrmnt, k_cldb,k_cldt,kts,kte) + k = k_cldb + else if (cfr1d(k_cldb).gt.0.and.qc1d(k_cldb).lt.1.E-6) & - & qc1d(k_cldb)=1.E-5*cfr1d(k_cldb) - endif - k = k - 1 - ENDDO - + & qc1d(k_cldb)=1.E-5*cfr1d(k_cldb) + endif + k = k - 1 + ENDDO + !..Do a final total column adjustment since we may have added more than -!1mm -!.. LWP/IWP for multiple cloud decks. - - call adjust_cloudFinal(cfr1d, qc1d, qi1d, R1d,dz, kts,kte,k_tropo) - -! if (debugfl) then -! print*, ' Made-up fake profile of clouds' -! do k = kte, kts, -1 +!1mm +!.. LWP/IWP for multiple cloud decks. + + call adjust_cloudFinal(cfr1d, qc1d, qi1d, R1d,dz, kts,kte,k_tropo) + +! if (debugfl) then +! print*, ' Made-up fake profile of clouds' +! do k = kte, kts, -1 ! write(*,'(i3, 2x, f8.2, 2x, f9.2, 2x, f6.2, 2x, f15.7, 2x, -! f15.7)') & +! f15.7)') & ! & K, T1d(k)-273.15, P1d(k)*0.01, cfr1d(k)*100., -! qc1d(k)*1000.,qi1d(k)*1000. -! enddo -! WRITE (dbg_msg,*) 'DEBUG-GT: Made-up fake profile of clouds' -! CALL wrf_debug (150, dbg_msg) -! do k = kte, kts, -1 +! qc1d(k)*1000.,qi1d(k)*1000. +! enddo +! WRITE (dbg_msg,*) 'DEBUG-GT: Made-up fake profile of clouds' +! CALL wrf_debug (150, dbg_msg) +! do k = kte, kts, -1 ! write(dbg_msg,'(f8.2, 2x, f9.2, 2x, f6.2, 2x, f15.7, 2x, -! f15.7)') & +! f15.7)') & ! & T1d(k)-273.15, P1d(k)*0.01, cfr1d(k)*100., -! qc1d(k)*1000.,qi1d(k)*1000. -! CALL wrf_debug (150, dbg_msg) -! enddo -! endif - - - END SUBROUTINE find_cloudLayers - +! qc1d(k)*1000.,qi1d(k)*1000. +! CALL wrf_debug (150, dbg_msg) +! enddo +! endif + + + END SUBROUTINE find_cloudLayers + !+---+-----------------------------------------------------------------+ SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs, T,Rho,dz, entr, k1,k2, & diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index 0bfc332ab..daa20e45d 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -1713,7 +1713,7 @@ end subroutine rlwinit !> @{ subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & nlay, nlp1, ipseed, dz, de_lgth, iovrlw, alpha & + & nlay, nlp1, ipseed, dz, de_lgth, iovrlw, alpha, & & cldfmc, taucld & ! --- outputs & ) From 7d6d8ce473297eed5224cd3a52a1ddffbbe41b9b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 14 Oct 2020 09:15:53 -0600 Subject: [PATCH 379/404] Add capability to print debugging output for all blocks and threads in init phase --- physics/GFS_debug.F90 | 63 +++++++++++++++++++++++++++-- physics/GFS_debug.meta | 92 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+), 3 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 35b44ca0e..4680f8de7 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -311,7 +311,37 @@ module GFS_diagtoscreen contains - subroutine GFS_diagtoscreen_init () +!> \section arg_table_GFS_diagtoscreen_init Argument Table +!! \htmlinclude GFS_diagtoscreen_init.html +!! + subroutine GFS_diagtoscreen_init (Model, Data, Interstitial, errmsg, errflg) + + use GFS_typedefs, only: GFS_control_type, GFS_data_type, & + GFS_interstitial_type + + implicit none + + !--- interface variables + type(GFS_control_type), intent(in) :: Model + type(GFS_data_type), intent(in) :: Data(:) + type(GFS_interstitial_type), intent(in) :: Interstitial(:) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + !--- local variables + integer :: i + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + do i=1,size(Data) + call GFS_diagtoscreen_run (Model, Data(i)%Statein, Data(i)%Stateout, Data(i)%Sfcprop, & + Data(i)%Coupling, Data(i)%Grid, Data(i)%Tbd, Data(i)%Cldprop, & + Data(i)%Radtend, Data(i)%Intdiag, Interstitial(1), & + size(Interstitial), i, errmsg, errflg) + end do + end subroutine GFS_diagtoscreen_init subroutine GFS_diagtoscreen_finalize () @@ -330,7 +360,6 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, #ifdef OPENMP use omp_lib #endif - use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type, GFS_statein_type, & GFS_stateout_type, GFS_sfcprop_type, & GFS_coupling_type, GFS_grid_type, & @@ -831,7 +860,35 @@ module GFS_interstitialtoscreen contains - subroutine GFS_interstitialtoscreen_init () + subroutine GFS_interstitialtoscreen_init (Model, Data, Interstitial, errmsg, errflg) + + use GFS_typedefs, only: GFS_control_type, GFS_data_type, & + GFS_interstitial_type + + implicit none + + !--- interface variables + type(GFS_control_type), intent(in) :: Model + type(GFS_data_type), intent(in) :: Data(:) + type(GFS_interstitial_type), intent(in) :: Interstitial(:) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + !--- local variables + integer :: i + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + + do i=1,size(Interstitial) + call GFS_interstitialtoscreen_run (Model, Data(1)%Statein, Data(1)%Stateout, Data(1)%Sfcprop, & + Data(1)%Coupling, Data(1)%Grid, Data(1)%Tbd, Data(1)%Cldprop, & + Data(1)%Radtend, Data(1)%Intdiag, Interstitial(i), & + size(Interstitial), -999, errmsg, errflg) + end do + end subroutine GFS_interstitialtoscreen_init subroutine GFS_interstitialtoscreen_finalize () diff --git a/physics/GFS_debug.meta b/physics/GFS_debug.meta index d93e22328..6e6315d5b 100644 --- a/physics/GFS_debug.meta +++ b/physics/GFS_debug.meta @@ -3,6 +3,52 @@ type = scheme dependencies = machine.F +######################################################################## +[ccpp-arg-table] + name = GFS_diagtoscreen_init + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type in FV3 + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Data] + standard_name = GFS_data_type_instance_all_blocks + long_name = instance of derived type GFS_data_type + units = DDT + dimensions = (ccpp_block_count) + type = GFS_data_type + intent = in + optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance_all_threads + long_name = instance of derived type GFS_interstitial_type + units = DDT + dimensions = (omp_threads) + type = GFS_interstitial_type + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = GFS_diagtoscreen_run @@ -135,6 +181,52 @@ type = scheme dependencies = machine.F +######################################################################## +[ccpp-arg-table] + name = GFS_interstitialtoscreen_init + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type in FV3 + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Data] + standard_name = GFS_data_type_instance_all_blocks + long_name = instance of derived type GFS_data_type + units = DDT + dimensions = (ccpp_block_count) + type = GFS_data_type + intent = in + optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance_all_threads + long_name = instance of derived type GFS_interstitial_type + units = DDT + dimensions = (omp_threads) + type = GFS_interstitial_type + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + ######################################################################## [ccpp-arg-table] name = GFS_interstitialtoscreen_run From 05b9aba6cad4760c5f5fdd9e55e8485a88c28674 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 14 Oct 2020 09:19:17 -0600 Subject: [PATCH 380/404] Fix RUC LSM initialization --- physics/sfc_drv_ruc.F90 | 123 +++++++++++++++++---------------------- physics/sfc_drv_ruc.meta | 21 +++++-- 2 files changed, 68 insertions(+), 76 deletions(-) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index 6626d8fb6..7af8c3497 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -31,7 +31,7 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & lsm_ruc, lsm, slmsk, stype, vtype, & ! in tsfc_lnd, tsfc_wat, & ! in tg3, smc, slc, stc, & ! in - sh2o, smfrkeep, tslb, smois, wetness, & ! out + zs, sh2o, smfrkeep, tslb, smois, wetness, & ! out tsice, errmsg, errflg) implicit none @@ -47,12 +47,12 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & integer, intent(in) :: lsm_ruc, lsm - real (kind=kind_phys), dimension(im), intent(in ) :: slmsk - real (kind=kind_phys), dimension(im), intent(in ) :: stype - real (kind=kind_phys), dimension(im), intent(in ) :: vtype - real (kind=kind_phys), dimension(im), intent(in ) :: tsfc_lnd - real (kind=kind_phys), dimension(im), intent(in ) :: tsfc_wat - real (kind=kind_phys), dimension(im), intent(in) :: tg3 + real (kind=kind_phys), dimension(im), intent(in) :: slmsk + real (kind=kind_phys), dimension(im), intent(in) :: stype + real (kind=kind_phys), dimension(im), intent(in) :: vtype + real (kind=kind_phys), dimension(im), intent(in) :: tsfc_lnd + real (kind=kind_phys), dimension(im), intent(in) :: tsfc_wat + real (kind=kind_phys), dimension(im), intent(in) :: tg3 real (kind=kind_phys), dimension(im,lsoil), intent(in) :: smc,slc,stc @@ -60,14 +60,16 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & real (kind=kind_phys), dimension(im), intent(inout) :: wetness ! --- out - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(out) :: sh2o, smfrkeep - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(out) :: tslb, smois + real (kind=kind_phys), dimension(:), intent(out) :: zs + real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: sh2o, smfrkeep + real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb, smois real (kind=kind_phys), dimension(im,kice), intent(out) :: tsice character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! --- local + real (kind=kind_phys), dimension(lsoil_ruc) :: dzs integer :: ipr, i, k logical :: debug_print integer, dimension(im) :: soiltyp, vegtype @@ -125,14 +127,16 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & endif enddo + call init_soil_depth_3 ( zs , dzs , lsoil_ruc ) + !if( .not. flag_restart) then call rucinit (flag_restart, im, lsoil_ruc, lsoil, nlev, & ! in - me, master, lsm_ruc, lsm, slmsk, & ! in - soiltyp, vegtype, & ! in - tsfc_lnd, tsfc_wat, tg3, & ! in - smc, slc, stc, & ! in - sh2o, smfrkeep, tslb, smois, & ! out - wetness, errmsg, errflg) + me, master, lsm_ruc, lsm, slmsk, & ! in + soiltyp, vegtype, & ! in + tsfc_lnd, tsfc_wat, tg3, & ! in + zs, dzs, smc, slc, stc, & ! in + sh2o, smfrkeep, tslb, smois, & ! out + wetness, errmsg, errflg) do i = 1, im ! i - horizontal loop do k = 1, min(kice,lsoil_ruc) @@ -146,10 +150,10 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & !-- end of initialization if ( debug_print) then - write (0,*) 'ruc soil tslb',tslb(:,1) - write (0,*) 'ruc soil tsice',tsice(:,1) - write (0,*) 'ruc soil smois',smois(:,1) - write (0,*) 'ruc wetness',wetness(:) + write (0,*) 'ruc soil tslb',tslb(ipr,:) + write (0,*) 'ruc soil tsice',tsice(ipr,:) + write (0,*) 'ruc soil smois',smois(ipr,:) + write (0,*) 'ruc wetness',wetness(ipr) endif end subroutine lsm_ruc_init @@ -303,8 +307,7 @@ subroutine lsm_ruc_run & ! inputs ! --- in/out: integer, dimension(im), intent(inout) :: soiltyp, vegtype - real (kind=kind_phys), dimension(lsoil_ruc) :: dzs - real (kind=kind_phys), dimension(lsoil_ruc), intent(inout ) :: zs + real (kind=kind_phys), dimension(lsoil_ruc), intent(in) :: zs real (kind=kind_phys), dimension(im), intent(inout) :: weasd, & & snwdph, tskin, tskin_wat, & & srflag, canopy, trans, tsurf, zorl, tsnow, & @@ -415,12 +418,6 @@ subroutine lsm_ruc_run & ! inputs write (0,*)'flag_init =',flag_init write (0,*)'flag_restart =',flag_restart endif - - if(flag_init .and. iter==1) then - ! Initialize the RUC soil levels, needed for cold starts and warm starts - CALL init_soil_depth_3 ( zs , dzs , lsoil_ruc ) - if (.not. restart) xlai = 0. - endif ! flag_init=.true.,iter=1 ims = 1 its = 1 @@ -705,7 +702,11 @@ subroutine lsm_ruc_run & ! inputs albbck(i,j) = max(0.01, 0.5 * (alvwf(i) + alnwf(i))) alb(i,j) = sfalb(i) - if(rdlai2d) xlai(i,j) = laixy(i) + if(rdlai2d) then + xlai(i,j) = laixy(i) + else + xlai(i,j) = 0. + endif tbot(i,j) = tg3(i) @@ -1082,30 +1083,14 @@ subroutine lsm_ruc_run & ! inputs deallocate(landusef) ! !! Update standard (Noah LSM) soil variables for physics - !! that require these variables (e.g. sfc_sice), independent - !! of whether it is a land point or not - !do i = 1, im - ! if (land(i)) then - ! do k = 1, lsoil - ! smc(i,k) = smois(i,k) - ! slc(i,k) = sh2o(i,k) - ! stc(i,k) = tslb(i,k) - ! enddo - ! endif - !enddo - ! - !write(0,*) "DH DEBUG: i, k, land(i), smc(i,k), slc(i,k), stc(i,k):" - !do i = 1, im - ! do k = 1, lsoil - ! write(0,'(2i5,1x,l,1x,3e20.10)'), i, k, land(i), smc(i,k), slc(i,k), stc(i,k) - ! smc(i,k) = smois(i,k) - ! slc(i,k) = sh2o(i,k) - ! stc(i,k) = tslb(i,k) - ! enddo - !enddo - - !call sleep(20) - !stop + !! that require these variables and for debugging purposes + do i = 1, im + do k = 1, lsoil + smc(i,k) = smois(i,k) + slc(i,k) = sh2o(i,k) + stc(i,k) = tslb(i,k) + enddo + enddo return !................................... @@ -1118,24 +1103,26 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in me, master, lsm_ruc, lsm, slmsk, & ! in soiltyp, vegtype, & ! in tskin_lnd, tskin_wat, tg3, & ! !in - smc, slc, stc, & ! in + zs, dzs, smc, slc, stc, & ! in sh2o, smfrkeep, tslb, smois, & ! out wetness, errmsg, errflg) implicit none - logical, intent(in ) :: restart - integer, intent(in ) :: lsm - integer, intent(in ) :: lsm_ruc - integer, intent(in ) :: im, nlev - integer, intent(in ) :: lsoil_ruc - integer, intent(in ) :: lsoil - real (kind=kind_phys), dimension(im), intent(in ) :: slmsk - real (kind=kind_phys), dimension(im), intent(in ) :: tskin_lnd, tskin_wat - real (kind=kind_phys), dimension(im), intent(in ) :: tg3 - real (kind=kind_phys), dimension(im,lsoil), intent(in ) :: smc ! Noah - real (kind=kind_phys), dimension(im,lsoil), intent(in ) :: stc ! Noah - real (kind=kind_phys), dimension(im,lsoil), intent(in ) :: slc ! Noah + logical, intent(in ) :: restart + integer, intent(in ) :: lsm + integer, intent(in ) :: lsm_ruc + integer, intent(in ) :: im, nlev + integer, intent(in ) :: lsoil_ruc + integer, intent(in ) :: lsoil + real (kind=kind_phys), dimension(im), intent(in ) :: slmsk + real (kind=kind_phys), dimension(im), intent(in ) :: tskin_lnd, tskin_wat + real (kind=kind_phys), dimension(im), intent(in ) :: tg3 + real (kind=kind_phys), dimension(1:lsoil_ruc), intent(in ) :: zs + real (kind=kind_phys), dimension(1:lsoil_ruc), intent(in ) :: dzs + real (kind=kind_phys), dimension(im,lsoil), intent(in ) :: smc ! Noah + real (kind=kind_phys), dimension(im,lsoil), intent(in ) :: stc ! Noah + real (kind=kind_phys), dimension(im,lsoil), intent(in ) :: slc ! Noah integer, dimension(im), intent(inout) :: soiltyp integer, dimension(im), intent(inout) :: vegtype @@ -1157,7 +1144,6 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in integer :: flag_soil_layers, flag_soil_levels, flag_sst real (kind=kind_phys), dimension(1:lsoil_ruc) :: factorsm - real (kind=kind_phys), dimension(1:lsoil_ruc) :: zs real (kind=kind_phys), dimension(im) :: smcref2 real (kind=kind_phys), dimension(im) :: smcwlt2 @@ -1185,7 +1171,6 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in its,ite, jts,jte, kts,kte, & i, j, k, l, num_soil_layers, ipr - real(kind=kind_phys), dimension(1:lsoil_ruc) :: zs2, dzs integer, dimension(1:lsoil) :: st_levels_input ! 4 - for Noah lsm integer, dimension(1:lsoil) :: sm_levels_input ! 4 - for Noah lsm @@ -1205,6 +1190,7 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in else if (debug_print) then write (0,*) 'Start of RUC LSM initialization' write (0,*)'lsoil, lsoil_ruc =',lsoil, lsoil_ruc + write (0,*)'restart = ',restart endif ipr = 10 @@ -1229,9 +1215,6 @@ subroutine rucinit (restart, im, lsoil_ruc, lsoil, nlev, & ! in kme = nlev kte = nlev - ! Initialize the RUC soil levels, needed for cold starts and warm starts - CALL init_soil_depth_3 ( zs , dzs , lsoil_ruc ) - !! Check if RUC soil data (tslb, ...) is provided or not !if (minval(tslb)==maxval(tslb)) then ! For restart runs, can assume that RUC soul data is provided diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 509c22588..8737f0d60 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -200,6 +200,15 @@ kind = kind_phys intent = in optional = F +[zs] + standard_name = depth_of_soil_levels_for_land_surface_model + long_name = depth of soil levels for land surface model + units = m + dimensions = (soil_vertical_dimension_for_land_surface_model) + type = real + kind = kind_phys + intent = out + optional = F [sh2o] standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model long_name = volume fraction of unfrozen soil moisture for lsm @@ -207,7 +216,7 @@ dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys - intent = out + intent = inout optional = F [smfrkeep] standard_name = volume_fraction_of_frozen_soil_moisture_for_land_surface_model @@ -216,7 +225,7 @@ dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys - intent = out + intent = inout optional = F [tslb] standard_name = soil_temperature_for_land_surface_model @@ -225,7 +234,7 @@ dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys - intent = out + intent = inout optional = F [smois] standard_name = volume_fraction_of_soil_moisture_for_land_surface_model @@ -234,7 +243,7 @@ dimensions = (horizontal_dimension,soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys - intent = out + intent = inout optional = F [wetness] standard_name = normalized_soil_wetness_for_land_surface_model @@ -243,7 +252,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F [tsice] standard_name = internal_ice_temperature @@ -369,7 +378,7 @@ dimensions = (soil_vertical_dimension_for_land_surface_model) type = real kind = kind_phys - intent = inout + intent = in optional = F [t1] standard_name = air_temperature_at_lowest_model_layer From b580c58233620793d530e419d17604b592a9eb7f Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 16 Oct 2020 09:14:10 -0600 Subject: [PATCH 381/404] Always calculate Julian day, since it is getting used by more and more parameterizations --- physics/GFS_time_vary_pre.fv3.F90 | 67 +++++++++++++++--------------- physics/GFS_time_vary_pre.scm.F90 | 68 +++++++++++++++---------------- 2 files changed, 65 insertions(+), 70 deletions(-) diff --git a/physics/GFS_time_vary_pre.fv3.F90 b/physics/GFS_time_vary_pre.fv3.F90 index dc9332bb9..27e36b649 100644 --- a/physics/GFS_time_vary_pre.fv3.F90 +++ b/physics/GFS_time_vary_pre.fv3.F90 @@ -121,41 +121,38 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lkm, lsm, lsm_noahmp, nsswr, fhour = (sec + dtp)/con_hr kdt = nint((sec + dtp)/dtp) - if(lsm == lsm_noahmp .or. lkm == 1) then -! flake need this too - !GJF* These calculations were originally in GFS_physics_driver.F90 for - ! NoahMP. They were moved to this routine since they only depend - ! on time (not space). Note that this code is included as-is from - ! GFS_physics_driver.F90, but it may be simplified by using more - ! NCEP W3 library calls (e.g., see W3DOXDAT, W3FS13 for Julian day - ! of year and W3DIFDAT to determine the integer number of days in - ! a given year). *GJF - ! Julian day calculation (fcst day of the year) - ! we need yearln and julian to - ! pass to noah mp sflx, idate is init, jdat is fcst;idate = jdat when kdt=1 - ! jdat is changing - ! - - jd1 = iw3jdn(jdat(1),jdat(2),jdat(3)) - jd0 = iw3jdn(jdat(1),1,1) - fjd = float(jdat(5))/24.0 + float(jdat(6))/1440.0 - - julian = float(jd1-jd0) + fjd - - ! - ! Year length - ! - ! what if the integration goes from one year to another? - ! iyr or jyr ? from 365 to 366 or from 366 to 365 - ! - ! is this against model's noleap yr assumption? - if (mod(jdat(1),4) == 0) then - yearlen = 366 - if (mod(jdat(1),100) == 0) then - yearlen = 365 - if (mod(jdat(1),400) == 0) then - yearlen = 366 - endif + !GJF* These calculations were originally in GFS_physics_driver.F90 for + ! NoahMP. They were moved to this routine since they only depend + ! on time (not space). Note that this code is included as-is from + ! GFS_physics_driver.F90, but it may be simplified by using more + ! NCEP W3 library calls (e.g., see W3DOXDAT, W3FS13 for Julian day + ! of year and W3DIFDAT to determine the integer number of days in + ! a given year). *GJF + ! Julian day calculation (fcst day of the year) + ! we need yearln and julian to + ! pass to noah mp sflx, idate is init, jdat is fcst;idate = jdat when kdt=1 + ! jdat is changing + ! + + jd1 = iw3jdn(jdat(1),jdat(2),jdat(3)) + jd0 = iw3jdn(jdat(1),1,1) + fjd = float(jdat(5))/24.0 + float(jdat(6))/1440.0 + + julian = float(jd1-jd0) + fjd + + ! + ! Year length + ! + ! what if the integration goes from one year to another? + ! iyr or jyr ? from 365 to 366 or from 366 to 365 + ! + ! is this against model's noleap yr assumption? + if (mod(jdat(1),4) == 0) then + yearlen = 366 + if (mod(jdat(1),100) == 0) then + yearlen = 365 + if (mod(jdat(1),400) == 0) then + yearlen = 366 endif endif endif diff --git a/physics/GFS_time_vary_pre.scm.F90 b/physics/GFS_time_vary_pre.scm.F90 index 2fa352710..ad98b14e3 100644 --- a/physics/GFS_time_vary_pre.scm.F90 +++ b/physics/GFS_time_vary_pre.scm.F90 @@ -122,44 +122,42 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, & fhour = (sec + dtp)/con_hr kdt = nint((sec + dtp)/dtp) - if(lsm == lsm_noahmp) then - !GJF* These calculations were originally in GFS_physics_driver.F90 for - ! NoahMP. They were moved to this routine since they only depends - ! on time (not space). Note that this code is included as-is from - ! GFS_physics_driver.F90, but it may be simplified by using more - ! NCEP W3 library calls (e.g., see W3DOXDAT, W3FS13 for Julian day - ! of year and W3DIFDAT to determine the integer number of days in - ! a given year). *GJF - ! Julian day calculation (fcst day of the year) - ! we need yearln and julian to - ! pass to noah mp sflx, idate is init, jdat is fcst;idate = jdat when kdt=1 - ! jdat is changing - ! - - jd1 = iw3jdn(jdat(1),jdat(2),jdat(3)) - jd0 = iw3jdn(jdat(1),1,1) - fjd = float(jdat(5))/24.0 + float(jdat(6))/1440.0 - - julian = float(jd1-jd0) + fjd - - ! - ! Year length - ! - ! what if the integration goes from one year to another? - ! iyr or jyr ? from 365 to 366 or from 366 to 365 - ! - ! is this against model's noleap yr assumption? - if (mod(jdat(1),4) == 0) then - yearlen = 366 - if (mod(jdat(1),100) == 0) then - yearlen = 365 - if (mod(jdat(1),400) == 0) then - yearlen = 366 - endif + !GJF* These calculations were originally in GFS_physics_driver.F90 for + ! NoahMP. They were moved to this routine since they only depends + ! on time (not space). Note that this code is included as-is from + ! GFS_physics_driver.F90, but it may be simplified by using more + ! NCEP W3 library calls (e.g., see W3DOXDAT, W3FS13 for Julian day + ! of year and W3DIFDAT to determine the integer number of days in + ! a given year). *GJF + ! Julian day calculation (fcst day of the year) + ! we need yearln and julian to + ! pass to noah mp sflx, idate is init, jdat is fcst;idate = jdat when kdt=1 + ! jdat is changing + ! + + jd1 = iw3jdn(jdat(1),jdat(2),jdat(3)) + jd0 = iw3jdn(jdat(1),1,1) + fjd = float(jdat(5))/24.0 + float(jdat(6))/1440.0 + + julian = float(jd1-jd0) + fjd + + ! + ! Year length + ! + ! what if the integration goes from one year to another? + ! iyr or jyr ? from 365 to 366 or from 366 to 365 + ! + ! is this against model's noleap yr assumption? + if (mod(jdat(1),4) == 0) then + yearlen = 366 + if (mod(jdat(1),100) == 0) then + yearlen = 365 + if (mod(jdat(1),400) == 0) then + yearlen = 366 endif endif endif - + ipt = 1 lprnt = .false. lssav = .true. From 9b6366826c22ea81a1ca1966db99a874d674cbfd Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 16 Oct 2020 20:39:44 -0600 Subject: [PATCH 382/404] Fix metadata, remove moninedmf_hafs, remove dkudiagnostic from satmedmfvdifq --- physics/moninedmf.meta | 2 +- physics/moninedmf_hafs.f | 1560 ----------------------------------- physics/moninedmf_hafs.meta | 533 ------------ physics/satmedmfvdifq.F | 11 +- 4 files changed, 3 insertions(+), 2103 deletions(-) delete mode 100644 physics/moninedmf_hafs.f delete mode 100644 physics/moninedmf_hafs.meta diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index d518ed21e..b14dbd2fc 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -509,7 +509,7 @@ standard_name = sea_land_ice_mask long_name = sea/land/ice mask (=0/1/2) units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F diff --git a/physics/moninedmf_hafs.f b/physics/moninedmf_hafs.f deleted file mode 100644 index 25ad5ca02..000000000 --- a/physics/moninedmf_hafs.f +++ /dev/null @@ -1,1560 +0,0 @@ -!> \file moninedmf_hafs.f -!! Contains most of the hybrid eddy-diffusivity mass-flux scheme except for the -!! subroutine that calculates the mass flux and updraft properties. - -!> This module contains the CCPP-compliant hybrid eddy-diffusivity mass-flux -!! scheme. - module hedmf_hafs - - contains - -!> \section arg_table_hedmf_hafs_init Argument Table -!! \htmlinclude hedmf_hafs_init.html -!! - subroutine hedmf_hafs_init (moninq_fac,errmsg,errflg) - use machine, only : kind_phys - implicit none - real(kind=kind_phys), intent(in ) :: moninq_fac - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (moninq_fac == 0) then - errflg = 1 - write(errmsg,'(*(a))') 'Logic error: moninq_fac == 0', & - & ' is incompatible with moninedmf_hafs' - end if - end subroutine hedmf_hafs_init - - subroutine hedmf_hafs_finalize () - end subroutine hedmf_hafs_finalize - - -!> \defgroup HEDMF GFS Hybrid Eddy-Diffusivity Mass-Flux (HEDMF) Scheme Module -!! @{ -!! \brief This subroutine contains all of logic for the -!! Hybrid EDMF PBL scheme except for the calculation of -!! the updraft properties and mass flux. -!! -!> \section arg_table_hedmf_hafs_run Argument Table -!! \htmlinclude hedmf_hafs_run.html -!! -!! \section general_edmf GFS Hybrid EDMF General Algorithm -!! -# Compute preliminary variables from input arguments. -!! -# Calculate the first estimate of the PBL height ("Predictor step"). -!! -# Calculate Monin-Obukhov similarity parameters. -!! -# Update thermal properties of surface parcel and recompute PBL height ("Corrector step"). -!! -# Determine whether stratocumulus layers exist and compute quantities needed for enhanced diffusion. -!! -# Calculate the inverse Prandtl number. -!! -# Compute diffusion coefficients below the PBL top. -!! -# Compute diffusion coefficients above the PBL top. -!! -# If the PBL is convective, call the mass flux scheme to replace the countergradient terms. -!! -# Compute enhanced diffusion coefficients related to stratocumulus-topped PBLs. -!! -# Solve for the temperature and moisture tendencies due to vertical mixing. -!! -# Calculate heating due to TKE dissipation and add to the tendency for temperature. -!! -# Solve for the horizontal momentum tendencies and add them to output tendency terms. -!! \section detailed_hedmf GFS Hybrid HEDMF Detailed Algorithm -!! @{ - subroutine hedmf_hafs_run(im,km,ntrac,ntcw,dv,du,tau,rtg, & - & u1,v1,t1,q1,swh,hlw,xmu, & - & psk,rbsoil,zorl,u10m,v10m,fm,fh, & - & tsea,heat,evap,stress,spd1,kpbl, & - & prsi,del,prsl,prslk,phii,phil,delt,dspheat, & - & dusfc,dvsfc,dtsfc,dqsfc,hpbl,hgamt,hgamq,dkt, & - & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr, & - & xkzminv,moninq_fac,islimsk,dkudiagnostic,errmsg,errflg) -! - use machine , only : kind_phys - use funcphys , only : fpvs - use physcons, grav => con_g, rd => con_rd, cp => con_cp & - &, hvap => con_hvap, fv => con_fvirt - implicit none -! -! arguments -! - logical, intent(in) :: lprnt - integer, intent(in) :: ipr - integer, intent(in) :: im, km, ntrac, ntcw, kinver(im) - integer, intent(in) :: islimsk(1:im) - integer, intent(out) :: kpbl(im) - -! - real(kind=kind_phys), intent(in) :: delt, xkzm_m, xkzm_h, xkzm_s - real(kind=kind_phys), intent(in) :: xkzminv, moninq_fac - real(kind=kind_phys), intent(inout) :: dv(im,km), du(im,km), & - & tau(im,km), rtg(im,km,ntrac) - real(kind=kind_phys), intent(in) :: & - & u1(im,km), v1(im,km), & - & t1(im,km), q1(im,km,ntrac), & - & swh(im,km), hlw(im,km), & - & xmu(im), psk(im), & - & rbsoil(im), zorl(im), & - & u10m(im), v10m(im), & - & fm(im), fh(im), & - & tsea(im), & - & heat(im), evap(im), & - & stress(im), spd1(im) - real(kind=kind_phys), intent(in) :: & - & prsi(im,km+1), del(im,km), & - & prsl(im,km), prslk(im,km), & - & phii(im,km+1), phil(im,km) - real(kind=kind_phys), intent(out) :: & - & dusfc(im), dvsfc(im), & - & dtsfc(im), dqsfc(im), & - & hpbl(im), dkt(im,km-1) - - real(kind=kind_phys), intent(inout) :: & - & hgamt(im), hgamq(im) -! - logical, intent(in) :: dspheat -! flag for tke dissipative heating - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - -! -! locals -! - integer i,iprt,is,iun,k,kk,km1,kmpbl,latd,lond - integer lcld(im),icld(im),kcld(im),krad(im) - integer kx1(im), kpblx(im) -! -! real(kind=kind_phys) betaq(im), betat(im), betaw(im), - real(kind=kind_phys) phih(im), phim(im), hpblx(im), & - & rbdn(im), rbup(im), & - & beta(im), sflux(im), & - & z0(im), crb(im), wstar(im), & - & zol(im), ustmin(im), ustar(im), & - & thermal(im),wscale(im), wscaleu(im) -! - real(kind=kind_phys) theta(im,km),thvx(im,km), thlvx(im,km), & - & qlx(im,km), thetae(im,km), & - & qtx(im,km), bf(im,km-1), diss(im,km), & - & radx(im,km-1), & - & govrth(im), hrad(im), & -! & hradm(im), radmin(im), vrad(im), & - & radmin(im), vrad(im), & - & zd(im), zdd(im), thlvx1(im) -! - real(kind=kind_phys) rdzt(im,km-1),dktx(im,km-1), & - & zi(im,km+1), zl(im,km), xkzo(im,km-1), & - & dku(im,km-1), xkzmo(im,km-1), & - & cku(im,km-1), ckt(im,km-1), & - & ti(im,km-1), shr2(im,km-1), & - & al(im,km-1), ad(im,km), & - & au(im,km-1), a1(im,km), & - & a2(im,km*ntrac), dkudiagnostic(im,km-1) -! - real(kind=kind_phys) tcko(im,km), qcko(im,km,ntrac), & - & ucko(im,km), vcko(im,km), xmf(im,km) -! - real(kind=kind_phys) prinv(im), rent(im) -! - logical pblflg(im), sfcflg(im), scuflg(im), flg(im) - logical ublflg(im), pcnvflg(im) -! -! pcnvflg: true for convective(strongly unstable) pbl -! ublflg: true for unstable but not convective(strongly unstable) pbl -! - real(kind=kind_phys) aphi16, aphi5, bvf2, wfac, - & cfac, conq, cont, conw, - & dk, dkmax, dkmin, - & dq1, dsdz2, dsdzq, dsdzt, - & dsdzu, dsdzv, - & dsig, dt2, dthe1, dtodsd, - & dtodsu, dw2, dw2min, g, - & gamcrq, gamcrt, gocp, - & gravi, f0, - & prnum, prmax, prmin, pfac, crbcon, - & qmin, tdzmin, qtend, crbmin,crbmax, - & rbint, rdt, rdz, qlmin, - & ri, rimin, rl2, rlam, rlamun, - & rone, rzero, sfcfrac, - & spdk2, sri, zol1, zolcr, zolcru, - & robn, ttend, - & utend, vk, vk2, - & ust3, wst3, - & vtend, zfac, vpert, cteit, - & rentf1, rentf2, radfac, - & zfmin, zk, tem, tem1, tem2, - & xkzm, xkzmu, - & ptem, ptem1, ptem2, tx1(im), tx2(im) -! - real(kind=kind_phys) zstblmax,h1, h2, qlcr, actei, - & cldtime - -!! for aplha - real(kind=kind_phys) WSPM(IM,KM-1) - integer kLOC ! RGF - real :: xDKU, ALPHA ! RGF - - integer :: useshape - real :: smax,ashape,sz2h, sksfc,skmax,ashape1,skminusk0, hmax - - -!cc - parameter(gravi=1.0/grav) - parameter(g=grav) - parameter(gocp=g/cp) - parameter(cont=cp/g,conq=hvap/g,conw=1.0/g) ! for del in pa -! parameter(cont=1000.*cp/g,conq=1000.*hvap/g,conw=1000./g) ! for del in kpa - parameter(rlam=30.0,vk=0.4,vk2=vk*vk) - parameter(prmin=0.25,prmax=4.,zolcr=0.2,zolcru=-0.5) - parameter(dw2min=0.0001,dkmin=0.0,dkmax=1000.,rimin=-100.) - parameter(crbcon=0.25,crbmin=0.15,crbmax=0.35) - parameter(wfac=7.0,cfac=6.5,pfac=2.0,sfcfrac=0.1) -! parameter(qmin=1.e-8,xkzm=1.0,zfmin=1.e-8,aphi5=5.,aphi16=16.) - parameter(qmin=1.e-8, zfmin=1.e-8,aphi5=5.,aphi16=16.) - parameter(tdzmin=1.e-3,qlmin=1.e-12,f0=1.e-4) - parameter(h1=0.33333333,h2=0.66666667) -! parameter(cldtime=500.,xkzminv=0.3) - parameter(cldtime=500.) -! parameter(cldtime=500.,xkzmu=3.0,xkzminv=0.3) -! parameter(gamcrt=3.,gamcrq=2.e-3,rlamun=150.0) - parameter(gamcrt=3.,gamcrq=0.,rlamun=150.0) - parameter(rentf1=0.2,rentf2=1.0,radfac=0.85) - parameter(iun=84) -! -! parameter (zstblmax = 2500., qlcr=1.0e-5) -! parameter (zstblmax = 2500., qlcr=3.0e-5) -! parameter (zstblmax = 2500., qlcr=3.5e-5) -! parameter (zstblmax = 2500., qlcr=1.0e-4) - parameter (zstblmax = 2500., qlcr=3.5e-5) -! parameter (actei = 0.23) - parameter (actei = 0.7) - -! HAFS PBL: height-dependent ALPHA - useshape=2 !0-- no change, origincal ALPHA adjustment,1-- shape1, 2-- shape2(adjust above sfc) - alpha=moninq_fac - - ! write(0,*)'in PBL,alpha=',alpha - - ! write(0,*)'islimsk=',(islimsk(i),i=1,im) - -c -c----------------------------------------------------------------------- -c - 601 format(1x,' moninp lat lon step hour ',3i6,f6.1) - 602 format(1x,' k',' z',' t',' th', - 1 ' tvh',' q',' u',' v', - 2 ' sp') - 603 format(1x,i5,8f9.1) - 604 format(1x,' sfc',9x,f9.1,18x,f9.1) - 605 format(1x,' k zl spd2 thekv the1v' - 1 ,' thermal rbup') - 606 format(1x,i5,6f8.2) - 607 format(1x,' kpbl hpbl fm fh hgamt', - 1 ' hgamq ws ustar cd ch') - 608 format(1x,i5,9f8.2) - 609 format(1x,' k pr dkt dku ',i5,3f8.2) - 610 format(1x,' k pr dkt dku ',i5,3f8.2,' l2 ri t2', - 1 ' sr2 ',2f8.2,2e10.2) -! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 -!> ## Compute preliminary variables from input arguments - -! compute preliminary variables -! -! iprt = 0 -! if(iprt.eq.1) then -!cc latd = 0 -! lond = 0 -! else -!cc latd = 0 -! lond = 0 -! endif -! - dt2 = delt - rdt = 1. / dt2 - km1 = km - 1 - kmpbl = km / 2 -!> - Compute physical height of the layer centers and interfaces from the geopotential height (zi and zl) - do k=1,km - do i=1,im - zi(i,k) = phii(i,k) * gravi - zl(i,k) = phil(i,k) * gravi - enddo - enddo - do i=1,im - zi(i,km+1) = phii(i,km+1) * gravi - enddo -!> - Compute reciprocal of \f$ \Delta z \f$ (rdzt) - do k = 1,km1 - do i=1,im - rdzt(i,k) = 1.0 / (zl(i,k+1) - zl(i,k)) - enddo - enddo -!> - Compute reciprocal of pressure (tx1, tx2) - do i=1,im - kx1(i) = 1 - tx1(i) = 1.0 / prsi(i,1) - tx2(i) = tx1(i) - enddo -!> - Compute background vertical diffusivities for scalars and momentum (xkzo and xkzmo) - do k = 1,km1 - do i=1,im - xkzo(i,k) = 0.0 - xkzmo(i,k) = 0.0 - if (k < kinver(i)) then -! vertical background diffusivity - ptem = prsi(i,k+1) * tx1(i) - tem1 = 1.0 - ptem - tem1 = tem1 * tem1 * 10.0 - xkzo(i,k) = xkzm_h * min(1.0, exp(-tem1)) - -! vertical background diffusivity for momentum - if (ptem >= xkzm_s) then - xkzmo(i,k) = xkzm_m - kx1(i) = k + 1 - else - if (k == kx1(i) .and. k > 1) tx2(i) = 1.0 / prsi(i,k) - tem1 = 1.0 - prsi(i,k+1) * tx2(i) - tem1 = tem1 * tem1 * 5.0 - xkzmo(i,k) = xkzm_m * min(1.0, exp(-tem1)) - endif - endif - enddo - enddo - -! if (lprnt) then -! print *,' xkzo=',(xkzo(ipr,k),k=1,km1) -! print *,' xkzmo=',(xkzmo(ipr,k),k=1,km1) -! endif -! -! diffusivity in the inversion layer is set to be xkzminv (m^2/s) -!> - The background scalar vertical diffusivity is limited to be less than or equal to xkzminv - do k = 1,kmpbl - do i=1,im -! if(zi(i,k+1) > 200..and.zi(i,k+1) < zstblmax) then - if(zi(i,k+1) > 250.) then - tem1 = (t1(i,k+1)-t1(i,k)) * rdzt(i,k) - if(tem1 > 1.e-5) then - xkzo(i,k) = min(xkzo(i,k),xkzminv) - endif - endif - enddo - enddo -!> - Some output variables and logical flags are initialized - do i = 1,im - z0(i) = 0.01 * zorl(i) - dusfc(i) = 0. - dvsfc(i) = 0. - dtsfc(i) = 0. - dqsfc(i) = 0. - wscale(i)= 0. - wscaleu(i)= 0. - kpbl(i) = 1 - hpbl(i) = zi(i,1) - hpblx(i) = zi(i,1) - pblflg(i)= .true. - sfcflg(i)= .true. - if(rbsoil(i) > 0.) sfcflg(i) = .false. - ublflg(i)= .false. - pcnvflg(i)= .false. - scuflg(i)= .true. - if(scuflg(i)) then - radmin(i)= 0. - rent(i) = rentf1 - hrad(i) = zi(i,1) -! hradm(i) = zi(i,1) - krad(i) = 1 - icld(i) = 0 - lcld(i) = km1 - kcld(i) = km1 - zd(i) = 0. - endif - enddo -!> - Compute \f$\theta\f$ (theta), \f$q_l\f$ (qlx), \f$q_t\f$ (qtx), \f$\theta_e\f$ (thetae), \f$\theta_v\f$ (thvx), \f$\theta_{l,v}\f$ (thlvx) - do k = 1,km - do i = 1,im - theta(i,k) = t1(i,k) * psk(i) / prslk(i,k) - qlx(i,k) = max(q1(i,k,ntcw),qlmin) - qtx(i,k) = max(q1(i,k,1),qmin)+qlx(i,k) - ptem = qlx(i,k) - ptem1 = hvap*max(q1(i,k,1),qmin)/(cp*t1(i,k)) - thetae(i,k)= theta(i,k)*(1.+ptem1) - thvx(i,k) = theta(i,k)*(1.+fv*max(q1(i,k,1),qmin)-ptem) - ptem2 = theta(i,k)-(hvap/cp)*ptem - thlvx(i,k) = ptem2*(1.+fv*qtx(i,k)) - enddo - enddo -!> - Initialize diffusion coefficients to 0 and calculate the total radiative heating rate (dku, dkt, radx) - do k = 1,km1 - do i = 1,im - dku(i,k) = 0. - dkt(i,k) = 0. - dktx(i,k) = 0. - cku(i,k) = 0. - ckt(i,k) = 0. - tem = zi(i,k+1)-zi(i,k) - radx(i,k) = tem*(swh(i,k)*xmu(i)+hlw(i,k)) - enddo - enddo -!> - Set lcld to first index above 2.5km - do i=1,im - flg(i) = scuflg(i) - enddo - do k = 1, km1 - do i=1,im - if(flg(i).and.zl(i,k) >= zstblmax) then - lcld(i)=k - flg(i)=.false. - endif - enddo - enddo -! -! compute virtual potential temp gradient (bf) and winshear square -!> - Compute \f$\frac{\partial \theta_v}{\partial z}\f$ (bf) and the wind shear squared (shr2) - do k = 1, km1 - do i = 1, im - rdz = rdzt(i,k) - bf(i,k) = (thvx(i,k+1)-thvx(i,k))*rdz - ti(i,k) = 2./(t1(i,k)+t1(i,k+1)) - dw2 = (u1(i,k)-u1(i,k+1))**2 - & + (v1(i,k)-v1(i,k+1))**2 - shr2(i,k) = max(dw2,dw2min)*rdz*rdz - enddo - enddo -!> - Calculate \f$\frac{g}{\theta}\f$ (govrth), \f$\beta = \frac{\Delta t}{\Delta z}\f$ (beta), \f$u_*\f$ (ustar), total surface flux (sflux), and set pblflag to false if the total surface energy flux is into the surface - do i = 1,im - govrth(i) = g/theta(i,1) - enddo -! - do i=1,im - beta(i) = dt2 / (zi(i,2)-zi(i,1)) - enddo -! - do i=1,im - ustar(i) = sqrt(stress(i)) - enddo -! - do i = 1,im - sflux(i) = heat(i) + evap(i)*fv*theta(i,1) - if(.not.sfcflg(i) .or. sflux(i) <= 0.) pblflg(i)=.false. - enddo -!> ## Calculate the first estimate of the PBL height (``Predictor step") -!! The calculation of the boundary layer height follows Troen and Mahrt (1986) \cite troen_and_mahrt_1986 section 3. The approach is to find the level in the column where a modified bulk Richardson number exceeds a critical value. -!! -!! The temperature of the thermal is of primary importance. For the initial estimate of the PBL height, the thermal is assumed to have one of two temperatures. If the boundary layer is stable, the thermal is assumed to have a temperature equal to the surface virtual temperature. Otherwise, the thermal is assumed to have the same virtual potential temperature as the lowest model level. For the stable case, the critical bulk Richardson number becomes a function of the wind speed and roughness length, otherwise it is set to a tunable constant. -! compute the pbl height -! - do i=1,im - flg(i) = .false. - rbup(i) = rbsoil(i) - - IF ( ALPHA .GT. 0.0) THEN ! ALPHA - - if(pblflg(i)) then - thermal(i) = thvx(i,1) - crb(i) = crbcon - else - thermal(i) = tsea(i)*(1.+fv*max(q1(i,1,1),qmin)) - tem = sqrt(u10m(i)**2+v10m(i)**2) - tem = max(tem, 1.) - robn = tem / (f0 * z0(i)) - tem1 = 1.e-7 * robn - crb(i) = 0.16 * (tem1 ** (-0.18)) - crb(i) = max(min(crb(i), crbmax), crbmin) - endif - - ELSE -! use variable Ri for all conditions - if(pblflg(i)) then - thermal(i) = thvx(i,1) - else - thermal(i) = tsea(i)*(1.+fv*max(q1(i,1,1),qmin)) - endif - tem = sqrt(u10m(i)**2+v10m(i)**2) - tem = max(tem, 1.) - robn = tem / (f0 * z0(i)) - tem1 = 1.e-7 * robn -! crb(i) = 0.16 * (tem1 ** (-0.18)) - crb(i) = crbcon - IF(islimsk(i).ne.0) crb(I) = 0.16*(tem1)**(-0.18) - IF(islimsk(i).eq.0) crb(I) = 0.25*(tem1)**(-0.18) - crb(i) = max(min(crb(i), crbmax), crbmin) - ENDIF ! ALPHA - - enddo - -!> Given the thermal's properties and the critical Richardson number, a loop is executed to find the first level above the surface where the modified Richardson number is greater than the critical Richardson number, using equation 10a from Troen and Mahrt (1986) \cite troen_and_mahrt_1986 (also equation 8 from Hong and Pan (1996) \cite hong_and_pan_1996): -!! \f[ -!! h = Ri\frac{T_0\left|\vec{v}(h)\right|^2}{g\left(\theta_v(h) - \theta_s\right)} -!! \f] -!! where \f$h\f$ is the PBL height, \f$Ri\f$ is the Richardson number, \f$T_0\f$ is the virtual potential temperature near the surface, \f$\left|\vec{v}\right|\f$ is the wind speed, and \f$\theta_s\f$ is for the thermal. Rearranging this equation to calculate the modified Richardson number at each level, k, for comparison with the critical value yields: -!! \f[ -!! Ri_k = gz(k)\frac{\left(\theta_v(k) - \theta_s\right)}{\theta_v(1)*\vec{v}(k)} -!! \f] - do k = 1, kmpbl - do i = 1, im - if(.not.flg(i)) then - rbdn(i) = rbup(i) - spdk2 = max((u1(i,k)**2+v1(i,k)**2),1.) - rbup(i) = (thvx(i,k)-thermal(i))* - & (g*zl(i,k)/thvx(i,1))/spdk2 - kpbl(i) = k - flg(i) = rbup(i) > crb(i) - endif - enddo - enddo - -!> Once the level is found, some linear interpolation is performed to find the exact height of the boundary layer top (where \f$Ri = Ri_{cr}\f$) and the PBL height and the PBL top index are saved (hpblx and kpblx, respectively) - do i = 1,im - if(kpbl(i) > 1) then - k = kpbl(i) - if(rbdn(i) >= crb(i)) then - rbint = 0. - elseif(rbup(i) <= crb(i)) then - rbint = 1. - else - rbint = (crb(i)-rbdn(i))/(rbup(i)-rbdn(i)) - endif - hpbl(i) = zl(i,k-1) + rbint*(zl(i,k)-zl(i,k-1)) - if(hpbl(i) < zi(i,kpbl(i))) kpbl(i) = kpbl(i) - 1 - else - hpbl(i) = zl(i,1) - kpbl(i) = 1 - endif - kpblx(i) = kpbl(i) - hpblx(i) = hpbl(i) - enddo -! -! compute similarity parameters -!> ## Calculate Monin-Obukhov similarity parameters -!! Using the initial guess for the PBL height, Monin-Obukhov similarity parameters are calculated. They are needed to refine the PBL height calculation and for calculating diffusion coefficients. -!! -!! First, calculate the Monin-Obukhov nondimensional stability parameter, commonly referred to as \f$\zeta\f$ using the following equation from Businger et al. (1971) \cite businger_et_al_1971 (equation 28): -!! \f[ -!! \zeta = Ri_{sfc}\frac{F_m^2}{F_h} = \frac{z}{L} -!! \f] -!! where \f$F_m\f$ and \f$F_h\f$ are surface Monin-Obukhov stability functions calculated in sfc_diff.f and \f$L\f$ is the Obukhov length. Then, the nondimensional gradients of momentum and temperature (phim and phih) are calculated using equations 5 and 6 from Hong and Pan (1996) \cite hong_and_pan_1996 depending on the surface layer stability. Then, the velocity scale valid for the surface layer (\f$w_s\f$, wscale) is calculated using equation 3 from Hong and Pan (1996) \cite hong_and_pan_1996. For the neutral and unstable PBL above the surface layer, the convective velocity scale, \f$w_*\f$, is calculated according to: -!! \f[ -!! w_* = \left(\frac{g}{\theta_0}h\overline{w'\theta_0'}\right)^{1/3} -!! \f] -!! and the mixed layer velocity scale is then calculated with equation 6 from Troen and Mahrt (1986) \cite troen_and_mahrt_1986 -!! \f[ -!! w_s = (u_*^3 + 7\epsilon k w_*^3)^{1/3} -!! \f] - do i=1,im - zol(i) = max(rbsoil(i)*fm(i)*fm(i)/fh(i),rimin) - if(sfcflg(i)) then - zol(i) = min(zol(i),-zfmin) - else - zol(i) = max(zol(i),zfmin) - endif - zol1 = zol(i)*sfcfrac*hpbl(i)/zl(i,1) - if(sfcflg(i)) then -! phim(i) = (1.-aphi16*zol1)**(-1./4.) -! phih(i) = (1.-aphi16*zol1)**(-1./2.) - tem = 1.0 / (1. - aphi16*zol1) - phih(i) = sqrt(tem) - phim(i) = sqrt(phih(i)) - else - phim(i) = 1. + aphi5*zol1 - phih(i) = phim(i) - endif - wscale(i) = ustar(i)/phim(i) - ustmin(i) = ustar(i)/aphi5 - wscale(i) = max(wscale(i),ustmin(i)) - enddo - do i=1,im - if(pblflg(i)) then - if(zol(i) < zolcru .and. kpbl(i) > 1) then - pcnvflg(i) = .true. - else - ublflg(i) = .true. - endif - wst3 = govrth(i)*sflux(i)*hpbl(i) - wstar(i)= wst3**h1 - ust3 = ustar(i)**3. - wscaleu(i) = (ust3+wfac*vk*wst3*sfcfrac)**h1 - wscaleu(i) = max(wscaleu(i),ustmin(i)) - endif - enddo -! -! compute counter-gradient mixing term for heat and moisture -!> ## Update thermal properties of surface parcel and recompute PBL height ("Corrector step"). -!! Next, the counter-gradient terms for temperature and humidity are calculated using equation 4 of Hong and Pan (1996) \cite hong_and_pan_1996 and are used to calculate the "scaled virtual temperature excess near the surface" (equation 9 in Hong and Pan (1996) \cite hong_and_pan_1996) so that the properties of the thermal are updated to recalculate the PBL height. - do i = 1,im - if(ublflg(i)) then - hgamt(i) = min(cfac*heat(i)/wscaleu(i),gamcrt) - hgamq(i) = min(cfac*evap(i)/wscaleu(i),gamcrq) - vpert = hgamt(i) + hgamq(i)*fv*theta(i,1) - vpert = min(vpert,gamcrt) - thermal(i)= thermal(i)+max(vpert,0.) - hgamt(i) = max(hgamt(i),0.0) - hgamq(i) = max(hgamq(i),0.0) - endif - enddo -! -! enhance the pbl height by considering the thermal excess -!> The PBL height calculation follows the same procedure as the predictor step, except that it uses an updated virtual potential temperature for the thermal. - do i=1,im - flg(i) = .true. - if(ublflg(i)) then - flg(i) = .false. - rbup(i) = rbsoil(i) - endif - enddo - do k = 2, kmpbl - do i = 1, im - if(.not.flg(i)) then - rbdn(i) = rbup(i) - spdk2 = max((u1(i,k)**2+v1(i,k)**2),1.) - rbup(i) = (thvx(i,k)-thermal(i))* - & (g*zl(i,k)/thvx(i,1))/spdk2 - kpbl(i) = k - flg(i) = rbup(i) > crb(i) - endif - enddo - enddo - do i = 1,im - if(ublflg(i)) then - k = kpbl(i) - if(rbdn(i) >= crb(i)) then - rbint = 0. - elseif(rbup(i) <= crb(i)) then - rbint = 1. - else - rbint = (crb(i)-rbdn(i))/(rbup(i)-rbdn(i)) - endif - hpbl(i) = zl(i,k-1) + rbint*(zl(i,k)-zl(i,k-1)) - if(hpbl(i) < zi(i,kpbl(i))) kpbl(i) = kpbl(i) - 1 - if(kpbl(i) <= 1) then - ublflg(i) = .false. - pblflg(i) = .false. - endif - endif - enddo -! -! look for stratocumulus -!> ## Determine whether stratocumulus layers exist and compute quantities needed for enhanced diffusion -!! - Starting at the PBL top and going downward, if the level is less than 2.5 km and \f$q_l>q_{l,cr}\f$ then set kcld = k (find the cloud top index in the PBL). If no cloud water above the threshold is found, scuflg is set to F. - do i = 1, im - flg(i)=scuflg(i) - enddo - do k = kmpbl,1,-1 - do i = 1, im - if(flg(i) .and. k <= lcld(i)) then - if(qlx(i,k).ge.qlcr) then - kcld(i)=k - flg(i)=.false. - endif - endif - enddo - enddo - do i = 1, im - if(scuflg(i) .and. kcld(i)==km1) scuflg(i)=.false. - enddo -!> - Starting at the PBL top and going downward, if the level is less than the cloud top, find the level of the minimum radiative heating rate within the cloud. If the level of the minimum is the lowest model level or the minimum radiative heating rate is positive, then set scuflg to F. - do i = 1, im - flg(i)=scuflg(i) - enddo - do k = kmpbl,1,-1 - do i = 1, im - if(flg(i) .and. k <= kcld(i)) then - if(qlx(i,k) >= qlcr) then - if(radx(i,k) < radmin(i)) then - radmin(i)=radx(i,k) - krad(i)=k - endif - else - flg(i)=.false. - endif - endif - enddo - enddo - do i = 1, im - if(scuflg(i) .and. krad(i) <= 1) scuflg(i)=.false. - if(scuflg(i) .and. radmin(i)>=0.) scuflg(i)=.false. - enddo -!> - Starting at the PBL top and going downward, count the number of levels below the minimum radiative heating rate level that have cloud water above the threshold. If there are none, then set the scuflg to F. - do i = 1, im - flg(i)=scuflg(i) - enddo - do k = kmpbl,2,-1 - do i = 1, im - if(flg(i) .and. k <= krad(i)) then - if(qlx(i,k) >= qlcr) then - icld(i)=icld(i)+1 - else - flg(i)=.false. - endif - endif - enddo - enddo - do i = 1, im - if(scuflg(i) .and. icld(i) < 1) scuflg(i)=.false. - enddo -!> - Find the height of the interface where the minimum in radiative heating rate is located. If this height is less than the second model interface height, then set the scuflg to F. - do i = 1, im - if(scuflg(i)) then - hrad(i) = zi(i,krad(i)+1) -! hradm(i)= zl(i,krad(i)) - endif - enddo -! - do i = 1, im - if(scuflg(i) .and. hrad(i) - Calculate the hypothetical \f$\theta_v\f$ at the minimum radiative heating level that a parcel would reach due to radiative cooling after a typical cloud turnover time spent at that level. - do i = 1, im - if(scuflg(i)) then - k = krad(i) - tem = zi(i,k+1)-zi(i,k) - tem1 = cldtime*radmin(i)/tem - thlvx1(i) = thlvx(i,k)+tem1 -! if(thlvx1(i) > thlvx(i,k-1)) scuflg(i)=.false. - endif - enddo -!> - Determine the distance that a parcel would sink downwards starting from the level of minimum radiative heating rate by comparing the hypothetical minimum \f$\theta_v\f$ calculated above with the environmental \f$\theta_v\f$. - do i = 1, im - flg(i)=scuflg(i) - enddo - do k = kmpbl,1,-1 - do i = 1, im - if(flg(i) .and. k <= krad(i))then - if(thlvx1(i) <= thlvx(i,k))then - tem=zi(i,k+1)-zi(i,k) - zd(i)=zd(i)+tem - else - flg(i)=.false. - endif - endif - enddo - enddo -!> - Calculate the cloud thickness, where the cloud top is the in-cloud minimum radiative heating level and the bottom is determined previously. - do i = 1, im - if(scuflg(i))then - kk = max(1, krad(i)+1-icld(i)) - zdd(i) = hrad(i)-zi(i,kk) - endif - enddo -!> - Find the largest between the cloud thickness and the distance of a sinking parcel, then determine the smallest of that number and the height of the minimum in radiative heating rate. Set this number to \f$zd\f$. Using \f$zd\f$, calculate the characteristic velocity scale of cloud-top radiative cooling-driven turbulence. - do i = 1, im - if(scuflg(i))then - zd(i) = max(zd(i),zdd(i)) - zd(i) = min(zd(i),hrad(i)) - tem = govrth(i)*zd(i)*(-radmin(i)) - vrad(i)= tem**h1 - endif - enddo -! -! compute inverse prandtl number -!> ## Calculate the inverse Prandtl number -!! For an unstable PBL, the Prandtl number is calculated according to Hong and Pan (1996) \cite hong_and_pan_1996, equation 10, whereas for a stable boundary layer, the Prandtl number is simply \f$Pr = \frac{\phi_h}{\phi_m}\f$. - do i = 1, im - if(ublflg(i)) then - tem = phih(i)/phim(i)+cfac*vk*sfcfrac - else - tem = phih(i)/phim(i) - endif - prinv(i) = 1.0 / tem - prinv(i) = min(prinv(i),prmax) - prinv(i) = max(prinv(i),prmin) - enddo - do i = 1, im - if(zol(i) > zolcr) then - kpbl(i) = 1 - endif - enddo - -!!! HAFS PBL, Bgin adjustment -! RGF determine wspd at roughly 500 m above surface, or as close as possible, -! reuse SPDK2 -! zi(i,k) is AGL, right? May not matter if applied only to water grid points - if(moninq_fac.lt.0)then - - DO I=1,IM - SPDK2 = 0. - WSPM(i,1) = 0. - DO K = 1, KMPBL ! kmpbl is like a max possible pbl height - if(zi(i,k).le.500.and.zi(i,k+1).gt.500.)then ! find level bracketing 500 m - SPDK2 = SQRT(U1(i,k)*U1(i,k)+V1(i,k)*V1(i,k)) ! wspd near 500 m - WSPM(i,1) = SPDK2/0.6 ! now the Km limit for 500 m. just store in K=1 - WSPM(i,2) = float(k) ! height of level at gridpoint i. store in K=2 -! if(i.eq.25) print *,' IK ',i,k,' ZI ',zi(i,k), ' WSPM1 ',wspm(i,1),' -! KMPBL ',kmpbl,' KPBL ',kpbl(i) - endif - ENDDO - ENDDO ! i - - endif ! moninq_fac < 0 - - -! -! compute diffusion coefficients below pbl -!> ## Compute diffusion coefficients below the PBL top -!! Below the PBL top, the diffusion coefficients (\f$K_m\f$ and \f$K_h\f$) are calculated according to equation 2 in Hong and Pan (1996) \cite hong_and_pan_1996 where a different value for \f$w_s\f$ (PBL vertical velocity scale) is used depending on the PBL stability. \f$K_h\f$ is calculated from \f$K_m\f$ using the Prandtl number. The calculated diffusion coefficients are checked so that they are bounded by maximum values and the local background diffusion coefficients. - - IF (ALPHA > 0) THEN ! AAAAAAAAAAAAAAAAAAAAAAAAAAA - - do k = 1, kmpbl - do i=1,im - if(k < kpbl(i)) then -! zfac = max((1.-(zi(i,k+1)-zl(i,1))/ -! 1 (hpbl(i)-zl(i,1))), zfmin) - zfac = max((1.-zi(i,k+1)/hpbl(i)), zfmin) - tem = zi(i,k+1) * (zfac**pfac) * moninq_fac ! lmh suggested by kg - if(pblflg(i)) then - tem1 = vk * wscaleu(i) * tem -! dku(i,k) = xkzmo(i,k) + tem1 -! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) - dku(i,k) = tem1 - dkt(i,k) = tem1 * prinv(i) - else - tem1 = vk * wscale(i) * tem -! dku(i,k) = xkzmo(i,k) + tem1 -! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) - dku(i,k) = tem1 - dkt(i,k) = tem1 * prinv(i) - endif - dku(i,k) = min(dku(i,k),dkmax) - dku(i,k) = max(dku(i,k),xkzmo(i,k)) - dkt(i,k) = min(dkt(i,k),dkmax) - dkt(i,k) = max(dkt(i,k),xkzo(i,k)) - dktx(i,k)= dkt(i,k) - endif - enddo - enddo - - ELSE ! ALPHA <0 AAAAAAAAAAAAA - - do i=1,im - do k = 1, kmpbl - if(k < kpbl(i)) then -! zfac = max((1.-(zi(i,k+1)-zl(i,1))/ -! 1 (hpbl(i)-zl(i,1))), zfmin) - zfac = max((1.-zi(i,k+1)/hpbl(i)), zfmin) - ! tem = zi(i,k+1) * (zfac**pfac) * moninq_fac ! lmh suggested by kg - tem = zi(i,k+1) * (zfac**pfac) * abs( moninq_fac) - -!!!! CHANGES FOR HEIGHT-DEPENDENT K ADJUSTMENT, WANG W - if(useshape .ge. 1) then - sz2h=(ZI(I,K+1)-ZL(I,1))/(HPBL(I)-ZL(I,1)) - sz2h=max(sz2h,zfmin) - sz2h=min(sz2h,1.0) - zfac=(1.0-sz2h)**pfac -! smax=0.148 !! max value of this shape function - smax=0.148 !! max value of this shape function - hmax=0.333 !! roughly height if max K - skmax=hmax*(1.0-hmax)**pfac - sksfc=min(ZI(I,2)/HPBL(I),0.05) ! surface layer top, 0.05H or ZI(2) (Zi(1)=0) - sksfc=sksfc*(1-sksfc)**pfac - - zfac=max(zfac,zfmin) - ashape=max(ABS(moninq_fac),0.2) ! should not be smaller than 0.2, otherwise too much adjustment(?) - if(useshape ==1) then - ashape=( 1.0 - ((sz2h*zfac/smax)**0.25) - & *( 1.0 - ashape ) ) - tem = zi(i,k+1) * (zfac) * ashape - endif - - if (useshape == 2) then !only adjus K that is > K_surface_top - ashape1=1.0 - if (skmax > sksfc) ashape1=(skmax*ashape-sksfc)/ - & (skmax-sksfc) - skminusk0=ZI(I,K+1)*zfac - HPBL(i)*sksfc - tem = zi(i,k+1) * (zfac) ! no adjustment - if (skminusk0 > 0) then ! only adjust K which is > surface top K - tem = skminusk0*ashape1 + HPBL(i)*sksfc - endif - endif - endif ! endif useshape>1 -!!!! END OF CHAGES , WANG W - - - if(pblflg(i)) then - tem1 = vk * wscaleu(i) * tem -! dku(i,k) = xkzmo(i,k) + tem1 -! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) - dku(i,k) = tem1 - dkt(i,k) = tem1 * prinv(i) - else - tem1 = vk * wscale(i) * tem -! dku(i,k) = xkzmo(i,k) + tem1 -! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) - dku(i,k) = tem1 - dkt(i,k) = tem1 * prinv(i) - endif - dku(i,k) = min(dku(i,k),dkmax) - dku(i,k) = max(dku(i,k),xkzmo(i,k)) - dkt(i,k) = min(dkt(i,k),dkmax) - dkt(i,k) = max(dkt(i,k),xkzo(i,k)) - dktx(i,k)= dkt(i,k) - endif - enddo !K loop - -! possible modification of first guess DKU, under certain conditions -! (1) this applies only to columns over water - - IF(islimsk(i).eq.0)then ! sea only - -! (2) alpha test -! if alpha < 0, find alpha for each column and do the loop again -! if alpha > 0, we are finished - - - if(alpha.lt.0)then ! variable alpha test - -! k-level of layer around 500 m - kLOC = INT(WSPM(i,2)) -! print *,' kLOC ',kLOC,' KPBL ',KPBL(I) - -! (3) only do this IF KPBL(I) >= kLOC. Otherwise, we are finished, with DKU as -! if alpha = +1 - - if(KPBL(I).gt.kLOC)then - - xDKU = DKU(i,kLOC) ! Km at k-level -! (4) DKU check. -! WSPM(i,1) is the KM cap for the 500-m level. -! if DKU at 500-m level < WSPM(i,1), do not limit Km ANYWHERE. Alpha = -! abs(alpha). No need to recalc. -! if DKU at 500-m level > WSPM(i,1), then alpha = WSPM(i,1)/xDKU for entire -! column - if(xDKU.ge.WSPM(i,1)) then ! ONLY if DKU at 500-m exceeds cap, otherwise already done - - WSPM(i,3) = WSPM(i,1)/xDKU ! ratio of cap to Km at k-level, store in WSPM(i,3) - !WSPM(i,4) = amin1(WSPM(I,3),1.0) ! this is new column alpha. cap at 1. ! should never be needed - WSPM(i,4) = min(WSPM(I,3),1.0) ! this is new column alpha. cap at 1. ! should never be needed - !! recalculate K capped by WSPM(i,1) - do k = 1, kmpbl - if(k < kpbl(i)) then -! zfac = max((1.-(zi(i,k+1)-zl(i,1))/ -! 1 (hpbl(i)-zl(i,1))), zfmin) - zfac = max((1.-zi(i,k+1)/hpbl(i)), zfmin) - ! tem = zi(i,k+1) * (zfac**pfac) - tem = zi(i,k+1) * (zfac**pfac) * WSPM(i,4) - - -!!!! CHANGES FOR HEIGHT-DEPENDENT K ADJUSTMENT, WANG W - if(useshape .ge. 1) then - sz2h=(ZI(I,K+1)-ZL(I,1))/(HPBL(I)-ZL(I,1)) - sz2h=max(sz2h,zfmin) - sz2h=min(sz2h,1.0) - zfac=(1.0-sz2h)**pfac - smax=0.148 !! max value of this shape function - hmax=0.333 !! roughly height if max K - skmax=hmax*(1.0-hmax)**pfac - sksfc=min(ZI(I,2)/HPBL(I),0.05) ! surface layer top, 0.05H or ZI(2) (Zi(1)=0) - sksfc=sksfc*(1-sksfc)**pfac - - zfac=max(zfac,zfmin) - ashape=max(WSPM(i,4),0.2) !! adjustment coef should not smaller than 0.2 - if(useshape ==1) then - ashape=( 1.0 - ((sz2h*zfac/smax)**0.25) - & *( 1.0 - ashape ) ) - tem = zi(i,k+1) * (zfac) * ashape -! if(k ==5) write(0,*)'min alf, height-depend alf',WSPM(i,4),ashape - endif ! endif useshape=1 - - if (useshape == 2) then !only adjus K that is > K_surface_top - ashape1=1.0 - if (skmax > sksfc) ashape1=(skmax*ashape-sksfc)/ - & (skmax-sksfc) - - skminusk0=ZI(I,K+1)*zfac - HPBL(i)*sksfc - tem = zi(i,k+1) * (zfac) ! no adjustment -! if(k ==5) write(0,*)'before, dku,ashape,ashpe1', -! & tem*wscaleu(i)*vk,ashape,ashape1 - if (skminusk0 > 0) then ! only adjust K which is > surface top K - tem = skminusk0*ashape1 + HPBL(i)*sksfc - endif -! if(k ==5)write(0,*) -! & 'after,dku,k_sfc,skmax,sksfc,zi(2),hpbl' -! & ,tem*wscaleu(i)*vk,WSCALEU(I)*VK*HPBL(i)*sksfc, skmax, -! & sksfc,ZI(I,2),HPBL(I) - - endif ! endif useshape=2 - endif ! endif useshape>1 -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - - if(pblflg(i)) then - tem1 = vk * wscaleu(i) * tem -! dku(i,k) = xkzmo(i,k) + tem1 -! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) - dku(i,k) = tem1 - dkt(i,k) = tem1 * prinv(i) - else - tem1 = vk * wscale(i) * tem -! dku(i,k) = xkzmo(i,k) + tem1 -! dkt(i,k) = xkzo(i,k) + tem1 * prinv(i) - dku(i,k) = tem1 - dkt(i,k) = tem1 * prinv(i) - endif - dku(i,k) = min(dku(i,k),dkmax) - dku(i,k) = max(dku(i,k),xkzmo(i,k)) - dkt(i,k) = min(dkt(i,k),dkmax) - dkt(i,k) = max(dkt(i,k),xkzo(i,k)) - dktx(i,k)= dkt(i,k) - endif - enddo !K loop - endif ! xDKU.ge.WSPM(i,1) - endif ! KPBL(I).ge.kLOC - endif ! alpha < 0 - endif ! islimsk=0 - - enddo !I loop - ENDIF !AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - -! -! compute diffusion coefficients based on local scheme above pbl -!> ## Compute diffusion coefficients above the PBL top -!! Diffusion coefficients above the PBL top are computed as a function of local stability (gradient Richardson number), shear, and a length scale from Louis (1979) \cite louis_1979 : -!! \f[ -!! K_{m,h}=l^2f_{m,h}(Ri_g)\left|\frac{\partial U}{\partial z}\right| -!! \f] -!! The functions used (\f$f_{m,h}\f$) depend on the local stability. First, the gradient Richardson number is calculated as -!! \f[ -!! Ri_g=\frac{\frac{g}{T}\frac{\partial \theta_v}{\partial z}}{\frac{\partial U}{\partial z}^2} -!! \f] -!! where \f$U\f$ is the horizontal wind. For the unstable case (\f$Ri_g < 0\f$), the Richardson number-dependent functions are given by -!! \f[ -!! f_h(Ri_g) = 1 + \frac{8\left|Ri_g\right|}{1 + 1.286\sqrt{\left|Ri_g\right|}}\\ -!! \f] -!! \f[ -!! f_m(Ri_g) = 1 + \frac{8\left|Ri_g\right|}{1 + 1.746\sqrt{\left|Ri_g\right|}}\\ -!! \f] -!! For the stable case, the following formulas are used -!! \f[ -!! f_h(Ri_g) = \frac{1}{\left(1 + 5Ri_g\right)^2}\\ -!! \f] -!! \f[ -!! Pr = \frac{K_h}{K_m} = 1 + 2.1Ri_g -!! \f] -!! The source for the formulas used for the Richardson number-dependent functions is unclear. They are different than those used in Hong and Pan (1996) \cite hong_and_pan_1996 as the previous documentation suggests. They follow equation 14 of Louis (1979) \cite louis_1979 for the unstable case, but it is unclear where the values of the coefficients \f$b\f$ and \f$c\f$ from that equation used in this scheme originate. Finally, the length scale, \f$l\f$ is calculated according to the following formula from Hong and Pan (1996) \cite hong_and_pan_1996 -!! \f[ -!! \frac{1}{l} = \frac{1}{kz} + \frac{1}{l_0}\\ -!! \f] -!! \f[ -!! or\\ -!! \f] -!! \f[ -!! l=\frac{l_0kz}{l_0+kz} -!! \f] -!! where \f$l_0\f$ is currently 30 m for stable conditions and 150 m for unstable. Finally, the diffusion coefficients are kept in a range bounded by the background diffusion and the maximum allowable values. - do k = 1, km1 - do i=1,im - if(k >= kpbl(i)) then - bvf2 = g*bf(i,k)*ti(i,k) - ri = max(bvf2/shr2(i,k),rimin) - zk = vk*zi(i,k+1) - if(ri < 0.) then ! unstable regime - rl2 = zk*rlamun/(rlamun+zk) - dk = rl2*rl2*sqrt(shr2(i,k)) - sri = sqrt(-ri) -! dku(i,k) = xkzmo(i,k) + dk*(1+8.*(-ri)/(1+1.746*sri)) -! dkt(i,k) = xkzo(i,k) + dk*(1+8.*(-ri)/(1+1.286*sri)) - dku(i,k) = dk*(1+8.*(-ri)/(1+1.746*sri)) - dkt(i,k) = dk*(1+8.*(-ri)/(1+1.286*sri)) - else ! stable regime - rl2 = zk*rlam/(rlam+zk) -!! tem = rlam * sqrt(0.01*prsi(i,k)) -!! rl2 = zk*tem/(tem+zk) - dk = rl2*rl2*sqrt(shr2(i,k)) - tem1 = dk/(1+5.*ri)**2 -! - if(k >= kpblx(i)) then - prnum = 1.0 + 2.1*ri - prnum = min(prnum,prmax) - else - prnum = 1.0 - endif -! dku(i,k) = xkzmo(i,k) + tem1 * prnum -! dkt(i,k) = xkzo(i,k) + tem1 - dku(i,k) = tem1 * prnum - dkt(i,k) = tem1 - endif -! - dku(i,k) = min(dku(i,k),dkmax) - dku(i,k) = max(dku(i,k),xkzmo(i,k)) - dkt(i,k) = min(dkt(i,k),dkmax) - dkt(i,k) = max(dkt(i,k),xkzo(i,k)) -! - endif -! - enddo - enddo -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! compute components for mass flux mixing by large thermals -!> ## If the PBL is convective, call the mass flux scheme to replace the countergradient terms. -!! If the PBL is convective, the updraft properties are initialized to be the same as the state variables and the subroutine mfpbl is called. - do k = 1, km - do i = 1, im - if(pcnvflg(i)) then - tcko(i,k) = t1(i,k) - ucko(i,k) = u1(i,k) - vcko(i,k) = v1(i,k) - xmf(i,k) = 0. - endif - enddo - enddo - do kk = 1, ntrac - do k = 1, km - do i = 1, im - if(pcnvflg(i)) then - qcko(i,k,kk) = q1(i,k,kk) - endif - enddo - enddo - enddo -!> For details of the mfpbl subroutine, step into its documentation ::mfpbl - call mfpbl(im,im,km,ntrac,dt2,pcnvflg, - & zl,zi,thvx,q1,t1,u1,v1,hpbl,kpbl, - & sflux,ustar,wstar,xmf,tcko,qcko,ucko,vcko) -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! compute diffusion coefficients for cloud-top driven diffusion -! if the condition for cloud-top instability is met, -! increase entrainment flux at cloud top -! -!> ## Compute enhanced diffusion coefficients related to stratocumulus-topped PBLs -!! If a stratocumulus layer has been identified in the PBL, the diffusion coefficients in the PBL are modified in the following way. -!! -!! -# First, the criteria for CTEI is checked, using the threshold from equation 13 of Macvean and Mason (1990) \cite macvean_and_mason_1990. If the criteria is met, the cloud top diffusion is increased: -!! \f[ -!! K_h^{Sc} = -c\frac{\Delta F_R}{\rho c_p}\frac{1}{\frac{\partial \theta_v}{\partial z}} -!! \f] -!! where the constant \f$c\f$ is set to 0.2 if the CTEI criterion is not met and 1.0 if it is. -!! -!! -# Calculate the diffusion coefficients due to stratocumulus mixing according to equation 5 in Lock et al. (2000) \cite lock_et_al_2000 for every level below the stratocumulus top using the characteristic stratocumulus velocity scale previously calculated. The diffusion coefficient for momentum is calculated assuming a constant inverse Prandtl number of 0.75. - do i = 1, im - if(scuflg(i)) then - k = krad(i) - tem = thetae(i,k) - thetae(i,k+1) - tem1 = qtx(i,k) - qtx(i,k+1) - if (tem > 0. .and. tem1 > 0.) then - cteit= cp*tem/(hvap*tem1) - if(cteit > actei) rent(i) = rentf2 - endif - endif - enddo - do i = 1, im - if(scuflg(i)) then - k = krad(i) - tem1 = max(bf(i,k),tdzmin) - ckt(i,k) = -rent(i)*radmin(i)/tem1 - cku(i,k) = ckt(i,k) - endif - enddo -! - do k = 1, kmpbl - do i=1,im - if(scuflg(i) .and. k < krad(i)) then - tem1=hrad(i)-zd(i) - tem2=zi(i,k+1)-tem1 - if(tem2 > 0.) then - ptem= tem2/zd(i) - if(ptem.ge.1.) ptem= 1. - ptem= tem2*ptem*sqrt(1.-ptem) - ckt(i,k) = radfac*vk*vrad(i)*ptem - cku(i,k) = 0.75*ckt(i,k) - ckt(i,k) = max(ckt(i,k),dkmin) - ckt(i,k) = min(ckt(i,k),dkmax) - cku(i,k) = max(cku(i,k),dkmin) - cku(i,k) = min(cku(i,k),dkmax) - endif - endif - enddo - enddo -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! -!> After \f$K_h^{Sc}\f$ has been determined from the surface to the top of the stratocumulus layer, it is added to the value for the diffusion coefficient calculated previously using surface-based mixing [see equation 6 of Lock et al. (2000) \cite lock_et_al_2000 ]. - do k = 1, kmpbl - do i=1,im - if(scuflg(i)) then - ! dkt(i,k) = dkt(i,k)+ckt(i,k) - ! dku(i,k) = dku(i,k)+cku(i,k) - !! if K needs to be adjusted by alpha, then no need to add this term - if(alpha .ge. 0.0) dkt(i,k) = dkt(i,k)+ckt(i,k) - if(alpha .ge. 0.0) dku(i,k) = dku(i,k)+cku(i,k) - - dkt(i,k) = min(dkt(i,k),dkmax) - dku(i,k) = min(dku(i,k),dkmax) - endif - enddo - enddo -! -! compute tridiagonal matrix elements for heat and moisture -! -!> ## Solve for the temperature and moisture tendencies due to vertical mixing. -!! The tendencies of heat, moisture, and momentum due to vertical diffusion are calculated using a two-part process. First, a solution is obtained using an implicit time-stepping scheme, then the time tendency terms are "backed out". The tridiagonal matrix elements for the implicit solution for temperature and moisture are prepared in this section, with differing algorithms depending on whether the PBL was convective (substituting the mass flux term for counter-gradient term), unstable but not convective (using the computed counter-gradient terms), or stable (no counter-gradient terms). - do i=1,im - ad(i,1) = 1. - a1(i,1) = t1(i,1) + beta(i) * heat(i) - a2(i,1) = q1(i,1,1) + beta(i) * evap(i) - enddo - - if(ntrac >= 2) then - do k = 2, ntrac - is = (k-1) * km - do i = 1, im - a2(i,1+is) = q1(i,1,k) - enddo - enddo - endif -! - do k = 1,km1 - do i = 1,im - dtodsd = dt2/del(i,k) - dtodsu = dt2/del(i,k+1) - dsig = prsl(i,k)-prsl(i,k+1) - rdz = rdzt(i,k) - tem1 = dsig * dkt(i,k) * rdz - dsdz2 = tem1 * rdz - au(i,k) = -dtodsd*dsdz2 - al(i,k) = -dtodsu*dsdz2 -! - if(pcnvflg(i) .and. k < kpbl(i)) then - tem2 = dsig * rdz - ptem = 0.5 * tem2 * xmf(i,k) - ptem1 = dtodsd * ptem - ptem2 = dtodsu * ptem - ad(i,k) = ad(i,k)-au(i,k)-ptem1 - ad(i,k+1) = 1.-al(i,k)+ptem2 - au(i,k) = au(i,k)-ptem1 - al(i,k) = al(i,k)+ptem2 - ptem = tcko(i,k) + tcko(i,k+1) - dsdzt = tem1 * gocp - a1(i,k) = a1(i,k)+dtodsd*dsdzt-ptem1*ptem - a1(i,k+1) = t1(i,k+1)-dtodsu*dsdzt+ptem2*ptem - ptem = qcko(i,k,1) + qcko(i,k+1,1) - a2(i,k) = a2(i,k) - ptem1 * ptem - a2(i,k+1) = q1(i,k+1,1) + ptem2 * ptem - elseif(ublflg(i) .and. k < kpbl(i)) then - ptem1 = dsig * dktx(i,k) * rdz - tem = 1.0 / hpbl(i) - dsdzt = tem1 * gocp - ptem1 * hgamt(i) * tem - dsdzq = - ptem1 * hgamq(i) * tem - ad(i,k) = ad(i,k)-au(i,k) - ad(i,k+1) = 1.-al(i,k) - a1(i,k) = a1(i,k)+dtodsd*dsdzt - a1(i,k+1) = t1(i,k+1)-dtodsu*dsdzt - a2(i,k) = a2(i,k)+dtodsd*dsdzq - a2(i,k+1) = q1(i,k+1,1)-dtodsu*dsdzq - else - ad(i,k) = ad(i,k)-au(i,k) - ad(i,k+1) = 1.-al(i,k) - dsdzt = tem1 * gocp - a1(i,k) = a1(i,k)+dtodsd*dsdzt - a1(i,k+1) = t1(i,k+1)-dtodsu*dsdzt - a2(i,k+1) = q1(i,k+1,1) - endif -! - enddo - enddo -! - if(ntrac >= 2) then - do kk = 2, ntrac - is = (kk-1) * km - do k = 1, km1 - do i = 1, im - if(pcnvflg(i) .and. k < kpbl(i)) then - dtodsd = dt2/del(i,k) - dtodsu = dt2/del(i,k+1) - dsig = prsl(i,k)-prsl(i,k+1) - tem = dsig * rdzt(i,k) - ptem = 0.5 * tem * xmf(i,k) - ptem1 = dtodsd * ptem - ptem2 = dtodsu * ptem - tem1 = qcko(i,k,kk) + qcko(i,k+1,kk) - a2(i,k+is) = a2(i,k+is) - ptem1*tem1 - a2(i,k+1+is)= q1(i,k+1,kk) + ptem2*tem1 - else - a2(i,k+1+is) = q1(i,k+1,kk) - endif - enddo - enddo - enddo - endif -! -! solve tridiagonal problem for heat and moisture -! -!> The tridiagonal system is solved by calling the internal ::tridin subroutine. - call tridin99(im,km,ntrac,al,ad,au,a1,a2,au,a1,a2) - -! -! recover tendencies of heat and moisture -! -!> After returning with the solution, the tendencies for temperature and moisture are recovered. - do k = 1,km - do i = 1,im - ttend = (a1(i,k)-t1(i,k)) * rdt - qtend = (a2(i,k)-q1(i,k,1))*rdt - tau(i,k) = tau(i,k)+ttend - rtg(i,k,1) = rtg(i,k,1)+qtend - dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend - dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend - enddo - enddo - if(ntrac >= 2) then - do kk = 2, ntrac - is = (kk-1) * km - do k = 1, km - do i = 1, im - qtend = (a2(i,k+is)-q1(i,k,kk))*rdt - rtg(i,k,kk) = rtg(i,k,kk)+qtend - enddo - enddo - enddo - endif -! -! compute tke dissipation rate -! -!> ## Calculate heating due to TKE dissipation and add to the tendency for temperature -!! Following Han et al. (2015) \cite han_et_al_2015 , turbulence dissipation contributes to the tendency of temperature in the following way. First, turbulence dissipation is calculated by equation 17 of Han et al. (2015) \cite han_et_al_2015 for the PBL and equation 16 for the surface layer. - if(dspheat) then -! - do k = 1,km1 - do i = 1,im - diss(i,k) = dku(i,k)*shr2(i,k)-g*ti(i,k)*dkt(i,k)*bf(i,k) -! diss(i,k) = dku(i,k)*shr2(i,k) - enddo - enddo -! -! add dissipative heating at the first model layer -! -!> Next, the temperature tendency is updated following equation 14. - do i = 1,im - tem = govrth(i)*sflux(i) - tem1 = tem + stress(i)*spd1(i)/zl(i,1) - tem2 = 0.5 * (tem1+diss(i,1)) - tem2 = max(tem2, 0.) - ttend = tem2 / cp - if (alpha .gt. 0.0) then - tau(i,1) = tau(i,1)+0.5*ttend - else - tau(i,1) = tau(i,1)+0.7*ttend ! in HWRF/HMON, use 0.7 - endif - enddo -! -! add dissipative heating above the first model layer -! - do k = 2,km1 - do i = 1,im - tem = 0.5 * (diss(i,k-1)+diss(i,k)) - tem = max(tem, 0.) - ttend = tem / cp - tau(i,k) = tau(i,k) + 0.5*ttend - enddo - enddo -! - endif -! -! compute tridiagonal matrix elements for momentum -! -!> ## Solve for the horizontal momentum tendencies and add them to the output tendency terms -!! As with the temperature and moisture tendencies, the horizontal momentum tendencies are calculated by solving tridiagonal matrices after the matrices are prepared in this section. - do i=1,im - ad(i,1) = 1.0 + beta(i) * stress(i) / spd1(i) - a1(i,1) = u1(i,1) - a2(i,1) = v1(i,1) - enddo -! - do k = 1,km1 - do i=1,im - dtodsd = dt2/del(i,k) - dtodsu = dt2/del(i,k+1) - dsig = prsl(i,k)-prsl(i,k+1) - rdz = rdzt(i,k) - tem1 = dsig*dku(i,k)*rdz - dsdz2 = tem1 * rdz - au(i,k) = -dtodsd*dsdz2 - al(i,k) = -dtodsu*dsdz2 -! - if(pcnvflg(i) .and. k < kpbl(i)) then - tem2 = dsig * rdz - ptem = 0.5 * tem2 * xmf(i,k) - ptem1 = dtodsd * ptem - ptem2 = dtodsu * ptem - ad(i,k) = ad(i,k)-au(i,k)-ptem1 - ad(i,k+1) = 1.-al(i,k)+ptem2 - au(i,k) = au(i,k)-ptem1 - al(i,k) = al(i,k)+ptem2 - ptem = ucko(i,k) + ucko(i,k+1) - a1(i,k) = a1(i,k) - ptem1 * ptem - a1(i,k+1) = u1(i,k+1) + ptem2 * ptem - ptem = vcko(i,k) + vcko(i,k+1) - a2(i,k) = a2(i,k) - ptem1 * ptem - a2(i,k+1) = v1(i,k+1) + ptem2 * ptem - else - ad(i,k) = ad(i,k)-au(i,k) - ad(i,k+1) = 1.-al(i,k) - a1(i,k+1) = u1(i,k+1) - a2(i,k+1) = v1(i,k+1) - endif -! - enddo - enddo - - do k = 1,km1 - do i=1,im - dkudiagnostic(i,k) = dku(i,k) - enddo - enddo - -! -! solve tridiagonal problem for momentum -! - call tridi299(im,km,al,ad,au,a1,a2,au,a1,a2) -! -! recover tendencies of momentum -! -!> Finally, the tendencies are recovered from the tridiagonal solutions. - do k = 1,km - do i = 1,im - utend = (a1(i,k)-u1(i,k))*rdt - vtend = (a2(i,k)-v1(i,k))*rdt - du(i,k) = du(i,k) + utend - dv(i,k) = dv(i,k) + vtend - dusfc(i) = dusfc(i) + conw*del(i,k)*utend - dvsfc(i) = dvsfc(i) + conw*del(i,k)*vtend -! -! for dissipative heating for ecmwf model -! -! tem1 = 0.5*(a1(i,k)+u1(i,k)) -! tem2 = 0.5*(a2(i,k)+v1(i,k)) -! diss(i,k) = -(tem1*utend+tem2*vtend) -! diss(i,k) = max(diss(i,k),0.) -! ttend = diss(i,k) / cp -! tau(i,k) = tau(i,k) + ttend -! - enddo - enddo -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! - do i = 1, im - hpbl(i) = hpblx(i) - kpbl(i) = kpblx(i) - enddo -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - return - end subroutine hedmf_hafs_run - -!> @} - -c----------------------------------------------------------------------- -!> \ingroup PBL -!! \brief Routine to solve the tridiagonal system to calculate temperature and moisture at \f$ t + \Delta t \f$; part of two-part process to calculate time tendencies due to vertical diffusion. -!! -!! Origin of subroutine unknown. - subroutine tridi299(l,n,cl,cm,cu,r1,r2,au,a1,a2) -cc - use machine , only : kind_phys - implicit none - integer k,n,l,i - real(kind=kind_phys) fk -cc - real(kind=kind_phys) cl(l,2:n),cm(l,n),cu(l,n-1),r1(l,n),r2(l,n), & - & au(l,n-1),a1(l,n),a2(l,n) -c----------------------------------------------------------------------- - do i=1,l - fk = 1./cm(i,1) - au(i,1) = fk*cu(i,1) - a1(i,1) = fk*r1(i,1) - a2(i,1) = fk*r2(i,1) - enddo - do k=2,n-1 - do i=1,l - fk = 1./(cm(i,k)-cl(i,k)*au(i,k-1)) - au(i,k) = fk*cu(i,k) - a1(i,k) = fk*(r1(i,k)-cl(i,k)*a1(i,k-1)) - a2(i,k) = fk*(r2(i,k)-cl(i,k)*a2(i,k-1)) - enddo - enddo - do i=1,l - fk = 1./(cm(i,n)-cl(i,n)*au(i,n-1)) - a1(i,n) = fk*(r1(i,n)-cl(i,n)*a1(i,n-1)) - a2(i,n) = fk*(r2(i,n)-cl(i,n)*a2(i,n-1)) - enddo - do k=n-1,1,-1 - do i=1,l - a1(i,k) = a1(i,k)-au(i,k)*a1(i,k+1) - a2(i,k) = a2(i,k)-au(i,k)*a2(i,k+1) - enddo - enddo -c----------------------------------------------------------------------- - return - end subroutine tridi299 -c----------------------------------------------------------------------- -!> \ingroup PBL -!! \brief Routine to solve the tridiagonal system to calculate u- and v-momentum at \f$ t + \Delta t \f$; part of two-part process to calculate time tendencies due to vertical diffusion. -!! -!! Origin of subroutine unknown. - subroutine tridin99(l,n,nt,cl,cm,cu,r1,r2,au,a1,a2) -cc - use machine , only : kind_phys - implicit none - integer is,k,kk,n,nt,l,i - real(kind=kind_phys) fk(l) -cc - real(kind=kind_phys) cl(l,2:n), cm(l,n), cu(l,n-1), & - & r1(l,n), r2(l,n*nt), & - & au(l,n-1), a1(l,n), a2(l,n*nt), & - & fkk(l,2:n-1) -c----------------------------------------------------------------------- - do i=1,l - fk(i) = 1./cm(i,1) - au(i,1) = fk(i)*cu(i,1) - a1(i,1) = fk(i)*r1(i,1) - enddo - do k = 1, nt - is = (k-1) * n - do i = 1, l - a2(i,1+is) = fk(i) * r2(i,1+is) - enddo - enddo - do k=2,n-1 - do i=1,l - fkk(i,k) = 1./(cm(i,k)-cl(i,k)*au(i,k-1)) - au(i,k) = fkk(i,k)*cu(i,k) - a1(i,k) = fkk(i,k)*(r1(i,k)-cl(i,k)*a1(i,k-1)) - enddo - enddo - do kk = 1, nt - is = (kk-1) * n - do k=2,n-1 - do i=1,l - a2(i,k+is) = fkk(i,k)*(r2(i,k+is)-cl(i,k)*a2(i,k+is-1)) - enddo - enddo - enddo - do i=1,l - fk(i) = 1./(cm(i,n)-cl(i,n)*au(i,n-1)) - a1(i,n) = fk(i)*(r1(i,n)-cl(i,n)*a1(i,n-1)) - enddo - do k = 1, nt - is = (k-1) * n - do i = 1, l - a2(i,n+is) = fk(i)*(r2(i,n+is)-cl(i,n)*a2(i,n+is-1)) - enddo - enddo - do k=n-1,1,-1 - do i=1,l - a1(i,k) = a1(i,k) - au(i,k)*a1(i,k+1) - enddo - enddo - do kk = 1, nt - is = (kk-1) * n - do k=n-1,1,-1 - do i=1,l - a2(i,k+is) = a2(i,k+is) - au(i,k)*a2(i,k+is+1) - enddo - enddo - enddo -c----------------------------------------------------------------------- - return - end subroutine tridin99 - -!> @} - - end module hedmf_hafs diff --git a/physics/moninedmf_hafs.meta b/physics/moninedmf_hafs.meta deleted file mode 100644 index 6f084e08b..000000000 --- a/physics/moninedmf_hafs.meta +++ /dev/null @@ -1,533 +0,0 @@ -[ccpp-table-properties] - name = hedmf_hafs - type = scheme - dependencies = funcphys.f90,machine.F,mfpbl.f,physcons.F90 - -######################################################################## -[ccpp-arg-table] - name = hedmf_hafs_init - type = scheme -[moninq_fac] - standard_name = atmosphere_diffusivity_coefficient_factor - long_name = multiplicative constant for atmospheric diffusivities - units = none - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F - -######################################################################## -[ccpp-arg-table] - name = hedmf_hafs_run - type = scheme -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[km] - standard_name = vertical_dimension - long_name = vertical layer dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[ntrac] - standard_name = number_of_vertical_diffusion_tracers - long_name = number of tracers to diffuse vertically - units = count - dimensions = () - type = integer - intent = in - optional = F -[ntcw] - standard_name = index_for_liquid_cloud_condensate - long_name = cloud condensate index in tracer array - units = index - dimensions = () - type = integer - intent = in - optional = F -[dv] - standard_name = tendency_of_y_wind_due_to_model_physics - long_name = updated tendency of the y wind - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[du] - standard_name = tendency_of_x_wind_due_to_model_physics - long_name = updated tendency of the x wind - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[tau] - standard_name = tendency_of_air_temperature_due_to_model_physics - long_name = updated tendency of the temperature - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[rtg] - standard_name = tendency_of_vertically_diffused_tracer_concentration - long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) - type = real - kind = kind_phys - intent = inout - optional = F -[u1] - standard_name = x_wind - long_name = x component of layer wind - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[v1] - standard_name = y_wind - long_name = y component of layer wind - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[t1] - standard_name = air_temperature - long_name = layer mean air temperature - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[q1] - standard_name = vertically_diffused_tracer_concentration - long_name = tracer concentration diffused by PBL scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension,number_of_vertical_diffusion_tracers) - type = real - kind = kind_phys - intent = in - optional = F -[swh] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - long_name = total sky shortwave heating rate - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[hlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - long_name = total sky longwave heating rate - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[xmu] - standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes - long_name = zenith angle temporal adjustment factor for shortwave - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[psk] - standard_name = dimensionless_exner_function_at_lowest_model_interface - long_name = dimensionless Exner function at the surface interface - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[rbsoil] - standard_name = bulk_richardson_number_at_lowest_model_level - long_name = bulk Richardson number at the surface - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length in cm - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[u10m] - standard_name = x_wind_at_10m - long_name = x component of wind at 10 m - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[v10m] - standard_name = y_wind_at_10m - long_name = y component of wind at 10 m - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[fm] - standard_name = Monin_Obukhov_similarity_function_for_momentum - long_name = Monin-Obukhov similarity function for momentum - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[fh] - standard_name = Monin_Obukhov_similarity_function_for_heat - long_name = Monin-Obukhov similarity function for heat - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[tsea] - standard_name = surface_skin_temperature - long_name = surface skin temperature - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[heat] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux - units = K m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[evap] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux - units = kg kg-1 m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[stress] - standard_name = surface_wind_stress - long_name = surface wind stress - units = m2 s-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[spd1] - standard_name = wind_speed_at_lowest_model_layer - long_name = wind speed at lowest model level - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[kpbl] - standard_name = vertical_index_at_top_of_atmosphere_boundary_layer - long_name = PBL top model level index - units = index - dimensions = (horizontal_loop_extent) - type = integer - intent = out - optional = F -[prsi] - standard_name = air_pressure_at_interface - long_name = air pressure at model layer interfaces - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[del] - standard_name = air_pressure_difference_between_midlayers - long_name = pres(k) - pres(k+1) - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[prsl] - standard_name = air_pressure - long_name = mean layer pressure - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[prslk] - standard_name = dimensionless_exner_function_at_model_layers - long_name = Exner function at layers - units = none - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[phii] - standard_name = geopotential_at_interface - long_name = geopotential at model layer interfaces - units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[phil] - standard_name = geopotential - long_name = geopotential at model layer centers - units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[delt] - standard_name = time_step_for_physics - long_name = time step for physics - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[dspheat] - standard_name = flag_TKE_dissipation_heating - long_name = flag for using TKE dissipation heating - units = flag - dimensions = () - type = logical - intent = in - optional = F -[dusfc] - standard_name = instantaneous_surface_x_momentum_flux - long_name = x momentum flux - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[dvsfc] - standard_name = instantaneous_surface_y_momentum_flux - long_name = y momentum flux - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[dtsfc] - standard_name = instantaneous_surface_upward_sensible_heat_flux - long_name = surface upward sensible heat flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[dqsfc] - standard_name = instantaneous_surface_upward_latent_heat_flux - long_name = surface upward latent heat flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[hpbl] - standard_name = atmosphere_boundary_layer_thickness - long_name = PBL thickness - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F -[hgamt] - standard_name = countergradient_mixing_term_for_temperature - long_name = countergradient mixing term for temperature - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[hgamq] - standard_name = countergradient_mixing_term_for_water_vapor - long_name = countergradient mixing term for water vapor - units = kg kg-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[dkt] - standard_name = atmosphere_heat_diffusivity - long_name = diffusivity for heat - units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) - type = real - kind = kind_phys - intent = out - optional = F -[kinver] - standard_name = index_of_highest_temperature_inversion - long_name = index of highest temperature inversion - units = index - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[xkzm_m] - standard_name = atmosphere_momentum_diffusivity_background - long_name = background value of momentum diffusivity - units = m2 s-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[xkzm_h] - standard_name = atmosphere_heat_diffusivity_background - long_name = background value of heat diffusivity - units = m2 s-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[xkzm_s] - standard_name = diffusivity_background_sigma_level - long_name = sigma level threshold for background diffusivity - units = none - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[lprnt] - standard_name = flag_print - long_name = flag for printing diagnostics to output - units = flag - dimensions = () - type = logical - intent = in - optional = F -[ipr] - standard_name = horizontal_index_of_printed_column - long_name = horizontal index of printed column - units = index - dimensions = () - type = integer - intent = in - optional = F -[xkzminv] - standard_name = atmosphere_heat_diffusivity_background_maximum - long_name = maximum background value of heat diffusivity - units = m2 s-1 - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[moninq_fac] - standard_name = atmosphere_diffusivity_coefficient_factor - long_name = multiplicative constant for atmospheric diffusivities - units = none - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[islimsk] - standard_name = sea_land_ice_mask - long_name = sea/land/ice mask (=0/1/2) - units = flag - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[dkudiagnostic] - standard_name = atmosphere_momentum_diffusivity - long_name = diffusivity for momentum - units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension_minus_one) - type = real - kind = kind_phys - intent = out - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F diff --git a/physics/satmedmfvdifq.F b/physics/satmedmfvdifq.F index 3741b502f..63a67c810 100644 --- a/physics/satmedmfvdifq.F +++ b/physics/satmedmfvdifq.F @@ -66,7 +66,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, & & kinver,xkzm_m,xkzm_h,xkzm_s,dspfac,bl_upfr,bl_dnfr, & & ntoz,du3dt,dv3dt,dt3dt,dq3dt,do3dt,gen_tend,ldiag3d,qdiag3d, & - & dkudiagnostic,errmsg,errflg) + & errmsg,errflg) ! use machine , only : kind_phys use funcphys , only : fpvs @@ -131,8 +131,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & & slx(im,km), svx(im,km), qtx(im,km), & tvx(im,km), pix(im,km), radx(im,km-1), & dku(im,km-1),dkt(im,km-1), dkq(im,km-1), - & cku(im,km-1),ckt(im,km-1), - & dkudiagnostic(im,km-1) + & cku(im,km-1),ckt(im,km-1) ! real(kind=kind_phys) plyr(im,km), rhly(im,km), cfly(im,km), & qstl(im,km) @@ -1539,12 +1538,6 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntiw,ntke, & ! enddo enddo - - do k = 1,km1 - do i=1,im - dkudiagnostic(i,k) = dku(i,k) - enddo - enddo c !> - Call tridi2() to solve tridiagonal problem for momentum c From c3105d8247746aa4a3591d12de9e6f0a697c372b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 16 Oct 2020 20:56:29 -0600 Subject: [PATCH 383/404] Bugfix: remove dkudiagnostic from satmedmfvdifq.meta --- physics/satmedmfvdifq.meta | 9 --------- 1 file changed, 9 deletions(-) diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index af6e23914..a57ce3839 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -670,15 +670,6 @@ type = logical intent = inout optional = F -[dkudiagnostic] - standard_name = atmosphere_momentum_diffusivity - long_name = diffusivity for momentum - units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_dimension_minus_one) - type = real - kind = kind_phys - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From b7eff6b604ffbe8b27d8c45498411fa5a908fb31 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 20 Oct 2020 14:02:59 -0600 Subject: [PATCH 384/404] Fix uninitialized variable mvd_r in physics/module_mp_thompson.F90 --- physics/module_mp_thompson.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 5c2a2acb5..7d449473b 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -1797,6 +1797,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & rho(k) = 0.622*pres(k)/(R*temp(k)*(qv(k)+0.622)) nwfa(k) = MAX(11.1E6, MIN(9999.E6, nwfa1d(k)*rho(k))) nifa(k) = MAX(naIN1*0.01, MIN(9999.E6, nifa1d(k)*rho(k))) + mvd_r(k) = D0r if (qc1d(k) .gt. R1) then no_micro = .false. From 390ec2160239c49f395f18150f19521fdd4f409a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 20 Oct 2020 14:10:10 -0600 Subject: [PATCH 385/404] Fix calls to mcica_subcol_sw in radsw_main.F90 --- physics/radsw_main.F90 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index d74d4a63f..cf9e0e524 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -1012,14 +1012,16 @@ subroutine rrtmg_sw_run & enddo enddo - call mcica_subcol_sw (1, j1, nlay, iovrsw, permuteseed, & - & irng, plyr, hgt, & - & cld_cf, cld_iwp, cld_lwp,cld_swp, & - & cld_ref_ice, cld_ref_liq, & - & cld_ref_snow, taucld3,ssacld3,asmcld3,fsfcld3, & - & cldfmcl, ciwpmcl, clwpmcl, cswpmcl, & !--output - & reicmcl, relqmcl, resnmcl, & - & taucmcl, ssacmcl, asmcmcl, fsfcmcl) + call mcica_subcol_sw (1, 1, nlay, iovrsw, permuteseed, & + & irng, plyr(j1:j1,:), hgt(j1:j1,:), & + & cld_cf(j1:j1,:), cld_iwp(j1:j1,:), cld_lwp(j1:j1,:), & + & cld_swp(j1:j1,:), cld_ref_ice(j1:j1,:), cld_ref_liq(j1:j1,:), & + & cld_ref_snow(j1:j1,:), taucld3(:,j1:j1,:), ssacld3(:,j1:j1,:), & + & asmcld3(:,j1:j1,:), fsfcld3(:,j1:j1,:), cldfmcl(:,j1:j1,:), & !--output + & ciwpmcl(:,j1:j1,:), clwpmcl(:,j1:j1,:), cswpmcl(:,j1:j1,:), & + & reicmcl(j1:j1,:), relqmcl(j1:j1,:), resnmcl(j1:j1,:), & + & taucmcl(:,j1:j1,:), ssacmcl(:,j1:j1,:), asmcmcl(:,j1:j1,:), & + & fsfcmcl(:,j1:j1,:)) endif !mz* end @@ -5769,7 +5771,7 @@ subroutine mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, & & ssac, asmc, fsfc, & & cldfmcl, ciwpmcl, clwpmcl, cswpmcl, reicmcl, & & relqmcl, resnmcl, & - & taucmcl, ssacmcl, asmcmcl, fsfcmcl) + & taucmcl, ssacmcl, asmcmcl, fsfcmcl) ! ----- Input ----- ! Control From 748b0bc508af21d175aebc997179c497894a97ca Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Thu, 22 Oct 2020 02:43:04 +0000 Subject: [PATCH 386/404] Modified code per PR recommendations --- physics/cires_orowam2017.F90 | 17 +++++--- physics/cires_ugwp_initialize_v1.F90 | 34 +++++++++------ physics/cires_ugwp_module_v1.F90 | 65 +++++++++++++++------------- physics/cires_ugwp_orolm97_v1.F90 | 30 ++++++++++--- physics/cires_ugwp_solv2_v1_mod.F90 | 43 +++++++++++++----- physics/cires_ugwp_triggers_v1.F90 | 30 ++++++++----- physics/cires_vert_orodis_v1.F90 | 31 ++++++++----- physics/ugwp_driver_v0.F | 10 ++++- physics/unified_ugwp.F90 | 39 +++++++++-------- physics/unified_ugwp.meta | 36 +++++++++++++++ physics/unified_ugwp_post.F90 | 4 +- 11 files changed, 231 insertions(+), 108 deletions(-) diff --git a/physics/cires_orowam2017.F90 b/physics/cires_orowam2017.F90 index d5568bb9d..d5fda5cc0 100644 --- a/physics/cires_orowam2017.F90 +++ b/physics/cires_orowam2017.F90 @@ -6,11 +6,10 @@ module cires_orowam2017 subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & & dtp,dxres, taub, u1, v1, t1, xn, yn, bn2, rho, prsi, prsL, & - & del, sigma, hprime, gamma, theta, & + & grav, omega, con_rd, del, sigma, hprime, gamma, theta, & & sinlat, xlatd, taup, taud, pkdis) ! USE MACHINE , ONLY : kind_phys - use ugwp_common_v1 , only : grav, omega2 ! implicit none @@ -29,6 +28,7 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & real(kind=kind_phys), intent(in), dimension(im, levs) :: & & u1, v1, t1, bn2, rho, prsl, del + real(kind=kind_phys), intent(in) :: grav, omega, con_rd real(kind=kind_phys), intent(in), dimension(im, levs+1) :: prsi ! @@ -128,11 +128,12 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master, & wkdis(:,:) = kedmin call oro_meanflow(levs, nzi, u1(j,:), v1(j,:), t1(j,:), & - & prsi(j,:), prsL(j,:), del(j,:), rho(i,:), & + & prsi(j,:), prsL(j,:), grav, con_rd, & + & del(j,:), rho(i,:), & & bn2(i,:), uzi, rhoi,ktur, kalp,dzi, & & xn(i), yn(i)) - fcor2 = (omega2*sinlat(j))*(omega2*sinlat(j))*fc_flag + fcor2 = (2*omega*sinlat(j))*(2*omega*sinlat(j))*fc_flag k = ksrc @@ -282,9 +283,10 @@ end subroutine oro_wam_2017 ! !------------------------------------------------------------- subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, & + & grav, con_rd, & & delp, rho, bn2, uzi, rhoi, ktur, kalp, dzi, xn, yn) - use ugwp_common_v1 , only : grav, rgrav, rdi, velmin, dw2min + use ugwp_common_v1 , only : velmin, dw2min implicit none integer :: nz, nzi @@ -292,6 +294,7 @@ subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, & real, dimension(nz ) :: bn2 ! define at the interfaces real, dimension(nz+1) :: pint real :: xn, yn + real,intent(in) :: grav, con_rd ! output real, dimension(nz+1) :: dzi, uzi, rhoi, ktur, kalp @@ -300,6 +303,7 @@ subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, & integer :: i, j, k real :: ui, vi, ti, uz, vz, shr2, rdz, kamp real :: zgrow, zmet, rdpm, ritur, kmol, w1 + real :: rgrav, rdi ! paremeters real, parameter :: hps = 7000., rpspa = 1.e-5 real, parameter :: rhps=1.0/hps @@ -309,6 +313,9 @@ subroutine oro_meanflow(nz, nzi, u1, v1, t1, pint, pmid, & real, parameter :: lsc2 = lturb*lturb,usc2 = uturb*uturb kalp(1:nzi) = 2.e-7 ! radiative damping + rgrav = 1.0/grav + rdi = 1.0/con_rd + do k=2, nz rdpm = grav/(pmid(k-1)-pmid(k)) ui = .5*(u1(k-1)+u1(k)) diff --git a/physics/cires_ugwp_initialize_v1.F90 b/physics/cires_ugwp_initialize_v1.F90 index ef6c2c7d1..4258680ea 100644 --- a/physics/cires_ugwp_initialize_v1.F90 +++ b/physics/cires_ugwp_initialize_v1.F90 @@ -54,15 +54,14 @@ end module ugwp_common_v1 !Part-1 init => wave dissipation + RFriction ! !=================================================== - subroutine init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) + subroutine init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, con_pi, & + pa_rf, tau_rf, me, master) - use ugwp_common_v1, only : pih - implicit none integer , intent(in) :: me, master integer , intent(in) :: levs - real, intent(in) :: pa_rf, tau_rf + real, intent(in) :: con_pi, pa_rf, tau_rf real, intent(in) :: zkm(levs), pmb(levs) ! in km-Pa real, intent(out), dimension(levs+1) :: kvg, ktg, krad, kion ! @@ -91,6 +90,10 @@ subroutine init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau real :: rf_fv3, rtau_fv3, ptop, pih_dlog ! real :: ae1 ,ae2 + real :: pih + + pih = 0.5*con_pi + pa_alp = pa_rf tau_alp = tau_rf @@ -335,12 +338,13 @@ module ugwp_conv_init_v1 contains ! subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, & - lonr, kxw, cgwf) - use ugwp_common_v1, only : pi2, arad + con_pi, arad, lonr, kxw, cgwf) + implicit none integer :: nwaves, nazdir, nstoch integer :: lonr + real :: con_pi, arad real :: cgwf(2) real :: kxw, effac real :: work1 = 0.5 @@ -352,7 +356,7 @@ subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, & nstcon = nstoch eff_con = effac - con_dlength = pi2*arad/float(lonr) + con_dlength = 2.0*con_pi*arad/float(lonr) con_cldf = cgwf(1) * work1 + cgwf(2) *(1.-work1) ! ! allocate & define spectra in "selected direction": "dc" "ch(nwaves)" @@ -378,7 +382,7 @@ subroutine init_conv_gws(nwaves, nazdir, nstoch, effac, & snorm = sum(spf_conv) spf_conv = spf_conv/snorm*1.5 - call init_nazdir(nazdir, xaz_conv, yaz_conv) + call init_nazdir(con_pi, nazdir, xaz_conv, yaz_conv) end subroutine init_conv_gws @@ -405,12 +409,13 @@ module ugwp_fjet_init_v1 real, allocatable :: ch_fjet(:) , spf_fjet(:) real, allocatable :: xaz_fjet(:), yaz_fjet(:) contains - subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) - use ugwp_common_v1, only : pi2, arad + subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac, & + con_pi, lonr, kxw) implicit none integer :: nwaves, nazdir, nstoch integer :: lonr + real :: con_pi real :: kxw, effac , chk integer :: k @@ -431,7 +436,7 @@ subroutine init_fjet_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) ch_fjet(k) = chk spf_fjet(k) = 1.0 enddo - call init_nazdir(nazdir, xaz_fjet, yaz_fjet) + call init_nazdir(con_pi, nazdir, xaz_fjet, yaz_fjet) end subroutine init_fjet_gws @@ -459,13 +464,14 @@ module ugwp_okw_init_v1 contains ! - subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) + subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, & + con_pi, lonr, kxw) - use ugwp_common_v1, only : pi2, arad implicit none integer :: nwaves, nazdir, nstoch integer :: lonr + real :: con_pi real :: kxw, effac , chk integer :: k @@ -486,7 +492,7 @@ subroutine init_okw_gws(nwaves, nazdir, nstoch, effac, lonr, kxw) spf_okwp(k) = 1. enddo - call init_nazdir(nazdir, xaz_okwp, yaz_okwp) + call init_nazdir(con_pi, nazdir, xaz_okwp, yaz_okwp) end subroutine init_okw_gws diff --git a/physics/cires_ugwp_module_v1.F90 b/physics/cires_ugwp_module_v1.F90 index a25854097..9b245ed11 100644 --- a/physics/cires_ugwp_module_v1.F90 +++ b/physics/cires_ugwp_module_v1.F90 @@ -39,12 +39,12 @@ module cires_ugwp_module_v1 ! integer :: curday_ugwp ! yyyymmdd 20150101 ! integer :: ddd_ugwp ! ddd of year from 1-366 - integer :: knob_ugwp_solver=1 ! 1, 2, 3, 4 - (linsat, ifs_2010, ad_gfdl, dsp_dis) - integer, dimension(4) :: knob_ugwp_source ! [1,1,1,0] - (oro, fronts, conv, imbf-owp] - integer, dimension(4) :: knob_ugwp_wvspec ! number of waves for- (oro, fronts, conv, imbf-owp] - integer, dimension(4) :: knob_ugwp_azdir ! number of wave azimuths for- (oro, fronts, conv, imbf-owp] - integer, dimension(4) :: knob_ugwp_stoch ! 1 - deterministic ; 0 - stochastic - real, dimension(4) :: knob_ugwp_effac ! efficiency factors for- (oro, fronts, conv, imbf-owp] + integer :: knob_ugwp_solver=1 ! 1, 2, 3, 4 - (linsat, ifs_2010, ad_gfdl, dsp_dis) + integer, dimension(4) :: knob_ugwp_source=(/1,0,1,0/) ! [1,0,1,1] - (oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_wvspec=(/1,32,32,32/) ! number of waves for- (oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_azdir=(/2,4,4,4/) ! number of wave azimuths for- (oro, fronts, conv, imbf-owp] + integer, dimension(4) :: knob_ugwp_stoch=(/0,0,0,0/) ! 0 - deterministic ; 1 - stochastic + real, dimension(4) :: knob_ugwp_effac=(/1.,1.,1.,1./) ! efficiency factors for- (oro, fronts, conv, imbf-owp] integer :: knob_ugwp_doaxyz=1 ! 1 -gwdrag integer :: knob_ugwp_doheat=1 ! 1 -gwheat @@ -94,11 +94,6 @@ module cires_ugwp_module_v1 real :: ugwp_effac ! - data knob_ugwp_source / 1,0, 1, 0 / ! oro-conv-fjet-okw-taub_lat: 1-active 0-off - data knob_ugwp_wvspec /1,32,32,32/ ! number of waves for- (oro, fronts, conv, imbf-owp, taulat] - data knob_ugwp_azdir /2, 4, 4,4/ ! number of wave azimuths for- (oro, fronts, conv, imbf-okwp] - data knob_ugwp_stoch /0, 0, 0,0/ ! 0 - deterministic ; 1 - stochastic, non-activated option - data knob_ugwp_effac /1.,1.,1.,1./ ! efficiency factors for- (oro, fronts, conv, imbf-owp] integer :: knob_ugwp_version = 0 integer :: launch_level = 55 ! @@ -170,9 +165,9 @@ module cires_ugwp_module_v1 - subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & - lonr, latr, levs, ak, bk, pref, dtp, cdmvgwd, cgwf, & - pa_rf_in, tau_rf_in) + subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, con_pi, & + con_rerth, fn_nml2, lonr, latr, levs, ak, bk, pref, dtp, cdmvgwd, & + cgwf, pa_rf_in, tau_rf_in, errmsg, errflg) ! ! input_nml_file ='input.nml'=fn_nml ..... OLD_namelist and cdmvgwd(4) Corrected Bug Oct 4 ! @@ -201,11 +196,14 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & real, intent (in) :: ak(levs+1), bk(levs+1), pref real, intent (in) :: dtp real, intent (in) :: cdmvgwd(2), cgwf(2) ! "scaling" controls for "old" GFS-GW dims(2) !!! - real, intent (in) :: pa_rf_in, tau_rf_in + real, intent (in) :: pa_rf_in, tau_rf_in, con_pi, con_rerth character(len=64), intent (in) :: fn_nml2 character(len=64), parameter :: fn_nml='input.nml' + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! character, intent (in) :: input_nml_file ! integer, parameter :: logunit = 6 integer :: ios @@ -215,8 +213,7 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & integer :: ncid, iernc, vid, dimid, status integer :: k integer :: ddd_ugwp, curday_ugwp - real :: avqbo(6) - avqbo = [0.05, 0.1, 0.25, 0.5, 0.75, 0.95] + real, dimension(6) :: avqbo = (/0.05, 0.1, 0.25, 0.5, 0.75, 0.95/) ! if (me == master) print *, trim (fn_nml), ' GW-namelist file ' inquire (file =trim (fn_nml) , exist = exists) @@ -231,6 +228,12 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & read (nlunit, nml = cires_ugwp_nml) close (nlunit) ! + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + strsolver= knob_ugwp_orosolv pa_rf = pa_rf_in tau_rf = tau_rf_in @@ -304,7 +307,8 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & ! ! Part-1 :init_global_gwdis_v1 ! - call init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, pa_rf, tau_rf, me, master) + call init_global_gwdis_v1(levs, zkm, pmb, kvg, ktg, krad, kion, con_pi, & + pa_rf, tau_rf, me, master) call rf_damp_init_v1 (levs, pa_rf, tau_rf, dtp, pmb, rfdis, rfdist, levs_rf) ! ! Part-2 :init_SOURCES_gws @@ -326,21 +330,24 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & if (knob_ugwp_wvspec(4) > 0) then ! okw call init_okw_gws(knob_ugwp_wvspec(4), knob_ugwp_azdir(4), & - knob_ugwp_stoch(4), knob_ugwp_effac(4), lonr, kxw ) + knob_ugwp_stoch(4), knob_ugwp_effac(4), & + con_pi, lonr, kxw ) if (me == master) print *, ' init_okw_gws ' endif if (knob_ugwp_wvspec(3) > 0) then ! fronts call init_fjet_gws(knob_ugwp_wvspec(3), knob_ugwp_azdir(3), & - knob_ugwp_stoch(3), knob_ugwp_effac(3), lonr, kxw ) + knob_ugwp_stoch(3), knob_ugwp_effac(3), & + con_pi, lonr, kxw ) if (me == master) print *, ' init_fjet_gws ' endif if (knob_ugwp_wvspec(2) > 0) then ! conv call init_conv_gws(knob_ugwp_wvspec(2), knob_ugwp_azdir(2), & - knob_ugwp_stoch(2), knob_ugwp_effac(2), lonr, kxw, cgwf ) + knob_ugwp_stoch(2), knob_ugwp_effac(2), & + con_pi, con_rerth, lonr, kxw, cgwf ) if (me == master) & print *, ' init_convective GWs cgwf', knob_ugwp_wvspec(2), knob_ugwp_azdir(2) @@ -356,10 +363,10 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & iernc=NF90_OPEN(trim(ugwp_taufile), nf90_nowrite, ncid) if(iernc.ne.0) then - write(6,*) - write(6,*) ' cannot open file_limb_tab data-file', trim(ugwp_taufile) - write(6,*) - stop + write(errmsg,'(*(a))') "Cannot open file_limb_tab data-file ", & + trim(ugwp_taufile) + errflg = 1 + return else @@ -388,10 +395,10 @@ subroutine cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat_gfs, fn_nml2, & iernc=NF90_OPEN(trim(ugwp_qbofile), nf90_nowrite, ncid) if(iernc.ne.0) then - write(6,*) - write(6,*) ' cannot open qbofile data-file', trim(ugwp_qbofile) - write(6,*) - stop + write(errmsg,'(*(a))') "Cannot open qbofile data-file ", & + trim(ugwp_qbofile) + errflg = 1 + return else status = nf90_inq_dimid(ncid, "lat", DimID) diff --git a/physics/cires_ugwp_orolm97_v1.F90 b/physics/cires_ugwp_orolm97_v1.F90 index e6c3a1ea0..fd692a825 100644 --- a/physics/cires_ugwp_orolm97_v1.F90 +++ b/physics/cires_ugwp_orolm97_v1.F90 @@ -8,7 +8,8 @@ module cires_ugwp_orolm97_v1 subroutine gwdps_oro_v1(im, km, imx, do_tofd, & pdvdt, pdudt, pdtdt, pkdis, u1,v1,t1,q1,kpbl, & prsi,del,prsl,prslk, zmeti, zmet, dtp, kdt, hprime, & - oc, oa4, clx4, theta, sigmad, gammad, elvmaxd, sgh30, & + oc, oa4, clx4, theta, sigmad, gammad, elvmaxd, & + grav, con_omega, rd, cpd, rv, pi, arad, fv, sgh30, & dusfc, dvsfc, xlatd, sinlat, coslat, sparea, & cdmbgwd, me, master, rdxzb, & zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & @@ -23,10 +24,7 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & !---------------------------------------- use machine , only : kind_phys - use ugwp_common_v1, only : rgrav, grav, cpd, rd, rv, rcpd, rcpd2, & - pi, rad_to_deg, deg_to_rad, pi2, & - rdi, gor, grcp, gocp, fv, gr2, & - bnv2min, dw2min, velmin, arad + use ugwp_common_v1, only : dw2min, velmin use ugwp_oro_init_v1, only : rimin, ric, efmin, efmax , & hpmax, hpmin, sigfaci => sigfac , & @@ -70,6 +68,8 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & clx4(im,4), theta(im), sigmad(im), & gammad(im), elvmaxd(im) + real(kind=kind_phys), intent(in) :: grav, con_omega, rd, cpd, rv, & + pi, arad, fv real(kind=kind_phys), intent(in) :: sgh30(im) real(kind=kind_phys), intent(in), dimension(im,km) :: & u1, v1, t1, q1,del, prsl, prslk, zmet @@ -166,6 +166,10 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & real(kind=kind_phys) :: kxridge, inv_b2eff, zw1, zw2 real(kind=kind_phys) :: belps, aelps, nhills, selps + + real(kind=kind_phys) :: rgrav, rcpd, rcpd2, rad_to_deg, deg_to_rad + real(kind=kind_phys) :: pi2, rdi, gor, grcp, gocp, gr2, bnv2min + ! ! various integers ! @@ -181,6 +185,19 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & ! rcpdt = 1.0 / (cpd*dtp) grav2 = grav + grav +! + rgrav = 1.0/grav + rcpd = 1.0/cpd + rcpd2 = 0.5/cpd + rad_to_deg=180.0/pi + deg_to_rad=pi/180.0 + pi2 = 2.*pi + rdi = 1.0/rd + gor = grav/rd + grcp = grav*rcpd + gocp = grcp + gr2 = grav*gor + bnv2min = (pi2/1800.)*(pi2/1800.) ! ! mtb-blocking sigma_min and dxres => cires_initialize ! @@ -813,6 +830,7 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & call oro_wam_2017(im, km, npt, ipt, kref, kdt, me, master, & dtp, dxres, taub, u1, v1, t1, xn, yn, bnv2, ro, prsi,prsl, & + grav, con_omega, rd, & del, sigma, hprime, gamma, theta, sinlat, xlatd, taup, taud, pkdis) endif ! oro_wam_2017 - linsatdis-solver of wam-2017 @@ -840,7 +858,7 @@ subroutine gwdps_oro_v1(im, km, imx, do_tofd, & vp1(k) = v1(j,k) enddo - call ugwp_tofd1d(km, sigflt, elvmaxd(j), zsurf, zpbl, & + call ugwp_tofd1d(km, cpd, sigflt, elvmaxd(j), zsurf, zpbl, & up1, vp1, zpm, utofd1, vtofd1, epstofd1, krf_tofd1) do k=1,km diff --git a/physics/cires_ugwp_solv2_v1_mod.F90 b/physics/cires_ugwp_solv2_v1_mod.F90 index c84028199..46a5fb833 100644 --- a/physics/cires_ugwp_solv2_v1_mod.F90 +++ b/physics/cires_ugwp_solv2_v1_mod.F90 @@ -11,8 +11,9 @@ module cires_ugwp_solv2_v1_mod ! they are out of given column !--------------------------------------------------- subroutine cires_ugwp_solv2_v1(im, levs, dtp , & - tm , um, vm, qm, prsl, prsi, zmet, zmeti, & + tm , um, vm, qm, prsl, prsi, zmet, zmeti, & prslk, xlatd, sinlat, coslat, & + grav, cpd, rd, rv, omega, pi, fv, & pdudt, pdvdt, pdtdt, dked, tauabs, wrms, trms, & tau_ngw, mpi_id, master, kdt) ! @@ -30,12 +31,7 @@ subroutine cires_ugwp_solv2_v1(im, levs, dtp , & use cires_ugwp_module_v1,only : knob_ugwp_doheat, knob_ugwp_dokdis, idebug_gwrms - use ugwp_common_v1 , only : rgrav, grav, cpd, rd, rv, rcpdl, grav2cpd, & - omega2, rcpd, rcpd2, pi, pi2, fv, & - rad_to_deg, deg_to_rad, & - rdi, gor, grcp, gocp, & - bnv2min, bnv2max, dw2min, velmin, gr2, & - hpscale, rhp, rh4, grav2, rgrav2, mkzmin, mkz2min + use ugwp_common_v1 , only : dw2min, velmin, hpscale, rhp, rh4 ! use ugwp_wmsdis_init_v1, only : v_kxw, rv_kxw, v_kxw2, tamp_mpa, tau_min, ucrit, & maxdudt, gw_eff, dked_min, dked_max, maxdtdt, & @@ -67,6 +63,8 @@ subroutine cires_ugwp_solv2_v1(im, levs, dtp , & real ,intent(in) :: tau_ngw(im) integer, intent(in):: mpi_id, master, kdt + + real ,intent(in) :: grav, cpd, rd, rv, omega, pi, fv ! ! ! out-gw effects @@ -144,7 +142,10 @@ subroutine cires_ugwp_solv2_v1(im, levs, dtp , & real :: pwrms, ptrms real :: zu, zcin, zcin2, zcin3, zcin4, zcinc real :: zatmp, fluxs, zdep, ze1, ze2 - +! + real :: rcpdl, grav2cpd, rcpd, rcpd2, pi2, rad_to_deg + real :: deg_to_rad, rdi, gor, grcp, gocp, bnv2min, bnv2max, gr2 + real :: grav2, rgrav, rgrav2, mkzmin, mkz2min ! real :: zdelp, zdelm, taud_min real :: tvc, tvm, ptc, ptm @@ -192,9 +193,27 @@ subroutine cires_ugwp_solv2_v1(im, levs, dtp , & tauabs=0.0; wrms =0.0 ; trms =0.0 endif -! grav2 = grav + grav -! rgrav2 = rgrav*rgrav - + + grav2 = grav + grav + rgrav = 1.0/grav + rgrav2 = rgrav*rgrav + rdi = 1.0/rd + gor = grav/rd + gr2 = grav*gor + rcpd = 1.0/cpd + rcpd2 = 0.5/cpd + rcpdl = cpd*rgrav ! 1/[g/cp] == cp/g + pi2 = 2.0*pi + grcp = grav*rcpd + gocp = grcp + grav2cpd = grav*grcp ! g*(g/cp)= g^2/cp + rad_to_deg=180.0/pi + deg_to_rad=pi/180.0 + bnv2min = (pi2/1800.)*(pi2/1800.) + bnv2max = (pi2/30.)*(pi2/30.) + mkzmin = pi2/80.0e3 + mkz2min = mkzmin*mkzmin + rci(:) = 1./zci(:) rdci(:) = 1./zdci(:) @@ -224,7 +243,7 @@ subroutine cires_ugwp_solv2_v1(im, levs, dtp , & DO j=1, im jl =j - tx1 = omega2 * sinlat(j) *rv_kxw + tx1 = 2*omega * sinlat(j) *rv_kxw cf1 = abs(tx1) c2f2 = tx1 * tx1 ucrit_max = max(ucrit, cf1) diff --git a/physics/cires_ugwp_triggers_v1.F90 b/physics/cires_ugwp_triggers_v1.F90 index 44911e1d5..8cfd57cb7 100644 --- a/physics/cires_ugwp_triggers_v1.F90 +++ b/physics/cires_ugwp_triggers_v1.F90 @@ -9,24 +9,25 @@ subroutine ugwp_triggers write(6,*) ' physics-based triggers for UGWP ' end subroutine ugwp_triggers ! - SUBROUTINE subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & + SUBROUTINE subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, con_pi, earth_r, & cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) - use ugwp_common_v1 , only : deg_to_rad implicit none integer :: nx, ny real :: lon(nx), lat(ny) real :: rlon(nx), rlat(ny) , cosv(ny), tanlat(ny) real :: rlatc(ny-1), brcos(ny), brcos2(ny) - real :: earth_r, ra1, ra2, dx, dy, dlat + real :: ra1, ra2, dx, dy, dlat + real :: con_pi, earth_r real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) integer :: j + real :: deg_to_rad ! ! specify common constants and ! geometric factors to compute deriv-es etc ... ! coriolis coslat tan etc... ! - earth_r = 6370.e3 + deg_to_rad = con_pi/180.0 ra1 = 1.0 / earth_r ra2 = ra1*ra1 ! @@ -125,10 +126,12 @@ subroutine get_xyd_wind( V, Vx, Vy, Vyd, nx, ny, dlam1, dlat, divJp, divJm) end subroutine get_xyd_wind - subroutine trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_fgf) + subroutine trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, & + con_pi, con_rerth, pmid, trig3d_fgf) implicit none integer :: nx, ny, nz real :: lon(nx), lat(ny) + real :: con_pi, con_rerth ! real, dimension(nz) :: pmid real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d @@ -150,7 +153,7 @@ subroutine trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) - call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & + call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, con_pi, con_rerth, & cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) do k=1, nz @@ -173,6 +176,7 @@ subroutine trig3d_okubo( nx, ny, nz, U, V, T, Q, P3d, PS, delp, delz, lon, lat, implicit none integer :: nx, ny, nz real :: lon(nx), lat(ny) + real :: con_pi, con_rerth ! real, dimension(nz) :: pmid real, dimension(nx, ny, nz) :: U, V, T, Q, delp, delz, p3d @@ -193,7 +197,7 @@ subroutine trig3d_okubo( nx, ny, nz, U, V, T, Q, P3d, PS, delp, delz, lon, lat, real :: dx, dy, dlat real :: dlam1(ny), dlam2(ny), divJp(ny), divJm(ny) - call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, & + call subs_diag_geo(nx, ny, lat, lon, rlat, rlon, dy, dx, con_pi, con_rerth, & cosv, rlatc, brcos, brcos2, dlam1, dlam2, dlat, divJp, divJm) do k=1, nz @@ -238,12 +242,13 @@ end subroutine trig3d_dconv subroutine cires_3d_triggers( nx, ny, nz, lon, lat, pmid, & U, V, W, T, Q, delp, delz, p3d, PS, HS, Hyam, Hybm, Hyai, Hybi, & - trig3d_okw, trig3d_fgf, trig3d_conv, & + con_pi, con_rerth, trig3d_okw, trig3d_fgf, trig3d_conv, & dcheat3d, precip2d, cld_klevs2d, scheat3d) implicit none integer :: nx, ny, nz real :: lon(nx), lat(ny) + real :: con_pi, con_rerth ! ! reversed ??? Hyai, Hybi , pmid ! @@ -265,7 +270,8 @@ subroutine cires_3d_triggers( nx, ny, nz, lon, lat, pmid, & ! !=================================================================================== - call trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_fgf) + call trig3d_fjets( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, & + con_pi, con_rerth, pmid, trig3d_fgf) call trig3d_okubo( nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_okw) call trig3d_dconv(nx, ny, nz, U, V, T, Q, P3D, PS, delp, delz, lon, lat, pmid, trig3d_conv, & dcheat3d, precip2d, cld_klevs2d, scheat3d) @@ -544,13 +550,15 @@ subroutine slat_geos5(im, xlatdeg, tau_gw) enddo ! end subroutine slat_geos5 - subroutine init_nazdir(naz, xaz, yaz) - use ugwp_common_v1 , only : pi2 + subroutine init_nazdir(con_pi, naz, xaz, yaz) implicit none + real :: con_pi integer :: naz real, dimension(naz) :: xaz, yaz integer :: idir real :: phic, drad + real :: pi2 + pi2 = 2.0*con_pi drad = pi2/float(naz) if (naz.ne.4) then do idir =1, naz diff --git a/physics/cires_vert_orodis_v1.F90 b/physics/cires_vert_orodis_v1.F90 index c328a3fb6..d16b1519f 100644 --- a/physics/cires_vert_orodis_v1.F90 +++ b/physics/cires_vert_orodis_v1.F90 @@ -766,15 +766,15 @@ end subroutine ugwp_taub_oro ! !-------------------------------------- ! -! call ugwp_oro_lsatdis( krefj, levs, tauogw(j), tautot(j), tau_src, kxw, & -! fcor(j), c2f2(j), up, vp, tp, qp, dp, zpm, zpi, pmid1, pint1, & -! xn, yn, umag, drtau, kdis_oro) +! call ugwp_oro_lsatdis( krefj, levs, tauogw(j), tautot(j), tau_src, & +! con_pi, con_g, kxw, fcor(j), c2f2(j), up, vp, tp, qp, dp, zpm, zpi, & +! pmid1, pint1, xn, yn, umag, drtau, kdis_oro) subroutine ugwp_oro_lsatdis( krefj, levs, tauogw, tautot, tau_src, & - kxw, fcor, kxridge, up, vp, tp, qp, dp, zpm, zpi, pmid, pint, & - xn, yn, umag, drtau, kdis) + pi, grav, kxw, fcor, kxridge, up, vp, tp, qp, dp, zpm, zpi, & + pmid, pint, xn, yn, umag, drtau, kdis) - use ugwp_common_v1, only : bnv2min, grav, pi, pi2, dw2min, velmin, rgrav + use ugwp_common_v1, only : dw2min, velmin use cires_ugwp_module_v1, only : frcrit, ricrit, linsat, hps, rhp1, rhp2 use cires_ugwp_module_v1, only : kvg, ktg, krad, kion use ugwp_oro_init_v1, only : coro , fcrit_sm , fcrit_sm2 @@ -786,6 +786,8 @@ subroutine ugwp_oro_lsatdis( krefj, levs, tauogw, tautot, tau_src, & real , dimension(levs+1) :: tau_src + real, intent(in) :: pi, grav + real, dimension(levs) , intent(in) :: up, vp, tp, qp, dp, zpm real, dimension(levs+1), intent(in) :: zpi, pmid, pint real , intent(in) :: xn, yn, umag @@ -796,6 +798,7 @@ subroutine ugwp_oro_lsatdis( krefj, levs, tauogw, tautot, tau_src, & ! ! locals ! + real :: bnv2min, pi2, rgrav real :: uref, udir, uf2, ufd, uf2p real, dimension(levs+1) :: tauz real, dimension(levs) :: rho @@ -809,6 +812,10 @@ subroutine ugwp_oro_lsatdis( krefj, levs, tauogw, tautot, tau_src, & real :: betadis, betam, betat, cdfm, cdft real :: fsat, hsat, hsat2, kds , c2f2 + pi2 = 2.0*pi + bnv2min = (pi2/1800.)*(pi2/1800.) + rgrav = 1.0/grav + drtau(1:levs) = 0.0 kdis (1:levs) = 0.0 @@ -931,15 +938,15 @@ subroutine ugwp_oro_lsatdis( krefj, levs, tauogw, tautot, tau_src, & end subroutine ugwp_oro_lsatdis ! ! - subroutine ugwp_tofd(im, levs, sigflt, elvmax, zpbl, u, v, zmid, & + subroutine ugwp_tofd(im, levs, con_cp, sigflt, elvmax, zpbl, u, v, zmid, & utofd, vtofd, epstofd, krf_tofd) use machine , only : kind_phys - use ugwp_common_v1 , only : rcpd2 use ugwp_oro_init_v1, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd ! implicit none ! integer :: im, levs + real(kind_phys) :: con_cp real(kind_phys), dimension(im, levs) :: u, v, zmid real(kind_phys), dimension(im) :: sigflt, elvmax, zpbl real(kind_phys), dimension(im, levs) :: utofd, vtofd, epstofd, krf_tofd @@ -947,10 +954,12 @@ subroutine ugwp_tofd(im, levs, sigflt, elvmax, zpbl, u, v, zmid, & ! locals ! integer :: i, k + real :: rcpd2 real :: sgh = 30. real :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, zexp, krf ! utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 + rcpd2 = 0.5/con_cp ! do i=1, im @@ -979,14 +988,14 @@ subroutine ugwp_tofd(im, levs, sigflt, elvmax, zpbl, u, v, zmid, & end subroutine ugwp_tofd ! ! - subroutine ugwp_tofd1d(levs, sigflt, elvmax, zsurf, zpbl, u, v, & + subroutine ugwp_tofd1d(levs, con_cp, sigflt, elvmax, zsurf, zpbl, u, v, & zmid, utofd, vtofd, epstofd, krf_tofd) use machine , only : kind_phys - use ugwp_common_v1 , only : rcpd2 use ugwp_oro_init_v1, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd ! implicit none integer :: levs + real(kind_phys) :: con_cp real(kind_phys), dimension(levs) :: u, v, zmid real(kind_phys) :: sigflt, elvmax, zpbl, zsurf real(kind_phys), dimension(levs) :: utofd, vtofd, epstofd, krf_tofd @@ -994,10 +1003,12 @@ subroutine ugwp_tofd1d(levs, sigflt, elvmax, zsurf, zpbl, u, v, & ! locals ! integer :: i, k + real :: rcpd2 real :: sghmax = 5. real :: sgh2, ekin, zdec, rzdec, umag, zmet, zarg, ztexp, krf ! utofd =0.0 ; vtofd = 0.0 ; epstofd =0.0 ; krf_tofd =0.0 + rcpd2 = 0.5/con_cp ! zdec = max(n_tofd*sigflt, zpbl) ! ntimes*sgh_turb or Zpbl zdec = min(ze_tofd, zdec) ! cannot exceed 18 km diff --git a/physics/ugwp_driver_v0.F b/physics/ugwp_driver_v0.F index f573c8776..3e3411fa8 100644 --- a/physics/ugwp_driver_v0.F +++ b/physics/ugwp_driver_v0.F @@ -31,7 +31,8 @@ subroutine cires_ugwp_driver_v0(me, master, ! (similar to WAM-2017) !----------------------------------------------------------- use machine, only : kind_phys - use physcons, only : con_cp, con_g, con_rd, con_rv + use physcons, only : con_cp, con_g, con_rd, con_rv, & + con_omega use ugwp_wmsdis_init, only : tamp_mpa, ilaunch use sso_coorde, only : pgwd, pgwd4, debugprint @@ -121,6 +122,7 @@ subroutine cires_ugwp_driver_v0(me, master, & SIGMA, GAMM, ELVMAX, & DUSFCg, DVSFCg, xlatd, sinlat, coslat, spgrid, & cdmbgwd(1:2), me, master, rdxzb, + & con_g, con_omega, & zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & du3dt_mtb, du3dt_ogw, du3dt_tms) ! @@ -287,7 +289,8 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, & PRSI,DEL,PRSL,PRSLK,PHII, PHIL,DTP,KDT, & sgh30, HPRIME,OC,OA4,CLX4,THETA,vSIGMA,vGAMMA,ELVMAXD, & DUSFC, DVSFC, xlatd, sinlat, coslat, sparea, - $ cdmbgwd, me, master, rdxzb, + & cdmbgwd, me, master, rdxzb, + & con_g, con_omega, & zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & dudt_mtb, dudt_ogw, dudt_tms) !---------------------------------------- @@ -341,6 +344,8 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, real(kind=kind_phys), intent(in) :: ELVMAXD(IM), THETA(IM) real(kind=kind_phys), intent(in) :: vSIGMA(IM), vGAMMA(IM) real(kind=kind_phys) :: SIGMA(IM), GAMMA(IM) + + real(kind=kind_phys), intent(in) :: con_g, con_omega !output -phys-tend real(kind=kind_phys),dimension(im,km),intent(out) :: @@ -1066,6 +1071,7 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, call oro_wam_2017(im, km, npt, ipt, kref, kdt, me, master, & dtp, dxres, taub, u1, v1, t1, xn, yn, bnv2, ro, prsi,prsL, + & con_g, con_omega, & del, sigma, hprime, gamma, theta, & sinlat, xlatd, taup, taud, pkdis) diff --git a/physics/unified_ugwp.F90 b/physics/unified_ugwp.F90 index 13b9f9193..fda887f3e 100644 --- a/physics/unified_ugwp.F90 +++ b/physics/unified_ugwp.F90 @@ -74,10 +74,10 @@ module unified_ugwp ! subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & fn_nml2, jdat, lonr, latr, levs, ak, bk, dtp, cdmbgwd, cgwf, & - pa_rf_in, tau_rf_in, con_p0, do_ugwp, do_ugwp_v0, & - do_ugwp_v0_orog_only, do_gsl_drag_ls_bl, do_gsl_drag_ss, & - do_gsl_drag_tofd, do_ugwp_v1, do_ugwp_v1_orog_only, & - errmsg, errflg) + con_pi, con_rerth, pa_rf_in, tau_rf_in, con_p0, do_ugwp, & + do_ugwp_v0, do_ugwp_v0_orog_only, do_gsl_drag_ls_bl, & + do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, & + do_ugwp_v1_orog_only, errmsg, errflg) !---- initialization of unified_ugwp implicit none @@ -95,7 +95,7 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & real(kind=kind_phys), intent (in) :: dtp real(kind=kind_phys), intent (in) :: cdmbgwd(4), cgwf(2) ! "scaling" controls for "old" GFS-GW schemes real(kind=kind_phys), intent (in) :: pa_rf_in, tau_rf_in - real(kind=kind_phys), intent (in) :: con_p0 + real(kind=kind_phys), intent (in) :: con_p0, con_pi, con_rerth logical, intent (in) :: do_ugwp logical, intent (in) :: do_ugwp_v0, do_ugwp_v0_orog_only, & do_gsl_drag_ls_bl, do_gsl_drag_ss, & @@ -156,9 +156,10 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & if ( do_ugwp_v1 ) then - call cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat, & - fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, & - cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in) + call cires_ugwp_init_v1 (me, master, nlunit, logunit, jdat, con_pi, & + con_rerth, fn_nml2, lonr, latr, levs, ak, bk, & + con_p0, dtp, cdmbgwd(1:2), cgwf, pa_rf_in, & + tau_rf_in, errmsg, errflg) end if is_initialized = .true. @@ -171,11 +172,11 @@ end subroutine unified_ugwp_init ! ----------------------------------------------------------------------- !>@brief The subroutine finalizes the CIRES UGWP -#if 0 + !> \section arg_table_unified_ugwp_finalize Argument Table !! \htmlinclude unified_ugwp_finalize.html !! -#endif + subroutine unified_ugwp_finalize(do_ugwp_v0,do_ugwp_v1,errmsg, errflg) implicit none @@ -229,8 +230,8 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, del, kpbl, dusfcg, dvsfcg, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & tau_tofd, tau_mtb, tau_ogw, tau_ngw, zmtb, zlwb, zogw, & dudt_mtb,dudt_ogw, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & - dudt, dvdt, dtdt, rdxzb, con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, & - rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & + dudt, dvdt, dtdt, rdxzb, con_g, con_omega, con_pi, con_cp, con_rd, con_rv, & + con_rerth, con_fvirt, rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & ldiag3d, lssav, flag_for_gwd_generic_tend, do_ugwp_v0, do_ugwp_v0_orog_only, & do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, do_ugwp_v1, & @@ -288,7 +289,8 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, real(kind=kind_phys), intent(inout), dimension(im, levs):: dudt, dvdt, dtdt - real(kind=kind_phys), intent(in) :: con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt + real(kind=kind_phys), intent(in) :: con_g, con_omega, con_pi, con_cp, con_rd, & + con_rv, con_rerth, con_fvirt real(kind=kind_phys), intent(in), dimension(im) :: rain @@ -397,10 +399,11 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, ugrs , vgrs, tgrs, q1, KPBL, prsi,del,prsl, & prslk, zmeti, zmet, dtp, kdt, hprime, oc, oa4, & clx, theta, sigma, gamma, elvmax, & - sgh30, DUSFCg, DVSFCg, xlat_d, sinlat, coslat, & - area,cdmbgwd(1:2), me, master, rdxzb, & - zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & - du3dt_mtb, du3dt_ogw, du3dt_tms) + con_g, con_omega, con_rd, con_cp, con_rv,con_pi, & + con_rerth, con_fvirt, sgh30, DUSFCg, DVSFCg, & + xlat_d, sinlat, coslat, area,cdmbgwd(1:2), me, & + master, rdxzb, zmtb, zogw, tau_mtb, tau_ogw, & + tau_tofd, du3dt_mtb, du3dt_ogw, du3dt_tms) end if @@ -663,6 +666,8 @@ subroutine unified_ugwp_run(me, master, im, levs, ntrac, dtp, fhzero, kdt, call cires_ugwp_solv2_v1(im, levs, dtp, & tgrs, ugrs, vgrs, q1, prsl, prsi, & zmet, zmeti,prslk, xlat_d, sinlat, coslat, & + con_g, con_cp, con_rd, con_rv, con_omega, & + con_pi, con_fvirt, & gw_dudt, gw_dvdt, gw_dTdt, gw_kdis, & tauabs, wrms, trms, tau_ngw, me, master, kdt) diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 28aa196d3..49f9365fd 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -138,6 +138,24 @@ kind = kind_phys intent = in optional = F +[con_pi] + standard_name = pi + long_name = ratio of a circle's circumference to its diameter + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rerth] + standard_name = radius_of_earth + long_name = radius of earth + units = m + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [pa_rf_in] standard_name = pressure_cutoff_for_rayleigh_damping long_name = pressure level from which Rayleigh Damping is applied @@ -1067,6 +1085,15 @@ kind = kind_phys intent = in optional = F +[con_omega] + standard_name = angular_velocity_of_earth + long_name = angular velocity of earth + units = s-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter @@ -1103,6 +1130,15 @@ kind = kind_phys intent = in optional = F +[con_rerth] + standard_name = radius_of_earth + long_name = radius of earth + units = m + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [con_fvirt] standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one long_name = rv/rd - 1 (rv = ideal gas constant for water vapor) diff --git a/physics/unified_ugwp_post.F90 b/physics/unified_ugwp_post.F90 index 5e43f2830..39de4b475 100644 --- a/physics/unified_ugwp_post.F90 +++ b/physics/unified_ugwp_post.F90 @@ -12,11 +12,11 @@ subroutine unified_ugwp_post_init () end subroutine unified_ugwp_post_init !>@brief The subroutine initializes the unified UGWP -#if 0 + !> \section arg_table_unified_ugwp_post_run Argument Table !! \htmlinclude unified_ugwp_post_run.html !! -#endif + subroutine unified_ugwp_post_run (ldiag_ugwp, dtf, im, levs, & From 73f06a3273f13077d73673eeb180e51c2ea90911 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Mon, 26 Oct 2020 23:14:46 +0000 Subject: [PATCH 387/404] Modified code per G. Firl's PR recommendations --- physics/cires_vert_orodis_v1.F90 | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/physics/cires_vert_orodis_v1.F90 b/physics/cires_vert_orodis_v1.F90 index d16b1519f..9638abc56 100644 --- a/physics/cires_vert_orodis_v1.F90 +++ b/physics/cires_vert_orodis_v1.F90 @@ -37,6 +37,9 @@ subroutine ugwp_drag_mtb( iemax, nz, & real, dimension(nz), intent(in) :: up, vp, tp, qp, dp, zpm, pmid real, dimension(nz+1), intent(in) :: zpi, pint + + ! character(len=*), intent(out) :: errmsg + ! integer, intent(out) :: errflg ! real, dimension(nz+1) :: zpi_zero real, dimension(nz) :: zpm_zero @@ -51,7 +54,12 @@ subroutine ugwp_drag_mtb( iemax, nz, & phiang, ang, pe, ek, & cang, sang, ss2, cs2, zlen, dbtmp, & hamp, bgamm, cgamm - + + + ! Initialize CCPP error handling variables + ! errmsg = '' + ! errflg = 0 + !================================================== ! ! elvp + hprime <=>elvp + nridge*hprime, ns =2 @@ -77,11 +85,11 @@ subroutine ugwp_drag_mtb( iemax, nz, & mtb_fix = cdmb*sigma/hamp !hamp ~ 2*hprime and 1/sigfac = 0.25 is inside 1/hamp - if (mtb_fix == 0.) then - print *, cdmb, sigma, hamp - print *, ' MTB == 0' - stop - endif + ! if (mtb_fix == 0.) then + ! write(errmsg,'(*(a))') cdmb, sigma, hamp, ' MTB == 0' + ! errflg = 1 + ! return + ! endif if (strver == 'vay_2018') then @@ -99,7 +107,14 @@ subroutine ugwp_drag_mtb( iemax, nz, & bn2, uhm, vhm, bn2hm, rhohm) umag = max(sqrt(uhm*uhm + vhm*vhm), velmin) !velmin=dw2min =1.0 m/s - if (bn2hm .le. 0.0) then + ! if (bn2hm .le. 0.0) then + ! write(errmsg,'(*(a))') 'unstable MF for MTB - RETURN ' + ! errflg = 1 + ! return + ! end if + + + print *, ' unstable MF for MTB -RETURN ' RETURN ! unstable PBL endif From 2cf01d008e8f26e858cdb520226b8e5b8be50375 Mon Sep 17 00:00:00 2001 From: Michael Toy Date: Tue, 27 Oct 2020 19:52:27 +0000 Subject: [PATCH 388/404] cires_vert_orodis_v1.F90 bug fix --- physics/cires_vert_orodis_v1.F90 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/physics/cires_vert_orodis_v1.F90 b/physics/cires_vert_orodis_v1.F90 index 9638abc56..852c114b0 100644 --- a/physics/cires_vert_orodis_v1.F90 +++ b/physics/cires_vert_orodis_v1.F90 @@ -110,14 +110,9 @@ subroutine ugwp_drag_mtb( iemax, nz, & ! if (bn2hm .le. 0.0) then ! write(errmsg,'(*(a))') 'unstable MF for MTB - RETURN ' ! errflg = 1 - ! return + ! return ! unstable PBL ! end if - - - print *, ' unstable MF for MTB -RETURN ' - RETURN ! unstable PBL - endif bnmag =sqrt(bn2hm) frd_src = min(hamp*bnmag/umag, frmax) ! frmax =10. From dc843a5b033938db1a02a51f0e9f0866b5964b99 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 27 Oct 2020 23:41:01 +0000 Subject: [PATCH 389/404] Initial commit --- physics/radiation_cloud_overlap.F90 | 116 ++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 physics/radiation_cloud_overlap.F90 diff --git a/physics/radiation_cloud_overlap.F90 b/physics/radiation_cloud_overlap.F90 new file mode 100644 index 000000000..a94923ba5 --- /dev/null +++ b/physics/radiation_cloud_overlap.F90 @@ -0,0 +1,116 @@ +module module_radiation_cloud_overlap + use physparam, only : kind_phys + implicit none + public :: cmp_dcorr_lgth + + interface cmp_dcorr_lgth + module procedure cmp_dcorr_lgth_hogan + module procedure cmp_dcorr_lgth_oreopoulos + end interface + +contains + ! ###################################################################################### + ! Hogan et al. (2010) + ! "Effect of improving representation of horizontal and vertical cloud structure on the + ! Earth's global radiation budget. Part I: Review and parametrization" + ! https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.647 + ! ###################################################################################### + subroutine cmp_dcorr_lgth_hogan(nCol, lat, con_pi, dcorr_lgth) + ! Inputs + integer, intent(in) :: & + nCol ! Number of horizontal grid-points + real(kind_phys), intent(in) :: & + con_pi ! Physical constant: Pi + real(kind_phys), dimension(nCol), intent(in) :: & + lat ! Latitude + ! Outputs + real(kind_phys), dimension(nCol),intent(out) :: & + dcorr_lgth ! Decorrelation length + + ! Local variables + integer :: iCol + + ! Parameters + real(kind_phys),parameter :: min_dcorr = 0.6 ! (see section 2.3) + + do iCol =1,nCol + dcorr_lgth(iCol) = max(min_dcorr, 2.78-4.6*abs(lat(iCol)/con_pi)) ! (eq. 13) + enddo + + end subroutine cmp_dcorr_lgth_hogan + ! ###################################################################################### + ! Oreopoulos et al. (2012) + ! "Radiative impacts of cloud heterogeneity and overlap in an + ! atmospheric General Circulation Model" + ! 10.5194/acp-12-9097-2012 + ! ###################################################################################### + subroutine cmp_dcorr_lgth_oreopoulos(nCol, lat, juldat, yearlength, dcorr_lgth) + ! Inputs + integer, intent(in) :: & + nCol, & ! Number of horizontal grid-points + yearlength ! Number of days in year + + real(kind_phys), intent(in) :: & + juldat ! Julian date + real(kind_phys), dimension(nCol), intent(in) :: & + lat ! Latitude + + ! Outputs + real(kind_phys), dimension(nCol),intent(out) :: & + dcorr_lgth ! Decorrelation length (km) + + ! Parameters for the Gaussian fits per Eqs. (10) and (11) (See Table 1) + real(kind_phys), parameter :: & ! + am1 = 1.4315_kind_phys, & ! + am2 = 2.1219_kind_phys, & ! + am4 = -25.584_kind_phys, & ! + amr = 7.0_kind_phys ! + + ! Local variables + integer :: iCol + real(kind_phys) :: am3 + + do iCol = 1, nCol + if (juldat .gt. 181._kind_phys) then + am3 = -4._kind_phys * amr * (juldat - 272._kind_phys) / yearlength ! (eq. 11a) + else + am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) / yearlength ! (eq. 11b) + endif + dcorr_lgth(iCol) = am1 + am2 * exp( -(lat(iCol) - am3)**2 / am4**2) ! (eq. 10) + enddo + + end subroutine cmp_dcorr_lgth_oreopoulos + + ! ###################################################################################### + ! + ! ###################################################################################### + subroutine get_alpha_exp(nCol, nLay, dzlay, dcorr_lgth, alpha) + + ! Inputs + integer, intent(in) :: & + nCol, & ! Number of horizontal grid points + nLay ! Number of vertical grid points + real(kind_phys), dimension(nCol), intent(in) :: & + dcorr_lgth ! Decorrelation length (km) + real(kind_phys), dimension(nCol,nLay), intent(in) :: & + dzlay ! + + ! Outputs + real(kind_phys), dimension(nCol,nLay) :: & + alpha ! Cloud overlap parameter + + ! Local variables + integer :: iCol,iLay + + do iCol = 1, nCol + alpha(iCol,1) = 0.0d0 + do iLay = 2, nLay + alpha(iCol,iLay) = exp( -(dzlay(iCol,iLay)) / dcorr_lgth(iCol)) + enddo + enddo + + return + + end subroutine get_alpha_exp + +end module module_radiation_cloud_overlap From e23d4a8845b4145413c590e3f03806ba4bc7cde8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 28 Oct 2020 16:01:52 +0000 Subject: [PATCH 390/404] Use common cloud-overlap routines in RRTMG --- physics/radiation_clouds.f | 391 ++++++++++--------------------------- 1 file changed, 106 insertions(+), 285 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 828db4ed0..069c8e867 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -208,14 +208,16 @@ !> This module computes cloud related quantities for radiation computations. module module_radiation_clouds ! - use physparam, only : icldflg, iovrsw, iovrlw, & + use physparam, only : icldflg, iovrsw, iovrlw, idcor, & & lcrick, lcnorm, lnoprec, & & ivflip, kind_phys, kind_io4 use physcons, only : con_fvirt, con_ttp, con_rocp, & & con_t0c, con_pi, con_g, con_rd, & - & con_thgni + & con_thgni, decorr_con use module_microphysics, only : rsipath2 use module_iounitdef, only : NICLTUN + use module_radiation_cloud_overlap, only: cmp_dcorr_lgth, & + & get_alpha_exp ! implicit none ! @@ -257,8 +259,7 @@ module module_radiation_clouds integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & - & cld_init, progcld5, progcld4o, gethml, & - & get_alpha_dcorr, get_alpha_exp + & cld_init, progcld5, progcld4o, gethml ! ================= @@ -837,14 +838,22 @@ subroutine progcld1 & enddo endif -!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha_exp & -! --- inputs: - & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & -! --- outputs: - & alpha & - & ) + if (idcor == 1) then + call cmp_dcorr_lgth(ix, xlat, con_pi, de_lgth) + endif + if (idcor == 2) then + call cmp_dcorr_lgth(ix, latdeg, julian, yearlen, de_lgth) + endif + if (idcor == 0) then + de_lgth(:) = decorr_con + endif + + ! Call subroutine get_alpha_exp to define alpha parameter for exponential cloud overlap options + if (iovr == 3 .or. iovr == 4 .or. iovr == 5) then + call get_alpha_exp(ix, nLay, dzlay, de_lgth, alpha) + else + de_lgth(:) = 0. + alpha(:,:) = 0. endif !> - Call gethml() to compute low,mid,high,total, and boundary layer @@ -1300,23 +1309,22 @@ subroutine progcld2 & enddo enddo -! --- ... estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later - - if ( iovr == 3 ) then - do i = 1, ix - de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) - enddo + if (idcor == 1) then + call cmp_dcorr_lgth(ix, xlat, con_pi, de_lgth) + endif + if (idcor == 2) then + call cmp_dcorr_lgth(ix, latdeg, julian, yearlen, de_lgth) + endif + if (idcor == 0) then + de_lgth(:) = decorr_con endif -!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha_exp & -! --- inputs: - & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & -! --- outputs: - & alpha & - & ) + ! Call subroutine get_alpha_exp to define alpha parameter for exponential cloud overlap options + if (iovr == 3 .or. iovr == 4 .or. iovr == 5) then + call get_alpha_exp(ix, nLay, dzlay, de_lgth, alpha) + else + de_lgth(:) = 0. + alpha(:,:) = 0. endif !> - Call gethml(), to compute low, mid, high, total, and boundary @@ -1723,23 +1731,23 @@ subroutine progcld3 & enddo enddo -! --- ... estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later - if ( iovr == 3 ) then - do i = 1, ix - de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) - enddo + if (idcor == 1) then + call cmp_dcorr_lgth(ix, xlat, con_pi, de_lgth) + endif + if (idcor == 2) then + call cmp_dcorr_lgth(ix, latdeg, julian, yearlen, de_lgth) + endif + if (idcor == 0) then + de_lgth(:) = decorr_con endif -!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha_exp & -! --- inputs: - & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & -! --- outputs: - & alpha & - & ) + ! Call subroutine get_alpha_exp to define alpha parameter for exponential cloud overlap options + if (iovr == 3 .or. iovr == 4 .or. iovr == 5) then + call get_alpha_exp(ix, nLay, dzlay, de_lgth, alpha) + else + de_lgth(:) = 0. + alpha(:,:) = 0. endif !> -# Call gethml() to compute low,mid,high,total, and boundary layer @@ -2086,23 +2094,22 @@ subroutine progcld4 & enddo enddo -! --- ... estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later - - if ( iovr == 3 ) then - do i = 1, ix - de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) - enddo + if (idcor == 1) then + call cmp_dcorr_lgth(ix, xlat, con_pi, de_lgth) + endif + if (idcor == 2) then + call cmp_dcorr_lgth(ix, latdeg, julian, yearlen, de_lgth) + endif + if (idcor == 0) then + de_lgth(:) = decorr_con endif -!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha_exp & -! --- inputs: - & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & -! --- outputs: - & alpha & - & ) + ! Call subroutine get_alpha_exp to define alpha parameter for exponential cloud overlap options + if (iovr == 3 .or. iovr == 4 .or. iovr == 5) then + call get_alpha_exp(ix, nLay, dzlay, de_lgth, alpha) + else + de_lgth(:) = 0. + alpha(:,:) = 0. endif ! --- compute low, mid, high, total, and boundary layer cloud fractions @@ -2440,23 +2447,22 @@ subroutine progcld4o & enddo enddo -! --- ... estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later - - if ( iovr == 3 ) then - do i = 1, ix - de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) - enddo + if (idcor == 1) then + call cmp_dcorr_lgth(ix, xlat, con_pi, de_lgth) + endif + if (idcor == 2) then + call cmp_dcorr_lgth(ix, latdeg, julian, yearlen, de_lgth) + endif + if (idcor == 0) then + de_lgth(:) = decorr_con endif -!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha_exp & -! --- inputs: - & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & -! --- outputs: - & alpha & - & ) + ! Call subroutine get_alpha_exp to define alpha parameter for exponential cloud overlap options + if (iovr == 3 .or. iovr == 4 .or. iovr == 5) then + call get_alpha_exp(ix, nLay, dzlay, de_lgth, alpha) + else + de_lgth(:) = 0. + alpha(:,:) = 0. endif !> - Call gethml() to compute low, mid, high, total, and boundary layer cloud fractions @@ -2808,23 +2814,22 @@ subroutine progcld5 & enddo enddo -! --- ... estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later - - if ( iovr == 3 ) then - do i = 1, ix - de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) - enddo + if (idcor == 1) then + call cmp_dcorr_lgth(ix, xlat, con_pi, de_lgth) + endif + if (idcor == 2) then + call cmp_dcorr_lgth(ix, latdeg, julian, yearlen, de_lgth) + endif + if (idcor == 0) then + de_lgth(:) = decorr_con endif -!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha_exp & -! --- inputs: - & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & -! --- outputs: - & alpha & - & ) + ! Call subroutine get_alpha_exp to define alpha parameter for exponential cloud overlap options + if (iovr == 3 .or. iovr == 4 .or. iovr == 5) then + call get_alpha_exp(ix, nLay, dzlay, de_lgth, alpha) + else + de_lgth(:) = 0. + alpha(:,:) = 0. endif !> - Call gethml() to compute low,mid,high,total, and boundary layer @@ -3202,24 +3207,23 @@ subroutine progclduni & ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) enddo enddo - -!> -# Estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later - - if ( iovr == 3 ) then - do i = 1, ix - de_lgth(i) = max( 0.6, 2.78-4.6*rxlat(i) ) - enddo + ! Compute cloud decorrelation length + if (idcor == 1) then + call cmp_dcorr_lgth(ix, xlat, con_pi, de_lgth) + endif + if (idcor == 2) then + call cmp_dcorr_lgth(ix, latdeg, julian, yearlen, de_lgth) + endif + if (idcor == 0) then + de_lgth(:) = decorr_con endif -!> - Call subroutine get_alpha_exp to define alpha parameter for EXP and ER cloud overlap options - if ( iovr == 4 .or. iovr == 5 ) then - call get_alpha_exp & -! --- inputs: - & (ix, nlay, dzlay, iovr, latdeg, julian, yearlen, cldtot, & -! --- outputs: - & alpha & - & ) + ! Call subroutine get_alpha_exp to define alpha parameter for exponential cloud overlap options + if (iovr == 3 .or. iovr == 4 .or. iovr == 5) then + call get_alpha_exp(ix, nLay, dzlay, de_lgth, alpha) + else + de_lgth(:) = 0. + alpha(:,:) = 0. endif !> - Call gethml() to compute low,mid,high,total, and boundary layer @@ -3709,189 +3713,6 @@ subroutine get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, & enddo end subroutine get_alpha_dcorr - ! ######################################################################################### -!> \ingroup module_radiation_clouds -!! This program derives the exponential transition, alpha, from maximum to -!! random overlap needed to define the fractional cloud vertical correlation -!! for the exponential (EXP, iovrlp=4) or the exponential-random (ER, iovrlp=5) -!! cloud overlap options for RRTMG/RRTMGP. For exponential, the transition from -!! maximum to random with distance through model layers occurs without regard -!! to the configuration of clear and cloudy layers. For the ER method, each -!! block of adjacent cloudy layers is treated with a separate transition from -!! maximum to random, and blocks of cloudy layers separated by one or more -!! clear layers are correlated randomly. -!> /param nlon : number of model longitude points -!> /param nlay : vertical layer dimension -!> /param dzlay(nlon,nlay) : distance between the center of model layers -!> /param iovrlp : cloud overlap method -!> : 0 = random -!> : 1 = maximum-random -!> : 2 = maximum -!> : 3 = decorrelation (NOAA/Hou) -!> : 4 = exponential (AER) -!> : 5 = exponential-random (AER) -!> /param latdeg(nlon) : latitude (in degrees 90 -> -90) -!> /param juldat : day of the year (fractional julian day) -!> /param yearlen : current length of the year (365/366 days) -!> /param cldf(nlon,nlay) : cloud fraction -!> /param idcor : decorrelation length method -!> : 0 = constant value (AER; decorr_con) -!> : 1 = latitude and day of year varying value (AER; Oreopoulos, et al., 2012) -!> /param decorr_con : decorrelation length constant -!! -!>\section detail Detailed Algorithm -!! @{ - subroutine get_alpha_exp & -! --- inputs: - & (nlon, nlay, dzlay, iovrlp, latdeg, juldat, yearlen, cldf, & -! --- outputs: - & alpha & - & ) - -! =================================================================== ! -! ! -! abstract: Derives the exponential transition, alpha, from maximum to ! -! random overlap needed to define the fractional cloud vertical ! -! correlation for the exponential (EXP, iovrlp=4) or the exponential- ! -! random (ER, iovrlp=5) cloud overlap options for RRTMG. For ! -! exponential, the transition from maximum to random with distance ! -! through model layers occurs without regard to the configuration of ! -! clear and cloudy layers. For the ER method, each block of adjacent ! -! cloudy layers is treated with a separate transition from maximum to ! -! random, and blocks of cloudy layers separated by one or more ! -! clear layers are correlated randomly. ! -! ! -! usage: call get_alpha_exp ! -! ! -! subprograms called: none ! -! ! -! attributes: ! -! language: fortran 90 ! -! machine: ibm-sp, sgi ! -! ! -! author: m.j. iacono (AER) for use with the RRTMG radiation code ! -! ! -! ==================== definition of variables ==================== ! -! ! -! Input variables: ! -! nlon : number of model longitude points ! -! nlay : vertical layer dimension ! -! dzlay(nlon,nlay) : distance between the center of model layers ! -! iovrlp : cloud overlap method ! -! : 0 = random ! -! : 1 = maximum-random ! -! : 2 = maximum ! -! : 3 = decorrelation (NOAA/Hou) ! -! : 4 = exponential (AER) ! -! : 5 = exponential-random (AER) ! -! latdeg(nlon) : latitude (in degrees 90 -> -90) ! -! juldat : day of the year (fractional julian day) ! -! yearlen : current length of the year (365/366 days) ! -! cldf(nlon,nlay) : cloud fraction ! -! ! -! output variables: ! -! alpha(nlon,nlay) : alpha exponential transition parameter for ! -! : cloud vertical correlation ! -! ! -! external module variables: (in physcons) ! -! decorr_con : decorrelation length constant (km) ! -! ! -! external module variables: (in physparam) ! -! idcor : control flag for decorrelation length method ! -! =0: constant decorrelation length (decorr_con) ! -! =1: latitude and day-of-year varying decorrelation! -! length (AER; Oreopoulos, et al., 2012) ! -! ! -! ==================== end of description ===================== ! -! - use physcons, only: decorr_con - use physparam, only: idcor - - implicit none - -! Input - integer, intent(in) :: nlon, nlay - integer, intent(in) :: iovrlp - integer, intent(in) :: yearlen - real(kind=kind_phys), dimension(:,:), intent(in) :: dzlay - real(kind=kind_phys), dimension(:,:), intent(in) :: cldf - real(kind=kind_phys), dimension(:), intent(in) :: latdeg - real(kind=kind_phys), intent(in) :: juldat - -! Output - real(kind=kind_phys), dimension(:,:), intent(out):: alpha - -! Local - integer :: i, k - real(kind=kind_phys) :: decorr_len(nlon) ! Decorrelation length (km) - -! Constants for latitude and day-of-year dependent decorrlation length (Oreopoulos et al, 2012) -! Used when idcor = 1 - real(kind=kind_phys), parameter :: am1 = 1.4315_kind_phys - real(kind=kind_phys), parameter :: am2 = 2.1219_kind_phys - real(kind=kind_phys), parameter :: am4 = -25.584_kind_phys - real(kind=kind_phys), parameter :: amr = 7.0_kind_phys - real(kind=kind_phys) :: am3 - - real(kind=kind_phys), parameter :: zero = 0.0d0 - real(kind=kind_phys), parameter :: one = 1.0d0 - -! -!===> ... begin here -! -! If exponential or exponential-random cloud overlap is used: -! derive day-of-year and latitude-varying decorrelation lendth if requested; -! otherwise use the constant decorrelation length, decorr_con, specified in physcons.F90 - do i = 1, nlon - if (iovrlp == 4 .or. iovrlp == 5) then - if (idcor .eq. 1) then - if (juldat .gt. 181._kind_phys) then - am3 = -4._kind_phys * amr * (juldat - 272._kind_phys) - & / yearlen - else - am3 = 4._kind_phys * amr * (juldat - 91._kind_phys) - & / yearlen - endif -! For latitude in degrees, decorr_len in km - decorr_len(i) = am1 + am2 * exp( -(latdeg(i) - am3)**2 - & / am4**2) - else - decorr_len(i) = decorr_con - endif - endif - enddo - -! For atmospheric data defined from surface to toa; define alpha from surface to toa -! Exponential cloud overlap - if (iovrlp == 4) then - do i = 1, nlon - alpha(i,1) = zero - do k = 2, nlay - alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) - enddo - enddo - endif -! Exponential-random cloud overlap - if (iovrlp == 5) then - do i = 1, nlon - alpha(i,1) = zero - do k = 2, nlay - alpha(i,k) = exp( -(dzlay(i,k)) / decorr_len(i)) - ! Decorrelate layers when a clear layer follows a cloudy layer to enforce - ! random correlation between non-adjacent blocks of cloudy layers - if (cldf(i,k) .eq. zero .and. cldf(i,k-1) .gt. zero) then - alpha(i,k) = zero - endif - enddo - enddo - endif - - return - - end subroutine get_alpha_exp -!----------------------------------- -!! @} -! !........................................! end module module_radiation_clouds ! !! @} From a8cc7697c5ce4e6ba5539b9595a6398364608d0a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 28 Oct 2020 16:40:22 +0000 Subject: [PATCH 391/404] Remove distinct lw/sw cloud-overlap options in RRTMG. --- physics/GFS_rrtmg_pre.meta | 2 +- physics/GFS_rrtmg_setup.F90 | 27 +++++++++++-------------- physics/GFS_rrtmg_setup.meta | 14 +++---------- physics/physcons.F90 | 2 +- physics/physparam.f | 17 ++++------------ physics/radiation_clouds.f | 9 +++------ physics/radlw_main.f | 30 ++++++++++++++-------------- physics/radsw_main.f | 32 +++++++++++++++--------------- physics/rrtmgp_sw_cloud_optics.F90 | 1 - 9 files changed, 55 insertions(+), 79 deletions(-) diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 0ffa78ee5..5ad7bc76a 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -3,7 +3,7 @@ type = scheme dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,module_mp_radar.F90,module_mp_thompson.F90 dependencies = module_mp_thompson_make_number_concentrations.F90,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f - dependencies = radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radlw_param.f,radsw_param.f,surface_perturbation.F90 + dependencies = radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radlw_param.f,radsw_param.f,surface_perturbation.F90,radiation_cloud_overlap.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/GFS_rrtmg_setup.F90 b/physics/GFS_rrtmg_setup.F90 index b3c91cacc..1bf2e445b 100644 --- a/physics/GFS_rrtmg_setup.F90 +++ b/physics/GFS_rrtmg_setup.F90 @@ -5,7 +5,7 @@ module GFS_rrtmg_setup use physparam, only : isolar , ictmflg, ico2flg, ioznflg, iaerflg,& ! & iaermdl, laswflg, lalwflg, lavoflg, icldflg, & & iaermdl, icldflg, & - & iovrsw , iovrlw , lcrick , lcnorm , lnoprec, & + & iovrRad=>iovr, lcrick , lcnorm , lnoprec, & & ialbflg, iemsflg, isubcsw, isubclw, ivflip , ipsd0, & & iswcliq, & & kind_phys @@ -45,7 +45,7 @@ module GFS_rrtmg_setup !! subroutine GFS_rrtmg_setup_init ( & si, levr, ictm, isol, ico2, iaer, ialb, iems, ntcw, num_p2d, & - num_p3d, npdf3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & + num_p3d, npdf3d, ntoz, iovr, isubc_sw, isubc_lw, & icliq_sw, crick_proof, ccnorm, & imp_physics, & norad_precip, idate, iflip, & @@ -131,7 +131,7 @@ subroutine GFS_rrtmg_setup_init ( & ! Stamnes(1993) \cite hu_and_stamnes_1993 method ! ! =2:cloud optical property scheme based on Hu and ! ! Stamnes(1993) -updated ! -! iovr_sw/iovr_lw : control flag for cloud overlap (sw/lw rad) ! +! iovr : control flag for cloud overlap (sw/lw rad) ! ! =0: random overlapping clouds ! ! =1: max/ran overlapping clouds ! ! =2: maximum overlap clouds (mcica only) ! @@ -177,8 +177,7 @@ subroutine GFS_rrtmg_setup_init ( & integer, intent(in) :: num_p3d integer, intent(in) :: npdf3d integer, intent(in) :: ntoz - integer, intent(in) :: iovr_sw - integer, intent(in) :: iovr_lw + integer, intent(in) :: iovr integer, intent(in) :: isubc_sw integer, intent(in) :: isubc_lw integer, intent(in) :: icliq_sw @@ -268,9 +267,10 @@ subroutine GFS_rrtmg_setup_init ( & iswcliq = icliq_sw ! optical property for liquid clouds for sw - iovrsw = iovr_sw ! cloud overlapping control flag for sw - iovrlw = iovr_lw ! cloud overlapping control flag for lw - + ! iovr comes from the model. In the RRTMG implementation this is stored in phyrparam.f, + ! it comes in from the host-model and is set here. + ! In GP, iovr is passed directly into the routines. + iovrRAD = iovr lcrick = crick_proof ! control flag for eliminating CRICK lcnorm = ccnorm ! control flag for in-cld condensate lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) @@ -293,8 +293,8 @@ subroutine GFS_rrtmg_setup_init ( & print *,' si =',si print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& & ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw - print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr_sw=',iovr_sw, & - & ' iovr_lw=',iovr_lw,' isubc_sw=',isubc_sw, & + print *,' np3d=',num_p3d,' ntoz=',ntoz, & + & ' iovr=',iovr,' isubc_sw=',isubc_sw, & & ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & & ' iflip=',iflip,' me=',me print *,' crick_proof=',crick_proof, & @@ -467,8 +467,7 @@ subroutine radinit( si, NLAY, imp_physics, me ) ! =8 Thompson microphysics scheme ! ! =6 WSM6 microphysics scheme ! ! =10 MG microphysics scheme ! -! iovrsw : control flag for cloud overlap in sw radiation ! -! iovrlw : control flag for cloud overlap in lw radiation ! +! iovr : control flag for cloud overlap in radiation ! ! =0: random overlapping clouds ! ! =1: max/ran overlapping clouds ! ! isubcsw : sub-column cloud approx control flag in sw radiation ! @@ -544,10 +543,8 @@ subroutine radinit( si, NLAY, imp_physics, me ) & ' ISOLar =',isolar, ' ICO2flg=',ico2flg,' IAERflg=',iaerflg, & & ' IALBflg=',ialbflg,' IEMSflg=',iemsflg,' ICLDflg=',icldflg, & & ' IMP_PHYSICS=',imp_physics,' IOZNflg=',ioznflg - print *,' IVFLIP=',ivflip,' IOVRSW=',iovrsw,' IOVRLW=',iovrlw, & + print *,' IVFLIP=',ivflip,' IOVR=',iovrRad, & & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw -! write(0,*)' IVFLIP=',ivflip,' IOVRSW=',iovrsw,' IOVRLW=',iovrlw,& -! & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw print *,' LCRICK=',lcrick,' LCNORM=',lcnorm,' LNOPREC=',lnoprec print *,' LTP =',ltp,', add extra top layer =',lextop diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index fec7e32d0..1f2294a54 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -112,17 +112,9 @@ type = integer intent = in optional = F -[iovr_sw] - standard_name = flag_for_cloud_overlap_method_for_shortwave_radiation - long_name = sw: max-random overlap clouds - units = flag - dimensions = () - type = integer - intent = in - optional = F -[iovr_lw] - standard_name = flag_for_cloud_overlap_method_for_longwave_radiation - long_name = lw: max-random overlap clouds +[iovr] + standard_name = flag_for_cloud_overlap_method_for_radiation + long_name = max-random overlap clouds units = flag dimensions = () type = integer diff --git a/physics/physcons.F90 b/physics/physcons.F90 index 6a41bda44..397fee935 100644 --- a/physics/physcons.F90 +++ b/physics/physcons.F90 @@ -138,7 +138,7 @@ module physcons real(kind=kind_phys),parameter:: rhosnow = 100._kind_phys !< density of snow (kg/m^3) real(kind=kind_phys),parameter:: rhoair = 1.28_kind_phys !< density of air near surface (kg/m^3) -! Decorrelation length constant (km) for iovrlw/iovrsw = 4 or 5 and idcor = 0 +! Decorrelation length constant (km) for iovr = 4 or 5 and idcor = 0 real(kind=kind_phys),parameter:: decorr_con = 2.50_kind_phys !........................................! diff --git a/physics/physparam.f b/physics/physparam.f index c71b62e5b..5518c6163 100644 --- a/physics/physparam.f +++ b/physics/physparam.f @@ -229,25 +229,16 @@ module physparam !!\n =1:use prognostic cloud scheme for cloud cover and cloud properties integer, save :: icldflg = 1 -!> cloud overlapping control flag for SW +!> cloud overlapping control flag for Radiation !!\n =0:use random cloud overlapping method !!\n =1:use maximum-random cloud overlapping method !!\n =2:use maximum cloud overlapping method !!\n =3:use decorrelation length overlapping method !!\n =4:use exponential overlapping method !!\n =5:use exponential-random overlapping method -!!\n Opr GFS/CFS=1; see IOVR_SW in run scripts - integer, save :: iovrsw = 1 -!> cloud overlapping control flag for LW -!!\n =0:use random cloud overlapping method -!!\n =1:use maximum-random cloud overlapping method -!!\n =2:use maximum cloud overlapping method -!!\n =3:use decorrelation length overlapping method -!!\n =4:use exponential overlapping method -!!\n =5:use exponential-random overlapping method -!!\n Opr GFS/CFS=1; see IOVR_LW in run scripts - integer, save :: iovrlw = 1 -!!\n Decorrelation length type for iovrlw/iovrsw = 4 or 5 +!!\n Opr GFS/CFS=1; see IOVR in run scripts + integer, save :: iovr = 1 +!!\n Decorrelation length type for iovr = 4 or 5 !!\n =0:use constant decorrelation length defined by decorr_con (in module physcons) !!\n =1:use day-of-year and latitude-varying decorrelation length integer, save :: idcor = 1 diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 069c8e867..594c65c80 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -188,7 +188,7 @@ !!\n IMP_PHYSICS =98/99: Zhao-Carr-Sundqvist MP - Xu-Randall diagnostic cloud fraction !!\n IMP_PHYSICS =11: GFDL MP - unified diagnostic cloud fraction provided by GFDL MP !! -!! Cloud overlapping method (namelist control parameter - \b IOVR_LW, \b IOVR_SW) +!! Cloud overlapping method (namelist control parameter - \b IOVR) !!\n IOVR=0: randomly overlapping vertical cloud layers !!\n IOVR=1: maximum-random overlapping vertical cloud layers !!\n IOVR=2: maximum overlapping vertical cloud layers @@ -208,7 +208,7 @@ !> This module computes cloud related quantities for radiation computations. module module_radiation_clouds ! - use physparam, only : icldflg, iovrsw, iovrlw, idcor, & + use physparam, only : icldflg, iovr, idcor, & & lcrick, lcnorm, lnoprec, & & ivflip, kind_phys, kind_io4 use physcons, only : con_fvirt, con_ttp, con_rocp, & @@ -256,7 +256,6 @@ module module_radiation_clouds real (kind=kind_phys), parameter :: cldasy_def = 0.84 !< default cld asymmetry factor integer :: llyr = 2 !< upper limit of boundary layer clouds - integer :: iovr = 1 !< maximum-random cloud overlapping method public progcld1, progcld2, progcld3, progcld4, progclduni, & & cld_init, progcld5, progcld4o, gethml @@ -313,7 +312,7 @@ subroutine cld_init & ! =8: Thompson microphysics ! ! =6: WSM6 microphysics ! ! =10: MG microphysics ! -! iovrsw/iovrlw : sw/lw control flag for cloud overlapping scheme ! +! iovr : control flag for cloud overlapping scheme ! ! =0: random overlapping clouds ! ! =1: max/ran overlapping clouds ! ! =2: maximum overlap clouds (mcica only) ! @@ -346,8 +345,6 @@ subroutine cld_init & ! ! --- set up module variables - iovr = max( iovrsw, iovrlw ) !cld ovlp used for diag HML cld output - if (me == 0) print *, VTAGCLD !print out version tag if ( icldflg == 0 ) then diff --git a/physics/radlw_main.f b/physics/radlw_main.f index f470ad109..31c45a33f 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -279,7 +279,7 @@ module rrtmg_lw ! use physparam, only : ilwrate, ilwrgas, ilwcliq, ilwcice, & - & isubclw, icldflg, iovrlw, ivflip, & + & isubclw, icldflg, iovr, ivflip, & & kind_phys use physcons, only : con_g, con_cp, con_avgd, con_amd, & & con_amw, con_amo3 @@ -524,7 +524,7 @@ subroutine rrtmg_lw_run & ! =0: no sub-col cld treatment, use grid-mean cld quantities ! ! =1: mcica sub-col, prescribed seeds to get random numbers ! ! =2: mcica sub-col, providing array icseed for random numbers! -! iovrlw - cloud overlapping control flag ! +! iovr - cloud overlapping control flag ! ! =0: random overlapping clouds ! ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud (used for isubclw>0 only) ! @@ -773,7 +773,7 @@ subroutine rrtmg_lw_run & endif stemp = sfgtmp(iplon) ! surface ground temp - if (iovrlw == 3) delgth= de_lgth(iplon) ! clouds decorr-length + if (iovr == 3) delgth= de_lgth(iplon) ! clouds decorr-length !> -# Prepare atmospheric profile for use in rrtm. ! the vertical index of internal array is from surface to top @@ -797,7 +797,7 @@ subroutine rrtmg_lw_run & tavel(k)= tlyr(iplon,k1) tz(k) = tlvl(iplon,k1) dz(k) = dzlyr(iplon,k1) - if (iovrlw == 4 .or. iovrlw == 5) alph(k) = alpha(iplon,k) ! alpha decorrelation + if (iovr == 4 .or. iovr == 5) alph(k) = alpha(iplon,k) ! alpha decorrelation !> -# Set absorber amount for h2o, co2, and o3. @@ -910,7 +910,7 @@ subroutine rrtmg_lw_run & tavel(k)= tlyr(iplon,k) tz(k) = tlvl(iplon,k+1) dz(k) = dzlyr(iplon,k) - if (iovrlw == 4 .or. iovrlw == 5) alph(k) = alpha(iplon,k) ! alpha decorrelation + if (iovr == 4 .or. iovr == 5) alph(k) = alpha(iplon,k) ! alpha decorrelation ! --- ... set absorber amount !test use @@ -1168,7 +1168,7 @@ subroutine rrtmg_lw_run & if (isubclw <= 0) then - if (iovrlw <= 0) then + if (iovr <= 0) then call rtrn & ! --- inputs: @@ -1188,7 +1188,7 @@ subroutine rrtmg_lw_run & & totuflux,totdflux,htr, totuclfl,totdclfl,htrcl, htrb & & ) - endif ! end if_iovrlw_block + endif ! end if_iovr_block else @@ -1339,7 +1339,7 @@ subroutine rlwinit & ! icldflg - cloud scheme control flag ! ! =0: diagnostic scheme gives cloud tau, omiga, and g. ! ! =1: prognostic scheme gives cloud liq/ice path, etc. ! -! iovrlw - clouds vertical overlapping control flag ! +! iovr - clouds vertical overlapping control flag ! ! =0: random overlapping clouds ! ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud (isubcol>0 only) ! @@ -1387,19 +1387,19 @@ subroutine rlwinit & ! !===> ... begin here ! - if ( iovrlw<0 .or. iovrlw>5 ) then + if ( iovr<0 .or. iovr>5 ) then print *,' *** Error in specification of cloud overlap flag', & - & ' IOVRLW=',iovrlw,' in RLWINIT !!' + & ' IOVR=',iovr,' in RLWINIT !!' stop - elseif ( iovrlw>=2 .and. isubclw==0 ) then + elseif ( iovr>=2 .and. isubclw==0 ) then if (me == 0) then - print *,' *** IOVRLW=',iovrlw,' is not available for', & + print *,' *** IOVR=',iovr,' is not available for', & & ' ISUBCLW=0 setting!!' print *,' The program uses maximum/random overlap', & & ' instead.' endif - iovrlw = 1 + iovr = 1 endif if (me == 0) then @@ -1874,7 +1874,7 @@ subroutine mcica_subcol & ! lcloudy - logical, sub-colum cloud profile flag array ngptlw*nlay! ! ! ! other control flags from module variables: ! -! iovrlw : control flag for cloud overlapping method ! +! iovr : control flag for cloud overlapping method ! ! =0:random; =1:maximum/random: =2:maximum; =3:decorr ! ! ! ! ===================== end of definitions ==================== ! @@ -1916,7 +1916,7 @@ subroutine mcica_subcol & !! - For max-random overlap, pick a random value at every level !! - For maximum overlap, pick same random numebr at every level - select case ( iovrlw ) + select case ( iovr ) case( 0 ) ! random overlap, pick a random value at every level diff --git a/physics/radsw_main.f b/physics/radsw_main.f index 3b975313b..abdc6e281 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -305,7 +305,7 @@ module rrtmg_sw ! use physparam, only : iswrate, iswrgas, iswcliq, iswcice, & - & isubcsw, icldflg, iovrsw, ivflip, & + & isubcsw, icldflg, iovr, ivflip, & & iswmode, kind_phys use physcons, only : con_g, con_cp, con_avgd, con_amd, & & con_amw, con_amo3 @@ -627,7 +627,7 @@ subroutine rrtmg_sw_run & ! =0: no sub-col cld treatment, use grid-mean cld quantities ! ! =1: mcica sub-col, prescribed seeds to get random numbers ! ! =2: mcica sub-col, providing array icseed for random numbers! -! iovrsw - cloud overlapping control flag ! +! iovr - cloud overlapping control flag ! ! =0: random overlapping clouds ! ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! @@ -888,7 +888,7 @@ subroutine rrtmg_sw_run & cosz1 = cosz(j1) sntz1 = f_one / cosz(j1) ssolar = s0fac * cosz(j1) - if (iovrsw == 3) delgth = de_lgth(j1) ! clouds decorr-length + if (iovr == 3) delgth = de_lgth(j1) ! clouds decorr-length !> -# Prepare surface albedo: bm,df - dir,dif; 1,2 - nir,uvv. albbm(1) = sfcalb_nir_dir(j1) @@ -910,7 +910,7 @@ subroutine rrtmg_sw_run & tavel(k) = tlyr(j1,kk) delp (k) = delpin(j1,kk) dz (k) = dzlyr (j1,kk) - if (iovrsw == 4 .or. iovrsw == 5) alph(k) = alpha(j1,k) ! alpha decorrelation + if (iovr == 4 .or. iovr == 5) alph(k) = alpha(j1,k) ! alpha decorrelation !> -# Set absorber and gas column amount, convert from volume mixing !! ratio to molec/cm2 based on coldry (scaled to 1.0e-20) @@ -1001,7 +1001,7 @@ subroutine rrtmg_sw_run & tavel(k) = tlyr(j1,k) delp (k) = delpin(j1,k) dz (k) = dzlyr (j1,k) - if (iovrsw == 4 .or. iovrsw == 5) alph(k) = alpha(j1,k) ! alpha decorrelation + if (iovr == 4 .or. iovr == 5) alph(k) = alpha(j1,k) ! alpha decorrelation ! --- ... set absorber amount !test use @@ -1092,11 +1092,11 @@ subroutine rrtmg_sw_run & zcf0 = f_one zcf1 = f_one - if (iovrsw == 0) then ! random overlapping + if (iovr == 0) then ! random overlapping do k = 1, nlay zcf0 = zcf0 * (f_one - cfrac(k)) enddo - else if (iovrsw == 1) then ! max/ran overlapping + else if (iovr == 1) then ! max/ran overlapping do k = 1, nlay if (cfrac(k) > ftiny) then ! cloudy layer zcf1 = min ( zcf1, f_one-cfrac(k) ) @@ -1106,7 +1106,7 @@ subroutine rrtmg_sw_run & endif enddo zcf0 = zcf0 * zcf1 - else if (iovrsw >= 2) then + else if (iovr >= 2) then do k = 1, nlay zcf0 = min ( zcf0, f_one-cfrac(k) ) ! used only as clear/cloudy indicator enddo @@ -1417,7 +1417,7 @@ subroutine rswinit & ! icldflg - cloud scheme control flag ! ! =0: diagnostic scheme gives cloud tau, omiga, and g. ! ! =1: prognostic scheme gives cloud liq/ice path, etc. ! -! iovrsw - clouds vertical overlapping control flag ! +! iovr - clouds vertical overlapping control flag ! ! =0: random overlapping clouds ! ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! @@ -1453,9 +1453,9 @@ subroutine rswinit & ! !===> ... begin here ! - if ( iovrsw<0 .or. iovrsw>5 ) then + if ( iovr<0 .or. iovr>5 ) then print *,' *** Error in specification of cloud overlap flag', & - & ' IOVRSW=',iovrsw,' in RSWINIT !!' + & ' IOVR=',iovr,' in RSWINIT !!' stop endif @@ -1502,15 +1502,15 @@ subroutine rswinit & stop endif - if ( isubcsw==0 .and. iovrsw>2 ) then + if ( isubcsw==0 .and. iovr>2 ) then if (me == 0) then - print *,' *** IOVRSW=',iovrsw,' is not available for', & + print *,' *** IOVR=',iovr,' is not available for', & & ' ISUBCSW=0 setting!!' print *,' The program will use maximum/random overlap', & & ' instead.' endif - iovrsw = 1 + iovr = 1 endif !> -# Setup constant factors for heating rate @@ -1994,7 +1994,7 @@ subroutine mcica_subcol & ! lcloudy - logical, sub-colum cloud profile flag array nlay*ngptsw! ! ! ! other control flags from module variables: ! -! iovrsw : control flag for cloud overlapping method ! +! iovr : control flag for cloud overlapping method ! ! =0: random ! ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! @@ -2038,7 +2038,7 @@ subroutine mcica_subcol & !> -# Sub-column set up according to overlapping assumption. - select case ( iovrsw ) + select case ( iovr ) case( 0 ) ! random overlap, pick a random value at every level diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 7ab3c27e3..e1b8fec33 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -3,7 +3,6 @@ module rrtmgp_sw_cloud_optics use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics - use physparam, only: isubcsw, iovrsw use mo_optical_props, only: ty_optical_props_2str use mo_rrtmg_sw_cloud_optics, only: rrtmg_sw_cloud_optics use rrtmgp_aux, only: check_error_msg From b145f63e1061626fd4674b50c6f350253522d083 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 28 Oct 2020 23:20:57 +0000 Subject: [PATCH 392/404] Remove distinct lw/sw cloud-overlap options in RRTMGP. --- physics/GFS_cloud_diagnostics.F90 | 10 +-- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 12 ++- physics/GFS_rrtmgp_setup.F90 | 25 +++---- physics/GFS_rrtmgp_setup.meta | 14 +--- physics/GFS_rrtmgp_sw_pre.F90 | 104 +++++++++++++------------- physics/GFS_rrtmgp_sw_pre.meta | 11 +-- physics/rrtmg_lw_cloud_optics.F90 | 2 +- physics/rrtmg_sw_cloud_optics.F90 | 2 +- physics/rrtmgp_lw_cloud_sampling.F90 | 19 ++--- physics/rrtmgp_lw_cloud_sampling.meta | 8 ++ physics/rrtmgp_sw_cloud_sampling.F90 | 87 +++++++++++---------- physics/rrtmgp_sw_cloud_sampling.meta | 8 ++ physics/rrtmgp_sw_gas_optics.F90 | 2 + 13 files changed, 147 insertions(+), 157 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index c62cc685d..05a18f15f 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -5,7 +5,7 @@ ! ######################################################################################## module GFS_cloud_diagnostics use machine, only: kind_phys - use physparam, only: iovrlw, iovrsw, ivflip, icldflg, idcor + use physparam, only: iovr, ivflip, icldflg, idcor ! Module parameters (imported directly from radiation_cloud.f) integer, parameter :: & @@ -23,7 +23,6 @@ module GFS_cloud_diagnostics ! Module variables integer :: & - iovr = 1, & ! Cloud overlap used for diagnostic HML cloud outputs llyr = 2 ! Upper limit of boundary layer clouds public GFS_cloud_diagnostics_run, GFS_cloud_diagnostics_init,& @@ -145,11 +144,8 @@ subroutine hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, ! Local variables integer :: iLay, kl - ! Initialize error flag - errflg = 0 - - ! Cloud overlap used for diagnostic HML cloud outputs - iovr = max(iovrsw,iovrlw) + ! Initialize error flag + errflg = 0 if (mpi_rank == 0) print *, VTAGCLD !print out version tag diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index b67b22d41..c868de6e3 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -4,9 +4,9 @@ ! ######################################################################################## module GFS_rrtmgp_gfdlmp_pre use machine, only: kind_phys - use physparam, only: lcnorm, lcrick, idcor, iovrlw, iovrsw + use physparam, only: lcnorm, lcrick, idcor, iovr use rrtmgp_aux, only: check_error_msg - use module_radiation_clouds, only: get_alpha_exp, get_alpha_dcorr + !use module_radiation_clouds, only: get_alpha_exp, get_alpha_dcorr ! Parameters real(kind_phys), parameter :: & reliq_def = 10.0 , & ! Default liq radius to 10 micron (used when effr_in=F) @@ -101,7 +101,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld ! Local variables real(kind_phys) :: tem1 real(kind_phys), dimension(nCol, nLev, min(4,ncnd)) :: cld_condensate - integer :: iCol,iLay,l,ncndl,iovr + integer :: iCol,iLay,l,ncndl real(kind_phys), dimension(nCol,nLev) :: deltaP if (.not. (lsswr .or. lslwr)) return @@ -200,8 +200,6 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld ! #################################################################################### ! Cloud (and precipitation) overlap ! #################################################################################### - - iovr = max(iovrsw,iovrlw) ! Compute layer-thickness do iCol=1,nCol @@ -214,10 +212,10 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld ! Cloud overlap parameter ! if (iovr == 3) then - call get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, de_lgth, cloud_overlap_param) +! call get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, de_lgth, cloud_overlap_param) endif if (iovr == 4 .or. iovr == 5) then - call get_alpha_exp(nCol, nLev, deltaZ, iovr, lat, julian, yearlen, cld_frac, cloud_overlap_param) +! call get_alpha_exp(nCol, nLev, deltaZ, iovr, lat, julian, yearlen, cld_frac, cloud_overlap_param) endif ! diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 9b503e3bc..8f7b44e00 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -4,7 +4,7 @@ module GFS_rrtmgp_setup use physparam, only : & isolar, ictmflg, ico2flg, ioznflg, iaerflg, iaermdl, icldflg, & - iovrsw, iovrlw, lcrick, lcnorm, lnoprec, ialbflg, iemsflg, & + lcrick, lcnorm, lnoprec, ialbflg, iemsflg, & isubcsw, isubclw, ivflip , ipsd0, iswcliq use machine, only: & kind_phys ! Working type @@ -40,7 +40,7 @@ module GFS_rrtmgp_setup subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics_gfdl,& imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & imp_physics_zhao_carr_pdf, imp_physics_mg, si, levr, ictm, isol, ico2, iaer, & - ialb, iems, ntcw, num_p3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & + ialb, iems, ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, & icliq_sw, crick_proof, ccnorm, norad_precip, idate, iflip, me, errmsg, errflg) implicit none @@ -57,7 +57,7 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics real(kind_phys), dimension(levr+1), intent(in) :: & si integer, intent(in) :: levr, ictm, isol, ico2, iaer, ialb, iems, & - ntcw, num_p3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & + ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, & icliq_sw, iflip, me logical, intent(in) :: & crick_proof, ccnorm, norad_precip @@ -78,8 +78,6 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics ico2flg = ico2 ! co2 data source control flag ioznflg = ntoz ! ozone data source control flag iswcliq = icliq_sw ! optical property for liquid clouds for sw - iovrsw = iovr_sw ! cloud overlapping control flag for sw - iovrlw = iovr_lw ! cloud overlapping control flag for lw lcrick = crick_proof ! control flag for eliminating CRICK lcnorm = ccnorm ! control flag for in-cld condensate lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) @@ -117,8 +115,8 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics print *,' si =',si print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw - print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr_sw=',iovr_sw, & - ' iovr_lw=',iovr_lw,' isubc_sw=',isubc_sw, & + print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr=',iovr, & + ' isubc_sw=',isubc_sw, & ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & ' iflip=',iflip,' me=',me print *,' crick_proof=',crick_proof, & @@ -128,7 +126,7 @@ subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics call radinit( si, levr, imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & - imp_physics_zhao_carr_pdf, imp_physics_mg, me, errflg ) + imp_physics_zhao_carr_pdf, imp_physics_mg, iovr, me, errflg ) if ( me == 0 ) then print *,' Radiation sub-cloud initial seed =',ipsd0, & @@ -206,7 +204,7 @@ end subroutine GFS_rrtmgp_setup_finalize subroutine radinit(si, NLAY, imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & - imp_physics_zhao_carr_pdf, imp_physics_mg, me, errflg ) + imp_physics_zhao_carr_pdf, imp_physics_mg, iovr, me, errflg ) !................................... ! --- inputs: @@ -291,10 +289,6 @@ subroutine radinit(si, NLAY, imp_physics, imp_physics_fer_hires, imp_physics_gfd ! =8 Thompson microphysics scheme ! ! =6 WSM6 microphysics scheme ! ! =10 MG microphysics scheme ! -! iovrsw : control flag for cloud overlap in sw radiation ! -! iovrlw : control flag for cloud overlap in lw radiation ! -! =0: random overlapping clouds ! -! =1: max/ran overlapping clouds ! ! isubcsw : sub-column cloud approx control flag in sw radiation ! ! isubclw : sub-column cloud approx control flag in lw radiation ! ! =0: with out sub-column cloud approximation ! @@ -331,6 +325,7 @@ subroutine radinit(si, NLAY, imp_physics, imp_physics_fer_hires, imp_physics_gfd ! --- inputs: integer, intent(in) :: & + iovr, & ! imp_physics, & ! Flag for MP scheme imp_physics_fer_hires, & ! Flag for fer-hires scheme imp_physics_gfdl, & ! Flag for gfdl scheme @@ -377,10 +372,8 @@ subroutine radinit(si, NLAY, imp_physics, imp_physics_fer_hires, imp_physics_gfd & ' ISOLar =',isolar, ' ICO2flg=',ico2flg,' IAERflg=',iaerflg, & & ' IALBflg=',ialbflg,' IEMSflg=',iemsflg,' ICLDflg=',icldflg, & & ' IMP_PHYSICS=',imp_physics,' IOZNflg=',ioznflg - print *,' IVFLIP=',ivflip,' IOVRSW=',iovrsw,' IOVRLW=',iovrlw, & + print *,' IVFLIP=',ivflip,' IOVR=',iovr, & & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw -! write(0,*)' IVFLIP=',ivflip,' IOVRSW=',iovrsw,' IOVRLW=',iovrlw,& -! & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw print *,' LCRICK=',lcrick,' LCNORM=',lcnorm,' LNOPREC=',lnoprec if ( ictmflg==0 .or. ictmflg==-2 ) then diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 45e9d65a2..258c28c96 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -160,17 +160,9 @@ type = integer intent = in optional = F -[iovr_sw] - standard_name = flag_for_cloud_overlap_method_for_shortwave_radiation - long_name = sw: max-random overlap clouds - units = flag - dimensions = () - type = integer - intent = in - optional = F -[iovr_lw] - standard_name = flag_for_cloud_overlap_method_for_longwave_radiation - long_name = lw: max-random overlap clouds +[iovr] + standard_name = flag_for_cloud_overlap_method_for_radiation + long_name = max-random overlap clouds units = flag dimensions = () type = integer diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index f6aac60b1..09f830043 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -28,11 +28,11 @@ end subroutine GFS_rrtmgp_sw_pre_init !! \htmlinclude GFS_rrtmgp_sw_pre.html !! subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_list, & - lndp_prt_list, lsswr, solhr, & + lndp_prt_list, doSWrad, solhr, & lon, coslat, sinlat, snowd, sncovr, snoalb, zorl, tsfc, hprime, alvsf, & alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, lsmask, sfc_wts, p_lay, tv_lay, & relhum, p_lev, sw_gas_props, & - nday, idxday, alb1d, coszen, coszdg, sfc_alb_nir_dir, sfc_alb_nir_dif, & + nday, idxday, coszen, coszdg, sfc_alb_nir_dir, sfc_alb_nir_dif, & sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sfc_alb_dif, errmsg, errflg) ! Inputs @@ -47,7 +47,7 @@ subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_ real(kind_phys), dimension(n_var_lndp), intent(in) :: & lndp_prt_list logical,intent(in) :: & - lsswr ! Call RRTMGP SW radiation? + doSWrad ! Call RRTMGP SW radiation? real(kind_phys), intent(in) :: & solhr ! Time in hours after 00z at the current timestep real(kind_phys), dimension(nCol), intent(in) :: & @@ -86,7 +86,6 @@ subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_ integer, dimension(ncol), intent(out) :: & idxday ! Indices for daylit points real(kind_phys), dimension(ncol), intent(out) :: & - alb1d, & ! Surface albedo pertubation coszen, & ! Cosine of SZA coszdg, & ! Cosine of SZA, daytime sfc_alb_dif ! Mean surface diffused (nIR+uvvis) sw albedo @@ -103,65 +102,62 @@ subroutine GFS_rrtmgp_sw_pre_run(me, nCol, nLev, lndp_type, n_var_lndp,lndp_var_ ! Local variables integer :: i, j, iCol, iBand, iLay real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb + real(kind_phys), dimension(ncol) :: alb1d real(kind_phys) :: lndp_alb ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - if (.not. lsswr) return - - ! ####################################################################################### - ! Compute cosine of zenith angle (only when SW is called) - ! ####################################################################################### - call coszmn (lon, sinlat, coslat, solhr, nCol, me, coszen, coszdg) - ! ####################################################################################### - ! For SW gather daylit points - ! ####################################################################################### - nday = 0 - idxday = 0 - do i = 1, NCOL - if (coszen(i) >= 0.0001) then - nday = nday + 1 - idxday(nday) = i - endif - enddo + if (doSWrad) then - ! ####################################################################################### - ! mg, sfc-perts - ! --- scale random patterns for surface perturbations with perturbation size - ! --- turn vegetation fraction pattern into percentile pattern - ! ####################################################################################### - alb1d(:) = 0. - lndp_alb = -999. - if (lndp_type ==1) then - do k =1,n_var_lndp - if (lndp_var_list(k) == 'alb') then - do i=1,ncol - call cdfnor(sfc_wts(i,k),alb1d(i)) - lndp_alb = lndp_prt_list(k) - enddo - endif - enddo - endif - - ! ####################################################################################### - ! Call module_radiation_surface::setalb() to setup surface albedo. - ! ####################################################################################### - call setalb (lsmask, snowd, sncovr, snoalb, zorl, coszen, tsfc, tsfc, hprime, alvsf, & - alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, NCOL, alb1d, pertalb, sfcalb) + ! #################################################################################### + ! Compute cosine of zenith angle (only when SW is called) + ! #################################################################################### + call coszmn (lon, sinlat, coslat, solhr, nCol, me, coszen, coszdg) + + ! #################################################################################### + ! For SW gather daylit points + ! #################################################################################### + nday = 0 + idxday = 0 + do i = 1, NCOL + if (coszen(i) >= 0.0001) then + nday = nday + 1 + idxday(nday) = i + endif + enddo + + ! #################################################################################### + ! Call module_radiation_surface::setalb() to setup surface albedo. + ! #################################################################################### + alb1d(:) = 0. + lndp_alb = -999. + call setalb (lsmask, snowd, sncovr, snoalb, zorl, coszen, tsfc, tsfc, hprime, alvsf, & + alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, NCOL, alb1d, lndp_alb, sfcalb) - ! Approximate mean surface albedo from vis- and nir- diffuse values. - sfc_alb_dif(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + ! Approximate mean surface albedo from vis- and nir- diffuse values. + sfc_alb_dif(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) - ! Spread across all SW bands - do iBand=1,sw_gas_props%get_nband() - sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) - sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) - sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) - sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) - enddo + ! Spread across all SW bands + do iBand=1,sw_gas_props%get_nband() + sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) + sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) + sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) + sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) + enddo + else + nday = 0 + idxday = 0 + coszen(1:nCol) = 0. + coszdg(1:nCol) = 0. + sfc_alb_nir_dir(:,1:nCol) = 0. + sfc_alb_nir_dif(:,1:nCol) = 0. + sfc_alb_uvvis_dir(:,1:nCol) = 0. + sfc_alb_uvvis_dif(:,1:nCol) = 0. + sfc_alb_dif(1:nCol) = 0. + endif + end subroutine GFS_rrtmgp_sw_pre_run diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 91e875c00..b24ab5710 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -65,7 +65,7 @@ kind = len=3 intent = in optional = F -[lsswr] +[doSWrad] standard_name = flag_to_calc_sw long_name = logical flags for sw radiation calls units = flag @@ -297,15 +297,6 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[alb1d] - standard_name = surface_albedo_perturbation - long_name = surface albedo perturbation - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = out - optional = F [sfc_alb_nir_dir] standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) diff --git a/physics/rrtmg_lw_cloud_optics.F90 b/physics/rrtmg_lw_cloud_optics.F90 index ea0a703c7..ad4d06e5f 100644 --- a/physics/rrtmg_lw_cloud_optics.F90 +++ b/physics/rrtmg_lw_cloud_optics.F90 @@ -1,6 +1,6 @@ module mo_rrtmg_lw_cloud_optics use machine, only: kind_phys - use physparam, only: ilwcliq, ilwcice, iovrlw + use physparam, only: ilwcliq, ilwcice use mersenne_twister, only: random_setseed, random_number, random_stat implicit none diff --git a/physics/rrtmg_sw_cloud_optics.F90 b/physics/rrtmg_sw_cloud_optics.F90 index 37b4e094c..452ab2070 100644 --- a/physics/rrtmg_sw_cloud_optics.F90 +++ b/physics/rrtmg_sw_cloud_optics.F90 @@ -1,6 +1,6 @@ module mo_rrtmg_sw_cloud_optics use machine, only: kind_phys - use physparam, only: iswcliq, iswcice, iovrsw + use physparam, only: iswcliq, iswcice use mersenne_twister, only: random_setseed, random_number, random_stat implicit none diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 35ae3c4a8..3c3e09622 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -1,7 +1,7 @@ module rrtmgp_lw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use physparam, only: isubclw, iovrlw + use physparam, only: isubclw use mo_optical_props, only: ty_optical_props_1scl use rrtmgp_sampling, only: sampled_mask, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat @@ -45,7 +45,7 @@ end subroutine rrtmgp_lw_cloud_sampling_init !! \section arg_table_rrtmgp_lw_cloud_sampling_run !! \htmlinclude rrtmgp_lw_cloud_sampling_run.html !! - subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, & + subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, iovr, & cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, lw_gas_props, & lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, & lw_optical_props_clouds, lw_optical_props_precip, errmsg, errflg) @@ -56,6 +56,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, integer, intent(in) :: & nCol, & ! Number of horizontal gridpoints nLev, & ! Number of vertical layers + iovr, & ! Choice of cloud-overlap method ipsdlw0 ! Initial permutation seed for McICA integer,intent(in),dimension(ncol) :: & icseed_lw ! auxiliary special cloud related array when module @@ -96,7 +97,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, errflg = 0 ! - if (iovrlw .ne. 1 .and. iovrlw .ne. 3 .and. iovrlw .ne. 4 .and. iovrlw .ne. 5) then + if (iovr .ne. 1 .and. iovr .ne. 3 .and. iovr .ne. 4 .and. iovr .ne. 5) then errmsg = 'Cloud overlap assumption not supported.' errflg = 1 call check_error_msg('rrtmgp_lw_cloud_sampling',errmsg) @@ -134,11 +135,11 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Cloud-overlap. ! Maximum-random - if (iovrlw == 1) then + if (iovr == 1) then call sampled_mask(rng3D, cld_frac, cldfracMCICA) endif ! Exponential decorrelation length overlap - if (iovrlw == 3) then + if (iovr == 3) then ! Generate second RNG do iCol=1,ncol call random_setseed(ipseed_lw(icol),rng_stat) @@ -150,7 +151,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, randoms2 = rng3D2) endif ! Exponential or Exponential-random - if (iovrlw == 4 .or. iovrlw == 5) then + if (iovr == 4 .or. iovr == 5) then call sampled_mask(rng3D, cld_frac, cldfracMCICA, & overlap_param = cloud_overlap_param(:,1:nLev-1)) endif @@ -191,11 +192,11 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Precipitation overlap. ! Maximum-random - if (iovrlw == 1) then + if (iovr == 1) then call sampled_mask(rng3D, precip_frac, precipfracSAMP) endif ! Exponential decorrelation length overlap - if (iovrlw == 3) then + if (iovr == 3) then ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Generate second RNG !do iCol=1,ncol @@ -208,7 +209,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, randoms2 = rng3D2) endif ! Exponential or Exponential-random - if (iovrlw == 4 .or. iovrlw == 5) then + if (iovr == 4 .or. iovr == 5) then call sampled_mask(rng3D, precip_frac, precipfracSAMP, & overlap_param = precip_overlap_param(:,1:nLev-1)) endif diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 35699efb6..4aeee9f07 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -77,6 +77,14 @@ type = integer intent = in optional = F +[iovr] + standard_name = flag_for_cloud_overlap_method_for_radiation + long_name = max-random overlap clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F [icseed_lw] standard_name = seed_random_numbers_lw long_name = seed for random number generation for longwave radiation diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 802cad840..bd2ad05af 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -1,7 +1,7 @@ module rrtmgp_sw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use physparam, only: isubcsw, iovrsw + use physparam, only: isubcsw use mo_optical_props, only: ty_optical_props_2str use rrtmgp_sampling, only: sampled_mask, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat @@ -44,7 +44,7 @@ end subroutine rrtmgp_sw_cloud_sampling_init !! \section arg_table_rrtmgp_sw_cloud_sampling_run !! \htmlinclude rrtmgp_sw_cloud_sampling.html !! - subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & + subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, iovr, & icseed_sw, cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, & sw_gas_props, sw_optical_props_cloudsByBand, sw_optical_props_precipByBand, & sw_optical_props_clouds, sw_optical_props_precip, errmsg, errflg) @@ -56,6 +56,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd nCol, & ! Number of horizontal gridpoints nDay, & ! Number of daylit points. nLev, & ! Number of vertical layers + iovr, & ! Choice of cloud-overlap method ipsdsw0 ! Initial permutation seed for McICA integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. @@ -99,7 +100,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd errflg = 0 ! Only works w/ SDFs v15p2 and v16beta - if (iovrsw .ne. 1 .and. iovrsw .ne. 3 .and. iovrsw .ne. 4 .and. iovrsw .ne. 5) then + if (iovr .ne. 1 .and. iovr .ne. 3 .and. iovr .ne. 4 .and. iovr .ne. 5) then errmsg = 'Cloud overlap assumption not supported.' errflg = 1 call check_error_msg('rrtmgp_sw_cloud_sampling',errmsg) @@ -115,6 +116,9 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sw_optical_props_clouds%alloc_2str(nday, nLev, sw_gas_props)) + sw_optical_props_clouds%tau(:,:,:) = 0._kind_phys + sw_optical_props_clouds%ssa(:,:,:) = 1._kind_phys + sw_optical_props_clouds%g(:,:,:) = 0._kind_phys ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). if(isubcsw == 1) then ! advance prescribed permutation seed @@ -137,11 +141,11 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Cloud overlap. ! Maximum-random overlap - if (iovrsw == 1) then + if (iovr == 1) then call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA) endif ! Decorrelation-length overlap - if (iovrsw == 3) then + if (iovr == 3) then do iday=1,nday call random_setseed(ipseed_sw(iday),rng_stat) call random_number(rng1D,rng_stat) @@ -152,7 +156,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd randoms2 = rng3D2) endif ! Exponential overlap - if (iovrsw == 4 .or. iovrsw == 5) then + if (iovr == 4 .or. iovr == 5) then call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA, & overlap_param = cloud_overlap_param(idxday(1:nDay),1:nLev-1)) endif @@ -193,11 +197,11 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Precipitation overlap ! Maximum-random - if (iovrsw == 1) then + if (iovr == 1) then call sampled_mask(rng3D, precip_frac(idxday(1:nDay),:), precipfracSAMP) endif ! Exponential decorrelation length overlap - if (iovrsw == 3) then + if (iovr == 3) then !! Generate second RNG !do iday=1,nday ! call random_setseed(ipseed_sw(iday),rng_stat) @@ -208,7 +212,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd overlap_param = precip_overlap_param(idxday(1:nDay),1:nLev-1),& randoms2 = rng3D2) endif - if (iovrsw == 4 .or. iovrsw == 5) then + if (iovr == 4 .or. iovr == 5) then call sampled_mask(rng3D, precip_frac(idxday(1:nDay),:),precipfracSAMP, & overlap_param = precip_overlap_param(idxday(1:nDay),1:nLev-1)) endif @@ -218,42 +222,43 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd draw_samples(precipfracSAMP, & sw_optical_props_precipByBand, & sw_optical_props_precip)) - endif - ! #################################################################################### - ! Just add precipitation optics to cloud-optics - ! #################################################################################### - do iGpt=1,sw_gas_props%get_ngpt() - do iday=1,nDay - do iLay=1,nLev - tauloc = sw_optical_props_clouds%tau(iday,iLay,iGpt) + & - sw_optical_props_precip%tau(iday,iLay,iGpt) - if (sw_optical_props_precip%tau(iday,iLay,iGpt) > 0) then - ssaloc = (sw_optical_props_clouds%tau(iday,iLay,iGpt) * & - sw_optical_props_clouds%ssa(iday,iLay,iGpt) + & - sw_optical_props_precip%tau(iday,iLay,iGpt) * & - sw_optical_props_precip%ssa(iday,iLay,iGpt)) / & - tauloc - if (ssaloc > 0) then - asyloc = (sw_optical_props_clouds%tau(iday,iLay,iGpt) * & - sw_optical_props_clouds%ssa(iday,iLay,iGpt) * & - sw_optical_props_clouds%g(iday,iLay,iGpt) + & - sw_optical_props_precip%tau(iday,iLay,iGpt) * & - sw_optical_props_precip%ssa(iday,iLay,iGpt) * & - sw_optical_props_precip%g(iday,iLay,iGpt)) / & - (tauloc*ssaloc) - else - tauloc = sw_optical_props_clouds%tau(iday,iLay,iGpt) - ssaloc = sw_optical_props_clouds%ssa(iday,iLay,iGpt) - asyloc = sw_optical_props_clouds%g(iday,iLay,iGpt) + ! ################################################################################# + ! Just add precipitation optics to cloud-optics + ! ################################################################################# + do iGpt=1,sw_gas_props%get_ngpt() + do iday=1,nDay + do iLay=1,nLev + tauloc = sw_optical_props_clouds%tau(iday,iLay,iGpt) + & + sw_optical_props_precip%tau(iday,iLay,iGpt) + if (sw_optical_props_precip%tau(iday,iLay,iGpt) > 0) then + ssaloc = (sw_optical_props_clouds%tau(iday,iLay,iGpt) * & + sw_optical_props_clouds%ssa(iday,iLay,iGpt) + & + sw_optical_props_precip%tau(iday,iLay,iGpt) * & + sw_optical_props_precip%ssa(iday,iLay,iGpt)) / & + tauloc + if (ssaloc > 0) then + asyloc = (sw_optical_props_clouds%tau(iday,iLay,iGpt) * & + sw_optical_props_clouds%ssa(iday,iLay,iGpt) * & + sw_optical_props_clouds%g(iday,iLay,iGpt) + & + sw_optical_props_precip%tau(iday,iLay,iGpt) * & + sw_optical_props_precip%ssa(iday,iLay,iGpt) * & + sw_optical_props_precip%g(iday,iLay,iGpt)) / & + (tauloc*ssaloc) + else + tauloc = sw_optical_props_clouds%tau(iday,iLay,iGpt) + ssaloc = sw_optical_props_clouds%ssa(iday,iLay,iGpt) + asyloc = sw_optical_props_clouds%g(iday,iLay,iGpt) + endif + sw_optical_props_clouds%tau(iday,iLay,iGpt) = tauloc + sw_optical_props_clouds%ssa(iday,iLay,iGpt) = ssaloc + sw_optical_props_clouds%g(iday,iLay,iGpt) = asyloc endif - sw_optical_props_clouds%tau(iday,iLay,iGpt) = tauloc - sw_optical_props_clouds%ssa(iday,iLay,iGpt) = ssaloc - sw_optical_props_clouds%g(iday,iLay,iGpt) = asyloc - endif + enddo enddo enddo - enddo + endif + end subroutine rrtmgp_sw_cloud_sampling_run ! ######################################################################################### diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 082704462..acbb2a960 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -93,6 +93,14 @@ type = integer intent = in optional = F +[iovr] + standard_name = flag_for_cloud_overlap_method_for_radiation + long_name = max-random overlap clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F [icseed_sw] standard_name = seed_random_numbers_sw long_name = seed for random number generation for shortwave radiation diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index efe611e0c..ac643e71d 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -374,6 +374,8 @@ subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_pr toa_src_sw(idxday(ij),:) = toa_src_sw(idxday(ij),:)*solcon/ & sum(toa_src_sw(idxday(ij),:)) enddo + else + toa_src_sw(:,:) = 0. endif end subroutine rrtmgp_sw_gas_optics_run From ae2472f9639b7e222120809784793ec14e37cb9a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 29 Oct 2020 18:22:13 +0000 Subject: [PATCH 393/404] New cloud-overlap assumptions in RRTMGP. Replaced magic numbers with parameters. --- physics/GFS_cloud_diagnostics.F90 | 407 +------------------------- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 159 +++++++--- physics/GFS_rrtmgp_gfdlmp_pre.meta | 75 ++++- physics/rrtmgp_lw_cloud_sampling.F90 | 27 +- physics/rrtmgp_lw_cloud_sampling.meta | 48 +++ physics/rrtmgp_sw_cloud_sampling.F90 | 31 +- physics/rrtmgp_sw_cloud_sampling.meta | 48 +++ 7 files changed, 316 insertions(+), 479 deletions(-) diff --git a/physics/GFS_cloud_diagnostics.F90 b/physics/GFS_cloud_diagnostics.F90 index 05a18f15f..1a7258b10 100644 --- a/physics/GFS_cloud_diagnostics.F90 +++ b/physics/GFS_cloud_diagnostics.F90 @@ -5,8 +5,9 @@ ! ######################################################################################## module GFS_cloud_diagnostics use machine, only: kind_phys - use physparam, only: iovr, ivflip, icldflg, idcor - + use physparam, only: icldflg + use module_radiation_clouds, only: gethml + ! Module parameters (imported directly from radiation_cloud.f) integer, parameter :: & NF_CLDS = 9, & ! Number of fields in cloud array @@ -187,406 +188,4 @@ subroutine hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, return end subroutine hml_cloud_diagnostics_initialize - - ! ######################################################################################### - ! ######################################################################################### - subroutine gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, IX, NLAY, clds, mtop, mbot) - ! =================================================================== ! - ! ! - ! abstract: compute high, mid, low, total, and boundary cloud fractions ! - ! and cloud top/bottom layer indices for model diagnostic output. ! - ! the three cloud domain boundaries are defined by ptopc. the cloud ! - ! overlapping method is defined by control flag 'iovr', which is also ! - ! used by lw and sw radiation programs. ! - ! ! - ! usage: call gethml ! - ! ! - ! subprograms called: none ! - ! ! - ! attributes: ! - ! language: fortran 90 ! - ! machine: ibm-sp, sgi ! - ! ! - ! ! - ! ==================== definition of variables ==================== ! - ! ! - ! input variables: ! - ! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! - ! ptop1 (IX,4) : pressure limits of cloud domain interfaces ! - ! (sfc,low,mid,high) in mb (100Pa) ! - ! cldtot(IX,NLAY) : total or straiform cloud profile in fraction ! - ! cldcnv(IX,NLAY) : convective cloud (for diagnostic scheme only) ! - ! dz (ix,nlay) : layer thickness (km) ! - ! de_lgth(ix) : clouds vertical de-correlation length (km) ! - ! alpha(ix,nlay) : alpha decorrelation parameter ! - ! IX : horizontal dimention ! - ! NLAY : vertical layer dimensions ! - ! ! - ! output variables: ! - ! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl ! - ! mtop (IX,3) : vertical indices for low, mid, hi cloud tops ! - ! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! - ! ! - ! external module variables: (in physparam) ! - ! ivflip : control flag of vertical index direction ! - ! =0: index from toa to surface ! - ! =1: index from surface to toa ! - ! ! - ! internal module variables: ! - ! iovr : control flag for cloud overlap ! - ! =0 random overlapping clouds ! - ! =1 max/ran overlapping clouds ! - ! =2 maximum overlapping ( for mcica only ) ! - ! =3 decorr-length ovlp ( for mcica only ) ! - ! =4 exponential cloud overlap (AER; mcica only) ! - ! =5 exponential-random overlap (AER; mcica only) ! - ! ! - ! ==================== end of description ===================== ! - ! - implicit none! - - ! --- inputs: - integer, intent(in) :: IX, NLAY - - real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, & - cldtot, cldcnv, dz - real (kind=kind_phys), dimension(:), intent(in) :: de_lgth - real (kind=kind_phys), dimension(:,:), intent(in) :: alpha - - ! --- outputs - real (kind=kind_phys), dimension(:,:), intent(out) :: clds - - integer, dimension(:,:), intent(out) :: mtop, mbot - - ! --- local variables: - real (kind=kind_phys) :: cl1(IX), cl2(IX), dz1(ix) - real (kind=kind_phys) :: pcur, pnxt, ccur, cnxt, alfa - - integer, dimension(IX):: idom, kbt1, kth1, kbt2, kth2 - integer :: i, k, id, id1, kstr, kend, kinc - - ! - !===> ... begin here - ! - clds(:,:) = 0.0 - - do i = 1, IX - cl1(i) = 1.0 - cl2(i) = 1.0 - enddo - - ! --- total and bl clouds, where cl1, cl2 are fractions of clear-sky view - ! layer processed from surface and up - - !> - Calculate total and BL cloud fractions (maximum-random cloud - !! overlapping is operational). - - if ( ivflip == 0 ) then ! input data from toa to sfc - kstr = NLAY - kend = 1 - kinc = -1 - else ! input data from sfc to toa - kstr = 1 - kend = NLAY - kinc = 1 - endif ! end_if_ivflip - - if ( iovr == 0 ) then ! random overlap - - do k = kstr, kend, kinc - do i = 1, IX - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) cl1(i) = cl1(i) * (1.0 - ccur) - enddo - - if (k == llyr) then - do i = 1, IX - clds(i,5) = 1.0 - cl1(i) ! save bl cloud - enddo - endif - enddo - - do i = 1, IX - clds(i,4) = 1.0 - cl1(i) ! save total cloud - enddo - - elseif ( iovr == 1 ) then ! max/ran overlap - - do k = kstr, kend, kinc - do i = 1, IX - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) then ! cloudy layer - cl2(i) = min( cl2(i), (1.0 - ccur) ) - else ! clear layer - cl1(i) = cl1(i) * cl2(i) - cl2(i) = 1.0 - endif - enddo - - if (k == llyr) then - do i = 1, IX - clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud - enddo - endif - enddo - - do i = 1, IX - clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud - enddo - - elseif ( iovr == 2 ) then ! maximum overlap all levels - - cl1(:) = 0.0 - - do k = kstr, kend, kinc - do i = 1, IX - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) cl1(i) = max( cl1(i), ccur ) - enddo - - if (k == llyr) then - do i = 1, IX - clds(i,5) = cl1(i) ! save bl cloud - enddo - endif - enddo - - do i = 1, IX - clds(i,4) = cl1(i) ! save total cloud - enddo - - elseif ( iovr == 3 ) then ! random if clear-layer divided, - ! otherwise de-corrlength method - do i = 1, ix - dz1(i) = - dz(i,kstr) - enddo - - do k = kstr, kend, kinc - do i = 1, ix - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) then ! cloudy layer - alfa = exp( -0.5*((dz1(i)+dz(i,k)))/de_lgth(i) ) - dz1(i) = dz(i,k) - cl2(i) = alfa * min(cl2(i), (1.0 - ccur)) & ! maximum part - + (1.0 - alfa) * (cl2(i) * (1.0 - ccur)) ! random part - else ! clear layer - cl1(i) = cl1(i) * cl2(i) - cl2(i) = 1.0 - if (k /= kend) dz1(i) = -dz(i,k+kinc) - endif - enddo - - if (k == llyr) then - do i = 1, ix - clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud - enddo - endif - enddo - - do i = 1, ix - clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud - enddo - - elseif ( iovr == 4 .or. iovr == 5 ) then ! exponential overlap (iovr=4), or - ! exponential-random (iovr=5); - ! distinction defined by alpha - do k = kstr, kend, kinc - do i = 1, ix - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - if (ccur >= climit) then ! cloudy layer - cl2(i) = alpha(i,k) * min(cl2(i), (1.0 - ccur)) & ! maximum part - + (1.0 - alpha(i,k)) * (cl2(i) * (1.0 - ccur)) ! random part - else ! clear layer - cl1(i) = cl1(i) * cl2(i) - cl2(i) = 1.0 - endif - enddo - if (k == llyr) then - do i = 1, ix - clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud - enddo - endif - enddo - do i = 1, ix - clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud - enddo - endif ! end_if_iovr - - ! --- high, mid, low clouds, where cl1, cl2 are cloud fractions - ! layer processed from one layer below llyr and up - ! --- change! layer processed from surface to top, so low clouds will - ! contains both bl and low clouds. - - !> - Calculte high, mid, low cloud fractions and vertical indices of - !! cloud tops/bases. - if ( ivflip == 0 ) then ! input data from toa to sfc - - do i = 1, IX - cl1 (i) = 0.0 - cl2 (i) = 0.0 - kbt1(i) = NLAY - kbt2(i) = NLAY - kth1(i) = 0 - kth2(i) = 0 - idom(i) = 1 - mbot(i,1) = NLAY - mtop(i,1) = NLAY - mbot(i,2) = NLAY - 1 - mtop(i,2) = NLAY - 1 - mbot(i,3) = NLAY - 1 - mtop(i,3) = NLAY - 1 - enddo - - !org do k = llyr-1, 1, -1 - do k = NLAY, 1, -1 - do i = 1, IX - id = idom(i) - id1= id + 1 - - pcur = plyr(i,k) - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - - if (k > 1) then - pnxt = plyr(i,k-1) - cnxt = min( ovcst, max( cldtot(i,k-1), cldcnv(i,k-1) )) - else - pnxt = -1.0 - cnxt = 0.0 - endif - - if (pcur < ptop1(i,id1)) then - id = id + 1 - id1= id1 + 1 - idom(i) = id - endif - - if (ccur >= climit) then - if (kth2(i) == 0) kbt2(i) = k - kth2(i) = kth2(i) + 1 - - if ( iovr == 0 ) then - cl2(i) = cl2(i) + ccur - cl2(i)*ccur - else - cl2(i) = max( cl2(i), ccur ) - endif - - if (cnxt < climit .or. pnxt < ptop1(i,id1)) then - kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i) ) & - / (cl1(i) + cl2(i)) ) - kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i) ) & - / (cl1(i) + cl2(i)) ) - cl1 (i) = cl1(i) + cl2(i) - cl1(i)*cl2(i) - - kbt2(i) = k - 1 - kth2(i) = 0 - cl2 (i) = 0.0 - endif ! end_if_cnxt_or_pnxt - endif ! end_if_ccur - - if (pnxt < ptop1(i,id1)) then - clds(i,id) = cl1(i) - mtop(i,id) = min( kbt1(i), kbt1(i)-kth1(i)+1 ) - mbot(i,id) = kbt1(i) - - cl1 (i) = 0.0 - kbt1(i) = k - 1 - kth1(i) = 0 - - if (id1 <= NK_CLDS) then - mbot(i,id1) = kbt1(i) - mtop(i,id1) = kbt1(i) - endif - endif ! end_if_pnxt - - enddo ! end_do_i_loop - enddo ! end_do_k_loop - - else ! input data from sfc to toa - - do i = 1, IX - cl1 (i) = 0.0 - cl2 (i) = 0.0 - kbt1(i) = 1 - kbt2(i) = 1 - kth1(i) = 0 - kth2(i) = 0 - idom(i) = 1 - mbot(i,1) = 1 - mtop(i,1) = 1 - mbot(i,2) = 2 - mtop(i,2) = 2 - mbot(i,3) = 2 - mtop(i,3) = 2 - enddo - - !org do k = llyr+1, NLAY - do k = 1, NLAY - do i = 1, IX - id = idom(i) - id1= id + 1 - - pcur = plyr(i,k) - ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) )) - - if (k < NLAY) then - pnxt = plyr(i,k+1) - cnxt = min( ovcst, max( cldtot(i,k+1), cldcnv(i,k+1) )) - else - pnxt = -1.0 - cnxt = 0.0 - endif - - if (pcur < ptop1(i,id1)) then - id = id + 1 - id1= id1 + 1 - idom(i) = id - endif - - if (ccur >= climit) then - if (kth2(i) == 0) kbt2(i) = k - kth2(i) = kth2(i) + 1 - - if ( iovr == 0 ) then - cl2(i) = cl2(i) + ccur - cl2(i)*ccur - else - cl2(i) = max( cl2(i), ccur ) - endif - - if (cnxt < climit .or. pnxt < ptop1(i,id1)) then - kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i)) & - / (cl1(i) + cl2(i)) ) - kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i)) & - / (cl1(i) + cl2(i)) ) - cl1 (i) = cl1(i) + cl2(i) - cl1(i)*cl2(i) - - kbt2(i) = k + 1 - kth2(i) = 0 - cl2 (i) = 0.0 - endif ! end_if_cnxt_or_pnxt - endif ! end_if_ccur - - if (pnxt < ptop1(i,id1)) then - clds(i,id) = cl1(i) - mtop(i,id) = max( kbt1(i), kbt1(i)+kth1(i)-1 ) - mbot(i,id) = kbt1(i) - - cl1 (i) = 0.0 - kbt1(i) = min(k+1, nlay) - kth1(i) = 0 - - if (id1 <= NK_CLDS) then - mbot(i,id1) = kbt1(i) - mtop(i,id1) = kbt1(i) - endif - endif ! end_if_pnxt - - enddo ! end_do_i_loop - enddo ! end_do_k_loop - - endif ! end_if_ivflip - - ! - return - !................................... - end subroutine gethml end module GFS_cloud_diagnostics diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index c868de6e3..45f8eefc6 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -4,9 +4,10 @@ ! ######################################################################################## module GFS_rrtmgp_gfdlmp_pre use machine, only: kind_phys - use physparam, only: lcnorm, lcrick, idcor, iovr + use physparam, only: lcnorm, lcrick use rrtmgp_aux, only: check_error_msg - !use module_radiation_clouds, only: get_alpha_exp, get_alpha_dcorr + use module_radiation_cloud_overlap, only: cmp_dcorr_lgth, get_alpha_exp + ! Parameters real(kind_phys), parameter :: & reliq_def = 10.0 , & ! Default liq radius to 10 micron (used when effr_in=F) @@ -33,10 +34,11 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_init subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldice, & i_cldrain, i_cldsnow, i_cldgrpl, i_cldtot, yearlen, lsswr, lslwr, effr_in, julian,& lat, p_lev, p_lay, tv_lay, effrin_cldliq, effrin_cldice, effrin_cldrain, & - effrin_cldsnow, tracer, con_pi, con_g, con_rd, con_epsq, & + effrin_cldsnow, tracer, con_pi, con_g, con_rd, con_epsq, dcorr_con, idcor, iovr, & + iovr_dcorr, iovr_exprand, iovr_exp, idcor_con, idcor_hogan, idcor_oreopoulos, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & cld_rerain, precip_frac, cloud_overlap_param, precip_overlap_param, de_lgth, & - deltaZ, errmsg, errflg) + deltaZb, errmsg, errflg) implicit none ! Inputs @@ -51,7 +53,15 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld i_cldsnow, & ! Index into tracer array for cloud snow. i_cldgrpl, & ! Index into tracer array for cloud groupel. i_cldtot, & ! Index into tracer array for cloud total amount. - yearlen ! Length of current year (365/366) WTF? + yearlen, & ! Length of current year (365/366) WTF? + iovr, & ! Choice of cloud-overlap method + iovr_dcorr, & ! Flag for decorrelation-length cloud overlap method + iovr_exp, & ! Flag for exponential cloud overlap method + iovr_exprand, & ! Flag for exponential-random cloud overlap method + idcor, & ! Choice of method for decorrelation length computation + idcor_con, & ! Flag for decorrelation-length. Use constant value + idcor_hogan, & ! Flag for decorrelation-length. (https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.647) + idcor_oreopoulos ! Flag for decorrelation-length. (10.5194/acp-12-9097-2012) logical, intent(in) :: & lsswr, & ! Call SW radiation? lslwr, & ! Call LW radiation @@ -61,7 +71,8 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld con_pi, & ! Physical constant: pi con_g, & ! Physical constant: gravitational constant con_rd, & ! Physical constant: gas-constant for dry air - con_epsq ! Physical constant(?): Minimum value for specific humidity + con_epsq, & ! Physical constant(?): Minimum value for specific humidity + dcorr_con ! Decorrelation-length (used if idcor = 0, default is idcor = 1) real(kind_phys), dimension(nCol), intent(in) :: & lat ! Latitude real(kind_phys), dimension(nCol,nLev), intent(in) :: & @@ -92,18 +103,21 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld precip_frac, & ! Precipitation fraction cloud_overlap_param, & ! Cloud-overlap parameter precip_overlap_param, & ! Precipitation overlap parameter - deltaZ ! Layer thickness (km) + deltaZb ! Layer thickness (km) character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & errflg ! Error flag ! Local variables - real(kind_phys) :: tem1 + real(kind_phys) :: tem1,pfac + real(kind_phys), dimension(nLev+1) :: hgtb + real(kind_phys), dimension(nLev) :: hgtc real(kind_phys), dimension(nCol, nLev, min(4,ncnd)) :: cld_condensate - integer :: iCol,iLay,l,ncndl - real(kind_phys), dimension(nCol,nLev) :: deltaP - + integer :: iCol,iLay,l,ncndl,iSFC,iTOA + real(kind_phys), dimension(nCol,nLev) :: deltaP,deltaZ + logical :: top_at_1 + if (.not. (lsswr .or. lslwr)) return ! Initialize CCPP error handling variables @@ -117,30 +131,26 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) return endif - ! - if (lcrick) then - errmsg = 'Namelist option lcrick is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return - endif - ! - if (lcnorm) then - errmsg = 'Namelist option lcnorm is not supported.' - errflg = 1 - call check_error_msg('GFS_rrtmgp_gfdlmp_pre_run',errmsg) - return + + ! What is vertical ordering? + top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev)) + if (top_at_1) then + iSFC = nLev + iTOA = 1 + else + iSFC = 1 + iTOA = nLev endif - ! Initialize outputs + ! Initialize outputs cld_lwp(:,:) = 0.0 - cld_reliq(:,:) = 0.0 + cld_reliq(:,:) = reliq_def cld_iwp(:,:) = 0.0 - cld_reice(:,:) = 0.0 + cld_reice(:,:) = reice_def cld_rwp(:,:) = 0.0 - cld_rerain(:,:) = 0.0 + cld_rerain(:,:) = rerain_def cld_swp(:,:) = 0.0 - cld_resnow(:,:) = 0.0 + cld_resnow(:,:) = resnow_def ! #################################################################################### ! Pull out cloud information for GFDL MP scheme. @@ -183,7 +193,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld cld_swp(iCol,iLay) = cld_condensate(iCol,iLay,4) * tem1 endif ! Use radii provided from the macrophysics - if (effr_in) then + if (effr_in) then cld_reliq(iCol,iLay) = effrin_cldliq(iCol,iLay) cld_reice(iCol,iLay) = max(reice_min, min(reice_max,effrin_cldice(iCol,iLay))) cld_rerain(iCol,iLay) = effrin_cldrain(iCol,iLay) @@ -200,22 +210,83 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld ! #################################################################################### ! Cloud (and precipitation) overlap ! #################################################################################### - - ! Compute layer-thickness - do iCol=1,nCol - do iLay=1,nLev - deltaZ(iCol,iLay) = ((con_rd/con_g)*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) - enddo + ! + ! Compute layer-thickness between layer boundaries (deltaZ) and layer centers (deltaZc) + ! + do iCol=1,nCol + if (top_at_1) then + ! Layer thickness (km) + do iLay=1,nLev + deltaZ(iCol,iLay) = ((con_rd/con_g)*0.001) * abs(log(p_lev(iCol,iLay+1)) - log(p_lev(iCol,iLay))) * tv_lay(iCol,iLay) + enddo + ! Height at layer boundaries + hgtb(nLev+1) = 0._kind_phys + do iLay=nLev,1,-1 + hgtb(iLay)= hgtb(iLay+1) + deltaZ(iCol,iLay) + enddo + ! Height at layer centers + do iLay = nLev, 1, -1 + pfac = abs(log(p_lev(iCol,iLay+1)) - log(p_lay(iCol,iLay))) / & + abs(log(p_lev(iCol,iLay+1)) - log(p_lev(iCol,iLay))) + hgtc(iLay) = hgtb(iLay+1) + pfac * (hgtb(iLay) - hgtb(iLay+1)) + enddo + ! Layer thickness between centers + do iLay = nLev-1, 1, -1 + deltaZb(iCol,iLay) = hgtc(iLay) - hgtc(iLay+1) + enddo + deltaZb(iCol,nLev) = hgtc(nLev) - hgtb(nLev+1) + else + do iLay=nLev,1,-1 + deltaZ(iCol,iLay) = ((con_rd/con_g)*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + enddo + ! Height at layer boundaries + hgtb(1) = 0._kind_phys + do iLay=1,nLev + hgtb(iLay+1)= hgtb(iLay) + deltaZ(iCol,iLay) + enddo + ! Height at layer centers + do iLay = 1, nLev + pfac = abs(log(p_lev(iCol,iLay)) - log(p_lay(iCol,iLay) )) / & + abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) + hgtc(iLay) = hgtb(iLay) + pfac * (hgtb(iLay+1) - hgtb(iLay)) + enddo + ! Layer thickness between centers + do iLay = 2, nLev + deltaZb(iCol,iLay) = hgtc(iLay) - hgtc(iLay-1) + enddo + deltaZb(iCol,1) = hgtc(1) - hgtb(1) + endif enddo - - ! - ! Cloud overlap parameter - ! - if (iovr == 3) then -! call get_alpha_dcorr(nCol, nLev, lat, con_pi, deltaZ, de_lgth, cloud_overlap_param) + + ! + ! Cloud decorrelation length + ! + if (idcor == idcor_hogan) then + call cmp_dcorr_lgth(nCol, lat, con_pi, de_lgth) + endif + if (idcor == idcor_oreopoulos) then + call cmp_dcorr_lgth(nCol, lat*(180._kind_phys/con_pi), julian, yearlen, de_lgth) + endif + if (idcor == idcor_con) then + de_lgth(:) = dcorr_con endif - if (iovr == 4 .or. iovr == 5) then -! call get_alpha_exp(nCol, nLev, deltaZ, iovr, lat, julian, yearlen, cld_frac, cloud_overlap_param) + + ! + ! Cloud overlap parameter + ! + call get_alpha_exp(nCol, nLev, deltaZb, de_lgth, cloud_overlap_param) + + ! For exponential random overlap... + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == iovr_exprand) then + do iLay = 1, nLev + do iCol = 1, nCol + if (cld_frac(iCol,iLay) .eq. 0. .and. cld_frac(iCol,iLay-1) .gt. 0.) then + cloud_overlap_param(iCol,iLay) = 0._kind_phys + endif + enddo + enddo endif ! diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 787879340..293cc0c28 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -245,6 +245,79 @@ kind = kind_phys intent = in optional = F +[iovr] + standard_name = flag_for_cloud_overlap_method_for_radiation + long_name = flag for cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_dcorr] + standard_name = flag_for_decorrelation_length_cloud_overlap_method + long_name = choice of decorrelation-length cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_exp] + standard_name = flag_for_exponential_cloud_overlap_method + long_name = choice of exponential cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_exprand] + standard_name = flag_for_exponential_random_cloud_overlap_method + long_name = choice of exponential-random cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[idcor] + standard_name = flag_for_decorrelation_length_method + long_name = flag for decorrelation length method used in cloud overlap method (iovr) + units = flag + dimensions = () + type = integer + intent = in + optional = F +[idcor_con] + standard_name = flag_for_constant_decorrelation_length_method + long_name = choice of decorrelation length computation (costant) + units = flag + dimensions = () + type = integer + intent = in + optional = F +[idcor_hogan] + standard_name = flag_for_hogan_decorrelation_length_method + long_name = choice of decorrelation length computation (hogan) + units = flag + dimensions = () + type = integer + intent = in + optional = F +[idcor_oreopoulos] + standard_name = flag_for_oreopoulos_decorrelation_length_method + long_name = choice of decorrelation length computation (oreopoulos) + units = flag + dimensions = () + type = integer + intent = in + optional = F +[dcorr_con] + standard_name = decorreltion_length_used_by_overlap_method + long_name = decorrelation length (default) used by cloud overlap method (iovr) + units = km + dimensions = () + type = real + intent = in + kind = kind_phys + optional = F [de_lgth] standard_name = cloud_decorrelation_length long_name = cloud decorrelation length @@ -362,7 +435,7 @@ kind = kind_phys intent = out optional = F -[deltaZ] +[deltaZb] standard_name = layer_thickness long_name = layer_thickness units = m diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 3c3e09622..d0d29e3a2 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -46,6 +46,7 @@ end subroutine rrtmgp_lw_cloud_sampling_init !! \htmlinclude rrtmgp_lw_cloud_sampling_run.html !! subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, iovr, & + iovr_max, iovr_maxrand, iovr_rand, iovr_dcorr, iovr_exp, iovr_exprand, & cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, lw_gas_props, & lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, & lw_optical_props_clouds, lw_optical_props_precip, errmsg, errflg) @@ -57,6 +58,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, nCol, & ! Number of horizontal gridpoints nLev, & ! Number of vertical layers iovr, & ! Choice of cloud-overlap method + iovr_max, & ! Flag for maximum cloud overlap method + iovr_maxrand, & ! Flag for maximum-random cloud overlap method + iovr_rand, & ! Flag for random cloud overlap method + iovr_dcorr, & ! Flag for decorrelation-length cloud overlap method + iovr_exp, & ! Flag for exponential cloud overlap method + iovr_exprand, & ! Flag for exponential-random cloud overlap method ipsdlw0 ! Initial permutation seed for McICA integer,intent(in),dimension(ncol) :: & icseed_lw ! auxiliary special cloud related array when module @@ -95,14 +102,6 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - ! - if (iovr .ne. 1 .and. iovr .ne. 3 .and. iovr .ne. 4 .and. iovr .ne. 5) then - errmsg = 'Cloud overlap assumption not supported.' - errflg = 1 - call check_error_msg('rrtmgp_lw_cloud_sampling',errmsg) - return - endif if (.not. doLWrad) return @@ -135,11 +134,11 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Cloud-overlap. ! Maximum-random - if (iovr == 1) then + if (iovr == iovr_maxrand) then call sampled_mask(rng3D, cld_frac, cldfracMCICA) endif ! Exponential decorrelation length overlap - if (iovr == 3) then + if (iovr == iovr_dcorr) then ! Generate second RNG do iCol=1,ncol call random_setseed(ipseed_lw(icol),rng_stat) @@ -151,7 +150,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, randoms2 = rng3D2) endif ! Exponential or Exponential-random - if (iovr == 4 .or. iovr == 5) then + if (iovr == iovr_exp .or. iovr == iovr_exprand) then call sampled_mask(rng3D, cld_frac, cldfracMCICA, & overlap_param = cloud_overlap_param(:,1:nLev-1)) endif @@ -192,11 +191,11 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Precipitation overlap. ! Maximum-random - if (iovr == 1) then + if (iovr == iovr_maxrand) then call sampled_mask(rng3D, precip_frac, precipfracSAMP) endif ! Exponential decorrelation length overlap - if (iovr == 3) then + if (iovr == iovr_dcorr) then ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Generate second RNG !do iCol=1,ncol @@ -209,7 +208,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, randoms2 = rng3D2) endif ! Exponential or Exponential-random - if (iovr == 4 .or. iovr == 5) then + if (iovr == iovr_exp .or. iovr == iovr_exprand) then call sampled_mask(rng3D, precip_frac, precipfracSAMP, & overlap_param = precip_overlap_param(:,1:nLev-1)) endif diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 4aeee9f07..b884c6f7e 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -85,6 +85,54 @@ type = integer intent = in optional = F +[iovr_maxrand] + standard_name = flag_for_maximum_random_cloud_overlap_method + long_name = choice of maximum-random cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_dcorr] + standard_name = flag_for_decorrelation_length_cloud_overlap_method + long_name = choice of decorrelation-length cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_exp] + standard_name = flag_for_exponential_cloud_overlap_method + long_name = choice of exponential cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_exprand] + standard_name = flag_for_exponential_random_cloud_overlap_method + long_name = choice of exponential-random cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_rand] + standard_name = flag_for_random_cloud_overlap_method + long_name = choice of random cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_max] + standard_name = flag_for_maximum_cloud_overlap_method + long_name = choice of maximum cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F [icseed_lw] standard_name = seed_random_numbers_lw long_name = seed for random number generation for longwave radiation diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index bd2ad05af..cea0cf59d 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -45,6 +45,7 @@ end subroutine rrtmgp_sw_cloud_sampling_init !! \htmlinclude rrtmgp_sw_cloud_sampling.html !! subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, iovr, & + iovr_max, iovr_maxrand, iovr_rand, iovr_dcorr, iovr_exp, iovr_exprand, & icseed_sw, cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, & sw_gas_props, sw_optical_props_cloudsByBand, sw_optical_props_precipByBand, & sw_optical_props_clouds, sw_optical_props_precip, errmsg, errflg) @@ -56,8 +57,14 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd nCol, & ! Number of horizontal gridpoints nDay, & ! Number of daylit points. nLev, & ! Number of vertical layers - iovr, & ! Choice of cloud-overlap method - ipsdsw0 ! Initial permutation seed for McICA + ipsdsw0, & ! Initial permutation seed for McICA + iovr, & ! Choice of cloud-overlap method + iovr_max, & ! Flag for maximum cloud overlap method + iovr_maxrand, & ! Flag for maximum-random cloud overlap method + iovr_rand, & ! Flag for random cloud overlap method + iovr_dcorr, & ! Flag for decorrelation-length cloud overlap method + iovr_exp, & ! Flag for exponential cloud overlap method + iovr_exprand ! Flag for exponential-random cloud overlap method integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. integer,intent(in),dimension(ncol) :: & @@ -99,14 +106,6 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd errmsg = '' errflg = 0 - ! Only works w/ SDFs v15p2 and v16beta - if (iovr .ne. 1 .and. iovr .ne. 3 .and. iovr .ne. 4 .and. iovr .ne. 5) then - errmsg = 'Cloud overlap assumption not supported.' - errflg = 1 - call check_error_msg('rrtmgp_sw_cloud_sampling',errmsg) - return - endif - if (.not. doSWrad) return if (nDay .gt. 0) then ! ################################################################################# @@ -141,11 +140,11 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Cloud overlap. ! Maximum-random overlap - if (iovr == 1) then + if (iovr == iovr_maxrand) then call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA) endif ! Decorrelation-length overlap - if (iovr == 3) then + if (iovr == iovr_dcorr) then do iday=1,nday call random_setseed(ipseed_sw(iday),rng_stat) call random_number(rng1D,rng_stat) @@ -156,7 +155,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd randoms2 = rng3D2) endif ! Exponential overlap - if (iovr == 4 .or. iovr == 5) then + if (iovr == iovr_exp .or. iovr == iovr_exprand) then call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA, & overlap_param = cloud_overlap_param(idxday(1:nDay),1:nLev-1)) endif @@ -197,11 +196,11 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! Precipitation overlap ! Maximum-random - if (iovr == 1) then + if (iovr == iovr_maxrand) then call sampled_mask(rng3D, precip_frac(idxday(1:nDay),:), precipfracSAMP) endif ! Exponential decorrelation length overlap - if (iovr == 3) then + if (iovr == iovr_dcorr) then !! Generate second RNG !do iday=1,nday ! call random_setseed(ipseed_sw(iday),rng_stat) @@ -212,7 +211,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd overlap_param = precip_overlap_param(idxday(1:nDay),1:nLev-1),& randoms2 = rng3D2) endif - if (iovr == 4 .or. iovr == 5) then + if (iovr == iovr_exp .or. iovr == iovr_exprand) then call sampled_mask(rng3D, precip_frac(idxday(1:nDay),:),precipfracSAMP, & overlap_param = precip_overlap_param(idxday(1:nDay),1:nLev-1)) endif diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index acbb2a960..a9a68f374 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -101,6 +101,54 @@ type = integer intent = in optional = F +[iovr_maxrand] + standard_name = flag_for_maximum_random_cloud_overlap_method + long_name = choice of maximum-random cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_dcorr] + standard_name = flag_for_decorrelation_length_cloud_overlap_method + long_name = choice of decorrelation-length cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_exp] + standard_name = flag_for_exponential_cloud_overlap_method + long_name = choice of exponential cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_exprand] + standard_name = flag_for_exponential_random_cloud_overlap_method + long_name = choice of exponential-random cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_rand] + standard_name = flag_for_random_cloud_overlap_method + long_name = choice of random cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_max] + standard_name = flag_for_maximum_cloud_overlap_method + long_name = choice of maximum cloud overlap method + units = flag + dimensions = () + type = integer + intent = in + optional = F [icseed_sw] standard_name = seed_random_numbers_sw long_name = seed for random number generation for shortwave radiation From 01ad186d9f1740932bee1bdb1fb11c3d08888630 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 29 Oct 2020 19:41:13 +0000 Subject: [PATCH 394/404] Removed instanced of physparam in RRTMGP scheme. Information passed directly to routines. --- physics/GFS_rrtmgp_gfdlmp_pre.F90 | 100 +++++++++++++------------- physics/GFS_rrtmgp_gfdlmp_pre.meta | 4 +- physics/GFS_rrtmgp_sw_pre.F90 | 1 - physics/rrtmgp_lw_cloud_sampling.F90 | 42 +++++++---- physics/rrtmgp_lw_cloud_sampling.meta | 8 +++ physics/rrtmgp_lw_pre.F90 | 1 - physics/rrtmgp_sw_cloud_sampling.F90 | 22 +++--- physics/rrtmgp_sw_cloud_sampling.meta | 8 +++ 8 files changed, 108 insertions(+), 78 deletions(-) diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.F90 b/physics/GFS_rrtmgp_gfdlmp_pre.F90 index 45f8eefc6..52e1a7b74 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.F90 +++ b/physics/GFS_rrtmgp_gfdlmp_pre.F90 @@ -4,7 +4,6 @@ ! ######################################################################################## module GFS_rrtmgp_gfdlmp_pre use machine, only: kind_phys - use physparam, only: lcnorm, lcrick use rrtmgp_aux, only: check_error_msg use module_radiation_cloud_overlap, only: cmp_dcorr_lgth, get_alpha_exp @@ -32,8 +31,8 @@ end subroutine GFS_rrtmgp_gfdlmp_pre_init !! \htmlinclude GFS_rrtmgp_gfdlmp_pre_run.html !! subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cldice, & - i_cldrain, i_cldsnow, i_cldgrpl, i_cldtot, yearlen, lsswr, lslwr, effr_in, julian,& - lat, p_lev, p_lay, tv_lay, effrin_cldliq, effrin_cldice, effrin_cldrain, & + i_cldrain, i_cldsnow, i_cldgrpl, i_cldtot, yearlen, doSWrad, doLWrad, effr_in, & + julian, lat, p_lev, p_lay, tv_lay, effrin_cldliq, effrin_cldice, effrin_cldrain, & effrin_cldsnow, tracer, con_pi, con_g, con_rd, con_epsq, dcorr_con, idcor, iovr, & iovr_dcorr, iovr_exprand, iovr_exp, idcor_con, idcor_hogan, idcor_oreopoulos, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & @@ -43,53 +42,53 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld ! Inputs integer, intent(in) :: & - nCol, & ! Number of horizontal grid points - nLev, & ! Number of vertical layers - ncnd, & ! Number of cloud condensation types. - nTracers, & ! Number of tracers from model. - i_cldliq, & ! Index into tracer array for cloud liquid. - i_cldice, & ! Index into tracer array for cloud ice. - i_cldrain, & ! Index into tracer array for cloud rain. - i_cldsnow, & ! Index into tracer array for cloud snow. - i_cldgrpl, & ! Index into tracer array for cloud groupel. - i_cldtot, & ! Index into tracer array for cloud total amount. - yearlen, & ! Length of current year (365/366) WTF? - iovr, & ! Choice of cloud-overlap method - iovr_dcorr, & ! Flag for decorrelation-length cloud overlap method - iovr_exp, & ! Flag for exponential cloud overlap method - iovr_exprand, & ! Flag for exponential-random cloud overlap method - idcor, & ! Choice of method for decorrelation length computation - idcor_con, & ! Flag for decorrelation-length. Use constant value - idcor_hogan, & ! Flag for decorrelation-length. (https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.647) - idcor_oreopoulos ! Flag for decorrelation-length. (10.5194/acp-12-9097-2012) + nCol, & ! Number of horizontal grid points + nLev, & ! Number of vertical layers + ncnd, & ! Number of cloud condensation types. + nTracers, & ! Number of tracers from model. + i_cldliq, & ! Index into tracer array for cloud liquid. + i_cldice, & ! Index into tracer array for cloud ice. + i_cldrain, & ! Index into tracer array for cloud rain. + i_cldsnow, & ! Index into tracer array for cloud snow. + i_cldgrpl, & ! Index into tracer array for cloud groupel. + i_cldtot, & ! Index into tracer array for cloud total amount. + yearlen, & ! Length of current year (365/366) WTF? + iovr, & ! Choice of cloud-overlap method + iovr_dcorr, & ! Flag for decorrelation-length cloud overlap method + iovr_exp, & ! Flag for exponential cloud overlap method + iovr_exprand, & ! Flag for exponential-random cloud overlap method + idcor, & ! Choice of method for decorrelation length computation + idcor_con, & ! Flag for decorrelation-length. Use constant value + idcor_hogan, & ! Flag for decorrelation-length. (https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.647) + idcor_oreopoulos ! Flag for decorrelation-length. (10.5194/acp-12-9097-2012) logical, intent(in) :: & - lsswr, & ! Call SW radiation? - lslwr, & ! Call LW radiation - effr_in ! Provide hydrometeor radii from macrophysics? + doSWrad, & ! Call SW radiation? + doLWrad, & ! Call LW radiation + effr_in ! Provide hydrometeor radii from macrophysics? real(kind_phys), intent(in) :: & - julian, & ! Julian day - con_pi, & ! Physical constant: pi - con_g, & ! Physical constant: gravitational constant - con_rd, & ! Physical constant: gas-constant for dry air - con_epsq, & ! Physical constant(?): Minimum value for specific humidity - dcorr_con ! Decorrelation-length (used if idcor = 0, default is idcor = 1) + julian, & ! Julian day + con_pi, & ! Physical constant: pi + con_g, & ! Physical constant: gravitational constant + con_rd, & ! Physical constant: gas-constant for dry air + con_epsq, & ! Physical constant(?): Minimum value for specific humidity + dcorr_con ! Decorrelation-length (used if idcor = idcor_con) real(kind_phys), dimension(nCol), intent(in) :: & - lat ! Latitude + lat ! Latitude real(kind_phys), dimension(nCol,nLev), intent(in) :: & - tv_lay, & ! Virtual temperature (K) - p_lay, & ! Pressure at model-layers (Pa) - effrin_cldliq, & ! Effective radius for liquid cloud-particles (microns) - effrin_cldice, & ! Effective radius for ice cloud-particles (microns) - effrin_cldrain, & ! Effective radius for rain cloud-particles (microns) - effrin_cldsnow ! Effective radius for snow cloud-particles (microns) + tv_lay, & ! Virtual temperature (K) + p_lay, & ! Pressure at model-layers (Pa) + effrin_cldliq, & ! Effective radius for liquid cloud-particles (microns) + effrin_cldice, & ! Effective radius for ice cloud-particles (microns) + effrin_cldrain, & ! Effective radius for rain cloud-particles (microns) + effrin_cldsnow ! Effective radius for snow cloud-particles (microns) real(kind_phys), dimension(nCol,nLev+1), intent(in) :: & - p_lev ! Pressure at model-level interfaces (Pa) + p_lev ! Pressure at model-level interfaces (Pa) real(kind_phys), dimension(nCol, nLev, nTracers),intent(in) :: & - tracer ! Cloud condensate amount in layer by type () + tracer ! Cloud condensate amount in layer by type () ! Outputs real(kind_phys), dimension(nCol),intent(out) :: & - de_lgth ! Decorrelation length + de_lgth ! Decorrelation length real(kind_phys), dimension(nCol,nLev),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path @@ -105,9 +104,9 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld precip_overlap_param, & ! Precipitation overlap parameter deltaZb ! Layer thickness (km) character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error flag + errflg ! Error flag ! Local variables real(kind_phys) :: tem1,pfac @@ -118,7 +117,7 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld real(kind_phys), dimension(nCol,nLev) :: deltaP,deltaZ logical :: top_at_1 - if (.not. (lsswr .or. lslwr)) return + if (.not. (doSWrad .or. doLWrad)) return ! Initialize CCPP error handling variables errmsg = '' @@ -271,10 +270,15 @@ subroutine GFS_rrtmgp_gfdlmp_pre_run(nCol, nLev, nTracers, ncnd, i_cldliq, i_cld de_lgth(:) = dcorr_con endif - ! - ! Cloud overlap parameter - ! - call get_alpha_exp(nCol, nLev, deltaZb, de_lgth, cloud_overlap_param) + ! + ! Cloud overlap parameter + ! + if (iovr == iovr_dcorr .or. iovr == iovr_exp .or. iovr == iovr_exprand) then + call get_alpha_exp(nCol, nLev, deltaZb, de_lgth, cloud_overlap_param) + else + de_lgth(:) = 0. + cloud_overlap_param(:,:) = 0. + endif ! For exponential random overlap... ! Decorrelate layers when a clear layer follows a cloudy layer to enforce diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 293cc0c28..3841afc9b 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -39,7 +39,7 @@ type = integer intent = in optional = F -[lsswr] +[doSWrad] standard_name = flag_to_calc_sw long_name = logical flags for sw radiation calls units = flag @@ -47,7 +47,7 @@ type = logical intent = in optional = F -[lslwr] +[doLWrad] standard_name = flag_to_calc_lw long_name = logical flags for lw radiation calls units = flag diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 09f830043..179c622f5 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -1,5 +1,4 @@ module GFS_rrtmgp_sw_pre - use physparam use machine, only: & kind_phys ! Working type use module_radiation_astronomy,only: & diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index d0d29e3a2..00418edec 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -1,7 +1,6 @@ module rrtmgp_lw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use physparam, only: isubclw use mo_optical_props, only: ty_optical_props_1scl use rrtmgp_sampling, only: sampled_mask, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat @@ -46,7 +45,7 @@ end subroutine rrtmgp_lw_cloud_sampling_init !! \htmlinclude rrtmgp_lw_cloud_sampling_run.html !! subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, iovr, & - iovr_max, iovr_maxrand, iovr_rand, iovr_dcorr, iovr_exp, iovr_exprand, & + iovr_max, iovr_maxrand, iovr_rand, iovr_dcorr, iovr_exp, iovr_exprand, isubc_lw, & cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, lw_gas_props, & lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, & lw_optical_props_clouds, lw_optical_props_precip, errmsg, errflg) @@ -64,12 +63,13 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, iovr_dcorr, & ! Flag for decorrelation-length cloud overlap method iovr_exp, & ! Flag for exponential cloud overlap method iovr_exprand, & ! Flag for exponential-random cloud overlap method - ipsdlw0 ! Initial permutation seed for McICA + ipsdlw0, & ! Initial permutation seed for McICA + isubc_lw integer,intent(in),dimension(ncol) :: & icseed_lw ! auxiliary special cloud related array when module - ! variable isubclw=2, it provides permutation seed + ! variable isubc_lw=2, it provides permutation seed ! for each column profile that are used for generating - ! random numbers. when isubclw /=2, it will not be used. + ! random numbers. when isubc_lw /=2, it will not be used. real(kind_phys), dimension(ncol,nLev),intent(in) :: & cld_frac, & ! Total cloud fraction by layer precip_frac ! Precipitation fraction by layer @@ -92,7 +92,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, lw_optical_props_precip ! RRTMGP DDT: Shortwave optical properties by spectral point (precipitation) ! Local variables - integer :: iCol + integer :: iCol, iLay integer,dimension(ncol) :: ipseed_lw type(random_stat) :: rng_stat real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 @@ -113,12 +113,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, call check_error_msg('rrtmgp_lw_cloud_sampling_run',& lw_optical_props_clouds%alloc_1scl(nCol, nLev, lw_gas_props)) - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). - if(isubclw == 1) then ! advance prescribed permutation seed + ! Change random number seed value for each radiation invocation (isubc_lw =1 or 2). + if(isubc_lw == 1) then ! advance prescribed permutation seed do iCol = 1, ncol ipseed_lw(iCol) = ipsdlw0 + iCol enddo - elseif (isubclw == 2) then ! use input array of permutaion seeds + elseif (isubc_lw == 2) then ! use input array of permutaion seeds do iCol = 1, ncol ipseed_lw(iCol) = icseed_lw(iCol) enddo @@ -128,13 +128,25 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) do iCol=1,ncol call random_setseed(ipseed_lw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + ! Use same rng for each layer + if (iovr == iovr_max) then + call random_number(rng1D,rng_stat) + do iLay=1,nLev + rng3D(:,iLay,iCol) = rng1D + enddo + else + do iLay=1,nLev + call random_number(rng1D,rng_stat) + rng3D(:,iLay,iCol) = rng1D + enddo + endif +! call random_number(rng1D,rng_stat) +! rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo ! Cloud-overlap. ! Maximum-random - if (iovr == iovr_maxrand) then + if (iovr == iovr_maxrand .or. iovr == iovr_rand) then call sampled_mask(rng3D, cld_frac, cldfracMCICA) endif ! Exponential decorrelation length overlap @@ -169,12 +181,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, call check_error_msg('rrtmgp_lw_cloud_sampling_run',& lw_optical_props_precip%alloc_1scl(nCol, nLev, lw_gas_props)) - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). - if(isubclw == 1) then ! advance prescribed permutation seed + ! Change random number seed value for each radiation invocation (isubc_lw =1 or 2). + if(isubc_lw == 1) then ! advance prescribed permutation seed do iCol = 1, ncol ipseed_lw(iCol) = ipsdlw0 + iCol enddo - elseif (isubclw == 2) then ! use input array of permutaion seeds + elseif (isubc_lw == 2) then ! use input array of permutaion seeds do iCol = 1, ncol ipseed_lw(iCol) = icseed_lw(iCol) enddo diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index b884c6f7e..7acc6a7d3 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -69,6 +69,14 @@ type = integer intent = in optional = F +[isubc_lw] + standard_name = flag_for_lw_clouds_without_sub_grid_approximation + long_name = flag for lw clouds without sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in + optional = F [ipsdlw0] standard_name = initial_permutation_seed_lw long_name = initial seed for McICA LW diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index 7ad8bd30d..caee7308e 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -1,5 +1,4 @@ module rrtmgp_lw_pre - use physparam use machine, only: & kind_phys ! Working type use module_radiation_surface, only: & diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index cea0cf59d..b437be5bd 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -1,7 +1,6 @@ module rrtmgp_sw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use physparam, only: isubcsw use mo_optical_props, only: ty_optical_props_2str use rrtmgp_sampling, only: sampled_mask, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat @@ -45,7 +44,7 @@ end subroutine rrtmgp_sw_cloud_sampling_init !! \htmlinclude rrtmgp_sw_cloud_sampling.html !! subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, iovr, & - iovr_max, iovr_maxrand, iovr_rand, iovr_dcorr, iovr_exp, iovr_exprand, & + iovr_max, iovr_maxrand, iovr_rand, iovr_dcorr, iovr_exp, iovr_exprand, isubc_sw, & icseed_sw, cld_frac, precip_frac, cloud_overlap_param, precip_overlap_param, & sw_gas_props, sw_optical_props_cloudsByBand, sw_optical_props_precipByBand, & sw_optical_props_clouds, sw_optical_props_precip, errmsg, errflg) @@ -64,14 +63,15 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd iovr_rand, & ! Flag for random cloud overlap method iovr_dcorr, & ! Flag for decorrelation-length cloud overlap method iovr_exp, & ! Flag for exponential cloud overlap method - iovr_exprand ! Flag for exponential-random cloud overlap method + iovr_exprand, & ! Flag for exponential-random cloud overlap method + isubc_sw integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. integer,intent(in),dimension(ncol) :: & icseed_sw ! auxiliary special cloud related array when module - ! variable isubcsw=2, it provides permutation seed + ! variable isubc_sw=2, it provides permutation seed ! for each column profile that are used for generating - ! random numbers. when isubcsw /=2, it will not be used. + ! random numbers. when isubc_sw /=2, it will not be used. real(kind_phys), dimension(ncol,nLev),intent(in) :: & cld_frac, & ! Total cloud fraction by layer precip_frac ! Precipitation fraction by layer @@ -119,12 +119,12 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd sw_optical_props_clouds%ssa(:,:,:) = 1._kind_phys sw_optical_props_clouds%g(:,:,:) = 0._kind_phys - ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - if(isubcsw == 1) then ! advance prescribed permutation seed + ! Change random number seed value for each radiation invocation (isubc_sw =1 or 2). + if(isubc_sw == 1) then ! advance prescribed permutation seed do iday = 1, nday ipseed_sw(iday) = ipsdsw0 + iday enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds + elseif (isubc_sw == 2) then ! use input array of permutaion seeds do iday = 1, nday ipseed_sw(iday) = icseed_sw(iday) enddo @@ -174,12 +174,12 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd call check_error_msg('rrtmgp_sw_cloud_sampling_run', & sw_optical_props_precip%alloc_2str( nday, nLev, sw_gas_props)) - ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - if(isubcsw == 1) then ! advance prescribed permutation seed + ! Change random number seed value for each radiation invocation (isubc_sw =1 or 2). + if(isubc_sw == 1) then ! advance prescribed permutation seed do iday = 1, nday ipseed_sw(iday) = ipsdsw0 + iday enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds + elseif (isubc_sw == 2) then ! use input array of permutaion seeds do iday = 1, nday ipseed_sw(iday) = icseed_sw(iday) enddo diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index a9a68f374..fded88bbb 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -77,6 +77,14 @@ type = integer intent = in optional = F +[isubc_sw] + standard_name = flag_for_sw_clouds_without_sub_grid_approximation + long_name = flag for sw clouds without sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in + optional = F [ipsdsw0] standard_name = initial_permutation_seed_sw long_name = initial seed for McICA SW From 573d922505a3b1b261d5160d3ccc600af235a8d0 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 29 Oct 2020 22:42:01 +0000 Subject: [PATCH 395/404] Assumulated changes. Cleanup GP setup module, remove GP dependecies on physparam.f, some housekeeping. --- physics/GFS_rrtmgp_setup.F90 | 869 ++++++++------------------- physics/rrtmg_lw_cloud_optics.F90 | 9 +- physics/rrtmg_sw_cloud_optics.F90 | 9 +- physics/rrtmgp_lw_cloud_optics.F90 | 16 +- physics/rrtmgp_lw_cloud_optics.meta | 16 + physics/rrtmgp_lw_cloud_sampling.F90 | 17 +- physics/rrtmgp_sw_cloud_optics.F90 | 14 +- physics/rrtmgp_sw_cloud_optics.meta | 16 + physics/rrtmgp_sw_cloud_sampling.F90 | 20 +- 9 files changed, 339 insertions(+), 647 deletions(-) diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 8f7b44e00..a32f96ccf 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -1,627 +1,276 @@ !> \file GFS_rrtmgp_setup.f90 !! This file contains module GFS_rrtmgp_setup - - use physparam, only : & - isolar, ictmflg, ico2flg, ioznflg, iaerflg, iaermdl, icldflg, & - lcrick, lcnorm, lnoprec, ialbflg, iemsflg, & - isubcsw, isubclw, ivflip , ipsd0, iswcliq - use machine, only: & - kind_phys ! Working type - implicit none - - public GFS_rrtmgp_setup_init, GFS_rrtmgp_setup_run, GFS_rrtmgp_setup_finalize - - private - - logical :: is_initialized = .false. - - ! Version tag and last revision date - character(40), parameter :: & - VTAGRAD='NCEP-RRTMGP_driver v1.0 Sep 2019 ' - - ! Defaults - !> new data input control variables (set/reset in subroutines radinit/radupdate): - integer :: month0 = 0 - integer :: iyear0 = 0 - integer :: monthd = 0 - - !> control flag for the first time of reading climatological ozone data - !! (set/reset in subroutines radinit/radupdate, it is used only if the - !! control parameter ioznflg=0) - logical :: loz1st = .true. - - contains + use machine, only : kind_phys + use module_radiation_astronomy, only : sol_init, sol_update + use module_radiation_aerosols, only : aer_init, aer_update + use module_radiation_gases, only : gas_init, gas_update + use module_radiation_surface, only : sfc_init + use GFS_cloud_diagnostics, only : hml_cloud_diagnostics_initialize + ! *NOTE* These parameters below are required radiation_****** modules. They are not + ! directly used by the RRTMGP routines. + use physparam, only : isolar, ictmflg, ico2flg, ioznflg, iaerflg, & + iaermdl, ialbflg, iemsflg, ivflip + implicit none + + public GFS_rrtmgp_setup_init, GFS_rrtmgp_setup_run, GFS_rrtmgp_setup_finalize + + ! Version tag and last revision date + character(40), parameter :: & + VTAGRAD='NCEP-RRTMGP_driver v1.0 Sep 2019 ' + + ! Module paramaters + integer :: & + month0 = 0, & + iyear0 = 0, & + monthd = 0 + logical :: & + is_initialized = .false. + ! Control flag for the first time of reading climatological ozone data + ! (set/reset in subroutines GFS_rrtmgp_setup_init/GFS_rrtmgp_setuup_run, it is used only if + ! the control parameter ioznflg=0) + logical :: loz1st = .true. + +contains + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_setup_init + ! ######################################################################################### !> \defgroup GFS_rrtmgp_setup GFS RRTMGP Scheme Setup !! @{ !! \section arg_table_GFS_rrtmgp_setup_init !! \htmlinclude GFS_rrtmgp_setup_init.html !! - subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics_gfdl,& - imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & - imp_physics_zhao_carr_pdf, imp_physics_mg, si, levr, ictm, isol, ico2, iaer, & - ialb, iems, ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, & - icliq_sw, crick_proof, ccnorm, norad_precip, idate, iflip, me, errmsg, errflg) - implicit none - - ! Inputs - integer, intent(in) :: & - imp_physics, & ! Flag for MP scheme - imp_physics_fer_hires, & ! Flag for fer-hires scheme - imp_physics_gfdl, & ! Flag for gfdl scheme - imp_physics_thompson, & ! Flag for thompsonscheme - imp_physics_wsm6, & ! Flag for wsm6 scheme - imp_physics_zhao_carr, & ! Flag for zhao-carr scheme - imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme - imp_physics_mg ! Flag for MG scheme - real(kind_phys), dimension(levr+1), intent(in) :: & - si - integer, intent(in) :: levr, ictm, isol, ico2, iaer, ialb, iems, & - ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, & - icliq_sw, iflip, me - logical, intent(in) :: & - crick_proof, ccnorm, norad_precip - integer, intent(in), dimension(4) :: & - idate - ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize the CCPP error handling variables - errmsg = '' - errflg = 0 - if (is_initialized) return - - ! Set radiation parameters - isolar = isol ! solar constant control flag - ictmflg = ictm ! data ic time/date control flag - ico2flg = ico2 ! co2 data source control flag - ioznflg = ntoz ! ozone data source control flag - iswcliq = icliq_sw ! optical property for liquid clouds for sw - lcrick = crick_proof ! control flag for eliminating CRICK - lcnorm = ccnorm ! control flag for in-cld condensate - lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) - isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation - isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation - ialbflg = ialb ! surface albedo control flag - iemsflg = iems ! surface emissivity control flag - ivflip = iflip ! vertical index direction control flag - - if ( ictm==0 .or. ictm==-2 ) then - iaerflg = mod(iaer, 100) ! no volcanic aerosols for clim hindcast - else - iaerflg = mod(iaer, 1000) - endif - iaermdl = iaer/1000 ! control flag for aerosol scheme selection - if ( iaermdl < 0 .or. (iaermdl>2 .and. iaermdl/=5) ) then - errmsg = trim(errmsg) // ' Error -- IAER flag is incorrect, Abort' - errflg = 1 - return - endif - - !if ( ntcw > 0 ) then - icldflg = 1 ! prognostic cloud optical prop scheme - !else - ! icldflg = 0 ! no support for diag cloud opt prop scheme - !endif - - ! Set initial permutation seed for mcica cloud-radiation - if ( isubc_sw>0 .or. isubc_lw>0 ) then - ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) - endif - - if ( me == 0 ) then - print *,' In rad_initialize (GFS_rrtmgp_setup_init), before calling radinit' - print *,' si =',si - print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& - ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw - print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr=',iovr, & - ' isubc_sw=',isubc_sw, & - ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & - ' iflip=',iflip,' me=',me - print *,' crick_proof=',crick_proof, & - ' ccnorm=',ccnorm,' norad_precip=',norad_precip - endif - - - call radinit( si, levr, imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & - imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & - imp_physics_zhao_carr_pdf, imp_physics_mg, iovr, me, errflg ) - - if ( me == 0 ) then - print *,' Radiation sub-cloud initial seed =',ipsd0, & - ' IC-idate =',idate - print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit' - endif - - is_initialized = .true. - return - end subroutine GFS_rrtmgp_setup_init - + subroutine GFS_rrtmgp_setup_init(imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & + imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & + imp_physics_zhao_carr_pdf, imp_physics_mg, si, levr, ictm, isol, ico2, iaer, ialb, & + iems, ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, icliq_sw, crick_proof, ccnorm, & + norad_precip, idate, iflip, me, errmsg, errflg) + + ! Inputs + integer, intent(in) :: & + imp_physics, & ! Flag for MP scheme + imp_physics_fer_hires, & ! Flag for fer-hires scheme + imp_physics_gfdl, & ! Flag for gfdl scheme + imp_physics_thompson, & ! Flag for thompsonscheme + imp_physics_wsm6, & ! Flag for wsm6 scheme + imp_physics_zhao_carr, & ! Flag for zhao-carr scheme + imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme + imp_physics_mg ! Flag for MG scheme + real(kind_phys), dimension(levr+1), intent(in) :: & + si + integer, intent(in) :: levr, ictm, isol, ico2, iaer, ialb, iems, & + ntcw, num_p3d, ntoz, iovr, isubc_sw, isubc_lw, & + icliq_sw, iflip, me + logical, intent(in) :: & + crick_proof, ccnorm, norad_precip + integer, intent(in), dimension(4) :: & + idate + + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + if (is_initialized) return + + ! Set radiation parameters + isolar = isol ! solar constant control flag + ictmflg = ictm ! data ic time/date control flag + ico2flg = ico2 ! co2 data source control flag + ioznflg = ntoz ! ozone data source control flag + ialbflg = ialb ! surface albedo control flag + iemsflg = iems ! surface emissivity control flag + ivflip = iflip ! vertical index direction control flag + + if ( ictm==0 .or. ictm==-2 ) then + iaerflg = mod(iaer, 100) ! no volcanic aerosols for clim hindcast + else + iaerflg = mod(iaer, 1000) + endif + iaermdl = iaer/1000 ! control flag for aerosol scheme selection + if ( iaermdl < 0 .or. (iaermdl>2 .and. iaermdl/=5) ) then + errmsg = trim(errmsg) // ' Error -- IAER flag is incorrect, Abort' + errflg = 1 + return + endif + + if ( me == 0 ) then + print *,' In rad_initialize (GFS_rrtmgp_setup_init), before calling radinit' + print *,' si = ',si + print *,' levr = ',levr, & + ' ictm = ',ictm, & + ' isol = ',isol, & + ' ico2 = ',ico2, & + ' iaer = ',iaer, & + ' ialb = ',ialb, & + ' iems = ',iems, & + ' ntcw = ',ntcw + print *,' np3d = ',num_p3d, & + ' ntoz = ',ntoz, & + ' iovr = ',iovr, & + ' isubc_sw = ',isubc_sw, & + ' isubc_lw = ',isubc_lw, & + ' icliq_sw = ',icliq_sw, & + ' iflip = ',iflip, & + ' me = ',me + endif + +#if 0 + ! GFS_radiation_driver.F90 may in the future initialize air/ground + ! temperature differently; however, this is not used at the moment + ! and as such we avoid the difficulty of dealing with exchanging + ! itsfc between GFS_rrtmgp_setup and a yet-to-be-created/-used + ! interstitial routine (or GFS_radiation_driver.F90) + itsfc = iemsflg / 10 ! sfc air/ground temp control +#endif + loz1st = (ioznflg == 0) ! first-time clim ozone data read flag + month0 = 0 + iyear0 = 0 + monthd = 0 + + ! Call initialization routines.. + call sol_init ( me ) + call aer_init ( levr, me ) + call gas_init ( me ) + call sfc_init ( me ) + call hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, & + imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & + imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, imp_physics_mg, levr, me, si,& + errflg) + + if ( me == 0 ) then + print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit' + endif + + is_initialized = .true. + + return + end subroutine GFS_rrtmgp_setup_init + + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_setup_run + ! ######################################################################################### !> \section arg_table_GFS_rrtmgp_setup_run !! \htmlinclude GFS_rrtmgp_setup_run.html !! - subroutine GFS_rrtmgp_setup_run (idate, jdate, deltsw, deltim, lsswr, me, & - slag, sdec, cdec, solcon, errmsg, errflg) - - implicit none - - ! interface variables - integer, intent(in) :: idate(:) - integer, intent(in) :: jdate(:) - real(kind=kind_phys), intent(in) :: deltsw - real(kind=kind_phys), intent(in) :: deltim - logical, intent(in) :: lsswr - integer, intent(in) :: me - real(kind=kind_phys), intent(out) :: slag - real(kind=kind_phys), intent(out) :: sdec - real(kind=kind_phys), intent(out) :: cdec - real(kind=kind_phys), intent(out) :: solcon - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Check initialization state - if (.not.is_initialized) then - write(errmsg, fmt='((a))') 'GFS_rrtmgp_setup_run called before GFS_rrtmgp_setup_init' - errflg = 1 - return - end if - - ! Initialize the CCPP error handling variables - errmsg = '' - errflg = 0 + subroutine GFS_rrtmgp_setup_run (idate, jdate, deltsw, deltim, lsswr, me, & + slag, sdec, cdec, solcon, errmsg, errflg) - call radupdate(idate,jdate,deltsw,deltim,lsswr,me, & - slag,sdec,cdec,solcon) - - end subroutine GFS_rrtmgp_setup_run - + ! Inputs + integer, intent(in) :: idate(:) + integer, intent(in) :: jdate(:) + real(kind_phys), intent(in) :: deltsw + real(kind_phys), intent(in) :: deltim + logical, intent(in) :: lsswr + integer, intent(in) :: me + + ! Outputs + real(kind_phys), intent(out) :: slag + real(kind_phys), intent(out) :: sdec + real(kind_phys), intent(out) :: cdec + real(kind_phys), intent(out) :: solcon + character(len=*),intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Locals + integer :: iyear, imon, iday, ihour + integer :: kyear, kmon, kday, khour + logical :: lmon_chg ! month change flag + logical :: lco2_chg ! cntrl flag for updating co2 data + logical :: lsol_chg ! cntrl flag for updating solar constant + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Check initialization state + if (.not.is_initialized) then + write(errmsg, fmt='((a))') 'GFS_rrtmgp_setup_run called before GFS_rrtmgp_setup_init' + errflg = 1 + return + end if + + ! Set up time stamp at fcst time and that for green house gases + iyear = jdate(1) + imon = jdate(2) + iday = jdate(3) + ihour = jdate(5) + + ! Set up time stamp used for green house gases (** currently co2 only) + ! get external data at initial condition time + if ( ictmflg==0 .or. ictmflg==-2 ) then + kyear = idate(1) + kmon = idate(2) + kday = idate(3) + khour = idate(5) + ! get external data at fcst or specified time + else + kyear = iyear + kmon = imon + kday = iday + khour = ihour + endif + + if ( month0 /= imon ) then + lmon_chg = .true. + month0 = imon + else + lmon_chg = .false. + endif + + ! Update solar forcing... + if (lsswr) then + if ( isolar == 0 .or. isolar == 10 ) then + lsol_chg = .false. + elseif ( iyear0 /= iyear ) then + lsol_chg = .true. + else + lsol_chg = ( isolar==4 .and. lmon_chg ) + endif + iyear0 = iyear + call sol_update(jdate, kyear, deltsw, deltim, lsol_chg, me, slag, sdec, cdec, solcon) + endif + + ! Update aerosols... + if ( lmon_chg ) then + call aer_update ( iyear, imon, me ) + endif + + ! Update trace gases (co2 only)... + if ( monthd /= kmon ) then + monthd = kmon + lco2_chg = .true. + else + lco2_chg = .false. + endif + call gas_update (kyear, kmon, kday, khour, loz1st, lco2_chg, me ) + + if ( loz1st ) loz1st = .false. + + return + end subroutine GFS_rrtmgp_setup_run + + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_setup_finalize + ! ######################################################################################### !> \section arg_table_GFS_rrtmgp_setup_finalize !! \htmlinclude GFS_rrtmgp_setup_finalize.html !! - subroutine GFS_rrtmgp_setup_finalize (errmsg, errflg) + subroutine GFS_rrtmgp_setup_finalize (errmsg, errflg) + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 - implicit none - - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Initialize the CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not.is_initialized) return - - ! do finalization stuff if needed - - is_initialized = .false. - - end subroutine GFS_rrtmgp_setup_finalize - - - ! Private functions - - - subroutine radinit(si, NLAY, imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & - imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & - imp_physics_zhao_carr_pdf, imp_physics_mg, iovr, me, errflg ) - !................................... - -! --- inputs: -! & ( si, NLAY, imp_physics, imp_physics_fer_hires, imp_physics_gfdl, & -! & imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & -! & imp_physics_zhao_carr_pdf, imp_physics_mg, me ) -! --- outputs: -! ( errflg ) - -! ================= subprogram documentation block ================ ! -! ! -! subprogram: radinit initialization of radiation calculations ! -! ! -! usage: call radinit ! -! ! -! attributes: ! -! language: fortran 90 ! -! machine: wcoss ! -! ! -! ==================== definition of variables ==================== ! -! ! -! input parameters: ! -! si : model vertical sigma interface ! -! NLAY : number of model vertical layers ! -! imp_physics : MP identifier ! -! me : print control flag ! -! ! -! outputs: (none) ! -! ! -! external module variables: (in module physparam) ! -! isolar : solar constant cntrol flag ! -! = 0: use the old fixed solar constant in "physcon" ! -! =10: use the new fixed solar constant in "physcon" ! -! = 1: use noaa ann-mean tsi tbl abs-scale with cycle apprx! -! = 2: use noaa ann-mean tsi tbl tim-scale with cycle apprx! -! = 3: use cmip5 ann-mean tsi tbl tim-scale with cycl apprx! -! = 4: use cmip5 mon-mean tsi tbl tim-scale with cycl apprx! -! iaerflg : 3-digit aerosol flag (abc for volc, lw, sw) ! -! a:=0 use background stratospheric aerosol ! -! =1 include stratospheric vocanic aeros ! -! b:=0 no topospheric aerosol in lw radiation ! -! =1 compute tropspheric aero in 1 broad band for lw ! -! =2 compute tropspheric aero in multi bands for lw ! -! c:=0 no topospheric aerosol in sw radiation ! -! =1 include tropspheric aerosols for sw ! -! ico2flg : co2 data source control flag ! -! =0: use prescribed global mean co2 (old oper) ! -! =1: use observed co2 annual mean value only ! -! =2: use obs co2 monthly data with 2-d variation ! -! ictmflg : =yyyy#, external data ic time/date control flag ! -! = -2: same as 0, but superimpose seasonal cycle ! -! from climatology data set. ! -! = -1: use user provided external data for the ! -! forecast time, no extrapolation. ! -! = 0: use data at initial cond time, if not ! -! available, use latest, no extrapolation. ! -! = 1: use data at the forecast time, if not ! -! available, use latest and extrapolation. ! -! =yyyy0: use yyyy data for the forecast time, ! -! no further data extrapolation. ! -! =yyyy1: use yyyy data for the fcst. if needed, do ! -! extrapolation to match the fcst time. ! -! ioznflg : ozone data source control flag ! -! =0: use climatological ozone profile ! -! =1: use interactive ozone profile ! -! ialbflg : albedo scheme control flag ! -! =0: climatology, based on surface veg types ! -! =1: modis retrieval based surface albedo scheme ! -! iemsflg : emissivity scheme cntrl flag (ab 2-digit integer) ! -! a:=0 set sfc air/ground t same for lw radiation ! -! =1 set sfc air/ground t diff for lw radiation ! -! b:=0 use fixed sfc emissivity=1.0 (black-body) ! -! =1 use varying climtology sfc emiss (veg based) ! -! =2 future development (not yet) ! -! icldflg : cloud optical property scheme control flag ! -! =0: use diagnostic cloud scheme ! -! =1: use prognostic cloud scheme (default) ! -! imp_physics : cloud microphysics scheme control flag ! -! =99 zhao/carr/sundqvist microphysics scheme ! -! =98 zhao/carr/sundqvist microphysics+pdf cloud&cnvc,cnvw ! -! =11 GFDL cloud microphysics ! -! =8 Thompson microphysics scheme ! -! =6 WSM6 microphysics scheme ! -! =10 MG microphysics scheme ! -! isubcsw : sub-column cloud approx control flag in sw radiation ! -! isubclw : sub-column cloud approx control flag in lw radiation ! -! =0: with out sub-column cloud approximation ! -! =1: mcica sub-col approx. prescribed random seed ! -! =2: mcica sub-col approx. provided random seed ! -! lcrick : control flag for eliminating CRICK ! -! =t: apply layer smoothing to eliminate CRICK ! -! =f: do not apply layer smoothing ! -! lcnorm : control flag for in-cld condensate ! -! =t: normalize cloud condensate ! -! =f: not normalize cloud condensate ! -! lnoprec : precip effect in radiation flag (ferrier microphysics) ! -! =t: snow/rain has no impact on radiation ! -! =f: snow/rain has impact on radiation ! -! ivflip : vertical index direction control flag ! -! =0: index from toa to surface ! -! =1: index from surface to toa ! -! ! -! subroutines called: sol_init, aer_init, gas_init, cld_init, ! -! sfc_init, rlwinit, rswinit ! -! ! -! usage: call radinit ! -! ! -! =================================================================== ! -! - - use module_radiation_astronomy, only : sol_init - use module_radiation_aerosols, only : aer_init - use module_radiation_gases, only : gas_init - use module_radiation_surface, only : sfc_init - use GFS_cloud_diagnostics, only : hml_cloud_diagnostics_initialize - - implicit none - -! --- inputs: - integer, intent(in) :: & - iovr, & ! - imp_physics, & ! Flag for MP scheme - imp_physics_fer_hires, & ! Flag for fer-hires scheme - imp_physics_gfdl, & ! Flag for gfdl scheme - imp_physics_thompson, & ! Flag for thompsonscheme - imp_physics_wsm6, & ! Flag for wsm6 scheme - imp_physics_zhao_carr, & ! Flag for zhao-carr scheme - imp_physics_zhao_carr_pdf, & ! Flag for zhao-carr+PDF scheme - imp_physics_mg ! Flag for MG scheme - integer, intent(in) :: NLAY, me - real (kind=kind_phys), intent(in) :: si(:) - -! --- outputs: (none, to module variables) - integer, intent(out) :: & - errflg - -! --- locals: - - ! Initialize - errflg = 0 -! -!===> ... begin here -! -!> -# Set up control variables and external module variables in -!! module physparam -#if 0 - ! GFS_radiation_driver.F90 may in the future initialize air/ground - ! temperature differently; however, this is not used at the moment - ! and as such we avoid the difficulty of dealing with exchanging - ! itsfc between GFS_rrtmgp_setup and a yet-to-be-created/-used - ! interstitial routine (or GFS_radiation_driver.F90) - itsfc = iemsflg / 10 ! sfc air/ground temp control -#endif - loz1st = (ioznflg == 0) ! first-time clim ozone data read flag - month0 = 0 - iyear0 = 0 - monthd = 0 - - if (me == 0) then -! print *,' NEW RADIATION PROGRAM STRUCTURES -- SEP 01 2004' - print *,' NEW RADIATION PROGRAM STRUCTURES BECAME OPER. ', & - & ' May 01 2007' - print *, VTAGRAD !print out version tag - print *,' - Selected Control Flag settings: ICTMflg=',ictmflg, & - & ' ISOLar =',isolar, ' ICO2flg=',ico2flg,' IAERflg=',iaerflg, & - & ' IALBflg=',ialbflg,' IEMSflg=',iemsflg,' ICLDflg=',icldflg, & - & ' IMP_PHYSICS=',imp_physics,' IOZNflg=',ioznflg - print *,' IVFLIP=',ivflip,' IOVR=',iovr, & - & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw - print *,' LCRICK=',lcrick,' LCNORM=',lcnorm,' LNOPREC=',lnoprec - - if ( ictmflg==0 .or. ictmflg==-2 ) then - print *,' Data usage is limited by initial condition!' - print *,' No volcanic aerosols' - endif - - if ( isubclw == 0 ) then - print *,' - ISUBCLW=',isubclw,' No McICA, use grid ', & - & 'averaged cloud in LW radiation' - elseif ( isubclw == 1 ) then - print *,' - ISUBCLW=',isubclw,' Use McICA with fixed ', & - & 'permutation seeds for LW random number generator' - elseif ( isubclw == 2 ) then - print *,' - ISUBCLW=',isubclw,' Use McICA with random ', & - & 'permutation seeds for LW random number generator' - else - print *,' - ERROR!!! ISUBCLW=',isubclw,' is not a ', & - & 'valid option ' - stop - endif - - if ( isubcsw == 0 ) then - print *,' - ISUBCSW=',isubcsw,' No McICA, use grid ', & - & 'averaged cloud in SW radiation' - elseif ( isubcsw == 1 ) then - print *,' - ISUBCSW=',isubcsw,' Use McICA with fixed ', & - & 'permutation seeds for SW random number generator' - elseif ( isubcsw == 2 ) then - print *,' - ISUBCSW=',isubcsw,' Use McICA with random ', & - & 'permutation seeds for SW random number generator' - else - print *,' - ERROR!!! ISUBCSW=',isubcsw,' is not a ', & - & 'valid option ' - stop - endif - - if ( isubcsw /= isubclw ) then - print *,' - *** Notice *** ISUBCSW /= ISUBCLW !!!', & - & isubcsw, isubclw - endif - endif - - ! Initialization - - call sol_init ( me ) ! --- ... astronomy initialization routine - call aer_init ( NLAY, me ) ! --- ... aerosols initialization routine - call gas_init ( me ) ! --- ... co2 and other gases initialization routine - call sfc_init ( me ) ! --- ... surface initialization routine - call hml_cloud_diagnostics_initialize(imp_physics, imp_physics_fer_hires, & - imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & - imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, imp_physics_mg, NLAY, me, si,& - errflg) - - return - !................................... - end subroutine radinit - !----------------------------------- - -!> This subroutine checks and updates time sensitive data used by -!! radiation computations. This subroutine needs to be placed inside -!! the time advancement loop but outside of the horizontal grid loop. -!! It is invoked at radiation calling frequncy but before any actual -!! radiative transfer computations. -!! \param idate NCEP absolute date and time of intial condition -!! (year,month,day,time-zone,hour,minute,second, -!! mil-second) -!! \param jdate NCEP absolute date and time at forecast time -!! (year,month,day,time-zone,hour,minute,second, -!! mil-second) -!! \param deltsw SW radiation calling time interval in seconds -!! \param deltim model advancing time-step duration in seconds -!! \param lsswr logical control flag for SW radiation calculations -!! \param me print control flag -!! \param slag equation of time in radians -!! \param sdec,cdec sine and cosine of the solar declination angle -!! \param solcon solar constant adjusted by sun-earth distance \f$(W/m^2)\f$ -!> \section gen_radupdate General Algorithm -!> @{ -!----------------------------------- - subroutine radupdate( idate,jdate,deltsw,deltim,lsswr, me, & - & slag,sdec,cdec,solcon) -!................................... - -! ================= subprogram documentation block ================ ! -! ! -! subprogram: radupdate calls many update subroutines to check and ! -! update radiation required but time varying data sets and module ! -! variables. ! -! ! -! usage: call radupdate ! -! ! -! attributes: ! -! language: fortran 90 ! -! machine: ibm sp ! -! ! -! ==================== definition of variables ==================== ! -! ! -! input parameters: ! -! idate(8) : ncep absolute date and time of initial condition ! -! (yr, mon, day, t-zone, hr, min, sec, mil-sec) ! -! jdate(8) : ncep absolute date and time at fcst time ! -! (yr, mon, day, t-zone, hr, min, sec, mil-sec) ! -! deltsw : sw radiation calling frequency in seconds ! -! deltim : model timestep in seconds ! -! lsswr : logical flags for sw radiation calculations ! -! me : print control flag ! -! ! -! outputs: ! -! slag : equation of time in radians ! -! sdec, cdec : sin and cos of the solar declination angle ! -! solcon : sun-earth distance adjusted solar constant (w/m2) ! -! ! -! external module variables: ! -! isolar : solar constant cntrl (in module physparam) ! -! = 0: use the old fixed solar constant in "physcon" ! -! =10: use the new fixed solar constant in "physcon" ! -! = 1: use noaa ann-mean tsi tbl abs-scale with cycle apprx! -! = 2: use noaa ann-mean tsi tbl tim-scale with cycle apprx! -! = 3: use cmip5 ann-mean tsi tbl tim-scale with cycl apprx! -! = 4: use cmip5 mon-mean tsi tbl tim-scale with cycl apprx! -! ictmflg : =yyyy#, external data ic time/date control flag ! -! = -2: same as 0, but superimpose seasonal cycle ! -! from climatology data set. ! -! = -1: use user provided external data for the ! -! forecast time, no extrapolation. ! -! = 0: use data at initial cond time, if not ! -! available, use latest, no extrapolation. ! -! = 1: use data at the forecast time, if not ! -! available, use latest and extrapolation. ! -! =yyyy0: use yyyy data for the forecast time, ! -! no further data extrapolation. ! -! =yyyy1: use yyyy data for the fcst. if needed, do ! -! extrapolation to match the fcst time. ! -! ! -! module variables: ! -! loz1st : first-time clim ozone data read flag ! -! ! -! subroutines called: sol_update, aer_update, gas_update ! -! ! -! =================================================================== ! -! - use module_radiation_astronomy, only : sol_update - use module_radiation_aerosols, only : aer_update - use module_radiation_gases, only : gas_update - - implicit none - -! --- inputs: - integer, intent(in) :: idate(:), jdate(:), me - logical, intent(in) :: lsswr - - real (kind=kind_phys), intent(in) :: deltsw, deltim - -! --- outputs: - real (kind=kind_phys), intent(out) :: slag, sdec, cdec, solcon - -! --- locals: - integer :: iyear, imon, iday, ihour - integer :: kyear, kmon, kday, khour - - logical :: lmon_chg ! month change flag - logical :: lco2_chg ! cntrl flag for updating co2 data - logical :: lsol_chg ! cntrl flag for updating solar constant -! -!===> ... begin here -! -!> -# Set up time stamp at fcst time and that for green house gases -!! (currently co2 only) -! --- ... time stamp at fcst time - - iyear = jdate(1) - imon = jdate(2) - iday = jdate(3) - ihour = jdate(5) - -! --- ... set up time stamp used for green house gases (** currently co2 only) - - if ( ictmflg==0 .or. ictmflg==-2 ) then ! get external data at initial condition time - kyear = idate(1) - kmon = idate(2) - kday = idate(3) - khour = idate(5) - else ! get external data at fcst or specified time - kyear = iyear - kmon = imon - kday = iday - khour = ihour - endif ! end if_ictmflg_block - - if ( month0 /= imon ) then - lmon_chg = .true. - month0 = imon - else - lmon_chg = .false. - endif - -!> -# Call module_radiation_astronomy::sol_update(), yearly update, no -!! time interpolation. - if (lsswr) then - - if ( isolar == 0 .or. isolar == 10 ) then - lsol_chg = .false. - elseif ( iyear0 /= iyear ) then - lsol_chg = .true. - else - lsol_chg = ( isolar==4 .and. lmon_chg ) - endif - iyear0 = iyear - - call sol_update & -! --- inputs: - & ( jdate,kyear,deltsw,deltim,lsol_chg, me, & -! --- outputs: - & slag,sdec,cdec,solcon & - & ) - - endif ! end_if_lsswr_block - -!> -# Call module_radiation_aerosols::aer_update(), monthly update, no -!! time interpolation - if ( lmon_chg ) then - call aer_update ( iyear, imon, me ) - endif - -!> -# Call co2 and other gases update routine: -!! module_radiation_gases::gas_update() - if ( monthd /= kmon ) then - monthd = kmon - lco2_chg = .true. - else - lco2_chg = .false. - endif - - call gas_update ( kyear,kmon,kday,khour,loz1st,lco2_chg, me ) - - if ( loz1st ) loz1st = .false. - -!> -# Call surface update routine (currently not needed) -! call sfc_update ( iyear, imon, me ) - -!> -# Call clouds update routine (currently not needed) -! call cld_update ( iyear, imon, me ) -! - return -!................................... - end subroutine radupdate -!----------------------------------- - -!! @} + if (.not.is_initialized) return + + ! do finalization stuff if needed + is_initialized = .false. + + end subroutine GFS_rrtmgp_setup_finalize end module GFS_rrtmgp_setup diff --git a/physics/rrtmg_lw_cloud_optics.F90 b/physics/rrtmg_lw_cloud_optics.F90 index ad4d06e5f..02f32096a 100644 --- a/physics/rrtmg_lw_cloud_optics.F90 +++ b/physics/rrtmg_lw_cloud_optics.F90 @@ -1,6 +1,5 @@ module mo_rrtmg_lw_cloud_optics use machine, only: kind_phys - use physparam, only: ilwcliq, ilwcice use mersenne_twister, only: random_setseed, random_number, random_stat implicit none @@ -554,13 +553,15 @@ module mo_rrtmg_lw_cloud_optics ! subroutine rrtmg_lw_cloud_optics ! ####################################################################################### subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & - cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, tau_cld, & - tau_precip) + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, ilwcliq, & + ilwcice, tau_cld, tau_precip) ! Inputs integer,intent(in) :: & nBandsLW, & ! Number of spectral bands ncol, & ! Number of horizontal gridpoints - nlay ! Number of vertical layers + nlay, & ! Number of vertical layers + ilwcliq, & ! + ilwcice real(kind_phys), dimension(ncol,nlay), intent(in) :: & cld_frac, & ! Cloud-fraction (1) cld_lwp, & ! Cloud liquid water path (g/m2) diff --git a/physics/rrtmg_sw_cloud_optics.F90 b/physics/rrtmg_sw_cloud_optics.F90 index 452ab2070..01cab76e2 100644 --- a/physics/rrtmg_sw_cloud_optics.F90 +++ b/physics/rrtmg_sw_cloud_optics.F90 @@ -1,6 +1,5 @@ module mo_rrtmg_sw_cloud_optics use machine, only: kind_phys - use physparam, only: iswcliq, iswcice use mersenne_twister, only: random_setseed, random_number, random_stat implicit none @@ -2044,13 +2043,15 @@ module mo_rrtmg_sw_cloud_optics ! rrtmg_sw_cloud_optics ! ######################################################################################### subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld_iwp, & - cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, & - tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip) + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, iswcliq, & + iswcice, tau_cld, ssa_cld, asy_cld, tau_precip, ssa_precip, asy_precip) ! Inputs integer,intent(in) :: & nBandsSW, & ! Number of spectral bands ncol, & ! Number of horizontal gridpoints - nlay ! Number of vertical layers + nlay, & ! Number of vertical layers + iswcliq, & ! + iswcice ! real(kind_phys), dimension(ncol,nlay), intent(in) :: & cld_frac, & ! Cloud-fraction (1) cld_lwp, & ! Cloud liquid water path (g/m2) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 93e38994b..f45f08dd1 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -270,11 +270,11 @@ end subroutine rrtmgp_lw_cloud_optics_init !! \section arg_table_rrtmgp_lw_cloud_optics_run !! \htmlinclude rrtmgp_lw_cloud_optics.html !! - subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PADE, & - doGP_cldoptics_LUT, nCol, nLev, nrghice, p_lay, cld_frac, cld_lwp, cld_reliq, & - cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, precip_frac, & - lw_cloud_props, lw_gas_props, lon, lat, cldtaulw, lw_optical_props_cloudsByBand, & - lw_optical_props_precipByBand, errmsg, errflg) + subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw, & + doGP_cldoptics_PADE, doGP_cldoptics_LUT, nCol, nLev, nrghice, p_lay, cld_frac, & + cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & + precip_frac, lw_cloud_props, lw_gas_props, lon, lat, cldtaulw, & + lw_optical_props_cloudsByBand, lw_optical_props_precipByBand, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -285,7 +285,9 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PAD integer, intent(in) :: & nCol, & ! Number of horizontal gridpoints nLev, & ! Number of vertical levels - nrghice ! Number of ice-roughness categories + nrghice, & ! Number of ice-roughness categories + icliq_lw, & ! Choice of treatment of liquid cloud optical properties (RRTMG legacy) + icice_lw ! Choice of treatment of ice cloud optical properties (RRTMG legacy) real(kind_phys), dimension(nCol), intent(in) :: & lon, & ! Longitude lat ! Latitude @@ -378,7 +380,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, doGP_cldoptics_PAD if (any(cld_frac .gt. 0)) then call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & - cld_frac, tau_cld, tau_precip) + cld_frac, icliq_lw, icice_lw, tau_cld, tau_precip) endif lw_optical_props_cloudsByBand%tau = tau_cld lw_optical_props_precipByBand%tau = tau_precip diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index d6575fa14..809e8abf0 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -127,6 +127,22 @@ type = logical intent = in optional = F +[icliq_lw] + standard_name = flag_for_optical_property_for_liquid_clouds_for_longwave_radiation + long_name = lw optical property for liquid clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[icice_lw] + standard_name = flag_for_optical_property_for_ice_clouds_for_longwave_radiation + long_name = lw optical property for ice clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F [doGP_cldoptics_PADE] standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE long_name = logical flag to control cloud optics scheme. diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 00418edec..d95dbf8c1 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -140,13 +140,11 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, rng3D(:,iLay,iCol) = rng1D enddo endif -! call random_number(rng1D,rng_stat) -! rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo ! Cloud-overlap. - ! Maximum-random - if (iovr == iovr_maxrand .or. iovr == iovr_rand) then + ! Maximum-random, random or maximum. + if (iovr == iovr_maxrand .or. iovr == iovr_rand .or. iovr == iovr_max) then call sampled_mask(rng3D, cld_frac, cldfracMCICA) endif ! Exponential decorrelation length overlap @@ -167,7 +165,9 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, overlap_param = cloud_overlap_param(:,1:nLev-1)) endif + ! ! Sampling. Map band optical depth to each g-point using McICA + ! call check_error_msg('rrtmgp_lw_cloud_sampling_run_draw_samples',& draw_samples(cldfracMCICA, & lw_optical_props_cloudsByBand, & @@ -202,11 +202,11 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, !enddo ! Precipitation overlap. - ! Maximum-random - if (iovr == iovr_maxrand) then + ! Maximum-random, random or maximum. + if (iovr == iovr_maxrand .or. iovr == iovr_rand .or. iovr == iovr_max) then call sampled_mask(rng3D, precip_frac, precipfracSAMP) endif - ! Exponential decorrelation length overlap + ! Exponential decorrelation length overlap if (iovr == iovr_dcorr) then ! No need to call RNG second time for now, just use the same seeds for precip as clouds. !! Generate second RNG @@ -225,8 +225,9 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, overlap_param = precip_overlap_param(:,1:nLev-1)) endif - + ! ! Sampling. Map band optical depth to each g-point using McICA + ! call check_error_msg('rrtmgp_lw_precip_sampling_run_draw_samples',& draw_samples(precipfracSAMP, & lw_optical_props_precipByBand, & diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index e1b8fec33..505fe7853 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -286,10 +286,10 @@ end subroutine rrtmgp_sw_cloud_optics_init !! \section arg_table_rrtmgp_sw_cloud_optics_run !! \htmlinclude rrtmgp_sw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PADE, & - doGP_cldoptics_LUT, nCol, nLev, nDay, idxday, nrghice, cld_frac, cld_lwp, cld_reliq, & - cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, precip_frac, & - sw_cloud_props, sw_gas_props, sw_optical_props_cloudsByBand, & + subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, icliq_sw, icice_sw, & + doGP_cldoptics_PADE, doGP_cldoptics_LUT, nCol, nLev, nDay, idxday, nrghice, cld_frac,& + cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & + precip_frac, sw_cloud_props, sw_gas_props, sw_optical_props_cloudsByBand, & sw_optical_props_precipByBand, cldtausw, errmsg, errflg) ! Inputs @@ -302,7 +302,9 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD nCol, & ! Number of horizontal gridpoints nLev, & ! Number of vertical levels nday, & ! Number of daylit points. - nrghice ! Number of ice-roughness categories + nrghice, & ! Number of ice-roughness categories + icliq_sw, & ! Choice of treatment of liquid cloud optical properties (RRTMG legacy) + icice_sw ! Choice of treatment of ice cloud optical properties (RRTMG legacy) integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. real(kind_phys), dimension(ncol,nLev),intent(in) :: & @@ -416,7 +418,7 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, doG_cldoptics, doGP_cldoptics_PAD cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & - cld_frac(idxday(1:nday),:), & + cld_frac(idxday(1:nday),:), icliq_sw, icice_sw, & tau_cld, ssa_cld, asy_cld, & tau_precip, ssa_precip, asy_precip) diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 0251120d3..4439a607b 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -143,6 +143,22 @@ type = logical intent = in optional = F +[icliq_sw] + standard_name = flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation + long_name = sw optical property for liquid clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[icice_sw] + standard_name = flag_for_optical_property_for_ice_clouds_for_shortwave_radiation + long_name = sw optical property for ice clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F [doGP_cldoptics_PADE] standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE long_name = logical flag to control cloud optics scheme. diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index b437be5bd..396e65671 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -139,8 +139,8 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd enddo ! Cloud overlap. - ! Maximum-random overlap - if (iovr == iovr_maxrand) then + ! Maximum-random, random, or maximum cloud overlap + if (iovr == iovr_maxrand .or. iovr == iovr_max .or. iovr == iovr_rand) then call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA) endif ! Decorrelation-length overlap @@ -154,13 +154,15 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd overlap_param = cloud_overlap_param(idxday(1:nDay),1:nLev-1),& randoms2 = rng3D2) endif - ! Exponential overlap + ! Exponential or exponential-random cloud overlap if (iovr == iovr_exp .or. iovr == iovr_exprand) then call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA, & overlap_param = cloud_overlap_param(idxday(1:nDay),1:nLev-1)) endif - + + ! ! Sampling. Map band optical depth to each g-point using McICA + ! call check_error_msg('rrtmgp_sw_cloud_sampling_run_draw_samples', & draw_samples(cldfracMCICA, & sw_optical_props_cloudsByBand, & @@ -195,11 +197,11 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd !enddo ! Precipitation overlap - ! Maximum-random - if (iovr == iovr_maxrand) then + ! Maximum-random, random or maximum precipitation overlap + if (iovr == iovr_maxrand .or. iovr == iovr_max .or. iovr == iovr_rand) then call sampled_mask(rng3D, precip_frac(idxday(1:nDay),:), precipfracSAMP) endif - ! Exponential decorrelation length overlap + ! Exponential decorrelation length overlap if (iovr == iovr_dcorr) then !! Generate second RNG !do iday=1,nday @@ -216,7 +218,9 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd overlap_param = precip_overlap_param(idxday(1:nDay),1:nLev-1)) endif - ! Map band optical depth to each g-point using McICA + ! + ! Sampling. Map band optical depth to each g-point using McICA + ! call check_error_msg('rrtmgp_sw_precip_sampling_run_draw_samples', & draw_samples(precipfracSAMP, & sw_optical_props_precipByBand, & From e7b4531d5fa5d0aae4ec4f96105354c3ffb68df2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 3 Nov 2020 07:25:36 -0700 Subject: [PATCH 396/404] physics/GFS_surface_composites.F90: update tsfc correctly when there is ice on open water grid points --- physics/GFS_surface_composites.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index b3000b008..cc61662d2 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -547,6 +547,7 @@ subroutine GFS_surface_composites_post_run ( if (.not. flag_cice(i)) then tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) zorl(i) = cice(i) * zorl_ice(i) + (one - cice(i)) * zorl_wat(i) + tsfc(i) = tsfc_ice(i) elseif (wet(i)) then if (cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice txi = cice(i) From 0d22b36916930503fc5febbc18ea04bff19dc49a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 6 Nov 2020 01:32:10 +0000 Subject: [PATCH 397/404] Synced with NCAR master --- physics/radiation_clouds.f | 1 - physics/radlw_main.F90 | 24 ++++++++++++------------ physics/radsw_main.F90 | 16 ++++++++-------- physics/rrtmgp_lw_cloud_sampling.meta | 4 ++-- physics/rrtmgp_sw_cloud_sampling.meta | 4 ++-- 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 4a83c040e..056bede28 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -4554,7 +4554,6 @@ SUBROUTINE adjust_cloudFinal(cfr, qc, qi, Rho,dz, kts,kte,k_tropo) END SUBROUTINE adjust_cloudFinal ! ->>>>>>> c95a1ae3a8ce59cb09f9383557688a59d462d103 !........................................! end module module_radiation_clouds ! !! @} diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index d2a4fa72b..f2c3ee034 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -852,7 +852,7 @@ subroutine rrtmg_lw_run & if (iovr == 3) delgth= de_lgth(iplon) ! clouds decorr-length ! mz*: HWRF - if (iovrlw == 4 ) then + if (iovr == 4 ) then !Add layer height needed for exponential (icld=4) and ! exponential-random (icld=5) overlap options @@ -876,7 +876,7 @@ subroutine rrtmg_lw_run & enddo enddo - call mcica_subcol_lw(1, iplon, nlay, iovrlw, permuteseed, & + call mcica_subcol_lw(1, iplon, nlay, iovr, permuteseed, & & irng, plyr, hgt, & & cld_cf, cld_iwp, cld_lwp,cld_swp, & & cld_ref_ice, cld_ref_liq, & @@ -989,7 +989,7 @@ subroutine rrtmg_lw_run & cda4(k) = cld_ref_snow(iplon,k1) enddo ! HWRF RRMTG - if (iovrlw == 4) then !mz HWRF + if (iovr == 4) then !mz HWRF do k = 1, nlay k1 = nlp1 - k do ig = 1, ngptlw @@ -1112,7 +1112,7 @@ subroutine rrtmg_lw_run & cda3(k) = cld_swp(iplon,k) cda4(k) = cld_ref_snow(iplon,k) enddo - if (iovrlw == 4) then + if (iovr == 4) then !mz* Move incoming GCM cloud arrays to RRTMG cloud arrays. !For GCM input, incoming reicmcl is defined based on selected !ice parameterization (inflglw) @@ -1206,7 +1206,7 @@ subroutine rrtmg_lw_run & if ( lcf1 ) then !mz* for HWRF, save cldfmc with mcica - if (iovrlw == 4) then + if (iovr == 4) then do k = 1, nlay do ig = 1, ngptlw cldfmc_save(ig,k)=cldfmc (ig,k) @@ -1217,12 +1217,12 @@ subroutine rrtmg_lw_run & call cldprop & ! --- inputs: & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & - & nlay, nlp1, ipseed(iplon), dz, delgth, iovrlw, alph, & + & nlay, nlp1, ipseed(iplon), dz, delgth, iovr, alph, & ! --- outputs: & cldfmc, taucld & & ) - if (iovrlw == 4) then + if (iovr == 4) then !mz for HWRF, still using mcica cldfmc do k = 1, nlay do ig = 1, ngptlw @@ -1251,7 +1251,7 @@ subroutine rrtmg_lw_run & endif !mz* HWRF: calculate taucmc with mcica - if (iovrlw == 4) then + if (iovr == 4) then call cldprmc(nlay, inflglw, iceflglw, liqflglw, & & cldfmc, ciwpmc, & & clwpmc, cswpmc, reicmc, relqmc, resnmc, & @@ -1713,7 +1713,7 @@ end subroutine rlwinit !> @{ subroutine cldprop & & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & ! --- inputs - & nlay, nlp1, ipseed, dz, de_lgth, iovrlw, alpha, & + & nlay, nlp1, ipseed, dz, de_lgth, iovr, alpha, & & cldfmc, taucld & ! --- outputs & ) @@ -1814,7 +1814,7 @@ subroutine cldprop & use module_radlw_cldprlw ! --- inputs: - integer, intent(in) :: nlay, nlp1, ipseed, iovrlw + integer, intent(in) :: nlay, nlp1, ipseed, iovr real (kind=kind_phys), dimension(0:nlp1), intent(in) :: cfrac real (kind=kind_phys), dimension(nlay), intent(in) :: cliqp, & @@ -1994,7 +1994,7 @@ subroutine cldprop & ! --- ... call sub-column cloud generator !mz* - if (iovrlw .ne. 4) then + if (iovr .ne. 4) then call mcica_subcol & ! --- inputs: & ( cldf, nlay, ipseed, dz, de_lgth, alpha, & @@ -2011,7 +2011,7 @@ subroutine cldprop & endif enddo enddo - endif !iovrlw + endif !iovr endif ! end if_isubclw_block diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index 60119e4a8..a63b7060c 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -982,7 +982,7 @@ subroutine rrtmg_sw_run & ! mz*: HWRF - if (iovrsw == 4 ) then + if (iovr == 4 ) then !Add layer height needed for exponential (icld=4) and @@ -993,7 +993,7 @@ subroutine rrtmg_sw_run & permuteseed = 1 !mz* Derive height of each layer mid-point from layer thickness. -! Needed for exponential (iovrsw=4) and exponential-random overlap +! Needed for exponential (iovr=4) and exponential-random overlap ! option (iovr=5)only. dzsum =0.0 do k = 1,nlay @@ -1012,7 +1012,7 @@ subroutine rrtmg_sw_run & enddo enddo - call mcica_subcol_sw (1, 1, nlay, iovrsw, permuteseed, & + call mcica_subcol_sw (1, 1, nlay, iovr, permuteseed, & & irng, plyr(j1:j1,:), hgt(j1:j1,:), & & cld_cf(j1:j1,:), cld_iwp(j1:j1,:), cld_lwp(j1:j1,:), & & cld_swp(j1:j1,:), cld_ref_ice(j1:j1,:), cld_ref_liq(j1:j1,:), & @@ -1111,7 +1111,7 @@ subroutine rrtmg_sw_run & cdat3(k) = cld_swp(j1,kk) ! cloud snow path cdat4(k) = cld_ref_snow(j1,kk) ! snow partical effctive radius enddo - if (iovrsw == 4) then !mz* HWRF + if (iovr == 4) then !mz* HWRF do k = 1, nlay kk = nlp1 - k do ig = 1, ngptsw @@ -1226,7 +1226,7 @@ subroutine rrtmg_sw_run & cdat3(k) = cld_swp(j1,k) ! cloud snow path cdat4(k) = cld_ref_snow(j1,k) ! snow partical effctive radius enddo - if (iovrsw == 4) then !mz* HWRF + if (iovr == 4) then !mz* HWRF !mz* Move incoming GCM cloud arrays to RRTMG cloud arrays. !For GCM input, incoming reicmcl is defined based on selected !ice parameterization (inflglw) @@ -1299,7 +1299,7 @@ subroutine rrtmg_sw_run & if (zcf1 > f_zero) then ! cloudy sky column !mz* for HWRF, save cldfmc with mcica - if (iovrsw == 4) then + if (iovr == 4) then do k = 1, nlay do ig = 1, ngptsw cldfmc_save(k,ig)=cldfmc (k,ig) @@ -1315,7 +1315,7 @@ subroutine rrtmg_sw_run & & taucw, ssacw, asycw, cldfrc, cldfmc & & ) - if (iovrsw == 4) then + if (iovr == 4) then !mz for HWRF, still using mcica cldfmc do k = 1, nlay do ig = 1, ngptsw @@ -2116,7 +2116,7 @@ subroutine cldprop & !> -# if physparam::isubcsw > 0, call mcica_subcol() to distribute !! cloud properties to each g-point. - if ( isubcsw > 0 .and. iovrsw /= 4 ) then ! mcica sub-col clouds approx + if ( isubcsw > 0 .and. iovr /= 4 ) then ! mcica sub-col clouds approx cldf(:) = cfrac(:) where (cldf(:) < ftiny) diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 7acc6a7d3..54f3c63af 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -70,8 +70,8 @@ intent = in optional = F [isubc_lw] - standard_name = flag_for_lw_clouds_without_sub_grid_approximation - long_name = flag for lw clouds without sub-grid approximation + standard_name = flag_for_lw_clouds_sub_grid_approximation + long_name = flag for lw clouds sub-grid approximation units = flag dimensions = () type = integer diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index fded88bbb..01a311fd4 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -78,8 +78,8 @@ intent = in optional = F [isubc_sw] - standard_name = flag_for_sw_clouds_without_sub_grid_approximation - long_name = flag for sw clouds without sub-grid approximation + standard_name = flag_for_sw_clouds_grid_approximation + long_name = flag for sw clouds sub-grid approximation units = flag dimensions = () type = integer From 7cef35e03a42f3fd797a10dd1dfa8a482a1f636d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 10 Nov 2020 17:09:50 +0000 Subject: [PATCH 398/404] Removed redundant importing of kind_phys --- physics/radlw_main.F90 | 3 +-- physics/radsw_main.F90 | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index f2c3ee034..de8d9e973 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -279,8 +279,7 @@ module rrtmg_lw ! use physparam, only : ilwrate, ilwrgas, ilwcliq, ilwcice, & - & isubclw, icldflg, iovr, ivflip, & - & kind_phys + & isubclw, icldflg, iovr, ivflip use physcons, only : con_g, con_cp, con_avgd, con_amd, & & con_amw, con_amo3 use mersenne_twister, only : random_setseed, random_number, & diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index a63b7060c..8ebbb3ab1 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -306,7 +306,7 @@ module rrtmg_sw ! use physparam, only : iswrate, iswrgas, iswcliq, iswcice, & & isubcsw, icldflg, iovr, ivflip, & - & iswmode, kind_phys + & iswmode use physcons, only : con_g, con_cp, con_avgd, con_amd, & & con_amw, con_amo3 use machine, only : rb => kind_phys, im => kind_io4, & From 53619d892b8a9e92e8d5f02689170ebcb94c5776 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 10 Nov 2020 21:59:21 +0000 Subject: [PATCH 399/404] add units to index_for_diagnostic_printout metadata --- physics/GFS_time_vary_pre.scm.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_time_vary_pre.scm.meta b/physics/GFS_time_vary_pre.scm.meta index 98d0d3b63..6241e29f1 100644 --- a/physics/GFS_time_vary_pre.scm.meta +++ b/physics/GFS_time_vary_pre.scm.meta @@ -212,7 +212,7 @@ [ipt] standard_name = index_for_diagnostic_printout long_name = horizontal index for point used for diagnostic printout - units = + units = index dimensions = () type = integer intent = out From 0ecf50b8fce366410d39f40be727460c45b2dd23 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 12 Nov 2020 18:00:23 +0000 Subject: [PATCH 400/404] Bugfix in GP sampling routines. --- physics/rrtmgp_lw_cloud_sampling.F90 | 7 ++++--- physics/rrtmgp_sw_cloud_sampling.F90 | 27 ++++++++++++++++++++++----- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index d95dbf8c1..cfb86eb3a 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -96,7 +96,8 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, integer,dimension(ncol) :: ipseed_lw type(random_stat) :: rng_stat real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D,rng3D2 - real(kind_phys), dimension(lw_gas_props%get_ngpt()*nLev) :: rng1D + real(kind_phys), dimension(lw_gas_props%get_ngpt()) :: rng1D + real(kind_phys), dimension(lw_gas_props%get_ngpt()*nLev) :: rng2D logical, dimension(ncol,nLev,lw_gas_props%get_ngpt()) :: cldfracMCICA,precipfracSAMP ! Initialize CCPP error handling variables @@ -152,8 +153,8 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Generate second RNG do iCol=1,ncol call random_setseed(ipseed_lw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D2(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + call random_number(rng2D,rng_stat) + rng3D2(:,:,iCol) = reshape(source = rng2D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo call sampled_mask(rng3D, cld_frac, cldfracMCICA, & overlap_param = cloud_overlap_param(:,1:nLev-1), & diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 396e65671..ba4097e96 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -99,7 +99,8 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd type(random_stat) :: rng_stat real(kind_phys) :: tauloc,asyloc,ssaloc real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,nday) :: rng3D,rng3D2 - real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng1D + real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng2D + real(kind_phys), dimension(sw_gas_props%get_ngpt()) :: rng1D logical, dimension(nday,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA,precipfracSAMP ! Initialize CCPP error handling variables @@ -134,8 +135,24 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd ! and layers. ([nGpts,nLev,nDayumn]-> [nGpts*nLev]*nDayumn) do iday=1,nday call random_setseed(ipseed_sw(iday),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + ! Use same rng for each layer + if (iovr == iovr_max) then + call random_number(rng1D,rng_stat) + do iLay=1,nLev + rng3D(:,iLay,iday) = rng1D + enddo + else + do iLay=1,nLev + call random_number(rng1D,rng_stat) + rng3D(:,iLay,iday) = rng1D + enddo + endif + enddo + + do iday=1,nday + call random_setseed(ipseed_sw(iday),rng_stat) + call random_number(rng2D,rng_stat) + rng3D(:,:,iday) = reshape(source = rng2D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo ! Cloud overlap. @@ -147,8 +164,8 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd if (iovr == iovr_dcorr) then do iday=1,nday call random_setseed(ipseed_sw(iday),rng_stat) - call random_number(rng1D,rng_stat) - rng3D2(:,:,iday) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + call random_number(rng2D,rng_stat) + rng3D2(:,:,iday) = reshape(source = rng2D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo call sampled_mask(rng3D, cld_frac(idxday(1:nDay),:), cldfracMCICA, & overlap_param = cloud_overlap_param(idxday(1:nDay),1:nLev-1),& From 5964c9811e5452699717ae008487e21772f08083 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 16 Nov 2020 15:11:40 -0700 Subject: [PATCH 401/404] Bugfix in cires_ugwp.{F90,meta}: pass missing constants to GWDPS_V0 --- physics/cires_ugwp.F90 | 8 ++++---- physics/cires_ugwp.meta | 9 +++++++++ physics/ugwp_driver_v0.F | 5 ++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index f24ae39ae..21b331041 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -155,7 +155,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr tau_tofd, tau_mtb, tau_ogw, tau_ngw, zmtb, zlwb, zogw, & dudt_mtb,dudt_ogw, dudt_tms, du3dt_mtb, du3dt_ogw, du3dt_tms, & dudt, dvdt, dtdt, rdxzb, con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, & - rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & + con_omega, rain, ntke, q_tke, dqdt_tke, lprnt, ipr, & ldu3dt_ogw, ldv3dt_ogw, ldt3dt_ogw, ldu3dt_cgw, ldv3dt_cgw, ldt3dt_cgw, & ldiag3d, lssav, flag_for_gwd_generic_tend, errmsg, errflg) @@ -192,7 +192,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr real(kind=kind_phys), intent(inout), dimension(im, levs):: dudt, dvdt, dtdt - real(kind=kind_phys), intent(in) :: con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt + real(kind=kind_phys), intent(in) :: con_g, con_pi, con_cp, con_rd, con_rv, con_fvirt, con_omega real(kind=kind_phys), intent(in), dimension(im) :: rain @@ -245,8 +245,8 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr ugrs, vgrs, tgrs, qgrs(:,:,1), kpbl, prsi,del,prsl, prslk, phii, phil, & dtp, kdt, sgh30, hprime, oc, oa4, clx, theta, sigma, gamma, elvmax, & dusfcg, dvsfcg, xlat_d, sinlat, coslat, area, cdmbgwd(1:2), & - me, master, rdxzb, zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & - dudt_mtb, dudt_ogw, dudt_tms) + me, master, rdxzb, con_g, con_omega, zmtb, zogw, tau_mtb, tau_ogw, & + tau_tofd, dudt_mtb, dudt_ogw, dudt_tms) else ! calling old GFS gravity wave drag as is diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index ca1e573ba..133cd5b1d 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -806,6 +806,15 @@ kind = kind_phys intent = in optional = F +[con_omega] + standard_name = angular_velocity_of_earth + long_name = angular velocity of earth + units = s-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [rain] standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total rain at this time step diff --git a/physics/ugwp_driver_v0.F b/physics/ugwp_driver_v0.F index 3e3411fa8..c47079992 100644 --- a/physics/ugwp_driver_v0.F +++ b/physics/ugwp_driver_v0.F @@ -1,4 +1,4 @@ -!!23456 +! module sso_coorde ! ! specific to COORDE-2019 project OGW switches/sensitivity @@ -289,8 +289,7 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, & PRSI,DEL,PRSL,PRSLK,PHII, PHIL,DTP,KDT, & sgh30, HPRIME,OC,OA4,CLX4,THETA,vSIGMA,vGAMMA,ELVMAXD, & DUSFC, DVSFC, xlatd, sinlat, coslat, sparea, - & cdmbgwd, me, master, rdxzb, - & con_g, con_omega, + & cdmbgwd, me, master, rdxzb, con_g, con_omega, & zmtb, zogw, tau_mtb, tau_ogw, tau_tofd, & dudt_mtb, dudt_ogw, dudt_tms) !---------------------------------------- From af316340e3337e45cde702929388d3b005c75c31 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 18 Nov 2020 14:36:40 -0700 Subject: [PATCH 402/404] Change horizontal_dimension to horizontal_loop_extent in several new/modified schemes --- physics/tracer_sanitizer.meta | 2 +- physics/unified_ugwp.meta | 164 ++++++++++++++++----------------- physics/unified_ugwp_post.F90 | 8 +- physics/unified_ugwp_post.meta | 66 ++++++------- 4 files changed, 112 insertions(+), 128 deletions(-) diff --git a/physics/tracer_sanitizer.meta b/physics/tracer_sanitizer.meta index 0378911ed..e41d5d03d 100644 --- a/physics/tracer_sanitizer.meta +++ b/physics/tracer_sanitizer.meta @@ -12,7 +12,7 @@ standard_name = tracer_concentration_updated_by_physics long_name = tracer concentration updated by physics units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = inout diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 49f9365fd..675a68edd 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -383,7 +383,7 @@ standard_name = orography long_name = orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -392,7 +392,7 @@ standard_name = orography_unfiltered long_name = unfiltered orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -401,7 +401,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -418,7 +418,7 @@ standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -427,7 +427,7 @@ standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with_respect to east of maximum subgrid orographic variations units = degree - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -436,7 +436,7 @@ standard_name = slope_of_subgrid_orography long_name = slope of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -445,7 +445,7 @@ standard_name = anisotropy_of_subgrid_orography long_name = anisotropy of subgrid orography units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -454,7 +454,7 @@ standard_name = maximum_subgrid_orography long_name = maximum of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -463,7 +463,7 @@ standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height units = frac - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -472,7 +472,7 @@ standard_name = asymmetry_of_subgrid_orography long_name = asymmetry of subgrid orography units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -481,7 +481,7 @@ standard_name = standard_deviation_of_subgrid_orography_small_scale long_name = standard deviation of subgrid orography small scale units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -490,7 +490,7 @@ standard_name = convexity_of_subgrid_orography_small_scale long_name = convexity of subgrid orography small scale units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -499,7 +499,7 @@ standard_name = asymmetry_of_subgrid_orography_small_scale long_name = asymmetry of subgrid orography small scale units = none - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -508,7 +508,7 @@ standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale units = frac - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys intent = in @@ -517,7 +517,7 @@ standard_name = cell_size long_name = size of the grid cell units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -526,7 +526,7 @@ standard_name = integrated_x_momentum_flux_from_large_scale_gwd long_name = integrated x momentum flux from large scale gwd units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -535,7 +535,7 @@ standard_name = integrated_y_momentum_flux_from_large_scale_gwd long_name = integrated y momentum flux from large scale gwd units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -544,7 +544,7 @@ standard_name = integrated_x_momentum_flux_from_blocking_drag long_name = integrated x momentum flux from blocking drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -553,7 +553,7 @@ standard_name = integrated_y_momentum_flux_from_blocking_drag long_name = integrated y momentum flux from blocking drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -562,7 +562,7 @@ standard_name = integrated_x_momentum_flux_from_small_scale_gwd long_name = integrated x momentum flux from small scale gwd units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -571,7 +571,7 @@ standard_name = integrated_y_momentum_flux_from_small_scale_gwd long_name = integrated y momentum flux from small scale gwd units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -580,7 +580,7 @@ standard_name = integrated_x_momentum_flux_from_form_drag long_name = integrated x momentum flux from form drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -589,7 +589,7 @@ standard_name = integrated_y_momentum_flux_from_form_drag long_name = integrated y momentum flux from form drag units = Pa s - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -598,7 +598,7 @@ standard_name = x_momentum_tendency_from_large_scale_gwd long_name = x momentum tendency from large scale gwd units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -607,7 +607,7 @@ standard_name = y_momentum_tendency_from_large_scale_gwd long_name = y momentum tendency from large scale gwd units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -616,7 +616,7 @@ standard_name = x_momentum_tendency_from_blocking_drag long_name = x momentum tendency from blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -625,7 +625,7 @@ standard_name = y_momentum_tendency_from_blocking_drag long_name = y momentum tendency from blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -634,7 +634,7 @@ standard_name = x_momentum_tendency_from_small_scale_gwd long_name = x momentum tendency from small scale gwd units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -643,7 +643,7 @@ standard_name = y_momentum_tendency_from_small_scale_gwd long_name = y momentum tendency from small scale gwd units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -652,7 +652,7 @@ standard_name = x_momentum_tendency_from_form_drag long_name = x momentum tendency from form drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -661,7 +661,7 @@ standard_name = y_momentum_tendency_from_form_drag long_name = y momentum tendency from form drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -670,7 +670,7 @@ standard_name = bulk_richardson_number_at_lowest_model_level long_name = bulk Richardson number at the surface units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -679,7 +679,7 @@ standard_name = atmosphere_boundary_layer_thickness long_name = PBL thickness units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -688,7 +688,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -728,7 +728,7 @@ standard_name = latitude long_name = grid latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -737,7 +737,7 @@ standard_name = latitude_in_degree long_name = latitude in degree north units = degree_north - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -746,7 +746,7 @@ standard_name = sine_of_latitude long_name = sine of the grid latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -755,7 +755,7 @@ standard_name = cosine_of_latitude long_name = cosine of the grid latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -764,7 +764,7 @@ standard_name = cell_area long_name = area of the grid cell units = m2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -773,7 +773,7 @@ standard_name = x_wind long_name = zonal wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -782,7 +782,7 @@ standard_name = y_wind long_name = meridional wind units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -791,7 +791,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -800,7 +800,7 @@ standard_name = water_vapor_specific_humidity long_name = mid-layer specific humidity of water vapor units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -809,7 +809,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -818,7 +818,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -827,7 +827,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -836,7 +836,7 @@ standard_name = geopotential_at_interface long_name = geopotential at model layer interfaces units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -845,7 +845,7 @@ standard_name = geopotential long_name = geopotential at model layer centers units = m2 s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -854,7 +854,7 @@ standard_name = air_pressure_difference_between_midlayers long_name = air pressure difference between midlayers units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -863,7 +863,7 @@ standard_name = vertical_index_at_top_of_atmosphere_boundary_layer long_name = vertical index at top atmospheric boundary layer units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -871,7 +871,7 @@ standard_name = instantaneous_x_stress_due_to_gravity_wave_drag long_name = zonal surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -880,7 +880,7 @@ standard_name = instantaneous_y_stress_due_to_gravity_wave_drag long_name = meridional surface stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -891,7 +891,7 @@ standard_name = tendency_of_x_wind_due_to_ugwp long_name = zonal wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -900,7 +900,7 @@ standard_name = tendency_of_y_wind_due_to_ugwp long_name = meridional wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -909,7 +909,7 @@ standard_name = tendency_of_air_temperature_due_to_ugwp long_name = air temperature tendency due to UGWP units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -918,7 +918,7 @@ standard_name = eddy_mixing_due_to_ugwp long_name = eddy mixing due to UGWP units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -927,7 +927,7 @@ standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag long_name = momentum flux or stress due to TOFD units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -936,7 +936,7 @@ standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag long_name = momentum flux or stress due to mountain blocking drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -945,7 +945,7 @@ standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag long_name = momentum flux or stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -954,7 +954,7 @@ standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave long_name = momentum flux or stress due to nonstationary gravity waves units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -963,7 +963,7 @@ standard_name = height_of_mountain_blocking long_name = height of mountain blocking drag units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -972,7 +972,7 @@ standard_name = height_of_low_level_wave_breaking long_name = height of low level wave breaking units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -981,7 +981,7 @@ standard_name = height_of_launch_level_of_orographic_gravity_wave long_name = height of launch level of orographic gravity wave units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -990,7 +990,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag long_name = instantaneous change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -999,7 +999,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = instantaneous change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1008,7 +1008,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = instantaneous change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1017,7 +1017,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag long_name = time integral of change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1026,7 +1026,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = time integral of change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1035,7 +1035,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = time integral of change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1044,7 +1044,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1053,7 +1053,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1062,7 +1062,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1071,7 +1071,7 @@ standard_name = level_of_dividing_streamline long_name = level of the dividing streamline units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -1152,7 +1152,7 @@ standard_name = lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total rain at this time step units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -1169,7 +1169,7 @@ standard_name = turbulent_kinetic_energy long_name = turbulent kinetic energy units = J - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1178,7 +1178,7 @@ standard_name = tendency_of_turbulent_kinetic_energy_due_to_model_physics long_name = turbulent kinetic energy tendency due to model physics units = J s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -1203,7 +1203,7 @@ standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in x wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1212,7 +1212,7 @@ standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag long_name = cumulative change in y wind due to orographic gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1221,7 +1221,7 @@ standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag long_name = cumulative change in temperature due to orographic gravity wave drag units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1230,7 +1230,7 @@ standard_name = cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in x wind due to convective gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1239,7 +1239,7 @@ standard_name = cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag long_name = cumulative change in y wind due to convective gravity wave drag units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -1248,7 +1248,7 @@ standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag long_name = cumulative change in temperature due to convective gravity wave drag units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/unified_ugwp_post.F90 b/physics/unified_ugwp_post.F90 index 39de4b475..3af459d76 100644 --- a/physics/unified_ugwp_post.F90 +++ b/physics/unified_ugwp_post.F90 @@ -6,8 +6,7 @@ module unified_ugwp_post !>\defgroup unified_ugwp_post unified_UGWP Scheme Post !! @{ -!> \section arg_table_unified_ugwp_post_init Argument Table -!! + subroutine unified_ugwp_post_init () end subroutine unified_ugwp_post_init @@ -16,9 +15,6 @@ end subroutine unified_ugwp_post_init !> \section arg_table_unified_ugwp_post_run Argument Table !! \htmlinclude unified_ugwp_post_run.html !! - - - subroutine unified_ugwp_post_run (ldiag_ugwp, dtf, im, levs, & gw_dtdt, gw_dudt, gw_dvdt, tau_tofd, tau_mtb, tau_ogw, & tau_ngw, zmtb, zlwb, zogw, dudt_mtb, dudt_ogw, dudt_tms, & @@ -74,8 +70,6 @@ subroutine unified_ugwp_post_run (ldiag_ugwp, dtf, im, levs, & end subroutine unified_ugwp_post_run -!> \section arg_table_unified_ugwp_post_finalize Argument Table -!! subroutine unified_ugwp_post_finalize () end subroutine unified_ugwp_post_finalize diff --git a/physics/unified_ugwp_post.meta b/physics/unified_ugwp_post.meta index 501e91b8f..85a6bff8e 100644 --- a/physics/unified_ugwp_post.meta +++ b/physics/unified_ugwp_post.meta @@ -3,11 +3,6 @@ type = scheme dependencies = machine.F -######################################################################## -[ccpp-arg-table] - name = unified_ugwp_post_init - type = scheme - ######################################################################## [ccpp-arg-table] name = unified_ugwp_post_run @@ -49,7 +44,7 @@ standard_name = tendency_of_air_temperature_due_to_ugwp long_name = air temperature tendency due to UGWP units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -58,7 +53,7 @@ standard_name = tendency_of_x_wind_due_to_ugwp long_name = zonal wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -67,7 +62,7 @@ standard_name = tendency_of_y_wind_due_to_ugwp long_name = meridional wind tendency due to UGWP units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -76,7 +71,7 @@ standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag long_name = momentum flux or stress due to TOFD units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -85,7 +80,7 @@ standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag long_name = momentum flux or stress due to mountain blocking drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -94,7 +89,7 @@ standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag long_name = momentum flux or stress due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -103,7 +98,7 @@ standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave long_name = momentum flux or stress due to nonstationary gravity waves units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -112,7 +107,7 @@ standard_name = height_of_mountain_blocking long_name = height of mountain blocking drag units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -121,7 +116,7 @@ standard_name = height_of_low_level_wave_breaking long_name = height of low level wave breaking units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -130,7 +125,7 @@ standard_name = height_of_launch_level_of_orographic_gravity_wave long_name = height of launch level of orographic gravity wave units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -139,7 +134,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag long_name = instantaneous change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -148,7 +143,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = instantaneous change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -157,7 +152,7 @@ standard_name = instantaneous_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = instantaneous change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -166,7 +161,7 @@ standard_name = time_integral_of_height_of_mountain_blocking long_name = time integral of height of mountain blocking drag units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -175,7 +170,7 @@ standard_name = time_integral_of_height_of_low_level_wave_breaking long_name = time integral of height of drag due to low level wave breaking units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -184,7 +179,7 @@ standard_name = time_integral_of_height_of_launch_level_of_orographic_gravity_wave long_name = time integral of height of launch level of orographic gravity wave units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -193,7 +188,7 @@ standard_name = time_integral_of_momentum_flux_due_to_turbulent_orographic_form_drag long_name = time integral of momentum flux due to TOFD units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -202,7 +197,7 @@ standard_name = time_integral_of_momentum_flux_due_to_mountain_blocking_drag long_name = time integral of momentum flux due to mountain blocking drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -211,7 +206,7 @@ standard_name = time_integral_of_momentum_flux_due_to_orographic_gravity_wave_drag long_name = time integral of momentum flux due to orographic gravity wave drag units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -220,7 +215,7 @@ standard_name = time_integral_of_momentum_flux_due_to_nonstationary_gravity_wave long_name = time integral of momentum flux due to nonstationary gravity waves units = Pa - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -229,7 +224,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_mountain_blocking_drag long_name = time integral of change in x wind due to mountain blocking drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -238,7 +233,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_orographic_gravity_wave_drag long_name = time integral of change in x wind due to orographic gw drag units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -247,7 +242,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_turbulent_orographic_form_drag long_name = time integral of change in x wind due to TOFD units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -256,7 +251,7 @@ standard_name = time_integral_of_change_in_x_wind_due_to_nonstationary_gravity_wave long_name = time integral of change in x wind due to NGW units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -265,7 +260,7 @@ standard_name = time_integral_of_change_in_y_wind_due_to_nonstationary_gravity_wave long_name = time integral of change in y wind due to NGW units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -274,7 +269,7 @@ standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -283,7 +278,7 @@ standard_name = tendency_of_x_wind_due_to_model_physics long_name = zonal wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -292,7 +287,7 @@ standard_name = tendency_of_y_wind_due_to_model_physics long_name = meridional wind tendency due to model physics units = m s-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -314,8 +309,3 @@ type = integer intent = out optional = F - -######################################################################## -[ccpp-arg-table] - name = unified_ugwp_post_finalize - type = scheme From 551be294e2487d44731f38cf22814934a4d8967a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 19 Nov 2020 11:29:26 -0700 Subject: [PATCH 403/404] Bugfix in physics/cires_ugwp_module_v1.F90: remove unnecessary and ill-defined variable knob_ugwp_tlimb --- physics/cires_ugwp_module_v1.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/physics/cires_ugwp_module_v1.F90 b/physics/cires_ugwp_module_v1.F90 index 9b245ed11..fd41d8175 100644 --- a/physics/cires_ugwp_module_v1.F90 +++ b/physics/cires_ugwp_module_v1.F90 @@ -59,7 +59,6 @@ module cires_ugwp_module_v1 real :: knob_ugwp_taumin = 0.25e-3 real :: knob_ugwp_tauamp = 7.75e-3 ! range from 30.e-3 to 3.e-3 ( space-borne values) real :: knob_ugwp_lhmet = 200.e3 ! 200 km - real :: knob_ugwp_tlimb = .true. ! real :: kxw = pi2/200.e3 ! single horizontal wavenumber of ugwp schemes ! @@ -102,7 +101,7 @@ module cires_ugwp_module_v1 knob_ugwp_ndx4lh, knob_ugwp_version, knob_ugwp_palaunch, knob_ugwp_nslope, knob_ugwp_lzmax, & knob_ugwp_lzmin, knob_ugwp_lzstar, knob_ugwp_lhmet, knob_ugwp_tauamp, knob_ugwp_taumin, & knob_ugwp_qbolev, knob_ugwp_qbosin, knob_ugwp_qbotav, knob_ugwp_qboamp, knob_ugwp_qbotau, & - knob_ugwp_qbolat, knob_ugwp_qbowid, knob_ugwp_tlimb, knob_ugwp_orosolv + knob_ugwp_qbolat, knob_ugwp_qbowid, knob_ugwp_orosolv !&cires_ugwp_nml ! knob_ugwp_solver=2 From bc4fcb0dc1a5d00c2f4a2cc31435709547572d3a Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Mon, 30 Nov 2020 20:48:54 +0000 Subject: [PATCH 404/404] Merging these two routines from github.com/SMoorthi-emc/ccpp-physics/tree/SM_Oct102020, to fix a crash from running GFDL MP with frac_Grid=T as well as restart reproducibility. Co-authored-with: Shrinivas Moorthi --- physics/GFS_surface_composites.F90 | 157 +++++++++++++++++----------- physics/GFS_surface_composites.meta | 37 +++++-- 2 files changed, 121 insertions(+), 73 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index cc61662d2..6cbf35f03 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -24,15 +24,15 @@ end subroutine GFS_surface_composites_pre_finalize !> \section arg_table_GFS_surface_composites_pre_run Argument Table !! \htmlinclude GFS_surface_composites_pre_run.html !! - subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, & - landfrac, lakefrac, lakedepth, oceanfrac, frland, & - dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorli, zorl_wat, & - zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & - tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & - weasd, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat,& - tsfc_lnd, tsfc_ice, tisfc, tice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & - gflx_ice, tgice, islmsk, semis_rad, semis_wat, semis_lnd, semis_ice, & - qss, qss_wat, qss_lnd, qss_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, & + subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, & + landfrac, lakefrac, lakedepth, oceanfrac, frland, & + dry, icy, lake, ocean, wet, hice, cice, zorl, zorlo, zorll, zorli, zorl_wat, & + zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & + tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & + weasd, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & + tsfc_lnd, tsfc_ice, tisfc, tice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & + gflx_ice, tgice, islmsk, islmsk_cice, slmsk, semis_rad, semis_wat, semis_lnd, semis_ice, & + qss, qss_wat, qss_lnd, qss_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, & min_lakeice, min_seaice, errmsg, errflg) implicit none @@ -42,9 +42,8 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx logical, intent(in ) :: frac_grid, cplflx, cplwav2atm logical, dimension(im), intent(inout) :: flag_cice logical, dimension(im), intent(inout) :: dry, icy, lake, ocean, wet - real(kind=kind_phys), intent(in ) :: cimin real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac - real(kind=kind_phys), dimension(im), intent(inout) :: cice + real(kind=kind_phys), dimension(im), intent(inout) :: cice, hice real(kind=kind_phys), dimension(im), intent( out) :: frland real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd, qss, hflx @@ -55,11 +54,13 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx qss_wat, qss_lnd, qss_ice, hflx_wat, hflx_lnd, hflx_ice, ep1d_ice, gflx_ice real(kind=kind_phys), dimension(im), intent( out) :: tice real(kind=kind_phys), intent(in ) :: tgice - integer, dimension(im), intent(inout) :: islmsk + integer, dimension(im), intent(inout) :: islmsk, islmsk_cice real(kind=kind_phys), dimension(im), intent(in ) :: semis_rad - real(kind=kind_phys), dimension(im), intent(inout) :: semis_wat, semis_lnd, semis_ice + real(kind=kind_phys), dimension(im), intent(inout) :: semis_wat, semis_lnd, semis_ice, slmsk real(kind=kind_phys), intent(in ) :: min_lakeice, min_seaice + real(kind=kind_phys), parameter :: timin = 173.0_kind_phys ! minimum temperature allowed for snow/ice + ! CCPP error handling character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -76,37 +77,49 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx frland(i) = landfrac(i) if (frland(i) > zero) dry(i) = .true. if (frland(i) < one) then - if (flag_cice(i)) then + if (oceanfrac(i) > zero) then if (cice(i) >= min_seaice) then icy(i) = .true. - if (cice(i) < one) wet(i) = .true. ! some open ocean/lake water exists + tisfc(i) = max(timin, min(tisfc(i), tgice)) + if (cplflx) then + islmsk_cice(i) = 4 + flag_cice(i) = .true. + else + islmsk_cice(i) = 2 + endif + islmsk(i) = 2 else cice(i) = zero + hice(i) = zero flag_cice(i) = .false. -! islmsk_cice(i) = 0 -! islmsk(i) = 0 - wet(i) = .true. ! some open ocean/lake water exists + islmsk_cice(i) = 0 + islmsk(i) = 0 + endif + if (cice(i) < one) then + wet(i) = .true. ! some open ocean + if (.not. cplflx .and. icy(i)) tsfco(i) = max(tisfc(i), tgice) endif else if (cice(i) >= min_lakeice) then icy(i) = .true. - if (cice(i) < one) wet(i) = .true. ! some open ocean/lake water exists islmsk(i) = 2 + tisfc(i) = max(timin, min(tisfc(i), tgice)) else cice(i) = zero -! islmsk(i) = 0 - wet(i) = .true. ! some open ocean/lake water exists + hice(i) = zero + islmsk(i) = 0 endif - endif - if (wet(i) .and. .not. cplflx) then - if (oceanfrac(i) > zero) then - tsfco(i) = max(tsfco(i), tisfc(i), tgice) - elseif (icy(i)) then - tsfco(i) = max(tisfc(i), tgice) + islmsk_cice(i) = islmsk(i) + if (cice(i) < one) then + wet(i) = .true. ! some open lake + if (icy(i)) tsfco(i) = max(tisfc(i), tgice) endif endif - else + else ! all land cice(i) = zero + hice(i) = zero + islmsk_cice(i) = 1 + islmsk(i) = 1 endif enddo @@ -118,27 +131,39 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx dry(i) = .true. frland(i) = one cice(i) = zero + hice(i) = zero else frland(i) = zero - if (flag_cice(i)) then - if (cice(i) > min_seaice) then - icy(i) = .true. + if (oceanfrac(i) > zero) then + if (cice(i) >= min_seaice) then + icy(i) = .true. + tisfc(i) = max(timin, min(tisfc(i), tgice)) else cice(i) = zero + hice(i) = zero flag_cice(i) = .false. islmsk(i) = 0 + islmsk_cice(i) = 0 + endif + if (cice(i) < one) then + wet(i) = .true. ! some open ocean + if (.not. cplflx .and. icy(i)) tsfco(i) = max(tisfc(i), tgice) endif else - if (cice(i) > min_lakeice) then + if (cice(i) >= min_lakeice) then icy(i) = .true. + tisfc(i) = max(timin, min(tisfc(i), tgice)) else cice(i) = zero + hice(i) = zero + flag_cice(i) = .false. islmsk(i) = 0 endif - endif - if (cice(i) < one) then - wet(i) = .true. ! some open ocean/lake water exists - if (.not. cplflx .and. icy(i)) tsfco(i) = max(tisfc(i), tgice) + islmsk_cice(i) = islmsk(i) + if (cice(i) < one) then + wet(i) = .true. ! some open lake + if (icy(i)) tsfco(i) = max(tisfc(i), tgice) + endif endif endif enddo @@ -170,7 +195,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx ! snowd_wat(i) = snowd(i) weasd_wat(i) = zero snowd_wat(i) = zero - semis_wat(i) = 0.984d0 + semis_wat(i) = 0.984_kind_phys qss_wat(i) = qss(i) hflx_wat(i) = hflx(i) endif @@ -198,6 +223,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx qss_ice(i) = qss(i) hflx_ice(i) = hflx(i) endif + if (nint(slmsk(i)) /= 1) slmsk(i) = islmsk(i) enddo ! to prepare to separate lake from ocean under water category @@ -364,7 +390,7 @@ subroutine GFS_surface_composites_post_run ( ! Local variables integer :: i, k - real(kind=kind_phys) :: txl, txi, txo, tem + real(kind=kind_phys) :: txl, txi, txo, wfrac ! Initialize CCPP error handling variables errmsg = '' @@ -377,9 +403,10 @@ subroutine GFS_surface_composites_post_run ( do i=1, im ! Three-way composites (fields from sfc_diff) - txl = landfrac(i) - txi = cice(i)*(one - txl) ! txi = ice fraction wrt whole cell - txo = max(zero, one - txl - txi) + txl = landfrac(i) ! land fraction + wfrac = one - txl ! ocean fraction + txi = cice(i) * wfrac ! txi = ice fraction wrt whole cell + txo = max(zero, wfrac-txi) ! txo = open water fraction zorl(i) = txl*zorl_lnd(i) + txi*zorl_ice(i) + txo*zorl_wat(i) cd(i) = txl*cd_lnd(i) + txi*cd_ice(i) + txo*cd_wat(i) @@ -404,11 +431,10 @@ subroutine GFS_surface_composites_post_run ( !tprcp(i) = txl*tprcp_lnd(i) + txi*tprcp_ice(i) + txo*tprcp_wat(i) if (.not. flag_cice(i) .and. islmsk(i) == 2) then - tem = one - txl - evap(i) = txl*evap_lnd(i) + tem*evap_ice(i) - hflx(i) = txl*hflx_lnd(i) + tem*hflx_ice(i) - qss(i) = txl*qss_lnd(i) + tem*qss_ice(i) - gflx(i) = txl*gflx_lnd(i) + tem*gflx_ice(i) + evap(i) = txl*evap_lnd(i) + wfrac*evap_ice(i) + hflx(i) = txl*hflx_lnd(i) + wfrac*hflx_ice(i) + qss(i) = txl*qss_lnd(i) + wfrac*qss_ice(i) + gflx(i) = txl*gflx_lnd(i) + wfrac*gflx_ice(i) else evap(i) = txl*evap_lnd(i) + txi*evap_ice(i) + txo*evap_wat(i) hflx(i) = txl*hflx_lnd(i) + txi*hflx_ice(i) + txo*hflx_wat(i) @@ -451,14 +477,18 @@ subroutine GFS_surface_composites_post_run ( ! tisfc(i) = tsfc_ice(i) ! over ice when uncoupled ! endif - if (.not. flag_cice(i)) then - if (islmsk(i) == 2) then ! return updated lake ice thickness & concentration to global array - tisfc(i) = tice(i) - else ! this would be over open ocean or land (no ice fraction) - hice(i) = zero - cice(i) = zero - tisfc(i) = tsfc(i) - endif +! if (.not. flag_cice(i)) then +! if (islmsk(i) == 2) then ! return updated lake ice thickness & concentration to global array +! tisfc(i) = tice(i) +! else ! this would be over open ocean or land (no ice fraction) +! hice(i) = zero +! cice(i) = zero +! tisfc(i) = tsfc(i) +! endif +! endif + if (.not. icy(i)) then + hice(i) = zero + cice(i) = zero endif enddo @@ -478,6 +508,9 @@ subroutine GFS_surface_composites_post_run ( fh2(i) = fh2_lnd(i) !tsurf(i) = tsurf_lnd(i) tsfcl(i) = tsfc_lnd(i) ! over land + tsfc(i) = tsfcl(i) + tsfco(i) = tsfc(i) + tisfc(i) = tsfc(i) cmm(i) = cmm_lnd(i) chh(i) = chh_lnd(i) gflx(i) = gflx_lnd(i) @@ -488,11 +521,8 @@ subroutine GFS_surface_composites_post_run ( evap(i) = evap_lnd(i) hflx(i) = hflx_lnd(i) qss(i) = qss_lnd(i) - tsfc(i) = tsfc_lnd(i) hice(i) = zero cice(i) = zero - tisfc(i) = tsfc(i) - tsfco(i) = tsfc(i) elseif (islmsk(i) == 0) then zorl(i) = zorl_wat(i) cd(i) = cd_wat(i) @@ -506,7 +536,9 @@ subroutine GFS_surface_composites_post_run ( fh2(i) = fh2_wat(i) !tsurf(i) = tsurf_wat(i) tsfco(i) = tsfc_wat(i) ! over lake (and ocean when uncoupled) + tsfc(i) = tsfco(i) tsfcl(i) = tsfc(i) + tisfc(i) = tsfc(i) cmm(i) = cmm_wat(i) chh(i) = chh_wat(i) gflx(i) = gflx_wat(i) @@ -517,10 +549,8 @@ subroutine GFS_surface_composites_post_run ( evap(i) = evap_wat(i) hflx(i) = hflx_wat(i) qss(i) = qss_wat(i) - tsfc(i) = tsfc_wat(i) hice(i) = zero cice(i) = zero - tisfc(i) = tsfc(i) else ! islmsk(i) == 2 zorl(i) = zorl_ice(i) cd(i) = cd_ice(i) @@ -544,12 +574,13 @@ subroutine GFS_surface_composites_post_run ( evap(i) = evap_ice(i) hflx(i) = hflx_ice(i) qss(i) = qss_ice(i) + tisfc(i) = tice(i) if (.not. flag_cice(i)) then - tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) +! tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) zorl(i) = cice(i) * zorl_ice(i) + (one - cice(i)) * zorl_wat(i) - tsfc(i) = tsfc_ice(i) + tsfc(i) = tsfc_ice(i) ! over lake (and ocean when uncoupled) elseif (wet(i)) then - if (cice(i) > min_seaice) then ! this was already done for lake ice in sfc_sice + if (cice(i) >= min_seaice) then ! this was already done for lake ice in sfc_sice txi = cice(i) txo = one - txi evap(i) = txi * evap_ice(i) + txo * evap_wat(i) @@ -576,7 +607,7 @@ subroutine GFS_surface_composites_post_run ( endif tsfcl(i) = tsfc(i) do k=1,kice ! store tiice in stc to reduce output in the nonfrac grid case - stc(i,k)=tiice(i,k) + stc(i,k) = tiice(i,k) end do endif diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 71765b9a2..21b308357 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -140,23 +140,23 @@ type = logical intent = inout optional = F -[cice] - standard_name = sea_ice_concentration - long_name = ice fraction over open water - units = frac +[hice] + standard_name = sea_ice_thickness + long_name = sea ice thickness + units = m dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout optional = F -[cimin] - standard_name = minimum_sea_ice_concentration - long_name = minimum sea ice concentration +[cice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water units = frac - dimensions = () + dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = F [zorl] standard_name = surface_roughness_length @@ -506,7 +506,24 @@ units = flag dimensions = (horizontal_loop_extent) type = integer - intent = in + intent = inout + optional = F +[islmsk_cice] + standard_name = sea_land_ice_mask_cice + long_name = sea/land/ice mask cice (=0/1/2) + units = flag + dimensions = (horizontal_loop_extent) + type = integer + intent = inout + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout optional = F [semis_rad] standard_name = surface_longwave_emissivity