EnKF implementation with advection equation as used in Evensen (2009). The code allows for testing various EnKF schemes with a linear advection equation on a periodic domain.
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 git@github.com:geirev/EnKF_advection.git
git clone git@github.com:geirev/EnKF_analysis.git
git clone git@github.com:geirev/EnKF_sampling.git
After cloning, the directory structure should look like:
.
├── EnKF_analysis
├── EnKF_sampling
└── EnKF_advection
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 git@github.com:<userid>/EnKF_advection.git
pushd EnKF_advection
git remote add upstream https://github.com/geirev/EnKF_advection
#or, if you have set up git-ssh
#git remote add upstream git://github.com:geirev/EnKF_advection
popd
git clone git@github.com:<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 git@github.com:<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 libfftw3-dev gfortran
brew install gcc fftw 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 EnKR_advection
repository using:
make BUILD=../../EnKF_advection/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_advection
repository using:
make BUILD=../../EnKF_advection/build
Note: The EnKF_analysis
repository depends on the EnKF_sampling
repository and therefore must be compiled second!
Navigate to the src
folder of the EnKF_advection
repository:
cd EnKF_advection/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_advection
repository:
cd EnKF_advection/src
then edit the following line in EnKF_advection/src/makefile
from:
LIBS = ./libsampling.a ./libenkfanalysis.a -llapack -lblas -llapack /usr/lib/x86_64-linux-gnu/libfftw3.so.3
to:
LIBS = ./libsampling.a ./libenkfanalysis.a -llapack -lblas -llapack /usr/local/lib/libfftw3.a
then compile and install the executable in the target directory, defaulting to
$HOME/bin
:
make BINDIR=$HOME/bin
Navigate to the test
directory of the EnKF_advection
repository:
cd EnKF_advection/test
and run:
advect.lin
Create the /usr/local/bin
directory which allows the advection2
command to be ran
from anywhere on the local file system:
mkdir -p /usr/local/bin
then create a symlink for $HOME/bin/advect.lin
to /usr/local/bin
ln -s $HOME/bin/advect.lin /usr/local/bin/
then run the project:
cd EnKF_advection/test
advect.lin
If you have tecplot (tec360) there are .lay
and .mcr
files in the run
directory.