Skip to content

ECC-2335: Improve figure and shapeOfTheEarth handling - #557

Open
joobog wants to merge 2 commits into
hotfix/2.48.3from
feature/figure_and_shape_of_the_earth
Open

joobog wants to merge 2 commits into
hotfix/2.48.3from
feature/figure_and_shape_of_the_earth

Conversation

@joobog

@joobog joobog commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Description

This pull request enhances the handling of the "figure" (shape of the reference system, e.g., Earth or Sun) in GRIB grid specifications, improving both encoding and decoding. It introduces support for identifying and naming the figure in the GRIB spec, updates the logic for setting and retrieving the figure, and adjusts tests to verify these changes.

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

@joobog joobog added the approved-for-ci Approved to run CI on ECMWF machines label Sep 14, 2026
@joobog joobog changed the title Improve figure and shapeOfTheEarth handling ECC-2335: Improve figure and shapeOfTheEarth handling Sep 14, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (hotfix/2.48.3@037c57e). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             hotfix/2.48.3     #557   +/-   ##
================================================
  Coverage                 ?   88.01%           
================================================
  Files                    ?      855           
  Lines                    ?    63709           
  Branches                 ?    11297           
================================================
  Hits                     ?    56075           
  Misses                   ?     7634           
  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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

explicit Shape(const ::eckit::geo::Figure& figure) :
figure_(figure) {}

static long table_32_code(const ::eckit::geo::Figure& figure)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code table is only valid for GRIB edition 2. Somewhere there has to be a check the GRIB in question is edition 2 otherwise an error must be posted

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment. That’s correct, the table and the different shapes are only defined in GRIB2. I think that’s fine here because fillGrib(), which calls table_32_code(), already checks for edition = 2.

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

Labels

approved-for-ci Approved to run CI on ECMWF machines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants