Replies: 3 comments 1 reply
-
NOTE: There are two levels of non-compliance:
Note: we've faces all this in the gridded project: https://github.com/NOAA-ORR-ERD/gridded And did not originally have a good architecture to do all that (and still only halfway there). Don't make the same mistakes we did :-) My suggestion: Have determining what the grid is, and what variables map to what roles in the grid structure as one step, and then actually building the grid object from that specification as a separate step -- then you bypass the discovery, and simply pass the specification it to the grid-building step for non-compliant files. Even better, have a way to pass a transformation function in to create each part of the Grid object, and then it could be totally customizable. I've been hoping to refactor gridded into the structure, but haven't had the chance yet. |
Beta Was this translation helpful? Give feedback.
-
The approach that we've taken in UXarray is similar to what @ChrisBarker-NOAA mentioned in his suggestion Grid RepresentationWe have chosen to internally represent all unstructured grid formats in the UGRID conventions, which means that any dataset that is loaded in needs to first be converted into the UGRID conventions. As long as the unstructured grid can be loaded in with Xarray, it can be passed through as an input into the construction of our ParsingOur parsing right now is very basic, except for the uxarray/uxarray/utils/helpers.py Lines 34 to 49 in 85f803d Reading & EncodingOnce we know the Example (MPAS)I've recently written a new reader to support MPAS meshes. MPAS was an interesting format since we needed to provide support for reading in both the Primal and Dual meshes. I believe going through this implementation, specifically https://github.com/UXARRAY/uxarray/blob/main/uxarray/io/_mpas.py |
Beta Was this translation helpful? Give feedback.
-
Just noting that a model doesn't have to adopt UGRID if its not currently following a convention in its mesh description. SCRIP (or MPAS) might be an easier first step and are also supported. |
Beta Was this translation helpful? Give feedback.
-
This post is based on an email exchange between some folks (@kthyng, @rljacob, @ChrisBarker-NOAA, @rajeeja)
that I proposed to move here, so all can participate
There are a number of regional (FVCOM, SUNTANS, Delft3D) and global (ICON) models that would benefit from uxarray, however, there is of course a limit to the support that uxarray can provide for these many different models. Better to make it easy to read grids that don't conform to ugrid-conventions, so other groups can build off of uxarray.
What's the best way to expose the grid reading functions to make it easy for people two make a wrapper for their own model output?
Beta Was this translation helpful? Give feedback.
All reactions