-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to merge metadata from individual netcdf files when using NetCDFtoZarrSequentialRecipe? #109
Comments
First, note that the recipe syntax and class names have changed considerably since #101. See the latest docs for the new syntax. This was a necessary refactor to simplify the internal code structure. Hopefully it will not cause too much confusion. You can get back to the old syntax if you want by using version 0.2.0. What you want does not work right now but should be straightforward to implement. If This function dumps the json scheme for the file (including all metadata) into the metadata cache. So we have the tracking ids recorded already; no need to reopen the files again. I see two general options for how we could implement this:
This will be necessary for the bakeries. They will want to sign the datasets they produce with several custom fields. Again we have two options:
@naomi-henderson do you have a preference? |
@rabernat , I like the simplicity of just adding options to the recipe rather than creating functions to pass. But functions would add more generality and avoid coding many special options, I suppose. |
When concatenating netcdf files into a single Zarr store, I need to preserve the unique identifier (called
tracking_id
in CMIP6) from each netcdf file and place them all into the zarr store's metadata. I have been reading them for all netcdf files and concatenating them with a newline separator, creating anetcdf_tracking_ids
key in the dataset before saving as zarr. I am not sure how or if this can be done in the recipe, so am thinking of modifying the zarr metadata afterwards. The trouble is that I have to open all of the netcdf files again in order to get theirtracking_id
s.In addition, I would like to add a new attribute (containing information such as the date when the recipe was used to create the new dataset). Could this be done in
finalize_target
?Suggestions?
The text was updated successfully, but these errors were encountered: