earthkit.meteo.thermo.specific_gas_constant¶
- earthkit.meteo.thermo.specific_gas_constant(q: ArrayLike) ArrayLike¶
- earthkit.meteo.thermo.specific_gas_constant(q: xarray.DataArray) xarray.DataArray
- earthkit.meteo.thermo.specific_gas_constant(q: earthkit.data.FieldList) earthkit.data.FieldList
Compute the specific gas constant of moist air.
Specific content of cloud particles and hydrometeors are neglected.
- Parameters:
q (
numberorarray-like) – Specific humidity (kg/kg)- Returns:
Specific gas constant of moist air (J kg-1 K-1)
- Return type:
numberorarray-like
The computation is based on the following formula:
\[R = R_{d} + (R_{v} - R_{d}) q\]where:
\(R_{d}\) is the gas constant for dry air (see
earthkit.meteo.constants.Rd)\(R_{v}\) is the gas constant for water vapour (see
earthkit.meteo.constants.Rv)
Implementations¶
specific_gas_constant()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.thermo.array.specific_gas_constant()for array-likeearthkit.meteo.thermo.xarray.specific_gas_constant()for xarray.DataArrayearthkit.meteo.thermo.fieldlist.specific_gas_constant()for FieldList
The function returns an object of the same type as the input arguments.