Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access latitudes/longitudes on a GribField and FieldList? #116

Open
sandorkertesz opened this issue Jun 14, 2023 · 0 comments
Open
Labels
question Further information is requested

Comments

@sandorkertesz
Copy link
Collaborator

sandorkertesz commented Jun 14, 2023

At the moment we can access latitudes/longitudes on a GribField as follows (ds is a FieldList in the examples below):

This call returns a dict: {"lat": array, "lon": array}

ds[0].to_latlon()

This call returns a tuple (lat-array, lon-array):

ds[0].data(["lat", "lon"])

This call returns only the latitudes (as an array):

ds[0].data("lat")

We can even use metadata to get the latitudes, though this type of usage should be discouraged:

ds[0].metadata("latitudes")

On a FieldList we can only call metadata out of these methods, which would return a list of arrays (one per GribField):

ds.metadata("latitudes")

The following questions arise:

  • should we add the convenience methods latitudes and longitudes to GribField?
  • should we add to_latlon to FieldList?
  • should we add data to FieldList?
  • should we add latitudes and longitudes (if we implement them on GribField) to FieldList?
@sandorkertesz sandorkertesz added the question Further information is requested label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant