A comprehensive, modular, and reproducible framework for validating and analyzing NEMO ocean model simulations
NEMOCheck is a robust validation and analysis toolkit for the NEMO ocean model. It empowers users to perform thorough, reproducible, and insightful assessments of model performance. Supported comparison modes include both model–model and model–observation evaluations for essential oceanographic variables:
- Sea Surface Temperature (SST)
- Sea Surface Salinity (SSS)
- Mixed Layer Depth (MLD)
NEMOCheck provides both interactive Jupyter notebooks for exploration and scripting, as well as non-interactive workflows for automation—all within a locked, reproducible conda environment. The modular design means you can easily extend analyses to new model configurations and diagnostics.
- Interactive Analysis: Explore, plot, and tune parameters in Jupyter notebooks.
- Quantitative Diagnostics: Powerful statistics tools (PCA, vertical profiles, zonal means, and more).
- Flexible Visualization: Effortless side-by-side model/observation comparisons.
- Automated Processing: Scripts for climatology computation, data normalization, and standardization.
- Reproducible Environments: Conda-lock guarantees bitwise identical dependencies on Linux and macOS.
- Easy Extensibility: Plug in new configurations and methods with minimal friction.
For a comprehensive overview of supported NEMO configurations, check out:
📄 Model Configurations Guide (PDF)
This document provides:
- Overview of supported NEMO configurations
- Configuration-specific parameters and settings
Get started with NEMOCheck by following these steps:
-
Install Git LFS (Large File Storage)
Git LFS is required to efficiently handle large files in this repository.- On Ubuntu/Linux:
sudo apt-get install git-lfs
- On macOS (with Homebrew):
brew install git-lfs
- On Ubuntu/Linux:
-
Initialize Git LFS
Set up Git LFS for your user account:git lfs install
-
Clone the Repository
Download the project code to your local machine (note: this may take a while due to ~10 GB of data):git clone https://github.com/gantz-thomas-gantz/NEMOCheck.git cd NEMOCheck -
Set Up the Environment
Run the provided script to create a Python environment and install dependencies:./env/install_env.sh
-
Start JupyterLab
Once setup is complete, activate the environment and launch JupyterLab. Follow the on-screen instructions.
You are now ready to explore and use NEMOCheck in your browser via JupyterLab!
-
Open and run any notebook as usual in JupyterLab.
-
Be sure to select the
nemocheck_envkernel in JupyterLab for compatibility. -
You can also run interactive plotting scripts directly in the terminal, for example:
python src/utils/plot/model_model/horizontal.py
-
The install script uses
conda-lock.yml, which pins all dependencies with exact versions for reproducibility. -
For a more human-readable list of dependencies, see
environment.yml. -
The
conda-lock.ymlfile was generated fromenvironment.ymlby running:conda-lock lock -f environment.yml --micromamba -p linux-64 -p osx-64 -p osx-arm64
-
This means the environment and code are intended to work on both Linux and macOS platforms.
The data/ directory is structured as follows:
data/
├── model/ # Raw NEMO outputs (horizontal fields, sections) & ORCA05 mesh
├── obs/ # Observational datasets (SST, SSS, MLD, EKE)
├── processed/ # Preprocessed, standardized files ready for analysis
├── weights/ # Interpolation weight files
└── processing/ # Scripts & notebooks for data processing
├── processing.ipynb # General data processing
├── monthly_sst.ipynb # Monthly SST standardization
└── compute_climatology.sh # Climatology computation script
Processed data is generated via one of the following methods:
-
Climatology computation bash script
- Script:
data/processing/compute_climatology.sh - Output:
data/processed/nemo<00>_clim_2011_2022.nc - Usage: Horizontal model–model comparison:
src/interactive/plotting_tool
- Script:
-
Processing notebook
- Notebook:
data/processing.ipynb - Output:
data/processed/model.nc,data/processed/combined_observations.nc - Usage:
- Horizontal model–obs comparison:
src/interactive/plotting_tool - Error profiles for model–obs:
src/interactive/plotting_tool.ipynb - Non-interactive SST diagnostics:
src/non-interactive/sst.ipynb
- Horizontal model–obs comparison:
- Notebook:
-
Monthly SST processing
- Notebook:
data/processing/monthly_sst.ipynb - Output:
data/processed/nemo00_sst_monthly_2011_2022.nc,data/processed/observations_sst_monthly_2011_2022.nc - Usage: Standardized monthly SST datasets for quantitative analysis (e.g.,
src/quantitative/pca.ipynb)
- Notebook:
-
Model normalization function
- Function:
normalize_model_file()insrc/utils/data/general.py - Output:
data/processed/nemo<00>.nc - Usage:
src/quantitative/eke.ipynbsrc/quantitative/zonal_sst.ipynb
- Function:
Further details on the data pipeline are documented at the top of data/processing.ipynb.
model.nc: Derived from the00configuration and uses an MLD criterion that matches the observational dataset.nemo<00>.nc: Contains SST, SSS, and MLD (model definition), interpolated to a regular 1° grid.nemo<00>_clim_2011_2022.nc: Retains all model variables on the native grid for inter-model comparisons.
NEMOCheck/
├── 📄 README.md # You are here!
├── 📄 LICENSE # CeCILL FREE SOFTWARE License
├── 📄 pyproject.toml # Python package configuration
├── 🗂️ env/ # Environment setup
│ ├── environment.yml # Human-readable dependencies
│ ├── conda-lock.yml # Locked dependencies for reproducibility
│ └── install_env.sh # One-click environment setup
├── 🗂️ data/ # Data storage and processing
│ └── processing/ # Data pipeline scripts & notebooks
├── 🗂️ docs/ # Documentation files
└── 🗂️ src/ # Main source code
├── 🎯 interactive/ # ⭐ Interactive Jupyter notebooks (START HERE!)
│ ├── plotting_tool.ipynb # 🌟 Beautiful interactive plots & comparisons
│ └── numerical_schemes.ipynb # Model scheme analysis
├── 📊 quantitative/ # Statistical analysis notebooks
│ ├── eke.ipynb # Eddy kinetic energy analysis
│ ├── pca.ipynb # Principal component analysis (SST patterns)
│ ├── vertical.ipynb # Vertical profile diagnostics
│ └── zonal_sst.ipynb # Zonal SST analysis
├── 🔬 non-interactive/ # Automated analysis scripts
│ └── sst.ipynb # Sea surface temperature diagnostics
├── 🧠 understanding/ # Model understanding tools
│ ├── mesh.ipynb # Grid and mesh analysis
│ └── plotting.ipynb # Plotting utilities exploration
└── 🛠️ utils/ # Reusable utility modules
├── data/ # Data processing utilities
└── plot/ # Visualization utilities
├── model_model/ # Model-to-model comparison plots
└── model_obs/ # Model-to-observation comparison plots
New users should begin with the src/interactive/ notebooks, particularly:
-
plotting_tool.ipynb🎨 - The crown jewel! Features interactive visualizations for comparing models and observations. -
numerical_schemes.ipynb🔍 - Deep dive into model numerical schemes and their impact on results.
The interactive notebooks provide an intuitive entry point to NEMOCheck's capabilities, with rich visualizations that make complex oceanographic data immediately accessible and interpretable.
To include a new NEMO configuration in the analysis:
- Open the last cell of
data/processing/processing.ipynb, update thecfgslist, and re-run the cell. - Open
data/processing/compute_climatology.sh, update thecfgslist, and re-run the script.
Gurvan Madec (2024). NEMO Ocean Engine Reference Manual (v5.0). Zenodo. https://doi.org/10.5281/zenodo.14515373
If you use NEMOCheck, please consider citing this repository:
@software{nemocheck,
author = {Thomas Gantz},
title = {NEMOCheck: Validation and Analysis Framework for NEMO Ocean Model},
url = {https://github.com/gantz-thomas-gantz/NEMOCheck},
year = {2025}
}