eoio.readers.generic_netcdf.data_io module

eoio.readers.generic_netcdf.data_io module#

eoio.readers.generic_netcdf.data_io#

Data I/O utilities for netCDF datasets, shared by the generic netCDF reader and the ECMWF reader.

Functions#

read_dataset(*, ds[, include_vars, subset])

Select variables from a dataset and apply subsetting.

eoio.readers.generic_netcdf.data_io.read_dataset(*, ds: Dataset, include_vars: List[str] | None = None, subset: Any | None = None) → Dataset[source]#

Select variables from a dataset and apply subsetting.

Parameters:
  • ds – The input dataset.

  • include_vars – Variables to include in the output dataset.

  • subset – Resolved subsetting information. Duck-typed rather than tied to one dataclass: each reader owns its own subset type (e.g. GENERIC_NETCDFSubset, ECMWFSubset) and only the attributes present are applied, so a reader that resolves no ROI or no datetime range simply omits those fields.

Returns:

The subsetted dataset containing only the selected variables.