First, load the Julia package Klimakoffer.jl:
using Klimakoffer
Then, set the number of time steps per year for the solver
NT = 48 # this is a good default
and create a mesh
mesh = Mesh()
and a corresponding model
model = Model(mesh, NT)
Then, combine everything into the discretization
discretization = Discretization(mesh, model, NT)
During the initialization of the discretization, some temporary data structures are created, pusing the memory usage to close to 2 GiB. On a reasonably modern machine, this poses no problem, but when running this notebook on mybinder.org, it can lead to out-of-memory errors. Therefore, we ask Julia to clean up all temporary data structures:
GC.gc()
Finally, you can solve for the equilibrium temperature with
GlobTemp = compute_equilibrium!(discretization, verbose=false)
which will yield the equilibrium temperature for the given discretization (14.484963368768746
).