HardAdjustment

class konrad.convection.HardAdjustment(*args, **kwargs)[source]

Instantaneous adjustment of temperature profiles

__init__(entrainment=None, etol=0.0001)[source]

Initialize the convective adjustment.

Parameters
  • entrainment (konrad.entrainment.Entrainment) – Optional entrainment component.

  • etol (float) – Threshold for the allowed energy difference between the input temperature and the stabilized temperature profile. The threshold is internally scaled using the surface heat capacity, therefore its unit is more relative than physical.

Methods

__init__([entrainment, etol])

Initialize the convective adjustment.

convective_adjustment(atmosphere, lapse, surface)

Find the energy-conserving temperature profile using upper and lower bound profiles (calculated from surface temperature extremes: no change for upper bound and coldest atmospheric temperature for lower bound) and an iterative procedure between them.

convective_profile(atmosphere, surfaceT, ...)

create_and_check_profile(atmosphere, ...[, ...])

Create a convectively adjusted temperature profile and calculate how close it is to satisfying energy conservation.

create_variable(name[, data, dims])

Create a variable in the model component.

from_netcdf(ncfile[, timestep])

Load a model component from a netCDF file.

get(variable[, default, keepdims])

Get values of a given variable.

get_moist_adiabat(atmosphere, surfaceT, ...)

Assuming a particular surface temperature (surfaceT), create a new profile, following the specified lapse rate (lp) for the region where the convectively adjusted atmosphere is warmer than the radiative one.

hash_attributes()

Create a hash from all hashable component attributes.

set(variable, value)

Set the values of a variable.

stabilize(atmosphere, lapse, surface, timestep)

Stabilize the temperature profile by redistributing energy.

to_dataset()

Convert model component into an xarray.Dataset.

update_convective_top(T_rad, T_con, p[, ...])

Find the pressure and temperature where the radiative heating has a certain value.

update_convective_top_height(z[, lim])

Find the height where the radiative heating has a certain value.

Attributes

attrs

Dictionary containing all attributes.

data_vars

Dictionary containing all data variables and their dimensions.

netcdf_subgroups

Define subgroups used when storing to netCDF file.