multimodemodel.Variable.as_dataarray

multimodemodel.Variable.as_dataarray#

property Variable.as_dataarray#

Return variable as xarray.DataArray.

The DataArray object contains a copy of (not a reference to) the data attribute of the variable. The horizontal coordinates are multidimensional arrays to support curvilinear grids and copied from the grids x and y attribute. Grid points for which the mask of the grid equals to 0 are converted to NaNs.

Raises:

ModuleNotFoundError – Raised if xarray is not present.