CCPP Scientific Documentation
v5.0.0
subroutine samfdeepcnv::samfdeepcnv_run ( integer, intent(in)  im,
integer, intent(in)  km,
integer, intent(in)  itc,
integer, intent(in)  ntc,
real(kind=kind_phys), intent(in)  cliq,
real(kind=kind_phys), intent(in)  cp,
real(kind=kind_phys), intent(in)  cvap,
real(kind=kind_phys), intent(in)  eps,
real(kind=kind_phys), intent(in)  epsm1,
real(kind=kind_phys), intent(in)  fv,
real(kind=kind_phys), intent(in)  grav,
real(kind=kind_phys), intent(in)  hvap,
real(kind=kind_phys), intent(in)  rd,
real(kind=kind_phys), intent(in)  rv,
real(kind=kind_phys), intent(in)  t0c,
real(kind=kind_phys), intent(in)  delt,
integer, intent(in)  ntk,
integer, intent(in)  ntr,
real(kind=kind_phys), dimension(im,km), intent(in)  delp,
real(kind=kind_phys), dimension(im,km), intent(in)  prslp,
real(kind=kind_phys), dimension(im), intent(in)  psp,
real(kind=kind_phys), dimension(im,km), intent(in)  phil,
real(kind=kind_phys), dimension(im,km,ntr+2), intent(inout)  qtr,
real(kind=kind_phys), dimension(im,km), intent(inout)  q1,
real(kind=kind_phys), dimension(im,km), intent(inout)  t1,
real(kind=kind_phys), dimension(im,km), intent(inout)  u1,
real(kind=kind_phys), dimension(im,km), intent(inout)  v1,
real(kind=kind_phys), dimension(:), intent(in)  fscav,
logical, intent(in)  hwrf_samfdeep,
real(kind=kind_phys), dimension(im), intent(out)  cldwrk,
real(kind=kind_phys), dimension(im), intent(out)  rn,
integer, dimension(im), intent(out)  kbot,
integer, dimension(im), intent(out)  ktop,
integer, dimension(im), intent(inout)  kcnv,
integer, dimension(im), intent(in)  islimsk,
real(kind=kind_phys), dimension(im), intent(in)  garea,
real(kind=kind_phys), dimension(im,km), intent(in)  dot,
integer, intent(in)  ncloud,
real(kind=kind_phys), dimension(im,km), intent(out)  ud_mf,
real(kind=kind_phys), dimension(im,km), intent(out)  dd_mf,
real(kind=kind_phys), dimension(im,km), intent(out)  dt_mf,
real(kind=kind_phys), dimension(im,km), intent(inout)  cnvw,
real(kind=kind_phys), dimension(im,km), intent(inout)  cnvc,
real(kind=kind_phys), dimension(:,:), intent(inout)  QLCN,
real(kind=kind_phys), dimension(:,:), intent(inout)  QICN,
real(kind=kind_phys), dimension(:,:), intent(inout)  w_upi,
real(kind=kind_phys), dimension(:,:), intent(inout)  cf_upi,
real(kind=kind_phys), dimension(:,:), intent(inout)  CNV_MFD,
real(kind=kind_phys), dimension(:,:), intent(inout)  CNV_DQLDT,
real(kind=kind_phys), dimension(:,:), intent(inout)  CLCN,
real(kind=kind_phys), dimension(:,:), intent(inout)  CNV_FICE,
real(kind=kind_phys), dimension(:,:), intent(inout)  CNV_NDROP,
real(kind=kind_phys), dimension(:,:), intent(inout)  CNV_NICE,
integer  mp_phys,
integer  mp_phys_mg,
real(kind=kind_phys), intent(in)  clam,
real(kind=kind_phys), intent(in)  c0s,
real(kind=kind_phys), intent(in)  c1,
real(kind=kind_phys), intent(in)  betal,
real(kind=kind_phys), intent(in)  betas,
real(kind=kind_phys), intent(in)  evfact,
real(kind=kind_phys), intent(in)  evfactl,
real(kind=kind_phys), intent(in)  pgcon,
real(kind=kind_phys), intent(in)  asolfac,
logical, intent(in)  do_ca,
logical, intent(in)  ca_closure,
logical, intent(in)  ca_entr,
logical, intent(in)  ca_trigger,
real(kind=kind_phys), intent(in)  nthresh,
real(kind=kind_phys), dimension(:), intent(in)  ca_deep,
real(kind=kind_phys), dimension(:), intent(out)  rainevap,
character(len=*), intent(out)  errmsg,
integer, intent(out)  errflg 
)

Determine whether to perform aerosol transport

Compute preliminary quantities needed for static, dynamic, and feedback control portions of the algorithm.

  • Convert input pressure terms to centibar units.
  • Initialize column-integrated and other single-value-per-column variable arrays.
  • determine aerosol-aware rain conversion parameter over land
  • determine rain conversion parameter above the freezing level which exponentially decreases with decreasing temperature from Han et al.'s (2017) [79] equation 8.
  • Initialize convective cloud water and cloud cover to zero.
  • Initialize updraft and downdraft mass fluxes to zero.
  • Determine maximum indices for the parcel starting point (kbm), LFC (kbmax), and cloud top (kmax).
  • Calculate hydrostatic height at layer centers assuming a flat surface (no terrain) from the geopotential.
  • Calculate interface height
  • Convert prsl from centibar to millibar, set normalized mass fluxes to 1, cloud properties to 0, and save model state variables (after advection/turbulence).
  • Calculate saturation specific humidity and enforce minimum moisture values.
  • Calculate moist static energy (heo) and saturation moist static energy (heso).

Perform calculations related to the updraft of the entraining/detraining cloud model ("static control").

  • Search below index "kbm" for the level of maximum moist static energy.
  • Calculate the temperature, specific humidity, and pressure at interface levels.
  • Recalculate saturation specific humidity, moist static energy, saturation moist static energy, and horizontal momentum on interface levels. Enforce minimum specific humidity and calculate \((1 - RH)\).
  • Search below the index "kbmax" for the level of free convection (LFC) where the condition \(h_b > h^*\) is first met, where \(h_b, h^*\) are the state moist static energy at the parcel's starting level and saturation moist static energy, respectively. Set "kbcon" to the index of the LFC.
  • If no LFC, return to the calling routine without modifying state variables.
  • Determine the vertical pressure velocity at the LFC. After Han and Pan (2011) [77] , determine the maximum pressure thickness between a parcel's starting level and the LFC. If a parcel doesn't reach the LFC within the critical thickness, then the convective inhibition is deemed too great for convection to be triggered, and the subroutine returns to the calling routine without modifying the state variables.
  • In HWRF samfdeep, calculate the entrainment rate according to Han and Pan (2011) [77] , equation 8, after Bechtold et al. (2008) [16], equation 2 given by:

    \[ \epsilon = \epsilon_0F_0 + d_1\left(1-RH\right)F_1 \]

    where \(\epsilon_0\) is the cloud base entrainment rate, \(d_1\) is a tunable constant, and \(F_0=\left(\frac{q_s}{q_{s,b}}\right)^2\) and \(F_1=\left(\frac{q_s}{q_{s,b}}\right)^3\) where \(q_s\) and \(q_{s,b}\) 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.
  • The updraft detrainment rate is vertically constant and proportional to clamt
  • Calculate the normalized mass flux for subcloud and in-cloud layers according to Pan and Wu (1995) [145] equation 1:

    \[ \frac{1}{\eta}\frac{\partial \eta}{\partial z} = \lambda_e - \lambda_d \]

    where \(\eta\) is the normalized mass flux, \(\lambda_e\) is the entrainment rate and \(\lambda_d\) is the detrainment rate.
  • Set cloud properties equal to the state variables at updraft starting level (kb).
  • Calculate the cloud properties as a parcel ascends, modified by entrainment and detrainment. Discretization follows Appendix B of Grell (1993) [73] . Following Han and Pan (2006) [76], the convective momentum transport is reduced by the convection-induced pressure gradient force by the constant "pgcon", currently set to 0.55 after Zhang and Wu (2003) [189] .
  • With entrainment, recalculate the LFC as the first level where buoyancy is positive. The difference in pressure levels between LFCs calculated with/without entrainment must be less than a threshold (currently 25 hPa). Otherwise, convection is inhibited and the scheme returns to the calling routine without modifying the state variables. This is the subcloud dryness trigger modification discussed in Han and Pan (2011) [77].
  • Calculate additional trigger condition of the convective inhibition (CIN) according to Han et al.'s (2017) [79] equation 13.
  • Turn off convection if the CIN is less than a critical value (cinacr) which is inversely proportional to the large-scale vertical velocity.
  • Calculate the cloud top as the first level where parcel buoyancy becomes negative. If the thickness of the calculated convection is less than a threshold (currently 200 hPa), then convection is inhibited, and the scheme returns to the calling routine.
  • To originate the downdraft, search for the level above the minimum in moist static energy. Return to the calling routine without modification if this level is determined to be outside of the convective cloud layers.
  • Calculate the maximum value of the cloud base mass flux using the CFL-criterion-based formula of Han and Pan (2011) [77], equation 7.
  • Set cloud moisture property equal to the enviromental moisture at updraft starting level (kb).
  • Calculate the moisture content of the entraining/detraining parcel (qcko) and the value it would have if just saturated (qrch), according to equation A.14 in Grell (1993) [73] . Their difference is the amount of convective cloud water (qlk = rain + condensate). Determine the portion of convective cloud water that remains suspended and the portion that is converted into convective precipitation (pwo). Calculate and save the negative cloud work function (aa1) due to water loading. The liquid water in the updraft layer is assumed to be detrained from the layers above the level of the minimum moist static energy into the grid-scale cloud water (dellal).
  • Calculate the cloud work function according to Pan and Wu (1995) [145] equation 4:

    \[ A_u=\int_{z_0}^{z_t}\frac{g}{c_pT(z)}\frac{\eta}{1 + \gamma}[h(z)-h^*(z)]dz \]

    (discretized according to Grell (1993) [73] equation B.10 using B.2 and B.3 of Arakawa and Schubert (1974) [7] and assuming \(\eta=1\)) where \(A_u\) is the updraft cloud work function, \(z_0\) and \(z_t\) are cloud base and cloud top, respectively, \(\gamma = \frac{L}{c_p}\left(\frac{\partial \overline{q_s}}{\partial T}\right)_p\) and other quantities are previously defined.
  • If the updraft cloud work function is negative, convection does not occur, and the scheme returns to the calling routine.
  • Continue calculating the cloud work function past the point of neutral buoyancy to represent overshooting according to Han and Pan (2011) [77] . Convective overshooting stops when \( cA_u < 0\) where \(c\) is currently 10%, or when 10% of the updraft cloud work function has been consumed by the stable buoyancy force.
  • For the overshooting convection, calculate the moisture content of the entraining/detraining parcel as before. Partition convective cloud water and precipitation and detrain convective cloud water above the mimimum in moist static energy.
  • Calculate updraft velocity square(wu2) according to Han et al.'s (2017) [79] equation 7.
  • Calculate the mean updraft velocity within the cloud (wc).
  • Swap the indices of the convective cloud top (ktcon) and the overshooting convection top (ktcon1) to use the same cloud top level in the calculations of \(A^+\) and \(A^*\).
  • Separate the total updraft cloud water at cloud top into vapor and condensate.

Perform calculations related to the downdraft of the entraining/detraining cloud model ("static control").

  • First, in order to calculate the downdraft mass flux (as a fraction of the updraft mass flux), calculate the wind shear and precipitation efficiency according to equation 58 in Fritsch and Chappell (1980) [57] :

    \[ E = 1.591 - 0.639\frac{\Delta V}{\Delta z} + 0.0953\left(\frac{\Delta V}{\Delta z}\right)^2 - 0.00496\left(\frac{\Delta V}{\Delta z}\right)^3 \]

    where \(\Delta V\) is the integrated horizontal shear over the cloud depth, \(\Delta z\), (the ratio is converted to units of \(10^{-3} s^{-1}\)). The variable "edto" is \(1-E\) and is constrained to the range \([0,0.9]\).
  • Next, calculate the variable detrainment rate between the surface and the LFC according to:

    \[ \lambda_d = \frac{1-\beta^{\frac{1}{k_{LFC}}}}{\overline{\Delta z}} \]

    \(\lambda_d\) is the detrainment rate, \(\beta\) is a constant currently set to 0.05, implying that only 5% of downdraft mass flux at LFC reaches the ground surface due to detrainment, \(k_{LFC}\) is the vertical index of the LFC level, and \(\overline{\Delta z}\) is the average vertical grid spacing below the LFC.
  • Calculate the normalized downdraft mass flux from equation 1 of Pan and Wu (1995) [145] . Downdraft entrainment and detrainment rates are constants from the downdraft origination to the LFC.
  • Set initial cloud downdraft properties equal to the state variables at the downdraft origination level.
  • Calculate the cloud properties as a parcel descends, modified by entrainment and detrainment. Discretization follows Appendix B of Grell (1993) [73] .
  • Compute the amount of moisture that is necessary to keep the downdraft saturated.
  • Update the precipitation efficiency (edto) based on the ratio of normalized cloud condensate (pwavo) to normalized cloud evaporate (pwevo).
  • Calculate downdraft cloud work function ( \(A_d\)) according to equation A.42 (discretized by B.11) in Grell (1993) [73] . Add it to the updraft cloud work function, \(A_u\).
  • Check for negative total cloud work function; if found, return to calling routine without modifying state variables.
  • Calculate the change in moist static energy, moisture mixing ratio, and horizontal winds per unit cloud base mass flux near the surface using equations B.18 and B.19 from Grell (1993) [73], for all layers below cloud top from equations B.14 and B.15, and for the cloud top from B.16 and B.17.
  • If grid size is less than a threshold value (dxcrtas: currently 8km), the quasi-equilibrium assumption of Arakawa-Schubert is not used any longer.
  • If grid size is larger than the threshold value (i.e., asqecflg=.true.), the quasi-equilibrium assumption is used to obtain the cloud base mass flux. To begin with, calculate the change in the temperature and moisture profiles per unit cloud base mass flux.

Using the updated temperature and moisture profiles that were modified by the convection on a short time-scale, recalculate the total cloud work function to determine the change in the cloud work function due to convection, or the stabilizing effect of the cumulus.

  • Using notation from Pan and Wu (1995) [145], the previously calculated cloud work function is denoted by \(A^+\). Now, it is necessary to use the entraining/detraining cloud model ("static control") to determine the cloud work function of the environment after the stabilization of the arbitrary convective element (per unit cloud base mass flux) has been applied, denoted by \(A^*\).
  • Recalculate saturation specific humidity.
  • As before, recalculate the updraft cloud work function.
  • As before, recalculate the downdraft cloud work function.
  • Following Bechtold et al. (2008) [16], 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).
  • Calculate advective time scale (tauadv) using a mean cloud layer wind speed.
  • From Han et al.'s (2017) [79] equation 6, calculate cloud base mass flux as a function of the mean updraft velcoity for the grid sizes where the quasi-equilibrium assumption of Arakawa-Schubert is not valid any longer. As discussed in Han et al. (2017) [79] , when dtconv is larger than tauadv, the convective mixing is not fully conducted before the cumulus cloud is advected out of the grid cell. In this case, therefore, the cloud base mass flux is further reduced in proportion to the ratio of tauadv to dtconv.
  • 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) [145] :

    \[ \frac{\partial A}{\partial t}_{LS}=\frac{A^+-cA^0}{\Delta t_{LS}} \]

    Here \(A^0\) is set to zero following Han et al.'s (2017) [79] , implying that the instability is completely eliminated after the convective adjustment time, \(\Delta t_{LS}\).
  • Calculate the stabilization effect of the convection (per unit cloud base mass flux) as in equation 6 of Pan and Wu (1995) [145] :

    \[ \frac{\partial A}{\partial t}_{cu}=\frac{A^*-A^+}{\Delta t_{cu}} \]

    \(\Delta t_{cu}\) is the short timescale of the convection.
  • The cloud base mass flux (xmb) is then calculated from equation 7 of Pan and Wu (1995) [145]

    \[ M_c=\frac{-\frac{\partial A}{\partial t}_{LS}}{\frac{\partial A}{\partial t}_{cu}} \]

    Again when dtconv is larger than tauadv, the cloud base mass flux is further reduced in proportion to the ratio of tauadv to dtconv.

  • If the large scale destabilization is less than zero, or the stabilization by the convection is greater than zero, then the scheme returns to the calling routine without modifying the state variables.
  • 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) [79] equation 4 and 5), following the study by Grell and Freitas (2014) [72].
  • 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) [9] (also see Han et al.'s (2017) [79] 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) [79] equation 2).
  • Transport aerosols if present

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.

  • Calculate the temperature tendency from the moist static energy and specific humidity tendencies.
  • Update the temperature, specific humidity, and horiztonal wind state variables by multiplying the cloud base mass flux-normalized tendencies by the cloud base mass flux.
  • Accumulate column-integrated tendencies.
  • Recalculate saturation specific humidity using the updated temperature.
  • Add up column-integrated convective precipitation by multiplying the normalized value by the cloud base mass flux.
  • Determine the evaporation of the convective precipitation and update the integrated convective precipitation.
  • Update state temperature and moisture to account for evaporation of convective precipitation.
  • Update column-integrated tendencies to account for evaporation of convective precipitation.
  • Calculate convective cloud water.
  • Calculate convective cloud cover, which is used when pdf-based cloud fraction is used (i.e., pdfcld=.true.).
  • Separate detrained cloud water into liquid and ice species as a function of temperature only.
  • If convective precipitation is zero or negative, reset the updated state variables back to their original values (negating convective changes).
  • Store aerosol concentrations if present
  • Calculate and retain the updraft and downdraft mass fluxes for dust transport by cumulus convection.
  • Calculate the updraft convective mass flux.
  • save the updraft convective mass flux at cloud top.
  • Calculate the downdraft convective mass flux.

References funcphys::fpvs(), and scale().

Here is the call graph for this function: