iris.experimental.ugrid.load¶
Extensions to Iris’ NetCDF loading to allow the construction of
Meshes 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
Meshobject from one or more NetCDF files.Raises an error if more/less than one
Meshis found.- Parameters
- Returns
- Return type
- iris.experimental.ugrid.load.load_meshes(uris, var_name=None)[source]¶
Load
Meshobjects from one or more NetCDF files.- Parameters
- Returns
- A dictionary mapping each mesh-containing file path/URL in the input
uristo a list of theMeshes 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)