aboutsummaryrefslogtreecommitdiff
path: root/plotter
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-11-20 21:03:59 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-11-20 21:04:35 +0100
commit87dfb06337b6a72b868c057a9c22dc7d4bcb0d3d (patch)
treead64044823c6bc9d2361509eb0d4ec58dcb2d644 /plotter
parent1d321d169b2fc15d31c8187f7e6108e0ef8b1ad3 (diff)
downloadmeteo_toolbox-87dfb06337b6a72b868c057a9c22dc7d4bcb0d3d.tar.gz
wyoming soundign aggregator
Diffstat (limited to 'plotter')
-rwxr-xr-xplotter/vertical_from_grib.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/plotter/vertical_from_grib.py b/plotter/vertical_from_grib.py
index 726c8be..79c367f 100755
--- a/plotter/vertical_from_grib.py
+++ b/plotter/vertical_from_grib.py
@@ -34,9 +34,12 @@ def run(data, plots, output='.'):
return index
-def _plot(data, output, lat, lon, name, analysis=None):
- for_temp = data.sel(latitude=lat, longitude = lon, method='nearest')
- for_temp = for_temp[['r', 't', 'u', 'v']]
+def _plot(data, output, name, lat=None, lon=None, analysis=None):
+ for_temp = data[['r', 't', 'u', 'v']]
+
+ if not (lat is None and lon is None):
+ for_temp = for_temp.sel(latitude=lat, longitude=lon, method='nearest')
+
index = []
for step in for_temp.coords['step']: