pycif.plugins.datastreams.fluxes.lmdz_netcdf_reg — API reference#
Configuration reference: lmdz_netcdf_reg plugin
- pycif.plugins.datastreams.fluxes.lmdz_netcdf_reg.read.read(self, name: str, varnames: str, dates: list[tuple[datetime, datetime]], files: list[str], tracer: object | None = None, **kwargs) DataArray[source]#
Not implemented; always raises.
Reading LMDZ fluxes on a regular lat-lon NetCDF grid is not yet supported.
- Parameters:
self – the model Plugin
name (str) – the name of the component
varnames (str) – original name of the variable to read
dates – list of
(start, end)date intervals to extractfiles (list[str]) – list of files matching dates
tracer – the flux tracer plugin
- Raises:
CifNotImplementedError – Always.
- pycif.plugins.datastreams.fluxes.lmdz_netcdf_reg.write.write(self, name: str, path: str | PathLike, data: DataArray, metadata: dict[str, Any] | None = None, **kwargs) None[source]#
Write prescribed species fluxes to a regular lat-lon LMDZ NetCDF file.
Builds coordinates from self.domain.get_domain_coords() (plus a
timecoordinate, if present in data), squeezes thelevdimension of data, and appends the resulting dataset to path.- Parameters:
self – this plugin
name (str) – name of the flux variable to write
path (str) – path to the file to write (or append to)
data (xarray.DataArray) – Data to write
metadata (dict, optional) – Unused, kept for interface consistency with other flux plugins.
- Raises:
CifTypeError – If data is not an xarray.DataArray.