Repository navigation
Add quadratic truncation (TQ) and a TQ21 + PI configuration - #65
Merged
Merged
Conversation
Quadratic truncation uses the full Gaussian grid N = (3T + 1) / 4, so T21 runs on N16 (64 x 32). Neither existing rule gives that: linear yields N11 and cubic-octahedral N22. The grid description for a full Gaussian grid is computed from the Gauss-Legendre nodes and cached as f<N>_full.txt, so it does not depend on parsing an ICMGG file. The TCO/TL prefix and the truncation-to-N rule were repeated in six places; they now live in config.truncation_prefix and config.gaussian_number. configs/TQ21_PI.yaml pairs ECMWF's T21 test case (experiment epc8) with the FESOM2 PI mesh, the smallest coupled setup, for laptops and CI.
Python aborted with "double free or corruption" (exit code 134) at interpreter exit whenever ecCodes was loaded before pyproj: at the end of run_ocp_tool.py, in the CI import check and in the Sphinx build, each after finishing its work. The ecCodes wheel (eccodeslib) and the pyproj wheel bundle native libraries whose teardown conflicts in that order. Importing pyproj in the package __init__ fixes the order for every entry point. Reproduced with eccodes 2.49.0 and pyproj 3.8.0: python -c "import gribapi, pyproj" aborts python -c "import pyproj, gribapi" exits 0 CI and the documentation build have failed this way on master since 2026-09-22; this is independent of the TQ change in this branch.
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 a third truncation type,
quadratic, and a config for the smallest coupled setup: OpenIFS TQ21 with the FESOM2 PI mesh.Why
T21 runs on the full Gaussian grid N16 (64 x 32). Neither existing rule gives that:
linearyields N11 andcubic-octahedralN22.What changes
quadratictruncation: N = (3T + 1) / 4 rounded up, name prefixTQ. The grid description of a full Gaussian grid is computed from the Gauss-Legendre nodes and cached asf<N>_full.txt, so it does not depend on parsing an ICMGG file.TCO/TLprefix and the truncation-to-N rule were repeated in six places. They are nowconfig.truncation_prefixandconfig.gaussian_number. Linear and cubic-octahedral behave as before.configs/TQ21_PI.yaml: ECMWF's T21 test case (experimentepc8, shipped with the OpenIFS ifs-test data) with the PI mesh fromfesom2/test/meshes/pi.tests/test_truncation.py.Tested
-o addopts=""because pytest-cov was not installed.python run_ocp_tool.py configs/TQ21_PI.yamlruns all twelve steps in about 10 s and writes the OASIS grids/masks/areas,vegin.nc, the modified ICMGG files, the runoff map and the LPJ-GUESS soil-layer file. A one-day coupled AWI-ESM3 run with these files completed.Known issues seen in the TQ21 run, not addressed here
grid 'feom' not found in grids.nc, so normp_*.ncare written. OASIS generated them at run time instead.double free or corruptionon exit, after "processing complete" and after all files are written.