Implement encoding for currently known CAMS fields#184
Implement encoding for currently known CAMS fields#184
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
It was a |
ab4868e to
4143b4c
Compare
| // 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"); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
This PR implements encoding for fields mapped in ecmwf/multio#245