- 积分
- 576
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2022-1-21
- 最后登录
- 1970-1-1
![[什夜0_o] 粉丝数:121 微博数:1056 新浪微博达人勋](source/plugin/sina_login/img/light.png)
|

楼主 |
发表于 2022-4-14 16:04:10
|
显示全部楼层
这是我对1979-2020年北纬0-50°,东经100-180°滤波的循环程序,在循环之前先筛选一下你需要的范围速度会快很多。
begin
f = addfile("/home/mars/Liubs/lunwen/data/olr.day.mean.nc","r")
time = (f->time)
time@units = "hours since 1800-01-01 00:00:0.0"
; Convert to UTC time.
time_ut = cd_calendar(time,0)
; Store return information into more meaningful variables.
year = time_ut(:,0) ; Convert to integer for
; print(year)
indtime = ind((year.ge.1979).and.(year.le.2020))
;print(indtime)
olr = (f->olr(indtime,{0:50},{100:180}))
;print(olr)
xBPF2 = new((/15341,21,33/),float)
;-------------do loop -------------------
do i = 0,32
do j = 0,20
olr2 = olr(:, j, i)
ihp = 2 ; band pass
sigma = 1.0 ; Lanczos sigma
nWgt = 31 ; loose 100 each end
fca = 1./60. ; start freq
fcb = 1./30. ; last freq
wgt = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )
opt = 0
;printVarSummary(wgt)
xBPF = wgt_runave_n_Wrap ( olr2, wgt, opt, 0 ) ; 10-20 day
xBPF@units = "W/m^2"
xBPF2(:, j, i) = xBPF
end do
end do ; the stride is not optional if end < start
;-------------output -------------------
copy_VarCoords(olr(:, :, :),xBPF2)
system("/bin/rm -f "+"30-60olr.nc")
fout = addfile("30-60olr.nc","c")
filedimdef(fout,"time",-1,True)
fout->olr = xBPF2(:,:,:)
end
|
|