quends.preprocessing.netcdf

Functions

from_netcdf(file, variable)

Load a single variable from a NetCDF4 file into a data stream.

Module Contents

quends.preprocessing.netcdf.from_netcdf(file, variable)[source]

Load a single variable from a NetCDF4 file into a data stream.

Variables that end with '_t' or '_st' are extracted from the Diagnostics group and aligned to the time grid. The returned DataStream contains the time column together with the requested variable column.

Parameters:
  • file (str) – Path to the NetCDF4 file.

  • variable (str) – The variable name to load. Must exist in the file.

Returns:

DataStream – A DataStream containing [time, variable].

Raises:

ValueError – If the file does not exist or the variable is not found.


Last update: Aug 11, 2026