Hi;
The specx_ci functiom yields the confidence intervals for one time series. However, I have calculated the cospectrum line of 2 time series and would like estimate the Markov confidence intervals. But, there is no specxy_ci function (?). Does anyone know how I can estimate the Markov confidence intervals of cospectrum plot? Relevant parts of the code and the created plot are attached.
Thanks in advance,
Hyacinth
;************************************************
; set function arguments for spectrum analysis
;************************************************
d = 0 ; detrending opt: 0=>remove mean 1=>remove mean + detrend
sm = 5 ; smooth: should be at least 3 and odd
pct = 0.10 ; percent taper: (0.0 <= pct <= 1.0) 0.10 common.
;************************************************
;
; Co-spectrum
spec = specxy_anal(NEP,SWP,d,sm,pct)
splt = specx_ci(spec,0.05,0.95)
;************************************************
; plotting parameters
;************************************************
wks = gsn_open_wks("ps","specxy_ci") ; Opens a ps file
plot = new(4,graphic) ; create graphic array
r = True ; plot mods desired
r@gsnDraw = False ; do not draw
r@gsnFrame = False ; do not advance frame
r@trYLog = True ; log scale
r@trXLog = True
r@trXReverse = True ; Reverse X axis values
r@trXMinF = 2. ; manually set lower limit
r@trXMaxF = 112. ; " upper
r@tmXBMode = "Explicit"
r@tmXBValues = (/"100","50","20","10","5","4","3","2","1"/)
r@tmXBLabels = (/"100","50","20","10","5","4","3","2","1"/)
r@tmXBMinorValues = ispan(1,20,1)
r@xyLineThicknesses = (/4/) ; Define line thicknesses
r@xyDashPatterns = (/1/) ; Dash patterns
r@xyLineColors = (/"blue"/)
r@tiMainString = "" ; title
r@tiXAxisString = "" ; xaxis
r@tiYAxisString = "" ; yaxis
; ************************************************
; create plot of cospectrum
;************************************************
r@trYMinF = -.01 ; manually set lower limit
r@trYMaxF = 5. ; " upper
r@tiYAxisString = "Cospectrum: Confidence intervals (CI)?" ; yaxis
plot(0)=gsn_csm_xy(wks,1/(spec@frq),spec@cospc,r); create plot
r@tiYAxisString = "NEP spectrum & CI"
r@trYMinF = .1 ; manually set lower limit
r@trYMaxF = 10. ; " upper
plot(1)=gsn_csm_xy(wks,1/(spec@frq),splt,r) ;plot the specx create plot
r@tiYAxisString = "Spectrum of NEP" ; yaxis
plot(2)=gsn_csm_xy(wks,1/(spec@frq),spec@spcx,r) ; create plot
r@tiYAxisString = "Spectrum of SWP" ; yaxis
plot(3)=gsn_csm_xy(wks,1/(spec@frq),spec@spcy,r) ; create plot
;==============================================================
; Panel the plots created
;
;==============================================================
resP = True ; modify the panel plot
resP@gsnPanelYWhiteSpacePercent = 0.0 ; default is 1.0
; resP@gsnPanelFigureStrings= (/"LTREND EXPT(raw)","LTREND EXPT(dtrend)"/) ; add strings to panel
resP@amJust = "BottomLeft"
resP@gsnMaximize = True ; large format
resP@gsnPaperOrientation = "portrait"
gsn_panel(wks,plot,(/2,2/),resP)
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Thu Jul 12 2012 - 10:16:50 MDT