From 5ca808ea8242d3fbfdf28828b89647cf781a679e Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Fri, 13 Dec 2019 16:48:14 -0700 Subject: [PATCH 01/28] 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 02/28] 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 03/28] 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 04/28] 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 c825f5faeb3c658ffcf32b84b0e7527815862812 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Fri, 20 Dec 2019 14:56:59 -0700 Subject: [PATCH 05/28] 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 06/28] 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 0af8bba2eb28424b5473121d496ba18ea4bb5d34 Mon Sep 17 00:00:00 2001 From: Xiaqiong Zhou Date: Fri, 31 Jan 2020 17:13:16 +0000 Subject: [PATCH 07/28] 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 bccf301e158c346b051b3d6a9bd392a71d07df25 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 1 Apr 2020 14:12:13 -0600 Subject: [PATCH 08/28] 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 71eace19a5f42b60f64816575c425d34624c6018 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 3 Apr 2020 15:41:13 -0600 Subject: [PATCH 09/28] 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 b61ea19fb484acc6bba891b8a12ef430cba8cdb2 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 6 Apr 2020 17:06:47 -0600 Subject: [PATCH 10/28] 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 5b5b663d2bd59942a711551f34e3c9c28c475909 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Wed, 8 Apr 2020 03:34:12 +0000 Subject: [PATCH 11/28] 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 a6e95dbb89bd49b403c444fa8e5ce0eb67d17af7 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Thu, 23 Apr 2020 20:53:11 +0000 Subject: [PATCH 12/28] 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 13/28] 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 14/28] 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 15/28] 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 3bdfd889624953ba7c34da57c03d6f2dff2d9881 Mon Sep 17 00:00:00 2001 From: Xiaqiong Zhou Date: Thu, 14 May 2020 13:36:12 +0000 Subject: [PATCH 16/28] 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 c2fbbbea960972318e406714179096c1857a7ad2 Mon Sep 17 00:00:00 2001 From: "Shan.Sun" Date: Fri, 22 May 2020 20:46:36 +0000 Subject: [PATCH 17/28] 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 ba106f70277426dac36094da8566435098b54422 Mon Sep 17 00:00:00 2001 From: "Man.Zhang" Date: Thu, 30 Apr 2020 12:20:25 -0600 Subject: [PATCH 18/28] 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 19/28] 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 20/28] 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 f896694d06ae6b2f93e3285290ca89fe29117c30 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Thu, 11 Jun 2020 02:24:48 +0000 Subject: [PATCH 21/28] 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 22/28] 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 23/28] 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 24/28] 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 e889b037948b58e7009e80e13206c7b694a14e95 Mon Sep 17 00:00:00 2001 From: Ben Green Date: Thu, 18 Jun 2020 14:17:38 +0000 Subject: [PATCH 25/28] 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 26/28] 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 37719daee48f16e7be2c510ab0a3425e856c1eef Mon Sep 17 00:00:00 2001 From: Ben Green Date: Thu, 18 Jun 2020 18:25:16 +0000 Subject: [PATCH 27/28] 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 728c076a64f921670e8be18d1b0c0d79de6e3254 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 25 Jun 2020 09:58:45 -0600 Subject: [PATCH 28/28] 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)