- 积分
- 17035
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-6-6
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
- 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
- ;;;;;;;;;;;;;;;500hPa合成分析;;;;;;;;;
- ;;;;;;;;;;;;;;;弱:1913—1926,强1930--1950;;;;;;;;
- f=addfile("/home/a2/hgt500.qihoutai.1920_1949.nc","r")
- hgt=f->sst
- f0=addfile("/home/a2/H.hgt500.1930_1950.nc","r")
- hgth=f0->sst
- f1=addfile("/home/a2/L.hgt500.1913_1926.nc","r")
- hgtl=f1->sst
- ;;;;;;;;合成;;;;;;
- avel=dim_avg_n_Wrap(hgtl,0)
- aveh=dim_avg_n_Wrap(hgth,0)
- cha=new((/91,180/),float)
- do j=0,179
- do i=0,90
- cha(i,j)=aveh(i,j)-avel(i,j)
- end do
- end do
- aveh!0="lat"
- aveh!1="lon"
- aveh&lat=fspan(-90,90,91)
- aveh&lon=fspan(0,358,180)
- avel!0="lat"
- avel!1="lon"
- avel&lat=fspan(-90,90,91)
- avel&lon=fspan(0,358,180)
- cha!0="lat"
- cha!1="lon"
- cha&lat=fspan(-90,90,91)
- cha&lon=fspan(0,358,180)
- hgt!0="lat"
- hgt!1="lon"
- hgt&lat=fspan(-90,90,91)
- hgt&lon=fspan(0,358,180)
- ;;;;;;;;;;合成分析显著性检验;;;;;;;
- ;;;;;0.05检验临界为2.035;;;;
- varh=dim_variance_n_Wrap(hgth,0)
- varl=dim_variance_n_Wrap(hgtl,0)
- vah=where(varh.eq.0,varh@_FillValue,varh)
- val=where(varl.eq.0,varl@_FillValue,varl)
- nl=14.
- nh=21.
- n=nl+nh-2.
- t=new((/91,180/),float)
- do j=0,179
- do i=0,90
- t(i,j)=(cha(i,j)/(sqrt(((nh-1)*vah(i,j)+(nl-1)*val(i,j))/n)))/(sqrt(1./nl+1./nh))
- end do
- end do
- t!0="lat"
- t!1="lon"
- t&lat=fspan(-90.,90.,91)
- t&lon=fspan(0.,358.,180)
- ;;;;;;;;;;;;;;;绘图;;;;;;;
- wks = gsn_open_wks("pdf","hgt500_hc")
- plot=new(4,graphic)
- gsn_define_colormap(wks,"BlueDarkRed18")
- res = True
- res@gsnDraw=False
- res@gsnFrame = False
- res@gsnAddCyclic = True
- res@cnFillOn = False
- res@pmTickMarkDisplayMode = "Always"
- res@gsnLeftString = ""
- res@gsnRightString = ""
- res@mpCenterLonF = 180
- res@mpFillOn= True
- res@cnLineLabelsOn = True
- res@cnLineLabelBackgroundColor = "-1"
- res@mpGridAndLimbOn = False
- ;res@mpGridSpacingF = 10
- ;res@mpGridLineThicknessF = 0.2
- res@gsnMaximize = True
- ;;;;;;;;;;;;气候态图;;;;
- res1 = res
- res1@cnLevelSelectionMode="ManualLevels"
- ;res1@cnLinesOn = False
- res1@cnMinLevelValF = 400
- res1@cnMaxLevelValF = 600
- res1@cnLevelSpacingF = 4
- ;res1@gsnSpreadColorStart = 4
- res1@gsnContourNegLineDashPattern = 2
- res1@gsnContourPosLineDashPattern = 0
- plot(0)=gsn_csm_contour_map(wks,hgt/10,res1)
- ;;;;;;;;;;;;高
- res2=res
- res2@cnLevelSelectionMode="ManualLevels"
- ;res2@cnLinesOn = False
- res2@cnMinLevelValF = -3
- res2@cnMaxLevelValF = 3
- res2@cnLevelSpacingF = .3
- ;res2@gsnSpreadColorStart = 4
- res2@gsnContourNegLineDashPattern = 2
- res2@gsnContourPosLineDashPattern = 0
- plot(1)=gsn_csm_contour_map(wks,aveh/10,res2)
- ;;;;;;;;;低;;;;;;;;;
- res3=res
- res3@cnLevelSelectionMode="ManualLevels"
- ;res3@cnLinesOn = False
- res3@cnMinLevelValF = -3
- res3@cnMaxLevelValF = 3
- res3@cnLevelSpacingF = .5
- ;res3@gsnSpreadColorStart = 4
- res3@gsnContourNegLineDashPattern = 2
- res3@gsnContourPosLineDashPattern = 0
- plot(2)=gsn_csm_contour_map(wks,avel/10,res3)
- ;;;;;;;;;;检验+差;;;;
- opt=True
- opt@gsnDraw=False
- opt@gsnFrame = False
- opt@gsnLeftString = ""
- opt@gsnRightString = ""
- opt@gsnMaximize = True
- iopt=opt
- opt@gsnAddCyclic = True
- opt@mpFillOn= True
- opt@mpCenterLonF = 180
- opt@pmTickMarkDisplayMode = "Always"
- opt@cnFillOn = False
- opt@cnLinesOn = False
- opt@cnLineLabelsOn=False
- opt@cnInfoLabelOn = False
- opt@cnLevelSelectionMode="ExplicitLevels"
- opt@cnLevels = (/2.035,2.0351,2.0352,2.4,2.5,2.6,3/)
- plot(3)=gsn_csm_contour_map(wks,t,opt) ;检验图
- op= True
- op@gsnShadeFillType = "pattern"
- op@gsnShadeHigh = 17
- plot(3)=gsn_contour_shade(plot(3),-999.,2.035,op) ;0.05
- cha1=new((/91,180/),float)
- do j=0,89
- do i=0,90
- cha1(i,j+90)=cha(i,j)
- end do
- end do
- do j=90,179
- do i=0,90
- cha1(i,j-90)=cha(i,j)
- end do
- end do
- cha1!0="lat"
- cha1!1="lon"
- cha1&lat=fspan(-90,90,91)
- cha1&lon=fspan(0.,358.,180)
- iopt@gsnAddCyclic = True
- iopt@gsnShape = True
- iopt@pmTickMarkDisplayMode = "Always"
- iopt@cnLevelSelectionMode="ManualLevels"
- iopt@cnMinLevelValF = -3
- iopt@cnMaxLevelValF = 3
- iopt@cnLevelSpacingF = 0.5
- iopt@gsnContourNegLineDashPattern = 2
- iopt@gsnContourPosLineDashPattern = 0
- iopt@cnFillOn = False
- iopt@cnLinesOn = True
- iopt@cnLineLabelsOn=True
- iopt@cnLineLabelBackgroundColor = "-1"
- iopt@tmYLMode = "Explicit"
- iopt@tmYLValues = (/-90,-45,0,45,90/)
- iopt@tmYLLabels = (/"90~S~o~N~S","45~S~o~N~S","0","45~S~o~N~N","90~S~o~N~N"/)
- iopt@tmXBMode = "Explicit"
- iopt@tmXBValues = (/0,90,180,270/)
- iopt@tmXBLabels = (/"0","90~S~o~N~E","180","90~S~o~N~W"/)
- plo=gsn_csm_contour(wks,cha1/10,iopt)
- wks6 = gsn_open_wks("pdf","hgtyy500_hc")
- p=gsn_csm_contour(wks6,cha1/10,iopt)
- draw(p)
- frame(wks6)
- overlay(plot(3),plo)
- draw(plot(3))
- frame(wks)
- ;;;;;;;;;;;组图
- resP= True
- resP@gsnPanelRowSpec = True
- resP@gsnPanelFigureStrings=(/"(a)","(b)","(c)","(d)"/)
- resP@gsnPanelFigureStringsBackgroundFillColor = "-1"
- resP@gsnPanelFigureStringsPerimOn = False
- resP@gsnPanelFigureStringsFontHeightF = 0.015
- resP@amJust = "BottomLeft"
- resP@gsnPanelXWhiteSpacePercent = 0.2
- resP@gsnPanelYWhiteSpacePercent = 0.2
- ; resP@gsnPanelLabelBar = True
- ; resP@pmLabelBarHeightF = 0.08
- ; resP@gsnSpreadColorStart =1
- gsn_panel(wks,plot,(/2,2/),resP)
- end
复制代码
|
-
-
|