Skip to content

DerivedWS

GlobalNVIDIAPyTorch

Import path: earth2studio.models.dx.DerivedWS

View source on GitHub View install commands

Documentation

Bases: _DerivedDiagnostic

Calculates the Wind Speed (WS) magnitude from eastward and northward wind components for specified levels. The calculation is based on the formula: ws = sqrt(u^2 + v^2)

Parameters:

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

    Pressure / height levels to compute WS for. The resulting expected input fields are u and v wind components pairs for each level. E.g. for level 100 the input fields should be [u100, v100], 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.