Repository navigation
Accept "values" as an unstructured grid dimension by default - #12
Merged
Merged
Conversation
cfgrib and earthkit-data name the dimension of non-regular GRIB grids "values" (e.g. ICON open data), which had to be renamed before interpolation. grid-process accesses dimensions by name only, so the name does not clash with the .values attribute of xarray objects: interp2poi and interp2grid give identical results on ICON-CH2 T_2M with "values" or "cell". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ICON-CH2 dimension "values" given by earthkit-data is now one of the default unstructured dimension names: no rename to "cell" needed. Rerun with a new IFS-HRES and ICON-CH2 run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds
valuesto the default unstructured grid dimension names (GRID_PROCESS__data_model__grid__unstructured_dim):["cell", "points", "values"]. cfgrib and earthkit-data name the dimension of non-regular GRIB gridsvalues(e.g. ICON open data), which until now had to be renamed before interpolation (as in example notebook 04:.rename_dims(values="cell")).valuesis last, socellorpointsstill win if a dataset has several of these dimensions.No clash with the
.valuesattribute of xarray objects. grid-process accesses dimensions by name only (ds[name], dicts,**{dim: ...}), never as attributes, andds.values/da.valuesstay the xarray method and numpy property. Checked:interp2poiandinterp2gridgive identical results withcellandvalues, both without a coordinate (as cfgrib gives it) and with an index coordinate.{'values': 283876}, read with earthkit) gives identical results without renaming for:interp2poiwithnearest,idwandlinear;interp2gridwithnearestandidwto LV95 at 1 km and 5 km.No breaking change. The only risk: a regular grid that also has an unrelated dimension named
valueswould be taken as unstructured (the unstructured names are checked before y/x). cfgrib does not produce this, and the environment variable still overrides the list.Example notebook 04 no longer renames the ICON-CH2 dimension
valuestocell, and is rerun with a new IFS-HRES run (2026-11-12 06 UTC) and ICON-CH2 run (2026-11-11 18 UTC).Related issue
None.
Checklist
test_get_flat_dim:valuesdetected without a coordinate;test_interp2poi: results withvaluesidentical tocell; 262 tests pass, ruff and mypy clean, pylint 10.00)