I have data on a grid made by matlab with putpole and rotatem. I don't have access to the original data but would like to work with Python on it. The origin of the grid is 78 and 11 degrees (star marker) but plotting with cartopy it always puts the North Pole in the middle, so my data are a little off.
Does someone know how to fix it? I tried with the false_northing but that doesn't do anything. Please ignore the horrible colorbar I am just playing around trying to fix the map.
fig=plt.figure(figsize=(8,8))
ax = fig.add_subplot(1,1,1,projection=ccrs.NorthPolarStereo())
cmap = plt.get_cmap('jet')
#plotting settings
ax.set_extent([-180, 180, 40, 90], ccrs.PlateCarree())
ax.gridlines(linewidth=2, color='k', alpha=0.7, linestyle='--')
ax.coastlines(zorder=3)
ZEP_coords=(78.9,11.8)
ax.plot(ZEP_coords,'*',c='orangered', markersize=25, transform=ccrs.PlateCarree())
data_mod, lon_mod = add_cyclic_point(a, coord=lon)
plt.contourf(lon_mod,lat,data_mod,20,vmin=0, vmax=0.05,cmap=cmap,transform=ccrs.PlateCarree())
plt.colorbar()
plot how it looks like at the moment:
data structure and all infos I have:
Instead of
NorthPolarStereo
, if you useStereographic
as your projection you can specify both the central latitude and longitude. You may also want to look at theRotatedPole
projection.