Diagnostics
We refer to key model variables which depend only on 1) the values of the control variables and 2) the input parameters as diagnostic variables. Examples are the CO$_{2e}$ concentrations $c_{M,R}(t)$, the temperature change $T_{M,R,G,A}$, and the cost of mitigation $\mathcal{C}_{M} M^{2}$.
In ClimateMARGO.jl, diagnostic variables are represented as julia functions, which are implemented using two separate methods, based on the type of the function arguments: the first method requires an explicit list of all the input parameters and control variables that determine the diagnostic variables; the second method leverages the ClimateModel
struct to read in the required variables.
For example, here are the two methods that define the diagnostic function T
for the temperature change:
ClimateMARGO.Diagnostics.T
— FunctionT(T0, F, Cd, κ, B, t, dt)
Returns the sum of the initial, fast mode, and slow mode temperature change.
Arguments
T0::Float64
: warming relative to pre-industrial [°C]F::Array{Float64}
: change in radiative forcing since the initial time $t_{0}$ [W/m${2}$]Cd::Float64
: deep ocean heat capacity [W yr m$^{2}$ K$^{-1}$]κ::Float64
: ocean heat uptake rate [W m$^{2}$ K$^{-1}$]B::Float64
: feedback parameter [W m$^{2}$ K$^{-1}$]t::Array{Float64}
: year [years]dt::Float64
: timestep [years]
T(m::ClimateModel; M=false, R=false, G=false)
Returns the sum of the initial, fast mode, and slow mode temperature change, as diagnosed from m
and modified by the climate controls activated by the Boolean kwargs.