From 87dfb06337b6a72b868c057a9c22dc7d4bcb0d3d Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 20 Nov 2023 21:03:59 +0100 Subject: wyoming soundign aggregator --- plotter/vertical_from_grib.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plotter') 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']: -- cgit v1.2.3