Skip to content

Relax hardcoding of "lon" and "lat" for input data #2724

Description

@VeckoTheGecko

Looking at

# Set the coordinates for the dataset (needed to be done explicitly for curvilinear grids)
if "lon" in ds:
ds.set_coords("lon")
if "lat" in ds:
ds.set_coords("lat")
if len(set(grid.axes) & {"X", "Y"}) > 0: # Only if spatial grid is >0D (see #2054 for further development)
assert_valid_lat_lon(ds["lat"], ds["lon"], grid.axes)

I think there is some degree to which we expect the F points to be named "lat" and "lon" in the input data. We should remove this assumption, instead referencing node_coordinates in the SGRID metadata.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions