Skip to content

DerivedRH

GlobalNVIDIAPyTorch

Import path: earth2studio.models.dx.DerivedRH

View source on GitHub View install commands

Documentation

Bases: _DerivedDiagnostic

Calculates the relative humidity (RH) from specific humidity and temperature for specified pressure levels. Based on the calculations ECMWF uses in the IFS numerical simulator which accounts for estimating the water vapor and ice present in the atmosphere.

Note

See reference, equation 7.98 onwards:

Parameters:

  • levels (list[int | str], default: [100] ) –

    hPa Pressure levels to compute RH. The resulting expected input fields are specific humidity and temperature pairs for each pressure level. E.g. for level 100 hPa the input fields should be [t100, q100], by default [100]

  • grid (str | GridDefinition, default: 'latlon-0.25deg' ) –

    Spatial grid configured before coordinate planning, by default "latlon-0.25deg"

__call__

__call__(x: DataArray) -> DataArray

Compute derived fields on the input device.

Parameters:

  • x (DataArray) –

    NumPy- or CuPy-backed input with the declared trailing dimensions.

Returns:

  • DataArray –

    Derived fields with the input name, encoding and unaffected metadata.