earth2studio.models.dx.DerivedWS#

class earth2studio.models.dx.DerivedWS(levels=[100])[source]#

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], optional) – 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]

__call__(x, coords)[source]#

Forward pass of diagnostic

Parameters:
  • x (Tensor)

  • coords (OrderedDict[str, ndarray])

Return type:

tuple[Tensor, OrderedDict[str, ndarray]]