- 积分
- 820
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-12-14
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
最近在用ncl画一个经向的垂直坡面的图,用的是omega数据,画出来的图1000hpa的omega在最上层,而200hpa的在底下,不理解为什么?
程序是一个去趋势的回归分析图
begin
f1=addfile("omega.mon.mean.nc", "r")
f2=addfile("hwfts.nc", "r")
ts=f2->ts(:,:)
omega=f1->omega(0:827,:,:,:)
year=ispan(1950,2014,1)
omegaDJF=month_to_season(omega,"DJF")
yearDJF=omegaDJF(2:66,:,{20:45},{90:270})
;printVarSummary(yearDJF)
avelat=dim_avg_n(yearDJF, 2)
copy_VarCoords(yearDJF(:,:,0,:), avelat)
;printVarSummary(avelat)
c=dtrend_msg_n(year,avelat, True, True, 0)
rc=regCoef_n(ts,c(:,:,:),1,0)
copy_VarCoords(avelat(0,:,:), rc(0,:,:))
printVarSummary(rc)
;-------------------------------------------------------
;test
;-------------------------------------------------------
tval = onedtond(rc@tval , dimsizes(rc)) ;t-statistic of rc
df = onedtond(rc@nptxy, dimsizes(rc)) - 2 ;×Ôóé¶è
b = tval ; b must be same size as tval (and df)
b = 0.5
prob = betainc(df/(df+tval^2),df/2.0,b) ; prob(nlat,nlon)
copy_VarCoords(rc, prob)
;printVarSummary(prob)
wks = gsn_open_wks("png","test")
;omega-rc
res = True
res@gsnDraw = False
res@gsnFrame = False
res@cnFillOn = True
res@cnLinesOn = False
res@lbLabelBarOn = False
res@gsnAddCyclic = False
res@cnLineLabelsOn = False
res@lbOrientation = "Vertical"
res@lbBoxLinesOn = False
res@gsnContourNegLineDashPattern = 1 ; sets negative contours to dash pattern 1
res@cnLineThicknessF = 0.6
res@cnLineLabelFontHeightF = 0.008
res@cnLineLabelFontThicknessF = 0.005
res@tmXBLabelFontHeightF = 0.015
res@tmYLLabelFontHeightF = 0.015
res@cnSmoothingOn = True
res@cnSmoothingDistanceF = 0.001
res@cnSmoothingTensionF = -2
res@tmXTOn ="False"
res@tmYROn ="False"
;设置线条
res@cnLevelSelectionMode="ManualLevels"
res@cnMinLevelValF=-0.002
res@cnMaxLevelValF=0.005
res@cnLevelSpacingF=0.001
res@cnFillColors=(/18,66,109,129,161,193,203,215,230,240/)
res@txFontHeightF=0.02
;回归omega显著性打点
rts = True
rts@gsnDraw = False
rts@gsnFrame = False
rts@cnFillOn = True
rts@cnLinesOn = False
rts@cnLineLabelsOn = False
rts@cnInfoLabelOn = False
rts@lbLabelBarOn = False
rts@cnLevelSelectionMode = "ExplicitLevels"
rts@cnLevels = (/0.05/) ;; set to significance level
rts@cnMonoFillPattern = False
rts@cnFillPatterns = (/17,-1/)
rts@cnFillScales = (/1.3,1/) ; change densities
rts@cnFillDotSizeF = 0.003
rts@cnFillColors = (/1,0/)
rts@gsnLeftString = ""
plots = new(2,graphic)
plots(0)= gsn_csm_contour(wks,rc(0,:,:),res)
plots(1)= gsn_csm_contour(wks,rc(1,:,:),res)
plot = new(2,graphic)
plot(0) = gsn_csm_contour(wks,prob(0,:,:),rts)
plot(1) = gsn_csm_contour(wks,prob(1,:,:),rts)
overlay(plots(0),plot(0))
overlay(plots(1),plot(1))
pres = True
pres@gsnMaximize = True
;pres@gsnPanelDebug=True
pres@gsnPanelRowSpec = True
pres@gsnPanelLabelBar = True
;pres@lbBoxLinesOn = False
pres@gsnPanelFigureStrings = (/"a","b"/)
pres@gsnPanelFigureStringsPerimOn=False
pres@amJust = "TopLeft"
pres@amZone =0.1
gsn_panel(wks,plots,(/2/),pres)
end
再有问一个白痴的问题,omega小于零就是上升运动吧?
|
-
|