1 Instructions

This lab is in two parts:

  • PartI focuses on modern global temperature and atmospheric CO2
  • PartII focuses on the Ice Core record with geologic history of temperature and CO2. PartII also includes the modern \(\delta\) 13C atmospheric record for additional evidence of anthropogenic climate change.

1.1 Setup

  • create a folder EcosystemEcology/Lab2 on your computer
  • download Lab2_AllData.xlsx and the .Rmd file to this folder!
  • Use 'save as' to save the file with a new name to create your own .Rmd and add your answers:
    • save as: Lab2_Assignment_partI_LASTnameFIRSTname.Rmd and .html

1.2 Doing the lab

  • read through this assignment sheet so you know what the lab involves
  • choose whether you want to do the assignment with or without helper code
  • load data into R
  • Answer questions showing:
    • code
    • inserting supporting figures
    • provide explanations
  • for maximum points, answer in full sentences using appropriate units, figure axis labels, and descriptive figure titles
  • submit as .html (zipped if getting security error) and as .Rmd file in Blackboard
  • IMPORTANT: when you open the Rmd file in the first code chunk called {r setup, include = FALSE} change the settings to echo = TRUE and eval = TRUE to make sure your output shows. It needs to look like this:

knitr::opts_chunk$set(echo= TRUE, eval= TRUE)

1.3 DUE

  • part I: September 9
  • part II: September 13

2 Lab Outline

  1. Activity A: Determine current rates of air temperature and CO2 change from modern datasets
  2. Activity B: Explore whether modern temperature and CO2 concentrations are related
  3. Activity C: Compare current and pre-historical temperature and CO2 concentrations using data from the Vostok ice core
  4. Activity D: Use modern atmospheric isotopic \(\delta\) 13C data to examine supporting evidence that the current rise in CO2 comes from fossil fuel emissions

3 The Datasets:

  1. Modern Global Temperature means and anomalies
  2. Atmospheric CO2 concentrations from Mauna Loa
  3. Atmospheric \(\delta\) 13C signatures from Mauna Loa
  4. Vostok Ice Core geologic record of global temperature and CO2 concentration

4 Load libraries and import data to R

4.1 Load required libraries

library(dplyr)
library(ggplot2)
library(readxl) # use install.packages("readxl") or install manually in Packages tab

4.2 Confirm your working directory

The first step for opening data in R is to tell R which folder on your computer contains the data. The folder that R reads is called 'the working directory' or wd. You can use the command getwd() to find out which folder R is currently looking at.
It will be easiest if you save the data and your .Rmd in the same folder because the default wd is the directory that your R script file comes from. If the data and .Rmd are in the same place, you won't need to change anything.

Confirm that your wd is the folder where your data is saved:

4.3 Import the data

OK, ready to import data.
Read the data from the excel sheet by specifying which sheet and which line the data starts on.
We're going to load all the data for the entire assignment in this step. I like to set-up my code this way, so that I can see all the data I plan to use by looking at the beginning of my R script. Each dataframe that we create should show up in your environment.

setwd("/Users/memauritz/Desktop/R/R_programs/Teaching/EcosystemEcology_UTEP/Lab2_Data")

modern.c13 <- read_excel("Lab2_AllData.xlsx", sheet="MaunaLoa_Monthly_C13", skip=54, na=c("-99.99"))
vostok.temp <- read_excel("Lab2_AllData.xlsx", sheet="Vostok_Temp", skip=1, na=c("-99.99"))
vostok.co2 <- read_excel("Lab2_AllData.xlsx", sheet="Vostok_CO2", skip=1, na=c("-99.99"))

4.4 Do a simple check to see whether the data imported correctly

Use %>% glimpse to see the column names and the column type.
All of our data is numeric so all the column types should be < dbl >.
You can also check this in the excel file to see how R reads data.

Modern \(\delta\) 13C signature data set

Vostok Ice Core Temperature data set

Vostok Ice Core CO2 concentration data set

5 An easy way to see column names

When trying to remember the names of columns to graph or analyse your data, you can use colnames(data) anytime for a quick reminder of what's in a data frame. Eg:

colnames(modern.c13)
##  [1] "Year"                    "Month"                  
##  [3] "Date...3"                "Date...4"               
##  [5] "C13_permil"              "C13_permil_seas_adj"    
##  [7] "C13_fit_permil"          "C13_fit_permil_seas_adj"
##  [9] "C13_filled_permil"       "C13_smooth"

6 Question Set

6.1 Activity A: (see part I)

6.2 Activity B: (see part I)

6.3 Activity C:

Compare current and pre-historical temperature and CO2 concentrations using data from the Vostok ice core

There are three variables that you will analyse from the ice cores. You will graph temperature anomalies and absolute temperatures to compare with the modern records. You will also analyze pre-historic atmospheric CO2 concentration, which has been measured from air bubbles trapped in the ice. We can use these data to see what temperatures and CO2 concentrations were like 400 000 years into the past, during which human activity has been minimal.

6.3.1 Graph the temperature anomaly recorded in the Vostok ice core

Use vostok.temp dataframe and the column Temp_anom_C_vost

Do the following:

  1. the years are in Years_BP (that's years before present) and go back to 420 000 BP. Divide the years by 1000 in the x-axis so that the unit becomes kyr BP

  2. add Temp_anom_C_vost with both a point and a line geom

  3. add a zero line for reference, like you did for the modern temperature anomaly

  4. add a blue dashed vertical line and label for the start of the Holocene 11 kyr ago using: + geom_vline(xintercept=11, colour="blue", linetype="dashed") + geom_label(label="Holocene start",x=17,y=5)

  5. specify the range of the y-axis + ylim(xmin=-10, ymax=5)

  6. add meaningful titles and axis labels

Graph Vostok temperature anomalies:
[Graph Here]

6.3.2 OK. This is a complex dataset, let's navigate this figure for a moment.

An important thing to note is that Year 0 represents 1998 because that is when the ice core was collected. The years on the x-axis of this figure go from 0 to 400 BP (in 1000's of years). This is backwards compared to how we are used to seeing time on a graph (eg: compare the modern graphs). It means that the furthest left is the most recent time and as you move right on the x-axis you go further and further back in time, through multiple ice-ages.

Answer the following:

  1. The periods with positive anomalies peaks represent major inter-glacial periods when the entire planet was ice-free. Glacial/Inter-glacial periods re-occur approximately every 100 kyr. Based on the graph, what is a typical magnitude of the temperature anomalies in the inter-glacial past (~400 kyr BP, 300 kyr BP, 200 kyr BP, 100 kyr BP)?

  2. We added a blue dashed line at 11 kyr BP and a label to mark the start of the Holocene (that's the epoch we are in right now). What can you say about the magnitude and variation of temperature anomalies since the start of the Holocene? Careful of which direction to read the x-axis.

6.3.3 Now, let's look at Glacial/Inter-glacial CO2 concentrations

Do the following:

  1. Graph the pre-historic atmospheric CO2 concentrations from the Vostok core using vostok.co2 and the column co2_ppmv_vost vs the age of gas in the ice (Gas_age_yrBP/1000) with a point and line geom
  2. add a vertical blue dashed line and a label for Holocene, as we did for the temperature anomaly. You will want to change the y-location of the label to 300, ie: geom_label(label="", x=17, y=300)

Graph Vostok CO2 concentrations:
[Graph Here]

Answer the following:

  1. What are the maximum pre-historic CO2 concentrations during the periods with large positive temperature anomalies (~400 kyr BP, 300 kyr BP, 200 kyr BP, 100 kyr BP)?

  2. Describe how CO2 fluctuations compare to the temperature anomaly fluctuations in the Ice Core data? Think generally about patterns, for example timing of peaks and troughs in the graphs. You could re-print the both the temperature anomaly graph and the co2 graph in the same chunk and R will let you flip between the two. It might be easier to compare.

6.3.4 Calculate the rate of temperature change in the Vostok ice core since the last Ice Age.

The Earth started to emerge from the last Ice Age ~18 kyr BP. Notice that the transitions from Glacial (Ice Age) to Inter-Glacial appears to happen very rapidly. Zoom in on temperature anomalies and CO2 concentration from the time that Earth emerged form the last Ice Age period to enter the Holocene and up to 1998 (Year 0). Then, calculate the linear rates of change for temperature and CO2 concentration. We will want to use the actual temperature for the rate of change calculation, not the anomaly.

Do the following:

  1. Use filter(Year_BP/1000 <= 18) to select Vostok data from the last 18 000 years and then graph actual temperature (that's column: Temp_C_vost in vostok.temp) for the last 18 kyr, with point and line geom.

  2. Estimate the rate of temperature change from 18-11 kyr ago.
    Instead of using lm() to determine the rate of temperature change, estimate the rate of change from the graph. Use the graph to visually estimate temperatature change from the approximate end of the last Ice age (18 000 yr ago) to the approximate start of the Holocene (11 000 yr ago). Then, calculate the rate of change.
    For temperature, use the absolute value of the difference (Ie: ignore the negative number). Show how you used R to do the math and report the estimated rate of temperature change from 18-11 kyr ago, make sure to include units (hint: temp/time).

  3. Compare the annual rate of temperature change from modern times (since 1880 to 1950) with the pre-historic rate of change from the last Ice Age Transition.

Graph actual Vostok temperatures from 18 kyr BP to present (1998):
[INSERT GRAPH]

Hint for rate of change estimate
Remember that the rate of change is given by the following formulas, and the relevant values can be visually estimated on a graph:
\(\frac{rise}{run} = \frac{change(y)}{change(x)} = \frac{y2-y1}{x2-x1}\)

Visually estimate and calculate rate of temperature change from 18 to 11 kyr ago. Remember the years are in the 1000's so use the 1000s numbers, not the ones shown on the graph!!:
[SHOW CALCULATION FOR VISUAL ESTIMATE OF TEMPERATURE CHANGE RATE]

6.4 Activity D:

Use modern atmospheric isotopic \(\delta\) 13C data to examine supporting evidence that the current rise in CO2 comes from fossil fuel emissions.

How do we know warming and rising CO2 are caused by humans?!
Evidence for climate change is based on data that includes what we have explored here. These meticulously gathered temperature and CO2 data show how temperature and CO2 fluctuate together. We can also use other data like the isotopic signature of CO2 in the atmosphere to determine whether rising CO2 in the atmosphere is consistent with isotopic signals we expect to see with increasing fossil-fuel contribution.

Do the following:

  1. Use the Mauna Loa \(\delta\) 13C data to graph the change in 13C signature. Use the column C13_smooth in modern.c13. Graph with a point geom. Add a title and axis labels. Instead of \(\delta\) 13C, you can call the axis delta 13C (per mil) (yes, lower-case).

Graph modern \(\delta\) 13C:
[INSERT GRAPH, don't worry if you get this warning, it's because one data point is absent fro the full dataset. ##Warning: Removed 1 rows containing missing values (geom_point)]

Answer the following:

  1. We know that the \(\delta\) 13C signature of fossil fuels is more negative than the current atmosphere. How does this data provide additional evidence that the rise in atmospheric CO2 is linked to fossil fuel emissions?

7 EXTRA: Modifying ggplot for slightly nicer default output

ggplot2 has some default built-in themes that can easily be added to make the figures look nicer. Themes are added to a ggplot like all the other elements, with a +.

These two are nice alternatives to the gray background, you can try them:

  • +theme_bw()
  • +theme_linedraw()