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

Can not input xarray data #14

Closed
NMC-DAVE opened this issue Jun 22, 2019 · 7 comments
Closed

Can not input xarray data #14

NMC-DAVE opened this issue Jun 22, 2019 · 7 comments

Comments

@NMC-DAVE
Copy link

Hi,
I try to input xarray to magics, like:

from Magics import macro as magics
import xarray as xr

data = xr.open_mfdataset('2t.nc')
data = magics.mxarray(data, 't2m')

but I get the following errors, so why? Much thanks!


NameError Traceback (most recent call last)
in
1 data = xr.open_mfdataset('2t.nc')
----> 2 data = magics.mxarray(data, 't2m')

~/anaconda3/lib/python3.7/site-packages/Magics/macro.py in mxarray(dataset, var)
423
424
--> 425 return data
426
427

NameError: name 'data' is not defined

@dtip
Copy link
Collaborator

dtip commented Jun 22, 2019

The xarray interface is not implemented in the latest release of magics-python (v1.0.6). If you want to use it you'll need to use the master branch of this repo instead.

@sylvielamythepaut when is the next expected release date?

@NMC-DAVE
Copy link
Author

NMC-DAVE commented Jun 22, 2019

Thanks, Daniel. Will the future magics-python release support xarray data? If so, that's will be great!

@sylvielamythepaut
Copy link
Contributor

Hi,
Yes the next vesrion of Magics amd magics-python will support xarray . We hope to get it cout by mid-july . We will welcome your feedback.

@NMC-DAVE
Copy link
Author

Thanks very much.

@sylvielamythepaut
Copy link
Contributor

Hi,
We have updated magics-python, you should now be able to use the mxarray interface .

Thanks

@NMC-DAVE
Copy link
Author

Thanks. Can you update the conda-forge channel? I want to install with "conda install -c conda-forge magics-python ".

@sylvielamythepaut
Copy link
Contributor

Good Point, should be updated soon .
Sylvie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants