Skip to content

NES_Installation_Makefile

Carles Tena edited this page Oct 6, 2026 · 2 revisions

NES Installation Guide

This guide describes installation with the project Makefile, including environment creation, activation scripts and verification. The dependency definitions in environment.yml are the reference for this workflow.

Table of Contents


1. Environment requirements

Install Git, Make and Mamba or Conda. The project environment uses Python 3.10, MPI-enabled NetCDF/HDF5, mpi4py, ecCodes and the geospatial libraries listed in environment.yml.

On MareNostrum5, the existing project setup uses:

module load git
module load Mamba/23.11.0-0
source activate base

Use the module versions provided by your cluster if these are unavailable.

2. Clone the repository

git clone https://github.com/BSC-ES/NES.git NES
cd NES

3. Install NES

User installation

make full_installation

This creates ./NES_v1.3.5, installs NES, writes activation scripts and runs the project tests. The environment suffix follows the version in the Makefile.

To select a parent directory:

make full_installation CONDA_ENV_DIR=/path/to/conda_envs

On MareNostrum5, a project installation can use:

make full_installation CONDA_ENV_DIR=/gpfs/projects/bsc32/repository/apps/conda_envs

Developer installation

make full_installation_for_dev

This installs NES in editable mode in ./NES_<your-username>. The same CONDA_ENV_DIR option selects another parent directory.

Conda and local alternatives

make full_conda_installation

This uses Conda with the libmamba solver and includes activation scripts and tests.

make full_local_installation

This uses Conda and runs installation and tests, without the cluster activation scripts.

4. Activate and verify

Activate the environment path printed by Make. For the default user installation:

conda activate ./NES_v1.3.5
python -c 'import nes; print(nes.__version__)'
nes --help
nes check --help

NES has no -V CLI option; query the Python package for its version. The installation targets run import/style, projection and method tests. To rerun them in the installed environment:

make run_tests

5. First execution

Start with the short examples, then consult the user guide for Python workflows and CLI commands.

For a parallel script:

mpirun -n 4 python workflow.py

The MPI runtime and Python environment must use compatible MPI libraries. See the FAQ for installation troubleshooting.

Clone this wiki locally