CCPP Scientific Documentation
v5.0.0
subroutine samfshalcnv::samfshalcnv_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,
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), intent(in)  hpbl,
real(kind=kind_phys), dimension(im,km), intent(out)  ud_mf,
real(kind=kind_phys), dimension(im,km), intent(out)  dt_mf,
real(kind=kind_phys), dimension(im,km), intent(out)  cnvw,
real(kind=kind_phys), dimension(im,km), intent(out)  cnvc,
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)  pgcon,
real(kind=kind_phys), intent(in)  asolfac,
logical, intent(in)  hwrf_samfshal,
character(len=*), intent(out)  errmsg,
integer, intent(out)  errflg 
)

Determine whether to perform aerosol transport

Compute preliminary quantities needed for the static 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.
  • Return to the calling routine if deep convection is present or the surface buoyancy flux is negative.
  • 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 mass fluxes to zero.
  • Determine maximum indices for the parcel starting point (kbm) and cloud top (kmax).
  • Calculate hydrostatic height at layer centers assuming a flat surface (no terrain) from the geopotential.
  • Calculate interface height
  • Find the index for the PBL top using the PBL height; enforce that it is lower than the maximum parcel starting level.
  • Convert prsl from centibar to millibar, set normalized mass flux 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 in the PBL for the level of maximum moist static energy to start the ascending parcel.
  • Calculate the temperature, water vapor mixing ratio, 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.
  • Search below the index "kbm" 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.
  • 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. The normalized mass flux increases upward below the cloud base and decreases upward above.
  • 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; the maximum possible value is at \(p=0.7p_{sfc}\).
  • 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. Above the level of minimum moist static energy, some of the cloud water is detrained into the grid-scale cloud water from every cloud layer with a rate of 0.0005 \(m^{-1}\) (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. Overshooting is also limited to the level where \(p=0.7p_{sfc}\).
  • 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 in the overshooting layers.
  • Calculate updraft velocity square(wu2) according to Han et al.'s (2017) [79] equation 7.
  • Calculate the mean updraft velocity within the cloud (wc).
  • => Separate the total updraft cloud water at cloud top into vapor and condensate.

Calculate the tendencies of the state variables (per unit cloud base mass flux) and the cloud base mass flux.

  • Calculate the change in moist static energy, moisture mixing ratio, and horizontal winds per unit cloud base mass flux for all layers below cloud top from equations B.14 and B.15 from Grell (1993) [73], and for the cloud top from B.16 and B.17.
  • Following Bechtold et al. (2008) [16], calculate the convective turnover time 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. 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 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.

  • Recalculate saturation specific humidity.
  • 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 shallow 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.
  • Store aerosol concentrations if present
  • Calculate and retain the updraft mass flux for dust transport by cumulus convection.
  • Calculate the updraft convective mass flux.
  • save the updraft convective mass flux at cloud top.

References funcphys::fpvs().

Here is the call graph for this function: