-
Notifications
You must be signed in to change notification settings - Fork 6
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
CubeData object #18
Comments
I agree, this would make a lot of sense for the plotting API. What would you suggest when reading multiple variables at once? At the moment, a Dictionary is returned, can we leave it that way and do: values = your_cube_reader.get(("Albedo","Emission"), None, (0,10), (10,20))
values.lon
values.lat
values["Albedo"] or would you prefer values.data["Albedo"]? |
I suggest making it self-similar: values = your_cube_reader.get(("Albedo","Emission"), None, (0,10), (10,20))
values.lon
values.lat
values.country
values.plot_map(time=anytime) # multi-variable plot
albedo = values["Albedo"]
albedo.data
albedo.lat
albedo.lon
albedo.country
albedo.plot_map(time=anytime) # plot of 'Albedo' |
Even better! 😎 |
Issue would be solved or addressed, if we use xarray (http://xarray.pydata.org) to represent Cube objects. |
Fixed by #29 |
Currently the method get() of the CubveData class returns a masked numpy array with the data of the requested variable only. It does not, however, return the respective variable data of the dimensions, i.e. of time, lat, and lon. I think, it would be better if get() would instead return an object that contains the data of the varible itself, the dimensional variables, and even a land-sea-mask, or a country mask. This would ensure that a non-expert user could not easily mess up the dimensions.
For example:
would then give the user an object with data, lat,lon, and whatever you want to put there, even some basic methods:
The text was updated successfully, but these errors were encountered: