meteodatalab.operators.relhum

Relative humidity operators.

Functions

relhum(qv, t, p[, clipping, phase])

Calculate relative humidity.

meteodatalab.operators.relhum.relhum(qv, t, p, clipping=True, phase: Literal['water', 'ice', 'water+ice'] = 'water')[source]

Calculate relative humidity.

Parameters:
  • qv (xarray.DataArray) – water vapor mixing ratio

  • t (xarray.DataArray) – temperature in Kelvin

  • p (xarray.DataArray) – pressure in Pa

  • clipping (bool) – clips the relative humidity to [0,100] interval. Only upper bound is controlled by this parameter, since lower bound clipping is always performed.

  • phase (Literal["water", "ice", "water+ic"]) – Customizes how relative humidity is computed. ‘water’ over water ‘ice’ over ice ‘water+ice’ over mixed phase

Returns:

relative humidity field in %

Return type:

xarray.DataArray