diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2024-01-30 01:08:59 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2024-01-30 01:08:59 +0100 |
commit | 29a21550e9cdaeb371190b5684dc6c2201b1a905 (patch) | |
tree | ea6d1119e5667aba1e439aed5f07e2b5b4529eec /plotter/vertical_from_grib.py | |
parent | 46ff89bade0f7ca4d5b1edfaa75dacf48c25be86 (diff) | |
download | meteo_toolbox-29a21550e9cdaeb371190b5684dc6c2201b1a905.tar.gz |
minor RAM optimisation
Diffstat (limited to 'plotter/vertical_from_grib.py')
-rwxr-xr-x | plotter/vertical_from_grib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plotter/vertical_from_grib.py b/plotter/vertical_from_grib.py index 79c367f..ff454b3 100755 --- a/plotter/vertical_from_grib.py +++ b/plotter/vertical_from_grib.py @@ -4,6 +4,8 @@ import os import datetime import json +import matplotlib.pyplot as plt + import xarray as xr from metpy.units import units import metpy.calc as mpcalc @@ -77,6 +79,8 @@ def _plot(data, output, name, lat=None, lon=None, analysis=None): outname = f'skewt_{name}_{init_for_filename}+{hours_since_init_str}.png' skt.plot(filename=os.path.join(output, outname)) + plt.close('all') + index.append( { 'file': outname, |