Normalization

In this example, the time evolution of type normalization is demonstrated. A historic emission scenario is simulated with OpenAirClim.

Imports

If the openairclim package cannot be imported, make sure that you have installed the package with pip or added the oac source folder to PYTHONPATH.

import xarray as xr
import matplotlib.pyplot as plt
import openairclim as oac

xr.set_options(display_expand_attrs=False)
<xarray.core.options.set_options at 0x7f74c1c53620>

Input files

In order to be able to execute this example simulation, three types of input are required.

  • Configuration file historic.toml

  • Emission inventory ELK_aviation_2019_res5deg_flat.nc

  • Time evolution file for fuel normalization time_norm_historic_SSP.nc

Emission inventory

  • Source: DLR Project EmissionsLandKarte (ELK)

  • Resolution down-sampled to 5 deg resolution

  • Converted into format suitable for OpenAirClim

  • Inventory year: 2019

inv = xr.load_dataset("source/demos/input/ELK_aviation_2019_res5deg_flat.nc")
display(inv)
<xarray.Dataset> Size: 2MB
Dimensions:   (index: 50854)
Dimensions without coordinates: index
Data variables:
    fuel      (index) float32 203kB 1.493e+04 7.459e+03 ... 7.471e+03 1.676e+03
    CO2       (index) float32 203kB 4.716e+04 2.356e+04 ... 2.36e+04 5.294e+03
    H2O       (index) float32 203kB 1.847e+04 9.227e+03 ... 9.242e+03 2.073e+03
    NOx       (index) float32 203kB 161.7 77.61 146.9 ... 965.8 134.5 23.91
    distance  (index) float32 203kB 2.266e+03 1.188e+03 ... 1.225e+03 272.1
    lat       (index) float64 407kB -67.5 -67.5 -67.5 -67.5 ... 87.5 87.5 87.5
    lon       (index) float64 407kB -167.5 -167.5 -167.5 ... 177.5 177.5 177.5
    plev      (index) float32 203kB 315.4 301.5 288.1 ... 197.5 179.4 171.0
Attributes: (9)

Time evolution

  • Time evolution with normalization of fuel use

  • Time period: 1920 - 2019

evo = xr.load_dataset("source/demos/input/time_norm_historic_SSP.nc")
display(evo)

fig, ax = plt.subplots()
evo.fuel.plot(ax=ax)
ax.grid(True)
<xarray.Dataset> Size: 2kB
Dimensions:  (time: 100)
Coordinates:
  * time     (time) int64 800B 1920 1921 1922 1923 1924 ... 2016 2017 2018 2019
Data variables:
    fuel     (time) float64 800B 2.669 2.889 3.427 4.145 ... 264.7 274.1 283.5
Attributes: (5)
../../_images/norm_2_1.png

Simulation run

oac.run("source/demos/01_norm/historic.toml")

Results

Time series

  • Emission sums

  • Concentrations

  • Radiative forcings

  • Temperature changes

results_ds = xr.load_dataset("source/demos/01_norm/results/historic.nc")
display(results_ds)
<xarray.Dataset> Size: 17kB
Dimensions:        (ac: 2, time: 100)
Coordinates:
  * ac             (ac) <U7 56B 'DEFAULT' 'TOTAL'
  * time           (time) int64 800B 1920 1921 1922 1923 ... 2016 2017 2018 2019
Data variables:
    emis_CO2       (ac, time) float64 2kB 8.432 9.125 10.83 ... 865.9 895.6
    emis_distance  (ac, time) float64 2kB 5.849e+08 6.33e+08 ... 6.213e+10
    emis_H2O       (ac, time) float64 2kB 3.302 3.573 4.239 ... 339.1 350.7
    conc_CO2       (ac, time) float64 2kB 0.001082 0.002194 ... 2.754 2.828
    RF_CO2         (ac, time) float64 2kB 1.955e-05 3.963e-05 ... 0.04412
    RF_cont        (ac, time) float64 2kB 0.0006469 0.0007001 ... 0.06871
    RF_H2O         (ac, time) float64 2kB 4.615e-05 4.995e-05 ... 0.004902
    dT_CO2         (ac, time) float64 2kB 1.489e-06 4.343e-06 ... 0.02605
    dT_cont        (ac, time) float64 2kB 2.907e-05 5.731e-05 ... 0.02445
    dT_H2O         (ac, time) float64 2kB 4.007e-06 7.9e-06 ... 0.003293 0.00337
Attributes: (4)
# Plot Radiative Forcing and Temperature Changes

ac = "TOTAL"
rf_cont = results_ds.RF_cont.sel(ac=ac) * 1000
rf_co2 = results_ds.RF_CO2.sel(ac=ac) * 1000
rf_h2o = results_ds.RF_H2O.sel(ac=ac) * 1000
dt_cont = results_ds.dT_cont.sel(ac=ac) * 1000
dt_co2 = results_ds.dT_CO2.sel(ac=ac) * 1000
dt_h2o = results_ds.dT_H2O.sel(ac=ac) * 1000

fig, ax = plt.subplots(ncols=2, figsize=(10,5))
ax[0].grid(True)
ax[1].grid(True)
rf_cont.plot(ax=ax[0], color="deepskyblue", label="cont")
rf_co2.plot(ax=ax[0], color="k", label="CO2")
rf_h2o.plot(ax=ax[0], color="steelblue", label="H2O")
dt_cont.plot(ax=ax[1], color="deepskyblue", label="cont")
dt_co2.plot(ax=ax[1], color="k", label="CO2")
dt_h2o.plot(ax=ax[1], color="steelblue", label="H2O")
ax[0].set_ylabel("Radiative Forcing [mW/m²]")
ax[1].set_ylabel("Temperature Change [mK]")
ax[0].legend()
ax[1].legend()
<matplotlib.legend.Legend at 0x7f74c0bd1e80>
../../_images/norm_5_1.png

Climate metrics

  • Absolute Global Temperature Potential (AGTP)

  • Absolute Global Warming Potential (AGWP)

  • Average Temperature Response (ATR)

metrics_ds = xr.load_dataset("source/demos/01_norm/results/historic_metrics.nc")
display(metrics_ds)
<xarray.Dataset> Size: 128B
Dimensions:        (species: 4)
Coordinates:
  * species        (species) <U5 80B 'CO2' 'cont' 'H2O' 'total'
Data variables:
    AGTP_100_1920  (species) float32 16B 0.02605 0.02445 0.00337 0.05387
    AGWP_100_1920  (species) float32 16B 1.272 2.438 0.1739 3.884
    ATR_100_1920   (species) float32 16B 0.006835 0.008181 0.001128 0.01614
Attributes: (1)