iris.fileformats.netcdf.loader#
Load Iris cubes from NetCDF files and OPeNDAP URLs.
Deprecated since version 3.17: CHUNK_CONTROL and ChunkControl have moved to
iris.fileformats.cf.loader, because chunking policy is not specific
to netCDF. They can still be reached here, with a warning, for one
deprecation cycle.
API reference |
Tags: topic_load_save
See : NetCDF User’s Guide and netCDF4 python module.
Also : CF Conventions.
- iris.fileformats.netcdf.loader.__dir__()[source]#
List module attributes, including the relocated names.
A module
__getattr__forwards reads of the relocated names, but does not make them discoverable: PEP 562 does not extend todir(),inspect.getmembers(), or tab-completion, so this fills the gap.
- iris.fileformats.netcdf.loader.__getattr__(name)[source]#
Forward a relocated name to
iris.fileformats.cf.loader.- Parameters:
name (str) – The attribute being looked up. Python calls this only for names that are not already module attributes.
- Returns:
The object of that name in
iris.fileformats.cf.loader- the same object, not a copy.- Return type:
Any
- Raises:
AttributeError – If
nameis not one of the relocated names. Raised without warning, so that ahasattrprobe that comes back False stays quiet.
- iris.fileformats.netcdf.loader.load_cubes(file_sources, callback=None, constraints=None)[source]#
Load cubes from a list of NetCDF filenames/OPeNDAP URLs.
Also supports Zarr files in the NcZarr URL format, e.g.
file:///path/to/file#mode=nczarr,file. Note that NcZarr is limited to Zarr Storage Specification version 2. See the NcZarr docs <https://docs.unidata.ucar.edu/nug/current/nczarr_head.html> for more.- Parameters:
file_sources (str or list) – One or more NetCDF filenames/OPeNDAP URLs/NcZarr URLs to load from. OR open datasets.
callback (function, optional) – Function which can be passed on to
iris.io.run_callback().constraints (optional)
- Return type:
Generator of loaded NetCDF/NcZarr
iris.cube.Cube.