ajdawson / windspharm

A Python library for spherical harmonic computations on vector winds.
http://ajdawson.github.io/windspharm
MIT License
82 stars 38 forks source link

Add support for xray #50

Closed spencerahill closed 8 years ago

spencerahill commented 8 years ago

The Xray package is a fantastic tool for climate data analysis, through its support of netCDF-style labeled dimensions and coordinates. So it would be great for windspharm to have an interface for Xray objects (DataArrays and Datasets).

Both windpsharm and Xray have interfaces with cdms2. So, on the one hand, that could be an easy adapter for making the former two work together. On the other hand, I have found cdat-late maddening to install (both on my own Mac and my linux workstation), so it would be nice if ultimately that wasn't a dependency.

Thanks! Not sure if you're still developing windspharm, but it's a nice package.

spencerahill commented 8 years ago

Sorry, forgot to mention: internally, xray uses numpy arrays, and the underlying ndarray can easily be accessed from any xray object via the values attribute. So, windspharm's existing numpy interface could potentially be leveraged relatively smoothly.

ajdawson commented 8 years ago

Thanks @spencerahill, this is on my radar, awaiting some free time to implement it...

ajdawson commented 8 years ago

Done on master branch, and will be available in the next release (v1.4.0) sometime very soon.