TMItransient
Documentation for TMItransient.
TMItransient.EvolvingFieldTMItransient.agedistributionTMItransient.ces_ncwriteTMItransient.deltaresponseTMItransient.globalmean_impulseresponseTMItransient.globalmean_impulseresponseTMItransient.globalmean_stepresponseTMItransient.goodtimeTMItransient.readoptTMItransient.s_arrayTMItransient.setupODE_nojacTMItransient.stepresponseTMItransient.varying!TMItransient.vintagedistribution
TMItransient.EvolvingField — Typestruct EvolvingField
This structure permits the grid to be
automatically passed to functions with
the evolving tracer field.
This structure assumes the Tracer type to be
three-dimensional with an additional vector dimension for time.
tracer::Vector{Array{T,3}}
γ::Grid
name::Symbol
longname::String
units::StringTMItransient.agedistribution — Methodfunction agedistribution
age distribution refers to distribution over lags, not space
sometimes called a transit time distributionTMItransient.ces_ncwrite — Methodfunction ces_ncwrite(γ,time,sol_array)
Write .nc file output for commonerasim.jlArguments
γ:time: vector of time valuessol_array: solution array in form time x lat x lon x depth - must match γ + time
Output
- saves .nc file titled "ces_output.nc" in data array
TMItransient.deltaresponse — Methodfunction deltaresponse
Take CDF and turn it into PDFTMItransient.globalmean_impulseresponse — Methodfunction globalmean_impulseresponse
Ḡ: satisfied ∫₀^∞ Ḡ(τ) dτ = 1
`alg`: centered or leapfrog
Does leapfrog satisfy normalization?TMItransient.globalmean_impulseresponse — Methodfunction globalmean_impulseresponse
based on a globalmean_stepresponse D̄, compute the impulse response
can be done via centered or leapfrog differenceTMItransient.globalmean_stepresponse — Methodfunction globalmean_stepresponse
calculate the global mean response to "turning on" some regionTMItransient.goodtime — Functionfunction gooddata
a useful one-linerTMItransient.readopt — Method read surface layerTMItransient.s_array — Methodfunction s_array(sol, γ)
Converts from DE.jl output to time x lat x lon x depthTMItransient.setupODE_nojac — Methodfunction setupODE(γ, u0,tsfc, dsfc,bc,L, t_int)
Setup ODEFunction for LC+Bf with no JacobianTMItransient.stepresponse — Methodfunction stepresponse
calculate the response to "turning on" some region
can compute some statistics on output by providing a function to f
# Arguments
- TMIversion
- b: BoundaryCondition
- γ
- L
- B
- τ: evenly spaced vector
- f: some function f(u) where u is a vector of all wet pointsTMItransient.varying! — Methodfunction varying!(du, u, p, t)
ODE function for varying boundary cond
Sets up dc/dt = L*C + B*f to be solvedArguments
du: dc/dt (must have this name for DifferentialEquations.jl to worku: C, what we are solving forp: parameters for diffeq - must hold specified varst: time we are solving for (automatically determined by DE.jl)
Output
du: numerical value of LC+Bf, vector of size 74064 for 4°
TMItransient.vintagedistribution — Methodfunction vintagedistribution(t₀,tf,Δ,τ,tmodern=2022,interp="linear")
percentage of water in the modern ocean
from a vintage defined by the calendar year interval
t₀ [cal yr CE] => tf [cal yr CE]Arguments
t₀: Starting calendar year of vintage, e.g., 1450 CEtf: final calendar year of vintage, e.g., 1850 CEΔ::Vector{Field}: Step function responseτ = Vector{Float64}: time lags associated with step responsetmodern=2022: modern calendar yearinterp=linear: or can be "spline"
Output
g::Field: 3D distribution of vintage contribution
Warning
- should be a way to make Δ argument more general (more types)