Skip to content

Change the mapping to the grid variable to something that is model agnostic #68

@ocefpaf

Description

@ocefpaf

We can identify the edge1_coordinates coordinates with sgrid.edge1_coordinates, but the actual data is associated with the original model name (in ROMS case sgrid.lon_u).

Unless I am missing something if someone wants to create a "generic" grid reader we must do:

from netCDF4 import Dataset
nc = Dataset(url)
sgrid = pyugrid.UGrid.from_nc_dataset(nc)

edges = [nc[var] for var in sgrid.edge1_coordinates]

@ayan-usgs Is that correct? Maybe instead of sgrid.lon_u and sgrid.lon_v we should have a sgrid.edges.

@rsignell-usgs Are you using pysgrid in production? How do you read your grids?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions