- 积分
- 17
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-9-10
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
这个是求两个指数滑动相关系数的脚本,有海温平均与平均850经向风,海温与平均500位势高度的滑动相关系数,但是一直报错18行有问题,且不能识别dim_avg_n函数,求大神解答!万分感谢!
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
f =addfile("/cygdrive/G/cntl/b.e11.B1850C5CN.f19_g16.0850cntl.001.cam.h0.TS.185001-200512.nc","r")
f2 =addfile("/cygdrive/G/cntl/cntl.001.cam.h0.V.185001-200512.nc","r")
f3 =addfile("/cygdrive/G/cntl/cntl.001.cam.h0.Z3.185001-200512.nc","r")
sst =f->TS(:,{-5:5},{120:170})
vv =f2->V(:,{850},{30:60},{105:150})
zz =f3->Z3(:,{500},{25:45},{110:145})
year =ispan(1850,2005,1)
siw =month_to_season(sst,"DJF")
v =month_to_season(vv,"DJF")
z =month_to_season(zz,"DJF")
siw =0.0
do i=0,2
siw =dim_avg_n(siw,i)
v =0.0
z =0.0
end do
do i=0,3
v =dim_avg_n(v,i)
z =dim_avg_n(z,i)
end do
cor11 =run_cor (siw,v,year,21)
cor12 =run_cor (siw,z,year,21)
;**************************************************
; create plot
;**************************************************
wks = gsn_open_wks("png","/cygdrive/G/cntl/gsn_xy")
res = True ; plot mods desired
res@tiMainString = "EAWWMI AND NINO" ; title
res@tiYAxisString = "cor" ; y axis title
res@tiXAxisString = "Time" ; x axis title
plot1= gsn_xy(wks,time,cor11,res) ; Draw an XY plot with 1 curve.
plot2= gsn_xy(wks,time,cor12,res)
end
|
-
窗口提示
|