Matt
Matt

Reputation: 1

cartopy in python seems to have an issue with winds over the pole

I'm using cartopy to make a North Polar Stereographic plot of a situation where there are winds over the pole, with regrid_shape to give a more even density of vectors. The field looks mostly correct but is somewhat pinched looking at the pole with some convergent and divergent behavior that does not appear to be in the underlying data. I have removed the lat=90 values from the winds before plotting.

behold my plot

Here's a plot with winds in terms of streamlines, made with different software. I think this is probably a reasonable representation of the actual winds.

probably correct wind field

Here's my code:

h=np.shape(lats)[0]//2+1  #to start from lat > 0

ax = plt.axes(projection=ccrs.NorthPolarStereo())
ax.set_extent([-180,180,30,90],crs=ccrs.PlateCarree())

ax.quiver(lons, lats[h:-2], u10[h:-2,:],v10[h:-2,:],
       transform=ccrs.PlateCarree(),regrid_shape=20)   

While I'm asking, I also can't seem to get NorthPolarStereo(central_longitude=27) to work with set_extent.

Thanks!

Upvotes: 0

Views: 531

Answers (1)

ajdawson
ajdawson

Reputation: 3333

I don't think this is a bug, its just that your vectors aren't scaled very well, making them look like they converge (or cross over) near the pole. You have some strong winds that are headed towards the pole then rapidly change direction, the vectors are all drawn as straight lines so if one is drawn just before turning it will overshoot the actual trajectory. This is a generic problem with plotting vectors.

If you play around with scaling you may be able to make it look nicer, or alternatively you can try using cartopy's streamplot method to make a plot more like the one you are aiming for (an example of using streamplot is here: http://scitools.org.uk/cartopy/docs/latest/examples/streamplot.html)

Upvotes: 1

Related Questions