-
Notifications
You must be signed in to change notification settings - Fork 79
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
[BUG] Issue in grid_ufunc when original_arg is a dictionary #581
Comments
Posting a reproducer (requester pays bucket, only works on the pangeo deployments unfortunately) of what I believe is the same issue (big thanks to @jdldeauna): import intake
from ecco_v4_py.ecco_utils import get_llc_grid
cat = intake.open_catalog("https://raw.githubusercontent.com/pangeo-data/pangeo-datastore/master/intake-catalogs/ocean.yaml")
ecco_ds = cat.ECCOv4r3.to_dask()
ecco_ds = ecco_ds.rename({'face':'tile'})
xgcm_grid = get_llc_grid(ecco_ds)
yfld = ecco_ds.oceTAUY.isel(time=0)
xfld = ecco_ds.oceTAUX.isel(time=0)
velc = xgcm_grid.interp_2d_vector({'X': xfld, 'Y': yfld}, boundary='fill')
working on a fix now. |
Quick fix for Issue xgcm#581
Recently encountered more errors in 270 elif isinstance(adjust_chunks[ind], (tuple, list)):
271 if len(adjust_chunks[ind]) != len(chunks[i]):
--> 272 raise ValueError(
273 f"Dimension {i} has {len(chunks[i])} blocks, adjust_chunks "
274 f"specified with {len(adjust_chunks[ind])} blocks"
275 )
276 chunks[i] = tuple(adjust_chunks[ind])
277 else:
ValueError: Dimension 0 has 13 blocks, adjust_chunks specified with 12 blocks So the fix I tried before is no longer sufficient, at least for me. Not sure if this issue is recreated by other users when calling |
Encountered this apparent bug in v0.8.1 when calling diff_2d_vector, it originated in grid_ufunc.py (about line 1022):
gives error:
original_arg
is expected to be an xarray DataArray, but instead is a dictionary with a value that is an xarray DataArray. (This does not seem to happen with regular xgcm diff.) This is my inelegant solution that seems to work, replacing theoriginal_arg_chunks
assignment with:The text was updated successfully, but these errors were encountered: