An error: 2-dimensional boolean indexing is not supported. It appears when I want to draw wind field. I use ax.quiver() function of cartopy.
Here is the code:
dpath=r'E:\Data\Wind\era5wind2019.nc'
d=xr.open_dataset(dpath)
uw=d['u']
vw=d['v']
u=uw.loc['2019-01-01',:,:]
v=vw.loc['2019-01-01',:,:]
lat=uw.latitude
lon=uw.longitude
fig=plt.figure()
ax=fig.add_subplot(111,projection=ccrs.PlateCarree(180))
proj=ccrs.PlateCarree()
Q = ax.quiver(
lon, lat, u, v, transform=proj,
regrid_shape=20, angles='uv',
scale=12, scale_units='xy',
units='width', width=0.002
)