NWM/NextGen Verification (nwm.verf)
A python library for conducting verification for NWM/NextGen forecasts. It also supports evaluating NGEN simulations (e.g., for evaluating regionalization)
- clone nwm-verf
cd [NWM_VERF_ROOT]
git clone -b development --recurse-submodules https://github.com/NGWPC/nwm-verf.git- clone nwm.eval (since nwm.verf requires nwm.eval as a dependency)
cd [NWM_EVAL_ROOT]
git clone -b development --recurse-submodules https://github.com/NGWPC/nwm-eval-mgr.git- create python venv
cd [VENV_ROOT]
/usr/bin/python3.11 -m venv venv
source venv/bin/activate
pip install --upgrade pip- install nwm.eval
cd [NWM_EVAL_ROOT]/nwm-eval-mgr
pip install .- install nwm.verf
cd [NWM_VERF_ROOT]/nwm-verf
pip install .where [NWM_EVAL_ROOT], [NWM_VERF_ROOT], [VENV_ROOT] refer to the directory to install nwm.eval, nwm.verf, and python venv in your local workspace, respectively
- set up configuration yaml file
Follow the sample config file (nwm-verf/data/configs) to set up the configurations for your verification application.
- For verifying ngeCERF forecasts, use: config_ngencerf.yaml
- For verifying NWM v30 forecasts, use: config_nwm.yaml
- For evaluating NGEN simulations, use: config_ngensim.yaml
- run verification/evaluation
python -m nwm.verf config.yaml- repeat the first two steps as many times as needed
To build and run nwm-verf, you will need the following software installed and running on your system:
- Docker Engine
You will also need the following data:
- a GitLab Personal Access Token (PAT)
To build the nwm-verf container, execute the following command:
GITLAB_TOKEN=$(cat ~/.gitlab_token) docker build --secret id=GITLAB_TOKEN,env=GITLAB_TOKEN --tag=nwm-verf .
To run the nwm-verf applicaton, execute the following command:
docker run nwm-verf
This will print a usage statement for the container:
Usage: run-nwm-verf.sh <command> <config_file> [stdout_file]
COMMAND:
verification Run verification script.
CONFIG_FILE: Path to the config yaml file for a verification run.
STDOUT_FILE (optional): Path to the stdout file where the script's console output will be saved.
Examples:
run-nwm-verf.sh verification test_data/verf_config.yaml
run-nwm-verf.sh verification test_data/verf_config.yaml /path/to/output/nwm-verf.log
The path provided for any files should match the path within the container, as well as the paths inside your configuration file.