-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Iris has this nice callback functionality that allow users to "patch" the metadata and force compliance at loading time. Since there are virtually no sgrid compliant data yet I guess that a callback functionality would be a nice addition to pysgrid.
@ayan-usgs The way iris does this is by patching the "future cube" metadata. For example:
def hycom_callback(cube, field, filename):
"""
Fix non-CF metadata.
"""
if cube.name() == "Water Surface Elevation"
cube.standard_name = "sea_surface_elevation"
return cubeI think that pysgrid can do this at the raw netCDF4-python level by patching the attributes instead. If a non-netCDF sgrid dataset ever exist it will be easier to load it into a netCDF-like object than creating a new object just for that.
Metadata
Metadata
Assignees
Labels
No labels