uxarray
uxarray copied to clipboard
Make UXARRAY able to use CESM-CAM output (with UGRID)
A similar issue is in the CAM respository: https://github.com/ESCOMP/CAM/issues/468
Discussed with @erogluorhan and Steve Goldhaber. We would like to make CAM output UGRID compliant so UXARRAY can read the data without having to know exactly what dynamical core is being used, and so the needed information is provided by CAM without the user needing to work about it.
The initial idea seems to be providing the connection information to meet the UGRID standard in a separate file, with a global attribute in the CAM output files pointing to it. Additional information and metadata which is small could be added to every CAM file.
The connection information should be output by the model as it runs: not something the user has to find. Fine if an input file for the grid is copied into the output directories, reformatted if necessary.
We should define a global attribute which uxarray would search for to see if a netcdf file has a supported unstructured grid format. Then as long as CAM sets that attribute, it would work.
Might be more complex than that: we probably cannot store all the grid information in the file with the data due to size, it's likely to be in a separate file, referenced in an attribute in the netCDF file. So uxarray could check for that attribute, and/or take in the name/path of a grid file, which can have whatever is needed to meet the UGRID standard.
Yes the pointer-to-grid is also something uxarray should support.
I believe UXarray has been able to use CESM-CAM output for a very long while now.
The additionally requested feature here, which asks for UXarray to be able to open a dataset file if it has a global attribute pointing/referring to a grid definition file's location, is not yet supported though. It can be explored as part of #349 , despite possible limitations to generic usability (e.g. not sure if the other grid formats UXarray supports will have a similar attribute in netcdf files, if there is going to be a standard naming for such an attribute, etc.)
All that being said, I think we can close this issue and follow up on the above feature through #349 .
Thoughts?
Let's continue the discussion in https://github.com/ESCOMP/CAM/issues/468
We can keep this issue open for now, depending on what we cover above.