Support multidimensional coordinates for bounds and regridding#820
Open
tomvothecoder wants to merge 8 commits intomainfrom
Open
Support multidimensional coordinates for bounds and regridding#820tomvothecoder wants to merge 8 commits intomainfrom
tomvothecoder wants to merge 8 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #820 +/- ##
===========================================
- Coverage 100.00% 99.94% -0.06%
===========================================
Files 18 18
Lines 1989 1999 +10
===========================================
+ Hits 1989 1998 +9
- Misses 0 1 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tomvothecoder
commented
Dec 3, 2025
Collaborator
Author
|
Notes
|
Collaborator
|
Thanks for pushing this forward @jasonb5! This PR seems to work for the example in #816, but I think it is failing for a related case (curvilinear->rectilinear): wget https://esgf-node.ornl.gov/thredds/fileServer/css03_data/CMIP6/CMIP/CNRM-CERFACS/CNRM-CM6-1/historical/r1i1p1f2/Amon/tas/gr/v20180917/tas_Amon_CNRM-CM6-1_historical_r1i1p1f2_gr_185001-201412.nc
wget https://esgf-node.ornl.gov/thredds/fileServer/css03_data/CMIP6/CMIP/CNRM-CERFACS/CNRM-CM6-1/historical/r1i1p1f2/SImon/siconc/gn/v20180917/siconc_SImon_CNRM-CM6-1_historical_r1i1p1f2_gn_185001-201412.nc# %% imports
import xcdat as xc
# %% parameters
fn_source = 'siconc_SImon_CNRM-CM6-1_historical_r1i1p1f2_gn_185001-201412.nc'
fn_target = 'tas_Amon_CNRM-CM6-1_historical_r1i1p1f2_gr_185001-201412.nc'
# %% get source / target grids
ds = xc.open_dataset(fn_source)
ngrid = xc.open_dataset(fn_target)
# %% try regridding with xcdat
dsr = ds.regridder.horizontal('tmp2m', ngrid, tool="xesmf", method="conservative_normed", periodic=True)
I can get this to work with: import xesmf as xe
regridder = xe.Regridder(ds, ngrid, "conservative_normed", periodic=True, ignore_degenerate=True)
dsr = regridder(ds) |
…nsional coordinates
27ee94b to
36aa432
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
If applicable: