radarx.retrieve.coldpool.cold_pool_perturbation#

radarx.retrieve.coldpool.cold_pool_perturbation(obj, reference, *, dim='time', variables=None, n_threads=None, engine='auto')[source]#

Perturbations from a reference state and the buoyancy.

The buoyancy is that of buoyancy() (Markowski and Richardson [1], without condensate loading). The choice of reference (a pre-storm window or sounding) is the caller’s; no published threshold is applied.

Parameters:
  • obj (xarray.Dataset) – Observations with temperature and pressure (and humidity), e.g. stations on (station, time) or a post-storm sounding on height. Missing potential temperatures are computed with potential_temperatures().

  • reference (slice, xarray.Dataset) – The reference state: a slice of dim (e.g. a pre-storm time window) averaged over that window for every other coordinate (every station), or a Dataset (e.g. a pre-storm sounding) with the same variables. A reference sounding on other heights is interpolated to the heights of obj (radarx.io.sounding.interpolate_profile()).

  • dim (str, optional) – Dimension that reference slices. Default "time".

  • variables (list of str, optional) – Variables to perturb. Default: the potential temperatures, temperature, pressure, dewpoint and mixing_ratio where present.

  • engine, n_threads (optional) – For potential_temperatures().

Returns:

xarray.Dataset – <name>_perturbation for every variable (the observation minus the reference), the reference virtual_potential_temperature_reference and buoyancy from the virtual potential temperature.

Notes

Dask. This function computes the dask array: it works on small in-memory data. The input is loaded into memory and the result is held in memory.

References