iris.experimental.ugrid.load
Extensions to Iris’ NetCDF loading to allow the construction of
Mesh
es from UGRID data in the file.
Eventual destination: iris.fileformats.netcdf
(plan to split that module
into load
and save
in future).
In this module:
- iris.experimental.ugrid.load.PARSE_UGRID_ON_LOAD
Run-time switch for experimental UGRID-aware NetCDF loading. See
ParseUGridOnLoad
.
- iris.experimental.ugrid.load.load_mesh(uris, var_name=None)[source]
Load a single
Mesh
object from one or more NetCDF files.Raises an error if more/less than one
Mesh
is found.- Parameters
- Return type
- iris.experimental.ugrid.load.load_meshes(uris, var_name=None)[source]
Load
Mesh
objects from one or more NetCDF files.- Parameters
- Returns
- A dictionary mapping each mesh-containing file path/URL in the input
uris
to a list of theMesh
es returned from each.
- Return type
Thread-local data
- class iris.experimental.ugrid.load.ParseUGridOnLoad[source]
A flag for dictating whether to use the experimental UGRID-aware version of Iris NetCDF loading. Object is thread-safe.
Use via the run-time switch
PARSE_UGRID_ON_LOAD
. Usecontext()
to temporarily activate.See also
The UGRID Conventions, https://ugrid-conventions.github.io/ugrid-conventions/
- context()[source]
Temporarily activate experimental UGRID-aware NetCDF loading.
Use the standard Iris loading API while within the context manager. If the loaded file(s) include any UGRID content, this will be parsed and attached to the resultant cube(s) accordingly.
Use via the run-time switch
PARSE_UGRID_ON_LOAD
.For example:
with PARSE_UGRID_ON_LOAD.context(): my_cube_list = iris.load([my_file_path, my_file_path2], constraint=my_constraint, callback=my_callback)