- ECCO.Budyko_Sellers_models.params
- ECCO.Budyko_Sellers_models.adjoint_demo
- ECCO.Budyko_Sellers_models.dTdt_demo
- ECCO.Budyko_Sellers_models.dTdt_loop_optim
- ECCO.Budyko_Sellers_models.dTdt_solve_optim
- ECCO.Budyko_Sellers_models.optim_demo
- ECCO.Budyko_Sellers_models.optim_demo_loop
- ECCO.Budyko_Sellers_models.the_main_loop
- ECCO.Lorenz_models.L63
- ECCO.Lorenz_models.L96
- ECCO.Zygote_examples.Zygote_ex1
- ECCO.glacier_model.forward_problem
- ECCO.toy_problems.Enzyme_ex1
- ECCO.toy_problems.Enzyme_ex2
- ECCO.toy_problems.Enzyme_ex3
- ECCO.toy_problems.Enzyme_ex4
- ECCO.toy_problems.ForwardDiff_ex1
- ECCO.toy_problems.optim_ex1
- ECCO.toy_problems.optim_ex2
- ECCO.toy_problems.optim_ex3
ECCO.toy_problems.Enzyme_ex1 — Methodtoy_problems.Enzyme_ex1()Simple air sea flux calculation and it's adjoint, obtained via Enzyme.
ECCO.toy_problems.Enzyme_ex2 — Methodtoy_problems.Enzyme_ex2()- air sea flux calculation derived using standard bulk formulae algorithm.
- it's adjoint, obtained via Enzyme.
using ECCO
(f,f_ad,x)=toy_problems.Enzyme_ex2()
f(x...)
f_ad(x...)ECCO.toy_problems.Enzyme_ex3 — Methodtoy_problems.Enzyme_ex3()using ECCO
(f,f_ad,x,y)=toy_problems.Enzyme_ex3()
f(x,y)
f_ad(x,y)ECCO.toy_problems.Enzyme_ex4 — Methodtoy_problems.Enzyme_ex4()using ECCO
(f,f_ad,x,y)=toy_problems.Enzyme_ex4()
f(x,y)
f_ad(x,y)ECCO.toy_problems.ForwardDiff_ex1 — Methodtoy_problems.ForwardDiff_ex1()using ECCO
(x,adx)=toy_problems.ForwardDiff_ex1()ECCO.toy_problems.optim_ex1 — Methodtoy_problems.optim_ex1()using ECCO
(f,x0,x1,result)=toy_problems.optim_ex1()ECCO.toy_problems.optim_ex2 — Methodtoy_problems.optim_ex2()ECCO.toy_problems.optim_ex3 — Methodtoy_problems.optim_ex3()ECCO.Zygote_examples.Zygote_ex1 — Methodtoy_problems.Zygote_ex1()using ECCO
(x,adx)=Zygote_examples.Zygote_ex1()ECCO.glacier_model.forward_problem — Functionforward_problem(M0=0.004; dt=1/12.0, nt=6*5000, dx = 1.0, nx = 30)Simple, 1D mountain glacier model inspired from the book Fundamentals of Glacier Dynamics, by CJ van der Veen, and which was translated to Julia by S Gaikwad.
See https://sicopolis.readthedocs.io/en/latest/AD/tutorial_tapenade.html#mountain-glacier-model
V=glacier_model.forward_problem(0.002)ECCO.Lorenz_models.L63 — MethodL63(; nt=10000)See https://en.wikipedia.org/wiki/Lorenz_system
using ECCO, CairoMakie
x,y,z=Lorenz_models.L63()
lines(x,y,z)ECCO.Lorenz_models.L96 — MethodL96(; N=5, F=8)See https://en.wikipedia.org/wiki/Lorenz96model
using ECCO, CairoMakie
xyz=Lorenz_models.L96()
lines(xyz[1,:],xyz[2,:],xyz[end,:])ECCO.Budyko_Sellers_models.params — ConstantBudyko-Sellers Energy Balance Model
Parameter Choices
From B. Rose notebook :
R = 10^7 J/m2/K
From Walsh and Rackauckas :
- Figure 3. Equilibrium solutions (7) with albedo function (9) for five η-values. Note T∗ ηi (ηi) = Tc only for i = 2,5. - Parameters: Q = 343, A = 202, B = 1.9, C = 3.04, αw = 0.32, αs = 0.62, Tc =−10.
 
- Figure 9. Equilibrium solutions of (2) with albedo function (34). Solid: η= 0.1. Dashed: η= 0.25. Dash-Dot: η= 0.4. - Parameters: Q = 321,A = 167,B = 1.5,C = 2.25,M = 50,αw = 0.32,αi = 0.46,αs = 0.72,ρ= 0.35.
 
ECCO.Budyko_Sellers_models.adjoint_demo — Functionadjoint_demo(par=[Q])- generate obs for cost function with fake_obs.
- call the_main_loop_costandadthe_main_loop_cost
- return gradient check result
grdchk=adjoint_demo([Q])
ECCO.Budyko_Sellers_models.dTdt_demo — FunctiondTdt_demo(par=[Q])using ECCO, CairoMakie
(; Q, y) = Budyko_Sellers_models.params
Tsol,Tini,dTdt_ini,incr_t,incr=Budyko_Sellers_models.dTdt_demo(Q)
fig=Figure()
Axis(fig[1,1]); lines!(y,dTdt_ini)
Axis(fig[2,1]); lines!(y,Tini); lines!(y,Tsol,color=:red)
Axis(fig[3,1]); lines!(incr_t,incr)	
figECCO.Budyko_Sellers_models.dTdt_loop_optim — MethoddTdt_loop_optim()Call the_main_loop and then Optim.optimize.
f,x0,x1,result=dTdt_loop_optim()
ECCO.Budyko_Sellers_models.dTdt_solve_optim — MethoddTdt_solve_optim(Tobs)Call dTdt_solve and then Optim.optimize (adjoint free).
f,x0,x1,result=dTdt_solve_optim(Tobs)
ECCO.Budyko_Sellers_models.optim_demo — Functionoptim_demo(Q=Q; verbose=false)Call dTdt_solve and then dTdt_solve_optim.
optim_demo()
ECCO.Budyko_Sellers_models.optim_demo_loop — Methodoptim_demo_loop()Call dTdt_loop_optim.
ECCO.Budyko_Sellers_models.the_main_loop — Methodthe_main_loop(x; nt=10000)Do nt time steps of dt*dTdt(result,Q=x).