Skip to content

m-dml/L96sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simulator for the Lorenz 96 model. Uses Julia if available, otherwise falls back to numba, and finally to pure python.

Installation

pip install .

With this basic installation, you can use the gradient functions in L96_base.py.

For Julia support install the Julia language and diffeqpy.

If you don't have Julia, numba will be used instead. If numba also isn't present, interpreted numpy will be used.

Compilation

If Julia and pydiffeq are installed, there will be about 1 minute Julia compile time on startup when using a python installation that has statically linked libraries. Unfortunately, this includes Anaconda. Fortunately, there is no compilation required when starting a new simulation, instantiating a new simulation object or changing simulation parameters.

Notebooks

solvers.ipynb compares 3 different numerical solvers and plots the results. These are similar, but not identical as L96 is a chaotic system.

inference.ipynb trains a neural network to perform Bayesian parameter inference with the APT algorithm. To use it, you will have to install delf.

About

Simulator for Lorenz 96 model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published