ConvectiveAdjustment

- class climlab.convection.convadj.ConvectiveAdjustment(adj_lapse_rate=None, **kwargs)[source]
Bases:
TimeDependentProcessHard Convective Adjustment to a prescribed lapse rate.
This process computes the instantaneous adjustment to conservatively remove any instabilities in each column.
Instability is defined as a temperature decrease with height that exceeds the prescribed critical lapse rate. This critical rate is set by input argument
adj_lapse_rate, which can be either a numerical or string value.Numerical values for
adj_lapse_rateare given in units of K / km. Both array and scalar values are valid. For scalar values, the assumption is that the critical lapse rate is the same at every level.If an array is given, it is assumed to represent the in-situ critical lapse rate (in K/km) at every grid point.
Alternatively, string arguments can be given as follows:
'DALR'or'dry adiabat': critical lapse rate is set to g/cp = 9.8 K / km'MALR'or'moist adiabat'or'pseudoadiabat': critical lapse rate follows the in-situ moist pseudoadiabat at every level
Adjustment includes the surface if
'Ts'is included in thestatedictionary. This implicitly accounts for turbulent surface fluxes. Otherwise only the atmospheric temperature is adjusted.If
adj_lapse_rateis an array, its size must match the number of vertical levels of the adjustment. This is number of pressure levels if the surface is not adjusted, or number of pressure levels + 1 if the surface is adjusted.This process implements the conservative adjustment algorithm described in Akmaev (1991) Monthly Weather Review.
- Attributes:
- Tcol
- adj_lapse_rate
- ccol
- 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)
- pcol
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.- property Tcol
- property adj_lapse_rate
- property ccol
- property pcol