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

Add standard data object #10

Closed
dopplershift opened this issue Apr 20, 2015 · 4 comments · Fixed by #1490
Closed

Add standard data object #10

dopplershift opened this issue Apr 20, 2015 · 4 comments · Fixed by #1490
Assignees
Labels
Area: IO Pertains to reading data Type: Feature New functionality
Milestone

Comments

@dopplershift
Copy link
Member

  • This is probably just a dictionary of arrays right now.
  • Utilize standard names from CF to make things work automatically.
    • Might need to provide short names or something like it too
  • Provide unit capabilities as well
  • At least mimic iris API

This could also just be replaced wholesale by IRIS if that's deemed better.

@dopplershift dopplershift added the Type: Feature New functionality label Apr 20, 2015
@dopplershift
Copy link
Member Author

Might even be a better idea to follow NetCDF4-Python API.

@dopplershift
Copy link
Member Author

Should contain a getTimeAxis method to make it easy to get the time variable associated with an object. (This comes from the correct time variable bouncing from time to time1 on GRIB files. See Unidata/python-workshop#43)

@lesserwhirls
Copy link
Contributor

Sorry I hadn't made this yet. Should also add Axis getters for all the axis
types. Here is a list of Axes that the CDM recognizes:

Time
RunTime
Ensemble
GeoX
GeoY
GeoZ
Lat
Lon
Height
Pressure
Radial Azmuith
RadialDistance
RadialElevation
Spectral

https://github.com/Unidata/thredds/blob/144f779cc20058581c660719f768fe396cd1a9c2/cdm/src/main/java/ucar/nc2/constants/AxisType.java

On Wednesday, July 15, 2015, Ryan May notifications@github.com wrote:

Should contain a getTimeAxis method to make it easy to get the time
variable associated with an object. (This comes from the correct time
variable bouncing from time to time1 on GRIB files. See
Unidata/python-workshop#43
Unidata/python-workshop#43)


Reply to this email directly or view it on GitHub
#10 (comment).

@dopplershift dopplershift added Area: Calc Pertains to calculations Area: IO Pertains to reading data and removed Area: Calc Pertains to calculations labels Jan 26, 2016
@dopplershift
Copy link
Member Author

I think xarray is the way to go, at least as a base here. Its Dataset class is a nice container for multiple sets of data, and the DataArray class allows grouping coordinates with the data, having the dimension names, and having attributes attached.

One prominent problem that this would help solve is dimension ordering for things like geostrophic_wind. Currently, it's too easy to do the wrong thing silently; you can pass an array ordered lat, lon, while the docs say it needs to be x,y. By using the named axes on xarray, we could inquire on the data about the ordering. We could also eliminate the need to pass in delta x, y, etc. since the data would have the coordinate information. I think basing around xarray would allow much more GEMPAK-like operation, so long as you can get your data into an xarray. Fortunately, xarray construction is pretty straightforward--and is trivial if you have a netCDF file.

Another question this begs is whether we should have a Vector class for things like wind and gradients. Currently, we have the same situation, where the docs for advection specify a list of components. We could make things explicit by making use of a class to construct a vector from the components. This would allow some things like:

advection(temperature, Vector(x=u, y=v))

geo_wind = geostrophic_wind(heights, f)
print(geo_wind.x)  # Or maybe .u?

@jrleeman jrleeman added this to the Spring 2017 milestone Feb 14, 2017
@jrleeman jrleeman removed this from the Spring 2017 milestone Feb 24, 2017
@dopplershift dopplershift modified the milestone: Winter 2017 Mar 10, 2017
@jrleeman jrleeman removed this from the 0.7 milestone Nov 15, 2017
@dopplershift dopplershift added this to the Spring 2018 milestone Nov 15, 2017
@jrleeman jrleeman removed this from the 0.8 milestone Apr 11, 2018
@jthielen jthielen added this to the 1.0 milestone Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: IO Pertains to reading data Type: Feature New functionality
Projects
None yet
4 participants