- 积分
- 164
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-9-28
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
代码如下
du = xr.open_mfdataset('F:/DATA/U/*.nc')
dv = xr.open_mfdataset('F:\\DATA\V\*.nc')
u=du['uwnd']
v=dv['vwnd']
us = du['uwnd'][:,:1,:,:]#[time] [level]
vs = dv['vwnd'][:,:1,:,:]#[time] [level]
umean=us.loc[us.time.dt.season=='JJA'].mean(dim='time').mean(dim='level')
vmean=vs.loc[vs.time.dt.season=='JJA'].mean(dim='time').mean(dim='level')
fig=plt.figure(figsize=(10, 10))
ax=plt.axes(projection=ccrs.NorthPolarStereo(central_longitude=-270))#指明该axes为北半球极地投影,central表述中心经度
box=[-180, 180, 23, 90]
ax.set_extent(box, crs=ccrs.PlateCarree(central_longitude=30))#确定范围,-180°到180°,30°到90°
scale='50m'
ax.coastlines(scale,linewidth=1.2)
theta = np.linspace(0, 2*np.pi, 100) #创建等差数列
center, radius = [0.5, 0.5], 0.5
verts = np.vstack([np.sin(theta), np.cos(theta)]).T
circle = mpath.Path(verts * radius + center)
ax.set_boundary(circle, transform=ax.transAxes)
lat=umean['lat']
lon=umean['lon']
lat= anomalies['lat']
lon= anomalies['lon']
Q = ax.quiver(lon[::2],lat[::2],umean[::2,::2],vmean[::2,::2],width=0.0018,scale=30,headwidth=4)
|
-
|