uxarray icon indicating copy to clipboard operation
uxarray copied to clipboard

Make UXARRAY able to use CESM-CAM output (with UGRID)

Open andrewgettelman opened this issue 4 years ago • 5 comments
trafficstars

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.

andrewgettelman avatar Nov 14 '21 17:11 andrewgettelman

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.

rljacob avatar Nov 14 '21 19:11 rljacob

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.

andrewgettelman avatar Nov 15 '21 17:11 andrewgettelman

Yes the pointer-to-grid is also something uxarray should support.

rljacob avatar Nov 15 '21 20:11 rljacob

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?

erogluorhan avatar May 16 '24 02:05 erogluorhan

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.

philipc2 avatar May 16 '24 03:05 philipc2