improver.psychrometric_calculations.cloud_condensation_level module#

Module to contain CloudCondensationLevel plugin.

class CloudCondensationLevel(model_id_attr=None)[source]#

Bases: PostProcessingPlugin

Derives the temperature and pressure of the convective cloud condensation level from near-surface values of temperature, pressure and humidity mixing ratio.

__init__(model_id_attr=None)[source]#

Set up class

Parameters:

model_id_attr (str) – Name of model ID attribute to be copied from source cubes to output cube

_abc_impl = <_abc._abc_data object>#
_iterate_to_ccl()[source]#

Uses a Newton iterator to find the pressure level where the adiabatically-adjusted temperature equals the saturation temperature. Returns pressure and temperature arrays.

Return type:

Tuple[ndarray, ndarray]

_make_ccl_cube(data, is_temperature)[source]#

Puts the data array into a CF-compliant cube

Return type:

Cube

process(*cubes)[source]#

Calculates the cloud condensation level from the near-surface inputs. Values will be limited to the surface values where the calculated pressure is greater than the original pressure, which can occur in super-saturated conditions.

Parameters:

cubes (Union[Cube, CubeList]) – Cubes of temperature (K), pressure (Pa) and humidity mixing ratio (kg kg-1)

Return type:

CubeList[Cube, Cube]

Returns:

Cubes of air_temperature_at_cloud_condensation_level and air_pressure_at_cloud_condensation_level

class MetaCloudCondensationLevel(model_id_attr=None)[source]#

Bases: PostProcessingPlugin

Meta-plugin which handles the calling of HumidityMixingRatio followed by CloudCondensationLevel. Derives the temperature and pressure of the convective cloud condensation level from near-surface values of temperature, pressure and humidity mixing ratio.

__init__(model_id_attr=None)[source]#

Set up class

Parameters:

model_id_attr (str) – Name of model ID attribute to be copied from source cubes to output cube

_abc_impl = <_abc._abc_data object>#
process(*cubes)[source]#

Call HumidityMixingRatio followed by CloudCondensationLevel to calculate cloud condensation level.

Parameters:

cubes (Union[Cube, CubeList]) – Cubes of temperature (K), pressure (Pa) and humidity (1).

Return type:

CubeList[Cube, Cube]

Returns:

Cubes of air_temperature_at_cloud_condensation_level and air_pressure_at_cloud_condensation_level