Skip to content

Improve support for gridSpec in encoder - #257

Open
tweska wants to merge 14 commits into
50r2-devfrom
feature/gridSpec-in-grib2mars
Open

Improve support for gridSpec in encoder#257
tweska wants to merge 14 commits into
50r2-devfrom
feature/gridSpec-in-grib2mars

Conversation

@tweska

@tweska tweska commented Aug 27, 2026

Copy link
Copy Markdown
Member

All features in support of mode when skipSection3 is enabled + fixes for a few issues

  • Allow supplying gridSpec json strings as well in grid
  • Re-enable prepping the sample for spherical harmonics
    • Otherwise, setting gridSpec at the end won't work for SH
  • Read gridSpec from the sample to set MARS grid in grib2mars
    • Key truncation is no longer set!
  • Sets ECCODES_ECKIT_GEO=1 in the environment if skipSection3 is enabled in any of grib2mars, mars2mars or mars2grib
  • Add roundtrip tests by Pedro
  • Enable skipSection3 in grib-to-mtg2 tool
  • Misc dictionary can be merged behind mars2mars API (no need to duplicate the code everywhere)
  • Error out when scaling/offsetting values with spherical harmonics (this is not supported in eccodes)

CI fails because it relies on the truncation method being available on the Grid class in eckit::geo. This is not in develop yet, it seems.

The following packages have branches that work with this branch/PR in metkit:

This PR contains the fix from #259

📋 Metkit Documentation 📋
https://sites.ecmwf.int/docs/metkit/pull-requests/PR-257

@tweska
tweska force-pushed the feature/gridSpec-in-grib2mars branch from 5fe98c5 to 019556c Compare September 1, 2026 16:02
@tweska
tweska changed the base branch from develop to 50r2-dev September 1, 2026 16:02
@tweska
tweska force-pushed the feature/gridSpec-in-grib2mars branch from ca182a0 to bfa66fe Compare September 1, 2026 16:15
@tweska
tweska marked this pull request as ready for review September 2, 2026 06:24
@tweska
tweska force-pushed the feature/gridSpec-in-grib2mars branch from bfa66fe to e0b1d3d Compare September 3, 2026 07:21
@tweska
tweska force-pushed the feature/gridSpec-in-grib2mars branch from e0b1d3d to 778852a Compare September 3, 2026 07:37
@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.62948% with 144 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (50r2-dev@3693c2d). Learn more about missing BASE report.

Files with missing lines Patch % Lines
tests/grib2grib/roundtrip.cc 43.36% 64 Missing ⚠️
src/metkit/mars2mars/api/Mars2Mars.cc 14.03% 49 Missing ⚠️
src/metkit/grib2mars/api/Grib2Mars.cc 43.75% 9 Missing ⚠️
src/metkit/mars2grib/backend/encodeValues.h 20.00% 8 Missing ⚠️
src/metkit/grib2mars/mappings/rules/truncation.h 72.72% 6 Missing ⚠️
src/metkit/mars2grib/api/Mars2Grib.cc 62.50% 6 Missing ⚠️
src/metkit/grib2mars/mappings/rules/grid.h 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             50r2-dev     #257   +/-   ##
===========================================
  Coverage            ?   44.47%           
===========================================
  Files               ?      465           
  Lines               ?    21064           
  Branches            ?     1521           
===========================================
  Hits                ?     9369           
  Misses              ?    11695           
  Partials            ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants