Skip to content

Implement encoding for currently known CAMS fields#184

Open
tweska wants to merge 1 commit intodevelopfrom
feature/mars2grib-chem
Open

Implement encoding for currently known CAMS fields#184
tweska wants to merge 1 commit intodevelopfrom
feature/mars2grib-chem

Conversation

@tweska
Copy link
Member

@tweska tweska commented Mar 17, 2026

This PR implements encoding for fields mapped in ecmwf/multio#245

@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 17.64706% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.34%. Comparing base (fa88f33) to head (4143b4c).

Files with missing lines Patch % Lines
...backend/concepts/composition/compositionEncoding.h 0.00% 7 Missing ⚠️
.../backend/concepts/composition/compositionMatcher.h 37.50% 5 Missing ⚠️
...it/mars2grib/backend/concepts/level/levelMatcher.h 0.00% 1 Missing ⚠️
...ackend/concepts/point-in-time/pointInTimeMatcher.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #184   +/-   ##
========================================
  Coverage    62.33%   62.34%           
========================================
  Files          303      302    -1     
  Lines        11601    11601           
  Branches      1036     1035    -1     
========================================
+ Hits          7232     7233    +1     
+ Misses        4369     4368    -1     

☔ View full report in Codecov by Sentry.
📢 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.

@tweska tweska marked this pull request as draft March 18, 2026 12:26
@tweska
Copy link
Member Author

tweska commented Mar 18, 2026

I seem to have broken something with this PR. I'll keep this as draft until I figure out what.

It was a ) in the wrong position... :^/

@tweska tweska force-pushed the feature/mars2grib-chem branch from ab4868e to 4143b4c Compare March 18, 2026 16:25
@tweska tweska marked this pull request as ready for review March 18, 2026 16:40
// Deductions
long constituentType = deductions::resolve_ConstituentType_or_throw(mars, par, opt);
const auto chem = get_or_throw<long>(mars, "chem");
const auto wavelengthInNanometers = get_or_throw<long>(mars, "wavelength");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should have a proper deduction. If we start removing them because it is faster to implement then we can remove all of them. And then debugging will be an hell for everybody not super expert

Copy link
Member Author

Choose a reason for hiding this comment

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

Afaik we don't need constituentType in this concept because eccodes will set it when we set chemId (which we call chem). The deduction also doesn't seem to be correct, chem != constituentType according to this table: https://github.com/ecmwf/eccodes/blob/develop/definitions/grib2/chemId.def. I don't think we should use deductions for reading and returning mars keys without any more logic. This just increases complexity and makes debugging harder for us.

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.

3 participants