- 积分
- 7108
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-7-4
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 1649518749 于 2016-7-24 21:09 编辑
从ncl官网抄来的代码。只改了文件路径。却出错。
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/wind_rose.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
f = addfile("/home/fc/data/wrfout_d01_2015-08-09_00_00_00.nc","r")
uvm10 = wrf_user_getvar(f,"uvmet10",-1)
u10 = uvm10(0,:,:,:)
v10 = uvm10(1,:,:,:)
; Pick one grid point
loc = wrf_user_ll_to_ij(f, -87.37, 25.65, True)
mx = loc(0) - 1
ny = loc(1) - 1
lat1 = f->XLAT(0,ny,mx)
lon1 = f->XLONG(0,ny,mx)
res = True
res@tiMainString = "WRF: All Times: grid point ["+sprintf("%5.2f",lat1)+" , "+sprintf("%5.2f",lon1) +"]"
wspd1= ndtooned( sqrt(u10(:,ny,mx)^2 + v10(:,ny,mx)^2) )
wdir1= ndtooned( atan2(u10(:,ny,mx),v10(:,ny,mx))/0.01745329 +180. )
numPetals = 16
circFr = 10.
spdBounds = (/ 10., 20., 30., 40. /)
colorBounds = (/ "blue", "green", "yellow", "red" /)
wks = gsn_open_wks("ps","rose")
plot = WindRoseColor (wks,wspd1,wdir1,numPetals,circFr,spdBounds,colorBounds,res)
end
|
|