imas.backends.netcdf.nc_metadata.NCMetadata¶
- class imas.backends.netcdf.nc_metadata.NCMetadata(ids_metadata: IDSMetadata)¶
Bases:
objectNCMetadata contains additional netCDF metadata for an IDS data structure.
When constructing an NCMetadata, the complete IDS structure is scanned and all DD coordinate information is parsed. This information is used to construct netCDF dimension information for all quantities in the IDS.
Coordinate parsing is done in three phases:
Traverse the full metadata tree and parse coordinate information for all quantities. See
_parse()and_parse_dimensions().Resolve shared dimensions. See
_resolve_pending().Tensorize all quantities. See
_tensorize_dimensions().
- __init__(ids_metadata: IDSMetadata)¶
Methods
__init__(ids_metadata)get_coordinates(path, homogeneous_time)Get the coordinates (adhering to CF conventions) for a netCDF variable.
get_dimensions(path, homogeneous_time)Get the dimensions for a netCDF variable.
Attributes
Metadata of the IDS toplevel that this NC metadata is for.
Set of all (inhomogeneous) time dimensions.
Mapping of paths to dimension names.
Mapping of paths to coordinate variable names.
Mapping of paths to their nearest AoS parent.
List of all paths.
All coordinate variable names representing (inhomogeneous) time.
- get_coordinates(path: str, homogeneous_time: bool) tuple[str]¶
Get the coordinates (adhering to CF conventions) for a netCDF variable.
- get_dimensions(path: str, homogeneous_time: bool) tuple[str]¶
Get the dimensions for a netCDF variable.
- ids_metadata¶
Metadata of the IDS toplevel that this NC metadata is for.