added grib2 conversion to parse-mars-request CLI tool#224
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the parse-mars-request CLI tool with a --grib2 flag to convert expanded MARS requests into the “full GRIB2 metadata” (via mars2mars) and then optionally re-compacts the resulting flattened requests.
Changes:
- Add
--grib2CLI option and usage example to trigger conversion of requests to GRIB2-oriented metadata. - Implement conversion by flattening requests into per-field requests, converting them, and compacting/merging them using HyperCube logic when possible.
mars2grib documentation sync (per repo guidelines):
- Impacted files under
src/metkit/mars2grib/**: none - Impacted files under
tests/mars2grib/**: none - Documentation status: ✅ in sync (no mars2grib-doc-scoped files changed)
| ParseRequest(int argc, char** argv) : MetkitTool(argc, argv) { | ||
| options_.push_back(new SimpleOption<bool>("json", "Format request in json, default = false")); | ||
| options_.push_back(new SimpleOption<bool>("compact", "Compact output, default = false")); | ||
| options_.push_back(new SimpleOption<bool>("grib2", "Convert request to the full Grib2 metadata, default = false")); |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #224 +/- ##
===========================================
+ Coverage 54.95% 55.44% +0.48%
===========================================
Files 323 322 -1
Lines 13900 13785 -115
Branches 1120 1102 -18
===========================================
+ Hits 7639 7643 +4
+ Misses 6261 6142 -119 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tweska
left a comment
There was a problem hiding this comment.
I tested it and it looks good to me. If we want to access the mars2mars mappings through this tool, we should remove this: src/tools/request-to-mtg2.cc
1bb888c to
82f3b68
Compare
Description
add --grib2 flag to parse-mars-request, to trigger mars request conversion to the mtg2 version
Contributor Declaration
By opening this pull request, I affirm the following: