CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches

◆ shalcnv_run()

subroutine, public shalcnv::shalcnv_run ( real(kind=kind_phys), intent(in) grav,
real(kind=kind_phys), intent(in) cp,
real(kind=kind_phys), intent(in) hvap,
real(kind=kind_phys), intent(in) rv,
real(kind=kind_phys), intent(in) fv,
real(kind=kind_phys), intent(in) t0c,
real(kind=kind_phys), intent(in) rd,
real(kind=kind_phys), intent(in) cvap,
real(kind=kind_phys), intent(in) cliq,
real(kind=kind_phys), intent(in) eps,
real(kind=kind_phys), intent(in) epsm1,
integer, intent(in) im,
integer, intent(in) km,
integer, intent(in) jcap,
real(kind=kind_phys), intent(in) delt,
real(kind=kind_phys), dimension(:,:), intent(in) delp,
real(kind=kind_phys), dimension(:,:), intent(in) prslp,
real(kind=kind_phys), dimension(:), intent(in) psp,
real(kind=kind_phys), dimension(:,:), intent(in) phil,
real(kind=kind_phys), dimension(:,:), intent(inout) qlc,
real(kind=kind_phys), dimension(:,:), intent(inout) qli,
real(kind=kind_phys), dimension(:,:), intent(inout) q1,
real(kind=kind_phys), dimension(:,:), intent(inout) t1,
real(kind=kind_phys), dimension(:,:), intent(inout) u1,
real(kind=kind_phys), dimension(:,:), intent(inout) v1,
real(kind=kind_phys), dimension(:), intent(out) rn,
integer, dimension(:), intent(inout) kbot,
integer, dimension(:), intent(inout) ktop,
integer, dimension(:), intent(inout) kcnv,
integer, dimension(:), intent(in) islimsk,
real(kind=kind_phys), dimension(:,:), intent(in) dot,
integer, intent(in) ncloud,
real(kind=kind_phys), dimension(:), intent(in) hpbl,
real(kind=kind_phys), dimension(:), intent(in) heat,
real(kind=kind_phys), dimension(:), intent(in) evap,
real(kind=kind_phys), dimension(:,:), intent(out), optional ud_mf,
real(kind=kind_phys), dimension(:,:), intent(out) dt_mf,
real(kind=kind_phys), dimension(:,:), intent(inout) cnvw,
real(kind=kind_phys), dimension(:,:), intent(inout) cnvc,
real(kind=kind_phys), intent(in) clam,
real(kind=kind_phys), intent(in) c0,
real(kind=kind_phys), intent(in) c1,
real(kind=kind_phys), intent(in) pgcon,
character(len=*), intent(out) errmsg,
integer, intent(out) errflg )

This routine follows the Simplified Arakawa-Schubert Deep Convection scheme quite closely, although it can be interpreted as only having the "static" and "feedback" control portions, since the "dynamic" control is not necessary to find the cloud base mass flux. The algorithm is simplified from SAS deep convection by excluding convective downdrafts and being confined to operate below \(p=0.7p_{sfc}\). Also, entrainment is both simpler and stronger in magnitude compared to the deep scheme.

Parameters
[in]imhorizontal dimension
[in]kmvertical layer dimension
[in]jcapnumber of spectral wave trancation
[in]deltphysics time step in seconds
[in]delppressure difference between level k and k+1 (Pa)
[in]prslpmean layer presure (Pa)
[in]pspsurface pressure (Pa)
[in]phillayer geopotential ( \(m^2/s^2\))
[in,out]qlccloud water (kg/kg)
[in,out]qliice (kg/kg)
[in,out]q1updated tracers (kg/kg)
[in,out]t1updated temperature (K)
[in,out]u1updated zonal wind ( \(m s^{-1}\))
[in,out]v1updated meridional wind ( \(m s^{-1}\))
[out]rnconvective rain (m)
[out]kbotindex for cloud base
[out]ktopindex for cloud top
[out]kcnvflag to denote deep convection (0=no, 1=yes)
[in]islimsksea/land/ice mask (=0/1/2)
[in]dotlayer mean vertical velocity (Pa/s)
[in]ncloudnumber of cloud species
[in]hpblPBL height (m)
[in]heatsurface sensible heat flux (K m/s)
[in]evapsurface latent heat flux (kg/kg m/s)
[out]ud_mfupdraft mass flux multiplied by time step ( \(kg/m^2\))
[out]dt_mfud_mf at cloud top ( \(kg/m^2\))
[out]cnvwconvective cloud water (kg/kg)
[out]cnvcconvective cloud cover (unitless)

General Algorithm

  1. Compute preliminary quantities needed for the static and feedback control portions of the algorithm.
  2. Perform calculations related to the updraft of the entraining/detraining cloud model ("static control").
  3. Calculate the tendencies of the state variables (per unit cloud base mass flux) and the cloud base mass flux.
  4. 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.

Detailed Algorithm

Argument Table

shalcnv_run argument table
local_namestandard_namelong_nameunitstypedimensionskindintent
gravgravitational_accelerationgravitational accelerationm s-2real()kind_physin
cpspecific_heat_of_dry_air_at_constant_pressurespecific heat of dry air at constant pressureJ kg-1 K-1real()kind_physin
hvaplatent_heat_of_vaporization_of_water_at_0clatent heat of evaporation/sublimationJ kg-1real()kind_physin
rvgas_constant_water_vaporideal gas constant for water vaporJ kg-1 K-1real()kind_physin
fvratio_of_vapor_to_dry_air_gas_constants_minus_one(rv/rd) - 1 (rv = ideal gas constant for water vapor)nonereal()kind_physin
t0ctemperature_at_zero_celsiustemperature at 0 degree CelsiusKreal()kind_physin
rdgas_constant_of_dry_airideal gas constant for dry airJ kg-1 K-1real()kind_physin
cvapspecific_heat_of_water_vapor_at_constant_pressurespecific heat of water vapor at constant pressureJ kg-1 K-1real()kind_physin
cliqspecific_heat_of_liquid_water_at_constant_pressurespecific heat of liquid water at constant pressureJ kg-1 K-1real()kind_physin
epsratio_of_dry_air_to_water_vapor_gas_constantsrd/rvnonereal()kind_physin
epsm1ratio_of_dry_air_to_water_vapor_gas_constants_minus_one(rd/rv) - 1nonereal()kind_physin
imhorizontal_loop_extenthorizontal loop extentcountinteger()in
kmvertical_layer_dimensionnumber of vertical levelscountinteger()in
jcapnumber_of_spectral_wave_truncation_for_simplified_arakawa_schubert_convectionnumber of spectral wave trancation used only by sascnv and shalcnvcountinteger()in
delttimestep_for_physicsphysics timestepsreal()kind_physin
delpair_pressure_difference_between_midlayersair pressure difference between midlayersPareal(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physin
prslpair_pressuremean layer pressurePareal(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physin
pspsurface_air_pressuresurface pressurePareal(ccpp_constant_one:horizontal_loop_extent)kind_physin
philgeopotentialgeopotential at model layer centersm2 s-2real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physin
qlccloud_condensed_water_mixing_ratio_convective_transport_tracerratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer arraykg kg-1real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physinout
qliice_water_mixing_ratio_convective_transport_tracerratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer arraykg kg-1real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physinout
q1specific_humidity_of_new_statewater vapor specific humidity updated by physicskg kg-1real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physinout
t1air_temperature_of_new_statetemperature updated by physicsKreal(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physinout
u1x_wind_of_new_statezonal wind updated by physicsm s-1real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physinout
v1y_wind_of_new_statemeridional wind updated by physicsm s-1real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physinout
rnlwe_thickness_of_shallow_convective_precipitation_amountshallow convective rainfall amount on physics timestepmreal(ccpp_constant_one:horizontal_loop_extent)kind_physout
kbotvertical_index_at_cloud_baseindex for cloud baseindexinteger(ccpp_constant_one:horizontal_loop_extent)inout
ktopvertical_index_at_cloud_topindex for cloud topindexinteger(ccpp_constant_one:horizontal_loop_extent)inout
kcnvflag_deep_convectiondeep convection: 0=no, 1=yesflaginteger(ccpp_constant_one:horizontal_loop_extent)inout
islimsksea_land_ice_masklandmask: sea/land/ice=0/1/2flaginteger(ccpp_constant_one:horizontal_loop_extent)in
dotlagrangian_tendency_of_air_pressurelayer mean vertical velocityPa s-1real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physin
ncloudnumber_of_condensate_speciesnumber of cloud condensate typescountinteger()in
hpblatmosphere_boundary_layer_thicknesspbl heightmreal(ccpp_constant_one:horizontal_loop_extent)kind_physin
heatkinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetationkinematic surface upward sensible heat flux reduced by surface roughness and vegetationK m s-1real(ccpp_constant_one:horizontal_loop_extent)kind_physin
evapsurface_upward_specific_humidity_fluxkinematic surface upward latent heat fluxkg kg-1 m s-1real(ccpp_constant_one:horizontal_loop_extent)kind_physin
ud_mfinstantaneous_atmosphere_updraft_convective_mass_flux(updraft mass flux) * deltkg m-2real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physout
dt_mfinstantaneous_atmosphere_detrainment_convective_mass_flux(detrainment mass flux) * deltkg m-2real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physout
cnvwconvective_cloud_water_mixing_ratiomoist convective cloud water mixing ratiokg kg-1real(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physinout
cnvcconvective_cloud_coverconvective cloud coverfracreal(ccpp_constant_one:horizontal_loop_extent, ccpp_constant_one:vertical_layer_dimension)kind_physinout
clamentrainment_rate_coefficient_for_shallow_convectionentrainment rate coefficient for shallow convectionnonereal()kind_physin
c0rain_conversion_parameter_for_shallow_convectionconvective rain conversion parameter for shallow convectionm-1real()kind_physin
c1detrainment_conversion_parameter_for_shallow_convectionconvective detrainment conversion parameter for shallow convectionm-1real()kind_physin
pgconmomentum_transport_reduction_factor_due_to_pressure_gradient_force_for_shallow_convectionreduction factor in momentum transport due to shallow convection induced pressure gradient forcefracreal()kind_physin
errmsgccpp_error_messageerror message for error handling in CCPPnonecharacter()len=*out
errflgccpp_error_codeerror code for error handling in CCPP1integer()out

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

  • Convert input pressure terms to centibar units.
  • Compute the surface buoyancy flux according to

    \[ \overline{w'\theta_v'}=\overline{w'\theta'}+\left(\frac{R_v}{R_d}-1\right)T_0\overline{w'q'} \]

    where \(\overline{w'\theta'}\) is the surface sensible heat flux, \(\overline{w'q'}\) is the surface latent heat flux, \(R_v\) is the gas constant for water vapor, \(R_d\) is the gas constant for dry air, and \(T_0\) is a reference temperature.
  • Initialize column-integrated and other single-value-per-column variable arrays.
  • Initialize updraft and detrainment mass fluxes to zero.
  • Return to the calling routine if deep convection is present or the surface buoyancy flux is negative.
  • Define tunable parameters.
  • 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 and the entrainment rate as an inverse function of 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 mixing ratio 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 mixing ratio, moist static energy, saturation moist static energy, and horizontal momentum on interface levels. Enforce minimum mixing ratios.
  • 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) [80] , 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 set constant and equal to the entrainment rate at cloud base.
  • Calculate the normalized mass flux for subcloud and in-cloud layers according to Pan and Wu (1995) [166] 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 initial cloud properties equal to the state variables at cloud base.
  • Calculate the cloud properties as a parcel ascends, modified by entrainment and detrainment. Discretization follows Appendix B of Grell (1993) [75] . Following Han and Pan (2006) [79], 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) [222] .
  • 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) [80].
  • 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) [80], equation 7.
  • Initialize the cloud moisture at cloud base and set the cloud work function to zero.
  • 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) [75] . 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) [166] 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) [75] equation B.10 using B.2 and B.3 of Arakawa and Schubert (1974) [6] 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) [80] . 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.
  • => 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) [75], and for the cloud top from B.16 and B.17.
  • Calculate the cloud base mass flux according to equation 6 in Grant (2001) [72], based on the subcloud layer convective velocity scale, \(w_*\).

    \[ M_c = 0.03\rho w_* \]

    where \(M_c\) is the cloud base mass flux, \(\rho\) is the air density, and \(w_*=\left(\frac{g}{T_0}\overline{w'\theta_v'}h\right)^{1/3}\) with \(h\) the PBL height and other quantities have been defined previously.

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 shallow convective cloud cover.
  • Separate detrained cloud water into liquid and ice species as a function of temperature only.
  • Calculate the updraft shallow convective mass flux.
  • Calculate the detrainment mass flux at shallow cloud top.

Definition at line 90 of file shalcnv.F.