EnKF, EnKS, and ES implementation with lorenz'63 equations as used in Evensen (1997, 2000, 2009ab). The code allows for testing various EnKF schemes with highly nonlinear dynamics.
Evensen, G. Advanced data assimilation for strongly nonlinear dynamics. Mon. Weather Rev., 125: 1342-1354, 1997. doi:10.1175/1520-0493(1997)125%3C1342:ADAFSN%3E2.0.CO;2
Evensen, G. and P. J. van Leeuwen. An ensemble Kalman smoother for nonlinear dynamics. Mon. Weather Rev., 128:1852-1867, 2000. doi:10.1175/1520-0493(2000)128<1852:AEKSFN>2.0.CO;2
Evensen, G. The ensemble Kalman filter for combined state and parameter estimation. IEEE Control Systems Magazine, 29(3):83–104, 2009a. doi: doi:10.1109/MCS.2009.932223
Evensen, G. Data Assimilation: The Ensemble Kalman Filter. Springer, 2nd edition, 2009b. doi:10.1007/978-3-642-03711-5
If you plan to collaborate or contribute anything to the project, use the Advanced Installation option.
Create a directory to clone the three following repositories:
git clone [email protected]:geirev/EnKF_lorenz.git
git clone [email protected]:geirev/EnKF_sampling.git
git clone [email protected]:geirev/EnKF_analysis.git
After cloning, the directory structure should look like:
.
├── EnKF_analysis
└── EnKF_sampling
└── EnKF_lorenz
Make a personal github account unless you already have one. Fork the three repositorys listed above. Next clone the repositories and set upstream to the original repositories where you need to replace with your github userid
git clone [email protected]:<userid>/EnKF_lorenz.git
pushd EnKF_lorenz
git remote add upstream https://github.com/geirev/EnKF_lorenz
#or, if you have set up git-ssh
#git remote add upstream git://github.com:geirev/EnKF_lorenz
popd
git clone [email protected]:<userid>/EnKF_analysis.git
pushd EnKF_analysis
git remote add upstream https://github.com/geirev/EnKF_analysis
#or, if you have set up git-ssh
#git remote add upstream git://github.com:geirev/EnKF_analysis
popd
git clone [email protected]:<userid>/EnKF_sampling.git
pushd EnKF_sampling
git remote add upstream https://github.com/geirev/EnKF_sampling
#or, if you have set up git-ssh
#git remote add upstream git://github.com:geirev/EnKF_sampling
popd
If you are new to Git, read the section Git instructions
sudo apt-get update
sudo apt-get install libblas-dev liblapack-dev gfortran
brew install gcc openblas lapack
Note: You must have Homebrew installed to install
packages using brew
Navigate to the lib
folder of the EnKF_sampling
repository:
cd EnKF_sampling/lib
then compile and place all the .o
files as well as libanalysis.a
into
the build
directory of the EnKF_lorenz
repository using:
make BUILD=../../EnKF_lorenz/build
Navigate to the lib
folder of the EnKF_analysis
repository:
cd EnKF_analysis/lib
then compile and place all the .o
files as well as libanalysis.a
into the
build
directory of the EnKR_lorenz
repository using:
make BUILD=../../EnKF_lorenz/build
Navigate to the src
folder of the EnKF_lorenz
repository:
cd EnKF_lorenz/src
then compile and install the executable in the target directory, defaulting to
$HOME/bin
:
make BINDIR=$HOME/bin
Navigate to the src
folder of the EnKF_lorenz
repository:
cd EnKF_lorenz/src
then edit the following line in EnKF_lorenz/src/makefile
from:
LIBS = ./libenkfanalysis.a -llapack -lblas -llapack
to:
LIBS = ./libenkfanalysis.a -llapack -lblas -llapack
then compile and install the executable in the target directory, defaulting to
$HOME/bin
:
make BINDIR=$HOME/bin
Navigate to the run
directory of the EnKF_lorenz
repository:
cd EnKF_lorenz/run
and run:
lorenz
Create the /usr/local/bin
directory which allows the lorenz
command to be ran
from anywhere on the local file system:
mkdir -p /usr/local/bin
then create a symlink for $HOME/bin/lorenz
to /usr/local/bin
ln -s $HOME/bin/lorenz /usr/local/bin/
then run the project:
cd EnKF_lorenz/run
lorenz
If you have tecplot (tec360) there are .lay
and .mcr
files in the run
directory. Otherwise the output files can be plotted by any software like gnuplot etc.