File:Delta t against 200 years moving northern hemisphere 100 1600 ad 1.svg
Original file (SVG file, nominally 1,487 × 646 pixels, file size: 82 KB)
Captions
Summary[edit]
DescriptionDelta t against 200 years moving northern hemisphere 100 1600 ad 1.svg |
English: Temperature delta - temperature against temperature moving average of 200 years Northern hemisphere, 100 - 1600 AD/CE |
Date | |
Source | Own work |
Author | Merikanto |
source of data
Source of data: https://www.ncei.noaa.gov/access/paleo-search/study/6267
NAME OF DATA SET: 2,000-Year Northern Hemisphere Temperature Reconstruction
LAST UPDATE: 2/2005 (Original receipt by WDC Paleo)
CONTRIBUTOR: Anders Moberg, Stockholm University
IGBP PAGES/WDCA CONTRIBUTION SERIES NUMBER: 2005-019
SUGGESTED DATA CITATION: Moberg, A., et al. 2005.
2,000-Year Northern Hemisphere Temperature Reconstruction.
IGBP PAGES/World Data Center for Paleoclimatology
Data Contribution Series # 2005-019.
NOAA/NGDC Paleoclimatology Program, Boulder CO, USA.
ORIGINAL REFERENCE:
Moberg, A., D.M. Sonechkin, K. Holmgren, N.M. Datsenko and W. Karlén. 2005.
Highly variable Northern Hemisphere temperatures reconstructed from low-
and high-resolution proxy data.
Nature, Vol. 433, No. 7026, pp. 613-617, 10 February 2005.
Python code
- drawing climate data diagram in python 3
- version 4000.0009
- miving value - average elta plot
- 08.12.2022
-
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
import matplotlib.colors as colors
import math as math
- datafilename="macal2016uvl_1.csv"
datafilename="moberg1.csv"
- captioni="Macal UV-luminance"
- savename="macal_uvl_1.svg"
captioni="Temperature delta of Northern hemisphere, DT200"
subtitle="Delta-T against moving average of temperature of 200 years"
savename="temperature_delta_northern_hemisphere_1.svg"
- s1='age_calBP'
s1='Year'
s2='T'
beginx=100
endx=1600
convert_bp_to_ad=0
beginy=-0.65
endy=0.6
figsizex=18
figsizey=7
yearspan=int(math.fabs(endx-beginx))
dfin0=pd.read_csv(datafilename, sep=";")
dfin0=dfin0.drop_duplicates(subset=[s1])
lst1=[s1, s2]
dfin1 = dfin0[dfin0.columns.intersection(lst1)]
x0=dfin1[s1]
y0=dfin1[s2]
- initialize data of lists.
data={'x0':x0,'y0':y0}
- Create DataFrame
df = pd.DataFrame(data)
- dfin2=dfin1
df['moving10'] = df.y0.rolling(10, min_periods=1).mean()
df['moving50'] = df.y0.rolling(50, min_periods=1).mean()
df['moving200'] = df.y0.rolling(200, min_periods=1).mean()
print(df)
ya0=df['y0']
moving1=df['moving10']
moving2=df['moving50']
moving3=df['moving200']
delta1=ya0-moving2
- delta1=moving2-moving3
- plt.plot(x0,moving3)
- plt.plot(x0,delta1)
- plt.xlim([beginx, endx])
- plt.show()
- quit(-1)
x=np.array(x0)
- y=np.array(y0)
y=delta1
- !!!!!!!!!!!!!!! bp to ce, ad!
if(convert_bp_to_ad==1):
x=1950-x
- print (x)
- quit(-1)
yy2=y[:2000]
ymean1=np.mean(yy2)
- ad hoc drought limit
- ylimit1=ymean1-50
- print (y)
- quit(-1)
size0=14
size1=16
size2=18
size3=22
x_sm = x
y_sm = y
x_smooth = np.linspace(beginx,endx, yearspan)
- quit(-1)
funk1 = interpolate.interp1d(x_sm, y_sm, kind="cubic")
- quit(-1)
y_smooth = funk1(x_smooth)
y_savgol1 = scipy.signal.savgol_filter(y_smooth,3, 2)
y_savgol2 = scipy.signal.savgol_filter(y_smooth,11, 3)
- delta1=y_savgol1-y_savgol2
a=np.outer(np.ones(2),y_smooth)
a=np.outer(np.ones(2),y_savgol2)
- cmap1="RdBu"
- cmap1="hsv"
- cmap1="seismic"
- cmap1="bwr"
- cmap1="coolwarm"
cmap1="RdBu_r"
- cmap1="gist_earth_r"
- cmap1="terrain_r"
- cmap1="twilight_shifted_r"
- cmap1="cividis"
- cmap1="YlGnBu"
- cmap1="BrBG"
print (type(cmap1))
- fig=plt.gca()
- plt.figure(figsize=(figsizex, figsizey))
- quit(-1)
plt.xlim([beginx, endx])
plt.rcParams["figure.figsize"] = [figsizex, figsizey]
- plt.imshow(a,aspect='auto', cmap=cmap1, extent=[beginx, endx,-50,-30], alpha=0.5)
plt.imshow(a,aspect='auto', cmap=cmap1, extent=[beginx, endx,endy,beginy], alpha=0.5)
- plt.imshow(a,aspect='auto', cmap=cmap1, vmin=endy-0, vmax=beginy+0, extent=[beginx, endx,endy,beginy], alpha=1.0)
- plt.show()
- quit(-1)
- plt.xlim(beginx, endx)
- plt.ylim(endy, beginy)
- plt.plot(x, y, color="#7f0000", alpha=1.0, linewidth=1)
- plt.plot(x, y, color="#700000", alpha=0.7, linewidth=1)
plt.plot(x, delta1, color="#700000", alpha=1.0, linewidth=2)
- plt.plot(x_smooth, y_savgol1, color="#0000ff", alpha=0.33, linewidth=1)
- plt.plot(x_smooth, y_savgol2, color="#0000ff", linewidth=2)
- plt.axhline(y = ylimit1, color = 'g', linestyle = ':', linewidth=2)
plt.locator_params(axis='x', nbins=20)
plt.title(captioni, fontsize=size3, color="#0000af")
plt.suptitle(subtitle,fontsize=14)
plt.xlabel('Year AD', color="darkgreen", fontsize=21)
plt.ylabel('Delta avg T 200 years', color="darkgreen", fontsize=21)
plt.xticks(fontsize=17)
plt.yticks(fontsize=17)
plt.gca().invert_yaxis()
- mng = plt.get_current_fig_manager()
- mng.window.state('zoomed')
plt.savefig('figure.svg')
plt.show()
Licensing[edit]
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 10:57, 11 December 2022 | 1,487 × 646 (82 KB) | Merikanto (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 1189.44pt |
---|---|
Height | 516.96pt |