###criterion is a way of controlling download.file("http://www.climateaudit.org/data/tree/northamerica.details.tab","Temp.dat",mode="wb"); load("temp.dat") bristle.id=details$id[!is.na(match(details$type,c("PIBA","PILO","PIAR") ))];length(bristle) #48 rm(details) source("http://www.climateaudit.org/scripts/mann.2008/utilities.txt") library(GDD) #download "Basics", a collation of Mannian items library(signal) k=11; #k=k-1; period_MBH[k] #800 raw.mbh.verbose=manniancps(k,outerlist=outerlist.mbh,lat.adjustment= -1,smoothmethod="mann",verbose="verbose") ; names(raw.mbh.verbose) #[[1] "idsort" "Data" "grids" "regts" "rescaled" "recon" "working" raw.mbh=raw.mbh.verbose$recon target="CRU" cps.mbh=cpsf(raw.mbh,target) plot.ts(cps.mbh,main=paste("Mann08 CPS ",target,": ",period_MBH[k],"Step")) nodendro= ! ((details$code==9000)|(details$code==3000) ); sum(nodendro) notilj = is.na(match( 1:1209,1061:1064) ) nobristle= is.na(match(details$id,bristle.id )) ;sum(nobristle) #1185 ################ ## COMPARE TO NOTILJ NODENDRO ################################## raw= raw.nono=manniancps(k,criterion=notilj&nodendro, outerlist=Basics$outerlist$sensible,lat.adjustment= 0, smoothmethod="sensible",screenmethod="mann",verbose="verbose") ;# tsp(raw.sens) plot.ts(raw.nono$recon,main=paste("Mann08 CPS: AD",period_MBH[k],"Step") ) cps.nono=cpsf(raw.nono$recon,target) #no SH difference plot.ts(cps.nono,main=paste("Mann08 CPS ",target,": ",period_MBH[k],"Step")) # GDD(file="d:/climate/images/2009/mann/notilj.nodendro_ad800_compare.gif",type="gif",w=420,h=320) par(mar=c(3,4,2,1)) plot(c(time(cps.mbh)), cps.nono[,1],type="l",col=5,ylab="deg C",ylim=c(-1.2,.6));abline(h=0,lty=3) lines( c(time(cps.mbh)), cps.mbh[,1]) title("NH CPS AD800 Difference: Notilj Nodendro") N=nrow(cps.mbh) points(c(time(cps.mbh))[N], cps.nono[N,1],pch=19,col=4) # dev.off() # GDD(file="d:/climate/images/2009/mann/notilj.nodendro_ad800_difference.gif",type="gif",w=420,h=320) par(mar=c(3,4,2,1)) plot(c(time(cps.mbh)), cps.mbh[,1]-cps.nono[,1],type="l",ylab="deg C");abline(h=0,lty=3) title("NH CPS AD800 Difference: Notilj Nodendro") # dev.off() ################ ## COMPARE TO NOTILJ NOBRISTLE ################################## raw=manniancps(k,criterion=notilj&nobristle, outerlist=Basics$outerlist$sensible,lat.adjustment= 0, smoothmethod="sensible",screenmethod="mann",verbose="verbose") ;# tsp(raw.sens) cpsx= cps.nobristle=cpsf(raw$recon,target) #no SH difference plot.ts(cpsx,main=paste("Mann08 CPS ",target,"",period_MBH[k],"Step: Notilj Nobristle")) # GDD(file="d:/climate/images/2009/mann/notilj.nobristle_ad800_compare.gif",type="gif",w=420,h=320) par(mar=c(3,4,2,1)) plot(c(time(cps.mbh)), cpsx[,1],type="l",col=5,ylab="deg C",ylim=c(-1.2,.6));abline(h=0,lty=3) lines( c(time(cps.mbh)), cps.mbh[,1]) title("NH CPS AD800 Difference: Notilj Nobristle") N=nrow(cps.mbh) points(c(time(cps.mbh))[N], cpsx[N,1],pch=19,col=4) dev.off() # GDD(file="d:/climate/images/2009/mann/notilj.nobristle_ad800_difference.gif",type="gif",w=420,h=320) par(mar=c(3,4,2,1)) plot(c(time(cps.mbh)), cps.mbh[,1]-cpsx[,1],type="l",ylab="deg C");abline(h=0,lty=3) title("NH CPS AD800 Difference: Notilj Nobristle") dev.off() ################ ## COMPARE TO NOTILJ NOBRISTLE NOSCREEN ################################## raw =manniancps(k,criterion=notilj&nobristle, outerlist=Basics$outerlist$sensible,lat.adjustment= 0, smoothmethod="sensible",screenmethod="noscreen",verbose="verbose") ; cpsx= cps.noscreen=cpsf(raw$recon,target) #no SH difference # GDD(file="d:/climate/images/2009/mann/noscreen_ad800.gif",type="gif",w=420,h=480) par(mar=c(3,4,2,1)) plot.ts(cpsx,main="CPS AD800 No-Screen") dev.off() details$short[as.numeric(dimnames(raw$working)[[2]])] #34 # [1] "arg93ars" "arge092" "burns_2003_s" "burns_2003_s" "burns_nicoya" "burns_nicoya" # [7] "cronin_2003_" "curtis_1996_" "curtis_1996_" "curtis_1996_" "curtis_1996_" "dongge" #[13] "fisher_1994_" "fisher_1996_" "hodell_2001_" "hodell_2001_" "lee_thorpe_2" "lee_thorpe_2" #[19] "meese_1994_g" "mongolia-dar" "moore_2001_t" "moy_2002_age" "mt111" "nc008" #[25] "nm572" "or062" "recjj_yy1" "tan_2003_rec" "tasmania_rec" "thompson_199" #[31] "thompson_199" "thompson_200" "tornetrask" "yu_1999_mgca" length(details$short[as.numeric(dimnames(raw.mbh.verbose$working)[[2]])]) #18 details$short[as.numeric(dimnames(raw.mbh.verbose$working)[[2]])] #[1] "burns_2003_s" "burns_2003_s" "curtis_1996_" "curtis_1996_" "dongge" "fisher_1994_" #[7] "fisher_1996_" "lee_thorpe_2" "lee_thorpe_2" "nv512" "tan_2003_rec" "tasmania_rec" #13] "thompson_199" "tiljander_20" "tiljander_20" "tiljander_20" "tiljander_20" "tornetrask"