Extract all MARS keys from each message using read_key_dynamic
Store ALL keys for each GRIB message in the corresponding base[i]["mars"] entry independently
There is no common/varying partitioning in the output — each base[i] entry is self-contained
graph TD
A[N GRIB messages] --> B[Extract MARS keys from each]
B --> C["Store in base[i] independently"]
C --> D["base[0]: all keys from GRIB msg 0"]
C --> E["base[1]: all keys from GRIB msg 1"]
C --> F["base[N-1]: all keys from GRIB msg N-1"]
If you need to extract commonalities after decoding (e.g. for display), use the compute_common() utility in software.