Visualisierung der Kohlendioxidmessung Teil 7

Die Konzentration ist im Mai auf der Nordhemisphäre am höchsten, da das im Frühling stattfindende Ergrünen zu dieser Zeit beginnt; sie erreicht ihr Minimum im Oktober, wenn die Photosynthese betreibende Biomasse am größten ist.

Stand: 27.04.2021

import locale
locale.setlocale(locale.LC_ALL, 'de_DE')

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.style as style
style.use('fivethirtyeight')
from calendar import month_abbr


df_vis = pd.read_csv('daten/wasserkuppe.csv')
df_vis.index = pd.to_datetime(df_vis.Datum)

df_vis
DatumTemperaturLuftdruckKohlendioxid
Datum
2000-05-07 01:00:0005-07-00 01:009.7NaNNaN
2000-05-07 02:00:0005-07-00 02:009.8NaNNaN
2000-05-07 03:00:0005-07-00 03:009.7NaNNaN
2000-05-07 04:00:0005-07-00 04:009.4NaNNaN
2000-05-07 05:00:0005-07-00 05:008.8NaNNaN
...............
2020-04-06 20:00:0004-06-20 20:008.8994.0735.0
2020-04-06 21:00:0004-06-20 21:008.8995.0737.0
2020-04-06 22:00:0004-06-20 22:008.8995.0739.0
2020-04-06 23:00:0004-06-20 23:007.6995.0740.0
2020-05-06 00:00:0005-06-20 00:006.5995.0737.0

174600 rows × 4 columns

df_vis = df_vis.resample('M').mean()
df_vis
TemperaturLuftdruckKohlendioxid
Datum
2000-01-319.597414NaNNaN
2000-02-296.987156NaNNaN
2000-03-315.985321NaNNaN
2000-04-305.805000NaNNaN
2000-05-316.943972NaNNaN
............
2020-08-315.6708331020.233333751.100000
2020-09-307.1741671014.941667745.800000
2020-10-315.6933331009.225000741.425000
2020-11-302.7158331012.291667745.200000
2020-12-312.3841671013.800000746.466667

252 rows × 3 columns

t = df_vis['Temperatur']
p = df_vis['Luftdruck']
mol = 44.01
mg2 = df_vis['Kohlendioxid']

df_vis['ppm'] = 10*mg2/mol*((8.31447*(t+273.15))/p)

df_vis
TemperaturLuftdruckKohlendioxidppm
Datum
2000-01-319.597414NaNNaNNaN
2000-02-296.987156NaNNaNNaN
2000-03-315.985321NaNNaNNaN
2000-04-305.805000NaNNaNNaN
2000-05-316.943972NaNNaNNaN
...............
2020-08-315.6708331020.233333751.100000387.798992
2020-09-307.1741671014.941667745.800000389.157172
2020-10-315.6933331009.225000741.425000387.010451
2020-11-302.7158331012.291667745.200000383.661572
2020-12-312.3841671013.800000746.466667383.280561

252 rows × 4 columns

df_vis = df_vis.drop(columns=['Temperatur','Luftdruck','Kohlendioxid'])
df_vis
ppm
Datum
2000-01-31NaN
2000-02-29NaN
2000-03-31NaN
2000-04-30NaN
2000-05-31NaN
......
2020-08-31387.798992
2020-09-30389.157172
2020-10-31387.010451
2020-11-30383.661572
2020-12-31383.280561

252 rows × 1 columns

Folgender Code war bei der Erstellung hilfreich [^1]

co2_data = df_vis['2011':'2019']
n_years = co2_data.index.year.max() - co2_data.index.year.min()
z = np.ones((n_years +1 , 12)) * np.min(co2_data.ppm)
for d, y in co2_data.groupby([co2_data.index.year, co2_data.index.month]):
  z[co2_data.index.year.max() - d[0], d[1] - 1] = y.mean()[0]

plt.figure(figsize=(10, 14))
plt.pcolor(np.flipud(z), cmap='hot_r')
plt.yticks(np.arange(0, n_years+1)+.5,
           range(co2_data.index.year.min(), co2_data.index.year.max()+1));
plt.xticks(np.arange(13)-.5, month_abbr)
plt.xlim((0, 12))
plt.colorbar().set_label('Kohlendioxidmessung in mg/m³ der Messstation Wasserkuppe ')
plt.show()  


png

In der Abbildung sind die Kohlendioxidwerte für November 2011 am geringsten und im April 2018 am höchsten. Der Einfluss der Nordhemisphäre dominiert den jährlichen Zyklus der Schwankung der Kohlenstoffdioxidkonzentration, denn dort befinden sich weit größere Landflächen und somit eine größere Biomasse als auf der Südhemisphäre. Die Konzentration ist im Mai auf der Nordhemisphäre am höchsten, da das im Frühling stattfindende Ergrünen zu dieser Zeit beginnt; sie erreicht ihr Minimum im Oktober, wenn die Photosynthese betreibende Biomasse am größten ist.1

Minimale und maximale Werte

Anschließend werden die maximalen und minimalen Werte aufgelistet.

t = pd.to_datetime('11-11-30')
t

df_wasserkuppe_01_02_2002_12_0 = df_vis[(df_vis.index == '2011-11-30')]
df_wasserkuppe_01_02_2002_12_0
ppm
Datum
2011-11-30369.717896
df_wasserkuppe_01_02_2002_12_0 = df_vis[(df_vis.index == '2018-07-31')]
df_wasserkuppe_01_02_2002_12_0
ppm
Datum
2018-07-31393.254659
df_vis['ppm'].argmax()
219
df_vis.iloc[[df_vis['ppm'].argmax()]]
ppm
Datum
2018-04-30393.527525
df_vis.iloc[[df_vis['ppm'].argmin()]]
ppm
Datum
2011-11-30369.717896

Quellenangaben: [^1]: Vettigli, G. (2019, 22. April). Visualizing Atmospheric Carbon Dioxide. Dzone.Com. https://dzone.com/articles/visualizing-atmospheric-carbon-dioxide

  1. U.K. (2016, 21. Januar). Florierende Vegetation verstärkt Kohlendioxid-Schwankungen. Max-Planck-Gesellschaft. https://www.mpg.de/9862783/co2-schwankung-vegetation-erderwaermung