metobs_toolkit.modeltimeseries.ModelTimeSeries.to_xr#
- ModelTimeSeries.to_xr() xarray.Dataset[source]#
Convert a model time series object to an xarray Dataset.
The returned Dataset contains a single variable named after the observation type (e.g. ‘temperature’). Its DataArray has three dimensions:
- kind: distinguishes the nature of the stacked data. For model
time series this contains a single value: ‘model’.
models: the model name (length 1 here, prepared for concatenation).
datetime: timestamps of the model output.
Attributes on the variable describe the observation type and model metadata.
- Parameters:
modeltimeseries (ModelTimeseries) – Object holding a time-indexed pandas Series and related metadata.
- Returns:
Dataset with dimensions (‘kind’, ‘models’, ‘datetime’) where kind = [‘model’].
- Return type:
xarray.Dataset