Streamline plotting with iris/cartopy
Closed this issue · 2 comments
There seems to be a bug with my plotting of streamlines in plot_map.py
. Whenever the input and output projections are the same (e.g. PlateCarree_Dateline
), it only plots half the hemisphere.
(Unlike the contour and contourf plots which use the smarter iris.plot
library, for streamplots you have to still use matplotlib and thus specify the input projection using the transform
keyword argument.)
I solved this by forcing the input streamline data to have longitude bounds -180 to 180. It seems the system can't handle 0 to 360 correctly.
The solution to this problem is explained here. Cartopy can handle input data of any longitude range, so you never have to edit the default central_longitude
when specifying the input projection.