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 doi:10.1007/s00382-002-0268-2). 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:
TimeDependentProcess
Climlab 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:
depth
Depth at grid centers (m)
depth_bounds
Depth at grid interfaces (m)
diagnostics
Dictionary access to all diagnostic variables
input
Dictionary access to all input variables
lat
Latitude of grid centers (degrees North)
lat_bounds
Latitude of grid interfaces (degrees North)
lev
Pressure levels at grid centers (hPa or mb)
lev_bounds
Pressure levels at grid interfaces (hPa or mb)
lon
Longitude of grid centers (degrees)
lon_bounds
Longitude of grid interfaces (degrees)
timestep
The amount of time over which
step_forward()
is integrating in unit seconds.
Methods
add_diagnostic
(name[, value])Create a new diagnostic variable called
name
for this process and initialize it with the givenvalue
.add_input
(name[, value])Create a new input variable called
name
for this process and initialize it with the givenvalue
.add_subprocess
(name, proc)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
inputlist
to the list of diagnostics.declare_input
(inputlist)Add the variable names in
inputlist
to 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.diagnostic
dictionary 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
name
to a new statevalue
.set_timestep
([timestep, num_steps_per_year])Calculates the timestep in unit seconds and calls the setter function of
timestep()
step_forward
()Updates state variables with computed tendencies.
to_xarray
([diagnostics, timeave])Convert process variables to
xarray.Dataset
format.