- 积分
- 1564
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-3-23
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
- begin
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9月海冰密集度sic(time,lat,lon)
- f = addfile("ice.nc","r")
- it_s = 197909
- it_e = 201009
- time = f->time
- yyyy = cd_calendar(time, -1)
- rec_s = ind(it_s.eq.yyyy)
- rec_e = ind(it_e.eq.yyyy)
- sic = f->sic(rec_s:rec_e:12,{66:90},:)
- sic!1 = "lat"
- sic!2 = "lon"
- ;printVarSummary(sic)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;定义的冬季西伯利亚高压指数 slp(time)
- s = addfile("slp.mon.mean.nc","r")
- ti = s ->time
- yyyymm = cd_calendar(ti,-1)
- it_q = 197901
- it_w = 201012
- rec_q = ind(it_q.eq.yyyymm)
- rec_w = ind(it_w.eq.yyyymm)
- slp = s->slp(rec_q:rec_w,{40:60},{80:120})
- slp_DJF = month_to_season(slp, "DJF")
- slp_avg = dim_avg_n_Wrap(slp_DJF,(/1,2/))
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;进行回归
- rc = regCoef(slp_avg, sic({lat|:},{lon|:},{time|:}))
- copy_VarMeta(sic(0,:,:), rc)
- print(rc)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;t检验
- tval = onedtond(rc@tval , dimsizes(rc))
- df = onedtond(rc@nptxy,dimsizes(rc))-2
- b = tval
- b = 0.5
- prob = betainc(df/(df+tval^2), df/2.0, b)
- prob!0 = "lat"
- prob!1 = "lon"
- prob&lat = sic&lat
- prob&lon = sic&lon
- prob@long_name="probability"
- ;printVarSummary(prob)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;画图:回归系数
- wks = gsn_open_wks("png","xiangguan")
- gsn_define_colormap(wks,"BlueRedGray")
- res = True
- res@gsnPolar = "NH"
- res@gsnDraw = False
- res@gsnFrame = False
- res@gsnMaximize = True ; make large
- res@gsnAddCyclic = False
-
- res@cnFillOn = True ; turn on color
- res@cnLinesOn = False ; turn off contour lines
- res@cnLineLabelsOn = False ; turn off contour linelabels
- res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
- res@cnMinLevelValF = -0.2 ; set min contourlevel
- res@cnMaxLevelValF = 0.2 ; set max contourlevel
- res@cnLevelSpacingF = 0.05 ; set contourinterval
-
- res@mpMinLatF = 60.
- res@mpMaxLatF = 90.
- res@mpCenterLonF = 90
- res@mpFillOn = False ; turn off map fill
- res@tiMainString = ""
- res@tiMainString = ""
- res@gsnRightString = ""
- base = gsn_csm_contour_map_polar(wks,rc,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.05/);
- res2@cnFillPatterns = (/7,-1/);
- res2@cnFillColors = (/1,-1/);
- res2@gsnLeftString = ""
- res2@tiMainString = ""
- res2@gsnRightString = ""
-
- plot = gsn_csm_contour(wks,prob,res2)
- overlay(base, plot)
- draw(base)
- frame(wks)
-
- end
复制代码 |
|