Raw delta-O18 curve between 3,60-2,50 millios ago, that is Reuverian or Piacenzian stage. Based on James Zachos et al data file
Zachos, J.C., Dickens, G.R., and Zeebe, R.E., 2008, An early Cenozoic perspective on greenhouse warming and carbon-cycle dynamics. Nature. |Vol 451|17 January 2008|doi:10.1038/nature
Y-axis is column 3 on file, that is is uncorrected delta_018.
X axis is dating millions of years ago.
Python code to produce plot
Note: You must preprocess data w/ spreadsheet and text editor
- drawing climate diagram in python 3
- version 2.11
- 11.9.2020
-
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import interpolate
from matplotlib.ticker import (MultipleLocator, AutoMinorLocator)
import scipy.signal
beginage=2.4
endage=3.8
beginy=1.8
endy=5.0
datafilename="compilation1.csv"
captioni="Reuverian period - benthic D-O18"
savename="lisiecki.svg"
figsizex=16
figsizey=8
size0=14
size1=16
size2=18
size3=24
dfin0=pd.read_csv(datafilename, sep=";")
- age_Ma;d18O_ajd;d13C
col1='age_Ma'
col2='dO18_ajd'
lst1=[col1,col2]
dfin1 = dfin0[dfin0.columns.intersection(lst1)]
x0=dfin1[col1]
y0=dfin1[col2]
x=np.array(x0)
y=np.array(y0)
- y_savgol = scipy.signal.savgol_filter(y,31, 3)
y_savgol = scipy.signal.savgol_filter(y,31, 3)
- y_running = running_mean(y, 31)
- x_sm = np.array(x)
- y_sm = np.array(y)
- x_smooth = np.linspace(x_sm.min(), x_sm.max(), 20000)
- funk1 = interpolate.interp1d(x_sm, y_sm, kind="cubic")
- y_smooth = funk1(x_smooth)
fig, ax1 = plt.subplots()
- ax1.axis((11600,14000,0,ymax1))
ax1.set_xlim(beginage, endage)
ax1.set_ylim(beginy, endy)
- ax1.set_ylim(-35.0, -42.0)
plt.gca().invert_xaxis()
plt.gca().invert_yaxis()
ax1.set_ylabel('delta-O18', color='#0000ff', fontsize=size2+2)
ax1.plot(x,y, color="#005f00", linewidth=3,label="NGRIP delta-O18")
- ax1.plot(x_smooth,y_smooth, color="#0000ff", linewidth=3,label="NGRIP delta-O18")
ax1.plot(x,y_savgol, color="#a0FFa0", linewidth=1, label="SavGol filter, 21 and 3")
- ax1.plot(x,y_running, color="#FF0000", linewidth=3)
- ax1.plot(x,data_avg1, color="#ff0000", linewidth=2, linestyle=":", label="Average of NGRIP, GISP, GISP2 delta-O18")
ax1.text(3.44, 4.7, "Reuver A -->", fontsize=22, horizontalalignment='left')
ax1.plot(3.44,4.9, marker="v", color="green",markersize=30)
ax1.text(3.00, 4.7, "B1", fontsize=22, horizontalalignment='left')
ax1.plot(3.00,4.9, marker="v", color="green",markersize=30)
ax1.text(2.76, 4.7, "B2", fontsize=22, horizontalalignment='left')
ax1.plot(2.76,4.9, marker="v", color="green",markersize=30)
ax1.text(2.66, 4.7, "B3", fontsize=22, horizontalalignment='left')
ax1.plot(2.66,4.9, marker="v", color="green",markersize=30)
ax1.text(2.6, 4.7, "C1", fontsize=22, horizontalalignment='left')
ax1.plot(2.6,4.9, marker="v", color="green",markersize=30)
ax1.text(2.55, 4.7, "PT?", fontsize=22, horizontalalignment='left')
ax1.plot(2.55,4.9, marker="v", color="green",markersize=30)
ax1.text(2.44, 4.7, "PT?", fontsize=22, horizontalalignment='left')
ax1.plot(2.44,4.9, marker="v", color="green",markersize=30)
ax1.plot(2.69,2.5, marker="o", color="blue",markersize=26)
ax1.plot(2.52,2.5, marker="o", color="blue",markersize=26)
ax1.plot(2.85,2.5, marker="o", color="blue",markersize=26)
ax1.plot(3.125,2.5, marker="o", color="blue",markersize=26)
ax1.plot(3.3,2.5, marker="o", color="blue",markersize=26)
ax1.plot(3.35,2.5, marker="o", color="blue",markersize=26)
- warm
ax1.plot(2.63,2.4, marker="o", color="red",markersize=26)
ax1.plot(2.985,2.4, marker="o", color="red",markersize=26)
ax1.plot(3.4,2.4, marker="o", color="red",markersize=26)
ax1.tick_params(axis='both', which='major', labelsize=size2)
ax1.xaxis.set_minor_locator(MultipleLocator(1))
ax1.xaxis.set_minor_locator(MultipleLocator(0.05))
ax1.yaxis.set_minor_locator(MultipleLocator(1.0))
ax1.yaxis.set_minor_locator(MultipleLocator(0.1))
ax1.grid(which='major', linestyle='-', linewidth='0.1', color='black')
ax1.grid(which='minor', linestyle=':', linewidth='0.1', color='black')
ax1.set_xlabel('Age ma BP', color="darkgreen", fontsize=size2+2)
ax1.set_title(captioni, fontsize=size3, color="#0000af")
plt.legend(fontsize=size0)
fig = plt.gcf()
fig.set_size_inches(figsizex, figsizey, forward=True)
plt.savefig(savename, format="svg", dpi = 100)
plt.show()