- 积分
- 10606
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-10-10
- 最后登录
- 1970-1-1
|
发表于 2014-8-13 17:02:23
|
显示全部楼层
你的脚本循环太慢了,用dim_max_n_Wrap替换了,你看看,运行效率快很多。
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
f = addfile("./WRFV3/test/em_quarter_ss/wrfout_d01_0001-01-01_00:00:00.nc","r")
w = wrf_user_getvar(f,"QCLOUD",-1)
lev = wrf_user_getvar(f,"pressure",-1)
out = dim_max_n_Wrap(w, (/2, 3/))
out!1="lev"
out&lev=lev(0, :, 0, 0)
;================================================
; plot
;================================================
wks = gsn_open_wks ("pdf", "h_time") ; open ps file
gsn_define_colormap(wks,"BlWhRe") ; choose colormap
res = True ; plot mods desired res@cnFillOn = True ; turn on color
res@cnLinesOn = True ; no contour lines
;---This resource not needed in V6.1.0
res@gsnSpreadColors = True ; use full range of colors
;---This resource defaults to True in NCL V6.1.0
res@lbLabelAutoStride = True ; optimal labels
res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
res@cnMinLevelValF = .001 ; set min contour level
res@cnMaxLevelValF = .01 ; set max contour level
res@cnLevelSpacingF = 0.0001 ; set contour spacing
plot = gsn_csm_pres_hgt (wks, out(lev|:, Time|:),res)
end
|
|