- 积分
- 1564
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-3-23
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2020-11-19 16:37:50
|
显示全部楼层
- begin
- f = addfile ("uwnd.mon.mean.nc", "r")
- it_s = 196010
- it_e = 200110
- TIME = f->time
- yyyy = cd_calendar(TIME,-1)
- rec_s = ind(it_s.eq.yyyy)
- rec_e = ind(it_e.eq.yyyy)
- slp_base = f->uwnd(:251,{995},:,:)
- ;slp_base = f->slp(:257,{70:90},:)
- slp_10 = f->uwnd(rec_s:rec_e:12,{995},:,:)
- dims = dimsizes(slp_10)
- slp_all = new((/6,dims(0),dims(1),dims(2)/),typeof(slp_10))
- slp_all(0,:,:,:) = slp_10
- slp_all(1,:,:,:) = f->uwnd(rec_s+1:rec_e+1:12,{995},:,:)
- slp_all(2,:,:,:) = f->uwnd(rec_s+2:rec_e+2:12,{995},:,:)
- slp_all(3,:,:,:) = f->uwnd(rec_s+3:rec_e+3:12,{995},:,:)
- slp_all(4,:,:,:) = f->uwnd(rec_s+4:rec_e+4:12,{995},:,:)
- slp_all(5,:,:,:) = f->uwnd(rec_s+5:rec_e+5:12,{995},:,:)
- ;slp = (slp_10+slp_11+slp_12+slp_01+slp_02+slp_03)/6
- slp = reshape(slp_all,(/6*dims(0),dims(1),dims(2)/))
- copy_VarMeta(slp_base, slp)
- printVarSummary(slp)
- hyear=(/1961,1967,1968,1988,1992,1994,1995/)-1960 ;
- lyear=(/1969,1976,1982,1984,1989,1993,1998,1999,2000/)-1960
-
- high=new((/7,73,144/),"float")
- low=new((/9,73,144/),"float")
-
- do i=0,6
- high(i,:,:) = dim_avg_n_Wrap(slp(hyear(i)*6:hyear(i)*6+5,:,:),0)
- end do
- do j=0,8
- low(j,:,:)=dim_avg_n_Wrap(slp(lyear(i)*6:lyear(i)*6+5,:,:),0)
- end do
- high1=dim_avg_n_Wrap(high,0)
- low1=dim_avg_n_Wrap(low,0)
- ;x_end = high1-low1
- x_end = low1 - high1
- ;print(x_end)
- copy_VarMeta(high1, x_end)
- printVarSummary(x_end)
- ;t=(Xn-Yn)/(sqrt(((n1-1)*s1^2+(n2-1)*s2^2)/(n1+n2-2))*sqrt(1/n1+1/n2))
- n1 = 7
- n2 = 9
- df = n1+n2-2
- ;ts合成差值的显著性检验
- Xn_ts =high1;样本均值
- Yn_ts =low1 ;样本均值
- s1_ts =dim_variance_n(high(:,:,:),0) ;样本方差
- s2_ts =dim_variance_n(low(:,:,:),0) ;样本方差
- s1s2_ts =(n1-1)*s1_ts+(n2-1)*s2_ts
- t_ts =(Xn_ts-Yn_ts)/(sqrt(s1s2_ts/df)*sqrt(1.0/n1+1.0/n2))
- prob_ts_diff = student_t(t_ts,df)
- copy_VarMeta(slp_base(0,:,:),prob_ts_diff)
- printVarSummary(prob_ts_diff)
- printMinMax(prob_ts_diff,True)
- wks = gsn_open_wks("png","uwnd")
- gsn_define_colormap(wks,"hotcold_18lev")
- res = True
- res@gsnDraw = False
- res@gsnFrame = False
- res@gsnPolar = "NH"
- res@cnFillOn = True
- res@mpFillOn = False
- res@cnLevelSelectionMode = "ExplicitLevels"
- res@cnLevels = (/-1,-0.5,0,0.5,1/)
- res@cnFillColors = (/6,7,10,13,14,15/)
- res@mpMinLatF = 65.
- res@mpMaxLatF = 90.
- res@mpCenterLonF = -90
-
- res@tiMainString = "" ;主标题空白
- res@gsnRightString = "" ;"unit: K/decade"右上方字符空白
- res@gsnLeftString = ""
-
- base = gsn_csm_contour_map_polar(wks, x_end, res)
- res2 = True
- res2@gsnDraw = False;
- res2@gsnFrame =False;
-
- res2@cnFillOn = True
- res2@cnLinesOn = False;
- res2@cnLineLabelsOn = False
- res2@cnInfoLabelOn = False;
- res2@lbLabelBarOn = False;
- res2@cnMonoFillPattern = False
- res2@cnLevelSelectionMode ="ExplicitLevels"
- res2@cnLevels = (/0.01/);
- res2@cnFillPatterns = (/17,-1/);
- res2@cnFillColors = (/1,-1/);
- res2@cnFillDotSizeF = 0.003
- res2@gsnLeftString = ""
- res2@tiMainString = ""
- res2@gsnRightString = ""
-
- plot = gsn_csm_contour(wks,prob_ts_diff,res2)
- overlay(base, plot)
- draw(base)
- frame(wks)
- end
复制代码 |
|