- 积分
- 304
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-5-12
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
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"
begin
fils = systemfunc ("ls pr_wtr*.nc")
f = addfiles (fils , "r")
x = f[:]->pr_wtr (:,{25:35},{105:125})
; ***********************************************
; create the filter weights and apply
; ***********************************************
ihp = 2 ; band pass
sigma = 1.0 ; Lanczos sigma
nWgt = 201 ; loose 100 each end
fca = 1./2190. ; start freq
fcb = 1./1095. ; last freq
wgt = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )
xBPF = wgt_runave ( x(:,{25:35},{105:125}), wgt, 0 ) ; 3-6a
; ***********************************************
; create new date array for use on the plot
; ***********************************************
date = cd_calendar(x&time,-2) ; yyyymmdd
yrfrac = yyyymmdd_to_yyyyfrac (date, 0)
delete(yrfrac@long_name)
delete(x@long_name)
pStrt = 19600101 ;
pLast = 20141231
iStrt = ind(date.eq.pStrt) ; user specified dates
iLast = ind(date.eq.pLast)
delete(date)
pltType = "ps"
pltName = "filters"
plot = new ( 2, "graphic")
wks = gsn_open_wks (pltType,pltName)
res = True ; plot mods desired
res@gsnDraw = False ; don't draw
res@gsnFrame = False ; don't advance frame yet
res@vpHeightF = 0.4 ; change aspect ratio of plot
res@vpWidthF = 0.8
res@vpXF = 0.1 ; start plot at x ndc coord
res@gsnYRefLine = 0.0 ; create a reference line
res@gsnCenterString = "Anomaly U [105, 120E]"
plot(0) = gsn_csm_xy (wks,yrfrac(iStrt:iLast),x(iStrt:iLast),res)
res@gsnCenterString = "Band Pass Filtered: 3a-6a"
plot(1) = gsn_csm_xy (wks,yrfrac(iStrt:iLast),xBPF(iStrt:iLast),res)
resP = True
resP@gsnMaximize = True
gsn_panel(wks,plot,(/2,1/),resP)
end
脚本错误提示
求大神们指点
|
|