Guard against HRRR fill values in grid scoring
Skip grid points where surface_temp_c or surface_dewpoint_c are physically impossible (< -80°C or > 60°C). HRRR returns -273.15 (absolute zero) for ocean/missing points which caused division by zero in absolute_humidity calculation.
This commit is contained in:
parent
187fdf085e
commit
4301f48d27
1 changed files with 3 additions and 2 deletions
|
|
@ -22,8 +22,9 @@ defmodule Microwaveprop.Propagation do
|
||||||
temp_c = hrrr_profile.surface_temp_c
|
temp_c = hrrr_profile.surface_temp_c
|
||||||
dewpoint_c = hrrr_profile.surface_dewpoint_c
|
dewpoint_c = hrrr_profile.surface_dewpoint_c
|
||||||
|
|
||||||
# Skip points with missing surface data (ocean/outside-domain)
|
# Skip points with missing or physically impossible surface data
|
||||||
if is_nil(temp_c) or is_nil(dewpoint_c) do
|
if is_nil(temp_c) or is_nil(dewpoint_c) or temp_c < -80 or temp_c > 60 or
|
||||||
|
dewpoint_c < -80 or dewpoint_c > 50 do
|
||||||
[]
|
[]
|
||||||
else
|
else
|
||||||
score_grid_point_with_data(hrrr_profile, valid_time, temp_c, dewpoint_c, derived)
|
score_grid_point_with_data(hrrr_profile, valid_time, temp_c, dewpoint_c, derived)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue