iris.fileformats.netcdf.ugrid_load#

Allow the construction of MeshXY.

API reference

Tags: topic_load_save | topic_mesh

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 from one or more files or stores.

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. NetCDF files and Zarr stores are read; anything else is ignored. Any URI’s must support OpenDAP, NcZarr, or a Zarr remote store scheme.

  • 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 files or Zarr stores.

Parameters:
  • uris (str or iterable of str) – One or more filenames/URI’s. Filenames can include wildcards. NetCDF files and Zarr stores are read; anything else is ignored. Any URI’s must support OpenDAP, NcZarr, or a Zarr remote store scheme.

  • 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