meteoswiss-mdr / pyrad

Python Radar Data Processing
https://github.com/MeteoSwiss/pyrad
Other
54 stars 21 forks source link

PPI map not saved properly #2

Closed meteoswiss-mdr closed 7 years ago

meteoswiss-mdr commented 7 years ago

Function plot_ppi_map raises an exception when saving the figure: Traceback (most recent call last): File "/home/lom/users/kuz/.local/lib/python3.5/site-packages/mch_pyrad-0.1.1-py3.5.egg/pyrad/flow/flow_control.py", line 1242, in _generate_prod result = prdfunc(dataset, prdcfg) File "/home/lom/users/kuz/.local/lib/python3.5/site-packages/mch_pyrad-0.1.1-py3.5.egg/pyrad/prod/process_product.py", line 697, in generate_vol_products plot_ppi_map(dataset, field_name, ind_el, prdcfg, fname) File "/home/lom/users/kuz/.local/lib/python3.5/site-packages/mch_pyrad-0.1.1-py3.5.egg/pyrad/graph/plots.py", line 460, in plot_ppi_map fig.savefig(fname_list[i], dpi=dpi) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/figure.py", line 1563, in savefig self.canvas.print_figure(args, kwargs) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/backend_bases.py", line 2232, in print_figure kwargs) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 527, in print_png FigureCanvasAgg.draw(self) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 474, in draw self.figure.draw(self.renderer) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/artist.py", line 62, in draw_wrapper draw(artist, renderer, args, kwargs) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/figure.py", line 1159, in draw func(args) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/artist.py", line 62, in draw_wrapper draw(artist, renderer, args, kwargs) File "/opt/anaconda3/lib/python3.5/site-packages/cartopy/mpl/geoaxes.py", line 360, in draw inframe=inframe) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/artist.py", line 62, in draw_wrapper draw(artist, renderer, *args, *kwargs) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/axes/_base.py", line 2319, in draw a.draw(renderer) File "/opt/anaconda3/lib/python3.5/site-packages/matplotlib/artist.py", line 62, in draw_wrapper draw(artist, renderer, args, **kwargs) File "/opt/anaconda3/lib/python3.5/site-packages/cartopy/mpl/feature_artist.py", line 139, in draw for geom in geoms: File "/opt/anaconda3/lib/python3.5/site-packages/cartopy/feature.py", line 117, in extent_geom.intersects(geom)) File "/opt/anaconda3/lib/python3.5/site-packages/shapely/geometry/base.py", line 652, in intersects return bool(self.impl['intersects'](self, other)) File "/opt/anaconda3/lib/python3.5/site-packages/shapely/predicates.py", line 13, in call self._validate(other, stop_prepared=True) File "/opt/anaconda3/lib/python3.5/site-packages/shapely/topology.py", line 18, in _validate raise ValueError("Null geometry supports no operations") ValueError: Null geometry supports no operations

meteoswiss-mdr commented 7 years ago

The problem was not reproduced. I am closing it but we will keep an eye on it.

meteoswiss-mdr commented 6 years ago

The problem had nothing to do with Pyrad. The underlying maps were not downloaded properly and that was causing the error.