-
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
unstructured grids #115
Comments
Is this to be done with |
Whats the reason that the other |
Hi @aaronspring |
more context in JiaweiZhuang/xESMF#18 |
Using locstream to at least offer nearest neighbour remapping is a nice idea, since apparently the data on unstructured grids of the CMIP models is stored in this locstream-like format. The only problem I encountered originates from the following lines in xesmf/backend.py: def esmf_regrid_build( [...]):
[...]
# ESMF bug? when using locstream objects, options src_mask_values
# and dst_mask_values produce runtime errors
allow_masked_values = True
if isinstance(sourcefield.grid, ESMF.api.locstream.LocStream):
allow_masked_values = False
if isinstance(destfield.grid, ESMF.api.locstream.LocStream):
allow_masked_values = False
[...] Due to an ESMF bug masks are ignored when generating the weights. I tried then to apply a mask for target grid, by manipulating the weights after their creation and by applying the mask on the regridded data. Both options worked. So one could
|
sounds like you have a path to a solution here @sol1105 ?
sounds reasonable to add at first
not sure whether a new keyword is welcome
do you think you could provide a PR which implements this by default? |
@aaronspring Do you know the status of using |
Nope. Nothing more than the examples above |
ok thanks. |
Has anyone used
xesmf
to regrid from unstructured grids like ICON, MPAS or FESOM?Unstructured grids like ICON just have one spatial dimension like
ncells
and 2 spatial coordinatesclon
andclat
.I tried and failed.
https://gist.github.com/aaronspring/fd54970f71a39e26ab54a8b47170533d
The text was updated successfully, but these errors were encountered: