meteodatalab.operators.rho

Algorithm to compute the density (rho).

Functions

compute_rho_tot(t, p, qv, qc[, qi, qp])

Total density of air mixture.

meteodatalab.operators.rho.compute_rho_tot(t: DataArray, p: DataArray, qv: DataArray, qc: DataArray, qi: DataArray | None = None, qp: DataArray | None = None) DataArray[source]

Total density of air mixture.

Assumes perfect gas law, pressure as sum of partial pressures.

Parameters:
  • t (xarray.DataArray) – Temperature [Kelvin]

  • p (xarray.DataArray) – Pressure [Pascal]

  • qv (xarray.DataArray) – Specific humidity [kg/kg]

  • qc (xarray.DataArray) – Specific cloud water content [kg/kg]

  • qi (xarray.DataArray, optional) – Specific cloud ice content [kg/kg]

  • qp (xarray.DataArray, optional) – Specific precipitable components content [kg/kg]

Returns:

Total density of air mixture [kg/m**3]

Return type:

xarray.DataArray