This project implements the 4D-Var (Four-Dimensional Variational Data Assimilation) technique to estimate the state of a dynamic system. The code is designed to work with the Lorenz '95 model, a simplified atmospheric model often used in data assimilation studies.
To set up the environment, follow these steps:
-
Clone the repository:
git clone https://github.com/Oussamamouhtal/DataAssimilation.git cd DataAssimilation
-
Create a virtual environment:
python -m venv env
-
Activate the virtual environment:
- On Windows:
.\env\Scripts\activate
- On macOS and Linux:
source env/bin/activate
- On Windows:
-
Install the required packages:
pip install -r requirements.txt
To run the 4D-Var data assimilation process, you need to have the necessary model, operators, and solver files in place. The main function is fourDvar
, implemented in fourdvar.py
, which returns a list of values of the quadratic cost function. You can run logger.py
to generate a plot showing the convergence of the Gauss-Newton process or plot just the second inner loop to benchmark different inner solvers.