Slowing down of North Pacific climate variability and its implications for abrupt ecosystem change

I realise I haven’t posted on here for a while and hadn’t made a post about our paper on slowing down signals we observed in North Pacific sea surface temperatures (SSTs) that was published in PNAS 18 months ago or so.

We found a strong slowing down/reddening signal in the Pacific Decadeal Oscillation (PDO), a principal component of the North Pacific SSTs which appears to be in one of two phases and switches every few decades. The slowing down signal is also observed in the SSTs themselves. As these sort of indices are known to drive ecological systems in the region, such as salmon stock levels, we decided to see how a reddening of the forcing would affect these systems using toy models.

The paper can be found here: http://www.pnas.org/content/112/37/11496.short

Early warning signals of Atlantic Meridional Overturning Circulation collapse in a fully coupled climate model

Yesterday we had a publication in Nature Communications (http://www.nature.com/ncomms/2014/141208/ncomms6752/full/ncomms6752.html) showing that we had found early warning signals of AMOC collapse in a fully coupled climate model.

We find increases in both autocorrelation and variance prior to the collapse when it is forced with a linearly increasing amount of freshwater forcing. Furthermore, we found that the signals were stronger in certain places, suggesting there is strength in monitoring systems such as the AMOC in more than one location if we are to use these indicators in the real world. To test how much data would be needed for early warning, we extended the use of our null models to see how long a time series would be needed for the signals to become significant, finding that the signals emerged around 250 years before the tipping occurs.

There has been some online discussion of the paper already (http://blog.hotwhopper.com/2014/12/an-amoc-early-warning-signal-prompts.html?spref=tw is particularly good!)

Shiny application for early warning signals of tipping points

Ever since I found out about the Shiny package for R (http://www.rstudio.com/shiny/), I’ve thought it would make a useful tool to help people understand how generic early warning signals for tipping points are calculated. I have made a script which allows the user to make their own time series which includes a bifurcation or tipping point and then by varying the detrending bandwidth and sliding window length, can quickly observe how the indicators behave.

To begin running the script, you will first need to install the Shiny package for R by typing ‘install.packages(“shiny”)’ into the R command line and selecting a mirror as you would for any other package. Shiny works by having two scripts, named ui.R and server.R, which set up the layout of the application made and run the calculations needed respectively. The scripts for the early warning application, along with another R-code to create the time series to use can be found below:


library(shiny)
library(Kendall)
shinyServer(function(input, output) {
output$tsplot <- renderPlot({
table <- read.table('tip.txt')
ts <- table[,1]
tscut <- ts[1:input$cut]
smoothed <- ksmooth(c(1:input$cut),tscut,bandwidth=input$bw,x.points=c(1:input$cut))
detrend <- tscut smoothed$y
plot(ts,type="l",ylab='X')
lines(smoothed,col='red')
lines(c(input$cut,input$cut),c(100,100),lty=3)
})
output$ar1plot <- renderPlot({
table <- read.table('tip.txt')
ts <- table[,1]
tscut <- ts[1:input$cut]
smoothed <- ksmooth(c(1:input$cut),tscut,bandwidth=input$bw,x.points=c(1:input$cut))
detrend <- tscut smoothed$y
ar1 <- rep(NA, (length(ts)input$wl))
for (i in 1:(input$cutinput$wl)) {
arfit <- ar.ols(detrend[i:(i+input$wl)], aic=FALSE, order.max=1)
ar1[i] <- arfit$ar
}
kend <- Kendall(c(1:length(ar1)),ar1)
plot(c(input$wl:(input$wl1+length(ar1))),ar1,type="l", main=paste('AR(1): Tau=',format(kend$tau, digits=3),sep=""), xlim=c(1,length(ts)),xlab='Index',ylab='AR(1)')
})
output$variplot <- renderPlot({
table <- read.table('tip.txt')
ts <- table[,1]
tscut <- ts[1:input$cut]
smoothed <- ksmooth(c(1:input$cut),tscut,bandwidth=input$bw,x.points=c(1:input$cut))
detrend <- tscut smoothed$y
vari <- rep(NA, (length(ts)input$wl))
for (i in 1:(input$cutinput$wl)) {
vari[i] <- var(detrend[i:(i+input$wl)])
}
kend <- Kendall(c(1:length(vari)),vari)
plot(c(input$wl:(input$wl1+length(vari))),vari,type="l", main=paste('Variance: Tau=',format(kend$tau,digits=3),sep=""),xlim=c(1,length(ts)),xlab='Index',ylab='Variance')
})
})

view raw

server.R

hosted with ❤ by GitHub


x <- seq(2,2,by=0.01) #x axis for plotting
mu <- 2*sqrt(3)/9 #bifurcation parameter
t <- seq(1,1000,by=1) #time steps
m <- mu*t/900 #the change in the bifurcation parameter over time (this is the length of t compared to mu which is a single value)
a <- rep(NA, (length(t)+1)) #setting up vector to hold created time series
a[1] <- 1 #start it in the left well
for (i in 1:length(m)) {
a[i+1] <- a[i] + (1/2)*(a[i]^3+a[i]+m[i]) + 0.1*rnorm(1)
}
write.table(a,file='tip.txt',col.names=FALSE,row.names=FALSE)

view raw

timeseries.R

hosted with ❤ by GitHub


library(shiny)
# Define UI for miles per gallon application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Early Warning Signals"),
sidebarPanel(
sliderInput("bw","Detrending Bandwidth:",min=0.5,max=50,value=10),
sliderInput("wl","Window Length:",min=250,max=650,value=425),
numericInput("cut", "Cut-off point:", 875)
),
mainPanel(
plotOutput("tsplot"),
plotOutput("ar1plot"),
plotOutput("variplot")
)
))

view raw

ui.R

hosted with ❤ by GitHub

To avoid confusion, it is probably best to save these 3 files in a new directory. Once you have them, start up R and the Shiny package (type ‘library(shiny)’ into the R command line) and run the ‘timeseries.R’ script (‘type ‘source(‘timeseries.R’)’). This creates a text file of a time series which includes a tipping point. This is the same code used to generate the time series from the animations shown a few months ago (here and here) but will vary slightly based on the random noise added.

Now a time series has been created, you’re ready to use the application! Type ‘runApp()’ into the command line and the application will open in your web browser. It gives options to change detrended bandwidth and moving window length used in the calculation via the slider bars. There is also the option to change the cut-off point for the data. When testing early warning signals, it is best to only use data up to but not including the tipping point so this value varies where the cut-off is (which due to the randomness will be slightly different for everyone).

The indicators used here are autocorrelation and variance and they should both increase. More can be read about them in Tim Lenton’s 2011 review in Nature Climate Change (http://www.nature.com/nclimate/journal/v1/n4/full/nclimate1143.html). The idea of using the varying detrending bandwidths and sliding window lengths is to test the robustness of the indicators to these changes. Their tendencies (how ‘well’ they increase are measured using Kendall’s tau (shown above each indicator plot). This varies between -1 (always decreasing) to 1 (always increasing) so values near 1 are good indicators.

A few technical notes:

  • If you want to change the values on the sliding bars, then this can be easily done by altering their min and max values in the ui.R script.
  • You can also test your own time series. To do this, you can either rename your time series ‘tip.txt’ when placed in the same directory as the ui.R and server.R scripts or change references to ‘tip.txt’ in these files to the name of your time series file. You will probably want to use the note above to change the slider values so they better fit the length of your data also.
  • I’m also aware that my code isn’t the most efficient and that repeated sections in the server.R script could be condensed!

Have fun!

Tipping points workshop, Edinburgh

Last week I attended the tipping points workshop held at ICMS in Edinburgh. The workshop included people from many different backgrounds and the subjects were quite diverse. You can find out more about it (including all the presentations) here:

http://www.mathclimate.org/webcasts/tipping-points-2013

I also presented a poster at the workshop. Although you can find it from the link above, here is the figshare link as well!

http://figshare.com/articles/Early_warning_signals_of_simulated_Amazon_dieback/801095

Animations for Predicting Tipping Points (Part 2)

Image

If you haven’t seen part 1 you can find it here.

In this animation (click to see it move) you will see how tipping points can be predicted using generic indicators, in this case using AR(1) coefficient estimation. This estimate should increase due to critical slowing down. When a system is approaching a tipping point, it will become slower to recover from perturbations. This can be can be understood graphically in part 1 where the potential well shallowed and so the ball ‘rolled’ more slowly. The AR(1) coefficient ‘a’ is estimated by fitting a model x(t+1) = a*x(t) + e (e – noise).

The use of generic indicators for early warning signals is tested over time. A window length is chosen where an indicator (here the AR(1) coefficient estimation) is tested on that segment of the data only. Then the window length moves up one time point at a time until we create a time series of the indicator.

Using the time series of x from part 1, we only want information up to the tipping point so we cut off anything past it as well it the tipping point itself so we are left with what looks like a normal time series.

This will have some drift in it, so we use a smoothing function and observe the residuals from this smoother version. Here I’ve used a Kernal smoother with a bandwidth equal to 30. Once we have obtained the residuals we need to specify a window length (I have used half the length of the remaining time series once the tipping point has been removed).

The top plot in the animation shows the shortened time series along with the smoothing function used to create the residuals. The bottom plot shows the residuals. Once we get to the halfway point, we can start to use our generic indicator (as we picked a window length equal to half the time series). Our window is represented by the dashed and dotted lines and the value on the indicator (AR(1) coefficient) is plotted at the end of each window.

Animations for Predicting Tipping Points (Part 1)

double

Here is the first of two animations I made to help describe tipping points and their prediction using early warning signals. You may have to click on the image to see it move.

The plot on the left is a potential well which shows the states of the system along with how stable they are (represented by the deepness of the well). The ball represents which state the system is currently in.

As we move through time, noise pushes the system moving the ball in the well. However we are also approaching a bifurcation causing the state on the left to become unstable. Eventually we pass the tipping point when this state has lost stability and so the ball/system moves into the new state suddenly.

The right hand plot tracks this movement so we create a time series of x where is it clear to see the tipping point has been passed.