開発版ドキュメント · 0.2.3 30c2f8ba · 入門例の検証対象 0.2.3 · 版情報 · 既知の制限

gwexpy.interop.wrf_#

Interoperability with wrf.getvar() output from wrf-python.

Functions

from_wrf_variable(cls, da, *[, ...])

Convert a wrf.getvar() xarray.DataArray to a ScalarField.

gwexpy.interop.wrf_.from_wrf_variable(cls: type, da: Any, *, vertical_dim: str | None = None, axis0_domain: Literal['time', 'frequency'] = 'time') ScalarField#

Convert a wrf.getvar() xarray.DataArray to a ScalarField.

WRF dimension names are mapped to GWexpy axes:

  • Time / time → axis0

  • west_east → axis1 (x)

  • south_north → axis2 (y)

  • bottom_top → axis3 (z)

2-D XLAT / XLONG coordinates are collapsed to 1-D when the grid is regular.

パラメータ:
  • cls (type) -- ScalarField class.

  • da (xarray.DataArray) -- Output of wrf.getvar().

  • vertical_dim (str, optional) -- Override the vertical dimension name. Auto-detected from bottom_top / bottom_top_stag when None.

  • axis0_domain ({"time", "frequency"}, default "time") -- Physical domain of axis0.

戻り値の型:

ScalarField