Skip grid points with missing surface data (ocean/outside-domain)

This commit is contained in:
Graham McIntire 2026-03-31 08:36:17 -05:00
parent b7446e83f5
commit 22cb055269
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -18,6 +18,16 @@ defmodule Microwaveprop.Propagation do
temp_c = hrrr_profile.surface_temp_c
dewpoint_c = hrrr_profile.surface_dewpoint_c
# Skip points with missing surface data (ocean/outside-domain)
if is_nil(temp_c) or is_nil(dewpoint_c) do
[]
else
score_grid_point_with_data(hrrr_profile, valid_time, temp_c, dewpoint_c, derived)
end
end
defp score_grid_point_with_data(hrrr_profile, valid_time, temp_c, dewpoint_c, derived) do
temp_f = Scorer.c_to_f(temp_c)
dewpoint_f = Scorer.c_to_f(dewpoint_c)