- 积分
- 1742
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-6-26
- 最后登录
- 1970-1-1
|
GrADS
系统平台: |
|
问题截图: |
|
问题概况: |
根据http://www.ncl.ucar.edu/Applications/Images/filters_3_1_lg.png的这个程序作图,对其中里面参数nWgt该如何理解呢?而且我根据这个程序作图,得出了如下图的对称图,而官网上的例子图形却是不对称的,到底是哪里做错了呢?喜欢大神解答。 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
10 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 BDRUSH 于 2014-8-14 15:17 编辑
惯例@longlivehj 官网脚本如下: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
diri = "/Users/shea/Data/AMWG/"
vName = "U_anom" ; name of variable on the file
fili = "uwnd.day.850.anomalies.1980-2005.nc"
f = addfile(diri+fili, "r")
x = f->$vName$(:,{0},{120});
***********************************************
; create the filter weights and apply
; ***********************************************
ihp = 2 ; band pass
sigma = 1.0 ; Lanczos sigma
nWgt = 201 ; loose 100 each end
fca = 1./100. ; start freq
fcb = 1./20. ; last freq
wgt = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )
xBPF = wgt_runave ( x, wgt, 0 ) ; 20-100 day
; ***********************************************
; 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 = 19950101 ; 4 years: winter 96-97 MJO gold standard
pLast = 19981231
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 r
es@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 [0, 100E]"
plot(0) = gsn_csm_xy (wks,yrfrac(iStrt:iLast),x(iStrt:iLast),res)
res@gsnCenterString = "Band Pass Filtered: 20-100 day"
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
|
|