You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I 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.
The text was updated successfully, but these errors were encountered:
I tried this for pyugrid unsuccessfully -- it seems you can't patch attributes on an open file without changing them in the file, which you very well may not want.
and a full callback feature seems like a bloated API to me.
what I've done in pyugrid is to provide a utility that theuser can use to map variable names to roles in the Standard, so it's pretty easy to load a compliant file.
Also, in ugly cases, who knows what may need to be done, so I'd like to be able to load what you can, then let the user write custom code to do the rest by hand with the netcdf file and the SGRid object's API.
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 acallback
functionality would be a nice addition topysgrid
.@ayan-usgs The way iris does this is by patching the "future cube" metadata. For example:
I 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.
The text was updated successfully, but these errors were encountered: