iris.fileformats.netcdf.ugrid_load#

Allow the construction of MeshXY.

Extension functions for Iris NetCDF loading, to construct MeshXY from UGRID data in files.

iris.fileformats.netcdf.ugrid_load.load_mesh(uris, var_name=None)[source]#

Load a single MeshXY object from one or more NetCDF files.

Raises an error if more/less than one MeshXY is found.

Parameters:
  • uris (str or iterable of str) – One or more filenames/URI’s. Filenames can include wildcards. Any URI’s must support OpenDAP.

  • var_name (str, optional) – Only return a MeshXY if its var_name matches this value.

Return type:

iris.mesh.MeshXY

iris.fileformats.netcdf.ugrid_load.load_meshes(uris, var_name=None)[source]#

Load MeshXY objects from one or more NetCDF files.

Parameters:
  • uris (str or iterable of str) – One or more filenames/URI’s. Filenames can include wildcards. Any URI’s must support OpenDAP.

  • var_name (str, optional) – Only return MeshXY that have var_names matching this value.

Returns:

A dictionary mapping each mesh-containing file path/URL in the input uris to a list of the MeshXY returned from each.

Return type:

dict