uxarray
uxarray copied to clipboard
Support for the Latlon face functionality or mixed projection option for users
Proposed new feature or change:
Currently, our grid system supports faces where all edges are defined as Great Circle Arcs (GCA). However, this approach may not fully meet the diverse needs of our user community. As highlighted in Karl Taylor's paper, "Trulyconserving with conservative remapping methods" ,, offering a variety of projection methods is essential for accurate and efficient data remapping and analysis.
Recognizing this need, I propose adding support for LatLon faces and mixed-type grids, a functionality that I have already successfully implemented in the context of LatLon bounds and zonal face averaging. This proposal aims to extend the flexibility and usability of our grid system by allowing users to specify, on a per-edge basis, whether an edge should be treated as a Great Circle Arc or a constant latitude line. This enhancement supports a mixed-type grid where faces can contain both types of edges, significantly broadening the applicability of our grid system for various scientific and geographical data processing needs.
The LatLon face, wherein each edge of a face is either a longitude line or a constant latitude line, is crucial for precise geographical representation, especially in models where Earth's curvature significantly influences data interpretation. By integrating this feature, which I have pioneered in our existing LatLon bounds and zonal averaging functionalities, we can make our grid system more adaptable and accurate for a wide range of applications.
In the initial phase, this feature implementation will focus on supporting LatLon faces. Users will be able to specify whether a grid is a LatLon face grid upon initialization. If is_latlon_face=True, any edge with endpoints sharing the same latitude will be considered a constant latitude line. Conversely, if is_latlon_face=False, all edges will default to being treated as Great Circle Arcs.
This proposed solution involves introducing a new variable, is_latlon_face, during grid initialization, with a default value of False. Given my experience and the existing implementation within the LatLon bounds and zonal face averaging, I am confident that integrating this feature across our grid system will be straightforward and highly beneficial.
To illustrate the application of the proposed functionality, consider the following example where a grid is initialized with the LatLon face option:
# Example of initializing a ux.Grid with the is_latlonface option enabled
uxgrid = ux.Grid.from_dataset(xrds, is_latlonface=True)
uxgrid2= ux.from_face_verticesvertices, is_latlonface=True)