aboutsummaryrefslogtreecommitdiff
path: root/plotter
diff options
context:
space:
mode:
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']: