Giter Site home page Giter Site logo

ghilsellersebm.jl's Introduction

GhilSellersEBM

Dev Build Status

This package provides an implementation of the Ghil Sellers 1D Energy Balance Model. It is based on three publications:

The package does not include a solver, it provides everything needed to discretize the PDE and set it up so that it can be solved e.g. with DifferentialEquations.jl. The documentation provides an introduction to the model as well.

Example Use

Solving the model with two initial conditions: one leading to cold and one to a warm state.

using GhilSellersEBM, DifferentialEquations, Plots 

x = (-90.:5.:90.)./90.
grid = Grid(x)
p = ContinousGhilSellersParameters(grid);

tspan = (0.,1e8)
prob = ODEProblem(ghilsellers_ebm!, 220*ones(p.g.N), tspan, p)

sol_1 = solve(prob)
sol_2 = solve(remake(prob, u0=290*ones(p.g.N)))

t_plot = range(tspan[1],tspan[2],length=200)
anim = @animate for it  t_plot
    plot(p.ϕ, sol_1(it), xlabel="Latitude ϕ [rad]", label="Cold State", ylims=[210,300], ylabel="Temperature T [K]", title="Temperature Profile of Ghil Sellers EBM")
    plot!(p.ϕ, sol_2(it), label="Warm State", ylims=[200,300])
end 
gif(anim, "ebm-anim.gif", fps=10)

docs/src/ebm-anim.gif

ghilsellersebm.jl's People

Contributors

maximilian-gelbrecht avatar

Stargazers

Guido Vettoretti avatar

Watchers

Guido Vettoretti avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.