decode_grib2_first_field

Function decode_grib2_first_field 

Source
pub fn decode_grib2_first_field(path: &Path) -> Result<DecodedField, String>
Expand description

Decode the first available field in the GRIB2 file.

Strategy:

  1. Try a fast-path: detect regular lat/lon grid and attempt to decode the first template 5.0=42 message via the pure-Rust AEC helper.
  2. If the fast-path fails and the crate is built with grib-support, use the grib crate to decode the first submessage; if that fails due to unsupported template 42, try the rust-aec fallback using Section5 params and per-message/first payload.
  3. If neither approach succeeds, return an Err.