Skip to main content

ISIMIP quality control

Python Version License CI status Latest release DOI

A command line tool for the quality control of climate impact data of the ISIMIP project. It mainly covers tests of:

  • the file name against the protocol schemas and patterns
  • variables, dimensions and global attributes
  • data model and types
  • some consistency checks on the NetCDF time axis and
  • if the data is within a valid value range (when defined in the ISIMIP protocol)

Setup

The application is written in Python (> 3.11) uses only dependencies, which can be installed without administrator privileges. The installation of Python (and its developing packages), however differs from operating system to operating system. Optional Git is needed if the application is installed directly from GitHub. The installation of Python 3 and Git for different platforms is documented here.

The tool itself can be installed via pip. Usually you want to create a virtual environment first, but this is optional. The tool works also with pipx.

# setup venv on Linux/macOS/Windows WSL
python3 -m venv env
source env/bin/activate

# setup venv on Windows cmd
python -m venv env
call env\Scripts\activate.bat

# install from the Python Package Index (PyPI), recommended
pip install isimip-qc

# update from PyPI
pip install --upgrade isimip-qc

# install directly from GitHub
pip install git+https://github.com/ISI-MIP/isimip-qc

# update directly from GitHub
pip install --upgrade git+https://github.com/ISI-MIP/isimip-qc

Usage

The tool has several options which can be inspected using the help option -h, --help:

usage: isimip-qc [-h] [-c] [-m] [-O] [--unchecked-path UNCHECKED_PATH]
                 [--checked-path CHECKED_PATH] [--protocol-location PROTOCOL_LOCATIONS]
                 [--log-level LOG_LEVEL] [--show-time] [--show-path] [--log-path LOG_PATH]
                 [--log-path-level LOG_PATH_LEVEL] [--include INCLUDE] [--exclude EXCLUDE] [-f]
                 [-w] [-e] [--ignore-critical] [--skip-exp] [--match-only] [-r [MINMAX]] [-nt]
                 [--summary] [--fix] [--fix-datamodel [FIX_DATAMODEL]] [--check CHECK]
                 [--force-copy-move] [-V]
                 schema_path

Check ISIMIP files for matching protocol definitions

positional arguments:
  schema_path           ISIMIP schema_path, e.g. ISIMIP3a/OutputData/water_global

options:
  -h, --help            show this help message and exit
  -c, --copy            copy checked files to CHECKED_PATH if clean and all QC attributes are set
  -m, --move            move checked files to CHECKED_PATH if clean and all QC attributes are set
  -O, --overwrite       overwrite files in CHECKED_PATH if present. Default is False.
  --unchecked-path UNCHECKED_PATH
                        base path of the unchecked files
  --checked-path CHECKED_PATH
                        base path for the checked files
  --protocol-location PROTOCOL_LOCATIONS
                        URL or file path to the protocol when different from official repository
  --log-level LOG_LEVEL
                        log level (CRITICAL, ERROR, WARN, CHECKING, INFO, or DEBUG) [default:
                        CHECKING]
  --show-time           show time in console logs
  --show-path           show path in console logs
  --log-path LOG_PATH   base path for the individual log files
  --log-path-level LOG_PATH_LEVEL
                        log level for the individual log files [default: WARN]
  --include INCLUDE     patterns of files to include. Exclude those that don't match any.
  --exclude EXCLUDE     patterns of files to exclude. Include only those that don't match any.
  -f, --first-file      only process first file found in UNCHECKED_PATH
  -w, --stop-on-warnings
                        stop execution on warnings
  -e, --stop-on-errors  stop execution on errors
  --ignore-critical     continue checking and fix files with critical issues found (use
                        --force-copy-move to also copy or move them)
  --skip-exp            skip test for valid experiment combination
  --match-only          only match the file name and skip all other checks
  -r [MINMAX], --minmax [MINMAX]
                        test values for valid range (slow). MINMAX denotes the length of the
                        ordered top list of outliers
  -nt, --skip-time-span-check
                        skip check for simulated time period
  --summary             append a summary with statistics about experiments and specifiers to the
                        output
  --fix                 try to fix warnings detected on the original files
  --fix-datamodel [FIX_DATAMODEL]
                        also fix warnings on data model found using NCCOPY or CDO (slow). Choose
                        preferred tool per lower case argument.
  --check CHECK         perform only one particular check
  --force-copy-move     copy or move files despite missing QC attributes, warnings and errors
                        (files with critical issues also require --ignore-critical)
  -V, --version         show program's version number and exit

The only mandatory argument is the schema_path, which specifies the pattern and schema to use. The schema_path consitst of the simulation_round, the product, and the sector separated by slashes, e.g. ISIMIP3a/OutputData/water_global. If the only argument used is schema_path, the current user path when calling the tool should be same as the directory of the files to be checked.

The options in detail

  • --config-file: Default values for the optional arguments are set in the code, but can also be provided via:

    • a config file given by --config-file, or located at isimip.toml, ~/.isimip.toml, or /etc/isimip.toml. The config file needs to have a section isimip-qc and uses lower case variables and underscores, e.g.:
    [isimip-qc]
    unchecked_path = "data/unchecked"
    checked_path = "data/checked"
    
    log_level = "INFO"
    log_path = "data/log"
    log_path_level = "INFO"
    
    minmax = true  # for the default value
    minmax = 5     # for a custom value
    
    • environment variables (in caps, with underscores, and with ISIMIP_ as prefix, e.g. ISIMIP_UNCHECKED_PATH).
  • -c, --copy and -m, --move: Copy or move files that have successfully passed the checks to a final destination. Effective only when no warnings, errors or critical issues were found and the four QC global attributes isimip_id, isimip_qc_version, isimip_protocol_version and isimip_qc_pass_date are set on the file (they can be applied with --fix). See --force-copy-move to copy or move regardless.

  • -O, --overwrite: Allow overwriting of existing files in CHECKED_PATH. Default is to skip copy or move in case the target file is already present. A file that would be copied or moved onto itself is always skipped.

  • --unchecked-path UNCHECKED_PATH: Any files in this folder and its subfolders will be included into the list of files to test.

  • --checked-path CHECKED_PATH: Target folder for the --copy or --move operation. The subfolder structure below CHECKED_PATH will be created and filled according to the sub-structure found in UNCHECKED_PATH

  • --protocol-location PROTOCOL_LOCATIONS: For working with local copies of the ISIMIP protocol (append /output to the cloned repositories folder). Omit option for using the online GitHub protocol versions for ISIMIP2 or ISIMIP3. An internet connection is required for reading the online protocols.

  • --log-level LOG_LEVEL: Set the detail level of log output. Default is CHECKING. Log levels from CRITICAL to VRDETAIL will not show the file currently checked in the terminal but write all of them to the data file specific log file.
    CRITICAL: only very severe errors
    ERROR: all errors
    WARN: warnings and all errors
    VRDETAIL: same as CHECKING but with details on time and location of valid ranges violations when invoked with --minmax option. Very slow when violations are detected.
    CHECKING: includes warnings and errors
    SUMMARY: includes warnings, errors and the summary shown at the end
    INFO: includes SUMMARY and details for successful checks
    DEBUG: all the above plus details for some debugging cases.

  • --show-time: show the timestamp in console logs

  • --show-path: Show the path from where a log entry is written in console logs

  • --log-path LOG_PATH: Also write the logs to a file where the folder structure below LOG_PATH is taken from UNCHECKED_PATH.

  • --log-path-level LOG_PATH_LEVEL: The log level used for the file specific logs below LOG_PATH. The default is WARN and should suffice for most cases.

  • --include INCLUDE_LIST: Provide a comma-separated list of strings to include for the checks if any of them matches the file path or name, e.g. 'daily,dis' will only check *daily* or *discharge* files while skipping others.

  • --exclude EXCLUDE_LIST: Provide a comma-separated list of strings to exclude from the checks if any of them matches the file path or name, e.g. 'monthly,histsoc' will skip any *monthly* or *histsoc* files.

  • -f, --first-file: Only test the first file found in UNCHECKED_PATH. Useful for revealing issues that may occur on all your files.

  • -w, --stop-on-warnings: The tool will stop after the first file where WARNINGs have been identified.

  • -e, --stop-on-errors: The tool will stop after the first file where ERRORs have been identified.

  • --ignore-critical: Continue the checks and apply fixes even though critical issues were found. The file is still not copied or moved by this alone, as it is not considered clean (see --force-copy-move). Caution, this might lead to unexpected behaviour.

  • --skip-exp: Skip test for valid experiment combination validation, e.g for secondary outputs.

  • -r [MINMAX], --minmax [MINMAX]: Test the data for valid ranges when defined in the protocol and outputs a toplist with exact time step and geographic location. MINMAX is optional, defaults to 10 and defines the length of the toplist. This test drastically slows down the run time of the tool as every data point is looked at.

  • -nt, --skip-time-span-check: Skip checking non-dialy data for proper coverage of simulation periods.

  • --fix: Activates a number of fixes for WARNINGs by taking the default values from the protocol, e.g. variable attributes and units. In additions an unique identifier (UUID), the version of this tool and the protocol version (by a git hash) are being written to the global attributes section of the NetCDF file. Attention: Fixes and are going to be applied on your original files in UNCHECKED_PATH.

  • --fix-datamodel [FIX_DATAMODEL]: Fixes to the data model and compression level of the NetCDF file can't be made on-the-fly with the libraries used by the tool. We here rely on the external tools cdo or nccopy (from the NetCDF library) to rewrite the entire file. Default is nccopy. Please try to create the files with the proper data model (compressed NETCDF4_CLASSIC) in your postprocessing chain before submitting them to the data server.

  • --check CHECK: Perform only one particular check. The list of CHECKs can be taken from the functions defined in the isimip_qc/checks/*.py files.

  • --force-copy-move: Copy or move files despite missing QC global attributes, warnings and errors found during checks. Files with critical issues are only copied or moved if --ignore-critical is given as well, since without it they never reach the copy/move step.

Metadata

Release files for isimip-qc 4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isimip-qc 4.1
File Size Uploaded Provenance Actions
isimip_qc-4.1.tar.gz 34.3 kB With provenance Details for isimip_qc-4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for isimip-qc 4.1
File Interpreter ABI Platform Actions
isimip_qc-4.1-py3-none-any.whl Python 3 none any Details for isimip_qc-4.1-py3-none-any.whl

Total release size: 76.0 kB

Release files / isimip_qc-4.1.tar.gz

Download URL isimip_qc-4.1.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c02fa57537ba9b9c8b0adbb6d4593df4b3df101ab5a61f225af88a3290736ea5
BLAKE2b-256 checksum
How to use checksums
5eb9e3de23f3795b65a03077bc5a4e9f4dad2c6b49f04f3db06b598ea150e4bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / isimip_qc-4.1-py3-none-any.whl

Download URL isimip_qc-4.1-py3-none-any.whl
Size 41.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96fbd6e16000ee781cd5d563dd96c4151d7df4ad70e697ead6281e4e19e8be2a
BLAKE2b-256 checksum
How to use checksums
f0295a4bde24a939f4124937f7d4b1161fe185eb7f2cbaee277956479fd8bf55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Security for isimip-qc 4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for isimip_qc-4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page