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.
This commit is contained in:
Graham McIntire 2026-04-11 09:03:02 -05:00
parent 0a970594a3
commit 11c5d5fb43

View file

@ -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} ->