eofs
eofs copied to clipboard
Feature Request: MultivariateEof for xarray objects
Is there a reason MultivariateEof has not been implemented yet for xarray objects? If not, I'd be happy to contribute the feature if you can give some pointers on how best that would be done.
No reason other than I didn't need it. Feel free to have a go at this. I'd suggest following along the lines of the existing multivariate interfaces, and taking guidance on specifics from the currently implemented xarray interface.
Hi! Any updates on this? Thanks a lot for this package, I'll be sure to cite your work.
Give a look at here: https://ajdawson.github.io/eofs/latest/search.html?q=multivariate
No update from me. I still don't have a need for this so I haven't implemented it, and no one else has contributed it, so I'm afraid it is not available.
Got it! Thanks anyway. For now, I am just extract my variables from xarray dataset, then using the standard multivariate interface and converting results back to xarray. I haven't developed or contributed to packages before, but I will try my best to start with this one.
I'm trying to bring together some of the currently existing EOF packages on github. I just released a new version of xeofs which provides support for Multivariate EOF analysis in numpy, pandas and xarray. Perhaps it's helpful.
Since xarray package only works with DataArrays I suggest using to_stacked_array() and then doing EOF analysis on the stacked array. This is mathematically the same as multivariate eof analysis but you will have to do some reformatting to unstack/go back to a dataset. If someone does eventually implement multivariate for xarray I suggest adding functionality for Dataset type.