-
Notifications
You must be signed in to change notification settings - Fork 32
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
Dataset can't be DataArray #227
Comments
Hi @kthyng ! We should be able to work on a dataarray. Do you have a minimal example reproducing the problem? |
@raphaeldussin Ok I think I figured out what the issue actually is. It seems to be a problem with Dask Arrays in particular, so my question changed from DataArrays to if xESMF should work with DaskArrays. I didn't actually realize I was using a DaskArray at the time! My example is a bit wordy, but it is simple. VERSION 1: DataArrays: line 45 in frontend.py returns a warning:
stopped at
returns
VERSION 2: with
stopped at
returns for that conditional statement
|
The fact that the line doesn't fail with non-dask array hides the bug, because it is not doing what this line intends to. Rather than checking if the 'lon' variable exists in the dataset, it checks if the 'lon' value is in the array, which is no use. Indeed , I think this is a bug as |
thank you! |
Hi! Thanks for this package, I use it regularly.
I apparently have accidentally had testing for my functions that use xESMF turned off for awhile but I think this used to work so I wanted to note it.
When I run a
Regridder
command with an input DataArray instead of Dataset, I get an error like this:But I experimented and if I pause in the code there and convert "ds" to a Dataset, then it seems to run ok.
Should the xarray objects be Datasets for other reasons in the code, in which case a
TypeError
should probably be input ifds_in
is a DataArray, or should that boolean statement be modified in case a DataArray is input?Thanks!
The text was updated successfully, but these errors were encountered: