- 积分
- 119
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-10-26
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
NCL利用wrfout文件插值做500hap相对涡度,求助!!!!!!!!!!
代码如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
a = addfile("wrfout_d02_2017-08-11_120000.nc","r")
wks = gsn_open_wks("png","2017-08-11_120000")
; Set some basic resources
res = True
res@MainTitle = "relative vorticity"
pltres = True
mpres = True
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; What times and how many time steps are in the data set?
;times = wrf_user_getvar(a,"times",-1) ; get times in the file
;ntimes = dimsizes(times) ; number of times in the file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; do it = 0,ntimes-1,2 ; TIME LOOP
;print("Working on time: " + times(it) )
; res@TimeLabel = times(it) ; Set Valid time to use on plots
; Get the data
u = wrf_user_getvar(a,"ua",0)
v = wrf_user_getvar(a,"va",0)
p=wrf_user_getvar(a,"pressure",0)
lat=a->XLAT(0,:,0)
lon=a->XLONG(0,0,:)
; Interpolate to pressure
u_plane = wrf_user_intrp3d(u,p,"h",500,0.,False)
v_plane = wrf_user_intrp3d(v,p,"h",500,0.,False)
vr = uv2vr_cfd (u_plane,v_plane,lat,lon, 2)
; Plotting options
opts = res
opts@cnFillOn = True
opts@gsnSpreadColorEnd = -3 ; End third from the last color in color map
opts@ContourParameters = (/ 0., 5., 1./)
contour = wrf_contour(a,wks,vr,opts)
delete(opts)
; MAKE PLOTS
plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
;end do ; END OF TIME LOOP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end
|
-
好像没有经过插值一样
|