- 积分
- 128
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-9-9
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2019-12-22 21:17:57
|
显示全部楼层
这个脚本可能需要你修改一下,你试试吧。真心建议见用matlab处理u10,v10;方便的很。
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
a = addfile("/home/yjane/B/0812/YW-YS-KF/wrfout_d01_2008-08-19_12:00:00.nc","r")
type = "pdf"
wks = gsn_open_wks(type,"A")
FirstTime = True
times = wrf_user_list_times(a) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
it = 8
; do it = 0,ntimes-1,2 ; TIME LOOP
print("Working on time: " + times(it) )
u = wrf_user_getvar(a,"U",it) ; u averaged to mass points
v = wrf_user_getvar(a,"V",it) ; v averaged to mass points
w = wrf_user_getvar(a,"W",it)
p = wrf_user_getvar(a, "pressure",it) ; pressure is our vertical coordinate
z = wrf_user_getvar(a, "z",it) ; grid point height
ip_lats = 22.59
ip_lons = 114.04
loc = wrf_user_ll_to_ij(a, ip_lons, ip_lats, True)
locX = loc(0)
locY = loc(1)
zz = z(0:35,locY,locX)
uu = u(0:35,locY,locX)
vv = v(0:35,locY,locX)
ww = w(0:36,locY,locX)
www = sqrt(uu*uu+vv*vv)
npts = 35
i = ispan(0,npts,1)
x = zz
y = www
write_table("114.04_22.59_VO.txt","w",[/i,x,y/],"%4.0i,%8.3f,%8.3f")
printVarSummary(w)
printVarSummary(v)
printVarSummary(u)
; plot = gsn_csm_xy(wks,ww,zz,True)
end
|
|