From 11c5d5fb43e0d1c53aa07fb8896b2121def9f6c6 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 11 Apr 2026 09:03:02 -0500 Subject: [PATCH] Add -s flag to wgrib2 -lon extraction for inventory output Without -s, wgrib2 -lon only outputs msg:offset:lon=X,lat=Y,val=Z with no variable name or level. The -s flag adds the short inventory (d=DATE:VAR:LEVEL:...) so the parser can identify which variable each value belongs to. --- lib/microwaveprop/weather/grib2/wgrib2.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/microwaveprop/weather/grib2/wgrib2.ex b/lib/microwaveprop/weather/grib2/wgrib2.ex index 78deca9f..8fe3a00a 100644 --- a/lib/microwaveprop/weather/grib2/wgrib2.ex +++ b/lib/microwaveprop/weather/grib2/wgrib2.ex @@ -372,7 +372,7 @@ defmodule Microwaveprop.Weather.Grib2.Wgrib2 do ["-lon", "#{normalize_lon(lon)}", "#{lat}"] end) - args = [grib_path, "-match", match_pattern] ++ lon_args + args = [grib_path, "-s", "-match", match_pattern] ++ lon_args case System.cmd(wgrib2_path(), args, stderr_to_stdout: true) do {output, 0} ->