Trouble plotting wind vectors over the pole

Plotting winds over the pole with any value of v results in vectors that are directly north/south at the pole, even when u is non zero.

Here’s an example with all wind speeds of 1 in both the u and v direction showing the issue:

import numpy as np
import matplotlib.pyplot as plt
import cartopy

exlats = np.arange(0,90,2)
exlons = np.arange(-180,180,4)

ex_u = np.full((len(exlats),len(exlons)),1)
ex_v = np.full((len(exlats),len(exlons)),1)

ax = plt.axes(projection=cartopy.crs.NorthPolarStereo(central_longitude=0))
ax.set_extent([-180, 180, 0, 90], crs=cartopy.crs.PlateCarree())
ax.add_feature(cartopy.feature.LAND, facecolor=‘0.7’)
plt.quiver(exlons, exlats, ex_u, ex_v, pivot=‘middle’,regrid_shape=25,transform=cartopy.crs.PlateCarree())
ax.gridlines(linewidth=0.2,color=‘red’)
plt.show()

things do look right if I transform the vectors using code from here: https://github.com/SciTools/cartopy/issues/1179#issuecomment-456065666

1 Like