- 积分
- 1971
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-4-7
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本人ncl小白,目前刚接触,老师让做一个滤波我就从NCEP Operational Analysis上面下载了日降水的资料 逐年下载的,但是我处理之后怎么都出不来图,grads阅读之后的代码显示- ga-> sdfopen pr_wtr.1980.nc
- Scanning self-describing file: pr_wtr.1980.nc
- SDF file pr_wtr.1980.nc is open as file 1
- LON set to 0 360
- LAT set to -90 90
- LEV set to 0 0
- Time values set: 1980:1:1:0 1980:1:1:0
- E set to 1 1
- ga-> q ctlinfo
- dset pr_wtr.1980.nc
- title Once daily NMC precipitable water data (1980)
- undef -9.99e+33
- dtype netcdf
- xdef 144 linear 0 2.5
- ydef 73 linear -90 2.5
- zdef 1 linear 0 1
- tdef 366 linear 00Z01JAN1980 1440mn
- vars 2
- pr_wtr=>pr_wtr 0 t,y,x Precitable Water
- head=>head 0 t Missing
- endvars
复制代码 我自己的滤波作图程序:- fils=systemfunc("ls pr_wtr.*.nc")
- f = addfiles(fils, "r")
- time=f[:]->head
- x = f[:]->pr_wtr(:,:,:) ;
- ihp = 2 ; band pass
- sigma = 1.0 ; Lanczos sigma
- nWgt = 201 ; loose 100 each end ()
- fca = 1./30. ; start freq
- fcb = 1./10. ; last freq
- wgt = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )
- printVarSummary(wgt)
- xBPF = wgt_runave_leftdim( x, wgt, 0 ) ; 10~30 day
- copy_VarMeta(x, xBPF)
- printVarSummary(xBPF)
- date = cd_calendar(time&time,-2)
- yrfrac = yyyymmdd_to_yyyyfrac (date, 0)
- delete(yrfrac@long_name)
- delete(time@long_name)
- pStrt = 19800101 ; 20 years:
- pLast = 19991231
- iStrt = ind(date.eq.pStrt) ; user specified dates
- iLast = ind(date.eq.pLast)
- delete(date)
- wks = gsn_open_wks ("png","filters_precipitation")
- gsn_define_colormap(wks, "GMT_gray")
- res = True
- res@gsnAddCyclic = True
- res@cnFillOn = True
- res@cnLineLabelsOn = False
- res@lbLabelBarOn = True
- res@lbLabelBarOn = False ; turn off individual cb's
- res@mpMinLatF = -90. ; range to zoom in on
- res@mpMaxLatF = 90.
- res@mpMinLonF = 0.
- res@mpMaxLonF = 360.
- res@mpCenterLonF = 180.
- plot = gsn_csm_contour_map(wks,xBPF(120,:,:),res)
- end
复制代码 最上面的load没有加,我觉得没有必要,另外,ncl运行不报错,就是出不了图,我现在比较困惑的是数据的问题还是我自己代码的问题,求大神解答 |
|