Quick Look Content (QLC): Model–Observation Comparison Suite for Use with CAMS
Project description
Quick Look Content (QLC): An Automated Model–Observation Comparison Suite
Quick Look Content (QLC) is a powerful, command-line driven suite for model–observation comparisons, designed to automate the evaluation of climate and air quality model data. It is optimized for use with CAMS (Cop Copernicus Atmospheric Monitoring Service) datasets but is flexible enough for general use cases.
The suite streamlines the entire post-processing workflow, from data retrieval and collocation to statistical analysis and the generation of publication-quality figures and reports.
| Package | Status |
|---|---|
| rc-qlc on PyPI |
What's New in v0.3.27
This release focuses on improving the out-of-the-box installation experience, especially for HPC environments, and significantly expanding the user documentation.
- Installer Overhaul: The
qlc-installscript is now more robust.- It automatically creates the
qlc->qlc_latest->qlc_vX.Y.Z/<mode>symlink structure, removing the need for manual setup. - It now provides clear, actionable instructions on how to update your
PATHif needed.
- It automatically creates the
- Enhanced HPC & Batch Job Support:
- The batch submission script (
sqlc) is more reliable, no longer using hardcoded paths. - Shell scripts are now more compatible with typical HPC environments that may only have a
python3executable.
- The batch submission script (
- Expanded Documentation:
- The
USAGE.mdguide now includes comprehensive, exhaustive lists of currently available plotting regions, observation datasets, and supported chemical/meteorological variables. - A new "Advanced Workflow" section has been added to
USAGE.md, explaining the underlying shell script pipeline, theparam/ncvar/myvarvariable mapping system, and how to use your own data with theqlc-pyengine. - Added a note on the future integration with the GHOST database.
- The
- Dependency Fix: The
adjustTextlibrary is now included as a core dependency.
What's New in v0.3.26
This version introduces a completely new, high-performance Python processing engine and a more robust installation system.
- New Python Engine (
qlc-py): The core data processing and plotting is now handled by a powerful Python-based tool, compiled with Cython for maximum performance. This replaces much of the previous shell-script-based logic. - Standalone
qlc-pyTool: In addition to being used by the mainqlcpipeline,qlc-pycan be run as a standalone tool for rapid, iterative analysis using a simple JSON configuration. - New
camsInstallation Mode: A dedicated installation mode for operational CAMS environments that automatically links to standard data directories. - Simplified and Robust Installation: The installer now uses a consistent directory structure based in
$HOME/qlc, with a smart two-stage symlink system to manage data-heavy directories for different modes (testvs.cams). - Dynamic Variable Discovery: The shell pipeline now automatically discovers which variables to process based on the available NetCDF files, simplifying configuration.
- Flexible Model Level Handling: The Python engine can intelligently select the correct vertical model level for each variable or use a user-defined default.
Core Features
- Automated End-to-End Workflow: A single
qlccommand can drive the entire pipeline: MARS data retrieval, data processing, statistical analysis, plotting, and final PDF report generation. - High-Performance Engine: The core data processing logic is written in Python and compiled with Cython into native binary modules, ensuring high performance for large datasets.
- Publication-Ready Outputs: Automatically generates a suite of plots (time series, bias, statistics, maps) and integrates them into a final, professionally formatted PDF presentation using a LaTeX backend.
- Flexible Installation Modes: The
qlc-installscript supports multiple, co-existing modes:--mode test: A standalone mode with bundled example data, perfect for new users. All data is stored locally in$HOME/qlc_v<version>/test/.--mode cams: An operational mode that links to standard CAMS data directories and uses environment variables like$SCRATCHand$PERMfor data storage in shared HPC environments.
- Simplified Configuration: The entire suite is controlled by a single, well-documented configuration file (
$HOME/qlc/config/qlc.conf) where you can set paths, experiment labels, and plotting options.
Quickstart
1. Install the Package
pip install rc-qlc
2. Set Up the Test Environment
This creates a local runtime environment in $HOME/qlc_v<version>/test and links $HOME/qlc to it. It includes all necessary configurations and example data.
qlc-install --mode test
3. Run the Full Pipeline
Navigate to the working directory and run the qlc command. This will process the example data (comparing experiments b2ro and b2rn) and generate a full PDF report in $HOME/qlc/Presentations.
cd $(readlink -f $HOME/qlc)
qlc b2ro b2rn 2018-12-01 2018-12-21
Prerequisites
Before running the QLC suite, please ensure the following system-level software is installed and accessible in your environment's PATH:
pdflatex: Required for generating the final PDF reports. It is part of the TeX Live distribution.CDO(Climate Data Operators): Used for processing NetCDF data.eccodes: The ECMWF library for decoding and encoding GRIB files.netcdf: The core NetCDF libraries.
On HPC systems, these tools are typically made available by loading the appropriate modules (e.g., module load cdo). On personal machines, they can be installed using system package managers like apt-get (Debian/Ubuntu), yum (Red Hat/CentOS), or brew (macOS).
Installation and Configuration
Standard Installation
QLC is installed from PyPI. After the pip install, you must run qlc-install to set up the necessary local directory structure.
First-Time Installation
pip install rc-qlc
Upgrading an Existing Installation
To ensure you have the latest version, always use the --upgrade flag:
pip install --upgrade rc-qlc
After installing, set up your desired environment:
# For a standalone test environment with example data
qlc-install --mode test
# For an operational CAMS environment
qlc-install --mode cams
Installation in Restricted Environments (HPC/ATOS)
In environments where you do not have root permissions, pip will install packages into your local user directory. You may need to take a couple of extra steps.
1. Update your PATH (Recommended)
The executable scripts (qlc, qlc-py, etc.) will be placed in $HOME/.local/bin. Add this to your shell's PATH to run them directly.
# Example for bash shell
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
2. Load the Correct Python Module Ensure you are using a compatible Python version.
module load python3/3.10.10-01
3. Install and Run Now you can install as normal.
pip install rc-qlc && qlc-install --mode test
If you chose not to update your PATH, you must call the installer script by its full path:
pip install rc-qlc && $HOME/.local/bin/qlc-install --mode test
Where Files Are Installed
- Python Package Source:
$HOME/.local/lib/python3.10/site-packages/qlc/ - Executable Scripts:
$HOME/.local/bin/ - QLC Runtime Environment:
$HOME/qlc_v<version>/<mode> - Stable Symlink:
$HOME/qlc(points to the latest installed runtime environment)
Configuration Structure
The primary configuration file is located at $HOME/qlc/config/qlc.conf. The installation process uses a two-stage symlink system to manage data directories, allowing the config file to remain simple and portable.
For example, in test mode:
$HOME/qlc/Results(the path in your config) -> is a symlink to$HOME/qlc_v<version>/test/Results-> which is a symlink to$HOME/qlc_v<version>/test/data/Results-> which is a real directory.
In cams mode, the final target is a symlink to a shared directory (e.g., $SCRATCH/Results), but the path in your config file remains the same.
Developer Setup
To work on the qlc source code, clone the repository and install it in "editable" mode.
# 1. Clone the repository
git clone https://github.com/researchConcepts/qlc.git
cd qlc
# 2. (Recommended) Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate
# 3. Install in editable mode (this compiles the Cython modules)
pip install -e .
# 4. Set up the test environment for development
qlc-install --mode test
For advanced development, you can also use --mode interactive, which requires you to provide a path to a custom configuration file using the --config flag. This is useful for testing with non-standard setups.
qlc-install --mode interactive --config /path/to/your/custom_qlc.conf
Advanced Topics
Installing PyFerret for Global Plots
The qlc_C5.sh script, which generates global map plots, requires the pyferret library. This is an optional dependency.
- To install with
pyferretsupport:pip install "rc-qlc[ferret]"
- If you do not need these plots, you can either skip the
pyferretinstallation or, if it's already installed, disable the script by commenting out"C5"in theSUBSCRIPT_NAMESarray in your$HOME/qlc/config/qlc.conffile. - For HPC environments,
pyferretis often available as a module that can be loaded (e.g.,module load ferret/7.6.3).
Manual PyFerret Installation for macOS / Apple Silicon
If you are using a Mac with Apple Silicon (M1/M2/M3) or if the standard installation fails, pyferret may require a manual setup using a dedicated conda environment. pip installations are not recommended for this package on macOS as they may not work correctly with the ARM architecture.
The most reliable method is to use conda with the Rosetta 2 translation layer.
1. (If needed) Install Conda
If you do not have conda installed, we recommend Miniforge, which is a minimal installer that is optimized for Apple Silicon and includes the high-performance mamba package manager.
# Download and run the installer for Apple Silicon
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh"
bash Miniforge3-MacOSX-arm64.sh
# Follow the prompts and restart your terminal after installation
2. Create a Dedicated x86_64 Environment for PyFerret
This command creates a new conda environment named pyferret_env and installs the Intel (x86_64) version of pyferret, which will run seamlessly on Apple Silicon via Rosetta 2. It also pins numpy to a version older than 2.0 to ensure compatibility.
CONDA_SUBDIR=osx-64 conda create -n pyferret_env -c conda-forge pyferret ferret_datasets "numpy<2" --yes
3. Configure QLC to Use the New Environment
The QLC scripts need to know where to find this new pyferret installation. You can achieve this by modifying the qlc_C5.sh script to activate the environment.
Open the file $HOME/qlc/sh/qlc_C5.sh and add the following lines near the top, after source $FUNCTIONS:
# ... after 'source $FUNCTIONS'
# Activate the dedicated conda environment for pyferret
if [ -f "$HOME/miniforge3/bin/activate" ]; then
. "$HOME/miniforge3/bin/activate"
conda activate pyferret_env
fi
# ... rest of the script
Note: The path to the activate script may differ if you installed Anaconda/Miniforge in a custom location.
MARS Data Retrieval
The qlc_A1.sh script is responsible for retrieving data from the ECMWF MARS archive. It uses a mapping system to associate the experiment prefix with a MARS class.
By default, the script is configured for nl (Netherlands), be (Belgium), and rd (Research Department) experiments. If you are working with data from other classes (e.g., fr for France, de for Germany), you will need to manually edit $HOME/qlc/sh/qlc_A1.sh and uncomment / edit the corresponding XCLASS line to ensure data is retrieved correctly.
Troubleshooting
macOS "Permission Denied" or Quarantine Issues
On macOS, the Gatekeeper security feature may "quarantine" files, including shell scripts that have been downloaded or modified. This can prevent them from being executed, sometimes with a "Permission Denied" error, even if the file has the correct execute permissions (+x).
This is most likely to occur if you manually edit the qlc shell scripts (.sh files) directly in their site-packages installation directory.
To resolve this, you can manually remove the quarantine attribute from the script directory using the xattr command in your terminal.
-
First, find the exact location of the
qlcpackage:pip show rc-qlc
Look for the
Location:line in the output. This is yoursite-packagespath. -
Then, use the
xattrcommand to remove the quarantine flag: Use the path from the previous step to build the full path to theqlc/shdirectory.# The path will depend on your Python installation. Use the location from 'pip show'. xattr -rd com.apple.quarantine /path/to/your/site-packages/qlc/sh/
This should immediately resolve the execution issues.
License
© ResearchConcepts io GmbH
Contact: contact@researchconcepts.io
MIT-compatible, source-restricted under private release until publication.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rc_qlc-0.3.27-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: rc_qlc-0.3.27-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 81.5 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75870610778c4f8b4e57816b96501604ed160f5badd035741022d8ce523148aa
|
|
| MD5 |
dd42e05cc5efb5dab820a8388705416f
|
|
| BLAKE2b-256 |
a7cd5b02e974f3efca1dc6198c57393f1ce1dcb37b54912c70dac226cc8170ab
|
File details
Details for the file rc_qlc-0.3.27-cp311-cp311-win32.whl.
File metadata
- Download URL: rc_qlc-0.3.27-cp311-cp311-win32.whl
- Upload date:
- Size: 81.4 MB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea525d46f7b72d9e1a29d0a66be55d140e1758d08390329c97f51d700c985f1a
|
|
| MD5 |
2117162638d733e8c7687af029efe96a
|
|
| BLAKE2b-256 |
3e2f40b94a8ac4403a89e605427ec2187ba0af1d128e07bfbe1e10e43f789ebf
|
File details
Details for the file rc_qlc-0.3.27-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rc_qlc-0.3.27-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 90.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9ab40cb083351635e5a2304ae4734fad1dcf00203adbdee0af60af8f32ecfeb
|
|
| MD5 |
7e9decbd8ac340920f7ada6b4c0cfb67
|
|
| BLAKE2b-256 |
2d071883e4bea322ddf95bbba27dd5b0e8fc249a2ec3d909533272b5c908cf5a
|
File details
Details for the file rc_qlc-0.3.27-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: rc_qlc-0.3.27-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 81.6 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
975638b2eab2fe0175cf472e13d1a7561fc8bca8b47cc6047323e6b4d26a54af
|
|
| MD5 |
7032740b81e5a0654772d80f01c1990f
|
|
| BLAKE2b-256 |
1fbccb42a4ff98930550201451bb68ac96ea23d35b4f580b1bf4b034268cbc60
|
File details
Details for the file rc_qlc-0.3.27-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: rc_qlc-0.3.27-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 81.5 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94906de61ecc4c35a5693a4b8c558cecf8f2550b742236ab81a8a24e32849902
|
|
| MD5 |
7925fbc63da2da7a2dbb2f53960f62ef
|
|
| BLAKE2b-256 |
a160bdae49fcc426bc181c170fd427fc1eadf717f90f861a8eb74d5900431ece
|
File details
Details for the file rc_qlc-0.3.27-cp310-cp310-win32.whl.
File metadata
- Download URL: rc_qlc-0.3.27-cp310-cp310-win32.whl
- Upload date:
- Size: 81.4 MB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b432acd0b400df950b27127d41b676fc2c1eaf5651a8cc18b7e6f1c17de114b2
|
|
| MD5 |
13f5afb7a836643b0ac603a8d29936a9
|
|
| BLAKE2b-256 |
628c4d742aa1b9652b15290126c5a85241777bfb8ee7d7bf77bf7f0735c1adc3
|
File details
Details for the file rc_qlc-0.3.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rc_qlc-0.3.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 89.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48753ce808be8bcf3316c8caa890943f943e7bce5072e65c5615491c67938d2c
|
|
| MD5 |
f658bff200bd7082a86687cc668fa5be
|
|
| BLAKE2b-256 |
7aff530830d37368d5bb909738613c65eac7eb1a4081a779fc9fd5badcc70177
|
File details
Details for the file rc_qlc-0.3.27-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: rc_qlc-0.3.27-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 81.6 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
326fa440d9f898e59bd2174d305313a7e6efe44fd6e9dde880fdb84a911694d4
|
|
| MD5 |
28c0519136bc64db38e283a68d68f8fa
|
|
| BLAKE2b-256 |
7443b5656132e2a78edbe2c3a6069d7657d0acc25a327a60c149b39971d33053
|