metobs_toolkit.dataset.Dataset.to_xr#

Dataset.to_xr() xrDataset[source]#

Concatenate multiple station Datasets into one along a new ‘name’ dimension.

All per-station variables retain their internal ‘kind’ dimension (e.g. combinations of ‘obs’, ‘label’, ‘model’). Only variables common across stations will align cleanly (xarray merge semantics apply).

Parameters:
  • dataset (Dataset) – Collection of Station objects.

  • fmt_datetime_coordinate (bool, optional) – If True, format datetime for CF compliance. Default is True.

Returns:

Multi-station Dataset with a ‘name’ dimension plus any variable dimensions such as (‘kind’, ‘datetime’).

Return type:

xarray.Dataset