Atmosphere

Atmosphere#

import matplotlib.pyplot as plt
from typhon import plots

import konrad


plots.styles.use('typhon')

In the introduction we have already learned how to initialize an atmopshere component.

plev, phlev = konrad.utils.get_pressure_grids(1000e2, 1, 128)
atmosphere = konrad.atmosphere.Atmosphere(phlev)

The atmosphere component is used to prescribe the gaseous composition of our model. For example, we can remove all ozone from our model column

atmosphere["O3"][:] = 0.0

Next, we can compile and run our RCE simulation

rce = konrad.RCE(
    atmosphere,
    surface=konrad.surface.FixedTemperature(temperature=288.),  # Run with a fixed surface temperature.
    timestep='12h',  # Set timestep in model time.
    max_duration='100d',  # Set maximum runtime.
)
rce.run()  # Start the simulation.

Finally, we can plot the equilibrated temperature profile

fig, ax = plt.subplots()
plots.profile_p_log(rce.atmosphere['plev'], rce.atmosphere['T'][-1, :])
ax.set_xlabel(r"$T$ / K")
ax.set_ylabel("$p$ / hPa")
Text(0, 0.5, '$p$ / hPa')
_images/1a8825d37d1bff2c4f53d43433b9a3d3beca0ebfb5bfa4199208bb1fc3b7c751.png