From 8b42af193d0f5420fc63019c205b54e9784335e4 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 17 Feb 2021 14:46:45 -0600 Subject: [PATCH] minor, add range checks to get_raob_dict --- modules/amv/intercompare.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/amv/intercompare.py b/modules/amv/intercompare.py index 9609ab59..be3e27e0 100644 --- a/modules/amv/intercompare.py +++ b/modules/amv/intercompare.py @@ -349,6 +349,17 @@ def get_raob_dict(filename): dir = float(toks[4]) spd = float(toks[5]) + if pres < 0 or pres > 1050: + continue + if lat < -90 or lat > 90: + continue + if lon < -180 or lon > 180: + continue + if spd < 0 or spd > 150: + continue + if dir < 0 or dir > 360: + continue + tup = (lat, lon, pres, temp, dir, spd) data.append(tup) -- GitLab