I’m reading K. Soetaert, J. Cash, F. Mazzia, *Solving Differential Equations in R*. I know Professor Soetaert’s work, from the text co-authored with P. M. J. Herman, *A Practical Guide to Ecological Modelling*, and the several **R** packages he has contributed with others. But here, I also wanted to understand a bit about dynamical systems modeling of climate, and stumbled across a train of papers. This train is apparently well-known. The two papers and presentation I’ll mention here are:

- A. M. Hogg, “Glacial cycles and carbon dioxide: A conceptual model”,
*Geophysical Research Letters*,**35**, L01701, http://dx.doi.org/10.1029/2007GL032071, 2008 - D. J. de la Cuesta, R. Garduñoa, D. Nuñez, B. Rumbos, C. Vergara-Cervantes, “The carbon cycle as the main determinant of glacial-interglacial periods”, arXiv:1308.2709v1 [physics.geo-ph] 12 Aug 2013
- S. Ostreicher, “Adding carbon to conceptual models: an introduction to Hogg’s model and others”, 3rd November 2010, MCRN presentation.

I also pondered how to teach or explain dynamical relationships to an “audience of civilians” and wanted to check out using animations and the like. I did not want to get such an audience embroiled in the problems associated with using super-simple conceptual models to abstract away details and focus upon certain issues related to climate, for then I would probably spend more time defending the technique than getting across my basic points. So, I make no attempt to suggest my simulation has any direct connection with climate or climate variables. The primary point is that these nonlinear systems are inherently capable of surprising us, even if it seems Earth has a lot of drag and internal friction which impedes, as far as we know, rapid switching of climate states. (I know there are knowledgeable students of the problem which would disagree with that statement.)

Instead I just wanted to illustrate a trivariate, coupled first order differential system somewhere along the complexity of those used by Hogg and de la Cuesta, *et al*. So the system I chose has cross-terms as nonlinearities, an option of constant forcings, a sinusoidal forcing, and a time-dependent switch which can apply a new constant forcing as a singular variation. I posit three quantities, Black, Red, and Blue as being the responses of the system. In particular, it looks like this:

The initial state for **C** is [0.4, 1/3, 0.1]^{T}. This was run for 560 ticks and plotted beginning at tick 150 so equilibration is left out. Two kinds of runs were made. One has τ_{1} and τ_{2} at 500 and 520, respectively. The other places τ_{1} and τ_{2} both above 1000, so ticks never get that high. The latter run is called the “No impulse” or “No step” run. The former is called the “impulse” or “step” run. The *ode* function in the* deSolve* package of **R** was used to solve the system of differential equations.

The graphs of the three quantities coded by color are shown below.

But graphs are graphs, and I felt people might respond to something more dynamic (excusing the pun), and I decided to play with animations in **R** using the *animation* package. I actually produced Adobe Shockwave Flash (“SWF”) files for including in a PDF talk. But I could not post these on WordPress so figured out how to use the same *animation* package to produce movies of the two, which are shown below.

The animations themselves start with a grid that’s 100 x 100 and blank. Cells are colored according to the amount of the corresponding quantity. If the amount drops below what in was in the previous tick, certain cells of that color are replaced with white. If the amount goes above what was in the previous tick, additional white cells are colored the appropriate color. Cells remain in place, and are positioned by sampling randomly without replacement.

I hope to find and use this technique to illustrate many other things.

As far as the simulation itself is concerned, notably of the pulse, what’s illustrated is the “ringing” that can occur when such a system is hammered by a strong injection of material, both swinging to the upside, and then over-correcting on the downswing.

While there’s no predictability by this, we don’t understand the Earth’s climate system well and, as far as our injecting CO_{2} into atmosphere goes, we are surely slamming that “control knob” (as Professor Richard Alley calls it) with an unprecedented forcing on the geologic time scale.

Pingback: Lotka-Volterra systems and predator-prey relationships | Hypergeometric

Pingback: Another Week of Climate Disruption News, January 5, 2014 – A Few Things Ill Considered

Pingback: On Munshi mush | Hypergeometric

Pingback: Repaired R code for Markov spatial simulation of hurricane tracks from historical trajectories | Hypergeometric