- 积分
- 55955
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-21
- 最后登录
- 1970-1-1
|
发表于 2021-6-20 21:49:02
|
显示全部楼层
参考下面的代码:
- fn = 'D:/Temp/nc/wrfout_d01_2005-08-28_00-00-00'
- f = addfile(fn)
- #Calculate pressure array
- pp = f['P'][:]
- psb = f['PB'][:]
- ptop = f['P_TOP'][0]
- eta = f['ZNU'][0]
- nt,nz,ny,nx = pp.shape
- eta = eta.reshape(1,nz,1,1)
- pres = (psb * eta + ptop + pp) * 0.01
- #Read and de-stagger u and v
- u = f['U'][:]
- v = f['V'][:]
- destag_u = meteo.wrf.destagger(u, -1)
- destag_v = meteo.wrf.destagger(v, -2)
- y = destag_u.dimvalue(-2)
- x = destag_u.dimvalue(-1)
- #Interpolate u and v to pressure level
- levels = [700, 500]
- u1 = meteo.log_interpolate_1d(levels, pres, destag_u, axis=1)
- v1 = meteo.log_interpolate_1d(levels, pres, destag_v, axis=1)
- #Plot
- axesm(projinfo=f.proj)
- geoshow('country')
- quiver(x[::4], y[::4], u1[0,1,::4,::4], v1[0,1,::4,::4], color='b', proj=f.proj)
- title('Pressure 500 hPa')
|
|