Skip to content

DerivedTCWV

GlobalNVIDIAPyTorch

Import path: earth2studio.models.dx.DerivedTCWV

View source on GitHub View install commands

Documentation

Bases: _DerivedDiagnostic

Calculates the Total Column Water Vapor (TCWV) from specific humidity at pressure levels and surface pressure. The calculation is based on the vertical integration of specific humidity using the trapezoidal rule:

TCWV = (1/g) * ∫(p_top to p_surface) q dp

Discretized as: TCWV ≈ (1/g) * Σ [(q_i + q_{i+1})/2 * (p_i - p_{i+1})]

Note

The integration includes the layer between the surface pressure and the lowest pressure level, assuming the surface specific humidity equals the lowest level specific humidity.

Parameters:

  • levels (list[int], default: [1000, 850, 700, 500, 300, 200, 100] ) –

    Pressure levels (hPa) to use for the integration. They will be sorted internally from highest to lowest pressure. Default is [1000, 850, 700, 500, 300, 200, 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.