-
Notifications
You must be signed in to change notification settings - Fork 35
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
problem with parallel=True, no mask in input grid but error related to mask. #405
Comments
Hum, these errors seem to come before anything in the "parallel regridder" code is touched. Also, can you send a printout of your dataset with the mask added ? Finally, as said in the other PR, I don't think xESMF's parallel option is actually helping you here. As both grids fit in your RAM and as your source grid is much bigger than the destination, it won't be faster than doing it with |
Thanks for the reply. I tried with setting the units attributes, no difference. See below for input grid details. I guess the "parallel" option isn't going to get me anywhere faster. I had tried ESMF_RegridWeightGen script as described here: 20241121 134756.230 ERROR PET0 ESMCI_DistGrid.C:5101 ESMCI::DistGrid::getSequenceInde Invalid argument - SeqIndex type mismatch detected Here is the code snippet that creates the error:
|
I know it sounds stupid, but just for testing, could you try transposing the mask ? : grid_in= xr.Dataset(
data_vars=dict(
mask=(["lat","lon"], imask.T)),
coords=dict(
lon=(["lon"], ib.lon.data),
lat=(["lat"], ib.lat.data),
)
) I think there's some hardcoding of the dimension order going on, which shouldn't be the case with xarray-based suff like this... |
I had tried this before. I also tried to reverse the order of lat lon in xarray which just changes the error to lat being the offending variable. See error below. ValueError Traceback (most recent call last) File ~/anaconda3/envs/pangeo310/lib/python3.10/site-packages/xarray/core/dataset.py:605, in Dataset.init(self, data_vars, coords, attrs) File ~/anaconda3/envs/pangeo310/lib/python3.10/site-packages/xarray/core/merge.py:575, in merge_data_and_coords(data_vars, coords, compat, join) File ~/anaconda3/envs/pangeo310/lib/python3.10/site-packages/xarray/core/merge.py:761, in merge_core(objects, compat, join, combine_attrs, priority_arg, explicit_coords, indexes, fill_value) File ~/anaconda3/envs/pangeo310/lib/python3.10/site-packages/xarray/core/variable.py:3208, in calculate_dimensions(variables) ValueError: conflicting sizes for dimension 'lon': length 17280 on 'lon' and length 2880 on {'lon': 'mask', 'lat': 'mask'} |
Experimenting with parallel=True for regridding some larger datasets. I found the documentation that the output grid has to have a data variable and followed the instructions to just make one. But I'm encountering a strange problem with the input grid. My input grid only contains lat and lon, each 1d arrays. I have tried to actually specify a mask but that gives the same result. I'm using bilinear gridding so no bounds should be necessary. It works when parallel=False albeit very slowly. Thanks for any help on this.
I am getting an error that the mask.shape isn't the same as the lon.shape even though I don' have a mask and the input lon.shape is only 1dimensional
The text was updated successfully, but these errors were encountered: