LargeScaleCondensation

climlab process for large-scale condensation
The process object climlab.dynamics.LargeScaleCondensation does the following at each timestep:
Calculate saturation specific humidity given air temperatures at every grid point
Calculate supersaturation by comparing actual specific humidity to saturation specific humidity
Compute a specific humidity tendency based on a relaxation toward saturation (if supersaturated)
Compute a heating rate and temperature tendency due to the latent heating of condensation
Compute precipitation rate at the surface, assuming all condensate in each column is instantly precipitated
State variables:
Tatm: air temperature in Kq: specific humidity in kg kg-1
Input parameters and default values:
condensation_time: condensation time constant in units of seconds (default: 4 hours)RH_ref: reference relative humidity value, dimensionless (default value 0.9)
Diagnostics:
latent_heating: latent heating rate (every grid cell) in units of W m-2precipitation: precipitation rate (column total) in units of kg m-2 s-1 or mm s-1
The condensation rule follows the SPEEDY model [Molteni, 2003]. Condensation is modeled as a relaxation of relative humidity toward a specified profile wherever the tropospheric relative humidity exceeds the target.
Given specific humidity \(q\) and saturation specific humidity \(q_{sat}(T,p)\), relative humidity is calculated from
which is compared against a specified reference profile \(r_{lsc}\) which may vary spatially.
At grid cells where \(r > r_{lsc}\), the specific humidity tendency is calculated from
and is zero otherwise.
The two parameters of the scheme are the relaxation time constant \(\tau_{lsc}\) and the reference RH profile \(r_{lsc}\).
We follow SPEEDY and set an “aggressive” default time constant \(\tau_{lsc} = 4\) hours.
For the reference profile, SPEEDY sets a smoothly decreasing vertical profile with \(r_{lsc} = 0.9\) at the surface and \(r_{lsc} \approx 0.8\) at the tropopause. For simplicity, we will default to a uniform default value of \(r_{lsc} = 0.9\).
The temperature tendency due to latent heating (in units of K s-1) is calculated from
with the associated heating rate diagnostic (in units of W m-2) computed from
where \(C = \frac{c_p dp}{g}\) is the heat capacity per unit area in J K-1 m-2, and the precipitation rate is calculated from the vertical integral:
or equivalently
where the integral implies a sum over all grid cells in each atmospheric column.
- class climlab.dynamics.large_scale_condensation.LargeScaleCondensation(condensation_time=14400.0, RH_ref=0.9, **kwargs)[source]
Bases:
TimeDependentProcessClimlab process class for LargeScaleCondensation. Condensation is modeled as a relaxation of relative humidity toward a specified reference value wherever the tropospheric relative humidity exceeds the target.
State variables:
Tatm: air temperature in Kq: specific humidity in kg kg-1
Input parameters and default values:
condensation_time: condensation time constant in units of seconds (default: 4 hours)RH_ref: reference relative humidity value, dimensionless (default value 0.9)
Diagnostics:
latent_heating: latent heating rate (every grid cell) in units of W m-2precipitation: precipitation rate (column total) in units of kg m-2 s-1 or mm s-1
- Attributes:
- current_time
depthDepth at grid centers (m)
depth_boundsDepth at grid interfaces (m)
diagnosticsDictionary access to all diagnostic variables
- elapsed_time
inputDictionary access to all input variables
latLatitude of grid centers (degrees North)
lat_boundsLatitude of grid interfaces (degrees North)
levPressure levels at grid centers (hPa or mb)
lev_boundsPressure levels at grid interfaces (hPa or mb)
lonLongitude of grid centers (degrees)
lon_boundsLongitude of grid interfaces (degrees)
timestepThe amount of time over which
step_forward()is integrating in unit seconds.timestep_in_secondsReturn a float value representing the timestep in units of seconds
Methods
add_diagnostic(name[, value])Create a new diagnostic variable called
namefor this process and initialize it with the givenvalue.add_input(name[, value])Create a new input variable called
namefor this process and initialize it with the givenvalue.add_subprocess(name, proc[, verbose])Adds a single subprocess to this process.
add_subprocesses(procdict)Adds a dictionary of subproceses to this process.
compute()Computes the tendencies for all state variables given current state and specified input.
compute_diagnostics([num_iter])Compute all tendencies and diagnostics, but don't update model state.
declare_diagnostics(diaglist)Add the variable names in
inputlistto the list of diagnostics.declare_input(inputlist)Add the variable names in
inputlistto the list of necessary inputs.integrate_converge([crit, verbose])Integrates the model until model states are converging.
integrate_days([days, verbose])Integrates the model forward for a specified number of days.
integrate_years([years, verbose])Integrates the model by a given number of years.
remove_diagnostic(name)Removes a diagnostic from the
process.diagnosticdictionary and also delete the associated process attribute.remove_subprocess(name[, verbose])Removes a single subprocess from this process.
set_state(name, value)Sets the variable
nameto a new statevalue.step_forward()Updates state variables with computed tendencies.
to_xarray([diagnostics, timeave])Convert process variables to
xarray.Datasetformat.