-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
improvementImprovements on existing features or infrastructureImprovements on existing features or infrastructure
Milestone
Description
Requirement: cartesian data to latlon and vice-versa for a grid file.
The current function encode_as has an output grid type as the only argument.
Can we add another argument that can change the grid from cartesian to spherical?
Current implementation:
def encode_as(self, grid_type):
"""Encodes the grid as a new `xarray.Dataset` per grid format supplied
in the `grid_type` argument.
Parameters
----------
grid_type : str, required
Grid type of output dataset.
Currently supported options are "ugrid", "exodus", and "scrip"
Returns
-------
out_ds : xarray.Dataset
The output `xarray.Dataset` that is encoded from the this grid.
New option:
def encode_as(self, grid_type, coord_type):
coord_type by default is the same as the original grid
if specified as something else, we can transform coordinates internally.
This would use helper functions such as:
node_xyz_to_lonlat_rad
Metadata
Metadata
Assignees
Labels
improvementImprovements on existing features or infrastructureImprovements on existing features or infrastructure
Type
Projects
Status
📚 Backlog