diff --git a/Registry/Registry.EM_COMMON b/Registry/Registry.EM_COMMON index 8b4e203bf2..ba47da9ba9 100644 --- a/Registry/Registry.EM_COMMON +++ b/Registry/Registry.EM_COMMON @@ -2453,6 +2453,7 @@ rconfig integer ISFFLX namelist,physics 1 1 rconfig integer IFSNOW namelist,physics 1 1 irh "IFSNOW" "" "" rconfig integer ICLOUD namelist,physics 1 1 irh "ICLOUD" "" "" rconfig integer cldovrlp namelist,physics 1 2 irh "cldovrlp" "1=random, 2=maximum-random, 3=maximum, 4=exponential, 5=exponential-random" "" +rconfig integer idcor namelist,physics 1 0 irh "idcor" "0=constant decorrelation length, 2500 m, 1=latitude-varying decorrelation length" "" rconfig integer ideal_xland namelist,physics 1 1 rh "IDEAL_XLAND" "land=1(def), water=2, for ideal cases with no land-use" "" rconfig real swrad_scat namelist,physics 1 1 irh "SWRAD_SCAT" "SCATTERING FACTOR IN SWRAD" "" rconfig integer surface_input_source namelist,physics 1 3 irh "surface_input_source" "1=static (fractional), 2=time dependent (dominant), 3=dominant cateogry from metgrid" "" diff --git a/dyn_em/module_first_rk_step_part1.F b/dyn_em/module_first_rk_step_part1.F index cdc8b6f876..456126669a 100644 --- a/dyn_em/module_first_rk_step_part1.F +++ b/dyn_em/module_first_rk_step_part1.F @@ -369,7 +369,8 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags & & , CLDFRA_DP=grid%cldfra_dp & ! ckay for subgrid cloud & , CLDFRA_SH=grid%cldfra_sh & & , icloud_bl=config_flags%icloud_bl & - & , cldovrlp=config_flags%cldovrlp & ! J. Henderson AER: cldovrlp namelist value + & , cldovrlp=config_flags%cldovrlp & + & , idcor=config_flags%idcor & & , qc_bl=grid%qc_bl,qi_bl=grid%qi_bl,cldfra_bl=grid%cldfra_bl& & , re_cloud=grid%re_cloud, re_ice=grid%re_ice, re_snow=grid%re_snow & ! G. Thompson & , has_reqc=grid%has_reqc, has_reqi=grid%has_reqi, has_reqs=grid%has_reqs & ! G. Thompson diff --git a/phys/module_ra_rrtmg_lw.F b/phys/module_ra_rrtmg_lw.F index a1f71d54d5..ad041fec1b 100644 --- a/phys/module_ra_rrtmg_lw.F +++ b/phys/module_ra_rrtmg_lw.F @@ -2071,7 +2071,7 @@ module mcica_subcol_gen_lw use parkind, only : im => kind_im, rb => kind_rb use parrrtm, only : nbndlw, ngptlw - use rrlw_con, only: grav + use rrlw_con, only: grav, pi use rrlw_wvn, only: ngb use rrlw_vsn @@ -2085,10 +2085,13 @@ module mcica_subcol_gen_lw !------------------------------------------------------------------ ! Public subroutines !------------------------------------------------------------------ - - subroutine mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt, & - cldfrac, ciwp, clwp, cswp, rei, rel, res, tauc, cldfmcl, & - ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, resnmcl, taucmcl) +! mji - Add height needed for exponential and exponential-random cloud overlap methods +! (icld=4 and 5, respectively) along with idcor, juldat and lat used to specify +! the decorrelation length for these methods + subroutine mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, irng, play, & + cldfrac, ciwp, clwp, cswp, rei, rel, res, tauc, & + hgt, idcor, juldat, lat, & + cldfmcl, ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, resnmcl, taucmcl) ! ----- Input ----- ! Control @@ -2132,6 +2135,9 @@ subroutine mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt ! Dimensions: (ncol,nlay) real(kind=rb), intent(in) :: res(:,:) ! snow particle size ! Dimensions: (ncol,nlay) + integer(kind=im), intent(in) :: idcor ! Decorrelation length type + integer(kind=im), intent(in) :: juldat ! Julian date (day of year, 1-365) + real(kind=rb), intent(in) :: lat ! latitude (degrees, -90 to 90) ! ----- Output ----- ! Atmosphere/clouds - cldprmc [mcica] @@ -2167,6 +2173,14 @@ subroutine mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt ! real(kind=rb) :: qi(ncol, nlay) ! ice water (specific humidity) ! real(kind=rb) :: ql(ncol, nlay) ! liq water (specific humidity) +! MJI - For latitude dependent decorrelation length + real(kind=rb), parameter :: am1 = 1.4315_rb + real(kind=rb), parameter :: am2 = 2.1219_rb + real(kind=rb), parameter :: am4 = -25.584_rb + real(kind=rb), parameter :: amr = 7._rb + real(kind=rb) :: am3 + real(kind=rb) :: decorr_len(ncol) ! decorrelation length (meters) + real(kind=rb), parameter :: Zo_default = 2500._rb ! default constant decorrelation length (m) ! Return if clear sky; or stop if icld out of range if (icld.eq.0) return @@ -2200,15 +2214,35 @@ subroutine mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt ! ql(ilev) = (clwp(ilev) * grav) / (pdel(ilev) * 1000._rb) ! enddo +! MJI - Latitude and day of year dependent decorrelation length + if (idcor .eq. 1) then +! Derive decorrelation length based on day of year and latitude (from NASA GMAO method) +! Result is in meters + if (juldat .gt. 181) then + am3 = -4._rb * amr / 365._rb * (juldat-272) + else + am3 = 4._rb * amr / 365._rb * (juldat-91) + endif +! Latitude in radians, decorrelation length in meters +! decorr_len(:) = ( am1 + am2 * exp(-(lat*180._rb/pi - am3)**2 / (am4*am4)) ) * 1.e3_rb +! Latitude in degrees, decorrelation length in meters + decorr_len(:) = ( am1 + am2 * exp(-(lat - am3)**2 / (am4*am4)) ) * 1.e3_rb + else +! Spatially and temporally constant decorrelation length + decorr_len(:) = Zo_default + endif + ! Generate the stochastic subcolumns of cloud optical properties for the longwave; - call generate_stochastic_clouds (ncol, nlay, nsubclw, icld, irng, pmid, hgt, cldfrac, clwp, ciwp, cswp, tauc, & + call generate_stochastic_clouds (ncol, nlay, nsubclw, icld, irng, pmid, cldfrac, clwp, ciwp, cswp, tauc, & + hgt, decorr_len, & cldfmcl, clwpmcl, ciwpmcl, cswpmcl, taucmcl, permuteseed) end subroutine mcica_subcol_lw !------------------------------------------------------------------------------------------------- - subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, irng, pmid, hgt, cld, clwp, ciwp, cswp, tauc, & + subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, irng, pmid, cld, clwp, ciwp, cswp, tauc, & + hgt, decorr_len, & cld_stoch, clwp_stoch, ciwp_stoch, cswp_stoch, tauc_stoch, changeSeed) !------------------------------------------------------------------------------------------------- @@ -2307,6 +2341,8 @@ subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, irng, pmid, hgt ! real(kind=rb), intent(in) :: asmc(:,:,:) ! in-cloud asymmetry parameter ! Dimensions: (nbndlw,ncol,nlay) ! inactive - for future expansion + real(kind=rb), intent(in) :: decorr_len(:) ! decorrelation length (meters) + ! Dimensions: (ncol) real(kind=rb), intent(out) :: cld_stoch(:,:,:) ! subcolumn cloud fraction ! Dimensions: (ngptlw,ncol,nlay) @@ -2340,7 +2376,7 @@ subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, irng, pmid, hgt integer(kind=im) :: overlap ! 1 = random overlap, 2 = maximum-random, ! 3 = maximum overlap, 4 = exponential, ! 5 = exponential-random - real(kind=rb), parameter :: Zo = 2500._rb ! length scale (m) + real(kind=rb) :: Zo_inv(ncol) ! inverse of decorrelation length scale (m) real(kind=rb), dimension(ncol,nlay) :: alpha ! overlap parameter ! Constants (min value for cloud fraction and cloud water and ice) @@ -2367,6 +2403,7 @@ subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, irng, pmid, hgt ! Pass input cloud overlap setting to local variable overlap = icld + Zo_inv(:) = 1._rb / decorr_len(:) ! Ensure that cloud fractions are in bounds do ilev = 1, nlay @@ -2489,7 +2526,9 @@ subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, irng, pmid, hgt endif case(4) - ! Exponential overlap: weighting between maximum and random overlap increases with the distance. + ! Exponential overlap: transition from maximum to random cloud overlap increases + ! exponentially with layer thickness and distance through layers + ! ! The random numbers for exponential overlap verify: ! j=1 RAN(j)=RND1 ! j>1 if RND1 < alpha(j,j-1) => RAN(j) = RAN(j-1) @@ -2501,7 +2540,7 @@ subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, irng, pmid, hgt do i = 1, ncol alpha(i, 1) = 0._rb do ilev = 2,nlay - alpha(i, ilev) = exp( -( hgt (i, ilev) - hgt (i, ilev-1)) / Zo) + alpha(i, ilev) = exp( -(hgt(i,ilev) - hgt(i,ilev-1)) * Zo_inv(i)) enddo enddo @@ -2536,8 +2575,55 @@ subroutine generate_stochastic_clouds(ncol, nlay, nsubcol, icld, irng, pmid, hgt end do case(5) - ! Exponential-random overlap: - call wrf_error_fatal("Cloud Overlap case 5: ER has not yet been implemented. Stopping...") + ! Exponential_Random overlap: transition from maximum to random cloud overlap increases + ! exponentially with layer thickness and with distance through adjacent cloudy layers. + ! Non-adjacent blocks of clouds are treated randomly, and each block begins a new + ! exponential transition from maximum to random. + ! + ! compute alpha: bottom to top + ! - set alpha to 0 in bottom layer (no layer below for correlation) + do i = 1, ncol + alpha(i, 1) = 0._rb + do ilev = 2,nlay + alpha(i, ilev) = exp( -(hgt(i,ilev) - hgt(i,ilev-1) ) * Zo_inv(i)) + ! Decorrelate layers when clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent cloudy layers + if (cldf(i,ilev) .eq. 0.0_rb .and. cldf(i,ilev-1) .gt. 0.0_rb) then + alpha(i,ilev) = 0.0_rb + endif + end do + end do + + ! generate 2 streams of random numbers + ! CDF2 is used to select which sub-columns are vertically correlated relative to alpha + ! CDF is used to select which sub-columns are treated as cloudy relative to cloud fraction + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol, :, ilev) = rand_num + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF2(isubcol, :, ilev) = rand_num + end do + end do + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1,nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + rand_num_mt = getRandomReal(randomNumbers) + CDF2(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + ! generate vertical correlations in random number arrays - bottom to top + do ilev = 2,nlay + where (CDF2(:, :, ilev) < spread(alpha (:,ilev), dim=1, nCopies=nsubcol) ) + CDF(:,:,ilev) = CDF(:,:,ilev-1) + end where + end do end select @@ -11489,7 +11575,7 @@ SUBROUTINE RRTMG_LWRAD( & p8w, p3d, pi3d, & dz8w, tsk, t3d, t8w, rho3d, r, g, & icloud, warm_rain, cldfra3d, & - cldovrlp, & + cldovrlp,idcor,xlat, & lradius,iradius, & is_cammgmp_used, & f_ice_phy, f_rain_phy, & @@ -11665,9 +11751,15 @@ SUBROUTINE RRTMG_LWRAD( & nlay, & icld, & cldovrlp, & + idcor, & + juldat, & inflglw, & iceflglw, & liqflglw +! Latitude + real, dimension( ims:ime,jms:jme ), intent(in) :: xlat ! (latitude for cldovrlp=4 or 5) + real :: lat + ! Dimension with extra layer from model top to TOA real, dimension( 1, kts:nlayers+1 ) :: plev, & tlev @@ -12087,6 +12179,8 @@ SUBROUTINE RRTMG_LWRAD( & ! Select cloud overlap assumption (1 = random, 2 = maximum-random, 3 = maximum, 4 = exponential, 5 = exponential-random icld=cldovrlp ! J. Henderson AER assign namelist variable cldovrlp to existing icld +! Set julian date + juldat = julian ! Select cloud liquid and ice optics parameterization options ! For passing in cloud optical properties directly: ! icld = 2 @@ -12605,9 +12699,11 @@ SUBROUTINE RRTMG_LWRAD( & permuteseed = 150 ! Sub-column generator for McICA - call mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt, & - cldfrac, ciwpth, clwpth, cswpth, rei, rel, res, taucld, cldfmcl, & - ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, resnmcl, taucmcl) + lat=xlat(i,j) !retrieve scalar latitude for column calculation + call mcica_subcol_lw(iplon, ncol, nlay, icld, permuteseed, irng, play, & + cldfrac, ciwpth, clwpth, cswpth, rei, rel, res, taucld, & + hgt, idcor, juldat, lat, & + cldfmcl, ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, resnmcl, taucmcl) !-------------------------------------------------------------------------- ! Aerosol optical depth, single scattering albedo and asymmetry parameter -czhao 03/2010 diff --git a/phys/module_ra_rrtmg_sw.F b/phys/module_ra_rrtmg_sw.F index 9156f790d1..7eac8bf9f0 100644 --- a/phys/module_ra_rrtmg_sw.F +++ b/phys/module_ra_rrtmg_sw.F @@ -1374,7 +1374,7 @@ module mcica_subcol_gen_sw use parkind, only : im => kind_im, rb => kind_rb use parrrsw, only : nbndsw, ngptsw - use rrsw_con, only: grav + use rrsw_con, only: grav, pi use rrsw_wvn, only: ngb use rrsw_vsn @@ -1389,9 +1389,12 @@ module mcica_subcol_gen_sw ! Public subroutines !------------------------------------------------------------------ -! mji - Add height needed for exponential-ranom cloud overlap method (icld=4) - subroutine mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt, & +! mji - Add height needed for exponential and exponential-random cloud overlap methods +! (icld=4 and 5, respectively) along with idcor, juldat and lat used to specify +! the decorrelation length for these methods + subroutine mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, irng, play, & cldfrac, ciwp, clwp, cswp, rei, rel, res, tauc, ssac, asmc, fsfc, & + hgt, idcor, juldat, lat, & cldfmcl, ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, resnmcl, & taucmcl, ssacmcl, asmcmcl, fsfcmcl) @@ -1438,6 +1441,9 @@ subroutine mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt ! Dimensions: (ncol,nlay) real(kind=rb), intent(in) :: res(:,:) ! cloud snow particle size ! Dimensions: (ncol,nlay) + integer(kind=im), intent(in) :: idcor ! Decorrelation length type + integer(kind=im), intent(in) :: juldat ! Julian date (day of year, 1-365) + real(kind=rb), intent(in) :: lat ! latitude (degrees, -90 to 90) ! ----- Output ----- ! Atmosphere/clouds - cldprmc [mcica] @@ -1475,6 +1481,14 @@ subroutine mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt ! real(kind=rb) :: qi(ncol,nlay) ! ice water (specific humidity) ! real(kind=rb) :: ql(ncol,nlay) ! liq water (specific humidity) +! MJI - For latitude dependent decorrelation length + real(kind=rb), parameter :: am1 = 1.4315_rb + real(kind=rb), parameter :: am2 = 2.1219_rb + real(kind=rb), parameter :: am4 = -25.584_rb + real(kind=rb), parameter :: amr = 7._rb + real(kind=rb) :: am3 + real(kind=rb) :: decorr_len(ncol) ! decorrelation length (meters) + real(kind=rb), parameter :: Zo_default = 2500._rb ! default constant decorrelation length (m) ! Return if clear sky if (icld.eq.0) return @@ -1505,17 +1519,39 @@ subroutine mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt ! ql(ilev) = (clwp(ilev) * grav) / (pdel(ilev) * 1000._rb) ! enddo +! MJI - Latitude and day of year dependent decorrelation length + if (idcor .eq. 1) then +! Derive decorrelation length based on day of year and latitude (from NASA GMAO method) +! Result is in meters + if (juldat .gt. 181) then + am3 = -4._rb * amr / 365._rb * (juldat-272) + else + am3 = 4._rb * amr / 365._rb * (juldat-91) + endif +! Latitude in radians, decorrelation length in meters +! decorr_len(:) = ( am1 + am2 * exp(-(lat*180._rb/pi - am3)**2 / (am4*am4)) ) * 1.e3_rb +! Latitude in degrees, decorrelation length in meters + decorr_len(:) = ( am1 + am2 * exp(-(lat - am3)**2 / (am4*am4)) ) * 1.e3_rb + else +! Spatially and temporally constant decorrelation length + decorr_len(:) = Zo_default + endif + ! Generate the stochastic subcolumns of cloud optical properties for the shortwave; - call generate_stochastic_clouds_sw (ncol, nlay, nsubcsw, icld, irng, pmid, hgt, cldfrac, clwp, ciwp, cswp, & - tauc, ssac, asmc, fsfc, cldfmcl, clwpmcl, ciwpmcl, cswpmcl, & + call generate_stochastic_clouds_sw (ncol, nlay, nsubcsw, icld, irng, pmid, cldfrac, clwp, ciwp, cswp, & + tauc, ssac, asmc, fsfc, & + hgt, decorr_len, & + cldfmcl, clwpmcl, ciwpmcl, cswpmcl, & taucmcl, ssacmcl, asmcmcl, fsfcmcl, permuteseed) end subroutine mcica_subcol_sw !------------------------------------------------------------------------------------------------- - subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, icld, irng, pmid, hgt, cld, clwp, ciwp, cswp, & - tauc, ssac, asmc, fsfc, cld_stoch, clwp_stoch, ciwp_stoch, cswp_stoch, & + subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, icld, irng, pmid, cld, clwp, ciwp, cswp, & + tauc, ssac, asmc, fsfc, & + hgt, decorr_len, & + cld_stoch, clwp_stoch, ciwp_stoch, cswp_stoch, & tauc_stoch, ssac_stoch, asmc_stoch, fsfc_stoch, changeSeed) !------------------------------------------------------------------------------------------------- @@ -1612,6 +1648,8 @@ subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, icld, irng, pmid, ! Dimensions: (nbndsw,ncol,nlay) real(kind=rb), intent(in) :: fsfc(:,:,:) ! in-cloud forward scattering fraction (non-delta scaled) ! Dimensions: (nbndsw,ncol,nlay) + real(kind=rb), intent(in) :: decorr_len(:) ! decorrelation length (meters) + ! Dimensions: (ncol) real(kind=rb), intent(out) :: cld_stoch(:,:,:) ! subcolumn cloud fraction ! Dimensions: (ngptsw,ncol,nlay) @@ -1647,7 +1685,7 @@ subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, icld, irng, pmid, integer(kind=im) :: overlap ! 1 = random overlap, 2 = maximum-random, ! 3 = maximum overlap, 4 = exponential, ! 5 = exponential-random - real(kind=rb), parameter :: Zo = 2500._rb ! length scale (m) + real(kind=rb) :: Zo_inv(ncol) ! inverse of decorrelation length scale (m) real(kind=rb), dimension(ncol,nlay) :: alpha ! overlap parameter ! Constants (min value for cloud fraction and cloud water and ice) @@ -1674,6 +1712,7 @@ subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, icld, irng, pmid, ! Pass input cloud overlap setting to local variable overlap = icld + Zo_inv(:) = 1._rb / decorr_len(:) ! Ensure that cloud fractions are in bounds do ilev = 1, nlay @@ -1797,8 +1836,8 @@ subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, icld, irng, pmid, ! mji - Activate exponential cloud overlap option case(4) - ! Exponential overlap: weighting between maximum and random overlap increases with the distance. - ! The random numbers for exponential overlap verify: + ! Exponential overlap: transition from maximum to random cloud overlap increases + ! exponentially with layer thickness and distance through layers ! j=1 RAN(j)=RND1 ! j>1 if RND1 < alpha(j,j-1) => RAN(j) = RAN(j-1) ! RAN(j) = RND2 @@ -1809,7 +1848,7 @@ subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, icld, irng, pmid, do i = 1, ncol alpha(i, 1) = 0._rb do ilev = 2,nlay - alpha(i, ilev) = exp( -( hgt (i, ilev) - hgt (i, ilev-1)) / Zo) + alpha(i, ilev) = exp( -(hgt(i,ilev) - hgt(i,ilev-1)) * Zo_inv(i)) enddo enddo @@ -1845,8 +1884,55 @@ subroutine generate_stochastic_clouds_sw(ncol, nlay, nsubcol, icld, irng, pmid, ! mji - Exponential-random cloud overlap option case(5) - ! Exponential-random overlap: - call wrf_error_fatal("Cloud Overlap case 5: ER has not yet been implemented. Stopping...") + ! Exponential_Random overlap: transition from maximum to random cloud overlap increases + ! exponentially with layer thickness and with distance through adjacent cloudy layers. + ! Non-adjacent blocks of clouds are treated randomly, and each block begins a new + ! exponential transition from maximum to random. + ! + ! compute alpha: bottom to top + ! - set alpha to 0 in bottom layer (no layer below for correlation) + do i = 1, ncol + alpha(i, 1) = 0._rb + do ilev = 2,nlay + alpha(i, ilev) = exp( -(hgt(i,ilev) - hgt(i,ilev-1) ) * Zo_inv(i)) + ! Decorrelate layers when clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent cloudy layers + if (cldf(i,ilev) .eq. 0.0_rb .and. cldf(i,ilev-1) .gt. 0.0_rb) then + alpha(i,ilev) = 0.0_rb + endif + end do + end do + + ! generate 2 streams of random numbers + ! CDF2 is used to select which sub-columns are vertically correlated relative to alpha + ! CDF is used to select which sub-columns are treated as cloudy relative to cloud fraction + if (irng.eq.0) then + do isubcol = 1,nsubcol + do ilev = 1,nlay + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF(isubcol, :, ilev) = rand_num + call kissvec(seed1, seed2, seed3, seed4, rand_num) + CDF2(isubcol, :, ilev) = rand_num + end do + end do + elseif (irng.eq.1) then + do isubcol = 1, nsubcol + do i = 1, ncol + do ilev = 1,nlay + rand_num_mt = getRandomReal(randomNumbers) + CDF(isubcol,i,ilev) = rand_num_mt + rand_num_mt = getRandomReal(randomNumbers) + CDF2(isubcol,i,ilev) = rand_num_mt + enddo + enddo + enddo + endif + ! generate vertical correlations in random number arrays - bottom to top + do ilev = 2,nlay + where (CDF2(:, :, ilev) < spread(alpha (:,ilev), dim=1, nCopies=nsubcol) ) + CDF(:,:,ilev) = CDF(:,:,ilev-1) + end where + end do end select @@ -9936,7 +10022,7 @@ SUBROUTINE RRTMG_SWRAD( & re_cloud,re_ice,re_snow, & has_reqc,has_reqi,has_reqs, & icloud, warm_rain, & - cldovrlp, & ! J. Henderson AER: cldovrlp namelist value + cldovrlp,idcor, & ! J. Henderson AER: cldovrlp namelist value f_ice_phy, f_rain_phy, & xland, xice, snow, & qv3d, qc3d, qr3d, & @@ -10165,9 +10251,14 @@ SUBROUTINE RRTMG_SWRAD( & nlay, & icld, & cldovrlp, & ! J. Henderson AER + idcor, & + juldat, & inflgsw, & iceflgsw, & liqflgsw +! Latitude + real :: lat + ! Dimension with extra layer from model top to TOA real, dimension( 1, kts:kte+2 ) :: plev, & tlev @@ -10543,6 +10634,8 @@ SUBROUTINE RRTMG_SWRAD( & ! Select cloud overlap assumption (1 = random, 2 = maximum-random, 3 = maximum, 4 = exponential, 5 = exponential-random icld=cldovrlp ! J. Henderson AER assign namelist variable cldovrlp to existing icld +! Set julian date + juldat = julian ! Select cloud liquid and ice optics parameterization options ! For passing in cloud optical properties directly: @@ -11004,9 +11097,10 @@ SUBROUTINE RRTMG_SWRAD( & permuteseed = 1 ! Sub-column generator for McICA -! mji - Add layer height needed for exponential (icld=4) and exponential-random (icld=5) overlap options - call mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, irng, play, hgt, & + lat = XLAT(i,j) !retrieve scalar latitude for column calculation + call mcica_subcol_sw(iplon, ncol, nlay, icld, permuteseed, irng, play, & cldfrac, ciwpth, clwpth, cswpth, rei, rel, res, taucld, ssacld, asmcld, fsfcld, & + hgt, idcor, juldat, lat, & cldfmcl, ciwpmcl, clwpmcl, cswpmcl, reicmcl, relqmcl, resnmcl, & taucmcl, ssacmcl, asmcmcl, fsfcmcl) diff --git a/phys/module_radiation_driver.F b/phys/module_radiation_driver.F index a4ff071b1e..df8ba0f00d 100644 --- a/phys/module_radiation_driver.F +++ b/phys/module_radiation_driver.F @@ -15,7 +15,7 @@ SUBROUTINE radiation_driver ( & ,GMT ,GSW ,HBOT & ,HTOP ,HBOTR ,HTOPR & ,ICLOUD & - ,cldovrlp & + ,cldovrlp ,idcor & ,ITIMESTEP,JULDAY, JULIAN & ,JULYR ,LW_PHYSICS & ,NCFRCV ,NCFRST ,NPHS & @@ -447,7 +447,7 @@ SUBROUTINE radiation_driver ( & i_start,i_end,j_start,j_end INTEGER, INTENT(IN ) :: STEPRA,ICLOUD,ra_call_offset - INTEGER, INTENT(IN ) :: cldovrlp ! J. Henderson AER: cldovrlp namelist value + INTEGER, INTENT(IN ) :: cldovrlp, idcor ! J. Henderson AER INTEGER, INTENT(IN ) :: alevsiz, no_src_types INTEGER, INTENT(IN ) :: levsiz, n_ozmixm INTEGER, INTENT(IN ) :: paerlev, n_aerosolc, cam_abs_dim1, cam_abs_dim2 @@ -1967,7 +1967,7 @@ SUBROUTINE radiation_driver ( & P8W=p8w,P3D=p,PI3D=pi,DZ8W=dz8w,TSK=tsk,T3D=t, & T8W=t8w,RHO3D=rho,R=R_d,G=G, & ICLOUD=icloud,WARM_RAIN=warm_rain,CLDFRA3D=CLDFRA,& - cldovrlp=cldovrlp, & ! J. Henderson AER: cldovrlp namelist value + cldovrlp=cldovrlp,idcor=idcor,XLAT=XLAT, & #if (EM_CORE == 1) LRADIUS=lradius, IRADIUS=iradius, & #endif @@ -2465,7 +2465,7 @@ SUBROUTINE radiation_driver ( & !ckay ! CLDFRA_KF3D=cldfra_KF,QC_KF3D=qc_KF,QI_KF3D=qi_KF,& ICLOUD=icloud,WARM_RAIN=warm_rain, & - cldovrlp=cldovrlp, & ! J. Henderson AER: cldovrlp namelist value + cldovrlp=cldovrlp,idcor=idcor, & F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY, & XLAND=XLAND,XICE=XICE,SNOW=SNOW, & QV3D=qv,QC3D=qc,QR3D=qr, & diff --git a/run/README.namelist b/run/README.namelist index a8f3872507..633a237a4a 100644 --- a/run/README.namelist +++ b/run/README.namelist @@ -606,6 +606,9 @@ Namelist variables for controlling the adaptive time step option: use the same value for all nests. cldovrlp = 2, ! cloud overlapping option for RRTMG only. 1=random, 2=maximum-random (default), 3=maximum, 4=exponential, 5=exponential-random + idcor = 0, ! decorrelation length flag for cldovrlp=4 or 5 + 0 = constant decorrelation length, 2500 m; + 1 = latitude-varying decorrelation length ra_sw_eclipse = 0, ! eclipse effect on shortwave radiation. 0: off, 1: on. Applies to RRTMG, Goddard, old Goddard and Dudhia schemes diff --git a/share/output_wrf.F b/share/output_wrf.F index bb8da08d8e..8751b2432c 100644 --- a/share/output_wrf.F +++ b/share/output_wrf.F @@ -773,6 +773,8 @@ SUBROUTINE output_wrf ( fid , grid , config_flags, switch , ierr ) CALL wrf_put_dom_ti_integer ( fid, 'SCALAR_PBLMIX', scalar_pblmix , 1 , ierr ) CALL wrf_put_dom_ti_integer ( fid, 'YSU_TOPDOWN_PBLMIX', ysu_topdown_pblmix , 1 , ierr ) CALL wrf_put_dom_ti_integer ( fid, 'GRAV_SETTLING', grav_settling , 1 , ierr ) + CALL wrf_put_dom_ti_integer ( fid, 'CLDOVRLP', config_flags%cldovrlp , 1 , ierr ) + CALL wrf_put_dom_ti_integer ( fid, 'IDCOR', config_flags%idcor , 1 , ierr ) #endif